implement all DLL exports (as TODOs)

Now we can use our own compiled LEGO1.LIB rather than one generated from the original. Also implements a script that tests them to help ensure future commits don't break them.
This commit is contained in:
itsmattkc 2023-06-30 11:34:39 -07:00
parent 13df3f906d
commit 4c9e138cbf
37 changed files with 694 additions and 313 deletions

View file

@ -97,6 +97,11 @@ jobs:
diff -u ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true diff -u ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
diff -u LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.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 - name: Upload Artifact
uses: actions/upload-artifact@master uses: actions/upload-artifact@master

View file

@ -3,7 +3,176 @@ cmake_minimum_required(VERSION 2.8...3.5 FATAL_ERROR)
project(isle CXX) project(isle CXX)
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON) option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
option(ISLE_BUILD_LIB "Build LEGO1.DLL library" 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) if (ISLE_BUILD_APP)
add_executable(isle WIN32 add_executable(isle WIN32
@ -15,175 +184,14 @@ if (ISLE_BUILD_APP)
# Include LEGO1 headers in ISLE # Include LEGO1 headers in ISLE
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1") target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
# Link DSOUND, WINMM, and our fake LEGO1 lib (TODO: replace with real once all exports are implemented) # Link DSOUND, WINMM, and LEGO1
target_link_libraries(isle PRIVATE dsound winmm "${CMAKE_SOURCE_DIR}/ISLE/ext/lego1.lib") target_link_libraries(isle PRIVATE dsound winmm lego1)
# Make sure filenames are ALL CAPS # Make sure filenames are ALL CAPS
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE) set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
set_property(TARGET isle PROPERTY SUFFIX ".EXE") set_property(TARGET isle PROPERTY SUFFIX ".EXE")
endif() endif()
if (ISLE_BUILD_LIB)
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/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/legohideanimpresenter.cpp
LEGO1/legoinputmanager.cpp
LEGO1/legojetski.cpp
LEGO1/legoloadcachesoundpresenter.cpp
LEGO1/legolocomotionanimpresenter.cpp
LEGO1/legonavcontroller.cpp
LEGO1/legoomni.cpp
LEGO1/legopalettepresenter.cpp
LEGO1/legopathactor.cpp
LEGO1/legopathcontroller.cpp
LEGO1/legopathpresenter.cpp
LEGO1/legophonemepresenter.cpp
LEGO1/legoplantmanager.cpp
LEGO1/legorace.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/mxcompositemediapresenter.cpp
LEGO1/mxcompositepresenter.cpp
LEGO1/mxcontrolpresenter.cpp
LEGO1/mxcore.cpp
LEGO1/mxcriticalsection.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/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/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/registrationbook.cpp
LEGO1/score.cpp
LEGO1/scorestate.cpp
LEGO1/skateboard.cpp
LEGO1/towtrack.cpp
LEGO1/towtrackmissionstate.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")
endif()
if (MSVC) if (MSVC)
# These flags have been taken from the defaults for a Visual C++ 4.20 project (the compiler the # 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. # game was originally built with) and tweaked slightly to produce more debugging info for reccmp.

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,7 +1,7 @@
#include <windows.h> #include <windows.h>
// OFFSET: LEGO1 0x10091ee0 // 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; return TRUE;
} }

View file

@ -1,5 +1,8 @@
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
// 0x100f74f8
int g_legoAnimationManagerConfig = 1;
// OFFSET: LEGO1 0x1005eb60 STUB // OFFSET: LEGO1 0x1005eb60 STUB
LegoAnimationManager::LegoAnimationManager() LegoAnimationManager::LegoAnimationManager()
{ {
@ -32,3 +35,9 @@ void LegoAnimationManager::Init()
{ {
// TODO // 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" #include "legobuildingmanager.h"
// 0x100f37cc
int g_buildingManagerConfig = 1;
// OFFSET: LEGO1 0x1002f8c0 STUB // OFFSET: LEGO1 0x1002f8c0 STUB
LegoBuildingManager::LegoBuildingManager() LegoBuildingManager::LegoBuildingManager()
{ {
// TODO
} }
// OFFSET: LEGO1 0x1002f960 STUB // OFFSET: LEGO1 0x1002f960 STUB
LegoBuildingManager::~LegoBuildingManager() LegoBuildingManager::~LegoBuildingManager()
{ {
// TODO
} }
// OFFSET: LEGO1 0x1002f9d0 STUB // OFFSET: LEGO1 0x1002f9d0 STUB
@ -15,3 +20,9 @@ void LegoBuildingManager::Init()
{ {
// TODO // 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 // 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 // OFFSET: LEGO1 0x1005b8b0 STUB
long LegoInputManager::Tickle() 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" #include "legoomni.h"
// 0x100f4588
char *g_nocdSourceName = NULL;
// 0x101020e8
void (*g_omniUserMessage)(const char *,int);
// OFFSET: LEGO1 0x10058a00 // OFFSET: LEGO1 0x10058a00
LegoOmni::LegoOmni() LegoOmni::LegoOmni()
{ {
@ -12,6 +18,44 @@ LegoOmni::~LegoOmni()
Destroy(); 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 // OFFSET: LEGO1 0x1005ad10
LegoOmni *LegoOmni::GetInstance() LegoOmni *LegoOmni::GetInstance()
{ {
@ -67,6 +111,13 @@ MxBackgroundAudioManager *BackgroundAudioManager()
return LegoOmni::GetInstance()->GetBackgroundAudioManager(); return LegoOmni::GetInstance()->GetBackgroundAudioManager();
} }
// OFFSET: LEGO1 0x100c0280 STUB
MxDSObject *CreateStreamObject(MxDSFile *,short)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x10015740 // OFFSET: LEGO1 0x10015740
LegoInputManager *InputManager() LegoInputManager *InputManager()
{ {
@ -91,6 +142,11 @@ MxTransitionManager *TransitionManager()
return LegoOmni::GetInstance()->GetTransitionManager(); return LegoOmni::GetInstance()->GetTransitionManager();
} }
// OFFSET: LEGO1 0x10053430
const char *GetNoCD_SourceName()
{
return g_nocdSourceName;
}
// OFFSET: LEGO1 0x1005b5f0 // OFFSET: LEGO1 0x1005b5f0
long LegoOmni::Notify(MxParam &p) long LegoOmni::Notify(MxParam &p)
@ -99,6 +155,20 @@ long LegoOmni::Notify(MxParam &p)
return 0; 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 // OFFSET: LEGO1 0x10058bd0
void LegoOmni::Init() void LegoOmni::Init()
{ {

View file

@ -5,6 +5,7 @@
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legonavcontroller.h" #include "legonavcontroller.h"
#include "legopathboundary.h"
#include "legoroi.h" #include "legoroi.h"
#include "legovideomanager.h" #include "legovideomanager.h"
#include "mxatomid.h" #include "mxatomid.h"
@ -27,7 +28,7 @@ class LegoOmni : public MxOmni
public: public:
__declspec(dllexport) void CreateBackgroundAudio(); __declspec(dllexport) void CreateBackgroundAudio();
__declspec(dllexport) void RemoveWorld(const MxAtomId &p1, long p2); __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 void CreateInstance();
__declspec(dllexport) static LegoOmni *GetInstance(); __declspec(dllexport) static LegoOmni *GetInstance();
@ -99,7 +100,6 @@ __declspec(dllexport) const char * GetNoCD_SourceName();
__declspec(dllexport) LegoInputManager * InputManager(); __declspec(dllexport) LegoInputManager * InputManager();
__declspec(dllexport) LegoOmni * Lego(); __declspec(dllexport) LegoOmni * Lego();
__declspec(dllexport) void MakeSourceName(char *, const char *); __declspec(dllexport) void MakeSourceName(char *, const char *);
__declspec(dllexport) MxNotificationManager * NotificationManager();
__declspec(dllexport) LegoEntity * PickEntity(long,long); __declspec(dllexport) LegoEntity * PickEntity(long,long);
__declspec(dllexport) LegoROI * PickROI(long,long); __declspec(dllexport) LegoROI * PickROI(long,long);
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int)); __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 #ifndef LEGOPARTPRESENTER_H
#define LEGOPARTPRESENTER_H #define LEGOPARTPRESENTER_H
#include "mxmediapresenter.h"
// VTABLE 0x100d4df0 // VTABLE 0x100d4df0
// SIZE 0x54 (from inlined construction at 0x10009fac) // SIZE 0x54 (from inlined construction at 0x10009fac)
class LegoPartPresenter : public MxMediaPresenter 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 class LegoROI
{ {
public: public:
__declspec(dllexport) void SetDisplayBB(int); __declspec(dllexport) void SetDisplayBB(int p_displayBB);
__declspec(dllexport) static void configureLegoROI(int param_1); __declspec(dllexport) static void configureLegoROI(int p_roi);
}; };
#endif // LEGOROI_H #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 #ifndef MXBITMAP_H
#define MXBITMAP_H #define MXBITMAP_H
#include "mxpalette.h"
class MxBitmap class MxBitmap
{ {
public: 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" #include "mxomni.h"
// 0x101015b8
char g_hdPath[1024];
// 0x101019b8
char g_cdPath[1024];
// 0x10101db8
MxBool g_use3dSound;
// 0x101015b0 // 0x101015b0
MxOmni *MxOmni::g_instance = NULL; 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 // OFFSET: LEGO1 0x100b0680
MxOmni *MxOmni::GetInstance() MxOmni *MxOmni::GetInstance()
{ {
@ -141,4 +187,4 @@ MxMusicManager* MusicManager()
MxEventManager* EventManager() MxEventManager* EventManager()
{ {
return MxOmni::GetInstance()->GetEventManager(); 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 *GetCD();
__declspec(dllexport) static const char *GetHD(); __declspec(dllexport) static const char *GetHD();
__declspec(dllexport) static MxOmni *GetInstance(); __declspec(dllexport) static MxOmni *GetInstance();
__declspec(dllexport) static unsigned char IsSound3D(); __declspec(dllexport) static MxBool IsSound3D();
__declspec(dllexport) static void SetCD(const char *s); __declspec(dllexport) static void SetCD(const char *p_cd);
__declspec(dllexport) static void SetHD(const char *s); __declspec(dllexport) static void SetHD(const char *p_hd);
__declspec(dllexport) static void SetSound3D(unsigned char); __declspec(dllexport) static void SetSound3D(MxBool p_3dsound);
virtual ~MxOmni(); virtual ~MxOmni();
@ -75,5 +75,6 @@ __declspec(dllexport) MxSoundManager * MSoundManager();
__declspec(dllexport) MxVariableTable * VariableTable(); __declspec(dllexport) MxVariableTable * VariableTable();
__declspec(dllexport) MxMusicManager * MusicManager(); __declspec(dllexport) MxMusicManager * MusicManager();
__declspec(dllexport) MxEventManager * EventManager(); __declspec(dllexport) MxEventManager * EventManager();
__declspec(dllexport) MxNotificationManager * NotificationManager();
#endif // MXOMNI_H #endif // MXOMNI_H

View file

@ -5,4 +5,17 @@ MxResult MxPalette::GetEntries(LPPALETTEENTRY p_entries)
{ {
memcpy(p_entries, this->m_entries, sizeof(this->m_entries)); memcpy(p_entries, this->m_entries, sizeof(this->m_entries));
return SUCCESS; return SUCCESS;
} }
// OFFSET: LEGO1 0x100bf340
MxBool MxPalette::operator==(MxPalette &)
{
// TODO
return FALSE;
}
// OFFSET: LEGO1 0x100bf330
void MxPalette::Detach()
{
// TODO
}

View file

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

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 // 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 // OFFSET: LEGO1 0x100b9b60 STUB
long MxStreamer::Notify(MxParam &p) long MxStreamer::Notify(MxParam &p)
{ {

View file

@ -19,3 +19,9 @@ long MxTransitionManager::Tickle()
return 0; 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; return 0;
} }
// OFFSET: LEGO1 0x100bea60 STUB
void MxVideoManager::InvalidateRect(MxRect32 &p_rect)
{
// TODO
}
// OFFSET: LEGO1 0x100bebe0 // OFFSET: LEGO1 0x100bebe0
long MxVideoManager::RealizePalette(MxPalette *p_palette) 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
}

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)