Commit graph

329 commits

Author SHA1 Message Date
Misha
724c953947
Implement MxDSBuffer constructor, match MxDSSource::FUN_100bffd0 (#235)
* Implement MxDSBuffer constructor, match FUN_100bffd0

* Match to 100%, minor style fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-22 21:58:05 +02:00
Ramen2X
5ab993bfda
cleanup: fix all improper uses of MxResult (#234)
* cleanup: fix all improper uses of MxResult
2023-10-22 13:38:25 -04:00
Ramen2X
7e907cfe3f
implement/match JukeBoxState (#233) 2023-10-22 11:33:29 -04:00
Misha
681ab9c026
implement most of MxBackgroundAudioManager (#232)
* implement most of MxBackgroundAudioManager

* Match OpenMusic to 100%, style fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-22 16:11:46 +02:00
Misha
50fe5f9c83
implement LegoSoundManager vtable (#231)
* LegoSoundManager

* Fix virtual function declarations/locations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-22 15:48:20 +02:00
MS
ae908a74cc
Copy constructor for MxVideoPresenter::AlphaMask (#229) 2023-10-21 19:47:48 -04:00
Joshua Peisach
af0e38176c
MxSoundPresenter (#227)
* MxSoundPresenter

Destructor, destroy, function adding itself to the sound manager and vtable38.

* Fix virtual function declarations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-22 00:41:05 +02:00
MS
85d94baa50
MxVideoPresenter AlphaMask (formerly UnkStruct) (#226) 2023-10-22 00:40:31 +02:00
Christian Semmler
5dfb132025
Implement MxOmni::DoesEntityExist and related (#225)
* Implement MxOmni::DoesEntityExist and related

* Rename function for consistency
2023-10-21 17:23:55 -04:00
Christian Semmler
6931a817a6
Implement NotifyCurrentEntity (#224) 2023-10-21 17:02:55 -04:00
Joshua Peisach
4f201eaa48
MxEventPresenter destructor (#223)
* MxEventPresenter destructor

* Fix and implement Destroy

* Fix scope of Destroy decl

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-20 20:41:23 +02:00
Christian Semmler
3a21834382
Rename virtual function to fix override (#222) 2023-10-19 13:07:05 -04:00
Ramen2X
fbb3b4930c
label ScoreState::VTable0x18 and associated member (#221) 2023-10-19 12:56:56 -04:00
Ramen2X
adbe73d664
implement/match ScoreState vtable (#220)
* implement/match ScoreState vtable

* add size assert for ScoreState
2023-10-19 03:26:32 -04:00
Ramen2X
52e6c9ac22
implement/match global ControlManager() function (#219)
* implement/match global ControlManager() function

* remove unnecessary forward declaration
2023-10-18 22:12:28 +02:00
Ramen2X
7c26a4d2dc
fix LegoState::VTable0x1C fake-match & implement LegoFileStream::FUN_10006030 (#217)
* fix LegoState::VTable0x1C fake-match, implement LegoFileStream::FUN_10006030

* Match and relocate FUN_10006030

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-18 00:05:31 +02:00
Christian Semmler
476af22b36
Add size assert for MxVideoManager, sort functions 2023-10-17 09:16:37 -04:00
Christian Semmler
727c748ecd
Implement/match MxVideoManager::InvalidateRect and UpdateRegion (#214)
* Implement/match MxVideoManager::InvalidateRect and UpdateRegion

* Update comment
2023-10-16 16:20:52 -07:00
Ramen2X
8b1c8f7abe
use MxResult return type in MxCore::Tickle() 2023-10-16 18:46:45 -04:00
Ramen2X
3a1cab323f
complete and match LegoState vtable (#216) 2023-10-16 16:18:35 -04:00
Misha
3dee6eae7a
MxVideoPresenter functions (#187)
* mxvideopresenter

* Update mxvideopresenter.cpp

* use inline getter for rectange width/height

* Update mxvideopresenter.cpp

* Match MxVideoPresenter::Destroy to ~88%

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-16 22:09:08 +02:00
Ramen2X
b95656a735
implement GasStationState::GasStationState() (#215)
* implement GasStationState::GasStationState()

* Match 100%

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-16 20:17:23 +02:00
Christian Semmler
50b9a39b2f
Use memset to be consistent with the rest 2023-10-16 09:27:23 -04:00
Andrew Gutekanst
000c019a0e
Add LegoVehicleBuildState (#213)
* Add LegoVehicleBuildState

* Update LegoVehicleBuildState member-var names to include offsets
2023-10-16 15:22:21 +02:00
Ramen2X
ba8ae8138e
implement/match MxTransitionManager::Transition_Windows() (#212) 2023-10-15 19:41:05 -04:00
Christian Semmler
37e75703d4
MxOmni::Create 100% match, make Create calls consistent (#211)
* Improve MxOmni::Create match, make Create calls consistent

* Match MxEventManager::Create

* Fix MxTickleClientPtrList

* 100% match

* Update mxomnicreateparam.h
2023-10-14 20:49:07 -04:00
Ramen2X
0c8705a9df
implement/match MxTransitionManager::Transition_Broken() (#210) 2023-10-14 15:54:49 -04:00
Christian Semmler
0580b2870c
Use MxResult for RealizePalette 2023-10-14 15:31:30 -04:00
Christian Semmler
e4f87ad7dd
Implement MxVideoManager::vtable0x28 and Create (#208)
* MxVideoManager::Destroy / destructor

* Consistency

* Add missing override

* Implement MxVideoManager::vtable28

* Implement vtable2c

* Rename to Create
2023-10-14 21:33:11 +02:00
MS
e08717f496
MxTransitionManager Pixelation transition (#209)
* Pixelation transition and improved variable names

* More accurate pointer math for the 16-bit case
2023-10-14 15:15:51 -04:00
Christian Semmler
5ddfaab9e7
Implement MxVideoManager::Destroy / destructor (#207)
* MxVideoManager::Destroy / destructor

* Consistency

* Add missing override
2023-10-14 11:46:00 -07:00
Christian Semmler
f062543f87
Match MxPresenter::StartAction to 100% 2023-10-14 09:27:58 -04:00
Joshua Peisach
a814132ab9
MxMIDIPresenter functions (#204)
* MxMIDIPresenter destructor, stub Destroy for now

* MxMIDIPresenter::EndMIDIAction + update param name

m_MIDIInitialized is definitely public, since it is accessed from the global
MusicManager.

* Add getter for MIDIInitialized, fix virtual function decl

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-14 15:25:53 +02:00
Andrew Gutekanst
7cf85e6f06
Add LegoMeterPresenter stub class (#206) 2023-10-14 15:08:51 +02:00
Christian Semmler
b92b2604d5
Match MxObjectFactory::Create to 100% 2023-10-14 09:02:44 -04:00
Andrew Gutekanst
c66b6aa123
Refine MxObjectFactory (#205)
* Refine MxObjectFactory

* Change interface of Destroy

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-14 14:59:06 +02:00
Ramen2X
a24a798c82
rename all uncertain names to unk (#203) 2023-10-13 17:36:16 -04:00
DmitriLeon2000
34e09c2bb3
Clean up Destroy pattern everywhere, fix missing overrides (#202)
* Rename MxMusicPresenter function vtable38

* Rename MxMusicPresenter function vtable38

* MxMediaPresenter, MxMusicManager and MxMusicPresenter
* Refactoring Destroy functions

* MxMediaManager & MxMusicPresenter

* Fix some vtable declarations, more renames

* Fix MxEventManager

* More rename fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-13 18:43:45 +02:00
Mark Langen
91c3ed3e70
100% match of many functions in the LegoGameState::Save codepath (#86)
* Only include decomps

* One more function

* Add offset to endOfVariables

* Remove leftover header

* Use undefined where applicable

* Fixes, refactorings

* Fixes

* Fix calling convention

* Added offset comment

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-12 18:18:24 +02:00
Christian Semmler
49ec7364c2
MxDSAction::MergeFrom: match to 100% (#200)
* Minor accuracy improvement

* Workaround for 100% match

* Update mxdsaction.cpp
2023-10-12 08:54:02 -07:00
Misha
b7b0ac6ae7
Implement a few functions in LegoEntity (#201) 2023-10-12 00:15:36 +02:00
Angel
19ee8cdc30
Implemented MxVector4::SetMatrixProductWrapper (#198)
* Implemented the function wrapper for SetMatrixProduct labeled as
SetMatrixProductWrapper with 100% match.

* Rename for consistency

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-11 12:18:48 +02:00
DmitriLeon2000
02d003673d
Implement MxMusicPresenter's Destroy method and move MxMediaPresenter's Destroy method to "protected" (#199)
* MxMusicPresenter destroy

* Implement MxMusicPresenter's Destroy method and move MxMediaPresenter's Destroy method to "protected"

* MxMediaPresenter Destroy to "protected", for real

* MxMusicPresenter Destroy
2023-10-11 12:18:26 +02:00
Christian Semmler
11dafaf816
Fix MxDSMediaAction structure/matches (#194) 2023-10-11 00:50:14 -07:00
Christian Semmler
93ce1ccfe8
Implement remaining MxDSSelectAction functions (#183)
* Implement remaining MxDSSelectAction functions

* Fix match
2023-10-10 13:22:00 -04:00
vMidz
23b9d47e8a
implement EndAction (#196)
* implement EndAction

implement EndAction
+offsets commenets

* Refactor MxParam/MxNotificationParam

* Add correct address for destructor

* Make MxNoticiationParam more concise

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-10 13:05:04 -04:00
Christian Semmler
d65c87f04d
Add missing space 2023-10-10 05:30:56 -04:00
Misha
114a959741
MxDiskStreamController vtable (#197)
* mxdiskstreamcontroller vtable + MxStreamController::vtable0x20

* stub MxDiskStreamController::Open

* MxDiskStreamProvider

* MxNextActionDataStart

* Revert "MxNextActionDataStart"

This reverts commit 41e8cfa2f11ea4f9b39df0bdf0c3657fdbd9efe9.

* Match MxStreamController::vtable0x20

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-10 10:27:00 +02:00
MS
49efa02eaa
MxBitmap code clarity (#195)
* MxBitmap code clarity

* Use mxtypes. TWOCC for BM string. SetSize arg to FALSE
2023-10-10 00:20:38 +02:00
Christian Semmler
28206402f9
Use forward declaration for LegoAnimationManager in LegoOmni 2023-10-09 06:33:06 -04:00
Misha
625ee52fe0
implement a few mxomni/legoomni functions (#193) 2023-10-09 12:31:36 +02:00
Angel
0db96ce2d6
Implemented MxVector4::UnknownQuaternionOp (#192)
* Corrected typo in reccmp.py

* Implemented MxVector4::UnknownQuaternionOp
65% similar to the original

* Brought MxVector4::DotImpl to 100% match
2023-10-09 11:04:35 +02:00
Misha
d82649c6f0
MxStream provider and controller vtables (#191)
* MxStreamProvider and MxRamStreamProvider vtable

* Update mxramstreamprovider.h

* Match IsA

* Fixes, improvements

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-08 22:41:34 +02:00
Misha
3ac0c5d86c
Implement LegoVideoManager::MoveCursor and improve SetSkyColor (#190)
* improved SetSkyColor match

* LegoVideoManager::MoveCursor

* rename parameters

* Minor improvements

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-08 22:00:59 +02:00
Joshua Peisach
7c674cbb47
Start MxCompositePresenter ctor/dtor (#186)
* Start MxCompositePresenter ctor/dtor

* Add MxUnkList

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-08 17:25:38 +02:00
Misha
3afbf808d1
MxMediaPresenter vtable (#189)
* Add vtables for MxMediaPresenter

* remove comments and fix override
2023-10-08 15:46:09 +02:00
Misha
5f8bde9e48
Finish MxMediaManager and MxEventManager (#185)
* Finish MxMediaManager and MxEventManager

* Update mxomni.cpp

* fixes
2023-10-07 23:30:05 +02:00
Joshua Peisach
472a82f220
MxMusicPresenter vtable (#184)
* MxMusicPresenter vtable

vtable+0x34 adds the current presenter to the music manager
vtable+0x38 calls destroy with the param as "FALSE"

* Update mxmusicpresenter.cpp

* Update mxmusicpresenter.cpp

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-07 16:36:05 -04:00
Christian Semmler
a9fa734844
Refactor deserialization of objects (#170)
* Use template helpers for deserialization

* Remove space

* Fix naming
2023-10-07 20:07:26 +02:00
Misha
62b97b8f1f
Implement MxOmni::Create (#182)
* implement mxomni::create, and match MxStreamController::Open

* Use enum for mxparam type

* Fix return type

* Match MxOmni::Notify

* Remove unused variable

* Added override keywords

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-07 20:05:45 +02:00
Christian Semmler
4a674d823b
Implement MxDSSelectAction Clone/operator=/CopyFrom (#154) 2023-10-07 20:03:15 +02:00
Christian Semmler
e6507b874a
Refactor vector EqualsScalar (#171)
* Refactor vector EqualsScalar

* Fix param name
2023-10-07 11:00:20 -07:00
Christian Semmler
201125d209
Silence all C4786 warnings (#180) 2023-10-07 10:28:52 -07:00
Misha
8281e195f7
Implement MxOmni Start/stop timer (#181)
* Implement start/stop timer

* Mark StartDirectSound as stub

* remove accidently committed files
2023-10-07 19:12:59 +02:00
MS
907c85616b
Supporting items for SetupCopyRect() (#177)
* Minor improvements all related to SetupCopyRect

* Rename inline getters. malloc/free -> new/delete

* MxTypes in TransitionManager. Remove stub marker (oops)
2023-10-07 18:48:36 +02:00
Christian Semmler
5164ef1a54
Refactor MxOmni/LegoOmni headers to use forward declarations (#148)
* Refactor MxOmni/LegoOmni headers to use forward declarations

* Fixes

* Fix build

* Fix deps
2023-10-07 17:30:04 +02:00
DmitriLeon2000
775ee9f05f
Move MxMIDIManager to MxMusicManager (#178) 2023-10-07 17:02:12 +02:00
Misha
50b9a6dea5
Implement Start() (#176)
* Implement Start()

* Undo isleapp changes

* Implement LegoOmni::Start

* fix vtable0x20

* Address review

* fix build
2023-10-07 09:05:44 -04:00
Joshua Peisach
85fe4ad07a
MxAudioPresenter - vtable functions (#175)
* MxAudioPresenter - vtable functions

* Rename parameter

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-07 00:17:49 +02:00
Joshua Peisach
1217e4aa58
MxMusicPresenter dtor, stub destroy (#174)
* MxMusicPresenter dtor, stub destroy

* Fix destructor declaration

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-06 19:00:49 +02:00
Joshua Peisach
7f5198220c
Unstub MxLoopingFlcPresenter destructor (#173)
sorry guys
2023-10-06 18:54:58 +02:00
Christian Semmler
1da1d291a8
Fix line endings 2023-10-06 09:00:00 -04:00
Ramen2X
666c65fa4f rename FUN_1004bcf0 to Transition_None 2023-10-05 18:55:35 -04:00
Ramen2X
8e87b5b4c8
MxTransitionManager::Tickle() & FUN_1004bcf0 (#168)
* implement MxTransitionManager::Tickle()

* improved accuracy of MxTransitionManager::Tickle

* implement MxTransitionManager::FUN_1004bcf0

* improved accuracy of FUN_1004bcf0

* move/rename stubbed transition methods

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-10-05 18:51:34 -04:00
vMidz
e767d6524e
implement MxMIDIManager (#167)
* added MxMIDIManager

* implement MxMIDIManager

implement MxMIDIManager
implement MxAudioManager::GetVolume
implement MxAudioManager::SetVolume

* added override + small changes
2023-10-05 16:06:11 -04:00
Regan Green
c46bc985c2
Implement MxTransitionManager SetWaitIndicator and SetupCopyRect (#165)
* Implement MxTransitionManager SetWaitIndicator and SetupCopyRect

* More accurate SetupCopyRect

* Add MxDSAction::Flag_Bit5

* SetupCopyRect PR Amends

* Correct braces formatting

* Stub MxVideoPresenter::Destroy
2023-10-05 06:31:20 -04:00
Joshua Peisach
2d45914ddf
MxSoundManager: dtor, destroy, update types (#164)
* MxSoundManager: dtor, destroy, update types

Also make MxThread's destructor public

* Minor adjustments

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-05 09:47:37 +02:00
Joshua Peisach
6916aa49e3
MxLoopingSmkPresenter - dtor, Init, stub Destroy (#162) 2023-10-04 13:30:37 -04:00
MS
5125314755
Wipe transition (#161) 2023-10-04 17:48:25 +02:00
Regan Green
7c7311ea5e
Implement MxTransitionManager::SubmitCopyRect (#160)
* Implement MxTransitionManager::SubmitCopyRect

* MxTransitionManager::SubmitCopyRect Amendments

* Fix MxTransitionManager::EndTransition

* Fix MxDSAction::SetLoopCount
2023-10-04 15:43:34 +02:00
MattKC
6da912e932
Implement MxTransitionManager::EndTransition and GetCurrentWorld (#159)
* Implement MxTransitionManager::EndTransition and GetCurrentWorld

* Match EndTransition

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-04 08:56:16 +02:00
MS
129e8d6373
MxTransitionManager::Dissolve (#155)
* MxTransitionManager::Dissolve

* Some comments and better names

* use refs instead of pointers

* slightly improved name for rect

* Use MxS32 instead of int
2023-10-03 18:03:10 -04:00
Joshua Peisach
62d953c6c3
MxLoopingFlcPresenter ctor/half of Init (#158)
* MxLoopingFlcPresenter ctor/half of Init

* MxLoopingFlcPresenter - finish Init, stub Destroy function, match dtor

* Update mxloopingflcpresenter.cpp

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-03 17:38:03 -04:00
Christian Semmler
f9cd17e3dc
Initialize bool members with FALSE 2023-10-03 14:50:14 -04:00
Christian Semmler
6c86503d35
Remove UINT cast 2023-10-03 14:02:50 -04:00
ecumber
a6f3acf5b7
LegoInputManager: some members and functions (#81)
* Squashed commit of the following:

commit 1fe03a4a787693616c56f59622bcaae8fd53b30b
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 21:04:15 2023 -0700

    data types

commit 7c8432f88236c42c17998d51e820b5e219f3c326
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 12:39:13 2023 -0700

    Destroy

commit f60eb3923b24bc87bb31ba783676c6a50d48e9b8
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 12:15:33 2023 -0700

    compile fix

commit e2f78d557f223c2552a046470578d154c29e473b
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 13:37:33 2023 -0700

    Timer functions

commit 447e234e6324a5b0958e9e94c5cda53703abada2
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 02:40:10 2023 -0700

    fix

commit 4670fd790b16a15b5797d50bc3cd1f6e2c9e890d
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 02:39:04 2023 -0700

    improvements

commit 7f70bce1eefe550fe6bef193e7ee54948af354b6
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 03:42:47 2023 -0700

    Update legoinputmanager.cpp

commit 0d3433a75d2b20a3fff1da8147ce502b279b1e9c
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 03:38:32 2023 -0700

    Add ReleaseDX

commit 72d27fd402efb37da1ce8c41a3350df66c99db1d
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 02:27:12 2023 -0700

    Update CMakeLists.txt

commit 09626a62f9d2c56a523ca582be95a4dfb29ee188
Author: ecumber <ecumber05@gmail.com>
Date:   Mon Jul 3 13:48:46 2023 -0700

    Move to new branch

* Squashed commit of the following:

commit d9148242a322ec54750c89357a0db2154310907d
Author: ecumber <ecumber05@gmail.com>
Date:   Sun Jul 16 23:56:54 2023 -0700

    Update legoinputmanager.cpp

commit 983d08650eb3df0b9103761b4023a6d3395686b2
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 21:04:15 2023 -0700

    data types

commit 4e8aac36ece6f3d7cfff39432ebc4e731876fb75
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 12:39:13 2023 -0700

    Destroy

commit 907801567a8c93ebd242b25b4aa2b00d38eaedc8
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 12:15:33 2023 -0700

    compile fix

commit 91a5f75e938d796f153cc872e46acef2c342818c
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 13:37:33 2023 -0700

    Timer functions

commit e77f08f5358b6cc4ee41583f70281c40b95bea29
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 02:40:10 2023 -0700

    fix

commit 30d204b7734a56b4140a3bf53c9825126a1f80c7
Author: ecumber <ecumber05@gmail.com>
Date:   Thu Jul 6 02:39:04 2023 -0700

    improvements

commit dd4ff493355796c41a6fb328fda1892c0f1fec0a
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 03:42:47 2023 -0700

    Update legoinputmanager.cpp

commit 852658cdbc0e6f792a6a79dfc77df3539ea4a15a
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 03:38:32 2023 -0700

    Add ReleaseDX

commit 430d4e100811bc00dc983a9fe78aa1482fb92f7f
Author: ecumber <ecumber05@gmail.com>
Date:   Tue Jul 4 02:27:12 2023 -0700

    Update CMakeLists.txt

commit 6fb94f007613e920b1d64775b7b76cb721482884
Author: ecumber <ecumber05@gmail.com>
Date:   Mon Jul 3 13:48:46 2023 -0700

    Move to new branch

* Fixes

* Remove obsolete stuff

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-03 19:53:22 +02:00
Joshua Peisach
6480fd90e7
Motorcycle initial class structure and ctor (#156) 2023-10-03 04:02:08 -04:00
Christian Semmler
b7efd64ac1
Bootstrap MxDSSelectAction, generalize MxList (#142)
* reccmp: Add ability to compare template instantiations

* Add example of template instantiation comparison.

* merge

* Add template compare annotations for MxList instances

* Bootstrap MxDSSelectAction, generalize MxList

* Fix template annotations

* Fix merge error

* Fix merge error

---------

Co-authored-by: Brendan Dougherty <brandougherty1@gmail.com>
2023-10-02 15:51:43 +02:00
MattKC
56f3d12096
Implement MxTransitionManager ctor/dtor/rest of StartTransition (#153) 2023-10-01 20:18:16 -04:00
MS
592ede1c7b
LegoEntity::Reset (#152) 2023-10-01 15:06:29 +02:00
Joshua Peisach
8725986085
MxControlPresenter ctor/structure (#151)
* MxControlPresenter ctor/structure

* Use undefined types where possible, remove implicit pads

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-01 14:49:55 +02:00
Joshua Peisach
7f423439b7
Fix pizza constructor (#149)
* Pizza: fix type of m_unk98

* Fix pizza constructor

* Match Pizza::Pizza

* Use undefined type

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-01 01:25:33 +02:00
Joshua Peisach
b20aa9b8fb
Police, PoliceEntity ClassName and IsA (#150) 2023-10-01 00:57:10 +02:00
Joshua Peisach
06c7ba2c37
MxDiskStreamProvider constructor (#131)
* MxDiskStreamProvider constructor

* Add work-in-progress list struct to MxDiskStreamProvider

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-09-29 23:53:02 +02:00
MS
0dc8dd641a
MxVariable subclass for fsmovie setting (#147)
* LegoFullScreenMovie variable and related

* Changes after review
- Reduce scope on global strings
- Size assert for LegoGameState (based on the constructor references only)
- 1 -> TRUE for EnableFullScreenMovie
2023-09-29 16:38:08 -04:00
pewpew
b77cd067d3
reccmp: template compare annotations (#88)
* reccmp: Add ability to compare template instantiations

* Add example of template instantiation comparison.

* merge

* Add template compare annotations for MxList instances

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-09-29 11:40:46 -07:00
Joshua Peisach
f7743c51fb
MxMIDIPresenter: ClassName, IsA (#146) 2023-09-29 13:18:22 -04:00
Joshua Peisach
5b7954a97b
MxMusicPresenter: ClassName, IsA, ctor, Init (#145) 2023-09-29 12:51:05 -04:00
Christian Semmler
dc869c441c
Relocate SetAppCursor to legoutil (#144) 2023-09-29 12:42:15 -04:00
Ramen2X
44c3ae478b
implement some of MxTransitionManager (#143)
* implement some of MxTransitionManager

start working on MxTransitionManager::StartTransition
add TransitionType enum
implement/match MxTransitionManager::GetDDrawSurfaceFromVideoManager
implement/match global function SetAppCursor

* remove offset comment from mxomni.h

* remove misc offset comments from mxtransitionmanager.h

* address feedback

* merge m_unk20-24 into pad
2023-09-29 18:09:46 +02:00
MS
749c553325
LegoEntity parsing extra Action strings (#141)
* LegoEntity parse action string

* Reduced size assert for MxEntity

* remove override keyword for LegoEntity function

* Move global strings to new define.cpp file
2023-09-27 15:16:46 -04:00
Christian Semmler
e341afd411
Match ~MxDSStreamingAction 2023-09-26 07:25:23 -04:00
Christian Semmler
915390602b
Add size assert for MxString 2023-09-26 07:24:28 -04:00
MattKC
574a9dc6f1
Implement some MxStreamer functions (#130)
* Implement some MxStreamer stuff

* Implement/match MxVideoManager::Tickle (#128)

* Implement/match MxPresenter::StartAction

* Update mxpoint32.h

* Implement/match MxVideoManager::Tickle

* Update mxlist.h

* Update mxpresenter.cpp

* MxFlcPresenter ctor/dtor (#132)

* MxFlcPresenter ctor/dtor

* Match constructor

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* LegoOmni::CreateStreamObject and related (#129)

* LegoOmni::CreateStreamObject and related

* Revert change to MxDSSource/MxDSFile Read export

* Bootstrap MxDSMultiAction (#133)

* Bootstrap MxDSMultiAction

* Move destroy function to list class

* Fix unk14 call

* Quick patch for EqualsDataProduct (#134)

* MxLong Tickle() -> MxResult Tickle() (#135)

* MxLong Tickle() -> MxResult Tickle()

* Remove garbage

* Fix implementations

* PresenterNameDispatch (#137)

* PresenterNameDispatch

* Use reference for PresenterNameDispatch param
- fix or add const markers so we can use a const reference

* Implement/match remaining MxDSMultiAction functions (#136)

* Implement/match MxDSMultiAction::Deserialize

* Implement remaining functions of MxDSMultiAction

* Remove space

* Implement/match MxDSParallelAction (#138)

* Implement/match MxDSParallelAction

* Fix type

* Remove space

* Add neccessary MxDSMultiAction functions

* Implement/match MxDSSerialAction (#139)

* Implement/match MxDSSerialAction

* Add neccessary MxDSMultiAction functions

* Fix LegoOmni vtable (#140)

* matched GetOpenStream

* matched MakeSourceName

* add MxDSBuffer stub

* add MxRAMStreamController stub

* add stubbed functions for MxStreamController used by MxStreamer

* implement AddStreamControllerToOpenList

* implement most of MxStreamer::Open

* add note for MxStreamerSubclass1

* fix compiler issue

* implement MxStreamer::Notify

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
Co-authored-by: MS <disinvite@users.noreply.github.com>
2023-09-25 19:30:56 -07:00
MattKC
3f6e3af8ca
Fix LegoOmni vtable (#140) 2023-09-25 13:28:25 -07:00
Christian Semmler
e1e2abc510
Implement/match MxDSSerialAction (#139)
* Implement/match MxDSSerialAction

* Add neccessary MxDSMultiAction functions
2023-09-25 12:53:57 -07:00
Christian Semmler
b2ec18f943
Implement/match MxDSParallelAction (#138)
* Implement/match MxDSParallelAction

* Fix type

* Remove space

* Add neccessary MxDSMultiAction functions
2023-09-25 11:58:15 -07:00
Christian Semmler
548f337cad
Implement/match remaining MxDSMultiAction functions (#136)
* Implement/match MxDSMultiAction::Deserialize

* Implement remaining functions of MxDSMultiAction

* Remove space
2023-09-25 10:08:19 -07:00
MS
6dd94d3626
PresenterNameDispatch (#137)
* PresenterNameDispatch

* Use reference for PresenterNameDispatch param
- fix or add const markers so we can use a const reference
2023-09-22 17:42:23 -04:00
Christian Semmler
b4258da0f5
MxLong Tickle() -> MxResult Tickle() (#135)
* MxLong Tickle() -> MxResult Tickle()

* Remove garbage

* Fix implementations
2023-09-21 11:51:24 -07:00
MS
611afb7799
Quick patch for EqualsDataProduct (#134) 2023-09-21 11:27:27 +02:00
Christian Semmler
99c27a6a50
Bootstrap MxDSMultiAction (#133)
* Bootstrap MxDSMultiAction

* Move destroy function to list class

* Fix unk14 call
2023-09-20 13:36:15 -07:00
MS
b743f99d20
LegoOmni::CreateStreamObject and related (#129)
* LegoOmni::CreateStreamObject and related

* Revert change to MxDSSource/MxDSFile Read export
2023-09-20 16:22:57 -04:00
Joshua Peisach
1d3c1bdbd1
MxFlcPresenter ctor/dtor (#132)
* MxFlcPresenter ctor/dtor

* Match constructor

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-09-20 13:48:46 +02:00
Christian Semmler
d145f914c4
Implement/match MxVideoManager::Tickle (#128)
* Implement/match MxPresenter::StartAction

* Update mxpoint32.h

* Implement/match MxVideoManager::Tickle

* Update mxlist.h

* Update mxpresenter.cpp
2023-09-19 20:00:34 -07:00
Christian Semmler
4bd67e4ae1
Implement/match MxPresenter::StartAction (#126)
* Implement/match MxPresenter::StartAction

* Update mxpoint32.h
2023-09-19 14:45:16 -07:00
Joshua Peisach
5617e0e044
MxAudioManager: Destructor, LockedReinitialize, Reinitialize (#125)
* MxAudioManager: Destructor, LockedReinitialize

* MxAudioManager::Reinitialize, fix LockedReinitialize logic

* MxAudioManager cleanup

- fix param in LockedReinitialize, mark that function as private/give it a better param name

* Match LockedReinitialize, fix function declarations, add/match InitPresenters

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-09-19 16:42:39 +02:00
Christian Semmler
c67e537508
Implement/match MxMediaManager::Tickle (#127)
* Implement/match MxMediaManager::Tickle

* Remove space
2023-09-17 14:10:38 -07:00
Christian Semmler
b819657bd8
Implement AddPresenter, RemovePresenter, StopPresenters (#124)
* Add MxList, MxPresenterList, add to MxMediaManager

* Match ~MxList<T>

* Implement AddPresenter, RemovePresenter, StopPresenters

* Initial implementation of RemovePresenter/Find/Detach

* Implement/match MxMediaManager::StopPresenters

* Move definitions out of class body

* Match RemovePresenter/Detach

* Fix style

* Fix merge error

* Fix merge error

* Fix merge error

* Remove space
2023-09-17 12:38:50 +02:00
Christian Semmler
253538feed
Add MxList, MxPresenterList, add to MxMediaManager (#122)
* Add MxList, MxPresenterList, add to MxMediaManager

* Match ~MxList<T>
2023-09-16 21:18:56 -07:00
MS
89f66e4e0e
MxPresenter::ParseExtra (#123)
* MxPresenter::ParseExtra and surrounding functions

* Named extra data is MxDSAction, added Parsed flag to enum
2023-09-13 09:44:03 +02:00
Joshua Peisach
3e7cb6a7a8
Init functions in MxMediaPresenter and LegoPalettePresenter (#121)
* Match MxMediaPresenter::Init

* LegoPalettePresenter::Init()

* LegoPalettePresenter: for now, use undefined4 type
2023-09-11 13:43:55 -04:00
Joshua Peisach
dc18b5d9c1
MxDirect3D (#114)
* MxDirect3D Constructor

* Implement MxDirect3D::Clear (not yet matching)

* Match MxDirect3D::Clear

* Building out MxDirect3D, link dxguid, add size asserts

* Move a few things around on the Enumerate context obj

* remove dupe mxdirect3d

* Match BuildErrorString and _DoEnumerate

* Fix style

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-09-10 14:56:16 +02:00
Joshua Peisach
1fa2fd9737
The IslePathActor's (#113)
* pizza: fix type m_unk90

* Initial implementation of a lot of IslePathActor's

All IslePathActor's seem to have (for the most part), the same few variables in common,
probably some ID. SkateBoard, Pizza and TowTrack seem to be a bit more complicated with additional
fields surrounding it.

* Add missing ClassName(s) and IsA(s)

* Add decomp size asserts

* Fix size assertions

* Make legopathactor fields protected for now, fix a type in Pizza

* Fix TowTrack structure

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-09-10 14:01:39 +02:00
MishaProductions
c4453fe49f
Match SetUserMaxLOD (#118)
* Match SetUserMaxLOD and implement UpdateMaxLOD

* Update realtimeview.cpp
2023-09-04 16:34:27 -07:00
Christian Semmler
2b3f7cbfc1
Add tickle states and implement/match MxPresenter::Tickle (#119)
* Implement/match MxPresenter::Tickle

* Remove space

* Explicit inline for aesthetics
2023-09-04 15:33:38 -07:00
Joshua Peisach
c7458211f3
Some MxBitmap vtable functions (#89)
* Match MxBitmap::vtable+40 (CopyColorData)

It's basically a call to StretchDIBits, which copies color data for a rectangle

* Name a ternary raster op

* Name variable m_unk18 (m_bmiColorsProvided)

Since this variable is passed to StretchDIBits, we can see what its supposed to mean.

We dont have DX5 docs, but we have docs of the current day, and this as its 'iUsage':
"Specifies whether the bmiColors member of the BITMAPINFO structure was provided and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or indexes."
The second part (about what the bmiColors contains) seems redundant, since we know this is a boolean.

Source: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-stretchdibits

* MxBitmap::CreatePalette is now up to 60%

* Add progress on MxBitmap::LoadFile, add the global bitmap signature, add Clone call in CreatePalette

* getting closer

* Implement MxBitmap::vtable18

* Got vtable18 into a better state

It's progress doesn't affect the status of CopyColorData, which is
back at 100%, as it makes sense the loop is a memcpy

* if you want to do more of vtable18 have fun

* Cleanup MxBitmap::LoadFile

* Begin work on FUN_100bd450 (ImportColorsToPalette)

This took a lot of time, finally I got a good understanding of it.

Primarily what's left now is the loop
https://hackmd.io/@KsNMFSBHTO2gxDyRIPRQ1g/H1LCVQXon

* Don’t include class name in method declaration

* yolo vtable38 (I can't test the build atm)

I moved up ImportColorsToPalette so other functions, including this one can use it

* Cleanup while i keep getting bored of matching these functions that wont match

* likely malloc is an operator new

* A few things for MxBitmap
* new struct MxBITMAPINFO
* vtable18 and ImportPalette 100%
* ImportColorsToPalette improvement

* Match vtable1c and vtable3c

* use MxResult return types

* CreatePalette - Use MxResult to track success

* Define types for the bit depth

That boolean is not really a boolean, its just a variable to store
the bit depth as some DWORD. 0 = 256 color, 1 = High Color (16-bit).

* Match MxBitmap::CreatePalette

* Match LoadFile

YEGYEEHEEHEHEHEHEHE3 YES THIS IS FINALLY DONE OMFG

* Reorder variable placement in CreatePalette

* Start vtable14

* Match MxBitmap vtable14, down to reg swap.

Maybe some import function?

* Name MxBitmap vtable functions

---------

Co-authored-by: disinvite <disinvite@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-08-28 03:04:39 -07:00
Joshua Peisach
5a2cc72dbb
MxMediaManager (#116) 2023-08-28 03:01:45 -07:00
Christian Semmler
2233da39d8
Implement/match MxDisplaySurface::Create (#115) 2023-08-28 02:49:15 -07:00
Joshua Peisach
23457da730
Matching spree (#98)
* LegoNavController: Match CalculateNewTargetSpeed

Ghidra showed this correctly too, but the asm showed the problem simply, an incorrect comparison

* Match a MxPresenter vtable function

* Match known functions in LegoPhonemePresenter

* Revert "LegoNavController: Match CalculateNewTargetSpeed"

This reverts commit 718489923b4dd5a3f12d53510d299033924c5dea.

* MxPresenter: rename tickle flag fields

* LegoPhonemePresenter: add size assert

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-08-28 02:38:46 -07:00
Christian Semmler
28f961b86d
Add MxDSAnim, MxDSEvent, MxDSObjectAction, MxDSStill (#112)
* Add MxDSAnim

* Add MxDSEvent, MxDSObjectAction, MxDSStill
2023-08-16 16:38:26 -07:00
Christian Semmler
4a2226181c
Implement MxDSStreamingAction (#108)
* Implement MxDSStreamingAction

* Add remaining functions

* Use inline assignment operators
2023-08-16 15:02:26 -07:00
Christian Semmler
51ac526f8a
Add MxDSSound (#111) 2023-08-16 10:15:59 -07:00
MS
bb0d5be921
Implement MxAtomId and reference counter (stl set) (#109)
* Implement MxAtomId and reference counter (stl set)
* Partial success in hiding 4786 warning spam.
* Build out most of MxOmni::Destroy since it also touches the set

* Add some size asserts
2023-08-16 10:09:44 -07:00
pewpew
87938e9b0e
Add modified mxstl.h (#107) 2023-08-12 10:32:43 -07:00
Christian Semmler
4e0149361e
Implement MxDSAction (#106) 2023-08-10 10:57:53 -07:00
Christian Semmler
a02e07c4d7
Implement MxDSAction::AppendData (#105)
* Implement MxDSAction::ConcatData

* use GLOBAL

* Update mxdsaction.cpp

* Update mxdsaction.h

* Move TWOCC/FOURCC to common header file

* Fix

* Fix deletes
2023-08-10 10:57:19 -07:00
Christian Semmler
88bfb3c419
Match MxDSAction::CopyFrom (#104)
* Match MxDSAction::CopyFrom

* Fix src/dest

* Update mxvector.h

* Update mxvector.h

* Update mxvector.h

* Update mxdsaction.cpp
2023-08-09 16:48:49 -07:00
Christian Semmler
bd9dca0d3f
Implement most of MxDSAction (#103)
* Implement most of MxDSAction

* Update mxdsaction.h

* Update mxdsobject.cpp
2023-08-08 19:38:07 -07:00
Christian Semmler
d41b7f2ca4
Add GetDeviceModeFinder to WndProc (#102) 2023-08-06 13:26:14 -07:00
itsmattkc
67816d5213 disable "nonstandard extension used 'bool'" warning spam
In newer versions of MSVC, this could have been achieved with /wd4237, however 4.2 doesn't have this option, it only seems to have the pragma. Ah well.
2023-08-06 10:52:37 -07:00
Christian Semmler
c48fc69cf3
Implement/match MxDSAction constructor (#101)
* Implement MxDSAction constructor

* Update mxdsaction.cpp
2023-08-06 10:39:22 -07:00
MS
71950cd40a
lego1: MxVariableTable (#87)
* MxStringVariable -> MxVariable

* cursor test

* GetVariable to 100

* meh

* node insert inline

* move to header file

* use reference to match available code

* variable table init in mxomni, some reshuffling
2023-08-03 17:13:41 -07:00
Joshua Peisach
b6ada8f46c
Small implementations in MxEntity/MxEventManager (#96)
* Small implementations in MxEntity/MxEventManager

* Cleanup

* Update LEGO1/mxentity.cpp

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-08-03 16:43:36 -07:00
Joshua Peisach
dc585c7f61
MxBackgroundAudioManager (#97)
* Start MxBackgroundAudioManager

* Match MxBackgroundAudioManager constructor. This took WAY too much time.

* add size assert

* improve readability of MxBackgroundAudioManager::Enable

While the previous iteration wasn't incorrect, it definitely reads like pseudocode (i.e. it's very unlikely any actual developers would have written that). This is much more readable/likely to have been written and still results in the same asm.

---------

Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-08-03 11:42:12 -07:00
Mark Langen
694045abd8
Implement MxVector2/3/4 and MxMatrix (#100)
* All of the MxVectors share an inheritance chain. MxVector4 inherits
  from MxVector3 which inherits from MxVector2.

* They all operate on a shared `float*` data member which points to the
  underlying storage.

* There are also MxVector3/4Data classes, which inherit from Vector3/4,
  but add concrete storage for the Vector data rather than just an
  abstract data pointer.

* The same is true for MxMatrix, with there being an abstract and a
  concrete variant of it.

* Also improve reccmp.py register matching algorithm. It previously
  could not recognize an effective match when a swap had to take place
  between two registers used on the same line. It turns out this happens
  a lot in floating point math code so I adjusted the implementation to
  break the disassembly lines on spaces rather than just linebreaks
  allowing the existing effective match code to handle that case too.
2023-08-03 11:25:29 -07:00
itsmattkc
ee7c419be8 fix the pizza conflict
Sounds like an episode of a neo-noir TV show
2023-08-03 11:21:05 -07:00
pewpew
0f92e345b3
MxTickleManager mostly done (#94)
* Checkpoint to show MxTickleManager::SetClientTickleInterval match.

* Match MxTickleManager::~MxTickleManager, obliterate MxTickleManager::SetClientTickleInterval.

* Make conditional more realistic, move MxTime to mxtypes.h, add TODO for MxTickleManager::Tickle.
2023-08-03 11:19:05 -07:00
Christian Semmler
932baa2a87
lego1: Add MxDisplaySurface class members and some functions (#95)
* Add MxDisplaySurface class members and some functions

* Add size assert

* style
2023-08-03 11:13:27 -07:00
Joshua Peisach
ff13dc691c
Start IslePathActor (#93)
* Start IslePathActor

* Update types/add needed type in LegoPathActor for Pizza

Yes, this is a recommit because last time I pushed my cmake dir

* Fix types in  islepathactor

* Adjust variables

* add size asserts

---------

Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-08-03 11:10:54 -07:00