Commit graph

105 commits

Author SHA1 Message Date
MS
c8840117be
More effective match strategies (#804)
* More effective match strategies

* Basic check on instruction relocation

* More targeted check for relocation
2024-04-14 17:08:42 -04:00
Nathan M Gilbert
7821d952ec
Pathactor (#800)
* Implement LegoPathActor::VTable0x8c

* Fix paramater name

* WIP fixes

* more fixes

* style

* fix

* fix

* fix

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-04-14 16:43:07 +02:00
MS
512eb786ab
Detect calls using absolute indirect addressing (#784)
* Detect calls using absolute indirect addressing

* Ignore imports we can't match
2024-04-08 03:40:05 -04:00
MS
70912d16c6
Swap cmp operands for effective match (#783) 2024-04-07 16:57:41 -04:00
MS
56827fb2c4
Use colorama.just_fix_windows_console (#766) 2024-04-02 18:45:57 -04:00
Nathan M Gilbert
3839b3278c
Implement/match LegoExtraActor::VTable0x94 (#759)
* Implement/match LegoExtraActor::VTable0x94

* attempt to fix gcc

* WIP fixes

* Match

* Match

* Match

* add TODO

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-30 12:18:15 -04:00
MS
4fd6642be9
parser: don't enforce variable naming convention (#761) 2024-03-30 11:39:34 -04:00
Ramen2X
dd4d7cca9c
fix typo in reccmp effective match string (#754) 2024-03-29 14:20:02 -04:00
MS
6fda6ca92b
reccmp: Don't use placeholder for address comparison (#751) 2024-03-29 13:29:44 -04:00
MS
53b3d0b195
Add datacmp to CI (#746) 2024-03-29 07:58:59 -04:00
MS
3b68a90a08
Identify thunks in debug builds (#741) 2024-03-27 16:13:23 -04:00
MS
064feab51a
Detect when we exceed original function size (#736) 2024-03-26 21:01:37 -04:00
MS
b9f34290d5
Ignore annotations that would cause an exception (#733) 2024-03-26 17:50:24 -04:00
MS
ededdf31c3
Identify and handle jump tables (#732) 2024-03-26 19:06:35 +01:00
Nathan M Gilbert
1e3ca11886
Implement/match LegoAnimActor (#730)
* Implement/match LegoAnimActor

* Name changes (deviation from original source)

* Attempt to fix modern build

* Add missing override

* Match LegoAnimActor::SetWorldSpeed

* Remove junk

* Style changes and implement WEEdge

* Add override

* Match LegoAnimActor::FUN_1001c1f0, style

* Style

* Add missing annotations, STUB LegoPathBoundary

* Style

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-26 18:51:52 +01:00
MS
d9913ead83
Virtual inheritance follow-up (#727) 2024-03-25 16:34:20 +01:00
MS
0295a08c94
Keep capstone working on Python 3.12 (#722) 2024-03-24 17:20:58 -04:00
MS
3f03940fcb
Match vtables with virtual inheritance (#717)
* Match vtables with virtual inheritance

* Simplify vtable name check

* Thunk alert
2024-03-23 18:01:40 -04:00
MS
739caacd8d
More features for reccmp HTML UI (#701) 2024-03-22 18:40:51 +01:00
Christian Semmler
0e146f08d6
Implement/match LegoNavController::CalculateNewPosDir (#675)
* Implement/match LegoNavController::CalculateNewPosDir

* Fix naming

* Fix naming
2024-03-15 16:33:32 +01:00
MS
5e0e7ab908
Make reccmp more compatible with debug builds (#674) 2024-03-15 16:17:08 +01:00
MS
5eb74c06fd
reccmp: Sanitize performance (and more) (#654) 2024-03-10 14:49:45 -04:00
MS
ec1fcce08c
Data comparison tool (#618)
* Parse cvdump TYPES section. Add datacmp tool.

* Corrections

* Use static

* Revert "Use static"

This reverts commit e0a4324e00.

* Handle partially initialized variable

* Shuffle order of legounksavedatawriter

* Revert "Shuffle order of legounksavedatawriter"

This reverts commit 506e06f117.

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-05 09:45:09 +01:00
MS
688dc0b6ee
Replace custom elements with HTMLElement (#585) 2024-02-21 18:04:38 -05:00
MS
48cd648357
reccmp: diff bugfixes (#583) 2024-02-21 04:08:16 -05:00
MS
9c71209fb9
reccmp: HTML refactor and diff address display (#581)
* reccmp: HTML refactor and diff address display

* Restore the @@ range indicator
2024-02-20 08:56:33 +01:00
MS
ba8f2b1c0f
parser: Detect function declaration (#580) 2024-02-19 16:00:48 +01:00
MS
8aa9d9a8b3
reccmp: New diff option (#563) 2024-02-15 03:33:40 -05:00
MS
1b696e4bd8
reccmp: Unique addresses and stub reporting (#554) 2024-02-13 20:25:51 -05:00
MS
971ac8b6e7
LegoCacheSound and related STL (#560)
* LegoCacheSound and related STL

* Changes/annotations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-02-14 00:34:14 +01:00
Anonymous Maarten
ccb6223d70
Decompiled CONFIG.EXE executable (#533)
* mxdirectdraw: no need to explicitly add a terminating '\0' in C

* mxstopwatch must include LIMITS.H for ULONG_MAX

* Add Config app

* 88.78%

* style fixes

* Test more CONFIG things

* Add a few assertions on MFC classes

* reformat

* actionSSSSSSSSSSSSSSS

* actions again

* decomplint needed a shebang

* Fix annotations of Message Map entries

* ci: We're building CONFIG.EXE, not CONFIG.DLL

* remove ninja.exe

* Fix CAboutDialog::GetMessageMap annotation

* format reloaded

* Fix global CConfigApp object annotation

* trigger worflows

* ci: request at least python 3

* oops :)

* curl CONFIGPROGRESS-OLD.TXT will fail

* Forget about actions/setup-python (for now)

* Annotation fixes

* Config tweaks and MxDirect3d annotations

* It's important to compare against the correct file

* Introduce common CDialog parent for CAboutDialog and CMainDialog

* format

* Remove CSerializer

---------

Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2024-02-07 12:11:45 +01:00
MS
00e32673d1
Ordinal imports (#534) 2024-02-06 21:03:55 +01:00
MS
264b9e815b
Match static function variables (#530)
* Match static function variables

* IsleApp::Tick static variables
2024-02-05 12:43:13 +01:00
MS
8cc79ad4de
Performance enhancements (#527) 2024-02-04 19:37:37 +01:00
Christian Semmler
a7acf8c607
Implement/match InfocenterState::InfocenterState (#515)
* Implement LegoState::Shuffle

* Remove unused params

* Move ctor

* Asm generate hotfix

---------

Co-authored-by: MS <disinvite@users.noreply.github.com>
2024-02-02 00:08:56 +01:00
MS
a1488b16b4
roadmap: Suggest order of modules (#507)
* roadmap: Suggest order of modules

* Include more modules in the list

* Sort by avg address with outliers removed

* Mark order-adjusted modules. Show library order.

* Use bisect for performance

* Use average address for library order

* Bugfix for get_module
2024-01-31 22:34:05 +01:00
MS
4137cd75e6
parser: Identify namespaces (#499) 2024-01-28 15:25:45 +01:00
Anonymous Maarten
5f413165cc
Spinoff some sources to static libraries (#484)
* cmake: use imported targets for 3rd party libs

* Fix casing of skateboard.h include

* cmake: tglrl realtime viewmanager mxgeometry

* cmake: spin off some source in static libraries

* dx5 for everyone

* ci: bump actions/checkout to v4

* move LEGO1/realtime/realtimeview.cpp to lego1 because it exports symbols

* add misc library

* Add omni library

* Return of the .def's

* Remove COMPAT_CONST in MxVideoParam::MxVideoParam

* Run clang-format

* move LEGO1/realtime/realtimeview.cpp to realtime lib

* Add 3dmanager library

* Rename .def files

* Remove incorrect deps to Omni

* Remove DLL expor decls

* Remove unnecessary library dep from ROI

* Remove COMPAT_CONST

* Move 3dmanager lib before Omni

* Remove mxgeometry lib (`geom` is actually `lego/sources/geom`, which we don't have in our decomp yet)

* viewmanager has a dependency on realtime + fix mingw's def

* Remove Smacker::Smacker from lego1 link libraries

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-24 21:16:29 -05:00
MS
a65eb9a4e0
Roadmap tool to compare binary structure (#479) 2024-01-22 16:15:12 +01:00
MS
6ed3e89ed2
reccmp: Show float constants (#473) 2024-01-20 20:19:49 -05:00
MS
b5a3c5feea
Enforce vtable match (#464)
* vtable enforce

* Vtable progress

* IslePathActor subclasses

* LegoState subclasses

* LegoWorld subclasses

* Presenter progress

* Remaining presenters

* All but two that need new files

* Merge into vtable branch (#3)

* Implement MxDisplaySurface::VTable0x44 (#467)

* Update mxdisplaysurface.cpp

* add arguments to header

* Fix glitched bitmaps

* WIP fixes

* Match

* Fix

* Changes

* Fixes

---------

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

* Implmement PoliceState::VTable0x1c (#468)

* Implmement PoliceState::VTable0x1c

* Fixes

---------

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

* Implement Lego3DView::Render (#470)

* Implement Lego3DView::Render

* use MxDouble

* Revert "use MxDouble"

This reverts commit a006b60e20.

* Begin work on Police class (#469)

* Begin work on Police class

* Use JukeBox::e_policeStation value

* Fixes

---------

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

* Implement MxDisplaySurface::CreateCursorSurface (#471)

* Update mxdisplaysurface.cpp

* Fixes

* Update legovideomanager.cpp

* Match to 100%

---------

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

---------

Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>

* Police fix

* Finish

* motocycle lower case

* Update historybook.h

* Update hospitalstate.h

* Update jetski.h

* Update legoinputmanager.h

* Update legolocomotionanimpresenter.h

* Update pizza.h

* Update act3shark.h

* Update ambulancemissionstate.h

* Update bumpbouy.h

* Update doors.h

---------

Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
2024-01-20 18:04:46 -05:00
Christian Semmler
b19807cb14
Update README.md [skip ci] 2024-01-19 23:27:11 +01:00
Christian Semmler
a2aa99485f
Update README.md [skip ci] 2024-01-19 23:24:03 +01:00
Christian Semmler
837fc4b7cc
Update README.md [skip ci] 2024-01-19 23:19:36 +01:00
Christian Semmler
9c0843e69b
Update README.md [skip ci] 2024-01-19 23:18:39 +01:00
MS
ee7241f73d
GifManager: use STL members (#460)
* Truncate symbol names to 255 characters when matching

* GifManager refactor

* Refactor, annotations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-19 21:23:12 +01:00
MS
909c44b679
reccmp: vtable comparison (#452)
* Add vtable comparison to reccmp

* Add missing scalar deleting destructors

* Fix some vtables

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-18 14:34:14 +01:00
Misha
f50b771fff
begin implementation of InfoCenter class (#444)
* Push changes

* fixes

* Implement Infocenter::HandleEndAction

* match Infocenter::StopCutScene

* implement Infocenter::HandleKeyPress

* fixes

* Update infocenter.cpp

* Update legoworld.cpp

* use enums

* WIP Fixes

* Fix

* Fix

* Fix

* Rename function

* Change enum

* Update enums

* Refactor another enum

* Refactor MxDSType

* Refactor HashTableOpt

* Fixes

* Refactor tickle enum

* Update other enums

* Add EnumConstantName to ncc

* Move enum to global namespace

* Rename enum

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-17 17:53:53 +01:00
MS
aaa18bc9e2
Decomp parser: indirect globals and string markers (#446)
* Enable string annotations and indirect globals

* Adding some STRING annotations

* Library functions
2024-01-17 12:56:34 +01:00
MS
7e9d3bde65
Reccmp: Use symbol names in asm output (#433)
* Name substitution for reccmp asm output

* Decomp marker corrections

* Fix a few annotations

* Fix IslePathActor dtor

* Fix audio presenter

* Fix LegoEntity::Create

* Fix Pizza and related

* Fix path part

* Add missing annotations

* Add missing annotations

* Add more missing annotations

* Fix MxNotificationParam

* More fixes

* More fixes

* Add missing annotations

* Fixes

* More annotations

* More annotations

* More annotations

* More annotations

* Fixes and annotations

* Find imports and thunk functions

* Fix more bugs

* Add some markers for LEGO1 imports, fix SIZE comment

* Add more annotations

* Rename annotation

* Fix bugs and annotations

* Fix bug

* Order

* Update legoanimpresenter.h

* Re-enable print-rec-addr option

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-14 22:28:46 +01:00