* LegoWorldList
* Refactor list cursors
* Add decomp markers for list cursors
* Fix decomp markers
* MxRegionListCursor edit to prevent accuracy drop
* Better fix for MxRegionListCursor
* 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>
* 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>
* 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>
* 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>
* 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
* 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>
* MxStreamProvider and MxRamStreamProvider vtable
* Update mxramstreamprovider.h
* Match IsA
* Fixes, improvements
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
* 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
* LegoEntity parse action string
* Reduced size assert for MxEntity
* remove override keyword for LegoEntity function
* Move global strings to new define.cpp file
* 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>
* 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>
* 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
* 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
* 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.
* 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.
* 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>
* 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>
* 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.
* 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>
* 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.
* 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
* 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>