mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Refactor LegoContainer (#587)
* Refactor LegoContainer * Fix name * Fix build * Refactor some includes * Update STL compat * Fix * Fix annotations
This commit is contained in:

committed by
GitHub

parent
9d8820ee06
commit
6b1c75ab5a
43
LEGO1/lego/sources/misc/legocontainer.cpp
Normal file
43
LEGO1/lego/sources/misc/legocontainer.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "legocontainer.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoContainerInfo<LegoTexture>, 0x10);
|
||||
// DECOMP_SIZE_ASSERT(LegoContainer<LegoTexture>, 0x18);
|
||||
DECOMP_SIZE_ASSERT(LegoTextureContainer, 0x24);
|
||||
|
||||
// FUNCTION: LEGO1 0x10099870
|
||||
LegoTextureContainer::~LegoTextureContainer()
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100998e0
|
||||
LegoTextureInfo* LegoTextureContainer::Create(undefined* p_und)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10099cc0
|
||||
void LegoTextureContainer::Destroy(LegoTextureInfo* p_data)
|
||||
{
|
||||
if (p_data == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
LegoTextureList::iterator it;
|
||||
for (it = m_list.begin(); it != m_list.end(); it++) {
|
||||
#else
|
||||
for (LegoTextureList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
#endif
|
||||
if (((*it).first) == p_data) {
|
||||
// TODO: Element type
|
||||
(*it).second = 0;
|
||||
|
||||
if (p_data->m_texture->Release() == TRUE) {
|
||||
delete p_data;
|
||||
m_list.erase(it);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user