From 8069923651666fd1c7c89752899dac0e17134539 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 9 Mar 2024 15:07:52 -0500 Subject: [PATCH] Refactor files based on beta debug build (#645) * Rename LegoUnkSaveDataWriter -> LegoCharacterManager * Refactor mxomni into mxomni/mxmisc * Refactor legoomni into legoomni/misc * Resolve deps * Refactor atom * Refactor mxutil * Refactor mxio * Rename/relocate files * Fix format --- CMakeLists.txt | 99 +++++---- ISLE/isleapp.cpp | 2 + .../include/legoactioncontrolpresenter.h | 2 +- LEGO1/lego/legoomni/include/legoactor.h | 2 +- .../legoomni/include/legocachesoundlist.h | 3 +- .../{legocachesound.h => legocachsound.h} | 6 +- ...avedatawriter.h => legocharactermanager.h} | 12 +- LEGO1/lego/legoomni/include/legoomni.h | 40 +--- .../legoomni/include/legounknown100d6b4c.h | 2 +- .../include/{legoutil.h => legoutils.h} | 8 +- LEGO1/lego/legoomni/include/legoworld.h | 2 +- LEGO1/lego/legoomni/include/misc.h | 58 +++++ .../legoomni/include/mxtransitionmanager.h | 6 +- LEGO1/lego/legoomni/include/pizza.h | 4 - LEGO1/lego/legoomni/src/act1/act1state.cpp | 2 +- .../src/{hospital => actors}/ambulance.cpp | 0 .../legoomni/src/{isle => actors}/bike.cpp | 3 +- .../src/{isle => actors}/bumpbouy.cpp | 0 .../legoomni/src/{isle => actors}/doors.cpp | 0 .../src/{build => actors}/dunebuggy.cpp | 0 .../src/{build => actors}/helicopter.cpp | 3 +- .../src/{isle => actors}/isleactor.cpp | 0 .../src/{isle => actors}/islepathactor.cpp | 0 .../legoomni/src/{build => actors}/jetski.cpp | 0 .../src/{isle => actors}/jukeboxentity.cpp | 5 +- .../motocycle.cpp => actors/motorcycle.cpp} | 0 .../src/{pizzeria => actors}/pizza.cpp | 3 + .../src/{pizzeria => actors}/pizzeria.cpp | 0 .../src/{build => actors}/racecar.cpp | 2 +- .../legoomni/src/{isle => actors}/radio.cpp | 2 + .../src/{isle => actors}/skateboard.cpp | 2 +- .../src/{towtrack => actors}/towtrack.cpp | 0 .../{legocachesound.cpp => legocachsound.cpp} | 4 +- .../src/audio/legoloadcachesoundpresenter.cpp | 2 +- .../legoomni/src/audio/legosoundmanager.cpp | 1 + .../src/audio/legounknown100d5778.cpp | 11 +- .../src/audio/legounknown100d6b4c.cpp | 2 +- .../src/audio/mxbackgroundaudiomanager.cpp | 5 +- .../legoomni/src/build/buildingentity.cpp | 2 +- .../src/common/legoactioncontrolpresenter.cpp | 4 +- .../legoanimationmanager.cpp | 0 .../{video => common}/legoanimmmpresenter.cpp | 0 .../src/common/legobackgroundcolor.cpp | 4 +- ...atawriter.cpp => legocharactermanager.cpp} | 34 +-- .../src/common/legofullscreenmovie.cpp | 2 +- .../legoomni/src/common/legogamestate.cpp | 14 +- .../legoomni/src/common/legotextureinfo.cpp | 2 +- .../common/{legoutil.cpp => legoutils.cpp} | 5 +- .../legoomni/src/common/legovariables.cpp | 6 +- LEGO1/lego/legoomni/src/common/misc.cpp | 198 +++++++++++++++++ .../src/common/mxcompositemediapresenter.cpp | 3 +- .../mxcontrolpresenter.cpp | 3 +- .../{video => common}/mxtransitionmanager.cpp | 5 +- .../src/control/legocontrolmanager.cpp | 3 +- .../{video => control}/legometerpresenter.cpp | 2 +- .../src/{act2 => entity}/act2brick.cpp | 0 .../{act2 => entity}/act2policestation.cpp | 0 .../src/entity/legoactorpresenter.cpp | 2 +- .../src/entity/legocameracontroller.cpp | 2 +- LEGO1/lego/legoomni/src/entity/legoentity.cpp | 13 +- .../src/entity/legoentitypresenter.cpp | 2 +- .../legoomni/src/entity/legonavcontroller.cpp | 16 +- .../legoomni/src/entity/legopovcontroller.cpp | 1 + LEGO1/lego/legoomni/src/entity/legoworld.cpp | 5 +- .../src/entity/legoworldpresenter.cpp | 4 +- .../legoomni/src/input/legoinputmanager.cpp | 1 + LEGO1/lego/legoomni/src/isle/radiostate.cpp | 1 + LEGO1/lego/legoomni/src/main/legoomni.cpp | 209 +----------------- .../src/{entity => paths}/legoanimactor.cpp | 0 .../src/{entity => paths}/legopathactor.cpp | 0 .../legoomni/src/paths/legopathpresenter.cpp | 2 +- .../lego/legoomni/src/police/policestate.cpp | 3 +- .../src/{entity => race}/legorace.cpp | 1 + .../src/{entity => race}/legoraceactor.cpp | 0 .../src/{entity => race}/legoracecar.cpp | 0 .../legoomni/src/video/legoanimpresenter.cpp | 15 +- .../src/video/legolocomotionanimpresenter.cpp | 1 + .../legoomni/src/video/legomodelpresenter.cpp | 8 +- .../src/video/legopalettepresenter.cpp | 2 +- .../legoomni/src/video/legopartpresenter.cpp | 2 +- .../src/video/legotexturepresenter.cpp | 2 +- .../legoomni/src/video/legovideomanager.cpp | 2 + .../legoomni/src/{act3 => worlds}/act3.cpp | 0 .../{infocenter => worlds}/elevatorbottom.cpp | 3 +- .../src/{gasstation => worlds}/gasstation.cpp | 3 +- .../src/{isle => worlds}/historybook.cpp | 4 +- .../src/{hospital => worlds}/hospital.cpp | 2 +- .../src/{infocenter => worlds}/infocenter.cpp | 8 +- .../{infocenter => worlds}/infocenterdoor.cpp | 2 + .../legoomni/src/{isle => worlds}/isle.cpp | 4 +- .../legoomni/src/{isle => worlds}/jukebox.cpp | 3 +- .../src/{act2 => worlds}/legoact2.cpp | 0 .../src/{police => worlds}/police.cpp | 2 + .../registrationbook.cpp | 3 +- .../src/{infocenter => worlds}/score.cpp | 2 + LEGO1/lego/sources/misc/legocontainer.cpp | 2 +- .../include/{mxatomidcounter.h => mxatom.h} | 37 +++- LEGO1/omni/include/mxatomid.h | 37 ---- LEGO1/omni/include/mxbitmap.h | 2 +- LEGO1/omni/include/mxdsfile.h | 2 +- LEGO1/omni/include/mxdsobject.h | 2 +- LEGO1/omni/include/mxentity.h | 2 +- LEGO1/omni/include/{mxioinfo.h => mxio.h} | 6 +- LEGO1/omni/include/mxmisc.h | 33 +++ LEGO1/omni/include/mxobjectfactory.h | 2 +- LEGO1/omni/include/mxomni.h | 20 +- LEGO1/omni/include/mxpresenter.h | 1 - LEGO1/omni/include/mxsoundmanager.h | 2 +- LEGO1/omni/include/mxsoundpresenter.h | 1 - LEGO1/omni/include/mxstreamcontroller.h | 2 +- .../omni/include/{mxutil.h => mxutilities.h} | 7 +- LEGO1/omni/src/action/mxdsaction.cpp | 4 +- LEGO1/omni/src/action/mxdsmediaaction.cpp | 2 +- LEGO1/omni/src/action/mxdsobject.cpp | 2 +- LEGO1/omni/src/action/mxdsselectaction.cpp | 2 +- LEGO1/omni/src/action/mxdssound.cpp | 2 +- .../omni/src/audio/mxloopingmidipresenter.cpp | 2 +- LEGO1/omni/src/audio/mxmidipresenter.cpp | 1 + LEGO1/omni/src/audio/mxmusicmanager.cpp | 2 +- LEGO1/omni/src/audio/mxmusicpresenter.cpp | 2 +- LEGO1/omni/src/audio/mxsoundmanager.cpp | 1 + LEGO1/omni/src/audio/mxsoundpresenter.cpp | 1 + LEGO1/omni/src/audio/mxwavepresenter.cpp | 3 +- .../src/common/{mxatomid.cpp => mxatom.cpp} | 22 +- LEGO1/omni/src/common/mxatomidcounter.cpp | 20 -- .../omni/src/common/mxcompositepresenter.cpp | 1 + LEGO1/omni/src/common/mxmediapresenter.cpp | 1 + LEGO1/omni/src/common/mxmisc.cpp | 81 +++++++ LEGO1/omni/src/common/mxpresenter.cpp | 4 +- LEGO1/omni/src/common/mxticklemanager.cpp | 2 +- .../common/{mxutil.cpp => mxutilities.cpp} | 2 +- LEGO1/omni/src/event/mxeventmanager.cpp | 2 +- LEGO1/omni/src/event/mxeventpresenter.cpp | 2 +- LEGO1/omni/src/main/mxomni.cpp | 81 +------ .../omni/src/notify/mxnotificationmanager.cpp | 2 +- .../src/stream/mxdiskstreamcontroller.cpp | 1 + LEGO1/omni/src/stream/mxdsbuffer.cpp | 1 + .../src/stream/{mxioinfo.cpp => mxio.cpp} | 2 +- LEGO1/omni/src/stream/mxstreamchunk.cpp | 2 +- LEGO1/omni/src/stream/mxstreamcontroller.cpp | 4 +- LEGO1/omni/src/stream/mxstreamer.cpp | 2 +- LEGO1/omni/src/system/mxthread.cpp | 2 +- LEGO1/omni/src/video/mxbitmap.cpp | 2 +- LEGO1/omni/src/video/mxdisplaysurface.cpp | 4 +- LEGO1/omni/src/video/mxflcpresenter.cpp | 2 +- LEGO1/omni/src/video/mxpalette.cpp | 2 +- LEGO1/omni/src/video/mxsmkpresenter.cpp | 1 + LEGO1/omni/src/video/mxstillpresenter.cpp | 3 +- LEGO1/omni/src/video/mxvideomanager.cpp | 2 + LEGO1/omni/src/video/mxvideopresenter.cpp | 1 + 150 files changed, 734 insertions(+), 609 deletions(-) rename LEGO1/lego/legoomni/include/{legocachesound.h => legocachsound.h} (95%) rename LEGO1/lego/legoomni/include/{legounksavedatawriter.h => legocharactermanager.h} (96%) rename LEGO1/lego/legoomni/include/{legoutil.h => legoutils.h} (92%) create mode 100644 LEGO1/lego/legoomni/include/misc.h rename LEGO1/lego/legoomni/src/{hospital => actors}/ambulance.cpp (100%) rename LEGO1/lego/legoomni/src/{isle => actors}/bike.cpp (96%) rename LEGO1/lego/legoomni/src/{isle => actors}/bumpbouy.cpp (100%) rename LEGO1/lego/legoomni/src/{isle => actors}/doors.cpp (100%) rename LEGO1/lego/legoomni/src/{build => actors}/dunebuggy.cpp (100%) rename LEGO1/lego/legoomni/src/{build => actors}/helicopter.cpp (99%) rename LEGO1/lego/legoomni/src/{isle => actors}/isleactor.cpp (100%) rename LEGO1/lego/legoomni/src/{isle => actors}/islepathactor.cpp (100%) rename LEGO1/lego/legoomni/src/{build => actors}/jetski.cpp (100%) rename LEGO1/lego/legoomni/src/{isle => actors}/jukeboxentity.cpp (97%) rename LEGO1/lego/legoomni/src/{isle/motocycle.cpp => actors/motorcycle.cpp} (100%) rename LEGO1/lego/legoomni/src/{pizzeria => actors}/pizza.cpp (91%) rename LEGO1/lego/legoomni/src/{pizzeria => actors}/pizzeria.cpp (100%) rename LEGO1/lego/legoomni/src/{build => actors}/racecar.cpp (95%) rename LEGO1/lego/legoomni/src/{isle => actors}/radio.cpp (98%) rename LEGO1/lego/legoomni/src/{isle => actors}/skateboard.cpp (97%) rename LEGO1/lego/legoomni/src/{towtrack => actors}/towtrack.cpp (100%) rename LEGO1/lego/legoomni/src/audio/{legocachesound.cpp => legocachsound.cpp} (98%) rename LEGO1/lego/legoomni/src/{video => common}/legoanimationmanager.cpp (100%) rename LEGO1/lego/legoomni/src/{video => common}/legoanimmmpresenter.cpp (100%) rename LEGO1/lego/legoomni/src/common/{legounksavedatawriter.cpp => legocharactermanager.cpp} (71%) rename LEGO1/lego/legoomni/src/common/{legoutil.cpp => legoutils.cpp} (99%) create mode 100644 LEGO1/lego/legoomni/src/common/misc.cpp rename LEGO1/lego/legoomni/src/{control => common}/mxcontrolpresenter.cpp (99%) rename LEGO1/lego/legoomni/src/{video => common}/mxtransitionmanager.cpp (99%) rename LEGO1/lego/legoomni/src/{video => control}/legometerpresenter.cpp (99%) rename LEGO1/lego/legoomni/src/{act2 => entity}/act2brick.cpp (100%) rename LEGO1/lego/legoomni/src/{act2 => entity}/act2policestation.cpp (100%) rename LEGO1/lego/legoomni/src/{entity => paths}/legoanimactor.cpp (100%) rename LEGO1/lego/legoomni/src/{entity => paths}/legopathactor.cpp (100%) rename LEGO1/lego/legoomni/src/{entity => race}/legorace.cpp (98%) rename LEGO1/lego/legoomni/src/{entity => race}/legoraceactor.cpp (100%) rename LEGO1/lego/legoomni/src/{entity => race}/legoracecar.cpp (100%) rename LEGO1/lego/legoomni/src/{act3 => worlds}/act3.cpp (100%) rename LEGO1/lego/legoomni/src/{infocenter => worlds}/elevatorbottom.cpp (98%) rename LEGO1/lego/legoomni/src/{gasstation => worlds}/gasstation.cpp (98%) rename LEGO1/lego/legoomni/src/{isle => worlds}/historybook.cpp (98%) rename LEGO1/lego/legoomni/src/{hospital => worlds}/hospital.cpp (98%) rename LEGO1/lego/legoomni/src/{infocenter => worlds}/infocenter.cpp (99%) rename LEGO1/lego/legoomni/src/{infocenter => worlds}/infocenterdoor.cpp (99%) rename LEGO1/lego/legoomni/src/{isle => worlds}/isle.cpp (98%) rename LEGO1/lego/legoomni/src/{isle => worlds}/jukebox.cpp (99%) rename LEGO1/lego/legoomni/src/{act2 => worlds}/legoact2.cpp (100%) rename LEGO1/lego/legoomni/src/{police => worlds}/police.cpp (99%) rename LEGO1/lego/legoomni/src/{infocenter => worlds}/registrationbook.cpp (98%) rename LEGO1/lego/legoomni/src/{infocenter => worlds}/score.cpp (99%) rename LEGO1/omni/include/{mxatomidcounter.h => mxatom.h} (82%) delete mode 100644 LEGO1/omni/include/mxatomid.h rename LEGO1/omni/include/{mxioinfo.h => mxio.h} (91%) create mode 100644 LEGO1/omni/include/mxmisc.h rename LEGO1/omni/include/{mxutil.h => mxutilities.h} (96%) rename LEGO1/omni/src/common/{mxatomid.cpp => mxatom.cpp} (85%) delete mode 100644 LEGO1/omni/src/common/mxatomidcounter.cpp create mode 100644 LEGO1/omni/src/common/mxmisc.cpp rename LEGO1/omni/src/common/{mxutil.cpp => mxutilities.cpp} (99%) rename LEGO1/omni/src/stream/{mxioinfo.cpp => mxio.cpp} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d6890a7..7fc1d7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,18 +211,18 @@ add_library(omni STATIC LEGO1/omni/src/audio/mxsoundmanager.cpp LEGO1/omni/src/audio/mxsoundpresenter.cpp LEGO1/omni/src/audio/mxwavepresenter.cpp - LEGO1/omni/src/common/mxatomidcounter.cpp - LEGO1/omni/src/common/mxatomid.cpp + LEGO1/omni/src/common/mxatom.cpp LEGO1/omni/src/common/mxcompositepresenter.cpp LEGO1/omni/src/common/mxcore.cpp LEGO1/omni/src/common/mxmediamanager.cpp LEGO1/omni/src/common/mxmediapresenter.cpp + LEGO1/omni/src/common/mxmisc.cpp LEGO1/omni/src/common/mxobjectfactory.cpp LEGO1/omni/src/common/mxpresenter.cpp LEGO1/omni/src/common/mxstring.cpp LEGO1/omni/src/common/mxticklemanager.cpp LEGO1/omni/src/common/mxtimer.cpp - LEGO1/omni/src/common/mxutil.cpp + LEGO1/omni/src/common/mxutilities.cpp LEGO1/omni/src/common/mxvariable.cpp LEGO1/omni/src/common/mxvariabletable.cpp LEGO1/omni/src/entity/mxentity.cpp @@ -241,7 +241,7 @@ add_library(omni STATIC LEGO1/omni/src/stream/mxdsfile.cpp LEGO1/omni/src/stream/mxdssource.cpp LEGO1/omni/src/stream/mxdssubscriber.cpp - LEGO1/omni/src/stream/mxioinfo.cpp + LEGO1/omni/src/stream/mxio.cpp LEGO1/omni/src/stream/mxramstreamcontroller.cpp LEGO1/omni/src/stream/mxramstreamprovider.cpp LEGO1/omni/src/stream/mxstreamchunk.cpp @@ -279,47 +279,62 @@ target_link_libraries(omni PRIVATE dsound winmm Smacker::Smacker) add_library(lego1 SHARED LEGO1/define.cpp LEGO1/lego/legoomni/src/act1/act1state.cpp - LEGO1/lego/legoomni/src/act2/act2brick.cpp - LEGO1/lego/legoomni/src/act2/act2policestation.cpp - LEGO1/lego/legoomni/src/act2/legoact2.cpp LEGO1/lego/legoomni/src/act2/legoact2state.cpp - LEGO1/lego/legoomni/src/act3/act3.cpp LEGO1/lego/legoomni/src/act3/act3shark.cpp LEGO1/lego/legoomni/src/act3/act3state.cpp + LEGO1/lego/legoomni/src/actors/ambulance.cpp + LEGO1/lego/legoomni/src/actors/bike.cpp + LEGO1/lego/legoomni/src/actors/bumpbouy.cpp + LEGO1/lego/legoomni/src/actors/doors.cpp + LEGO1/lego/legoomni/src/actors/dunebuggy.cpp + LEGO1/lego/legoomni/src/actors/helicopter.cpp + LEGO1/lego/legoomni/src/actors/isleactor.cpp + LEGO1/lego/legoomni/src/actors/islepathactor.cpp + LEGO1/lego/legoomni/src/actors/jetski.cpp + LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp + LEGO1/lego/legoomni/src/actors/motorcycle.cpp + LEGO1/lego/legoomni/src/actors/pizza.cpp + LEGO1/lego/legoomni/src/actors/pizzeria.cpp + LEGO1/lego/legoomni/src/actors/racecar.cpp + LEGO1/lego/legoomni/src/actors/radio.cpp + LEGO1/lego/legoomni/src/actors/skateboard.cpp + LEGO1/lego/legoomni/src/actors/towtrack.cpp LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp - LEGO1/lego/legoomni/src/audio/legocachesound.cpp + LEGO1/lego/legoomni/src/audio/legocachsound.cpp LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp LEGO1/lego/legoomni/src/build/buildingentity.cpp - LEGO1/lego/legoomni/src/build/dunebuggy.cpp - LEGO1/lego/legoomni/src/build/helicopter.cpp LEGO1/lego/legoomni/src/build/helicopterstate.cpp - LEGO1/lego/legoomni/src/build/jetski.cpp LEGO1/lego/legoomni/src/build/legobuildingmanager.cpp LEGO1/lego/legoomni/src/build/legocarbuild.cpp LEGO1/lego/legoomni/src/build/legovehiclebuildstate.cpp - LEGO1/lego/legoomni/src/build/racecar.cpp LEGO1/lego/legoomni/src/common/animstate.cpp LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp + LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp + LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp + LEGO1/lego/legoomni/src/common/legocharactermanager.cpp LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp LEGO1/lego/legoomni/src/common/legogamestate.cpp LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp LEGO1/lego/legoomni/src/common/legoplantmanager.cpp LEGO1/lego/legoomni/src/common/legostate.cpp LEGO1/lego/legoomni/src/common/legotextureinfo.cpp - LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp - LEGO1/lego/legoomni/src/common/legoutil.cpp + LEGO1/lego/legoomni/src/common/legoutils.cpp LEGO1/lego/legoomni/src/common/legovariables.cpp + LEGO1/lego/legoomni/src/common/misc.cpp LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp + LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp + LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp - LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp + LEGO1/lego/legoomni/src/control/legometerpresenter.cpp + LEGO1/lego/legoomni/src/entity/act2brick.cpp + LEGO1/lego/legoomni/src/entity/act2policestation.cpp LEGO1/lego/legoomni/src/entity/legoactor.cpp LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp - LEGO1/lego/legoomni/src/entity/legoanimactor.cpp LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -327,79 +342,65 @@ add_library(lego1 SHARED LEGO1/lego/legoomni/src/entity/legojetski.cpp LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp - LEGO1/lego/legoomni/src/entity/legopathactor.cpp LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp - LEGO1/lego/legoomni/src/entity/legorace.cpp - LEGO1/lego/legoomni/src/entity/legoraceactor.cpp - LEGO1/lego/legoomni/src/entity/legoracecar.cpp LEGO1/lego/legoomni/src/entity/legoworld.cpp LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp - LEGO1/lego/legoomni/src/gasstation/gasstation.cpp LEGO1/lego/legoomni/src/gasstation/gasstationentity.cpp LEGO1/lego/legoomni/src/gasstation/gasstationstate.cpp - LEGO1/lego/legoomni/src/hospital/ambulance.cpp LEGO1/lego/legoomni/src/hospital/ambulancemissionstate.cpp - LEGO1/lego/legoomni/src/hospital/hospital.cpp LEGO1/lego/legoomni/src/hospital/hospitalentity.cpp LEGO1/lego/legoomni/src/hospital/hospitalstate.cpp - LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp - LEGO1/lego/legoomni/src/infocenter/infocenter.cpp - LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp LEGO1/lego/legoomni/src/infocenter/infocenterentity.cpp LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp - LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp - LEGO1/lego/legoomni/src/infocenter/score.cpp LEGO1/lego/legoomni/src/infocenter/scorestate.cpp LEGO1/lego/legoomni/src/input/legoinputmanager.cpp LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp - LEGO1/lego/legoomni/src/isle/bike.cpp - LEGO1/lego/legoomni/src/isle/bumpbouy.cpp - LEGO1/lego/legoomni/src/isle/doors.cpp - LEGO1/lego/legoomni/src/isle/historybook.cpp - LEGO1/lego/legoomni/src/isle/isleactor.cpp - LEGO1/lego/legoomni/src/isle/isle.cpp - LEGO1/lego/legoomni/src/isle/islepathactor.cpp - LEGO1/lego/legoomni/src/isle/jukebox.cpp - LEGO1/lego/legoomni/src/isle/jukeboxentity.cpp LEGO1/lego/legoomni/src/isle/jukeboxstate.cpp - LEGO1/lego/legoomni/src/isle/motocycle.cpp - LEGO1/lego/legoomni/src/isle/radio.cpp LEGO1/lego/legoomni/src/isle/radiostate.cpp - LEGO1/lego/legoomni/src/isle/skateboard.cpp LEGO1/lego/legoomni/src/main/legoomni.cpp LEGO1/lego/legoomni/src/notify/legoeventnotificationparam.cpp + LEGO1/lego/legoomni/src/paths/legoanimactor.cpp + LEGO1/lego/legoomni/src/paths/legopathactor.cpp LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp - LEGO1/lego/legoomni/src/pizzeria/pizza.cpp LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp - LEGO1/lego/legoomni/src/pizzeria/pizzeria.cpp LEGO1/lego/legoomni/src/pizzeria/pizzeriastate.cpp - LEGO1/lego/legoomni/src/police/police.cpp LEGO1/lego/legoomni/src/police/policeentity.cpp LEGO1/lego/legoomni/src/police/policestate.cpp LEGO1/lego/legoomni/src/race/carrace.cpp LEGO1/lego/legoomni/src/race/jetskirace.cpp + LEGO1/lego/legoomni/src/race/legorace.cpp + LEGO1/lego/legoomni/src/race/legoraceactor.cpp + LEGO1/lego/legoomni/src/race/legoracecar.cpp LEGO1/lego/legoomni/src/race/racestandsentity.cpp LEGO1/lego/legoomni/src/race/racestate.cpp - LEGO1/lego/legoomni/src/towtrack/towtrack.cpp LEGO1/lego/legoomni/src/towtrack/towtrackmissionstate.cpp LEGO1/lego/legoomni/src/unknown/legounknown100d7c88.cpp - LEGO1/lego/legoomni/src/video/legoanimationmanager.cpp - LEGO1/lego/legoomni/src/video/legoanimmmpresenter.cpp LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp LEGO1/lego/legoomni/src/video/legocarbuildanimpresenter.cpp LEGO1/lego/legoomni/src/video/legoflctexturepresenter.cpp LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp LEGO1/lego/legoomni/src/video/legoloopinganimpresenter.cpp - LEGO1/lego/legoomni/src/video/legometerpresenter.cpp LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp LEGO1/lego/legoomni/src/video/legopartpresenter.cpp LEGO1/lego/legoomni/src/video/legophonemepresenter.cpp LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp LEGO1/lego/legoomni/src/video/legovideomanager.cpp - LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp + LEGO1/lego/legoomni/src/worlds/act3.cpp + LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp + LEGO1/lego/legoomni/src/worlds/gasstation.cpp + LEGO1/lego/legoomni/src/worlds/historybook.cpp + LEGO1/lego/legoomni/src/worlds/hospital.cpp + LEGO1/lego/legoomni/src/worlds/infocenter.cpp + LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp + LEGO1/lego/legoomni/src/worlds/isle.cpp + LEGO1/lego/legoomni/src/worlds/jukebox.cpp + LEGO1/lego/legoomni/src/worlds/legoact2.cpp + LEGO1/lego/legoomni/src/worlds/police.cpp + LEGO1/lego/legoomni/src/worlds/registrationbook.cpp + LEGO1/lego/legoomni/src/worlds/score.cpp LEGO1/main.cpp LEGO1/modeldb/modeldb.cpp ) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 95bc6f62..44420792 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -10,8 +10,10 @@ #include "legopartpresenter.h" #include "legovideomanager.h" #include "legoworldpresenter.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" #include "mxdsaction.h" +#include "mxmisc.h" #include "mxomnicreateflags.h" #include "mxomnicreateparam.h" #include "mxstreamer.h" diff --git a/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h b/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h index 3dcbfecb..7bc6b005 100644 --- a/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h +++ b/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h @@ -2,7 +2,7 @@ #define LEGOACTIONCONTROLPRESENTER_H #include "decomp.h" -#include "legoutil.h" +#include "legoutils.h" #include "mxmediapresenter.h" // VTABLE: LEGO1 0x100d5118 diff --git a/LEGO1/lego/legoomni/include/legoactor.h b/LEGO1/lego/legoomni/include/legoactor.h index bd24137f..8cccbd71 100644 --- a/LEGO1/lego/legoomni/include/legoactor.h +++ b/LEGO1/lego/legoomni/include/legoactor.h @@ -2,7 +2,7 @@ #define LEGOACTOR_H #include "decomp.h" -#include "legocachesound.h" +#include "legocachsound.h" #include "legoentity.h" // VTABLE: LEGO1 0x100d6d68 diff --git a/LEGO1/lego/legoomni/include/legocachesoundlist.h b/LEGO1/lego/legoomni/include/legocachesoundlist.h index 4960f6b3..e480c34b 100644 --- a/LEGO1/lego/legoomni/include/legocachesoundlist.h +++ b/LEGO1/lego/legoomni/include/legocachesoundlist.h @@ -1,11 +1,10 @@ #ifndef LEGOCACHESOUNDLIST_H #define LEGOCACHESOUNDLIST_H +#include "legocachsound.h" #include "mxlist.h" #include "mxtypes.h" -class LegoCacheSound; - // VTABLE: LEGO1 0x100d63b0 // class MxCollection diff --git a/LEGO1/lego/legoomni/include/legocachesound.h b/LEGO1/lego/legoomni/include/legocachsound.h similarity index 95% rename from LEGO1/lego/legoomni/include/legocachesound.h rename to LEGO1/lego/legoomni/include/legocachsound.h index 5843f5bc..941f6cdc 100644 --- a/LEGO1/lego/legoomni/include/legocachesound.h +++ b/LEGO1/lego/legoomni/include/legocachsound.h @@ -1,5 +1,5 @@ -#ifndef LEGOCACHESOUND_H -#define LEGOCACHESOUND_H +#ifndef LEGOCACHSOUND_H +#define LEGOCACHSOUND_H #include "decomp.h" #include "legounknown100d5778.h" @@ -60,4 +60,4 @@ class LegoCacheSound : public MxCore { undefined m_unk0x84; // 0x84 }; -#endif // LEGOCACHESOUND_H +#endif // LEGOCACHSOUND_H diff --git a/LEGO1/lego/legoomni/include/legounksavedatawriter.h b/LEGO1/lego/legoomni/include/legocharactermanager.h similarity index 96% rename from LEGO1/lego/legoomni/include/legounksavedatawriter.h rename to LEGO1/lego/legoomni/include/legocharactermanager.h index 0a9167e4..ec18152a 100644 --- a/LEGO1/lego/legoomni/include/legounksavedatawriter.h +++ b/LEGO1/lego/legoomni/include/legocharactermanager.h @@ -1,5 +1,5 @@ -#ifndef LEGOUNKSAVEDATAWRITER_H -#define LEGOUNKSAVEDATAWRITER_H +#ifndef LEGOCHARACTERMANAGER_H +#define LEGOCHARACTERMANAGER_H #include "decomp.h" #include "legovariables.h" @@ -51,9 +51,9 @@ struct LegoSaveDataEntry3 { }; // SIZE 0x08 -class LegoUnkSaveDataWriter { +class LegoCharacterManager { public: - LegoUnkSaveDataWriter(); + LegoCharacterManager(); MxResult WriteSaveData3(LegoStorage* p_storage); MxResult ReadSaveData3(LegoStorage* p_storage); @@ -80,7 +80,6 @@ class LegoUnkSaveDataWriter { }; // clang-format off - // FUNCTION: LEGO1 0x10082b90 // _Tree,map >::_Kfn,LegoUnkSaveDataMapComparator,allocator >::~_Tree,map >::_Kfn,LegoUnkSaveDataMapComparator,allocator > @@ -98,7 +97,6 @@ class LegoUnkSaveDataWriter { // GLOBAL: LEGO1 0x100fc508 // _Tree,map >::_Kfn,LegoUnkSaveDataMapComparator,allocator >::_Nil - // clang-format on -#endif // LEGOUNKSAVEDATAWRITER_H +#endif // LEGOCHARACTERMANAGER_H diff --git a/LEGO1/lego/legoomni/include/legoomni.h b/LEGO1/lego/legoomni/include/legoomni.h index e0b314f9..5d1df4fa 100644 --- a/LEGO1/lego/legoomni/include/legoomni.h +++ b/LEGO1/lego/legoomni/include/legoomni.h @@ -5,12 +5,11 @@ #include "mxdsaction.h" #include "mxomni.h" -class LegoTextureContainer; class Isle; class IslePathActor; class LegoAnimationManager; class LegoBuildingManager; -class LegoControlManager; +class LegoCharacterManager; class LegoEntity; class LegoGameState; class LegoInputManager; @@ -19,16 +18,14 @@ class LegoPathBoundary; class LegoPlantManager; class LegoROI; class LegoSoundManager; -class LegoUnkSaveDataWriter; +class LegoTextureContainer; class LegoVideoManager; class LegoWorld; class LegoWorldList; class MxAtomId; class MxBackgroundAudioManager; -class MxDSFile; class MxTransitionManager; class ViewLODListManager; -class ViewManager; extern MxAtomId* g_copterScript; extern MxAtomId* g_dunecarScript; @@ -224,7 +221,7 @@ class LegoOmni : public MxOmni { MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; } MxTransitionManager* GetTransitionManager() { return m_transitionManager; } MxDSAction& GetCurrentAction() { return m_action; } - LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; } + LegoCharacterManager* GetCharacterManager() { return m_characterManager; } LegoWorldList* GetWorldList() { return m_worldList; } inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; } @@ -247,7 +244,7 @@ class LegoOmni : public MxOmni { MxBool m_exit; // 0x80 LegoNavController* m_navController; // 0x84 IslePathActor* m_currentActor; // 0x88 - LegoUnkSaveDataWriter* m_saveDataWriter; // 0x8c + LegoCharacterManager* m_characterManager; // 0x8c LegoPlantManager* m_plantManager; // 0x90 LegoAnimationManager* m_animationManager; // 0x94 LegoBuildingManager* m_buildingManager; // 0x98 @@ -258,39 +255,12 @@ class LegoOmni : public MxOmni { MxBool m_unk0x13c; // 0x13c }; -MxBackgroundAudioManager* BackgroundAudioManager(); -LegoGameState* GameState(); const char* GetNoCD_SourceName(); -LegoInputManager* InputManager(); -LegoOmni* Lego(); + LegoEntity* PickEntity(MxLong, MxLong); LegoROI* PickROI(MxLong, MxLong); -LegoSoundManager* SoundManager(); -MxTransitionManager* TransitionManager(); -LegoVideoManager* VideoManager(); -LegoAnimationManager* AnimationManager(); -LegoNavController* NavController(); -LegoBuildingManager* BuildingManager(); -LegoControlManager* ControlManager(); -IslePathActor* CurrentActor(); -ViewManager* GetViewManager(); -LegoPlantManager* PlantManager(); -LegoWorld* CurrentWorld(); -LegoUnkSaveDataWriter* UnkSaveDataWriter(); -LegoTextureContainer* TextureContainer(); -ViewLODListManager* GetViewLODListManager(); -void FUN_10015820(MxBool p_disable, MxU16 p_flags); -void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c); -void SetCurrentActor(IslePathActor* p_currentActor); -LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid); -LegoROI* FindROI(const char* p_name); -MxDSAction& GetCurrentAction(); -void PlayMusic(MxU32 p_index); -void SetIsWorldActive(MxBool p_isWorldActive); -void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last); void CreateScripts(); void DestroyScripts(); -void SetCurrentWorld(LegoWorld* p_world); #endif // LEGOOMNI_H diff --git a/LEGO1/lego/legoomni/include/legounknown100d6b4c.h b/LEGO1/lego/legoomni/include/legounknown100d6b4c.h index eef443a9..139aae96 100644 --- a/LEGO1/lego/legoomni/include/legounknown100d6b4c.h +++ b/LEGO1/lego/legoomni/include/legounknown100d6b4c.h @@ -2,7 +2,7 @@ #define LEGOUNKNOWN100D6B4C_H #include "decomp.h" -#include "legocachesound.h" +#include "legocachsound.h" #include "mxstl/stlcompat.h" #include "mxtypes.h" diff --git a/LEGO1/lego/legoomni/include/legoutil.h b/LEGO1/lego/legoomni/include/legoutils.h similarity index 92% rename from LEGO1/lego/legoomni/include/legoutil.h rename to LEGO1/lego/legoomni/include/legoutils.h index 5e4a57f5..d2c90bfb 100644 --- a/LEGO1/lego/legoomni/include/legoutil.h +++ b/LEGO1/lego/legoomni/include/legoutils.h @@ -1,12 +1,12 @@ -#ifndef LEGOUTIL_H -#define LEGOUTIL_H +#ifndef LEGOUTILS_H +#define LEGOUTILS_H #include "extra.h" #include "misc/legostorage.h" #include "misc/legotexture.h" #include "mxstring.h" #include "mxtypes.h" -#include "mxutil.h" +#include "mxutilities.h" #include @@ -33,4 +33,4 @@ void WriteNamedTexture(LegoFile* p_file, LegoNamedTexture* p_texture); // SYNTHETIC: LEGO1 0x10034b40 // LegoTexture::`scalar deleting destructor' -#endif // LEGOUTIL_H +#endif // LEGOUTILS_H diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 2fa46dd5..526a28d3 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -1,8 +1,8 @@ #ifndef LEGOWORLD_H #define LEGOWORLD_H -#include "legocachesound.h" #include "legocachesoundlist.h" +#include "legocachsound.h" #include "legocameracontroller.h" #include "legoentity.h" #include "legoentitylist.h" diff --git a/LEGO1/lego/legoomni/include/misc.h b/LEGO1/lego/legoomni/include/misc.h new file mode 100644 index 00000000..aa86432f --- /dev/null +++ b/LEGO1/lego/legoomni/include/misc.h @@ -0,0 +1,58 @@ +#ifndef MISC_H +#define MISC_H + +#include "decomp.h" +#include "mxtypes.h" + +class IslePathActor; +class LegoAnimationManager; +class LegoBuildingManager; +class LegoCharacterManager; +class LegoControlManager; +class LegoGameState; +class LegoInputManager; +class LegoNavController; +class LegoOmni; +class LegoPlantManager; +class LegoROI; +class LegoSoundManager; +class LegoTextureContainer; +class LegoVideoManager; +class LegoWorld; +class MxAtomId; +class MxBackgroundAudioManager; +class MxDSAction; +class MxTransitionManager; +class ViewLODListManager; +class ViewManager; + +LegoOmni* Lego(); +LegoInputManager* InputManager(); +LegoSoundManager* SoundManager(); +MxBackgroundAudioManager* BackgroundAudioManager(); +LegoGameState* GameState(); +MxTransitionManager* TransitionManager(); +LegoVideoManager* VideoManager(); +LegoAnimationManager* AnimationManager(); +LegoNavController* NavController(); +LegoBuildingManager* BuildingManager(); +LegoControlManager* ControlManager(); +IslePathActor* CurrentActor(); +ViewManager* GetViewManager(); +LegoPlantManager* PlantManager(); +LegoWorld* CurrentWorld(); +LegoCharacterManager* CharacterManager(); +LegoTextureContainer* TextureContainer(); +ViewLODListManager* GetViewLODListManager(); +LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid); +LegoROI* FindROI(const char* p_name); +MxDSAction& GetCurrentAction(); +void PlayMusic(MxU32 p_index); +void SetIsWorldActive(MxBool p_isWorldActive); +void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last); +void SetCurrentWorld(LegoWorld* p_world); +void FUN_10015820(MxBool p_disable, MxU16 p_flags); +void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c); +void SetCurrentActor(IslePathActor* p_currentActor); + +#endif // MISC_H diff --git a/LEGO1/lego/legoomni/include/mxtransitionmanager.h b/LEGO1/lego/legoomni/include/mxtransitionmanager.h index 89f0d73b..31fcdb7e 100644 --- a/LEGO1/lego/legoomni/include/mxtransitionmanager.h +++ b/LEGO1/lego/legoomni/include/mxtransitionmanager.h @@ -1,13 +1,15 @@ #ifndef MXTRANSITIONMANAGER_H #define MXTRANSITIONMANAGER_H -#include "legoomni.h" +#include "decomp.h" #include "mxcore.h" -#include "mxvideopresenter.h" #include +class MxVideoPresenter; + // VTABLE: LEGO1 0x100d7ea0 +// SIZE 0x900 class MxTransitionManager : public MxCore { public: MxTransitionManager(); diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index 5ba1da94..1b67bc6d 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -3,10 +3,6 @@ #include "decomp.h" #include "isleactor.h" -#include "mxcore.h" -#include "mxomni.h" -#include "mxticklemanager.h" -#include "mxtypes.h" // VTABLE: LEGO1 0x100d7380 // SIZE 0x9c diff --git a/LEGO1/lego/legoomni/src/act1/act1state.cpp b/LEGO1/lego/legoomni/src/act1/act1state.cpp index 19ef3100..4d422619 100644 --- a/LEGO1/lego/legoomni/src/act1/act1state.cpp +++ b/LEGO1/lego/legoomni/src/act1/act1state.cpp @@ -1,6 +1,6 @@ #include "act1state.h" -#include "legoutil.h" +#include "legoutils.h" DECOMP_SIZE_ASSERT(Act1State, 0x26c) DECOMP_SIZE_ASSERT(Act1State::NamedPlane, 0x4c) diff --git a/LEGO1/lego/legoomni/src/hospital/ambulance.cpp b/LEGO1/lego/legoomni/src/actors/ambulance.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/hospital/ambulance.cpp rename to LEGO1/lego/legoomni/src/actors/ambulance.cpp diff --git a/LEGO1/lego/legoomni/src/isle/bike.cpp b/LEGO1/lego/legoomni/src/actors/bike.cpp similarity index 96% rename from LEGO1/lego/legoomni/src/isle/bike.cpp rename to LEGO1/lego/legoomni/src/actors/bike.cpp index 484cef9b..f9921309 100644 --- a/LEGO1/lego/legoomni/src/isle/bike.cpp +++ b/LEGO1/lego/legoomni/src/actors/bike.cpp @@ -3,8 +3,9 @@ #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" #include "legoworld.h" +#include "misc.h" DECOMP_SIZE_ASSERT(Bike, 0x164); diff --git a/LEGO1/lego/legoomni/src/isle/bumpbouy.cpp b/LEGO1/lego/legoomni/src/actors/bumpbouy.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/isle/bumpbouy.cpp rename to LEGO1/lego/legoomni/src/actors/bumpbouy.cpp diff --git a/LEGO1/lego/legoomni/src/isle/doors.cpp b/LEGO1/lego/legoomni/src/actors/doors.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/isle/doors.cpp rename to LEGO1/lego/legoomni/src/actors/doors.cpp diff --git a/LEGO1/lego/legoomni/src/build/dunebuggy.cpp b/LEGO1/lego/legoomni/src/actors/dunebuggy.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/build/dunebuggy.cpp rename to LEGO1/lego/legoomni/src/actors/dunebuggy.cpp diff --git a/LEGO1/lego/legoomni/src/build/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/build/helicopter.cpp rename to LEGO1/lego/legoomni/src/actors/helicopter.cpp index 2432f1c3..00ac8649 100644 --- a/LEGO1/lego/legoomni/src/build/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -8,8 +8,9 @@ #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" #include "legoworld.h" +#include "misc.h" #include "mxtransitionmanager.h" DECOMP_SIZE_ASSERT(Helicopter, 0x230) diff --git a/LEGO1/lego/legoomni/src/isle/isleactor.cpp b/LEGO1/lego/legoomni/src/actors/isleactor.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/isle/isleactor.cpp rename to LEGO1/lego/legoomni/src/actors/isleactor.cpp diff --git a/LEGO1/lego/legoomni/src/isle/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/isle/islepathactor.cpp rename to LEGO1/lego/legoomni/src/actors/islepathactor.cpp diff --git a/LEGO1/lego/legoomni/src/build/jetski.cpp b/LEGO1/lego/legoomni/src/actors/jetski.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/build/jetski.cpp rename to LEGO1/lego/legoomni/src/actors/jetski.cpp diff --git a/LEGO1/lego/legoomni/src/isle/jukeboxentity.cpp b/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp similarity index 97% rename from LEGO1/lego/legoomni/src/isle/jukeboxentity.cpp rename to LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp index 1fed8533..f7d4ab21 100644 --- a/LEGO1/lego/legoomni/src/isle/jukeboxentity.cpp +++ b/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp @@ -4,8 +4,11 @@ #include "islepathactor.h" #include "jukeboxstate.h" #include "legogamestate.h" -#include "legoutil.h" +#include "legoomni.h" +#include "legoutils.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtransitionmanager.h" diff --git a/LEGO1/lego/legoomni/src/isle/motocycle.cpp b/LEGO1/lego/legoomni/src/actors/motorcycle.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/isle/motocycle.cpp rename to LEGO1/lego/legoomni/src/actors/motorcycle.cpp diff --git a/LEGO1/lego/legoomni/src/pizzeria/pizza.cpp b/LEGO1/lego/legoomni/src/actors/pizza.cpp similarity index 91% rename from LEGO1/lego/legoomni/src/pizzeria/pizza.cpp rename to LEGO1/lego/legoomni/src/actors/pizza.cpp index 8b7efe78..1e36a7c4 100644 --- a/LEGO1/lego/legoomni/src/pizzeria/pizza.cpp +++ b/LEGO1/lego/legoomni/src/actors/pizza.cpp @@ -1,5 +1,8 @@ #include "pizza.h" +#include "mxmisc.h" +#include "mxticklemanager.h" + DECOMP_SIZE_ASSERT(Pizza, 0x9c); // FUNCTION: LEGO1 0x10037ef0 diff --git a/LEGO1/lego/legoomni/src/pizzeria/pizzeria.cpp b/LEGO1/lego/legoomni/src/actors/pizzeria.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/pizzeria/pizzeria.cpp rename to LEGO1/lego/legoomni/src/actors/pizzeria.cpp diff --git a/LEGO1/lego/legoomni/src/build/racecar.cpp b/LEGO1/lego/legoomni/src/actors/racecar.cpp similarity index 95% rename from LEGO1/lego/legoomni/src/build/racecar.cpp rename to LEGO1/lego/legoomni/src/actors/racecar.cpp index a057b8a4..f60beff6 100644 --- a/LEGO1/lego/legoomni/src/build/racecar.cpp +++ b/LEGO1/lego/legoomni/src/actors/racecar.cpp @@ -1,7 +1,7 @@ #include "racecar.h" #include "legocontrolmanager.h" -#include "legoomni.h" +#include "misc.h" DECOMP_SIZE_ASSERT(RaceCar, 0x164); diff --git a/LEGO1/lego/legoomni/src/isle/radio.cpp b/LEGO1/lego/legoomni/src/actors/radio.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/isle/radio.cpp rename to LEGO1/lego/legoomni/src/actors/radio.cpp index c0a4e44d..96d91b33 100644 --- a/LEGO1/lego/legoomni/src/isle/radio.cpp +++ b/LEGO1/lego/legoomni/src/actors/radio.cpp @@ -3,8 +3,10 @@ #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoomni.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" #include "mxcontrolpresenter.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" DECOMP_SIZE_ASSERT(Radio, 0x10); diff --git a/LEGO1/lego/legoomni/src/isle/skateboard.cpp b/LEGO1/lego/legoomni/src/actors/skateboard.cpp similarity index 97% rename from LEGO1/lego/legoomni/src/isle/skateboard.cpp rename to LEGO1/lego/legoomni/src/actors/skateboard.cpp index 22998f85..759ce4b6 100644 --- a/LEGO1/lego/legoomni/src/isle/skateboard.cpp +++ b/LEGO1/lego/legoomni/src/actors/skateboard.cpp @@ -1,8 +1,8 @@ #include "skateboard.h" #include "decomp.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" DECOMP_SIZE_ASSERT(SkateBoard, 0x168); diff --git a/LEGO1/lego/legoomni/src/towtrack/towtrack.cpp b/LEGO1/lego/legoomni/src/actors/towtrack.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/towtrack/towtrack.cpp rename to LEGO1/lego/legoomni/src/actors/towtrack.cpp diff --git a/LEGO1/lego/legoomni/src/audio/legocachesound.cpp b/LEGO1/lego/legoomni/src/audio/legocachsound.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/audio/legocachesound.cpp rename to LEGO1/lego/legoomni/src/audio/legocachsound.cpp index 029879f9..d43012c8 100644 --- a/LEGO1/lego/legoomni/src/audio/legocachesound.cpp +++ b/LEGO1/lego/legoomni/src/audio/legocachsound.cpp @@ -1,7 +1,7 @@ -#include "legocachesound.h" +#include "legocachsound.h" -#include "legoomni.h" #include "legosoundmanager.h" +#include "misc.h" #include "mxomni.h" DECOMP_SIZE_ASSERT(LegoCacheSound, 0x88) diff --git a/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp b/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp index edcd6b34..8f88ddc9 100644 --- a/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp +++ b/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp @@ -1,6 +1,6 @@ #include "legoloadcachesoundpresenter.h" -#include "legocachesound.h" +#include "legocachsound.h" #include "mxstreamchunk.h" #include "mxwavepresenter.h" diff --git a/LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp b/LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp index f0be968d..e4fee977 100644 --- a/LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp @@ -1,6 +1,7 @@ #include "legosoundmanager.h" #include "mxautolocker.h" +#include "mxomni.h" // FUNCTION: LEGO1 0x100298a0 LegoSoundManager::LegoSoundManager() diff --git a/LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp b/LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp index 563b9383..ecb39b3b 100644 --- a/LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp +++ b/LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp @@ -1,7 +1,8 @@ #include "legounknown100d5778.h" -#include "legoomni.h" -#include "legounksavedatawriter.h" +#include "legocharactermanager.h" +#include "misc.h" +#include "mxomni.h" DECOMP_SIZE_ASSERT(LegoUnknown100d5778, 0x30) @@ -56,12 +57,12 @@ void LegoUnknown100d5778::Destroy() m_dsBuffer = NULL; } - if (m_unk0x14 && m_unk0xc && UnkSaveDataWriter()) { + if (m_unk0x14 && m_unk0xc && CharacterManager()) { if (m_unk0x15) { - UnkSaveDataWriter()->FUN_10083db0(m_unk0xc); + CharacterManager()->FUN_10083db0(m_unk0xc); } else { - UnkSaveDataWriter()->FUN_10083f10(m_unk0xc); + CharacterManager()->FUN_10083f10(m_unk0xc); } } diff --git a/LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp b/LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp index f8469eb0..101d4176 100644 --- a/LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp +++ b/LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp @@ -1,7 +1,7 @@ #include "legounknown100d6b4c.h" -#include "legoomni.h" #include "legoworld.h" +#include "misc.h" DECOMP_SIZE_ASSERT(Element100d6b4c, 0x08) DECOMP_SIZE_ASSERT(LegoUnknown100d6b4c, 0x20) diff --git a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp index 734c9be7..a5acbc8d 100644 --- a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp @@ -1,13 +1,14 @@ #include "mxbackgroundaudiomanager.h" #include "legoomni.h" +#include "misc.h" #include "mxcompositepresenter.h" #include "mxdssound.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxpresenter.h" #include "mxstreamer.h" #include "mxticklemanager.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150) diff --git a/LEGO1/lego/legoomni/src/build/buildingentity.cpp b/LEGO1/lego/legoomni/src/build/buildingentity.cpp index f8ff1a83..01eb235b 100644 --- a/LEGO1/lego/legoomni/src/build/buildingentity.cpp +++ b/LEGO1/lego/legoomni/src/build/buildingentity.cpp @@ -1,6 +1,6 @@ #include "buildingentity.h" -#include "legoomni.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" // FUNCTION: LEGO1 0x10014e20 diff --git a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp index 9a5c3641..f1a9d747 100644 --- a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp @@ -3,10 +3,10 @@ #include "define.h" #include "extra.h" #include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" #include "mxcompositepresenter.h" #include "mxmediapresenter.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxstreamchunk.h" #include "mxticklemanager.h" diff --git a/LEGO1/lego/legoomni/src/video/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/video/legoanimationmanager.cpp rename to LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp diff --git a/LEGO1/lego/legoomni/src/video/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/video/legoanimmmpresenter.cpp rename to LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp diff --git a/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp b/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp index e6cd3fed..2bc721a3 100644 --- a/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp +++ b/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp @@ -1,9 +1,9 @@ #include "legobackgroundcolor.h" #include "decomp.h" -#include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" +#include "misc.h" DECOMP_SIZE_ASSERT(LegoBackgroundColor, 0x30) diff --git a/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp similarity index 71% rename from LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp rename to LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index 5a0dcac1..2cc1baaa 100644 --- a/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -1,23 +1,23 @@ -#include "legounksavedatawriter.h" +#include "legocharactermanager.h" #include "legogamestate.h" -#include "legoomni.h" +#include "mxmisc.h" #include "roi/legoroi.h" -DECOMP_SIZE_ASSERT(LegoUnkSaveDataWriter, 0x08) +DECOMP_SIZE_ASSERT(LegoCharacterManager, 0x08) DECOMP_SIZE_ASSERT(LegoSaveDataEntry3, 0x108) // GLOBAL: LEGO1 0x100f80c0 LegoSaveDataEntry3 g_saveDataInit[66]; // TODO: add data // GLOBAL: LEGO1 0x100fc4e4 -char* LegoUnkSaveDataWriter::g_customizeAnimFile = NULL; +char* LegoCharacterManager::g_customizeAnimFile = NULL; // GLOBAL: LEGO1 0x10104f20 LegoSaveDataEntry3 g_saveData3[66]; // FUNCTION: LEGO1 0x10082a20 -LegoUnkSaveDataWriter::LegoUnkSaveDataWriter() +LegoCharacterManager::LegoCharacterManager() { m_map = new LegoUnkSaveDataMap(); InitSaveData(); @@ -27,7 +27,7 @@ LegoUnkSaveDataWriter::LegoUnkSaveDataWriter() } // FUNCTION: LEGO1 0x10083270 -void LegoUnkSaveDataWriter::InitSaveData() +void LegoCharacterManager::InitSaveData() { for (MxS32 i = 0; i < 66; i++) { g_saveData3[i] = g_saveDataInit[i]; @@ -35,13 +35,13 @@ void LegoUnkSaveDataWriter::InitSaveData() } // STUB: LEGO1 0x100832a0 -void LegoUnkSaveDataWriter::FUN_100832a0() +void LegoCharacterManager::FUN_100832a0() { // TODO } // FUNCTION: LEGO1 0x10083310 -MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_storage) +MxResult LegoCharacterManager::WriteSaveData3(LegoStorage* p_storage) { MxResult result = FAILURE; @@ -91,13 +91,13 @@ MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_storage) } // STUB: LEGO1 0x100833f0 -MxResult LegoUnkSaveDataWriter::ReadSaveData3(LegoStorage* p_storage) +MxResult LegoCharacterManager::ReadSaveData3(LegoStorage* p_storage) { return SUCCESS; } // STUB: LEGO1 0x10083500 -LegoROI* LegoUnkSaveDataWriter::FUN_10083500(const char* p_key, MxBool p_option) +LegoROI* LegoCharacterManager::FUN_10083500(const char* p_key, MxBool p_option) { // TODO // involves an STL map with a _Nil node at 0x100fc508 @@ -105,33 +105,33 @@ LegoROI* LegoUnkSaveDataWriter::FUN_10083500(const char* p_key, MxBool p_option) } // STUB: LEGO1 0x10083db0 -void LegoUnkSaveDataWriter::FUN_10083db0(LegoROI* p_roi) +void LegoCharacterManager::FUN_10083db0(LegoROI* p_roi) { // TODO } // STUB: LEGO1 0x10083f10 -void LegoUnkSaveDataWriter::FUN_10083f10(LegoROI* p_roi) +void LegoCharacterManager::FUN_10083f10(LegoROI* p_roi) { // TODO } // STUB: LEGO1 0x10084c00 -MxBool LegoUnkSaveDataWriter::FUN_10084c00(const LegoChar*) +MxBool LegoCharacterManager::FUN_10084c00(const LegoChar*) { // TODO return FALSE; } // STUB: LEGO1 0x10085140 -MxU32 LegoUnkSaveDataWriter::FUN_10085140(LegoROI*, MxBool) +MxU32 LegoCharacterManager::FUN_10085140(LegoROI*, MxBool) { // TODO return 0; } // FUNCTION: LEGO1 0x100851a0 -void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value) +void LegoCharacterManager::SetCustomizeAnimFile(const char* p_value) { if (g_customizeAnimFile != NULL) { delete[] g_customizeAnimFile; @@ -150,13 +150,13 @@ void LegoUnkSaveDataWriter::SetCustomizeAnimFile(const char* p_value) } // STUB: LEGO1 0x10085210 -LegoROI* LegoUnkSaveDataWriter::FUN_10085210(const LegoChar*, LegoChar*, undefined) +LegoROI* LegoCharacterManager::FUN_10085210(const LegoChar*, LegoChar*, undefined) { return NULL; } // FUNCTION: LEGO1 0x10085a80 -LegoROI* LegoUnkSaveDataWriter::FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3) +LegoROI* LegoCharacterManager::FUN_10085a80(LegoChar* p_und1, LegoChar* p_und2, undefined p_und3) { return FUN_10085210(p_und1, p_und2, p_und3); } diff --git a/LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp b/LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp index b10b285f..c95cb40e 100644 --- a/LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp +++ b/LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp @@ -1,8 +1,8 @@ #include "legofullscreenmovie.h" #include "decomp.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "mxtypes.h" DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24) diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 9f296ff7..6f2b43b7 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -10,15 +10,17 @@ #include "jetski.h" #include "legoanimationmanager.h" #include "legobuildingmanager.h" +#include "legocharactermanager.h" #include "legonavcontroller.h" #include "legoomni.h" #include "legoplantmanager.h" #include "legostate.h" -#include "legounksavedatawriter.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" #include "mxobjectfactory.h" #include "mxstring.h" #include "mxvariabletable.h" @@ -144,7 +146,7 @@ void LegoGameState::SetActor(MxU8 p_actorId) IslePathActor* newActor = new IslePathActor(); const char* actorName = LegoActor::GetActorName(m_actorId); - LegoROI* roi = UnkSaveDataWriter()->FUN_10083500(actorName, FALSE); + LegoROI* roi = CharacterManager()->FUN_10083500(actorName, FALSE); MxDSAction action; action.SetAtomId(*g_isleScript); @@ -232,7 +234,7 @@ MxResult LegoGameState::Save(MxULong p_slot) } WriteEndOfVariables(&fileStorage); - UnkSaveDataWriter()->WriteSaveData3(&fileStorage); + CharacterManager()->WriteSaveData3(&fileStorage); PlantManager()->Save(&fileStorage); result = BuildingManager()->Save(&fileStorage); @@ -331,7 +333,7 @@ MxResult LegoGameState::Load(MxULong p_slot) SetLightPosition(atoi(lightPosition)); } - if (UnkSaveDataWriter()->ReadSaveData3(&fileStorage) == FAILURE) { + if (CharacterManager()->ReadSaveData3(&fileStorage) == FAILURE) { goto done; } if (PlantManager()->Load(&fileStorage) == FAILURE) { @@ -1048,7 +1050,7 @@ void LegoGameState::Init() SetLightPosition(2); PlantManager()->Init(); BuildingManager()->Init(); - UnkSaveDataWriter()->InitSaveData(); + CharacterManager()->InitSaveData(); AnimationManager()->FUN_1005ee80(TRUE); SetColors(); RemoveActor(); diff --git a/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp b/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp index 125d46d5..d1b6d83c 100644 --- a/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp +++ b/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp @@ -1,7 +1,7 @@ #include "legotextureinfo.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "misc/legoimage.h" #include "misc/legotexture.h" #include "tgl/d3drm/impl.h" diff --git a/LEGO1/lego/legoomni/src/common/legoutil.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/common/legoutil.cpp rename to LEGO1/lego/legoomni/src/common/legoutils.cpp index d85c51ce..b6c9be17 100644 --- a/LEGO1/lego/legoomni/src/common/legoutil.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -1,13 +1,14 @@ -#include "legoutil.h" +#include "legoutils.h" #include "legoinputmanager.h" #include "legonamedtexture.h" #include "legoomni.h" #include "legoworld.h" #include "legoworldlist.h" +#include "misc.h" #include "mxdsaction.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" #include "mxstreamer.h" #include "mxtypes.h" diff --git a/LEGO1/lego/legoomni/src/common/legovariables.cpp b/LEGO1/lego/legoomni/src/common/legovariables.cpp index 420aa91e..e157e3c4 100644 --- a/LEGO1/lego/legoomni/src/common/legovariables.cpp +++ b/LEGO1/lego/legoomni/src/common/legovariables.cpp @@ -1,9 +1,9 @@ #include "legovariables.h" #include "legobuildingmanager.h" -#include "legoomni.h" +#include "legocharactermanager.h" #include "legoplantmanager.h" -#include "legounksavedatawriter.h" +#include "misc.h" DECOMP_SIZE_ASSERT(VisibilityVariable, 0x24) DECOMP_SIZE_ASSERT(CameraLocationVariable, 0x24) @@ -62,7 +62,7 @@ void CustomizeAnimFileVariable::SetValue(const char* p_value) { // STRING: LEGO1 0x100fc4f4 if (strcmp(m_key.GetData(), "CUSTOMIZE_ANIM_FILE") == 0) { - UnkSaveDataWriter()->SetCustomizeAnimFile(p_value); + CharacterManager()->SetCustomizeAnimFile(p_value); PlantManager()->SetCustomizeAnimFile(p_value); BuildingManager()->SetCustomizeAnimFile(p_value); } diff --git a/LEGO1/lego/legoomni/src/common/misc.cpp b/LEGO1/lego/legoomni/src/common/misc.cpp new file mode 100644 index 00000000..0ac953b1 --- /dev/null +++ b/LEGO1/lego/legoomni/src/common/misc.cpp @@ -0,0 +1,198 @@ +#include "misc.h" + +#include "legoinputmanager.h" +#include "legoomni.h" +#include "legovideomanager.h" +#include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" + +// GLOBAL: LEGO1 0x100f4c58 +MxBool g_isWorldActive = TRUE; + +// FUNCTION: LEGO1 0x10015700 +LegoOmni* Lego() +{ + return LegoOmni::GetInstance(); +} + +// FUNCTION: LEGO1 0x10015710 +LegoSoundManager* SoundManager() +{ + return LegoOmni::GetInstance()->GetSoundManager(); +} + +// FUNCTION: LEGO1 0x10015720 +LegoVideoManager* VideoManager() +{ + return LegoOmni::GetInstance()->GetVideoManager(); +} + +// FUNCTION: LEGO1 0x10015730 +MxBackgroundAudioManager* BackgroundAudioManager() +{ + return LegoOmni::GetInstance()->GetBackgroundAudioManager(); +} + +// FUNCTION: LEGO1 0x10015740 +LegoInputManager* InputManager() +{ + return LegoOmni::GetInstance()->GetInputManager(); +} + +// FUNCTION: LEGO1 0x10015750 +LegoControlManager* ControlManager() +{ + return LegoOmni::GetInstance()->GetInputManager()->GetControlManager(); +} + +// FUNCTION: LEGO1 0x10015760 +LegoGameState* GameState() +{ + return LegoOmni::GetInstance()->GetGameState(); +} + +// FUNCTION: LEGO1 0x10015770 +LegoAnimationManager* AnimationManager() +{ + return LegoOmni::GetInstance()->GetAnimationManager(); +} + +// FUNCTION: LEGO1 0x10015780 +LegoNavController* NavController() +{ + return LegoOmni::GetInstance()->GetNavController(); +} + +// FUNCTION: LEGO1 0x10015790 +IslePathActor* CurrentActor() +{ + return LegoOmni::GetInstance()->GetCurrentActor(); +} + +// FUNCTION: LEGO1 0x100157a0 +LegoWorld* CurrentWorld() +{ + return LegoOmni::GetInstance()->GetCurrentWorld(); +} + +// FUNCTION: LEGO1 0x100157b0 +LegoCharacterManager* CharacterManager() +{ + return LegoOmni::GetInstance()->GetCharacterManager(); +} + +// FUNCTION: LEGO1 0x100157c0 +ViewManager* GetViewManager() +{ + return VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager(); +} + +// FUNCTION: LEGO1 0x100157e0 +LegoPlantManager* PlantManager() +{ + return LegoOmni::GetInstance()->GetLegoPlantManager(); +} + +// FUNCTION: LEGO1 0x100157f0 +LegoBuildingManager* BuildingManager() +{ + return LegoOmni::GetInstance()->GetLegoBuildingManager(); +} + +// FUNCTION: LEGO1 0x10015800 +LegoTextureContainer* TextureContainer() +{ + return LegoOmni::GetInstance()->GetTextureContainer(); +} + +// FUNCTION: LEGO1 0x10015810 +ViewLODListManager* GetViewLODListManager() +{ + return LegoOmni::GetInstance()->GetViewLODListManager(); +} + +// FUNCTION: LEGO1 0x10015820 +void FUN_10015820(MxBool p_disable, MxU16 p_flags) +{ + LegoOmni::GetInstance()->FUN_1005b4f0(p_disable, p_flags); +} + +// FUNCTION: LEGO1 0x10015840 +LegoROI* FindROI(const char* p_name) +{ + return LegoOmni::GetInstance()->FindROI(p_name); +} + +// FUNCTION: LEGO1 0x10015860 +void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c) +{ + LegoROI* roi = FindROI(p_name); + + if (roi) { + roi->SetUnknown0x0c(p_unk0x0c); + } +} + +// FUNCTION: LEGO1 0x10015880 +void SetCurrentActor(IslePathActor* p_currentActor) +{ + LegoOmni::GetInstance()->SetCurrentActor(p_currentActor); +} + +// FUNCTION: LEGO1 0x100158c0 +LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid) +{ + return LegoOmni::GetInstance()->FindWorld(p_atom, p_entityid); +} + +// FUNCTION: LEGO1 0x100158e0 +MxDSAction& GetCurrentAction() +{ + return LegoOmni::GetInstance()->GetCurrentAction(); +} + +// FUNCTION: LEGO1 0x100158f0 +void SetCurrentWorld(LegoWorld* p_world) +{ + LegoOmni::GetInstance()->SetCurrentWorld(p_world); +} + +// FUNCTION: LEGO1 0x10015900 +MxTransitionManager* TransitionManager() +{ + return LegoOmni::GetInstance()->GetTransitionManager(); +} + +// FUNCTION: LEGO1 0x10015910 +void PlayMusic(MxU32 p_index) +{ + // index is the entityid of the music in jukebox.si + MxDSAction action; + action.SetAtomId(*g_jukeboxScript); + action.SetObjectId(p_index); + + LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4); +} + +// FUNCTION: LEGO1 0x100159c0 +void SetIsWorldActive(MxBool p_isWorldActive) +{ + if (!p_isWorldActive) { + LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL); + } + g_isWorldActive = p_isWorldActive; +} + +// FUNCTION: LEGO1 0x100159e0 +void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last) +{ + MxDSAction action; + + action.SetAtomId(*p_id); + action.SetUnknown24(-2); + + for (MxS32 first = p_first, last = p_last; first <= last; first++) { + action.SetObjectId(first); + DeleteObject(action); + } +} diff --git a/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp b/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp index 355cf12f..3f92a8ce 100644 --- a/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp @@ -1,11 +1,12 @@ #include "mxcompositemediapresenter.h" -#include "legoomni.h" #include "legosoundmanager.h" #include "legovideomanager.h" +#include "misc.h" #include "mxautolocker.h" #include "mxdsmultiaction.h" #include "mxmediapresenter.h" +#include "mxmisc.h" #include "mxobjectfactory.h" #include "mxtimer.h" diff --git a/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp b/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp rename to LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp index a3d13457..58c21544 100644 --- a/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp @@ -3,9 +3,10 @@ #include "define.h" #include "legocontrolmanager.h" #include "mxdsmultiaction.h" +#include "mxmisc.h" #include "mxticklemanager.h" #include "mxtimer.h" -#include "mxutil.h" +#include "mxutilities.h" #include "mxvideopresenter.h" DECOMP_SIZE_ASSERT(MxControlPresenter, 0x5c) diff --git a/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp rename to LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp index 8672cdaa..158568c1 100644 --- a/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp @@ -1,12 +1,15 @@ #include "mxtransitionmanager.h" #include "legoinputmanager.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" #include "mxparam.h" #include "mxticklemanager.h" +#include "mxvideopresenter.h" DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900); diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index 8ff38b9c..8f88d5d5 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -1,9 +1,10 @@ #include "legocontrolmanager.h" #include "legoeventnotificationparam.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "mxcontrolpresenter.h" +#include "mxmisc.h" #include "mxpresenter.h" #include "mxticklemanager.h" diff --git a/LEGO1/lego/legoomni/src/video/legometerpresenter.cpp b/LEGO1/lego/legoomni/src/control/legometerpresenter.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/video/legometerpresenter.cpp rename to LEGO1/lego/legoomni/src/control/legometerpresenter.cpp index 529560f9..a41de713 100644 --- a/LEGO1/lego/legoomni/src/video/legometerpresenter.cpp +++ b/LEGO1/lego/legoomni/src/control/legometerpresenter.cpp @@ -2,7 +2,7 @@ #include "decomp.h" #include "mxbitmap.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94) diff --git a/LEGO1/lego/legoomni/src/act2/act2brick.cpp b/LEGO1/lego/legoomni/src/entity/act2brick.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/act2/act2brick.cpp rename to LEGO1/lego/legoomni/src/entity/act2brick.cpp diff --git a/LEGO1/lego/legoomni/src/act2/act2policestation.cpp b/LEGO1/lego/legoomni/src/entity/act2policestation.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/act2/act2policestation.cpp rename to LEGO1/lego/legoomni/src/entity/act2policestation.cpp diff --git a/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp index a1ed885f..4f54a6a5 100644 --- a/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp @@ -1,7 +1,7 @@ #include "legoactorpresenter.h" #include "legoentity.h" -#include "legoomni.h" +#include "misc.h" // FUNCTION: LEGO1 0x10076c30 void LegoActorPresenter::ReadyTickle() diff --git a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp index 95cf839d..90850e47 100644 --- a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp @@ -2,8 +2,8 @@ #include "legoinputmanager.h" #include "legonotify.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" DECOMP_SIZE_ASSERT(LegoCameraController, 0xc8); diff --git a/LEGO1/lego/legoomni/src/entity/legoentity.cpp b/LEGO1/lego/legoomni/src/entity/legoentity.cpp index 94e731a8..bb473c14 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentity.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -2,12 +2,13 @@ #include "define.h" #include "legobuildingmanager.h" -#include "legoomni.h" +#include "legocharactermanager.h" #include "legoplantmanager.h" -#include "legounksavedatawriter.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" +#include "mxmisc.h" DECOMP_SIZE_ASSERT(LegoEntity, 0x68) @@ -86,7 +87,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor) m_roi->SetEntity(NULL); } - UnkSaveDataWriter()->FUN_10083db0(m_roi); + CharacterManager()->FUN_10083db0(m_roi); } else { VideoManager()->Get3DManager()->GetLego3DView()->Remove(*m_roi); @@ -214,7 +215,7 @@ void LegoEntity::VTable0x34(MxBool p_und) switch (m_unk0x59) { case 0: - objectId = UnkSaveDataWriter()->FUN_10085140(m_roi, p_und); + objectId = CharacterManager()->FUN_10085140(m_roi, p_und); break; case 1: break; @@ -228,7 +229,7 @@ void LegoEntity::VTable0x34(MxBool p_und) if (objectId) { MxDSAction action; - action.SetAtomId(MxAtomId(UnkSaveDataWriter()->GetCustomizeAnimFile(), e_lowerCase2)); + action.SetAtomId(MxAtomId(CharacterManager()->GetCustomizeAnimFile(), e_lowerCase2)); action.SetObjectId(objectId); action.AppendData(strlen(roiName) + 1, roiName); Start(&action); diff --git a/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp index 0c9ff60f..b185329f 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp @@ -1,8 +1,8 @@ #include "legoentitypresenter.h" #include "islepathactor.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" DECOMP_SIZE_ASSERT(LegoEntityPresenter, 0x50); diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index e6dc33a2..93d513db 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -1,32 +1,44 @@ #include "legonavcontroller.h" #include "legoinputmanager.h" -#include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" +#include "misc.h" +#include "mxmisc.h" // GLOBAL: LEGO1 0x100f4c28 int g_mouseDeadzone = 40; + // GLOBAL: LEGO1 0x100f4c2c float g_zeroThreshold = 0.001f; + // GLOBAL: LEGO1 0x100f4c30 float g_movementMaxSpeed = 40.0f; + // GLOBAL: LEGO1 0x100f4c34 float g_turnMaxSpeed = 20.0f; + // GLOBAL: LEGO1 0x100f4c38 float g_movementMaxAccel = 15.0f; + // GLOBAL: LEGO1 0x100f4c3c float g_turnMaxAccel = 30.0f; + // GLOBAL: LEGO1 0x100f4c40 float g_movementMinAccel = 4.0f; + // GLOBAL: LEGO1 0x100f4c44 float g_turnMinAccel = 15.0f; + // GLOBAL: LEGO1 0x100f4c48 float g_movementDecel = 50.0f; + // GLOBAL: LEGO1 0x100f4c4c float g_turnDecel = 50.0f; + // GLOBAL: LEGO1 0x100f4c50 float g_turnSensitivity = 0.4f; + // GLOBAL: LEGO1 0x100f4c54 MxBool g_turnUseVelocity = FALSE; diff --git a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp index f656022d..0f218c43 100644 --- a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp @@ -1,6 +1,7 @@ #include "legonavcontroller.h" #include "legoomni.h" #include "legopointofviewcontroller.h" +#include "mxmisc.h" #include "mxticklemanager.h" DECOMP_SIZE_ASSERT(LegoMouseController, 0x20); diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index d7aab174..fc31b459 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -11,13 +11,14 @@ #include "legoomni.h" #include "legoplantmanager.h" #include "legosoundmanager.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" +#include "misc.h" #include "mxactionnotificationparam.h" #include "mxcontrolpresenter.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxnotificationparam.h" -#include "mxomni.h" #include "mxticklemanager.h" DECOMP_SIZE_ASSERT(LegoWorld, 0xf8) diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index e3555d7a..756e32f9 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -12,6 +12,7 @@ #include "legotexturepresenter.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" #include "modeldb/modeldb.h" #include "mxactionnotificationparam.h" #include "mxautolocker.h" @@ -19,11 +20,12 @@ #include "mxdschunk.h" #include "mxdsmediaaction.h" #include "mxdsmultiaction.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" #include "mxpresenter.h" #include "mxstl/stlcompat.h" -#include "mxutil.h" +#include "mxutilities.h" #include diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index 40eac915..950a19f9 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -3,6 +3,7 @@ #include "legocontrolmanager.h" #include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "mxautolocker.h" #include "roi/legoroi.h" diff --git a/LEGO1/lego/legoomni/src/isle/radiostate.cpp b/LEGO1/lego/legoomni/src/isle/radiostate.cpp index 077864a7..faae33c7 100644 --- a/LEGO1/lego/legoomni/src/isle/radiostate.cpp +++ b/LEGO1/lego/legoomni/src/isle/radiostate.cpp @@ -2,6 +2,7 @@ #include "jukebox.h" #include "legoomni.h" +#include "mxmisc.h" #include "mxtimer.h" // GLOBAL: LEGO1 0x100f3218 diff --git a/LEGO1/lego/legoomni/src/main/legoomni.cpp b/LEGO1/lego/legoomni/src/main/legoomni.cpp index 17cb2204..cb1f5b05 100644 --- a/LEGO1/lego/legoomni/src/main/legoomni.cpp +++ b/LEGO1/lego/legoomni/src/main/legoomni.cpp @@ -2,22 +2,24 @@ #include "legoanimationmanager.h" #include "legobuildingmanager.h" +#include "legocharactermanager.h" #include "legogamestate.h" #include "legoinputmanager.h" #include "legoobjectfactory.h" #include "legoplantmanager.h" #include "legosoundmanager.h" -#include "legounksavedatawriter.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovariables.h" #include "legovideomanager.h" #include "legoworld.h" #include "legoworldlist.h" +#include "misc.h" #include "misc/legocontainer.h" #include "mxactionnotificationparam.h" #include "mxautolocker.h" #include "mxbackgroundaudiomanager.h" #include "mxdsfile.h" +#include "mxmisc.h" #include "mxomnicreateflags.h" #include "mxomnicreateparam.h" #include "mxstreamer.h" @@ -118,200 +120,9 @@ MxAtomId* g_nocdSourceName = NULL; // STRING: LEGO1 0x100f6710 const char* g_current = "current"; -// GLOBAL: LEGO1 0x100f4c58 -MxBool g_isWorldActive = TRUE; - // GLOBAL: LEGO1 0x10102b28 LegoOmni::PathContainer g_extraPaths[29]; -// FUNCTION: LEGO1 0x10015700 -LegoOmni* Lego() -{ - return LegoOmni::GetInstance(); -} - -// FUNCTION: LEGO1 0x10015710 -LegoSoundManager* SoundManager() -{ - return LegoOmni::GetInstance()->GetSoundManager(); -} - -// FUNCTION: LEGO1 0x10015720 -LegoVideoManager* VideoManager() -{ - return LegoOmni::GetInstance()->GetVideoManager(); -} - -// FUNCTION: LEGO1 0x10015730 -MxBackgroundAudioManager* BackgroundAudioManager() -{ - return LegoOmni::GetInstance()->GetBackgroundAudioManager(); -} - -// FUNCTION: LEGO1 0x10015740 -LegoInputManager* InputManager() -{ - return LegoOmni::GetInstance()->GetInputManager(); -} - -// FUNCTION: LEGO1 0x10015750 -LegoControlManager* ControlManager() -{ - return LegoOmni::GetInstance()->GetInputManager()->GetControlManager(); -} - -// FUNCTION: LEGO1 0x10015760 -LegoGameState* GameState() -{ - return LegoOmni::GetInstance()->GetGameState(); -} - -// FUNCTION: LEGO1 0x10015770 -LegoAnimationManager* AnimationManager() -{ - return LegoOmni::GetInstance()->GetAnimationManager(); -} - -// FUNCTION: LEGO1 0x10015780 -LegoNavController* NavController() -{ - return LegoOmni::GetInstance()->GetNavController(); -} - -// FUNCTION: LEGO1 0x10015790 -IslePathActor* CurrentActor() -{ - return LegoOmni::GetInstance()->GetCurrentActor(); -} - -// FUNCTION: LEGO1 0x100157a0 -LegoWorld* CurrentWorld() -{ - return LegoOmni::GetInstance()->GetCurrentWorld(); -} - -// FUNCTION: LEGO1 0x100157b0 -LegoUnkSaveDataWriter* UnkSaveDataWriter() -{ - return LegoOmni::GetInstance()->GetUnkSaveDataWriter(); -} - -// FUNCTION: LEGO1 0x100157c0 -ViewManager* GetViewManager() -{ - return VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager(); -} - -// FUNCTION: LEGO1 0x100157e0 -LegoPlantManager* PlantManager() -{ - return LegoOmni::GetInstance()->GetLegoPlantManager(); -} - -// FUNCTION: LEGO1 0x100157f0 -LegoBuildingManager* BuildingManager() -{ - return LegoOmni::GetInstance()->GetLegoBuildingManager(); -} - -// FUNCTION: LEGO1 0x10015800 -LegoTextureContainer* TextureContainer() -{ - return LegoOmni::GetInstance()->GetTextureContainer(); -} - -// FUNCTION: LEGO1 0x10015810 -ViewLODListManager* GetViewLODListManager() -{ - return LegoOmni::GetInstance()->GetViewLODListManager(); -} - -// FUNCTION: LEGO1 0x10015820 -void FUN_10015820(MxBool p_disable, MxU16 p_flags) -{ - LegoOmni::GetInstance()->FUN_1005b4f0(p_disable, p_flags); -} - -// FUNCTION: LEGO1 0x10015840 -LegoROI* FindROI(const char* p_name) -{ - return LegoOmni::GetInstance()->FindROI(p_name); -} - -// FUNCTION: LEGO1 0x10015860 -void SetROIUnknown0x0c(const char* p_name, undefined p_unk0x0c) -{ - LegoROI* roi = FindROI(p_name); - - if (roi) { - roi->SetUnknown0x0c(p_unk0x0c); - } -} - -// FUNCTION: LEGO1 0x10015880 -void SetCurrentActor(IslePathActor* p_currentActor) -{ - LegoOmni::GetInstance()->SetCurrentActor(p_currentActor); -} - -// FUNCTION: LEGO1 0x100158c0 -LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid) -{ - return LegoOmni::GetInstance()->FindWorld(p_atom, p_entityid); -} - -// FUNCTION: LEGO1 0x100158e0 -MxDSAction& GetCurrentAction() -{ - return LegoOmni::GetInstance()->GetCurrentAction(); -} - -// FUNCTION: LEGO1 0x100158f0 -void SetCurrentWorld(LegoWorld* p_world) -{ - LegoOmni::GetInstance()->SetCurrentWorld(p_world); -} - -// FUNCTION: LEGO1 0x10015900 -MxTransitionManager* TransitionManager() -{ - return LegoOmni::GetInstance()->GetTransitionManager(); -} - -// FUNCTION: LEGO1 0x10015910 -void PlayMusic(MxU32 p_index) -{ - // index is the entityid of the music in jukebox.si - MxDSAction action; - action.SetAtomId(*g_jukeboxScript); - action.SetObjectId(p_index); - - LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4); -} - -// FUNCTION: LEGO1 0x100159c0 -void SetIsWorldActive(MxBool p_isWorldActive) -{ - if (!p_isWorldActive) { - LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL); - } - g_isWorldActive = p_isWorldActive; -} - -// FUNCTION: LEGO1 0x100159e0 -void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last) -{ - MxDSAction action; - - action.SetAtomId(*p_id); - action.SetUnknown24(-2); - - for (MxS32 first = p_first, last = p_last; first <= last; first++) { - action.SetObjectId(first); - DeleteObject(action); - } -} - // FUNCTION: LEGO1 0x1001a700 void RegisterExtraPaths() { @@ -485,7 +296,7 @@ void LegoOmni::Init() m_currentWorld = NULL; m_exit = FALSE; m_currentActor = NULL; - m_saveDataWriter = NULL; + m_characterManager = NULL; m_plantManager = NULL; m_gameState = NULL; m_animationManager = NULL; @@ -517,9 +328,9 @@ void LegoOmni::Destroy() m_animationManager = NULL; } - if (m_saveDataWriter) { - delete m_saveDataWriter; - m_saveDataWriter = NULL; + if (m_characterManager) { + delete m_characterManager; + m_characterManager = NULL; } if (m_plantManager) { @@ -621,14 +432,14 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) m_textureContainer->SetOwnership(FALSE); // FUN_10046c10 - m_saveDataWriter = new LegoUnkSaveDataWriter(); + m_characterManager = new LegoCharacterManager(); m_plantManager = new LegoPlantManager(); m_animationManager = new LegoAnimationManager(); m_buildingManager = new LegoBuildingManager(); m_gameState = new LegoGameState(); m_worldList = new LegoWorldList(TRUE); - if (!m_viewLODListManager || !m_textureContainer || !m_worldList || !m_saveDataWriter || !m_plantManager || + if (!m_viewLODListManager || !m_textureContainer || !m_worldList || !m_characterManager || !m_plantManager || !m_animationManager || !m_buildingManager) { goto done; } diff --git a/LEGO1/lego/legoomni/src/entity/legoanimactor.cpp b/LEGO1/lego/legoomni/src/paths/legoanimactor.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/entity/legoanimactor.cpp rename to LEGO1/lego/legoomni/src/paths/legoanimactor.cpp diff --git a/LEGO1/lego/legoomni/src/entity/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/entity/legopathactor.cpp rename to LEGO1/lego/legoomni/src/paths/legopathactor.cpp diff --git a/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp b/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp index 0b94b4eb..25390c48 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp @@ -1,7 +1,7 @@ #include "legopathpresenter.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "mxautolocker.h" DECOMP_SIZE_ASSERT(LegoPathPresenter, 0x54); diff --git a/LEGO1/lego/legoomni/src/police/policestate.cpp b/LEGO1/lego/legoomni/src/police/policestate.cpp index c1d978e1..85365f0e 100644 --- a/LEGO1/lego/legoomni/src/police/policestate.cpp +++ b/LEGO1/lego/legoomni/src/police/policestate.cpp @@ -2,8 +2,9 @@ #include "islepathactor.h" #include "legoomni.h" +#include "misc.h" #include "mxdsaction.h" -#include "mxomni.h" +#include "mxmisc.h" #include "police.h" #include diff --git a/LEGO1/lego/legoomni/src/entity/legorace.cpp b/LEGO1/lego/legoomni/src/race/legorace.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/entity/legorace.cpp rename to LEGO1/lego/legoomni/src/race/legorace.cpp index 7c65c4da..034d3af8 100644 --- a/LEGO1/lego/legoomni/src/entity/legorace.cpp +++ b/LEGO1/lego/legoomni/src/race/legorace.cpp @@ -1,5 +1,6 @@ #include "legorace.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" DECOMP_SIZE_ASSERT(LegoRace, 0x144) diff --git a/LEGO1/lego/legoomni/src/entity/legoraceactor.cpp b/LEGO1/lego/legoomni/src/race/legoraceactor.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/entity/legoraceactor.cpp rename to LEGO1/lego/legoomni/src/race/legoraceactor.cpp diff --git a/LEGO1/lego/legoomni/src/entity/legoracecar.cpp b/LEGO1/lego/legoomni/src/race/legoracecar.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/entity/legoracecar.cpp rename to LEGO1/lego/legoomni/src/race/legoracecar.cpp diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index a56030b7..5aa70e6c 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -1,12 +1,13 @@ #include "legoanimpresenter.h" #include "legoanimmmpresenter.h" -#include "legoomni.h" -#include "legounksavedatawriter.h" +#include "legocharactermanager.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" #include "mxcompositepresenter.h" #include "mxdsanim.h" +#include "mxmisc.h" #include "mxstreamchunk.h" #include "mxtimer.h" #include "mxvideomanager.h" @@ -113,7 +114,7 @@ LegoChar* LegoAnimPresenter::FUN_10069150(const LegoChar* p_und1) { LegoChar* str; - if (LegoUnkSaveDataWriter::FUN_10084c00(p_und1 + 1)) { + if (LegoCharacterManager::FUN_10084c00(p_und1 + 1)) { str = new LegoChar[strlen(p_und1)]; if (str != NULL) { @@ -157,7 +158,7 @@ void LegoAnimPresenter::FUN_100692b0() src = str; } - roi = UnkSaveDataWriter()->FUN_10083500(src, TRUE); + roi = CharacterManager()->FUN_10083500(src, TRUE); if (roi != NULL && str[0] == '*') { roi->SetUnknown0x0c(0); @@ -169,7 +170,7 @@ void LegoAnimPresenter::FUN_100692b0() strlwr(src); LegoChar* und = FUN_10069150(str); - roi = UnkSaveDataWriter()->FUN_10085a80(und, src, 1); + roi = CharacterManager()->FUN_10085a80(und, src, 1); if (roi != NULL) { roi->SetUnknown0x0c(0); @@ -193,7 +194,7 @@ void LegoAnimPresenter::FUN_100692b0() strlwr(src); LegoChar* und = FUN_10069150(str); - roi = UnkSaveDataWriter()->FUN_10085210(und, src, 1); + roi = CharacterManager()->FUN_10085210(und, src, 1); if (roi != NULL) { roi->SetUnknown0x0c(0); @@ -238,7 +239,7 @@ void LegoAnimPresenter::FUN_100695c0() strlwr(dest); - UnkSaveDataWriter()->FUN_10085210(str, dest, 0); + CharacterManager()->FUN_10085210(str, dest, 0); FUN_100698b0(rois, str); } } diff --git a/LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp index 1abe12f4..2bdda879 100644 --- a/LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp @@ -2,6 +2,7 @@ #include "legoomni.h" #include "legoworld.h" +#include "misc.h" DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8) diff --git a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp index 76f994c9..83938dfb 100644 --- a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp @@ -2,17 +2,17 @@ #include "anim/legoanim.h" #include "define.h" +#include "legocharactermanager.h" #include "legoentity.h" #include "legoentitypresenter.h" -#include "legoomni.h" -#include "legounksavedatawriter.h" #include "legovideomanager.h" #include "legoworld.h" +#include "misc.h" #include "misc/legocontainer.h" #include "misc/legotexture.h" #include "misc/version.h" #include "mxcompositepresenter.h" -#include "mxutil.h" +#include "mxutilities.h" #include "roi/legoroi.h" // GLOBAL: LEGO1 0x100f7ae0 @@ -308,7 +308,7 @@ void LegoModelPresenter::ParseExtra() char* token = strtok(output, g_parseExtraTokens); if (m_roi == NULL) { - m_roi = UnkSaveDataWriter()->FUN_10083500(token, FALSE); + m_roi = CharacterManager()->FUN_10083500(token, FALSE); m_addedToView = FALSE; } } diff --git a/LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp b/LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp index c071a37e..f8322e93 100644 --- a/LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legopalettepresenter.cpp @@ -1,7 +1,7 @@ #include "legopalettepresenter.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "misc/legostorage.h" #include "mxstreamchunk.h" diff --git a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp index cb319b72..8351cdaa 100644 --- a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp @@ -1,7 +1,7 @@ #include "legopartpresenter.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "misc/legocontainer.h" #include "misc/legostorage.h" #include "misc/legotexture.h" diff --git a/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp b/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp index b0148455..02464323 100644 --- a/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp @@ -1,7 +1,7 @@ #include "legotexturepresenter.h" -#include "legoomni.h" #include "legovideomanager.h" +#include "misc.h" #include "misc/legocontainer.h" #include "misc/legoimage.h" #include "misc/legostorage.h" diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index 9325d042..a45650e3 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -1,6 +1,8 @@ #include "legovideomanager.h" #include "legoomni.h" +#include "misc.h" +#include "mxmisc.h" #include "mxtimer.h" #include "mxtransitionmanager.h" #include "realtime/matrix.h" diff --git a/LEGO1/lego/legoomni/src/act3/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/act3/act3.cpp rename to LEGO1/lego/legoomni/src/worlds/act3.cpp diff --git a/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp rename to LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp index 960cf40e..3c5c7e27 100644 --- a/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp @@ -7,8 +7,9 @@ #include "legoinputmanager.h" #include "legoomni.h" #include "legovariables.h" +#include "misc.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" #include "mxtransitionmanager.h" DECOMP_SIZE_ASSERT(ElevatorBottom, 0xfc) diff --git a/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/gasstation/gasstation.cpp rename to LEGO1/lego/legoomni/src/worlds/gasstation.cpp index 4aacb404..46f9393c 100644 --- a/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -3,7 +3,8 @@ #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoinputmanager.h" -#include "legoomni.h" +#include "misc.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxticklemanager.h" diff --git a/LEGO1/lego/legoomni/src/isle/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/isle/historybook.cpp rename to LEGO1/lego/legoomni/src/worlds/historybook.cpp index 33659bf5..954df038 100644 --- a/LEGO1/lego/legoomni/src/isle/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -3,9 +3,9 @@ #include "jukebox.h" #include "legocontrolmanager.h" #include "legoinputmanager.h" -#include "legoomni.h" +#include "misc.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" #include "mxtransitionmanager.h" DECOMP_SIZE_ASSERT(HistoryBook, 0x3e4) diff --git a/LEGO1/lego/legoomni/src/hospital/hospital.cpp b/LEGO1/lego/legoomni/src/worlds/hospital.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/hospital/hospital.cpp rename to LEGO1/lego/legoomni/src/worlds/hospital.cpp index e298ef34..6dfee325 100644 --- a/LEGO1/lego/legoomni/src/hospital/hospital.cpp +++ b/LEGO1/lego/legoomni/src/worlds/hospital.cpp @@ -1,7 +1,7 @@ #include "hospital.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" DECOMP_SIZE_ASSERT(Hospital, 0x12c) diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/infocenter/infocenter.cpp rename to LEGO1/lego/legoomni/src/worlds/infocenter.cpp index f69fa761..eda820b5 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -7,17 +7,19 @@ #include "legoact2state.h" #include "legoanimationmanager.h" #include "legobuildingmanager.h" +#include "legocharactermanager.h" #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" #include "legoplantmanager.h" -#include "legounksavedatawriter.h" -#include "legoutil.h" +#include "legoutils.h" #include "legovideomanager.h" +#include "misc.h" #include "mxactionnotificationparam.h" #include "mxbackgroundaudiomanager.h" #include "mxcontrolpresenter.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxstillpresenter.h" #include "mxticklemanager.h" @@ -1284,7 +1286,7 @@ void Infocenter::Reset() PlantManager()->FUN_10027120(); BuildingManager()->FUN_10030590(); AnimationManager()->FUN_1005ee80(FALSE); - UnkSaveDataWriter()->FUN_100832a0(); + CharacterManager()->FUN_100832a0(); GameState()->SetCurrentAct(LegoGameState::e_act1); GameState()->SetPreviousArea(LegoGameState::e_noArea); GameState()->SetUnknown0x42c(LegoGameState::e_noArea); diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp rename to LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp index 2553956b..5654fd34 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp @@ -6,8 +6,10 @@ #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" +#include "misc.h" #include "mxactionnotificationparam.h" #include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtransitionmanager.h" diff --git a/LEGO1/lego/legoomni/src/isle/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/isle/isle.cpp rename to LEGO1/lego/legoomni/src/worlds/isle.cpp index bf3f912d..3572c3ee 100644 --- a/LEGO1/lego/legoomni/src/isle/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -7,7 +7,9 @@ #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" -#include "legoutil.h" +#include "legoutils.h" +#include "misc.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtransitionmanager.h" #include "pizza.h" diff --git a/LEGO1/lego/legoomni/src/isle/jukebox.cpp b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/isle/jukebox.cpp rename to LEGO1/lego/legoomni/src/worlds/jukebox.cpp index 70c1bb0a..63011a31 100644 --- a/LEGO1/lego/legoomni/src/isle/jukebox.cpp +++ b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp @@ -6,8 +6,9 @@ #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" +#include "misc.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" #include "mxstillpresenter.h" #include "mxticklemanager.h" #include "mxtransitionmanager.h" diff --git a/LEGO1/lego/legoomni/src/act2/legoact2.cpp b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp similarity index 100% rename from LEGO1/lego/legoomni/src/act2/legoact2.cpp rename to LEGO1/lego/legoomni/src/worlds/legoact2.cpp diff --git a/LEGO1/lego/legoomni/src/police/police.cpp b/LEGO1/lego/legoomni/src/worlds/police.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/police/police.cpp rename to LEGO1/lego/legoomni/src/worlds/police.cpp index b95938ee..59d89120 100644 --- a/LEGO1/lego/legoomni/src/police/police.cpp +++ b/LEGO1/lego/legoomni/src/worlds/police.cpp @@ -5,7 +5,9 @@ #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" +#include "misc.h" #include "mxbackgroundaudiomanager.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtransitionmanager.h" #include "policestate.h" diff --git a/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp similarity index 98% rename from LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp rename to LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index d8ae7003..35bfb3dc 100644 --- a/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -4,8 +4,9 @@ #include "legocontrolmanager.h" #include "legogamestate.h" #include "legoinputmanager.h" -#include "legoomni.h" +#include "misc.h" #include "mxactionnotificationparam.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtimer.h" diff --git a/LEGO1/lego/legoomni/src/infocenter/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp similarity index 99% rename from LEGO1/lego/legoomni/src/infocenter/score.cpp rename to LEGO1/lego/legoomni/src/worlds/score.cpp index 0f924725..187c9918 100644 --- a/LEGO1/lego/legoomni/src/infocenter/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -6,7 +6,9 @@ #include "legogamestate.h" #include "legoinputmanager.h" #include "legoomni.h" +#include "misc.h" #include "misc/legocontainer.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxnotificationparam.h" #include "mxtransitionmanager.h" diff --git a/LEGO1/lego/sources/misc/legocontainer.cpp b/LEGO1/lego/sources/misc/legocontainer.cpp index 7ccaf2d1..b6a04a98 100644 --- a/LEGO1/lego/sources/misc/legocontainer.cpp +++ b/LEGO1/lego/sources/misc/legocontainer.cpp @@ -1,7 +1,7 @@ #include "legocontainer.h" -#include "lego/legoomni/include/legoomni.h" #include "lego/legoomni/include/legovideomanager.h" +#include "lego/legoomni/include/misc.h" #include "tgl/d3drm/impl.h" DECOMP_SIZE_ASSERT(LegoContainerInfo, 0x10); diff --git a/LEGO1/omni/include/mxatomidcounter.h b/LEGO1/omni/include/mxatom.h similarity index 82% rename from LEGO1/omni/include/mxatomidcounter.h rename to LEGO1/omni/include/mxatom.h index 4d8bfe38..4f00b23f 100644 --- a/LEGO1/omni/include/mxatomidcounter.h +++ b/LEGO1/omni/include/mxatom.h @@ -1,8 +1,9 @@ -#ifndef MXATOMIDCOUNTER_H -#define MXATOMIDCOUNTER_H +#ifndef MXATOM_H +#define MXATOM_H #include "mxstl/stlcompat.h" #include "mxstring.h" +#include "mxtypes.h" // Counts the number of existing MxAtomId objects based // on the matching char* string. A seems fit for purpose here: @@ -43,6 +44,36 @@ struct MxAtomIdCounterCompare { class MxAtomIdCounterSet : public set {}; +enum LookupMode { + e_exact = 0, + e_lowerCase, + e_upperCase, + e_lowerCase2, +}; + +// SIZE 0x04 +class MxAtomId { +public: + MxAtomId(const char*, LookupMode); + MxAtomId& operator=(const MxAtomId& p_atomId); + ~MxAtomId(); + + MxAtomId() { this->m_internal = 0; } + + inline MxBool operator==(const MxAtomId& p_atomId) const { return this->m_internal == p_atomId.m_internal; } + inline MxBool operator!=(const MxAtomId& p_atomId) const { return this->m_internal != p_atomId.m_internal; } + + void Clear(); + + const char* GetInternal() const { return m_internal; } + +private: + MxAtomIdCounter* GetCounter(const char*, LookupMode); + void Destroy(); + + const char* m_internal; // 0x00 +}; + // SYNTHETIC: LEGO1 0x100ad170 // MxAtomIdCounter::~MxAtomIdCounter @@ -89,4 +120,4 @@ class MxAtomIdCounterSet : public set // TEMPLATE: LEGO1 0x100afe40 // Set::~Set -#endif // MXATOMIDCOUNTER_H +#endif // MXATOM_H diff --git a/LEGO1/omni/include/mxatomid.h b/LEGO1/omni/include/mxatomid.h deleted file mode 100644 index 337f0b76..00000000 --- a/LEGO1/omni/include/mxatomid.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef MXATOMID_H -#define MXATOMID_H - -#include "mxatomidcounter.h" -#include "mxtypes.h" - -enum LookupMode { - e_exact = 0, - e_lowerCase, - e_upperCase, - e_lowerCase2, -}; - -// SIZE 0x04 -class MxAtomId { -public: - MxAtomId(const char*, LookupMode); - MxAtomId& operator=(const MxAtomId& p_atomId); - ~MxAtomId(); - - MxAtomId() { this->m_internal = 0; } - - inline MxBool operator==(const MxAtomId& p_atomId) const { return this->m_internal == p_atomId.m_internal; } - inline MxBool operator!=(const MxAtomId& p_atomId) const { return this->m_internal != p_atomId.m_internal; } - - void Clear(); - - const char* GetInternal() const { return m_internal; } - -private: - MxAtomIdCounter* GetCounter(const char*, LookupMode); - void Destroy(); - - const char* m_internal; // 0x00 -}; - -#endif // MXATOMID_H diff --git a/LEGO1/omni/include/mxbitmap.h b/LEGO1/omni/include/mxbitmap.h index 465b2026..7a106072 100644 --- a/LEGO1/omni/include/mxbitmap.h +++ b/LEGO1/omni/include/mxbitmap.h @@ -82,7 +82,7 @@ class MxBitmap : public MxCore { // https://learn.microsoft.com/en-us/windows/win32/medfound/image-stride inline MxLong AlignToFourByte(MxLong p_value) const { return (p_value + 3) & -4; } - // Same as the one from legoutil.h, but flipped the other way + // Same as the one from legoutils.h, but flipped the other way // TODO: While it's not outside the realm of possibility that they // reimplemented Abs for only this file, that seems odd, right? inline MxLong AbsFlipped(MxLong p_value) const { return p_value > 0 ? p_value : -p_value; } diff --git a/LEGO1/omni/include/mxdsfile.h b/LEGO1/omni/include/mxdsfile.h index b635c896..bd4c74a1 100644 --- a/LEGO1/omni/include/mxdsfile.h +++ b/LEGO1/omni/include/mxdsfile.h @@ -2,7 +2,7 @@ #define MXDSFILE_H #include "mxdssource.h" -#include "mxioinfo.h" +#include "mxio.h" #include "mxstring.h" #include "mxtypes.h" diff --git a/LEGO1/omni/include/mxdsobject.h b/LEGO1/omni/include/mxdsobject.h index c7156004..48702793 100644 --- a/LEGO1/omni/include/mxdsobject.h +++ b/LEGO1/omni/include/mxdsobject.h @@ -2,7 +2,7 @@ #define MXDSOBJECT_H #include "decomp.h" -#include "mxatomid.h" +#include "mxatom.h" #include "mxcore.h" class MxPresenter; diff --git a/LEGO1/omni/include/mxentity.h b/LEGO1/omni/include/mxentity.h index 217fa397..715b8b10 100644 --- a/LEGO1/omni/include/mxentity.h +++ b/LEGO1/omni/include/mxentity.h @@ -2,7 +2,7 @@ #define MXENTITY_H #include "decomp.h" -#include "mxatomid.h" +#include "mxatom.h" #include "mxcore.h" #include "mxdsaction.h" #include "mxtypes.h" diff --git a/LEGO1/omni/include/mxioinfo.h b/LEGO1/omni/include/mxio.h similarity index 91% rename from LEGO1/omni/include/mxioinfo.h rename to LEGO1/omni/include/mxio.h index 7fc3c343..e129ab5d 100644 --- a/LEGO1/omni/include/mxioinfo.h +++ b/LEGO1/omni/include/mxio.h @@ -1,5 +1,5 @@ -#ifndef MXIOINFO_H -#define MXIOINFO_H +#ifndef MXIO_H +#define MXIO_H #include "mxtypes.h" @@ -29,4 +29,4 @@ class MXIOINFO { MMIOINFO m_info; }; -#endif // MXIOINFO_H +#endif // MXIO_H diff --git a/LEGO1/omni/include/mxmisc.h b/LEGO1/omni/include/mxmisc.h new file mode 100644 index 00000000..0e55d147 --- /dev/null +++ b/LEGO1/omni/include/mxmisc.h @@ -0,0 +1,33 @@ +#ifndef MXMISC_H +#define MXMISC_H + +#include "mxtypes.h" + +class MxAtomIdCounterSet; +class MxDSAction; +class MxEventManager; +class MxMusicManager; +class MxNotificationManager; +class MxObjectFactory; +class MxSoundManager; +class MxStreamer; +class MxTickleManager; +class MxTimer; +class MxVariableTable; +class MxVideoManager; + +MxTickleManager* TickleManager(); +MxTimer* Timer(); +MxStreamer* Streamer(); +MxSoundManager* MSoundManager(); +MxVariableTable* VariableTable(); +MxMusicManager* MusicManager(); +MxEventManager* EventManager(); +MxResult Start(MxDSAction*); +MxNotificationManager* NotificationManager(); +MxVideoManager* MVideoManager(); +MxAtomIdCounterSet* AtomIdCounterSet(); +MxObjectFactory* ObjectFactory(); +void DeleteObject(MxDSAction& p_dsAction); + +#endif // MXMISC_H diff --git a/LEGO1/omni/include/mxobjectfactory.h b/LEGO1/omni/include/mxobjectfactory.h index 28301715..882ddc55 100644 --- a/LEGO1/omni/include/mxobjectfactory.h +++ b/LEGO1/omni/include/mxobjectfactory.h @@ -1,7 +1,7 @@ #ifndef MXOBJECTFACTORY_H #define MXOBJECTFACTORY_H -#include "mxatomid.h" +#include "mxatom.h" #include "mxcore.h" #define FOR_MXOBJECTFACTORY_OBJECTS(X) \ diff --git a/LEGO1/omni/include/mxomni.h b/LEGO1/omni/include/mxomni.h index e82bf84f..8cefb099 100644 --- a/LEGO1/omni/include/mxomni.h +++ b/LEGO1/omni/include/mxomni.h @@ -5,9 +5,9 @@ #include "mxcriticalsection.h" #include "mxstring.h" -class MxAtomId; class MxAtomIdCounterSet; class MxDSAction; +class MxEntity; class MxEventManager; class MxMusicManager; class MxNotificationManager; @@ -17,12 +17,11 @@ class MxOmniCreateParam; class MxPresenter; class MxSoundManager; class MxStreamer; +class MxStreamController; class MxTickleManager; class MxTimer; class MxVariableTable; class MxVideoManager; -class MxEntity; -class MxStreamController; // VTABLE: LEGO1 0x100dc168 // SIZE 0x68 @@ -96,19 +95,4 @@ class MxOmni : public MxCore { MxBool m_timerRunning; // 0x64 }; -MxTickleManager* TickleManager(); -MxTimer* Timer(); -MxStreamer* Streamer(); -MxSoundManager* MSoundManager(); -MxVariableTable* VariableTable(); -MxMusicManager* MusicManager(); -MxEventManager* EventManager(); -MxResult Start(MxDSAction*); -MxNotificationManager* NotificationManager(); - -MxVideoManager* MVideoManager(); -MxAtomIdCounterSet* AtomIdCounterSet(); -MxObjectFactory* ObjectFactory(); -void DeleteObject(MxDSAction& p_dsAction); - #endif // MXOMNI_H diff --git a/LEGO1/omni/include/mxpresenter.h b/LEGO1/omni/include/mxpresenter.h index 62090b7f..2448d952 100644 --- a/LEGO1/omni/include/mxpresenter.h +++ b/LEGO1/omni/include/mxpresenter.h @@ -5,7 +5,6 @@ #include "mxcore.h" #include "mxcriticalsection.h" #include "mxdsaction.h" -#include "mxomni.h" #include "mxpoint32.h" class MxCompositePresenter; diff --git a/LEGO1/omni/include/mxsoundmanager.h b/LEGO1/omni/include/mxsoundmanager.h index 6dde7d5c..24e7111a 100644 --- a/LEGO1/omni/include/mxsoundmanager.h +++ b/LEGO1/omni/include/mxsoundmanager.h @@ -2,7 +2,7 @@ #define MXSOUNDMANAGER_H #include "decomp.h" -#include "mxatomid.h" +#include "mxatom.h" #include "mxaudiomanager.h" #include diff --git a/LEGO1/omni/include/mxsoundpresenter.h b/LEGO1/omni/include/mxsoundpresenter.h index 1281b2be..3f578109 100644 --- a/LEGO1/omni/include/mxsoundpresenter.h +++ b/LEGO1/omni/include/mxsoundpresenter.h @@ -2,7 +2,6 @@ #define MXSOUNDPRESENTER_H #include "mxaudiopresenter.h" -#include "mxomni.h" // VTABLE: LEGO1 0x100d4b08 // SIZE 0x54 diff --git a/LEGO1/omni/include/mxstreamcontroller.h b/LEGO1/omni/include/mxstreamcontroller.h index f4bd328f..b623d28f 100644 --- a/LEGO1/omni/include/mxstreamcontroller.h +++ b/LEGO1/omni/include/mxstreamcontroller.h @@ -2,7 +2,7 @@ #define MXSTREAMCONTROLLER_H #include "decomp.h" -#include "mxatomid.h" +#include "mxatom.h" #include "mxcore.h" #include "mxcriticalsection.h" #include "mxdsaction.h" diff --git a/LEGO1/omni/include/mxutil.h b/LEGO1/omni/include/mxutilities.h similarity index 96% rename from LEGO1/omni/include/mxutil.h rename to LEGO1/omni/include/mxutilities.h index 801ca3c1..5959518c 100644 --- a/LEGO1/omni/include/mxutil.h +++ b/LEGO1/omni/include/mxutilities.h @@ -1,5 +1,5 @@ -#ifndef MXUTIL_H -#define MXUTIL_H +#ifndef MXUTILITIES_H +#define MXUTILITIES_H #include "mxtypes.h" @@ -77,7 +77,6 @@ void SetOmniUserMessage(void (*p_omniUserMessage)(const char*, MxS32)); MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter); void FUN_100b7220(MxDSAction* p_action, MxU32 p_newFlags, MxBool p_setFlags); MxDSObject* CreateStreamObject(MxDSFile*, MxS16); - MxBool KeyValueStringParse(char*, const char*, const char*); -#endif // MXUTIL_H +#endif // MXUTILITIES_H diff --git a/LEGO1/omni/src/action/mxdsaction.cpp b/LEGO1/omni/src/action/mxdsaction.cpp index fde95329..0a72abd8 100644 --- a/LEGO1/omni/src/action/mxdsaction.cpp +++ b/LEGO1/omni/src/action/mxdsaction.cpp @@ -1,8 +1,8 @@ #include "mxdsaction.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxtimer.h" -#include "mxutil.h" +#include "mxutilities.h" #include #include diff --git a/LEGO1/omni/src/action/mxdsmediaaction.cpp b/LEGO1/omni/src/action/mxdsmediaaction.cpp index c563b380..26699fcb 100644 --- a/LEGO1/omni/src/action/mxdsmediaaction.cpp +++ b/LEGO1/omni/src/action/mxdsmediaaction.cpp @@ -1,6 +1,6 @@ #include "mxdsmediaaction.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxDSMediaAction, 0xb8) diff --git a/LEGO1/omni/src/action/mxdsobject.cpp b/LEGO1/omni/src/action/mxdsobject.cpp index 9bbdf195..c0db27d9 100644 --- a/LEGO1/omni/src/action/mxdsobject.cpp +++ b/LEGO1/omni/src/action/mxdsobject.cpp @@ -11,7 +11,7 @@ #include "mxdsserialaction.h" #include "mxdssound.h" #include "mxdsstill.h" -#include "mxutil.h" +#include "mxutilities.h" #include #include diff --git a/LEGO1/omni/src/action/mxdsselectaction.cpp b/LEGO1/omni/src/action/mxdsselectaction.cpp index 97e9ff73..2a3e7ca2 100644 --- a/LEGO1/omni/src/action/mxdsselectaction.cpp +++ b/LEGO1/omni/src/action/mxdsselectaction.cpp @@ -1,6 +1,6 @@ #include "mxdsselectaction.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxtimer.h" #include "mxvariabletable.h" diff --git a/LEGO1/omni/src/action/mxdssound.cpp b/LEGO1/omni/src/action/mxdssound.cpp index e75ad0c9..d2075dbd 100644 --- a/LEGO1/omni/src/action/mxdssound.cpp +++ b/LEGO1/omni/src/action/mxdssound.cpp @@ -1,6 +1,6 @@ #include "mxdssound.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxDSSound, 0xc0) diff --git a/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp b/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp index c7f4ea1c..51c305fe 100644 --- a/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp +++ b/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp @@ -2,8 +2,8 @@ #include "decomp.h" #include "mxdssound.h" +#include "mxmisc.h" #include "mxmusicmanager.h" -#include "mxomni.h" DECOMP_SIZE_ASSERT(MxLoopingMIDIPresenter, 0x58); diff --git a/LEGO1/omni/src/audio/mxmidipresenter.cpp b/LEGO1/omni/src/audio/mxmidipresenter.cpp index 91e5ba60..361481fc 100644 --- a/LEGO1/omni/src/audio/mxmidipresenter.cpp +++ b/LEGO1/omni/src/audio/mxmidipresenter.cpp @@ -3,6 +3,7 @@ #include "decomp.h" #include "mxautolocker.h" #include "mxdssound.h" +#include "mxmisc.h" #include "mxmusicmanager.h" DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58); diff --git a/LEGO1/omni/src/audio/mxmusicmanager.cpp b/LEGO1/omni/src/audio/mxmusicmanager.cpp index 23562678..59c8f841 100644 --- a/LEGO1/omni/src/audio/mxmusicmanager.cpp +++ b/LEGO1/omni/src/audio/mxmusicmanager.cpp @@ -1,6 +1,6 @@ #include "mxmusicmanager.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxticklemanager.h" #include diff --git a/LEGO1/omni/src/audio/mxmusicpresenter.cpp b/LEGO1/omni/src/audio/mxmusicpresenter.cpp index 437cd52d..9f327ae4 100644 --- a/LEGO1/omni/src/audio/mxmusicpresenter.cpp +++ b/LEGO1/omni/src/audio/mxmusicpresenter.cpp @@ -1,8 +1,8 @@ #include "mxmusicpresenter.h" #include "decomp.h" +#include "mxmisc.h" #include "mxmusicmanager.h" -#include "mxomni.h" DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54); diff --git a/LEGO1/omni/src/audio/mxsoundmanager.cpp b/LEGO1/omni/src/audio/mxsoundmanager.cpp index 55055107..05514898 100644 --- a/LEGO1/omni/src/audio/mxsoundmanager.cpp +++ b/LEGO1/omni/src/audio/mxsoundmanager.cpp @@ -2,6 +2,7 @@ #include "define.h" #include "mxautolocker.h" +#include "mxmisc.h" #include "mxomni.h" #include "mxpresenter.h" #include "mxticklemanager.h" diff --git a/LEGO1/omni/src/audio/mxsoundpresenter.cpp b/LEGO1/omni/src/audio/mxsoundpresenter.cpp index 60459d2c..aa0435a2 100644 --- a/LEGO1/omni/src/audio/mxsoundpresenter.cpp +++ b/LEGO1/omni/src/audio/mxsoundpresenter.cpp @@ -1,6 +1,7 @@ #include "mxsoundpresenter.h" #include "decomp.h" +#include "mxmisc.h" #include "mxsoundmanager.h" DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54) diff --git a/LEGO1/omni/src/audio/mxwavepresenter.cpp b/LEGO1/omni/src/audio/mxwavepresenter.cpp index 50f25853..af32e4dd 100644 --- a/LEGO1/omni/src/audio/mxwavepresenter.cpp +++ b/LEGO1/omni/src/audio/mxwavepresenter.cpp @@ -4,9 +4,10 @@ #include "define.h" #include "mxautolocker.h" #include "mxdssound.h" +#include "mxmisc.h" #include "mxomni.h" #include "mxsoundmanager.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c); DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x18); diff --git a/LEGO1/omni/src/common/mxatomid.cpp b/LEGO1/omni/src/common/mxatom.cpp similarity index 85% rename from LEGO1/omni/src/common/mxatomid.cpp rename to LEGO1/omni/src/common/mxatom.cpp index 94decf7e..217ab3d4 100644 --- a/LEGO1/omni/src/common/mxatomid.cpp +++ b/LEGO1/omni/src/common/mxatom.cpp @@ -1,7 +1,13 @@ -#include "mxatomid.h" +#include "mxatom.h" +#include "decomp.h" +#include "mxmisc.h" #include "mxomni.h" +DECOMP_SIZE_ASSERT(MxAtomId, 0x04); +DECOMP_SIZE_ASSERT(MxAtomIdCounter, 0x14); +DECOMP_SIZE_ASSERT(MxAtomIdCounterSet, 0x10); + // FUNCTION: LEGO1 0x100acf90 MxAtomId::MxAtomId(const char* p_str, LookupMode p_mode) { @@ -107,3 +113,17 @@ void MxAtomId::Clear() Destroy(); m_internal = NULL; } + +// FUNCTION: LEGO1 0x100ad7f0 +void MxAtomIdCounter::Inc() +{ + m_value++; +} + +// FUNCTION: LEGO1 0x100ad800 +void MxAtomIdCounter::Dec() +{ + if (m_value) { + m_value--; + } +} diff --git a/LEGO1/omni/src/common/mxatomidcounter.cpp b/LEGO1/omni/src/common/mxatomidcounter.cpp deleted file mode 100644 index cfec47b1..00000000 --- a/LEGO1/omni/src/common/mxatomidcounter.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "mxatomidcounter.h" - -#include "decomp.h" - -DECOMP_SIZE_ASSERT(MxAtomIdCounter, 0x14); -DECOMP_SIZE_ASSERT(MxAtomIdCounterSet, 0x10); - -// FUNCTION: LEGO1 0x100ad7f0 -void MxAtomIdCounter::Inc() -{ - m_value++; -} - -// FUNCTION: LEGO1 0x100ad800 -void MxAtomIdCounter::Dec() -{ - if (m_value) { - m_value--; - } -} diff --git a/LEGO1/omni/src/common/mxcompositepresenter.cpp b/LEGO1/omni/src/common/mxcompositepresenter.cpp index 7e3c75f1..043af4ea 100644 --- a/LEGO1/omni/src/common/mxcompositepresenter.cpp +++ b/LEGO1/omni/src/common/mxcompositepresenter.cpp @@ -3,6 +3,7 @@ #include "decomp.h" #include "mxautolocker.h" #include "mxdsmultiaction.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" diff --git a/LEGO1/omni/src/common/mxmediapresenter.cpp b/LEGO1/omni/src/common/mxmediapresenter.cpp index b0a11c1b..5f162c71 100644 --- a/LEGO1/omni/src/common/mxmediapresenter.cpp +++ b/LEGO1/omni/src/common/mxmediapresenter.cpp @@ -3,6 +3,7 @@ #include "mxactionnotificationparam.h" #include "mxautolocker.h" #include "mxcompositepresenter.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxstreamchunk.h" #include "mxtimer.h" diff --git a/LEGO1/omni/src/common/mxmisc.cpp b/LEGO1/omni/src/common/mxmisc.cpp new file mode 100644 index 00000000..34c71679 --- /dev/null +++ b/LEGO1/omni/src/common/mxmisc.cpp @@ -0,0 +1,81 @@ +#include "mxmisc.h" + +#include "mxomni.h" + +// FUNCTION: LEGO1 0x100acea0 +MxObjectFactory* ObjectFactory() +{ + return MxOmni::GetInstance()->GetObjectFactory(); +} + +// FUNCTION: LEGO1 0x100aceb0 +MxNotificationManager* NotificationManager() +{ + return MxOmni::GetInstance()->GetNotificationManager(); +} + +// FUNCTION: LEGO1 0x100acec0 +MxTickleManager* TickleManager() +{ + return MxOmni::GetInstance()->GetTickleManager(); +} + +// FUNCTION: LEGO1 0x100aced0 +MxTimer* Timer() +{ + return MxOmni::GetInstance()->GetTimer(); +} + +// FUNCTION: LEGO1 0x100acee0 +MxAtomIdCounterSet* AtomIdCounterSet() +{ + return MxOmni::GetInstance()->GetAtomIdCounterSet(); +} + +// FUNCTION: LEGO1 0x100acef0 +MxStreamer* Streamer() +{ + return MxOmni::GetInstance()->GetStreamer(); +} + +// FUNCTION: LEGO1 0x100acf00 +MxSoundManager* MSoundManager() +{ + return MxOmni::GetInstance()->GetSoundManager(); +} + +// FUNCTION: LEGO1 0x100acf10 +MxVideoManager* MVideoManager() +{ + return MxOmni::GetInstance()->GetVideoManager(); +} + +// FUNCTION: LEGO1 0x100acf20 +MxVariableTable* VariableTable() +{ + return MxOmni::GetInstance()->GetVariableTable(); +} + +// FUNCTION: LEGO1 0x100acf30 +MxMusicManager* MusicManager() +{ + return MxOmni::GetInstance()->GetMusicManager(); +} + +// FUNCTION: LEGO1 0x100acf40 +MxEventManager* EventManager() +{ + return MxOmni::GetInstance()->GetEventManager(); +} + +// FUNCTION: LEGO1 0x100acf50 +MxResult Start(MxDSAction* p_dsAction) +{ + return MxOmni::GetInstance()->Start(p_dsAction); +} + +// FUNCTION: LEGO1 0x100acf70 +void DeleteObject(MxDSAction& p_dsAction) +{ + MxOmni::GetInstance()->DeleteObject(p_dsAction); +} diff --git a/LEGO1/omni/src/common/mxpresenter.cpp b/LEGO1/omni/src/common/mxpresenter.cpp index 96389b5f..1c81764e 100644 --- a/LEGO1/omni/src/common/mxpresenter.cpp +++ b/LEGO1/omni/src/common/mxpresenter.cpp @@ -8,11 +8,13 @@ #include "mxdsanim.h" #include "mxdssound.h" #include "mxentity.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" +#include "mxomni.h" #include "mxparam.h" #include "mxstreamer.h" -#include "mxutil.h" +#include "mxutilities.h" #include diff --git a/LEGO1/omni/src/common/mxticklemanager.cpp b/LEGO1/omni/src/common/mxticklemanager.cpp index 8ce0b492..59fae3f3 100644 --- a/LEGO1/omni/src/common/mxticklemanager.cpp +++ b/LEGO1/omni/src/common/mxticklemanager.cpp @@ -1,7 +1,7 @@ #include "mxticklemanager.h" #include "decomp.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxtimer.h" #include "mxtypes.h" diff --git a/LEGO1/omni/src/common/mxutil.cpp b/LEGO1/omni/src/common/mxutilities.cpp similarity index 99% rename from LEGO1/omni/src/common/mxutil.cpp rename to LEGO1/omni/src/common/mxutilities.cpp index fea13f12..052ab57c 100644 --- a/LEGO1/omni/src/common/mxutil.cpp +++ b/LEGO1/omni/src/common/mxutilities.cpp @@ -1,4 +1,4 @@ -#include "mxutil.h" +#include "mxutilities.h" #include "mxcompositepresenter.h" #include "mxdsaction.h" diff --git a/LEGO1/omni/src/event/mxeventmanager.cpp b/LEGO1/omni/src/event/mxeventmanager.cpp index c0ee3229..7e269ce6 100644 --- a/LEGO1/omni/src/event/mxeventmanager.cpp +++ b/LEGO1/omni/src/event/mxeventmanager.cpp @@ -1,7 +1,7 @@ #include "mxeventmanager.h" #include "mxcriticalsection.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxthread.h" #include "mxticklemanager.h" diff --git a/LEGO1/omni/src/event/mxeventpresenter.cpp b/LEGO1/omni/src/event/mxeventpresenter.cpp index 9652ca9a..90d5ceee 100644 --- a/LEGO1/omni/src/event/mxeventpresenter.cpp +++ b/LEGO1/omni/src/event/mxeventpresenter.cpp @@ -3,7 +3,7 @@ #include "decomp.h" #include "mxautolocker.h" #include "mxeventmanager.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxvariabletable.h" DECOMP_SIZE_ASSERT(MxEventPresenter, 0x54); diff --git a/LEGO1/omni/src/main/mxomni.cpp b/LEGO1/omni/src/main/mxomni.cpp index cf29d3be..b85efed6 100644 --- a/LEGO1/omni/src/main/mxomni.cpp +++ b/LEGO1/omni/src/main/mxomni.cpp @@ -1,10 +1,11 @@ #include "mxomni.h" #include "mxactionnotificationparam.h" -#include "mxatomidcounter.h" +#include "mxatom.h" #include "mxautolocker.h" #include "mxdsmultiaction.h" #include "mxeventmanager.h" +#include "mxmisc.h" #include "mxmusicmanager.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" @@ -28,84 +29,6 @@ MxBool g_use3dSound = FALSE; // GLOBAL: LEGO1 0x101015b0 MxOmni* MxOmni::g_instance = NULL; -// FUNCTION: LEGO1 0x100acea0 -MxObjectFactory* ObjectFactory() -{ - return MxOmni::GetInstance()->GetObjectFactory(); -} - -// FUNCTION: LEGO1 0x100aceb0 -MxNotificationManager* NotificationManager() -{ - return MxOmni::GetInstance()->GetNotificationManager(); -} - -// FUNCTION: LEGO1 0x100acec0 -MxTickleManager* TickleManager() -{ - return MxOmni::GetInstance()->GetTickleManager(); -} - -// FUNCTION: LEGO1 0x100aced0 -MxTimer* Timer() -{ - return MxOmni::GetInstance()->GetTimer(); -} - -// FUNCTION: LEGO1 0x100acee0 -MxAtomIdCounterSet* AtomIdCounterSet() -{ - return MxOmni::GetInstance()->GetAtomIdCounterSet(); -} - -// FUNCTION: LEGO1 0x100acef0 -MxStreamer* Streamer() -{ - return MxOmni::GetInstance()->GetStreamer(); -} - -// FUNCTION: LEGO1 0x100acf00 -MxSoundManager* MSoundManager() -{ - return MxOmni::GetInstance()->GetSoundManager(); -} - -// FUNCTION: LEGO1 0x100acf10 -MxVideoManager* MVideoManager() -{ - return MxOmni::GetInstance()->GetVideoManager(); -} - -// FUNCTION: LEGO1 0x100acf20 -MxVariableTable* VariableTable() -{ - return MxOmni::GetInstance()->GetVariableTable(); -} - -// FUNCTION: LEGO1 0x100acf30 -MxMusicManager* MusicManager() -{ - return MxOmni::GetInstance()->GetMusicManager(); -} - -// FUNCTION: LEGO1 0x100acf40 -MxEventManager* EventManager() -{ - return MxOmni::GetInstance()->GetEventManager(); -} - -// FUNCTION: LEGO1 0x100acf50 -MxResult Start(MxDSAction* p_dsAction) -{ - return MxOmni::GetInstance()->Start(p_dsAction); -} - -// FUNCTION: LEGO1 0x100acf70 -void DeleteObject(MxDSAction& p_dsAction) -{ - MxOmni::GetInstance()->DeleteObject(p_dsAction); -} - // FUNCTION: LEGO1 0x100aef10 MxOmni::MxOmni() { diff --git a/LEGO1/omni/src/notify/mxnotificationmanager.cpp b/LEGO1/omni/src/notify/mxnotificationmanager.cpp index fe10a82c..48429dfc 100644 --- a/LEGO1/omni/src/notify/mxnotificationmanager.cpp +++ b/LEGO1/omni/src/notify/mxnotificationmanager.cpp @@ -3,7 +3,7 @@ #include "compat.h" #include "decomp.h" #include "mxautolocker.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxparam.h" #include "mxticklemanager.h" #include "mxtypes.h" diff --git a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp index a2b2edf9..1ce82edc 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp @@ -4,6 +4,7 @@ #include "mxautolocker.h" #include "mxdiskstreamprovider.h" #include "mxdsstreamingaction.h" +#include "mxmisc.h" #include "mxomni.h" #include "mxticklemanager.h" diff --git a/LEGO1/omni/src/stream/mxdsbuffer.cpp b/LEGO1/omni/src/stream/mxdsbuffer.cpp index 697984e0..a42577c7 100644 --- a/LEGO1/omni/src/stream/mxdsbuffer.cpp +++ b/LEGO1/omni/src/stream/mxdsbuffer.cpp @@ -3,6 +3,7 @@ #include "mxdiskstreamcontroller.h" #include "mxdschunk.h" #include "mxdsstreamingaction.h" +#include "mxmisc.h" #include "mxomni.h" #include "mxstreamchunk.h" #include "mxstreamcontroller.h" diff --git a/LEGO1/omni/src/stream/mxioinfo.cpp b/LEGO1/omni/src/stream/mxio.cpp similarity index 99% rename from LEGO1/omni/src/stream/mxioinfo.cpp rename to LEGO1/omni/src/stream/mxio.cpp index ec666c31..e2e6e723 100644 --- a/LEGO1/omni/src/stream/mxioinfo.cpp +++ b/LEGO1/omni/src/stream/mxio.cpp @@ -1,4 +1,4 @@ -#include "mxioinfo.h" +#include "mxio.h" #include "decomp.h" diff --git a/LEGO1/omni/src/stream/mxstreamchunk.cpp b/LEGO1/omni/src/stream/mxstreamchunk.cpp index 9d30e70d..9d5d0fe4 100644 --- a/LEGO1/omni/src/stream/mxstreamchunk.cpp +++ b/LEGO1/omni/src/stream/mxstreamchunk.cpp @@ -2,7 +2,7 @@ #include "mxdsbuffer.h" #include "mxstreamlist.h" -#include "mxutil.h" +#include "mxutilities.h" // FUNCTION: LEGO1 0x100c2fe0 MxStreamChunk::~MxStreamChunk() diff --git a/LEGO1/omni/src/stream/mxstreamcontroller.cpp b/LEGO1/omni/src/stream/mxstreamcontroller.cpp index 977db130..bcad399d 100644 --- a/LEGO1/omni/src/stream/mxstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxstreamcontroller.cpp @@ -3,12 +3,12 @@ #include "mxautolocker.h" #include "mxdsmultiaction.h" #include "mxdsstreamingaction.h" +#include "mxmisc.h" #include "mxnextactiondatastart.h" -#include "mxomni.h" #include "mxstl/stlcompat.h" #include "mxstreamchunk.h" #include "mxtimer.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxStreamController, 0x64) DECOMP_SIZE_ASSERT(MxNextActionDataStart, 0x14) diff --git a/LEGO1/omni/src/stream/mxstreamer.cpp b/LEGO1/omni/src/stream/mxstreamer.cpp index 76aa7862..1cede5a7 100644 --- a/LEGO1/omni/src/stream/mxstreamer.cpp +++ b/LEGO1/omni/src/stream/mxstreamer.cpp @@ -1,8 +1,8 @@ #include "mxstreamer.h" #include "mxdiskstreamcontroller.h" +#include "mxmisc.h" #include "mxnotificationmanager.h" -#include "mxomni.h" #include "mxramstreamcontroller.h" #include diff --git a/LEGO1/omni/src/system/mxthread.cpp b/LEGO1/omni/src/system/mxthread.cpp index 14c4ea82..fe327f2d 100644 --- a/LEGO1/omni/src/system/mxthread.cpp +++ b/LEGO1/omni/src/system/mxthread.cpp @@ -1,7 +1,7 @@ #include "mxthread.h" #include "decomp.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxtimer.h" #include diff --git a/LEGO1/omni/src/video/mxbitmap.cpp b/LEGO1/omni/src/video/mxbitmap.cpp index 98f1f6b2..983dece4 100644 --- a/LEGO1/omni/src/video/mxbitmap.cpp +++ b/LEGO1/omni/src/video/mxbitmap.cpp @@ -1,7 +1,7 @@ #include "mxbitmap.h" #include "decomp.h" -#include "mxutil.h" +#include "mxutilities.h" DECOMP_SIZE_ASSERT(MxBitmap, 0x20); DECOMP_SIZE_ASSERT(MxBITMAPINFO, 0x428); diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index 4f4a8030..c599b131 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -1,6 +1,8 @@ #include "mxdisplaysurface.h" -#include "mxutil.h" +#include "mxmisc.h" +#include "mxomni.h" +#include "mxutilities.h" #include "mxvideomanager.h" #include diff --git a/LEGO1/omni/src/video/mxflcpresenter.cpp b/LEGO1/omni/src/video/mxflcpresenter.cpp index da7441a8..64d3d4b9 100644 --- a/LEGO1/omni/src/video/mxflcpresenter.cpp +++ b/LEGO1/omni/src/video/mxflcpresenter.cpp @@ -3,7 +3,7 @@ #include "decomp.h" #include "mxbitmap.h" #include "mxdsmediaaction.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxpalette.h" #include "mxvideomanager.h" diff --git a/LEGO1/omni/src/video/mxpalette.cpp b/LEGO1/omni/src/video/mxpalette.cpp index 6a677b90..f3a3e599 100644 --- a/LEGO1/omni/src/video/mxpalette.cpp +++ b/LEGO1/omni/src/video/mxpalette.cpp @@ -1,6 +1,6 @@ #include "mxpalette.h" -#include "mxomni.h" +#include "mxmisc.h" #include "mxvideomanager.h" // GLOBAL: LEGO1 0x10102188 diff --git a/LEGO1/omni/src/video/mxsmkpresenter.cpp b/LEGO1/omni/src/video/mxsmkpresenter.cpp index 8bb2ed6f..9461d90a 100644 --- a/LEGO1/omni/src/video/mxsmkpresenter.cpp +++ b/LEGO1/omni/src/video/mxsmkpresenter.cpp @@ -2,6 +2,7 @@ #include "decomp.h" #include "mxdsmediaaction.h" +#include "mxmisc.h" #include "mxvideomanager.h" DECOMP_SIZE_ASSERT(MxSmkPresenter, 0x720); diff --git a/LEGO1/omni/src/video/mxstillpresenter.cpp b/LEGO1/omni/src/video/mxstillpresenter.cpp index 560e62e6..4093dabe 100644 --- a/LEGO1/omni/src/video/mxstillpresenter.cpp +++ b/LEGO1/omni/src/video/mxstillpresenter.cpp @@ -4,8 +4,9 @@ #include "define.h" #include "mxcompositepresenter.h" #include "mxdsmediaaction.h" +#include "mxmisc.h" #include "mxomni.h" -#include "mxutil.h" +#include "mxutilities.h" #include "mxvideomanager.h" DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c); diff --git a/LEGO1/omni/src/video/mxvideomanager.cpp b/LEGO1/omni/src/video/mxvideomanager.cpp index f2c9ddfa..8e414480 100644 --- a/LEGO1/omni/src/video/mxvideomanager.cpp +++ b/LEGO1/omni/src/video/mxvideomanager.cpp @@ -1,6 +1,8 @@ #include "mxvideomanager.h" #include "mxautolocker.h" +#include "mxmisc.h" +#include "mxomni.h" #include "mxpresenter.h" #include "mxticklemanager.h" diff --git a/LEGO1/omni/src/video/mxvideopresenter.cpp b/LEGO1/omni/src/video/mxvideopresenter.cpp index a30b811b..e1ab5837 100644 --- a/LEGO1/omni/src/video/mxvideopresenter.cpp +++ b/LEGO1/omni/src/video/mxvideopresenter.cpp @@ -2,6 +2,7 @@ #include "mxautolocker.h" #include "mxdsmediaaction.h" +#include "mxmisc.h" #include "mxregioncursor.h" #include "mxvideomanager.h"