mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-19 06:21:16 +00:00
Resolved merge conflict
This commit is contained in:
commit
f6716a5693
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -60,8 +60,8 @@ jobs:
|
|||||||
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE
|
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE
|
||||||
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL
|
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL
|
||||||
pip install capstone
|
pip install capstone
|
||||||
python3 tools/reccmp/reccmp.py -H ISLEPROGRESS.HTML ISLE.EXE Release/ISLE.EXE Release/ISLE.PDB ISLE
|
python3 tools/reccmp/reccmp.py -H ISLEPROGRESS.HTML ISLE.EXE Release/ISLE.EXE Release/ISLE.PDB .
|
||||||
python3 tools/reccmp/reccmp.py -H LEGO1PROGRESS.HTML LEGO1.DLL Release/LEGO1.DLL Release/LEGO1.PDB LEGO1
|
python3 tools/reccmp/reccmp.py -H LEGO1PROGRESS.HTML LEGO1.DLL Release/LEGO1.DLL Release/LEGO1.PDB .
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
Debug/
|
Debug/
|
||||||
Release/
|
Release/
|
||||||
*.ncb
|
*.ncb
|
||||||
|
ISLE.EXE
|
||||||
|
LEGO1.DLL
|
||||||
|
|||||||
@ -38,6 +38,3 @@ int g_startupDelay = 200;
|
|||||||
|
|
||||||
// 0x4101c0
|
// 0x4101c0
|
||||||
long g_lastFrameTime = 0;
|
long g_lastFrameTime = 0;
|
||||||
|
|
||||||
// 0x4101dc
|
|
||||||
const char *WINDOW_TITLE = "LEGO\xAE";
|
|
||||||
|
|||||||
@ -1,14 +1,16 @@
|
|||||||
#ifndef DEFINE_H
|
#ifndef DEFINE_H
|
||||||
#define DEFINE_H
|
#define DEFINE_H
|
||||||
|
|
||||||
#include <Windows.h>
|
#include "legoinc.h"
|
||||||
|
|
||||||
class Isle;
|
class Isle;
|
||||||
|
|
||||||
extern Isle *g_isle;
|
extern Isle *g_isle;
|
||||||
extern int g_closed;
|
extern int g_closed;
|
||||||
|
// 0x4101c4
|
||||||
#define WNDCLASS_NAME "Lego Island MainNoM App"
|
#define WNDCLASS_NAME "Lego Island MainNoM App"
|
||||||
extern const char *WINDOW_TITLE;
|
// 0x4101dc
|
||||||
|
#define WINDOW_TITLE "LEGO\xAE"
|
||||||
extern unsigned char g_mousedown;
|
extern unsigned char g_mousedown;
|
||||||
extern unsigned char g_mousemoved;
|
extern unsigned char g_mousemoved;
|
||||||
extern RECT g_windowRect;
|
extern RECT g_windowRect;
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
#include "isle.h"
|
#include "isle.h"
|
||||||
|
|
||||||
#include "define.h"
|
|
||||||
#include "legoanimationmanager.h"
|
#include "legoanimationmanager.h"
|
||||||
#include "legobuildingmanager.h"
|
#include "legobuildingmanager.h"
|
||||||
#include "legomodelpresenter.h"
|
#include "legomodelpresenter.h"
|
||||||
#include "legoomni.h"
|
|
||||||
#include "legopartpresenter.h"
|
#include "legopartpresenter.h"
|
||||||
#include "legoworldpresenter.h"
|
#include "legoworldpresenter.h"
|
||||||
#include "mxdirectdraw.h"
|
#include "mxdirectdraw.h"
|
||||||
@ -38,7 +36,7 @@ Isle::Isle()
|
|||||||
m_windowActive = 1;
|
m_windowActive = 1;
|
||||||
|
|
||||||
m_videoParam = MxVideoParam(MxRect32(0, 0, 639, 479), NULL, 1, MxVideoParamFlags());
|
m_videoParam = MxVideoParam(MxRect32(0, 0, 639, 479), NULL, 1, MxVideoParamFlags());
|
||||||
m_videoParam.flags().Enable16Bit(MxDirectDraw::GetPrimaryBitDepth() == 16);
|
m_videoParam.flags().Set16Bit(MxDirectDraw::GetPrimaryBitDepth() == 16);
|
||||||
|
|
||||||
m_windowHandle = NULL;
|
m_windowHandle = NULL;
|
||||||
m_cursorArrow = NULL;
|
m_cursorArrow = NULL;
|
||||||
@ -78,7 +76,7 @@ Isle::~Isle()
|
|||||||
void Isle::Close()
|
void Isle::Close()
|
||||||
{
|
{
|
||||||
MxDSAction ds;
|
MxDSAction ds;
|
||||||
ds.SetUnknown24(0xFFFE);
|
ds.SetUnknown24(-2);
|
||||||
|
|
||||||
if (Lego()) {
|
if (Lego()) {
|
||||||
GameState()->Save(0);
|
GameState()->Save(0);
|
||||||
@ -230,22 +228,22 @@ void Isle::LoadConfig()
|
|||||||
|
|
||||||
// OFFSET: ISLE 0x401560
|
// OFFSET: ISLE 0x401560
|
||||||
void Isle::SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
|
void Isle::SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
|
||||||
BOOL using8bit, BOOL m_using16bit, BOOL param_6, BOOL param_7,
|
BOOL using8bit, BOOL using16bit, BOOL param_6, BOOL param_7,
|
||||||
BOOL wideViewAngle, char *deviceId)
|
BOOL wideViewAngle, char *deviceId)
|
||||||
{
|
{
|
||||||
m_videoParam.flags().EnableFullScreen(fullScreen);
|
m_videoParam.flags().SetFullScreen(fullScreen);
|
||||||
m_videoParam.flags().EnableFlipSurfaces(flipSurfaces);
|
m_videoParam.flags().SetFlipSurfaces(flipSurfaces);
|
||||||
m_videoParam.flags().EnableBackBuffers(backBuffers);
|
m_videoParam.flags().SetBackBuffers(!backBuffers);
|
||||||
m_videoParam.flags().EnableUnknown1(param_6);
|
m_videoParam.flags().Set_f2bit0(!param_6);
|
||||||
m_videoParam.flags().SetUnknown3(param_7);
|
m_videoParam.flags().Set_f1bit7(param_7);
|
||||||
m_videoParam.flags().EnableWideViewAngle(wideViewAngle);
|
m_videoParam.flags().SetWideViewAngle(wideViewAngle);
|
||||||
m_videoParam.flags().EnableUnknown2();
|
m_videoParam.flags().Set_f2bit1(1);
|
||||||
m_videoParam.SetDeviceName(deviceId);
|
m_videoParam.SetDeviceName(deviceId);
|
||||||
if (using8bit) {
|
if (using8bit) {
|
||||||
m_videoParam.flags().Set8Bit();
|
m_videoParam.flags().Set16Bit(0);
|
||||||
}
|
}
|
||||||
if (m_using16bit) {
|
if (using16bit) {
|
||||||
m_videoParam.flags().Set16Bit();
|
m_videoParam.flags().Set16Bit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,67 +572,3 @@ MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
|||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: ISLE 0x402c20
|
|
||||||
void Isle::Tick(BOOL sleepIfNotNextFrame)
|
|
||||||
{
|
|
||||||
if (this->m_windowActive) {
|
|
||||||
if (!Lego()) return;
|
|
||||||
if (!TickleManager()) return;
|
|
||||||
if (!Timer()) return;
|
|
||||||
|
|
||||||
long currentTime = Timer()->GetRealTime();
|
|
||||||
if (currentTime < g_lastFrameTime) {
|
|
||||||
g_lastFrameTime = -this->m_frameDelta;
|
|
||||||
}
|
|
||||||
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
|
|
||||||
if (!Lego()->vtable40()) {
|
|
||||||
TickleManager()->Tickle();
|
|
||||||
}
|
|
||||||
g_lastFrameTime = currentTime;
|
|
||||||
|
|
||||||
if (g_startupDelay == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_startupDelay--;
|
|
||||||
if (g_startupDelay != 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LegoOmni::GetInstance()->CreateBackgroundAudio();
|
|
||||||
BackgroundAudioManager()->Enable(this->m_useMusic);
|
|
||||||
|
|
||||||
MxStreamController *stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", 0);
|
|
||||||
MxDSAction ds;
|
|
||||||
|
|
||||||
if (!stream) {
|
|
||||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", 0);
|
|
||||||
if (!stream) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ds.SetAtomId(stream->atom);
|
|
||||||
ds.SetUnknown24(0xFFFF);
|
|
||||||
ds.SetUnknown1c(0);
|
|
||||||
VideoManager()->EnableFullScreenMovie(TRUE, TRUE);
|
|
||||||
|
|
||||||
if (Start(&ds) != SUCCESS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ds.SetAtomId(stream->atom);
|
|
||||||
ds.SetUnknown24(0xFFFF);
|
|
||||||
ds.SetUnknown1c(0);
|
|
||||||
if (Start(&ds) != SUCCESS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this->m_gameStarted = 1;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (sleepIfNotNextFrame == 0) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Sleep(0);
|
|
||||||
}
|
|
||||||
70
ISLE/isle.h
70
ISLE/isle.h
@ -1,8 +1,10 @@
|
|||||||
#ifndef ISLE_H
|
#ifndef ISLE_H
|
||||||
#define ISLE_H
|
#define ISLE_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include "legoinc.h"
|
||||||
|
#include "define.h"
|
||||||
|
|
||||||
|
#include "legoomni.h"
|
||||||
#include "mxresult.h"
|
#include "mxresult.h"
|
||||||
#include "mxvideoparam.h"
|
#include "mxvideoparam.h"
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ class Isle
|
|||||||
BOOL SetupLegoOmni();
|
BOOL SetupLegoOmni();
|
||||||
void LoadConfig();
|
void LoadConfig();
|
||||||
void SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
|
void SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
|
||||||
BOOL using8bit, BOOL m_using16bit, BOOL param_6, BOOL param_7,
|
BOOL using8bit, BOOL using16bit, BOOL param_6, BOOL param_7,
|
||||||
BOOL wideViewAngle, char *deviceId);
|
BOOL wideViewAngle, char *deviceId);
|
||||||
|
|
||||||
void SetupCursor(WPARAM wParam);
|
void SetupCursor(WPARAM wParam);
|
||||||
@ -77,4 +79,68 @@ class Isle
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// OFFSET: ISLE 0x402c20
|
||||||
|
inline void Isle::Tick(BOOL sleepIfNotNextFrame)
|
||||||
|
{
|
||||||
|
if (this->m_windowActive) {
|
||||||
|
if (!Lego()) return;
|
||||||
|
if (!TickleManager()) return;
|
||||||
|
if (!Timer()) return;
|
||||||
|
|
||||||
|
long currentTime = Timer()->GetRealTime();
|
||||||
|
if (currentTime < g_lastFrameTime) {
|
||||||
|
g_lastFrameTime = -this->m_frameDelta;
|
||||||
|
}
|
||||||
|
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
|
||||||
|
if (!Lego()->vtable40()) {
|
||||||
|
TickleManager()->Tickle();
|
||||||
|
}
|
||||||
|
g_lastFrameTime = currentTime;
|
||||||
|
|
||||||
|
if (g_startupDelay == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_startupDelay--;
|
||||||
|
if (g_startupDelay != 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LegoOmni::GetInstance()->CreateBackgroundAudio();
|
||||||
|
BackgroundAudioManager()->Enable(this->m_useMusic);
|
||||||
|
|
||||||
|
MxStreamController *stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", 0);
|
||||||
|
MxDSAction ds;
|
||||||
|
|
||||||
|
if (!stream) {
|
||||||
|
stream = Streamer()->Open("\\lego\\scripts\\nocd", 0);
|
||||||
|
if (!stream) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ds.SetAtomId(stream->atom);
|
||||||
|
ds.SetUnknown24(-1);
|
||||||
|
ds.SetUnknown1c(0);
|
||||||
|
VideoManager()->EnableFullScreenMovie(TRUE, TRUE);
|
||||||
|
|
||||||
|
if (Start(&ds) != SUCCESS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ds.SetAtomId(stream->atom);
|
||||||
|
ds.SetUnknown24(-1);
|
||||||
|
ds.SetUnknown1c(0);
|
||||||
|
if (Start(&ds) != SUCCESS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this->m_gameStarted = 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (sleepIfNotNextFrame == 0) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Sleep(0);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // ISLE_H
|
#endif // ISLE_H
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
|
#include "legoinc.h"
|
||||||
#include "define.h"
|
#include "define.h"
|
||||||
#include "isle.h"
|
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
|
#include "isle.h"
|
||||||
|
|
||||||
// OFFSET: ISLE 0x401ca0
|
// OFFSET: ISLE 0x401ca0
|
||||||
BOOL FindExistingInstance(void)
|
BOOL FindExistingInstance(void)
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
#include "mxdsobject.h"
|
|
||||||
|
|
||||||
// OFFSET: ISLE 0x00401c40
|
|
||||||
void MxDSObject::SetAtomId(MxAtomId p_atomId)
|
|
||||||
{
|
|
||||||
this->m_atomId = p_atomId;
|
|
||||||
}
|
|
||||||
@ -24,6 +24,13 @@ LegoOmni *Lego()
|
|||||||
return (LegoOmni *) MxOmni::GetInstance();
|
return (LegoOmni *) MxOmni::GetInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015710
|
||||||
|
LegoSoundManager *SoundManager()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetSoundManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10015720
|
// OFFSET: LEGO1 0x10015720
|
||||||
LegoVideoManager *VideoManager()
|
LegoVideoManager *VideoManager()
|
||||||
{
|
{
|
||||||
@ -48,6 +55,30 @@ LegoPlantManager *PlantManager()
|
|||||||
return LegoOmni::GetInstance()->GetLegoPlantManager();
|
return LegoOmni::GetInstance()->GetLegoPlantManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015730
|
||||||
|
MxBackgroundAudioManager *BackgroundAudioManager()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015740
|
||||||
|
LegoInputManager *InputManager()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetInputManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015760
|
||||||
|
LegoGameState *GameState()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetGameState();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015780
|
||||||
|
LegoNavController *NavController()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetNavController();
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005b5f0
|
// OFFSET: LEGO1 0x1005b5f0
|
||||||
long LegoOmni::Notify(MxParam &p)
|
long LegoOmni::Notify(MxParam &p)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,10 +49,14 @@ class LegoOmni : public MxOmni
|
|||||||
virtual unsigned char vtable40();
|
virtual unsigned char vtable40();
|
||||||
|
|
||||||
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
||||||
|
LegoSoundManager *GetSoundManager() { return (LegoSoundManager *)m_soundManager;}
|
||||||
|
MxBackgroundAudioManager *GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
||||||
LegoInputManager *GetInputManager() { return m_inputMgr; }
|
LegoInputManager *GetInputManager() { return m_inputMgr; }
|
||||||
Isle *GetIsle() { return m_isle; }
|
Isle *GetIsle() { return m_isle; }
|
||||||
LegoBuildingManager *GetLegoBuildingManager() { return m_buildingManager; }
|
LegoBuildingManager *GetLegoBuildingManager() { return m_buildingManager; }
|
||||||
LegoPlantManager *GetLegoPlantManager() { return m_plantManager; }
|
LegoPlantManager *GetLegoPlantManager() { return m_plantManager; }
|
||||||
|
LegoGameState *GetGameState() { return m_gameState; }
|
||||||
|
LegoNavController *GetNavController() { return m_navController; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_unk68;
|
int m_unk68;
|
||||||
|
|||||||
@ -6,14 +6,11 @@
|
|||||||
// OFFSET: LEGO1 0x100bf6a0
|
// OFFSET: LEGO1 0x100bf6a0
|
||||||
MxDSObject::MxDSObject()
|
MxDSObject::MxDSObject()
|
||||||
{
|
{
|
||||||
// The following code yields 100% matching assembly if m_unk24 is declared as (signed) short.
|
|
||||||
// However, in other areas m_unk24 (notably, ISLE.EXE) is treated as unsigned short.
|
|
||||||
// Since we don't have a proper solution yet, we are using a union to work around this discrepancy.
|
|
||||||
this->m_unk0c = 0;
|
this->m_unk0c = 0;
|
||||||
this->m_unk10 = 0;
|
this->m_unk10 = 0;
|
||||||
this->m_unk14 = 0;
|
this->m_unk14 = 0;
|
||||||
this->m_name = NULL;
|
this->m_name = NULL;
|
||||||
this->m_unk24signed = -1;
|
this->m_unk24 = -1;
|
||||||
this->m_unk1c = -1;
|
this->m_unk1c = -1;
|
||||||
this->m_unk28 = 0;
|
this->m_unk28 = 0;
|
||||||
}
|
}
|
||||||
@ -37,9 +34,3 @@ void MxDSObject::SetObjectName(const char *p_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10005530
|
|
||||||
void MxDSObject::SetAtomId(MxAtomId p_atomId)
|
|
||||||
{
|
|
||||||
this->m_atomId = p_atomId;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -15,9 +15,11 @@ class MxDSObject : public MxCore
|
|||||||
inline int GetUnknown1c() { return this->m_unk1c; }
|
inline int GetUnknown1c() { return this->m_unk1c; }
|
||||||
|
|
||||||
inline void SetUnknown1c(int p_unk1c) { this->m_unk1c = p_unk1c; }
|
inline void SetUnknown1c(int p_unk1c) { this->m_unk1c = p_unk1c; }
|
||||||
inline void SetUnknown24(unsigned short p_unk24) { this->m_unk24 = p_unk24; }
|
inline void SetUnknown24(short p_unk24) { this->m_unk24 = p_unk24; }
|
||||||
|
|
||||||
void SetAtomId(MxAtomId p_atomId);
|
// OFFSET: ISLE 0x401c40
|
||||||
|
// OFFSET: LEGO1 0x10005530
|
||||||
|
inline void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_unk08;
|
int m_unk08;
|
||||||
@ -27,13 +29,7 @@ class MxDSObject : public MxCore
|
|||||||
char *m_name;
|
char *m_name;
|
||||||
int m_unk1c;
|
int m_unk1c;
|
||||||
MxAtomId m_atomId;
|
MxAtomId m_atomId;
|
||||||
// So far, implementing MxDSObject::MxDSObject correctly required that m_unk24 is declared a (signed) short.
|
short m_unk24;
|
||||||
// Most of the other game's code appears to treat it as unsigned short, however.
|
|
||||||
// This union is a workaround until we have figured this out.
|
|
||||||
union {
|
|
||||||
unsigned short m_unk24;
|
|
||||||
short m_unk24signed;
|
|
||||||
};
|
|
||||||
unsigned short m_unk26;
|
unsigned short m_unk26;
|
||||||
int m_unk28;
|
int m_unk28;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
class MxRect32
|
class MxRect32
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
MxRect32() { }
|
||||||
MxRect32(int p_left, int p_top, int p_right, int p_bottom)
|
MxRect32(int p_left, int p_top, int p_right, int p_bottom)
|
||||||
{
|
{
|
||||||
this->m_left = p_left;
|
this->m_left = p_left;
|
||||||
|
|||||||
@ -6,31 +6,57 @@
|
|||||||
// OFFSET: LEGO1 0x100bec70
|
// OFFSET: LEGO1 0x100bec70
|
||||||
MxVideoParam::MxVideoParam()
|
MxVideoParam::MxVideoParam()
|
||||||
{
|
{
|
||||||
this->m_flags = MxVideoParamFlags();
|
this->m_rect.m_right = 640;
|
||||||
this->m_right = 640;
|
this->m_rect.m_bottom = 480;
|
||||||
this->m_bottom = 480;
|
this->m_rect.m_left = 0;
|
||||||
this->m_left = 0;
|
this->m_rect.m_top = 0;
|
||||||
this->m_top = 0;
|
|
||||||
this->m_palette = 0;
|
this->m_palette = 0;
|
||||||
this->m_backBuffers = 0;
|
this->m_backBuffers = 0;
|
||||||
this->m_unk1c = 0;
|
this->m_unk1c = 0;
|
||||||
this->m_deviceId = 0;
|
this->m_deviceId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100becf0
|
// OFFSET: LEGO1 0x100beca0
|
||||||
MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other)
|
MxVideoParam::MxVideoParam(MxRect32 &p_rect, MxPalette *p_pal, unsigned long p_backBuffers, MxVideoParamFlags &p_flags)
|
||||||
{
|
{
|
||||||
m_flags = MxVideoParamFlags();
|
this->m_rect.m_left = p_rect.m_left;
|
||||||
m_left = other.m_left;
|
this->m_rect.m_top = p_rect.m_top;
|
||||||
m_top = other.m_top;
|
this->m_rect.m_right = p_rect.m_right;
|
||||||
m_right = other.m_right;
|
this->m_rect.m_bottom = p_rect.m_bottom;
|
||||||
m_bottom = other.m_bottom;
|
this->m_palette = p_pal;
|
||||||
m_palette = other.m_palette;
|
this->m_backBuffers = p_backBuffers;
|
||||||
m_backBuffers = other.m_backBuffers;
|
this->m_flags = p_flags;
|
||||||
m_flags = other.m_flags;
|
this->m_unk1c = 0;
|
||||||
m_unk1c = other.m_unk1c;
|
this->m_deviceId = NULL;
|
||||||
m_deviceId = other.m_deviceId;
|
}
|
||||||
SetDeviceName(other.m_deviceId);
|
|
||||||
|
// OFFSET: LEGO1 0x100becf0
|
||||||
|
MxVideoParam::MxVideoParam(MxVideoParam &p_videoParam)
|
||||||
|
{
|
||||||
|
this->m_rect.m_left = p_videoParam.m_rect.m_left;
|
||||||
|
this->m_rect.m_top = p_videoParam.m_rect.m_top;
|
||||||
|
this->m_rect.m_right = p_videoParam.m_rect.m_right;
|
||||||
|
this->m_rect.m_bottom = p_videoParam.m_rect.m_bottom;
|
||||||
|
this->m_palette = p_videoParam.m_palette;
|
||||||
|
this->m_backBuffers = p_videoParam.m_backBuffers;
|
||||||
|
this->m_flags = p_videoParam.m_flags;
|
||||||
|
this->m_unk1c = p_videoParam.m_unk1c;
|
||||||
|
this->m_deviceId = NULL;
|
||||||
|
SetDeviceName(p_videoParam.m_deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100bede0
|
||||||
|
MxVideoParam &MxVideoParam::operator=(const MxVideoParam &p_videoParam)
|
||||||
|
{
|
||||||
|
this->m_rect.m_left = p_videoParam.m_rect.m_left;
|
||||||
|
this->m_rect.m_top = p_videoParam.m_rect.m_top;
|
||||||
|
this->m_rect.m_right = p_videoParam.m_rect.m_right;
|
||||||
|
this->m_rect.m_bottom = p_videoParam.m_rect.m_bottom;
|
||||||
|
this->m_palette = p_videoParam.m_palette;
|
||||||
|
this->m_backBuffers = p_videoParam.m_backBuffers;
|
||||||
|
this->m_flags = p_videoParam.m_flags;
|
||||||
|
this->m_unk1c = p_videoParam.m_unk1c;
|
||||||
|
SetDeviceName(p_videoParam.m_deviceId);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,16 +20,12 @@ class MxVideoParam
|
|||||||
inline MxVideoParamFlags &flags() { return m_flags; }
|
inline MxVideoParamFlags &flags() { return m_flags; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_left;
|
MxRect32 m_rect;
|
||||||
int m_top;
|
|
||||||
int m_right;
|
|
||||||
int m_bottom;
|
|
||||||
MxPalette *m_palette;
|
MxPalette *m_palette;
|
||||||
int m_backBuffers;
|
unsigned int m_backBuffers;
|
||||||
MxVideoParamFlags m_flags;
|
MxVideoParamFlags m_flags;
|
||||||
int m_unk1c;
|
int m_unk1c;
|
||||||
char *m_deviceId;
|
char *m_deviceId;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXVIDEOPARAM_H
|
#endif // MXVIDEOPARAM_H
|
||||||
|
|||||||
@ -3,15 +3,13 @@
|
|||||||
// OFFSET: LEGO1 0x100bec40
|
// OFFSET: LEGO1 0x100bec40
|
||||||
MxVideoParamFlags::MxVideoParamFlags()
|
MxVideoParamFlags::MxVideoParamFlags()
|
||||||
{
|
{
|
||||||
// TODO: convert to EnableXXX function calls
|
this->SetFullScreen(0);
|
||||||
unsigned char bVar1 = this->m_flags1;
|
this->SetFlipSurfaces(0);
|
||||||
this->m_flags1 = bVar1 & 0xfe;
|
this->SetBackBuffers(0);
|
||||||
this->m_flags1 = bVar1 & 0xfc;
|
this->Set_f1bit3(0);
|
||||||
this->m_flags1 = bVar1 & 0xf8;
|
this->Set_f1bit4(0);
|
||||||
this->m_flags1 = bVar1 & 0xf0;
|
this->Set16Bit(0);
|
||||||
this->m_flags1 = bVar1 & 0xe0;
|
this->SetWideViewAngle(1);
|
||||||
this->m_flags2 = this->m_flags2 | 2;
|
this->Set_f1bit7(1);
|
||||||
this->m_flags1 = bVar1 & 0xc0;
|
this->Set_f2bit1(1);
|
||||||
this->m_flags1 = bVar1 & 0xc0 | 0x40;
|
|
||||||
this->m_flags1 = 0xc0;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,85 +3,46 @@
|
|||||||
|
|
||||||
#include "legoinc.h"
|
#include "legoinc.h"
|
||||||
|
|
||||||
|
// Must be union with struct for match.
|
||||||
|
typedef union {
|
||||||
|
struct {
|
||||||
|
BYTE bit0: 1;
|
||||||
|
BYTE bit1: 1;
|
||||||
|
BYTE bit2: 1;
|
||||||
|
BYTE bit3: 1;
|
||||||
|
BYTE bit4: 1;
|
||||||
|
BYTE bit5: 1;
|
||||||
|
BYTE bit6: 1;
|
||||||
|
BYTE bit7: 1;
|
||||||
|
};
|
||||||
|
// BYTE all; // ?
|
||||||
|
} flag_bitfield;
|
||||||
|
|
||||||
class MxVideoParamFlags
|
class MxVideoParamFlags
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum LowFlags
|
|
||||||
{
|
|
||||||
FULL_SCREEN = 0x1,
|
|
||||||
FLIP_SURFACES = 0x2,
|
|
||||||
BACK_BUFFERS = 0x4,
|
|
||||||
ENABLE_16BIT = 0x20,
|
|
||||||
WIDE_VIEW_ANGLE = 0x40,
|
|
||||||
UNKNOWN3 = 0x80
|
|
||||||
};
|
|
||||||
|
|
||||||
enum HighFlags
|
|
||||||
{
|
|
||||||
UNKNOWN1 = 0x1,
|
|
||||||
UNKNOWN2 = 0x2
|
|
||||||
};
|
|
||||||
|
|
||||||
__declspec(dllexport) MxVideoParamFlags();
|
__declspec(dllexport) MxVideoParamFlags();
|
||||||
|
|
||||||
inline void EnableFullScreen(BOOL e)
|
inline void SetFullScreen(BOOL e) { m_flags1.bit0 = e; }
|
||||||
{
|
inline void SetFlipSurfaces(BOOL e) { m_flags1.bit1 = e; }
|
||||||
m_flags1 = (m_flags1 ^ (e << 0)) & FULL_SCREEN ^ m_flags1;
|
inline void SetBackBuffers(BOOL e) { m_flags1.bit2 = e; }
|
||||||
}
|
inline void Set_f1bit3(BOOL e) { m_flags1.bit3 = e; }
|
||||||
|
inline void Set_f1bit4(BOOL e) { m_flags1.bit4 = e; }
|
||||||
inline void EnableFlipSurfaces(BOOL e)
|
inline void Set16Bit(BYTE e) { m_flags1.bit5 = e; }
|
||||||
{
|
inline void SetWideViewAngle(BOOL e) { m_flags1.bit6 = e; }
|
||||||
m_flags1 = (m_flags1 ^ (e << 1)) & FLIP_SURFACES ^ m_flags1;
|
inline void Set_f1bit7(BOOL e) { m_flags1.bit7 = e; }
|
||||||
}
|
inline void Set_f2bit0(BOOL e) { m_flags2.bit0 = e; }
|
||||||
|
inline void Set_f2bit1(BOOL e) { m_flags2.bit1 = e; }
|
||||||
inline void EnableBackBuffers(BOOL e)
|
inline void Set_f2bit2(BOOL e) { m_flags2.bit2 = e; }
|
||||||
{
|
inline void Set_f2bit3(BOOL e) { m_flags2.bit3 = e; }
|
||||||
m_flags1 = (m_flags1 ^ ((!e) << 2)) & BACK_BUFFERS ^ m_flags1;
|
inline void Set_f2bit4(BOOL e) { m_flags2.bit4 = e; }
|
||||||
}
|
inline void Set_f2bit5(BOOL e) { m_flags2.bit5 = e; }
|
||||||
|
inline void Set_f2bit6(BOOL e) { m_flags2.bit6 = e; }
|
||||||
inline void SetUnknown3(BOOL e)
|
inline void Set_f2bit7(BOOL e) { m_flags2.bit7 = e; }
|
||||||
{
|
|
||||||
m_flags1 = (m_flags1 ^ (e << 7)) & UNKNOWN3 ^ m_flags1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Set8Bit()
|
|
||||||
{
|
|
||||||
m_flags1 &= ~ENABLE_16BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Set16Bit()
|
|
||||||
{
|
|
||||||
m_flags1 |= ENABLE_16BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Enable16Bit(unsigned char e)
|
|
||||||
{
|
|
||||||
m_flags1 = ((e << 5) ^ m_flags1) & ENABLE_16BIT ^ m_flags1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void EnableWideViewAngle(BOOL e)
|
|
||||||
{
|
|
||||||
m_flags1 = (m_flags1 ^ (e << 6)) & WIDE_VIEW_ANGLE ^ m_flags1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void EnableUnknown1(BOOL e)
|
|
||||||
{
|
|
||||||
m_flags2 = (m_flags2 ^ ((!e) << 0)) & UNKNOWN1 ^ m_flags2;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void EnableUnknown2(BOOL e)
|
|
||||||
{
|
|
||||||
m_flags2 = (m_flags2 ^ (e << 1)) & UNKNOWN2 ^ m_flags2;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void EnableUnknown2()
|
|
||||||
{
|
|
||||||
m_flags2 |= UNKNOWN2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned char m_flags1;
|
flag_bitfield m_flags1;
|
||||||
unsigned char m_flags2;
|
flag_bitfield m_flags2;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
137
isle.mak
137
isle.mak
@ -288,7 +288,6 @@ CLEAN :
|
|||||||
-@erase "$(INTDIR)\isle.obj"
|
-@erase "$(INTDIR)\isle.obj"
|
||||||
-@erase "$(INTDIR)\isle.res"
|
-@erase "$(INTDIR)\isle.res"
|
||||||
-@erase "$(INTDIR)\main.obj"
|
-@erase "$(INTDIR)\main.obj"
|
||||||
-@erase "$(INTDIR)\mx.obj"
|
|
||||||
-@erase "$(INTDIR)\vc40.pdb"
|
-@erase "$(INTDIR)\vc40.pdb"
|
||||||
-@erase ".\Release\ISLE.EXE"
|
-@erase ".\Release\ISLE.EXE"
|
||||||
-@erase ".\Release\ISLE.PDB"
|
-@erase ".\Release\ISLE.PDB"
|
||||||
@ -350,7 +349,6 @@ LINK32_OBJS= \
|
|||||||
"$(INTDIR)\isle.obj" \
|
"$(INTDIR)\isle.obj" \
|
||||||
"$(INTDIR)\isle.res" \
|
"$(INTDIR)\isle.res" \
|
||||||
"$(INTDIR)\main.obj" \
|
"$(INTDIR)\main.obj" \
|
||||||
"$(INTDIR)\mx.obj" \
|
|
||||||
".\Release\LEGO1.LIB"
|
".\Release\LEGO1.LIB"
|
||||||
|
|
||||||
".\Release\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
".\Release\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
@ -380,7 +378,6 @@ CLEAN :
|
|||||||
-@erase "$(INTDIR)\isle.obj"
|
-@erase "$(INTDIR)\isle.obj"
|
||||||
-@erase "$(INTDIR)\isle.res"
|
-@erase "$(INTDIR)\isle.res"
|
||||||
-@erase "$(INTDIR)\main.obj"
|
-@erase "$(INTDIR)\main.obj"
|
||||||
-@erase "$(INTDIR)\mx.obj"
|
|
||||||
-@erase "$(INTDIR)\vc40.idb"
|
-@erase "$(INTDIR)\vc40.idb"
|
||||||
-@erase "$(INTDIR)\vc40.pdb"
|
-@erase "$(INTDIR)\vc40.pdb"
|
||||||
-@erase ".\Debug\ISLE.EXE"
|
-@erase ".\Debug\ISLE.EXE"
|
||||||
@ -444,7 +441,6 @@ LINK32_OBJS= \
|
|||||||
"$(INTDIR)\isle.obj" \
|
"$(INTDIR)\isle.obj" \
|
||||||
"$(INTDIR)\isle.res" \
|
"$(INTDIR)\isle.res" \
|
||||||
"$(INTDIR)\main.obj" \
|
"$(INTDIR)\main.obj" \
|
||||||
"$(INTDIR)\mx.obj" \
|
|
||||||
".\LEGO1\Debug\LEGO1.lib"
|
".\LEGO1\Debug\LEGO1.lib"
|
||||||
|
|
||||||
".\Debug\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
".\Debug\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
@ -551,6 +547,7 @@ DEP_CPP_LEGOO=\
|
|||||||
|
|
||||||
SOURCE=.\LEGO1\mxcriticalsection.cpp
|
SOURCE=.\LEGO1\mxcriticalsection.cpp
|
||||||
DEP_CPP_MXCRI=\
|
DEP_CPP_MXCRI=\
|
||||||
|
".\LEGO1\legoinc.h"\
|
||||||
".\LEGO1\mxcriticalsection.h"\
|
".\LEGO1\mxcriticalsection.h"\
|
||||||
|
|
||||||
|
|
||||||
@ -564,6 +561,7 @@ DEP_CPP_MXCRI=\
|
|||||||
|
|
||||||
SOURCE=.\LEGO1\mxautolocker.cpp
|
SOURCE=.\LEGO1\mxautolocker.cpp
|
||||||
DEP_CPP_MXAUT=\
|
DEP_CPP_MXAUT=\
|
||||||
|
".\LEGO1\legoinc.h"\
|
||||||
".\LEGO1\mxautolocker.h"\
|
".\LEGO1\mxautolocker.h"\
|
||||||
".\LEGO1\mxcriticalsection.h"\
|
".\LEGO1\mxcriticalsection.h"\
|
||||||
|
|
||||||
@ -850,9 +848,6 @@ DEP_CPP_DEFIN=\
|
|||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\ISLE\isle.cpp
|
SOURCE=.\ISLE\isle.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "ISLE - Win32 Release"
|
|
||||||
|
|
||||||
DEP_CPP_ISLE_=\
|
DEP_CPP_ISLE_=\
|
||||||
".\ISLE\define.h"\
|
".\ISLE\define.h"\
|
||||||
".\ISLE\isle.h"\
|
".\ISLE\isle.h"\
|
||||||
@ -910,72 +905,11 @@ DEP_CPP_ISLE_=\
|
|||||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||||
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ISLE - Win32 Debug"
|
|
||||||
|
|
||||||
DEP_CPP_ISLE_=\
|
|
||||||
".\ISLE\define.h"\
|
|
||||||
".\ISLE\isle.h"\
|
|
||||||
".\ISLE\res\resource.h"\
|
|
||||||
".\LEGO1\lego3dmanager.h"\
|
|
||||||
".\LEGO1\lego3dview.h"\
|
|
||||||
".\LEGO1\legoanimationmanager.h"\
|
|
||||||
".\LEGO1\legobuildingmanager.h"\
|
|
||||||
".\LEGO1\legoentity.h"\
|
|
||||||
".\LEGO1\legogamestate.h"\
|
|
||||||
".\LEGO1\legoinc.h"\
|
|
||||||
".\LEGO1\legoinputmanager.h"\
|
|
||||||
".\LEGO1\legomodelpresenter.h"\
|
|
||||||
".\LEGO1\legonavcontroller.h"\
|
|
||||||
".\LEGO1\legoomni.h"\
|
|
||||||
".\LEGO1\legopartpresenter.h"\
|
|
||||||
".\LEGO1\legoroi.h"\
|
|
||||||
".\LEGO1\legovideomanager.h"\
|
|
||||||
".\LEGO1\legoworldpresenter.h"\
|
|
||||||
".\LEGO1\mxatomid.h"\
|
|
||||||
".\LEGO1\mxbackgroundaudiomanager.h"\
|
|
||||||
".\LEGO1\mxbool.h"\
|
|
||||||
".\LEGO1\mxcore.h"\
|
|
||||||
".\LEGO1\mxcriticalsection.h"\
|
|
||||||
".\LEGO1\mxdirectdraw.h"\
|
|
||||||
".\LEGO1\mxdsaction.h"\
|
|
||||||
".\LEGO1\mxdsfile.h"\
|
|
||||||
".\LEGO1\mxdsobject.h"\
|
|
||||||
".\LEGO1\mxeventmanager.h"\
|
|
||||||
".\LEGO1\mxmusicmanager.h"\
|
|
||||||
".\LEGO1\mxnotificationmanager.h"\
|
|
||||||
".\LEGO1\mxobjectfactory.h"\
|
|
||||||
".\LEGO1\mxomni.h"\
|
|
||||||
".\LEGO1\mxomnicreateflags.h"\
|
|
||||||
".\LEGO1\mxomnicreateparam.h"\
|
|
||||||
".\LEGO1\mxomnicreateparambase.h"\
|
|
||||||
".\LEGO1\mxresult.h"\
|
|
||||||
".\LEGO1\mxsoundmanager.h"\
|
|
||||||
".\LEGO1\mxstreamcontroller.h"\
|
|
||||||
".\LEGO1\mxstreamer.h"\
|
|
||||||
".\LEGO1\mxstring.h"\
|
|
||||||
".\LEGO1\mxticklemanager.h"\
|
|
||||||
".\LEGO1\mxtimer.h"\
|
|
||||||
".\LEGO1\mxtransitionmanager.h"\
|
|
||||||
".\LEGO1\mxvariabletable.h"\
|
|
||||||
".\LEGO1\mxvideomanager.h"\
|
|
||||||
".\LEGO1\mxvideoparam.h"\
|
|
||||||
".\LEGO1\viewmanager.h"\
|
|
||||||
|
|
||||||
|
|
||||||
"$(INTDIR)\isle.obj" : $(SOURCE) $(DEP_CPP_ISLE_) "$(INTDIR)"
|
|
||||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
|
||||||
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
################################################################################
|
################################################################################
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\ISLE\main.cpp
|
SOURCE=.\ISLE\main.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "ISLE - Win32 Release"
|
|
||||||
|
|
||||||
DEP_CPP_MAIN_=\
|
DEP_CPP_MAIN_=\
|
||||||
".\ISLE\define.h"\
|
".\ISLE\define.h"\
|
||||||
".\ISLE\isle.h"\
|
".\ISLE\isle.h"\
|
||||||
@ -1026,57 +960,6 @@ DEP_CPP_MAIN_=\
|
|||||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||||
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ISLE - Win32 Debug"
|
|
||||||
|
|
||||||
DEP_CPP_MAIN_=\
|
|
||||||
".\ISLE\define.h"\
|
|
||||||
".\ISLE\isle.h"\
|
|
||||||
".\LEGO1\lego3dmanager.h"\
|
|
||||||
".\LEGO1\lego3dview.h"\
|
|
||||||
".\LEGO1\legoentity.h"\
|
|
||||||
".\LEGO1\legogamestate.h"\
|
|
||||||
".\LEGO1\legoinc.h"\
|
|
||||||
".\LEGO1\legoinputmanager.h"\
|
|
||||||
".\LEGO1\legonavcontroller.h"\
|
|
||||||
".\LEGO1\legoomni.h"\
|
|
||||||
".\LEGO1\legoroi.h"\
|
|
||||||
".\LEGO1\legovideomanager.h"\
|
|
||||||
".\LEGO1\mxatomid.h"\
|
|
||||||
".\LEGO1\mxbackgroundaudiomanager.h"\
|
|
||||||
".\LEGO1\mxbool.h"\
|
|
||||||
".\LEGO1\mxcore.h"\
|
|
||||||
".\LEGO1\mxcriticalsection.h"\
|
|
||||||
".\LEGO1\mxdsaction.h"\
|
|
||||||
".\LEGO1\mxdsfile.h"\
|
|
||||||
".\LEGO1\mxdsobject.h"\
|
|
||||||
".\LEGO1\mxeventmanager.h"\
|
|
||||||
".\LEGO1\mxmusicmanager.h"\
|
|
||||||
".\LEGO1\mxnotificationmanager.h"\
|
|
||||||
".\LEGO1\mxobjectfactory.h"\
|
|
||||||
".\LEGO1\mxomni.h"\
|
|
||||||
".\LEGO1\mxomnicreateflags.h"\
|
|
||||||
".\LEGO1\mxomnicreateparam.h"\
|
|
||||||
".\LEGO1\mxomnicreateparambase.h"\
|
|
||||||
".\LEGO1\mxresult.h"\
|
|
||||||
".\LEGO1\mxsoundmanager.h"\
|
|
||||||
".\LEGO1\mxstreamcontroller.h"\
|
|
||||||
".\LEGO1\mxstreamer.h"\
|
|
||||||
".\LEGO1\mxstring.h"\
|
|
||||||
".\LEGO1\mxticklemanager.h"\
|
|
||||||
".\LEGO1\mxtimer.h"\
|
|
||||||
".\LEGO1\mxtransitionmanager.h"\
|
|
||||||
".\LEGO1\mxvariabletable.h"\
|
|
||||||
".\LEGO1\mxvideomanager.h"\
|
|
||||||
".\LEGO1\mxvideoparam.h"\
|
|
||||||
".\LEGO1\viewmanager.h"\
|
|
||||||
|
|
||||||
|
|
||||||
"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
|
|
||||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
|
||||||
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
################################################################################
|
################################################################################
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@ -1517,22 +1400,6 @@ SOURCE=.\LEGO1\mxvideoparamflags.h
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# End Project Dependency
|
# End Project Dependency
|
||||||
################################################################################
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\ISLE\mx.cpp
|
|
||||||
DEP_CPP_MX_CP=\
|
|
||||||
".\LEGO1\mxatomid.h"\
|
|
||||||
".\LEGO1\mxbool.h"\
|
|
||||||
".\LEGO1\mxcore.h"\
|
|
||||||
".\LEGO1\mxdsobject.h"\
|
|
||||||
|
|
||||||
|
|
||||||
"$(INTDIR)\mx.obj" : $(SOURCE) $(DEP_CPP_MX_CP) "$(INTDIR)"
|
|
||||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
|
||||||
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@ -118,14 +118,23 @@ def __init__(self, pdb, file):
|
|||||||
if current_section == 'SYMBOLS' and 'S_GPROC32' in line:
|
if current_section == 'SYMBOLS' and 'S_GPROC32' in line:
|
||||||
addr = int(line[26:34], 16)
|
addr = int(line[26:34], 16)
|
||||||
|
|
||||||
debug_offs = line_dump[i + 2]
|
|
||||||
debug_start = int(debug_offs[22:30], 16)
|
|
||||||
debug_end = int(debug_offs[43:], 16)
|
|
||||||
|
|
||||||
info = RecompiledInfo()
|
info = RecompiledInfo()
|
||||||
info.addr = addr + recompfile.imagebase + recompfile.textvirt
|
info.addr = addr + recompfile.imagebase + recompfile.textvirt
|
||||||
info.start = debug_start
|
|
||||||
info.size = debug_end - debug_start
|
use_dbg_offs = False
|
||||||
|
if use_dbg_offs:
|
||||||
|
debug_offs = line_dump[i + 2]
|
||||||
|
debug_start = int(debug_offs[22:30], 16)
|
||||||
|
debug_end = int(debug_offs[43:], 16)
|
||||||
|
|
||||||
|
info.start = debug_start
|
||||||
|
info.size = debug_end - debug_start
|
||||||
|
else:
|
||||||
|
info.start = 0
|
||||||
|
info.size = int(line[41:49], 16)
|
||||||
|
|
||||||
info.name = line[77:]
|
info.name = line[77:]
|
||||||
|
|
||||||
self.funcs[addr] = info
|
self.funcs[addr] = info
|
||||||
@ -189,7 +198,14 @@ def get_recompiled_address(self, filename, line):
|
|||||||
def sanitize(file, mnemonic, op_str):
|
def sanitize(file, mnemonic, op_str):
|
||||||
offsetplaceholder = '<OFFSET>'
|
offsetplaceholder = '<OFFSET>'
|
||||||
|
|
||||||
if mnemonic == 'call' or mnemonic == 'jmp':
|
op_str_is_number = False
|
||||||
|
try:
|
||||||
|
int(op_str, 16)
|
||||||
|
op_str_is_number = True
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if (mnemonic == 'call' or mnemonic == 'jmp') and op_str_is_number:
|
||||||
# Filter out "calls" because the offsets we're not currently trying to
|
# Filter out "calls" because the offsets we're not currently trying to
|
||||||
# match offsets. As long as there's a call in the right place, it's
|
# match offsets. As long as there's a call in the right place, it's
|
||||||
# probably accurate.
|
# probably accurate.
|
||||||
@ -243,6 +259,10 @@ def parse_asm(file, addr, size):
|
|||||||
total_accuracy = 0
|
total_accuracy = 0
|
||||||
htmlinsert = []
|
htmlinsert = []
|
||||||
|
|
||||||
|
# Generate basename of original file, used in locating OFFSET lines
|
||||||
|
basename = os.path.basename(os.path.splitext(original)[0])
|
||||||
|
pattern = '// OFFSET:'
|
||||||
|
|
||||||
for subdir, dirs, files in os.walk(source):
|
for subdir, dirs, files in os.walk(source):
|
||||||
for file in files:
|
for file in files:
|
||||||
srcfilename = os.path.join(os.path.abspath(subdir), file)
|
srcfilename = os.path.join(os.path.abspath(subdir), file)
|
||||||
@ -257,9 +277,14 @@ def parse_asm(file, addr, size):
|
|||||||
if not line:
|
if not line:
|
||||||
break
|
break
|
||||||
|
|
||||||
if line.startswith('// OFFSET:'):
|
line = line.strip()
|
||||||
par = line[10:].strip().split()
|
|
||||||
|
if line.startswith(pattern):
|
||||||
|
par = line[len(pattern):].strip().split()
|
||||||
module = par[0]
|
module = par[0]
|
||||||
|
if module != basename:
|
||||||
|
continue
|
||||||
|
|
||||||
addr = int(par[1], 16)
|
addr = int(par[1], 16)
|
||||||
|
|
||||||
find_open_bracket = line
|
find_open_bracket = line
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user