Isle
Loading...
Searching...
No Matches
mxdssubscriber.h
Go to the documentation of this file.
1#ifndef MXDSSUBSCRIBER_H
2#define MXDSSUBSCRIBER_H
3
4#include "decomp.h"
5#include "mxcore.h"
6#include "mxstreamchunklist.h"
7#include "mxutilitylist.h"
8
9class MxDSObject;
10class MxDSSubscriber;
12
15class MxDSSubscriberList : public MxUtilityList<MxDSSubscriber*> {
16public:
20 MxDSSubscriber* Find(MxDSObject* p_object); // [AI]
21};
22
27class MxDSSubscriber : public MxCore {
28public:
30 ~MxDSSubscriber() override;
31
32 // FUNCTION: LEGO1 0x100b7d50
33 // FUNCTION: BETA10 0x10135180
36 const char* ClassName() const override // vtable+0x0c
37 {
38 // STRING: LEGO1 0x101020f8
39 return "MxDSSubscriber";
40 }
41
42 // FUNCTION: LEGO1 0x100b7d60
46 MxBool IsA(const char* p_name) const override // vtable+0x10
47 {
48 return !strcmp(p_name, MxDSSubscriber::ClassName()) || MxCore::IsA(p_name);
49 }
50
56 MxResult Create(MxStreamController* p_controller, MxU32 p_objectId, MxS16 p_unk0x48); // [AI]
57
60 void DestroyData(); // [AI]
61
66 MxResult AddData(MxStreamChunk* p_chunk, MxBool p_append); // [AI]
67
70 MxStreamChunk* PopData(); // [AI]
71
74 MxStreamChunk* PeekData(); // [AI]
75
78 void FreeDataChunk(MxStreamChunk* p_chunk); // [AI]
79
80 // FUNCTION: BETA10 0x101354f0
82 MxU32 GetObjectId() { return m_objectId; } // [AI]
83
84 // FUNCTION: BETA10 0x10135510
86 MxS16 GetUnknown48() { return m_unk0x48; } // [AI]
87
88private:
89 MxStreamChunkList m_pendingChunks;
90 MxStreamChunkListCursor* m_pendingChunkCursor;
91 MxStreamChunkList m_consumedChunks;
92 MxStreamChunkListCursor* m_consumedChunkCursor;
93 MxStreamController* m_controller;
94 MxU32 m_objectId;
95 MxS16 m_unk0x48;
96};
97
98// SYNTHETIC: LEGO1 0x100b7de0
99// MxDSSubscriber::`scalar deleting destructor'
100
101// TEMPLATE: LEGO1 0x100b7d00
102// MxStreamChunkList::~MxStreamChunkList
103
104// TEMPLATE: BETA10 0x10150a70
105// MxUtilityList<MxDSSubscriber *>::PopFront
106
107#endif // MXDSSUBSCRIBER_H
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
virtual MxBool IsA(const char *p_name) const
[AI] Checks whether this object's class type or parents match the given name.
Definition: mxcore.h:46
[AI] Base class for any object deserialized from an SI (script/data) file in the LEGO Island engine.
Definition: mxdsobject.h:44
[AI] List container for pointers to MxDSSubscriber objects, with utility methods.
MxDSSubscriber * Find(MxDSObject *p_object)
[AI] Searches for a subscriber corresponding to the provided MxDSObject.
[AI] Handles the receipt, queuing, and batch management of data chunks streamed by a MxStreamControll...
MxBool IsA(const char *p_name) const override
[AI] Checks if this object is of the provided type name or is derived from it.
MxResult Create(MxStreamController *p_controller, MxU32 p_objectId, MxS16 p_unk0x48)
[AI] Initializes subscription to a streaming controller, sets identifiers, and establishes chunk curs...
MxResult AddData(MxStreamChunk *p_chunk, MxBool p_append)
[AI] Appends or prepends a new data chunk to the pending stream buffer.
const char * ClassName() const override
[AI] Returns the class name as a string ("MxDSSubscriber").
MxStreamChunk * PopData()
[AI] Pops the next available pending data chunk for consumption, moving it to the consumed list.
MxDSSubscriber()
[AI] Initializes internal member pointers and state.
void DestroyData()
[AI] Frees and detaches all currently managed/pending/consumed data chunks from both lists; intended ...
~MxDSSubscriber() override
[AI] Destructor, unregisters and frees associated memory/buffers.
MxS16 GetUnknown48()
[AI] Returns the member field sometimes used for disambiguating media (purpose context-specific).
void FreeDataChunk(MxStreamChunk *p_chunk)
[AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes sing...
MxU32 GetObjectId()
[AI] Returns the object identifier associated with this subscriber.
MxStreamChunk * PeekData()
[AI] Returns but does not remove the first pending data chunk ("peek" operation).
[AI] Cursor for iterating over a MxStreamChunkList.
[AI] A list for managing collections of pointers to MxStreamChunk objects, used for organizing and ma...
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
Definition: mxstreamchunk.h:19
[AI] Controller for streaming and managing multimedia resources and actions during gameplay.
[AI] A utility list extending the STL list<T>, providing simplified PushBack, Remove,...
Definition: mxutilitylist.h:14
#define override
Definition: compat.h:21
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed short MxS16
[AI]
Definition: mxtypes.h:26
unsigned int MxU32
[AI]
Definition: mxtypes.h:32