![]() |
dsekai
World engine for retrocomputers.
|
Macros, structs, and prototypes for the various engine types. More...
Go to the source code of this file.
Data Structures | |
struct | TITLE_STATE |
State for ::ENGINE_TYPE_NONE. A simple title screen engine. More... | |
struct | TOPDOWN_STATE |
State for ::ENGINE_TYPE_TOPDOWN. Displays a top-down 2-dimensional view of the world. More... | |
struct | POV_STATE |
State for ::ENGINE_TYPE_POV. Displays a first-person 3D view of the world using raycasting. More... | |
struct | EDITOR_STATE |
struct | DSEKAI_STATE |
General/shared state of the running engine in memory. More... | |
Macros | |
#define | MINIMAP_X (SCREEN_W - TILEMAP_TW - 10) |
#define | MINIMAP_Y (10) |
#define | DSEKAI_TRANSITION_MASK_FRAME 0x0f |
Mask indicating bits of DSEKAI_STATE::transition that denote the current transition's frame. | |
#define | DSEKAI_TRANSITION_MASK_TYPE 0x70 |
Mask indicating bits of DSEKAI_STATE::transition that denote the current transition's type. | |
#define | DSEKAI_TRANSITION_DIR_OPEN 0x80 |
If this bit is on, then the currently playing transition should be opening. If it's off, the transition is closing. | |
#define | DSEKAI_TRANSITION_TYPE_CURTAIN 0x00 |
#define | DSEKAI_TRANSITION_TYPE_ZOOM 0x10 |
#define | DSEKAI_TITLE_TEXT_COLOR GRAPHICS_COLOR_WHITE |
#define | DSEKAI_FLAG_MENU_BLOCKED 0x02 |
#define | DSEKAI_FLAG_UNLOCKED 0x08 |
#define | ENGINE_TABLE(f) |
#define | engines_active(state) |
#define | ENGINES_SETUP_PROTOTYPES(idx, eng, prefix) |
#define | ENGINES_INPUT_PROTOTYPES(idx, eng, prefix) |
#define | ENGINES_ANIMATE_PROTOTYPES(idx, eng, prefix) |
#define | ENGINES_DRAW_PROTOTYPES(idx, eng, prefix) |
#define | ENGINES_SHUTDOWN_PROTOTYPES(idx, eng, prefix) |
Typedefs | |
typedef void(* | title_option_cb) (struct DSEKAI_STATE *state) |
typedef int16_t(* | ENGINES_SETUP) (struct DSEKAI_STATE *state) |
Sets up the current engine (allocates specific state, etc). | |
typedef int16_t(* | ENGINES_INPUT) (INPUT_VAL in_char, int16_t click_x, int16_t click_y, struct DSEKAI_STATE *state) |
Handles polled input according to the rules of the current engine. | |
typedef void(* | ENGINES_ANIMATE) (struct DSEKAI_STATE *state) |
Cycles animations and executes scripts relevant to the current engine. | |
typedef void(* | ENGINES_DRAW) (struct DSEKAI_STATE *state) |
Draws the engine sceen on-screen according to current state. | |
Functions | |
void | engines_draw_loading_screen () |
Draw a simple loading screen. | |
int16_t | engines_warp_loop (MEMORY_HANDLE state_handle) |
Handle transition to a new TILEMAP. | |
void | engines_animate_mobiles (struct DSEKAI_STATE *state) |
Do generic mobile animation and execute their scripts. | |
int16_t | engines_loop_iter (MEMORY_HANDLE state_handle) |
Central loop iteration handler. Calls engine-specific callbacks. | |
int8_t | engines_input_movement (struct MOBILE *mover, int8_t dir_move, struct DSEKAI_STATE *state) |
Handle generic player movement commmand. | |
void | engines_exit_to_title (struct DSEKAI_STATE *state) |
void | engines_set_transition (struct DSEKAI_STATE *state, uint8_t trans_type, uint8_t trans_open) |
void | engines_draw_transition (struct DSEKAI_STATE *state) |
uint8_t | engines_state_lock (struct DSEKAI_STATE *state) |
uint8_t | engines_state_unlock (struct DSEKAI_STATE *state) |
Variables | |
RES_CONST char * | gc_engines_tokens [] |
RES_CONST ENGINES_SETUP | gc_engines_setup [] |
RES_CONST ENGINES_INPUT | gc_engines_input [] |
RES_CONST ENGINES_ANIMATE | gc_engines_animate [] |
RES_CONST ENGINES_DRAW | gc_engines_draw [] |
Macros, structs, and prototypes for the various engine types.