Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
update_tile_anims1_once.inc.c
Go to the documentation of this file.
1/*
2 * Animates the map objects of animation 1 with updateTileAnimsFrames,
3 * stepped once an update
4 */
6 StageTile *tile;
7 s32 frame;
8
9 switch (task->state) {
10 case TASK_INIT:
11 default:
12 task->nextState(task);
13 task->anims[0].index = 0;
15 break;
16 case TASK_RUN:
19 for (; tile->margin != 0; tile++) {
20 if (tile->anim == 1) {
21 tile->frame = frame;
22 }
23 }
24 break;
25 case TASK_DONE:
26 case TASK_KILL:
27 break;
28 }
29}
signed int s32
Definition common.h:11
#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 animation 1 with updateTileAnimsFrames, stepped once an update.
AnimFrame updateTileAnimsFrames[]
Defined below, after the code that uses them.
Definition wstag405.c:146