ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
put_image.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
53/* <usermanual>
54@keyword PUT IMAGE
55
56@english
57This function draws an image at a specific position on the screen.
58The programmer can draw on the screen a single image (''IMAGE''), a
59frame of a series of images (''ATLAS'') or a frame of a strip of a
60sequence of images (''SEQUENCE''). In all cases the syntax changes
61slightly.
62
63Every ''PUT IMAGE'' can be followed by a flag that modify the
64wayt the image will be drawn on the screen. The ''WITH TRANSPARENCY''
65will enable the transparency effect when the image is drawn,
66while ''DOUBLE Y'' will double the vertical size of the image. Both
67flags could be not available on all targerts and graphical modes.
68
69Another syntax is more compatible with other BASICs, that requires
70that the ''PUT IMAGE'' is followed with the bounds to draw to. This
71is only a syntatic equivalence, there is no "clipping" around the
72bounds. Moreover, it is possible to give a flag that alter the
73default behaviour of ''PUT IMAGE''. The ''PSET'' is the standard
74behaviour of ''PUT IMAGE'', while ''PRESET'' will put only the
75bitmap part of the image (if possible). The ''AND'' and ''OR''
76flags will activate the same logical operation between the
77image and the background. ''NOT'' is not currently supported.
78
79@italian
80Questa funzione disegna una immagine in una specifica posizione dello schermo.
81Il programmatore può disegnare sullo schermo una singola immagine
82(''IMAGE''), un frame di una serie di immagini (''ATLAS'') oppure
83un frame di una posa di una sequenza di immagini (''SEQUENCE'').
84In tutti i casi la sintassi cambia leggermente.
85
86Ogni ''PUT IMAGE'' può essere seguito da un flag che modifica il
87modo in cui l'immagine verrà disegnata sullo schermo. ''WITH TRANSPARENCY''
88abilita l'effetto trasparenza quando l'immagine viene disegnata,
89mentre ''DOUBLE Y'' raddoppia la dimensione verticale dell'immagine. Entrambi i
90flag potrebbero non essere disponibili su tutti i target e le modalità grafiche.
91
92Un'altra sintassi è più compatibile con altri BASIC, che richiede
93che ''PUT IMAGE'' sia seguito dai limiti su cui disegnare. Questa
94è solo un'equivalenza sintattica, non c'è alcun "clipping" attorno ai
95limiti. Inoltre, è possibile fornire un flag che alteri il
96comportamento predefinito di ''PUT IMAGE''. ''PSET'' è il comportamento
97standard di ''PUT IMAGE'', mentre ''PRESET'' inserirà solo la
98parte bitmap dell'immagine (se possibile). I flag ''AND'' e ''OR''
99attiveranno la stessa operazione logica tra l'immagine e lo sfondo.
100''NOT'' non è attualmente supportato.
101
102@syntax PUT IMAGE resource [ AT [x],[y] ] [fl]
103@syntax PUT IMAGE resource FRAME f [ AT [x],[y] ] [fl]
104@syntax PUT IMAGE resource STRIP s FRAME f [ AT [x],[y] ] [fl]
105@syntax fl: [WITH TRANSPARENCY] [DOUBLE Y]
106@syntax PUT ([x1],[y1])-(x2,y2),resource[,fl2]
107@syntax fl2: PSET|PRESET|AND|OR|NOT
108
109@example PUT IMAGE airplane AT 10,10
110
111@usedInExample contrib_themill.bas
112@usedInExample defines_screen_01.bas
113@usedInExample images_load_05.bas
114
115@seeAlso PUT BITMAP
116
117</usermanual> */
118/* <usermanual>
119@keyword PUT BITMAP
120
121@english
122This function draws the bitmap component of an image at a specific position on the screen.
123The programmer can draw on the screen a single bitmap (''IMAGE''), a
124frame of a series of bitmaps (''ATLAS'') or a frame of a strip of a
125sequence of bitmaps (''SEQUENCE''). In all cases the syntax changes
126slightly.
127
128Every ''PUT BITMAP'' can be followed by a flag that modify the
129wayt the image will be drawn on the screen. The ''DOUBLE Y''
130flag will double the vertical size of the image. This flag
131could be not available on all targerts and graphical modes.
132
133@italian
134Questa funzione disegna una bitmap (immagine senza colori) in una specifica posizione dello schermo.
135Il programmatore può disegnare sullo schermo una singola bitmap
136(''IMAGE''), un frame di una serie di bitmap (''ATLAS'') oppure
137un frame di una posa di una sequenza di bitmap (''SEQUENCE'').
138In tutti i casi la sintassi cambia leggermente.
139
140Ogni ''PUT BITMAP'' può essere seguito da un flag che modifica il
141modo in cui l'immagine verrà disegnata sullo schermo. Il flag
142''DOUBLE Y'' raddoppia la dimensione verticale della bitmap, ma
143potrebbe non essere disponibile su tutti i target e le modalità grafiche.
144
145@syntax PUT BITMAP resource [ AT [x],[y] ] [DOUBLE Y]
146@syntax PUT BITMAP resource FRAME f [ AT [x],[y] ] [DOUBLE Y]
147@syntax PUT BITMAP resource STRIP s FRAME f [ AT [x],[y] ] [DOUBLE Y]
148
149@example PUT BITMAP airplane AT 10,10
150
151@usedInExample contrib_themill.bas
152@usedInExample defines_screen_01.bas
153@usedInExample images_load_05.bas
154
155@seeAlso PUT IMAGE
156
157</usermanual> */
158
159void put_image_vars_original( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
160
161 if ( _environment->emptyProcedure ) {
162 return;
163 }
164
166
167 Variable * image = variable_retrieve( _environment, _image );
168
169 Resource * resource = build_resource_for_sequence( _environment, _image, _frame, _sequence );
170
171 Variable * x1 = variable_retrieve_or_define( _environment, _x1, VT_POSITION, 0 );
172 Variable * y1 = variable_retrieve_or_define( _environment, _y1, VT_POSITION, 0 );
173 Variable * realFrame = NULL;
174 Variable * frame = NULL;
175 if ( _frame) {
176 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
177 realFrame = frame;
178 }
179 Variable * sequence = NULL;
180 if ( _sequence) {
181 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
182 realFrame = frame;
183 }
184
185 switch( resource->type ) {
186 case VT_SEQUENCE:
187 if ( image->bankAssigned != -1 ) {
188
189 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
190 sprintf(alreadyLoadedLabel, "%salready", label );
191
192 char bankWindowId[MAX_TEMPORARY_STORAGE];
193 sprintf( bankWindowId, "BANKWINDOWID%2.2x", image->residentAssigned );
194
195 char bankWindowName[MAX_TEMPORARY_STORAGE];
196 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
197
198 // cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
199 // if ( image->uncompressedSize ) {
200 // bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
201 // } else {
202 // bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
203 // }
204 // cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
205 // cpu_label( _environment, alreadyLoadedLabel );
206
207 Variable * frameSize = variable_temporary( _environment, VT_WORD, "(temporary)");
208 variable_store( _environment, frameSize->name, image->frameSize );
209 Variable * bank = variable_temporary( _environment, VT_BYTE, "(temporary)");
210 variable_store( _environment, bank->name, image->bankAssigned );
211 Variable * offset = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
212
213 if ( !sequence ) {
214 if ( !frame ) {
215 ted_calculate_sequence_frame_offset(_environment, offset->realName, "", "", image->frameSize, image->frameCount );
216 } else {
217 ted_calculate_sequence_frame_offset(_environment, offset->realName, "", frame->realName, image->frameSize, image->frameCount );
218 }
219 } else {
220 if ( !frame ) {
221 ted_calculate_sequence_frame_offset(_environment, offset->realName, sequence->realName, "", image->frameSize, image->frameCount );
222 } else {
223 ted_calculate_sequence_frame_offset(_environment, offset->realName, sequence->realName, frame->realName, image->frameSize, image->frameCount );
224 }
225 }
226
227 Variable * address = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
228 variable_store( _environment, address->name, image->absoluteAddress );
229 variable_add_inplace_vars( _environment, address->name, offset->name );
230 bank_read_vars_direct( _environment, bank->name, address->name, bankWindowName, frameSize->name );
231
232 Resource resource;
233 resource.realName = strdup( bankWindowName );
234 resource.isAddress = 0;
235
236 ted_put_image( _environment, &resource, x1->realName, y1->realName, NULL, NULL, image->frameSize, 0, _flags );
237
238 } else {
239 if ( !sequence ) {
240 if ( !frame ) {
241 ted_put_image( _environment, resource, x1->realName, y1->realName, "", "", image->frameSize, image->frameCount, _flags );
242 } else {
243 ted_put_image( _environment, resource, x1->realName, y1->realName, frame->realName, "", image->frameSize, image->frameCount, _flags );
244 }
245 } else {
246 if ( !frame ) {
247 ted_put_image( _environment, resource, x1->realName, y1->realName, "", sequence->realName, image->frameSize, image->frameCount, _flags );
248 } else {
249 ted_put_image( _environment, resource, x1->realName, y1->realName, frame->realName, sequence->realName, image->frameSize, image->frameCount, _flags );
250 }
251 }
252 }
253 break;
254 case VT_IMAGES:
255 if ( image->bankAssigned != -1 ) {
256
257 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
258 sprintf(alreadyLoadedLabel, "%salready", label );
259
260 char bankWindowId[MAX_TEMPORARY_STORAGE];
261 sprintf( bankWindowId, "BANKWINDOWID%2.2x", image->residentAssigned );
262
263 char bankWindowName[MAX_TEMPORARY_STORAGE];
264 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
265
266 // cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
267 // if ( image->uncompressedSize ) {
268 // bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
269 // } else {
270 // bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
271 // }
272 // cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
273 // cpu_label( _environment, alreadyLoadedLabel );
274
275 Variable * frameSize = variable_temporary( _environment, VT_WORD, "(temporary)");
276 variable_store( _environment, frameSize->name, image->frameSize );
277 Variable * bank = variable_temporary( _environment, VT_BYTE, "(temporary)");
278 variable_store( _environment, bank->name, image->bankAssigned );
279 Variable * offset = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
280
281 if ( sequence ) {
282 if ( image->strips ) {
283 realFrame = variable_temporary( _environment, VT_BYTE, "(real frame)" );
284 outline1("LDA %s", sequence->realName);
285 outline0("ASL");
286 outline0("TAY");
287 outline1("LDA #<%sstrip", image->realName);
288 outline0("STA TMPPTR");
289 outline1("LDA #>%sstrip", image->realName);
290 outline0("STA TMPPTR+1");
291 outline0("LDA (TMPPTR),Y" );
292 outline0("STA TMPPTR2");
293 outline0("INY" );
294 outline0("LDA (TMPPTR),Y" );
295 outline0("STA TMPPTR2+1");
296 outline1("LDA %s", frame->realName );
297 outline0("TAY" );
298 outline0("LDA (TMPPTR2),Y" );
299 outline1("STA %s", realFrame->realName );
300 } else {
302 }
303 }
304
305 if ( !frame ) {
306 ted_calculate_sequence_frame_offset(_environment, offset->realName, NULL, "", image->frameSize, 0 );
307 } else {
308 ted_calculate_sequence_frame_offset(_environment, offset->realName, NULL, realFrame->realName, image->frameSize, 0 );
309 }
310
311 Variable * address = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
312 variable_store( _environment, address->name, image->absoluteAddress );
313 variable_add_inplace_vars( _environment, address->name, offset->name );
314 bank_read_vars_direct( _environment, bank->name, address->name, bankWindowName, frameSize->name );
315
316 Resource resource;
317 resource.realName = strdup( bankWindowName );
318 resource.isAddress = 0;
319
320 ted_put_image( _environment, &resource, x1->realName, y1->realName, NULL, NULL, image->frameSize, 0, _flags );
321
322 } else {
323
324 if ( sequence ) {
325 if ( image->strips ) {
326 realFrame = variable_temporary( _environment, VT_BYTE, "(real frame)" );
327 outline1("LDA %s", sequence->realName);
328 outline0("ASL");
329 outline0("TAY");
330 outline1("LDA #<%sstrip", image->realName);
331 outline0("STA TMPPTR");
332 outline1("LDA #>%sstrip", image->realName);
333 outline0("STA TMPPTR+1");
334 outline0("LDA (TMPPTR),Y" );
335 outline0("STA TMPPTR2");
336 outline0("INY" );
337 outline0("LDA (TMPPTR),Y" );
338 outline0("STA TMPPTR2+1");
339 outline1("LDA %s", frame->realName );
340 outline0("TAY" );
341 outline0("LDA (TMPPTR2),Y" );
342 outline1("STA %s", realFrame->realName );
343 } else {
345 }
346 }
347
348 if ( !frame ) {
349 ted_put_image( _environment, resource, x1->realName, y1->realName, "", NULL, image->frameSize, 0, _flags );
350 } else {
351 ted_put_image( _environment, resource, x1->realName, y1->realName, realFrame->realName, NULL, image->frameSize, 0, _flags );
352 }
353 }
354 break;
355 case VT_IMAGE:
356 case VT_TARRAY:
357 if ( image->residentAssigned ) {
358
359 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
360 sprintf(alreadyLoadedLabel, "%salready", label );
361
362 char bankWindowId[MAX_TEMPORARY_STORAGE];
363 sprintf( bankWindowId, "BANKWINDOWID%2.2x", image->residentAssigned );
364
365 char bankWindowName[MAX_TEMPORARY_STORAGE];
366 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
367
368 cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
369 if ( image->uncompressedSize ) {
370 bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
371 } else {
372 bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
373 }
374 cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
375 cpu_label( _environment, alreadyLoadedLabel );
376
377 Resource resource;
378 resource.realName = strdup( bankWindowName );
379 resource.isAddress = 0;
380
381 ted_put_image( _environment, &resource, x1->realName, y1->realName, NULL, NULL, 1, 0, _flags );
382 } else {
383 ted_put_image( _environment, resource, x1->realName, y1->realName, NULL, NULL, 1, 0, _flags );
384 }
385 break;
386 default:
388 }
389
390
391}
392
393void put_image_vars_imageref( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
394
396
397 Variable * image = variable_retrieve( _environment, _image );
398
399 Variable * x1 = variable_retrieve_or_define( _environment, _x1, VT_POSITION, 0 );
400 Variable * y1 = variable_retrieve_or_define( _environment, _y1, VT_POSITION, 0 );
401 Variable * frame = NULL;
402 if ( _frame) {
403 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
404 }
405 Variable * sequence = NULL;
406 if ( _sequence) {
407 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
408 }
409
410 Variable * address = variable_temporary( _environment, VT_ADDRESS, "(stub)" );
411
412 if ( !_environment->putImageRefUnsafe ) {
413 outline1("LDA %s", address_displacement( _environment, image->realName, "5") );
414 outline1("BNE %sskipx", label );
415 outline1("JMP %sskip", label );
416 outhead1("%sskipx:", label );
417 }
418
419 // Y = OFFSET
420
421 if ( _sequence ) {
422
423 outline1("LDA %s", image->realName );
424 outline0("STA TMPPTR" );
425 outline1("LDA %s", address_displacement( _environment, image->realName, "1") );
426 outline0("STA TMPPTR+1" );
427
428 outline0("CLC" );
429 outline0("LDA TMPPTR" );
430 outline0("ADC #3" );
431 outline0("STA TMPPTR" );
432 outline0("LDA TMPPTR+1" );
433 outline0("ADC #0" );
434 outline0("STA TMPPTR+1" );
435
436 if ( strlen(_sequence) == 0 ) {
437
438 } else {
439 outline1("LDA %s", sequence->realName );
440 outline0("STA MATHPTR0" );
441 cpu_call_indirect( _environment, address_displacement( _environment, image->realName, "10") );
442 }
443 if ( _frame ) {
444 if ( strlen(_frame) == 0 ) {
445
446 } else {
447 outline1("LDA %s", frame->realName );
448 outline0("STA MATHPTR0" );
449 cpu_call_indirect( _environment, address_displacement( _environment, image->realName, "8") );
450 }
451 }
452
453 outline0("LDA TMPPTR" );
454 outline1("STA %s", address->realName );
455 outline0("LDA TMPPTR+1" );
456 outline1("STA %s", address_displacement(_environment, address->realName, "1") );
457
458 } else {
459
460 if ( _frame ) {
461
462 outline1("LDA %s", image->realName );
463 outline0("STA TMPPTR" );
464 outline1("LDA %s", address_displacement( _environment, image->realName, "1") );
465 outline0("STA TMPPTR+1" );
466
467 outline0("CLC" );
468 outline0("LDA TMPPTR" );
469 outline0("ADC #3" );
470 outline0("STA TMPPTR" );
471 outline0("LDA TMPPTR+1" );
472 outline0("ADC #0" );
473 outline0("STA TMPPTR+1" );
474 if ( strlen(_frame) == 0 ) {
475
476 } else {
477 outline1("LDA %s", frame->realName );
478 outline0("STA MATHPTR0" );
479 cpu_call_indirect( _environment, address_displacement( _environment, image->realName, "8") );
480 }
481
482 outline0("LDA TMPPTR" );
483 outline1("STA %s", address->realName );
484 outline0("LDA TMPPTR+1" );
485 outline1("STA %s", address_displacement(_environment, address->realName, "1") );
486
487 } else {
488
489 outline1("LDA %s", image->realName );
490 outline1("STA %s", address->realName );
491 outline1("LDA %s", address_displacement( _environment, image->realName, "1") );
492 outline0("STA TMPPTR+1" );
493 outline1("STA %s", address_displacement(_environment, address->realName, "1") );
494
495 }
496
497 }
498
499 Resource resource;
500 resource.realName = strdup( address->realName );
501 resource.isAddress = 1;
502
503 ted_put_image( _environment, &resource, x1->realName, y1->realName, NULL, NULL, 0, 0, _flags );
504
505 if ( !_environment->putImageRefUnsafe ) {
506 outhead1("%sskip:", label );
507 }
508
509}
510
511void put_image_vars( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
512
513 if ( _environment->emptyProcedure ) {
514 return;
515 }
516
517 Variable * image = variable_retrieve( _environment, _image );
518
519 switch( image->type ) {
520 case VT_IMAGE:
521 case VT_IMAGES:
522 case VT_SEQUENCE:
523 case VT_ADDRESS:
524 put_image_vars_original( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, _flags );
525 break;
526 case VT_IMAGEREF:
527 put_image_vars_imageref( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, _flags );
528 break;
529 default:
531 }
532
533}
534
535void put_image_vars_flags( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, int _flags ) {
536
537 char flagsConstantName[MAX_TEMPORARY_STORAGE]; sprintf( flagsConstantName, "PUTIMAGEFLAGS%4.4x", _flags );
538 char flagsConstantParameter[MAX_TEMPORARY_STORAGE]; sprintf( flagsConstantParameter, "#PUTIMAGEFLAGS%4.4x", _flags );
539
540 Constant * flagsConstant = constant_find( _environment, flagsConstantName );
541
542 if ( !flagsConstant ) {
543 flagsConstant = malloc( sizeof( Constant ) );
544 memset( flagsConstant, 0, sizeof( Constant ) );
545 flagsConstant->name = strdup( flagsConstantName );
546 flagsConstant->realName = strdup( flagsConstantName );
547 flagsConstant->value = _flags;
548 flagsConstant->type = CT_INTEGER;
549 flagsConstant->next = _environment->constants;
550 _environment->constants = flagsConstant;
551 }
552
553 put_image_vars( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, flagsConstantParameter );
554}
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 16 bit
Definition 6309.c:1503
void cpu_compare_and_branch_16bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
Definition 6309.c:1578
void cpu_label(Environment *_environment, char *_label)
Definition 6309.c:356
void cpu_call_indirect(Environment *_environment, char *_value)
Definition 6309.c:3765
Variable * variable_retrieve(Environment *_environment, char *_name)
Variable * variable_retrieve_or_define(Environment *_environment, char *_name, VariableType _type, int _value)
Resource * build_resource_for_sequence(Environment *_environment, char *_image, char *_frame, char *_sequence)
void variable_add_inplace_vars(Environment *_environment, char *_source, char *_destination)
Add two variable and return the sum of them on the first.
Variable * variable_temporary(Environment *_environment, VariableType _type, char *_meaning)
Define a temporary variable.
Variable * variable_store(Environment *_environment, char *_destination, unsigned int _value)
Store a direct value to a variable.
char * address_displacement(Environment *_environment, char *_address, char *_displacement)
Constant * constant_find(Environment *_environment, char *_name)
int offset
Definition _optimizer.c:681
void put_image_vars_original(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Emit ASM code for PUT IMAGE [image] AT [int],[int].
Definition put_image.c:53
void put_image_vars_imageref(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Definition put_image.c:289
void put_image_vars_flags(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, int _flags)
Definition put_image.c:430
void put_image_vars(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Definition put_image.c:406
void bank_read_semi_var(Environment *_environment, int _bank, int _address1, char *_address2, int _size)
Emit ASM code for instruction BANK READ ....
Definition bank_read.c:50
void bank_read_vars_direct(Environment *_environment, char *_bank, char *_address1, char *_address2, char *_size)
Definition bank_read.c:138
void bank_uncompress_semi_var(Environment *_environment, int _bank, int _address1, char *_address2)
Emit ASM code for instruction BANK UNCOMPRESS ....
char * name
Definition ugbc.h:800
int value
Definition ugbc.h:815
ConstantType type
Definition ugbc.h:805
struct _Constant * next
Definition ugbc.h:832
char * realName
Definition ugbc.h:803
int putImageRefUnsafe
Definition ugbc.h:3271
Constant * constants
Definition ugbc.h:2611
int emptyProcedure
Definition ugbc.h:2932
int isAddress
Definition ugbc.h:557
VariableType type
Definition ugbc.h:559
char * realName
Definition ugbc.h:555
char * name
Definition ugbc.h:979
VariableType type
Definition ugbc.h:988
char * realName
Definition ugbc.h:982
void ted_calculate_sequence_frame_offset(Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count)
Definition ted.c:1721
void ted_put_image(Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
Definition ted.c:1996
void * malloc(YYSIZE_T)
struct _Resource Resource
#define MAX_TEMPORARY_STORAGE
Definition ugbc.h:563
@ CT_INTEGER
Definition ugbc.h:788
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.
@ VT_TARRAY
Definition ugbc.h:480
@ VT_WORD
Definition ugbc.h:455
@ VT_POSITION
Definition ugbc.h:468
@ VT_BYTE
Definition ugbc.h:450
@ VT_IMAGEREF
Definition ugbc.h:537
@ VT_IMAGES
Definition ugbc.h:495
@ VT_ADDRESS
Definition ugbc.h:465
@ VT_IMAGE
Definition ugbc.h:489
@ VT_SEQUENCE
Definition ugbc.h:513
struct _Constant Constant
Structure of a single constant.
#define CRITICAL_CANNOT_PUT_IMAGE_WITHOUT_STRIP(s)
Definition ugbc.h:3855
#define outline0(s)
Definition ugbc.h:4252
#define CRITICAL_PUT_IMAGE_UNSUPPORTED(v, t)
Definition ugbc.h:3532
#define outline1(s, a)
Definition ugbc.h:4253
#define MAKE_LABEL
Definition ugbc.h:3351
#define outhead1(s, a)
Definition ugbc.h:4247
char DATATYPE_AS_STRING[][16]