├── .clang-format ├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── build.yml │ ├── format.yml │ └── order.yml ├── .gitignore ├── .pylintrc ├── 3rdparty ├── dx5 │ ├── inc │ │ ├── d3d.h │ │ ├── d3dcaps.h │ │ ├── d3drm.h │ │ ├── d3drmdef.h │ │ ├── d3drmobj.h │ │ ├── d3drmwin.h │ │ ├── d3dtypes.h │ │ ├── d3dvec.inl │ │ ├── ddraw.h │ │ ├── dinput.h │ │ ├── dplay.h │ │ ├── dplobby.h │ │ ├── dsetup.h │ │ ├── dsound.h │ │ ├── dvp.h │ │ └── fastfile.h │ └── lib │ │ ├── d3drm.lib │ │ ├── ddraw.lbw │ │ ├── ddraw.lib │ │ ├── dinput.lib │ │ ├── dplayx.lib │ │ ├── dsetup.lib │ │ ├── dsound.lbw │ │ ├── dsound.lib │ │ ├── dxguid.lib │ │ ├── fastfile.lbw │ │ └── fastfile.lib ├── flic │ └── flic.h ├── smartheap │ ├── SHLW32MT.LIB │ ├── SHMALLOC.H │ ├── SHMFC4M.LIB │ ├── SMRTHEAP.H │ └── SMRTHEAP.HPP ├── smk │ └── smk.h └── vec │ └── vec.h ├── CMakeLists.txt ├── CONTRIBUTING.md ├── ISLE ├── define.cpp ├── define.h ├── isleapp.cpp ├── isleapp.h └── res │ ├── arrow.cur │ ├── busy.cur │ ├── isle.ico │ ├── isle.rc │ ├── no.cur │ └── resource.h ├── LEGO1 ├── act1state.cpp ├── act1state.h ├── act2brick.cpp ├── act2brick.h ├── act2policestation.cpp ├── act2policestation.h ├── act3.cpp ├── act3.h ├── act3actor.h ├── act3shark.cpp ├── act3shark.h ├── act3state.cpp ├── act3state.h ├── ambulance.cpp ├── ambulance.h ├── ambulancemissionstate.cpp ├── ambulancemissionstate.h ├── animstate.cpp ├── animstate.h ├── beachhouseentity.cpp ├── beachhouseentity.h ├── bike.cpp ├── bike.h ├── buildingentity.cpp ├── buildingentity.h ├── bumpbouy.cpp ├── bumpbouy.h ├── carrace.cpp ├── carrace.h ├── carracestate.h ├── compat.h ├── decomp.h ├── define.cpp ├── define.h ├── dllmain.cpp ├── doors.h ├── dunebuggy.cpp ├── dunebuggy.h ├── elevatorbottom.cpp ├── elevatorbottom.h ├── extra.h ├── gasstation.cpp ├── gasstation.h ├── gasstationentity.cpp ├── gasstationentity.h ├── gasstationstate.cpp ├── gasstationstate.h ├── gifmanager.cpp ├── gifmanager.h ├── helicopter.cpp ├── helicopter.h ├── helicopterstate.cpp ├── helicopterstate.h ├── historybook.cpp ├── historybook.h ├── hospital.cpp ├── hospital.h ├── hospitalentity.cpp ├── hospitalentity.h ├── hospitalstate.cpp ├── hospitalstate.h ├── infocenter.cpp ├── infocenter.h ├── infocenterdoor.cpp ├── infocenterdoor.h ├── infocenterentity.cpp ├── infocenterentity.h ├── infocenterstate.cpp ├── infocenterstate.h ├── isle.cpp ├── isle.h ├── isleactor.cpp ├── isleactor.h ├── islepathactor.cpp ├── islepathactor.h ├── jetski.cpp ├── jetski.h ├── jetskirace.cpp ├── jetskirace.h ├── jetskiracestate.h ├── jukebox.cpp ├── jukebox.h ├── jukeboxentity.cpp ├── jukeboxentity.h ├── jukeboxstate.cpp ├── jukeboxstate.h ├── lego3dmanager.h ├── lego3dview.h ├── lego3dwavepresenter.h ├── legoact2state.cpp ├── legoact2state.h ├── legoactioncontrolpresenter.cpp ├── legoactioncontrolpresenter.h ├── legoactor.cpp ├── legoactor.h ├── legoactorpresenter.h ├── legoanimactor.cpp ├── legoanimactor.h ├── legoanimationmanager.cpp ├── legoanimationmanager.h ├── legoanimmmpresenter.cpp ├── legoanimmmpresenter.h ├── legoanimpresenter.cpp ├── legoanimpresenter.h ├── legobackgroundcolor.cpp ├── legobackgroundcolor.h ├── legobuildingmanager.cpp ├── legobuildingmanager.h ├── legocachesound.cpp ├── legocachesound.h ├── legocameracontroller.cpp ├── legocameracontroller.h ├── legocarbuild.cpp ├── legocarbuild.h ├── legocarbuildanimpresenter.cpp ├── legocarbuildanimpresenter.h ├── legocarraceactor.h ├── legocontrolmanager.cpp ├── legocontrolmanager.h ├── legoentity.cpp ├── legoentity.h ├── legoentitypresenter.cpp ├── legoentitypresenter.h ├── legoeventnotificationparam.cpp ├── legoeventnotificationparam.h ├── legoextraactor.h ├── legoflctexturepresenter.cpp ├── legoflctexturepresenter.h ├── legofullscreenmovie.cpp ├── legofullscreenmovie.h ├── legogamestate.cpp ├── legogamestate.h ├── legohideanimpresenter.cpp ├── legohideanimpresenter.h ├── legoinputmanager.cpp ├── legoinputmanager.h ├── legojetski.cpp ├── legojetski.h ├── legojetskiraceactor.h ├── legoloadcachesoundpresenter.cpp ├── legoloadcachesoundpresenter.h ├── legolocomotionanimpresenter.cpp ├── legolocomotionanimpresenter.h ├── legoloopinganimpresenter.h ├── legometerpresenter.cpp ├── legometerpresenter.h ├── legomodelpresenter.cpp ├── legomodelpresenter.h ├── legonavcontroller.cpp ├── legonavcontroller.h ├── legoobjectfactory.cpp ├── legoobjectfactory.h ├── legoomni.cpp ├── legoomni.h ├── legopalettepresenter.cpp ├── legopalettepresenter.h ├── legopartpresenter.cpp ├── legopartpresenter.h ├── legopathactor.cpp ├── legopathactor.h ├── legopathboundary.h ├── legopathcontroller.cpp ├── legopathcontroller.h ├── legopathcontrollerlist.cpp ├── legopathcontrollerlist.h ├── legopathpresenter.cpp ├── legopathpresenter.h ├── legophonemepresenter.cpp ├── legophonemepresenter.h ├── legoplantmanager.cpp ├── legoplantmanager.h ├── legorace.cpp ├── legorace.h ├── legoraceactor.h ├── legoroi.cpp ├── legoroi.h ├── legosoundmanager.cpp ├── legosoundmanager.h ├── legostate.cpp ├── legostate.h ├── legostream.cpp ├── legostream.h ├── legotexturepresenter.cpp ├── legotexturepresenter.h ├── legounksavedatawriter.cpp ├── legounksavedatawriter.h ├── legoutil.cpp ├── legoutil.h ├── legovehiclebuildstate.cpp ├── legovehiclebuildstate.h ├── legovideomanager.cpp ├── legovideomanager.h ├── legoworld.cpp ├── legoworld.h ├── legoworldpresenter.cpp ├── legoworldpresenter.h ├── motorcycle.cpp ├── motorcycle.h ├── mxactionnotificationparam.cpp ├── mxactionnotificationparam.h ├── mxatomid.cpp ├── mxatomid.h ├── mxatomidcounter.cpp ├── mxatomidcounter.h ├── mxaudiomanager.cpp ├── mxaudiomanager.h ├── mxaudiopresenter.cpp ├── mxaudiopresenter.h ├── mxautolocker.cpp ├── mxautolocker.h ├── mxbackgroundaudiomanager.cpp ├── mxbackgroundaudiomanager.h ├── mxbitmap.cpp ├── mxbitmap.h ├── mxcollection.h ├── mxcompositemediapresenter.cpp ├── mxcompositemediapresenter.h ├── mxcompositepresenter.cpp ├── mxcompositepresenter.h ├── mxcontrolpresenter.cpp ├── mxcontrolpresenter.h ├── mxcore.cpp ├── mxcore.h ├── mxcriticalsection.cpp ├── mxcriticalsection.h ├── mxdirect3d.cpp ├── mxdirect3d.h ├── mxdirectdraw.cpp ├── mxdirectdraw.h ├── mxdiskstreamcontroller.cpp ├── mxdiskstreamcontroller.h ├── mxdiskstreamprovider.cpp ├── mxdiskstreamprovider.h ├── mxdisplaysurface.cpp ├── mxdisplaysurface.h ├── mxdsaction.cpp ├── mxdsaction.h ├── mxdsactionlist.cpp ├── mxdsactionlist.h ├── mxdsanim.cpp ├── mxdsanim.h ├── mxdsbuffer.cpp ├── mxdsbuffer.h ├── mxdschunk.cpp ├── mxdschunk.h ├── mxdsevent.cpp ├── mxdsevent.h ├── mxdsfile.cpp ├── mxdsfile.h ├── mxdsmediaaction.cpp ├── mxdsmediaaction.h ├── mxdsmultiaction.cpp ├── mxdsmultiaction.h ├── mxdsobject.cpp ├── mxdsobject.h ├── mxdsobjectaction.cpp ├── mxdsobjectaction.h ├── mxdsparallelaction.cpp ├── mxdsparallelaction.h ├── mxdsselectaction.cpp ├── mxdsselectaction.h ├── mxdsserialaction.cpp ├── mxdsserialaction.h ├── mxdssound.cpp ├── mxdssound.h ├── mxdssource.cpp ├── mxdssource.h ├── mxdsstill.cpp ├── mxdsstill.h ├── mxdsstreamingaction.cpp ├── mxdsstreamingaction.h ├── mxdssubscriber.cpp ├── mxdssubscriber.h ├── mxdstypes.h ├── mxentity.cpp ├── mxentity.h ├── mxeventmanager.cpp ├── mxeventmanager.h ├── mxeventpresenter.cpp ├── mxeventpresenter.h ├── mxflcpresenter.cpp ├── mxflcpresenter.h ├── mxhashtable.h ├── mxioinfo.cpp ├── mxioinfo.h ├── mxlist.h ├── mxloopingflcpresenter.cpp ├── mxloopingflcpresenter.h ├── mxloopingmidipresenter.cpp ├── mxloopingmidipresenter.h ├── mxloopingsmkpresenter.cpp ├── mxloopingsmkpresenter.h ├── mxmediamanager.cpp ├── mxmediamanager.h ├── mxmediapresenter.cpp ├── mxmediapresenter.h ├── mxmidipresenter.cpp ├── mxmidipresenter.h ├── mxmusicmanager.cpp ├── mxmusicmanager.h ├── mxmusicpresenter.cpp ├── mxmusicpresenter.h ├── mxnextactiondatastart.h ├── mxnotificationmanager.cpp ├── mxnotificationmanager.h ├── mxnotificationparam.cpp ├── mxnotificationparam.h ├── mxobjectfactory.cpp ├── mxobjectfactory.h ├── mxomni.cpp ├── mxomni.h ├── mxomnicreateflags.cpp ├── mxomnicreateflags.h ├── mxomnicreateparam.cpp ├── mxomnicreateparam.h ├── mxpalette.cpp ├── mxpalette.h ├── mxparam.cpp ├── mxparam.h ├── mxpoint32.h ├── mxpresenter.cpp ├── mxpresenter.h ├── mxpresenterlist.cpp ├── mxpresenterlist.h ├── mxqueue.h ├── mxramstreamcontroller.cpp ├── mxramstreamcontroller.h ├── mxramstreamprovider.cpp ├── mxramstreamprovider.h ├── mxrect32.h ├── mxregion.cpp ├── mxregion.h ├── mxregionlist.cpp ├── mxregionlist.h ├── mxscheduler.cpp ├── mxscheduler.h ├── mxsemaphore.cpp ├── mxsemaphore.h ├── mxsize32.h ├── mxsmkpresenter.cpp ├── mxsmkpresenter.h ├── mxsoundmanager.cpp ├── mxsoundmanager.h ├── mxsoundpresenter.cpp ├── mxsoundpresenter.h ├── mxstillpresenter.cpp ├── mxstillpresenter.h ├── mxstl.h ├── mxstreamchunk.h ├── mxstreamchunklist.cpp ├── mxstreamchunklist.h ├── mxstreamcontroller.cpp ├── mxstreamcontroller.h ├── mxstreamer.cpp ├── mxstreamer.h ├── mxstreamlist.cpp ├── mxstreamlist.h ├── mxstreamprovider.cpp ├── mxstreamprovider.h ├── mxstring.cpp ├── mxstring.h ├── mxstringlist.cpp ├── mxstringlist.h ├── mxthread.cpp ├── mxthread.h ├── mxticklemanager.cpp ├── mxticklemanager.h ├── mxtimer.cpp ├── mxtimer.h ├── mxtransitionmanager.cpp ├── mxtransitionmanager.h ├── mxtype17notificationparam.cpp ├── mxtype17notificationparam.h ├── mxtypes.h ├── mxunklist.h ├── mxvariable.cpp ├── mxvariable.h ├── mxvariabletable.cpp ├── mxvariabletable.h ├── mxvideomanager.cpp ├── mxvideomanager.h ├── mxvideoparam.cpp ├── mxvideoparam.h ├── mxvideoparamflags.cpp ├── mxvideoparamflags.h ├── mxvideopresenter.cpp ├── mxvideopresenter.h ├── mxwavepresenter.cpp ├── mxwavepresenter.h ├── pizza.cpp ├── pizza.h ├── pizzamissionstate.cpp ├── pizzamissionstate.h ├── pizzeria.cpp ├── pizzeria.h ├── pizzeriastate.cpp ├── pizzeriastate.h ├── police.cpp ├── police.h ├── policeentity.cpp ├── policeentity.h ├── policestate.cpp ├── policestate.h ├── racecar.cpp ├── racecar.h ├── racestandsentity.cpp ├── racestandsentity.h ├── racestate.cpp ├── racestate.h ├── radio.cpp ├── radio.h ├── radiostate.cpp ├── radiostate.h ├── realtime │ ├── lodlist.h │ ├── matrix.cpp │ ├── matrix.h │ ├── orientableroi.cpp │ ├── orientableroi.h │ ├── realtime.cpp │ ├── realtime.h │ ├── realtimeview.cpp │ ├── realtimeview.h │ ├── roi.h │ ├── vector.cpp │ └── vector.h ├── registrationbook.cpp ├── registrationbook.h ├── score.cpp ├── score.h ├── scorestate.cpp ├── scorestate.h ├── skateboard.cpp ├── skateboard.h ├── tgl │ ├── tgl.h │ └── tglvector.h ├── towtrack.cpp ├── towtrack.h ├── towtrackmissionstate.cpp ├── towtrackmissionstate.h └── viewmanager │ ├── viewlodlist.h │ ├── viewmanager.cpp │ ├── viewmanager.h │ ├── viewroi.cpp │ └── viewroi.h ├── README.md ├── pyproject.toml └── tools ├── README.md ├── checkorder └── checkorder.py ├── isledecomp ├── .gitignore ├── isledecomp │ ├── __init__.py │ ├── bin.py │ ├── dir.py │ ├── parser │ │ ├── __init__.py │ │ ├── error.py │ │ ├── node.py │ │ ├── parser.py │ │ └── util.py │ ├── syminfo.py │ └── utils.py ├── setup.py └── tests │ ├── __init__.py │ ├── samples │ ├── basic_class.cpp │ ├── basic_file.cpp │ ├── global_variables.cpp │ ├── inline.cpp │ ├── missing_offset.cpp │ ├── multiple_offsets.cpp │ ├── oneline_function.cpp │ ├── out_of_order.cpp │ └── poorly_formatted.cpp │ ├── test_parser.py │ ├── test_parser_samples.py │ ├── test_parser_statechange.py │ └── test_parser_util.py ├── reccmp ├── cvdump.exe ├── isle.png ├── lego1.png ├── reccmp.py ├── template.html └── template.svg ├── requirements.txt └── verexp ├── DUMPBIN.EXE ├── LINK.EXE ├── MSPDB41.DLL └── verexp.py /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Microsoft 2 | 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: BlockIndent 5 | AllowAllArgumentsOnNextLine: false 6 | AllowAllParametersOfDeclarationOnNextLine: false 7 | AllowShortFunctionsOnASingleLine: InlineOnly 8 | AlwaysBreakTemplateDeclarations: Yes 9 | BinPackArguments: false 10 | BinPackParameters: false 11 | BracedInitializerIndentWidth: 4 12 | BraceWrapping: 13 | AfterClass: false 14 | AfterControlStatement: Never 15 | AfterEnum: false 16 | AfterStruct: false 17 | ConstructorInitializerIndentWidth: 4 18 | ContinuationIndentWidth: 4 19 | EmptyLineBeforeAccessModifier: Always 20 | IncludeBlocks: Regroup 21 | IndentAccessModifiers: false 22 | IndentWidth: 4 23 | InsertNewlineAtEOF: true 24 | PointerAlignment: Left 25 | QualifierAlignment: Custom 26 | QualifierOrder: 27 | - inline 28 | - static 29 | - friend 30 | - const 31 | - volatile 32 | - type 33 | SpaceAfterCStyleCast: true 34 | TabWidth: 4 35 | UseTab: ForContinuationAndIndentation 36 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{py,txt,editorconfig}] 4 | indent_style = space 5 | indent_size = 2 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.{cpp,h}] 10 | indent_style = tab 11 | tab_width = 4 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.MD text eol=lf diff=markdown 2 | *.cpp text eol=lf diff=cpp 3 | *.h text eol=lf diff=cpp 4 | *.py text eol=lf diff=python 5 | *.html text eol=lf diff=html 6 | *.mdp binary 7 | *.mak text eol=crlf 8 | -------------------------------------------------------------------------------- /.github/workflows/format.yml: -------------------------------------------------------------------------------- 1 | name: Format 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | clang-format: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - name: Run clang-format 13 | run: | 14 | pipx run "clang-format>=17,<18" \ 15 | --Werror \ 16 | --dry-run \ 17 | --style=file \ 18 | ISLE/*.cpp ISLE/*.h \ 19 | LEGO1/*.cpp LEGO1/*.h \ 20 | LEGO1/realtime/*.cpp LEGO1/realtime/*.h \ 21 | LEGO1/tgl/*.h \ 22 | LEGO1/viewmanager/*.cpp LEGO1/viewmanager/*.h 23 | 24 | python-format: 25 | runs-on: ubuntu-latest 26 | 27 | steps: 28 | - uses: actions/checkout@v3 29 | 30 | - name: Install python libraries 31 | shell: bash 32 | run: | 33 | pip install black pylint pytest -r tools/requirements.txt 34 | 35 | - name: Run pylint and black 36 | shell: bash 37 | run: | 38 | pylint tools --ignore=build 39 | black --check tools 40 | -------------------------------------------------------------------------------- /.github/workflows/order.yml: -------------------------------------------------------------------------------- 1 | name: Check order 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | checkorder: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - name: Install python libraries 13 | run: | 14 | pip install -r tools/requirements.txt 15 | 16 | - name: Run checkorder.py 17 | run: | 18 | python3 tools/checkorder/checkorder.py --verbose --enforce ISLE 19 | python3 tools/checkorder/checkorder.py --verbose --enforce LEGO1 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Debug/ 2 | Release/ 3 | *.ncb 4 | /.vs 5 | /.vscode 6 | /.idea 7 | .env 8 | .venv 9 | env/ 10 | venv/ 11 | ENV/ 12 | VENV/ 13 | env.bak/ 14 | venv.bak/ 15 | ISLE.EXE 16 | LEGO1.DLL 17 | build/ 18 | *.swp 19 | LEGO1PROGRESS.* 20 | ISLEPROGRESS.* 21 | *.pyc 22 | -------------------------------------------------------------------------------- /3rdparty/dx5/inc/fastfile.h: -------------------------------------------------------------------------------- 1 | /*========================================================================== 2 | * 3 | * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: fastfile.h 6 | * Content: Definitions for fastfile access. 7 | * 8 | * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 9 | * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 10 | * WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 11 | * 12 | ***************************************************************************/ 13 | 14 | typedef LPVOID HFASTFILE; 15 | 16 | extern BOOL FastFileInit( LPSTR fname, int max_handles ); 17 | extern void FastFileFini( void ); 18 | extern HFASTFILE FastFileOpen( LPSTR name ); 19 | extern BOOL FastFileClose( HFASTFILE pfe ); 20 | extern BOOL FastFileRead( HFASTFILE pfh, LPVOID ptr, int size ); 21 | extern BOOL FastFileSeek( HFASTFILE pfe, int off, int how ); 22 | extern long FastFileTell( HFASTFILE pfe ); 23 | extern LPVOID FastFileLock( HFASTFILE pfe, int off, int len ); 24 | extern BOOL FastFileUnlock( HFASTFILE pfe, int off, int len ); 25 | -------------------------------------------------------------------------------- /3rdparty/dx5/lib/d3drm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/d3drm.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/ddraw.lbw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/ddraw.lbw -------------------------------------------------------------------------------- /3rdparty/dx5/lib/ddraw.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/ddraw.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dinput.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dinput.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dplayx.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dplayx.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dsetup.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dsetup.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dsound.lbw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dsound.lbw -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dsound.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dsound.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/dxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/dxguid.lib -------------------------------------------------------------------------------- /3rdparty/dx5/lib/fastfile.lbw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/fastfile.lbw -------------------------------------------------------------------------------- /3rdparty/dx5/lib/fastfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/dx5/lib/fastfile.lib -------------------------------------------------------------------------------- /3rdparty/smartheap/SHLW32MT.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/smartheap/SHLW32MT.LIB -------------------------------------------------------------------------------- /3rdparty/smartheap/SHMFC4M.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/3rdparty/smartheap/SHMFC4M.LIB -------------------------------------------------------------------------------- /ISLE/define.cpp: -------------------------------------------------------------------------------- 1 | #include "define.h" 2 | 3 | // GLOBAL: ISLE 0x410030 4 | IsleApp* g_isle = 0; 5 | 6 | // GLOBAL: ISLE 0x410034 7 | unsigned char g_mousedown = 0; 8 | 9 | // GLOBAL: ISLE 0x410038 10 | unsigned char g_mousemoved = 0; 11 | 12 | // GLOBAL: ISLE 0x41003c 13 | int g_closed = 0; 14 | 15 | // GLOBAL: ISLE 0x410040 16 | RECT g_windowRect = {0, 0, 640, 480}; 17 | 18 | // GLOBAL: ISLE 0x410050 19 | int g_rmDisabled = 0; 20 | 21 | // GLOBAL: ISLE 0x410054 22 | int g_waitingForTargetDepth = 1; 23 | 24 | // GLOBAL: ISLE 0x410058 25 | int g_targetWidth = 640; 26 | 27 | // GLOBAL: ISLE 0x41005c 28 | int g_targetHeight = 480; 29 | 30 | // GLOBAL: ISLE 0x410060 31 | int g_targetDepth = 16; 32 | 33 | // GLOBAL: ISLE 0x410064 34 | int g_reqEnableRMDevice = 0; 35 | 36 | // GLOBAL: ISLE 0x4101bc 37 | int g_startupDelay = 200; 38 | 39 | // GLOBAL: ISLE 0x4101c0 40 | MxLong g_lastFrameTime = 0; 41 | -------------------------------------------------------------------------------- /ISLE/define.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFINE_H 2 | #define DEFINE_H 3 | 4 | #include 5 | #include 6 | 7 | class IsleApp; 8 | 9 | extern IsleApp* g_isle; 10 | extern int g_closed; 11 | // GLOBAL: ISLE 0x4101c4 12 | #define WNDCLASS_NAME "Lego Island MainNoM App" 13 | // GLOBAL: ISLE 0x4101dc 14 | #define WINDOW_TITLE "LEGO\xAE" 15 | extern unsigned char g_mousedown; 16 | extern unsigned char g_mousemoved; 17 | extern RECT g_windowRect; 18 | extern int g_rmDisabled; 19 | extern int g_waitingForTargetDepth; 20 | extern int g_targetWidth; 21 | extern int g_targetHeight; 22 | extern int g_targetDepth; 23 | extern int g_reqEnableRMDevice; 24 | extern int g_startupDelay; 25 | extern MxLong g_lastFrameTime; 26 | 27 | #endif // DEFINE_H 28 | -------------------------------------------------------------------------------- /ISLE/res/arrow.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/ISLE/res/arrow.cur -------------------------------------------------------------------------------- /ISLE/res/busy.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/ISLE/res/busy.cur -------------------------------------------------------------------------------- /ISLE/res/isle.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/ISLE/res/isle.ico -------------------------------------------------------------------------------- /ISLE/res/isle.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | ISLE_ARROW CURSOR "arrow.cur" 4 | ISLE_NO CURSOR "no.cur" 5 | ISLE_BUSY CURSOR "busy.cur" 6 | APP_ICON ICON "isle.ico" 7 | 8 | 1 VERSIONINFO 9 | FILEVERSION 1,1,0,0 10 | PRODUCTVERSION 1,1,0,0 11 | FILEOS 0x40004 12 | FILETYPE 0x1 13 | { 14 | BLOCK "StringFileInfo" 15 | { 16 | BLOCK "040904b0" 17 | { 18 | VALUE "Comments", "DG JB AG RC EE" 19 | VALUE "CompanyName", "Mindscape" 20 | VALUE "FileDescription", "isle" 21 | VALUE "FileVersion", "1, 1, 0, 0" 22 | VALUE "InternalName", "isle" 23 | VALUE "LegalCopyright", "Copyright \xA9 1997" 24 | VALUE "OriginalFilename", "isle.exe" 25 | VALUE "ProductName", "Adventures on LEGO Island" 26 | VALUE "ProductVersion", "1, 1, 0, 0" 27 | VALUE "SpecialBuild", "Very" 28 | } 29 | } 30 | 31 | BLOCK "VarFileInfo" 32 | { 33 | VALUE "Translation", 0x0409, 0x04B0 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ISLE/res/no.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/ISLE/res/no.cur -------------------------------------------------------------------------------- /ISLE/res/resource.h: -------------------------------------------------------------------------------- 1 | #define ISLE_ARROW 102 2 | #define ISLE_NO 103 3 | #define ISLE_BUSY 104 4 | 5 | #define APP_ICON 105 6 | -------------------------------------------------------------------------------- /LEGO1/act1state.cpp: -------------------------------------------------------------------------------- 1 | #include "act1state.h" 2 | 3 | // STUB: LEGO1 0x100334b0 4 | Act1State::Act1State() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/act1state.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT1STATE_H 2 | #define ACT1STATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d7028 7 | // SIZE 0x26c 8 | class Act1State : public LegoState { 9 | public: 10 | Act1State(); 11 | 12 | // FUNCTION: LEGO1 0x100338a0 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0154 16 | return "Act1State"; 17 | }; 18 | 19 | // FUNCTION: LEGO1 0x100338b0 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, Act1State::ClassName()) || LegoState::IsA(name); 23 | }; 24 | }; 25 | 26 | #endif // ACT1STATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/act2brick.cpp: -------------------------------------------------------------------------------- 1 | #include "act2brick.h" 2 | 3 | // STUB: LEGO1 0x1007a2b0 4 | Act2Brick::Act2Brick() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x1007a470 10 | Act2Brick::~Act2Brick() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x1007a7f0 16 | MxResult Act2Brick::Tickle() 17 | { 18 | // TODO 19 | 20 | return SUCCESS; 21 | } 22 | 23 | // STUB: LEGO1 0x1007a8c0 24 | MxLong Act2Brick::Notify(MxParam& p) 25 | { 26 | // TODO 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /LEGO1/act2brick.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT2BRICK_H 2 | #define ACT2BRICK_H 3 | 4 | #include "legopathactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d9b60 7 | // SIZE 0x194 8 | class Act2Brick : public LegoPathActor { 9 | public: 10 | Act2Brick(); 11 | virtual ~Act2Brick() override; // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | virtual MxResult Tickle() override; // vtable+0x08 15 | 16 | // FUNCTION: LEGO1 0x1007a360 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x100f0438 20 | return "Act2Brick"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x1007a370 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(Act2Brick::ClassName(), name) || LegoEntity::IsA(name); 27 | } 28 | }; 29 | 30 | #endif // ACT2BRICK_H 31 | -------------------------------------------------------------------------------- /LEGO1/act2policestation.cpp: -------------------------------------------------------------------------------- 1 | #include "act2policestation.h" 2 | 3 | // STUB: LEGO1 0x1004e0e0 4 | MxLong Act2PoliceStation::Notify(MxParam& p) 5 | { 6 | // TODO 7 | 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /LEGO1/act2policestation.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT2POLICESTATION_H 2 | #define ACT2POLICESTATION_H 3 | 4 | #include "legoentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d53a8 7 | // SIZE 0x68 8 | class Act2PoliceStation : public LegoEntity { 9 | public: 10 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 11 | 12 | // FUNCTION: LEGO1 0x1000e200 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f03fc 16 | return "Act2PoliceStation"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1000e210 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, Act2PoliceStation::ClassName()) || LegoEntity::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // ACT2POLICESTATION_H 27 | -------------------------------------------------------------------------------- /LEGO1/act3.cpp: -------------------------------------------------------------------------------- 1 | #include "act3.h" 2 | 3 | DECOMP_SIZE_ASSERT(Act3, 0x4274) 4 | 5 | // STUB: LEGO1 0x10072270 6 | Act3::Act3() 7 | { 8 | // TODO 9 | } 10 | 11 | // STUB: LEGO1 0x100726a0 12 | Act3::~Act3() 13 | { 14 | // TODO 15 | } 16 | -------------------------------------------------------------------------------- /LEGO1/act3.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT3_H 2 | #define ACT3_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d9628 7 | // SIZE 0x4274 8 | class Act3 : public LegoWorld { 9 | public: 10 | Act3(); 11 | 12 | virtual ~Act3() override; // vtable+00 13 | 14 | // FUNCTION: LEGO1 0x10072510 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f013c 18 | return "Act3"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x10072520 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, Act3::ClassName()) || LegoWorld::IsA(name); 25 | } 26 | 27 | inline void SetUnkown420c(MxEntity* p_entity) { m_unk420c = p_entity; } 28 | 29 | protected: 30 | undefined m_unkf8[0x4114]; 31 | MxEntity* m_unk420c; 32 | undefined m_unk4210[0x64]; 33 | }; 34 | 35 | #endif // ACT3_H 36 | -------------------------------------------------------------------------------- /LEGO1/act3actor.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT3ACTOR_H 2 | #define ACT3ACTOR_H 3 | 4 | // FIXME: Uncertain location. There are three vtables which eventually call this 5 | // class' ClassName() function, but none of them call it directly. 6 | class Act3Actor { 7 | public: 8 | // FUNCTION: LEGO1 0x100431b0 9 | inline virtual const char* ClassName() override 10 | { 11 | // GLOBAL: LEGO1 0x100f03ac 12 | return "Act3Actor"; 13 | } 14 | }; 15 | 16 | #endif // ACT3ACTOR_H 17 | -------------------------------------------------------------------------------- /LEGO1/act3shark.cpp: -------------------------------------------------------------------------------- 1 | #include "act3shark.h" 2 | -------------------------------------------------------------------------------- /LEGO1/act3shark.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT3SHARK_H 2 | #define ACT3SHARK_H 3 | 4 | #include "legoanimactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d7920 7 | class Act3Shark : public LegoAnimActor { 8 | public: 9 | // FUNCTION: LEGO1 0x100430c0 10 | inline virtual const char* ClassName() const override 11 | { 12 | // GLOBAL: LEGO1 0x100f03a0 13 | return "Act3Shark"; 14 | } 15 | }; 16 | 17 | #endif // ACT3SHARK_H 18 | -------------------------------------------------------------------------------- /LEGO1/act3state.cpp: -------------------------------------------------------------------------------- 1 | #include "act3state.h" 2 | 3 | // FUNCTION: LEGO1 0x1000e2f0 4 | MxBool Act3State::VTable0x14() 5 | { 6 | return FALSE; 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/act3state.h: -------------------------------------------------------------------------------- 1 | #ifndef ACT3STATE_H 2 | #define ACT3STATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d4fc8 7 | // SIZE 0xc 8 | class Act3State : public LegoState { 9 | public: 10 | inline Act3State() { m_unk08 = 0; } 11 | 12 | // FUNCTION: LEGO1 0x1000e300 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f03f0 16 | return "Act3State"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1000e310 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, Act3State::ClassName()) || LegoState::IsA(name); 23 | } 24 | 25 | virtual MxBool VTable0x14() override; 26 | 27 | private: 28 | // FIXME: May be part of LegoState? Uncertain... 29 | MxU32 m_unk08; 30 | }; 31 | 32 | #endif // ACT3STATE_H 33 | -------------------------------------------------------------------------------- /LEGO1/ambulance.cpp: -------------------------------------------------------------------------------- 1 | #include "ambulance.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(Ambulance, 0x184); 6 | 7 | // FUNCTION: LEGO1 0x10035ee0 8 | Ambulance::Ambulance() 9 | { 10 | this->m_unk168 = 0; 11 | this->m_unk16a = -1; 12 | this->m_unk164 = 0; 13 | this->m_unk16c = 0; 14 | this->m_unk174 = -1; 15 | this->m_unk16e = 0; 16 | this->m_unk178 = -1; 17 | this->m_unk170 = 0; 18 | this->m_unk172 = 0; 19 | this->m_unk13c = 40.0; 20 | this->m_unk17c = 1.0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/ambulance.h: -------------------------------------------------------------------------------- 1 | #ifndef AMBULANCE_H 2 | #define AMBULANCE_H 3 | 4 | #include "islepathactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d71a8 7 | // SIZE 0x184 8 | class Ambulance : public IslePathActor { 9 | public: 10 | Ambulance(); 11 | 12 | // FUNCTION: LEGO1 0x10035fa0 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f03c4 16 | return "Ambulance"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10035fb0 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name); 23 | } 24 | 25 | private: 26 | // TODO: Ambulance fields 27 | undefined m_unk160[4]; 28 | MxS32 m_unk164; 29 | MxS16 m_unk168; 30 | MxS16 m_unk16a; 31 | MxS16 m_unk16c; 32 | MxS16 m_unk16e; 33 | MxS16 m_unk170; 34 | MxS16 m_unk172; 35 | MxS32 m_unk174; 36 | MxS32 m_unk178; 37 | MxFloat m_unk17c; 38 | undefined m_unk180[4]; 39 | }; 40 | 41 | #endif // AMBULANCE_H 42 | -------------------------------------------------------------------------------- /LEGO1/ambulancemissionstate.cpp: -------------------------------------------------------------------------------- 1 | #include "ambulancemissionstate.h" 2 | 3 | DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24); 4 | 5 | // STUB: LEGO1 0x100373a0 6 | AmbulanceMissionState::AmbulanceMissionState() 7 | { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /LEGO1/animstate.cpp: -------------------------------------------------------------------------------- 1 | #include "animstate.h" 2 | 3 | // STUB: LEGO1 0x10064ff0 4 | AnimState::AnimState() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10065150 10 | AnimState::~AnimState() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/animstate.h: -------------------------------------------------------------------------------- 1 | #ifndef ANIMSTATE_H 2 | #define ANIMSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d8d80 7 | // SIZE 0x1c 8 | class AnimState : public LegoState { 9 | public: 10 | AnimState(); 11 | virtual ~AnimState() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10065070 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f0460 17 | return "AnimState"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10065080 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, AnimState::ClassName()) || LegoState::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // ANIMSTATE_H 28 | -------------------------------------------------------------------------------- /LEGO1/beachhouseentity.cpp: -------------------------------------------------------------------------------- 1 | #include "beachhouseentity.h" 2 | 3 | // STUB: LEGO1 0x100150a0 4 | MxLong BeachHouseEntity::Notify(MxParam& p) 5 | { 6 | // TODO 7 | 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /LEGO1/beachhouseentity.h: -------------------------------------------------------------------------------- 1 | #ifndef BEACHHOUSEENTITY_H 2 | #define BEACHHOUSEENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d4a18 7 | // SIZE 0x68 8 | class BeachHouseEntity : public BuildingEntity { 9 | public: 10 | virtual MxLong Notify(MxParam& p) override; // vtable+04 11 | 12 | // FUNCTION: LEGO1 0x1000ee80 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0314 16 | return "BeachHouseEntity"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1000ee90 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // BEACHHOUSEENTITY_H 27 | -------------------------------------------------------------------------------- /LEGO1/bike.cpp: -------------------------------------------------------------------------------- 1 | #include "bike.h" 2 | 3 | DECOMP_SIZE_ASSERT(Bike, 0x164); 4 | 5 | // FUNCTION: LEGO1 0x10076670 6 | Bike::Bike() 7 | { 8 | this->m_unk13c = 20.0; 9 | this->m_unk150 = 3.0; 10 | this->m_unk148 = 1; 11 | } 12 | -------------------------------------------------------------------------------- /LEGO1/bike.h: -------------------------------------------------------------------------------- 1 | #ifndef BIKE_H 2 | #define BIKE_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d9808 8 | // SIZE 0x164 9 | class Bike : public IslePathActor { 10 | public: 11 | Bike(); 12 | 13 | // FUNCTION: LEGO1 0x100766f0 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f03d0 17 | return "Bike"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10076700 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | // TODO: Bike fields 28 | undefined m_unk160[4]; 29 | }; 30 | 31 | #endif // BIKE_H 32 | -------------------------------------------------------------------------------- /LEGO1/buildingentity.cpp: -------------------------------------------------------------------------------- 1 | #include "buildingentity.h" 2 | 3 | // STUB: LEGO1 0x10014e20 4 | BuildingEntity::BuildingEntity() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10015030 10 | BuildingEntity::~BuildingEntity() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/buildingentity.h: -------------------------------------------------------------------------------- 1 | #ifndef BUILDINGENTITY_H 2 | #define BUILDINGENTITY_H 3 | 4 | #include "legoentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d5c88 7 | // SIZE <= 0x68, hard to tell because it's always constructed as a derivative 8 | class BuildingEntity : public LegoEntity { 9 | public: 10 | BuildingEntity(); 11 | virtual ~BuildingEntity() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10014f20 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f07e8 17 | return "BuildingEntity"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10014f30 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, BuildingEntity::ClassName()) || LegoEntity::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // BUILDINGENTITY_H 28 | -------------------------------------------------------------------------------- /LEGO1/bumpbouy.cpp: -------------------------------------------------------------------------------- 1 | #include "bumpbouy.h" 2 | -------------------------------------------------------------------------------- /LEGO1/bumpbouy.h: -------------------------------------------------------------------------------- 1 | #ifndef BUMPBOUY_H 2 | #define BUMPBOUY_H 3 | 4 | #include "legoanimactor.h" 5 | #include "mxtypes.h" 6 | 7 | // VTABLE: LEGO1 0x100d6790 8 | class BumpBouy : public LegoAnimActor { 9 | public: 10 | // FUNCTION: LEGO1 0x100274e0 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0394 14 | return "BumpBouy"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x10027500 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, BumpBouy::ClassName()) || LegoAnimActor::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // BUMPBOUY_H 25 | -------------------------------------------------------------------------------- /LEGO1/carrace.cpp: -------------------------------------------------------------------------------- 1 | #include "carrace.h" 2 | 3 | // STUB: LEGO1 0x10016a90 4 | CarRace::CarRace() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/carrace.h: -------------------------------------------------------------------------------- 1 | #ifndef CARRACE_H 2 | #define CARRACE_H 3 | 4 | #include "legorace.h" 5 | 6 | // VTABLE: LEGO1 0x100d5e50 7 | // SIZE 0x154 8 | class CarRace : public LegoRace { 9 | public: 10 | CarRace(); 11 | 12 | // FUNCTION: LEGO1 0x10016b20 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0528 16 | return "CarRace"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10016b30 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, CarRace::ClassName()) || LegoRace::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // CARRACE_H 27 | -------------------------------------------------------------------------------- /LEGO1/carracestate.h: -------------------------------------------------------------------------------- 1 | #ifndef CARRACESTATE_H 2 | #define CARRACESTATE_H 3 | 4 | #include "racestate.h" 5 | 6 | // VTABLE: LEGO1 0x100d4b70 7 | // SIZE 0x2c 8 | class CarRaceState : public RaceState { 9 | public: 10 | // FUNCTION: LEGO1 0x1000dd30 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f009c 14 | return "CarRaceState"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000dd40 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, CarRaceState::ClassName()) || RaceState::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // CARRACESTATE_H 25 | -------------------------------------------------------------------------------- /LEGO1/decomp.h: -------------------------------------------------------------------------------- 1 | #ifndef DECOMP_H 2 | #define DECOMP_H 3 | 4 | #if defined(_MSC_VER) 5 | #define DECOMP_STATIC_ASSERT(V) \ 6 | namespace \ 7 | { \ 8 | typedef int foo[(V) ? 1 : -1]; \ 9 | } 10 | #define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S) 11 | #else 12 | #define DECOMP_STATIC_ASSERT(V) 13 | #define DECOMP_SIZE_ASSERT(T, S) 14 | #endif 15 | 16 | #ifndef _countof 17 | #define _countof(arr) sizeof(arr) / sizeof(arr[0]) 18 | #endif 19 | 20 | typedef unsigned char undefined; 21 | typedef unsigned short undefined2; 22 | typedef unsigned int undefined4; 23 | 24 | #endif // DECOMP_H 25 | -------------------------------------------------------------------------------- /LEGO1/define.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFINE_H 2 | #define DEFINE_H 3 | 4 | #include "mxtypes.h" 5 | 6 | extern MxU32 g_mxcoreCount[101]; 7 | extern const char* g_parseExtraTokens; 8 | extern const char* g_strWORLD; 9 | extern const char* g_strSOUND; 10 | extern const char* g_strACTION; 11 | extern const char* g_strVISIBILITY; 12 | 13 | #endif // DEFINE_H 14 | -------------------------------------------------------------------------------- /LEGO1/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // FUNCTION: LEGO1 0x10091ee0 4 | __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 5 | { 6 | return TRUE; 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/doors.h: -------------------------------------------------------------------------------- 1 | #ifndef DOORS_H 2 | #define DOORS_H 3 | 4 | #include "legopathactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d4788 7 | // SIZE 0x1f8 8 | class Doors : public LegoPathActor { 9 | public: 10 | // FUNCTION: LEGO1 0x1000e430 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f03e8 14 | return "Doors"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000e440 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, Doors::ClassName()) || LegoPathActor::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // DOORS_H 25 | -------------------------------------------------------------------------------- /LEGO1/dunebuggy.cpp: -------------------------------------------------------------------------------- 1 | #include "dunebuggy.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c); 6 | 7 | // FUNCTION: LEGO1 0x10067bb0 8 | DuneBuggy::DuneBuggy() 9 | { 10 | this->m_unk13c = 25.0; 11 | this->m_unk164 = 1.0; 12 | } 13 | -------------------------------------------------------------------------------- /LEGO1/dunebuggy.h: -------------------------------------------------------------------------------- 1 | #ifndef DUNEBUGGY_H 2 | #define DUNEBUGGY_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d8f98 8 | // SIZE 0x16c 9 | class DuneBuggy : public IslePathActor { 10 | public: 11 | DuneBuggy(); 12 | 13 | // FUNCTION: LEGO1 0x10067c30 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f0410 17 | return "DuneBuggy"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10067c40 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | // TODO: Double check DuneBuggy field types 28 | undefined4 m_unk160; 29 | MxFloat m_unk164; 30 | undefined4 m_unk168; 31 | }; 32 | 33 | #endif // DUNEBUGGY_H 34 | -------------------------------------------------------------------------------- /LEGO1/elevatorbottom.cpp: -------------------------------------------------------------------------------- 1 | #include "elevatorbottom.h" 2 | 3 | // STUB: LEGO1 0x10017e90 4 | ElevatorBottom::ElevatorBottom() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10018060 10 | ElevatorBottom::~ElevatorBottom() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10018150 16 | MxLong ElevatorBottom::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/elevatorbottom.h: -------------------------------------------------------------------------------- 1 | #ifndef ELEVATORBOTTOM_H 2 | #define ELEVATORBOTTOM_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d5f20 7 | class ElevatorBottom : public LegoWorld { 8 | public: 9 | ElevatorBottom(); 10 | virtual ~ElevatorBottom() override; // vtable+0x0 11 | 12 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 13 | 14 | // FUNCTION: LEGO1 0x10017f20 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f04ac 18 | return "ElevatorBottom"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x10017f30 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, ElevatorBottom::ClassName()) || LegoWorld::IsA(name); 25 | } 26 | }; 27 | 28 | #endif // ELEVATORBOTTOM_H 29 | -------------------------------------------------------------------------------- /LEGO1/extra.h: -------------------------------------------------------------------------------- 1 | #ifndef EXTRA_H 2 | #define EXTRA_H 3 | 4 | // Items related to the Extra string of key-value pairs found in MxOb 5 | 6 | enum ExtraActionType { 7 | ExtraActionType_none = 0, 8 | ExtraActionType_opendisk = 1, 9 | ExtraActionType_openram = 2, 10 | ExtraActionType_close = 3, 11 | ExtraActionType_start = 4, 12 | ExtraActionType_stop = 5, 13 | ExtraActionType_run = 6, 14 | ExtraActionType_exit = 7, 15 | ExtraActionType_enable = 8, 16 | ExtraActionType_disable = 9, 17 | ExtraActionType_notify = 10, 18 | ExtraActionType_unknown = 11, 19 | }; 20 | 21 | #endif // EXTRA_H 22 | -------------------------------------------------------------------------------- /LEGO1/gasstation.cpp: -------------------------------------------------------------------------------- 1 | #include "gasstation.h" 2 | 3 | // STUB: LEGO1 0x100046a0 4 | GasStation::GasStation() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x100048c0 10 | GasStation::~GasStation() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10004a60 16 | MxLong GasStation::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | 23 | // STUB: LEGO1 0x10005c90 24 | MxResult GasStation::Tickle() 25 | { 26 | // TODO 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /LEGO1/gasstation.h: -------------------------------------------------------------------------------- 1 | #ifndef GASSTATION_H 2 | #define GASSTATION_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d4650 7 | // SIZE 0x128 8 | // Radio variable at 0x46, in constructor 9 | class GasStation : public LegoWorld { 10 | public: 11 | GasStation(); 12 | virtual ~GasStation() override; // vtable+0x0 13 | 14 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 15 | virtual MxResult Tickle() override; // vtable+0x8 16 | 17 | // FUNCTION: LEGO1 0x10004780 18 | inline virtual const char* ClassName() const override // vtable+0x0c 19 | { 20 | // GLOBAL: LEGO1 0x100f0168 21 | return "GasStation"; 22 | } 23 | 24 | // FUNCTION: LEGO1 0x10004790 25 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 26 | { 27 | return !strcmp(name, GasStation::ClassName()) || LegoWorld::IsA(name); 28 | } 29 | }; 30 | 31 | #endif // GASSTATION_H 32 | -------------------------------------------------------------------------------- /LEGO1/gasstationentity.cpp: -------------------------------------------------------------------------------- 1 | #include "gasstationentity.h" 2 | -------------------------------------------------------------------------------- /LEGO1/gasstationentity.h: -------------------------------------------------------------------------------- 1 | #ifndef GASSTATIONENTITY_H 2 | #define GASSTATIONENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d5258 7 | // SIZE 0x68 8 | class GasStationEntity : public BuildingEntity { 9 | public: 10 | // FUNCTION: LEGO1 0x1000eb20 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0348 14 | return "GasStationEntity"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000eb30 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, GasStationEntity::ClassName()) || BuildingEntity::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // GASSTATIONENTITY_H 25 | -------------------------------------------------------------------------------- /LEGO1/gasstationstate.cpp: -------------------------------------------------------------------------------- 1 | #include "gasstationstate.h" 2 | 3 | DECOMP_SIZE_ASSERT(GasStationState, 0x24); 4 | 5 | // FUNCTION: LEGO1 0x10005eb0 6 | GasStationState::GasStationState() 7 | { 8 | m_unk0x18 = 0; 9 | m_unk0x1a = 0; 10 | m_unk0x1c = 0; 11 | m_unk0x1e = 0; 12 | m_unk0x20 = 0; 13 | 14 | undefined4* unk = m_unk0x08; 15 | unk[0] = -1; 16 | unk[1] = -1; 17 | unk[2] = -1; 18 | } 19 | -------------------------------------------------------------------------------- /LEGO1/gasstationstate.h: -------------------------------------------------------------------------------- 1 | #ifndef GASSTATIONSTATE_H 2 | #define GASSTATIONSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d46e0 7 | // SIZE 0x24 8 | class GasStationState : public LegoState { 9 | public: 10 | GasStationState(); 11 | 12 | // FUNCTION: LEGO1 0x100061d0 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0174 16 | return "GasStationState"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100061e0 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, GasStationState::ClassName()) || LegoState::IsA(name); 23 | } 24 | 25 | private: 26 | undefined4 m_unk0x08[3]; 27 | undefined4 m_unk0x14; 28 | undefined2 m_unk0x18; 29 | undefined2 m_unk0x1a; 30 | undefined2 m_unk0x1c; 31 | undefined2 m_unk0x1e; 32 | undefined2 m_unk0x20; 33 | }; 34 | 35 | #endif // GASSTATIONSTATE_H 36 | -------------------------------------------------------------------------------- /LEGO1/gifmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "gifmanager.h" 2 | 3 | DECOMP_SIZE_ASSERT(GifData, 0x14); 4 | DECOMP_SIZE_ASSERT(GifMapEntry, 0x14); 5 | DECOMP_SIZE_ASSERT(GifMap, 0x08); 6 | DECOMP_SIZE_ASSERT(GifManagerBase, 0x14); 7 | DECOMP_SIZE_ASSERT(GifManager, 0x30); 8 | 9 | GifMapEntry* DAT_100f0100; 10 | 11 | // FUNCTION: LEGO1 0x10001cc0 12 | GifMapEntry* GifMap::FindNode(const char*& string) 13 | { 14 | GifMapEntry* ret = m_unk4; 15 | GifMapEntry* current = ret->m_parent; 16 | while (current != DAT_100f0100) { 17 | if (strcmp(current->m_key, string) <= 0) { 18 | ret = current; 19 | current = current->m_right; 20 | } 21 | else 22 | current = current->m_left; 23 | } 24 | return ret; 25 | } 26 | -------------------------------------------------------------------------------- /LEGO1/helicopterstate.cpp: -------------------------------------------------------------------------------- 1 | #include "helicopterstate.h" 2 | -------------------------------------------------------------------------------- /LEGO1/helicopterstate.h: -------------------------------------------------------------------------------- 1 | #ifndef HELICOPTERSTATE_H 2 | #define HELICOPTERSTATE_H 3 | 4 | #include "decomp.h" 5 | #include "legostate.h" 6 | 7 | // VTABLE: LEGO1 0x100d5418 8 | // SIZE 0xc 9 | class HelicopterState : public LegoState { 10 | public: 11 | // FUNCTION: LEGO1 0x1000e0d0 12 | inline virtual const char* ClassName() const override // vtable+0x0c 13 | { 14 | // GLOBAL: LEGO1 0x100f0144 15 | return "HelicopterState"; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x1000e0e0 19 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 20 | { 21 | return !strcmp(name, HelicopterState::ClassName()) || LegoState::IsA(name); 22 | } 23 | 24 | inline void SetUnknown8(undefined4 p_unk8) { m_unk8 = p_unk8; } 25 | 26 | protected: 27 | undefined4 m_unk8; 28 | }; 29 | 30 | #endif // HELICOPTERSTATE_H 31 | -------------------------------------------------------------------------------- /LEGO1/historybook.cpp: -------------------------------------------------------------------------------- 1 | #include "historybook.h" 2 | 3 | // STUB: LEGO1 0x100822f0 4 | HistoryBook::HistoryBook() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x100824d0 10 | HistoryBook::~HistoryBook() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10082680 16 | MxLong HistoryBook::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/historybook.h: -------------------------------------------------------------------------------- 1 | #ifndef HISTORYBOOK_H 2 | #define HISTORYBOOK_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100da328 7 | // SIZE 0x3e4 8 | class HistoryBook : public LegoWorld { 9 | public: 10 | HistoryBook(); 11 | virtual ~HistoryBook() override; // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | 15 | // FUNCTION: LEGO1 0x10082390 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x100f04bc 19 | return "HistoryBook"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100823a0 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, HistoryBook::ClassName()) || LegoWorld::IsA(name); 26 | } 27 | }; 28 | 29 | #endif // HISTORYBOOK_H 30 | -------------------------------------------------------------------------------- /LEGO1/hospital.cpp: -------------------------------------------------------------------------------- 1 | #include "hospital.h" 2 | 3 | // STUB: LEGO1 0x100745e0 4 | Hospital::Hospital() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x100747f0 10 | Hospital::~Hospital() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10074990 16 | MxLong Hospital::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/hospital.h: -------------------------------------------------------------------------------- 1 | #ifndef HOSPITAL_H 2 | #define HOSPITAL_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d9730 7 | // SIZE 0x12c 8 | class Hospital : public LegoWorld { 9 | public: 10 | Hospital(); 11 | virtual ~Hospital() override; // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x04 14 | 15 | // FUNCTION: LEGO1 0x100746b0 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x100f0490 19 | return "Hospital"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100746c0 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, Hospital::ClassName()) || LegoWorld::IsA(name); 26 | } 27 | }; 28 | 29 | #endif // HOSPITAL_H 30 | -------------------------------------------------------------------------------- /LEGO1/hospitalentity.cpp: -------------------------------------------------------------------------------- 1 | #include "hospitalentity.h" 2 | -------------------------------------------------------------------------------- /LEGO1/hospitalentity.h: -------------------------------------------------------------------------------- 1 | #ifndef HOSPITALENTITY_H 2 | #define HOSPITALENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d5068 7 | // SIZE 0x68 8 | class HospitalEntity : public BuildingEntity { 9 | public: 10 | // FUNCTION: LEGO1 0x1000ec40 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0338 14 | return "HospitalEntity"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000ec50 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, HospitalEntity::ClassName()) || BuildingEntity::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // HOSPITALENTITY_H 25 | -------------------------------------------------------------------------------- /LEGO1/hospitalstate.cpp: -------------------------------------------------------------------------------- 1 | #include "hospitalstate.h" 2 | 3 | // STUB: LEGO1 0x10076370 4 | HospitalState::HospitalState() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/hospitalstate.h: -------------------------------------------------------------------------------- 1 | #ifndef HOSPITALSTATE_H 2 | #define HOSPITALSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d97a0 7 | // SIZE 0x18 8 | class HospitalState : public LegoState { 9 | public: 10 | HospitalState(); 11 | 12 | // FUNCTION: LEGO1 0x10076400 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0480 16 | return "HospitalState"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10076410 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, HospitalState::ClassName()) || LegoState::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // HOSPITALSTATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/infocenter.cpp: -------------------------------------------------------------------------------- 1 | #include "infocenter.h" 2 | 3 | // STUB: LEGO1 0x1006ea20 4 | Infocenter::Infocenter() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x1006ec90 10 | Infocenter::~Infocenter() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x1006ef10 16 | MxLong Infocenter::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | 23 | // STUB: LEGO1 0x10070af0 24 | MxResult Infocenter::Tickle() 25 | { 26 | // TODO 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /LEGO1/infocenter.h: -------------------------------------------------------------------------------- 1 | #ifndef INFOCENTER_H 2 | #define INFOCENTER_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d9338 7 | // SIZE 0x1d8 8 | class Infocenter : public LegoWorld { 9 | public: 10 | Infocenter(); 11 | virtual ~Infocenter() override; 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | virtual MxResult Tickle() override; // vtable+0x8 15 | 16 | // FUNCTION: LEGO1 0x1006eb40 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x100f04ec 20 | return "Infocenter"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x1006eb50 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, Infocenter::ClassName()) || LegoWorld::IsA(name); 27 | } 28 | }; 29 | 30 | #endif // INFOCENTER_H 31 | -------------------------------------------------------------------------------- /LEGO1/infocenterdoor.cpp: -------------------------------------------------------------------------------- 1 | #include "infocenterdoor.h" 2 | 3 | // STUB: LEGO1 0x10037730 4 | InfocenterDoor::InfocenterDoor() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x100378f0 10 | InfocenterDoor::~InfocenterDoor() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x100379e0 16 | MxLong InfocenterDoor::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/infocenterdoor.h: -------------------------------------------------------------------------------- 1 | #ifndef INFOCENTERDOOR_H 2 | #define INFOCENTERDOOR_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d72d8 7 | // SIZE 0xfc 8 | class InfocenterDoor : public LegoWorld { 9 | public: 10 | InfocenterDoor(); 11 | virtual ~InfocenterDoor(); // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | 15 | // FUNCTION: LEGO1 0x100377b0 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x100f049c 19 | return "InfocenterDoor"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100377c0 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, InfocenterDoor::ClassName()) || LegoWorld::IsA(name); 26 | } 27 | }; 28 | 29 | #endif // INFOCENTERDOOR_H 30 | -------------------------------------------------------------------------------- /LEGO1/infocenterentity.cpp: -------------------------------------------------------------------------------- 1 | #include "infocenterentity.h" 2 | -------------------------------------------------------------------------------- /LEGO1/infocenterentity.h: -------------------------------------------------------------------------------- 1 | #ifndef INFOCENTERENTITY_H 2 | #define INFOCENTERENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d4b90 7 | // SIZE 0x68 8 | class InfoCenterEntity : public BuildingEntity { 9 | public: 10 | // FUNCTION: LEGO1 0x1000ea00 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f035c 14 | return "InfoCenterEntity"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000ea10 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // INFOCENTERENTITY_H 25 | -------------------------------------------------------------------------------- /LEGO1/infocenterstate.cpp: -------------------------------------------------------------------------------- 1 | #include "infocenterstate.h" 2 | 3 | DECOMP_SIZE_ASSERT(InfocenterState, 0x94); 4 | 5 | // STUB: LEGO1 0x10071600 6 | InfocenterState::InfocenterState() 7 | { 8 | // TODO 9 | } 10 | 11 | // STUB: LEGO1 0x10071920 12 | InfocenterState::~InfocenterState() 13 | { 14 | // TODO 15 | } 16 | -------------------------------------------------------------------------------- /LEGO1/isle.cpp: -------------------------------------------------------------------------------- 1 | #include "isle.h" 2 | 3 | // STUB: LEGO1 0x10030820 4 | Isle::Isle() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/isle.h: -------------------------------------------------------------------------------- 1 | #ifndef ISLE_H 2 | #define ISLE_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d6fb8 7 | // SIZE 0x140 8 | // Radio at 0x12c 9 | class Isle : public LegoWorld { 10 | public: 11 | Isle(); 12 | 13 | // FUNCTION: LEGO1 0x10030910 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f0458 17 | return "Isle"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10030920 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, Isle::ClassName()) || LegoWorld::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // ISLE_H 28 | -------------------------------------------------------------------------------- /LEGO1/isleactor.cpp: -------------------------------------------------------------------------------- 1 | #include "isleactor.h" 2 | 3 | // NOTE: This is copied from base class LegoActor. IsleActor may in fact be larger but we don't know yet. 4 | DECOMP_SIZE_ASSERT(IsleActor, 0x78) 5 | -------------------------------------------------------------------------------- /LEGO1/isleactor.h: -------------------------------------------------------------------------------- 1 | #ifndef ISLEACTOR_H 2 | #define ISLEACTOR_H 3 | 4 | #include "legoactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d5178 7 | class IsleActor : public LegoActor { 8 | public: 9 | // FUNCTION: LEGO1 0x1000e660 10 | inline virtual const char* ClassName() const override // vtable+0x0c 11 | { 12 | // GLOBAL: LEGO1 0x100f07dc 13 | return "IsleActor"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x1000e670 17 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, IsleActor::ClassName()) || LegoActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // ISLEACTOR_H 24 | -------------------------------------------------------------------------------- /LEGO1/jetski.cpp: -------------------------------------------------------------------------------- 1 | #include "jetski.h" 2 | 3 | DECOMP_SIZE_ASSERT(Jetski, 0x164); 4 | 5 | // FUNCTION: LEGO1 0x1007e3b0 6 | Jetski::Jetski() 7 | { 8 | this->m_unk13c = 25.0; 9 | this->m_unk150 = 2.0; 10 | this->m_unk148 = 1; 11 | } 12 | -------------------------------------------------------------------------------- /LEGO1/jetski.h: -------------------------------------------------------------------------------- 1 | #ifndef JETSKI_H 2 | #define JETSKI_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d9ec8 8 | // SIZE 0x164 9 | class Jetski : public IslePathActor { 10 | public: 11 | Jetski(); 12 | 13 | // FUNCTION: LEGO1 0x1007e430 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f03d8 17 | return "Jetski"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1007e440 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | // TODO: Jetski fields 28 | undefined m_unk160[4]; 29 | }; 30 | 31 | #endif // JETSKI_H 32 | -------------------------------------------------------------------------------- /LEGO1/jetskirace.cpp: -------------------------------------------------------------------------------- 1 | #include "jetskirace.h" 2 | -------------------------------------------------------------------------------- /LEGO1/jetskirace.h: -------------------------------------------------------------------------------- 1 | #ifndef JETSKIRACE_H 2 | #define JETSKIRACE_H 3 | 4 | #include "legorace.h" 5 | 6 | // VTABLE: LEGO1 0x100d4fe8 7 | // SIZE 0x144 8 | class JetskiRace : public LegoRace { 9 | public: 10 | // FUNCTION: LEGO1 0x1000daf0 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0530 14 | return "JetskiRace"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000db00 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, JetskiRace::ClassName()) || LegoRace::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // JETSKIRACE_H 25 | -------------------------------------------------------------------------------- /LEGO1/jetskiracestate.h: -------------------------------------------------------------------------------- 1 | #ifndef JETSKIRACESTATE_H 2 | #define JETSKIRACESTATE_H 3 | 4 | #include "racestate.h" 5 | 6 | // VTABLE: LEGO1 0x100d4fa8 7 | // SIZE 0x2c 8 | class JetskiRaceState : public RaceState { 9 | public: 10 | // FUNCTION: LEGO1 0x1000dc40 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f00ac 14 | return "JetskiRaceState"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000dc50 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, JetskiRaceState::ClassName()) || RaceState::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // JETSKIRACESTATE_H 25 | -------------------------------------------------------------------------------- /LEGO1/jukebox.cpp: -------------------------------------------------------------------------------- 1 | #include "jukebox.h" 2 | 3 | // STUB: LEGO1 0x1005d660 4 | JukeBox::JukeBox() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/jukebox.h: -------------------------------------------------------------------------------- 1 | #ifndef JUKEBOX_H 2 | #define JUKEBOX_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d8958 7 | // SIZE 0x104 8 | class JukeBox : public LegoWorld { 9 | public: 10 | JukeBox(); 11 | 12 | // FUNCTION: LEGO1 0x1005d6f0 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f02cc 16 | return "JukeBox"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1005d700 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, JukeBox::ClassName()) || LegoWorld::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // JUKEBOX_H 27 | -------------------------------------------------------------------------------- /LEGO1/jukeboxentity.cpp: -------------------------------------------------------------------------------- 1 | #include "jukeboxentity.h" 2 | 3 | // STUB: LEGO1 0x10085bc0 4 | JukeBoxEntity::JukeBoxEntity() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10085dd0 10 | JukeBoxEntity::~JukeBoxEntity() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/jukeboxentity.h: -------------------------------------------------------------------------------- 1 | #ifndef JUKEBOXENTITY_H 2 | #define JUKEBOXENTITY_H 3 | 4 | #include "legoentity.h" 5 | 6 | // VTABLE: LEGO1 0x100da8a0 7 | // SIZE 0x6c 8 | class JukeBoxEntity : public LegoEntity { 9 | public: 10 | JukeBoxEntity(); 11 | virtual ~JukeBoxEntity() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10085cc0 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f02f0 17 | return "JukeBoxEntity"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10085cd0 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, JukeBoxEntity::ClassName()) || LegoEntity::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // JUKEBOXENTITY_H 28 | -------------------------------------------------------------------------------- /LEGO1/jukeboxstate.cpp: -------------------------------------------------------------------------------- 1 | #include "jukeboxstate.h" 2 | 3 | // FUNCTION: LEGO1 0x1000f300 4 | MxBool JukeBoxState::VTable0x14() 5 | { 6 | return FALSE; 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/jukeboxstate.h: -------------------------------------------------------------------------------- 1 | #ifndef JUKEBOXSTATE_H 2 | #define JUKEBOXSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d4a90 7 | // SIZE 0x10 8 | class JukeBoxState : public LegoState { 9 | public: 10 | // FUNCTION: LEGO1 0x1000f310 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f02bc 14 | return "JukeBoxState"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000f320 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, JukeBoxState::ClassName()) || LegoState::IsA(name); 21 | } 22 | 23 | virtual MxBool VTable0x14() override; // vtable+0x14 24 | }; 25 | 26 | #endif // JUKEBOXSTATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/lego3dmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGO3DMANAGER_H 2 | #define LEGO3DMANAGER_H 3 | 4 | #include "lego3dview.h" 5 | 6 | class Lego3DManager { 7 | public: 8 | inline Lego3DView* GetLego3DView() { return this->m_3dView; } 9 | 10 | private: 11 | int m_unk00; 12 | int m_unk04; 13 | Lego3DView* m_3dView; 14 | }; 15 | 16 | #endif // LEGO3DMANAGER_H 17 | -------------------------------------------------------------------------------- /LEGO1/lego3dview.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGO3DVIEW_H 2 | #define LEGO3DVIEW_H 3 | 4 | #include "viewmanager/viewmanager.h" 5 | 6 | class Lego3DView { 7 | public: 8 | inline ViewManager* GetViewManager() { return this->m_viewManager; } 9 | 10 | private: 11 | char unknown[0x88]; 12 | ViewManager* m_viewManager; 13 | }; 14 | 15 | #endif // LEGO3DVIEW_H 16 | -------------------------------------------------------------------------------- /LEGO1/lego3dwavepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGO3DWAVEPRESENTER_H 2 | #define LEGO3DWAVEPRESENTER_H 3 | 4 | #include "legowavepresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d52b0 7 | // SIZE 0xa0 8 | class Lego3DWavePresenter : public LegoWavePresenter { 9 | public: 10 | // FUNCTION: LEGO1 0x1000d890 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f058c 14 | return "Lego3DWavePresenter"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000d8a0 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, Lego3DWavePresenter::ClassName()) || MxWavePresenter::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // LEGO3DWAVEPRESENTER_H 25 | -------------------------------------------------------------------------------- /LEGO1/legoact2state.cpp: -------------------------------------------------------------------------------- 1 | #include "legoact2state.h" 2 | -------------------------------------------------------------------------------- /LEGO1/legoact2state.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOACT2STATE_H 2 | #define LEGOACT2STATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d4a70 7 | // SIZE 0x10 8 | class LegoAct2State : public LegoState { 9 | public: 10 | // FUNCTION: LEGO1 0x1000df80 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0428 14 | return "LegoAct2State"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000df90 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, LegoAct2State::ClassName()) || LegoState::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // LEGOACT2STATE_H 25 | -------------------------------------------------------------------------------- /LEGO1/legoactor.cpp: -------------------------------------------------------------------------------- 1 | #include "legoactor.h" 2 | 3 | DECOMP_SIZE_ASSERT(LegoActor, 0x78) 4 | 5 | // Probably in header 6 | // FUNCTION: LEGO1 0x10002cc0 7 | MxFloat LegoActor::VTable0x50() 8 | { 9 | return m_unk68; 10 | } 11 | 12 | // FUNCTION: LEGO1 0x10002cd0 13 | void LegoActor::VTable0x54(MxFloat p_unk) 14 | { 15 | m_unk68 = p_unk; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x10002ce0 19 | void LegoActor::VTable0x58(MxFloat p_unk) 20 | { 21 | m_unk70 = p_unk; 22 | } 23 | 24 | // FUNCTION: LEGO1 0x10002cf0 25 | MxFloat LegoActor::VTable0x5c() 26 | { 27 | return m_unk70; 28 | } 29 | 30 | // FUNCTION: LEGO1 0x10002d00 31 | undefined LegoActor::VTable0x60() 32 | { 33 | return m_unk74; 34 | } 35 | 36 | // FUNCTION: LEGO1 0x10002d10 37 | void LegoActor::VTable0x64(undefined p_unk) 38 | { 39 | m_unk74 = p_unk; 40 | } 41 | // End header 42 | 43 | // FUNCTION: LEGO1 0x1002d110 44 | LegoActor::LegoActor() 45 | { 46 | m_unk68 = 0.0f; 47 | m_unk6c = 0; 48 | m_unk70 = 0.0f; 49 | m_unk10 = 0; 50 | m_unk74 = 0; 51 | } 52 | -------------------------------------------------------------------------------- /LEGO1/legoactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOACTOR_H 2 | #define LEGOACTOR_H 3 | 4 | #include "decomp.h" 5 | #include "legoentity.h" 6 | 7 | // VTABLE: LEGO1 0x100d6d68 8 | // SIZE 0x78 9 | class LegoActor : public LegoEntity { 10 | public: 11 | LegoActor(); 12 | 13 | // FUNCTION: LEGO1 0x1002d210 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f0124 17 | return "LegoActor"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1002d220 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name); 24 | } 25 | 26 | virtual MxFloat VTable0x50(); // vtable+0x50 27 | virtual void VTable0x54(MxFloat p_unk); // vtable+0x54 28 | virtual void VTable0x58(MxFloat p_unk); // vtable+0x58 29 | virtual MxFloat VTable0x5c(); // vtable+0x5c 30 | virtual undefined VTable0x60(); // vtable+0x60 31 | virtual void VTable0x64(undefined p_unk); // vtable+0x64 32 | 33 | private: 34 | MxFloat m_unk68; 35 | undefined4 m_unk6c; 36 | MxFloat m_unk70; 37 | undefined m_unk74; 38 | }; 39 | 40 | #endif // LEGOACTOR_H 41 | -------------------------------------------------------------------------------- /LEGO1/legoactorpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOACTORPRESENTER_H 2 | #define LEGOACTORPRESENTER_H 3 | 4 | #include "legoentitypresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d5320 7 | // SIZE 0x50 8 | class LegoActorPresenter : public LegoEntityPresenter { 9 | public: 10 | // FUNCTION: LEGO1 0x1000cb10 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f06a4 14 | return "LegoActorPresenter"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000cb20 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // LEGOACTORPRESENTER_H 25 | -------------------------------------------------------------------------------- /LEGO1/legoanimactor.cpp: -------------------------------------------------------------------------------- 1 | #include "legoanimactor.h" 2 | -------------------------------------------------------------------------------- /LEGO1/legoanimactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOANIMACTOR_H 2 | #define LEGOANIMACTOR_H 3 | 4 | #include "legopathactor.h" 5 | 6 | class LegoAnimActor : public LegoPathActor { 7 | public: 8 | }; 9 | 10 | #endif // LEGOANIMACTOR_H 11 | -------------------------------------------------------------------------------- /LEGO1/legoanimationmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "legoanimationmanager.h" 2 | 3 | // GLOBAL: LEGO1 0x100f74f8 4 | int g_legoAnimationManagerConfig = 1; 5 | 6 | // FUNCTION: LEGO1 0x1005eb50 7 | void LegoAnimationManager::configureLegoAnimationManager(int param_1) 8 | { 9 | g_legoAnimationManagerConfig = param_1; 10 | } 11 | 12 | // STUB: LEGO1 0x1005eb60 13 | LegoAnimationManager::LegoAnimationManager() 14 | { 15 | // TODO 16 | } 17 | 18 | // STUB: LEGO1 0x1005ed30 19 | LegoAnimationManager::~LegoAnimationManager() 20 | { 21 | // TODO 22 | } 23 | 24 | // STUB: LEGO1 0x1005f130 25 | void LegoAnimationManager::Init() 26 | { 27 | // TODO 28 | } 29 | 30 | // STUB: LEGO1 0x1005f6d0 31 | void LegoAnimationManager::FUN_1005f6d0(MxBool p) 32 | { 33 | // TODO 34 | } 35 | 36 | // STUB: LEGO1 0x100619f0 37 | MxLong LegoAnimationManager::Notify(MxParam& p) 38 | { 39 | // TODO 40 | 41 | return 0; 42 | } 43 | 44 | // STUB: LEGO1 0x10061cc0 45 | MxResult LegoAnimationManager::Tickle() 46 | { 47 | // TODO 48 | 49 | return SUCCESS; 50 | } 51 | -------------------------------------------------------------------------------- /LEGO1/legoanimationmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOANIMATIONMANAGER_H 2 | #define LEGOANIMATIONMANAGER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d8c18 7 | // SIZE 0x500 8 | class LegoAnimationManager : public MxCore { 9 | public: 10 | LegoAnimationManager(); 11 | virtual ~LegoAnimationManager() override; // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | virtual MxResult Tickle() override; // vtable+0x8 15 | 16 | // FUNCTION: LEGO1 0x1005ec80 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x100f7508 20 | return "LegoAnimationManager"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x1005ec90 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, ClassName()) || MxCore::IsA(name); 27 | } 28 | 29 | void FUN_1005f6d0(MxBool p); 30 | 31 | __declspec(dllexport) static void configureLegoAnimationManager(int param_1); 32 | 33 | private: 34 | void Init(); 35 | }; 36 | 37 | #endif // LEGOANIMATIONMANAGER_H 38 | -------------------------------------------------------------------------------- /LEGO1/legoanimmmpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoanimmmpresenter.h" 2 | 3 | // STUB: LEGO1 0x1004a8d0 4 | LegoAnimMMPresenter::LegoAnimMMPresenter() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/legoanimmmpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOANIMMMPRESENTER_H 2 | #define LEGOANIMMMPRESENTER_H 3 | 4 | #include "mxcompositepresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d7de8 7 | // SIZE 0x74 8 | class LegoAnimMMPresenter : public MxCompositePresenter { 9 | public: 10 | LegoAnimMMPresenter(); 11 | 12 | // FUNCTION: LEGO1 0x1004a950 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f046c 16 | return "LegoAnimMMPresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1004a960 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, LegoAnimMMPresenter::ClassName()) || MxCompositePresenter::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // LEGOANIMMMPRESENTER_H 27 | -------------------------------------------------------------------------------- /LEGO1/legoanimpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoanimpresenter.h" 2 | 3 | // STUB: LEGO1 0x10068420 4 | LegoAnimPresenter::LegoAnimPresenter() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x100686f0 10 | void LegoAnimPresenter::Init() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/legoanimpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOANIMPRESENTER_H 2 | #define LEGOANIMPRESENTER_H 3 | 4 | #include "mxvideopresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d90c8 7 | class LegoAnimPresenter : public MxVideoPresenter { 8 | public: 9 | LegoAnimPresenter(); 10 | 11 | // FUNCTION: LEGO1 0x10068530 12 | inline virtual const char* ClassName() const override // vtable+0x0c 13 | { 14 | // GLOBAL: LEGO1 0x100f071c 15 | return "LegoAnimPresenter"; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x10068540 19 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 20 | { 21 | return !strcmp(name, LegoAnimPresenter::ClassName()) || MxVideoPresenter::IsA(name); 22 | } 23 | 24 | private: 25 | void Init(); 26 | }; 27 | 28 | #endif // LEGOANIMPRESENTER_H 29 | -------------------------------------------------------------------------------- /LEGO1/legobackgroundcolor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOBACKGROUNDCOLOR_H 2 | #define LEGOBACKGROUNDCOLOR_H 3 | 4 | #include "mxvariable.h" 5 | 6 | // VTABLE: LEGO1 0x100d74a8 7 | // SIZE 0x30 8 | class LegoBackgroundColor : public MxVariable { 9 | public: 10 | __declspec(dllexport) LegoBackgroundColor(const char* p_key, const char* p_value); 11 | virtual void SetValue(const char* p_colorString) override; 12 | 13 | private: 14 | float h; 15 | float s; 16 | float v; 17 | }; 18 | 19 | #endif // LEGOBACKGROUNDCOLOR_H 20 | -------------------------------------------------------------------------------- /LEGO1/legobuildingmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "legobuildingmanager.h" 2 | 3 | // GLOBAL: LEGO1 0x100f37cc 4 | int g_buildingManagerConfig = 1; 5 | 6 | // FUNCTION: LEGO1 0x1002f8b0 7 | void LegoBuildingManager::configureLegoBuildingManager(int param_1) 8 | { 9 | g_buildingManagerConfig = param_1; 10 | } 11 | 12 | // FUNCTION: LEGO1 0x1002f8c0 13 | LegoBuildingManager::LegoBuildingManager() 14 | { 15 | Init(); 16 | } 17 | 18 | // STUB: LEGO1 0x1002f960 19 | LegoBuildingManager::~LegoBuildingManager() 20 | { 21 | // TODO 22 | } 23 | 24 | // STUB: LEGO1 0x1002f9d0 25 | void LegoBuildingManager::Init() 26 | { 27 | // TODO 28 | } 29 | -------------------------------------------------------------------------------- /LEGO1/legobuildingmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOBUILDINGMANAGER_H 2 | #define LEGOBUILDINGMANAGER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d6f50 7 | // SIZE 0x30 8 | class LegoBuildingManager : public MxCore { 9 | public: 10 | LegoBuildingManager(); 11 | virtual ~LegoBuildingManager() override; 12 | 13 | // FUNCTION: LEGO1 0x1002f930 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f37d0 17 | return "LegoBuildingManager"; 18 | } 19 | 20 | __declspec(dllexport) static void configureLegoBuildingManager(int param_1); 21 | 22 | private: 23 | void Init(); 24 | }; 25 | 26 | #endif // LEGOBUILDINGMANAGER_H 27 | -------------------------------------------------------------------------------- /LEGO1/legocachesound.cpp: -------------------------------------------------------------------------------- 1 | #include "legocachesound.h" 2 | 3 | // FUNCTION: LEGO1 0x100064d0 4 | LegoCacheSound::LegoCacheSound() 5 | { 6 | Init(); 7 | } 8 | 9 | // STUB: LEGO1 0x10006630 10 | LegoCacheSound::~LegoCacheSound() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x100066d0 16 | void LegoCacheSound::Init() 17 | { 18 | // TODO 19 | } 20 | -------------------------------------------------------------------------------- /LEGO1/legocachesound.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCACHESOUND_H 2 | #define LEGOCACHESOUND_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d4718 7 | // SIZE 0x88 8 | class LegoCacheSound : public MxCore { 9 | public: 10 | LegoCacheSound(); 11 | virtual ~LegoCacheSound() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10006580 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f01c4 17 | return "LegoCacheSound"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10006590 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, LegoCacheSound::ClassName()) || MxCore::IsA(name); 24 | } 25 | 26 | private: 27 | void Init(); 28 | }; 29 | 30 | #endif // LEGOCACHESOUND_H 31 | -------------------------------------------------------------------------------- /LEGO1/legocameracontroller.cpp: -------------------------------------------------------------------------------- 1 | #include "legocameracontroller.h" 2 | 3 | // STUB: LEGO1 0x10011d50 4 | LegoCameraController::LegoCameraController() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10011f70 10 | LegoCameraController::~LegoCameraController() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/legocameracontroller.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCAMERACONTROLLER_H 2 | #define LEGOCAMERACONTROLLER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d57b0 7 | // SIZE 0xc8 8 | class LegoCameraController : public MxCore { 9 | public: 10 | LegoCameraController(); 11 | virtual ~LegoCameraController() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10011ec0 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f0850 17 | return "LegoCameraController"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10011ed0 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, ClassName()) || MxCore::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // LEGOCAMERACONTROLLER_H 28 | -------------------------------------------------------------------------------- /LEGO1/legocarbuild.cpp: -------------------------------------------------------------------------------- 1 | #include "legocarbuild.h" 2 | 3 | // STUB: LEGO1 0x100226d0 4 | LegoCarBuild::LegoCarBuild() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10022a80 10 | LegoCarBuild::~LegoCarBuild() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x100238b0 16 | MxResult LegoCarBuild::Tickle() 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | 23 | // STUB: LEGO1 0x10024050 24 | MxLong LegoCarBuild::Notify(MxParam& p) 25 | { 26 | // TODO 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /LEGO1/legocarbuild.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCARBUILD_H 2 | #define LEGOCARBUILD_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d6658 7 | // SIZE 0x34c 8 | class LegoCarBuild : public LegoWorld { 9 | public: 10 | LegoCarBuild(); 11 | virtual ~LegoCarBuild() override; 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | virtual MxResult Tickle() override; // vtable+0x8 15 | 16 | // FUNCTION: LEGO1 0x10022940 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x100f0504 20 | return "LegoCarBuild"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x10022950 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, LegoCarBuild::ClassName()) || LegoWorld::IsA(name); 27 | } 28 | }; 29 | 30 | #endif // LEGOCARBUILD_H 31 | -------------------------------------------------------------------------------- /LEGO1/legocarbuildanimpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legocarbuildanimpresenter.h" 2 | 3 | // STUB: LEGO1 0x10078400 4 | LegoCarBuildAnimPresenter::LegoCarBuildAnimPresenter() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10078680 10 | LegoCarBuildAnimPresenter::~LegoCarBuildAnimPresenter() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/legocarbuildanimpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCARBUILDANIMPRESENTER_H 2 | #define LEGOCARBUILDANIMPRESENTER_H 3 | 4 | #include "legoanimpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d99e0 7 | // SIZE 0x150 8 | class LegoCarBuildAnimPresenter : public LegoAnimPresenter { 9 | public: 10 | LegoCarBuildAnimPresenter(); 11 | virtual ~LegoCarBuildAnimPresenter() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x10078510 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f05ec 17 | return "LegoCarBuildAnimPresenter"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10078520 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, LegoCarBuildAnimPresenter::ClassName()) || LegoAnimPresenter::IsA(name); 24 | } 25 | }; 26 | 27 | #endif // LEGOCARBUILDANIMPRESENTER_H 28 | -------------------------------------------------------------------------------- /LEGO1/legocarraceactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCARRACEACTOR_H 2 | #define LEGOCARRACEACTOR_H 3 | 4 | #include "legoraceactor.h" 5 | 6 | // VTABLE: LEGO1 0x100da0d8 7 | class LegoCarRaceActor : public LegoRaceActor { 8 | public: 9 | // FUNCTION: LEGO1 0x10081650 10 | inline virtual const char* ClassName() const override // vtable+0x0c 11 | { 12 | // GLOBAL: LEGO1 0x100f0568 13 | return "LegoCarRaceActor"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x10081670 17 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, LegoCarRaceActor::ClassName()) || LegoRaceActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // LEGOCARRACEACTOR_H 24 | -------------------------------------------------------------------------------- /LEGO1/legocontrolmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "legocontrolmanager.h" 2 | 3 | // STUB: LEGO1 0x10028520 4 | LegoControlManager::LegoControlManager() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10028d60 10 | LegoControlManager::~LegoControlManager() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10028e10 16 | void LegoControlManager::Register(MxCore* p_listener) 17 | { 18 | // TODO 19 | } 20 | 21 | // STUB: LEGO1 0x10028ea0 22 | void LegoControlManager::Unregister(MxCore* p_listener) 23 | { 24 | // TODO 25 | } 26 | 27 | // STUB: LEGO1 0x10029600 28 | MxResult LegoControlManager::Tickle() 29 | { 30 | // TODO 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /LEGO1/legocontrolmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOCONTROLMANAGER_H 2 | #define LEGOCONTROLMANAGER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d6a80 7 | class LegoControlManager : public MxCore { 8 | public: 9 | LegoControlManager(); 10 | virtual ~LegoControlManager() override; // vtable+0x0 11 | 12 | virtual MxResult Tickle() override; // vtable+0x8 13 | 14 | // FUNCTION: LEGO1 0x10028cb0 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f31b8 18 | return "LegoControlManager"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x10028cc0 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, LegoControlManager::ClassName()) || MxCore::IsA(name); 25 | } 26 | 27 | void Register(MxCore* p_listener); 28 | void Unregister(MxCore* p_listener); 29 | }; 30 | 31 | #endif // LEGOCONTROLMANAGER_H 32 | -------------------------------------------------------------------------------- /LEGO1/legoentitypresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoentitypresenter.h" 2 | 3 | #include "legoomni.h" 4 | #include "legovideomanager.h" 5 | 6 | DECOMP_SIZE_ASSERT(LegoEntityPresenter, 0x50); 7 | 8 | // FUNCTION: LEGO1 0x10053440 9 | LegoEntityPresenter::LegoEntityPresenter() 10 | { 11 | Init(); 12 | } 13 | 14 | // FUNCTION: LEGO1 0x100535c0 15 | void LegoEntityPresenter::Init() 16 | { 17 | m_unk4c = 0; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x100535d0 21 | LegoEntityPresenter::~LegoEntityPresenter() 22 | { 23 | Destroy(TRUE); 24 | } 25 | 26 | // FUNCTION: LEGO1 0x10053630 27 | undefined4 LegoEntityPresenter::vtable6c(undefined4 p_unknown) 28 | { 29 | m_unk4c = p_unknown; 30 | return 0; 31 | } 32 | 33 | // FUNCTION: LEGO1 0x10053640 34 | void LegoEntityPresenter::Destroy(MxBool p_fromDestructor) 35 | { 36 | if (VideoManager()) { 37 | VideoManager()->RemovePresenter(*this); 38 | } 39 | 40 | Init(); 41 | } 42 | 43 | // FUNCTION: LEGO1 0x10053670 44 | void LegoEntityPresenter::Destroy() 45 | { 46 | Destroy(FALSE); 47 | } 48 | -------------------------------------------------------------------------------- /LEGO1/legoentitypresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOENTITYPRESENTER_H 2 | #define LEGOENTITYPRESENTER_H 3 | 4 | #include "mxcompositepresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d8398 7 | // SIZE 0x50 8 | class LegoEntityPresenter : public MxCompositePresenter { 9 | public: 10 | LegoEntityPresenter(); 11 | virtual ~LegoEntityPresenter() override; // vtable+0x0 12 | 13 | // FUNCTION: LEGO1 0x100534b0 14 | inline const char* ClassName() const override // vtable+0xc 15 | { 16 | // GLOBAL: LEGO1 0x100f06b8 17 | return "LegoEntityPresenter"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x100534c0 21 | inline MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(name); 24 | } 25 | 26 | virtual void Destroy() override; // vtable+0x38 27 | virtual void Init(); // vtable+0x68 28 | virtual undefined4 vtable6c(undefined4 p_unknown); // vtable+0x6c 29 | 30 | private: 31 | void Destroy(MxBool p_fromDestructor); 32 | 33 | undefined4 m_unk4c; 34 | }; 35 | 36 | #endif // LEGOENTITYPRESENTER_H 37 | -------------------------------------------------------------------------------- /LEGO1/legoeventnotificationparam.cpp: -------------------------------------------------------------------------------- 1 | #include "legoeventnotificationparam.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(LegoEventNotificationParam, 0x20); 6 | -------------------------------------------------------------------------------- /LEGO1/legoeventnotificationparam.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOEVENTNOTIFICATIONPARAM_H 2 | #define LEGOEVENTNOTIFICATIONPARAM_H 3 | 4 | #include "mxnotificationparam.h" 5 | #include "mxtypes.h" 6 | 7 | // VTABLE: LEGO1 0x100d6aa0 8 | class LegoEventNotificationParam : public MxNotificationParam { 9 | public: 10 | inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {} 11 | inline LegoEventNotificationParam( 12 | NotificationId p_type, 13 | MxCore* p_sender, 14 | MxU8 p_modifier, 15 | MxS32 p_x, 16 | MxS32 p_y, 17 | MxU8 p_key 18 | ) 19 | : MxNotificationParam(p_type, p_sender), m_modifier(p_modifier), m_x(p_x), m_y(p_y), m_key(p_key), m_unk1c(0) 20 | { 21 | } 22 | 23 | virtual ~LegoEventNotificationParam() override {} // vtable+0x0 (scalar deleting destructor) 24 | inline MxU8 GetKey() const { return m_key; } 25 | 26 | protected: 27 | MxU8 m_modifier; // 0x0c 28 | MxS32 m_x; // 0x10 29 | MxS32 m_y; // 0x14 30 | MxU8 m_key; // 0x18 31 | MxU32 m_unk1c; // 0x1c 32 | }; 33 | 34 | #endif // LEGOEVENTNOTIFICATIONPARAM_H 35 | -------------------------------------------------------------------------------- /LEGO1/legoextraactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOEXTRAACTOR_H 2 | #define LEGOEXTRAACTOR_H 3 | 4 | #include "legoanimactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d6c10 7 | class LegoExtraActor : public LegoAnimActor { 8 | public: 9 | // FUNCTION: LEGO1 0x1002b7a0 10 | inline const char* ClassName() const override // vtable+0xc 11 | { 12 | // GLOBAL: LEGO1 0x100f3204 13 | return "LegoExtraActor"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x1002b7c0 17 | inline MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, LegoExtraActor::ClassName()) || LegoAnimActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // LEGOEXTRAACTOR_H 24 | -------------------------------------------------------------------------------- /LEGO1/legoflctexturepresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoflctexturepresenter.h" 2 | 3 | // STUB: LEGO1 0x1005de80 4 | LegoFlcTexturePresenter::LegoFlcTexturePresenter() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/legoflctexturepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOFLCTEXTUREPRESENTER_H 2 | #define LEGOFLCTEXTUREPRESENTER_H 3 | 4 | #include "mxflcpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d89e0 7 | // SIZE 0x70 8 | class LegoFlcTexturePresenter : public MxFlcPresenter { 9 | public: 10 | LegoFlcTexturePresenter(); 11 | 12 | // FUNCTION: LEGO1 0x1005def0 13 | inline const char* ClassName() const override // vtable+0xc 14 | { 15 | // GLOBAL: LEGO1 0x100f0634 16 | return "LegoFlcTexturePresenter"; 17 | } 18 | }; 19 | 20 | #endif // LEGOFLCTEXTUREPRESENTER_H 21 | -------------------------------------------------------------------------------- /LEGO1/legofullscreenmovie.cpp: -------------------------------------------------------------------------------- 1 | #include "legofullscreenmovie.h" 2 | 3 | #include "decomp.h" 4 | #include "legoomni.h" 5 | #include "legovideomanager.h" 6 | #include "mxtypes.h" 7 | 8 | DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24) 9 | 10 | // GLOBAL: LEGO1 0x100f3be8 11 | const char* g_str_enable = "enable"; 12 | 13 | // GLOBAL: LEGO1 0x100f3bf4 14 | const char* g_str_disable = "disable"; 15 | 16 | // FUNCTION: LEGO1 0x1003c500 17 | LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value) 18 | { 19 | m_key = p_key; 20 | m_key.ToUpperCase(); 21 | SetValue(p_value); 22 | } 23 | 24 | // FUNCTION: LEGO1 0x1003c5c0 25 | void LegoFullScreenMovie::SetValue(const char* p_option) 26 | { 27 | m_value = p_option; 28 | m_value.ToLowerCase(); 29 | 30 | LegoVideoManager* videomanager = VideoManager(); 31 | if (videomanager) { 32 | 33 | if (!strcmp(m_value.GetData(), g_str_enable)) { 34 | videomanager->EnableFullScreenMovie(TRUE); 35 | return; 36 | } 37 | 38 | if (!strcmp(m_value.GetData(), g_str_disable)) { 39 | videomanager->EnableFullScreenMovie(FALSE); 40 | return; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LEGO1/legofullscreenmovie.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOFULLSCREENMOVIE_H 2 | #define LEGOFULLSCREENMOVIE_H 3 | 4 | #include "mxvariable.h" 5 | 6 | // VTABLE: LEGO1 0x100d74b8 7 | // SIZE 0x24 8 | class LegoFullScreenMovie : public MxVariable { 9 | public: 10 | LegoFullScreenMovie(const char* p_key, const char* p_value); 11 | virtual void SetValue(const char* p_option) override; 12 | }; 13 | 14 | #endif // LEGOFULLSCREENMOVIE_H 15 | -------------------------------------------------------------------------------- /LEGO1/legohideanimpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legohideanimpresenter.h" 2 | 3 | // FUNCTION: LEGO1 0x1006d7e0 4 | LegoHideAnimPresenter::LegoHideAnimPresenter() 5 | { 6 | Init(); 7 | } 8 | 9 | // STUB: LEGO1 0x1006da50 10 | void LegoHideAnimPresenter::Init() 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /LEGO1/legohideanimpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOHIDEANIMPRESENTER_H 2 | #define LEGOHIDEANIMPRESENTER_H 3 | 4 | #include "legoloopinganimpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d9278 7 | // SIZE 0xc4 8 | class LegoHideAnimPresenter : public LegoLoopingAnimPresenter { 9 | public: 10 | LegoHideAnimPresenter(); 11 | 12 | // FUNCTION: LEGO1 0x1006d880 13 | inline const char* ClassName() const override // vtable+0xc 14 | { 15 | // GLOBAL: LEGO1 0x100f06cc 16 | return "LegoHideAnimPresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1006d890 20 | inline MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, ClassName()) || LegoAnimPresenter::IsA(name); 23 | } 24 | 25 | private: 26 | void Init(); 27 | }; 28 | 29 | #endif // LEGOHIDEANIMPRESENTER_H 30 | -------------------------------------------------------------------------------- /LEGO1/legojetski.cpp: -------------------------------------------------------------------------------- 1 | #include "legojetski.h" 2 | -------------------------------------------------------------------------------- /LEGO1/legojetski.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOJETSKI_H 2 | #define LEGOJETSKI_H 3 | 4 | #include "legojetskiraceactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d5a40 7 | class LegoJetski : public LegoJetskiRaceActor { 8 | public: 9 | // FUNCTION: LEGO1 0x10013e80 10 | inline const char* ClassName() const override // vtable+0xc 11 | { 12 | // GLOBAL: LEGO1 0x100f053c 13 | return "LegoJetski"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x10013ea0 17 | inline MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // LEGOJETSKI_H 24 | -------------------------------------------------------------------------------- /LEGO1/legojetskiraceactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOJETSKIRACEACTOR_H 2 | #define LEGOJETSKIRACEACTOR_H 3 | 4 | #include "legocarraceactor.h" 5 | 6 | // VTABLE: LEGO1 0x100da240 7 | class LegoJetskiRaceActor : public LegoCarRaceActor { 8 | public: 9 | // FUNCTION: LEGO1 0x10081d80 10 | inline const char* ClassName() const override // vtable+0xc 11 | { 12 | // GLOBAL: LEGO1 0x100f0554 13 | return "LegoJetskiRaceActor"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x10081da0 17 | inline MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, LegoJetskiRaceActor::ClassName()) || LegoCarRaceActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // LEGOJETSKIRACEACTOR_H 24 | -------------------------------------------------------------------------------- /LEGO1/legoloadcachesoundpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoloadcachesoundpresenter.h" 2 | 3 | // FUNCTION: LEGO1 0x10018340 4 | LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter() 5 | { 6 | Init(); 7 | } 8 | 9 | // STUB: LEGO1 0x10018480 10 | LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x100184e0 16 | void LegoLoadCacheSoundPresenter::Init() 17 | { 18 | // TODO 19 | } 20 | -------------------------------------------------------------------------------- /LEGO1/legoloadcachesoundpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOLOADCACHESOUNDPRESENTER_H 2 | #define LEGOLOADCACHESOUNDPRESENTER_H 3 | 4 | #include "mxwavepresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d5fa8 7 | // SIZE 0x90 8 | class LegoLoadCacheSoundPresenter : public MxWavePresenter { 9 | public: 10 | LegoLoadCacheSoundPresenter(); 11 | virtual ~LegoLoadCacheSoundPresenter() override; 12 | 13 | // FUNCTION: LEGO1 0x10018450 14 | inline const char* ClassName() const override // vtable+0xc 15 | { 16 | // GLOBAL: LEGO1 0x100f05a0 17 | return "LegoLoadCacheSoundPresenter"; 18 | } 19 | 20 | private: 21 | void Init(); 22 | }; 23 | 24 | #endif // LEGOLOADCACHESOUNDPRESENTER_H 25 | -------------------------------------------------------------------------------- /LEGO1/legolocomotionanimpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legolocomotionanimpresenter.h" 2 | 3 | // FUNCTION: LEGO1 0x1006cdd0 4 | LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter() 5 | { 6 | Init(); 7 | } 8 | 9 | // STUB: LEGO1 0x1006d0b0 10 | void LegoLocomotionAnimPresenter::Init() 11 | { 12 | // TODO 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/legolocomotionanimpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOLOCOMOTIONANIMPRESENTER_H 2 | #define LEGOLOCOMOTIONANIMPRESENTER_H 3 | 4 | #include "legoloopinganimpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d9170 7 | class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter { 8 | public: 9 | LegoLocomotionAnimPresenter(); 10 | 11 | // FUNCTION: LEGO1 0x1006ce50 12 | inline const char* ClassName() const override // vtable+0xc 13 | { 14 | // GLOBAL: LEGO1 0x100f06e4 15 | return "LegoLocomotionAnimPresenter"; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x1006ce60 19 | inline MxBool IsA(const char* name) const override // vtable+0x10 20 | { 21 | return !strcmp(name, ClassName()) || LegoLoopingAnimPresenter::IsA(name); 22 | } 23 | 24 | private: 25 | void Init(); 26 | }; 27 | 28 | #endif // LEGOLOCOMOTIONANIMPRESENTER_H 29 | -------------------------------------------------------------------------------- /LEGO1/legoloopinganimpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOLOOPINGANIMPRESENTER_H 2 | #define LEGOLOOPINGANIMPRESENTER_H 3 | 4 | #include "legoanimpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d4900 7 | // SIZE 0xc0 (discovered through inlined constructor at 0x10009ecd) 8 | class LegoLoopingAnimPresenter : public LegoAnimPresenter { 9 | public: 10 | // FUNCTION: LEGO1 0x1000c9a0 11 | inline const char* ClassName() const override // vtable+0xc 12 | { 13 | // GLOBAL: LEGO1 0x100f0700 14 | return "LegoLoopingAnimPresenter"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000c9b0 18 | inline MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, ClassName()) || LegoAnimPresenter::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // LEGOLOOPINGANIMPRESENTER_H 25 | -------------------------------------------------------------------------------- /LEGO1/legometerpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legometerpresenter.h" 2 | 3 | #include "decomp.h" 4 | 5 | // Uncomment when member class variables are fleshed out. 6 | // DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94); // 0x1000a163 7 | -------------------------------------------------------------------------------- /LEGO1/legometerpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOMETERPRESENTER_H 2 | #define LEGOMETERPRESENTER_H 3 | 4 | #include "mxstillpresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d7ac8 7 | // SIZE 0x94 (from 0x1000a163) 8 | class LegoMeterPresenter : public MxStillPresenter { 9 | public: 10 | // MxStillPresenter's `::ClassName` and `::IsA` are used. 11 | }; 12 | 13 | #endif // LEGOMETERPRESENTER_H 14 | -------------------------------------------------------------------------------- /LEGO1/legomodelpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legomodelpresenter.h" 2 | 3 | // GLOBAL: LEGO1 0x100f7ae0 4 | int g_modelPresenterConfig = 1; 5 | 6 | // FUNCTION: LEGO1 0x1007f660 7 | void LegoModelPresenter::configureLegoModelPresenter(int param_1) 8 | { 9 | g_modelPresenterConfig = param_1; 10 | } 11 | -------------------------------------------------------------------------------- /LEGO1/legomodelpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOMODELPRESENTER_H 2 | #define LEGOMODELPRESENTER_H 3 | 4 | #include "mxvideopresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d4e50 7 | // SIZE 0x6c (discovered through inline constructor at 0x10009ae6) 8 | class LegoModelPresenter : public MxVideoPresenter { 9 | public: 10 | __declspec(dllexport) static void configureLegoModelPresenter(int param_1); 11 | 12 | // FUNCTION: LEGO1 0x1000ccb0 13 | inline const char* ClassName() const override // vtable+0xc 14 | { 15 | // GLOBAL: LEGO1 0x100f067c 16 | return "LegoModelPresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1000ccc0 20 | inline MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, LegoModelPresenter::ClassName()) || MxVideoPresenter::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // LEGOMODELPRESENTER_H 27 | -------------------------------------------------------------------------------- /LEGO1/legoobjectfactory.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOOBJECTFACTORY_H 2 | #define LEGOOBJECTFACTORY_H 3 | 4 | #include "mxobjectfactory.h" 5 | 6 | #define FOR_LEGOOBJECTFACTORY_OBJECTS(X) X(InfocenterState) 7 | 8 | // VTABLE: LEGO1 0x100d4768 9 | class LegoObjectFactory : public MxObjectFactory { 10 | public: 11 | LegoObjectFactory(); 12 | virtual MxCore* Create(const char* p_name) override; // vtable 0x14 13 | virtual void Destroy(MxCore* p_object) override; // vtable 0x18 14 | 15 | private: 16 | #define X(V) MxAtomId m_id##V; 17 | FOR_LEGOOBJECTFACTORY_OBJECTS(X) 18 | #undef X 19 | }; 20 | 21 | #endif // LEGOOBJECTFACTORY_H 22 | -------------------------------------------------------------------------------- /LEGO1/legopalettepresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legopalettepresenter.h" 2 | 3 | DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68) 4 | 5 | // FUNCTION: LEGO1 0x10079e50 6 | LegoPalettePresenter::LegoPalettePresenter() 7 | { 8 | Init(); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x1007a070 12 | LegoPalettePresenter::~LegoPalettePresenter() 13 | { 14 | Destroy(TRUE); 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1007a0d0 18 | void LegoPalettePresenter::Init() 19 | { 20 | m_palette = NULL; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x1007a0e0 24 | void LegoPalettePresenter::Destroy(MxBool p_fromDestructor) 25 | { 26 | m_criticalSection.Enter(); 27 | if (m_palette) { 28 | delete m_palette; 29 | } 30 | Init(); 31 | m_criticalSection.Leave(); 32 | if (!p_fromDestructor) { 33 | MxVideoPresenter::Destroy(FALSE); 34 | } 35 | } 36 | 37 | // FUNCTION: LEGO1 0x1007a120 38 | void LegoPalettePresenter::Destroy() 39 | { 40 | Destroy(FALSE); 41 | } 42 | -------------------------------------------------------------------------------- /LEGO1/legopalettepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPALETTEPRESENTER_H 2 | #define LEGOPALETTEPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxpalette.h" 6 | #include "mxvideopresenter.h" 7 | 8 | // VTABLE: LEGO1 0x100d9aa0 9 | // SIZE 0x68 10 | class LegoPalettePresenter : public MxVideoPresenter { 11 | public: 12 | LegoPalettePresenter(); 13 | virtual ~LegoPalettePresenter() override; // vtable+0x0 14 | 15 | // FUNCTION: LEGO1 0x10079f30 16 | inline const char* ClassName() const override // vtable+0xc 17 | { 18 | // GLOBAL: LEGO1 0x100f061c 19 | return "LegoPalettePresenter"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x10079f40 23 | inline MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, ClassName()) || MxVideoPresenter::IsA(name); 26 | } 27 | 28 | virtual void Destroy() override; // vtable+0x38 29 | 30 | private: 31 | void Init(); 32 | void Destroy(MxBool p_fromDestructor); 33 | 34 | MxPalette* m_palette; 35 | }; 36 | 37 | #endif // LEGOPALETTEPRESENTER_H 38 | -------------------------------------------------------------------------------- /LEGO1/legopartpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legopartpresenter.h" 2 | 3 | // GLOBAL: LEGO1 0x100f7aa0 4 | int g_partPresenterConfig1 = 1; 5 | 6 | // GLOBAL: LEGO1 0x100f7aa4 7 | int g_partPresenterConfig2 = 100; 8 | 9 | // FUNCTION: LEGO1 0x1007c990 10 | void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2) 11 | { 12 | g_partPresenterConfig1 = param_1; 13 | g_partPresenterConfig2 = param_2; 14 | } 15 | -------------------------------------------------------------------------------- /LEGO1/legopartpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPARTPRESENTER_H 2 | #define LEGOPARTPRESENTER_H 3 | 4 | #include "mxmediapresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d4df0 7 | // SIZE 0x54 (from inlined construction at 0x10009fac) 8 | class LegoPartPresenter : public MxMediaPresenter { 9 | public: 10 | // FUNCTION: LEGO1 0x1000cf70 11 | inline const char* ClassName() const override // vtable+0xc 12 | { 13 | // GLOBAL: LEGO1 0x100f05d8 14 | return "LegoPartPresenter"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000cf80 18 | inline MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, LegoPartPresenter::ClassName()) || MxMediaPresenter::IsA(name); 21 | } 22 | 23 | __declspec(dllexport) static void configureLegoPartPresenter(int param_1, int param_2); 24 | }; 25 | 26 | #endif // LEGOPARTPRESENTER_H 27 | -------------------------------------------------------------------------------- /LEGO1/legopathboundary.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPATHBOUNDARH_H 2 | #define LEGOPATHBOUNDARH_H 3 | 4 | class LegoPathBoundary {}; 5 | 6 | #endif // LEGOPATHBOUNDARH_H 7 | -------------------------------------------------------------------------------- /LEGO1/legopathcontroller.cpp: -------------------------------------------------------------------------------- 1 | #include "legopathcontroller.h" 2 | 3 | // STUB: LEGO1 0x10044f40 4 | LegoPathController::LegoPathController() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10045740 10 | LegoPathController::~LegoPathController() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10045c10 16 | MxResult LegoPathController::Tickle() 17 | { 18 | // TODO 19 | return SUCCESS; 20 | } 21 | -------------------------------------------------------------------------------- /LEGO1/legopathcontroller.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPATHCONTROLLER_H 2 | #define LEGOPATHCONTROLLER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d7d60 7 | // SIZE 0x40 8 | class LegoPathController : public MxCore { 9 | public: 10 | LegoPathController(); 11 | virtual ~LegoPathController() override; 12 | 13 | virtual MxResult Tickle() override; // vtable+08 14 | 15 | // FUNCTION: LEGO1 0x10045110 16 | inline const char* ClassName() const override // vtable+0xc 17 | { 18 | // GLOBAL: LEGO1 0x100f11b8 19 | return "LegoPathController"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x10045120 23 | inline MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, LegoPathController::ClassName()) || MxCore::IsA(name); 26 | } 27 | }; 28 | 29 | #endif // LEGOPATHCONTROLLER_H 30 | -------------------------------------------------------------------------------- /LEGO1/legopathcontrollerlist.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPATHCONTROLLERLIST_H 2 | #define LEGOPATHCONTROLLERLIST_H 3 | 4 | #include "legopathcontroller.h" 5 | #include "mxlist.h" 6 | #include "mxtypes.h" 7 | 8 | // VTABLE: LEGO1 0x100d6320 9 | // class MxPtrList 10 | 11 | // VTABLE: LEGO1 0x100d6338 12 | // SIZE 0x18 13 | class LegoPathControllerList : public MxPtrList { 14 | public: 15 | LegoPathControllerList() : MxPtrList(Destroy) {} 16 | virtual MxS8 Compare(LegoPathController*, LegoPathController*) override; // vtable+0x14 17 | static void Destroy(LegoPathController*); 18 | }; 19 | 20 | // VTABLE: LEGO1 0x100d6380 21 | // class MxCollection 22 | 23 | // VTABLE: LEGO1 0x100d6398 24 | // class MxList 25 | 26 | #endif // LEGOPATHCONTROLLERLIST_H 27 | -------------------------------------------------------------------------------- /LEGO1/legopathpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPATHPRESENTER_H 2 | #define LEGOPATHPRESENTER_H 3 | 4 | #include "mxmediapresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d7c10 7 | // SIZE 0x54 8 | class LegoPathPresenter : public MxMediaPresenter { 9 | public: 10 | LegoPathPresenter(); 11 | 12 | // FUNCTION: LEGO1 0x100449a0 13 | inline const char* ClassName() const override // vtable+0xc 14 | { 15 | // GLOBAL: LEGO1 0x100f0690 16 | return "LegoPathPresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100449b0 20 | inline MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, LegoPathPresenter::ClassName()) || MxMediaPresenter::IsA(name); 23 | } 24 | 25 | virtual void RepeatingTickle() override; // vtable+0x24 26 | virtual void ParseExtra() override; // vtable+0x30 27 | virtual MxResult AddToManager() override; // vtable+0x34 28 | virtual void Destroy() override; // vtable+0x38 29 | 30 | private: 31 | void Init(); 32 | 33 | protected: 34 | void Destroy(MxBool p_fromDestructor); 35 | 36 | MxAtomId m_atomId; // 0x50 37 | }; 38 | 39 | #endif // LEGOPATHPRESENTER_H 40 | -------------------------------------------------------------------------------- /LEGO1/legophonemepresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legophonemepresenter.h" 2 | 3 | DECOMP_SIZE_ASSERT(LegoPhonemePresenter, 0x88); 4 | 5 | // FUNCTION: LEGO1 0x1004e180 6 | LegoPhonemePresenter::LegoPhonemePresenter() 7 | { 8 | Init(); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x1004e340 12 | LegoPhonemePresenter::~LegoPhonemePresenter() 13 | { 14 | } 15 | 16 | // FUNCTION: LEGO1 0x1004e3b0 17 | void LegoPhonemePresenter::Init() 18 | { 19 | m_unk68 = 0; 20 | m_unk6c = 0; 21 | m_unk70 = 0; 22 | m_unk84 = 0; 23 | } 24 | -------------------------------------------------------------------------------- /LEGO1/legophonemepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPHONEMEPRESENTER_H 2 | #define LEGOPHONEMEPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxflcpresenter.h" 6 | #include "mxstring.h" 7 | #include "mxtypes.h" 8 | 9 | // VTABLE: LEGO1 0x100d8040 10 | // SIZE 0x88 11 | class LegoPhonemePresenter : public MxFlcPresenter { 12 | public: 13 | LegoPhonemePresenter(); 14 | virtual ~LegoPhonemePresenter() override; // vtable+0x0 15 | 16 | // FUNCTION: LEGO1 0x1004e310 17 | inline const char* ClassName() const override // vtable+0xc 18 | { 19 | // GLOBAL: LEGO1 0x100f064c 20 | return "LegoPhonemePresenter"; 21 | } 22 | 23 | private: 24 | void Init(); 25 | int m_unk68; 26 | int m_unk6c; 27 | undefined m_unk70; 28 | MxString m_string; // 0x74 29 | undefined m_unk84; 30 | }; 31 | 32 | #endif // LEGOPHONEMEPRESENTER_H 33 | -------------------------------------------------------------------------------- /LEGO1/legoplantmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "legoplantmanager.h" 2 | 3 | // FUNCTION: LEGO1 0x10026220 4 | LegoPlantManager::LegoPlantManager() 5 | { 6 | Init(); 7 | } 8 | 9 | // STUB: LEGO1 0x100262c0 10 | LegoPlantManager::~LegoPlantManager() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x10026330 16 | void LegoPlantManager::Init() 17 | { 18 | // TODO 19 | } 20 | 21 | // STUB: LEGO1 0x10026e00 22 | MxResult LegoPlantManager::Tickle() 23 | { 24 | // TODO 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /LEGO1/legoplantmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOPLANTMANAGER_H 2 | #define LEGOPLANTMANAGER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d6758 7 | // SIZE 0x2c 8 | class LegoPlantManager : public MxCore { 9 | public: 10 | LegoPlantManager(); 11 | virtual ~LegoPlantManager() override; // vtable+0x0 12 | 13 | virtual MxResult Tickle() override; // vtable+0x8 14 | 15 | // FUNCTION: LEGO1 0x10026290 16 | inline const char* ClassName() const override // vtable+0xc 17 | { 18 | // GLOBAL: LEGO1 0x100f318c 19 | return "LegoPlantManager"; 20 | } 21 | 22 | private: 23 | void Init(); 24 | }; 25 | 26 | #endif // LEGOPLANTMANAGER_H 27 | -------------------------------------------------------------------------------- /LEGO1/legoraceactor.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGORACEACTOR_H 2 | #define LEGORACEACTOR_H 3 | 4 | #include "legoanimactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d5b88 7 | class LegoRaceActor : public LegoAnimActor { 8 | public: 9 | // FUNCTION: LEGO1 0x10014af0 10 | inline const char* ClassName() const override // vtable+0xc 11 | { 12 | // GLOBAL: LEGO1 0x100f0bf4 13 | return "LegoRaceActor"; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x10014b10 17 | inline MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, LegoRaceActor::ClassName()) || LegoAnimActor::IsA(name); 20 | } 21 | }; 22 | 23 | #endif // LEGORACEACTOR_H 24 | -------------------------------------------------------------------------------- /LEGO1/legoroi.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOROI_H 2 | #define LEGOROI_H 3 | 4 | #include "mxtypes.h" 5 | 6 | typedef MxBool (*ROIHandler)(char*, char*, MxU32); 7 | 8 | class LegoROI { 9 | public: 10 | __declspec(dllexport) void SetDisplayBB(MxS32 p_displayBB); 11 | __declspec(dllexport) static void configureLegoROI(MxS32 p_roi); 12 | 13 | static void SetSomeHandlerFunction(ROIHandler p_func); 14 | static MxBool CallTheHandlerFunction( 15 | char* p_param, 16 | MxFloat& p_red, 17 | MxFloat& p_green, 18 | MxFloat& p_blue, 19 | MxFloat& p_other 20 | ); 21 | static MxBool ColorAliasLookup(char* p_param, MxFloat& p_red, MxFloat& p_green, MxFloat& p_blue, MxFloat& p_other); 22 | }; 23 | 24 | #endif // LEGOROI_H 25 | -------------------------------------------------------------------------------- /LEGO1/legosoundmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "legosoundmanager.h" 2 | 3 | #include "mxautolocker.h" 4 | 5 | // FUNCTION: LEGO1 0x100298a0 6 | LegoSoundManager::LegoSoundManager() 7 | { 8 | Init(); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x10029940 12 | LegoSoundManager::~LegoSoundManager() 13 | { 14 | Destroy(TRUE); 15 | } 16 | 17 | // FUNCTION: LEGO1 0x100299a0 18 | void LegoSoundManager::Init() 19 | { 20 | unk0x40 = 0; 21 | unk0x3c = 0; 22 | } 23 | 24 | // STUB: LEGO1 0x100299b0 25 | void LegoSoundManager::Destroy(MxBool p_fromDestructor) 26 | { 27 | } 28 | 29 | // STUB: LEGO1 0x100299f0 30 | MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) 31 | { 32 | return FAILURE; 33 | } 34 | 35 | // FUNCTION: LEGO1 0x1002a390 36 | void LegoSoundManager::Destroy() 37 | { 38 | Destroy(FALSE); 39 | } 40 | 41 | // STUB: LEGO1 0x1002a3a0 42 | MxResult LegoSoundManager::Tickle() 43 | { 44 | MxMediaManager::Tickle(); 45 | MxAutoLocker lock(&this->m_criticalSection); 46 | 47 | return 0; // TODO: call something in unk0x40 48 | } 49 | -------------------------------------------------------------------------------- /LEGO1/legosoundmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOSOUNDMANAGER_H 2 | #define LEGOSOUNDMANAGER_H 3 | 4 | #include "mxsoundmanager.h" 5 | 6 | // VTABLE: LEGO1 0x100d6b10 7 | // SIZE 0x44 8 | class LegoSoundManager : public MxSoundManager { 9 | public: 10 | LegoSoundManager(); 11 | virtual ~LegoSoundManager() override; 12 | 13 | virtual MxResult Tickle() override; // vtable+08 14 | virtual void Destroy() override; // vtable+18 15 | virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x30 16 | 17 | private: 18 | void Init(); 19 | void Destroy(MxBool p_fromDestructor); 20 | 21 | undefined4 unk0x3c; 22 | undefined4 unk0x40; 23 | }; 24 | 25 | #endif // LEGOSOUNDMANAGER_H 26 | -------------------------------------------------------------------------------- /LEGO1/legostate.cpp: -------------------------------------------------------------------------------- 1 | #include "legostate.h" 2 | 3 | DECOMP_SIZE_ASSERT(LegoState, 0x08); 4 | 5 | // FUNCTION: LEGO1 0x10005f40 6 | LegoState::~LegoState() 7 | { 8 | } 9 | 10 | // FUNCTION: LEGO1 0x10005f90 11 | MxBool LegoState::VTable0x14() 12 | { 13 | return TRUE; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x10005fa0 17 | MxBool LegoState::SetFlag() 18 | { 19 | return FALSE; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x10005fb0 23 | MxResult LegoState::VTable0x1C(LegoFileStream* p_legoFileStream) 24 | { 25 | if (p_legoFileStream->IsWriteMode()) { 26 | p_legoFileStream->FUN_10006030(this->ClassName()); 27 | } 28 | return SUCCESS; 29 | } 30 | 31 | // FUNCTION: LEGO1 0x10006030 32 | LegoFileStream* LegoFileStream::FUN_10006030(MxString p_str) 33 | { 34 | const char* data = p_str.GetData(); 35 | MxU32 fullLength = strlen(data); 36 | 37 | MxU16 limitedLength = fullLength; 38 | Write(&limitedLength, sizeof(limitedLength)); 39 | Write(data, (MxS16) fullLength); 40 | 41 | return this; 42 | } 43 | -------------------------------------------------------------------------------- /LEGO1/legostate.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOSTATE_H 2 | #define LEGOSTATE_H 3 | 4 | #include "decomp.h" 5 | #include "legostream.h" 6 | #include "mxcore.h" 7 | #include "mxstring.h" 8 | 9 | // VTABLE: LEGO1 0x100d46c0 10 | class LegoState : public MxCore { 11 | public: 12 | virtual ~LegoState() override; // vtable+0x00 13 | 14 | // FUNCTION: LEGO1 0x100060d0 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f01b8 18 | return "LegoState"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100060e0 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, LegoState::ClassName()) || MxCore::IsA(name); 25 | } 26 | 27 | virtual MxBool VTable0x14(); // vtable+0x14 28 | virtual MxBool SetFlag(); // vtable+0x18 29 | virtual MxResult VTable0x1C(LegoFileStream* p_legoFileStream); // vtable+0x1C 30 | }; 31 | 32 | #endif // LEGOSTATE_H 33 | -------------------------------------------------------------------------------- /LEGO1/legotexturepresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legotexturepresenter.h" 2 | 3 | #include "legoomni.h" 4 | #include "legovideomanager.h" 5 | 6 | // FUNCTION: LEGO1 0x1004eb40 7 | LegoTexturePresenter::~LegoTexturePresenter() 8 | { 9 | VideoManager()->RemovePresenter(*this); 10 | } 11 | 12 | // FUNCTION: LEGO1 0x1004ebb0 13 | MxResult LegoTexturePresenter::AddToManager() 14 | { 15 | VideoManager()->AddPresenter(*this); 16 | return SUCCESS; 17 | } 18 | -------------------------------------------------------------------------------- /LEGO1/legotexturepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOTEXTUREPRESENTER_H 2 | #define LEGOTEXTUREPRESENTER_H 3 | 4 | #include "mxmediapresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d4d90 7 | // SIZE 0x54 (from inlined construction at 0x10009bb5) 8 | class LegoTexturePresenter : public MxMediaPresenter { 9 | public: 10 | virtual ~LegoTexturePresenter() override; 11 | 12 | // FUNCTION: LEGO1 0x1000ce50 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0664 16 | return "LegoTexturePresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1000ce60 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, LegoTexturePresenter::ClassName()) || MxMediaPresenter::IsA(name); 23 | } 24 | 25 | virtual MxResult AddToManager() override; // vtable+0x34 26 | }; 27 | 28 | #endif // LEGOTEXTUREPRESENTER_H 29 | -------------------------------------------------------------------------------- /LEGO1/legounksavedatawriter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOUNKSAVEDATAWRITER_H 2 | #define LEGOUNKSAVEDATAWRITER_H 3 | 4 | #include "decomp.h" 5 | #include "mxtypes.h" 6 | 7 | class LegoStream; 8 | 9 | struct LegoSaveDataEntry3 { 10 | char* m_name; 11 | void* m_unk0x04; 12 | void* m_unk0x08; 13 | MxS32 m_savePart1; 14 | MxS32 m_savePart2; 15 | MxU8 m_savePart3; 16 | undefined4 m_unk0x18[6]; 17 | MxU8 m_frameOffsetInDwords; // 0x30 18 | MxS32* m_pFrameData; 19 | MxU8 m_currentFrame; 20 | undefined4 m_unk0x3c[2]; 21 | MxU8 m_savePart5; // 0x44 22 | undefined4 m_unk0x48[5]; 23 | MxU8 m_savePart6; // 0x5c 24 | undefined4 m_unk0x60[11]; 25 | MxU8 m_savePart7; // 0x8c 26 | undefined4 m_unk0x90[5]; 27 | MxU8 m_savePart8; // 0xa4 28 | undefined4 m_unk0xa8[17]; 29 | MxU8 m_savePart9; // 0xec 30 | undefined4 m_unk0xf0[5]; 31 | MxU8 m_savePart10; // 0x104 32 | }; 33 | 34 | class LegoUnkSaveDataWriter { 35 | MxResult WriteSaveData3(LegoStream* p_stream); 36 | }; 37 | 38 | #endif // LEGOUNKSAVEDATAWRITER_H 39 | -------------------------------------------------------------------------------- /LEGO1/legovehiclebuildstate.cpp: -------------------------------------------------------------------------------- 1 | #include "legovehiclebuildstate.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50); // 1000acd7 6 | DECOMP_SIZE_ASSERT(LegoVehicleBuildState::UnkStruct, 0xc); 7 | 8 | // FUNCTION: LEGO1 0x10017c00 9 | LegoVehicleBuildState::UnkStruct::UnkStruct() 10 | { 11 | m_unk04 = 0; 12 | m_unk00 = 0; 13 | m_unk06 = 0; 14 | m_unk08 = 0; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x10025f30 18 | LegoVehicleBuildState::LegoVehicleBuildState(char* p_classType) 19 | { 20 | this->m_className = p_classType; 21 | this->m_unk4c = 0; 22 | this->m_unk4d = 0; 23 | this->m_unk4e = 0; 24 | this->m_placedPartCount = 0; 25 | } 26 | -------------------------------------------------------------------------------- /LEGO1/legoworldpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "legoworldpresenter.h" 2 | 3 | // GLOBAL: LEGO1 0x100f75d4 4 | undefined4 g_LegoWorldPresenterQuality = 1; 5 | 6 | // FUNCTION: LEGO1 0x100665b0 7 | void LegoWorldPresenter::configureLegoWorldPresenter(int p_quality) 8 | { 9 | g_LegoWorldPresenterQuality = p_quality; 10 | } 11 | 12 | // FUNCTION: LEGO1 0x100665c0 13 | LegoWorldPresenter::LegoWorldPresenter() 14 | { 15 | m_unk50 = 50000; 16 | } 17 | 18 | // STUB: LEGO1 0x10066770 19 | LegoWorldPresenter::~LegoWorldPresenter() 20 | { 21 | // TODO 22 | } 23 | -------------------------------------------------------------------------------- /LEGO1/legoworldpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef LEGOWORLDPRESENTER_H 2 | #define LEGOWORLDPRESENTER_H 3 | 4 | #include "legoentitypresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100d8ee0 7 | // SIZE 0x54 8 | class LegoWorldPresenter : public LegoEntityPresenter { 9 | public: 10 | LegoWorldPresenter(); 11 | virtual ~LegoWorldPresenter() override; // vtable+0x0 12 | 13 | __declspec(dllexport) static void configureLegoWorldPresenter(int param_1); 14 | 15 | // FUNCTION: LEGO1 0x10066630 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x100f0608 19 | return "LegoWorldPresenter"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x10066640 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, LegoWorldPresenter::ClassName()) || LegoEntityPresenter::IsA(name); 26 | } 27 | 28 | private: 29 | undefined4 m_unk50; 30 | }; 31 | 32 | #endif // LEGOWORLDPRESENTER_H 33 | -------------------------------------------------------------------------------- /LEGO1/motorcycle.cpp: -------------------------------------------------------------------------------- 1 | #include "motorcycle.h" 2 | 3 | DECOMP_SIZE_ASSERT(Motorcycle, 0x16c); 4 | 5 | // FUNCTION: LEGO1 0x100357b0 6 | Motorcycle::Motorcycle() 7 | { 8 | this->m_unk13c = 40.0; 9 | this->m_unk150 = 1.75; 10 | this->m_unk148 = 1; 11 | this->m_unk164 = 1.0; 12 | } 13 | -------------------------------------------------------------------------------- /LEGO1/motorcycle.h: -------------------------------------------------------------------------------- 1 | #ifndef MOTORCYCLE_H 2 | #define MOTORCYCLE_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d7090 8 | // SIZE 0x16c 9 | class Motorcycle : public IslePathActor { 10 | public: 11 | Motorcycle(); 12 | 13 | // FUNCTION: LEGO1 0x10035840 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x10035840 17 | return "Motorcycle"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x10035850 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, Motorcycle::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | undefined m_unk160[4]; 28 | MxFloat m_unk164; 29 | undefined m_unk168[4]; 30 | }; 31 | 32 | #endif // MOTORCYCLE_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxactionnotificationparam.cpp: -------------------------------------------------------------------------------- 1 | #include "mxactionnotificationparam.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxActionNotificationParam, 0x14) 4 | DECOMP_SIZE_ASSERT(MxEndActionNotificationParam, 0x14) 5 | 6 | // FUNCTION: LEGO1 0x100510c0 7 | MxNotificationParam* MxActionNotificationParam::Clone() 8 | { 9 | return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc); 10 | } 11 | 12 | // FUNCTION: LEGO1 0x10051270 13 | MxNotificationParam* MxEndActionNotificationParam::Clone() 14 | { 15 | return new MxEndActionNotificationParam(c_notificationEndAction, this->m_sender, this->m_action, this->m_realloc); 16 | } 17 | 18 | // SYNTHETIC: LEGO1 0x100513a0 19 | // MxEndActionNotificationParam::`scalar deleting destructor' 20 | -------------------------------------------------------------------------------- /LEGO1/mxatomid.h: -------------------------------------------------------------------------------- 1 | #ifndef MXATOMID_H 2 | #define MXATOMID_H 3 | 4 | #include "mxatomidcounter.h" 5 | #include "mxtypes.h" 6 | 7 | enum LookupMode { 8 | LookupMode_Exact = 0, 9 | LookupMode_LowerCase = 1, 10 | LookupMode_UpperCase = 2, 11 | LookupMode_LowerCase2 = 3 12 | }; 13 | 14 | class MxAtomId { 15 | public: 16 | __declspec(dllexport) MxAtomId(const char*, LookupMode); 17 | __declspec(dllexport) MxAtomId& operator=(const MxAtomId& id); 18 | __declspec(dllexport) ~MxAtomId(); 19 | 20 | MxAtomId() { this->m_internal = 0; } 21 | 22 | inline MxBool operator==(const MxAtomId& other) const { return this->m_internal == other.m_internal; } 23 | 24 | void Clear(); 25 | 26 | const char* GetInternal() const { return m_internal; } 27 | 28 | private: 29 | MxAtomIdCounter* GetCounter(const char*, LookupMode); 30 | void Destroy(); 31 | 32 | const char* m_internal; 33 | }; 34 | 35 | #endif // MXATOMID_H 36 | -------------------------------------------------------------------------------- /LEGO1/mxatomidcounter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxatomidcounter.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxAtomIdCounter, 0x14); 6 | DECOMP_SIZE_ASSERT(MxAtomIdCounterSet, 0x10); 7 | 8 | // FUNCTION: LEGO1 0x100ad7f0 9 | void MxAtomIdCounter::Inc() 10 | { 11 | m_value++; 12 | } 13 | 14 | // FUNCTION: LEGO1 0x100ad800 15 | void MxAtomIdCounter::Dec() 16 | { 17 | if (m_value) 18 | m_value--; 19 | } 20 | -------------------------------------------------------------------------------- /LEGO1/mxaudiomanager.h: -------------------------------------------------------------------------------- 1 | #ifndef MXAUDIOMANAGER_H 2 | #define MXAUDIOMANAGER_H 3 | 4 | #include "decomp.h" 5 | #include "mxmediamanager.h" 6 | 7 | // VTABLE: LEGO1 0x100dc6e0 8 | class MxAudioManager : public MxMediaManager { 9 | public: 10 | MxAudioManager(); 11 | virtual ~MxAudioManager() override; 12 | 13 | virtual MxResult InitPresenters() override; // vtable+14 14 | virtual void Destroy() override; // vtable+18 15 | virtual MxS32 GetVolume(); // vtable+28 16 | virtual void SetVolume(MxS32 p_volume); // vtable+2c 17 | 18 | private: 19 | void Destroy(MxBool p_fromDestructor); 20 | 21 | static MxS32 g_unkCount; 22 | 23 | protected: 24 | void Init(); 25 | 26 | MxS32 m_volume; // 0x2c 27 | }; 28 | 29 | #endif // MXAUDIOMANAGER_H 30 | -------------------------------------------------------------------------------- /LEGO1/mxaudiopresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxaudiopresenter.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54); 6 | 7 | // FUNCTION: LEGO1 0x1000d260 8 | MxS32 MxAudioPresenter::GetVolume() 9 | { 10 | return m_volume; 11 | } 12 | 13 | // FUNCTION: LEGO1 0x1000d270 14 | void MxAudioPresenter::SetVolume(MxS32 p_volume) 15 | { 16 | m_volume = p_volume; 17 | } 18 | -------------------------------------------------------------------------------- /LEGO1/mxaudiopresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXAUDIOPRESENTER_H 2 | #define MXAUDIOPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxmediapresenter.h" 6 | 7 | // VTABLE: LEGO1 0x100d4c70 8 | // SIZE 0x54 9 | class MxAudioPresenter : public MxMediaPresenter { 10 | public: 11 | MxAudioPresenter() { m_volume = 100; } 12 | 13 | // FUNCTION: LEGO1 0x1000d280 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f078c 17 | return "MxAudioPresenter"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1000d290 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name); 24 | } 25 | 26 | virtual MxS32 GetVolume(); // vtable+0x5c 27 | virtual void SetVolume(MxS32 p_volume); // vtable+0x60 28 | 29 | protected: 30 | MxS32 m_volume; 31 | }; 32 | 33 | #endif // MXAUDIOPRESENTER_H 34 | -------------------------------------------------------------------------------- /LEGO1/mxautolocker.cpp: -------------------------------------------------------------------------------- 1 | #include "mxautolocker.h" 2 | 3 | // FUNCTION: LEGO1 0x100b8ed0 4 | MxAutoLocker::MxAutoLocker(MxCriticalSection* critsect) 5 | { 6 | this->m_criticalSection = critsect; 7 | if (this->m_criticalSection != 0) 8 | this->m_criticalSection->Enter(); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100b8ef0 12 | MxAutoLocker::~MxAutoLocker() 13 | { 14 | if (this->m_criticalSection != 0) 15 | this->m_criticalSection->Leave(); 16 | } 17 | -------------------------------------------------------------------------------- /LEGO1/mxautolocker.h: -------------------------------------------------------------------------------- 1 | #ifndef MXAUTOLOCKER_H 2 | #define MXAUTOLOCKER_H 3 | 4 | #include "mxcriticalsection.h" 5 | 6 | class MxAutoLocker { 7 | public: 8 | MxAutoLocker(MxCriticalSection* cs); 9 | ~MxAutoLocker(); 10 | 11 | private: 12 | MxCriticalSection* m_criticalSection; 13 | }; 14 | 15 | #endif // MXAUTOLOCKER_H 16 | -------------------------------------------------------------------------------- /LEGO1/mxcollection.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCOLLECTION_H 2 | #define MXCOLLECTION_H 3 | 4 | #include "mxcore.h" 5 | 6 | template 7 | class MxCollection : public MxCore { 8 | public: 9 | MxCollection() 10 | { 11 | m_count = 0; 12 | m_customDestructor = Destroy; 13 | } 14 | 15 | virtual ~MxCollection() {} 16 | 17 | static void Destroy(T){}; 18 | virtual MxS8 Compare(T, T) { return 0; } 19 | 20 | protected: 21 | MxU32 m_count; // 0x8 22 | void (*m_customDestructor)(T); // 0xc 23 | }; 24 | 25 | #endif // MXCOLLECTION_H 26 | -------------------------------------------------------------------------------- /LEGO1/mxcompositemediapresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxcompositemediapresenter.h" 2 | 3 | // STUB: LEGO1 0x10073ea0 4 | MxCompositeMediaPresenter::MxCompositeMediaPresenter() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/mxcompositemediapresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCOMPOSITEMEDIAPRESENTER_H 2 | #define MXCOMPOSITEMEDIAPRESENTER_H 3 | 4 | #include "mxcompositepresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100dc618 7 | // SIZE 0x50 8 | class MxCompositeMediaPresenter : public MxCompositePresenter { 9 | public: 10 | MxCompositeMediaPresenter(); 11 | 12 | // FUNCTION: LEGO1 0x10073f10 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f02d4 16 | return "MxCompositeMediaPresenter"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10073f20 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, MxCompositeMediaPresenter::ClassName()) || MxCompositePresenter::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // MXCOMPOSITEMEDIAPRESENTER_H 27 | -------------------------------------------------------------------------------- /LEGO1/mxcompositepresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxcompositepresenter.h" 2 | 3 | #include "decomp.h" 4 | #include "mxnotificationmanager.h" 5 | 6 | DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c); 7 | 8 | // FUNCTION: LEGO1 0x1000caf0 9 | MxBool MxCompositePresenter::VTable0x64(undefined4 p_unknown) 10 | { 11 | if (m_compositePresenter) 12 | return m_compositePresenter->VTable0x64(p_unknown); 13 | return TRUE; 14 | } 15 | 16 | // FUNCTION: LEGO1 0x100b60b0 17 | MxCompositePresenter::MxCompositePresenter() 18 | { 19 | NotificationManager()->Register(this); 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100b6390 23 | MxCompositePresenter::~MxCompositePresenter() 24 | { 25 | NotificationManager()->Unregister(this); 26 | } 27 | 28 | // STUB: LEGO1 0x100b67f0 29 | void MxCompositePresenter::VTable0x58() 30 | { 31 | // TODO 32 | } 33 | 34 | // STUB: LEGO1 0x100b69b0 35 | void MxCompositePresenter::VTable0x5c() 36 | { 37 | // TODO 38 | } 39 | 40 | // STUB: LEGO1 0x100b6b40 41 | void MxCompositePresenter::VTable0x60(undefined4 p_unknown) 42 | { 43 | // TODO 44 | } 45 | -------------------------------------------------------------------------------- /LEGO1/mxcompositepresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCOMPOSITEPRESENTER_H 2 | #define MXCOMPOSITEPRESENTER_H 3 | 4 | #include "mxpresenter.h" 5 | #include "mxunklist.h" 6 | 7 | // VTABLE: LEGO1 0x100dc618 8 | // SIZE 0x4c 9 | class MxCompositePresenter : public MxPresenter { 10 | public: 11 | MxCompositePresenter(); 12 | virtual ~MxCompositePresenter() override; // vtable+0x0 13 | 14 | // FUNCTION: LEGO1 0x100b6210 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f0774 18 | return "MxCompositePresenter"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100b6220 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name); 25 | } 26 | 27 | virtual void VTable0x58(); 28 | virtual void VTable0x5c(); 29 | virtual void VTable0x60(undefined4 p_unknown); 30 | virtual MxBool VTable0x64(undefined4 p_unknown); 31 | 32 | private: 33 | MxUnkList m_list; 34 | }; 35 | 36 | #endif // MXCOMPOSITEPRESENTER_H 37 | -------------------------------------------------------------------------------- /LEGO1/mxcontrolpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxcontrolpresenter.h" 2 | 3 | #include "legoomni.h" 4 | #include "mxticklemanager.h" 5 | 6 | DECOMP_SIZE_ASSERT(MxControlPresenter, 0x5c) 7 | 8 | // FUNCTION: LEGO1 0x10043f50 9 | MxControlPresenter::MxControlPresenter() 10 | { 11 | this->m_unk4c = 0; 12 | this->m_unk4e = -1; 13 | this->m_unk50 = 0; 14 | this->m_unk52 = 0; 15 | this->m_unk58 = 0; 16 | this->m_unk54 = 0; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10044110 20 | MxControlPresenter::~MxControlPresenter() 21 | { 22 | if (this->m_unk58) { 23 | delete this->m_unk58; 24 | } 25 | } 26 | 27 | // FUNCTION: LEGO1 0x10044610 28 | void MxControlPresenter::ReadyTickle() 29 | { 30 | MxPresenter::ParseExtra(); 31 | TickleManager()->UnregisterClient(this); 32 | 33 | m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; 34 | m_currentTickleState = TickleState_Repeating; 35 | } 36 | -------------------------------------------------------------------------------- /LEGO1/mxcontrolpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCONTROLPRESENTER_H 2 | #define MXCONTROLPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxcompositepresenter.h" 6 | 7 | // VTABLE: LEGO1 0x100d7b88 8 | // SIZE 0x5c 9 | class MxControlPresenter : public MxCompositePresenter { 10 | public: 11 | MxControlPresenter(); 12 | virtual ~MxControlPresenter() override; 13 | 14 | // FUNCTION: LEGO1 0x10044000 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f0514 18 | return "MxControlPresenter"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x10044010 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, MxControlPresenter::ClassName()) || MxCompositePresenter::IsA(name); 25 | } 26 | 27 | virtual void ReadyTickle() override; // vtable+0x18 28 | 29 | private: 30 | undefined2 m_unk4c; 31 | MxS16 m_unk4e; 32 | undefined m_unk50; 33 | undefined2 m_unk52; 34 | undefined2 m_unk54; 35 | undefined4* m_unk58; 36 | }; 37 | 38 | #endif // MXCONTROLPRESENTER_H 39 | -------------------------------------------------------------------------------- /LEGO1/mxcore.cpp: -------------------------------------------------------------------------------- 1 | #include "mxcore.h" 2 | 3 | #include "define.h" 4 | 5 | // FUNCTION: LEGO1 0x10001f70 6 | MxResult MxCore::Tickle() 7 | { 8 | return SUCCESS; 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100ae1a0 12 | MxCore::MxCore() 13 | { 14 | m_id = g_mxcoreCount[0]; 15 | g_mxcoreCount[0]++; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x100ae1e0 19 | MxCore::~MxCore() 20 | { 21 | } 22 | 23 | // FUNCTION: LEGO1 0x100ae1f0 24 | MxLong MxCore::Notify(MxParam& p) 25 | { 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /LEGO1/mxcore.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCORE_H 2 | #define MXCORE_H 3 | 4 | #include "compat.h" 5 | #include "mxtypes.h" 6 | 7 | #include 8 | 9 | class MxParam; 10 | 11 | // TODO: Find proper compilation unit to put these 12 | // FUNCTION: LEGO1 0x100140d0 13 | // MxCore::IsA 14 | 15 | // FUNCTION: LEGO1 0x100144c0 16 | // MxCore::ClassName 17 | 18 | // VTABLE: LEGO1 0x100dc0f8 19 | // SIZE 0x8 20 | class MxCore { 21 | public: 22 | __declspec(dllexport) MxCore(); 23 | __declspec(dllexport) virtual ~MxCore(); // vtable+00 24 | __declspec(dllexport) virtual MxLong Notify(MxParam& p); // vtable+04 25 | virtual MxResult Tickle(); // vtable+08 26 | 27 | inline virtual const char* ClassName() const // vtable+0c 28 | { 29 | // GLOBAL: LEGO1 0x100f007c 30 | return "MxCore"; 31 | } 32 | 33 | inline virtual MxBool IsA(const char* name) const // vtable+10 34 | { 35 | return !strcmp(name, MxCore::ClassName()); 36 | } 37 | 38 | inline MxU32 GetId() { return m_id; } 39 | 40 | private: 41 | MxU32 m_id; 42 | }; 43 | 44 | #endif // MXCORE_H 45 | -------------------------------------------------------------------------------- /LEGO1/mxcriticalsection.h: -------------------------------------------------------------------------------- 1 | #ifndef MXCRITICALSECTION_H 2 | #define MXCRITICALSECTION_H 3 | 4 | #include 5 | 6 | // SIZE 0x1c 7 | class MxCriticalSection { 8 | public: 9 | __declspec(dllexport) MxCriticalSection(); 10 | __declspec(dllexport) ~MxCriticalSection(); 11 | __declspec(dllexport) static void SetDoMutex(); 12 | void Enter(); 13 | void Leave(); 14 | 15 | private: 16 | CRITICAL_SECTION m_criticalSection; 17 | HANDLE m_mutex; 18 | }; 19 | 20 | #endif // MXCRITICALSECTION_H 21 | -------------------------------------------------------------------------------- /LEGO1/mxdsactionlist.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdsactionlist.h" 2 | 3 | #include "mxdsaction.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c); 6 | DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10); 7 | 8 | // FUNCTION: LEGO1 0x100c9c90 9 | MxS8 MxDSActionList::Compare(MxDSAction* p_a, MxDSAction* p_b) 10 | { 11 | return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; 12 | } 13 | 14 | // FUNCTION: LEGO1 0x100c9cb0 15 | void MxDSActionList::Destroy(MxDSAction* p_action) 16 | { 17 | if (p_action) 18 | delete p_action; 19 | } 20 | 21 | // TEMPLATE: LEGO1 0x100c9cc0 22 | // MxCollection::Compare 23 | 24 | // TEMPLATE: LEGO1 0x100c9d20 25 | // MxCollection::Destroy 26 | 27 | // TEMPLATE: LEGO1 0x100c9d30 28 | // MxList::~MxList 29 | 30 | // SYNTHETIC: LEGO1 0x100c9e30 31 | // MxCollection::`scalar deleting destructor' 32 | 33 | // SYNTHETIC: LEGO1 0x100c9ea0 34 | // MxList::`scalar deleting destructor' 35 | -------------------------------------------------------------------------------- /LEGO1/mxdsactionlist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSACTIONLIST_H 2 | #define MXDSACTIONLIST_H 3 | 4 | #include "decomp.h" 5 | #include "mxlist.h" 6 | 7 | class MxDSAction; 8 | 9 | // VTABLE: LEGO1 0x100dcea8 10 | // class MxCollection 11 | 12 | // VTABLE: LEGO1 0x100dcec0 13 | // class MxList 14 | 15 | // VTABLE: LEGO1 0x100dced8 16 | // SIZE 0x1c 17 | class MxDSActionList : public MxList { 18 | public: 19 | MxDSActionList() { this->m_unk18 = 0; } 20 | 21 | virtual MxS8 Compare(MxDSAction*, MxDSAction*) override; // vtable+0x14 22 | 23 | static void Destroy(MxDSAction* p_action); 24 | 25 | private: 26 | undefined m_unk18; 27 | }; 28 | 29 | typedef MxListCursorChild MxDSActionListCursor; 30 | 31 | #endif // MXDSACTIONLIST_H 32 | -------------------------------------------------------------------------------- /LEGO1/mxdsanim.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdsanim.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSAnim, 0xb8) 4 | 5 | // FUNCTION: LEGO1 0x100c8ff0 6 | MxDSAnim::MxDSAnim() 7 | { 8 | this->SetType(MxDSType_Anim); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100c91a0 12 | MxDSAnim::~MxDSAnim() 13 | { 14 | } 15 | 16 | // FUNCTION: LEGO1 0x100c91f0 17 | void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim) 18 | { 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100c9200 22 | MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim) 23 | { 24 | if (this == &p_dsAnim) 25 | return *this; 26 | 27 | MxDSMediaAction::operator=(p_dsAnim); 28 | this->CopyFrom(p_dsAnim); 29 | return *this; 30 | } 31 | 32 | // FUNCTION: LEGO1 0x100c9230 33 | MxDSAction* MxDSAnim::Clone() 34 | { 35 | MxDSAnim* clone = new MxDSAnim(); 36 | 37 | if (clone) 38 | *clone = *this; 39 | 40 | return clone; 41 | } 42 | -------------------------------------------------------------------------------- /LEGO1/mxdsanim.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSANIM_H 2 | #define MXDSANIM_H 3 | 4 | #include "mxdsmediaaction.h" 5 | 6 | // VTABLE: LEGO1 0x100dcd88 7 | // SIZE 0xb8 8 | class MxDSAnim : public MxDSMediaAction { 9 | public: 10 | MxDSAnim(); 11 | virtual ~MxDSAnim() override; 12 | 13 | void CopyFrom(MxDSAnim& p_dsAnim); 14 | MxDSAnim& operator=(MxDSAnim& p_dsAnim); 15 | 16 | // FUNCTION: LEGO1 0x100c9060 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x101025d8 20 | return "MxDSAnim"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x100c9070 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(name); 27 | } 28 | 29 | virtual MxDSAction* Clone() override; // vtable+2c; 30 | }; 31 | 32 | #endif // MXDSANIM_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxdschunk.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdschunk.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSChunk, 0x1c); 4 | 5 | // FUNCTION: LEGO1 0x100be050 6 | MxDSChunk::MxDSChunk() 7 | { 8 | m_flags = 0; 9 | m_data = NULL; 10 | m_unk0c = -1; 11 | m_time = 0; 12 | m_length = 0; 13 | } 14 | 15 | // FUNCTION: LEGO1 0x100be170 16 | MxDSChunk::~MxDSChunk() 17 | { 18 | if (m_flags & Flag_Bit1) { 19 | delete[] m_data; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/mxdsevent.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdsevent.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSEvent, 0xb8) 4 | 5 | // FUNCTION: LEGO1 0x100c95f0 6 | MxDSEvent::MxDSEvent() 7 | { 8 | this->SetType(MxDSType_Event); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100c97a0 12 | MxDSEvent::~MxDSEvent() 13 | { 14 | } 15 | 16 | // FUNCTION: LEGO1 0x100c97f0 17 | void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent) 18 | { 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100c9800 22 | MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent) 23 | { 24 | if (this == &p_dsEvent) 25 | return *this; 26 | 27 | MxDSMediaAction::operator=(p_dsEvent); 28 | this->CopyFrom(p_dsEvent); 29 | return *this; 30 | } 31 | 32 | // FUNCTION: LEGO1 0x100c9830 33 | MxDSAction* MxDSEvent::Clone() 34 | { 35 | MxDSEvent* clone = new MxDSEvent(); 36 | 37 | if (clone) 38 | *clone = *this; 39 | 40 | return clone; 41 | } 42 | -------------------------------------------------------------------------------- /LEGO1/mxdsevent.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSEVENT_H 2 | #define MXDSEVENT_H 3 | 4 | #include "mxdsmediaaction.h" 5 | 6 | class MxDSEvent : public MxDSMediaAction { 7 | public: 8 | MxDSEvent(); 9 | virtual ~MxDSEvent() override; 10 | 11 | void CopyFrom(MxDSEvent& p_dsEvent); 12 | MxDSEvent& operator=(MxDSEvent& p_dsEvent); 13 | 14 | // FUNCTION: LEGO1 0x100c9660 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x101025f0 18 | return "MxDSEvent"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100c9670 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(name); 25 | } 26 | 27 | virtual MxDSAction* Clone() override; // vtable+2c; 28 | }; 29 | 30 | #endif // MXDSEVENT_H 31 | -------------------------------------------------------------------------------- /LEGO1/mxdsobjectaction.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdsobjectaction.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSObjectAction, 0xb8) 4 | 5 | // FUNCTION: LEGO1 0x100c8870 6 | MxDSObjectAction::MxDSObjectAction() 7 | { 8 | this->SetType(MxDSType_ObjectAction); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100c8a20 12 | MxDSObjectAction::~MxDSObjectAction() 13 | { 14 | } 15 | 16 | // FUNCTION: LEGO1 0x100c8a70 17 | void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction) 18 | { 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100c8a80 22 | MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction) 23 | { 24 | if (this == &p_dsObjectAction) 25 | return *this; 26 | 27 | MxDSMediaAction::operator=(p_dsObjectAction); 28 | this->CopyFrom(p_dsObjectAction); 29 | return *this; 30 | } 31 | 32 | // FUNCTION: LEGO1 0x100c8ab0 33 | MxDSAction* MxDSObjectAction::Clone() 34 | { 35 | MxDSObjectAction* clone = new MxDSObjectAction(); 36 | 37 | if (clone) 38 | *clone = *this; 39 | 40 | return clone; 41 | } 42 | -------------------------------------------------------------------------------- /LEGO1/mxdsobjectaction.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSOBJECTACTION_H 2 | #define MXDSOBJECTACTION_H 3 | 4 | #include "mxdsmediaaction.h" 5 | 6 | // VTABLE: LEGO1 0x100dccf8 7 | // SIZE 0xb8 8 | class MxDSObjectAction : public MxDSMediaAction { 9 | public: 10 | MxDSObjectAction(); 11 | virtual ~MxDSObjectAction() override; 12 | 13 | MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction); 14 | 15 | // FUNCTION: LEGO1 0x100c88e0 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x101025c4 19 | return "MxDSObjectAction"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100c88f0 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(name); 26 | } 27 | 28 | virtual MxDSAction* Clone() override; // vtable+2c; 29 | virtual void CopyFrom(MxDSObjectAction& p_dsObjectAction); // vtable+44; 30 | }; 31 | 32 | #endif // MXDSOBJECTACTION_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxdsparallelaction.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSPARALLELACTION_H 2 | #define MXDSPARALLELACTION_H 3 | 4 | #include "mxdsmultiaction.h" 5 | 6 | // VTABLE: LEGO1 0x100dcf80 7 | // SIZE 0x9c 8 | class MxDSParallelAction : public MxDSMultiAction { 9 | public: 10 | MxDSParallelAction(); 11 | virtual ~MxDSParallelAction() override; 12 | 13 | void CopyFrom(MxDSParallelAction& p_dsParallelAction); 14 | MxDSParallelAction& operator=(MxDSParallelAction& p_dsParallelAction); 15 | 16 | // FUNCTION: LEGO1 0x100caf00 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x10102608 20 | return "MxDSParallelAction"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x100caf10 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(name); 27 | } 28 | 29 | virtual MxLong GetDuration() override; // vtable+24; 30 | virtual MxDSAction* Clone() override; // vtable+2c; 31 | }; 32 | 33 | #endif // MXDSPARALLELACTION_H 34 | -------------------------------------------------------------------------------- /LEGO1/mxdssource.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdssource.h" 2 | 3 | #include "mxdsbuffer.h" 4 | 5 | // FUNCTION: LEGO1 0x100bffd0 6 | void MxDSSource::ReadToBuffer(MxDSBuffer* p_buffer) 7 | { 8 | Read(p_buffer->GetBuffer(), p_buffer->GetWriteOffset()); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100bfff0 12 | MxLong MxDSSource::GetLengthInDWords() 13 | { 14 | return m_lengthInDWords; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x100c0000 18 | MxU32* MxDSSource::GetBuffer() 19 | { 20 | return m_pBuffer; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/mxdsstill.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdsstill.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSStill, 0xb8) 4 | 5 | // FUNCTION: LEGO1 0x100c98c0 6 | MxDSStill::MxDSStill() 7 | { 8 | this->SetType(MxDSType_Still); 9 | } 10 | 11 | // FUNCTION: LEGO1 0x100c9a70 12 | MxDSStill::~MxDSStill() 13 | { 14 | } 15 | 16 | // FUNCTION: LEGO1 0x100c9ac0 17 | void MxDSStill::CopyFrom(MxDSStill& p_dsStill) 18 | { 19 | } 20 | 21 | // FUNCTION: LEGO1 0x100c9ad0 22 | MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill) 23 | { 24 | if (this == &p_dsStill) 25 | return *this; 26 | 27 | MxDSMediaAction::operator=(p_dsStill); 28 | this->CopyFrom(p_dsStill); 29 | return *this; 30 | } 31 | 32 | // FUNCTION: LEGO1 0x100c9b00 33 | MxDSAction* MxDSStill::Clone() 34 | { 35 | MxDSStill* clone = new MxDSStill(); 36 | 37 | if (clone) 38 | *clone = *this; 39 | 40 | return clone; 41 | } 42 | -------------------------------------------------------------------------------- /LEGO1/mxdsstill.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSSTILL_H 2 | #define MXDSSTILL_H 3 | 4 | #include "mxdsmediaaction.h" 5 | 6 | // VTABLE: LEGO1 0x100dce60 7 | // SIZE 0xb8 8 | class MxDSStill : public MxDSMediaAction { 9 | public: 10 | MxDSStill(); 11 | virtual ~MxDSStill() override; 12 | 13 | void CopyFrom(MxDSStill& p_dsStill); 14 | MxDSStill& operator=(MxDSStill& p_dsStill); 15 | 16 | // FUNCTION: LEGO1 0x100c9930 17 | inline virtual const char* ClassName() const override // vtable+0x0c 18 | { 19 | // GLOBAL: LEGO1 0x101025fc 20 | return "MxDSStill"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x100c9940 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(name); 27 | } 28 | 29 | virtual MxDSAction* Clone() override; // vtable+2c; 30 | }; 31 | 32 | #endif // MXDSSTILL_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxdssubscriber.cpp: -------------------------------------------------------------------------------- 1 | #include "mxdssubscriber.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxDSSubscriber, 0x4c); 4 | 5 | // STUB: LEGO1 0x100b7bb0 6 | MxDSSubscriber::MxDSSubscriber() 7 | { 8 | // TODO 9 | } 10 | 11 | // STUB: LEGO1 0x100b7e00 12 | MxDSSubscriber::~MxDSSubscriber() 13 | { 14 | // TODO 15 | } 16 | 17 | // STUB: LEGO1 0x100b7ed0 18 | MxResult MxDSSubscriber::FUN_100b7ed0(MxStreamController*, MxU32, MxS16) 19 | { 20 | // TODO 21 | return SUCCESS; 22 | } 23 | 24 | // STUB: LEGO1 0x100b8250 25 | MxStreamChunk* MxDSSubscriber::FUN_100b8250() 26 | { 27 | // TODO 28 | return NULL; 29 | } 30 | 31 | // STUB: LEGO1 0x100b8360 32 | MxStreamChunk* MxDSSubscriber::FUN_100b8360() 33 | { 34 | // TODO 35 | return NULL; 36 | } 37 | 38 | // STUB: LEGO1 0x100b8390 39 | void MxDSSubscriber::FUN_100b8390(MxStreamChunk*) 40 | { 41 | // TODO 42 | } 43 | -------------------------------------------------------------------------------- /LEGO1/mxdssubscriber.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSSUBSCRIBER_H 2 | #define MXDSSUBSCRIBER_H 3 | 4 | #include "decomp.h" 5 | #include "mxcore.h" 6 | #include "mxdschunk.h" 7 | #include "mxstreamchunk.h" 8 | 9 | class MxStreamController; 10 | 11 | // VTABLE: LEGO1 0x100dc698 12 | // SIZE 0x4c 13 | class MxDSSubscriber : public MxCore { 14 | public: 15 | MxDSSubscriber(); 16 | virtual ~MxDSSubscriber() override; 17 | 18 | // FUNCTION: LEGO1 0x100b7d50 19 | inline virtual const char* ClassName() const override // vtable+0x0c 20 | { 21 | // GLOBAL: LEGO1 0x101020f8 22 | return "MxDSSubscriber"; 23 | } 24 | 25 | // FUNCTION: LEGO1 0x100b7d60 26 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 27 | { 28 | return !strcmp(name, MxDSSubscriber::ClassName()) || MxCore::IsA(name); 29 | } 30 | 31 | MxResult FUN_100b7ed0(MxStreamController*, MxU32, MxS16); 32 | MxStreamChunk* FUN_100b8250(); 33 | MxStreamChunk* FUN_100b8360(); 34 | void FUN_100b8390(MxStreamChunk*); 35 | 36 | private: 37 | undefined m_pad[0x44]; // 0x8 38 | }; 39 | 40 | #endif // MXDSSUBSCRIBER_H 41 | -------------------------------------------------------------------------------- /LEGO1/mxdstypes.h: -------------------------------------------------------------------------------- 1 | #ifndef MXDSTYPES_H 2 | #define MXDSTYPES_H 3 | 4 | enum MxDSType { 5 | MxDSType_Object = 0, 6 | MxDSType_Action = 1, 7 | MxDSType_MediaAction = 2, 8 | MxDSType_Anim = 3, 9 | MxDSType_Sound = 4, 10 | MxDSType_MultiAction = 5, 11 | MxDSType_SerialAction = 6, 12 | MxDSType_ParallelAction = 7, 13 | MxDSType_Event = 8, 14 | MxDSType_SelectAction = 9, 15 | MxDSType_Still = 10, 16 | MxDSType_ObjectAction = 11, 17 | }; 18 | 19 | #endif // MXDSTYPES_H 20 | -------------------------------------------------------------------------------- /LEGO1/mxentity.cpp: -------------------------------------------------------------------------------- 1 | #include "mxentity.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxEntity, 0x10) 4 | 5 | // FUNCTION: LEGO1 0x10001070 6 | MxResult MxEntity::Create(MxS32 p_id, const MxAtomId& p_atom) 7 | { 8 | this->m_mxEntityId = p_id; 9 | this->m_atom = p_atom; 10 | return SUCCESS; 11 | } 12 | 13 | // FUNCTION: LEGO1 0x1000c110 14 | MxEntity::~MxEntity() 15 | { 16 | } 17 | 18 | // FUNCTION: LEGO1 0x1001d190 19 | MxEntity::MxEntity() 20 | { 21 | this->m_mxEntityId = -1; 22 | } 23 | -------------------------------------------------------------------------------- /LEGO1/mxentity.h: -------------------------------------------------------------------------------- 1 | #ifndef MXENTITY_H 2 | #define MXENTITY_H 3 | 4 | #include "decomp.h" 5 | #include "mxatomid.h" 6 | #include "mxcore.h" 7 | #include "mxdsobject.h" 8 | #include "mxtypes.h" 9 | 10 | // VTABLE: LEGO1 0x100d5390 11 | // SIZE 0x10 12 | class MxEntity : public MxCore { 13 | public: 14 | MxEntity(); 15 | virtual ~MxEntity() override; 16 | 17 | // FUNCTION: LEGO1 0x1000c180 18 | inline virtual const char* ClassName() const override // vtable+0xc 19 | { 20 | // GLOBAL: LEGO1 0x100f0070 21 | return "MxEntity"; 22 | } 23 | 24 | // FUNCTION: LEGO1 0x1000c190 25 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 26 | { 27 | return !strcmp(name, MxEntity::ClassName()) || MxCore::IsA(name); 28 | } 29 | 30 | virtual MxResult Create(MxS32 p_id, const MxAtomId& p_atom); // vtable+0x14 31 | inline MxResult Create(MxDSObject& p_dsObject) 32 | { 33 | m_mxEntityId = p_dsObject.GetObjectId(); 34 | m_atom = p_dsObject.GetAtomId(); 35 | return SUCCESS; 36 | } 37 | 38 | protected: 39 | MxS32 m_mxEntityId; // 0x8 40 | MxAtomId m_atom; // 0xc 41 | }; 42 | 43 | #endif // MXENTITY_H 44 | -------------------------------------------------------------------------------- /LEGO1/mxeventmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef MXEVENTMANAGER_H 2 | #define MXEVENTMANAGER_H 3 | 4 | #include "decomp.h" 5 | #include "mxmediamanager.h" 6 | 7 | // VTABLE: LEGO1 0x100dc900 8 | // SIZE 0x2c 9 | class MxEventManager : public MxMediaManager { 10 | public: 11 | MxEventManager(); 12 | virtual ~MxEventManager() override; 13 | 14 | virtual void Destroy() override; // vtable+18 15 | virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+28 16 | 17 | private: 18 | void Init(); 19 | void Destroy(MxBool p_fromDestructor); 20 | }; 21 | 22 | #endif // MXEVENTMANAGER_H 23 | -------------------------------------------------------------------------------- /LEGO1/mxflcpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXFLCPRESENTER_H 2 | #define MXFLCPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxvideopresenter.h" 6 | 7 | #include 8 | 9 | // VTABLE: LEGO1 0x100dc2c0 10 | // SIZE 0x68 11 | class MxFlcPresenter : public MxVideoPresenter { 12 | public: 13 | MxFlcPresenter(); 14 | virtual ~MxFlcPresenter() override; 15 | 16 | // FUNCTION: LEGO1 0x1004e200 17 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 18 | { 19 | return !strcmp(name, MxFlcPresenter::ClassName()) || MxVideoPresenter::IsA(name); 20 | } 21 | 22 | // FUNCTION: LEGO1 0x100b33f0 23 | inline virtual const char* ClassName() const override // vtable+0xc 24 | { 25 | // GLOBAL: LEGO1 0x100f43c8 26 | return "MxFlcPresenter"; 27 | } 28 | 29 | virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c 30 | virtual void CreateBitmap() override; // vtable+0x60 31 | virtual void VTable0x70() override; // vtable+0x70 32 | 33 | protected: 34 | FLIC_HEADER* m_flicHeader; 35 | }; 36 | 37 | #endif // MXFLCPRESENTER_H 38 | -------------------------------------------------------------------------------- /LEGO1/mxioinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef MXIOINFO_H 2 | #define MXIOINFO_H 3 | 4 | #include "mxtypes.h" 5 | 6 | // mmsystem.h requires inclusion of windows.h before 7 | // clang-format off 8 | #include 9 | #include 10 | // clang-format on 11 | 12 | class MXIOINFO { 13 | public: 14 | MXIOINFO(); 15 | __declspec(dllexport) ~MXIOINFO(); 16 | 17 | MxU16 Open(const char*, MxULong); 18 | MxU16 Close(MxLong); 19 | MxLong Read(void*, MxLong); 20 | MxLong Seek(MxLong, MxLong); 21 | MxU16 SetBuffer(char*, MxLong, MxLong); 22 | MxU16 Flush(MxU16); 23 | MxU16 Advance(MxU16); 24 | MxU16 Descend(MMCKINFO*, const MMCKINFO*, MxU16); 25 | 26 | // NOTE: In MXIOINFO, the `hmmio` member of MMIOINFO is used like 27 | // an HFILE (int) instead of an HMMIO (WORD). 28 | MMIOINFO m_info; 29 | }; 30 | 31 | #endif // MXIOINFO_H 32 | -------------------------------------------------------------------------------- /LEGO1/mxloopingflcpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXLOOPINGFLCPRESENTER_H 2 | #define MXLOOPINGFLCPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxflcpresenter.h" 6 | 7 | // VTABLE: LEGO1 0x100dc480 8 | // SIZE 0x6c 9 | class MxLoopingFlcPresenter : public MxFlcPresenter { 10 | public: 11 | MxLoopingFlcPresenter(); 12 | virtual ~MxLoopingFlcPresenter() override; 13 | 14 | // FUNCTION: LEGO1 0x100b4380 15 | inline virtual const char* ClassName() const override // vtable+0xc 16 | { 17 | // GLOBAL: LEGO1 0x10101e20 18 | return "MxLoopingFlcPresenter"; 19 | } 20 | 21 | virtual void NextFrame() override; // vtable+0x64 22 | 23 | private: 24 | void Init(); 25 | void Destroy(MxBool p_fromDestructor); 26 | 27 | undefined4 m_unk68; 28 | }; 29 | 30 | #endif // MXLOOPINGFLCPRESENTER_H 31 | -------------------------------------------------------------------------------- /LEGO1/mxloopingmidipresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXLOOPINGMIDIPRESENTER_H 2 | #define MXLOOPINGMIDIPRESENTER_H 3 | 4 | #include "mxmidipresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100dc240 7 | // SIZE 0x58 8 | class MxLoopingMIDIPresenter : public MxMIDIPresenter { 9 | public: 10 | inline virtual const char* ClassName() const override // vtable+0xc 11 | { 12 | // GLOBAL: LEGO1 0x10101de0 13 | return "MxLoopingMIDIPresenter"; 14 | } 15 | 16 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 17 | { 18 | return !strcmp(name, MxLoopingMIDIPresenter::ClassName()) || MxMIDIPresenter::IsA(name); 19 | } 20 | 21 | virtual void StreamingTickle() override; // vtable+0x20 22 | virtual void DoneTickle() override; // vtable+0x2c 23 | virtual MxResult PutData() override; // vtable+0x4c 24 | }; 25 | 26 | #endif // MXLOOPINGMIDIPRESENTER_H 27 | -------------------------------------------------------------------------------- /LEGO1/mxloopingsmkpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxloopingsmkpresenter.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxLoopingSmkPresenter, 0x724); 6 | 7 | // FUNCTION: LEGO1 0x100b48b0 8 | MxLoopingSmkPresenter::MxLoopingSmkPresenter() 9 | { 10 | Init(); 11 | } 12 | 13 | // FUNCTION: LEGO1 0x100b4950 14 | MxLoopingSmkPresenter::~MxLoopingSmkPresenter() 15 | { 16 | Destroy(TRUE); 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100b49b0 20 | void MxLoopingSmkPresenter::Init() 21 | { 22 | this->m_unk720 = 0; 23 | this->m_flags &= 0xfd; 24 | this->m_flags &= 0xfb; 25 | } 26 | 27 | // STUB: LEGO1 0x100b49d0 28 | void MxLoopingSmkPresenter::Destroy(MxBool p_fromDestructor) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /LEGO1/mxloopingsmkpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXLOOPINGSMKPRESENTER_H 2 | #define MXLOOPINGSMKPRESENTER_H 3 | 4 | #include "decomp.h" 5 | #include "mxsmkpresenter.h" 6 | 7 | // VTABLE: LEGO1 0x100dc540 8 | // SIZE 0x724 9 | class MxLoopingSmkPresenter : public MxSmkPresenter { 10 | public: 11 | MxLoopingSmkPresenter(); 12 | virtual ~MxLoopingSmkPresenter() override; // vtable+0x0 13 | 14 | // FUNCTION: LEGO1 0x100b4920 15 | inline virtual const char* ClassName() const override // vtable+0xc 16 | { 17 | // GLOBAL: LEGO1 0x10101e08 18 | return "MxLoopingSmkPresenter"; 19 | } 20 | 21 | private: 22 | void Init(); 23 | void Destroy(MxBool p_fromDestructor); 24 | 25 | undefined4 m_unk720; 26 | }; 27 | 28 | #endif // MXLOOPINGSMKPRESENTER_H 29 | -------------------------------------------------------------------------------- /LEGO1/mxmediamanager.h: -------------------------------------------------------------------------------- 1 | #ifndef MXMEDIAMANGER_H 2 | #define MXMEDIAMANGER_H 3 | 4 | #include "mxcore.h" 5 | #include "mxcriticalsection.h" 6 | #include "mxpresenterlist.h" 7 | #include "mxthread.h" 8 | #include "mxtypes.h" 9 | 10 | // VTABLE: LEGO1 0x100dc6b0 11 | // SIZE 0x2c 12 | class MxMediaManager : public MxCore { 13 | public: 14 | MxMediaManager(); 15 | virtual ~MxMediaManager() override; 16 | 17 | virtual MxResult Tickle() override; // vtable+08 18 | virtual MxResult InitPresenters(); // vtable+14 19 | virtual void Destroy(); // vtable+18 20 | virtual void AddPresenter(MxPresenter& p_presenter); // vtable+1c 21 | virtual void RemovePresenter(MxPresenter& p_presenter); // vtable+20 22 | virtual void StopPresenters(); // vtable+24 23 | 24 | MxResult Init(); 25 | 26 | protected: 27 | MxPresenterList* m_presenters; 28 | MxThread* m_thread; // 0xc 29 | MxCriticalSection m_criticalSection; // 0x10 30 | }; 31 | 32 | #endif // MXMEDIAMANGER_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxmusicpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXMUSICPRESENTER_H 2 | #define MXMUSICPRESENTER_H 3 | 4 | #include "mxaudiopresenter.h" 5 | 6 | // VTABLE: LEGO1 0x100dc9b8 7 | // SIZE 0x54 8 | class MxMusicPresenter : public MxAudioPresenter { 9 | public: 10 | MxMusicPresenter(); 11 | virtual ~MxMusicPresenter() override; 12 | 13 | // FUNCTION: LEGO1 0x100c23a0 14 | inline virtual const char* ClassName() const override // vtable+0xc 15 | { 16 | // GLOBAL: LEGO1 0x10101e48 17 | return "MxMusicPresenter"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x100c23b0 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, MxMusicPresenter::ClassName()) || MxAudioPresenter::IsA(name); 24 | } 25 | 26 | virtual MxResult AddToManager() override; // vtable+0x34 27 | virtual void Destroy() override; // vtable+0x38 28 | 29 | private: 30 | void Init(); 31 | void Destroy(MxBool p_fromDestructor); 32 | }; 33 | 34 | #endif // MXMUSICPRESENTER_H 35 | -------------------------------------------------------------------------------- /LEGO1/mxnextactiondatastart.h: -------------------------------------------------------------------------------- 1 | #ifndef MXNEXTACTIONDATASTART_H 2 | #define MXNEXTACTIONDATASTART_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100dc9a0 7 | // SIZE 0x14 8 | class MxNextActionDataStart : public MxCore { 9 | public: 10 | // inlined constructor at 0x100c1847 11 | inline MxNextActionDataStart(MxU32 p_objectId, MxS16 p_unk24val, MxU32 p_data) 12 | { 13 | m_objectId = p_objectId; 14 | m_unk24val = p_unk24val; 15 | m_data = p_data; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x100c1900 19 | inline virtual const char* ClassName() const override // vtable+0xc 20 | { 21 | // GLOBAL: LEGO1 0x101025a0 22 | return "MxNextActionDataStart"; 23 | } 24 | 25 | // FUNCTION: LEGO1 0x100c1910 26 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 27 | { 28 | return !strcmp(name, MxNextActionDataStart::ClassName()) || MxCore::IsA(name); 29 | } 30 | 31 | inline MxU32 GetObjectId() const { return m_objectId; } 32 | inline MxS16 GetUnknown24() const { return m_unk24val; } 33 | 34 | private: 35 | MxU32 m_objectId; 36 | MxS16 m_unk24val; 37 | MxU32 m_data; 38 | }; 39 | 40 | #endif // MXNEXTACTIONDATASTART_H 41 | -------------------------------------------------------------------------------- /LEGO1/mxnotificationparam.cpp: -------------------------------------------------------------------------------- 1 | #include "mxnotificationparam.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxNotificationParam, 0xc); 6 | 7 | // FUNCTION: LEGO1 0x10010390 8 | MxNotificationParam* MxNotificationParam::Clone() 9 | { 10 | return new MxNotificationParam(m_type, m_sender); 11 | } 12 | -------------------------------------------------------------------------------- /LEGO1/mxomnicreateflags.cpp: -------------------------------------------------------------------------------- 1 | #include "mxomnicreateflags.h" 2 | 3 | // FUNCTION: LEGO1 0x100b0a30 4 | MxOmniCreateFlags::MxOmniCreateFlags() 5 | { 6 | this->CreateObjectFactory(TRUE); 7 | this->CreateVariableTable(TRUE); 8 | this->CreateTickleManager(TRUE); 9 | this->CreateNotificationManager(TRUE); 10 | this->CreateVideoManager(TRUE); 11 | this->CreateSoundManager(TRUE); 12 | this->CreateMusicManager(TRUE); 13 | this->CreateEventManager(TRUE); 14 | 15 | this->CreateTimer(TRUE); 16 | this->CreateStreamer(TRUE); 17 | } 18 | -------------------------------------------------------------------------------- /LEGO1/mxomnicreateparam.cpp: -------------------------------------------------------------------------------- 1 | #include "mxomnicreateparam.h" 2 | 3 | // FUNCTION: LEGO1 0x100b0b00 4 | MxOmniCreateParam::MxOmniCreateParam( 5 | const char* mediaPath, 6 | struct HWND__* windowHandle, 7 | MxVideoParam& vparam, 8 | MxOmniCreateFlags flags 9 | ) 10 | { 11 | this->m_mediaPath = mediaPath; 12 | this->m_windowHandle = (HWND) windowHandle; 13 | this->m_videoParam = vparam; 14 | this->m_createFlags = flags; 15 | } 16 | -------------------------------------------------------------------------------- /LEGO1/mxomnicreateparam.h: -------------------------------------------------------------------------------- 1 | #ifndef MXOMNICREATEPARAM_H 2 | #define MXOMNICREATEPARAM_H 3 | 4 | #include "mxomnicreateflags.h" 5 | #include "mxparam.h" 6 | #include "mxstring.h" 7 | #include "mxvideoparam.h" 8 | 9 | #include 10 | 11 | class MxOmniCreateParam : public MxParam { 12 | public: 13 | __declspec(dllexport) MxOmniCreateParam( 14 | const char* mediaPath, 15 | struct HWND__* windowHandle, 16 | MxVideoParam& vparam, 17 | MxOmniCreateFlags flags 18 | ); 19 | 20 | MxOmniCreateFlags& CreateFlags() { return this->m_createFlags; } 21 | const MxString& GetMediaPath() const { return m_mediaPath; } 22 | const HWND GetWindowHandle() const { return m_windowHandle; } 23 | MxVideoParam& GetVideoParam() { return m_videoParam; } 24 | const MxVideoParam& GetVideoParam() const { return m_videoParam; } 25 | 26 | private: 27 | MxString m_mediaPath; 28 | HWND m_windowHandle; 29 | MxVideoParam m_videoParam; 30 | MxOmniCreateFlags m_createFlags; 31 | }; 32 | 33 | #endif // MXOMNICREATEPARAM_H 34 | -------------------------------------------------------------------------------- /LEGO1/mxpalette.h: -------------------------------------------------------------------------------- 1 | #ifndef MXPALETTE_H 2 | #define MXPALETTE_H 3 | 4 | #include "mxcore.h" 5 | #include "mxtypes.h" 6 | 7 | #include 8 | 9 | // VTABLE: LEGO1 0x100dc848 10 | // SIZE 0x414 11 | class MxPalette : public MxCore { 12 | public: 13 | __declspec(dllexport) MxBool operator==(MxPalette&); 14 | __declspec(dllexport) void Detach(); 15 | 16 | MxPalette(); 17 | MxPalette(const RGBQUAD*); 18 | virtual ~MxPalette(); 19 | 20 | void ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries); 21 | MxPalette* Clone(); 22 | void GetDefaultPalette(LPPALETTEENTRY p_entries); 23 | MxResult GetEntries(LPPALETTEENTRY p_entries); 24 | MxResult SetEntries(LPPALETTEENTRY p_palette); 25 | MxResult SetSkyColor(LPPALETTEENTRY p_sky_color); 26 | void Reset(MxBool p_ignoreSkyColor); 27 | LPDIRECTDRAWPALETTE CreateNativePalette(); 28 | inline void SetOverrideSkyColor(MxBool p_value) { this->m_overrideSkyColor = p_value; } 29 | 30 | private: 31 | LPDIRECTDRAWPALETTE m_palette; 32 | PALETTEENTRY m_entries[256]; // 0xc 33 | MxBool m_overrideSkyColor; // 0x40c 34 | PALETTEENTRY m_skyColor; // 0x40d 35 | }; 36 | 37 | #endif // MXPALETTE_H 38 | -------------------------------------------------------------------------------- /LEGO1/mxparam.cpp: -------------------------------------------------------------------------------- 1 | #include "mxparam.h" 2 | -------------------------------------------------------------------------------- /LEGO1/mxparam.h: -------------------------------------------------------------------------------- 1 | #ifndef MXPARAM_H 2 | #define MXPARAM_H 3 | 4 | class MxParam { 5 | public: 6 | virtual ~MxParam() {} 7 | }; 8 | 9 | #endif // MXPARAM_H 10 | -------------------------------------------------------------------------------- /LEGO1/mxpoint32.h: -------------------------------------------------------------------------------- 1 | #ifndef MXPOINT32_H 2 | #define MXPOINT32_H 3 | 4 | #include "mxtypes.h" 5 | 6 | class MxPoint32 { 7 | public: 8 | MxPoint32() {} 9 | MxPoint32(MxS32 p_x, MxS32 p_y) 10 | { 11 | this->m_x = p_x; 12 | this->m_y = p_y; 13 | } 14 | 15 | MxS32 m_x; 16 | MxS32 m_y; 17 | }; 18 | 19 | #endif // MXPOINT32_H 20 | -------------------------------------------------------------------------------- /LEGO1/mxpresenterlist.cpp: -------------------------------------------------------------------------------- 1 | #include "mxpresenterlist.h" 2 | 3 | #include "mxpresenter.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxPresenterList, 0x18); 6 | DECOMP_SIZE_ASSERT(MxPresenterListCursor, 0x10); 7 | 8 | // FUNCTION: LEGO1 0x1001cd00 9 | MxS8 MxPresenterList::Compare(MxPresenter* p_a, MxPresenter* p_b) 10 | { 11 | return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; 12 | } 13 | 14 | // TEMPLATE: LEGO1 0x1001cd20 15 | // MxCollection::Compare 16 | 17 | // TEMPLATE: LEGO1 0x1001cd30 18 | // MxCollection::Destroy 19 | 20 | // TEMPLATE: LEGO1 0x1001cd40 21 | // MxList::MxList 22 | 23 | // TEMPLATE: LEGO1 0x1001cdd0 24 | // MxCollection::~MxCollection 25 | 26 | // TEMPLATE: LEGO1 0x1001ce20 27 | // MxList::~MxList 28 | 29 | // SYNTHETIC: LEGO1 0x1001cf70 30 | // MxCollection::`scalar deleting destructor' 31 | 32 | // SYNTHETIC: LEGO1 0x1001cfe0 33 | // MxList::`scalar deleting destructor' 34 | 35 | // SYNTHETIC: LEGO1 0x1001d090 36 | // MxPtrList::`scalar deleting destructor' 37 | -------------------------------------------------------------------------------- /LEGO1/mxpresenterlist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXPRESENTERLIST_H 2 | #define MXPRESENTERLIST_H 3 | 4 | #include "mxlist.h" 5 | 6 | class MxPresenter; 7 | 8 | // VTABLE: LEGO1 0x100d62f0 9 | // class MxPtrList 10 | 11 | // VTABLE: LEGO1 0x100d6308 12 | // SIZE 0x18 13 | class MxPresenterList : public MxPtrList { 14 | public: 15 | virtual MxS8 Compare(MxPresenter*, MxPresenter*) override; // vtable+0x14 16 | }; 17 | 18 | typedef MxListCursorChildChild MxPresenterListCursor; 19 | 20 | // VTABLE: LEGO1 0x100d6350 21 | // class MxCollection 22 | 23 | // VTABLE: LEGO1 0x100d6368 24 | // class MxList 25 | 26 | #endif // MXPRESENTERLIST_H 27 | -------------------------------------------------------------------------------- /LEGO1/mxqueue.h: -------------------------------------------------------------------------------- 1 | #ifndef MXQUEUE_H 2 | #define MXQUEUE_H 3 | 4 | #include "mxlist.h" 5 | 6 | template 7 | class MxQueue : public MxList { 8 | public: 9 | void Enqueue(T& p_obj) 10 | { 11 | // TODO 12 | } 13 | 14 | MxBool Dequeue(T& p_obj) 15 | { 16 | MxBool has_next = (m_first != NULL); 17 | if (m_first) { 18 | p_obj = m_first->GetValue(); 19 | _DeleteEntry(m_first); 20 | } 21 | 22 | return has_next; 23 | } 24 | }; 25 | 26 | #endif // MXQUEUE_H 27 | -------------------------------------------------------------------------------- /LEGO1/mxramstreamcontroller.h: -------------------------------------------------------------------------------- 1 | #ifndef MXRAMSTREAMCONTROLLER_H 2 | #define MXRAMSTREAMCONTROLLER_H 3 | 4 | #include "mxdsbuffer.h" 5 | #include "mxstreamcontroller.h" 6 | 7 | // VTABLE: LEGO1 0x100dc728 8 | // SIZE 0x98 9 | class MxRAMStreamController : public MxStreamController { 10 | public: 11 | inline MxRAMStreamController() {} 12 | 13 | // FUNCTION: LEGO1 0x100b9430 14 | inline virtual const char* ClassName() const override // vtable+0xc 15 | { 16 | // GLOBAL: LEGO1 0x10102130 17 | return "MxRAMStreamController"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x100b9440 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, MxRAMStreamController::ClassName()) || !strcmp(name, MxStreamController::ClassName()) || 24 | MxCore::IsA(name); 25 | } 26 | 27 | virtual MxResult Open(const char* p_filename) override; 28 | virtual MxResult vtable0x20(MxDSAction* p_action) override; 29 | virtual MxResult vtable0x24(undefined4 p_unknown) override; 30 | 31 | private: 32 | MxDSBuffer m_buffer; 33 | }; 34 | 35 | #endif // MXRAMSTREAMCONTROLLER_H 36 | -------------------------------------------------------------------------------- /LEGO1/mxscheduler.cpp: -------------------------------------------------------------------------------- 1 | #include "mxscheduler.h" 2 | 3 | // FUNCTION: LEGO1 0x100bf4f0 4 | MxScheduler* MxScheduler::GetInstance() 5 | { 6 | // Intentionally empty 7 | return 0; 8 | } 9 | 10 | // FUNCTION: LEGO1 0x100bf500 11 | void MxScheduler::StartMultiTasking(MxULong) 12 | { 13 | // Intentionally empty 14 | } 15 | -------------------------------------------------------------------------------- /LEGO1/mxscheduler.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSCHEDULER_H 2 | #define MXSCHEDULER_H 3 | 4 | #include "mxtypes.h" 5 | 6 | class MxScheduler { 7 | public: 8 | __declspec(dllexport) static MxScheduler* GetInstance(); 9 | __declspec(dllexport) void StartMultiTasking(MxULong); 10 | }; 11 | 12 | #endif // MXSCHEDULER_H 13 | -------------------------------------------------------------------------------- /LEGO1/mxsemaphore.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "mxsemaphore.h" 3 | 4 | // FUNCTION: LEGO1 0x100c87d0 5 | MxSemaphore::MxSemaphore() 6 | { 7 | m_hSemaphore = NULL; 8 | } 9 | 10 | // FUNCTION: LEGO1 0x100c8800 11 | MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount) 12 | { 13 | MxResult result = FAILURE; 14 | if (m_hSemaphore = CreateSemaphoreA(NULL, p_initialCount, p_maxCount, NULL)) 15 | result = SUCCESS; 16 | return result; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100c8830 20 | void MxSemaphore::Wait(MxU32 p_timeoutMS) 21 | { 22 | WaitForSingleObject(m_hSemaphore, p_timeoutMS); 23 | } 24 | 25 | // FUNCTION: LEGO1 0x100c8850 26 | void MxSemaphore::Release(MxU32 p_releaseCount) 27 | { 28 | ReleaseSemaphore(m_hSemaphore, p_releaseCount, NULL); 29 | } 30 | -------------------------------------------------------------------------------- /LEGO1/mxsemaphore.h: -------------------------------------------------------------------------------- 1 | #ifndef MX_SEMAPHORE_H 2 | #define MX_SEMAPHORE_H 3 | 4 | #include "mxtypes.h" 5 | 6 | #include 7 | 8 | class MxSemaphore { 9 | public: 10 | MxSemaphore(); 11 | 12 | // Inlined only, no offset 13 | ~MxSemaphore() { CloseHandle(m_hSemaphore); } 14 | 15 | virtual MxResult Init(MxU32 p_initialCount, MxU32 p_maxCount); 16 | 17 | void Wait(MxU32 p_timeoutMS); 18 | void Release(MxU32 p_releaseCount); 19 | 20 | private: 21 | HANDLE m_hSemaphore; 22 | }; 23 | 24 | #endif // MX_SEMAPHORE_H 25 | -------------------------------------------------------------------------------- /LEGO1/mxsize32.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSIZE32_H 2 | #define MXSIZE32_H 3 | 4 | #include "mxtypes.h" 5 | 6 | class MxSize32 { 7 | public: 8 | MxSize32() {} 9 | MxSize32(MxS32 p_width, MxS32 p_height) 10 | { 11 | this->m_width = p_width; 12 | this->m_height = p_height; 13 | } 14 | 15 | MxS32 m_width; 16 | MxS32 m_height; 17 | }; 18 | 19 | #endif // MXSIZE32_H 20 | -------------------------------------------------------------------------------- /LEGO1/mxsoundpresenter.cpp: -------------------------------------------------------------------------------- 1 | #include "mxsoundpresenter.h" 2 | 3 | #include "decomp.h" 4 | #include "mxsoundmanager.h" 5 | 6 | DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54) 7 | 8 | // FUNCTION: LEGO1 0x1000d430 9 | MxSoundPresenter::~MxSoundPresenter() 10 | { 11 | Destroy(TRUE); 12 | } 13 | 14 | // FUNCTION: LEGO1 0x1000d490 15 | void MxSoundPresenter::Destroy() 16 | { 17 | Destroy(FALSE); 18 | } 19 | 20 | // FUNCTION: LEGO1 0x100b1a50 21 | void MxSoundPresenter::Destroy(MxBool p_fromDestructor) 22 | { 23 | if (MSoundManager()) 24 | MSoundManager()->RemovePresenter(*this); 25 | 26 | this->m_criticalSection.Enter(); 27 | MxMediaPresenter::Init(); 28 | this->m_criticalSection.Leave(); 29 | 30 | if (!p_fromDestructor) 31 | MxMediaPresenter::Destroy(FALSE); 32 | } 33 | 34 | // FUNCTION: LEGO1 0x100b1aa0 35 | MxResult MxSoundPresenter::AddToManager() 36 | { 37 | MxResult ret = FAILURE; 38 | 39 | if (MSoundManager()) { 40 | ret = SUCCESS; 41 | MSoundManager()->AddPresenter(*this); 42 | } 43 | 44 | return ret; 45 | } 46 | -------------------------------------------------------------------------------- /LEGO1/mxsoundpresenter.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSOUNDPRESENTER_H 2 | #define MXSOUNDPRESENTER_H 3 | 4 | #include "mxaudiopresenter.h" 5 | #include "mxomni.h" 6 | 7 | // VTABLE: LEGO1 0x100d4b08 8 | // SIZE 0x54 9 | class MxSoundPresenter : public MxAudioPresenter { 10 | public: 11 | virtual ~MxSoundPresenter() override; 12 | 13 | // FUNCTION: LEGO1 0x1000d4a0 14 | inline virtual const char* ClassName() const // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f07a0 17 | return "MxSoundPresenter"; 18 | }; 19 | 20 | // FUNCTION: LEGO1 0x1000d4b0 21 | inline virtual MxBool IsA(const char* name) const // vtable+0x10 22 | { 23 | return !strcmp(name, MxSoundPresenter::ClassName()) || MxAudioPresenter::IsA(name); 24 | }; 25 | 26 | virtual MxResult AddToManager() override; // vtable+0x34 27 | virtual void Destroy() override; // vtable+0x38 28 | 29 | protected: 30 | void Destroy(MxBool p_fromDestructor); 31 | }; 32 | 33 | #endif // MXSOUNDPRESENTER_H 34 | -------------------------------------------------------------------------------- /LEGO1/mxstreamchunk.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSTREAMCHUNK_H 2 | #define MXSTREAMCHUNK_H 3 | 4 | #include "mxdschunk.h" 5 | 6 | // VTABLE: LEGO1 0x100dc2a8 7 | // SIZE 0x20 8 | class MxStreamChunk : public MxDSChunk { 9 | public: 10 | inline MxStreamChunk() : m_unk1c(NULL) {} 11 | 12 | // FUNCTION: LEGO1 0x100b1fe0 13 | inline virtual const char* ClassName() const override // vtable+0xc 14 | { 15 | // GLOBAL: LEGO1 0x10101e5c 16 | return "MxStreamChunk"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100b1ff0 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(name); 23 | } 24 | 25 | private: 26 | void* m_unk1c; // 0x1c 27 | }; 28 | 29 | #endif // MXSTREAMCHUNK_H 30 | -------------------------------------------------------------------------------- /LEGO1/mxstreamchunklist.cpp: -------------------------------------------------------------------------------- 1 | #include "mxstreamchunklist.h" 2 | 3 | #include "mxstreamchunk.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18); 6 | DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10); 7 | 8 | // FUNCTION: LEGO1 0x100b5900 9 | MxS8 MxStreamChunkList::Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) 10 | { 11 | return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; 12 | } 13 | 14 | // FUNCTION: LEGO1 0x100b5920 15 | void MxStreamChunkList::Destroy(MxStreamChunk* p_chunk) 16 | { 17 | if (p_chunk) 18 | delete p_chunk; 19 | } 20 | 21 | // TEMPLATE: LEGO1 0x100b5930 22 | // MxCollection::Compare 23 | 24 | // TEMPLATE: LEGO1 0x100b5990 25 | // MxCollection::Destroy 26 | 27 | // TEMPLATE: LEGO1 0x100b59a0 28 | // MxList::~MxList 29 | 30 | // SYNTHETIC: LEGO1 0x100b5aa0 31 | // MxCollection::`scalar deleting destructor' 32 | 33 | // SYNTHETIC: LEGO1 0x100b5b10 34 | // MxList::`scalar deleting destructor' 35 | -------------------------------------------------------------------------------- /LEGO1/mxstreamchunklist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSTREAMCHUNKLIST_H 2 | #define MXSTREAMCHUNKLIST_H 3 | 4 | #include "decomp.h" 5 | #include "mxlist.h" 6 | 7 | class MxStreamChunk; 8 | 9 | // VTABLE: LEGO1 0x100dc5d0 10 | // class MxCollection 11 | 12 | // VTABLE: LEGO1 0x100dc5e8 13 | // class MxList 14 | 15 | // VTABLE: LEGO1 0x100dc600 16 | // SIZE 0x18 17 | class MxStreamChunkList : public MxList { 18 | public: 19 | MxStreamChunkList() { m_customDestructor = Destroy; } 20 | 21 | virtual MxS8 Compare(MxStreamChunk*, MxStreamChunk*) override; // vtable+0x14 22 | 23 | static void Destroy(MxStreamChunk* p_chunk); 24 | }; 25 | 26 | typedef MxListCursorChild MxStreamChunkListCursor; 27 | 28 | #endif // MXSTREAMCHUNKLIST_H 29 | -------------------------------------------------------------------------------- /LEGO1/mxstreamlist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSTREAMLIST_H 2 | #define MXSTREAMLIST_H 3 | 4 | #include "compat.h" // STL 5 | #include "mxdsaction.h" 6 | #include "mxdssubscriber.h" 7 | #include "mxnextactiondatastart.h" 8 | 9 | template 10 | class MxStreamList : public list {}; 11 | 12 | // SIZE 0xc 13 | class MxStreamListMxDSAction : public MxStreamList { 14 | public: 15 | MxDSAction* Find(MxDSAction* p_action, MxBool p_delete); 16 | }; 17 | 18 | // SIZE 0xc 19 | class MxStreamListMxNextActionDataStart : public MxStreamList { 20 | public: 21 | MxNextActionDataStart* Find(MxU32, MxS16); 22 | }; 23 | 24 | // SIZE 0xc 25 | class MxStreamListMxDSSubscriber : public MxStreamList {}; 26 | 27 | #endif // MXSTREAMLIST_H 28 | -------------------------------------------------------------------------------- /LEGO1/mxstreamprovider.cpp: -------------------------------------------------------------------------------- 1 | #include "mxstreamprovider.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxStreamProvider, 0x10); 6 | 7 | // FUNCTION: LEGO1 0x100d07c0 8 | MxResult MxStreamProvider::SetResourceToGet(MxStreamController* p_resource) 9 | { 10 | m_pLookup = p_resource; 11 | return SUCCESS; 12 | } 13 | 14 | // FUNCTION: LEGO1 0x100d07d0 15 | void MxStreamProvider::vtable0x20(undefined4 p_unknown1) 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /LEGO1/mxstring.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSTRING_H 2 | #define MXSTRING_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100dc110 7 | class MxString : public MxCore { 8 | public: 9 | __declspec(dllexport) MxString(const MxString&); 10 | __declspec(dllexport) virtual ~MxString(); 11 | __declspec(dllexport) const MxString& operator=(const char*); 12 | 13 | MxString(); 14 | MxString(const char*); 15 | void ToUpperCase(); 16 | void ToLowerCase(); 17 | MxString& operator=(const MxString&); 18 | MxString operator+(const char*); 19 | MxString& operator+=(const char*); 20 | 21 | inline MxS8 Compare(const MxString& p_str) const { return strcmp(m_data, p_str.m_data); } 22 | inline const char* GetData() const { return m_data; } 23 | 24 | private: 25 | char* m_data; 26 | MxU16 m_length; 27 | }; 28 | 29 | #endif // MXSTRING_H 30 | -------------------------------------------------------------------------------- /LEGO1/mxstringlist.cpp: -------------------------------------------------------------------------------- 1 | #include "mxstringlist.h" 2 | 3 | #include "decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(MxListEntry, 0x18) 6 | 7 | // TEMPLATE: LEGO1 0x100cb3c0 8 | // MxCollection::Compare 9 | 10 | // TEMPLATE: LEGO1 0x100cb470 11 | // MxCollection::Destroy 12 | 13 | // TEMPLATE: LEGO1 0x100cb4c0 14 | // MxList::~MxList 15 | 16 | // TEMPLATE: LEGO1 0x100cbb40 17 | // MxList::Append 18 | 19 | // TEMPLATE: LEGO1 0x100cc2d0 20 | // MxList::_InsertEntry 21 | 22 | // TEMPLATE: LEGO1 0x100cc3c0 23 | // MxListEntry::MxListEntry 24 | 25 | // TEMPLATE: LEGO1 0x100cc450 26 | // MxListEntry::GetValue 27 | -------------------------------------------------------------------------------- /LEGO1/mxstringlist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXSTRINGLIST_H 2 | #define MXSTRINGLIST_H 3 | 4 | #include "mxlist.h" 5 | #include "mxstring.h" 6 | 7 | // VTABLE: LEGO1 0x100dd040 8 | // SIZE 0x18 9 | class MxStringList : public MxList {}; 10 | 11 | // VTABLE: LEGO1 0x100dd058 12 | typedef MxListCursorChild MxStringListCursor; 13 | 14 | #endif // MXSTRINGLIST_H 15 | -------------------------------------------------------------------------------- /LEGO1/mxtimer.h: -------------------------------------------------------------------------------- 1 | #ifndef MXTIMER_H 2 | #define MXTIMER_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100dc0e0 7 | // SIZE 0x10 8 | class MxTimer : public MxCore { 9 | public: 10 | MxTimer(); 11 | 12 | void Start(); 13 | void Stop(); 14 | 15 | __declspec(dllexport) MxLong GetRealTime(); 16 | 17 | inline MxLong GetTime() 18 | { 19 | if (this->m_isRunning) 20 | return s_LastTimeTimerStarted; 21 | else 22 | return s_LastTimeCalculated - this->m_startTime; 23 | } 24 | 25 | private: 26 | MxLong m_startTime; 27 | MxBool m_isRunning; 28 | static MxLong s_LastTimeCalculated; 29 | static MxLong s_LastTimeTimerStarted; 30 | }; 31 | 32 | #endif // MXTIMER_H 33 | -------------------------------------------------------------------------------- /LEGO1/mxtype17notificationparam.cpp: -------------------------------------------------------------------------------- 1 | #include "mxtype17notificationparam.h" 2 | 3 | DECOMP_SIZE_ASSERT(MxType17NotificationParam, 0x2c) 4 | -------------------------------------------------------------------------------- /LEGO1/mxtype17notificationparam.h: -------------------------------------------------------------------------------- 1 | #ifndef MXTYPE17NOTIFICATIONPARAM_H 2 | #define MXTYPE17NOTIFICATIONPARAM_H 3 | 4 | #include "decomp.h" 5 | #include "mxnotificationparam.h" 6 | 7 | // ??? This type is handled, but seemingly never created and no VTABLE fits 8 | class MxType17NotificationParam : public MxNotificationParam { 9 | public: 10 | inline MxU32 GetUnknown20() { return m_unk20; } 11 | inline MxU16 GetUnknown28() { return m_unk28; } 12 | 13 | protected: 14 | undefined m_unkc[0x14]; 15 | MxU32 m_unk20; 16 | undefined4 m_unk24; 17 | MxU16 m_unk28; 18 | }; 19 | 20 | #endif // MXTYPE17NOTIFICATIONPARAM_H 21 | -------------------------------------------------------------------------------- /LEGO1/mxunklist.h: -------------------------------------------------------------------------------- 1 | #ifndef MXUNKLIST_H 2 | #define MXUNKLIST_H 3 | 4 | #include "decomp.h" 5 | #include "mxtypes.h" 6 | 7 | /* 8 | * This is an as-of-yet unknown list-like data structure. 9 | * The class hierarchy/structure isn't quite correct yet. 10 | */ 11 | 12 | struct MxUnkListNode { 13 | MxUnkListNode* m_unk00; 14 | MxUnkListNode* m_unk04; 15 | undefined4 m_unk08; 16 | }; 17 | 18 | class MxUnkList { 19 | public: 20 | inline MxUnkList() 21 | { 22 | undefined unk; 23 | this->m_unk00 = unk; 24 | 25 | MxUnkListNode* node = new MxUnkListNode(); 26 | node->m_unk00 = node; 27 | node->m_unk04 = node; 28 | 29 | this->m_head = node; 30 | this->m_count = 0; 31 | } 32 | 33 | undefined m_unk00; 34 | MxUnkListNode* m_head; 35 | MxU32 m_count; 36 | }; 37 | 38 | #endif // MXUNKLIST_H 39 | -------------------------------------------------------------------------------- /LEGO1/mxvariable.cpp: -------------------------------------------------------------------------------- 1 | #include "mxvariable.h" 2 | 3 | #include "decomp.h" 4 | #include "mxstring.h" 5 | 6 | DECOMP_SIZE_ASSERT(MxVariable, 0x24) 7 | 8 | // FUNCTION: LEGO1 0x1003bea0 9 | MxString* MxVariable::GetValue() 10 | { 11 | return &m_value; 12 | } 13 | 14 | // FUNCTION: LEGO1 0x1003beb0 15 | void MxVariable::SetValue(const char* value) 16 | { 17 | m_value = value; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1003bec0 21 | void MxVariable::Destroy() 22 | { 23 | delete this; 24 | } 25 | -------------------------------------------------------------------------------- /LEGO1/mxvariable.h: -------------------------------------------------------------------------------- 1 | #ifndef MXVARIABLE_H 2 | #define MXVARIABLE_H 3 | 4 | #include "mxcore.h" 5 | #include "mxstring.h" 6 | 7 | // VTABLE: LEGO1 0x100d7498 8 | // SIZE 0x24 9 | class MxVariable { 10 | public: 11 | MxVariable() {} 12 | MxVariable(const char* p_key) 13 | { 14 | m_key = p_key; 15 | m_key.ToUpperCase(); 16 | } 17 | MxVariable(const char* p_key, const char* p_value) 18 | { 19 | m_key = p_key; 20 | m_key.ToUpperCase(); 21 | m_value = p_value; 22 | } 23 | virtual MxString* GetValue(); 24 | virtual void SetValue(const char*); 25 | virtual void Destroy(); 26 | 27 | inline const MxString* GetKey() const { return &m_key; } 28 | 29 | protected: 30 | MxString m_key; 31 | MxString m_value; 32 | }; 33 | 34 | #endif // MXVARIABLE_H 35 | -------------------------------------------------------------------------------- /LEGO1/mxvariabletable.h: -------------------------------------------------------------------------------- 1 | #ifndef MXVARIABLETABLE_H 2 | #define MXVARIABLETABLE_H 3 | 4 | #include "mxhashtable.h" 5 | #include "mxtypes.h" 6 | #include "mxvariable.h" 7 | 8 | // VTABLE: LEGO1 0x100dc1c8 9 | // SIZE 0x28 10 | class MxVariableTable : public MxHashTable { 11 | public: 12 | MxVariableTable() { m_customDestructor = Destroy; } 13 | __declspec(dllexport) void SetVariable(const char* p_key, const char* p_value); 14 | __declspec(dllexport) void SetVariable(MxVariable* p_var); 15 | __declspec(dllexport) const char* GetVariable(const char* p_key); 16 | 17 | static void Destroy(MxVariable* p_obj) { p_obj->Destroy(); } 18 | 19 | virtual MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14 20 | virtual MxU32 Hash(MxVariable*) override; // vtable+0x18 21 | }; 22 | 23 | // VTABLE: LEGO1 0x100dc1b0 24 | // class MxCollection 25 | 26 | // VTABLE: LEGO1 0x100dc1e8 27 | // class MxHashTable 28 | 29 | #endif // MXVARIABLETABLE_H 30 | -------------------------------------------------------------------------------- /LEGO1/mxvideoparamflags.cpp: -------------------------------------------------------------------------------- 1 | #include "mxvideoparamflags.h" 2 | 3 | // FUNCTION: LEGO1 0x100bec40 4 | MxVideoParamFlags::MxVideoParamFlags() 5 | { 6 | this->SetFullScreen(0); 7 | this->SetFlipSurfaces(0); 8 | this->SetBackBuffers(0); 9 | this->Set_f1bit3(0); 10 | this->Set_f1bit4(0); 11 | this->Set16Bit(0); 12 | this->SetWideViewAngle(1); 13 | this->Set_f1bit7(1); 14 | this->Set_f2bit1(1); 15 | } 16 | -------------------------------------------------------------------------------- /LEGO1/pizza.cpp: -------------------------------------------------------------------------------- 1 | #include "pizza.h" 2 | 3 | DECOMP_SIZE_ASSERT(Pizza, 0x9c); 4 | 5 | // FUNCTION: LEGO1 0x10037ef0 6 | Pizza::Pizza() 7 | { 8 | this->m_unk7c = 0; 9 | this->m_unk80 = 0; 10 | this->m_unk84 = 0; 11 | this->m_unk88 = 0; 12 | this->m_unk8c = -1; 13 | this->m_unk98 = 0; 14 | this->m_unk90 = 0x80000000; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x10038100 18 | Pizza::~Pizza() 19 | { 20 | TickleManager()->UnregisterClient(this); 21 | } 22 | 23 | // STUB: LEGO1 0x100388a0 24 | MxResult Pizza::Tickle() 25 | { 26 | // TODO 27 | return SUCCESS; 28 | } 29 | -------------------------------------------------------------------------------- /LEGO1/pizza.h: -------------------------------------------------------------------------------- 1 | #ifndef PIZZA_H 2 | #define PIZZA_H 3 | 4 | #include "decomp.h" 5 | #include "isleactor.h" 6 | #include "mxcore.h" 7 | #include "mxomni.h" 8 | #include "mxticklemanager.h" 9 | #include "mxtypes.h" 10 | 11 | // VTABLE: LEGO1 0x100d7380 12 | // SIZE 0x9c 13 | class Pizza : public IsleActor { 14 | public: 15 | Pizza(); 16 | virtual ~Pizza() override; 17 | 18 | virtual MxResult Tickle() override; // vtable+08 19 | 20 | // FUNCTION: LEGO1 0x10037f90 21 | inline const char* ClassName() const // vtable+0c 22 | { 23 | // GLOBAL: LEGO1 0x100f038c 24 | return "Pizza"; 25 | } 26 | 27 | // FUNCTION: LEGO1 0x10037fa0 28 | inline MxBool IsA(const char* name) const override // vtable+10 29 | { 30 | return !strcmp(name, Pizza::ClassName()) || IsleActor::IsA(name); 31 | } 32 | 33 | private: 34 | undefined4 m_unk78; 35 | undefined4 m_unk7c; 36 | undefined4 m_unk80; 37 | undefined4 m_unk84; 38 | undefined4 m_unk88; 39 | undefined4 m_unk8c; 40 | undefined4 m_unk90; 41 | undefined4 m_unk94; 42 | undefined m_unk98; 43 | }; 44 | 45 | #endif // PIZZA_H 46 | -------------------------------------------------------------------------------- /LEGO1/pizzamissionstate.cpp: -------------------------------------------------------------------------------- 1 | #include "pizzamissionstate.h" 2 | 3 | DECOMP_SIZE_ASSERT(PizzaMissionStateEntry, 0x20) 4 | DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb0) 5 | 6 | // FUNCTION: LEGO1 0x10039510 7 | PizzaMissionStateEntry* PizzaMissionState::GetState(MxU8 id) 8 | { 9 | for (MxS16 i = 0; i < 5; i++) 10 | if (m_state[i].m_id == id) 11 | return m_state + i; 12 | return NULL; 13 | } 14 | -------------------------------------------------------------------------------- /LEGO1/pizzamissionstate.h: -------------------------------------------------------------------------------- 1 | #ifndef PIZZAMISSIONSTATE_H 2 | #define PIZZAMISSIONSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | struct PizzaMissionStateEntry { 7 | public: 8 | undefined2 m_unk0; 9 | MxU8 m_id; 10 | undefined m_unk3[0x15]; 11 | MxU16 m_color; 12 | undefined m_unk18[6]; 13 | }; 14 | 15 | // VTABLE: LEGO1 0x100d7408 16 | class PizzaMissionState : public LegoState { 17 | public: 18 | // FUNCTION: LEGO1 0x10039290 19 | inline virtual const char* ClassName() const override // vtable+0x0c 20 | { 21 | // GLOBAL: LEGO1 0x100f00d4 22 | return "PizzaMissionState"; 23 | } 24 | 25 | // FUNCTION: LEGO1 0x100392a0 26 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 27 | { 28 | return !strcmp(name, PizzaMissionState::ClassName()) || LegoState::IsA(name); 29 | } 30 | 31 | inline MxU16 GetColor(MxU8 id) { return GetState(id)->m_color; } 32 | 33 | private: 34 | PizzaMissionStateEntry* GetState(MxU8 id); 35 | 36 | protected: 37 | undefined4 m_unk8; 38 | undefined4 m_unkc; 39 | PizzaMissionStateEntry m_state[5]; 40 | }; 41 | 42 | #endif // PIZZAMISSIONSTATE_H 43 | -------------------------------------------------------------------------------- /LEGO1/pizzeria.cpp: -------------------------------------------------------------------------------- 1 | #include "pizzeria.h" 2 | -------------------------------------------------------------------------------- /LEGO1/pizzeria.h: -------------------------------------------------------------------------------- 1 | #ifndef PIZZERIASTATE_H 2 | #define PIZZERIASTATE_H 3 | 4 | #include "isleactor.h" 5 | 6 | // VTABLE: LEGO1 0x100d5520 7 | // SIZE 0x84 8 | class Pizzeria : public IsleActor { 9 | public: 10 | // FUNCTION: LEGO1 0x1000e780 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0380 14 | return "Pizzeria"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000e790 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, Pizzeria::ClassName()) || IsleActor::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // PIZZERIASTATE_H 25 | -------------------------------------------------------------------------------- /LEGO1/pizzeriastate.cpp: -------------------------------------------------------------------------------- 1 | #include "pizzeriastate.h" 2 | 3 | // STUB: LEGO1 0x10017af0 4 | PizzeriaState::PizzeriaState() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/pizzeriastate.h: -------------------------------------------------------------------------------- 1 | #ifndef PIZZERIASTATE_H 2 | #define PIZZERIASTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d5ee8 7 | // SIZE 0xb4 8 | class PizzeriaState : public LegoState { 9 | public: 10 | PizzeriaState(); 11 | 12 | // FUNCTION: LEGO1 0x10017c20 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0370 16 | return "PizzeriaState"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x10017c30 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, PizzeriaState::ClassName()) || LegoState::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // PIZZERIASTATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/police.cpp: -------------------------------------------------------------------------------- 1 | #include "police.h" 2 | 3 | // STUB: LEGO1 0x1005e130 4 | Police::Police() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x1005e320 10 | Police::~Police() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x1005e480 16 | MxLong Police::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/police.h: -------------------------------------------------------------------------------- 1 | #ifndef POLICE_H 2 | #define POLICE_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d8a80 7 | // SIZE 0x110 8 | // Radio at 0xf8 9 | class Police : public LegoWorld { 10 | public: 11 | Police(); 12 | virtual ~Police() override; // vtable+0x0 13 | 14 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 15 | 16 | // FUNCTION: LEGO1 0x1005e1e0 17 | inline virtual const char* ClassName() const override // vtable+0xc 18 | { 19 | // GLOBAL: LEGO1 0x100f0450 20 | return "Police"; 21 | } 22 | 23 | // FUNCTION: LEGO1 0x1005e1f0 24 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 25 | { 26 | return !strcmp(name, Police::ClassName()) || LegoWorld::IsA(name); 27 | } 28 | }; 29 | 30 | #endif // POLICE_H 31 | -------------------------------------------------------------------------------- /LEGO1/policeentity.cpp: -------------------------------------------------------------------------------- 1 | #include "policeentity.h" 2 | -------------------------------------------------------------------------------- /LEGO1/policeentity.h: -------------------------------------------------------------------------------- 1 | #ifndef POLICEENTITY_H 2 | #define POLICEENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d4ab0 7 | // SIZE 0x68 8 | class PoliceEntity : public BuildingEntity { 9 | public: 10 | // FUNCTION: LEGO1 0x1000ed60 11 | inline virtual const char* ClassName() const override // vtable+0xc 12 | { 13 | // GLOBAL: LEGO1 0x100f0328 14 | return "PoliceEntity"; 15 | } 16 | 17 | // FUNCTION: LEGO1 0x1000ed70 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, PoliceEntity::ClassName()) || BuildingEntity::IsA(name); 21 | } 22 | }; 23 | 24 | #endif // POLICEENTITY_H 25 | -------------------------------------------------------------------------------- /LEGO1/policestate.cpp: -------------------------------------------------------------------------------- 1 | #include "policestate.h" 2 | 3 | // STUB: LEGO1 0x1005e7c0 4 | PoliceState::PoliceState() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/policestate.h: -------------------------------------------------------------------------------- 1 | #ifndef POLICESTATE_H 2 | #define POLICESTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d8af0 7 | // SIZE 0x10 8 | class PoliceState : public LegoState { 9 | public: 10 | PoliceState(); 11 | 12 | // FUNCTION: LEGO1 0x1005e860 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f0444 16 | return "PoliceState"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1005e870 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, PoliceState::ClassName()) || LegoState::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // POLICESTATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/racecar.cpp: -------------------------------------------------------------------------------- 1 | #include "racecar.h" 2 | 3 | DECOMP_SIZE_ASSERT(RaceCar, 0x164); 4 | 5 | // FUNCTION: LEGO1 0x10028200 6 | RaceCar::RaceCar() 7 | { 8 | this->m_unk13c = 40.0; 9 | } 10 | 11 | // STUB: LEGO1 0x10028420 12 | RaceCar::~RaceCar() 13 | { 14 | // TODO 15 | } 16 | -------------------------------------------------------------------------------- /LEGO1/racecar.h: -------------------------------------------------------------------------------- 1 | #ifndef RACECAR_H 2 | #define RACECAR_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d6918 8 | // SIZE 0x164 9 | class RaceCar : public IslePathActor { 10 | public: 11 | RaceCar(); 12 | virtual ~RaceCar() override; // vtable+0x0 13 | 14 | // FUNCTION: LEGO1 0x10028270 15 | inline virtual const char* ClassName() const override // vtable+0x0c 16 | { 17 | // GLOBAL: LEGO1 0x100f03e0 18 | return "RaceCar"; 19 | } 20 | 21 | // FUNCTION: LEGO1 0x10028280 22 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 23 | { 24 | return !strcmp(name, RaceCar::ClassName()) || IslePathActor::IsA(name); 25 | } 26 | 27 | private: 28 | // TODO: RaceCar fields 29 | undefined m_unk160[4]; 30 | }; 31 | 32 | #endif // RACECAR_H 33 | -------------------------------------------------------------------------------- /LEGO1/racestandsentity.cpp: -------------------------------------------------------------------------------- 1 | #include "racestandsentity.h" 2 | -------------------------------------------------------------------------------- /LEGO1/racestandsentity.h: -------------------------------------------------------------------------------- 1 | #ifndef RACESTANDSENTITY_H 2 | #define RACESTANDSENTITY_H 3 | 4 | #include "buildingentity.h" 5 | 6 | // VTABLE: LEGO1 0x100d48a8 7 | // SIZE 0x68 8 | class RaceStandsEntity : public BuildingEntity {}; 9 | 10 | #endif // RACESTANDSENTITY_H 11 | -------------------------------------------------------------------------------- /LEGO1/racestate.cpp: -------------------------------------------------------------------------------- 1 | #include "racestate.h" 2 | 3 | DECOMP_SIZE_ASSERT(RaceStateEntry, 0x06) 4 | 5 | // TODO: Must be 0x2c but current structure is incorrect 6 | // DECOMP_SIZE_ASSERT(RaceState, 0x2c) 7 | 8 | // STUB: LEGO1 0x10015f30 9 | RaceState::RaceState() 10 | { 11 | // TODO 12 | } 13 | 14 | // FUNCTION: LEGO1 0x10016280 15 | RaceStateEntry* RaceState::GetState(MxU8 id) 16 | { 17 | for (MxS16 i = 0;; i++) { 18 | if (i >= 5) 19 | return NULL; 20 | if (m_state[i].m_id == id) 21 | return m_state + i; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LEGO1/racestate.h: -------------------------------------------------------------------------------- 1 | #ifndef RACESTATE_H 2 | #define RACESTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | struct RaceStateEntry { 7 | public: 8 | MxU8 m_id; 9 | undefined m_unk1[1]; 10 | MxU16 m_unk2; 11 | MxU16 m_color; 12 | }; 13 | 14 | // VTABLE: LEGO1 0x100d5e30 15 | // SIZE 0x2c 16 | class RaceState : public LegoState { 17 | public: 18 | RaceState(); 19 | 20 | // FUNCTION: LEGO1 0x10016010 21 | inline virtual const char* ClassName() const override // vtable+0x0c 22 | { 23 | // GLOBAL: LEGO1 0x100f07d0 24 | return "RaceState"; 25 | } 26 | 27 | // FUNCTION: LEGO1 0x10016020 28 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 29 | { 30 | return !strcmp(name, RaceState::ClassName()) || LegoState::IsA(name); 31 | } 32 | 33 | inline MxU16 GetColor(MxU8 id) { return GetState(id)->m_color; } 34 | 35 | private: 36 | RaceStateEntry* GetState(MxU8 id); 37 | 38 | protected: 39 | RaceStateEntry m_state[5]; 40 | undefined2 m_unk26[2]; 41 | undefined4 m_unk28; 42 | }; 43 | 44 | #endif // RACESTATE_H 45 | -------------------------------------------------------------------------------- /LEGO1/radio.cpp: -------------------------------------------------------------------------------- 1 | #include "radio.h" 2 | 3 | // STUB: LEGO1 0x1002c990 4 | Radio::~Radio() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/radio.h: -------------------------------------------------------------------------------- 1 | #ifndef RADIO_H 2 | #define RADIO_H 3 | 4 | #include "mxcore.h" 5 | 6 | // VTABLE: LEGO1 0x100d6d10 7 | class Radio : public MxCore { 8 | public: 9 | virtual ~Radio() override; 10 | 11 | // FUNCTION: LEGO1 0x1002c8e0 12 | inline virtual const char* ClassName() const override // vtable+0x0c 13 | { 14 | // GLOBAL: LEGO1 0x100f328c 15 | return "Radio"; 16 | } 17 | 18 | // FUNCTION: LEGO1 0x1002c8f0 19 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 20 | { 21 | return !strcmp(name, Radio::ClassName()) || MxCore::IsA(name); 22 | } 23 | }; 24 | 25 | #endif // RADIO_H 26 | -------------------------------------------------------------------------------- /LEGO1/radiostate.cpp: -------------------------------------------------------------------------------- 1 | #include "radiostate.h" 2 | 3 | // STUB: LEGO1 0x1002ce10 4 | RadioState::RadioState() 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/radiostate.h: -------------------------------------------------------------------------------- 1 | #ifndef RADIOSTATE_H 2 | #define RADIOSTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d6d28 7 | // SIZE 0x30 8 | class RadioState : public LegoState { 9 | public: 10 | RadioState(); 11 | 12 | // FUNCTION: LEGO1 0x1002cf60 13 | inline virtual const char* ClassName() const override // vtable+0x0c 14 | { 15 | // GLOBAL: LEGO1 0x100f04f8 16 | return "RadioState"; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x1002cf70 20 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 21 | { 22 | return !strcmp(name, RadioState::ClassName()) || LegoState::IsA(name); 23 | } 24 | }; 25 | 26 | #endif // RADIOSTATE_H 27 | -------------------------------------------------------------------------------- /LEGO1/realtime/realtime.h: -------------------------------------------------------------------------------- 1 | #ifndef REALTIME_H 2 | #define REALTIME_H 3 | 4 | #include "matrix.h" 5 | 6 | #define NORMVEC3(dst, src) \ 7 | { \ 8 | double len = sqrt(NORMSQRD3(src)); \ 9 | VDS3(dst, src, len); \ 10 | } 11 | 12 | void CalcLocalTransform( 13 | const Vector3Impl& p_posVec, 14 | const Vector3Impl& p_dirVec, 15 | const Vector3Impl& p_upVec, 16 | Matrix4Impl& p_outMatrix 17 | ); 18 | 19 | #endif // REALTIME_H 20 | -------------------------------------------------------------------------------- /LEGO1/realtime/realtimeview.cpp: -------------------------------------------------------------------------------- 1 | #include "realtimeview.h" 2 | 3 | #include 4 | 5 | // GLOBAL: LEGO1 0x10109598 6 | float g_userMaxLodPower; 7 | 8 | // GLOBAL: LEGO1 0x10101044 9 | float g_userMaxBase = 4.0f; 10 | 11 | // GLOBAL: LEGO1 0x10101048 12 | float g_userMaxLod = 3.6f; 13 | 14 | // GLOBAL: LEGO1 0x1010104c 15 | float g_partsThreshold = 1000.0f; 16 | 17 | // FUNCTION: LEGO1 0x100a5de0 18 | void RealtimeView::SetUserMaxLOD(float p_lod) 19 | { 20 | g_userMaxLod = p_lod; 21 | UpdateMaxLOD(); 22 | } 23 | 24 | // FUNCTION: LEGO1 0x100a5df0 25 | void RealtimeView::SetPartsThreshold(float p_threshold) 26 | { 27 | g_partsThreshold = p_threshold; 28 | } 29 | 30 | // FUNCTION: LEGO1 0x100a5e00 31 | float RealtimeView::GetUserMaxLOD() 32 | { 33 | // TODO 34 | return 0; 35 | } 36 | 37 | // FUNCTION: LEGO1 0x100a5e10 38 | float RealtimeView::GetPartsThreshold() 39 | { 40 | return g_partsThreshold; 41 | } 42 | 43 | // FUNCTION: LEGO1 0x100a5e20 44 | void RealtimeView::UpdateMaxLOD() 45 | { 46 | g_userMaxLodPower = pow(g_userMaxBase, -g_userMaxLod); 47 | } 48 | -------------------------------------------------------------------------------- /LEGO1/realtime/realtimeview.h: -------------------------------------------------------------------------------- 1 | #ifndef REALTIMEVIEW_H 2 | #define REALTIMEVIEW_H 3 | 4 | class RealtimeView { 5 | public: 6 | __declspec(dllexport) static float GetPartsThreshold(); 7 | __declspec(dllexport) static float GetUserMaxLOD(); 8 | __declspec(dllexport) static void SetPartsThreshold(float); 9 | static void UpdateMaxLOD(); 10 | __declspec(dllexport) static void SetUserMaxLOD(float); 11 | }; 12 | 13 | #endif // REALTIMEVIEW_H 14 | -------------------------------------------------------------------------------- /LEGO1/registrationbook.cpp: -------------------------------------------------------------------------------- 1 | #include "registrationbook.h" 2 | 3 | // STUB: LEGO1 0x10076d20 4 | RegistrationBook::RegistrationBook() 5 | { 6 | // TODO 7 | } 8 | 9 | // STUB: LEGO1 0x10076f50 10 | RegistrationBook::~RegistrationBook() 11 | { 12 | // TODO 13 | } 14 | 15 | // STUB: LEGO1 0x100770e0 16 | MxLong RegistrationBook::Notify(MxParam& p) 17 | { 18 | // TODO 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /LEGO1/registrationbook.h: -------------------------------------------------------------------------------- 1 | #ifndef REGISTRATIONBOOK_H 2 | #define REGISTRATIONBOOK_H 3 | 4 | #include "legoworld.h" 5 | 6 | // VTABLE: LEGO1 0x100d9928 7 | // SIZE 0x2d0 8 | class RegistrationBook : public LegoWorld { 9 | public: 10 | RegistrationBook(); 11 | virtual ~RegistrationBook() override; // vtable+0x0 12 | 13 | virtual MxLong Notify(MxParam& p) override; // vtable+0x4 14 | 15 | // FUNCTION: LEGO1 0x10076e10 16 | inline virtual const char* ClassName() const override // vtable+0x0c 17 | { 18 | // GLOBAL: LEGO1 0x100f04c8 19 | return "RegistrationBook"; 20 | } 21 | 22 | // FUNCTION: LEGO1 0x10076e20 23 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 24 | { 25 | return !strcmp(name, RegistrationBook::ClassName()) || LegoWorld::IsA(name); 26 | } 27 | }; 28 | 29 | #endif // REGISTRATIONBOOK_H 30 | -------------------------------------------------------------------------------- /LEGO1/scorestate.cpp: -------------------------------------------------------------------------------- 1 | #include "scorestate.h" 2 | 3 | DECOMP_SIZE_ASSERT(ScoreState, 0x0C); 4 | 5 | // FUNCTION: LEGO1 0x1000de20 6 | MxBool ScoreState::VTable0x14() 7 | { 8 | return FALSE; 9 | } 10 | 11 | // FUNCTION: LEGO1 0x1000de30 12 | MxBool ScoreState::SetFlag() 13 | { 14 | m_playCubeTutorial = TRUE; 15 | return TRUE; 16 | } 17 | -------------------------------------------------------------------------------- /LEGO1/scorestate.h: -------------------------------------------------------------------------------- 1 | #ifndef SCORESTATE_H 2 | #define SCORESTATE_H 3 | 4 | #include "legostate.h" 5 | 6 | // VTABLE: LEGO1 0x100d53f8 7 | // SIZE 0xc 8 | class ScoreState : public LegoState { 9 | public: 10 | // FUNCTION: LEGO1 0x1000de40 11 | inline virtual const char* ClassName() const override // vtable+0x0c 12 | { 13 | // GLOBAL: LEGO1 0x100f0084 14 | return "ScoreState"; 15 | }; 16 | 17 | // FUNCTION: LEGO1 0x1000de50 18 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 19 | { 20 | return !strcmp(name, ScoreState::ClassName()) || LegoState::IsA(name); 21 | }; 22 | 23 | virtual MxBool VTable0x14() override; // vtable+0x14 24 | virtual MxBool SetFlag() override; // vtable+0x18 25 | 26 | inline MxBool GetTutorialFlag() { return m_playCubeTutorial; } 27 | inline void SetTutorialFlag(MxBool p_playCubeTutorial) { m_playCubeTutorial = p_playCubeTutorial; } 28 | 29 | private: 30 | MxBool m_playCubeTutorial; 31 | }; 32 | 33 | #endif // SCORESTATE_H 34 | -------------------------------------------------------------------------------- /LEGO1/skateboard.cpp: -------------------------------------------------------------------------------- 1 | #include "skateboard.h" 2 | 3 | #include "decomp.h" 4 | #include "mxnotificationmanager.h" 5 | #include "mxomni.h" 6 | 7 | DECOMP_SIZE_ASSERT(SkateBoard, 0x168); 8 | 9 | // FUNCTION: LEGO1 0x1000fd40 10 | SkateBoard::SkateBoard() 11 | { 12 | this->m_unk160 = 0; 13 | this->m_unk13c = 15.0; 14 | this->m_unk150 = 3.5; 15 | this->m_unk148 = 1; 16 | 17 | NotificationManager()->Register(this); 18 | } 19 | -------------------------------------------------------------------------------- /LEGO1/skateboard.h: -------------------------------------------------------------------------------- 1 | #ifndef SKATEBOARD_H 2 | #define SKATEBOARD_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d55f0 8 | // SIZE 0x168 9 | class SkateBoard : public IslePathActor { 10 | public: 11 | SkateBoard(); 12 | 13 | // FUNCTION: LEGO1 0x1000fdd0 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f041c 17 | return "SkateBoard"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1000fde0 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, SkateBoard::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | // TODO: SkateBoard types 28 | undefined m_unk160; 29 | undefined m_unk161[0x7]; 30 | }; 31 | 32 | #endif // SKATEBOARD_H 33 | -------------------------------------------------------------------------------- /LEGO1/towtrack.cpp: -------------------------------------------------------------------------------- 1 | #include "towtrack.h" 2 | 3 | DECOMP_SIZE_ASSERT(TowTrack, 0x180); 4 | 5 | // FUNCTION: LEGO1 0x1004c720 6 | TowTrack::TowTrack() 7 | { 8 | this->m_unk168 = 0; 9 | this->m_unk16a = -1; 10 | this->m_unk164 = 0; 11 | this->m_unk16c = 0; 12 | this->m_unk170 = -1; 13 | this->m_unk16e = 0; 14 | this->m_unk174 = -1; 15 | this->m_unk13c = 40.0; 16 | this->m_unk178 = 1.0; 17 | } 18 | -------------------------------------------------------------------------------- /LEGO1/towtrack.h: -------------------------------------------------------------------------------- 1 | #ifndef TOWTRACK_H 2 | #define TOWTRACK_H 3 | 4 | #include "decomp.h" 5 | #include "islepathactor.h" 6 | 7 | // VTABLE: LEGO1 0x100d7ee0 8 | // SIZE 0x180 9 | class TowTrack : public IslePathActor { 10 | public: 11 | TowTrack(); 12 | 13 | // FUNCTION: LEGO1 0x1004c7c0 14 | inline virtual const char* ClassName() const override // vtable+0x0c 15 | { 16 | // GLOBAL: LEGO1 0x100f03b8 17 | return "TowTrack"; 18 | } 19 | 20 | // FUNCTION: LEGO1 0x1004c7d0 21 | inline virtual MxBool IsA(const char* name) const override // vtable+0x10 22 | { 23 | return !strcmp(name, TowTrack::ClassName()) || IslePathActor::IsA(name); 24 | } 25 | 26 | private: 27 | // TODO: TowTrack field types 28 | undefined m_unk154[4]; 29 | MxS32 m_unk164; 30 | MxS16 m_unk168; 31 | MxS16 m_unk16a; 32 | MxS16 m_unk16c; 33 | MxS16 m_unk16e; 34 | MxS32 m_unk170; 35 | MxS32 m_unk174; 36 | MxFloat m_unk178; 37 | undefined4 m_unk17c; 38 | }; 39 | 40 | #endif // TOWTRACK_H 41 | -------------------------------------------------------------------------------- /LEGO1/towtrackmissionstate.cpp: -------------------------------------------------------------------------------- 1 | #include "towtrackmissionstate.h" 2 | 3 | DECOMP_SIZE_ASSERT(TowTrackMissionState, 0x28) 4 | 5 | // STUB: LEGO1 0x1004dd30 6 | TowTrackMissionState::TowTrackMissionState() 7 | { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /LEGO1/viewmanager/viewmanager.cpp: -------------------------------------------------------------------------------- 1 | #include "viewmanager.h" 2 | 3 | // STUB: LEGO1 0x100a64d0 4 | void ViewManager::RemoveAll(ViewROI*) 5 | { 6 | // TODO 7 | } 8 | -------------------------------------------------------------------------------- /LEGO1/viewmanager/viewmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef VIEWMANAGER_H 2 | #define VIEWMANAGER_H 3 | 4 | class ViewROI; 5 | 6 | class ViewManager { 7 | public: 8 | __declspec(dllexport) void RemoveAll(ViewROI*); 9 | }; 10 | 11 | #endif // VIEWMANAGER_H 12 | -------------------------------------------------------------------------------- /LEGO1/viewmanager/viewroi.cpp: -------------------------------------------------------------------------------- 1 | #include "viewroi.h" 2 | 3 | #include "../decomp.h" 4 | 5 | DECOMP_SIZE_ASSERT(ViewROI, 0xe0) 6 | 7 | // FUNCTION: LEGO1 0x100a9eb0 8 | float ViewROI::IntrinsicImportance() const 9 | { 10 | return .5; 11 | } // for now 12 | 13 | // FUNCTION: LEGO1 0x100a9ec0 14 | const Tgl::Group* ViewROI::GetGeometry() const 15 | { 16 | return geometry; 17 | } 18 | 19 | // FUNCTION: LEGO1 0x100a9ed0 20 | Tgl::Group* ViewROI::GetGeometry() 21 | { 22 | return geometry; 23 | } 24 | 25 | // FUNCTION: LEGO1 0x100a9ee0 26 | void ViewROI::UpdateWorldData(const Matrix4Data& parent2world) 27 | { 28 | OrientableROI::UpdateWorldData(parent2world); 29 | if (geometry) { 30 | // Tgl::FloatMatrix4 tgl_mat; 31 | Matrix4 mat; 32 | SETMAT4(mat, m_local2world.GetMatrix()); 33 | Tgl::Result result = geometry->SetTransformation(mat); 34 | // assert(Tgl::Succeeded(result)); 35 | } 36 | } 37 | 38 | // SYNTHETIC: LEGO1 0x100aa250 39 | // ViewROI::`scalar deleting destructor' 40 | inline ViewROI::~ViewROI() 41 | { 42 | // SetLODList() will decrease refCount of LODList 43 | SetLODList(0); 44 | delete geometry; 45 | } 46 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /tools/isledecomp/.gitignore: -------------------------------------------------------------------------------- 1 | isledecomp.egg-info/ -------------------------------------------------------------------------------- /tools/isledecomp/isledecomp/__init__.py: -------------------------------------------------------------------------------- 1 | from .bin import * 2 | from .dir import * 3 | from .parser import * 4 | from .syminfo import * 5 | from .utils import * 6 | -------------------------------------------------------------------------------- /tools/isledecomp/isledecomp/parser/__init__.py: -------------------------------------------------------------------------------- 1 | from .parser import DecompParser 2 | -------------------------------------------------------------------------------- /tools/isledecomp/isledecomp/parser/node.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | 4 | @dataclass 5 | class ParserNode: 6 | line_number: int 7 | 8 | 9 | @dataclass 10 | class ParserAlert(ParserNode): 11 | code: int 12 | line: str 13 | 14 | 15 | @dataclass 16 | class ParserSymbol(ParserNode): 17 | module: str 18 | offset: int 19 | 20 | 21 | @dataclass 22 | class ParserFunction(ParserSymbol): 23 | name: str 24 | lookup_by_name: bool = False 25 | is_stub: bool = False 26 | is_synthetic: bool = False 27 | is_template: bool = False 28 | end_line: int = -1 29 | 30 | 31 | @dataclass 32 | class ParserVariable(ParserSymbol): 33 | name: str 34 | size: int = -1 35 | is_static: bool = False 36 | 37 | 38 | @dataclass 39 | class ParserVtable(ParserSymbol): 40 | class_name: str 41 | num_entries: int = -1 42 | -------------------------------------------------------------------------------- /tools/isledecomp/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | setup( 4 | name="isledecomp", 5 | version="0.1.0", 6 | description="Python tools for the isledecomp project", 7 | packages=find_packages(), 8 | tests_require=["pytest"], 9 | ) 10 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/isledecomp/tests/__init__.py -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/basic_class.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // A very simple class 5 | 6 | // VTABLE: TEST 0x1001002 7 | class TestClass { 8 | public: 9 | TestClass(); 10 | virtual ~TestClass() override; 11 | 12 | virtual MxResult Tickle() override; // vtable+08 13 | 14 | // FUNCTION: TEST 0x12345678 15 | inline const char* ClassName() const // vtable+0c 16 | { 17 | // 0xabcd1234 18 | return "TestClass"; 19 | } 20 | 21 | // FUNCTION: TEST 0xdeadbeef 22 | inline MxBool IsA(const char* name) const override // vtable+10 23 | { 24 | return !strcmp(name, TestClass::ClassName()); 25 | } 26 | 27 | private: 28 | int m_hello; 29 | int m_hiThere; 30 | }; 31 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/basic_file.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // A very simple well-formed code file 5 | 6 | // FUNCTION: TEST 0x1234 7 | void function01() 8 | { 9 | // TODO 10 | } 11 | 12 | // FUNCTION: TEST 0x2345 13 | void function02() 14 | { 15 | // TODO 16 | } 17 | 18 | // FUNCTION: TEST 0x3456 19 | void function03() 20 | { 21 | // TODO 22 | } 23 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/global_variables.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // Global variables inside and outside of functions 5 | 6 | // GLOBAL: TEST 0x1000 7 | const char *g_message = "test"; 8 | 9 | // FUNCTION: TEST 0x1234 10 | void function01() 11 | { 12 | // GLOBAL: TEST 0x5555 13 | static int g_hello = 123; 14 | } 15 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/inline.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // FUNCTION: TEST 0x10000001 5 | inline const char* OneLineWithComment() const { return "MxDSObject"; }; // hi there 6 | 7 | // FUNCTION: TEST 0x10000002 8 | inline const char* OneLine() const { return "MxDSObject"; }; 9 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/missing_offset.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | #include 5 | 6 | int no_offset_comment() 7 | { 8 | static int dummy = 123; 9 | return -1; 10 | } 11 | 12 | // FUNCTION: TEST 0xdeadbeef 13 | void regular_ole_function() 14 | { 15 | printf("hi there"); 16 | } 17 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/multiple_offsets.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // Handling multiple offset markers 5 | 6 | // FUNCTION: TEST 0x1234 7 | // FUNCTION: HELLO 0x5555 8 | void different_modules() 9 | { 10 | // TODO 11 | } 12 | 13 | // FUNCTION: TEST 0x2345 14 | // FUNCTION: TEST 0x1234 15 | void same_module() 16 | { 17 | // TODO 18 | } 19 | 20 | // FUNCTION: TEST 0x2002 21 | // FUNCTION: test 0x1001 22 | void same_case_insensitive() 23 | { 24 | // TODO 25 | } 26 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/oneline_function.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // FUNCTION: TEST 0x1234 5 | void short_function() { static char* msg = "oneliner"; } 6 | 7 | // FUNCTION: TEST 0x5555 8 | void function_after_one_liner() 9 | { 10 | // This function comes after the previous that is on a single line. 11 | // Do we report the offset for this one correctly? 12 | } 13 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/out_of_order.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // FUNCTION: TEST 0x1001 5 | void function_order01() 6 | { 7 | // TODO 8 | } 9 | 10 | // FUNCTION: TEST 0x1003 11 | void function_order03() 12 | { 13 | // TODO 14 | } 15 | 16 | // FUNCTION: TEST 0x1002 17 | void function_order02() 18 | { 19 | // TODO 20 | } 21 | -------------------------------------------------------------------------------- /tools/isledecomp/tests/samples/poorly_formatted.cpp: -------------------------------------------------------------------------------- 1 | // Sample for python unit tests 2 | // Not part of the decomp 3 | 4 | // While it's reasonable to expect a well-formed file (and clang-format 5 | // will make sure we get one), this will put the parser through its paces. 6 | 7 | // FUNCTION: TEST 0x1234 8 | void curly_with_spaces() 9 | { 10 | static char* msg = "hello"; 11 | } 12 | 13 | // FUNCTION: TEST 0x5555 14 | void weird_closing_curly() 15 | { 16 | int x = 123; } 17 | 18 | // FUNCTION: HELLO 0x5656 19 | void bad_indenting() { 20 | if (0) 21 | { 22 | int y = 5; 23 | }} 24 | -------------------------------------------------------------------------------- /tools/reccmp/cvdump.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/reccmp/cvdump.exe -------------------------------------------------------------------------------- /tools/reccmp/isle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/reccmp/isle.png -------------------------------------------------------------------------------- /tools/reccmp/lego1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/reccmp/lego1.png -------------------------------------------------------------------------------- /tools/requirements.txt: -------------------------------------------------------------------------------- 1 | tools/isledecomp 2 | capstone 3 | colorama 4 | isledecomp 5 | pystache 6 | -------------------------------------------------------------------------------- /tools/verexp/DUMPBIN.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/verexp/DUMPBIN.EXE -------------------------------------------------------------------------------- /tools/verexp/LINK.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/verexp/LINK.EXE -------------------------------------------------------------------------------- /tools/verexp/MSPDB41.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsmattkc/isle/a7b81539b1b32bc80561120f2b3de31ce47dd4ad/tools/verexp/MSPDB41.DLL --------------------------------------------------------------------------------