Commit graph

29 commits

Author SHA1 Message Date
Christian Semmler
494a556f8e
(Proposal) Adjustments to "decomp" language (#308)
* Adjustments to "decomp" language

* Fix a comment

* Fix accidental clang-formatting

* Fix order

* Fix order

* Remove junk

* Fix OFFSET

* Adjustments based on new suggestions

* Annotate globals

* Globals in ISLE

* More globals

* Merge from parser2 branch

* Allow prepending space for exact marker match

* To eliminate noise, require the 0x prefix on offset for marker match

* fix test from previous

* Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise

* FUNCTION to SYNTHETIC where needed

* Missed marker conversion on SetAtomId

* pylint cleanup, remove unused code

* Fix unexpected function end, add more unit tests

* Be more strict about synthetic name syntax

* Revert "Missed marker conversion on SetAtomId"

This reverts commit d87d665127.

* Revert "FUNCTION to SYNTHETIC where needed"

This reverts commit 8c815418d2.

* Implicit lookup by name for functions

* Fix VTABLE SYNTHETIC and other decomp markers

* Get vtable class name

* Vtable marker should identify struct

* No colon for SIZE comment

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update CONTRIBUTING.md

* Fix destructor/annotation

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 13:10:45 +01:00
Christian Semmler
10062d2b28
Return type of PutData is MxResult (#305)
* Return type of PutData is MxResult

* Remove out.html
2023-11-26 15:03:40 +01:00
Christian Semmler
5aa548c449
Replace FALSE with NULL 2023-11-25 07:22:23 -05:00
MS
1ae3b07dc2
Checkorder tool to keep functions in original binary order (#228)
* First commit of order tool

* More flexible match on module name. Bugfix on blank_or_comment

* Report inexact offset comments in verbose mode. Bugfix for exact regex

* Refactor checkorder into reusable isledecomp module

* Find bad comments in one pass, add awareness of TEMPLATE

* Refactor of state machine to prepare for reccmp integration

* Use isledecomp lib in reccmp

* Build isledecomp in GH actions, fix mypy complaint

* Ensure unit test cpp files will be ignored by reccmp

* Allow multiple offset markers, pep8 cleanup

* Remove unused variable

* Code style, remove unneeded module and TODO

* Final renaming and type hints

* Fix checkorder issues, add GH action and enforce (#2)

* Fix checkorder issues

* Add GH action

* Test error case

* Works

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-21 09:44:45 +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
Christian Semmler
8a1422f13e
Implement/match MxMediaPresenter::EndAction (#276)
* Bootstrap MxMediaPresenter

* Implement/match MxMediaPresenter::EndAction

* Merge

* Remove garbage
2023-11-13 11:22:58 +01:00
Christian Semmler
04b503c79f
Bootstrap MxMediaPresenter (#274)
* Bootstrap MxMediaPresenter

* Add override
2023-11-12 13:47:01 +01:00
Misha
a8254c048d
Implement more of LegoOmni (#267)
* commit code

* implement a few functions

* Update mxdsobject.h

* more stuff

* Update legoomni.cpp

* Update legoomni.cpp

* rename function

* fix

* undo useless changes

* Fixes

* Add global addr

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-06 10:00:24 +01:00
Misha
4c4dce1302
Finish MxBackgroundAudioManager (#263)
* MxBackgroundAudioManager additional functions

* fix code style

* MxBackgroundAudioManager::PlayMusic

* match MxBackgroundAudioManager::Notify

* MxBackgroundAudioManager::Notify

* rename functions

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-11-05 16:07:28 +01: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
Christian Semmler
b449da1fa3
Introduce clang-format (#240) 2023-10-25 01:38:27 +02:00
Anonymous Maarten
e928fc9425
Build fixes for mingw (#245) 2023-10-25 01:24:29 +02:00
Nathan M Gilbert
af1745db18
Implement Helicopter::VTable0xe4 (#243)
Clean up parent classes
2023-10-24 14:37:02 +02:00
Christian Semmler
f062543f87
Match MxPresenter::StartAction to 100% 2023-10-14 09:27:58 -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
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
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
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
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
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
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
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
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
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 718489923b.

* 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
MattKC
e16249b672
Define MxLong/MxULong (#71)
* define MxLong/MxULong

The "long" type has different sizes on different platforms, and this may cause issues.

* use DWORD to match RegQueryValueExA arg
2023-07-02 01:05:49 -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
Cydra
07912eb05a
Class layout for LEGO1 classes (#43)
* Stubbed a bunch of classes and annotated them for later use. Heavily wip and more of pseudocode right now.

* Converted pseudocode into real code!

* Created a bunch more classes and added more information to exisiting ones
Did not error check, this was pushed just for reference

* More classes and implementation details. Still not checked for any errors

* Fixed code and decided on a way to handle virtual table stubs

* Some additional fixes

* More smaller fixes

* Added classes to project and made it compile

* Fixed function adresses that caused the python script to fail

* More classes and virtual function resolves. Builds and compares fine.

* Again more classes and virtual function resolves. Builds and compares fine.

* No clue, I guess forced update for line endings

* Finished up some work, compiles fine. All functions are STUB annotated to not pollute reccmp.py output.

* line ending change

* rename GetClassName/IsClass

Mirroring recent changes from master

* further conform to current master

* update project

* cleanup

* project only updates when you close msdev

---------

Co-authored-by: Cydra <cydra95@gmail.com>
Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-06-29 01:10:08 -07:00