mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-21 23:17:53 -05:00
Implement/match Act2GenActor::VTable0x94 (#1138)
This commit is contained in:
parent
2c10c8e344
commit
0b94b4803b
2 changed files with 29 additions and 4 deletions
|
@ -6,10 +6,13 @@
|
||||||
// VTABLE: LEGO1 0x100d4ed8
|
// VTABLE: LEGO1 0x100d4ed8
|
||||||
// SIZE 0x154
|
// SIZE 0x154
|
||||||
class Act2GenActor : public LegoPathActor {
|
class Act2GenActor : public LegoPathActor {
|
||||||
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
|
MxResult VTable0x94(LegoPathActor* p_actor, MxBool) override; // vtable+0x94
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f5a0
|
// SYNTHETIC: LEGO1 0x1000f5a0
|
||||||
// Act2GenActor::`scalar deleting destructor'
|
// Act2GenActor::`scalar deleting destructor'
|
||||||
|
|
||||||
|
private:
|
||||||
|
static MxLong g_lastHitActorTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ACT2GENACTOR_H
|
#endif // ACT2GENACTOR_H
|
||||||
|
|
|
@ -1,10 +1,32 @@
|
||||||
#include "act2genactor.h"
|
#include "act2genactor.h"
|
||||||
|
|
||||||
|
#include "legocachesoundmanager.h"
|
||||||
|
#include "legosoundmanager.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "mxmisc.h"
|
||||||
|
#include "mxtimer.h"
|
||||||
|
#include "roi/legoroi.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Act2GenActor, 0x154)
|
DECOMP_SIZE_ASSERT(Act2GenActor, 0x154)
|
||||||
|
|
||||||
// STUB: LEGO1 0x10018740
|
// GLOBAL: LEGO1 0x100f0f18
|
||||||
MxResult Act2GenActor::VTable0x94(LegoPathActor*, MxBool)
|
MxLong Act2GenActor::g_lastHitActorTime = 0;
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10018740
|
||||||
|
// FUNCTION: BETA10 0x1000c7a0
|
||||||
|
MxResult Act2GenActor::VTable0x94(LegoPathActor* p_actor, MxBool)
|
||||||
{
|
{
|
||||||
// TODO
|
MxLong time = Timer()->GetTime();
|
||||||
|
MxLong diff = time - g_lastHitActorTime;
|
||||||
|
|
||||||
|
if (strcmp(p_actor->GetROI()->GetName(), "pepper")) {
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_lastHitActorTime = time;
|
||||||
|
if (diff > 1000) {
|
||||||
|
SoundManager()->GetCacheSoundManager()->Play("hitactor", NULL, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue