From 600bf0351476a5a21aabb5429132ddf7f52ac0b9 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 15 May 2019 16:52:37 +0200 Subject: first commit --- src/Streaming.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/Streaming.h (limited to 'src/Streaming.h') diff --git a/src/Streaming.h b/src/Streaming.h new file mode 100644 index 00000000..1acfc261 --- /dev/null +++ b/src/Streaming.h @@ -0,0 +1,54 @@ +#pragma once + +enum { + STREAM_OFFSET_MODEL = 0, + STREAM_OFFSET_TXD = STREAM_OFFSET_MODEL+MODELINFOSIZE, + NUMSTREAMINFO = STREAM_OFFSET_TXD+TXDSTORESIZE +}; + +enum StreamFlags +{ + STREAM_DONT_REMOVE = 0x01, + STREAM_SCRIPTOWNED = 0x02, + STREAM_DEPENDENCY = 0x04, + STREAM_PRIORITY = 0x08, + STREAM_NOFADE = 0x10, +}; + +enum StreamLoadState +{ + STREAM_NOTLOADED = 0, + STREAM_LOADED = 1, + STREAM_INQUEUE = 2, + STREAM_READING = 3, // what is this? + STREAM_BIGFILE = 4, +}; + +class CStreamingInfo +{ +public: + CStreamingInfo *m_next; + CStreamingInfo *m_prev; + uint8 m_loadState; + uint8 m_flags; + + int16 m_nextID; + uint32 m_position; + uint32 m_size; + +// bool GetCdPosnAndSize(uint32 *pos, uint32 *size); +// void SetCdPosnAndSize(uint32 pos, uint32 size); +// void AddToList(CStreamingInfo *link); +// void RemoveFromList(void); +}; + +class CStreaming +{ +public: + static bool &ms_disableStreaming; + static int32 &ms_numModelsRequested; + static CStreamingInfo *ms_aInfoForModel; //[NUMSTREAMINFO] + + static void RemoveModel(int32 id); + static void RequestModel(int32 model, int32 flags); +}; -- cgit v1.2.3