Merge branch 'master' into order-tool

This commit is contained in:
MS 2023-10-29 18:16:35 -04:00 committed by GitHub
commit a9300dd605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
419 changed files with 15074 additions and 11956 deletions

26
.clang-format Normal file
View File

@ -0,0 +1,26 @@
BasedOnStyle: Microsoft
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BracedInitializerIndentWidth: 4
BraceWrapping:
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterStruct: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
IncludeBlocks: Regroup
IndentAccessModifiers: false
IndentWidth: 4
InsertNewlineAtEOF: true
PointerAlignment: Left
SpaceAfterCStyleCast: true
TabWidth: 4
UseTab: ForContinuationAndIndentation

View File

@ -1,7 +1,13 @@
root = true
[*.{cpp,h,py,txt,editorconfig}]
[*.{py,txt,editorconfig}]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
trim_trailing_whitespace = true
[*.{cpp,h}]
indent_style = tab
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true

20
.github/workflows/format.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Format
on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format
run: |
pipx run "clang-format>=17,<18" \
--Werror \
--dry-run \
--style=file \
ISLE/*.cpp ISLE/*.h \
LEGO1/*.cpp LEGO1/*.h \
LEGO1/realtime/*.cpp LEGO1/realtime/*.h

14
.gitignore vendored
View File

@ -2,8 +2,20 @@ Debug/
Release/
*.ncb
/.vs
/.vscode
/.idea
.env
.venv
env/
venv/
ENV/
VENV/
env.bak/
venv.bak/
ISLE.EXE
LEGO1.DLL
build/
*.swp
*.pyc
LEGO1PROGRESS.HTML
LEGO1PROGRESS.SVG
*.pyc

54
3rdparty/smk/smk.h vendored Normal file
View File

@ -0,0 +1,54 @@
#ifndef SMK_H
#define SMK_H
struct SmackSum {
unsigned long m_totalTime;
unsigned long m_ms100PerFrame;
unsigned long m_totalOpenTime;
unsigned long m_totalFrames;
unsigned long m_skippedFrames;
unsigned long m_totalBlitTime;
unsigned long m_totalReadTime;
unsigned long m_totalDecompressTime;
unsigned long m_totalBackReadTime;
unsigned long m_totalReadSpeed;
unsigned long m_slowestFrameTime;
unsigned long m_slowestTwoFrameTime;
unsigned long m_slowestFrameNum;
unsigned long m_slowestTwoFrameNum;
unsigned long m_averageFrameSize;
unsigned long m_highestOneSecRate;
unsigned long m_highestOneSecFrame;
unsigned long m_highestMemAmount;
unsigned long m_totalExtraMemory;
unsigned long m_highestExtraUsed;
};
struct Smack {
unsigned long m_version;
unsigned long m_width;
unsigned long m_height;
unsigned long m_frames;
unsigned long m_msInAFrame;
unsigned long m_smkType;
unsigned long m_audioTrackSize[7];
unsigned long m_treeSize;
unsigned long m_codeSize;
unsigned long m_abSize;
unsigned long m_detailSize;
unsigned long m_typeSize;
unsigned long m_trackType[7];
unsigned long m_extra;
unsigned long m_newPalette;
unsigned char m_palette[772];
unsigned long m_frameNum;
unsigned long m_lastRectX;
unsigned long m_lastRectY;
unsigned long m_lastRectW;
unsigned long m_lastRectH;
unsigned long m_openFlags;
unsigned long m_leftOfs;
unsigned long m_topOfs;
};
#endif // SMK_H

1085
3rdparty/vec/vec.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@ add_library(lego1 SHARED
LEGO1/gasstation.cpp
LEGO1/gasstationentity.cpp
LEGO1/gasstationstate.cpp
LEGO1/gifmanager.cpp
LEGO1/helicopter.cpp
LEGO1/helicopterstate.cpp
LEGO1/historybook.cpp
@ -64,6 +65,7 @@ add_library(lego1 SHARED
LEGO1/legocontrolmanager.cpp
LEGO1/legoentity.cpp
LEGO1/legoentitypresenter.cpp
LEGO1/legoeventnotificationparam.cpp
LEGO1/legoflctexturepresenter.cpp
LEGO1/legofullscreenmovie.cpp
LEGO1/legogamestate.cpp
@ -176,6 +178,7 @@ add_library(lego1 SHARED
LEGO1/mxticklemanager.cpp
LEGO1/mxtimer.cpp
LEGO1/mxtransitionmanager.cpp
LEGO1/mxtype17notificationparam.cpp
LEGO1/mxvariable.cpp
LEGO1/mxvariabletable.cpp
LEGO1/mxvector.cpp
@ -196,7 +199,8 @@ add_library(lego1 SHARED
LEGO1/racestate.cpp
LEGO1/radio.cpp
LEGO1/radiostate.cpp
LEGO1/realtimeview.cpp
LEGO1/realtime/realtime.cpp
LEGO1/realtime/realtimeview.cpp
LEGO1/registrationbook.cpp
LEGO1/score.cpp
LEGO1/scorestate.cpp
@ -205,6 +209,13 @@ add_library(lego1 SHARED
LEGO1/towtrackmissionstate.cpp
LEGO1/viewmanager.cpp
)
if (MINGW)
target_compile_definitions(lego1 PRIVATE DIRECTINPUT_VERSION=0x0500)
endif()
# Additional include directories
include_directories("${CMAKE_SOURCE_DIR}/3rdparty/vec")
include_directories("${CMAKE_SOURCE_DIR}/3rdparty/smk")
if (ISLE_USE_SMARTHEAP)
add_library(SmartHeap::SmartHeap STATIC IMPORTED)

View File

@ -25,7 +25,12 @@ This repository currently has only one goal: accuracy to the original executable
In general, we're not exhaustively strict about coding style, but there are some preferable guidelines to follow that have been adopted from what we know about the original codebase:
- Indent: 2 spaces
### Formatting
We are currently using [clang-format](https://clang.llvm.org/docs/ClangFormat.html) with a configuration file that aims to replicate the code formatting employed by the original developers. There are [integrations](https://clang.llvm.org/docs/ClangFormat.html#vim-integration) available for most editors and IDEs. The required `clang-format` version is `17.x`.
### Naming conventions
- `PascalCase` for classes, function names, and enumerations.
- `m_camelCase` for member variables.
- `g_camelCase` for global variables.

View File

@ -1,7 +1,7 @@
#include "define.h"
// 0x410030
IsleApp *g_isle = 0;
IsleApp* g_isle = 0;
// 0x410034
unsigned char g_mousedown = 0;

View File

@ -6,7 +6,7 @@
class IsleApp;
extern IsleApp *g_isle;
extern IsleApp* g_isle;
extern int g_closed;
// 0x4101c4
#define WNDCLASS_NAME "Lego Island MainNoM App"

File diff suppressed because it is too large Load Diff

View File

@ -1,76 +1,83 @@
#ifndef ISLEAPP_H
#define ISLEAPP_H
#include <windows.h>
#include "mxtypes.h"
#include "mxvideoparam.h"
class IsleApp
{
#include <windows.h>
class IsleApp {
public:
IsleApp();
~IsleApp();
IsleApp();
~IsleApp();
void Close();
void Close();
BOOL SetupLegoOmni();
void SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
BOOL using8bit, BOOL using16bit, BOOL param_6, BOOL param_7,
BOOL wideViewAngle, char *deviceId);
MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine);
BOOL SetupLegoOmni();
void SetupVideoFlags(
BOOL fullScreen,
BOOL flipSurfaces,
BOOL backBuffers,
BOOL using8bit,
BOOL using16bit,
BOOL param_6,
BOOL param_7,
BOOL wideViewAngle,
char* deviceId
);
MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine);
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize);
int ReadRegBool(LPCSTR name, BOOL *out);
int ReadRegInt(LPCSTR name, int *out);
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize);
int ReadRegBool(LPCSTR name, BOOL* out);
int ReadRegInt(LPCSTR name, int* out);
void LoadConfig();
void Tick(BOOL sleepIfNotNextFrame);
void SetupCursor(WPARAM wParam);
void LoadConfig();
void Tick(BOOL sleepIfNotNextFrame);
void SetupCursor(WPARAM wParam);
// private:
// 0
LPSTR m_hdPath;
LPSTR m_cdPath;
LPSTR m_deviceId;
LPSTR m_savePath;
// private:
// 0
LPSTR m_hdPath;
LPSTR m_cdPath;
LPSTR m_deviceId;
LPSTR m_savePath;
// 10
BOOL m_fullScreen;
BOOL m_flipSurfaces;
BOOL m_backBuffersInVram;
BOOL m_using8bit;
// 10
BOOL m_fullScreen;
BOOL m_flipSurfaces;
BOOL m_backBuffersInVram;
BOOL m_using8bit;
// 20
BOOL m_using16bit;
int m_unk24;
BOOL m_use3dSound;
BOOL m_useMusic;
// 20
BOOL m_using16bit;
int m_unk24;
BOOL m_use3dSound;
BOOL m_useMusic;
// 30
BOOL m_useJoystick;
int m_joystickIndex;
BOOL m_wideViewAngle;
int m_islandQuality;
// 30
BOOL m_useJoystick;
int m_joystickIndex;
BOOL m_wideViewAngle;
int m_islandQuality;
// 40
int m_islandTexture;
int m_gameStarted;
MxLong m_frameDelta;
// 40
int m_islandTexture;
int m_gameStarted;
MxLong m_frameDelta;
// 4c
MxVideoParam m_videoParam;
// 4c
MxVideoParam m_videoParam;
// 70
BOOL m_windowActive;
HWND m_windowHandle;
BOOL m_drawCursor;
HCURSOR m_cursorArrow;
// 70
BOOL m_windowActive;
HWND m_windowHandle;
BOOL m_drawCursor;
HCURSOR m_cursorArrow;
// 80
HCURSOR m_cursorBusy;
HCURSOR m_cursorNo;
HCURSOR m_cursorCurrent;
// 80
HCURSOR m_cursorBusy;
HCURSOR m_cursorNo;
HCURSOR m_cursorCurrent;
};
#endif // ISLEAPP_H

View File

@ -3,6 +3,5 @@
// OFFSET: LEGO1 0x100334b0 STUB
Act1State::Act1State()
{
// TODO
// TODO
}

View File

@ -5,23 +5,22 @@
// VTABLE 0x100d7028
// SIZE 0x26c
class Act1State : public LegoState
{
class Act1State : public LegoState {
public:
Act1State();
Act1State();
// OFFSET: LEGO1 0x100338a0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0154
return "Act1State";
};
// OFFSET: LEGO1 0x100338a0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0154
return "Act1State";
};
// OFFSET: LEGO1 0x100338b0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Act1State::ClassName()) || LegoState::IsA(name);
};
// OFFSET: LEGO1 0x100338b0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Act1State::ClassName()) || LegoState::IsA(name);
};
};
#endif // ACT1STATE_H

View File

@ -3,27 +3,27 @@
// OFFSET: LEGO1 0x1007a2b0 STUB
Act2Brick::Act2Brick()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x1007a470 STUB
Act2Brick::~Act2Brick()
{
// TODO
// TODO
}
// STUB OFFSET: LEGO1 0x1007a8c0 STUB
MxLong Act2Brick::Notify(MxParam &p)
MxLong Act2Brick::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}
// OFFSET: LEGO1 0x1007a7f0 STUB
MxResult Act2Brick::Tickle()
{
// TODO
// TODO
return 0;
return SUCCESS;
}

View File

@ -5,28 +5,26 @@
// VTABLE 0x100d9b60
// SIZE 0x194
class Act2Brick : public LegoPathActor
{
class Act2Brick : public LegoPathActor {
public:
Act2Brick();
virtual ~Act2Brick() override; // vtable+0x0
Act2Brick();
virtual ~Act2Brick() override; // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x08
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x08
// OFFSET: LEGO1 0x1007a360
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0438
return "Act2Brick";
}
// OFFSET: LEGO1 0x1007a370
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(Act2Brick::ClassName(), name) || LegoEntity::IsA(name);
}
// OFFSET: LEGO1 0x1007a360
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0438
return "Act2Brick";
}
// OFFSET: LEGO1 0x1007a370
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(Act2Brick::ClassName(), name) || LegoEntity::IsA(name);
}
};
#endif // ACT2BRICK_H

View File

@ -1,9 +1,9 @@
#include "act2policestation.h"
// OFFSET: LEGO1 0x1004e0e0 STUB
MxLong Act2PoliceStation::Notify(MxParam &p)
MxLong Act2PoliceStation::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,23 +5,22 @@
// VTABLE 0x100d53a8
// SIZE 0x68
class Act2PoliceStation : public LegoEntity
{
class Act2PoliceStation : public LegoEntity {
public:
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
// OFFSET: LEGO1 0x1000e200
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03fc
return "Act2PoliceStation";
}
// OFFSET: LEGO1 0x1000e200
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03fc
return "Act2PoliceStation";
}
// OFFSET: LEGO1 0x1000e210
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Act2PoliceStation::ClassName()) || LegoEntity::IsA(name);
}
// OFFSET: LEGO1 0x1000e210
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Act2PoliceStation::ClassName()) || LegoEntity::IsA(name);
}
};
#endif // ACT2POLICESTATION_H

View File

@ -1,13 +1,15 @@
#include "act3.h"
DECOMP_SIZE_ASSERT(Act3, 0x4274)
// OFFSET: LEGO1 0x10072270 STUB
Act3::Act3()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100726a0 STUB
Act3::~Act3()
{
// TODO
// TODO
}

View File

@ -5,27 +5,31 @@
// VTABLE 0x100d9628
// SIZE 0x4274
class Act3 : public LegoWorld
{
class Act3 : public LegoWorld {
public:
Act3();
Act3();
virtual ~Act3() override; // vtable+00
virtual ~Act3() override; // vtable+00
// OFFSET: LEGO1 0x10072510
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f013c
return "Act3";
}
// OFFSET: LEGO1 0x10072510
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f013c
return "Act3";
}
// OFFSET: LEGO1 0x10072520
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Act3::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x10072520
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Act3::ClassName()) || LegoWorld::IsA(name);
}
inline void SetUnkown420c(MxEntity* p_entity) { m_unk420c = p_entity; }
protected:
undefined m_unkf8[0x4114];
MxEntity* m_unk420c;
undefined m_unk4210[0x64];
};
#endif // ACT3_H

View File

@ -3,16 +3,14 @@
// FIXME: Uncertain location. There are three vtables which eventually call this
// class' ClassName() function, but none of them call it directly.
class Act3Actor
{
class Act3Actor {
public:
// OFFSET: LEGO1 0x100431b0
inline virtual const char *ClassName() override
{
// 0x100f03ac
return "Act3Actor";
}
// OFFSET: LEGO1 0x100431b0
inline virtual const char* ClassName() override
{
// 0x100f03ac
return "Act3Actor";
}
};
#endif // ACT3ACTOR_H

View File

@ -4,15 +4,14 @@
#include "legoanimactor.h"
// VTABLE 0x100d7920
class Act3Shark : public LegoAnimActor
{
class Act3Shark : public LegoAnimActor {
public:
// OFFSET: LEGO1 0x100430c0
inline virtual const char *ClassName() const override
{
// 0x100f03a0
return "Act3Shark";
}
// OFFSET: LEGO1 0x100430c0
inline virtual const char* ClassName() const override
{
// 0x100f03a0
return "Act3Shark";
}
};
#endif // ACT3SHARK_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x1000e2f0
MxBool Act3State::VTable0x14()
{
return FALSE;
return FALSE;
}

View File

@ -5,33 +5,28 @@
// VTABLE 0x100d4fc8
// SIZE 0xc
class Act3State : public LegoState
{
class Act3State : public LegoState {
public:
inline Act3State()
{
m_unk08 = 0;
}
inline Act3State() { m_unk08 = 0; }
// OFFSET: LEGO1 0x1000e300
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03f0
return "Act3State";
}
// OFFSET: LEGO1 0x1000e300
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03f0
return "Act3State";
}
// OFFSET: LEGO1 0x1000e310
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Act3State::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x1000e310
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Act3State::ClassName()) || LegoState::IsA(name);
}
virtual MxBool VTable0x14() override;
virtual MxBool VTable0x14() override;
private:
// FIXME: May be part of LegoState? Uncertain...
MxU32 m_unk08;
// FIXME: May be part of LegoState? Uncertain...
MxU32 m_unk08;
};
#endif // ACT3STATE_H

View File

@ -7,15 +7,15 @@ DECOMP_SIZE_ASSERT(Ambulance, 0x184);
// OFFSET: LEGO1 0x10035ee0
Ambulance::Ambulance()
{
this->m_unk168 = 0;
this->m_unk16a = -1;
this->m_unk164 = 0;
this->m_unk16c = 0;
this->m_unk174 = -1;
this->m_unk16e = 0;
this->m_unk178 = -1;
this->m_unk170 = 0;
this->m_unk172 = 0;
this->m_unk13c = 40.0;
this->m_unk17c = 1.0;
}
this->m_unk168 = 0;
this->m_unk16a = -1;
this->m_unk164 = 0;
this->m_unk16c = 0;
this->m_unk174 = -1;
this->m_unk16e = 0;
this->m_unk178 = -1;
this->m_unk170 = 0;
this->m_unk172 = 0;
this->m_unk13c = 40.0;
this->m_unk17c = 1.0;
}

View File

@ -5,37 +5,37 @@
// VTABLE 0x100d71a8
// SIZE 0x184
class Ambulance : public IslePathActor
{
class Ambulance : public IslePathActor {
public:
Ambulance();
Ambulance();
// OFFSET: LEGO1 0x10035fa0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03c4
return "Ambulance";
}
// OFFSET: LEGO1 0x10035fa0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03c4
return "Ambulance";
}
// OFFSET: LEGO1 0x10035fb0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name);
}
// OFFSET: LEGO1 0x10035fb0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Ambulance fields
undefined m_unk160[4];
MxS32 m_unk164;
MxS16 m_unk168;
MxS16 m_unk16a;
MxS16 m_unk16c;
MxS16 m_unk16e;
MxS16 m_unk170;
MxS16 m_unk172;
MxS32 m_unk174;
MxS32 m_unk178;
MxFloat m_unk17c;
undefined m_unk180[4];
// TODO: Ambulance fields
undefined m_unk160[4];
MxS32 m_unk164;
MxS16 m_unk168;
MxS16 m_unk16a;
MxS16 m_unk16c;
MxS16 m_unk16e;
MxS16 m_unk170;
MxS16 m_unk172;
MxS32 m_unk174;
MxS32 m_unk178;
MxFloat m_unk17c;
undefined m_unk180[4];
};
#endif // AMBULANCE_H

View File

@ -1,7 +1,9 @@
#include "ambulancemissionstate.h"
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24);
// OFFSET: LEGO1 0x100373a0 STUB
AmbulanceMissionState::AmbulanceMissionState()
{
// TODO
// TODO
}

View File

@ -5,25 +5,48 @@
// VTABLE 0x100d72a0
// SIZE 0x24
class AmbulanceMissionState : public LegoState
{
class AmbulanceMissionState : public LegoState {
public:
AmbulanceMissionState();
AmbulanceMissionState();
// OFFSET: LEGO1 0x10037600
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f00e8
return "AmbulanceMissionState";
}
// OFFSET: LEGO1 0x10037600
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f00e8
return "AmbulanceMissionState";
}
// OFFSET: LEGO1 0x10037610
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, AmbulanceMissionState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x10037610
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, AmbulanceMissionState::ClassName()) || LegoState::IsA(name);
}
inline MxU16 GetColor(MxU8 id)
{
switch (id) {
case 1:
return m_color1;
case 2:
return m_color2;
case 3:
return m_color3;
case 4:
return m_color4;
case 5:
return m_color5;
default:
return 0;
}
}
protected:
undefined m_unk8[0x12];
MxU16 m_color1;
MxU16 m_color2;
MxU16 m_color3;
MxU16 m_color4;
MxU16 m_color5;
};
#endif // AMBULANCEMISSIONSTATE_H

View File

@ -3,11 +3,11 @@
// OFFSET: LEGO1 0x10064ff0 STUB
AnimState::AnimState()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10065150 STUB
AnimState::~AnimState()
{
// TODO
// TODO
}

View File

@ -5,25 +5,23 @@
// VTABLE 0x100d8d80
// SIZE 0x1c
class AnimState : public LegoState
{
class AnimState : public LegoState {
public:
AnimState();
virtual ~AnimState() override; // vtable+0x0
AnimState();
virtual ~AnimState() override; // vtable+0x0
// OFFSET: LEGO1 0x10065070
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0460
return "AnimState";
}
// OFFSET: LEGO1 0x10065080
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, AnimState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x10065070
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0460
return "AnimState";
}
// OFFSET: LEGO1 0x10065080
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, AnimState::ClassName()) || LegoState::IsA(name);
}
};
#endif // ANIMSTATE_H

View File

@ -1,9 +1,9 @@
#include "beachhouseentity.h"
// OFFSET: LEGO1 0x100150a0 STUB
MxLong BeachHouseEntity::Notify(MxParam &p)
MxLong BeachHouseEntity::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,23 +5,22 @@
// VTABLE 0x100d4a18
// SIZE 0x68
class BeachHouseEntity : public BuildingEntity
{
class BeachHouseEntity : public BuildingEntity {
public:
virtual MxLong Notify(MxParam &p) override; // vtable+04
virtual MxLong Notify(MxParam& p) override; // vtable+04
// OFFSET: LEGO1 0x1000ee80
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0314
return "BeachHouseEntity";
}
// OFFSET: LEGO1 0x1000ee80
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0314
return "BeachHouseEntity";
}
// OFFSET: LEGO1 0x1000ee90
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(name);
}
// OFFSET: LEGO1 0x1000ee90
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(name);
}
};
#endif // BEACHHOUSEENTITY_H

View File

@ -5,8 +5,7 @@ DECOMP_SIZE_ASSERT(Bike, 0x164);
// OFFSET: LEGO1 0x10076670
Bike::Bike()
{
this->m_unk13c = 20.0;
this->m_unk150 = 3.0;
this->m_unk148 = 1;
this->m_unk13c = 20.0;
this->m_unk150 = 3.0;
this->m_unk148 = 1;
}

View File

@ -6,27 +6,26 @@
// VTABLE 0x100d9808
// SIZE 0x164
class Bike : public IslePathActor
{
class Bike : public IslePathActor {
public:
Bike();
Bike();
// OFFSET: LEGO1 0x100766f0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03d0
return "Bike";
}
// OFFSET: LEGO1 0x100766f0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03d0
return "Bike";
}
// OFFSET: LEGO1 0x10076700
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name);
}
// OFFSET: LEGO1 0x10076700
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Bike fields
undefined m_unk160[4];
// TODO: Bike fields
undefined m_unk160[4];
};
#endif // BIKE_H

View File

@ -3,11 +3,11 @@
// OFFSET: LEGO1 0x10014e20 STUB
BuildingEntity::BuildingEntity()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10015030 STUB
BuildingEntity::~BuildingEntity()
{
// TODO
// TODO
}

View File

@ -5,24 +5,23 @@
// VTABLE 0x100d5c88
// SIZE <= 0x68, hard to tell because it's always constructed as a derivative
class BuildingEntity : public LegoEntity
{
class BuildingEntity : public LegoEntity {
public:
BuildingEntity();
virtual ~BuildingEntity() override; // vtable+0x0
BuildingEntity();
virtual ~BuildingEntity() override; // vtable+0x0
// OFFSET: LEGO1 0x10014f20
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f07e8
return "BuildingEntity";
}
// OFFSET: LEGO1 0x10014f20
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f07e8
return "BuildingEntity";
}
// OFFSET: LEGO1 0x10014f30
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, BuildingEntity::ClassName()) || LegoEntity::IsA(name);
}
// OFFSET: LEGO1 0x10014f30
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, BuildingEntity::ClassName()) || LegoEntity::IsA(name);
}
};
#endif // BUILDINGENTITY_H

View File

@ -5,21 +5,20 @@
#include "mxtypes.h"
// VTABLE 0x100d6790
class BumpBouy : public LegoAnimActor
{
class BumpBouy : public LegoAnimActor {
public:
// OFFSET: LEGO1 0x100274e0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0394
return "BumpBouy";
}
// OFFSET: LEGO1 0x100274e0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0394
return "BumpBouy";
}
// OFFSET: LEGO1 0x10027500
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, BumpBouy::ClassName()) || LegoAnimActor::IsA(name);
}
// OFFSET: LEGO1 0x10027500
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, BumpBouy::ClassName()) || LegoAnimActor::IsA(name);
}
};
#endif // BUMPBOUY_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x10016a90 STUB
CarRace::CarRace()
{
// TODO
}
// TODO
}

View File

@ -5,23 +5,22 @@
// VTABLE 0x100d5e50
// SIZE 0x154
class CarRace : public LegoRace
{
class CarRace : public LegoRace {
public:
CarRace();
CarRace();
// OFFSET: LEGO1 0x10016b20
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0528
return "CarRace";
}
// OFFSET: LEGO1 0x10016b20
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0528
return "CarRace";
}
// OFFSET: LEGO1 0x10016b30
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, CarRace::ClassName()) || LegoRace::IsA(name);
}
// OFFSET: LEGO1 0x10016b30
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, CarRace::ClassName()) || LegoRace::IsA(name);
}
};
#endif // CARRACE_H

View File

@ -5,21 +5,20 @@
// VTABLE 0x100d4b70
// SIZE 0x2c
class CarRaceState : public RaceState
{
class CarRaceState : public RaceState {
public:
// OFFSET: LEGO1 0x1000dd30
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f009c
return "CarRaceState";
}
// OFFSET: LEGO1 0x1000dd30
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f009c
return "CarRaceState";
}
// OFFSET: LEGO1 0x1000dd40
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, CarRaceState::ClassName()) || RaceState::IsA(name);
}
// OFFSET: LEGO1 0x1000dd40
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, CarRaceState::ClassName()) || RaceState::IsA(name);
}
};
#endif // CARRACESTATE_H

View File

@ -12,15 +12,18 @@
#endif
// DIsable "nonstandard extension used : 'bool'" warning spam
#pragma warning( disable : 4237 )
#pragma warning(disable : 4237)
// Disable "identifier was truncated to '255' characters" warning.
// Impossible to avoid this if using STL map or set.
// This removes most (but not all) occurrences of the warning.
#pragma warning( disable : 4786 )
#pragma warning(disable : 4786)
// To really remove *all* of the warnings, we have to employ the following,
// obscure workaround from https://www.earthli.com/news/view_article.php?id=376
static class msVC6_4786WorkAround { public: msVC6_4786WorkAround() {} } msVC6_4786WorkAround;
static class msVC6_4786WorkAround {
public:
msVC6_4786WorkAround() {}
} msVC6_4786WorkAround;
#define MSVC420_VERSION 1020
@ -31,7 +34,8 @@ static class msVC6_4786WorkAround { public: msVC6_4786WorkAround() {} } msVC6_47
#include <algorithm>
#include <list>
#include <set>
using namespace std;
using std::list;
using std::set;
#endif
// We use `override` so newer compilers can tell us our vtables are valid,

View File

@ -1,8 +1,17 @@
#ifndef DECOMP_H
#define DECOMP_H
#define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; }
#if defined(_MSC_VER)
#define DECOMP_STATIC_ASSERT(V) \
namespace \
{ \
typedef int foo[(V) ? 1 : -1]; \
}
#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S)
#else
#define DECOMP_STATIC_ASSERT(V)
#define DECOMP_SIZE_ASSERT(T, S)
#endif
#ifndef _countof
#define _countof(arr) sizeof(arr) / sizeof(arr[0])

View File

@ -1,10 +1,13 @@
#include "define.h"
// 0x10101eac
const char *g_parseExtraTokens = ":;";
const char* g_parseExtraTokens = ":;";
// 0x10101edc
const char *g_strWORLD = "WORLD";
const char* g_strWORLD = "WORLD";
// 0x10102040
const char *g_strACTION = "ACTION";
const char* g_strACTION = "ACTION";
// 0x101020cc
const char* g_strVISIBILITY = "VISIBILITY";

View File

@ -1,8 +1,9 @@
#ifndef DEFINE_H
#define DEFINE_H
extern const char *g_parseExtraTokens;
extern const char *g_strWORLD;
extern const char *g_strACTION;
extern const char* g_parseExtraTokens;
extern const char* g_strWORLD;
extern const char* g_strACTION;
extern const char* g_strVISIBILITY;
#endif // DEFINE_H
#endif // DEFINE_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x10091ee0
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
return TRUE;
}

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d4788
// SIZE 0x1f8
class Doors : public LegoPathActor
{
class Doors : public LegoPathActor {
public:
// OFFSET: LEGO1 0x1000e430
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03e8
return "Doors";
}
// OFFSET: LEGO1 0x1000e430
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03e8
return "Doors";
}
// OFFSET: LEGO1 0x1000e440
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Doors::ClassName()) || LegoPathActor::IsA(name);
}
// OFFSET: LEGO1 0x1000e440
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Doors::ClassName()) || LegoPathActor::IsA(name);
}
};
#endif // DOORS_H

View File

@ -7,6 +7,6 @@ DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c);
// OFFSET: LEGO1 0x10067bb0
DuneBuggy::DuneBuggy()
{
this->m_unk13c = 25.0;
this->m_unk164 = 1.0;
}
this->m_unk13c = 25.0;
this->m_unk164 = 1.0;
}

View File

@ -6,28 +6,28 @@
// VTABLE 0x100d8f98
// SIZE 0x16c
class DuneBuggy : public IslePathActor
{
class DuneBuggy : public IslePathActor {
public:
DuneBuggy();
DuneBuggy();
// OFFSET: LEGO1 0x10067c30
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0410
return "DuneBuggy";
}
// OFFSET: LEGO1 0x10067c30
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0410
return "DuneBuggy";
}
// OFFSET: LEGO1 0x10067c40
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name);
}
// OFFSET: LEGO1 0x10067c40
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Double check DuneBuggy field types
undefined4 m_unk160;
MxFloat m_unk164;
undefined4 m_unk168;
// TODO: Double check DuneBuggy field types
undefined4 m_unk160;
MxFloat m_unk164;
undefined4 m_unk168;
};
#endif // DUNEBUGGY_H

View File

@ -3,19 +3,19 @@
// OFFSET: LEGO1 0x10017e90 STUB
ElevatorBottom::ElevatorBottom()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10018060 STUB
ElevatorBottom::~ElevatorBottom()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10018150 STUB
MxLong ElevatorBottom::Notify(MxParam &p)
MxLong ElevatorBottom::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -4,27 +4,25 @@
#include "legoworld.h"
// VTABLE 0x100d5f20
class ElevatorBottom : public LegoWorld
{
class ElevatorBottom : public LegoWorld {
public:
ElevatorBottom();
virtual ~ElevatorBottom() override; // vtable+0x0
ElevatorBottom();
virtual ~ElevatorBottom() override; // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
// OFFSET: LEGO1 0x10017f20
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f04ac
return "ElevatorBottom";
}
// OFFSET: LEGO1 0x10017f30
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, ElevatorBottom::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x10017f20
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f04ac
return "ElevatorBottom";
}
// OFFSET: LEGO1 0x10017f30
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, ElevatorBottom::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // ELEVATORBOTTOM_H

View File

@ -3,19 +3,18 @@
// Items related to the Extra string of key-value pairs found in MxOb
enum ExtraActionType
{
ExtraActionType_opendisk = 1,
ExtraActionType_openram = 2,
ExtraActionType_close = 3,
ExtraActionType_start = 4,
ExtraActionType_stop = 5,
ExtraActionType_run = 6,
ExtraActionType_exit = 7,
ExtraActionType_enable = 8,
ExtraActionType_disable = 9,
ExtraActionType_notify = 10,
ExtraActionType_unknown = 11,
enum ExtraActionType {
ExtraActionType_opendisk = 1,
ExtraActionType_openram = 2,
ExtraActionType_close = 3,
ExtraActionType_start = 4,
ExtraActionType_stop = 5,
ExtraActionType_run = 6,
ExtraActionType_exit = 7,
ExtraActionType_enable = 8,
ExtraActionType_disable = 9,
ExtraActionType_notify = 10,
ExtraActionType_unknown = 11,
};
#endif // EXTRA_H

View File

@ -3,27 +3,27 @@
// OFFSET: LEGO1 0x100046a0 STUB
GasStation::GasStation()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100048c0 STUB
GasStation::~GasStation()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10004a60 STUB
MxLong GasStation::Notify(MxParam &p)
MxLong GasStation::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}
// OFFSET: LEGO1 0x10005c90 STUB
MxResult GasStation::Tickle()
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -6,28 +6,26 @@
// VTABLE 0x100d4650
// SIZE 0x128
// Radio variable at 0x46, in constructor
class GasStation : public LegoWorld
{
class GasStation : public LegoWorld {
public:
GasStation();
virtual ~GasStation() override; // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x8
GasStation();
virtual ~GasStation() override; // vtable+0x0
// OFFSET: LEGO1 0x10004780
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0168
return "GasStation";
}
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x8
// OFFSET: LEGO1 0x10004790
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, GasStation::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x10004780
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0168
return "GasStation";
}
// OFFSET: LEGO1 0x10004790
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, GasStation::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // GASSTATION_H

View File

@ -5,21 +5,20 @@
// VTABLE 0x100d5258
// SIZE 0x68
class GasStationEntity : public BuildingEntity
{
class GasStationEntity : public BuildingEntity {
public:
// OFFSET: LEGO1 0x1000eb20
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0348
return "GasStationEntity";
}
// OFFSET: LEGO1 0x1000eb20
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0348
return "GasStationEntity";
}
// OFFSET: LEGO1 0x1000eb30
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, GasStationEntity::ClassName()) || BuildingEntity::IsA(name);
}
// OFFSET: LEGO1 0x1000eb30
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, GasStationEntity::ClassName()) || BuildingEntity::IsA(name);
}
};
#endif // GASSTATIONENTITY_H

View File

@ -5,14 +5,14 @@ DECOMP_SIZE_ASSERT(GasStationState, 0x24);
// OFFSET: LEGO1 0x10005eb0
GasStationState::GasStationState()
{
m_unk0x18 = 0;
m_unk0x1a = 0;
m_unk0x1c = 0;
m_unk0x1e = 0;
m_unk0x20 = 0;
m_unk0x18 = 0;
m_unk0x1a = 0;
m_unk0x1c = 0;
m_unk0x1e = 0;
m_unk0x20 = 0;
undefined4 *unk = m_unk0x08;
unk[0] = -1;
unk[1] = -1;
unk[2] = -1;
undefined4* unk = m_unk0x08;
unk[0] = -1;
unk[1] = -1;
unk[2] = -1;
}

View File

@ -5,32 +5,31 @@
// VTABLE 0x100d46e0
// SIZE 0x24
class GasStationState : public LegoState
{
class GasStationState : public LegoState {
public:
GasStationState();
GasStationState();
// OFFSET: LEGO1 0x100061d0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0174
return "GasStationState";
}
// OFFSET: LEGO1 0x100061d0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0174
return "GasStationState";
}
// OFFSET: LEGO1 0x100061e0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, GasStationState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x100061e0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, GasStationState::ClassName()) || LegoState::IsA(name);
}
private:
undefined4 m_unk0x08[3];
undefined4 m_unk0x14;
undefined2 m_unk0x18;
undefined2 m_unk0x1a;
undefined2 m_unk0x1c;
undefined2 m_unk0x1e;
undefined2 m_unk0x20;
undefined4 m_unk0x08[3];
undefined4 m_unk0x14;
undefined2 m_unk0x18;
undefined2 m_unk0x1a;
undefined2 m_unk0x1c;
undefined2 m_unk0x1e;
undefined2 m_unk0x20;
};
#endif // GASSTATIONSTATE_H

25
LEGO1/gifmanager.cpp Normal file
View File

@ -0,0 +1,25 @@
#include "gifmanager.h"
DECOMP_SIZE_ASSERT(GifData, 0x14);
DECOMP_SIZE_ASSERT(GifMapEntry, 0x14);
DECOMP_SIZE_ASSERT(GifMap, 0x08);
DECOMP_SIZE_ASSERT(GifManagerBase, 0x14);
DECOMP_SIZE_ASSERT(GifManager, 0x30);
GifMapEntry* DAT_100f0100;
// OFFSET: LEGO1 0x10001cc0
GifMapEntry* GifMap::FindNode(const char*& string)
{
GifMapEntry* ret = m_unk4;
GifMapEntry* current = ret->m_parent;
while (current != DAT_100f0100) {
if (strcmp(current->m_key, string) <= 0) {
ret = current;
current = current->m_right;
}
else
current = current->m_left;
}
return ret;
}

69
LEGO1/gifmanager.h Normal file
View File

@ -0,0 +1,69 @@
#ifndef GIFMANAGER_H
#define GIFMANAGER_H
#include "decomp.h"
#include "mxtypes.h"
#include <d3drmobj.h>
#include <ddraw.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

View File

@ -1,13 +1,78 @@
#include "helicopter.h"
// OFFSET: LEGO1 0x10001e60 STUB
#include "act3.h"
#include "legoanimationmanager.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoomni.h"
#include "legoutil.h"
#include "legoworld.h"
DECOMP_SIZE_ASSERT(Helicopter, 0x230)
// OFFSET: LEGO1 0x10001e60
Helicopter::Helicopter()
{
// TODO
m_unk13c = 60;
}
// OFFSET: LEGO1 0x10003230 STUB
// OFFSET: LEGO1 0x10003230
Helicopter::~Helicopter()
{
// TODO
ControlManager()->Unregister(this);
IslePathActor::Destroy(TRUE);
}
// OFFSET: LEGO1 0x100032c0
MxResult Helicopter::InitFromMxDSObject(MxDSObject& p_dsObject)
{
MxResult result = IslePathActor::InitFromMxDSObject(p_dsObject);
LegoWorld* world = GetCurrentWorld();
SetWorld(world);
if (world->IsA("Act3")) {
((Act3*) GetWorld())->SetUnkown420c(this);
}
world = GetWorld();
if (world)
world->VTable0x58(this);
GetState();
return result;
}
// OFFSET: LEGO1 0x10003320
void Helicopter::GetState()
{
m_state = (HelicopterState*) GameState()->GetState("HelicopterState");
if (!m_state)
m_state = (HelicopterState*) GameState()->CreateState("HelicopterState");
}
// OFFSET: LEGO1 0x10003360
void Helicopter::VTable0xe4()
{
if (!GameState()->GetUnknown10()) {
VTable0xe8(0x28, TRUE, 7);
}
IslePathActor::VTable0xe4();
if (!GameState()->GetUnknown10()) {
GameState()->SetUnknown424(0x3c);
if (GetCurrentVehicle()) {
if (GetCurrentVehicle()->IsA("IslePathActor")) {
((IslePathActor*) GetCurrentVehicle())->VTable0xe8(0x37, TRUE, 7);
}
}
}
m_state->SetUnknown8(0);
FUN_1003ee00(m_unk22c, 0x16);
FUN_1003ee00(m_unk22c, 0x17);
FUN_1003ee00(m_unk22c, 0x18);
FUN_1003ee00(m_unk22c, 0x19);
FUN_1003ee00(m_unk22c, 0x1a);
FUN_1003ee00(m_unk22c, 0x1b);
FUN_1003ee00(m_unk22c, 0x1c);
FUN_1003ee00(m_unk22c, 0x1d);
FUN_1003ee00(m_unk22c, 0x1e);
FUN_1003ee00(m_unk22c, 0x1f);
AnimationManager()->FUN_1005f6d0(TRUE);
ControlManager()->Unregister(this);
}

View File

@ -1,29 +1,48 @@
#ifndef HELICOPTER_H
#define HELICOPTER_H
#include "helicopterstate.h"
#include "islepathactor.h"
#include "mxmatrix.h"
// VTABLE 0x100d40f8
// SIZE 0x230
class Helicopter : public IslePathActor
{
class Helicopter : public IslePathActor {
public:
Helicopter();
virtual ~Helicopter(); // vtable+0x0
Helicopter();
// OFFSET: LEGO1 0x10003070
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0130
return "Helicopter";
}
// OFFSET: LEGO1 0x10003070
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0130
return "Helicopter";
}
// OFFSET: LEGO1 0x10003080
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Helicopter::ClassName()) || IslePathActor::IsA(name);
}
// OFFSET: LEGO1 0x10003080
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Helicopter::ClassName()) || IslePathActor::IsA(name);
}
virtual MxResult InitFromMxDSObject(MxDSObject& p_dsObject) override; // vtable+0x18
virtual void VTable0xe4() override;
// OFFSET: LEGO1 0x10003210 TEMPLATE
// Helicopter::`scalar deleting destructor'
virtual ~Helicopter() override; // vtable+0x0
protected:
MxMatrixData m_unk160;
MxMatrixData m_unk1a8;
undefined4 m_unk1f0;
MxVector4Data m_unk1f4;
MxVector4Data m_unk20c;
undefined4 m_unk224;
HelicopterState* m_state;
MxAtomId m_unk22c;
private:
void GetState();
};
#endif // HELICOPTER_H

View File

@ -1,25 +1,30 @@
#ifndef HELICOPTERSTATE_H
#define HELICOPTERSTATE_H
#include "decomp.h"
#include "legostate.h"
// VTABLE 0x100d5418
// SIZE 0xc
class HelicopterState : public LegoState
{
class HelicopterState : public LegoState {
public:
// OFFSET: LEGO1 0x1000e0d0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0144
return "HelicopterState";
}
// OFFSET: LEGO1 0x1000e0d0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0144
return "HelicopterState";
}
// OFFSET: LEGO1 0x1000e0e0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, HelicopterState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x1000e0e0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, HelicopterState::ClassName()) || LegoState::IsA(name);
}
inline void SetUnknown8(undefined4 p_unk8) { m_unk8 = p_unk8; }
protected:
undefined4 m_unk8;
};
#endif // HELICOPTERSTATE_H

View File

@ -3,19 +3,19 @@
// OFFSET: LEGO1 0x100822f0 STUB
HistoryBook::HistoryBook()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100824d0 STUB
HistoryBook::~HistoryBook()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10082680 STUB
MxLong HistoryBook::Notify(MxParam &p)
MxLong HistoryBook::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,26 +5,25 @@
// VTABLE 0x100da328
// SIZE 0x3e4
class HistoryBook : public LegoWorld
{
class HistoryBook : public LegoWorld {
public:
HistoryBook();
virtual ~HistoryBook() override; // vtable+0x0
HistoryBook();
virtual ~HistoryBook() override; // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
// OFFSET: LEGO1 0x10082390
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f04bc
return "HistoryBook";
}
// OFFSET: LEGO1 0x10082390
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f04bc
return "HistoryBook";
}
// OFFSET: LEGO1 0x100823a0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, HistoryBook::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x100823a0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, HistoryBook::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // HISTORYBOOK_H

View File

@ -3,19 +3,19 @@
// OFFSET: LEGO1 0x100745e0 STUB
Hospital::Hospital()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100747f0 STUB
Hospital::~Hospital()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10074990 STUB
MxLong Hospital::Notify(MxParam &p)
MxLong Hospital::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,27 +5,25 @@
// VTABLE 0x100d9730
// SIZE 0x12c
class Hospital : public LegoWorld
{
class Hospital : public LegoWorld {
public:
Hospital();
virtual ~Hospital() override; // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x04
Hospital();
virtual ~Hospital() override; // vtable+0x0
// OFFSET: LEGO1 0x100746b0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0490
return "Hospital";
}
virtual MxLong Notify(MxParam& p) override; // vtable+0x04
// OFFSET: LEGO1 0x100746c0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Hospital::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x100746b0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0490
return "Hospital";
}
// OFFSET: LEGO1 0x100746c0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Hospital::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // HOSPITAL_H

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d5068
// SIZE 0x68
class HospitalEntity : public BuildingEntity
{
class HospitalEntity : public BuildingEntity {
public:
// OFFSET: LEGO1 0x1000ec40
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0338
return "HospitalEntity";
}
// OFFSET: LEGO1 0x1000ec50
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, HospitalEntity::ClassName()) || BuildingEntity::IsA(name);
}
// OFFSET: LEGO1 0x1000ec40
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0338
return "HospitalEntity";
}
// OFFSET: LEGO1 0x1000ec50
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, HospitalEntity::ClassName()) || BuildingEntity::IsA(name);
}
};
#endif // HOSPITALENTITY_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x10076370 STUB
HospitalState::HospitalState()
{
// TODO
// TODO
}

View File

@ -5,24 +5,22 @@
// VTABLE 0x100d97a0
// SIZE 0x18
class HospitalState : public LegoState
{
class HospitalState : public LegoState {
public:
HospitalState();
HospitalState();
// OFFSET: LEGO1 0x10076400
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0480
return "HospitalState";
}
// OFFSET: LEGO1 0x10076410
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, HospitalState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x10076400
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0480
return "HospitalState";
}
// OFFSET: LEGO1 0x10076410
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, HospitalState::ClassName()) || LegoState::IsA(name);
}
};
#endif // HOSPITALSTATE_H

View File

@ -3,27 +3,27 @@
// OFFSET: LEGO1 0x1006ea20 STUB
Infocenter::Infocenter()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x1006ec90 STUB
Infocenter::~Infocenter()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x1006ef10 STUB
MxLong Infocenter::Notify(MxParam &p)
MxLong Infocenter::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}
// OFFSET: LEGO1 0x10070af0 STUB
MxResult Infocenter::Tickle()
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,28 +5,26 @@
// VTABLE 0x100d9338
// SIZE 0x1d8
class Infocenter : public LegoWorld
{
class Infocenter : public LegoWorld {
public:
Infocenter();
virtual ~Infocenter() override;
Infocenter();
virtual ~Infocenter() override;
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x8
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x8
// OFFSET: LEGO1 0x1006eb40
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f04ec
return "Infocenter";
}
// OFFSET: LEGO1 0x1006eb50
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Infocenter::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x1006eb40
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f04ec
return "Infocenter";
}
// OFFSET: LEGO1 0x1006eb50
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Infocenter::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // INFOCENTER_H

View File

@ -3,19 +3,19 @@
// OFFSET: LEGO1 0x10037730 STUB
InfocenterDoor::InfocenterDoor()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100378f0 STUB
InfocenterDoor::~InfocenterDoor()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x100379e0 STUB
MxLong InfocenterDoor::Notify(MxParam &p)
MxLong InfocenterDoor::Notify(MxParam& p)
{
// TODO
// TODO
return 0;
return 0;
}

View File

@ -5,27 +5,25 @@
// VTABLE 0x100d72d8
// SIZE 0xfc
class InfocenterDoor : public LegoWorld
{
class InfocenterDoor : public LegoWorld {
public:
InfocenterDoor();
virtual ~InfocenterDoor(); // vtable+0x0
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
InfocenterDoor();
virtual ~InfocenterDoor(); // vtable+0x0
// OFFSET: LEGO1 0x100377b0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f049c
return "InfocenterDoor";
}
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
// OFFSET: LEGO1 0x100377c0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, InfocenterDoor::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x100377b0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f049c
return "InfocenterDoor";
}
// OFFSET: LEGO1 0x100377c0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, InfocenterDoor::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // INFOCENTERDOOR_H

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d4b90
// SIZE 0x68
class InfoCenterEntity : public BuildingEntity
{
class InfoCenterEntity : public BuildingEntity {
public:
// OFFSET: LEGO1 0x1000ea00
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f035c
return "InfoCenterEntity";
}
// OFFSET: LEGO1 0x1000ea10
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(name);
}
// OFFSET: LEGO1 0x1000ea00
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f035c
return "InfoCenterEntity";
}
// OFFSET: LEGO1 0x1000ea10
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(name);
}
};
#endif // INFOCENTERENTITY_H

View File

@ -5,12 +5,11 @@ DECOMP_SIZE_ASSERT(InfocenterState, 0x94);
// OFFSET: LEGO1 0x10071600 STUB
InfocenterState::InfocenterState()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10071920 STUB
InfocenterState::~InfocenterState()
{
// TODO
// TODO
}

View File

@ -1,64 +1,62 @@
#ifndef INFOCENTERSTATE_H
#define INFOCENTERSTATE_H
#include "legostate.h"
#include "decomp.h"
#include "legostate.h"
// VTABLE 0x100d93a8
// SIZE 0x94
class InfocenterState : public LegoState
{
class InfocenterState : public LegoState {
public:
InfocenterState();
virtual ~InfocenterState();
InfocenterState();
virtual ~InfocenterState();
// OFFSET: LEGO1 0x10071840
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f04dc
return "InfocenterState";
}
// OFFSET: LEGO1 0x10071840
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f04dc
return "InfocenterState";
}
// OFFSET: LEGO1 0x10071850
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, InfocenterState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x10071850
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, InfocenterState::ClassName()) || LegoState::IsA(name);
}
inline MxU32 GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; }
inline MxU32 GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; }
private:
// Members should be renamed with their offsets before use
/*
struct UnkStruct
{
undefined4 unk1;
undefined2 unk2;
undefined2 unk3;
undefined2 unk4;
};
// Members should be renamed with their offsets before use
/*
struct UnkStruct
{
undefined4 unk1;
undefined2 unk2;
undefined2 unk3;
undefined2 unk4;
};
undefined2 unk1;
undefined2 unk2;
undefined4 unk3;
undefined4 padding1;
void *unk4;
undefined2 unk5;
undefined2 unk6;
undefined2 unk7;
undefined2 padding2;
void *unk8;
undefined2 unk9;
undefined2 unk10;
undefined2 unk11;
undefined2 padding3;
UnkStruct unk12[6];
undefined4 unk13;
*/
undefined2 unk1;
undefined2 unk2;
undefined4 unk3;
undefined4 padding1;
void *unk4;
undefined2 unk5;
undefined2 unk6;
undefined2 unk7;
undefined2 padding2;
void *unk8;
undefined2 unk9;
undefined2 unk10;
undefined2 unk11;
undefined2 padding3;
UnkStruct unk12[6];
undefined4 unk13;
*/
undefined pad[0x70];
MxU32 m_buffer[7]; // 0x78
undefined pad[0x70];
MxU32 m_buffer[7]; // 0x78
};
#endif // INFOCENTERSTATE_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x10030820 STUB
Isle::Isle()
{
// TODO
// TODO
}

View File

@ -6,23 +6,22 @@
// VTABLE 0x100d6fb8
// SIZE 0x140
// Radio at 0x12c
class Isle : public LegoWorld
{
class Isle : public LegoWorld {
public:
Isle();
Isle();
// OFFSET: LEGO1 0x10030910
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0458
return "Isle";
}
// OFFSET: LEGO1 0x10030910
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0458
return "Isle";
}
// OFFSET: LEGO1 0x10030920
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Isle::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x10030920
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Isle::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // ISLE_H

View File

@ -4,21 +4,20 @@
#include "legoactor.h"
// VTABLE 0x100d5178
class IsleActor : public LegoActor
{
class IsleActor : public LegoActor {
public:
// OFFSET: LEGO1 0x1000e660
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f07dc
return "IsleActor";
}
// OFFSET: LEGO1 0x1000e660
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f07dc
return "IsleActor";
}
// OFFSET: LEGO1 0x1000e670
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, IsleActor::ClassName()) || LegoActor::IsA(name);
}
// OFFSET: LEGO1 0x1000e670
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, IsleActor::ClassName()) || LegoActor::IsA(name);
}
};
#endif // ISLEACTOR_H

View File

@ -2,16 +2,73 @@
DECOMP_SIZE_ASSERT(IslePathActor, 0x160)
// Probably in header
// OFFSET: LEGO1 0x10002df0 STUB
void IslePathActor::VTable0xd0()
{
// TODO
}
// OFFSET: LEGO1 0x10002e00 STUB
void IslePathActor::VTable0xdc()
{
// TODO
}
// OFFSET: LEGO1 0x10002e70 STUB
void IslePathActor::VTable0xcc()
{
// TODO
}
// OFFSET: LEGO1 0x10002e80 STUB
void IslePathActor::VTable0xd4()
{
// TODO
}
// OFFSET: LEGO1 0x10002e90 STUB
void IslePathActor::VTable0xd8()
{
// TODO
}
// End header
// OFFSET: LEGO1 0x1001a200
IslePathActor::IslePathActor()
{
this->m_pLegoWorld = NULL;
this->m_unk13c = 6.0;
this->m_unk15c = 1.0;
this->m_unk158 = 0;
this->m_pLegoWorld = NULL;
this->m_unk13c = 6.0;
this->m_unk15c = 1.0;
this->m_unk158 = 0;
}
// OFFSET: LEGO1 0x10002e10
IslePathActor::~IslePathActor()
// OFFSET: LEGO1 0x1001a280
MxResult IslePathActor::InitFromMxDSObject(MxDSObject& p_dsObject)
{
return MxEntity::InitFromMxDSObject(p_dsObject);
}
// OFFSET: LEGO1 0x1001a350 STUB
void IslePathActor::VTable0xe0()
{
// TODO
}
// OFFSET: LEGO1 0x1001a3f0 STUB
void IslePathActor::VTable0xe4()
{
// TODO
}
// OFFSET: LEGO1 0x1001b2a0 STUB
void IslePathActor::VTable0xe8(MxU32 p_1, MxBool p_2, MxU8 p_3)
{
// TODO
}
// OFFSET: LEGO1 0x1001b5b0 STUB
void IslePathActor::VTable0xec()
{
// TODO
}

View File

@ -7,29 +7,45 @@
// VTABLE 0x100d4398
// SIZE 0x160
class IslePathActor : public LegoPathActor
{
public:
IslePathActor();
~IslePathActor();
class IslePathActor : public LegoPathActor {
public:
IslePathActor();
// OFFSET: LEGO1 0x10002ea0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0104
return "IslePathActor";
}
// OFFSET: LEGO1 0x10002ea0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0104
return "IslePathActor";
}
// OFFSET: LEGO1 0x10002eb0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, IslePathActor::ClassName()) || LegoPathActor::IsA(name);
}
// OFFSET: LEGO1 0x10002eb0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, IslePathActor::ClassName()) || LegoPathActor::IsA(name);
}
// OFFSET: LEGO1 0x10002ff0 TEMPLATE
// IslePathActor::`scalar deleting destructor'
inline virtual ~IslePathActor() override { IslePathActor::Destroy(TRUE); }
virtual MxResult InitFromMxDSObject(MxDSObject& p_dsObject) override; // vtable+0x18
virtual void VTable0xcc(); // vtable+0xcc
virtual void VTable0xd0(); // vtable+0xd0
virtual void VTable0xd4(); // vtable+0xd4
virtual void VTable0xd8(); // vtable+0xd8
virtual void VTable0xdc(); // vtable+0xdc
virtual void VTable0xe0(); // vtable+0xe0
virtual void VTable0xe4(); // vtable+0xe4
virtual void VTable0xe8(MxU32 p_1, MxBool p_2, MxU8 p_3); // vtable+0xe8
virtual void VTable0xec(); // vtable+0xec
inline void SetWorld(LegoWorld* p_world) { m_pLegoWorld = p_world; }
inline LegoWorld* GetWorld() { return m_pLegoWorld; }
private:
LegoWorld* m_pLegoWorld; // 0x154
MxFloat m_unk158;
MxFloat m_unk15c;
LegoWorld* m_pLegoWorld; // 0x154
MxFloat m_unk158;
MxFloat m_unk15c;
};
#endif // ISLEPATHACTOR_H

View File

@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(Jetski, 0x164);
// OFFSET: LEGO1 0x1007e3b0
Jetski::Jetski()
{
this->m_unk13c = 25.0;
this->m_unk150 = 2.0;
this->m_unk148 = 1;
}
this->m_unk13c = 25.0;
this->m_unk150 = 2.0;
this->m_unk148 = 1;
}

View File

@ -6,27 +6,26 @@
// VTABLE 0x100d9ec8
// SIZE 0x164
class Jetski : public IslePathActor
{
class Jetski : public IslePathActor {
public:
Jetski();
Jetski();
// OFFSET: LEGO1 0x1007e430
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03d8
return "Jetski";
}
// OFFSET: LEGO1 0x1007e430
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f03d8
return "Jetski";
}
// OFFSET: LEGO1 0x1007e440
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name);
}
// OFFSET: LEGO1 0x1007e440
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Jetski fields
undefined m_unk160[4];
// TODO: Jetski fields
undefined m_unk160[4];
};
#endif // JETSKI_H

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d4fe8
// SIZE 0x144
class JetskiRace : public LegoRace
{
class JetskiRace : public LegoRace {
public:
// OFFSET: LEGO1 0x1000daf0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0530
return "JetskiRace";
}
// OFFSET: LEGO1 0x1000daf0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0530
return "JetskiRace";
}
// OFFSET: LEGO1 0x1000db00
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, JetskiRace::ClassName()) || LegoRace::IsA(name);
}
// OFFSET: LEGO1 0x1000db00
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, JetskiRace::ClassName()) || LegoRace::IsA(name);
}
};
#endif // JETSKIRACE_H

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d4fa8
// SIZE 0x2c
class JetskiRaceState : public RaceState
{
class JetskiRaceState : public RaceState {
public:
// OFFSET: LEGO1 0x1000dc40
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f00ac
return "JetskiRaceState";
}
// OFFSET: LEGO1 0x1000dc50
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, JetskiRaceState::ClassName()) || RaceState::IsA(name);
}
// OFFSET: LEGO1 0x1000dc40
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f00ac
return "JetskiRaceState";
}
// OFFSET: LEGO1 0x1000dc50
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, JetskiRaceState::ClassName()) || RaceState::IsA(name);
}
};
#endif // JETSKIRACESTATE_H

View File

@ -3,5 +3,5 @@
// OFFSET: LEGO1 0x1005d660 STUB
JukeBox::JukeBox()
{
// TODO
}
// TODO
}

View File

@ -5,24 +5,22 @@
// VTABLE 0x100d8958
// SIZE 0x104
class JukeBox : public LegoWorld
{
class JukeBox : public LegoWorld {
public:
JukeBox();
JukeBox();
// OFFSET: LEGO1 0x1005d6f0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f02cc
return "JukeBox";
}
// OFFSET: LEGO1 0x1005d6f0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f02cc
return "JukeBox";
}
// OFFSET: LEGO1 0x1005d700
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, JukeBox::ClassName()) || LegoWorld::IsA(name);
}
// OFFSET: LEGO1 0x1005d700
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, JukeBox::ClassName()) || LegoWorld::IsA(name);
}
};
#endif // JUKEBOX_H

View File

@ -3,11 +3,11 @@
// OFFSET: LEGO1 0x10085bc0 STUB
JukeBoxEntity::JukeBoxEntity()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x10085dd0 STUB
JukeBoxEntity::~JukeBoxEntity()
{
// TODO
// TODO
}

View File

@ -5,25 +5,23 @@
// VTABLE 0x100da8a0
// SIZE 0x6c
class JukeBoxEntity : public LegoEntity
{
class JukeBoxEntity : public LegoEntity {
public:
JukeBoxEntity();
virtual ~JukeBoxEntity() override; // vtable+0x0
JukeBoxEntity();
virtual ~JukeBoxEntity() override; // vtable+0x0
// OFFSET: LEGO1 0x10085cc0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f02f0
return "JukeBoxEntity";
}
// OFFSET: LEGO1 0x10085cd0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, JukeBoxEntity::ClassName()) || LegoEntity::IsA(name);
}
// OFFSET: LEGO1 0x10085cc0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f02f0
return "JukeBoxEntity";
}
// OFFSET: LEGO1 0x10085cd0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, JukeBoxEntity::ClassName()) || LegoEntity::IsA(name);
}
};
#endif // JUKEBOXENTITY_H

View File

@ -1 +1,7 @@
#include "jukeboxstate.h"
// OFFSET: LEGO1 0x1000f300
MxBool JukeBoxState::VTable0x14()
{
return FALSE;
}

View File

@ -5,22 +5,22 @@
// VTABLE 0x100d4a90
// SIZE 0x10
class JukeBoxState : public LegoState
{
class JukeBoxState : public LegoState {
public:
// OFFSET: LEGO1 0x1000f310
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f02bc
return "JukeBoxState";
}
// OFFSET: LEGO1 0x1000f310
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f02bc
return "JukeBoxState";
}
// OFFSET: LEGO1 0x1000f320
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, JukeBoxState::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x1000f320
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, JukeBoxState::ClassName()) || LegoState::IsA(name);
}
virtual MxBool VTable0x14() override; // vtable+0x14
};
#endif // JUKEBOXSTATE_H

View File

@ -3,15 +3,14 @@
#include "lego3dview.h"
class Lego3DManager
{
class Lego3DManager {
public:
inline Lego3DView *GetLego3DView() { return this->m_3dView; }
inline Lego3DView* GetLego3DView() { return this->m_3dView; }
private:
int m_unk00;
int m_unk04;
Lego3DView *m_3dView;
int m_unk00;
int m_unk04;
Lego3DView* m_3dView;
};
#endif // LEGO3DMANAGER_H

View File

@ -3,14 +3,13 @@
#include "viewmanager.h"
class Lego3DView
{
class Lego3DView {
public:
inline ViewManager *GetViewManager() { return this->m_viewManager; }
inline ViewManager* GetViewManager() { return this->m_viewManager; }
private:
char unknown[0x88];
ViewManager *m_viewManager;
char unknown[0x88];
ViewManager* m_viewManager;
};
#endif // LEGO3DVIEW_H

View File

@ -5,21 +5,20 @@
// VTABLE 0x100d52b0
// SIZE 0xa0
class Lego3DWavePresenter : public LegoWavePresenter
{
class Lego3DWavePresenter : public LegoWavePresenter {
public:
// OFFSET: LEGO1 0x1000d890
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f058c
return "Lego3DWavePresenter";
}
// OFFSET: LEGO1 0x1000d890
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f058c
return "Lego3DWavePresenter";
}
// OFFSET: LEGO1 0x1000d8a0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, Lego3DWavePresenter::ClassName()) || MxWavePresenter::IsA(name);
}
// OFFSET: LEGO1 0x1000d8a0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, Lego3DWavePresenter::ClassName()) || MxWavePresenter::IsA(name);
}
};
#endif // LEGO3DWAVEPRESENTER_H

View File

@ -5,22 +5,20 @@
// VTABLE 0x100d4a70
// SIZE 0x10
class LegoAct2State : public LegoState
{
class LegoAct2State : public LegoState {
public:
// OFFSET: LEGO1 0x1000df80
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0428
return "LegoAct2State";
}
// OFFSET: LEGO1 0x1000df90
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, LegoAct2State::ClassName()) || LegoState::IsA(name);
}
// OFFSET: LEGO1 0x1000df80
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0428
return "LegoAct2State";
}
// OFFSET: LEGO1 0x1000df90
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, LegoAct2State::ClassName()) || LegoState::IsA(name);
}
};
#endif // LEGOACT2STATE_H

View File

@ -5,21 +5,20 @@
// VTABLE 0x100d5118
// SIZE 0x68
class LegoActionControlPresenter : public MxMediaPresenter
{
class LegoActionControlPresenter : public MxMediaPresenter {
public:
// OFFSET: LEGO1 0x1000d0e0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f05bc
return "LegoActionControlPresenter";
}
// OFFSET: LEGO1 0x1000d0e0
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f05bc
return "LegoActionControlPresenter";
}
// OFFSET: LEGO1 0x1000d0f0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, LegoActionControlPresenter::ClassName()) || MxMediaPresenter::IsA(name);
}
// OFFSET: LEGO1 0x1000d0f0
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, LegoActionControlPresenter::ClassName()) || MxMediaPresenter::IsA(name);
}
};
#endif // LEGOACTIONCONTROLPRESENTER_H

View File

@ -2,7 +2,44 @@
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
// OFFSET: LEGO1 0x1002d110 STUB
// Probably in header
// OFFSET: LEGO1 0x10002cc0 STUB
void LegoActor::VTable0x50()
{
// TODO
}
// OFFSET: LEGO1 0x10002cd0 STUB
void LegoActor::VTable0x54()
{
// TODO
}
// OFFSET: LEGO1 0x10002ce0 STUB
void LegoActor::VTable0x58()
{
// TODO
}
// OFFSET: LEGO1 0x10002cf0 STUB
void LegoActor::VTable0x5c()
{
// TODO
}
// OFFSET: LEGO1 0x10002d00 STUB
void LegoActor::VTable0x60()
{
// TODO
}
// OFFSET: LEGO1 0x10002d10 STUB
void LegoActor::VTable0x64()
{
// TODO
}
// End header
LegoActor::LegoActor()
{
}
}

View File

@ -6,27 +6,32 @@
// VTABLE 0x100d6d68
// SIZE 0x78
class LegoActor : public LegoEntity
{
class LegoActor : public LegoEntity {
public:
LegoActor();
LegoActor();
// OFFSET: LEGO1 0x1002d210
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f0124
return "LegoActor";
}
// OFFSET: LEGO1 0x1002d210
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f0124
return "LegoActor";
}
// OFFSET: LEGO1 0x1002d220
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name);
}
// OFFSET: LEGO1 0x1002d220
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name);
}
virtual void VTable0x50(); // vtable+0x50
virtual void VTable0x54(); // vtable+0x54
virtual void VTable0x58(); // vtable+0x58
virtual void VTable0x5c(); // vtable+0x5c
virtual void VTable0x60(); // vtable+0x60
virtual void VTable0x64(); // vtable+0x64
private:
undefined unk68[0x10];
undefined unk68[0x10];
};
#endif // LEGOACTOR_H

View File

@ -5,21 +5,20 @@
// VTABLE 0x100d5320
// SIZE 0x50
class LegoActorPresenter : public LegoEntityPresenter
{
class LegoActorPresenter : public LegoEntityPresenter {
public:
// OFFSET: LEGO1 0x1000cb10
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f06a4
return "LegoActorPresenter";
}
// OFFSET: LEGO1 0x1000cb10
inline virtual const char* ClassName() const override // vtable+0x0c
{
// 0x100f06a4
return "LegoActorPresenter";
}
// OFFSET: LEGO1 0x1000cb20
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(name);
}
// OFFSET: LEGO1 0x1000cb20
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(name);
}
};
#endif // LEGOACTORPRESENTER_H

View File

@ -3,8 +3,7 @@
#include "legopathactor.h"
class LegoAnimActor : public LegoPathActor
{
class LegoAnimActor : public LegoPathActor {
public:
};

View File

@ -3,41 +3,48 @@
// 0x100f74f8
int g_legoAnimationManagerConfig = 1;
// OFFSET: LEGO1 0x1005eb50
void LegoAnimationManager::configureLegoAnimationManager(int param_1)
{
g_legoAnimationManagerConfig = param_1;
}
// OFFSET: LEGO1 0x1005eb60 STUB
LegoAnimationManager::LegoAnimationManager()
{
// TODO
}
// OFFSET: LEGO1 0x1005ed30 STUB
LegoAnimationManager::~LegoAnimationManager()
{
// TODO
}
// OFFSET: LEGO1 0x100619f0 STUB
MxLong LegoAnimationManager::Notify(MxParam &p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x10061cc0 STUB
MxResult LegoAnimationManager::Tickle()
{
// TODO
return 0;
// TODO
}
// OFFSET: LEGO1 0x1005f130 STUB
void LegoAnimationManager::Init()
{
// TODO
// TODO
}
// OFFSET: LEGO1 0x1005eb50
void LegoAnimationManager::configureLegoAnimationManager(int param_1)
// OFFSET: LEGO1 0x1005f6d0 STUB
void LegoAnimationManager::FUN_1005f6d0(MxBool p)
{
g_legoAnimationManagerConfig = param_1;
// TODO
}
// OFFSET: LEGO1 0x100619f0 STUB
MxLong LegoAnimationManager::Notify(MxParam& p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x10061cc0 STUB
MxResult LegoAnimationManager::Tickle()
{
// TODO
return SUCCESS;
}

Some files were not shown because too many files have changed in this diff Show More