User Tools

Site Tools


development:csdk:2.0:headers:draw_queue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:csdk:2.0:headers:draw_queue [2024/11/08 04:53] – created clydedevelopment:csdk:2.0:headers:draw_queue [2024/11/20 22:05] (current) clyde
Line 23: Line 23:
  
 ===== Functions ===== ===== Functions =====
-==== name ====+==== queue_draw_box ====
 <code C> <code C>
 void queue_draw_box(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c); void queue_draw_box(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c);
 </code> </code>
-Setup registers to draw sprites in direct mode +Subimit a box with the top corner at X,Y with size WxH and color C to the draw queue 
-Also checks for and awaits queued drawing operations +==== queue_draw_sprite_rect====
-==== name ====+
 <code C> <code C>
 void queue_draw_sprite_rect(); void queue_draw_sprite_rect();
 </code> </code>
-Setup registers to draw sprites in direct mode +Submits the temp variable "rect" to the draw queue. See macro "queue_draw_sprite" below. 
-Also checks for and awaits queued drawing operations +==== queue_draw_sprite_frame ====
-==== name ====+
 <code C> <code C>
 void queue_draw_sprite_frame(SpriteSlot sprite, char x, char y, char frame, char flip); void queue_draw_sprite_frame(SpriteSlot sprite, char x, char y, char frame, char flip);
 </code> </code>
-Setup registers to draw sprites in direct mode +Draws a packed sprite as exported from Aseprite with a given X,Y position and frame number. Uses a SpriteSlot handle given by allocate_sprite from "sprites.h". 
-Also checks for and awaits queued drawing operations + 
-==== name ====+==== queue_clear_border ====
 <code C> <code C>
 void queue_clear_border(char c); void queue_clear_border(char c);
 </code> </code>
-Setup registers to draw sprites in direct mode +Draws a border around the screen with the provided color by submitting four queued box draws. 
-Also checks for and awaits queued drawing operations +==== queue_clear_screen ====
-==== name ====+
 <code C> <code C>
 void queue_clear_screen(char c); void queue_clear_screen(char c);
 </code> </code>
-Setup registers to draw sprites in direct mode +Draws a full screen box with the given color. 
-Also checks for and awaits queued drawing operations +==== await_draw_queue ====
-==== name ====+
 <code C> <code C>
 void await_draw_queue(); void await_draw_queue();
 </code> </code>
-Setup registers to draw sprites in direct mode +Wait for all draw operations in the queue to finish.
-Also checks for and awaits queued drawing operations+
 ===== Macros ===== ===== Macros =====
-==== name ====+==== queue_draw_sprite ====
 <code C> <code C>
-DIRECT_DRAW_START()+#define queue_draw_sprite(X,Y,W,H,GX,GY,SPRITESLOT)
 </code> </code>
-Use DIRECT_DRAW_START() to start a draw operation after setting the blit registersThis macro includes setting the draw_busy flag so that await_drawing() from gfx_sys.h works properly.+Set the parameters of the temp variable "rect" and submit queued rectangle draw. Made a macro because a seven-argument function call would incur slow stack reads.
  
development/csdk/2.0/headers/draw_queue.1731041609.txt.gz · Last modified: 2024/11/08 04:53 by clyde