From ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 24 Jan 2021 13:42:45 +0300 Subject: sync --- src/rw/TxdStore.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/rw/TxdStore.h') diff --git a/src/rw/TxdStore.h b/src/rw/TxdStore.h index 937fd1b7..31fcf87f 100644 --- a/src/rw/TxdStore.h +++ b/src/rw/TxdStore.h @@ -4,7 +4,8 @@ struct TxdDef { RwTexDictionary *texDict; - int refCount; + int16 refCount; + int16 refCountGu; char name[20]; }; @@ -26,13 +27,19 @@ public: static void Create(int slot); static int GetNumRefs(int slot); static void AddRef(int slot); + static void AddRefEvenIfNotInMemory(int slot); + static void AddRefGu(int slot); static void RemoveRef(int slot); + static void RemoveRefGu(int slot); static void RemoveRefWithoutDelete(int slot); static bool LoadTxd(int slot, RwStream *stream); + static bool LoadTxd(int slot, void *data, void *chunk); static bool LoadTxd(int slot, const char *filename); static bool StartLoadTxd(int slot, RwStream *stream); static bool FinishLoadTxd(int slot, RwStream *stream); - static void RemoveTxd(int slot); + static void RemoveTxd(int slot, bool notChunk = false); + + static void Load(RwTexDictionary *stored, CPool *pool); static TxdDef *GetSlot(int slot) { assert(slot >= 0); -- cgit v1.2.3