![]() |
dsekai
World engine for retrocomputers.
|
General/shared state of the running engine in memory. More...
#include <engines.h>

Data Fields | |
| uint8_t | version |
| MEMORY_HANDLE | items_handle |
| Array consisting of all items in the current game world. | |
| struct ITEM * | items |
| Temporary pointer for use during Engine Locking. | |
| int16_t | items_sz |
| MEMORY_HANDLE | map_handle |
| Currently loaded TILEMAP. | |
| struct TILEMAP * | tilemap |
| Temporary pointer for use during Engine Locking. | |
| uint8_t | engine_type |
| Engine type tilemap is supposed to be used with. | |
| uint8_t | engine_type_change |
| Engine type set to be changed to with engines_warp_loop(). | |
| MEMORY_HANDLE | mobiles_handle |
| Array of currently loaded MOBILE objects on this map. | |
| struct MOBILE * | mobiles |
| Temporary pointer for use during Engine Locking. | |
| uint16_t | mobiles_sz |
| struct MOBILE | player |
| Currently active player MOBILE. Stays between maps. | |
| MEMORY_HANDLE | engine_state_handle |
| Contains the currently loaded Engine-Specific Struct. | |
| uint8_t | ani_sprite_countdown |
| The number of loops until DSEKAI_STATE::ani_sprite_countdown changes. | |
| uint16_t | ani_sprite_x |
| The horizontal offset of all on-screen MOBILE sprites on their spritesheets in pixels. | |
| char | warp_to [TILEMAP_NAME_MAX] |
| When holding a valid string, triggers the map change process. | |
| uint8_t | warp_to_x |
| Sets the player MOBILE::coords horizontal on map change. | |
| uint8_t | warp_to_y |
| Sets the player MOBILE::coords vertical on map change. | |
| uint16_t | engine_state |
| Current engine state (see below in struct reference). | |
| uint8_t | flags |
| Global boolean values dictating engine state and behavior. | |
| uint8_t | transition |
| The current frame of the playing Engine Transitions. | |
| RESOURCE_NAME | player_sprite_name |
| Resource ID for the player sprite. | |
| MEMORY_HANDLE | crops_handle |
| Array of all crops growing on all maps. | |
| struct CROP_PLOT * | crops |
| Temporary pointer for use during Engine Locking. | |
| int16_t | crops_sz |
| struct EDITOR_STATE | editor |
| struct MENU_STATE | menu |
Related Symbols | |
(Note that these are not member symbols.) | |
| #define | DSEKAI_FLAG_INPUT_BLOCKED 0x01 |
| DSEKAI_STATE::flags indicating no player input should be accepted. | |
| #define | DSEKAI_FLAG_BLANK_FRAME 0x04 |
| DSEKAI_STATE::flags indicating every frame should be drawn fresh on a clean black canvas (unless the menu is open). | |
| #define | ENGINE_STATE_OPENING 1 |
| DSEKAI_STATE::engine_state indicating engine is has not yet initialized its specific structures. | |
| #define | ENGINE_STATE_RUNNING 2 |
| DSEKAI_STATE::engine_state indicating engine is running. | |
General/shared state of the running engine in memory.
| uint8_t DSEKAI_STATE::ani_sprite_countdown |
The number of loops until DSEKAI_STATE::ani_sprite_countdown changes.
| uint16_t DSEKAI_STATE::ani_sprite_x |
The horizontal offset of all on-screen MOBILE sprites on their spritesheets in pixels.
| MEMORY_HANDLE DSEKAI_STATE::crops_handle |
Array of all crops growing on all maps.
This is kept as part of the state so that crops can continue growing in the background.
| uint8_t DSEKAI_STATE::engine_type_change |
Engine type set to be changed to with engines_warp_loop().
| MEMORY_HANDLE DSEKAI_STATE::items_handle |
Array consisting of all items in the current game world.
Items in this array are considered to "exist" when the ITEM::flags field has the ITEM_FLAG_ACTIVE bit set. Inactive items may be replaced by new items.
| MEMORY_HANDLE DSEKAI_STATE::mobiles_handle |
Array of currently loaded MOBILE objects on this map.
Mobiles in this array are considered to "exist" when MOBILE_FLAG_ACTIVE is enabled in their MOBILE::flags.
| struct MOBILE DSEKAI_STATE::player |
Currently active player MOBILE. Stays between maps.
This is kept separately from DSEKAI_STATE::mobiles because... TODO
| RESOURCE_NAME DSEKAI_STATE::player_sprite_name |
Resource ID for the player sprite.
This is necessary since the player is spawned in the first map, but travels to other maps (unlike other mobiles).
| struct TILEMAP* DSEKAI_STATE::tilemap |
Temporary pointer for use during Engine Locking.
| uint8_t DSEKAI_STATE::transition |
The current frame of the playing Engine Transitions.
If set to 0, then no transition is currently playing.
If a transition is currently playing, then input and scripts are blocked.
| char DSEKAI_STATE::warp_to[TILEMAP_NAME_MAX] |
When holding a valid string, triggers the map change process.
| uint8_t DSEKAI_STATE::warp_to_x |
Sets the player MOBILE::coords horizontal on map change.
| uint8_t DSEKAI_STATE::warp_to_y |
Sets the player MOBILE::coords vertical on map change.