Commit graph

310 commits

Author SHA1 Message Date
Christian Semmler
0391b5b42a
Replace more magic numbers with script values (#714)
* Replace more magic numbers with script values

* Matches/fixes

* Make const
2024-03-23 18:06:31 +01:00
Christian Semmler
18377c2f1f
Implement/match LegoNavController::UpdateCameraLocation (#713)
* Implement/match LegoNavController::UpdateCameraLocation

* Add size assert
2024-03-23 17:10:12 +01:00
Nathan M Gilbert
8b21e8136e
Animmanager (#712)
* Implement LegoAnimationManager::StartEntityAction
Fix some class definitions

* Fix style issues

* Add size annotations

* Fix global pointer

* Style/naming

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-23 15:09:20 +01:00
Nathan M Gilbert
fca8f74bd8
Fix Annotations and LegoAnimActor class structure. (#710)
* Fix size annotations for legoomni
Fix structure and add placeholder annotations for LegoAnimActor and subclasses

* Fix LegoCarRaceActor constructor
Fix function name in LegoRaceCar

* Add size assertions for legoomni and fix sizes

* Various style fixes

* Use other marker so vtable.py doesn't compare

* Revert "Use other marker so vtable.py doesn't compare"

This reverts commit 608985cd73.

* Fix copy/paste error

* Remove stale comment.

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-22 21:30:58 -04:00
Ramen2X
96f7219811
implement/match Hospital::HandleButtonDown() (#711) 2024-03-22 17:27:22 -04:00
Christian Semmler
68bb20f04f
Implement LegoCharacterManager::CreateROI (#709)
* WIP

* Create globals

* Add Read

* Name Init

* Add LegoCharacter init data

* Add define for NULL

* Use MxS8

* Add LegoCharacterLOD

* WIP CreateROI

* Fix

* WIP

* Match

* Match

* Match, implement Find

* Fix MeshBuilder

* Fix

* space
2024-03-22 18:40:19 +01:00
Ramen2X
8cffa7cf8c
implement Hospital::HandleClick() (#708)
* implement Hospital::HandleClick()

* style

* style
2024-03-21 13:27:51 -04:00
Misha
9256554406
Implement LegoCameraController::Notify & TimeROI::FUN_100a9b40 (#707)
* Implement LegoCameraController::Notify & TimeROI::FUN_100a9b40

* Fixes/matches

* Style

* Fix

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-21 15:39:23 +01:00
Ramen2X
770da22a1d
implement/match Hospital::HandleEndAction() (#704)
* implement Hospital::HandleEndAction()

* don't compare m_unk0x128 against char

* fix gotos

* match
2024-03-20 19:19:08 -04:00
Misha
3ce1e4985e
begin LegoAnimMMPresenter (#706) 2024-03-20 22:11:40 +01:00
Misha
e5fa35fd99
Implement a few registrationbook methods (#703)
* Implement a few registrationbook methods

* Match RegistrationBook::HandleKeyPress

* Match RegistrationBook::CreateSurface

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-20 17:26:10 +01:00
Misha
556c7698d8
implement RemoveFromCurrentWorld (#700)
* implement RemoveFromCurrentWorld

* Replace magic values

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 21:07:07 +01:00
Ramen2X
2477b89e32
add actions forward decl header (#699)
* add actions forward decl header

* newline

* format

* remove existing fwd declares

* Headers

* replace COMPAT_MODE check

* flip

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 15:54:13 -04:00
Misha
eaa935f646
Finish LegoVariables class (#698)
* Finish LegoVariables class

* Update legonavcontroller.cpp

* Update legobackgroundcolor.cpp

* Match functions, style, refactor visible

* Use MxBool

* Merge/fix

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 19:44:42 +01:00
Christian Semmler
0994d6dbfb
Implement LegoCharacterManager::GetROI (#696)
* Implement LegoCharacterManager::GetROI

* Add TODO
2024-03-19 19:23:34 +01:00
Misha
277957f0d5
implement misc presenter functions (#695)
* implement misc presenter functions

* style/spacing

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 16:07:11 +01:00
Misha
fd1b371864
Implement a few LegoBackgroundColor functions (#694)
* Update legobackgroundcolor.cpp

* Update legobackgroundcolor.cpp

* minor style

* minor style

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 15:22:11 +01:00
Misha
e454e56b52
Implement a few RegistrationBook functions (#693)
* Implement a few RegistrationBook functions

* Match functions

* minor style

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-19 15:15:24 +01:00
Christian Semmler
44bc575a2d
Replace some magic numbers with enum values (#692) 2024-03-19 07:45:29 -04:00
Christian Semmler
52d74647be
Implement/match Isle::HandleEndAction and Isle::HandleElevatorEndAction (#691)
* WIP

* Match
2024-03-18 15:00:58 -04:00
Christian Semmler
d96679ea9e
Implement/match Isle::HandleClick (#690)
* Isle::HandleClick

* WIP

* Match
2024-03-18 17:31:22 +01:00
Ramen2X
44f49a7a57
implement/match Hospital::HandleKeyPress() (#689) 2024-03-18 12:23:19 -04:00
Christian Semmler
e1135d9c1d
Use script values from enum for clicked objects (#688) 2024-03-18 16:05:05 +01:00
Christian Semmler
ba5bc46c0c
Implement/match FUN_10032620 (#687) 2024-03-18 15:38:02 +01:00
Ramen2X
937a45020c
refactor action headers (#686) 2024-03-17 16:52:42 -04:00
Misha
b38a2a4980
implement RegistrationBook::HandleClick (#685)
* implement RegistrationBook::HandleClick

* fix build

* Style

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-17 19:58:27 +01:00
Christian Semmler
0fe3fa65aa
Implement/match Isle::FUN_10032d30 (#684) 2024-03-17 18:26:41 +01:00
Christian Semmler
5b8f515968
Implement/match Isle::HandleTransitionEnd (#683)
* Implement/match Isle::HandleTransitionEnd

* Rename enums

* Forward declare enum for C++11+

* Add underlying storage to action headers

* Fix missing define
2024-03-17 18:01:47 +01:00
Ramen2X
4197e3c326
implement Hospital::ReadyWorld() (#682) 2024-03-16 17:02:05 -04:00
Christian Semmler
0a4db65b24
Implement/match Isle::Enable (#681)
* Implement/match Isle::Enable

* Fix order
2024-03-16 19:20:44 +01:00
Christian Semmler
70e8796af3
Implement/match LegoEntity::VTable0x3c (#680) 2024-03-16 03:20:44 +01:00
Ramen2X
bf6765b575
fix dupes in action headers (#679) 2024-03-16 02:43:56 +01:00
Ramen2X
6cd5ffcf1a
implement RegistrationBook::ReadyWorld(), impl/match MxDisplaySurface::CopySurface() (#678)
* implement RegistrationBook::ReadyWorld()

* don't fix the size of letterBuffer

* Fix crash in MxStillPresenter::Clone

* Implement MxDisplaySurface::CopySurface

100% match

* improve accuracy

* invert HasRegistered check

* fix legogamestate structure, documentation tweaks

* this might be cleaner actually

* Update mxdisplaysurface.cpp

* Update legogamestate.h

* don't hardcode action ids in VTable0x64

* Match ~98%

---------

Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-16 02:32:06 +01:00
Nathan M Gilbert
d07d7edc81
Implement methods to load dta files. (#673)
* Implement methods to load dta files.

* fix style issues

* fix vtables

* fix more style issues

* fix ddtor names

* Remove explicit padding, add annotations, asserts

* Use List template

* trigger CI

* Fix class refactor

* Match code, fix annotations

* Fix

* 98% match

* Fix

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-16 01:43:45 +01:00
Ramen2X
4ddd9e200c
implement/match Hospital::Tickle() (#677) 2024-03-15 19:16:43 -04:00
Christian Semmler
10ae05a888
Add missing size assert 2024-03-15 16:35:28 +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
Christian Semmler
7edad07d18
Implement/match LegoEntity::GetWorldPosition/Direction/Up (#672)
* Implement/match LegoEntity::GetPosition/Direction/Up

* Rename
2024-03-13 20:29:28 -04:00
Ramen2X
aaee10949e
implement Hospital::Notify(), Enable(), VTable0x64() (#670)
* implement Hospital::Notify(), Enable(), VTable0x64()

* function order

* Fix HandleClick

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-13 16:32:20 -04:00
Ramen2X
a9a564b25e
implement/match Hospital::~Hospital() (#669) 2024-03-13 15:10:53 -04:00
Christian Semmler
0f2aee1849
Implement/match LegoPointOfViewController::SetEntity (#668)
* Implement/match LegoPointOfViewController::SetEntity

* Fix order
2024-03-13 19:03:30 +01:00
Christian Semmler
0623e6a766
Implement/match LegoPointOfViewController::Tickle (#667) 2024-03-13 18:46:20 +01:00
Ramen2X
beb30e80ea
slight style tweaks to legogamestate and related members (#666) 2024-03-13 13:17:20 -04:00
Ramen2X
4aafc435f5
implement/match Hospital::Create() (#665) 2024-03-13 11:45:27 -04:00
Christian Semmler
06080b6492
Changes to GasStation::Create based on beta debug build (#664)
* Implement/match LegoAnimNodeData::FUN_100a0990

* Change GasStation::Create based on beta debug build
2024-03-13 16:38:38 +01:00
Christian Semmler
9d80cf4824
Implement/match LegoAnimNodeData::FUN_100a0990 (#662) 2024-03-12 14:11:13 -04:00
Christian Semmler
02838d0f57
Implement LegoAnimNodeData::GetRotation (#661)
* WIP

* Improve matches
2024-03-12 18:21:58 +01:00
MS
e3d7188ec9
Use AUTOLOCK macro (#660)
* Use AUTOLOCK macro

* MxAutoLock

* Remove semicolon

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

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2024-03-12 15:23:50 +01:00
Ramen2X
b0483000d8
TransitionNone() -> NoTransition() (#659) 2024-03-11 21:23:31 -04:00
Ramen2X
9207d1cb28
remove redundant MxU16 cast in MosaicTransition()
mistake, but it gets optimized out anyways
2024-03-11 17:37:45 -04:00
Ramen2X
121708a574
match MxTransitionManager::MosaicTransition() (#658) 2024-03-11 17:33:43 -04:00
Christian Semmler
7659db49e7
Implement LegoAnim::CreateLocalTransform (#657)
* Implement LegoAnim::CreateLocalTransform

* Match Matrix4::Scale
2024-03-11 15:15:18 -04:00
Ramen2X
6dfee432ea
rename MxTransitionManager transitions (#655) 2024-03-11 04:57:58 -04:00
Ramen2X
c28c2aeb52
fix regressions (#653) 2024-03-10 12:45:46 -04:00
Ramen2X
7fad763699
refactor script enum structure (#649)
* add autogenerated action headers

* refactor police

* refactor infocenter

* refactor jukebox

* refactor regbook

* format

* scope headers in namespaces instead

* attempt to dynamically build headers ignore list in ncc

* correct whitespace in naming.yml

* fix wrong folder

* fix accidental extra newline in cmakelists
2024-03-10 17:08:21 +01:00
Christian Semmler
d090b449d1
Add CalcWorldBoundingVolumes (#651) 2024-03-10 15:29:16 +01:00
Christian Semmler
8069923651
Refactor files based on beta debug build (#645)
* Rename LegoUnkSaveDataWriter -> LegoCharacterManager

* Refactor mxomni into mxomni/mxmisc

* Refactor legoomni into legoomni/misc

* Resolve deps

* Refactor atom

* Refactor mxutil

* Refactor mxio

* Rename/relocate files

* Fix format
2024-03-09 21:07:52 +01:00
Christian Semmler
c62469fef4
Implement/match LegoPartPresenter::ReadyTickle (#644)
* Implement/match LegoPartPresenter::ReadyTickle

* Remove space
2024-03-09 19:11:34 +01:00
Christian Semmler
6fa4a0dbec
Implement/match LegoPartPresenter::Store (#643) 2024-03-09 19:03:21 +01:00
Christian Semmler
9f875d01e5
Implement/match LegoPartPresenter::Read (#642)
* WIP

* Match

* Remove TODO

* Fix
2024-03-09 18:27:53 +01:00
Christian Semmler
9e2f37e7ca
Implement LegoTexturePresenter::Read and Store (#641)
* LegoTexturePresenter::Read

* Implement LegoTexturePresenter::Store

* Rename

* Fix naming
2024-03-09 16:49:13 +01:00
Christian Semmler
fb800db862
Implement OrientableROI::FUN_100a46b0 (#640)
* Implement OrientableROI::FUN_100a46b0

* Fix
2024-03-09 03:52:42 +01:00
Christian Semmler
32ae9f3803
Implement/match LegoROI::FUN_100a9170 (#639)
* Implement.match LegoROI::FUN_100a9170

* Add two LOD functions
2024-03-08 21:29:16 +01:00
Christian Semmler
d978cbe7f9
Implement/match LegoROI::FUN_100a9210 (#638)
* Implement/match LegoROI::FUN_100a9210

* Fix order
2024-03-08 21:01:18 +01:00
Christian Semmler
309997fddc
Implement various LegoROI functions (#637)
* WIP

* Fix

* Fix
2024-03-08 20:28:52 +01:00
Christian Semmler
45cba2c00e
Implement/match remaining LegoLOD functions (#636)
* Implement/match remaining LegoLOD functions

* Add param name
2024-03-08 18:03:26 +01:00
Christian Semmler
873926afe2
Implement TglImpl::MeshBuilder::CreateMesh (#635)
* WIP

* Change

* Fix

* Improve match

* Rename class

* Fix function

* Fix annotation

* Fix annotations

* Fix annotation
2024-03-08 17:55:25 +01:00
Christian Semmler
53e2353f78
Implement LegoLOD::Read and related (#634)
* WIP

* Fix

* Remove bogus

* Fix

* Match

* Fix

* Remove TODO
2024-03-07 20:57:17 +01:00
Christian Semmler
a12146f52f
Implement/match LegoEntity::VTable0x34 (#633)
* Implement/match LegoEntity::VTable0x34

* Change parameter name

* Fix order
2024-03-06 20:12:20 +01:00
Christian Semmler
71bcd4c771
Implement/match LegoEntity::SetWorldTransform and ResetWorldTransform (#632)
* Implement/match LegoEntity::SetWorldTransform and ResetWorldTransform

* Add param name
2024-03-06 19:25:45 +01:00
Misha
3897e9c015
Add JailEntity class (#630)
* Add JailEntity class

* Update legoobjectfactory.h

* Update jailentity.h

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-05 16:05:38 -05:00
Christian Semmler
a93e2ae0d3
Implement/match LegoEntity::SetLocation (#629)
* Implement/match LegoEntity::SetLocation

* Remove comment
2024-03-05 20:31:57 +01:00
Christian Semmler
3b2bd0e9d4
Implement/match LegoEntity::SetROI (#628) 2024-03-05 19:35:28 +01:00
Christian Semmler
f6e44b1c1b
Implement LegoROI::Read and geom library (#627)
* Implement LegoROI::Read and geom library

* Match

* Match

* Fixes

* Fix
2024-03-05 18:38:53 +01: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
Christian Semmler
c9210c02fb
Bootstrap LegoLOD, implement/match ViewManager::FUN_100a66a0 (#625)
* Bootstrap LegoLOD, implement/match ViewManager::FUN_100a66a0

* Fixes

* Try fix

* Try this

* Fix
2024-03-04 22:57:35 +01:00
Christian Semmler
b8aa16ff80
Implement/match ViewManager::Remove (#624) 2024-03-04 22:06:40 +01:00
Christian Semmler
00c05aa80b
Implement/match remaining Lego3DView functions (#623) 2024-03-04 18:54:25 +01:00
Christian Semmler
d3b575169e
Implement/match LegoModelPresenter::FUN_1007ff70 (#622) 2024-03-04 18:26:36 +01:00
Misha
c2a46b058b
implement various LegoWorldPresenter functions (#621)
* implement LegoWorldPresenterFunctions

* fix typo

* Fixes/match

* Fix

* Match

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-03 20:34:55 -05:00
Christian Semmler
01f07a323c
Implement ModelDb (WDB reader/parser) (#619)
* WIP Read WDB

* Fixes

* WIP

* WIP

* WIP

* WIP

* Match

* Match

* Fix Compare

* Rename member
2024-03-03 21:35:56 +01:00
Misha
a6cf0b5856
implement BuildingEntity functions (#617)
* implement BuildingEntity functions

* fix build

* Update infocenterentity.h
2024-03-02 17:11:03 -05:00
Christian Semmler
de5cd98b76
Implement/match ViewManager::RemoveAll (#616)
* Implement/match ViewManager::RemoveAll

* Use const_iterator

* const

* Naming
2024-03-02 20:26:19 +01:00
Christian Semmler
6de17cf1b6
Implement/match some ViewManager functions (#615) 2024-03-02 19:40:42 +01:00
Christian Semmler
c643723a9c
Improve match of LegoView1::Create (#613) 2024-03-01 22:53:42 +01:00
Christian Semmler
baacb42bfb
Improve match of LegoVideoManager::Create (#612) 2024-03-01 22:46:28 +01:00
Christian Semmler
0067c24ead
Implement/match ViewLODListManager::Create (#611)
* Implement/match ViewLODListManager::Create

* Add stdio.h header

* Add remaining annotations
2024-03-01 22:32:10 +01:00
Christian Semmler
fb6eed9bff
Match StartAction functions, remove NextFragment (#610) 2024-03-01 19:07:07 +01:00
Christian Semmler
ec29f2633d
Improve matches in ROI classes (#608)
* Improve matches in ROI classes

* More function implementations

* Fix name

* Fix vtables

* Add annotation
2024-03-01 18:19:41 +01:00
Christian Semmler
49d6c88912
Match ParseExtra functions (#605)
* Match ParseExtra functions

* Match MxStillPresenter::ParseExtra

* Match remaining ParseExtra functions
2024-02-29 19:15:20 +01:00
Christian Semmler
f3f29e5536
Allow game to start 2024-02-28 15:09:08 -05:00
Nathan M Gilbert
0e7823cedd
LegoGameState player functions (#603)
* LegoGameState player functions

* Style

* use sizeof

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-02-28 21:03:27 +01:00
Nathan M Gilbert
4d84157888
Implement Save, Load, DeleteState (#602)
* Implement Save, Load, DeleteState

* WIP

* WIP

* Match LegoGameState::Save

* Spacing

* Match LegoGameState::DeleteState()

* More match

* Match

* Move vars

* Other fixes

* Rename

* Fix error

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-02-27 21:04:17 +01:00
Christian Semmler
c0a988b0fe
Implement/match LegoAnimPresenter::StartingTickle (#601)
* Implement/match LegoAnimPresenter::StartingTickle

* Fix vtable

* Fix vtable
2024-02-27 17:49:31 +01:00
Christian Semmler
68893d67ed
Implement/match LegoAnimPresenter::FUN_10069150 (#600) 2024-02-27 16:13:00 +01:00
Christian Semmler
60161c43b5
Implement/match LegoAnimPresenter::FUN_100698b0 (#598)
* Implement/match LegoAnimPresenter::FUN_100698b0

* Use const_iterator
2024-02-26 19:39:03 +01:00
Christian Semmler
e6c347b8ab
Implement/match LegoAnimPresenter::FUN_100697c0 (#597)
* Implement/match LegoAnimPresenter::FUN_100697c0

* Use LegoU32
2024-02-26 18:41:18 +01:00
Nathan M Gilbert
124b73046b
Continued work on LegoGameState (#596)
* Continued work on LegoGameState

* Fixes/matches/refactor

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-02-26 17:19:16 +01:00
Joshua Peisach
b524b47723
jukebox functions (#592)
* start jukebox functions

* JukeBox::notify

* implement remaining functions/fixes

* Fixes/matches

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-02-26 16:12:14 +01:00
Christian Semmler
c5318dca13
Implement/match LegoAnimPresenter::FUN_100695c0 (#595) 2024-02-25 18:55:57 +01:00