drawing_funcs.h provides functions and macros related to putting stuff on the screen!
void load_spritesheet(char* spriteData, char srcBank, char ramBank);
Decompresses sprite data and places it into Sprite RAM.
Can also be use with only two apparent arguments, using the asset macros generated by “make import”.
load_spritesheet(&ASSET__gfx__mysprite_bmp, 0);
#define load_big_spritesheet(NAME,BANK)
Macro that calls load_spritesheet four times to load an images that spans a full Sprite RAM page.
void clear_spritebank(char bank);
* bank - section number of Sprite RAM to zero out
Fill a 128×128 Sprite RAM bank with zero-value pixels.
void draw_sprite_frame(const Frame *sprite_table, char sprite_table_bank, char x, char y, char frame, char flip, char bank);
Draws a packed sprite as exported from Aseprite with a given X,Y position and frame number. Drawing operation is added to the drawing queue if a drawing is already in progress.
#define draw_sprite(X,Y,W,H,GX,GY,RAMBANK)
Macro that sets a temporary rect variable and then calls draw_sprite_rect();
#define draw_tile(X,Y,W,H,GX,GY,RAMBANK)
Macro that sets a temporary rect variable and then calls draw_sprite_rect(), with tiling mode enabled. Source data will repeat over a 16×16 square.
void draw_box(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c);
Draws a solid color box, submitting the operation to the drawing queue and starting it if the queue isn't already processing.
void next_draw_queue();
If there are draw operations in the queue but the queue is not running, this function starts the queue processing.
void await_draw_queue();
If the drawing queue is running then this function loops and returns when the drawing queue finishes.
void clear_border(char c);
Draws a border color around the screen. Uses the draw queue.
void clear_screen(char c);
Clear the screen to a background color. Uses the draw queue.
void draw_box_now(char x, char y, char w, char h, char c);
Draws a colored box the same way as draw_box but skips/ignores/interrupts the draw queue.
void draw_sprite_now(char x, char y, char w, char h, char gx, char gy, char ramBank);
Draw a sprite immediately, skipping/ignoring/interrupting the draw queue.
void draw_tiles_now(char x, char y, char w, char h, char gx, char gy, char ramBank);
void draw_fade(unsigned char opacity);
Draws a repeated dither fade pattern across the whole screen. (Makes some very particular assumptions about what sprite data you've loaded and where? Need to check this)
void printnum(int num);
void print_hex_num(char num);
void print(char* str);