Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
trigger.c File Reference

The map's triggers: exits, climbs, warps, slides and the other things the player sets off on a cell. More...

#include "field/field_mode.h"
Include dependency graph for trigger.c:

Go to the source code of this file.

Functions

s32 FIELDSTG_findTrigger (Triggers *task)
 Finds the slot under the player (FIELD_MAP_TRIGGERS); those up to SLOT_GAUGE count only while the player faces them.
 
s32 FIELDSTG_offerTrigger (Triggers *task, TriggerChildren *children)
 Acts at once on a slot that does (SLOT_DEPTH...), or shows the balloon of one that waits for a button and returns 1; returns 0 when its conditions don't hold.
 
void FIELDSTG_setOffTrigger (Triggers *task)
 Sets off the slot the player pressed cross on.
 
void FIELDSTG_updateTriggers (Triggers *task, TriggerChildren *children)
 The triggers' update: offers the slot under the player while the field isn't busy, and sets it off on cross.
 
Triggers * FIELDSTG_createTriggers (s32 sheetEntry, StageSlot *slots)
 Creates the triggers.
 

Variables

const Vec2 FIELDSTG_noOffset = {0, 0}
 

Detailed Description

The map's triggers: exits, climbs, warps, slides and the other things the player sets off on a cell.

Their rodata, at 0x800825E0 (USA), starts FIELDSTG.PRO's fifth object (see data/fieldstg.c).

Definition in file trigger.c.

Function Documentation

◆ FIELDSTG_findTrigger()

s32 FIELDSTG_findTrigger ( Triggers *  task)

Finds the slot under the player (FIELD_MAP_TRIGGERS); those up to SLOT_GAUGE count only while the player faces them.

trigger.c

< a cell's value: a direction (3 bits) and a StageSlot (5)

< the player's depth, arg

< the map the player is on, arg (FieldMap.setMap)

< starts the event arg

< a warp (FieldWarp at arg) with effect and cutscene 1

< the same with effect and cutscene 0

< sends the player flying (FIELDSTG_launchActor)

< the same, then leaves for mode arg

Definition at line 9 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the caller graph for this function:

◆ FIELDSTG_offerTrigger()

s32 FIELDSTG_offerTrigger ( Triggers *  task,
TriggerChildren *  children 
)

Acts at once on a slot that does (SLOT_DEPTH...), or shows the balloon of one that waits for a button and returns 1; returns 0 when its conditions don't hold.

< the player's depth, arg

< the map the player is on, arg (FieldMap.setMap)

< starts the event arg

< sends the player flying (FIELDSTG_launchActor)

< the gauge game

< leaves for mode arg at (x, y), facing dir

Definition at line 42 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_setOffTrigger()

void FIELDSTG_setOffTrigger ( Triggers *  task)

Sets off the slot the player pressed cross on.

< leaves for mode arg at (x, y), facing dir

< the same, then leaves for mode arg

< the gauge game

< the same with effect and cutscene 0

< a warp (FieldWarp at arg) with effect and cutscene 1

Definition at line 144 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateTriggers()

void FIELDSTG_updateTriggers ( Triggers *  task,
TriggerChildren *  children 
)

The triggers' update: offers the slot under the player while the field isn't busy, and sets it off on cross.

< every character (FIELDSTG_createActor)

< walks off through an exit (FIELDSTG_walkActorInDir)

Definition at line 194 of file trigger.c.

Referenced by FIELDSTG_createTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createTriggers()

Triggers * FIELDSTG_createTriggers ( s32  sheetEntry,
StageSlot *  slots 
)

Creates the triggers.

Definition at line 239 of file trigger.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FIELDSTG_noOffset

const Vec2 FIELDSTG_noOffset = {0, 0}

Definition at line 141 of file trigger.c.

Referenced by FIELDSTG_setOffTrigger().