diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-20 20:29:34 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-20 23:42:57 +0200 |
commit | 4a3138f38440359e268ab0e012b00756b1613f8e (patch) | |
tree | 2b6de1bf8ece5b33ff3304767df9e2bc53de5fe1 /src/Streaming.h | |
parent | Big CPed update (diff) | |
parent | Merge pull request #27 from gennariarmando/master (diff) | |
download | re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar.gz re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar.bz2 re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar.lz re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar.xz re3-4a3138f38440359e268ab0e012b00756b1613f8e.tar.zst re3-4a3138f38440359e268ab0e012b00756b1613f8e.zip |
Diffstat (limited to 'src/Streaming.h')
-rw-r--r-- | src/Streaming.h | 77 |
1 files changed, 63 insertions, 14 deletions
diff --git a/src/Streaming.h b/src/Streaming.h index 18128cff..f31faf9c 100644 --- a/src/Streaming.h +++ b/src/Streaming.h @@ -8,20 +8,25 @@ enum { enum StreamFlags { - STREAM_DONT_REMOVE = 0x01, - STREAM_SCRIPTOWNED = 0x02, - STREAM_DEPENDENCY = 0x04, - STREAM_PRIORITY = 0x08, - STREAM_NOFADE = 0x10, + STREAMFLAGS_DONT_REMOVE = 0x01, + STREAMFLAGS_SCRIPTOWNED = 0x02, + STREAMFLAGS_DEPENDENCY = 0x04, + STREAMFLAGS_PRIORITY = 0x08, + STREAMFLAGS_NOFADE = 0x10, }; enum StreamLoadState { - STREAM_NOTLOADED = 0, - STREAM_LOADED = 1, - STREAM_INQUEUE = 2, - STREAM_READING = 3, // what is this? - STREAM_BIGFILE = 4, + STREAMSTATE_NOTLOADED = 0, + STREAMSTATE_LOADED = 1, + STREAMSTATE_INQUEUE = 2, + STREAMSTATE_READING = 3, // what is this? + STREAMSTATE_BIGFILE = 4, +}; + +enum ChannelState +{ + CHANNELSTATE_0 = 0, }; class CStreamingInfo @@ -36,18 +41,62 @@ public: 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); + bool GetCdPosnAndSize(uint32 &posn, uint32 &size); + void SetCdPosnAndSize(uint32 posn, uint32 size); + void AddToList(CStreamingInfo *link); + void RemoveFromList(void); + uint32 GetCdSize(void) { return m_size; } +}; + +struct CStreamingChannel +{ + int32 modelIds[4]; + int32 offsets[4]; + int32 state; + int32 field24; + int32 position; + int32 size; + int32 field30; + int32 status; // from CdStream }; +class CDirectory; + class CStreaming { public: static bool &ms_disableStreaming; + static bool &ms_bLoadingBigModel; static int32 &ms_numModelsRequested; static CStreamingInfo *ms_aInfoForModel; //[NUMSTREAMINFO] + static CStreamingInfo &ms_startLoadedList; + static CStreamingInfo &ms_endLoadedList; + static CStreamingInfo &ms_startRequestedList; + static CStreamingInfo &ms_endRequestedList; + static int32 &ms_oldSectorX; + static int32 &ms_oldSectorY; + static uint32 &ms_streamingBufferSize; + static uint8 **ms_pStreamingBuffer; //[2] + static int32 &ms_memoryUsed; + static CStreamingChannel *ms_channel; //[2] + static int32 &ms_numVehiclesLoaded; + static int32 *ms_vehiclesLoaded; //[MAXVEHICLESLOADED] + static CDirectory *&ms_pExtraObjectsDir; + static int32 &ms_numPriorityRequests; + static bool &ms_hasLoadedLODs; + static int32 &ms_currentPedGrp; + static int32 ms_lastCullZone; + static uint16 &ms_loadedGangs; + static int32 ms_currentPedLoading; + static int32 *ms_imageOffsets; //[NUMCDIMAGES] + static int32 &ms_lastImageRead; + static int32 &ms_imageSize; + static int32 &ms_memoryAvailable; + + static void Init(void); + static void Shutdown(void); + static void LoadCdDirectory(void); + static void LoadCdDirectory(const char *dirname, int n); static void RemoveModel(int32 id); static void RequestModel(int32 model, int32 flags); |