Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
camera_turn.h
Go to the documentation of this file.
1/* The camera's turn around the fighters, a task that both versions have:
2 the USA version in camera_task.c, the European one in battle_script.c. Each
3 includes this file where its object has the task. */
4
5
6/* When the player loses, turns the camera around the fighters, from the
7 first fighter's view 0xB, over stage 0x17, with the battle script's task
8 as the child; the European version moves on to state 2 after 240 frames,
9 where the camera keeps turning */
11 BattleCamera *camera = task->camera;
12 FightStage *stage;
13 Models *models;
14 s32 z;
15
16 switch (task->state) {
17 case 0:
18 default:
20 task->camera = camera;
21 camera->getFighterView(camera, 0, 0xB);
27 stage->setStage(stage, 0x17, 0x1E, 0x1E);
29 models->get(models, 0x10)->layers[0].enabled = 0;
31 *children = FIGHTSTG_createBattleScript();
32 (*children)->index = 3;
33 (*children)->enemy = 0;
34 task->nextState(task);
35 /* fallthrough */
36 case 1:
37#if VERSION_EU || VERSION_JP
38 task->substate += GFX.funcs.getFrameTime();
39 if (task->substate >= 240) {
40 task->setState(task, 2);
41 }
42 /* fallthrough */
43 case 2:
44#endif
46 camera->set(camera, &FIGHTSTG_fighterView);
47 break;
48 case 3:
50 break;
51#if VERSION_US
52 case 2:
53 break;
54#endif
55 }
56}
57
58/* Starts the camera's turn around the fighters */
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
Definition battle.c:16
#define BATTLE_TASK_CAMERA
Definition types.h:21
#define BATTLE_TASK_MODELS
the fighters'
Definition types.h:23
#define BATTLE_TASK_STAGE
Definition types.h:24
BattleScript * FIGHTSTG_createBattleScript(void)
Creates a battle script, which plays a technique (FIGHTSTG_updateBattleScript)
CameraTurn * FIGHTSTG_startCameraTurn(void)
Starts the camera's turn around the fighters.
Definition camera_turn.h:59
void FIGHTSTG_updateCameraTurn(CameraTurn *task, BattleScript **children)
When the player loses, turns the camera around the fighters, from the first fighter's view 0xB,...
Definition camera_turn.h:10
signed int s32
Definition common.h:11
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
CameraView FIGHTSTG_fighterView
the view FIGHTSTG_getFighterView makes
TaskRegistry TASK_REGISTRY
Definition registry.c:122
The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set put...
Definition camera.h:66
CameraView *(* getFighterView)(struct BattleCamera *task, s32 id, s32 camera)
Definition camera.h:77
void(* set)(struct BattleCamera *task, CameraView *view)
Definition camera.h:74
A fighter's battle script (FIGHTSTG_updateBattleScript): a list of s16 commands in an archive entry o...
Definition effect.h:144
void(* setSpeed)(s32 mode)
Definition battle.h:243
The camera's turn around the fighters when the player loses (FIGHTSTG_updateCameraTurn)
Definition camera.h:101
s32 substate
Definition camera.h:102
BattleCamera * camera
Definition camera.h:103
void(* setState)(struct CameraTurn *task, s32 state)
Definition camera.h:102
void(* nextState)(struct CameraTurn *task)
Definition camera.h:102
s32 state
Definition camera.h:102
s32 tz
Definition camera.h:58
SVECTOR rot
Definition camera.h:59
s32 vpz
Definition camera.h:52
s32 vrz
Definition camera.h:55
The fight stage (FIGHTSTG_createStage), registered as BATTLE_TASK_STAGE: its model,...
Definition stage.h:38
void(* setStage)(struct FightStage *task, s32 stage, s32 fadeOutTime, s32 fadeInTime)
Definition stage.h:54
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
s32 enabled
Definition model.h:112
struct ModelControl::@3 layers[2]
the model is drawn once for each one enabled
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
Definition model.h:284
ModelControl *(* get)(struct Models *task, s32 id)
Definition model.h:289
void *(* find)(s32 id, s32 key1, s32 key2)
Definition task.h:18
TaskFuncs funcs
Definition task.h:76
Any task, seen through its header.
Definition task.h:62
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105