Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
update_tile_anims4.inc.c
Go to the documentation of this file.
1/*
2 * Animates the map objects of animations 1 to 4 with updateTileAnimsFrames0
3 * to 3, each stepped again for each map object that shows it (so it runs
4 * faster with more of them)
5 */
7 StageTile *tile;
8
9 switch (task->state) {
10 case TASK_INIT:
11 default:
12 task->anims[0].index = 0;
14 task->anims[1].index = 0;
16 task->anims[2].index = 0;
18 task->anims[3].index = 0;
20 task->nextState(task);
21 break;
22 case TASK_RUN:
23 for (tile = FIELDSTG_state.objects; tile->margin != 0; tile++) {
24 switch (tile->anim) {
25 case 1:
27 break;
28 case 2:
30 break;
31 case 3:
33 break;
34 case 4:
36 break;
37 }
38 }
39 break;
40 case TASK_DONE:
41 case TASK_KILL:
42 break;
43 }
44}
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
FieldState FIELDSTG_state
Definition fieldstg.c:2641
s32 stepLoopingAnimation(AnimState *anim, AnimFrame *frames, s32 depth)
Steps ANIM through FRAMES by the frame time (at most 4), looping at the end (frame 0xFF),...
s16 duration
Definition gfx.h:298
s16 index
Definition gfx.h:302
s16 timer
Definition gfx.h:303
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
The task that animates the map objects.
Definition stage.h:102
void(* nextState)(struct StageTileAnims *task)
Definition stage.h:103
AnimState anims[4]
as many as the stage uses
Definition stage.h:104
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 margin
how far off the view it is still drawn; 0 ends the table
Definition field_map.h:214
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
void updateTileAnims(StageTileAnims *task)
Animates the map objects of animations 1 to 4 with updateTileAnimsFrames0 to 3, each stepped again fo...
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
Definition wstag233.c:52
AnimFrame updateTileAnimsFrames1[]
Definition wstag233.c:59
AnimFrame updateTileAnimsFrames2[]
Definition wstag311.c:973
AnimFrame updateTileAnimsFrames3[]
Definition wstag311.c:977