User Tools

Site Tools


development:csdk:2.0:headers:draw_direct

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:csdk:2.0:headers:draw_direct [2024/11/22 09:01] clydedevelopment:csdk:2.0:headers:draw_direct [2024/11/22 09:07] (current) clyde
Line 2: Line 2:
  
 draw_direct.h provides macros and functions to support setting up draw operations by direct manipulation of blitter registers. The functions and macros are largely convenience functions for setting up the control registers for common operations, like drawing sprites or colored boxes. draw_direct.h provides macros and functions to support setting up draw operations by direct manipulation of blitter registers. The functions and macros are largely convenience functions for setting up the control registers for common operations, like drawing sprites or colored boxes.
 +
 +In general the flow of Direct Drawing is:
 +
 +  - Set up either sprite or box mode with ''direct_prepare_sprite_mode'' or ''direct_prepare_box_mode''
 +  - Set values for the blitter parameters using the ''DIRECT_SET_'' macros for ''SOURCE_X'', ''SOURCE_Y'', ''DEST_X'', ''DEST_Y'', ''WIDTH'' and ''HEIGHT''
 +  - Start the blitter with ''DIRECT_DRAW_START();''
 +  - Before modifying parameters to prepare the next drawing, ensure that the last drawing is finished with ''await_drawing();''
  
 ===== Drawing Semantics ===== ===== Drawing Semantics =====
-==== By indexing the hardware registers === 
-These are actually defined in gametank.h but are used for direct drawing 
 <code C> <code C>
 #define DIRECT_SET_DEST_X(x) vram[VX] = (x); #define DIRECT_SET_DEST_X(x) vram[VX] = (x);
development/csdk/2.0/headers/draw_direct.1732266098.txt.gz · Last modified: 2024/11/22 09:01 by clyde