Commit graph

54 commits

Author SHA1 Message Date
Misha
20daddde32
implement MxDSBuffer object creation (#340)
* push changes

* Update mxstreamcontroller.cpp

* fix build

* MxStreamChunk

* fix format

* Match functions

* Add a comment

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-12-17 18:24:39 +01:00
Misha
d72c767685
Implement a few legoomni/mxomni functions (#339)
* LegoOmni functions

* fix build

* Update mxstreamcontroller.cpp

* fixes + improve match

* Update mxomni.cpp

* Update mxdsobject.h

* improve match

* Update mxactionnotificationparam.h

* MxOmni::HandleActionEnd

* fixes

* Update LEGO1/mxstreamer.cpp

Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>

* A bunch of fixes

---------

Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-12-16 19:14:01 +01:00
Christian Semmler
a7194266b3
Refactor utility/decomp headers (#318) 2023-12-11 16:33:46 -05:00
Christian Semmler
2a16a508a5
(Proposal) Use alternative C4786 warning suppression (#312)
* Use alternative warning suppression

* Remove newline

* Fix script

* Patch C2.EXE to disable C4786 warning

* Delete compile.cmd

* py-fixes

* Update tools/patch_c2.py

* Update tools/patch_c2.py

---------

Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2023-12-08 06:37:44 -05:00
MS
ce686705f2
Refactor MxList cursors (#313)
* LegoWorldList

* Refactor list cursors

* Add decomp markers for list cursors

* Fix decomp markers

* MxRegionListCursor edit to prevent accuracy drop

* Better fix for MxRegionListCursor
2023-12-07 14:14:49 -05:00
Mark Langen
260772e374
Bootstrap decomp of Tgl rendering library (#293)
* Bootstrap decomp of D3DRM rendering code

* This PR kicks off work on decompiling the D3D Retained Mode (D3DRM)
  rendering part of the codebase.

* High level overview:

* There is a base IMxDirect3DRMObject class which all of the D3DRM
  rendering objects inherit from. Its only virtual method is one to get
  the underlying object handle.

* A hierarchy of abstract classes inherits from this base class, which
  I've called "IMxDirect3DRM<class>". These classes only have pure
  virtual methods on them and don't contain any data.

* Each one of the abstract classes has exactly one concrete
  implementation, which I've called "MxDirect3DRM<class>". These classes
  have exactly one piece of data, which is a pointer to the underlying
  D3D Retained Mode object.

* If the classes need to store additional data, they store it in a
  userdata blob which is attached to the D3DRM object rather than the
  additional data being stored in the class itself.

* I've worked out about twice this many classes related to D3DRM
  rendering so far but the PR was getting large enough as is, so I'm
  cutting it here for now.

* I decomped sufficiently many methods of these classe to convince
  myself that the above observations are correct. About 60% of the
  decomped methods here are perfect matches, including at least one
  non-trivial method per class.

* Formatting

* Restructure changes using Tgl naming / details

* Restructure the changes to use the naming that we know from Tgl.

* Fill in some parts of the implementation I couldn't initially figure
  out using the details from Tgl (got more 100% matches).

* Move d3drm link requirement

* Fixups FloatMatrix -> FloatMatrix4

* Fix order

* Full fix for ordering problems

* Put back accidentally removed include.

* Fix call which should have been Release

* Use new and delete for DeepClone

* Missing Tgl:: on CreateRenderer

* Revert change to bool return value.

* Rename Something -> Unk

* Return paramter naming convention to what Tgl used

* Add scalar ddtor to verify inline destructor

* Fix order

* Change malloc/free -> new/delete in Tgl

* Remove duplicate destructor.

* Check all inline destructors

* Fix dtor comments

* Third time's the charm

* Alphabetical sort

* Decomp adjustments

* Add d3drm files to clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-12-07 13:10:42 +01:00
Joshua Peisach
f7dcdf9894
MxFlcPresenter vtable70, m_unk64 (#304)
* MxFlcPresenter: vtable70

* begin work on MxFlcPresenter's m_unk64

* Add another function that makes use of the FLIC header

* Remove space

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-29 13:35:32 +01:00
MS
3d48cdede1
STL lists for stream classes (#307) 2023-11-28 14:26:39 +01:00
Nathan M Gilbert
7fc1f8019f
Implement ViewROI and base classes (#287)
* Implement ViewROI and base classes

* Clean up Orientable header

* Move tgl to tgl subdirectory, and use target_include_directories

* Move classes to submodules

* Fix some missed references

* Fix/match UpdateWorldData

* Renaming / removing MxTypes / refactoring

* Consistent naming for Matrix

* Adjust format action

* Add Vector3/Vector4 to Data vector

* Add TGL comment

* Add a comment about Matrix4Impl

* Add ROI comment

---------

Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-19 15:38:07 +01:00
MS
0bb3ea6a03
MxList refactor (#290)
* MxList refactor

* Reorder LegoPathControllerList::Destroy

* MxPtrList custom destructor and more offsets

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

* Fix member offset comments in collection classes

* Fix template annotations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-19 13:23:30 +01:00
Christian Semmler
04b503c79f
Bootstrap MxMediaPresenter (#274)
* Bootstrap MxMediaPresenter

* Add override
2023-11-12 13:47:01 +01:00
Christian Semmler
9ac9fe2761
MxRegion: initial implementation (#218)
* MxRegion structures

* MxRegion structures

* Remove junk

* Refactor

* WIP

* Use MxRect32 ctor

* Refactor

* Add MxSize32, match MxRegion ctor

* Add two template annotations

* Fix missing instructions

* Fix another bug

* Refactor

* Add GetPoint

* Implement/match MxRegionTopBottom::MxRegionTopBottom

* Implement/match more functions

* More implementation

* Don't expose internal match

* Fix indent

* Add template annotations

* Implement remaining functions

* Fix comment

* Match loops

* Simplify function

* Merge

* Remove junk

* Format

* Format

* match MxRegion::vtable1c

* revert vtable1c match-hack

This reverts commit 7b886259882e2d04444546c1323734ec3c243cf6.

---------

Co-authored-by: Ramen2X <64166386+Ramen2X@users.noreply.github.com>
2023-10-31 11:30:13 -04:00
Ramen2X
153f4a872e
implement/match several mxsmkpresenter functions (#251)
* implement/match several mxsmkpresenter functions

* formatting

* formatting (sequel)

* Match remaining functions

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-27 19:00:20 +02:00
Nathan M Gilbert
7d8c57fc9c
Rename some functions and members (#246)
* Rename some functions and members

* Match LegoWorld::Notify to 100%

* Match MxOmni::Destroy to 100%

* Fix parameter prefix

* Fix another parameter

* Fix CR at EOF

* Fix CR at EOF

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-25 16:51:59 -04:00
Anonymous Maarten
e928fc9425
Build fixes for mingw (#245) 2023-10-25 01:24:29 +02:00
Ramen2X
74329d681b
implement/match CalcLocalTransform (#241)
* implement/match CalcLocalTransform

* fix odd build error

* address feedback

move vec.h to thirdparty folder
update vec.h
move all realtime code to realtime folder
move calclocaltransform out of legoutil and into realtime
cast shift to MxS32
add additional unroll hack to CalcLocalTransform to prevent msvc entropy
2023-10-24 14:27:24 +02:00
Nathan M Gilbert
4cc6b9b8ec
Implement Score (#230)
* Implement Score

* Update mxomni.cpp

Fix case of OFFSET comment.

* Fix DeleteObjects

* Apply changes (see comment)

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-23 13:16:21 +02: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
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
Andrew Gutekanst
7cf85e6f06
Add LegoMeterPresenter stub class (#206) 2023-10-14 15:08:51 +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
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
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
Christian Semmler
4a674d823b
Implement MxDSSelectAction Clone/operator=/CopyFrom (#154) 2023-10-07 20:03:15 +02:00
DmitriLeon2000
775ee9f05f
Move MxMIDIManager to MxMusicManager (#178) 2023-10-07 17:02:12 +02: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
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
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
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
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
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
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
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
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
5a2cc72dbb
MxMediaManager (#116) 2023-08-28 03:01:45 -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
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
itsmattkc
b59d8ef5cf include directx 5 sdk
This is almost certainly abandonware, fairly small (<1MB), and is going to save us a lot of dev environment headaches
2023-08-06 12:47:16 -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
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
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
Joshua Peisach
ac89815663
🍕 (#79)
* start pizza

* Add some pizza vtable functions (they are stubs at the moment)

Unknown parameter types, likely either Pizzeria or PizzaMissionState.

* Pizza: Add/update functions as according to MxCore inheritance

IsleActor::Notify needs to be stubbed
---------

Co-authored-by: Kai Kaufman <ktkaufman@wpi.edu>

* match pizza destructor

* Update pizza members

* add size asserts

---------

Co-authored-by: Kai Kaufman <ktkaufman@wpi.edu>
Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-08-03 09:54:08 -07:00
pewpew
4a50a9ff56
MxNotificationManager and MxParam initial work. (#78)
* MxNotificationManager initial work.

* Add .swp files to .gitignore.

* Checkpoint before anything too crazy with param

* Cleanup and add MxParam.

* Checkpoint for everything except MxNotificationManager::Register.

* Add int return type to MxCore::GetId instead of relying on implicit function nonsense.

* Add stlcompat.h so this can still be built on modern compilers, fix affected type size asserts.

* Switch to Mx types

* Add BUILD_COMPAT option to CMake so the project can still be built with modern compilers.

* Change vtable14 and vtable18 to Register and Unregister in MxTickleManager.

* Remove last unsigned int reference to id type.

* Remove MxList, use one inherited class per type. Improves accuracy again.

* Address compiler compatibility code review.

* Match MxNotificationManager::Register.

* Re-enable MxNotificationManager DECOMP_SIZE_ASSERT.
2023-07-15 23:43:08 -07:00
MattKC
2ffe227d82
Add SmartHeap (#83)
* add smartheap

* cmake: bump even further

* this seemed to be necessary but now it isn't? ok

* cmake: force include smrtheap.hpp

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* cmake: force include smrtheap.hpp 2

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* remove compiler defs - unnecessary if force-including anyway

* cmake: use interface for cleaner code

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2023-07-15 23:18:21 -07:00
itsmattkc
67115e32d3 cmake: bump minimum version 2023-07-07 12:22:42 -07:00
Mark Langen
889fd886f0
MxSemphore + MxThread + MxThread implementions (#80)
* Add MxSemphore + MxThread and the two implementations I could find
  of MxThread (consumers extend it and override the Run method).

* Implement a function in MxDiskStreamProvider which uses thread and
  semaphore to confirm correct layout / size of those classes.

* All 100% match except two functions with a pair of registers swapped.
2023-07-07 11:00:48 -07:00
Mark Langen
391ca9908f
LegoStream and implementations 100% match (#77)
* MxFile and implementations 100% match

* Add MxFile and it's implementations, MxSystemFile and MxMemoryFile.
  The names are chosen by me, we don't know their original naming.

* These expose a Read/Write/Seek/Tell interface for reading and writing
  data, either from a file on disk or memory buffer.

* 100% match all functions.

* Change name to LegoStream

* Use p_ convention

* Assert size
2023-07-07 09:20:51 -07:00
Anonymous Maarten
646b39e876
Implement MxObjectFactory::{MxObjectFactory,Create} + match sizes of Mx.*Presenter objects created by it (#59)
* Get Isle building on MinGW32 (#63)

* Add MxUnknown100dc6b0::~MxUnknown100dc6b0 stub

* Declare destructor of MxOmni and MxTransitionManager in class

* inline attribute must go first

* Stub LegoState::Vtable0x14 for Act3State

* MxStreamer::VTable0x14 is not an override

* Stub MxEntity::Destroy for LegoState::Destroy

* Stub MxUnknown100dc6e0 for MxSoundManager

* ::ClassName and ::IsA are const methods

* methods in the class body don't need a namespace

* MxSoundManager subclasses MxUnknown100dc6e0

* LegoInputManager subclasses MxPresenter

* NotificationId is an enum, and does not need __declspec(dllexport)

* Fix final #endif of legoomni.h and mxobjectfactory.h

* Add const alternative for LegoOmni::Create and MxVideoParam, only available for MinGW

* Alternative approach to MinGW compatibility

* MinGW on Linux is case sensitve

* Don't delete a member variable. C++ automatically destructs member variables

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>

* MxatomId: implement inline operator==

* Add decomp.h header, containing macro's only used when matching the original binaries

* Add in-line constructor of MxPresenter

* MxMediaPresenter: add members to match size

* MxVideoPresenter: add members to match size

* MxCompositePresenter: add members to match size

* MxFlcPresenter: add members to match size

* MxSmkPresenter: add members to match size

* MxStillPresenter: add members to match size

* MxAudioPresenter: add members to match size

* MxWavePresenter: add members to match size

* MxMIDIPresenter: add members to match size

* MxEventPresenter: add members to match size

* MxLoopingFlcPresenter: add members to match size

* MxLoopingSmkPresenter: add members to match size

* MxLoopingMIDIPresenter: add check for size

* Implement MxObjectFactory::{MxObjectFactory,Create}

Matching of MxObjectFactory::Create is not good, because none of the other objects have been implemented.

* Implement a few MxPresenter methods

* Fix size of LegoInputManager

* Fix name of first padding member of legoinputmanager.h

* add DECOMP_SIZE_ASSERT macro

* Use DECOMP_SIZE_ASSERT macro + convert to hexadecimal

* fixed minor typos

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
Co-authored-by: itsmattkc <itsmattkc@gmail.com>
2023-07-02 00:00:28 -07:00