Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef FIGHTSTG_TYPES_H
2#define FIGHTSTG_TYPES_H
3
4/* FIGHTSTG's shared declarations: the headers it builds on, the ids its
5 tasks register with, and the types the other headers point to first. */
6
7#include "engine/game.h"
8#include <libgs.h>
9#include "engine/menu.h"
10#include "engine/file.h"
11
12/* The types that the headers point to before they are defined */
13typedef struct BattleScript BattleScript;
14typedef union BattleChild BattleChild;
15
16/* The ids that the battle's tasks register with, for the others to find them
17 (TASK_REGISTRY.funcs.find) */
18#define BATTLE_TASK_MENU 0xC /* WFIGHTMN's battle menu */
19#define BATTLE_TASK_PLAYER_TURN 0xE
20#define BATTLE_TASK_MODEL 0x11 /* a model (FIGHTSTG_updateModel) */
21#define BATTLE_TASK_CAMERA 0x12
22#define BATTLE_TASK_LIGHTS 0x13
23#define BATTLE_TASK_MODELS 0x14 /* the fighters' */
24#define BATTLE_TASK_STAGE 0x15
25
26/* The battle's layers, over the screen's (SCREEN_LAYER) */
27#define BATTLE_LAYER_CAMERA 0x1001 /* the battle camera's and the lights' */
28#define BATTLE_LAYER_STAGE 0x1002
29#define BATTLE_LAYER_WIREFRAME 0x1003 /* the models' wireframe copies, in a Digimon change */
30#define BATTLE_LAYER_MODELS 0x1004
31#define BATTLE_LAYER_MENUS 0x1005 /* the HUD, the menus and the messages */
32#define BATTLE_LAYER_FRONT 0x1006 /* the fades, the flashes and the sprite effects over all */
33
34/* The body of WFIGHTMN's and WFIGHTTS's layer setups: the display and the
35 battle's layers on SCREEN (a RECT), the front one with FRONTCALLBACKS
36 callbacks. A macro, as an inline's pointer to SCREEN is taken before the
37 calls, which moves its load */
38#define FIGHTSTG_CREATE_LAYERS(screen, frontCallbacks) \
39 Layer *layer; \
40 \
41 GFX.funcs.reset(); \
42 GFX.funcs.allocPrimBuffers(0x19000); \
43 GFX.funcs.setDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); \
44 layer = GFX.funcs.createLayer(&(screen), 1, SCREEN_LAYER); \
45 layer->setOffset(layer, 0xA0, 0x78); \
46 layer = GFX.funcs.createLayer(&(screen), 1, BATTLE_LAYER_CAMERA); \
47 layer->setOffset(layer, 0xA0, 0x78); \
48 layer->allocCallbacks(layer, 100); \
49 layer = GFX.funcs.createLayer(&(screen), 8, BATTLE_LAYER_STAGE); \
50 layer->setOffset(layer, (screen).w / 2, (screen).h / 2); \
51 layer->allocCallbacks(layer, 40); \
52 layer = GFX.funcs.createLayer(&(screen), 1, BATTLE_LAYER_WIREFRAME); \
53 layer->setOffset(layer, 0xA0, 0x78); \
54 layer->allocCallbacks(layer, 100); \
55 layer = GFX.funcs.createLayer(&(screen), 12, BATTLE_LAYER_MODELS); \
56 layer->setOffset(layer, 0xA0, 0x78); \
57 layer->allocCallbacks(layer, 100); \
58 layer = GFX.funcs.createLayer(&(screen), 1, BATTLE_LAYER_MENUS); \
59 layer->setOffset(layer, 0, 0); \
60 layer = GFX.funcs.createLayer(&(screen), 1, BATTLE_LAYER_FRONT); \
61 layer->setOffset(layer, 0, 0); \
62 layer->allocCallbacks(layer, frontCallbacks)
63
64#endif /* FIGHTSTG_TYPES_H */
The inn and the field menu (menu/)
The disc file table, the CD reader, the file cache and the decompressor (file/)
A fighter's battle script (FIGHTSTG_updateBattleScript): a list of s16 commands in an archive entry o...
Definition effect.h:144
A turn's or a counterattack's one child, and what WFIGHTMN's battle menu waits for (NULL when it is d...
Definition task.h:16