Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
copy_place_points.inc.c
Go to the documentation of this file.
1/* Copies the points of PLACE (with PLACEARG) in LIST to SLOTS, one each */
2void copyPlacePoints(StageSlot *slots, StagePoints **list, s32 place, s32 placeArg) {
3 StagePoints *entry;
4 StagePoint *point;
5
6 for (;;) {
7 entry = *list;
8 if (entry == NULL) {
9 return;
10 }
11 if (entry->place == place && entry->placeArg == placeArg) {
12 break;
13 }
14 list++;
15 }
16 point = entry->points;
17 slots->arg = point->arg;
18 slots->x = point->x;
19 slots->y = point->y;
20 slots->dir = point->dir;
21 slots->place = point->place;
22 slots->placeArg = point->placeArg;
23 while (point->next != NULL) {
24 point = point->next;
25 slots++;
26 slots->arg = point->arg;
27 slots->x = point->x;
28 slots->y = point->y;
29 slots->dir = point->dir;
30 slots->place = point->place;
31 slots->placeArg = point->placeArg;
32 }
33}
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
void copyPlacePoints(StageSlot *slots, StagePoints **list, s32 place, s32 placeArg)
Copies the points of PLACE (with PLACEARG) in LIST to SLOTS, one each.
Where an exit (StageSlot) leads: copyPlacePoints copies a place's points to the stage's first slots,...
Definition stage.h:50
u16 arg
the mode
Definition stage.h:51
struct StagePoint * next
Definition stage.h:57
u16 place
Definition stage.h:52
u16 placeArg
Definition stage.h:53
u16 y
Definition stage.h:55
u16 dir
Definition stage.h:56
u16 x
Definition stage.h:54
The points of a place (GAME.place and GAME.placeArg, which the exit the player came through set)
Definition stage.h:62
s16 place
Definition stage.h:63
StagePoint * points
Definition stage.h:65
s16 placeArg
Definition stage.h:64
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
u16 arg
by type: a mode, a depth, a map, an event or a height (in 16 pixels, plus 1 for a climb); a warp's an...
Definition field_map.h:279
u16 place
copied to GAME.place, the place (FieldBattles.id)
Definition field_map.h:285
u16 placeArg
copied to GAME.placeArg: with place, the next stage's place points
Definition field_map.h:286