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

Go to the source code of this file.

Functions

void sprite_data_set (Environment *_environment, int _sprite, int _address)
 Emit ASM code for SPRITE [int] DATA FROM [int].
void sprite_data_set_vars (Environment *_environment, char *_sprite, char *_address)
 Emit ASM code for SPRITE [expression] DATA FROM [expression].

Function Documentation

◆ sprite_data_set()

void sprite_data_set ( Environment * _environment,
int _sprite,
int _address )

Emit ASM code for SPRITE [int] DATA FROM [int].

This function emits a code capable of setting the starting address of the sprite _sprite to the value _address. This version is suitable when direct value is used.

Parameters
_environmentCurrent calling environment
_spriteIndex of the sprite to define (0...7)
_addressAddress where the sprite data begins from

Definition at line 54 of file sprite_data_set.c.

◆ sprite_data_set_vars()

void sprite_data_set_vars ( Environment * _environment,
char * _sprite,
char * _address )

Emit ASM code for SPRITE [expression] DATA FROM [expression].

This function emits a code capable of setting the starting address of the sprite _sprite to the value _address. This version is suitable when expressions are used.

Parameters
_environmentCurrent calling environment
_spriteExpression with the index of the sprite to define (0...7)
_addressExpression with the address where the sprite data begins from

Definition at line 69 of file sprite_data_set.c.