Merge branch 'master' into mxpalette

This commit is contained in:
Joshua Peisach 2023-06-30 17:18:26 -04:00 committed by GitHub
commit 959efb55b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 820 additions and 4882 deletions

View File

@ -26,7 +26,7 @@ jobs:
key: dx5sdk
- name: Download DX5 SDK
if: steps.cache-dx5.outputs.cache-hit != 'true'
if: ${{ !steps.cache-dx5.outputs.cache-hit }}
run: |
cd dx5sdk
curl -fLOSs https://archive.org/download/idx5sdk/idx5sdk.exe
@ -34,8 +34,7 @@ jobs:
7z x .\DX5SDK.EXE
- name: Cache DX5 SDK
if: steps.cache-dx5.outputs.cache-hit != 'true'
id: save-dx5
if: ${{ !steps.cache-dx5.outputs.cache-hit }}
uses: actions/cache/save@v3
with:
path: dx5sdk
@ -47,22 +46,47 @@ jobs:
cd cdrom
.\SETUP.EXE /s
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
# Use 2.8 for maximum backwards compatibility
cmake-version: '2.8.x'
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
mkdir Release
.\msvc420\bin\NMAKE.EXE /f isle.mak CFG="ISLE - Win32 Release"
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
cmake --build .
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v3
with:
path: legobin
key: legobin
- name: Download original island binares
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
- name: Cache original binaries
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
uses: actions/cache/save@v3
with:
path: legobin
key: legobin
- name: Summarize Accuracy
shell: bash
run: |
curl -fLOSs https://legoisland.org/download/ISLE.EXE
curl -fLOSs https://legoisland.org/download/LEGO1.DLL
pip install capstone
pip install colorama
python3 tools/reccmp/reccmp.py -S ISLEPROGRESS.SVG --svg-icon tools/reccmp/isle.png -H ISLEPROGRESS.HTML ISLE.EXE Release/ISLE.EXE Release/ISLE.PDB . | tee ISLEPROGRESS.TXT
python3 tools/reccmp/reccmp.py -S LEGO1PROGRESS.SVG -T 1929 --svg-icon tools/reccmp/lego1.png -H LEGO1PROGRESS.HTML LEGO1.DLL Release/LEGO1.DLL Release/LEGO1.PDB . | tee LEGO1PROGRESS.TXT
pip install -r tools/reccmp/requirements.txt
python3 tools/reccmp/reccmp.py -S ISLEPROGRESS.SVG --svg-icon tools/reccmp/isle.png -H ISLEPROGRESS.HTML legobin/ISLE.EXE build/ISLE.EXE build/ISLE.PDB . | tee ISLEPROGRESS.TXT
python3 tools/reccmp/reccmp.py -S LEGO1PROGRESS.SVG -T 1929 --svg-icon tools/reccmp/lego1.png -H LEGO1PROGRESS.HTML legobin/LEGO1.DLL build/LEGO1.DLL build/LEGO1.PDB . | tee LEGO1PROGRESS.TXT
- name: Compare Accuracy With Current Master
shell: bash
@ -73,17 +97,27 @@ jobs:
diff -u ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
diff -u LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
- name: Test Exports
shell: bash
run: |
python3 tools/verexp/verexp.py legobin/LEGO1.DLL build/LEGO1.DLL
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Win32
path: |
Release
ISLEPROGRESS.HTML
LEGO1PROGRESS.HTML
ISLEPROGRESS.SVG
LEGO1PROGRESS.SVG
build/ISLE.EXE
build/LEGO1.DLL
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Accuracy Report
path: |
ISLEPROGRESS.*
LEGO1PROGRESS.*
- name: Upload Continuous Release
shell: bash
@ -100,13 +134,7 @@ jobs:
curl -fLOSs https://raw.githubusercontent.com/probonopd/uploadtool/master/upload.sh
./upload.sh \
Release/ISLE.EXE \
Release/LEGO1.DLL \
ISLEPROGRESS.HTML \
ISLEPROGRESS.TXT \
ISLEPROGRESS.SVG \
ISLEPROGRESS.PNG \
LEGO1PROGRESS.HTML \
LEGO1PROGRESS.TXT \
LEGO1PROGRESS.PNG \
LEGO1PROGRESS.SVG
build/ISLE.EXE \
build/LEGO1.DLL \
ISLEPROGRESS.* \
LEGO1PROGRESS.*

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ Release/
*.ncb
ISLE.EXE
LEGO1.DLL
build/

220
CMakeLists.txt Normal file
View File

@ -0,0 +1,220 @@
cmake_minimum_required(VERSION 2.8...3.5 FATAL_ERROR)
project(isle CXX)
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
add_library(lego1 SHARED
LEGO1/act1state.cpp
LEGO1/act2brick.cpp
LEGO1/act2policestation.cpp
LEGO1/act3.cpp
LEGO1/act3shark.cpp
LEGO1/act3state.cpp
LEGO1/ambulance.cpp
LEGO1/ambulancemissionstate.cpp
LEGO1/animstate.cpp
LEGO1/beachhouseentity.cpp
LEGO1/bike.cpp
LEGO1/buildingentity.cpp
LEGO1/bumpbouy.cpp
LEGO1/carrace.cpp
LEGO1/dllmain.cpp
LEGO1/dunebuggy.cpp
LEGO1/elevatorbottom.cpp
LEGO1/gasstation.cpp
LEGO1/gasstationentity.cpp
LEGO1/gasstationstate.cpp
LEGO1/helicopter.cpp
LEGO1/helicopterstate.cpp
LEGO1/historybook.cpp
LEGO1/hospital.cpp
LEGO1/hospitalentity.cpp
LEGO1/hospitalstate.cpp
LEGO1/infocenter.cpp
LEGO1/infocenterdoor.cpp
LEGO1/infocenterentity.cpp
LEGO1/infocenterstate.cpp
LEGO1/isle.cpp
LEGO1/isleactor.cpp
LEGO1/islepathactor.cpp
LEGO1/jetski.cpp
LEGO1/jetskirace.cpp
LEGO1/jukebox.cpp
LEGO1/jukeboxentity.cpp
LEGO1/jukeboxstate.cpp
LEGO1/legoact2state.cpp
LEGO1/legoactioncontrolpresenter.cpp
LEGO1/legoanimactor.cpp
LEGO1/legoanimationmanager.cpp
LEGO1/legoanimmmpresenter.cpp
LEGO1/legoanimpresenter.cpp
LEGO1/legobackgroundcolor.cpp
LEGO1/legobuildingmanager.cpp
LEGO1/legocachesound.cpp
LEGO1/legocameracontroller.cpp
LEGO1/legocarbuild.cpp
LEGO1/legocarbuildanimpresenter.cpp
LEGO1/legocontrolmanager.cpp
LEGO1/legoentity.cpp
LEGO1/legoentitypresenter.cpp
LEGO1/legoflctexturepresenter.cpp
LEGO1/legogamestate.cpp
LEGO1/legohideanimpresenter.cpp
LEGO1/legoinputmanager.cpp
LEGO1/legojetski.cpp
LEGO1/legoloadcachesoundpresenter.cpp
LEGO1/legolocomotionanimpresenter.cpp
LEGO1/legomodelpresenter.cpp
LEGO1/legonavcontroller.cpp
LEGO1/legoomni.cpp
LEGO1/legopalettepresenter.cpp
LEGO1/legopartpresenter.cpp
LEGO1/legopathactor.cpp
LEGO1/legopathcontroller.cpp
LEGO1/legopathpresenter.cpp
LEGO1/legophonemepresenter.cpp
LEGO1/legoplantmanager.cpp
LEGO1/legorace.cpp
LEGO1/legoroi.cpp
LEGO1/legosoundmanager.cpp
LEGO1/legostate.cpp
LEGO1/legotexturepresenter.cpp
LEGO1/legovideomanager.cpp
LEGO1/legoworld.cpp
LEGO1/legoworldpresenter.cpp
LEGO1/motorcycle.cpp
LEGO1/mxatomid.cpp
LEGO1/mxaudiopresenter.cpp
LEGO1/mxautolocker.cpp
LEGO1/mxbackgroundaudiomanager.cpp
LEGO1/mxbitmap.cpp
LEGO1/mxcompositemediapresenter.cpp
LEGO1/mxcompositepresenter.cpp
LEGO1/mxcontrolpresenter.cpp
LEGO1/mxcore.cpp
LEGO1/mxcriticalsection.cpp
LEGO1/mxdirectdraw.cpp
LEGO1/mxdiskstreamcontroller.cpp
LEGO1/mxdiskstreamprovider.cpp
LEGO1/mxdsaction.cpp
LEGO1/mxdsanim.cpp
LEGO1/mxdschunk.cpp
LEGO1/mxdsevent.cpp
LEGO1/mxdsfile.cpp
LEGO1/mxdsmediaaction.cpp
LEGO1/mxdsmultiaction.cpp
LEGO1/mxdsobject.cpp
LEGO1/mxdsobjectaction.cpp
LEGO1/mxdsparallelaction.cpp
LEGO1/mxdsselectaction.cpp
LEGO1/mxdsserialaction.cpp
LEGO1/mxdssound.cpp
LEGO1/mxdssource.cpp
LEGO1/mxdsstill.cpp
LEGO1/mxdssubscriber.cpp
LEGO1/mxentity.cpp
LEGO1/mxeventmanager.cpp
LEGO1/mxeventpresenter.cpp
LEGO1/mxflcpresenter.cpp
LEGO1/mxioinfo.cpp
LEGO1/mxloopingflcpresenter.cpp
LEGO1/mxloopingsmkpresenter.cpp
LEGO1/mxmediapresenter.cpp
LEGO1/mxmusicpresenter.cpp
LEGO1/mxnotificationmanager.cpp
LEGO1/mxomni.cpp
LEGO1/mxomnicreateflags.cpp
LEGO1/mxomnicreateparam.cpp
LEGO1/mxomnicreateparambase.cpp
LEGO1/mxpalette.cpp
LEGO1/mxpresenter.cpp
LEGO1/mxscheduler.cpp
LEGO1/mxsmkpresenter.cpp
LEGO1/mxsoundmanager.cpp
LEGO1/mxsoundpresenter.cpp
LEGO1/mxstillpresenter.cpp
LEGO1/mxstreamer.cpp
LEGO1/mxstring.cpp
LEGO1/mxtimer.cpp
LEGO1/mxtransitionmanager.cpp
LEGO1/mxunknown100dc6b0.cpp
LEGO1/mxvariabletable.cpp
LEGO1/mxvideomanager.cpp
LEGO1/mxvideoparam.cpp
LEGO1/mxvideoparamflags.cpp
LEGO1/mxvideopresenter.cpp
LEGO1/mxwavepresenter.cpp
LEGO1/pizza.cpp
LEGO1/pizzamissionstate.cpp
LEGO1/pizzeria.cpp
LEGO1/pizzeriastate.cpp
LEGO1/police.cpp
LEGO1/policeentity.cpp
LEGO1/policestate.cpp
LEGO1/racecar.cpp
LEGO1/racestandsentity.cpp
LEGO1/racestate.cpp
LEGO1/radio.cpp
LEGO1/radiostate.cpp
LEGO1/realtimeview.cpp
LEGO1/registrationbook.cpp
LEGO1/score.cpp
LEGO1/scorestate.cpp
LEGO1/skateboard.cpp
LEGO1/towtrack.cpp
LEGO1/towtrackmissionstate.cpp
LEGO1/viewmanager.cpp
)
# Link libraries
target_link_libraries(lego1 PRIVATE ddraw dsound winmm)
# Make sure filenames are ALL CAPS
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
set_property(TARGET lego1 PROPERTY SUFFIX ".DLL")
if (ISLE_BUILD_APP)
add_executable(isle WIN32
ISLE/res/isle.rc
ISLE/isleapp.cpp
ISLE/define.cpp
)
# Include LEGO1 headers in ISLE
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
# Link DSOUND, WINMM, and LEGO1
target_link_libraries(isle PRIVATE dsound winmm lego1)
# Make sure filenames are ALL CAPS
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
set_property(TARGET isle PROPERTY SUFFIX ".EXE")
endif()
if (MSVC)
# These flags have been taken from the defaults for a Visual C++ 4.20 project (the compiler the
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
target_compile_options(isle PRIVATE "/ML$<$<CONFIG:Debug>:d>")
target_compile_options(lego1 PRIVATE "/MT$<$<CONFIG:Debug>:d>")
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Zi /Od /D \"_DEBUG\"")
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /D \"NDEBUG\"")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /D \"NDEBUG\"")
set(CMAKE_CXX_FLAGS_MINSIZEREL "/Os /D \"NDEBUG\"")
set(CMAKE_EXE_LINKER_FLAGS "/machine:I386")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/incremental:no")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/incremental:no")
set(CMAKE_SHARED_LINKER_FLAGS "/machine:I386")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/incremental:no")
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "/incremental:no")
endif()

View File

@ -1,137 +0,0 @@
;
; Definition file of Lego1.dll
; Automatic generated by gendef
; written by Kai Tietz 2008
;
LIBRARY "Lego1.dll"
EXPORTS
??0LegoBackgroundColor@@QAE@PBD0@Z ; has WINAPI (@8)
??0LegoGameState@@QAE@XZ
??0LegoWorld@@QAE@XZ
??0MxAtomId@@QAE@PBDW4LookupMode@@@Z ; has WINAPI (@8)
??0MxBitmap@@QAE@XZ
??0MxCore@@QAE@XZ
??0MxCriticalSection@@QAE@XZ
??0MxDSAction@@QAE@XZ
??0MxDSFile@@QAE@PBDK@Z ; has WINAPI (@8)
??0MxOmniCreateFlags@@QAE@XZ
??0MxOmniCreateParam@@QAE@PBDPAUHWND__@@AAVMxVideoParam@@VMxOmniCreateFlags@@@Z ; has WINAPI (@16)
??0MxString@@QAE@ABV0@@Z ; has WINAPI (@4)
??0MxVideoParam@@QAE@AAV0@@Z ; has WINAPI (@4)
??0MxVideoParam@@QAE@AAVMxRect32@@PAVMxPalette@@KAAVMxVideoParamFlags@@@Z ; has WINAPI (@16)
??0MxVideoParam@@QAE@XZ
??0MxVideoParamFlags@@QAE@XZ
??1LegoEntity@@UAE@XZ
??1LegoGameState@@QAE@XZ
??1LegoWorld@@UAE@XZ
??1MXIOINFO@@QAE@XZ
??1MxAtomId@@QAE@XZ
??1MxBitmap@@UAE@XZ
??1MxCore@@UAE@XZ
??1MxCriticalSection@@QAE@XZ
??1MxDSAction@@UAE@XZ
??1MxDSFile@@UAE@XZ
??1MxPresenter@@UAE@XZ
??1MxString@@UAE@XZ
??1MxVideoParam@@QAE@XZ
??4MxAtomId@@QAEAAV0@ABV0@@Z ; has WINAPI (@4)
??4MxString@@QAEABV0@PBD@Z ; has WINAPI (@4)
??4MxVideoParam@@QAEAAV0@ABV0@@Z ; has WINAPI (@4)
??8MxPalette@@QAEEAAV0@@Z ; has WINAPI (@4)
?BackgroundAudioManager@@YAPAVMxBackgroundAudioManager@@XZ
?Close@MxDSFile@@UAEJXZ
?Close@MxStreamer@@QAEJPBD@Z ; has WINAPI (@4)
?CreateBackgroundAudio@LegoOmni@@QAEXXZ
?CreateInstance@LegoOmni@@SAXXZ
?CreatePalette@MxBitmap@@UAEPAVMxPalette@@XZ
?CreateStreamObject@@YAPAVMxDSObject@@PAVMxDSFile@@F@Z
?DestroyInstance@MxOmni@@SAXXZ
?Detach@MxPalette@@QAEXXZ
?DisableRMDevice@LegoVideoManager@@QAEHXZ
?DoneTickle@MxPresenter@@MAEXXZ
?Enable@MxBackgroundAudioManager@@QAEXE@Z ; has WINAPI (@4)
?Enable@MxPresenter@@UAEXE@Z ; has WINAPI (@4)
?EnableFullScreenMovie@LegoVideoManager@@QAEXEE@Z ; has WINAPI (@8)
?EnableRMDevice@LegoVideoManager@@QAEHXZ
?EndAction@MxPresenter@@UAEXXZ
?EventManager@@YAPAVMxEventManager@@XZ
?FlipToGDISurface@MxDirectDraw@@QAEHXZ
?GameState@@YAPAVLegoGameState@@XZ
?GetBufferSize@MxDSFile@@UAEKXZ
?GetCD@MxOmni@@SAPBDXZ
?GetCurrPathInfo@LegoOmni@@SAHPAPAVLegoPathBoundary@@AAH@Z
?GetDefaults@LegoNavController@@SAXPAHPAM11111111PAE@Z
?GetHD@MxOmni@@SAPBDXZ
?GetInstance@LegoOmni@@SAPAV1@XZ
?GetInstance@MxOmni@@SAPAV1@XZ
?GetInstance@MxScheduler@@SAPAV1@XZ
?GetNoCD_SourceName@@YAPBDXZ
?GetPartsThreshold@RealtimeView@@SAMXZ
?GetPrimaryBitDepth@MxDirectDraw@@SAHXZ
?GetRealTime@MxTimer@@QAEJXZ
?GetStreamBuffersNum@MxDSFile@@UAEKXZ
?GetUserMaxLOD@RealtimeView@@SAMXZ
?GetVariable@MxVariableTable@@QAEPBDPBD@Z ; has WINAPI (@4)
?Init@MxPresenter@@IAEXXZ
?InputManager@@YAPAVLegoInputManager@@XZ
?InvalidateRect@MxVideoManager@@QAEXAAVMxRect32@@@Z ; has WINAPI (@4)
?IsSound3D@MxOmni@@SAEXZ
?Lego@@YAPAVLegoOmni@@XZ
?Load@LegoGameState@@QAEJK@Z ; has WINAPI (@4)
?MSoundManager@@YAPAVMxSoundManager@@XZ
?MakeSourceName@@YAXPADPBD@Z
?MoveCursor@LegoVideoManager@@QAEXHH@Z ; has WINAPI (@8)
?MusicManager@@YAPAVMxMusicManager@@XZ
?NotificationManager@@YAPAVMxNotificationManager@@XZ
?Notify@MxCore@@UAEJAAVMxParam@@@Z ; has WINAPI (@4)
?Open@MxDSFile@@UAEJK@Z ; has WINAPI (@4)
?Open@MxStreamer@@QAEPAVMxStreamController@@PBDG@Z ; has WINAPI (@8)
?ParseExtra@MxPresenter@@MAEXXZ
?Pause@MxDirectDraw@@QAEHH@Z ; has WINAPI (@4)
?PickEntity@@YAPAVLegoEntity@@JJ@Z
?PickROI@@YAPAVLegoROI@@JJ@Z
?QueueEvent@LegoInputManager@@QAEXW4NotificationId@@EJJE@Z ; has WINAPI (@20)
?Read@MxBitmap@@UAEJPBD@Z ; has WINAPI (@4)
?Read@MxDSFile@@UAEJPAEK@Z ; has WINAPI (@8)
?RealizePalette@MxVideoManager@@UAEJPAVMxPalette@@@Z ; has WINAPI (@4)
?Register@LegoInputManager@@QAEXPAVMxCore@@@Z ; has WINAPI (@4)
?RemoveAll@ViewManager@@QAEXPAVViewROI@@@Z ; has WINAPI (@4)
?RemoveWorld@LegoOmni@@QAEXABVMxAtomId@@J@Z ; has WINAPI (@8)
?Save@LegoGameState@@QAEJK@Z ; has WINAPI (@4)
?Seek@MxDSFile@@UAEJJH@Z ; has WINAPI (@8)
?SerializePlayersInfo@LegoGameState@@QAEXF@Z ; has WINAPI (@4)
?SerializeScoreHistory@LegoGameState@@QAEXF@Z ; has WINAPI (@4)
?SetCD@MxOmni@@SAXPBD@Z
?SetDefaults@LegoNavController@@SAXHMMMMMMMMME@Z
?SetDeviceName@MxVideoParam@@QAEXPAD@Z ; has WINAPI (@4)
?SetDisplayBB@LegoROI@@QAEXH@Z ; has WINAPI (@4)
?SetDoMutex@MxCriticalSection@@SAXXZ
?SetHD@MxOmni@@SAXPBD@Z
?SetObjectName@MxDSObject@@QAEXPBD@Z ; has WINAPI (@4)
?SetOmniUserMessage@@YAXP6AXPBDH@Z@Z
?SetPartsThreshold@RealtimeView@@SAXM@Z
?SetSavePath@LegoGameState@@QAEXPAD@Z ; has WINAPI (@4)
?SetSound3D@MxOmni@@SAXE@Z
?SetUserMaxLOD@RealtimeView@@SAXM@Z
?SetVariable@MxVariableTable@@QAEXPAVMxVariable@@@Z ; has WINAPI (@4)
?SetVariable@MxVariableTable@@QAEXPBD0@Z ; has WINAPI (@8)
?SetWaitIndicator@MxTransitionManager@@QAEXPAVMxVideoPresenter@@@Z ; has WINAPI (@4)
?SoundManager@@YAPAVLegoSoundManager@@XZ
?Start@@YAJPAVMxDSAction@@@Z
?StartAction@MxPresenter@@UAEJPAVMxStreamController@@PAVMxDSAction@@@Z ; has WINAPI (@8)
?StartMultiTasking@MxScheduler@@QAEXK@Z ; has WINAPI (@4)
?Streamer@@YAPAVMxStreamer@@XZ
?Tickle@MxPresenter@@UAEJXZ
?TickleManager@@YAPAVMxTickleManager@@XZ
?Timer@@YAPAVMxTimer@@XZ
?TransitionManager@@YAPAVMxTransitionManager@@XZ
?UnRegister@LegoInputManager@@QAEXPAVMxCore@@@Z ; has WINAPI (@4)
?VariableTable@@YAPAVMxVariableTable@@XZ
?VideoManager@@YAPAVLegoVideoManager@@XZ
?configureLegoAnimationManager@LegoAnimationManager@@SAXH@Z
?configureLegoBuildingManager@LegoBuildingManager@@SAXH@Z
?configureLegoModelPresenter@LegoModelPresenter@@SAXH@Z
?configureLegoPartPresenter@LegoPartPresenter@@SAXHH@Z
?configureLegoROI@LegoROI@@SAXH@Z
?configureLegoWorldPresenter@LegoWorldPresenter@@SAXH@Z
_DllMain@12@12

Binary file not shown.

Binary file not shown.

View File

@ -1,9 +1,9 @@
#include "resource.h"
ISLE_ARROW CURSOR "ISLE/res/arrow.cur"
ISLE_NO CURSOR "ISLE/res/no.cur"
ISLE_BUSY CURSOR "ISLE/res/busy.cur"
APP_ICON ICON "ISLE/res/isle.ico"
ISLE_ARROW CURSOR "arrow.cur"
ISLE_NO CURSOR "no.cur"
ISLE_BUSY CURSOR "busy.cur"
APP_ICON ICON "isle.ico"
1 VERSIONINFO
FILEVERSION 1,1,0,0

View File

@ -1,7 +1,7 @@
#include <windows.h>
// OFFSET: LEGO1 0x10091ee0
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
}

View File

@ -1,5 +1,8 @@
#include "legoanimationmanager.h"
// 0x100f74f8
int g_legoAnimationManagerConfig = 1;
// OFFSET: LEGO1 0x1005eb60 STUB
LegoAnimationManager::LegoAnimationManager()
{
@ -32,3 +35,9 @@ void LegoAnimationManager::Init()
{
// TODO
}
// OFFSET: LEGO1 0x1005eb50
void LegoAnimationManager::configureLegoAnimationManager(int param_1)
{
g_legoAnimationManagerConfig = param_1;
}

View File

@ -0,0 +1,7 @@
#include "legobackgroundcolor.h"
// OFFSET: LEGO1 0x1003bfb0
LegoBackgroundColor::LegoBackgroundColor(const char *, const char *)
{
// TODO
}

View File

@ -1,13 +1,18 @@
#include "legobuildingmanager.h"
// 0x100f37cc
int g_buildingManagerConfig = 1;
// OFFSET: LEGO1 0x1002f8c0 STUB
LegoBuildingManager::LegoBuildingManager()
{
// TODO
}
// OFFSET: LEGO1 0x1002f960 STUB
LegoBuildingManager::~LegoBuildingManager()
{
// TODO
}
// OFFSET: LEGO1 0x1002f9d0 STUB
@ -15,3 +20,9 @@ void LegoBuildingManager::Init()
{
// TODO
}
// OFFSET: LEGO1 0x1002f8b0
void LegoBuildingManager::configureLegoBuildingManager(int param_1)
{
g_buildingManagerConfig = param_1;
}

45
LEGO1/legogamestate.cpp Normal file
View File

@ -0,0 +1,45 @@
#include "legogamestate.h"
// OFFSET: LEGO1 0x10039550
LegoGameState::LegoGameState()
{
// TODO
}
// OFFSET: LEGO1 0x10039720
LegoGameState::~LegoGameState()
{
// TODO
}
// OFFSET: LEGO1 0x10039c60
long LegoGameState::Load(unsigned long)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x10039980
long LegoGameState::Save(unsigned long p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1003a2e0
void LegoGameState::SerializePlayersInfo(short p)
{
// TODO
}
// OFFSET: LEGO1 0x1003cdd0
void LegoGameState::SerializeScoreHistory(short p)
{
// TODO
}
// OFFSET: LEGO1 0x10039f00
void LegoGameState::SetSavePath(char *p)
{
// TODO
}

View File

@ -12,6 +12,24 @@ LegoInputManager::~LegoInputManager()
// TODO
}
// OFFSET: LEGO1 0x1005c740 STUB
void LegoInputManager::QueueEvent(NotificationId id, unsigned char p2, long p3, long p4, unsigned char p5)
{
// TODO
}
// OFFSET: LEGO1 0x1005c470 STUB
void LegoInputManager::Register(MxCore *)
{
// TODO
}
// OFFSET: LEGO1 0x1005c5c0 STUB
void LegoInputManager::UnRegister(MxCore *)
{
// TODO
}
// OFFSET: LEGO1 0x1005b8b0 STUB
long LegoInputManager::Tickle()
{

View File

@ -0,0 +1,10 @@
#include "legomodelpresenter.h"
// 0x100f7ae0
int g_modelPresenterConfig = 1;
// OFFSET: LEGO1 0x1007f660
void LegoModelPresenter::configureLegoModelPresenter(int param_1)
{
g_modelPresenterConfig = param_1;
}

View File

@ -1,5 +1,11 @@
#include "legoomni.h"
// 0x100f4588
char *g_nocdSourceName = NULL;
// 0x101020e8
void (*g_omniUserMessage)(const char *,int);
// OFFSET: LEGO1 0x10058a00
LegoOmni::LegoOmni()
{
@ -12,6 +18,44 @@ LegoOmni::~LegoOmni()
Destroy();
}
// OFFSET: LEGO1 0x1005b560 STUB
void LegoOmni::CreateBackgroundAudio()
{
// TODO
}
// OFFSET: LEGO1 0x1005af10 STUB
void LegoOmni::RemoveWorld(const MxAtomId &p1, long p2)
{
// TODO
}
// OFFSET: LEGO1 0x1005b400 STUB
int LegoOmni::GetCurrPathInfo(LegoPathBoundary **,int &)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100b6ff0 STUB
void MakeSourceName(char *, const char *)
{
// TODO
}
// OFFSET: LEGO1 0x100b7210
void SetOmniUserMessage(void (*p_userMsg)(const char *,int))
{
g_omniUserMessage = p_userMsg;
}
// OFFSET: LEGO1 0x100acf50 STUB
long Start(MxDSAction *)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1005ad10
LegoOmni *LegoOmni::GetInstance()
{
@ -67,6 +111,13 @@ MxBackgroundAudioManager *BackgroundAudioManager()
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
}
// OFFSET: LEGO1 0x100c0280 STUB
MxDSObject *CreateStreamObject(MxDSFile *,short)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x10015740
LegoInputManager *InputManager()
{
@ -91,6 +142,11 @@ MxTransitionManager *TransitionManager()
return LegoOmni::GetInstance()->GetTransitionManager();
}
// OFFSET: LEGO1 0x10053430
const char *GetNoCD_SourceName()
{
return g_nocdSourceName;
}
// OFFSET: LEGO1 0x1005b5f0
long LegoOmni::Notify(MxParam &p)
@ -99,6 +155,20 @@ long LegoOmni::Notify(MxParam &p)
return 0;
}
// OFFSET: LEGO1 0x1003dd70 STUB
LegoROI *PickROI(long,long)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x1003ddc0 STUB
LegoEntity *PickEntity(long,long)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x10058bd0
void LegoOmni::Init()
{

View File

@ -5,6 +5,7 @@
#include "legoinputmanager.h"
#include "legogamestate.h"
#include "legonavcontroller.h"
#include "legopathboundary.h"
#include "legoroi.h"
#include "legovideomanager.h"
#include "mxatomid.h"
@ -27,7 +28,7 @@ class LegoOmni : public MxOmni
public:
__declspec(dllexport) void CreateBackgroundAudio();
__declspec(dllexport) void RemoveWorld(const MxAtomId &p1, long p2);
__declspec(dllexport) static int GetCurrPathInfo(class LegoPathBoundary * *,int &);
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary **,int &);
__declspec(dllexport) static void CreateInstance();
__declspec(dllexport) static LegoOmni *GetInstance();
@ -99,7 +100,6 @@ __declspec(dllexport) const char * GetNoCD_SourceName();
__declspec(dllexport) LegoInputManager * InputManager();
__declspec(dllexport) LegoOmni * Lego();
__declspec(dllexport) void MakeSourceName(char *, const char *);
__declspec(dllexport) MxNotificationManager * NotificationManager();
__declspec(dllexport) LegoEntity * PickEntity(long,long);
__declspec(dllexport) LegoROI * PickROI(long,long);
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int));

View File

@ -0,0 +1,14 @@
#include "legopartpresenter.h"
// 0x100f7aa0
int g_partPresenterConfig1 = 1;
// 0x100f7aa4
int g_partPresenterConfig2 = 100;
// OFFSET: LEGO1 0x1007c990
void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2)
{
g_partPresenterConfig1 = param_1;
g_partPresenterConfig2 = param_2;
}

View File

@ -1,6 +1,8 @@
#ifndef LEGOPARTPRESENTER_H
#define LEGOPARTPRESENTER_H
#include "mxmediapresenter.h"
// VTABLE 0x100d4df0
// SIZE 0x54 (from inlined construction at 0x10009fac)
class LegoPartPresenter : public MxMediaPresenter

9
LEGO1/legopathboundary.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef LEGOPATHBOUNDARH_H
#define LEGOPATHBOUNDARH_H
class LegoPathBoundary
{
};
#endif // LEGOPATHBOUNDARH_H

17
LEGO1/legoroi.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "legoroi.h"
// 0x10101368
int g_roiConfig = 100;
// OFFSET: LEGO1 0x100a9e10
void LegoROI::SetDisplayBB(int p_displayBB)
{
// Intentionally empty function
}
// OFFSET: LEGO1 0x100a81c0
void LegoROI::configureLegoROI(int p_roi)
{
g_roiConfig = p_roi;
}

View File

@ -4,8 +4,8 @@
class LegoROI
{
public:
__declspec(dllexport) void SetDisplayBB(int);
__declspec(dllexport) static void configureLegoROI(int param_1);
__declspec(dllexport) void SetDisplayBB(int p_displayBB);
__declspec(dllexport) static void configureLegoROI(int p_roi);
};
#endif // LEGOROI_H

27
LEGO1/mxbitmap.cpp Normal file
View File

@ -0,0 +1,27 @@
#include "mxbitmap.h"
// OFFSET: LEGO1 0x100bc980
MxBitmap::MxBitmap()
{
// TODO
}
// OFFSET: LEGO1 0x100bca10
MxBitmap::~MxBitmap()
{
// TODO
}
// OFFSET: LEGO1 0x100bd1c0
MxPalette *MxBitmap::CreatePalette()
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x100bcd10
long MxBitmap::Read(const char *)
{
// TODO
return 0;
}

View File

@ -1,6 +1,8 @@
#ifndef MXBITMAP_H
#define MXBITMAP_H
#include "mxpalette.h"
class MxBitmap
{
public:

22
LEGO1/mxdirectdraw.cpp Normal file
View File

@ -0,0 +1,22 @@
#include "mxdirectdraw.h"
// OFFSET: LEGO1 0x1009e7f0
int MxDirectDraw::FlipToGDISurface()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1009d570
int MxDirectDraw::GetPrimaryBitDepth()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1009e6a0
int MxDirectDraw::Pause(int)
{
// TODO
return 0;
}

View File

@ -1,5 +1,14 @@
#include "mxomni.h"
// 0x101015b8
char g_hdPath[1024];
// 0x101019b8
char g_cdPath[1024];
// 0x10101db8
MxBool g_use3dSound;
// 0x101015b0
MxOmni *MxOmni::g_instance = NULL;
@ -43,6 +52,43 @@ void MxOmni::DestroyInstance()
}
}
// OFFSET: LEGO1 0x100b0900
const char *MxOmni::GetHD()
{
return g_hdPath;
}
// OFFSET: LEGO1 0x100b0940
const char *MxOmni::GetCD()
{
return g_cdPath;
}
// OFFSET: LEGO1 0x100b0980
MxBool MxOmni::IsSound3D()
{
return g_use3dSound;
}
// OFFSET: LEGO1 0x100b0910
void MxOmni::SetHD(const char *p_hd)
{
strcpy(g_hdPath, p_hd);
}
// OFFSET: LEGO1 0x100b0950
void MxOmni::SetCD(const char *p_cd)
{
strcpy(g_cdPath, p_cd);
}
// OFFSET: LEGO1 0x100b0990
void MxOmni::SetSound3D(MxBool p_3dsound)
{
g_use3dSound = p_3dsound;
}
// OFFSET: LEGO1 0x100b0680
MxOmni *MxOmni::GetInstance()
{
@ -141,4 +187,4 @@ MxMusicManager* MusicManager()
MxEventManager* EventManager()
{
return MxOmni::GetInstance()->GetEventManager();
}
}

View File

@ -24,10 +24,10 @@ class MxOmni : public MxCore
__declspec(dllexport) static const char *GetCD();
__declspec(dllexport) static const char *GetHD();
__declspec(dllexport) static MxOmni *GetInstance();
__declspec(dllexport) static unsigned char IsSound3D();
__declspec(dllexport) static void SetCD(const char *s);
__declspec(dllexport) static void SetHD(const char *s);
__declspec(dllexport) static void SetSound3D(unsigned char);
__declspec(dllexport) static MxBool IsSound3D();
__declspec(dllexport) static void SetCD(const char *p_cd);
__declspec(dllexport) static void SetHD(const char *p_hd);
__declspec(dllexport) static void SetSound3D(MxBool p_3dsound);
virtual ~MxOmni();
@ -75,5 +75,6 @@ __declspec(dllexport) MxSoundManager * MSoundManager();
__declspec(dllexport) MxVariableTable * VariableTable();
__declspec(dllexport) MxMusicManager * MusicManager();
__declspec(dllexport) MxEventManager * EventManager();
__declspec(dllexport) MxNotificationManager * NotificationManager();
#endif // MXOMNI_H

View File

@ -53,8 +53,17 @@ void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
ReleaseDC((HWND) NULL, hdc);
}
// OFFSET: LEGO1 0x100bf340
MxBool MxPalette::operator==(MxPalette &)
{
// TODO
return FALSE;
}
// OFFSET: LEGO1 0x100bf330
void MxPalette::Detach()
{
this->m_palette = NULL;
}
}

View File

@ -11,7 +11,7 @@
class MxPalette : public MxCore
{
public:
__declspec(dllexport) unsigned char operator==(MxPalette &);
__declspec(dllexport) MxBool operator==(MxPalette &);
__declspec(dllexport) void Detach();
MxPalette();

15
LEGO1/mxscheduler.cpp Normal file
View File

@ -0,0 +1,15 @@
#include "mxscheduler.h"
// OFFSET: LEGO1 0x100bf4f0
MxScheduler *MxScheduler::GetInstance()
{
// Intentionally empty
return 0;
}
// OFFSET: LEGO1 0x100bf500
void MxScheduler::StartMultiTasking(unsigned long)
{
// Intentionally empty
}

View File

@ -6,6 +6,20 @@ MxStreamer::~MxStreamer()
// TODO
}
// OFFSET: LEGO1 0x100b92c0 STUB
MxStreamController *MxStreamer::Open(const char *name, unsigned short p)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x100b9570 STUB
long MxStreamer::Close(const char *p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100b9b60 STUB
long MxStreamer::Notify(MxParam &p)
{

View File

@ -19,3 +19,9 @@ long MxTransitionManager::Tickle()
return 0;
}
// OFFSET: LEGO1 0x1004c470 STUB
void MxTransitionManager::SetWaitIndicator(MxVideoPresenter *videoPresenter)
{
// TODO
}

20
LEGO1/mxvariabletable.cpp Normal file
View File

@ -0,0 +1,20 @@
#include "mxvariabletable.h"
// OFFSET: LEGO1 0x100b73a0
void MxVariableTable::SetVariable(const char *key, const char *value)
{
// TODO
}
// OFFSET: LEGO1 0x100b7740
void MxVariableTable::SetVariable(MxVariable *var)
{
// TODO
}
// OFFSET: LEGO1 0x100b78f0
const char *MxVariableTable::GetVariable(const char *key)
{
// TODO
return 0;
}

View File

@ -32,6 +32,12 @@ int MxVideoManager::Init()
return 0;
}
// OFFSET: LEGO1 0x100bea60 STUB
void MxVideoManager::InvalidateRect(MxRect32 &p_rect)
{
// TODO
}
// OFFSET: LEGO1 0x100bebe0
long MxVideoManager::RealizePalette(MxPalette *p_palette)
{

32
LEGO1/realtimeview.cpp Normal file
View File

@ -0,0 +1,32 @@
#include "realtimeview.h"
// 0x10101048
float g_userMaxLod = 3.6f;
// 0x1010104c
float g_partsThreshold = 1000.0f;
// OFFSET: LEGO1 0x100a5e00
float RealtimeView::GetUserMaxLOD()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100a5e10
float RealtimeView::GetPartsThreshold()
{
return g_partsThreshold;
}
// OFFSET: LEGO1 0x100a5de0
void RealtimeView::SetUserMaxLOD(float p_lod)
{
g_userMaxLod = p_lod;
}
// OFFSET: LEGO1 0x100a5df0
void RealtimeView::SetPartsThreshold(float p_threshold)
{
g_partsThreshold = p_threshold;
}

7
LEGO1/viewmanager.cpp Normal file
View File

@ -0,0 +1,7 @@
#include "viewmanager.h"
// OFFSET: LEGO1 0x100a64d0 STUB
void ViewManager::RemoveAll(ViewROI *)
{
// TODO
}

View File

@ -2,47 +2,53 @@
[Development Vlog](https://www.youtube.com/playlist?list=PLbpl-gZkNl2COf_bB6cfgTapD5WduAfPz) | [Contributing](https://github.com/isledecomp/isle/blob/master/CONTRIBUTING.md) | [Matrix](https://matrix.to/#/#isledecomp:matrix.org) | [Forums](https://forum.mattkc.com/viewforum.php?f=1) | [Patreon](https://www.patreon.com/mattkc)
This is a **work-in-progress** decompilation of LEGO Island version 1.1. It aims to be relatively faithful, but not byte accurate. The goal is to provide a workable codebase that can be modified, improved, and ported to other platforms later on.
This is a **work-in-progress** decompilation of LEGO Island version 1.1. It aims to be as accurate as possible, matching the recompiled instructions to the original machine code as much as possible. The goal is to provide a workable codebase that can be modified, improved, and ported to other platforms later on.
## Status
<img src="https://github.com/isledecomp/isle/releases/download/continuous/ISLEPROGRESS.PNG" width="50%"><img src="https://github.com/isledecomp/isle/releases/download/continuous/LEGO1PROGRESS.PNG" width="50%">
Currently `ISLE.EXE` is completely decompiled, however there are some known inaccuracies. It should work if you pair it with the original game's `LEGO1.DLL` (and other files), however small things may not work correctly yet. Work on decompiling `LEGO1.DLL` has only just started and currently it is too incomplete to be usable.
Currently `ISLE.EXE` is completely decompiled and behaves identically to the original. A handful of stubborn instructions are not yet matching, however we anticipate they will as more of the overall codebase is implemented.
`LEGO1.DLL` is still very much incomplete and cannot be used at this time. Instead, if you want to test this, it is recommended to pair the recompiled `ISLE.EXE` with the `LEGO1.DLL` from the original game.
## Building
LEGO Island was compiled with Microsoft Visual C++ 4.20, so that's what this decompilation targets. However it should compile with NMAKE on newer versions of Visual Studio too.
This projects uses the [CMake](https://cmake.org/) build system, which allows for a high degree of versatility regarding compilers and development environments. For the most accurate results, it is recommended to use Microsoft Visual C++ 4.20 (the same compiler used to build the original game). Since we're trying to match this to the original executable as closely as possible, all contributions will be graded with the output of this compiler.
### Recommended Instructions
These instructions use the development IDE from Visual C++ 4.20. By modern standards, it can be a little clunky to use, especially on newer versions of Windows, however it's still relatively straightforward. If you prefer a command line process that can fit into a modern workflow/IDE, see the instructions below.
These instructions will outline how to compile this repository into an accurate instruction-matching binary with Visual C++ 4.2. If you wish, you can try using other compilers, but this is at your own risk and won't be covered in this guide.
1. Install Microsoft Visual C++ 4.20. This can be found on many abandonware sites, but the installer can be a little iffy on modern versions of Windows. For convenience, I made a [portable version](https://github.com/itsmattkc/msvc420) that can be downloaded and used quickly instead.
2. Download and install the DirectX 5 SDK. Similarly, this can be found on many abandonware sites.
3. Open "Microsoft Developer Studio" (`BIN/MSDEV.EXE` for those using the portable).
4. `File` > `Open Workspace`
5. Select `ISLE.MDP` from this repository.
6. Select a build configuration. `ISLE - Win32 Release` is recommended because, at this point in time, you'll almost certainly be pairing it with the retail `LEGO1.DLL`, which is also a release build.
7. `Build` > `Build ISLE.EXE`. This will build `ISLE.EXE` in a folder called `Release`. It will also build `LEGO1.DLL` since it's listed as a dependency, however the `LEGO1.DLL` produced is too incomplete to be usable at this time.
#### Prerequisites
### Command Line Instructions
You will need the following software installed:
For some users, this may be preferable to using an obsolete graphical IDE. Any modern IDE should support custom command line build steps, making this potentially easier to fit into a familiar contemporary workflow. This guide assumes a general familiarity with the Windows command prompt.
- Microsoft Visual C++ 4.2. This can be found on many abandonware sites, but the installer can be a little iffy on modern versions of Windows. For convenience, I made a [portable version](https://github.com/itsmattkc/msvc420) that can be downloaded and used quickly instead.
- DirectX 5 SDK. Similarly, this can be found on many abandonware sites.
- [CMake](https://cmake.org/). A copy is often included with the "Desktop development with C++" workload in newer versions of Visual Studio, however it can also be installed as a standalone app.
1. Acquire Visual Studio/Visual C++. Any version after 4.20 should work here, but 4.20 is the only one guaranteed to work. If you wish to use 4.20, it can be found on many abandonware sites, but the installer can be a little iffy on modern versions of Windows. For convenience, I made a [portable version](https://github.com/itsmattkc/msvc420) that can be downloaded and used quickly instead.
2. Download and install the DirectX 5 SDK. Similarly, this can be found on many abandonware sites, but later versions of Visual Studio include the DirectX SDK by default, so this step may be skippable (you definitely need it for MSVC 4.20).
3. Open an x86/32-bit developer command prompt. Depending on the version of VS you're using, you may have a start menu item for it already (e.g. `x86 Native Tools Command Prompt`). Alternatively, you can start a normal command prompt (`cmd`) and run `vcvars32.bat` from the Visual Studio folder (run `BIN/VCVARS32.BAT x86` if you're using the portable 4.20).
4. `cd` to the folder you cloned this repository to.
5. `mkdir Release` if the folder doesn't already exist. Some versions of NMAKE may make this folder by itself, but some don't.
6. Run `nmake /f isle.mak CFG="ISLE - Win32 Release"`. This will build `ISLE.EXE` in the `Release` folder you just made. It will also build `LEGO1.DLL` since it's listed as a dependency, however the `LEGO1.DLL` produced is too incomplete to be usable at this time.
#### Compiling From Command Line
1. Open a Command Prompt (`cmd`).
1. From Visual C++ 4.2, run `BIN/VCVARS32.BAT x86` to populate the path and other environment variables for compiling with MSVC.
1. Make a folder for compiled objects to go, such as a `build` folder inside the source repository (the folder you cloned/downloaded to).
1. In your Command Prompt, `cd` to the build folder.
1. Configure the project with CMake by running:
```
cmake <path-to-source> -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
```
- Replace `<path-to-source>` with the source repository. Can be `..` if your build folder is inside the source repository.
- `RelWithDebInfo` is recommended because it will produce debug symbols useful for further decompilation work. However, you can change this to `Release` if you don't need them. `Debug` builds are not recommended because they are unlikely to be compatible with the retail `LEGO1.DLL`, which is currently the only way to really use this decomp.
- `NMake Makefiles` is most recommended because it will be immediately compatible with Visual C++ 4.2. For faster builds, you can use `Ninja` (if you have it installed), however due to limitations in Visual C++ 4.2, you can only build `Release` builds this way (debug symbols cannot be generated with `Ninja`).
1. Build the project by running `nmake` or `cmake --build <build-folder>`
1. When this is done, there should a recompiled `ISLE.EXE` and `LEGO1.DLL` in the build folder.
If you have a CMake-compatible IDE, it should be pretty straightforward to use this repository, as long as you can use `VCVARS32.BAT` and set the generator to `NMake Makefiles`.
## Usage
Simply place the compiled `ISLE.EXE` into LEGO Island's install folder (usually `C:\Program Files\LEGO Island` or `C:\Program Files (x86)\LEGO Island`). Unless you're a developer, disregard the compiled `LEGO1.DLL` for now as it is too incomplete to be usable. Alternatively, LEGO Island can run from any directory as long as `ISLE.EXE` and `LEGO1.DLL` are in the same directory, and the registry keys point to the correct location for the asset files.
Ideally, this decompilation should be paired with version 1.1. It may work on 1.0 too, however this is not guaranteed.
## Contributing
If you're interested in helping/contributing to this project, check out the [CONTRIBUTING](https://github.com/isledecomp/isle/blob/master/CONTRIBUTING.md) page.

4681
isle.mak

File diff suppressed because it is too large Load Diff

BIN
isle.mdp

Binary file not shown.

BIN
tools/verexp/DUMPBIN.EXE Executable file

Binary file not shown.

BIN
tools/verexp/LINK.EXE Executable file

Binary file not shown.

BIN
tools/verexp/MSPDB41.DLL Normal file

Binary file not shown.

82
tools/verexp/verexp.py Executable file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python3
import argparse
import colorama
import difflib
import subprocess
import os
import sys
parser = argparse.ArgumentParser(allow_abbrev=False,
description='Verify Exports: Compare the exports of two DLLs.')
parser.add_argument('original', metavar='original-binary', help='The original binary')
parser.add_argument('recompiled', metavar='recompiled-binary', help='The recompiled binary')
parser.add_argument('--no-color', '-n', action='store_true', help='Do not color the output')
args = parser.parse_args()
if not os.path.isfile(args.original):
parser.error('Original binary does not exist')
if not os.path.isfile(args.recompiled):
parser.error('Recompiled binary does not exist')
def get_file_in_script_dir(fn):
return os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), fn)
def get_exports(file):
call = [get_file_in_script_dir('DUMPBIN.EXE'), '/EXPORTS']
if os.name != 'nt':
call.insert(0, 'wine')
file = subprocess.check_output(['winepath', '-w', file]).decode('utf-8').strip()
call.append(file)
raw = subprocess.check_output(call).decode('utf-8').split('\r\n')
exports = []
start = False
for line in raw:
if not start:
if line == ' ordinal hint name':
start = True
else:
if line:
exports.append(line[27:line.rindex(' (')])
elif exports:
break
return exports
og_exp = get_exports(args.original)
re_exp = get_exports(args.recompiled)
udiff = difflib.unified_diff(og_exp, re_exp)
has_diff = False
for line in udiff:
has_diff = True
if line.startswith("++") or line.startswith("@@") or line.startswith("--"):
# Skip unneeded parts of the diff for the brief view
pass
elif line.startswith("+"):
if args.no_color:
print(line)
else:
print(colorama.Fore.GREEN + line)
elif line.startswith("-"):
if args.no_color:
print(line)
else:
print(colorama.Fore.RED + line)
else:
print(line)
if not args.no_color:
print(colorama.Style.RESET_ALL, end='')
if has_diff:
sys.exit(1)
else:
sys.exit(0)