ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
get_raster_line.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
41extern char DATATYPE_AS_STRING[][16];
42
50/* <usermanual>
51@keyword RASTER LINE
52
53@english
54The ''RASTER LINE'' keyword gives the current raster line, or the
55current vertical position of a raster beam. A raster beam is a beam
56of electrons or light that systematically scans an area, moving from
57left to right and top to bottom, like the lines that form an image
58on a cathode ray tube or CRT television. This movement creates a grid
59of points of light, called pixels, that together form the complete image.
60
61Imagine painting a picture with a brush. The brush moves from left to
62right and then down a line, repeating this movement until the entire
63surface is covered. The brush in this case represents the raster beam.
64The raster line indicates the vertical position of the raster beam
65at any given time. The values range of this position varies on the various
66targets, and if a PAL or NTSC system is in use.
67
68Having access to the the raster line can help optimize rendering,
69animation, and image processing algorithms. If you experience display
70problems, such as distorted lines or flickering images, analyzing
71raster lines can help pinpoint the cause. Many applications, such
72as video games and 3D graphics software, require precise control
73of the raster beam to create complex visual effects.
74
75@italian
76La parola chiave ''RASTER LINE'' indica la linea raster corrente,
77o la posizione verticale corrente di un raggio raster. Un raggio
78raster è un raggio di elettroni o luce che scansiona sistematicamente
79un'area, muovendosi da sinistra a destra e dall'alto verso il basso,
80come le linee che formano un'immagine su un tubo a raggi catodici o
81un televisore CRT. Questo movimento crea una griglia di punti di
82luce, chiamati pixel, che insieme formano l'immagine completa.
83
84Immagina di dipingere un quadro con un pennello. Il pennello si
85muove da sinistra a destra e poi lungo una linea, ripetendo questo
86movimento fino a coprire l'intera superficie. In questo caso, il
87pennello rappresenta il raggio raster.
88
89La linea raster indica la posizione verticale del raggio raster in
90un dato momento. Il range di valori di questa posizione variano sui vari
91target e se è in uso un sistema PAL o NTSC.
92
93Avere accesso alla linea raster può aiutare a ottimizzare gli algoritmi
94di rendering, animazione ed elaborazione delle immagini. Se riscontri
95problemi di visualizzazione, come linee distorte o immagini tremolanti,
96l'analisi delle linee raster può aiutare a individuare la causa.
97Molte applicazioni, come i videogiochi e i software di grafica 3D,
98richiedono un controllo preciso del raggio raster per creare effetti
99visivi complessi.
100
101@syntax = RASTER LINE
102
103@example randomScore = RASTER LINE
104
105@target c128
106</usermanual> */
108
109 return vic2_get_raster_line( _environment );
110
111}
Variable * get_raster_line(Environment *_environment)
Emit ASM code for RASTER LINE.
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.
char DATATYPE_AS_STRING[][16]
Variable * vic2_get_raster_line(Environment *_environment)
Definition vic2.c:4354