CacheChunkRecycler::~CacheChunkRecycler (0x877410) and the deleting destructor of SEChatSound (0x87C480, added to its OFFSET list). SoundEngine is now 154/154. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
72 lines
1.6 KiB
C++
72 lines
1.6 KiB
C++
#ifndef ENGINE_SOURCE_SOUNDENGINE_SOUNDCACHE_H
|
|
#define ENGINE_SOURCE_SOUNDENGINE_SOUNDCACHE_H
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include "Engine/Source/Base/CDataRecycler.h"
|
|
#include "Engine/Source/Storm/H/stpl.h"
|
|
|
|
class SFileImpl;
|
|
|
|
namespace Chunk {
|
|
|
|
struct Data {
|
|
/* 0000 */ uint8_t unk_0000[0x8000];
|
|
};
|
|
|
|
}
|
|
|
|
struct CacheChunk {
|
|
/* 0000 */ Chunk::Data* m_data;
|
|
/* 0004 */ uint32_t m_size;
|
|
/* 0008 */ int32_t m_time;
|
|
/* 000C */ int32_t m_refCount;
|
|
};
|
|
|
|
struct CacheData : public TSHashObject<struct CacheData, HASHKEY_NONE> {
|
|
/* 0018 */ SFileImpl* m_file;
|
|
/* 001C */ CacheChunk* m_chunks;
|
|
/* 0020 */ uint32_t unk_0020;
|
|
/* 0024 */ uint32_t unk_0024;
|
|
/* 0028 */ uint32_t unk_0028;
|
|
/* 002C */ uint32_t m_chunkCount;
|
|
/* 0030 */ uint32_t unk_0030;
|
|
/* 0034 */ int32_t m_refCount;
|
|
/* 0038 */ void* unk_0038;
|
|
|
|
~CacheData();
|
|
};
|
|
|
|
struct CacheChunkRef {
|
|
/* 0000 */ struct CacheData* m_cacheData;
|
|
/* 0004 */ uint32_t m_index;
|
|
};
|
|
|
|
class CacheChunkRecycler : public CDataRecycler {
|
|
public:
|
|
CacheChunkRecycler(uint32_t nodesPerBlock, int32_t maxNodes);
|
|
virtual ~CacheChunkRecycler();
|
|
virtual void Clear();
|
|
};
|
|
|
|
class SoundCache {
|
|
public:
|
|
/* 0000 */ const char* m_using;
|
|
/* 0004 */ TSHashTable<struct CacheData, HASHKEY_NONE> m_table;
|
|
/* 002C */ uint32_t m_bytes;
|
|
/* 0030 */ uint32_t m_maxBytes;
|
|
/* 0034 */ uint32_t m_lastUpdate;
|
|
/* 0038 */ uint32_t m_startTime;
|
|
|
|
SoundCache();
|
|
~SoundCache();
|
|
void Clear();
|
|
void Initialize();
|
|
void Purge(uint32_t bytes);
|
|
void Update();
|
|
};
|
|
|
|
extern SoundCache g_soundCache;
|
|
|
|
#endif
|