dsekai
World engine for retrocomputers.
Loading...
Searching...
No Matches
dsekai.h File Reference

Engine state data and main header, used in every engine file. More...

#include <unilayer.h>
#include "gid.h"
#include "config.h"
#include "winids.h"
#include "itstruct.h"
#include "cropdef.h"
#include "tmstruct.h"
#include "strpool.h"
#include "script.h"
#include "scparse.h"
#include "tilemap.h"
#include "mobile.h"
#include "item.h"
#include "menu.h"
#include "crop.h"
#include "pathfind.h"
#include "tmasn.h"
#include "serial.h"
#include "engines.h"
Include dependency graph for dsekai.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DSEKAI_ERROR_ALLOCATE   -128
 
#define SECTION_CROP
 
#define SECTION_ITEM
 
#define SECTION_MOBILE
 
#define SECTION_SCRIPT
 
#define SECTION_TILEMAP
 
#define window_prefab_dialog(dialog, sprite, dir_flag, fg, bg)
 Convenience macro for creating a dialog WINDOW with a sprite and text string specified from TILEMAP::strpool.
 
#define window_prefab_system_dialog(dialog, fg, bg)
 

Detailed Description

Engine state data and main header, used in every engine file.

This file should be used to call all other engine headers, to ensure dependencies are kept and in order.

Data types and constants that are used in multiple engine headers should be placed in this file.

Macro Definition Documentation

◆ window_prefab_dialog

#define window_prefab_dialog ( dialog,
sprite,
dir_flag,
fg,
bg )
Value:
window_push( WINDOW_ID_SCRIPT_SPEAK, 0, WINDOW_TYPE_WINDOW, WINDOW_FLAG_MODAL, SCREEN_MAP_X, WINDOW_PLACEMENT_CENTER, SCREEN_MAP_W, WINDOW_SIZE_AUTO, fg, bg, 0, 0, NULL ); window_push( WINDOW_ID_SCRIPT_SPEAK + 1, WINDOW_ID_SCRIPT_SPEAK, WINDOW_TYPE_LABEL, 0, WINDOW_PLACEMENT_CENTER, 30, WINDOW_PLACEMENT_CENTER, WINDOW_PLACEMENT_CENTER, fg, bg, GRAPHICS_STRING_FLAG_FONT_SCRIPT, 0, dialog ); window_push( WINDOW_ID_SCRIPT_SPEAK + 2, WINDOW_ID_SCRIPT_SPEAK, WINDOW_TYPE_SPRITE, dir_flag | WINDOW_FLAG_SPRITE_BORDER_SINGLE, WINDOW_PLACEMENT_CENTER, 6, WINDOW_SIZE_AUTO, WINDOW_SIZE_AUTO, fg, bg, 0, sprite, NULL );
#define SCREEN_MAP_W
Width of the overview or viewport area in pixels.
Definition src/config.h:62
#define SCREEN_MAP_X
Left offset of the overview or viewport area in pixels.
Definition src/config.h:76
#define GRAPHICS_STRING_FLAG_FONT_SCRIPT
Use a script-style (cursive-style) font to display the string.
Definition graphics.h:40
#define WINDOW_FLAG_MODAL
WINDOW::status indicating window is blocking all input.
Definition window.h:132
#define WINDOW_PLACEMENT_CENTER
WINDOW::x or WINDOW::y value indicating the system should do its best to center the WINDOW onscreen.
Definition window.h:170
int16_t window_push(uint16_t id, uint16_t parent_id, uint8_t type, uint8_t flags, uint16_t x, uint16_t y, uint16_t w, uint16_t h, GRAPHICS_COLOR fg, GRAPHICS_COLOR bg, uint8_t render_flags, int32_t data_scalar, const char *data_string) SECTION_WINDOW
Push a new window onto the global window stack.

Convenience macro for creating a dialog WINDOW with a sprite and text string specified from TILEMAP::strpool.

Parameters
dialogIndex of the string to display from TILEMAP::strpool.
spriteRESOURCE_NAME of the GRAPHICS_BITMAP to display in this window.

◆ window_prefab_system_dialog

#define window_prefab_system_dialog ( dialog,
fg,
bg )
Value:
window_push( WINDOW_ID_SCRIPT_SPEAK, 0, WINDOW_TYPE_WINDOW, WINDOW_FLAG_MODAL, SCREEN_MAP_X, WINDOW_PLACEMENT_CENTER, SCREEN_MAP_W, WINDOW_SIZE_AUTO, fg, bg, 0, 0, NULL ); window_push( WINDOW_ID_SCRIPT_SPEAK + 1, WINDOW_ID_SCRIPT_SPEAK, WINDOW_TYPE_LABEL, 0, WINDOW_PLACEMENT_CENTER, 30, WINDOW_PLACEMENT_CENTER, WINDOW_PLACEMENT_CENTER, fg, bg, 0, 0, dialog ); window_push( WINDOW_ID_SCRIPT_SPEAK + 2, WINDOW_ID_SCRIPT_SPEAK, WINDOW_TYPE_SPRITE, MOBILE_DIR_SOUTH | WINDOW_FLAG_SPRITE_BORDER_SINGLE, WINDOW_PLACEMENT_CENTER, 6, WINDOW_SIZE_AUTO, WINDOW_SIZE_AUTO, fg, bg, 0, state->player.sprite_cache_id, NULL );
#define MOBILE_DIR_SOUTH
MOBILE::dir indicating down direction for movement/animation.
Definition mobile.h:343