Isle
Loading...
Searching...
No Matches
act2genactor.cpp
Go to the documentation of this file.
1#include "act2genactor.h"
2
4#include "legosoundmanager.h"
5#include "misc.h"
6#include "mxmisc.h"
7#include "mxtimer.h"
8#include "roi/legoroi.h"
9
11
12// GLOBAL: LEGO1 0x100f0f18
13MxLong Act2GenActor::g_lastHitActorTime = 0;
14
15// FUNCTION: LEGO1 0x10018740
16// FUNCTION: BETA10 0x1000c7a0
17MxResult Act2GenActor::HitActor(LegoPathActor* p_actor, MxBool)
18{
19 MxLong time = Timer()->GetTime();
20 MxLong diff = time - g_lastHitActorTime;
21
22 if (strcmp(p_actor->GetROI()->GetName(), "pepper")) {
23 return SUCCESS;
24 }
25
26 g_lastHitActorTime = time;
27 if (diff > 1000) {
29 }
30
31 return SUCCESS;
32}
[AI] An actor that extends LegoPathActor with special collision logic for "Act2Gen" scene logic.
Definition: act2genactor.h:13
LegoCacheSound * Play(const char *p_key, const char *p_name, MxBool p_looping)
[AI] Plays a sound identified by key, with the given playback name and looping flag.
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
LegoCacheSoundManager * GetCacheSoundManager()
[AI] Returns the cache sound manager used to cache and reuse sound effects.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
Definition: mxtimer.h:50
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30
LegoSoundManager * SoundManager()
[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance....
Definition: misc.cpp:22
MxTimer * Timer()
[AI] Returns the global simulation timer.
Definition: mxmisc.cpp:33
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83