ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
put_image.c File Reference
#include "../../ugbc.h"

Go to the source code of this file.

Functions

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].
void put_image_vars_imageref (Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
void put_image_vars (Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
void put_image_vars_flags (Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, int _flags)

Variables

char DATATYPE_AS_STRING [][16]

Function Documentation

◆ put_image_vars()

void put_image_vars ( Environment * _environment,
char * _image,
char * _x1,
char * _y1,
char * _x2,
char * _y2,
char * _frame,
char * _sequence,
char * _flags )

Definition at line 406 of file put_image.c.

◆ put_image_vars_flags()

void put_image_vars_flags ( Environment * _environment,
char * _image,
char * _x1,
char * _y1,
char * _x2,
char * _y2,
char * _frame,
char * _sequence,
int _flags )

Definition at line 430 of file put_image.c.

◆ put_image_vars_imageref()

void put_image_vars_imageref ( Environment * _environment,
char * _image,
char * _x1,
char * _y1,
char * _x2,
char * _y2,
char * _frame,
char * _sequence,
char * _flags )

Definition at line 289 of file put_image.c.

◆ put_image_vars_original()

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].

This function outputs a code that draws an image on a bitmap.

Parameters
_environmentCurrent calling environment
_imageImage to draw
_xAbscissa of the point to draw
_yOrdinate of the point

Definition at line 53 of file put_image.c.

Variable Documentation

◆ DATATYPE_AS_STRING

char DATATYPE_AS_STRING[][16]
extern

This variable defines as an array of constant pointers. Each element of the array represents the "human" name of a ugBASIC's data type. The main reason is to map an IDto a readable string. If ugBASIC encounters an error, you don't want it to print "Error in type 2," but rather "Error in type FLOAT.". Note that it's vital that the order of strings in the array exactly reflects the order of the IDs in your enum. If you move an element to one, you must also move it to the other, otherwise the mapping will be staggered. Often, a final NULL or UNKNOWN string is added to handle error cases or to allow you to loop through the array without knowing its size beforehand.

Definition at line 133 of file _infrastructure.c.