Implement Score (#230)

* Implement Score

* Update mxomni.cpp

Fix case of OFFSET comment.

* Fix DeleteObjects

* Apply changes (see comment)

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Nathan M Gilbert
2023-10-23 07:16:21 -04:00
committed by GitHub
parent 724c953947
commit 4cc6b9b8ec
38 changed files with 923 additions and 32 deletions

73
LEGO1/gifmanager.h Normal file
View File

@@ -0,0 +1,73 @@
#ifndef GIFMANAGER_H
#define GIFMANAGER_H
#include "decomp.h"
#include "mxtypes.h"
#include <ddraw.h>
#include <d3drmobj.h>
struct GifData
{
public:
const char *m_name;
LPDIRECTDRAWSURFACE m_surface;
LPDIRECTDRAWPALETTE m_palette;
LPDIRECT3DRMTEXTURE2 m_texture;
MxU8 *m_data;
};
struct GifMapEntry
{
public:
GifMapEntry *m_right;
GifMapEntry *m_parent;
GifMapEntry *m_left;
const char *m_key;
GifData *m_value;
};
class GifMap
{
public:
GifMapEntry *FindNode(const char *&string);
inline GifData *Get(const char *string) {
GifData *ret = NULL;
GifMapEntry *entry = FindNode(string);
if (((m_unk4 == entry || strcmp(string, entry->m_key) > 0) ? m_unk4 : entry) != entry)
ret = entry->m_value;
return ret;
}
undefined4 m_unk0;
GifMapEntry *m_unk4;
};
// VTABLE 0x100d86d4
class GifManagerBase
{
public:
// OFFSET: LEGO1 0x1005a310 STUB
virtual ~GifManagerBase() {} // vtable+00
inline GifData *Get(const char *name) { return m_unk8.Get(name); }
protected:
undefined4 m_unk0;
undefined4 m_unk4;
GifMap m_unk8;
};
// VTABLE 0x100d86fc
class GifManager : public GifManagerBase
{
public:
// OFFSET: LEGO1 0x1005a580 STUB
virtual ~GifManager() {} // vtable+00
protected:
undefined m_unk[0x1c];
};
#endif // GIFMANAGER_H