Mario Kart 64
Loading...
Searching...
No Matches
update.inc.c
Go to the documentation of this file.
1#include <actors.h>
2
11 // If train close?
12 if (isCrossingTriggeredByIndex[crossing->crossingId] != 0) {
13 // Timer++
14 crossing->someTimer++;
15 // Reset timer
16 if (crossing->someTimer > 40) {
17 crossing->someTimer = 1;
18 }
19 // Play Bell sound when timer hits 20 or 1.
20 if ((crossing->someTimer == 1) || (crossing->someTimer == 20)) {
21 func_800C98B8(crossing->pos, crossing->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x16));
22 }
23 }
24}
u16 isCrossingTriggeredByIndex[NUM_CROSSINGS]
Definition code_80005FD0.c:140
void func_800C98B8(Vec3f position, Vec3f velocity, u32 soundBits)
Definition external.c:3027
void update_actor_railroad_crossing(struct RailroadCrossing *crossing)
Updates the railroad crossing actor. Actor used in Kalimari Desert. Make the sound of the bell when t...
Definition update.inc.c:10
#define SOUND_ARG_LOAD(sound_bank, byte2, byte3, sound_id)
Definition sounds.h:14
Definition actor_types.h:158
Vec3f velocity
Definition actor_types.h:168
s16 crossingId
Definition actor_types.h:162
Vec3f pos
Definition actor_types.h:167
s16 someTimer
Definition actor_types.h:161