2023-10-23 07:16:21 -04:00
|
|
|
#ifndef GIFMANAGER_H
|
|
|
|
#define GIFMANAGER_H
|
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
#include "compat.h"
|
2023-10-23 07:16:21 -04:00
|
|
|
#include "decomp.h"
|
2024-01-19 15:23:12 -05:00
|
|
|
#include "mxstl/stlcompat.h"
|
2023-10-23 07:16:21 -04:00
|
|
|
#include "mxtypes.h"
|
|
|
|
|
|
|
|
#include <d3drmobj.h>
|
2023-10-24 19:38:27 -04:00
|
|
|
#include <ddraw.h>
|
2023-10-23 07:16:21 -04:00
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
#pragma warning(disable : 4237)
|
|
|
|
|
|
|
|
// SIZE 0x14
|
2023-10-24 19:38:27 -04:00
|
|
|
struct GifData {
|
2023-10-23 07:16:21 -04:00
|
|
|
public:
|
2024-01-19 15:23:12 -05:00
|
|
|
char* m_name; // 0x00
|
|
|
|
LPDIRECTDRAWSURFACE m_surface; // 0x04
|
|
|
|
LPDIRECTDRAWPALETTE m_palette; // 0x08
|
|
|
|
LPDIRECT3DRMTEXTURE2 m_texture; // 0x0c
|
|
|
|
MxU8* m_data; // 0x10
|
2023-10-23 07:16:21 -04:00
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
~GifData();
|
2023-10-23 07:16:21 -04:00
|
|
|
};
|
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
struct GifMapComparator {
|
|
|
|
bool operator()(const char* const& p_key0, const char* const& p_key1) const { return strcmp(p_key0, p_key1) > 0; }
|
|
|
|
};
|
2023-10-23 07:16:21 -04:00
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
// SIZE 0x10
|
|
|
|
class GifMap : public map<const char*, GifData*, GifMapComparator> {
|
|
|
|
// SYNTHETIC: LEGO1 0x1005a400
|
|
|
|
// GifMap::~GifMap
|
2023-10-23 07:16:21 -04:00
|
|
|
};
|
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
typedef list<GifData*> GifList;
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d86d4
|
2024-01-19 15:23:12 -05:00
|
|
|
// SIZE 0x18
|
2023-10-24 19:38:27 -04:00
|
|
|
class GifManagerBase {
|
2023-10-23 07:16:21 -04:00
|
|
|
public:
|
2024-01-19 15:23:12 -05:00
|
|
|
// FUNCTION: LEGO1 0x1005b660
|
|
|
|
virtual ~GifManagerBase()
|
|
|
|
{
|
|
|
|
GifMap::iterator it;
|
|
|
|
for (it = m_map.begin(); it != m_map.end(); it++) {
|
|
|
|
// DECOMP: Use of const_cast here matches ~ViewLODListManager from 96 source.
|
|
|
|
const char* const& key = (*it).first;
|
|
|
|
delete[] const_cast<char*>(key);
|
|
|
|
|
|
|
|
if (m_ownership) {
|
|
|
|
delete (*it).second; // GifData*
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
inline GifData* Get(const char* p_name)
|
|
|
|
{
|
|
|
|
GifMap::iterator it = m_map.find(p_name);
|
|
|
|
if (it != m_map.end()) {
|
|
|
|
return (*it).second;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
2024-01-18 08:34:14 -05:00
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x1005a310
|
|
|
|
// GifManagerBase::`scalar deleting destructor'
|
2023-10-23 07:16:21 -04:00
|
|
|
|
|
|
|
protected:
|
2024-01-19 15:23:12 -05:00
|
|
|
MxBool m_ownership; // 0x04
|
|
|
|
GifMap m_map; // 0x08
|
2023-10-23 07:16:21 -04:00
|
|
|
};
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d86fc
|
2024-01-19 15:23:12 -05:00
|
|
|
// SIZE 0x24
|
2023-10-24 19:38:27 -04:00
|
|
|
class GifManager : public GifManagerBase {
|
2023-10-23 07:16:21 -04:00
|
|
|
public:
|
2024-01-29 17:30:20 -05:00
|
|
|
GifManager() { m_ownership = TRUE; }
|
2024-01-18 08:34:14 -05:00
|
|
|
virtual ~GifManager() override;
|
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x1005a580
|
|
|
|
// GifManager::`scalar deleting destructor'
|
2023-10-23 07:16:21 -04:00
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
void FUN_10099cc0(GifData* p_data);
|
|
|
|
|
2023-10-23 07:16:21 -04:00
|
|
|
protected:
|
2024-01-19 15:23:12 -05:00
|
|
|
GifList m_list; // 0x18
|
2023-10-23 07:16:21 -04:00
|
|
|
};
|
|
|
|
|
2024-01-19 15:23:12 -05:00
|
|
|
// TEMPLATE: LEGO1 0x10059c50
|
|
|
|
// allocator<GifData *>::_Charalloc
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
// TEMPLATE: LEGO1 0x10001cc0
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Lbound
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1004f9b0
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Insert
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059c70
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Color
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059c80
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Left
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059c90
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Parent
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059ca0
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Right
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059cb0
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::~_Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059d80
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::iterator::_Inc
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10059dc0
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::erase
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1005a210
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Erase
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1005a250
|
|
|
|
// list<GifData *,allocator<GifData *> >::~list<GifData *,allocator<GifData *> >
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1005a2c0
|
|
|
|
// map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::~map<char const *,GifData *,GifMapComparator,allocator<GifData *> >
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1005a450
|
|
|
|
// Map<char const *,GifData *,GifMapComparator>::~Map<char const *,GifData *,GifMapComparator>
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x1005a5a0
|
|
|
|
// List<GifData *>::~List<GifData *>
|
|
|
|
|
|
|
|
// GLOBAL: LEGO1 0x100f0100
|
|
|
|
// _Tree<char const *,pair<char const * const,GifData *>,map<char const *,GifData *,GifMapComparator,allocator<GifData *> >::_Kfn,GifMapComparator,allocator<GifData *> >::_Nil
|
|
|
|
// clang-format on
|
|
|
|
|
2023-10-25 14:51:59 -04:00
|
|
|
#endif // GIFMANAGER_H
|