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

Go to the source code of this file.

Functions

void colormap_clear_with (Environment *_environment, int _foreground, int _background)
 Emit ASM implementation for COLORMAP CLEAR WITH [int] ON [int] instruction.
void colormap_clear_with_vars (Environment *_environment, char *_foreground, char *_background)
 Emit ASM implementation for COLORMAP CLEAR WITH [expression] ON [expression] instruction.
void colormap_clear (Environment *_environment)
 Emit ASM implementation for COLORMAP CLEAR instruction.

Function Documentation

◆ colormap_clear()

void colormap_clear ( Environment * _environment)

Emit ASM implementation for COLORMAP CLEAR instruction.

This function is called when you want to generate code that erases the entire color map, using the default foreground and background color.

Precondition
Bitmap must be enabled at least once with instruction BITMAP ENABLE.
Parameters
_environmentCurrent calling environment
Exceptions
EXIT_FAILURE"CRITICAL: COLORMAP CLEAR WITH xxx AND xxx needs BITMAP ENABLED"

Definition at line 99 of file colormap_clear.c.

◆ colormap_clear_with()

void colormap_clear_with ( Environment * _environment,
int _foreground,
int _background )

Emit ASM implementation for COLORMAP CLEAR WITH [int] ON [int] instruction.

This function is called when you want to generate code that erases the entire color map, using a foreground and a background color. This function is useful if the color indices are given as integers.

Precondition
Bitmap must be enabled at least once with instruction BITMAP ENABLE.
Parameters
_environmentCurrent calling environment
_foregroundIndex of foreground color
_backgroundIndex of background color
Exceptions
EXIT_FAILURE"COLORMAP CLEAR WITH xxx ON xxx needs BITMAP ENABLED"

Definition at line 60 of file colormap_clear.c.

◆ colormap_clear_with_vars()

void colormap_clear_with_vars ( Environment * _environment,
char * _foreground,
char * _background )

Emit ASM implementation for COLORMAP CLEAR WITH [expression] ON [expression] instruction.

This function is called when you want to generate code that erases the entire color map, using a foreground and a background color. This function is useful if the color indices are given as integers.

Precondition
Bitmap must be enabled at least once with instruction BITMAP ENABLE.
Parameters
_environmentCurrent calling environment
_foregroundExpression for index of foreground color
_backgroundExpression for index of background color
Exceptions
EXIT_FAILURE"CRITICAL: COLORMAP CLEAR WITH xxx AND xxx needs BITMAP ENABLED"

Definition at line 81 of file colormap_clear.c.