7#define MAP_PART(entry, i) ((void *)((entry)[i] + (s32)(entry)))
110 for (i = 0; actor !=
NULL; i++) {
130 s32 halfWidth = width / 2;
131 s32 halfHeight = height / 2;
132 s32 ratio = width / height;
134 if (halfWidth < dx) {
135 dx = halfWidth - (dx - halfWidth);
137 if (halfHeight < dy) {
138 dy = halfHeight - (dy - halfHeight);
140 if (dx >= halfWidth - dy * ratio) {
152 s32 row = cell & 0xF;
158 sign = (cell & 0x10) ? -1 : 1;
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
#define FIELD_TASK_ACTOR
every character (FIELDSTG_createActor)
FIELDSTG.PRO: the field mode, where the player walks around the map.
s32 FIELDSTG_boxCount
and their number
s32 FIELDSTG_boxFrame
the frame FIELDSTG_boxes was filled in
Box FIELDSTG_boxes[20]
the characters' boxes (FIELDSTG_isTileFree)
Vec2 FIELDSTG_dirVectors[][8]
a direction's vector, scaled by 4096
FileCache FILE_CACHE
The file cache.
HiddenSpots * FIELDSTG_findHiddenSpot(Vec2 *pos, s32 select)
The hidden spots, when one is within 10 pixels of pos (selecting it if select), or NULL.
#define MAP_PART(entry, i)
Part i of a map file, at the offset from its start that its word i holds.
void FIELDSTG_setMapFile(s32 index, s32 value)
Sets the file of map index (FieldMap.setFile)
s32 FIELDSTG_isTileFree(Vec2 *pos)
Whether nothing stands at pos: no character's box (gathered once a frame) and no object.
void FIELDSTG_setFirstMap(s32 index)
Puts the player on map index when the mode is new (FieldMap.setFirstMap)
void FIELDSTG_getWalkStep(Vec2 *pos, s32 scale, s32 dir, Vec2 *out)
A step of scale in a direction on the map the player is on, along the slope of its cell (FieldMap....
s32 FIELDSTG_selectMap(s32 index)
Points the map at the file of map index: the grid, whose first two bytes are its width and height,...
void FIELDSTG_getFlyStep(Vec2 *pos, s32 scale, s32 dir, Vec2 *out)
A step of scale in a direction, on the flat (FieldMap.getFlyStep)
s32 FIELDSTG_getMapCell(s32 index, Vec2 *pos)
The cell of map index at pos, down the tree from the grid to the pixel (FieldMap.getCell); 1 without ...
void FIELDSTG_setMap(s32 index)
Puts the player on map index (FieldMap.setMap)
TaskRegistry TASK_REGISTRY
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
s32 halfWidth
half its width (FIELDSTG_actorWidths): its box's half width, and half that its half height
s32 files[8]
the file entry of each map, set by setFile
s32 width
of the grid, in cells
void *(* getEntry)(u32 fileAndIndex)
s32(* getFrameCount)(void)
void *(* find)(s32 id, s32 key1, s32 key2)