mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(component): fully initialize CACHEENTRY
This commit is contained in:
parent
46e5ddca20
commit
872405e6f1
@ -5,6 +5,23 @@ TSHashTable<CACHEENTRY, HASHKEY_NONE> s_cacheTable;
|
||||
HASHKEY_NONE s_cacheKey;
|
||||
uint32_t* s_entryHeap;
|
||||
|
||||
TCTEXTUREINFO::TCTEXTUREINFO() {
|
||||
this->width = 0;
|
||||
this->height = 0;
|
||||
this->mipCount = 0;
|
||||
this->alphaSize = 0;
|
||||
this->opaque = 1;
|
||||
}
|
||||
|
||||
CACHEENTRY::CACHEENTRY() {
|
||||
this->m_asyncObject = nullptr;
|
||||
this->m_fileName[0] = '\0';
|
||||
this->m_refCount = 0;
|
||||
this->m_memHandle = 0;
|
||||
this->bitsB0 = 0;
|
||||
this->m_loaded = 0;
|
||||
}
|
||||
|
||||
void CACHEENTRY::AddRef() {
|
||||
this->m_refCount++;
|
||||
}
|
||||
|
||||
@ -8,21 +8,27 @@ class CAsyncObject;
|
||||
struct TCTEXTUREINFO {
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint32_t mipCount : 8;
|
||||
uint32_t alphaSize: 8;
|
||||
uint32_t opaque : 1;
|
||||
uint32_t pad : 15;
|
||||
uint32_t mipCount : 8;
|
||||
uint32_t alphaSize : 8;
|
||||
uint32_t opaque : 1;
|
||||
uint32_t pad : 15;
|
||||
|
||||
TCTEXTUREINFO();
|
||||
};
|
||||
|
||||
class CACHEENTRY : public TSHashObject<CACHEENTRY, HASHKEY_NONE> {
|
||||
public:
|
||||
// Member variables
|
||||
CAsyncObject* m_asyncObject = nullptr;
|
||||
CAsyncObject* m_asyncObject;
|
||||
TCTEXTUREINFO m_info;
|
||||
char m_fileName[128];
|
||||
uint32_t m_refCount = 0;
|
||||
uint32_t m_memHandle = 0;
|
||||
uint32_t m_refCount;
|
||||
uint32_t m_memHandle;
|
||||
uint32_t bitsB0 : 20;
|
||||
uint32_t m_loaded : 1;
|
||||
|
||||
// Member functions
|
||||
CACHEENTRY();
|
||||
void AddRef();
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user