ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
sprite_color.c
Go to the documentation of this file.
1/*****************************************************************************
2 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
3 *****************************************************************************
4 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *----------------------------------------------------------------------------
18 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
19 * (la "Licenza"); è proibito usare questo file se non in conformità alla
20 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
21 *
22 * http://www.apache.org/licenses/LICENSE-2.0
23 *
24 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
25 * il software distribuito nei termini della Licenza è distribuito
26 * "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
27 * implicite. Consultare la Licenza per il testo specifico che regola le
28 * autorizzazioni e le limitazioni previste dalla medesima.
29 ****************************************************************************/
30
31/****************************************************************************
32 * INCLUDE SECTION
33 ****************************************************************************/
34
35#include "../../../ugbc.h"
36
37/****************************************************************************
38 * CODE SECTION
39 ****************************************************************************/
40
41#if defined(__c64__) || defined(__c64reu__) || defined(__c128__)
42
53/* <usermanual>
54@keyword SPRITE COLOR (command)
55
56@english
57
58With the ''SPRITE COLOR'' command you can indicate the specific color in which
59the sprite will be drawn. The color is specific to this sprite, and different
60from the (possible) colors shared by all sprites, which can be changed by the
61''COLOR SPRITE'' command.
62
63Note that the keyword to use is only ''COLOR'', which must therefore be preceded
64by the ''SPRITE'' keyword and the sprite index. It is possible to put multiple
65''COLOR'' instructions side by side, but obviously the processor speed is
66such that only the last one will be the one that counts.
67
68@italian
69
70Con il comando ''SPRITE COLOR'' puoi indicare il colore specifico in cui verrà
71disegnato lo sprite. Il colore è quello specifico per questo sprite, e diverso
72dagli (eventuali) colori condivisi da tutti gli sprite, che possono essere
73modificati dal comando ''COLOR SPRITE''.
74
75Si noti che la parola chiave da usare è solo ''COLOR'', che deve quindi essere
76preceduta dalla parola chiave ''SPRITE'' e dall'indice sprite. È possibile
77accostare più istruzioni ''COLOR'' ma, ovviamente, la velocità del processore
78è tale che solo l'ultima sarà quella che conta.
79
80@syntax SPRITE index COLOR color1 [command [command ...]]
81
82@example SPRITE ship COLOR WHITE
83
84@seeAlso SPRITE (function)
85@seeAlso SPRITE
86@seeAlso COLOR SPRITE
87
88@target c64
89@target c64reu
90@target c128
91@target msx1
92@target coleco
93@target sc3000
94@target sg1000
95</usermanual> */
96void sprite_color( Environment * _environment, int _sprite, int _color ) {
97
98}
99
110void sprite_color_vars( Environment * _environment, char * _sprite, char * _color ) {
111
112 vic2_sprite_color( _environment, _sprite, _color );
113
114}
115
116#endif
void sprite_color(Environment *_environment, int _sprite, int _color)
Emit ASM code for instruction SPRITE [int] COLOR [int].
void sprite_color_vars(Environment *_environment, char *_sprite, char *_color)
Emit ASM code for instruction SPRITE [int] COLOR [int].
struct _Environment Environment
Structure of compilation environment.
void vic2_sprite_color(Environment *_environment, char *_sprite, char *_color)
Definition vic2.c:1915