ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
back.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
47/* <usermanual>
48@keyword COLOR BACK
49
50@english
51
52The ''COLOR BACK'' command used on target that support both color graphics,
53backgorund colors and specialized clearing screen routines. Its primary function
54is to set the background color of the screen or a specific area of the screen,
55and then clearing the screen using that color.
56
57This command can be used to customize the appearance of programs by creating
58colored backgrounds, and could be essential for creating simple games or
59graphical applications, where the background color contributes to aesthetics
60and readability. This can be used to highlight certain areas of the screen
61or to create visual contrasts.
62
63The availability of colors and the accuracy of their representation depend
64on the computer's video chipsed.
65
66@italian
67
68Il comando ''COLOR BACK'' utilizzato su target che supporta sia la grafica a
69colori, i colori di sfondo e le routine specializzate di cancellazione
70dello schermo. La sua funzione principale è quella di impostare il colore
71di sfondo dello schermo o di un'area specifica dello schermo, quindi cancellare
72lo schermo utilizzando quel colore.
73
74Questo comando può essere utilizzato per personalizzare l'aspetto dei programmi
75creando sfondi colorati e può essere essenziale per creare semplici giochi o
76applicazioni grafiche, in cui il colore di sfondo contribuisce all'estetica e
77alla leggibilità. Può essere utilizzato per evidenziare determinate aree dello
78schermo o per creare contrasti visivi.
79
80La disponibilità dei colori e l'accuratezza della loro rappresentazione
81dipendono dal chip video del computer.
82
83@syntax COLOR BACK color
84
85@example COLOR BACK RED
86@example COLOR BACK WHITE
87
88@usedInExample graphics_color_01.bas
89
90@seeAlso PAPER
91@seeAlso CLS
92
93@target c128
94</usermanual> */
95void back( Environment * _environment, char * _color ) {
96
97 paper( _environment, _color );
98
99 vic2_back( _environment );
100
101}
void back(Environment *_environment, char *_color)
Emit ASM code to fill background color.
Definition back.c:53
void paper(Environment *_environment, char *_color)
Emit code for PAPER ... command.
Definition paper.c:47
struct _Environment Environment
Structure of compilation environment.
void vic2_back(Environment *_environment)
Definition vic2.c:2431