Isle
Loading...
Searching...
No Matches
legoactor.h
Go to the documentation of this file.
1#ifndef LEGOACTOR_H
2#define LEGOACTOR_H
3
4#include "decomp.h"
5#include "legoentity.h"
7
9
12class LegoActor : public LegoEntity {
13public:
15 enum {
16 c_none = 0,
23 };
24
26 LegoActor();
27
29 ~LegoActor() override;
30
33 const char* ClassName() const override // vtable+0x0c
34 {
35 // STRING: LEGO1 0x100f0124
36 return "LegoActor";
37 }
38
43 MxBool IsA(const char* p_name) const override // vtable+0x10
44 {
45 return !strcmp(p_name, LegoActor::ClassName()) || LegoEntity::IsA(p_name);
46 }
47
51 void ParseAction(char* p_extra) override;
52
57 void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override;
58
60 virtual MxFloat GetSoundFrequencyFactor() { return m_frequencyFactor; } // vtable+0x50
61
64 virtual void SetSoundFrequencyFactor(MxFloat p_frequencyFactor)
65 {
66 m_frequencyFactor = p_frequencyFactor;
67 } // vtable+0x54
68
71 virtual void VTable0x58(MxFloat p_unk0x70) { m_unk0x70 = p_unk0x70; } // vtable+0x58
72
74 virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c
75
77 virtual MxU8 GetActorId() { return m_actorId; } // vtable+0x60
78
81 virtual void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } // vtable+0x64
82
87 static const char* GetActorName(MxU8 p_id);
88
91 void Mute(MxBool p_muted);
92
93protected:
98};
99
100#endif // LEGOACTOR_H
[AI] Represents an actor (character) entity in the LEGO Island 3D world, providing specific actor log...
Definition: legoactor.h:12
virtual MxFloat GetSoundFrequencyFactor()
[AI] Returns the current frequency factor for the actor's sound.
Definition: legoactor.h:60
virtual void SetSoundFrequencyFactor(MxFloat p_frequencyFactor)
[AI] Sets the frequency factor for the actor's sound playback (e.g., to alter pitch).
Definition: legoactor.h:64
LegoCacheSound * m_sound
[AI] Pointer to a currently active sound instance played by the actor, if any.
Definition: legoactor.h:95
@ c_nick
Nick ([AI])
Definition: legoactor.h:20
@ c_laura
Laura ([AI])
Definition: legoactor.h:21
@ c_mama
Mama ([AI])
Definition: legoactor.h:18
@ c_brickster
The Brickster ([AI])
Definition: legoactor.h:22
@ c_none
No actor ([AI])
Definition: legoactor.h:16
@ c_pepper
Pepper Roni ([AI])
Definition: legoactor.h:17
@ c_papa
Papa ([AI])
Definition: legoactor.h:19
MxFloat m_unk0x70
[AI] Unknown float property, likely used for advanced audio/animation control. [AI_SUGGESTED_NAME: m_...
Definition: legoactor.h:96
LegoActor()
[AI] Constructs new LegoActor, initializes members.
Definition: legoactor.cpp:16
static const char * GetActorName(MxU8 p_id)
[AI] Gets the static display name of an actor by ID.
Definition: legoactor.cpp:119
MxFloat m_frequencyFactor
[AI] The frequency/pitch scaling factor for the actor's sound (default 0 == normal).
Definition: legoactor.h:94
MxBool IsA(const char *p_name) const override
[AI] Determines if the class is or derives from the given name.
Definition: legoactor.h:43
MxU8 m_actorId
[AI] Unique identifier for this actor, corresponding to enum above.
Definition: legoactor.h:97
void Mute(MxBool p_muted)
[AI] Mutes or unmutes the actor's current sound.
Definition: legoactor.cpp:144
const char * ClassName() const override
[AI] Gets the class name of this object.
Definition: legoactor.h:33
virtual MxFloat VTable0x5c()
[AI] Gets the unknown floating point property set by VTable0x58. [AI] [AI_SUGGESTED_NAME: GetVoicePit...
Definition: legoactor.h:74
virtual void SetActorId(MxU8 p_actorId)
[AI] Sets the actor's numeric ID.
Definition: legoactor.h:81
void SetROI(LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2) override
[AI] Sets the Region of Interest (ROI, i.e.
Definition: legoactor.cpp:125
virtual MxU8 GetActorId()
[AI] Gets this actor's numeric ID, corresponding to a known enumeration/actor.
Definition: legoactor.h:77
virtual void VTable0x58(MxFloat p_unk0x70)
[AI] Sets a floating point property, unknown usage (possibly animation or audio parameter).
Definition: legoactor.h:71
void ParseAction(char *p_extra) override
[AI] Parses an action string and applies parsed behaviors to the actor.
Definition: legoactor.cpp:34
~LegoActor() override
[AI] Cleans up LegoActor; stops sound if active.
Definition: legoactor.cpp:26
Sound cache object managing DirectSound buffers and 3D positioning for preloaded sound data.
Definition: legocachsound.h:17
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
Definition: legoentity.h:16
MxBool IsA(const char *p_name) const override
[AI] Polymorphic type check for this entity given a string.
Definition: legoentity.h:59
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
#define override
Definition: compat.h:21
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
float MxFloat
[AI]
Definition: mxtypes.h:68
unsigned char MxU8
[AI]
Definition: mxtypes.h:8