mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Apply suggestions
This commit is contained in:
parent
b0eec6a029
commit
92c19007b8
@ -2,11 +2,9 @@
|
|||||||
#define ACT1STATE_H
|
#define ACT1STATE_H
|
||||||
|
|
||||||
#include "legostate.h"
|
#include "legostate.h"
|
||||||
#include "misc/legotexture.h"
|
#include "legoutil.h"
|
||||||
#include "roi/legoroi.h"
|
#include "roi/legoroi.h"
|
||||||
|
|
||||||
class LegoTexture;
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7028
|
// VTABLE: LEGO1 0x100d7028
|
||||||
// SIZE 0x26c
|
// SIZE 0x26c
|
||||||
class Act1State : public LegoState {
|
class Act1State : public LegoState {
|
||||||
@ -56,7 +54,23 @@ class Act1State : public LegoState {
|
|||||||
|
|
||||||
inline void SetName(const char* p_name) { m_name = p_name; }
|
inline void SetName(const char* p_name) { m_name = p_name; }
|
||||||
inline const MxString* GetName() const { return &m_name; }
|
inline const MxString* GetName() const { return &m_name; }
|
||||||
MxS32 Serialize(LegoFile* p_file);
|
// FUNCTION: LEGO1 0x100344d0
|
||||||
|
MxS32 Serialize(LegoFile* p_file)
|
||||||
|
{
|
||||||
|
if (p_file->IsWriteMode()) {
|
||||||
|
p_file->FUN_10006030(m_name);
|
||||||
|
p_file->WriteVector3(m_point1);
|
||||||
|
p_file->WriteVector3(m_point2);
|
||||||
|
p_file->WriteVector3(m_point3);
|
||||||
|
}
|
||||||
|
else if (p_file->IsReadMode()) {
|
||||||
|
p_file->ReadString(&m_name);
|
||||||
|
p_file->ReadVector3(&m_point1);
|
||||||
|
p_file->ReadVector3(&m_point2);
|
||||||
|
p_file->ReadVector3(&m_point3);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxString m_name; // 0x00
|
MxString m_name; // 0x00
|
||||||
@ -65,19 +79,6 @@ class Act1State : public LegoState {
|
|||||||
Mx3DPointFloat m_point3; // 0x38
|
Mx3DPointFloat m_point3; // 0x38
|
||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x14
|
|
||||||
class NamedTexture {
|
|
||||||
public:
|
|
||||||
~NamedTexture() { delete m_texture; }
|
|
||||||
// FUNCTION: LEGO1 0x1003f920
|
|
||||||
const MxString* GetName() const { return &m_name; }
|
|
||||||
LegoTexture* GetTexture() { return m_texture; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
MxString m_name; // 0x00
|
|
||||||
LegoTexture* m_texture; // 0x4
|
|
||||||
};
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxS32* m_unk0x008; // 0x008
|
MxS32* m_unk0x008; // 0x008
|
||||||
// FIXME: count for m_unk0x008
|
// FIXME: count for m_unk0x008
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
#define LEGOUTIL_H
|
#define LEGOUTIL_H
|
||||||
|
|
||||||
#include "extra.h"
|
#include "extra.h"
|
||||||
|
#include "misc/legostorage.h"
|
||||||
|
#include "misc/legotexture.h"
|
||||||
|
#include "mxstring.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
#include "mxutil.h"
|
#include "mxutil.h"
|
||||||
|
|
||||||
@ -11,6 +14,21 @@ class MxAtomId;
|
|||||||
class LegoEntity;
|
class LegoEntity;
|
||||||
class LegoAnimPresenter;
|
class LegoAnimPresenter;
|
||||||
|
|
||||||
|
class LegoTexture;
|
||||||
|
|
||||||
|
// SIZE 0x14
|
||||||
|
class NamedTexture {
|
||||||
|
public:
|
||||||
|
~NamedTexture() { delete m_texture; }
|
||||||
|
// FUNCTION: LEGO1 0x1003f920
|
||||||
|
const MxString* GetName() const { return &m_name; }
|
||||||
|
LegoTexture* GetTexture() { return m_texture; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
MxString m_name; // 0x00
|
||||||
|
LegoTexture* m_texture; // 0x4
|
||||||
|
};
|
||||||
|
|
||||||
void FUN_1003e050(LegoAnimPresenter* p_presenter);
|
void FUN_1003e050(LegoAnimPresenter* p_presenter);
|
||||||
Extra::ActionType MatchActionString(const char*);
|
Extra::ActionType MatchActionString(const char*);
|
||||||
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
||||||
@ -20,5 +38,8 @@ void FUN_1003ef00(MxBool);
|
|||||||
void SetAppCursor(WPARAM p_wparam);
|
void SetAppCursor(WPARAM p_wparam);
|
||||||
MxBool FUN_1003ef60();
|
MxBool FUN_1003ef60();
|
||||||
MxBool RemoveFromWorld(MxAtomId& p_atomId1, MxS32 p_id1, MxAtomId& p_atomId2, MxS32 p_id2);
|
MxBool RemoveFromWorld(MxAtomId& p_atomId1, MxS32 p_id1, MxAtomId& p_atomId2, MxS32 p_id2);
|
||||||
|
NamedTexture* ReadNamedTexture(LegoFile* p_file);
|
||||||
|
void FUN_1003f540(LegoFile* p_file, const char* p_filename);
|
||||||
|
void WriteNamedTexture(LegoFile* p_file, NamedTexture* p_texture);
|
||||||
|
|
||||||
#endif // LEGOUTIL_H
|
#endif // LEGOUTIL_H
|
||||||
|
|||||||
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Act1State, 0x26c)
|
DECOMP_SIZE_ASSERT(Act1State, 0x26c)
|
||||||
DECOMP_SIZE_ASSERT(Act1State::NamedPlane, 0x4c)
|
DECOMP_SIZE_ASSERT(Act1State::NamedPlane, 0x4c)
|
||||||
DECOMP_SIZE_ASSERT(Act1State::NamedTexture, 0x14)
|
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
Act1State::NamedTexture* ReadNamedTexture(LegoFile* p_file);
|
|
||||||
void WriteNamedTexture(LegoFile* p_file, Act1State::NamedTexture* p_texture);
|
|
||||||
void FUN_1003f540(LegoFile* p_file, const char* p_filename);
|
|
||||||
|
|
||||||
// GLOBAL: ISLE 0x100f37f0
|
// GLOBAL: ISLE 0x100f37f0
|
||||||
MxS32 g_unk0x100f37f0[] = {
|
MxS32 g_unk0x100f37f0[] = {
|
||||||
@ -178,24 +172,6 @@ MxResult Act1State::VTable0x1c(LegoFile* p_legoFile)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100344d0
|
|
||||||
MxS32 Act1State::NamedPlane::Serialize(LegoFile* p_file)
|
|
||||||
{
|
|
||||||
if (p_file->IsWriteMode()) {
|
|
||||||
p_file->FUN_10006030(m_name);
|
|
||||||
p_file->WriteVector3(m_point1);
|
|
||||||
p_file->WriteVector3(m_point2);
|
|
||||||
p_file->WriteVector3(m_point3);
|
|
||||||
}
|
|
||||||
else if (p_file->IsReadMode()) {
|
|
||||||
p_file->ReadString(&m_name);
|
|
||||||
p_file->ReadVector3(&m_point1);
|
|
||||||
p_file->ReadVector3(&m_point2);
|
|
||||||
p_file->ReadVector3(&m_point3);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100346d0
|
// FUNCTION: LEGO1 0x100346d0
|
||||||
MxBool Act1State::SetFlag()
|
MxBool Act1State::SetFlag()
|
||||||
{
|
{
|
||||||
@ -267,21 +243,3 @@ void Act1State::FUN_10034d00()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003f3b0
|
|
||||||
Act1State::NamedTexture* ReadNamedTexture(LegoFile* p_file)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003f540
|
|
||||||
void FUN_1003f540(LegoFile* p_file, const char* p_filename)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003f8a0
|
|
||||||
void WriteNamedTexture(LegoFile* p_file, Act1State::NamedTexture* p_texture)
|
|
||||||
{
|
|
||||||
p_file->FUN_10006030(*p_texture->GetName());
|
|
||||||
p_texture->GetTexture()->Write(p_file);
|
|
||||||
}
|
|
||||||
|
|||||||
@ -10,6 +10,8 @@
|
|||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
DECOMP_SIZE_ASSERT(NamedTexture, 0x14)
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003e050
|
// STUB: LEGO1 0x1003e050
|
||||||
void FUN_1003e050(LegoAnimPresenter* p_presenter)
|
void FUN_1003e050(LegoAnimPresenter* p_presenter)
|
||||||
{
|
{
|
||||||
@ -253,3 +255,21 @@ MxBool FUN_1003ef60()
|
|||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1003f3b0
|
||||||
|
NamedTexture* ReadNamedTexture(LegoFile* p_file)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1003f540
|
||||||
|
void FUN_1003f540(LegoFile* p_file, const char* p_filename)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1003f8a0
|
||||||
|
void WriteNamedTexture(LegoFile* p_file, NamedTexture* p_texture)
|
||||||
|
{
|
||||||
|
p_file->FUN_10006030(*p_texture->GetName());
|
||||||
|
p_texture->GetTexture()->Write(p_file);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user