Isle
Loading...
Searching...
No Matches
lego3dsound.h
Go to the documentation of this file.
1#ifndef LEGO3DSOUND_H
2#define LEGO3DSOUND_H
3
4#include "decomp.h"
5#include "mxtypes.h"
6
7#include <dsound.h>
8
9class LegoActor;
10class LegoROI;
11
20public:
24 virtual ~Lego3DSound();
25
27 void Init();
28
34 MxResult Create(LPDIRECTSOUNDBUFFER p_directSoundBuffer, const char* p_name, MxS32 p_volume);
35
37 void Destroy(); // [AI]
38
42 MxU32 UpdatePosition(LPDIRECTSOUNDBUFFER p_directSoundBuffer);
43
47 void FUN_10011a60(LPDIRECTSOUNDBUFFER p_directSoundBuffer, const char* p_name); // [AI_SUGGESTED_NAME: SetTargetObject]
48
50 void Reset(); // [AI]
51
56 MxS32 SetDistance(MxS32 p_min, MxS32 p_max);
57
58 // SYNTHETIC: LEGO1 0x10011650
59 // Lego3DSound::`scalar deleting destructor'
60
61private:
62 LPDIRECTSOUND3DBUFFER m_ds3dBuffer;
63 LegoROI* m_roi;
64 LegoROI* m_positionROI;
65 MxBool m_enabled;
66 MxBool m_isActor;
67 LegoActor* m_actor;
68 double m_frequencyFactor;
69 DWORD m_dwFrequency;
70 MxS32 m_volume;
71};
72
73// GLOBAL: LEGO1 0x100db6c0
74// IID_IDirectSound3DBuffer
75
76#endif // LEGO3DSOUND_H
[AI] Implements 3D positional sound logic for LEGO Island using DirectSound 3D buffers.
Definition: lego3dsound.h:19
void Reset()
[AI] Releases any in-world/actor/ROI associations and resets member pointers.
MxS32 SetDistance(MxS32 p_min, MxS32 p_max)
[AI] Sets the minimum and maximum 3D sound effective distances if 3D sound is enabled.
MxU32 UpdatePosition(LPDIRECTSOUNDBUFFER p_directSoundBuffer)
[AI] Recalculates and updates the sound position on the underlying DirectSound 3D buffer or the volum...
void FUN_10011a60(LPDIRECTSOUNDBUFFER p_directSoundBuffer, const char *p_name)
[AI] Associates a new in-world object to this sound, updating its 3D position tracking and (if applic...
virtual ~Lego3DSound()
[AI] Destroys the Lego3DSound object and releases associated DirectSound buffers and object reference...
Definition: lego3dsound.cpp:21
void Destroy()
[AI] Cleans up and releases all resources (DirectSound 3D buffer, associated object references).
Lego3DSound()
[AI] Constructs a new Lego3DSound instance and initializes all members to safe default values....
Definition: lego3dsound.cpp:15
MxResult Create(LPDIRECTSOUNDBUFFER p_directSoundBuffer, const char *p_name, MxS32 p_volume)
[AI] Initializes 3D sound for a given DirectSound buffer and associates it with a named game object.
Definition: lego3dsound.cpp:40
void Init()
[AI] Initializes internal fields to their defaults. Used by constructor and destroy logic....
Definition: lego3dsound.cpp:27
[AI] Represents an actor (character) entity in the LEGO Island 3D world, providing specific actor log...
Definition: legoactor.h:12
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
struct IDirectSoundBuffer * LPDIRECTSOUNDBUFFER
Definition: dsound.h:47
struct IDirectSound3DBuffer * LPDIRECTSOUND3DBUFFER
Definition: dsound.h:49
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxU32
[AI]
Definition: mxtypes.h:32