From 33f92cacff4920055913a9980a9b719e6cc2f634 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 10:03:51 -0700 Subject: [PATCH 1/6] Initial changes for ordering, Score --- CMakeLists.txt | 323 +++++++++++------------ LEGO1/lego/legoomni/include/score.h | 4 +- LEGO1/lego/legoomni/src/worlds/score.cpp | 6 - LEGO1/lego/sources/misc/legocontainer.h | 4 +- 4 files changed, 165 insertions(+), 172 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fddedcabc2..61929c5d49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,86 +207,81 @@ function(add_lego_libraries NAME) target_link_libraries(3dmanager${ARG_SUFFIX} PRIVATE Vec::Vec) add_library(omni${ARG_SUFFIX} STATIC + LEGO1/omni/src/notify/mxnotificationmanager.cpp + LEGO1/omni/src/common/mxmisc.cpp + LEGO1/omni/src/common/mxatom.cpp LEGO1/omni/src/action/mxdsaction.cpp - LEGO1/omni/src/action/mxdsanim.cpp - LEGO1/omni/src/action/mxdsevent.cpp - LEGO1/omni/src/action/mxdsmediaaction.cpp - LEGO1/omni/src/action/mxdsmultiaction.cpp - LEGO1/omni/src/action/mxdsobjectaction.cpp - LEGO1/omni/src/action/mxdsobject.cpp - LEGO1/omni/src/action/mxdsparallelaction.cpp - LEGO1/omni/src/action/mxdsselectaction.cpp - LEGO1/omni/src/action/mxdsserialaction.cpp - LEGO1/omni/src/action/mxdssound.cpp - LEGO1/omni/src/action/mxdsstill.cpp - LEGO1/omni/src/action/mxdsstreamingaction.cpp - LEGO1/omni/src/audio/mxaudiomanager.cpp - LEGO1/omni/src/audio/mxaudiopresenter.cpp - LEGO1/omni/src/audio/mxloopingmidipresenter.cpp - LEGO1/omni/src/audio/mxmidipresenter.cpp - LEGO1/omni/src/audio/mxmusicmanager.cpp - LEGO1/omni/src/audio/mxmusicpresenter.cpp + LEGO1/omni/src/common/mxtimer.cpp + LEGO1/omni/src/common/mxcore.cpp + LEGO1/omni/src/common/mxstring.cpp LEGO1/omni/src/audio/mxsoundmanager.cpp + LEGO1/omni/src/main/mxomni.cpp + LEGO1/omni/src/notify/mxactionnotificationparam.cpp + LEGO1/omni/src/main/mxomnicreateflags.cpp + LEGO1/omni/src/main/mxomnicreateparam.cpp + LEGO1/omni/src/common/mxobjectfactory.cpp LEGO1/omni/src/audio/mxsoundpresenter.cpp LEGO1/omni/src/audio/mxwavepresenter.cpp - LEGO1/omni/src/common/mxatom.cpp - LEGO1/omni/src/common/mxcompositepresenter.cpp - LEGO1/omni/src/common/mxcore.cpp - LEGO1/omni/src/common/mxdebug.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/video/mxvideopresenter.cpp + LEGO1/omni/src/video/mxflcpresenter.cpp + LEGO1/omni/src/video/mxsmkpresenter.cpp + LEGO1/omni/src/video/mxloopingflcpresenter.cpp + LEGO1/omni/src/video/mxloopingsmkpresenter.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/mxmediapresenter.cpp + LEGO1/omni/src/common/mxcompositepresenter.cpp + LEGO1/omni/src/system/mxcriticalsection.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 - LEGO1/omni/src/event/mxeventmanager.cpp - LEGO1/omni/src/event/mxeventpresenter.cpp - LEGO1/omni/src/main/mxomni.cpp - LEGO1/omni/src/main/mxomnicreateflags.cpp - LEGO1/omni/src/main/mxomnicreateparam.cpp - LEGO1/omni/src/notify/mxactionnotificationparam.cpp - LEGO1/omni/src/notify/mxnotificationmanager.cpp - LEGO1/omni/src/notify/mxnotificationparam.cpp - LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp - LEGO1/omni/src/stream/mxdiskstreamprovider.cpp - LEGO1/omni/src/stream/mxdsbuffer.cpp - LEGO1/omni/src/stream/mxdschunk.cpp - LEGO1/omni/src/stream/mxdsfile.cpp LEGO1/omni/src/stream/mxdssubscriber.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 - LEGO1/omni/src/stream/mxstreamcontroller.cpp - LEGO1/omni/src/stream/mxstreamer.cpp - LEGO1/omni/src/system/mxautolock.cpp - LEGO1/omni/src/system/mxcriticalsection.cpp - LEGO1/omni/src/system/mxscheduler.cpp - LEGO1/omni/src/system/mxsemaphore.cpp - LEGO1/omni/src/system/mxthread.cpp + LEGO1/omni/src/common/mxmediamanager.cpp LEGO1/omni/src/system/mxticklethread.cpp - LEGO1/omni/src/video/flic.cpp - LEGO1/omni/src/video/mxbitmap.cpp + LEGO1/omni/src/audio/mxaudiomanager.cpp + LEGO1/omni/src/system/mxautolock.cpp + LEGO1/omni/src/stream/mxstreamer.cpp + LEGO1/omni/src/video/mxstillpresenter.cpp LEGO1/omni/src/video/mxdisplaysurface.cpp - LEGO1/omni/src/video/mxflcpresenter.cpp - LEGO1/omni/src/video/mxloopingflcpresenter.cpp - LEGO1/omni/src/video/mxloopingsmkpresenter.cpp + LEGO1/omni/src/video/mxbitmap.cpp + LEGO1/omni/src/video/flic.cpp + LEGO1/omni/src/common/mxticklemanager.cpp + LEGO1/omni/src/stream/mxdschunk.cpp + LEGO1/omni/src/video/mxvideomanager.cpp + LEGO1/omni/src/video/mxvideoparamflags.cpp + LEGO1/omni/src/video/mxvideoparam.cpp LEGO1/omni/src/video/mxpalette.cpp - LEGO1/omni/src/video/mxregion.cpp + LEGO1/omni/src/system/mxscheduler.cpp + LEGO1/omni/src/system/mxthread.cpp + LEGO1/omni/src/action/mxdsobject.cpp + LEGO1/omni/src/event/mxeventmanager.cpp + LEGO1/omni/src/audio/mxmusicmanager.cpp + LEGO1/omni/src/stream/mxstreamcontroller.cpp + LEGO1/omni/src/audio/mxmusicpresenter.cpp + LEGO1/omni/src/audio/mxmidipresenter.cpp + LEGO1/omni/src/audio/mxloopingmidipresenter.cpp + LEGO1/omni/src/event/mxeventpresenter.cpp + LEGO1/omni/src/stream/mxstreamchunk.cpp LEGO1/omni/src/video/mxregioncursor.cpp + LEGO1/omni/src/video/mxregion.cpp LEGO1/omni/src/video/mxsmack.cpp - LEGO1/omni/src/video/mxsmkpresenter.cpp - LEGO1/omni/src/video/mxstillpresenter.cpp - LEGO1/omni/src/video/mxvideomanager.cpp - LEGO1/omni/src/video/mxvideoparam.cpp - LEGO1/omni/src/video/mxvideoparamflags.cpp - LEGO1/omni/src/video/mxvideopresenter.cpp + LEGO1/omni/src/stream/mxramstreamcontroller.cpp + LEGO1/omni/src/stream/mxdsbuffer.cpp + LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp + LEGO1/omni/src/system/mxsemaphore.cpp + LEGO1/omni/src/action/mxdsobjectaction.cpp + LEGO1/omni/src/action/mxdsmediaaction.cpp + LEGO1/omni/src/action/mxdsanim.cpp + LEGO1/omni/src/action/mxdssound.cpp + LEGO1/omni/src/action/mxdsevent.cpp + LEGO1/omni/src/action/mxdsstill.cpp + LEGO1/omni/src/action/mxdsmultiaction.cpp + LEGO1/omni/src/action/mxdsserialaction.cpp + LEGO1/omni/src/action/mxdsparallelaction.cpp + LEGO1/omni/src/action/mxdsselectaction.cpp + LEGO1/omni/src/stream/mxdsfile.cpp + LEGO1/omni/src/stream/mxio.cpp + LEGO1/omni/src/action/mxdsstreamingaction.cpp + LEGO1/omni/src/stream/mxramstreamprovider.cpp + LEGO1/omni/src/stream/mxdiskstreamprovider.cpp ) list(APPEND list_targets omni${ARG_SUFFIX}) set_property(TARGET omni${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "omni$<$:d>${ARG_SUFFIX}") @@ -294,120 +289,120 @@ function(add_lego_libraries NAME) target_link_libraries(omni${ARG_SUFFIX} PRIVATE dsound winmm Smacker::Smacker) add_library(${NAME} SHARED - LEGO1/define.cpp + LEGO1/lego/legoomni/src/worlds/score.cpp + LEGO1/lego/legoomni/src/actors/helicopter.cpp + LEGO1/lego/legoomni/src/worlds/gasstation.cpp + LEGO1/lego/legoomni/src/audio/legocachsound.cpp LEGO1/lego/legoomni/src/actors/act2actor.cpp - LEGO1/lego/legoomni/src/actors/act2genactor.cpp - LEGO1/lego/legoomni/src/actors/act3actors.cpp - LEGO1/lego/legoomni/src/actors/act3ammo.cpp - LEGO1/lego/legoomni/src/actors/ambulance.cpp - LEGO1/lego/legoomni/src/actors/bike.cpp + LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp + LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp LEGO1/lego/legoomni/src/actors/buildingentity.cpp + LEGO1/lego/legoomni/src/actors/skateboard.cpp + LEGO1/lego/legoomni/src/entity/legoentity.cpp + LEGO1/lego/legoomni/src/audio/lego3dsound.cpp + LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp + LEGO1/lego/legoomni/src/race/legoracers.cpp + LEGO1/lego/legoomni/src/race/legoraceactor.cpp + LEGO1/lego/legoomni/src/common/legostate.cpp LEGO1/lego/legoomni/src/actors/buildings.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/common/misc.cpp + LEGO1/lego/legoomni/src/race/legorace.cpp + LEGO1/lego/legoomni/src/race/jetskirace.cpp + LEGO1/lego/legoomni/src/race/carrace.cpp + LEGO1/lego/legoomni/src/actors/pizzeria.cpp + LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp + LEGO1/lego/legoomni/src/actors/act2genactor.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/paths/legopathstruct.cpp + LEGO1/lego/legoomni/src/paths/legoanimactor.cpp + LEGO1/lego/legoomni/src/entity/legoworld.cpp + LEGO1/lego/legoomni/src/build/legocarbuild.cpp + LEGO1/lego/legoomni/src/actors/ambulance.cpp + LEGO1/lego/legoomni/src/common/legoplantmanager.cpp + LEGO1/lego/legoomni/src/actors/bumpbouy.cpp + LEGO1/modeldb/modeldb.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/control/legocontrolmanager.cpp + LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp + LEGO1/lego/legoomni/src/paths/legoextraactor.cpp + LEGO1/lego/legoomni/src/actors/isleactor.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/lego3dsound.cpp - LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp - LEGO1/lego/legoomni/src/audio/legocachsound.cpp + LEGO1/lego/legoomni/src/entity/legoactor.cpp + LEGO1/lego/legoomni/src/paths/legopathactor.cpp + LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp + LEGO1/lego/legoomni/src/worlds/isle.cpp + LEGO1/lego/legoomni/src/actors/motorcycle.cpp + LEGO1/lego/legoomni/src/actors/act3ammo.cpp LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp - LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp - LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp - LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp - LEGO1/lego/legoomni/src/build/legocarbuild.cpp - LEGO1/lego/legoomni/src/build/legocarbuildpresenter.cpp - LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp - LEGO1/lego/legoomni/src/common/legoactors.cpp - LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp - LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp + LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp + LEGO1/lego/legoomni/src/common/legogamestate.cpp LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp - LEGO1/lego/legoomni/src/common/legobuildingmanager.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/legophoneme.cpp - LEGO1/lego/legoomni/src/common/legoplantmanager.cpp - LEGO1/lego/legoomni/src/common/legoplants.cpp - LEGO1/lego/legoomni/src/common/legostate.cpp - LEGO1/lego/legoomni/src/common/legotextureinfo.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/actors/act3actors.cpp + LEGO1/lego/legoomni/src/control/legometerpresenter.cpp + LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp + LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp + LEGO1/lego/legoomni/src/common/legophoneme.cpp + LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp + LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp + LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp + LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp - LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp - LEGO1/lego/legoomni/src/control/legometerpresenter.cpp - LEGO1/lego/legoomni/src/entity/act2brick.cpp + LEGO1/lego/legoomni/src/actors/towtrack.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/legocameracontroller.cpp - LEGO1/lego/legoomni/src/entity/legoentity.cpp + LEGO1/lego/legoomni/src/video/legophonemepresenter.cpp + LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp + LEGO1/lego/legoomni/src/worlds/legoact2.cpp + LEGO1/lego/legoomni/src/common/legovariables.cpp + LEGO1/lego/legoomni/src/main/scripts.cpp LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp - LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp - LEGO1/lego/legoomni/src/entity/legolocations.cpp LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp - LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp - LEGO1/lego/legoomni/src/entity/legoworld.cpp - LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp - LEGO1/lego/legoomni/src/input/legoinputmanager.cpp - LEGO1/lego/legoomni/src/main/legomain.cpp - LEGO1/lego/legoomni/src/main/scripts.cpp - LEGO1/lego/legoomni/src/notify/legoeventnotificationparam.cpp - LEGO1/lego/legoomni/src/paths/legoanimactor.cpp - LEGO1/lego/legoomni/src/paths/legoextraactor.cpp - LEGO1/lego/legoomni/src/paths/legopathactor.cpp LEGO1/lego/legoomni/src/paths/legopathboundary.cpp - LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp - LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp - LEGO1/lego/legoomni/src/paths/legopathstruct.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/main/legomain.cpp + LEGO1/lego/legoomni/src/input/legoinputmanager.cpp LEGO1/lego/legoomni/src/race/legoracemap.cpp - LEGO1/lego/legoomni/src/race/legoracers.cpp - LEGO1/lego/legoomni/src/race/legoracespecial.cpp - LEGO1/lego/legoomni/src/race/raceskel.cpp - LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp + LEGO1/lego/legoomni/src/worlds/jukebox.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/worlds/police.cpp + LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp + LEGO1/lego/legoomni/src/build/legocarbuildpresenter.cpp + LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp + LEGO1/lego/legoomni/src/common/legotextureinfo.cpp + LEGO1/lego/legoomni/src/actors/doors.cpp + LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp + LEGO1/lego/legoomni/src/actors/dunebuggy.cpp + LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp LEGO1/lego/legoomni/src/video/legoloopinganimpresenter.cpp + LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp + LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp + LEGO1/lego/legoomni/src/worlds/infocenter.cpp + LEGO1/lego/legoomni/src/race/raceskel.cpp + LEGO1/lego/legoomni/src/worlds/act3.cpp LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp + LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp + LEGO1/lego/legoomni/src/worlds/hospital.cpp + LEGO1/lego/legoomni/src/actors/bike.cpp + LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp + LEGO1/lego/legoomni/src/worlds/registrationbook.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/entity/act2brick.cpp LEGO1/lego/legoomni/src/video/legovideomanager.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/video/legopartpresenter.cpp + LEGO1/lego/legoomni/src/actors/jetski.cpp + LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp + LEGO1/lego/legoomni/src/race/legoracespecial.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/lego/legoomni/src/common/legocharactermanager.cpp + LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp LEGO1/main.cpp - LEGO1/modeldb/modeldb.cpp + LEGO1/lego/legoomni/src/entity/legolocations.cpp + LEGO1/lego/legoomni/src/notify/legoeventnotificationparam.cpp + LEGO1/lego/legoomni/src/common/legoactors.cpp + LEGO1/define.cpp + LEGO1/lego/legoomni/src/common/legoplants.cpp ) list(APPEND list_targets ${NAME}) @@ -430,20 +425,20 @@ function(add_lego_libraries NAME) # Link libraries target_link_libraries(${NAME} PRIVATE + dinput + misc${ARG_SUFFIX} + geom${ARG_SUFFIX} + mxdirectx${ARG_SUFFIX} + anim${ARG_SUFFIX} tglrl${ARG_SUFFIX} - viewmanager${ARG_SUFFIX} realtime${ARG_SUFFIX} - mxdirectx${ARG_SUFFIX} + viewmanager${ARG_SUFFIX} roi${ARG_SUFFIX} - geom${ARG_SUFFIX} - anim${ARG_SUFFIX} - Vec::Vec - dinput - dxguid - misc${ARG_SUFFIX} 3dmanager${ARG_SUFFIX} omni${ARG_SUFFIX} shape${ARG_SUFFIX} + Vec::Vec + dxguid ) foreach(tgt IN LISTS list_targets) diff --git a/LEGO1/lego/legoomni/include/score.h b/LEGO1/lego/legoomni/include/score.h index 0d1f9da556..87a63b11f1 100644 --- a/LEGO1/lego/legoomni/include/score.h +++ b/LEGO1/lego/legoomni/include/score.h @@ -59,6 +59,9 @@ class Score : public LegoWorld { ~Score() override; MxLong Notify(MxParam& p_param) override; // vtable+0x04 + // FUNCTION: LEGO1 0x100010b0 + MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c + // FUNCTION: LEGO1 0x100010c0 // FUNCTION: BETA10 0x100f4f20 const char* ClassName() const override // vtable+0x0c @@ -78,7 +81,6 @@ class Score : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x5c() override; // vtable+0x5c MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index e58d57aa05..dd9fc6f70f 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -32,12 +32,6 @@ Score::Score() NotificationManager()->Register(this); } -// FUNCTION: LEGO1 0x100010b0 -MxBool Score::VTable0x5c() -{ - return TRUE; -} - // FUNCTION: LEGO1 0x10001200 Score::~Score() { diff --git a/LEGO1/lego/sources/misc/legocontainer.h b/LEGO1/lego/sources/misc/legocontainer.h index 0fbcb3d544..72db33329f 100644 --- a/LEGO1/lego/sources/misc/legocontainer.h +++ b/LEGO1/lego/sources/misc/legocontainer.h @@ -57,7 +57,6 @@ class LegoContainer { } } - // FUNCTION: BETA10 0x1007bc00 T* Get(const char* p_name) { T* value = NULL; @@ -197,4 +196,7 @@ class LegoTextureContainer : public LegoContainer { // _Tree,map >::_Kfn,LegoContainerInfoComparator,allocator >::_Nil // clang-format on +// TEMPLATE: BETA10 0x1007bc00 +// LegoContainer::Get + #endif // LEGOCONTAINER_H From 04e04363d3eb929112014ccc4445eebc248719bd Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 10:08:46 -0700 Subject: [PATCH 2/6] Add mxdebug --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61929c5d49..9ddb9197ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,6 +208,7 @@ function(add_lego_libraries NAME) add_library(omni${ARG_SUFFIX} STATIC LEGO1/omni/src/notify/mxnotificationmanager.cpp + LEGO1/omni/src/common/mxdebug.cpp LEGO1/omni/src/common/mxmisc.cpp LEGO1/omni/src/common/mxatom.cpp LEGO1/omni/src/action/mxdsaction.cpp From 82c144a2fbcaa878a5e192557c706326f6802f5a Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 11:02:33 -0700 Subject: [PATCH 3/6] Match `Score::Paint` --- LEGO1/lego/legoomni/include/ambulance.h | 10 ++++++++-- LEGO1/lego/legoomni/include/legorace.h | 2 ++ LEGO1/lego/legoomni/include/pizza.h | 1 + LEGO1/lego/legoomni/include/towtrack.h | 10 ++++++++-- LEGO1/lego/legoomni/src/actors/pizza.cpp | 1 + LEGO1/lego/legoomni/src/race/legorace.cpp | 1 + LEGO1/lego/legoomni/src/worlds/score.cpp | 3 ++- 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/LEGO1/lego/legoomni/include/ambulance.h b/LEGO1/lego/legoomni/include/ambulance.h index e6d2a4aa59..0902818892 100644 --- a/LEGO1/lego/legoomni/include/ambulance.h +++ b/LEGO1/lego/legoomni/include/ambulance.h @@ -29,22 +29,28 @@ class AmbulanceMissionState : public LegoState { MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c + // FUNCTION: BETA10 0x10088770 MxS16 GetHighScore(MxU8 p_actorId) { switch (p_actorId) { case LegoActor::c_pepper: return m_peHighScore; + break; case LegoActor::c_mama: return m_maHighScore; + break; case LegoActor::c_papa: return m_paHighScore; + break; case LegoActor::c_nick: return m_niHighScore; + break; case LegoActor::c_laura: return m_laHighScore; - default: - return 0; + break; } + + return 0; } // FUNCTION: BETA10 0x100242d0 diff --git a/LEGO1/lego/legoomni/include/legorace.h b/LEGO1/lego/legoomni/include/legorace.h index 642d26cbb0..43368f9924 100644 --- a/LEGO1/lego/legoomni/include/legorace.h +++ b/LEGO1/lego/legoomni/include/legorace.h @@ -34,6 +34,8 @@ class RaceState : public LegoState { } MxS16 GetUnknown0x02() { return m_unk0x02; } + + // FUNCTION: BETA10 0x10088970 MxS16 GetHighScore() { return m_score; } // FUNCTION: BETA10 0x100c96f0 diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index 771d117862..b08e5310ab 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -148,6 +148,7 @@ class PizzaMissionState : public LegoState { // FUNCTION: BETA10 0x100ef850 MxU32 GetUnknown0xb0() { return m_unk0xb0; } + // FUNCTION: BETA10 0x10088850 MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; } // SYNTHETIC: LEGO1 0x10039350 diff --git a/LEGO1/lego/legoomni/include/towtrack.h b/LEGO1/lego/legoomni/include/towtrack.h index e20e098f64..4bf7d84af0 100644 --- a/LEGO1/lego/legoomni/include/towtrack.h +++ b/LEGO1/lego/legoomni/include/towtrack.h @@ -30,22 +30,28 @@ class TowTrackMissionState : public LegoState { MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c + // FUNCTION: BETA10 0x10088890 MxS16 GetHighScore(MxU8 p_actorId) { switch (p_actorId) { case LegoActor::c_pepper: return m_peHighScore; + break; case LegoActor::c_mama: return m_maHighScore; + break; case LegoActor::c_papa: return m_paHighScore; + break; case LegoActor::c_nick: return m_niHighScore; + break; case LegoActor::c_laura: return m_laHighScore; - default: - return 0; + break; } + + return 0; } // FUNCTION: BETA10 0x100f8530 diff --git a/LEGO1/lego/legoomni/src/actors/pizza.cpp b/LEGO1/lego/legoomni/src/actors/pizza.cpp index 75eababcf6..7fd07808f2 100644 --- a/LEGO1/lego/legoomni/src/actors/pizza.cpp +++ b/LEGO1/lego/legoomni/src/actors/pizza.cpp @@ -624,6 +624,7 @@ MxResult PizzaMissionState::Serialize(LegoFile* p_file) } // FUNCTION: LEGO1 0x10039510 +// FUNCTION: BETA10 0x100eed45 PizzaMissionState::Mission* PizzaMissionState::GetMission(MxU8 p_actorId) { for (MxS16 i = 0; i < 5; i++) { diff --git a/LEGO1/lego/legoomni/src/race/legorace.cpp b/LEGO1/lego/legoomni/src/race/legorace.cpp index c9a878adca..355e291418 100644 --- a/LEGO1/lego/legoomni/src/race/legorace.cpp +++ b/LEGO1/lego/legoomni/src/race/legorace.cpp @@ -165,6 +165,7 @@ MxResult RaceState::Serialize(LegoFile* p_file) } // FUNCTION: LEGO1 0x10016280 +// FUNCTION: BETA10 0x100c7dfd RaceState::Entry* RaceState::GetState(MxU8 p_id) { for (MxS16 i = 0;; i++) { diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index dd9fc6f70f..27e7fa4b69 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -254,7 +254,8 @@ void Score::Paint() memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - if (cube->m_surface->Lock(NULL, &desc, 0, NULL) == DD_OK) { + HRESULT result = cube->m_surface->Lock(NULL, &desc, DDLOCK_SURFACEMEMORYPTR, NULL); + if (result == DD_OK) { if (desc.lPitch != desc.dwWidth) { cube->m_surface->Unlock(desc.lpSurface); return; From 1ed4552924ebc7da75c0cf2173545ee805113c6a Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 11:08:36 -0700 Subject: [PATCH 4/6] Refactor --- CMakeLists.txt | 33 +++++++++---------- LEGO1/lego/legoomni/src/actors/helicopter.cpp | 4 +++ LEGO1/realtime/matrix.cpp | 5 --- LEGO1/realtime/vector.cpp | 7 ---- 4 files changed, 20 insertions(+), 29 deletions(-) delete mode 100644 LEGO1/realtime/matrix.cpp delete mode 100644 LEGO1/realtime/vector.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ddb9197ea..65e55304af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,15 +94,15 @@ function(add_lego_libraries NAME) set(SUFFIX "${ARG_SUFFIX}") add_library(tglrl${ARG_SUFFIX} STATIC - LEGO1/tgl/d3drm/camera.cpp + LEGO1/tgl/d3drm/renderer.cpp + LEGO1/tgl/d3drm/texture.cpp + LEGO1/tgl/d3drm/view.cpp LEGO1/tgl/d3drm/device.cpp LEGO1/tgl/d3drm/group.cpp + LEGO1/tgl/d3drm/camera.cpp LEGO1/tgl/d3drm/light.cpp - LEGO1/tgl/d3drm/mesh.cpp LEGO1/tgl/d3drm/meshbuilder.cpp - LEGO1/tgl/d3drm/renderer.cpp - LEGO1/tgl/d3drm/texture.cpp - LEGO1/tgl/d3drm/view.cpp + LEGO1/tgl/d3drm/mesh.cpp ) list(APPEND list_targets tglrl${ARG_SUFFIX}) set_property(TARGET tglrl${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "tglrl40$<$:d>${ARG_SUFFIX}") @@ -110,11 +110,9 @@ function(add_lego_libraries NAME) target_link_libraries(tglrl${ARG_SUFFIX} PRIVATE d3drm) add_library(realtime${ARG_SUFFIX} STATIC - LEGO1/realtime/matrix.cpp LEGO1/realtime/orientableroi.cpp LEGO1/realtime/realtime.cpp LEGO1/realtime/realtimeview.cpp - LEGO1/realtime/vector.cpp ) list(APPEND list_targets realtime${ARG_SUFFIX}) set_property(TARGET realtime${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "realtime$<$:d>${ARG_SUFFIX}") @@ -123,8 +121,8 @@ function(add_lego_libraries NAME) add_library(viewmanager${ARG_SUFFIX} STATIC LEGO1/viewmanager/viewlod.cpp - LEGO1/viewmanager/viewlodlist.cpp LEGO1/viewmanager/viewmanager.cpp + LEGO1/viewmanager/viewlodlist.cpp LEGO1/viewmanager/viewroi.cpp ) list(APPEND list_targets viewmanager${ARG_SUFFIX}) @@ -134,9 +132,9 @@ function(add_lego_libraries NAME) add_library(mxdirectx${ARG_SUFFIX} STATIC LEGO1/mxdirectx/mxdirect3d.cpp - LEGO1/mxdirectx/mxdirectdraw.cpp LEGO1/mxdirectx/mxdirectxinfo.cpp LEGO1/mxdirectx/legodxinfo.cpp + LEGO1/mxdirectx/mxdirectdraw.cpp ) list(APPEND list_targets mxdirectx${ARG_SUFFIX}) set_property(TARGET mxdirectx${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "MxDirectX$<$:d>${ARG_SUFFIX}") @@ -144,8 +142,8 @@ function(add_lego_libraries NAME) target_link_libraries(mxdirectx${ARG_SUFFIX} PRIVATE ddraw) add_library(roi${ARG_SUFFIX} STATIC - LEGO1/lego/sources/roi/legolod.cpp LEGO1/lego/sources/roi/legoroi.cpp + LEGO1/lego/sources/roi/legolod.cpp ) list(APPEND list_targets roi${ARG_SUFFIX}) set_property(TARGET roi${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "roi$<$:d>${ARG_SUFFIX}") @@ -154,8 +152,8 @@ function(add_lego_libraries NAME) add_library(geom${ARG_SUFFIX} STATIC LEGO1/lego/sources/geom/legoedge.cpp - LEGO1/lego/sources/geom/legounkown100db7f4.cpp LEGO1/lego/sources/geom/legoweedge.cpp + LEGO1/lego/sources/geom/legounkown100db7f4.cpp LEGO1/lego/sources/geom/legowegedge.cpp ) list(APPEND list_targets geom${ARG_SUFFIX}) @@ -164,11 +162,11 @@ function(add_lego_libraries NAME) target_link_libraries(geom${ARG_SUFFIX} PRIVATE) add_library(shape${ARG_SUFFIX} STATIC - LEGO1/lego/sources/shape/legocolor.cpp LEGO1/lego/sources/shape/legobox.cpp - LEGO1/lego/sources/shape/legomesh.cpp LEGO1/lego/sources/shape/legosphere.cpp LEGO1/lego/sources/shape/legovertex.cpp + LEGO1/lego/sources/shape/legomesh.cpp + LEGO1/lego/sources/shape/legocolor.cpp ) list(APPEND list_targets shape${ARG_SUFFIX}) set_property(TARGET shape${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "shape$<$:d>${ARG_SUFFIX}") @@ -183,10 +181,10 @@ function(add_lego_libraries NAME) target_include_directories(anim${ARG_SUFFIX} PRIVATE "${PROJECT_SOURCE_DIR}/LEGO1/omni/include" "${PROJECT_SOURCE_DIR}/LEGO1" "${PROJECT_SOURCE_DIR}/LEGO1/lego/sources" "${PROJECT_SOURCE_DIR}/util") add_library(misc${ARG_SUFFIX} STATIC - LEGO1/lego/sources/misc/legocontainer.cpp - LEGO1/lego/sources/misc/legoimage.cpp - LEGO1/lego/sources/misc/legostorage.cpp LEGO1/lego/sources/misc/legotexture.cpp + LEGO1/lego/sources/misc/legostorage.cpp + LEGO1/lego/sources/misc/legoimage.cpp + LEGO1/lego/sources/misc/legocontainer.cpp LEGO1/lego/sources/misc/legotree.cpp LEGO1/lego/sources/misc/legounknown.cpp ) @@ -196,8 +194,8 @@ function(add_lego_libraries NAME) target_link_libraries(misc${ARG_SUFFIX} PRIVATE) add_library(3dmanager${ARG_SUFFIX} STATIC - LEGO1/lego/sources/3dmanager/lego3dmanager.cpp LEGO1/lego/sources/3dmanager/lego3dview.cpp + LEGO1/lego/sources/3dmanager/lego3dmanager.cpp LEGO1/lego/sources/3dmanager/legoview1.cpp LEGO1/lego/sources/3dmanager/tglsurface.cpp ) @@ -399,6 +397,7 @@ function(add_lego_libraries NAME) LEGO1/lego/legoomni/src/common/legocharactermanager.cpp LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp LEGO1/main.cpp + # We need to get rid of / refactor the below units into existing/other ones LEGO1/lego/legoomni/src/entity/legolocations.cpp LEGO1/lego/legoomni/src/notify/legoeventnotificationparam.cpp LEGO1/lego/legoomni/src/common/legoactors.cpp diff --git a/LEGO1/lego/legoomni/src/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 8d88e6bfc8..e0bcdbea10 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -21,8 +21,12 @@ DECOMP_SIZE_ASSERT(Helicopter, 0x230) DECOMP_SIZE_ASSERT(HelicopterState, 0x0c) +DECOMP_SIZE_ASSERT(Vector2, 0x08) +DECOMP_SIZE_ASSERT(Vector3, 0x08) +DECOMP_SIZE_ASSERT(Vector4, 0x08) DECOMP_SIZE_ASSERT(Mx3DPointFloat, 0x14) DECOMP_SIZE_ASSERT(Mx4DPointFloat, 0x18) +DECOMP_SIZE_ASSERT(Matrix4, 0x08) DECOMP_SIZE_ASSERT(MxMatrix, 0x48) // FUNCTION: LEGO1 0x10001e60 diff --git a/LEGO1/realtime/matrix.cpp b/LEGO1/realtime/matrix.cpp deleted file mode 100644 index c1de153586..0000000000 --- a/LEGO1/realtime/matrix.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "matrix.h" - -#include "decomp.h" - -DECOMP_SIZE_ASSERT(Matrix4, 0x08); diff --git a/LEGO1/realtime/vector.cpp b/LEGO1/realtime/vector.cpp deleted file mode 100644 index ad09b0b0ea..0000000000 --- a/LEGO1/realtime/vector.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "vector.h" - -#include "decomp.h" - -DECOMP_SIZE_ASSERT(Vector2, 0x08); -DECOMP_SIZE_ASSERT(Vector3, 0x08); -DECOMP_SIZE_ASSERT(Vector4, 0x08); From ccdb6393398bc7e8fa82be9bd9c56a8ceb1fb67f Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 11:20:22 -0700 Subject: [PATCH 5/6] Add BETA asserts --- LEGO1/lego/legoomni/src/worlds/score.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 27e7fa4b69..65c2f9afc2 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -299,6 +299,10 @@ void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score) MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28}; MxS32 colors[] = {0x11, 0x0f, 0x08, 0x05}; + assert(i_activity >= 0 && i_activity < 5); + assert(i_actor >= 0 && i_actor < 5); + assert(score >= 0 && score < 4); + MxU8* ptr = m_surface + local3c[i_actor] + local50[i_activity]; MxS32 color = colors[score]; MxS32 size = local28[i_activity]; From e66e2229a5d424fdc80259cb50affdacbfec87ea Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 24 Dec 2024 11:32:07 -0700 Subject: [PATCH 6/6] BETA match --- LEGO1/lego/legoomni/include/score.h | 2 +- LEGO1/lego/legoomni/src/worlds/score.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/score.h b/LEGO1/lego/legoomni/include/score.h index 87a63b11f1..28a67434a7 100644 --- a/LEGO1/lego/legoomni/include/score.h +++ b/LEGO1/lego/legoomni/include/score.h @@ -87,7 +87,7 @@ class Score : public LegoWorld { void Paint(); MxLong FUN_10001510(MxEndActionNotificationParam& p_param); MxLong FUN_100016d0(LegoControlManagerNotificationParam& p_param); - void FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score); + void FillArea(MxS32 i_activity, MxS32 i_actor, MxS16 score); protected: void DeleteScript(); diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 65c2f9afc2..d1547fb80c 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -291,7 +291,7 @@ void Score::Paint() // FUNCTION: LEGO1 0x10001d20 // FUNCTION: BETA10 0x100f4a52 -void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score) +void Score::FillArea(MxS32 i_activity, MxS32 i_actor, MxS16 score) { MxS32 local3c[] = {0x2b00, 0x5700, 0x8000, 0xab00, 0xd600}; MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};