Compare commits

235 Commits

Author SHA1 Message Date
Fabian Neundorf
ef2d438a7d Clear unknowns in LegoCarBuildAnimPresenter (#1683) 2025-09-07 15:07:39 -07:00
Fabian Neundorf
e3b77fb50b Clear unknowns in LegoAct2 (#1679) 2025-09-07 22:54:22 +02:00
jonschz
48febaf5c5 Match Mx3DPointFloat overloads on BETA10 (#1682)
* Match Mx3DPointFloat overloads on BETA10

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-09-07 17:16:36 +02:00
jonschz
a7c43cbe17 Small BETA10 corrections (#1681)
* Small BETA10 corrections

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-09-06 17:39:28 +02:00
Fabian Neundorf
190c040c96 Clear unknowns in LegoWorld (#1674) 2025-08-25 15:13:10 -04:00
Fabian Neundorf
34293a9c04 Clear unknowns in RegistrationBook (#1678) 2025-08-25 08:18:56 -04:00
Christian Semmler
7c95890cad Remove obsolete enums in Infocenter (#1677) 2025-08-21 00:04:08 +02:00
Christian Semmler
689b44d87c Make atoms in RemoveFromWorld const& (#1676) 2025-08-10 21:53:27 +02:00
Fabian Neundorf
15fec495e5 Clear unknowns in Act2Brick (#1675) 2025-08-09 18:05:43 +02:00
Fabian Neundorf
61eaea8bb4 Clear unknowns in LegoAnimActorStruct and LegoAnimActor (#1673) 2025-08-09 17:40:12 +02:00
Fabian Neundorf
1a317a3ef8 Clear unknowns in LegoEntity (#1672) 2025-08-09 17:38:59 +02:00
Fabian Neundorf
4eba95c309 Clear unknowns in LegoAct2State (#1671) 2025-08-09 00:38:37 +02:00
Fabian Neundorf
33c4d1fdcb Clear unknowns in LegoGameState (#1670) 2025-08-08 12:32:37 -07:00
Fabian Neundorf
3d6ab8ff9d Name g_plantInfo indices in act2actor.cpp (#1669) 2025-08-08 12:31:39 -07:00
MS
2fc48b620e Dead code in MxBackgroundAudioManager (#1668)
* Dead code in MxBackgroundAudioManager

* Rename
2025-08-06 14:23:48 -04:00
MS
48b922d8f0 Add dead code from LegoCacheSound (#1667)
* Dead code from LegoCacheSound

* Use windef.h typedefs
2025-08-05 22:57:17 -04:00
Fabian Neundorf
f381d692d0 Clear unknowns in Act3List and Act3ListElement (#1666) 2025-08-04 20:52:19 +02:00
Fabian Neundorf
67695b5233 Clear unknowns in Act3State (#1665) 2025-08-03 19:17:17 -07:00
Fabian Neundorf
1e9c0a95df Clear unknowns in Act1State (#1664) 2025-08-02 08:20:37 -07:00
Fabian Neundorf
3ed6c58701 Clear unknowns in PizzaMissionState and Pizza (#1662) 2025-07-31 18:03:06 +02:00
Fabian Neundorf
d32384fc66 Cleared unknown in Jetski (#1661)
Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-07-31 02:17:12 +02:00
Fabian Neundorf
5361b01a10 Clear unknowns in Isle (#1660) 2025-07-30 15:43:11 -07:00
Fabian Neundorf
5495da6c53 Clear unknown in MxLoopingFlcPresenter (#1659) 2025-07-27 08:28:17 -07:00
Fabian Neundorf
9f242021a4 Clear unknowns in MxSmkPresenter and MxLoopingSmkPresenter (#1658) 2025-07-27 08:27:51 -07:00
Fabian Neundorf
0442fadc0e Clear unknown in InfocenterState (#1657) 2025-07-26 00:58:49 +02:00
Fabian Neundorf
ddaf497cc4 Clear unknowns in MxVideoPresenter (#1656) 2025-07-26 00:16:36 +02:00
jonschz
d555df6a58 Add BETA10 matches on LegoWEGEdge and others (#1655)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-25 23:49:16 +02:00
jonschz
a9e261606d Fix mxomni.* file names (#1654)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-25 22:19:09 +02:00
jonschz
03adac0c58 Match LegoOmni::Create(), other BETA10 matches (#1651)
* Match `LegoOmni::Create()`, other BETA10 matches

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-25 17:13:34 +02:00
Fabian Neundorf
2451b041f6 Clear remaining unknown in Ambulance (#1650) 2025-07-23 19:14:10 +02:00
Fabian Neundorf
eae038f6a9 Clear unknowns in MxVideoParamFlags (#1648) 2025-07-22 20:58:00 +02:00
Fabian Neundorf
ed33541a2e Clear unknowns in LegoAnimScene (#1649) 2025-07-22 10:45:50 -07:00
jonschz
36f6d963dc BETA matches for SoundManagers (#1646)
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-21 23:42:42 +02:00
Fabian Neundorf
fd299137ff Clear unknowns LegoCameraController (#1647) 2025-07-21 22:18:59 +02:00
MS
b1dcc26d79 Beta functions for MxVariable (#1645)
* Beta match MxVariable classes

* CustomizeAnimFileVariable
2025-07-20 23:08:26 -04:00
MS
4edd8d1214 Beta match MxThread and MxSemaphore (#1644) 2025-07-20 21:58:16 -04:00
jonschz
2980f88bb0 Fix filenames based on BETA10 MxAutoLock (#1640)
* Inline LegoAnimPresenters
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-20 18:20:40 +02:00
MS
132d9c817f Build BETA10 in CI (#1639) 2025-07-20 11:47:08 -04:00
Fabian Neundorf
0a58d112e8 Clear unknowns in LegoOmni and misc.h (#1642) 2025-07-20 08:18:59 -07:00
Fabian Neundorf
56c15699da Clear unknown in MxSoundManager (#1641) 2025-07-20 16:05:28 +02:00
jonschz
6b5f3724c0 Beta match MxAutoLock and MxCriticalSection (#1638)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-20 07:57:26 +02:00
Fabian Neundorf
9e860d910c Name spawn areas (#1636) 2025-07-19 07:29:34 -07:00
jonschz
73d9ef1d80 Improve FUN_10061010, other fixes (#1634)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-19 16:28:35 +02:00
jonschz
29d7a5df89 Get BETA10 to compile again (#1635)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-19 12:24:49 +02:00
Fabian Neundorf
bd71370602 Clear unknown in LegoControlManagerNotificationParam (#1633) 2025-07-19 01:09:37 +02:00
Fabian Neundorf
cfd36ec88f Clear unknowns in LegoPhonemePresenter (#1632) 2025-07-18 23:26:34 +02:00
Fabian Neundorf
66844aa945 Clear unknown in TimeROI (#1631) 2025-07-18 01:53:35 +02:00
Fabian Neundorf
6d6971734b Clear unknowns in LegoROI (#1630) 2025-07-17 01:19:17 +02:00
Fabian Neundorf
05360b4468 Clear unknowns in TowTrack and TowTrackMissionState (#1629) 2025-07-15 20:39:22 +02:00
Joshua Peisach
8a82ebeb7e Fix typo in SetSkyColor (#1628) 2025-07-15 19:16:25 +02:00
MS
bf98bfffdf CONFIG (#1627) 2025-07-15 12:58:13 -04:00
MS
9c9baf3c3e Beta matching in mxdirectxinfo.cpp (#1626)
* Use goto

* Fix constructors

* Reorder error strings

* Compat mode todo

* Rename p_context to p_d

* Use count variable

* Fix typo
2025-07-15 10:43:40 -04:00
Fabian Neundorf
3b79b4c834 Use enum values for LegoPathStructNotificationParam.GetTrigger() (#1625) 2025-07-14 22:18:21 +02:00
MS
e155bea7fd Remove GetDriverList getter (#1624) 2025-07-14 11:44:14 -04:00
Fabian Neundorf
356c64ce0e Name state field, getter and setter in Act1State (#1621) 2025-07-13 12:01:06 -07:00
jonschz
40c1a40d2b Match FUN_1006b140() and related functions (#1623)
* Match on BETA10

* Possible improvement on Matrix4::Swap

* Document entropy build result

* Comments at at Matrix4::Invert

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-13 16:50:51 +02:00
jonschz
657720c825 Match Act3List::FUN_100720d0 (#1622) 2025-07-13 16:50:20 +02:00
MS
00a4861914 Beta matching CConfigApp (#1620)
* Beta matching CConfigApp

* Docs
2025-07-12 12:39:16 -04:00
jonschz
ac46537599 Interpret Act3List properties, minor fixes (#1619)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-12 17:05:29 +02:00
MS
10986376cb Fix #1575 (#1618) 2025-07-11 23:26:21 -04:00
Fabian Neundorf
d9d9880d8b Clear unknowns in LegoAnimNodeData (#1617) 2025-07-11 17:11:12 -07:00
Fabian Neundorf
a34c293177 Name Disable function in LegoOmni and misc (#1616) 2025-07-11 17:10:36 -07:00
Fabian Neundorf
6497cb42b7 Clear unknowns in Matrix (#1615) 2025-07-10 18:58:53 -07:00
MS
c784fc32f1 Move g_skeletonKickPhases to .data (#1614) 2025-07-10 00:29:22 -04:00
Fabian Neundorf
f0f771f3f4 Clear global unknowns in LegoROI (#1611) 2025-07-09 21:28:59 -07:00
MS
4ebc5b453f Improve match for Act3Ammo::Animate (#1612)
* Improve Act3Ammo

* Early return
2025-07-09 14:09:49 -04:00
Fabian Neundorf
5d3b6884e0 Clear unknowns in legoutils.h (#1610) 2025-07-08 07:26:32 -07:00
Fabian Neundorf
c7fda26cf4 Clear unknowns in Infocenter and InfocenterMapEntry (#1609) 2025-07-08 02:35:21 +02:00
Fabian Neundorf
8ffe7b776a Clear unknowns in LegoControlManager (#1607) 2025-07-05 18:23:00 -07:00
Fabian Neundorf
d3aecadb07 Clear unknown in LegoModelPresenter (#1608) 2025-07-05 16:55:59 -07:00
Fabian Neundorf
5544640b22 Clear unknowns in MxControlPresenter (#1606) 2025-07-04 21:53:50 +02:00
MasterTimeThief
df3d144ed9 Renamed more functions and variables in Car Build sections (#1605)
* Renamed variables and functions related to the Car Build sections

* Car Build variable renaming - fixed issues and added enum `ShelfState`

* Fixed some spacing in `legocarbuildpresenter.h`

* Fixed tab spacing

* Changed `m_shelfState` back to `MxU16`

* Cleared up `InitBuildPlatform`

* Fixed comments

* Renamed more functions and variables in Car Build sections

* Named `SelectPartFromMousePosition`

* Updated spacing formatting in `LegoCarBuild`
2025-07-04 02:23:07 +02:00
Fabian Neundorf
16c76c96f2 Clear time started unknown in MxDSAction (#1604)
This should not be confused with `GetStartTime()`, as that represents the time offset from the SI file.
2025-07-03 23:56:48 +02:00
Anders Jenbo
44d1ad13fe Set dwDDFX using flag (#1603) 2025-07-03 21:57:47 +02:00
Christian Semmler
4d8ba1986e Fix writing default texture (#1602) 2025-07-03 02:07:16 +02:00
Christian Semmler
89fe7fa924 Fix wrong notification type in LegoRace::Notify (#1601) 2025-07-02 22:43:57 +02:00
Fabian Neundorf
40ec911811 Clear unknown in MxWavePresenter (#1600) 2025-07-02 21:09:25 +02:00
Fabian Neundorf
805c57b6aa Clear unknowns in ViewLOD (#1599) 2025-07-02 02:02:03 +02:00
Fabian Neundorf
f825b053ff Clear unknown in mxutilities.h (#1598)
Also change the parameter name to mask as it better represents the
usage.
2025-07-01 00:29:23 +02:00
Korbo
f0df3cd0ef Clear a few unknowns in act 3 (#1597)
* Clear a few unknowns in act 3

* fix build error

* fix other build error

* requested changes
2025-06-30 12:20:53 -07:00
Christian Semmler
aa825aeecf Add macro for switchable building index (#1596) 2025-06-29 17:55:34 +02:00
Fabian Neundorf
0982038453 Clear unknown in Hospital (#1595) 2025-06-28 15:38:48 -07:00
Fabian Neundorf
9dcc701fcb Clear unknowns in GetSoundId (#1594) 2025-06-28 20:32:09 +02:00
Fabian Neundorf
89539a64f1 Clear unknown 0x10 in LegoEntity (#1593)
The naming is a bit weird, as only one bit is used so there are no other usages of this value.
2025-06-28 07:28:13 -07:00
Korbo
16a94c725c Names for race related or adjacent functions and variables (#1592)
* Names for race related or adjacent functions and variables

* fix formatting

* fix formatting
2025-06-28 01:08:45 +02:00
Fabian Neundorf
056064f9d4 Clear unknown in LegoLOD (#1590)
The function does mostly the same as `SetTextureInfo` but does not
explicitly set the color as well.
2025-06-26 22:35:04 +02:00
Fabian Neundorf
b66d1e2f64 Clear unknowns in Ambulance and AmbulanceMissionState (#1588) 2025-06-26 20:31:30 +02:00
Fabian Neundorf
8498c69af1 Clear unknowns in LegoPlantManager (#1587) 2025-06-24 22:38:08 +02:00
MattKC
ce85377f18 Create LICENSE (#1497) 2025-06-24 18:00:23 +02:00
Fabian Neundorf
7f10f7ae14 Clear unknown in ModelDbModel (#1586) 2025-06-23 14:34:02 -07:00
jonschz
edae5f58ec Remove getters/setters that (likely) don't exist (#1583)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-23 20:58:16 +02:00
MS
1701117e6f Improve MeshBuilderImpl::CreateMesh (#1584)
* CreateMesh

* Effective match for Clone()
2025-06-23 10:24:13 -04:00
jonschz
1677193635 Add reference to isle-portable to README (#1579)
* Add reference to `isle-portable` to README

* Fix uppercase

* Address review comments

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-23 12:32:19 +02:00
Christian Semmler
8195d2b251 Update legogamestate.cpp (#1582) 2025-06-22 18:48:09 +02:00
Christian Semmler
0a50915312 Fix implicit signed char-ness (#1581) 2025-06-22 17:55:36 +02:00
Fabian Neundorf
2595537c4c Clear unknowns in LegoAnimActorEntry and LegoAnimKey (#1580) 2025-06-22 05:34:29 -07:00
jonschz
16db496832 Match LegoGameState::History::WriteScoreHistory(), clear unknowns (#1576)
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-22 08:22:25 +02:00
Fabian Neundorf
e3fc6fd135 Use enum from LegoActor to map between string and id (#1577) 2025-06-21 15:32:30 -07:00
jonschz
f64af166c8 Add BETA10 addresses for LegoROI and others (#1569)
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-21 07:52:24 +02:00
Florian Kaiser
72eb194424 Clear unknowns in LegoAnimPresenter and related classes (#1565)
* Clear unknowns in `LegoAnimPresenter` and related classes

* Update LEGO1/lego/legoomni/include/legoanimpresenter.h

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-06-21 01:24:32 +02:00
jonschz
4691b0253c Fix BETA10 linker settings (#1572)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-20 06:53:42 +02:00
Fabian Neundorf
f9e34c46e3 Clear unknowns in PizzeriaState, Pizza and PizzaMissionState (#1574) 2025-06-20 00:38:31 +02:00
Fabian Neundorf
6159d23cde Clear unknowns in Radio and RadioState (#1573) 2025-06-19 23:52:02 +02:00
Fabian Neundorf
cf32607933 Clear unknown in ViewROI and ViewManager (#1571) 2025-06-18 07:06:43 -07:00
jonschz
94300afb6c Add minimal documentation for ALPHA, README cleanup (#1570)
* Add minimal documentation for ALPHA

* README cleanup

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-17 23:10:00 +02:00
Christian Semmler
f48e947552 BETA only assertion in Act3Ammo::Create (#1568) 2025-06-17 19:33:14 +02:00
Fabian Neundorf
0b46acab54 Name m_unk0x21 as GetUseAlias in LegoMesh (#1567) 2025-06-17 18:42:59 +02:00
Fabian Neundorf
fd3f08f4c4 Clear unknowns in LegoBuildingInfo and LegoBuildingManager (#1566)
* Clear unknowns in `LegoBuildingInfo` and `LegoBuildingManager`

* Name remaining unknown in `LegoBuildingManager`
2025-06-16 23:08:17 +02:00
Fabian Neundorf
16ccb0e06e Name locations after exiting buildings/vehicles (#1564)
* Hospital
* Infocenter
* Garage
* Police
* Jetski Build
* Racecar Build
* Any vehicle
2025-06-15 19:31:19 +02:00
Fabian Neundorf
aeac9f787e Gasstation (#1560)
* Clear unknowns in `GasStation` and `GasStationState`

* Make global variable in gasstation unique

* Apply same name to global variable in hospital.cpp
2025-06-15 08:48:54 -07:00
jonschz
86f35f5aba Remove reccmp README duplication (#1563)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-15 12:55:54 +02:00
Fabian Neundorf
26978f5484 Name LegoLOD::FUN_100aae20 (#1562) 2025-06-14 19:56:46 +02:00
Christian Semmler
e321385803 BETA matches in ViewManager (#1559)
* BETA matches

* Fix

* Fix `ViewManager::Update`
2025-06-13 04:14:28 +02:00
Fabian Neundorf
7b619d5544 Clear unknowns in LegoPlantManager (#1557) 2025-06-12 09:33:32 -07:00
jonschz
596ebde9d3 Add BETA10 assertions in LegoPathController (#1555)
* Add BETA10 assertions in LegoPathController

* formatting

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-06-12 08:52:56 +02:00
MasterTimeThief
9aa8dbfc46 Clear unknowns in 'LegoCarBuild' and 'LegoCarBuildPresenter' (#1542)
* Renamed variables and functions related to the Car Build sections

* Car Build variable renaming - fixed issues and added enum `ShelfState`

* Fixed some spacing in `legocarbuildpresenter.h`

* Fixed tab spacing

* Changed `m_shelfState` back to `MxU16`

* Cleared up `InitBuildPlatform`

* Fixed comments
2025-06-11 23:37:50 +02:00
Fabian Neundorf
3b3fe276c4 Clear unknowns in LegoPhoneme (#1556) 2025-06-11 23:29:23 +02:00
Anonymous Maarten
bc481cc1c5 assert(0) in LegoCarRaceActor::VTable0x1c is beta10-only (#1553) 2025-06-11 03:17:24 +02:00
Fabian Neundorf
99ff92e49e Use enum for states in PoliceState (#1552) 2025-06-10 16:07:10 -07:00
Fabian Neundorf
180d4949da Clear unknowns in PoliceState (#1551) 2025-06-10 11:51:21 -07:00
Christian Semmler
8cdc8fbc05 Name LegoAnimationManager::m_unk0x41c (#1550) 2025-06-10 01:17:34 +02:00
MS
f334eae667 Fix #1548 (#1549) 2025-06-08 21:38:36 -04:00
Fabian Neundorf
82f1ce8814 Clear unknowns/numbers in Hospital and HospitalState (#1545)
* Define state variables in `HospitalState`

* Cleared unknown for flashing leds in `Hospital`

* Misc name changes in `Hospital`

* Name states in `Hospital`
2025-06-08 15:57:38 -07:00
Florian Kaiser
36c1093c88 Clear unknowns in LegoPathBoundary, LegoWEEdge, LegoWEGEdge and LegoPathController (#1546) 2025-06-08 11:04:58 -07:00
Florian Kaiser
06af7d25c6 Rename g_wdbOffset to g_wdbSkipGlobalPartsOffset for clarity (#1547) 2025-06-08 08:04:06 -07:00
Fabian Neundorf
7471852e9d Named unknown function in LegoTextureInfo (#1544) 2025-06-07 18:04:55 +02:00
Christian Semmler
d714bf62f1 Improve LegoPathActor::VTable0x84 BETA match (#1543) 2025-06-06 23:22:46 +02:00
Fabian Neundorf
ac4d3b2490 Name for bounding box in ROI (#1541)
* Name for bounding box in ROI

* Use snake_case for member
2025-06-06 11:47:45 -07:00
Fabian Neundorf
9134dd791c Name boolean field in Mesh (#1540) 2025-06-04 23:30:06 +02:00
Fabian Neundorf
d272054d5a Clear unknowns in legocharactermanager (#1539) 2025-06-04 23:29:41 +02:00
Fabian Neundorf
d7d3a47cd2 Add names to LegoActorInfo.Part (#1538)
Each part consists of two "blocks" where every block has a list of
indices which reference into a list of names and the actual index used
for the list of indices.

By doing that, it is possible to reuse the list of name for every actor
and instead have a "sublist" through the indices list.
2025-06-03 18:11:01 -07:00
Fabian Neundorf
b4fb9f3a15 Better name for LegoActorLOD's flags (#1537) 2025-06-02 14:21:12 -07:00
Christian Semmler
f48dd8c912 Update legogamestate.cpp (#1535) 2025-06-01 18:46:14 +02:00
Anonymous Maarten
ac971f8c15 Assertion in MxTransitionManager::StartTransition is beta10-only (#1534)
This fixes an assertion error when:
1. Start the game
2  Skip intro (probably optional)
3. Turn left to the elevator room
4. Enter the elevator
5. Press the (I) button
2025-05-31 02:33:28 +02:00
Anonymous Maarten
941bc6ffa9 Fix UBSAN entering the petrol station car building minigame (#1533) 2025-05-31 02:19:11 +02:00
Anonymous Maarten
e813a12a4a Fix notification/presenter casts (#1532)
* LegoCarBuild: cast c_notificationType0 to MxNotificationParam

* MxBackgroundAuioManager gets a MxWavePresenter
2025-05-30 21:43:33 +02:00
Fabian Neundorf
d0f4725f0f Fill in unknown color string descriptions (#1531) 2025-05-30 21:12:49 +02:00
Christian Semmler
168bd4b26c Fix LegoTreeNode* construction (#1530)
* Fix LegoTreeNode* construction

* Fix
2025-05-29 23:41:57 +02:00
Anders Jenbo
211d409992 Apply RAND_MAX to legoanimationmanager.cpp (#1528) 2025-05-29 06:52:15 -07:00
Anders Jenbo
6e0b580b86 Correct delete[] in legocarbuildpresenter.cpp (#1529) 2025-05-29 06:51:42 -07:00
Anonymous Maarten
30ae89f483 LegoMeterPresenter: use array deleter + BETA10-only assertion (#1527)
* LegoMeterPresenter: use array deleter

(cherry picked from commit 0897f75c7ca0b10df2b43783d0e99ff5059a29fb)

* assert in LegoCarBUild::InitPresenter is BETA10-only

(cherry picked from commit 1a41b62f6f7ae5f5926941e621a740a31d3c745f)
2025-05-28 20:25:05 -07:00
MS
5646d017f1 RendererImpl, CameraImpl, LightImpl (#1525) 2025-05-28 22:04:01 -04:00
Anonymous Maarten
45890eec94 legoanimationmanager: use delete[] (#1526) 2025-05-28 18:28:30 -07:00
jonschz
b7090bd838 Match LegoActor and LegoPathActor in BETA10 (#1524)
* Match `LegoActor` in BETA10

* Cleanup

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-05-27 22:04:01 +02:00
jonschz
4186bae786 Match Helicopter::FUN_100042a0 (#1523)
* Match `Helicopter::FUN_100042a0`

* Add comment

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-05-26 23:33:52 +02:00
MS
b28fcae005 Match TextureImpl functions (#1521)
* TextureImpl functions

* TglD3DRMIMAGE functions
2025-05-26 18:46:22 +02:00
Christian Semmler
04b669cf96 Fix type cast in MxControlPresenter::FUN_10044270 (#1522) 2025-05-26 18:45:06 +02:00
jonschz
f7744f5550 Fix ambiguous matches in BETA10 (#1520)
* Fix ambiguous matches in BETA10

* Add more functions, fix one LINE annotation

* Fix LEGO1 matches

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-05-26 07:25:47 +02:00
MS
5ad885f958 TglImpl::DeviceImpl functions (#1519) 2025-05-25 11:37:16 -04:00
Florian Kaiser
804632b13f Refactor LegoUnknown100db7f4 to LegoOrientedEdge (#1515)
* Refactor `LegoUnknown100db7f4` to `LegoOrientedEdge`

* Update LEGO1/lego/sources/geom/legoorientededge.h

* Update legopathcontroller.h

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-24 23:09:24 -07:00
jonschz
8e54a20d7d Match DecodeSS2 (#1476)
---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-05-25 07:59:58 +02:00
Christian Semmler
a860e76dba Match LegoOmni::GetWorldId (#1517) 2025-05-24 17:12:07 +02:00
Florian Kaiser
90b5c27a8b Clear unknowns in MxBackgroundAudioManager (#1516)
* Clear unknowns in `MxBackgroundAudioManager`

* Apply suggestions from code review

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-24 06:49:43 -07:00
MS
4e49712391 Match Tgl MeshImpl and GroupImpl functions (#1514) 2025-05-23 12:27:41 -04:00
Erik Schulze
eb1177b409 rename functions and parameters in OrientableROI (#1512) 2025-05-21 20:13:28 -07:00
Anders Jenbo
5c67c26c3f Fix MxHashTableNode constructor (#1511) 2025-05-20 20:42:42 +02:00
Anonymous Maarten
40a21867e8 Document buttonId in RegistrationBook (#1510) 2025-05-19 18:05:35 -07:00
Anonymous Maarten
0b9c1756c7 Fix inclusion guards of 3 files (#1509)
* Fix inclusion guards of 3 files

* Apply suggestions from code review

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

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-20 02:15:30 +02:00
Erik Schulze
d67318e78b propagate name changes from commit fce97ea (#1508)
* propagate name changes from commit fce97ea

* remove dependency on omni types

* rename parameter too
2025-05-19 21:25:52 +02:00
MS
6808669da0 Use argument file for reccmp-aggregate samples (#1507) 2025-05-18 21:47:00 -07:00
Erik Schulze
7b34eea690 Use SUCCESS and FAILURE in MxPalette::SetSkyColor (#1506) 2025-05-18 16:36:25 -07:00
Anonymous Maarten
2915aa014f Use sizeof(type) instead of sizeof(variableName) when (de)serializing data (#1505)
* Use sizeof(type) instead of sizeof(variableName) when (de)serializing data

* Less usage of sizeof(variableName) while (de)serializing
2025-05-18 22:56:28 +02:00
Anders Jenbo
c9b41e2db8 Fix delete in legoanimmmpresenter.cpp (#1504) 2025-05-17 19:09:44 -07:00
Anders Jenbo
d00c08cc19 Rename FUN_1009e020 to ClearBackBuffers (#1503)
* Rename FUN_1009e020 to ClearBackBuffers

* Update mxdirectdraw.h
2025-05-17 18:01:29 -07:00
Anders Jenbo
3f0fe654ff Fix delete[] in mxstillpresenter.cpp (#1496)
* Fix delete[] in mxstillpresenter.cpp

Without this the game doesn't  run on Linux :)

* Update LEGO1/omni/src/video/mxstillpresenter.cpp

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

* Update mxstillpresenter.cpp

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-17 16:14:25 -07:00
Anders Jenbo
45e0e5bdd1 Correct delete[] in mxflcpresenter.cpp (#1501)
* Correct delete[] in mxflcpresenter.cpp

* Update LEGO1/omni/src/video/mxflcpresenter.cpp

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

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-17 14:22:30 -07:00
Anders Jenbo
bc920a295b Correct assert in view.cpp (#1500) 2025-05-17 13:26:01 -07:00
Anders Jenbo
d3cd491765 Correct delete[] in legowegedge.cpp (#1499) 2025-05-17 13:25:22 -07:00
Anders Jenbo
2d92aee589 Correct delete[] in mxcontrolpresenter.cpp (#1498) 2025-05-17 13:24:06 -07:00
Anders Jenbo
46ae3fbe89 Order enums the same way in both places (#1495)
To match LEGO1/mxdirectx/mxdirectdraw.cpp so it's not so confusing to compare uage
2025-05-15 21:11:06 -07:00
Anders Jenbo
f5cb2d4732 Use consts in callbacks (#1494) 2025-05-15 19:22:40 -07:00
Anders Jenbo
4c754b376c Enums in mxdisplaysurface.cpp (#1493)
* Enums in mxdisplaysurface.cpp

* Update mxdisplaysurface.cpp
2025-05-14 22:08:50 -07:00
Anders Jenbo
d52af9f4e3 Enum in legovideomanager.cpp (#1492) 2025-05-14 22:03:52 -07:00
Anders Jenbo
ad5ccd4e8b Enums in mxtransitionmanager.cpp (#1491) 2025-05-14 22:03:33 -07:00
Anders Jenbo
dabd404111 Correct enums in mxdirectdraw.cpp (#1490) 2025-05-14 22:03:16 -07:00
Anders Jenbo
f99da0cea7 Correct enums in legotextureinfo.cpp (#1489) 2025-05-14 22:02:35 -07:00
Anders Jenbo
a055567fa3 Correct CooperativeLevel endum (#1488) 2025-05-14 21:59:16 -07:00
Anders Jenbo
dbbf373748 Correct dwCaps bit flags (#1487)
* Correct dwCaps bit flags

* Update legotextureinfo.cpp
2025-05-15 02:01:10 +02:00
Anders Jenbo
fce97ea06f Correct check for lighting support (#1486) 2025-05-15 01:39:55 +02:00
Anders Jenbo
88651404cb Correct dwCaps enum in detectdx5.cpp (#1484) 2025-05-14 21:54:35 +02:00
Anders Jenbo
561825f6a0 Apply some enums to CONFIG (#1483) 2025-05-14 21:40:12 +02:00
Christian Semmler
396bf6b562 Fix wrong deletes in MxBitmap (#1482) 2025-05-13 18:42:12 -07:00
Christian Semmler
934d90fc96 Fix wrong use of delete vs delete[] (#1481) 2025-05-14 00:37:53 +02:00
MS
810c0b0654 Fix some MSVC annotations for LEGO1 (#1480) 2025-05-13 14:18:08 -04:00
Anders Jenbo
7e98f0e11c Rename FUN_1009d0d0 into GetBestDevice (#1478) 2025-05-12 22:34:37 +02:00
Florian Kaiser
e59345c88c Rename SetUnknown84 to SetNotificationObject (#1474) 2025-05-12 17:20:38 +02:00
Zoë B
81f28f149f pin container base image repository and debian version (#1473) [skip ci] 2025-05-11 21:59:16 -04:00
Anders Jenbo
6482a89ea2 Correct argument names for FUN_100bc8b0 (#1472)
* Correct argument names for FUN_100bc8b0

* Update mxdisplaysurface.h
2025-05-11 16:17:28 -07:00
Ramen2X
38e3ecb1c6 make MIDIOUTCAPS format-agnostic (#1471)
Signed-off-by: Ramen2X <contact@ramen2x.com>
2025-05-11 19:02:41 -04:00
Ramen2X
2b3e7176d3 make all calls to winapi format-agnostic (#1470) 2025-05-11 15:03:32 -04:00
Anders Jenbo
6968a3ba00 Fix definition of WriteRegisterSettings() (#1469)
I think this is right ...
2025-05-11 17:42:45 +02:00
Anders Jenbo
00ac032761 Fix input to FUN_10064740 (#1467) 2025-05-10 17:37:02 -07:00
Christian Semmler
fff2021bb5 Match Hospital::ReadyWorld (#1465) 2025-05-10 18:11:53 +02:00
Christian Semmler
447fcd0c00 Match LegoCarBuild::FUN_100246e0 (#1464) 2025-05-10 17:48:08 +02:00
Christian Semmler
30facd3c90 Match JetskiRace::Create (#1463) 2025-05-10 17:16:18 +02:00
Florian Kaiser
a3d773f629 Rename functions in LegoWorldPresenter : FUN_10067360 to LoadWorldPart and FUN_100674b0 to LoadWorldModel. Update m_unk0x50 to m_maxObjectId. (#1460) 2025-05-09 21:23:02 +02:00
Florian Kaiser
c59343c220 Rename m_unk0x64 to m_world in LegoAnimMMPresenter (#1461) 2025-05-09 20:55:22 +02:00
Florian Kaiser
81ce446628 Rename m_unk0x28 to m_characterIndex in AnimInfo struct and update references in LegoAnimationManager (#1462) 2025-05-09 20:54:44 +02:00
Florian Kaiser
674197555c Rename m_list0x68 to m_pathControllerList in LegoWorld class (#1459) 2025-05-09 20:49:52 +02:00
Florian Kaiser
5fd5a4cec0 Clear unknowns in LegoROI and related classes (#1457)
* Clear unknowns in LegoROI and related classes

* Update names

* Consistently naming: `GetTextureInfo`

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-09 18:13:19 +02:00
Florian Kaiser
3811d61ea4 Rename c_bit5 to c_ctrl in LegoInputManager, change m_unk0x6c to m_isAccelerating and clear some local unknowns (#1458) 2025-05-09 07:40:00 -07:00
Florian Kaiser
711134b3b8 Replace m_unk0x04 and m_unk0x08 with m_modelDataLength and m_modelDataOffset (#1456) 2025-05-09 07:35:11 -07:00
Florian Kaiser
9027849848 Rename parameter p_stack to p_stackSize in MxThread::Start method (#1452) 2025-05-09 12:44:53 +02:00
Florian Kaiser
0a2d598b57 Refactor Deserialize method parameters in MxDS classes to use p_flags instead of p_unk0x24 (#1450) 2025-05-08 12:26:48 -07:00
Florian Kaiser
c8ae2e22cc Update .gitignore to include .DS_Store (#1448) 2025-05-08 12:24:22 -07:00
MattKC
2fac11cff0 readme: update playlist link (#1444)
Co-authored-by: MattKC <mattkc@noreply.git.mattkc.com>
2025-05-07 20:31:34 -07:00
Christian Semmler
f851103d48 Match LegoDeviceEnumerate::SupportsMMX (#1443)
* Match `LegoDeviceEnumerate::SupportsMMX`

* Fix indent
2025-05-08 00:46:21 +02:00
Florian Kaiser
2cab039a5f Add info about long file path issue to README.md (#1442)
* Add info about long file path issue to README.md

* Update README.md

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-05-07 21:43:54 +02:00
Christian Semmler
02c38d55a3 Match MxDisplaySurface::SetPalette (#1438)
* Match `MxDisplaySurface::SetPalette`

* Match
2025-05-05 17:19:23 -07:00
Christian Semmler
fa6c62f7b3 Match MxCompositeMediaPresenter::Tickle (#1437)
* Match `MxCompositeMediaPresenter::Tickle`

* Remove file
2025-05-06 01:04:55 +02:00
MS
2fef2858c9 Add all TglImpl::ImplementationData methods (#1436)
* ImplementationData methods and typedefs

* RendererImpl::CreateView

* RendererImpl::CreateMeshBuilder

* DeepClone

* CreateCamera and CreateTexture

* CreateDevice

* Disable static var annotation
2025-04-19 10:30:47 -04:00
MS
451fd63eee Match a few more Tgl functions (#1435)
* RendererImpl::CreateLight

* Swap addrs for LightImpl and MeshBuilderImpl

* SetShadingModel functions
2025-04-17 17:19:54 -04:00
MS
544372759e Add abstraction functions to TglImpl::ViewImpl (#1434)
* Add Destroy methods to TglImpl

* Test one abstraction

* More ViewImpl abstractions

* Finish ViewImpl
2025-04-15 16:30:56 -04:00
MS
0bc31450a4 Some beta addrs for Tgl and TglImpl (#1433) 2025-04-14 18:29:38 -04:00
MS
688c203f70 Beta match and cleanup of MxDS* classes (#1432)
* Clean up / beta match MxDS* classes

* ;)
2025-04-10 22:59:55 -04:00
MS
95431347ee Add getters to AlphaMask (#1431) 2025-04-09 23:48:16 -04:00
MS
4ec020ed89 MxVideoPresenter::IsHit to 100% (#1428) 2025-04-06 10:36:13 -04:00
MS
93d6c18c9a Fix AlphaMask functions (#1425) 2025-04-03 20:18:00 -04:00
MS
3b63506648 Fix FUN_10044270 (#1423) 2025-04-03 17:10:11 -04:00
MS
8821593b63 Improve MxControlPresenter::FUN_10044270 (#1422) 2025-04-03 16:25:40 -04:00
Anonymous Maarten
466c345201 cmake: smartheap and libcmt are first in link order (#1420) 2025-03-18 08:29:15 -07:00
MS
20bcea0c81 Fix address for MxRect constructor (#1419) 2025-03-16 19:47:06 -04:00
Christian Semmler
6220ab32c3 Match FUN_100b7220 (#1418) 2025-03-16 23:19:13 +01:00
Christian Semmler
1027a80d9e Match MxEventPresenter::PutData (#1417) 2025-03-16 23:02:13 +01:00
Christian Semmler
aa60386196 Match MxStreamController::RemoveSubscriber (#1416) 2025-03-16 22:59:10 +01:00
Christian Semmler
a301f84566 Match LegoAnimPresenterSetCompare comparison (#1415) 2025-03-16 22:58:48 +01:00
Christian Semmler
e9467864d8 Match LegoHideAnimPresenter::FUN_1006db60 (#1414)
* Match `LegoHideAnimPresenter::FUN_1006db60`

* Remove comment
2025-03-16 22:57:23 +01:00
Christian Semmler
401fa7674e Match MxBackgroundAudioManager::FadeInOrFadeOut (#1413) 2025-03-16 22:19:11 +01:00
Christian Semmler
67c71cb9e6 Match MxControlPresenter::HasTickleStatePassed (#1412) 2025-03-15 14:19:09 -07:00
MS
51fc69e49f Various DirectDraw items (#1411) 2025-03-15 11:12:10 -04:00
Christian Semmler
b0b68052d4 Improve Isle::Enable match (#1410) 2025-03-14 21:45:53 +01:00
Christian Semmler
421a317050 Match Isle::HandleEndAction (#1409) 2025-03-14 21:24:50 +01:00
Christian Semmler
77435427b3 Match Radio::HandleControl (#1408) 2025-03-14 21:24:11 +01:00
MS
3d9c7a8956 Improve performance of entropy build action (#1407)
* Use multiple threads for entropy builds

* Verify builds parameter

* Revert "Verify builds parameter"

This reverts commit 460d3d3b55.

* Use options instead

* Seed fix

* 256 samples on push
2025-03-14 15:05:55 -04:00
MS
d663e26321 Use MxGeometry header (#1399)
* Use MxGeometry header

* Fix comment

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-03-11 21:13:13 -04:00
360 changed files with 12110 additions and 8439 deletions

View File

@@ -100,6 +100,43 @@ jobs:
build/LEGO1.DLL build/LEGO1.DLL
build/LEGO1.PDB build/LEGO1.PDB
build-beta:
name: 'MSVC 4.20 (BETA10)'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: itsmattkc/msvc420
path: msvc420
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
# Use minimum supported version
cmake-version: '3.15.x'
- name: Patch MSVC 4.2
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DISLE_INCLUDE_ENTROPY=OFF -DISLE_BUILD_BETA10=ON -DISLE_BUILD_LEGO1=OFF -DISLE_BUILD_APP=OFF -DISLE_BUILD_CONFIG=OFF -G "NMake Makefiles"
cmake --build build
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Win32-beta
path: |
build/BETA10.DLL
build/BETA10.PDB
verify: verify:
name: Verify decomp name: Verify decomp
needs: [build, fetch-deps] needs: [build, fetch-deps]

View File

@@ -5,6 +5,13 @@ on:
branches: branches:
- master - master
workflow_dispatch: workflow_dispatch:
inputs:
builds_per_job:
description: 'How many builds to run in parallel on each job.'
default: 4
required: true
type: choice
options: [1, 2, 4, 8, 16, 32, 64]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -15,14 +22,40 @@ jobs:
name: Download original binaries name: Download original binaries
uses: ./.github/workflows/legobin.yml uses: ./.github/workflows/legobin.yml
reccmp:
name: Setup python environment
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# The typical cache key would include a hash on requirements.txt.
# We currently run reccmp from latest so we would have to manually purge it.
# The goal is simply to restore the cache across entropy build jobs.
- name: Cache venv
uses: actions/cache@v4
with:
key: venv-entropy-${{ github.run_id }}
path: .venv
- name: Install python packages
run: |
python -m venv .venv
.venv\Scripts\Activate
pip install -r tools/requirements.txt
build: build:
name: 'MSVC 4.20' name: 'MSVC 4.20'
needs: [fetch-deps] needs: [fetch-deps, reccmp]
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
high: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
low: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] builds:
- ${{ inputs.builds_per_job && inputs.builds_per_job || 16 }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -46,26 +79,6 @@ jobs:
run: | run: |
tools/patch_c2.py msvc420/bin/C2.EXE tools/patch_c2.py msvc420/bin/C2.EXE
- name: Generate Entropy
shell: bash
run: |
# Calculate instance number based on matrix inputs
INSTANCE=$((${{ matrix.high }} << 4 | ${{ matrix.low }}))
# Get the first 8 characters of the SHA (enough for a decent seed)
SHA_PREFIX=$(echo "${{ github.sha }}" | cut -c 1-8)
ENTROPY_SEED=$((16#$SHA_PREFIX + $INSTANCE))
echo "Using seed: $ENTROPY_SEED (instance $INSTANCE)"
python3 tools/entropy.py $ENTROPY_SEED > entropy.h
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DISLE_INCLUDE_ENTROPY=ON -G "NMake Makefiles"
cmake --build build
- name: Restore cached original binaries - name: Restore cached original binaries
id: cache-original-binaries id: cache-original-binaries
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
@@ -73,32 +86,47 @@ jobs:
enableCrossOsArchive: true enableCrossOsArchive: true
path: legobin path: legobin
key: legobin key: legobin
- name: Install python packages
shell: bash
run: |
pip install -r tools/requirements.txt
- name: Detect binaries
run: |
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Summarize Accuracy - name: Install python packages
shell: bash
run: | run: |
reccmp-reccmp --target CONFIG --json CONFIGPROGRESS.json python -m venv .venv
reccmp-reccmp --target ISLE --json ISLEPROGRESS.json .venv\Scripts\Activate
reccmp-reccmp --target LEGO1 --json LEGO1PROGRESS.json echo ($env:VIRTUAL_ENV + "\Scripts") >> $env:GITHUB_PATH
echo ("VIRTUAL_ENV=" + $env:VIRTUAL_ENV) >> $env:GITHUB_ENV
- name: Restore cached virtualenv
uses: actions/cache@v4
with:
key: venv-entropy-${{ github.run_id }}
path: .venv
- name: Prepare builds
shell: pwsh
run: |
cmd /c "call `".\msvc420\bin\VCVARS32.BAT`" x86 && set > %temp%\vcvars32.txt"
Get-Content "$env:temp\vcvars32.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
.\tools\multi-prepare.ps1 ${{ matrix.job }} ${{ matrix.builds }}
- name: Run builds
shell: pwsh
run: |
cmd /c "call `".\msvc420\bin\VCVARS32.BAT`" x86 && set > %temp%\vcvars32.txt"
Get-Content "$env:temp\vcvars32.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
.\tools\multi-build.ps1 ${{ matrix.builds }}
- name: Analyze builds
shell: pwsh
run: |
.\tools\multi-analyze.ps1 ${{ matrix.builds }}
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
with: with:
name: Win32-Entropy-${{ matrix.high }}-${{ matrix.low }} name: Win32-Entropy-${{ matrix.job }}
path: | path: |
CONFIGPROGRESS.json CONFIGPROGRESS*
ISLEPROGRESS.json ISLEPROGRESS*
LEGO1PROGRESS.json LEGO1PROGRESS*
merge-artifacts: merge-artifacts:
name: 'Merge entropy artifacts' name: 'Merge entropy artifacts'
@@ -129,16 +157,27 @@ jobs:
path: build-entropy path: build-entropy
- name: Install python packages - name: Install python packages
shell: bash
run: | run: |
pip install -r tools/requirements.txt python -m venv .venv
.venv\Scripts\Activate
echo ($env:VIRTUAL_ENV + "\Scripts") >> $env:GITHUB_PATH
echo ("VIRTUAL_ENV=" + $env:VIRTUAL_ENV) >> $env:GITHUB_ENV
- name: Restore cached virtualenv
uses: actions/cache@v4
with:
key: venv-entropy-${{ github.run_id }}
path: .venv
- name: Aggregate Accuracy - name: Aggregate Accuracy
shell: bash shell: bash
run: | run: |
reccmp-aggregate --samples $(find build-entropy -type f -name "CONFIGPROGRESS.json") --output CONFIGPROGRESS-agg.json --html CONFIGPROGRESS-agg.html find build-entropy -type f -name "CONFIGPROGRESS*.json" > configsamples.txt
reccmp-aggregate --samples $(find build-entropy -type f -name "ISLEPROGRESS.json") --output ISLEPROGRESS-agg.json --html ISLEPROGRESS-agg.html find build-entropy -type f -name "ISLEPROGRESS*.json" > islesamples.txt
reccmp-aggregate --samples $(find build-entropy -type f -name "LEGO1PROGRESS.json") --output LEGO1PROGRESS-agg.json --html LEGO1PROGRESS-agg.html find build-entropy -type f -name "LEGO1PROGRESS*.json" > lego1samples.txt
reccmp-aggregate --samples @configsamples.txt --output CONFIGPROGRESS-agg.json --html CONFIGPROGRESS-agg.html
reccmp-aggregate --samples @islesamples.txt --output ISLEPROGRESS-agg.json --html ISLEPROGRESS-agg.html
reccmp-aggregate --samples @lego1samples.txt --output LEGO1PROGRESS-agg.json --html LEGO1PROGRESS-agg.html
- name: Compare Aggregate Accuracy With Current Master - name: Compare Aggregate Accuracy With Current Master
shell: bash shell: bash

2
.gitignore vendored
View File

@@ -27,3 +27,5 @@ tools/ghidra_scripts/import.log
# These entries are kept for now since that convention has not always been around. # These entries are kept for now since that convention has not always been around.
ISLE.EXE ISLE.EXE
LEGO1.DLL LEGO1.DLL
.DS_Store

View File

@@ -67,6 +67,7 @@ cmake_dependent_option(ISLE_USE_DX5_LIBS "Build with internal DirectX 5 SDK Libr
option(ISLE_BUILD_LEGO1 "Build LEGO1.DLL library" ON) option(ISLE_BUILD_LEGO1 "Build LEGO1.DLL library" ON)
option(ISLE_BUILD_BETA10 "Build BETA10.DLL library" OFF) option(ISLE_BUILD_BETA10 "Build BETA10.DLL library" OFF)
option(ISLE_INCLUDE_ENTROPY "Build with entropy.h" OFF) option(ISLE_INCLUDE_ENTROPY "Build with entropy.h" OFF)
option(ISLE_ENTROPY_FILENAME "Entropy header filename" "entropy.h")
if(NOT (ISLE_BUILD_LEGO1 OR ISLE_BUILD_BETA10)) if(NOT (ISLE_BUILD_LEGO1 OR ISLE_BUILD_BETA10))
message(FATAL_ERROR "ISLE_BUILD_LEGO1 AND ISLE_BUILD_BETA10 cannot be both disabled") message(FATAL_ERROR "ISLE_BUILD_LEGO1 AND ISLE_BUILD_BETA10 cannot be both disabled")
@@ -159,7 +160,7 @@ function(add_lego_libraries NAME)
add_library(geom${ARG_SUFFIX} STATIC add_library(geom${ARG_SUFFIX} STATIC
LEGO1/lego/sources/geom/legoedge.cpp LEGO1/lego/sources/geom/legoedge.cpp
LEGO1/lego/sources/geom/legoweedge.cpp LEGO1/lego/sources/geom/legoweedge.cpp
LEGO1/lego/sources/geom/legounkown100db7f4.cpp LEGO1/lego/sources/geom/legoorientededge.cpp
LEGO1/lego/sources/geom/legowegedge.cpp LEGO1/lego/sources/geom/legowegedge.cpp
) )
list(APPEND list_targets geom${ARG_SUFFIX}) list(APPEND list_targets geom${ARG_SUFFIX})
@@ -220,7 +221,7 @@ function(add_lego_libraries NAME)
LEGO1/omni/src/common/mxcore.cpp LEGO1/omni/src/common/mxcore.cpp
LEGO1/omni/src/common/mxstring.cpp LEGO1/omni/src/common/mxstring.cpp
LEGO1/omni/src/audio/mxsoundmanager.cpp LEGO1/omni/src/audio/mxsoundmanager.cpp
LEGO1/omni/src/main/mxomni.cpp LEGO1/omni/src/main/mxmain.cpp
LEGO1/omni/src/notify/mxactionnotificationparam.cpp LEGO1/omni/src/notify/mxactionnotificationparam.cpp
LEGO1/omni/src/main/mxomnicreateflags.cpp LEGO1/omni/src/main/mxomnicreateflags.cpp
LEGO1/omni/src/main/mxomnicreateparam.cpp LEGO1/omni/src/main/mxomnicreateparam.cpp
@@ -239,7 +240,7 @@ function(add_lego_libraries NAME)
LEGO1/omni/src/common/mxutilities.cpp LEGO1/omni/src/common/mxutilities.cpp
LEGO1/omni/src/common/mxvariabletable.cpp LEGO1/omni/src/common/mxvariabletable.cpp
LEGO1/omni/src/stream/mxdssubscriber.cpp LEGO1/omni/src/stream/mxdssubscriber.cpp
LEGO1/omni/src/common/mxmediamanager.cpp LEGO1/omni/src/common/mxpresentationmanager.cpp
LEGO1/omni/src/system/mxticklethread.cpp LEGO1/omni/src/system/mxticklethread.cpp
LEGO1/omni/src/audio/mxaudiomanager.cpp LEGO1/omni/src/audio/mxaudiomanager.cpp
LEGO1/omni/src/system/mxautolock.cpp LEGO1/omni/src/system/mxautolock.cpp
@@ -375,9 +376,6 @@ function(add_lego_libraries NAME)
LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp
LEGO1/lego/legoomni/src/actors/dunebuggy.cpp LEGO1/lego/legoomni/src/actors/dunebuggy.cpp
LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp
LEGO1/lego/legoomni/src/video/legoloopinganimpresenter.cpp
LEGO1/lego/legoomni/src/video/legolocomotionanimpresenter.cpp
LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp
LEGO1/lego/legoomni/src/worlds/infocenter.cpp LEGO1/lego/legoomni/src/worlds/infocenter.cpp
LEGO1/lego/legoomni/src/race/raceskel.cpp LEGO1/lego/legoomni/src/race/raceskel.cpp
LEGO1/lego/legoomni/src/worlds/act3.cpp LEGO1/lego/legoomni/src/worlds/act3.cpp
@@ -426,6 +424,7 @@ function(add_lego_libraries NAME)
# Link libraries # Link libraries
target_link_libraries(${NAME} PRIVATE target_link_libraries(${NAME} PRIVATE
${ARG_LINK_LIBRARIES}
dinput dinput
misc${ARG_SUFFIX} misc${ARG_SUFFIX}
geom${ARG_SUFFIX} geom${ARG_SUFFIX}
@@ -458,7 +457,7 @@ endfunction()
set(lego1_link_libraries ) set(lego1_link_libraries )
if (ISLE_USE_SMARTHEAP) if (ISLE_USE_SMARTHEAP)
list(APPEND lego1_link_libraries SmartHeap::SmartHeap) list(APPEND lego1_link_libraries SmartHeap::SmartHeap libcmt)
endif() endif()
if(ISLE_BUILD_LEGO1) if(ISLE_BUILD_LEGO1)
@@ -481,7 +480,12 @@ if(ISLE_BUILD_BETA10)
OUT_TARGETS beta10_targets OUT_TARGETS beta10_targets
) )
reccmp_add_target(beta10 ID BETA10) reccmp_add_target(beta10 ID BETA10)
# Enable `#ifdef BETA10` conditions
target_compile_definitions(beta10 PRIVATE BETA10) target_compile_definitions(beta10 PRIVATE BETA10)
foreach(tgt IN LISTS beta10_targets)
target_compile_definitions(${tgt} PRIVATE BETA10)
endforeach()
endif() endif()
if (ISLE_BUILD_APP) if (ISLE_BUILD_APP)
@@ -585,22 +589,31 @@ if (MSVC_FOR_DECOMP)
set_property(TARGET isle ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set_property(TARGET isle ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif() endif()
if (ISLE_BUILD_CONFIG)
target_link_options(config PRIVATE "/OPT:REF")
target_link_libraries(config PRIVATE mfc42)
endif()
if (ISLE_INCLUDE_ENTROPY) if (ISLE_INCLUDE_ENTROPY)
message(STATUS "Using entropy file: ${ISLE_ENTROPY_FILENAME}")
foreach(tgt IN LISTS lego1_targets beta10_targets) foreach(tgt IN LISTS lego1_targets beta10_targets)
target_compile_options(${tgt} PRIVATE /FI${PROJECT_SOURCE_DIR}/entropy.h) target_compile_options(${tgt} PRIVATE /FI${PROJECT_SOURCE_DIR}/${ISLE_ENTROPY_FILENAME})
endforeach() endforeach()
if (TARGET isle) if (TARGET isle)
target_compile_options(isle PRIVATE /FI${PROJECT_SOURCE_DIR}/entropy.h) target_compile_options(isle PRIVATE /FI${PROJECT_SOURCE_DIR}/${ISLE_ENTROPY_FILENAME})
endif() endif()
if (TARGET config) if (TARGET config)
target_compile_options(config PRIVATE /FI${PROJECT_SOURCE_DIR}/entropy.h) target_compile_options(config PRIVATE /FI${PROJECT_SOURCE_DIR}/${ISLE_ENTROPY_FILENAME})
endif() endif()
endif() endif()
# Setting the MSVC_RUNTIME_LIBRARY for all libraries as well as `lego1` produces the results
# that are most consistent with the LEGO1.DLL and BETA10.DLL originals we have.
# Equivalent to target_compile_options(... PRIVATE "/MT$<$<CONFIG:Debug>:d>")
set_property(TARGET ${lego1_targets} ${beta10_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(TARGET lego1) if(TARGET lego1)
target_link_options(lego1 PRIVATE "/OPT:REF") target_link_options(lego1 PRIVATE "/OPT:REF")
# Equivalent to target_compile_options(... PRIVATE "/MT$<$<CONFIG:Debug>:d>") set_property(TARGET lego1 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET lego1 ${lego1_targets} ${beta10_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif() endif()
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"") set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")

View File

@@ -6,13 +6,16 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60)
DECOMP_SIZE_ASSERT(CAboutDialog, 0x60) DECOMP_SIZE_ASSERT(CAboutDialog, 0x60)
// FUNCTION: CONFIG 0x00403c20 // FUNCTION: CONFIG 0x00403c20
// FUNCTION: CONFIGD 0x00408630
CAboutDialog::CAboutDialog() : CDialog(IDD) CAboutDialog::CAboutDialog() : CDialog(IDD)
{ {
} }
// FUNCTION: CONFIG 0x00403d20 // FUNCTION: CONFIG 0x00403d20
// FUNCTION: CONFIGD 0x004086a3
void CAboutDialog::DoDataExchange(CDataExchange* pDX) void CAboutDialog::DoDataExchange(CDataExchange* pDX)
{ {
CWnd::DoDataExchange(pDX);
} }
BEGIN_MESSAGE_MAP(CAboutDialog, CDialog) BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)

View File

@@ -6,6 +6,7 @@
#include "res/resource.h" #include "res/resource.h"
// VTABLE: CONFIG 0x00406308 // VTABLE: CONFIG 0x00406308
// VTABLE: CONFIGD 0x0040c3f8
// SIZE 0x60 // SIZE 0x60
class CAboutDialog : public CDialog { class CAboutDialog : public CDialog {
public: public:
@@ -22,18 +23,27 @@ protected:
}; };
// SYNTHETIC: CONFIG 0x00403cb0 // SYNTHETIC: CONFIG 0x00403cb0
// SYNTHETIC: CONFIGD 0x00409840
// CAboutDialog::`scalar deleting destructor' // CAboutDialog::`scalar deleting destructor'
// SYNTHETIC: CONFIG 0x00404100
// SYNTHETIC: CONFIGD 0x00409890
// CAboutDialog::~CAboutDialog
// FUNCTION: CONFIG 0x00403d30 // FUNCTION: CONFIG 0x00403d30
// FUNCTION: CONFIGD 0x004086c7
// CAboutDialog::_GetBaseMessageMap // CAboutDialog::_GetBaseMessageMap
// FUNCTION: CONFIG 0x00403d40 // FUNCTION: CONFIG 0x00403d40
// FUNCTION: CONFIGD 0x004086dc
// CAboutDialog::GetMessageMap // CAboutDialog::GetMessageMap
// GLOBAL: CONFIG 0x00406100 // GLOBAL: CONFIG 0x00406100
// GLOBAL: CONFIGD 0x0040c188
// CAboutDialog::messageMap // CAboutDialog::messageMap
// GLOBAL: CONFIG 0x00406108 // GLOBAL: CONFIG 0x00406108
// GLOBAL: CONFIGD 0x0040c190
// CAboutDialog::_messageEntries // CAboutDialog::_messageEntries
#endif // !defined(AFX_ABOUTDLG_H) #endif // !defined(AFX_ABOUTDLG_H)

View File

@@ -6,16 +6,24 @@ DECOMP_SIZE_ASSERT(CCommandLineInfo, 0x24)
DECOMP_SIZE_ASSERT(CConfigCommandLineInfo, 0x24) DECOMP_SIZE_ASSERT(CConfigCommandLineInfo, 0x24)
// FUNCTION: CONFIG 0x00403b10 // FUNCTION: CONFIG 0x00403b10
// FUNCTION: CONFIGD 0x00407caa
CConfigCommandLineInfo::CConfigCommandLineInfo() CConfigCommandLineInfo::CConfigCommandLineInfo()
{ {
currentConfigApp->m_run_config_dialog = FALSE; currentConfigApp->m_run_config_dialog = FALSE;
} }
// FUNCTION: CONFIG 0x00403ba0
// FUNCTION: CONFIGD 0x00407d2e
CConfigCommandLineInfo::~CConfigCommandLineInfo()
{
}
// FUNCTION: CONFIG 0x00403bf0 // FUNCTION: CONFIG 0x00403bf0
// FUNCTION: CONFIGD 0x00407d96
void CConfigCommandLineInfo::ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast) void CConfigCommandLineInfo::ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast)
{ {
if (bFlag) { if (bFlag) {
if (lstrcmpiA(pszParam, "config") == 0) { if (lstrcmpi(pszParam, "config") == 0) {
currentConfigApp->m_run_config_dialog = TRUE; currentConfigApp->m_run_config_dialog = TRUE;
} }
} }

View File

@@ -7,15 +7,18 @@
#include "decomp.h" #include "decomp.h"
// VTABLE: CONFIG 0x004060e8 // VTABLE: CONFIG 0x004060e8
// VTABLE: CONFIGD 0x0040c168
// SIZE 0x24 // SIZE 0x24
class CConfigCommandLineInfo : public CCommandLineInfo { class CConfigCommandLineInfo : public CCommandLineInfo {
public: public:
CConfigCommandLineInfo(); CConfigCommandLineInfo();
~CConfigCommandLineInfo() override;
void ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast) override; void ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast) override;
}; };
// SYNTHETIC: CONFIG 0x00403b80 // SYNTHETIC: CONFIG 0x00403b80
// SYNTHETIC: CONFIGD 0x004085e0
// CConfigCommandLineInfo::`scalar deleting destructor' // CConfigCommandLineInfo::`scalar deleting destructor'
#endif // !defined(AFX_CONFIGCOMMANDLINEINFO_H) #endif // !defined(AFX_CONFIGCOMMANDLINEINFO_H)

View File

@@ -4,21 +4,24 @@
#include "config.h" #include "config.h"
#include "res/resource.h" #include "res/resource.h"
#include <assert.h>
#include <mxdirectx/legodxinfo.h> #include <mxdirectx/legodxinfo.h>
DECOMP_SIZE_ASSERT(CDialog, 0x60) DECOMP_SIZE_ASSERT(CDialog, 0x60)
DECOMP_SIZE_ASSERT(CMainDialog, 0x70) DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
// FUNCTION: CONFIG 0x00403d50 // FUNCTION: CONFIG 0x00403d50
// FUNCTION: CONFIGD 0x004086f7
CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent) CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent)
{ {
afxCurrentWinApp; m_icon = currentConfigApp->LoadIcon(IDI_CONFIG);
m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));
} }
// FUNCTION: CONFIG 0x00403e50 // FUNCTION: CONFIG 0x00403e50
// FUNCTION: CONFIGD 0x00408785
void CMainDialog::DoDataExchange(CDataExchange* pDX) void CMainDialog::DoDataExchange(CDataExchange* pDX)
{ {
CWnd::DoDataExchange(pDX);
} }
BEGIN_MESSAGE_MAP(CMainDialog, CDialog) BEGIN_MESSAGE_MAP(CMainDialog, CDialog)
@@ -44,53 +47,64 @@ ON_COMMAND(IDC_CHK_MUSIC, OnCheckboxMusic)
END_MESSAGE_MAP() END_MESSAGE_MAP()
// FUNCTION: CONFIG 0x00403e80 // FUNCTION: CONFIG 0x00403e80
// FUNCTION: CONFIGD 0x004087d9
BOOL CMainDialog::OnInitDialog() BOOL CMainDialog::OnInitDialog()
{ {
CDialog::OnInitDialog(); CDialog::OnInitDialog();
SwitchToAdvanced(FALSE); SwitchToAdvanced(FALSE);
CMenu* system_menu = CMenu::FromHandle(::GetSystemMenu(m_hWnd, FALSE)); CMenu* system_menu = CWnd::GetSystemMenu(FALSE);
CString about_text; CString about_text;
about_text.LoadString(IDS_ABOUT); about_text.LoadString(IDS_ABOUT);
if (system_menu) { if (!about_text.IsEmpty()) {
AppendMenuA(system_menu->m_hMenu, MF_SEPARATOR, 0, NULL); system_menu->AppendMenu(MF_SEPARATOR, 0, (LPCTSTR) NULL);
AppendMenuA(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text); system_menu->AppendMenu(MF_STRING, 16, (LPCTSTR) about_text);
} }
SendMessage(WM_SETICON, ICON_BIG, (LPARAM) m_icon);
SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) m_icon); CWnd::SetIcon(m_icon, TRUE);
LegoDeviceEnumerate* enumerator = currentConfigApp->m_device_enumerator; CWnd::SetIcon(m_icon, FALSE);
enumerator->FUN_1009d210();
LegoDeviceEnumerate* info = currentConfigApp->m_dxInfo;
assert(info);
info->FUN_1009d210();
m_modified = currentConfigApp->ReadRegisterSettings(); m_modified = currentConfigApp->ReadRegisterSettings();
CWnd* list_3d_devices = GetDlgItem(IDC_LIST_3DDEVICES); CListBox* list_3d_devices = (CListBox*) GetDlgItem(IDC_LIST_3DDEVICES);
int driver_i = 0; int driver_i = 0;
int device_i = 0; int device_i = 0;
int selected = 0; int selected = 0;
char device_name[256];
const list<MxDriver>& driver_list = enumerator->GetDriverList(); for (list<MxDriver>::iterator it_driver = info->m_ddInfo.begin(); it_driver != info->m_ddInfo.end();
for (list<MxDriver>::const_iterator it_driver = driver_list.begin(); it_driver != driver_list.end(); it_driver++) { it_driver++, driver_i++) {
const MxDriver& driver = *it_driver; const MxDriver& driver = *it_driver;
for (list<Direct3DDeviceInfo>::const_iterator it_device = driver.m_devices.begin(); for (list<Direct3DDeviceInfo>::const_iterator it_device = driver.m_devices.begin();
it_device != driver.m_devices.end(); it_device != driver.m_devices.end();
it_device++) { it_device++) {
const Direct3DDeviceInfo& device = *it_device;
if (&device == currentConfigApp->m_device) { if (&(*it_device) == currentConfigApp->m_d3dInfo) {
selected = device_i; selected = device_i;
} }
char device_name[256];
if (driver_i == 0) {
sprintf(device_name, "%s ( Primary Device )", (*it_device).m_deviceName);
}
else {
sprintf(device_name, "%s ( Secondary Device )", (*it_device).m_deviceName);
}
list_3d_devices->AddString(device_name);
device_i += 1; device_i += 1;
sprintf(
device_name,
driver_i == 0 ? "%s ( Primary Device )" : "%s ( Secondary Device )",
device.m_deviceName
);
::SendMessage(list_3d_devices->m_hWnd, LB_ADDSTRING, 0, (LPARAM) device_name);
} }
driver_i += 1;
} }
::SendMessage(list_3d_devices->m_hWnd, LB_SETCURSEL, selected, 0);
list_3d_devices->SetCurSel(selected);
UpdateInterface(); UpdateInterface();
return TRUE; return TRUE;
} }
// FUNCTION: CONFIG 0x00404080 // FUNCTION: CONFIG 0x00404080
// FUNCTION: CONFIGD 0x00408ab7
void CMainDialog::OnSysCommand(UINT nID, LPARAM lParam) void CMainDialog::OnSysCommand(UINT nID, LPARAM lParam)
{ {
if ((nID & 0xfff0) == 0x10) { if ((nID & 0xfff0) == 0x10) {
@@ -98,86 +112,109 @@ void CMainDialog::OnSysCommand(UINT nID, LPARAM lParam)
about_dialog.DoModal(); about_dialog.DoModal();
} }
else { else {
Default(); CWnd::OnSysCommand(nID, lParam);
} }
} }
// FUNCTION: CONFIG 0x00404150 // FUNCTION: CONFIG 0x00404150
// FUNCTION: CONFIGD 0x00408b49
void CMainDialog::OnPaint() void CMainDialog::OnPaint()
{ {
if (IsIconic()) { if (IsIconic()) {
CPaintDC painter(this); CPaintDC painter(this);
::SendMessage(m_hWnd, WM_ICONERASEBKGND, (WPARAM) painter.m_hDC, 0); CWnd::SendMessage(WM_ICONERASEBKGND, (WPARAM) painter.GetSafeHdc(), 0);
RECT dim;
int iconWidth = GetSystemMetrics(SM_CXICON);
int iconHeight = GetSystemMetrics(SM_CYICON);
CRect dim;
GetClientRect(&dim); GetClientRect(&dim);
DrawIcon(
painter.m_hDC, int x = (dim.Width() - iconWidth + 1) / 2;
(dim.right - dim.left - GetSystemMetrics(SM_CXICON) + 1) / 2, int y = (dim.Height() - iconHeight + 1) / 2;
(dim.bottom - dim.top - GetSystemMetrics(SM_CYICON) + 1) / 2,
m_icon painter.DrawIcon(x, y, m_icon);
);
} }
else { else {
Default(); CWnd::OnPaint();
} }
} }
// FUNCTION: CONFIG 0x00404230 // FUNCTION: CONFIG 0x00404230
// FUNCTION: CONFIGD 0x00408c61
HCURSOR CMainDialog::OnQueryDragIcon() HCURSOR CMainDialog::OnQueryDragIcon()
{ {
return m_icon; return m_icon;
} }
// FUNCTION: CONFIG 0x00404240 // FUNCTION: CONFIG 0x00404240
// FUNCTION: CONFIGD 0x00408c7d
void CMainDialog::OnList3DevicesSelectionChanged() void CMainDialog::OnList3DevicesSelectionChanged()
{ {
LegoDeviceEnumerate* device_enumerator = currentConfigApp->m_device_enumerator; CConfigApp* app = currentConfigApp;
int selected = ::SendMessage(GetDlgItem(IDC_LIST_3DDEVICES)->m_hWnd, LB_GETCURSEL, 0, 0); assert(app);
device_enumerator->GetDevice(selected, currentConfigApp->m_driver, currentConfigApp->m_device);
if (currentConfigApp->GetHardwareDeviceColorModel()) { LegoDeviceEnumerate* device_enumerator = app->m_dxInfo;
GetDlgItem(IDC_CHK_DRAW_CURSOR)->EnableWindow(TRUE); assert(device_enumerator);
}
else { CListBox* listbox = (CListBox*) GetDlgItem(IDC_LIST_3DDEVICES);
int selected = listbox->GetCurSel();
int r = device_enumerator->GetDevice(selected, app->m_ddInfo, app->m_d3dInfo);
assert(r == 0);
if (!currentConfigApp->GetHardwareDeviceColorModel()) {
currentConfigApp->m_3d_video_ram = FALSE; currentConfigApp->m_3d_video_ram = FALSE;
currentConfigApp->m_flip_surfaces = FALSE; currentConfigApp->m_flip_surfaces = FALSE;
CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram); CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram);
CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, currentConfigApp->m_flip_surfaces); CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, currentConfigApp->m_flip_surfaces);
} }
else {
GetDlgItem(IDC_CHK_DRAW_CURSOR)->EnableWindow(TRUE);
}
m_modified = TRUE; m_modified = TRUE;
UpdateInterface(); UpdateInterface();
} }
// FUNCTION: CONFIG 0x00404320 // FUNCTION: CONFIG 0x00404320
// FUNCTION: CONFIGD 0x00408d79
void CMainDialog::OnCancel() void CMainDialog::OnCancel()
{ {
CDialog::OnCancel(); CDialog::OnCancel();
} }
// FUNCTION: CONFIG 0x00404330 // FUNCTION: CONFIG 0x00404330
// FUNCTION: CONFIGD 0x00408de5
void CMainDialog::OnDestroy() void CMainDialog::OnDestroy()
{ {
CDialog::Default(); CWnd::OnDestroy();
} }
// FUNCTION: CONFIG 0x00404340 // FUNCTION: CONFIG 0x00404340
// FUNCTION: CONFIGD 0x00408e03
void CMainDialog::OnButtonCancel() void CMainDialog::OnButtonCancel()
{ {
if (m_modified) { if (m_modified) {
currentConfigApp->WriteRegisterSettings(); currentConfigApp->WriteRegisterSettings();
} }
OnCancel(); CDialog::OnCancel();
} }
// FUNCTION: CONFIG 0x00404360 // FUNCTION: CONFIG 0x00404360
// FUNCTION: CONFIGD 0x00408e2f
void CMainDialog::UpdateInterface() void CMainDialog::UpdateInterface()
{ {
currentConfigApp->ValidateSettings(); currentConfigApp->ValidateSettings();
GetDlgItem(IDC_CHK_3D_VIDEO_MEMORY) BOOL flip_surfaces = currentConfigApp->m_flip_surfaces;
->EnableWindow(!currentConfigApp->m_flip_surfaces && !currentConfigApp->GetHardwareDeviceColorModel());
CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, currentConfigApp->m_flip_surfaces); BOOL enable3d = !flip_surfaces && !currentConfigApp->GetHardwareDeviceColorModel();
GetDlgItem(IDC_CHK_3D_VIDEO_MEMORY)->EnableWindow(enable3d);
CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, flip_surfaces);
CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram); CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram);
BOOL full_screen = currentConfigApp->m_full_screen; BOOL full_screen = currentConfigApp->m_full_screen;
currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus(); currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus();
if (currentConfigApp->GetHardwareDeviceColorModel()) { if (currentConfigApp->GetHardwareDeviceColorModel()) {
CheckDlgButton(IDC_CHK_DRAW_CURSOR, TRUE); CheckDlgButton(IDC_CHK_DRAW_CURSOR, TRUE);
} }
@@ -186,24 +223,32 @@ void CMainDialog::UpdateInterface()
currentConfigApp->m_draw_cursor = FALSE; currentConfigApp->m_draw_cursor = FALSE;
GetDlgItem(IDC_CHK_DRAW_CURSOR)->EnableWindow(FALSE); GetDlgItem(IDC_CHK_DRAW_CURSOR)->EnableWindow(FALSE);
} }
if (full_screen) { if (full_screen) {
CheckRadioButton( if (currentConfigApp->m_display_bit_depth == 8) {
IDC_RAD_PALETTE_256, CheckRadioButton(IDC_RAD_PALETTE_256, IDC_RAD_PALETTE_16BIT, IDC_RAD_PALETTE_256);
IDC_RAD_PALETTE_16BIT, }
currentConfigApp->m_display_bit_depth == 8 ? IDC_RAD_PALETTE_256 : IDC_RAD_PALETTE_16BIT else {
); CheckRadioButton(IDC_RAD_PALETTE_256, IDC_RAD_PALETTE_16BIT, IDC_RAD_PALETTE_16BIT);
}
} }
else { else {
CheckDlgButton(IDC_RAD_PALETTE_256, 0); CheckDlgButton(IDC_RAD_PALETTE_256, 0);
CheckDlgButton(IDC_RAD_PALETTE_16BIT, 0); CheckDlgButton(IDC_RAD_PALETTE_16BIT, 0);
currentConfigApp->m_display_bit_depth = 0; currentConfigApp->m_display_bit_depth = 0;
} }
GetDlgItem(IDC_RAD_PALETTE_256)
->EnableWindow(full_screen && currentConfigApp->GetConditionalDeviceRenderBitDepth()); BOOL enable256 = full_screen && currentConfigApp->GetConditionalDeviceRenderBitDepth() != 0;
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(full_screen && currentConfigApp->GetDeviceRenderBitStatus()); GetDlgItem(IDC_RAD_PALETTE_256)->EnableWindow(enable256);
BOOL enable16 = full_screen && currentConfigApp->GetDeviceRenderBitStatus() != 0;
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(enable16);
CheckDlgButton(IDC_CHK_3DSOUND, currentConfigApp->m_3d_sound); CheckDlgButton(IDC_CHK_3DSOUND, currentConfigApp->m_3d_sound);
CheckDlgButton(IDC_CHK_DRAW_CURSOR, currentConfigApp->m_draw_cursor); CheckDlgButton(IDC_CHK_DRAW_CURSOR, currentConfigApp->m_draw_cursor);
switch (currentConfigApp->m_model_quality) { switch (currentConfigApp->m_model_quality) {
// DECOMP: case 0 removed for retail.
case 1: case 1:
CheckRadioButton(IDC_RAD_MODEL_QUALITY_LOW, IDC_RAD_MODEL_QUALITY_HIGH, IDC_RAD_MODEL_QUALITY_LOW); CheckRadioButton(IDC_RAD_MODEL_QUALITY_LOW, IDC_RAD_MODEL_QUALITY_HIGH, IDC_RAD_MODEL_QUALITY_LOW);
break; break;
@@ -211,16 +256,29 @@ void CMainDialog::UpdateInterface()
CheckRadioButton(IDC_RAD_MODEL_QUALITY_LOW, IDC_RAD_MODEL_QUALITY_HIGH, IDC_RAD_MODEL_QUALITY_HIGH); CheckRadioButton(IDC_RAD_MODEL_QUALITY_LOW, IDC_RAD_MODEL_QUALITY_HIGH, IDC_RAD_MODEL_QUALITY_HIGH);
break; break;
} }
CheckRadioButton(
IDC_RAD_TEXTURE_QUALITY_LOW, if (currentConfigApp->m_texture_quality == 0) {
IDC_RAD_TEXTURE_QUALITY_HIGH, CheckRadioButton(IDC_RAD_TEXTURE_QUALITY_LOW, IDC_RAD_TEXTURE_QUALITY_HIGH, IDC_RAD_TEXTURE_QUALITY_LOW);
currentConfigApp->m_texture_quality == 0 ? IDC_RAD_TEXTURE_QUALITY_LOW : IDC_RAD_TEXTURE_QUALITY_HIGH }
); else {
CheckRadioButton(IDC_RAD_TEXTURE_QUALITY_LOW, IDC_RAD_TEXTURE_QUALITY_HIGH, IDC_RAD_TEXTURE_QUALITY_HIGH);
}
CheckDlgButton(IDC_CHK_JOYSTICK, currentConfigApp->m_use_joystick); CheckDlgButton(IDC_CHK_JOYSTICK, currentConfigApp->m_use_joystick);
CheckDlgButton(IDC_CHK_MUSIC, currentConfigApp->m_music); CheckDlgButton(IDC_CHK_MUSIC, currentConfigApp->m_music);
} }
// STUB: CONFIGD 0x00409152
void CMainDialog::OnCheckboxWideAngle()
{
// DECOMP: m_wide_angle member removed for retail.
// currentConfigApp->m_wide_angle = IsDlgButtonChecked(IDC_CHK_WIDE_ANGLE);
// m_modified = TRUE;
// UpdateInterface();
}
// FUNCTION: CONFIG 0x004045e0 // FUNCTION: CONFIG 0x004045e0
// FUNCTION: CONFIGD 0x00409198
void CMainDialog::OnCheckbox3DSound() void CMainDialog::OnCheckbox3DSound()
{ {
currentConfigApp->m_3d_sound = IsDlgButtonChecked(IDC_CHK_3DSOUND); currentConfigApp->m_3d_sound = IsDlgButtonChecked(IDC_CHK_3DSOUND);
@@ -229,6 +287,7 @@ void CMainDialog::OnCheckbox3DSound()
} }
// FUNCTION: CONFIG 0x00404610 // FUNCTION: CONFIG 0x00404610
// FUNCTION: CONFIGD 0x004091de
void CMainDialog::OnCheckbox3DVideoMemory() void CMainDialog::OnCheckbox3DVideoMemory()
{ {
currentConfigApp->m_3d_video_ram = IsDlgButtonChecked(IDC_CHK_3D_VIDEO_MEMORY); currentConfigApp->m_3d_video_ram = IsDlgButtonChecked(IDC_CHK_3D_VIDEO_MEMORY);
@@ -237,6 +296,7 @@ void CMainDialog::OnCheckbox3DVideoMemory()
} }
// FUNCTION: CONFIG 0x00404640 // FUNCTION: CONFIG 0x00404640
// FUNCTION: CONFIGD 0x00409224
void CMainDialog::OnRadiobuttonPalette16bit() void CMainDialog::OnRadiobuttonPalette16bit()
{ {
currentConfigApp->m_display_bit_depth = 16; currentConfigApp->m_display_bit_depth = 16;
@@ -245,6 +305,7 @@ void CMainDialog::OnRadiobuttonPalette16bit()
} }
// FUNCTION: CONFIG 0x00404670 // FUNCTION: CONFIG 0x00404670
// FUNCTION: CONFIGD 0x00409261
void CMainDialog::OnRadiobuttonPalette256() void CMainDialog::OnRadiobuttonPalette256()
{ {
currentConfigApp->m_display_bit_depth = 8; currentConfigApp->m_display_bit_depth = 8;
@@ -253,6 +314,7 @@ void CMainDialog::OnRadiobuttonPalette256()
} }
// FUNCTION: CONFIG 0x004046a0 // FUNCTION: CONFIG 0x004046a0
// FUNCTION: CONFIGD 0x0040929e
void CMainDialog::OnCheckboxFlipVideoMemPages() void CMainDialog::OnCheckboxFlipVideoMemPages()
{ {
currentConfigApp->m_flip_surfaces = IsDlgButtonChecked(IDC_CHK_FLIP_VIDEO_MEM_PAGES); currentConfigApp->m_flip_surfaces = IsDlgButtonChecked(IDC_CHK_FLIP_VIDEO_MEM_PAGES);
@@ -260,7 +322,24 @@ void CMainDialog::OnCheckboxFlipVideoMemPages()
UpdateInterface(); UpdateInterface();
} }
// FUNCTION: CONFIGD 0x004092e4
void CMainDialog::OnCheckboxFullScreen()
{
currentConfigApp->m_full_screen = IsDlgButtonChecked(IDC_CHK_FULL_SCREEN);
m_modified = TRUE;
UpdateInterface();
}
// FUNCTION: CONFIGD 0x0040932a
void CMainDialog::OnRadiobuttonModelLowestQuality()
{
currentConfigApp->m_model_quality = 0;
m_modified = TRUE;
UpdateInterface();
}
// FUNCTION: CONFIG 0x004046d0 // FUNCTION: CONFIG 0x004046d0
// FUNCTION: CONFIGD 0x00409367
void CMainDialog::OnRadiobuttonModelLowQuality() void CMainDialog::OnRadiobuttonModelLowQuality()
{ {
currentConfigApp->m_model_quality = 1; currentConfigApp->m_model_quality = 1;
@@ -269,6 +348,7 @@ void CMainDialog::OnRadiobuttonModelLowQuality()
} }
// FUNCTION: CONFIG 0x00404700 // FUNCTION: CONFIG 0x00404700
// FUNCTION: CONFIGD 0x004093a4
void CMainDialog::OnRadiobuttonModelHighQuality() void CMainDialog::OnRadiobuttonModelHighQuality()
{ {
currentConfigApp->m_model_quality = 2; currentConfigApp->m_model_quality = 2;
@@ -277,6 +357,7 @@ void CMainDialog::OnRadiobuttonModelHighQuality()
} }
// FUNCTION: CONFIG 0x00404730 // FUNCTION: CONFIG 0x00404730
// FUNCTION: CONFIGD 0x004093e1
void CMainDialog::OnRadiobuttonTextureLowQuality() void CMainDialog::OnRadiobuttonTextureLowQuality()
{ {
currentConfigApp->m_texture_quality = 0; currentConfigApp->m_texture_quality = 0;
@@ -285,6 +366,7 @@ void CMainDialog::OnRadiobuttonTextureLowQuality()
} }
// FUNCTION: CONFIG 0x00404760 // FUNCTION: CONFIG 0x00404760
// FUNCTION: CONFIGD 0x0040941e
void CMainDialog::OnRadiobuttonTextureHighQuality() void CMainDialog::OnRadiobuttonTextureHighQuality()
{ {
currentConfigApp->m_texture_quality = 1; currentConfigApp->m_texture_quality = 1;
@@ -293,6 +375,7 @@ void CMainDialog::OnRadiobuttonTextureHighQuality()
} }
// FUNCTION: CONFIG 0x00404790 // FUNCTION: CONFIG 0x00404790
// FUNCTION: CONFIGD 0x0040945b
void CMainDialog::OnCheckboxJoystick() void CMainDialog::OnCheckboxJoystick()
{ {
currentConfigApp->m_use_joystick = IsDlgButtonChecked(IDC_CHK_JOYSTICK); currentConfigApp->m_use_joystick = IsDlgButtonChecked(IDC_CHK_JOYSTICK);
@@ -311,8 +394,8 @@ void CMainDialog::SwitchToAdvanced(BOOL p_advanced)
{ {
RECT dialog_rect; RECT dialog_rect;
RECT grp_advanced_rect; RECT grp_advanced_rect;
::GetWindowRect(m_hWnd, &dialog_rect); CWnd::GetWindowRect(&dialog_rect);
::GetWindowRect(GetDlgItem(IDC_GRP_ADVANCED)->m_hWnd, &grp_advanced_rect); GetDlgItem(IDC_GRP_ADVANCED)->GetWindowRect(&grp_advanced_rect);
CWnd* button_advanced = GetDlgItem(IDC_BTN_ADVANCED); CWnd* button_advanced = GetDlgItem(IDC_BTN_ADVANCED);
m_advanced = p_advanced; m_advanced = p_advanced;
int height; int height;

View File

@@ -7,6 +7,7 @@
#include "res/resource.h" #include "res/resource.h"
// VTABLE: CONFIG 0x004063e0 // VTABLE: CONFIG 0x004063e0
// VTABLE: CONFIGD 0x0040c500
// SIZE 0x70 // SIZE 0x70
class CMainDialog : public CDialog { class CMainDialog : public CDialog {
public: public:
@@ -35,11 +36,14 @@ protected:
void OnCancel(); void OnCancel();
void OnDestroy(); void OnDestroy();
void OnButtonCancel(); void OnButtonCancel();
void OnCheckboxWideAngle();
void OnCheckbox3DSound(); void OnCheckbox3DSound();
void OnCheckbox3DVideoMemory(); void OnCheckbox3DVideoMemory();
void OnRadiobuttonPalette16bit(); void OnRadiobuttonPalette16bit();
void OnRadiobuttonPalette256(); void OnRadiobuttonPalette256();
void OnCheckboxFlipVideoMemPages(); void OnCheckboxFlipVideoMemPages();
void OnCheckboxFullScreen();
void OnRadiobuttonModelLowestQuality();
void OnRadiobuttonModelLowQuality(); void OnRadiobuttonModelLowQuality();
void OnRadiobuttonModelHighQuality(); void OnRadiobuttonModelHighQuality();
void OnRadiobuttonTextureLowQuality(); void OnRadiobuttonTextureLowQuality();
@@ -52,19 +56,28 @@ protected:
DECLARE_MESSAGE_MAP() DECLARE_MESSAGE_MAP()
}; };
// SYNTHETIC: CONFIG 0x00403160
// SYNTHETIC: CONFIGD 0x00408490
// CMainDialog::~CMainDialog
// SYNTHETIC: CONFIG 0x00403de0 // SYNTHETIC: CONFIG 0x00403de0
// SYNTHETIC: CONFIGD 0x00409910
// CMainDialog::`scalar deleting destructor' // CMainDialog::`scalar deleting destructor'
// FUNCTION: CONFIG 0x00403e60 // FUNCTION: CONFIG 0x00403e60
// FUNCTION: CONFIGD 0x004087a9
// CMainDialog::_GetBaseMessageMap // CMainDialog::_GetBaseMessageMap
// FUNCTION: CONFIG 0x00403e70 // FUNCTION: CONFIG 0x00403e70
// FUNCTION: CONFIGD 0x004087be
// CMainDialog::GetMessageMap // CMainDialog::GetMessageMap
// GLOBAL: CONFIG 0x00406120 // GLOBAL: CONFIG 0x00406120
// GLOBAL: CONFIGD 0x0040c1a8
// CMainDialog::messageMap // CMainDialog::messageMap
// GLOBAL: CONFIG 0x00406128 // GLOBAL: CONFIG 0x00406128
// GLOBAL: CONFIGD 0x0040c1b0
// CMainDialog::_messageEntries // CMainDialog::_messageEntries
#endif // !defined(AFX_MAINDLG_H) #endif // !defined(AFX_MAINDLG_H)

View File

@@ -4,6 +4,7 @@
#include "MainDlg.h" #include "MainDlg.h"
#include "detectdx5.h" #include "detectdx5.h"
#include <assert.h>
#include <direct.h> // _chdir #include <direct.h> // _chdir
#include <mxdirectx/legodxinfo.h> #include <mxdirectx/legodxinfo.h>
#include <mxdirectx/mxdirect3d.h> #include <mxdirectx/mxdirect3d.h>
@@ -19,6 +20,7 @@ ON_COMMAND(ID_HELP, OnHelp)
END_MESSAGE_MAP() END_MESSAGE_MAP()
// FUNCTION: CONFIG 0x00402c40 // FUNCTION: CONFIG 0x00402c40
// FUNCTION: CONFIGD 0x00406900
CConfigApp::CConfigApp() CConfigApp::CConfigApp()
{ {
} }
@@ -26,11 +28,13 @@ CConfigApp::CConfigApp()
#define MiB (1024 * 1024) #define MiB (1024 * 1024)
// FUNCTION: CONFIG 0x00402dc0 // FUNCTION: CONFIG 0x00402dc0
// FUNCTION: CONFIGD 0x004069dc
BOOL CConfigApp::InitInstance() BOOL CConfigApp::InitInstance()
{ {
if (!IsLegoNotRunning()) { if (!IsLegoNotRunning()) {
return FALSE; return FALSE;
} }
if (!DetectDirectX5()) { if (!DetectDirectX5()) {
AfxMessageBox( AfxMessageBox(
"\"LEGO\xae Island\" is not detecting DirectX 5 or later. Please quit all other applications and try " "\"LEGO\xae Island\" is not detecting DirectX 5 or later. Please quit all other applications and try "
@@ -38,22 +42,27 @@ BOOL CConfigApp::InitInstance()
); );
return FALSE; return FALSE;
} }
#ifdef _AFXDLL #ifdef _AFXDLL
Enable3dControls(); Enable3dControls();
#else #else
Enable3dControlsStatic(); Enable3dControlsStatic();
#endif #endif
CConfigCommandLineInfo cmdInfo; CConfigCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); ParseCommandLine(cmdInfo);
if (_stricmp(afxCurrentAppName, "config") == 0) { if (_stricmp(afxCurrentAppName, "config") == 0) {
m_run_config_dialog = TRUE; m_run_config_dialog = TRUE;
} }
m_device_enumerator = new LegoDeviceEnumerate;
if (m_device_enumerator->DoEnumerate()) { m_dxInfo = new LegoDeviceEnumerate;
if (m_dxInfo->DoEnumerate()) {
assert("Could not build device list." == NULL);
return FALSE; return FALSE;
} }
m_driver = NULL;
m_device = NULL; m_ddInfo = NULL;
m_d3dInfo = NULL;
m_full_screen = TRUE; m_full_screen = TRUE;
m_wide_view_angle = TRUE; m_wide_view_angle = TRUE;
m_use_joystick = FALSE; m_use_joystick = FALSE;
@@ -76,37 +85,43 @@ BOOL CConfigApp::InitInstance()
m_texture_quality = 1; m_texture_quality = 1;
} }
else { else {
m_model_quality = 2;
m_3d_sound = TRUE; m_3d_sound = TRUE;
m_model_quality = 2;
m_texture_quality = 1; m_texture_quality = 1;
} }
if (!m_run_config_dialog) {
if (m_run_config_dialog) {
CMainDialog main_dialog(NULL);
m_pMainWnd = &main_dialog;
main_dialog.DoModal();
}
else {
ReadRegisterSettings(); ReadRegisterSettings();
ValidateSettings(); ValidateSettings();
WriteRegisterSettings(); WriteRegisterSettings();
delete m_device_enumerator; delete m_dxInfo;
m_device_enumerator = NULL; m_dxInfo = NULL;
m_driver = NULL; m_ddInfo = NULL;
m_device = NULL; m_d3dInfo = NULL;
char password[256]; char password[256];
ReadReg("password", password, sizeof(password)); BOOL read = ReadReg("password", password, sizeof(password));
const char* exe = _stricmp("ogel", password) == 0 ? "isled.exe" : "isle.exe"; const char* exe = _stricmp("ogel", password) == 0 ? "isled.exe" : "isle.exe";
char diskpath[1024]; char diskpath[1024];
if (ReadReg("diskpath", diskpath, sizeof(diskpath))) { read = ReadReg("diskpath", diskpath, sizeof(diskpath));
if (read) {
_chdir(diskpath); _chdir(diskpath);
} }
_spawnl(_P_NOWAIT, exe, exe, "/diskstream", "/script", "\\lego\\scripts\\isle\\isle.si", NULL); _spawnl(_P_NOWAIT, exe, exe, "/diskstream", "/script", "\\lego\\scripts\\isle\\isle.si", NULL);
return FALSE;
} }
CMainDialog main_dialog(NULL);
main_dialog.DoModal();
return FALSE; return FALSE;
} }
// FUNCTION: CONFIG 0x00403100 // FUNCTION: CONFIG 0x00403100
BOOL CConfigApp::IsLegoNotRunning() BOOL CConfigApp::IsLegoNotRunning()
{ {
HWND hWnd = FindWindowA("Lego Island MainNoM App", "LEGO\xae"); HWND hWnd = FindWindow("Lego Island MainNoM App", "LEGO\xae");
if (_stricmp(afxCurrentAppName, "config") == 0 || !hWnd) { if (_stricmp(afxCurrentAppName, "config") == 0 || !hWnd) {
return TRUE; return TRUE;
} }
@@ -117,35 +132,40 @@ BOOL CConfigApp::IsLegoNotRunning()
} }
// FUNCTION: CONFIG 0x004031b0 // FUNCTION: CONFIG 0x004031b0
// FUNCTION: CONFIGD 0x00406dc3
BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const
{ {
HKEY hKey; HKEY hKey;
DWORD pos; DWORD pos;
BOOL success = FALSE;
BOOL created = RegCreateKeyEx(
HKEY_LOCAL_MACHINE,
"SOFTWARE\\Mindscape\\LEGO Island",
0,
"string",
0,
KEY_READ | KEY_WRITE,
NULL,
&hKey,
&pos
);
if (RegCreateKeyExA( if (created == ERROR_SUCCESS) {
HKEY_LOCAL_MACHINE, if (RegSetValueEx(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value) + 1) == ERROR_SUCCESS) {
"SOFTWARE\\Mindscape\\LEGO Island",
0,
"string",
0,
KEY_READ | KEY_WRITE,
NULL,
&hKey,
&pos
) == ERROR_SUCCESS) {
if (RegSetValueExA(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value)) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) {
return TRUE; success = TRUE;
} }
} }
else { else {
RegCloseKey(hKey); RegCloseKey(hKey);
} }
} }
return FALSE;
return success;
} }
// FUNCTION: CONFIG 0x00403240 // FUNCTION: CONFIG 0x00403240
// FUNCTION: CONFIGD 0x00406e6e
BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const
{ {
HKEY hKey; HKEY hKey;
@@ -153,8 +173,8 @@ BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const
BOOL out = FALSE; BOOL out = FALSE;
DWORD size = p_size; DWORD size = p_size;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueExA(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) { if (RegQueryValueEx(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) {
out = TRUE; out = TRUE;
} }
@@ -164,28 +184,30 @@ BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const
} }
// FUNCTION: CONFIG 0x004032b0 // FUNCTION: CONFIG 0x004032b0
// FUNCTION: CONFIGD 0x00406ef6
BOOL CConfigApp::ReadRegBool(LPCSTR p_key, BOOL* p_bool) const BOOL CConfigApp::ReadRegBool(LPCSTR p_key, BOOL* p_bool) const
{ {
char buffer[256]; char buffer[256];
BOOL read = TRUE;
BOOL read = ReadReg(p_key, buffer, sizeof(buffer)); read = ReadReg(p_key, buffer, sizeof(buffer));
if (read) { if (read) {
if (strcmp("YES", buffer) == 0) { if (strcmp("YES", buffer) == 0) {
*p_bool = TRUE; *p_bool = TRUE;
return read;
} }
else if (strcmp("NO", buffer) == 0) {
if (strcmp("NO", buffer) == 0) {
*p_bool = FALSE; *p_bool = FALSE;
return read;
} }
else {
read = FALSE; read = FALSE;
}
} }
return read; return read;
} }
// FUNCTION: CONFIG 0x00403380 // FUNCTION: CONFIG 0x00403380
// FUNCTION: CONFIGD 0x00406fa1
BOOL CConfigApp::ReadRegInt(LPCSTR p_key, int* p_value) const BOOL CConfigApp::ReadRegInt(LPCSTR p_key, int* p_value) const
{ {
char buffer[256]; char buffer[256];
@@ -199,46 +221,63 @@ BOOL CConfigApp::ReadRegInt(LPCSTR p_key, int* p_value) const
} }
// FUNCTION: CONFIG 0x004033d0 // FUNCTION: CONFIG 0x004033d0
// FUNCTION: CONFIGD 0x00407080
BOOL CConfigApp::IsDeviceInBasicRGBMode() const BOOL CConfigApp::IsDeviceInBasicRGBMode() const
{ {
/* /*
* BUG: should be: * BUG: should be:
* return !GetHardwareDeviceColorModel() && (m_device->m_HELDesc.dcmColorModel & D3DCOLOR_RGB); * return !GetHardwareDeviceColorModel() && (m_d3dInfo->m_HELDesc.dcmColorModel & D3DCOLOR_RGB);
*/ */
return !GetHardwareDeviceColorModel() && m_device->m_HELDesc.dcmColorModel == D3DCOLOR_RGB; assert(m_d3dInfo);
return !GetHardwareDeviceColorModel() && m_d3dInfo->m_HELDesc.dcmColorModel == D3DCOLOR_RGB;
} }
// FUNCTION: CONFIG 0x00403400 // FUNCTION: CONFIG 0x00403400
// FUNCTION: CONFIGD 0x004070fa
D3DCOLORMODEL CConfigApp::GetHardwareDeviceColorModel() const D3DCOLORMODEL CConfigApp::GetHardwareDeviceColorModel() const
{ {
return m_device->m_HWDesc.dcmColorModel; assert(m_d3dInfo);
return m_d3dInfo->m_HWDesc.dcmColorModel;
} }
// FUNCTION: CONFIG 0x00403410 // FUNCTION: CONFIG 0x00403410
// FUNCTION: CONFIGD 0x0040714e
BOOL CConfigApp::IsPrimaryDriver() const BOOL CConfigApp::IsPrimaryDriver() const
{ {
return m_driver == &m_device_enumerator->GetDriverList().front(); assert(m_ddInfo && m_dxInfo);
return m_ddInfo == &m_dxInfo->m_ddInfo.front();
} }
// FUNCTION: CONFIG 0x00403430 // FUNCTION: CONFIG 0x00403430
// FUNCTION: CONFIGD 0x004071d2
BOOL CConfigApp::ReadRegisterSettings() BOOL CConfigApp::ReadRegisterSettings()
{ {
char buffer[256]; char buffer[256];
BOOL is_modified = FALSE; BOOL is_modified = FALSE;
int tmp = -1;
if (ReadReg("3D Device ID", buffer, sizeof(buffer))) { BOOL read = ReadReg("3D Device ID", buffer, sizeof(buffer));
tmp = m_device_enumerator->ParseDeviceName(buffer); int r = -1;
if (tmp >= 0) {
tmp = m_device_enumerator->GetDevice(tmp, m_driver, m_device); if (read) {
r = m_dxInfo->ParseDeviceName(buffer);
if (r >= 0) {
r = m_dxInfo->GetDevice(r, m_ddInfo, m_d3dInfo);
if (r) {
r = -1;
}
} }
} }
if (tmp != 0) {
if (r < 0) {
m_dxInfo->FUN_1009d210();
r = m_dxInfo->GetBestDevice();
is_modified = TRUE; is_modified = TRUE;
m_device_enumerator->FUN_1009d210(); assert(r >= 0);
tmp = m_device_enumerator->FUN_1009d0d0(); r = m_dxInfo->GetDevice(r, m_ddInfo, m_d3dInfo);
m_device_enumerator->GetDevice(tmp, m_driver, m_device);
} }
assert(r == 0 && m_ddInfo && m_d3dInfo);
if (!ReadRegInt("Display Bit Depth", &m_display_bit_depth)) { if (!ReadRegInt("Display Bit Depth", &m_display_bit_depth)) {
is_modified = TRUE; is_modified = TRUE;
} }
@@ -279,6 +318,7 @@ BOOL CConfigApp::ReadRegisterSettings()
} }
// FUNCTION: CONFIG 0x00403630 // FUNCTION: CONFIG 0x00403630
// FUNCTION: CONFIGD 0x00407547
BOOL CConfigApp::ValidateSettings() BOOL CConfigApp::ValidateSettings()
{ {
BOOL is_modified = FALSE; BOOL is_modified = FALSE;
@@ -301,11 +341,7 @@ BOOL CConfigApp::ValidateSettings()
is_modified = TRUE; is_modified = TRUE;
} }
} }
if (!GetHardwareDeviceColorModel()) { if (GetHardwareDeviceColorModel()) {
m_draw_cursor = FALSE;
is_modified = TRUE;
}
else {
if (!m_3d_video_ram) { if (!m_3d_video_ram) {
m_3d_video_ram = TRUE; m_3d_video_ram = TRUE;
is_modified = TRUE; is_modified = TRUE;
@@ -315,6 +351,10 @@ BOOL CConfigApp::ValidateSettings()
is_modified = TRUE; is_modified = TRUE;
} }
} }
else {
m_draw_cursor = FALSE;
is_modified = TRUE;
}
if (m_flip_surfaces) { if (m_flip_surfaces) {
if (!m_3d_video_ram) { if (!m_3d_video_ram) {
m_3d_video_ram = TRUE; m_3d_video_ram = TRUE;
@@ -341,29 +381,34 @@ BOOL CConfigApp::ValidateSettings()
} }
// FUNCTION: CONFIG 0x004037a0 // FUNCTION: CONFIG 0x004037a0
// FUNCTION: CONFIGD 0x00407793
DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const
{ {
assert(m_d3dInfo);
if (IsDeviceInBasicRGBMode()) { if (IsDeviceInBasicRGBMode()) {
return 0; return 0;
} }
if (GetHardwareDeviceColorModel()) { if (GetHardwareDeviceColorModel()) {
return 0; return 0;
} }
return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x800; return m_d3dInfo->m_HELDesc.dwDeviceRenderBitDepth & DDBD_8;
} }
// FUNCTION: CONFIG 0x004037e0 // FUNCTION: CONFIG 0x004037e0
// FUNCTION: CONFIGD 0x00407822
DWORD CConfigApp::GetDeviceRenderBitStatus() const DWORD CConfigApp::GetDeviceRenderBitStatus() const
{ {
assert(m_d3dInfo);
if (GetHardwareDeviceColorModel()) { if (GetHardwareDeviceColorModel()) {
return m_device->m_HWDesc.dwDeviceRenderBitDepth & 0x400; return m_d3dInfo->m_HWDesc.dwDeviceRenderBitDepth & DDBD_16;
} }
else { else {
return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x400; return m_d3dInfo->m_HELDesc.dwDeviceRenderBitDepth & DDBD_16;
} }
} }
// FUNCTION: CONFIG 0x00403810 // FUNCTION: CONFIG 0x00403810
// FUNCTION: CONFIGD 0x004078ac
BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus() BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus()
{ {
if (m_display_bit_depth == 8) { if (m_display_bit_depth == 8) {
@@ -388,7 +433,8 @@ BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus()
return TRUE; return TRUE;
} }
// FUNCTION: CONFIG 00403890 // FUNCTION: CONFIG 0x00403890
// FUNCTION: CONFIGD 0x00407966
void CConfigApp::WriteRegisterSettings() const void CConfigApp::WriteRegisterSettings() const
{ {
@@ -401,9 +447,10 @@ void CConfigApp::WriteRegisterSettings() const
WriteReg(NAME, buffer); \ WriteReg(NAME, buffer); \
} while (0) } while (0)
m_device_enumerator->FormatDeviceName(buffer, m_driver, m_device); assert(m_dxInfo && m_ddInfo && m_d3dInfo);
m_dxInfo->FormatDeviceName(buffer, m_ddInfo, m_d3dInfo);
WriteReg("3D Device ID", buffer); WriteReg("3D Device ID", buffer);
WriteReg("3D Device Name", m_device->m_deviceName); WriteReg("3D Device Name", m_d3dInfo->m_deviceName);
WriteRegInt("Display Bit Depth", m_display_bit_depth); WriteRegInt("Display Bit Depth", m_display_bit_depth);
WriteRegBool("Flip Surfaces", m_flip_surfaces); WriteRegBool("Flip Surfaces", m_flip_surfaces);
WriteRegBool("Full Screen", m_full_screen); WriteRegBool("Full Screen", m_full_screen);
@@ -422,11 +469,12 @@ void CConfigApp::WriteRegisterSettings() const
} }
// FUNCTION: CONFIG 0x00403a90 // FUNCTION: CONFIG 0x00403a90
// FUNCTION: CONFIGD 0x00407c44
int CConfigApp::ExitInstance() int CConfigApp::ExitInstance()
{ {
if (m_device_enumerator) { if (m_dxInfo) {
delete m_device_enumerator; delete m_dxInfo;
m_device_enumerator = NULL; m_dxInfo = NULL;
} }
return CWinApp::ExitInstance(); return CWinApp::ExitInstance();
} }

View File

@@ -11,9 +11,10 @@ class LegoDeviceEnumerate;
struct Direct3DDeviceInfo; struct Direct3DDeviceInfo;
struct MxDriver; struct MxDriver;
#define currentConfigApp ((CConfigApp*) afxCurrentWinApp) #define currentConfigApp ((CConfigApp*) AfxGetApp())
// VTABLE: CONFIG 0x00406040 // VTABLE: CONFIG 0x00406040
// VTABLE: CONFIGD 0x0040c0a0
// SIZE 0x108 // SIZE 0x108
class CConfigApp : public CWinApp { class CConfigApp : public CWinApp {
public: public:
@@ -42,7 +43,7 @@ public:
DWORD GetConditionalDeviceRenderBitDepth() const; DWORD GetConditionalDeviceRenderBitDepth() const;
DWORD GetDeviceRenderBitStatus() const; DWORD GetDeviceRenderBitStatus() const;
BOOL AdjustDisplayBitDepthBasedOnRenderStatus(); BOOL AdjustDisplayBitDepthBasedOnRenderStatus();
void CConfigApp::WriteRegisterSettings() const; void WriteRegisterSettings() const;
//{{AFX_MSG(CConfigApp) //{{AFX_MSG(CConfigApp)
// NOTE - the ClassWizard will add and remove member functions here. // NOTE - the ClassWizard will add and remove member functions here.
@@ -54,38 +55,43 @@ private:
BOOL IsLegoNotRunning(); BOOL IsLegoNotRunning();
public: public:
LegoDeviceEnumerate* m_device_enumerator; // 0x0c4 LegoDeviceEnumerate* m_dxInfo; // 0x0c4
MxDriver* m_driver; // 0x0c8 MxDriver* m_ddInfo; // 0x0c8
Direct3DDeviceInfo* m_device; // 0x0cc Direct3DDeviceInfo* m_d3dInfo; // 0x0cc
int m_display_bit_depth; // 0x0d0 int m_display_bit_depth; // 0x0d0
BOOL m_flip_surfaces; // 0x0d4 BOOL m_flip_surfaces; // 0x0d4
BOOL m_full_screen; // 0x0d8 BOOL m_full_screen; // 0x0d8
BOOL m_3d_video_ram; // 0x0dc BOOL m_3d_video_ram; // 0x0dc
BOOL m_wide_view_angle; // 0x0e0 BOOL m_wide_view_angle; // 0x0e0
BOOL m_3d_sound; // 0x0e4 BOOL m_3d_sound; // 0x0e4
BOOL m_draw_cursor; // 0x0e8 BOOL m_draw_cursor; // 0x0e8
BOOL m_use_joystick; // 0x0ec BOOL m_use_joystick; // 0x0ec
int m_joystick_index; // 0x0f0 int m_joystick_index; // 0x0f0
BOOL m_run_config_dialog; // 0x0f4 BOOL m_run_config_dialog; // 0x0f4
int m_model_quality; // 0x0f8 int m_model_quality; // 0x0f8
int m_texture_quality; // 0x0fc int m_texture_quality; // 0x0fc
undefined m_unk0x100[4]; // 0x100 undefined m_unk0x100[4]; // 0x100
BOOL m_music; // 0x104 BOOL m_music; // 0x104
}; };
// SYNTHETIC: CONFIG 0x00402cd0 // SYNTHETIC: CONFIG 0x00402cd0
// SYNTHETIC: CONFIGD 0x00408330
// CConfigApp::`scalar deleting destructor' // CConfigApp::`scalar deleting destructor'
// FUNCTION: CONFIG 0x402c20 // FUNCTION: CONFIG 0x402c20
// FUNCTION: CONFIGD 0x4068d0
// CConfigApp::_GetBaseMessageMap // CConfigApp::_GetBaseMessageMap
// FUNCTION: CONFIG 0x402c30 // FUNCTION: CONFIG 0x402c30
// FUNCTION: CONFIGD 0x4068e5
// CConfigApp::GetMessageMap // CConfigApp::GetMessageMap
// GLOBAL: CONFIG 0x406008 // GLOBAL: CONFIG 0x406008
// GLOBAL: CONFIGD 0x40c058
// CConfigApp::messageMap // CConfigApp::messageMap
// GLOBAL: CONFIG 0x406010 // GLOBAL: CONFIG 0x406010
// GLOBAL: CONFIGD 0x40c060
// CConfigApp::_messageEntries // CConfigApp::_messageEntries
#endif // !defined(AFX_CONFIG_H) #endif // !defined(AFX_CONFIG_H)

View File

@@ -3,140 +3,255 @@
#include <ddraw.h> #include <ddraw.h>
#include <dinput.h> #include <dinput.h>
typedef HRESULT WINAPI DirectDrawCreate_fn(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnknown FAR* pUnkOuter); typedef HRESULT(WINAPI* DIRECTDRAWCREATE)(GUID*, LPDIRECTDRAW*, IUnknown*);
typedef HRESULT WINAPI typedef HRESULT(WINAPI* DIRECTINPUTCREATE)(HINSTANCE, DWORD, LPDIRECTINPUT*, IUnknown*);
DirectInputCreateA_fn(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA* ppDI, LPUNKNOWN punkOuter);
// FUNCTION: CONFIG 0x004048f0 // FUNCTION: CONFIG 0x004048f0
BOOL DetectDirectX5() BOOL DetectDirectX5()
{ {
unsigned int version; DWORD version;
BOOL found; DWORD platform;
DetectDirectX(&version, &found); GetDXVersion(&version, &platform);
return version >= 0x500; return version >= 0x500;
} }
// FUNCTION: CONFIG 0x00404920 // FUNCTION: CONFIG 0x00404920
void DetectDirectX(unsigned int* p_version, BOOL* p_found) void GetDXVersion(LPDWORD pdwDXVersion, LPDWORD pdwDXPlatform)
{ {
OSVERSIONINFOA os_version; // From GetDXVer.cpp
HRESULT hr;
HINSTANCE DDHinst = 0;
HINSTANCE DIHinst = 0;
LPDIRECTDRAW pDDraw = 0;
LPDIRECTDRAW2 pDDraw2 = 0;
DIRECTDRAWCREATE DirectDrawCreate = 0;
DIRECTINPUTCREATE DirectInputCreate = 0;
OSVERSIONINFO osVer;
LPDIRECTDRAWSURFACE pSurf = 0;
LPDIRECTDRAWSURFACE3 pSurf3 = 0;
os_version.dwOSVersionInfoSize = sizeof(os_version); /*
if (!GetVersionExA(&os_version)) { * First get the windows platform
*p_version = 0; */
*p_found = 0; osVer.dwOSVersionInfoSize = sizeof(osVer);
if (!GetVersionEx(&osVer)) {
*pdwDXVersion = 0;
*pdwDXPlatform = 0;
return; return;
} }
if (os_version.dwPlatformId == 2) {
*p_found = 2; if (osVer.dwPlatformId == VER_PLATFORM_WIN32_NT) {
if (os_version.dwMajorVersion < 4) { *pdwDXPlatform = VER_PLATFORM_WIN32_NT;
*p_found = 0; /*
* NT is easy... NT 4.0 is DX2, 4.0 SP3 is DX3, 5.0 is DX5
* and no DX on earlier versions.
*/
if (osVer.dwMajorVersion < 4) {
*pdwDXPlatform = 0; // No DX on NT3.51 or earlier
return; return;
} }
if (os_version.dwMajorVersion != 4) { if (osVer.dwMajorVersion == 4) {
*p_version = 0x501; /*
* NT4 up to SP2 is DX2, and SP3 onwards is DX3, so we are at least DX2
*/
*pdwDXVersion = 0x200;
/*
* We're not supposed to be able to tell which SP we're on, so check for dinput
*/
DIHinst = LoadLibrary("DINPUT.DLL");
if (DIHinst == 0) {
/*
* No DInput... must be DX2 on NT 4 pre-SP3
*/
OutputDebugString("Couldn't LoadLibrary DInput\r\n");
return;
}
DirectInputCreate = (DIRECTINPUTCREATE) GetProcAddress(DIHinst, "DirectInputCreateA");
FreeLibrary(DIHinst);
if (DirectInputCreate == 0) {
/*
* No DInput... must be pre-SP3 DX2
*/
OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n");
return;
}
/*
* It must be NT4, DX2
*/
*pdwDXVersion = 0x300; // DX3 on NT4 SP3 or higher
return; return;
} }
*p_version = 0x200; /*
HMODULE dinput_module = LoadLibraryA("DINPUT.DLL"); * Else it's NT5 or higher, and it's DX5a or higher:
if (!dinput_module) { */
OutputDebugStringA("Couldn't LoadLibrary DInput\r\n"); *pdwDXVersion = 0x501; // DX5a on NT5
return;
}
DirectInputCreateA_fn* func_DirectInputCreateA =
(DirectInputCreateA_fn*) GetProcAddress(dinput_module, "DirectInputCreateA");
FreeLibrary(dinput_module);
if (!func_DirectInputCreateA) {
OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n");
return;
}
*p_version = 0x300;
return; return;
} }
*p_found = 1;
if (LOWORD(os_version.dwBuildNumber) >= 0x550) { /*
*p_version = 0x501; * Not NT... must be Win9x
*/
*pdwDXPlatform = VER_PLATFORM_WIN32_WINDOWS;
/*
* If we are on Memphis or higher, then we are at least DX5a
*/
if ((osVer.dwBuildNumber & 0xffff) > 1353) // Check for higher than developer release
{
*pdwDXVersion = 0x501; // DX5a on Memphis or higher
return; return;
} }
HMODULE ddraw_module = LoadLibraryA("DDRAW.DLL");
if (!ddraw_module) { /*
*p_version = 0; * Now we know we are in Windows 9x (or maybe 3.1), so anything's possible.
*p_found = 0; * First see if DDRAW.DLL even exists.
FreeLibrary(ddraw_module); */
DDHinst = LoadLibrary("DDRAW.DLL");
if (DDHinst == 0) {
*pdwDXVersion = 0;
*pdwDXPlatform = 0;
FreeLibrary(DDHinst);
return; return;
} }
DirectDrawCreate_fn* func_DirectDrawCreate =
(DirectDrawCreate_fn*) GetProcAddress(ddraw_module, "DirectDrawCreate"); /*
if (!func_DirectDrawCreate) { * See if we can create the DirectDraw object.
*p_version = 0; */
*p_found = 0; DirectDrawCreate = (DIRECTDRAWCREATE) GetProcAddress(DDHinst, "DirectDrawCreate");
FreeLibrary(ddraw_module); if (DirectDrawCreate == 0) {
OutputDebugStringA("Couldn't LoadLibrary DDraw\r\n"); *pdwDXVersion = 0;
*pdwDXPlatform = 0;
FreeLibrary(DDHinst);
OutputDebugString("Couldn't LoadLibrary DDraw\r\n");
return; return;
} }
LPDIRECTDRAW ddraw;
if (FAILED(func_DirectDrawCreate(NULL, &ddraw, NULL))) { hr = DirectDrawCreate(NULL, &pDDraw, NULL);
*p_version = 0; if (FAILED(hr)) {
*p_found = 0; *pdwDXVersion = 0;
FreeLibrary(ddraw_module); *pdwDXPlatform = 0;
OutputDebugStringA("Couldn't create DDraw\r\n"); FreeLibrary(DDHinst);
OutputDebugString("Couldn't create DDraw\r\n");
return; return;
} }
*p_version = 0x100;
LPDIRECTDRAW2 ddraw2; /*
if (FAILED(ddraw->QueryInterface(IID_IDirectDraw2, (LPVOID*) &ddraw2))) { * So DirectDraw exists. We are at least DX1.
ddraw->Release(); */
FreeLibrary(ddraw_module); *pdwDXVersion = 0x100;
OutputDebugStringA("Couldn't QI DDraw2\r\n");
/*
* Let's see if IID_IDirectDraw2 exists.
*/
hr = pDDraw->QueryInterface(IID_IDirectDraw2, (LPVOID*) &pDDraw2);
if (FAILED(hr)) {
/*
* No IDirectDraw2 exists... must be DX1
*/
pDDraw->Release();
FreeLibrary(DDHinst);
OutputDebugString("Couldn't QI DDraw2\r\n");
return; return;
} }
ddraw->Release(); /*
*p_version = 0x200; * IDirectDraw2 exists. We must be at least DX2
HMODULE dinput_module = LoadLibraryA("DINPUT.DLL"); */
if (!dinput_module) { pDDraw2->Release();
OutputDebugStringA("Couldn't LoadLibrary DInput\r\n"); *pdwDXVersion = 0x200;
ddraw2->Release();
FreeLibrary(ddraw_module); /*
* See if we can create the DirectInput object.
*/
DIHinst = LoadLibrary("DINPUT.DLL");
if (DIHinst == 0) {
/*
* No DInput... must be DX2
*/
OutputDebugString("Couldn't LoadLibrary DInput\r\n");
pDDraw->Release();
FreeLibrary(DDHinst);
return; return;
} }
DirectInputCreateA_fn* func_DirectInputCreateA =
(DirectInputCreateA_fn*) GetProcAddress(dinput_module, "DirectInputCreateA"); DirectInputCreate = (DIRECTINPUTCREATE) GetProcAddress(DIHinst, "DirectInputCreateA");
FreeLibrary(dinput_module); FreeLibrary(DIHinst);
if (!func_DirectInputCreateA) {
FreeLibrary(ddraw_module); if (DirectInputCreate == 0) {
ddraw2->Release(); /*
OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n"); * No DInput... must be DX2
*/
FreeLibrary(DDHinst);
pDDraw->Release();
OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n");
return; return;
} }
*p_version = 0x300;
DDSURFACEDESC surface_desc; /*
memset(&surface_desc, 0, sizeof(surface_desc)); * DirectInputCreate exists. That's enough to tell us that we are at least DX3
surface_desc.dwSize = sizeof(surface_desc); */
surface_desc.dwFlags = DDSD_CAPS; *pdwDXVersion = 0x300;
surface_desc.ddsCaps.dwCaps = DDCAPS2_NONLOCALVIDMEM;
if (FAILED(ddraw2->SetCooperativeLevel(NULL, DISCL_BACKGROUND))) { /*
ddraw2->Release(); * Checks for 3a vs 3b?
FreeLibrary(ddraw_module); */
*p_version = 0;
OutputDebugStringA("Couldn't Set coop level\r\n"); /*
* We can tell if DX5 is present by checking for the existence of IDirectDrawSurface3.
* First we need a surface to QI off of.
*/
DDSURFACEDESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.dwSize = sizeof(desc);
desc.dwFlags = DDSD_CAPS;
desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = pDDraw->SetCooperativeLevel(NULL, DDSCL_NORMAL);
if (FAILED(hr)) {
/*
* Failure. This means DDraw isn't properly installed.
*/
pDDraw->Release();
FreeLibrary(DDHinst);
*pdwDXVersion = 0;
OutputDebugString("Couldn't Set coop level\r\n");
return; return;
} }
LPDIRECTDRAWSURFACE surface;
if (FAILED(ddraw2->CreateSurface(&surface_desc, &surface, NULL))) { hr = pDDraw->CreateSurface(&desc, &pSurf, NULL);
ddraw2->Release(); if (FAILED(hr)) {
FreeLibrary(ddraw_module); /*
*p_version = 0; * Failure. This means DDraw isn't properly installed.
OutputDebugStringA("Couldn't CreateSurface\r\n"); */
pDDraw->Release();
FreeLibrary(DDHinst);
*pdwDXVersion = 0;
OutputDebugString("Couldn't CreateSurface\r\n");
return; return;
} }
LPDIRECTDRAWSURFACE3 surface3;
if (FAILED(surface->QueryInterface(IID_IDirectDrawSurface3, (LPVOID*) &surface3))) { /*
ddraw2->Release(); * Try for the IDirectDrawSurface3 interface. If it works, we're on DX5 at least
FreeLibrary(ddraw_module); */
if (FAILED(pSurf->QueryInterface(IID_IDirectDrawSurface3, (LPVOID*) &pSurf3))) {
pDDraw->Release();
FreeLibrary(DDHinst);
return; return;
} }
*p_version = 0x500;
surface3->Release(); /*
ddraw2->Release(); * QI for IDirectDrawSurface3 succeeded. We must be at least DX5
FreeLibrary(ddraw_module); */
*pdwDXVersion = 0x500;
pSurf->Release();
pDDraw->Release();
FreeLibrary(DDHinst);
return;
} }

View File

@@ -5,6 +5,6 @@
extern BOOL DetectDirectX5(); extern BOOL DetectDirectX5();
extern void DetectDirectX(unsigned int* p_version, BOOL* p_found); extern void GetDXVersion(LPDWORD pdwDXVersion, LPDWORD pdwDXPlatform);
#endif // !defined(AFX_DETECTDX5_H) #endif // !defined(AFX_DETECTDX5_H)

View File

@@ -7,10 +7,12 @@
#define IDC_LIST_3DDEVICES 1000 #define IDC_LIST_3DDEVICES 1000
#define IDC_CHK_FLIP_VIDEO_MEM_PAGES 1001 #define IDC_CHK_FLIP_VIDEO_MEM_PAGES 1001
#define IDC_CHK_FULL_SCREEN 1002 // beta only
#define IDC_CHK_3D_VIDEO_MEMORY 1003 #define IDC_CHK_3D_VIDEO_MEMORY 1003
#define IDC_RAD_PALETTE_256 1004 #define IDC_RAD_PALETTE_256 1004
#define IDC_RAD_PALETTE_16BIT 1005 #define IDC_RAD_PALETTE_16BIT 1005
#define IDC_CHK_3DSOUND 1006 #define IDC_CHK_3DSOUND 1006
#define IDC_CHK_WIDE_ANGLE 1007 // beta only
#define IDC_CHK_DRAW_CURSOR 1008 #define IDC_CHK_DRAW_CURSOR 1008
#define IDC_RAD_MODEL_QUALITY_LOW 1010 #define IDC_RAD_MODEL_QUALITY_LOW 1010
#define IDC_RAD_MODEL_QUALITY_HIGH 1011 #define IDC_RAD_MODEL_QUALITY_HIGH 1011

View File

@@ -15,8 +15,6 @@ To access the Ghidra repository, use the following details:
- Address: `server.mattkc.com` - Address: `server.mattkc.com`
- Port: `13100` - Port: `13100`
**Please note that at the time of writing, much of the information found on the Ghidra server is severely outdated**. Generally, the source code found in this repository represents the latest "source of truth" and should be referenced whenever possible.
## General Guidelines ## General Guidelines
If you feel fit to contribute, feel free to create a pull request! Someone will review and merge it (or provide feedback) as soon as possible. If you feel fit to contribute, feel free to create a pull request! Someone will review and merge it (or provide feedback) as soon as possible.

View File

@@ -87,7 +87,7 @@ IsleApp::IsleApp()
m_backBuffersInVram = TRUE; m_backBuffersInVram = TRUE;
m_using8bit = FALSE; m_using8bit = FALSE;
m_using16bit = TRUE; m_using16bit = TRUE;
m_unk0x24 = 0; m_hasLightSupport = FALSE;
m_drawCursor = FALSE; m_drawCursor = FALSE;
m_use3dSound = TRUE; m_use3dSound = TRUE;
m_useMusic = TRUE; m_useMusic = TRUE;
@@ -179,7 +179,7 @@ BOOL IsleApp::SetupLegoOmni()
{ {
BOOL result = FALSE; BOOL result = FALSE;
char mediaPath[256]; char mediaPath[256];
GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath)); GetProfileString("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath));
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
BOOL failure; BOOL failure;
@@ -209,7 +209,7 @@ void IsleApp::SetupVideoFlags(
BOOL backBuffers, BOOL backBuffers,
BOOL using8bit, BOOL using8bit,
BOOL using16bit, BOOL using16bit,
BOOL param_6, BOOL hasLightSupport,
BOOL param_7, BOOL param_7,
BOOL wideViewAngle, BOOL wideViewAngle,
char* deviceId char* deviceId
@@ -218,10 +218,10 @@ void IsleApp::SetupVideoFlags(
m_videoParam.Flags().SetFullScreen(fullScreen); m_videoParam.Flags().SetFullScreen(fullScreen);
m_videoParam.Flags().SetFlipSurfaces(flipSurfaces); m_videoParam.Flags().SetFlipSurfaces(flipSurfaces);
m_videoParam.Flags().SetBackBuffers(!backBuffers); m_videoParam.Flags().SetBackBuffers(!backBuffers);
m_videoParam.Flags().SetF2bit0(!param_6); m_videoParam.Flags().SetLacksLightSupport(!hasLightSupport);
m_videoParam.Flags().SetF1bit7(param_7); m_videoParam.Flags().SetF1bit7(param_7);
m_videoParam.Flags().SetWideViewAngle(wideViewAngle); m_videoParam.Flags().SetWideViewAngle(wideViewAngle);
m_videoParam.Flags().SetF2bit1(1); m_videoParam.Flags().SetEnabled(TRUE);
m_videoParam.SetDeviceName(deviceId); m_videoParam.SetDeviceName(deviceId);
if (using8bit) { if (using8bit) {
m_videoParam.Flags().Set16Bit(0); m_videoParam.Flags().Set16Bit(0);
@@ -251,7 +251,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// Throw error if sound unavailable // Throw error if sound unavailable
if (!soundReady) { if (!soundReady) {
MessageBoxA( MessageBox(
NULL, NULL,
"\"LEGO\xAE Island\" is not detecting a DirectSound compatible sound card. Please quit all other " "\"LEGO\xAE Island\" is not detecting a DirectSound compatible sound card. Please quit all other "
"applications and try again.", "applications and try again.",
@@ -266,7 +266,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// Create window // Create window
if (g_isle->SetupWindow(hInstance, lpCmdLine) != SUCCESS) { if (g_isle->SetupWindow(hInstance, lpCmdLine) != SUCCESS) {
MessageBoxA( MessageBox(
NULL, NULL,
"\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.", "\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.",
"LEGO\xAE Island Error", "LEGO\xAE Island Error",
@@ -287,12 +287,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// sample for MSVC600. It's quite possible Mindscape derived this app from that example since they no longer had the // sample for MSVC600. It's quite possible Mindscape derived this app from that example since they no longer had the
// luxury of the MFC AppWizard which we know they used for the frontend used during development (ISLEMFC.EXE, // luxury of the MFC AppWizard which we know they used for the frontend used during development (ISLEMFC.EXE,
// MAIN.EXE, et al.) // MAIN.EXE, et al.)
LoadAcceleratorsA(hInstance, "AppAccel"); LoadAccelerators(hInstance, "AppAccel");
MSG msg; MSG msg;
while (!g_closed) { while (!g_closed) {
while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE)) { while (!PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
if (g_isle) { if (g_isle) {
g_isle->Tick(1); g_isle->Tick(1);
} }
@@ -303,15 +303,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
} }
while (!g_closed) { while (!g_closed) {
if (!PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) { if (!PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
break; break;
} }
MSG nextMsg; MSG nextMsg;
if (!g_isle || !g_isle->GetWindowHandle() || msg.message != WM_MOUSEMOVE || if (!g_isle || !g_isle->GetWindowHandle() || msg.message != WM_MOUSEMOVE ||
!PeekMessageA(&nextMsg, NULL, 0, 0, PM_NOREMOVE) || nextMsg.message != WM_MOUSEMOVE) { !PeekMessage(&nextMsg, NULL, 0, 0, PM_NOREMOVE) || nextMsg.message != WM_MOUSEMOVE) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessageA(&msg); DispatchMessage(&msg);
} }
if (g_reqEnableRMDevice) { if (g_reqEnableRMDevice) {
@@ -343,7 +343,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// FUNCTION: ISLE 0x401ca0 // FUNCTION: ISLE 0x401ca0
BOOL FindExistingInstance() BOOL FindExistingInstance()
{ {
HWND hWnd = FindWindowA(WNDCLASS_NAME, WINDOW_TITLE); HWND hWnd = FindWindow(WNDCLASS_NAME, WINDOW_TITLE);
if (hWnd) { if (hWnd) {
if (SetForegroundWindow(hWnd)) { if (SetForegroundWindow(hWnd)) {
ShowWindow(hWnd, SW_RESTORE); ShowWindow(hWnd, SW_RESTORE);
@@ -373,14 +373,14 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
unsigned char keyCode = 0; unsigned char keyCode = 0;
if (!g_isle) { if (!g_isle) {
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
} }
switch (uMsg) { switch (uMsg) {
case WM_PAINT: case WM_PAINT:
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_ACTIVATE: case WM_ACTIVATE:
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
if (g_isle) { if (g_isle) {
if ((wParam != 0) && (g_isle->GetFullScreen())) { if ((wParam != 0) && (g_isle->GetFullScreen())) {
@@ -395,7 +395,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
g_isle->SetWindowActive(wParam); g_isle->SetWindowActive(wParam);
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_CLOSE: case WM_CLOSE:
if (!g_closed && g_isle) { if (!g_closed && g_isle) {
delete g_isle; delete g_isle;
@@ -403,7 +403,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
g_closed = TRUE; g_closed = TRUE;
return 0; return 0;
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_GETMINMAXINFO: case WM_GETMINMAXINFO:
((MINMAXINFO*) lParam)->ptMaxTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1; ((MINMAXINFO*) lParam)->ptMaxTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1;
((MINMAXINFO*) lParam)->ptMaxTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1; ((MINMAXINFO*) lParam)->ptMaxTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
@@ -411,7 +411,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
((MINMAXINFO*) lParam)->ptMinTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1; ((MINMAXINFO*) lParam)->ptMinTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
return 0; return 0;
case WM_ENTERMENULOOP: case WM_ENTERMENULOOP:
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_SYSCOMMAND: case WM_SYSCOMMAND:
if (wParam == SC_SCREENSAVE) { if (wParam == SC_SCREENSAVE) {
return 0; return 0;
@@ -421,27 +421,27 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (g_rmDisabled) { if (g_rmDisabled) {
ShowWindow(g_isle->GetWindowHandle(), SW_RESTORE); ShowWindow(g_isle->GetWindowHandle(), SW_RESTORE);
} }
PostMessageA(g_isle->GetWindowHandle(), WM_CLOSE, 0, 0); PostMessage(g_isle->GetWindowHandle(), WM_CLOSE, 0, 0);
return 0; return 0;
} }
} }
else if (g_isle && g_isle->GetFullScreen() && (wParam == SC_MOVE || wParam == SC_KEYMENU)) { else if (g_isle && g_isle->GetFullScreen() && (wParam == SC_MOVE || wParam == SC_KEYMENU)) {
return 0; return 0;
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_EXITMENULOOP: case WM_EXITMENULOOP:
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_MOVING: case WM_MOVING:
if (g_isle && g_isle->GetFullScreen()) { if (g_isle && g_isle->GetFullScreen()) {
GetWindowRect(hWnd, (LPRECT) lParam); GetWindowRect(hWnd, (LPRECT) lParam);
return 0; return 0;
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_NCPAINT: case WM_NCPAINT:
if (g_isle && g_isle->GetFullScreen()) { if (g_isle && g_isle->GetFullScreen()) {
return 0; return 0;
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_DISPLAYCHANGE: case WM_DISPLAYCHANGE:
if (g_isle && VideoManager() && g_isle->GetFullScreen() && VideoManager()->GetDirect3D()) { if (g_isle && VideoManager() && g_isle->GetFullScreen() && VideoManager()->GetDirect3D()) {
if (VideoManager()->GetDirect3D()->AssignedDevice()) { if (VideoManager()->GetDirect3D()->AssignedDevice()) {
@@ -474,12 +474,12 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
} }
} }
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_KEYDOWN: case WM_KEYDOWN:
// While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems // While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems
// to be what the assembly is actually doing // to be what the assembly is actually doing
if (lParam & (KF_REPEAT << 16)) { if (lParam & (KF_REPEAT << 16)) {
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
} }
type = c_notificationKeyPress; type = c_notificationKeyPress;
keyCode = wParam; keyCode = wParam;
@@ -513,7 +513,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
break; break;
default: default:
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
} }
if (g_isle) { if (g_isle) {
@@ -550,7 +550,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
m_backBuffersInVram, m_backBuffersInVram,
m_using8bit, m_using8bit,
m_using16bit, m_using16bit,
m_unk0x24, m_hasLightSupport,
FALSE, FALSE,
m_wideViewAngle, m_wideViewAngle,
m_deviceId m_deviceId
@@ -559,7 +559,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
MxOmni::SetSound3D(m_use3dSound); MxOmni::SetSound3D(m_use3dSound);
srand(timeGetTime() / 1000); srand(timeGetTime() / 1000);
SystemParametersInfoA(SPI_SETMOUSETRAILS, 0, NULL, 0); SystemParametersInfo(SPI_SETMOUSETRAILS, 0, NULL, 0);
ZeroMemory(&wndclass, sizeof(WNDCLASSA)); ZeroMemory(&wndclass, sizeof(WNDCLASSA));
@@ -567,22 +567,22 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc; wndclass.lpfnWndProc = WndProc;
wndclass.cbWndExtra = 0; wndclass.cbWndExtra = 0;
wndclass.hIcon = LoadIconA(hInstance, MAKEINTRESOURCEA(APP_ICON)); wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(APP_ICON));
wndclass.hCursor = m_cursorArrow = m_cursorCurrent = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_ARROW)); wndclass.hCursor = m_cursorArrow = m_cursorCurrent = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_ARROW));
m_cursorBusy = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_BUSY)); m_cursorBusy = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_BUSY));
m_cursorNo = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_NO)); m_cursorNo = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_NO));
wndclass.hInstance = hInstance; wndclass.hInstance = hInstance;
wndclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH); wndclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wndclass.lpszClassName = WNDCLASS_NAME; wndclass.lpszClassName = WNDCLASS_NAME;
if (!RegisterClassA(&wndclass)) { if (!RegisterClass(&wndclass)) {
return FAILURE; return FAILURE;
} }
if (m_fullScreen) { if (m_fullScreen) {
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
m_windowHandle = CreateWindowExA( m_windowHandle = CreateWindowEx(
WS_EX_APPWINDOW, WS_EX_APPWINDOW,
WNDCLASS_NAME, WNDCLASS_NAME,
WINDOW_TITLE, WINDOW_TITLE,
@@ -600,7 +600,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
else { else {
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
m_windowHandle = CreateWindowExA( m_windowHandle = CreateWindowEx(
WS_EX_APPWINDOW, WS_EX_APPWINDOW,
WNDCLASS_NAME, WNDCLASS_NAME,
WINDOW_TITLE, WINDOW_TITLE,
@@ -690,8 +690,8 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
BOOL out = FALSE; BOOL out = FALSE;
DWORD size = outSize; DWORD size = outSize;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) { if (RegQueryValueEx(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) {
out = TRUE; out = TRUE;
} }

View File

@@ -56,7 +56,7 @@ private:
BOOL m_backBuffersInVram; // 0x18 BOOL m_backBuffersInVram; // 0x18
BOOL m_using8bit; // 0x1c BOOL m_using8bit; // 0x1c
BOOL m_using16bit; // 0x20 BOOL m_using16bit; // 0x20
int m_unk0x24; // 0x24 BOOL m_hasLightSupport; // 0x24
BOOL m_use3dSound; // 0x28 BOOL m_use3dSound; // 0x28
BOOL m_useMusic; // 0x2c BOOL m_useMusic; // 0x2c
BOOL m_useJoystick; // 0x30 BOOL m_useJoystick; // 0x30

View File

@@ -10,6 +10,7 @@ const char* g_strANIMATION = "ANIMATION";
// GLOBAL: LEGO1 0x10102050 // GLOBAL: LEGO1 0x10102050
// STRING: LEGO1 0x10102024 // STRING: LEGO1 0x10102024
// GLOBAL: BETA10 0x102028b4
const char* g_strATTACH_CAMERA = "ATTACH_CAMERA"; const char* g_strATTACH_CAMERA = "ATTACH_CAMERA";
// GLOBAL: LEGO1 0x10102054 // GLOBAL: LEGO1 0x10102054
@@ -138,6 +139,7 @@ const char* g_strBMP_ISMAP = "BMP_ISMAP";
// GLOBAL: LEGO1 0x101020e4 // GLOBAL: LEGO1 0x101020e4
// STRING: LEGO1 0x10101eac // STRING: LEGO1 0x10101eac
// GLOBAL: BETA10 0x10202948
const char* g_parseExtraTokens = ":;"; const char* g_parseExtraTokens = ":;";
// GLOBAL: LEGO1 0x100f0c14 // GLOBAL: LEGO1 0x100f0c14

View File

@@ -8,6 +8,13 @@
// SIZE 0x194 // SIZE 0x194
class Act2Brick : public LegoPathActor { class Act2Brick : public LegoPathActor {
public: public:
enum {
e_removed = 0,
e_created = 1,
e_placed = 2,
e_atRest = 3,
};
Act2Brick(); Act2Brick();
~Act2Brick() override; // vtable+0x00 ~Act2Brick() override; // vtable+0x00
@@ -35,7 +42,7 @@ public:
MxResult Create(MxS32 p_index); MxResult Create(MxS32 p_index);
void Remove(); void Remove();
void FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary); void Place(MxMatrix& p_localToWorld, MxMatrix& p_endLocalToWorld, LegoPathBoundary* p_boundary);
void PlayWhistleSound(); void PlayWhistleSound();
void StopWhistleSound(); void StopWhistleSound();
void Mute(MxBool p_muted); void Mute(MxBool p_muted);
@@ -44,12 +51,12 @@ private:
static const LegoChar* g_lodNames[]; static const LegoChar* g_lodNames[];
static MxLong g_lastHitActorTime; static MxLong g_lastHitActorTime;
LegoCacheSound* m_whistleSound; // 0x154 LegoCacheSound* m_whistleSound; // 0x154
undefined m_unk0x158[0x0c]; // 0x158 undefined m_unk0x158[0x0c]; // 0x158
undefined4 m_unk0x164; // 0x164 MxU32 m_state; // 0x164
Mx3DPointFloat m_unk0x168; // 0x168 Mx3DPointFloat m_localToWorldMovementStep; // 0x168
Mx3DPointFloat m_unk0x17c; // 0x17c Mx3DPointFloat m_endLocalToWorld; // 0x17c
MxS32 m_unk0x190; // 0x190 MxS32 m_step; // 0x190
}; };
#endif // ACT2BRICK_H #endif // ACT2BRICK_H

View File

@@ -18,14 +18,20 @@ class MxQuaternionTransformer;
// SIZE 0x0c // SIZE 0x0c
struct Act3ListElement { struct Act3ListElement {
MxU32 m_objectId; // 0x00 enum InsertMode {
undefined4 m_unk0x04; // 0x04 e_replaceAction = 1,
undefined m_unk0x08; // 0x08 e_queueAction = 2,
e_onlyIfEmpty = 3
};
MxU32 m_objectId; // 0x00
InsertMode m_insertMode; // 0x04
MxBool m_hasStarted; // 0x08
Act3ListElement() {} Act3ListElement() {}
Act3ListElement(MxU32 p_objectId, undefined4 p_unk0x04, undefined p_unk0x08) Act3ListElement(MxU32 p_objectId, InsertMode p_insertMode, MxBool p_hasStarted)
: m_objectId(p_objectId), m_unk0x04(p_unk0x04), m_unk0x08(p_unk0x08) : m_objectId(p_objectId), m_insertMode(p_insertMode), m_hasStarted(p_hasStarted)
{ {
} }
@@ -36,15 +42,15 @@ struct Act3ListElement {
// SIZE 0x10 // SIZE 0x10
class Act3List : private list<Act3ListElement> { class Act3List : private list<Act3ListElement> {
public: public:
Act3List() { m_unk0x0c = 0; } Act3List() { m_cleared = FALSE; }
void Insert(MxS32 p_objectId, MxS32 p_option); void Insert(MxS32 p_objectId, Act3ListElement::InsertMode p_option);
void FUN_10071fa0(); void DeleteActionWrapper();
void Clear(); void Clear();
void FUN_100720d0(MxU32 p_objectId); void RemoveByObjectIdOrFirst(MxU32 p_objectId);
private: private:
undefined4 m_unk0x0c; // 0x0c MxU32 m_cleared; // 0x0c
}; };
// VTABLE: LEGO1 0x100d4fc8 // VTABLE: LEGO1 0x100d4fc8
@@ -52,7 +58,14 @@ private:
// SIZE 0x0c // SIZE 0x0c
class Act3State : public LegoState { class Act3State : public LegoState {
public: public:
Act3State() { m_unk0x08 = 0; } enum {
e_initial = 0,
e_ready = 1,
e_goodEnding = 2,
e_badEnding = 3,
};
Act3State() { m_state = Act3State::e_initial; }
// FUNCTION: LEGO1 0x1000e2f0 // FUNCTION: LEGO1 0x1000e2f0
MxBool IsSerializable() override { return FALSE; } MxBool IsSerializable() override { return FALSE; }
@@ -74,11 +87,11 @@ public:
// SYNTHETIC: LEGO1 0x1000e3c0 // SYNTHETIC: LEGO1 0x1000e3c0
// Act3State::`scalar deleting destructor' // Act3State::`scalar deleting destructor'
undefined4 GetUnknown0x08() { return m_unk0x08; } MxU32 GetState() { return m_state; }
// TODO: Most likely getters/setters are not used according to BETA. // TODO: Most likely getters/setters are not used according to BETA.
undefined4 m_unk0x08; // 0x08 MxU32 m_state; // 0x08
}; };
// VTABLE: LEGO1 0x100d9628 // VTABLE: LEGO1 0x100d9628
@@ -93,7 +106,7 @@ public:
MxResult Tickle() override; // vtable+0x08 MxResult Tickle() override; // vtable+0x08
// FUNCTION: LEGO1 0x10072500 // FUNCTION: LEGO1 0x10072500
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x10072510 // FUNCTION: LEGO1 0x10072510
// FUNCTION: BETA10 0x10017550 // FUNCTION: BETA10 0x10017550
@@ -129,7 +142,7 @@ public:
void RemoveDonut(Act3Ammo& p_p); void RemoveDonut(Act3Ammo& p_p);
MxResult ShootPizza(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up); MxResult ShootPizza(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up);
MxResult ShootDonut(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up); MxResult ShootDonut(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up);
void FUN_10072ad0(undefined4 p_param1); void TriggerHitSound(undefined4 p_param1);
MxResult FUN_10073360(Act3Ammo& p_ammo, const Vector3& p_param2); MxResult FUN_10073360(Act3Ammo& p_ammo, const Vector3& p_param2);
MxResult FUN_10073390(Act3Ammo& p_ammo, const Vector3& p_param2); MxResult FUN_10073390(Act3Ammo& p_ammo, const Vector3& p_param2);
void SetBrickster(Act3Brickster* p_brickster); void SetBrickster(Act3Brickster* p_brickster);
@@ -168,12 +181,12 @@ protected:
Helicopter* m_copter; // 0x420c Helicopter* m_copter; // 0x420c
Act3Shark* m_shark; // 0x4210 Act3Shark* m_shark; // 0x4210
MxFloat m_time; // 0x4214 MxFloat m_time; // 0x4214
MxU8 m_unk0x4218; // 0x4218 MxU8 m_pizzaHitSound; // 0x4218
MxU8 m_unk0x4219; // 0x4219 MxU8 m_pizzaMissSound; // 0x4219
MxU8 m_unk0x421a; // 0x421a MxU8 m_copDonutSound; // 0x421a
MxU8 m_unk0x421b; // 0x421b MxU8 m_donutMissSound; // 0x421b
MxU8 m_unk0x421c; // 0x421c MxU8 m_islanderSound; // 0x421c
MxU8 m_unk0x421d; // 0x421d MxU8 m_bricksterDonutSound; // 0x421d
undefined m_unk0x421e; // 0x421e undefined m_unk0x421e; // 0x421e
Act3List m_unk0x4220; // 0x4220 Act3List m_unk0x4220; // 0x4220
MxPresenter* m_helicopterDots[15]; // 0x4230 MxPresenter* m_helicopterDots[15]; // 0x4230

View File

@@ -140,7 +140,7 @@ public:
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void SwitchBoundary( void SwitchBoundary(
LegoPathBoundary*& p_boundary, LegoPathBoundary*& p_boundary,
LegoUnknown100db7f4*& p_edge, LegoOrientedEdge*& p_edge,
float& p_unk0xe4 float& p_unk0xe4
) override; // vtable+0x98 ) override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c MxResult VTable0x9c() override; // vtable+0x9c

View File

@@ -90,7 +90,7 @@ public:
// Act3Ammo::`scalar deleting destructor' // Act3Ammo::`scalar deleting destructor'
private: private:
MxResult FUN_10053db0(float p_param1, const Matrix4& p_param2); MxResult FUN_10053db0(float p_param1, Matrix4& p_param2);
static Mx3DPointFloat g_unk0x10104f08; static Mx3DPointFloat g_unk0x10104f08;

View File

@@ -11,6 +11,12 @@ class MxEndActionNotificationParam;
// SIZE 0x24 // SIZE 0x24
class AmbulanceMissionState : public LegoState { class AmbulanceMissionState : public LegoState {
public: public:
enum {
e_ready = 0,
e_enteredAmbulance = 1,
e_prepareAmbulance = 2,
};
AmbulanceMissionState(); AmbulanceMissionState();
// FUNCTION: LEGO1 0x10037440 // FUNCTION: LEGO1 0x10037440
@@ -125,18 +131,18 @@ public:
// SYNTHETIC: LEGO1 0x100376c0 // SYNTHETIC: LEGO1 0x100376c0
// AmbulanceMissionState::`scalar deleting destructor' // AmbulanceMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08 MxU32 m_state; // 0x08
MxLong m_startTime; // 0x0c MxLong m_startTime; // 0x0c
MxS16 m_peScore; // 0x10 MxS16 m_peScore; // 0x10
MxS16 m_maScore; // 0x12 MxS16 m_maScore; // 0x12
MxS16 m_paScore; // 0x14 MxS16 m_paScore; // 0x14
MxS16 m_niScore; // 0x16 MxS16 m_niScore; // 0x16
MxS16 m_laScore; // 0x18 MxS16 m_laScore; // 0x18
MxS16 m_peHighScore; // 0x1a MxS16 m_peHighScore; // 0x1a
MxS16 m_maHighScore; // 0x1c MxS16 m_maHighScore; // 0x1c
MxS16 m_paHighScore; // 0x1e MxS16 m_paHighScore; // 0x1e
MxS16 m_niHighScore; // 0x20 MxS16 m_niHighScore; // 0x20
MxS16 m_laHighScore; // 0x22 MxS16 m_laHighScore; // 0x22
}; };
// VTABLE: LEGO1 0x100d71a8 // VTABLE: LEGO1 0x100d71a8
@@ -177,15 +183,21 @@ public:
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4 virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4
void CreateState(); void CreateState();
void FUN_10036e60(); void Init();
void ActivateSceneActions(); void ActivateSceneActions();
void StopActions(); void StopActions();
void FUN_10037250(); void Reset();
// SYNTHETIC: LEGO1 0x10036130 // SYNTHETIC: LEGO1 0x10036130
// Ambulance::`scalar deleting destructor' // Ambulance::`scalar deleting destructor'
private: private:
enum {
e_none = 0,
e_waiting = 1,
e_finished = 3,
};
void PlayAnimation(IsleScript::Script p_objectId); void PlayAnimation(IsleScript::Script p_objectId);
void PlayFinalAnimation(IsleScript::Script p_objectId); void PlayFinalAnimation(IsleScript::Script p_objectId);
void StopAction(IsleScript::Script p_objectId); void StopAction(IsleScript::Script p_objectId);
@@ -196,10 +208,10 @@ private:
AmbulanceMissionState* m_state; // 0x164 AmbulanceMissionState* m_state; // 0x164
MxS16 m_unk0x168; // 0x168 MxS16 m_unk0x168; // 0x168
MxS16 m_actorId; // 0x16a MxS16 m_actorId; // 0x16a
MxS16 m_unk0x16c; // 0x16c MxS16 m_atPoliceTask; // 0x16c
MxS16 m_unk0x16e; // 0x16e MxS16 m_atBeachTask; // 0x16e
MxS16 m_unk0x170; // 0x170 MxS16 m_taskState; // 0x170
MxS16 m_unk0x172; // 0x172 MxS16 m_enableRandomAudio; // 0x172
IsleScript::Script m_lastAction; // 0x174 IsleScript::Script m_lastAction; // 0x174
IsleScript::Script m_lastAnimation; // 0x178 IsleScript::Script m_lastAnimation; // 0x178
MxFloat m_fuel; // 0x17c MxFloat m_fuel; // 0x17c

View File

@@ -52,13 +52,13 @@ public:
return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name); return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name);
} }
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void ReadyWorld() override; // vtable+0x50 void ReadyWorld() override; // vtable+0x50
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c MxLong HandleControl(LegoControlManagerNotificationParam&) override; // vtable+0x6c
MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70 MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78 MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78
// FUNCTION: BETA10 0x100cd060 // FUNCTION: BETA10 0x100cd060
RaceSkel* GetSkeleton() { return m_skeleton; } RaceSkel* GetSkeleton() { return m_skeleton; }

View File

@@ -18,7 +18,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x10017f10 // FUNCTION: LEGO1 0x10017f10
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x10017f20 // FUNCTION: LEGO1 0x10017f20
// FUNCTION: BETA10 0x10028130 // FUNCTION: BETA10 0x10028130

View File

@@ -14,6 +14,19 @@ class MxStillPresenter;
// SIZE 0x24 // SIZE 0x24
class GasStationState : public LegoState { class GasStationState : public LegoState {
public: public:
enum {
e_unknown0 = 0,
e_newState = 1,
e_beforeExitingForQuest = 2,
e_unknown3 = 3,
e_unknown4 = 4,
e_introduction = 5,
e_explainQuest = 6,
e_waitAcceptingQuest = 7,
e_afterAcceptingQuest = 8,
e_cancelQuest = 9,
};
GasStationState(); GasStationState();
// FUNCTION: LEGO1 0x100061d0 // FUNCTION: LEGO1 0x100061d0
@@ -42,7 +55,7 @@ public:
// TODO: Most likely getters/setters are not used according to BETA. // TODO: Most likely getters/setters are not used according to BETA.
GarageScript::Script m_actions[3]; // 0x08 GarageScript::Script m_actions[3]; // 0x08
undefined4 m_unk0x14; // 0x14 MxS32 m_state; // 0x14
MxS16 m_pepperAction; // 0x18 MxS16 m_pepperAction; // 0x18
MxS16 m_mamaAction; // 0x1a MxS16 m_mamaAction; // 0x1a
MxS16 m_papaAction; // 0x1c MxS16 m_papaAction; // 0x1c
@@ -62,7 +75,7 @@ public:
MxResult Tickle() override; // vtable+0x08 MxResult Tickle() override; // vtable+0x08
// FUNCTION: LEGO1 0x10004770 // FUNCTION: LEGO1 0x10004770
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x10004780 // FUNCTION: LEGO1 0x10004780
// FUNCTION: BETA10 0x10029d40 // FUNCTION: BETA10 0x10029d40
@@ -88,6 +101,13 @@ public:
// GasStation::`scalar deleting destructor' // GasStation::`scalar deleting destructor'
private: private:
enum {
e_finished = 0,
e_start = 1,
e_started = 2,
e_canceled = 3,
};
inline void PlayAction(GarageScript::Script p_objectId); inline void PlayAction(GarageScript::Script p_objectId);
inline void StopAction(GarageScript::Script p_objectId); inline void StopAction(GarageScript::Script p_objectId);
@@ -99,13 +119,13 @@ private:
undefined2 m_unk0xfa; // 0xfa undefined2 m_unk0xfa; // 0xfa
LegoGameState::Area m_destLocation; // 0xfc LegoGameState::Area m_destLocation; // 0xfc
GasStationState* m_state; // 0x100 GasStationState* m_state; // 0x100
undefined2 m_unk0x104; // 0x104 MxS16 m_waitingState; // 0x104
undefined2 m_unk0x106; // 0x106 MxS16 m_setWithCurrentAction; // 0x106
MxStillPresenter* m_trackLedBitmap; // 0x108 MxStillPresenter* m_trackLedBitmap; // 0x108
MxLong m_unk0x10c; // 0x10c MxLong m_lastIdleAnimation; // 0x10c
MxLong m_trackLedTimer; // 0x110 MxLong m_trackLedTimer; // 0x110
MxBool m_unk0x114; // 0x114 MxBool m_waiting; // 0x114
MxBool m_unk0x115; // 0x115 MxBool m_flashingLeds; // 0x115
Radio m_radio; // 0x118 Radio m_radio; // 0x118
}; };

View File

@@ -16,6 +16,24 @@ class MxStillPresenter;
// SIZE 0x18 // SIZE 0x18
class HospitalState : public LegoState { class HospitalState : public LegoState {
public: public:
enum {
e_exitToClose = 0,
e_newState = 1,
e_unknown3 = 3,
e_unknown4 = 4,
e_introduction = 5,
e_explainQuestShort = 6,
e_explainQuest = 7,
e_waitAcceptingQuest = 8,
e_beforeEnteringAmbulance = 9,
e_unknown10 = 10, // Can never be reached
e_unknown11 = 11, // Can only be reached via e_unknown10
e_afterAcceptingQuest = 12,
e_exitImmediately = 13,
e_exitToInfocenter = 14,
e_exitToFront = 15,
};
HospitalState(); HospitalState();
~HospitalState() override {} ~HospitalState() override {}
@@ -40,13 +58,13 @@ public:
// TODO: Most likely getters/setters are not used according to BETA. // TODO: Most likely getters/setters are not used according to BETA.
undefined4 m_unk0x08; // 0x08 MxS32 m_state; // 0x08
MxS16 m_unk0x0c; // 0x0c MxS16 m_stateActor; // 0x0c
MxS16 m_unk0x0e; // 0x0e MxS16 m_statePepper; // 0x0e
MxS16 m_unk0x10; // 0x10 MxS16 m_stateMama; // 0x10
MxS16 m_unk0x12; // 0x12 MxS16 m_statePapa; // 0x12
MxS16 m_unk0x14; // 0x14 MxS16 m_stateNick; // 0x14
MxS16 m_unk0x16; // 0x16 MxS16 m_stateLaura; // 0x16
}; };
// VTABLE: LEGO1 0x100d9730 // VTABLE: LEGO1 0x100d9730
@@ -61,7 +79,7 @@ public:
MxResult Tickle() override; // vtable+0x08 MxResult Tickle() override; // vtable+0x08
// FUNCTION: LEGO1 0x100746a0 // FUNCTION: LEGO1 0x100746a0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x100746b0 // FUNCTION: LEGO1 0x100746b0
// FUNCTION: BETA10 0x1002e1a0 // FUNCTION: BETA10 0x1002e1a0
@@ -95,17 +113,17 @@ private:
MxS16 m_currentActorId; // 0xf8 MxS16 m_currentActorId; // 0xf8
LegoGameState::Area m_destLocation; // 0xfc LegoGameState::Area m_destLocation; // 0xfc
undefined2 m_unk0x100; // 0x100 MxU16 m_interactionMode; // 0x100
HospitalState* m_hospitalState; // 0x104 HospitalState* m_hospitalState; // 0x104
undefined2 m_unk0x108; // 0x108 MxU16 m_setWithCurrentAction; // 0x108
HospitalScript::Script m_currentAction; // 0x10c HospitalScript::Script m_currentAction; // 0x10c
MxStillPresenter* m_copLedBitmap; // 0x110 MxStillPresenter* m_copLedBitmap; // 0x110
MxStillPresenter* m_pizzaLedBitmap; // 0x114 MxStillPresenter* m_pizzaLedBitmap; // 0x114
undefined m_unk0x118; // 0x118 MxBool m_flashingLeds; // 0x118
MxLong m_copLedAnimTimer; // 0x11c MxLong m_copLedAnimTimer; // 0x11c
MxLong m_pizzaLedAnimTimer; // 0x120 MxLong m_pizzaLedAnimTimer; // 0x120
MxLong m_time; // 0x124 MxLong m_time; // 0x124
undefined m_unk0x128; // 0x128 MxBool m_exited; // 0x128
}; };
#endif // HOSPITAL_H #endif // HOSPITAL_H

View File

@@ -6,7 +6,7 @@
#include "legostate.h" #include "legostate.h"
#include "legoworld.h" #include "legoworld.h"
#include "misc.h" #include "misc.h"
#include "mxrect32.h" #include "mxgeometry.h"
#include "radio.h" #include "radio.h"
class MxNotificationParam; class MxNotificationParam;
@@ -18,6 +18,25 @@ class LegoControlManagerNotificationParam;
// SIZE 0x94 // SIZE 0x94
class InfocenterState : public LegoState { class InfocenterState : public LegoState {
public: public:
enum {
e_playCutscene = 0,
e_introCancelled = 1,
e_notRegistered = 2,
e_newState = 3,
e_selectedSave = 4,
e_selectedCharacterAndDestination = 5,
// e_6 = 6,
// e_7 = 7,
e_exitQueried = 8,
// e_9 = 9,
// e_10 = 10,
e_welcomeAnimation = 11,
e_exiting = 12,
e_playCredits = 13,
e_exitingToIsland = 14,
e_backToInfoAct1 = 15,
};
InfocenterState(); InfocenterState();
~InfocenterState() override; ~InfocenterState() override;
@@ -72,17 +91,27 @@ public:
Playlist m_returnDialogue[3]; // 0x20 Playlist m_returnDialogue[3]; // 0x20
Playlist m_leaveDialogue[3]; // 0x44 Playlist m_leaveDialogue[3]; // 0x44
Playlist m_bricksterDialogue; // 0x68 Playlist m_bricksterDialogue; // 0x68
MxU32 m_unk0x74; // 0x74 MxU32 m_state; // 0x74
MxStillPresenter* m_letters[7]; // 0x78 MxStillPresenter* m_letters[7]; // 0x78
}; };
// SIZE 0x18 // SIZE 0x18
struct InfocenterMapEntry { struct InfocenterMapEntry {
enum {
e_infocenter = 3,
e_jetrace = 10,
e_carrace = 11,
e_pizzeria = 12,
e_garage = 13,
e_hospital = 14,
e_police = 15,
};
InfocenterMapEntry(); InfocenterMapEntry();
MxStillPresenter* m_destCtl; // 0x00 MxStillPresenter* m_destCtl; // 0x00
undefined4 m_unk0x04; // 0x04 MxU32 m_target; // 0x04
MxRect32 m_area; // 0x08 MxRect<MxS32> m_area; // 0x08
}; };
// VTABLE: LEGO1 0x100d9338 // VTABLE: LEGO1 0x100d9338
@@ -90,25 +119,6 @@ struct InfocenterMapEntry {
// SIZE 0x1d8 // SIZE 0x1d8
class Infocenter : public LegoWorld { class Infocenter : public LegoWorld {
public: public:
enum Cutscene {
e_noIntro = -1,
e_legoMovie,
e_mindscapeMovie,
e_introMovie,
e_outroMovie,
e_badEndMovie,
e_goodEndMovie
};
enum Character {
e_noCharacter = 0,
e_pepper,
e_mama,
e_papa,
e_nick,
e_laura
};
Infocenter(); Infocenter();
~Infocenter() override; ~Infocenter() override;
@@ -131,7 +141,7 @@ public:
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void ReadyWorld() override; // vtable+0x50 void ReadyWorld() override; // vtable+0x50
MxBool VTable0x5c() override; // vtable+0x5c MxBool WaitForTransition() override; // vtable+0x5c
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
void Enable(MxBool p_enable) override; // vtable+0x68 void Enable(MxBool p_enable) override; // vtable+0x68
@@ -151,10 +161,10 @@ private:
void UpdateFrameHot(MxBool p_display); void UpdateFrameHot(MxBool p_display);
void Reset(); void Reset();
void PlayCutscene(Cutscene p_entityId, MxBool p_scale); void PlayCutscene(IntroScript::Script p_entityId, MxBool p_scale);
void StopCutscene(); void StopCutscene();
void FUN_10070d10(MxS32 p_x, MxS32 p_y); void UpdateEnabledGlowControl(MxS32 p_x, MxS32 p_y);
void StartCredits(); void StartCredits();
void StopCredits(); void StopCredits();
@@ -169,16 +179,16 @@ private:
MxS16 m_selectedCharacter; // 0xfc MxS16 m_selectedCharacter; // 0xfc
InfocenterState* m_infocenterState; // 0x100 InfocenterState* m_infocenterState; // 0x100
LegoGameState::Area m_destLocation; // 0x104 LegoGameState::Area m_destLocation; // 0x104
Cutscene m_currentCutscene; // 0x108 IntroScript::Script m_currentCutscene; // 0x108
Radio m_radio; // 0x10c Radio m_radio; // 0x10c
MxStillPresenter* m_dragPresenter; // 0x11c MxStillPresenter* m_dragPresenter; // 0x11c
InfocenterMapEntry m_glowInfo[7]; // 0x120 InfocenterMapEntry m_glowInfo[7]; // 0x120
MxS16 m_unk0x1c8; // 0x1c8 MxS16 m_enabledGlowControl; // 0x1c8
MxStillPresenter* m_frame; // 0x1cc MxStillPresenter* m_frame; // 0x1cc
MxS16 m_infoManDialogueTimer; // 0x1d0 MxS16 m_infoManDialogueTimer; // 0x1d0
MxS16 m_bookAnimationTimer; // 0x1d2 MxS16 m_bookAnimationTimer; // 0x1d2
MxU16 m_unk0x1d4; // 0x1d4 MxU16 m_playingMovieCounter; // 0x1d4
MxS16 m_unk0x1d6; // 0x1d6 MxS16 m_bigInfoBlinkTimer; // 0x1d6
}; };
#endif // INFOCENTER_H #endif // INFOCENTER_H

View File

@@ -17,7 +17,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x100377a0 // FUNCTION: LEGO1 0x100377a0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x100377b0 // FUNCTION: LEGO1 0x100377b0
// FUNCTION: BETA10 0x10032790 // FUNCTION: BETA10 0x10032790

View File

@@ -34,6 +34,21 @@ public:
c_floor3 c_floor3
}; };
enum {
e_none = 0,
e_initial = 1,
e_elevator = 2,
e_pizza = 3,
e_helicopter = 4,
e_transitionToJetski = 5,
e_transitionToRacecar = 6,
e_transitionToTowtrack = 7,
e_towtrack = 8,
e_transitionToAmbulance = 9,
e_ambulance = 10,
e_jukebox = 11,
};
Act1State(); Act1State();
// FUNCTION: LEGO1 0x100338a0 // FUNCTION: LEGO1 0x100338a0
@@ -58,13 +73,13 @@ public:
void RemoveActors(); void RemoveActors();
void PlaceActors(); void PlaceActors();
MxU32 GetUnknown18() { return m_unk0x018; } MxU32 GetState() { return m_state; }
ElevatorFloor GetElevatorFloor() { return (ElevatorFloor) m_elevFloor; } ElevatorFloor GetElevatorFloor() { return (ElevatorFloor) m_elevFloor; }
MxU8 GetUnknown21() { return m_unk0x021; } MxBool IsSpawnInInfocenter() { return m_spawnInInfocenter; }
void SetUnknown18(MxU32 p_unk0x18) { m_unk0x018 = p_unk0x18; } void SetState(MxU32 p_state) { m_state = p_state; }
void SetElevatorFloor(ElevatorFloor p_elevFloor) { m_elevFloor = p_elevFloor; } void SetElevatorFloor(ElevatorFloor p_elevFloor) { m_elevFloor = p_elevFloor; }
void SetUnknown21(MxU8 p_unk0x21) { m_unk0x021 = p_unk0x21; } void SetSpawnInInfocenter(MxBool p_spawnInInfocenter) { m_spawnInInfocenter = p_spawnInInfocenter; }
// SYNTHETIC: LEGO1 0x10033960 // SYNTHETIC: LEGO1 0x10033960
// Act1State::`scalar deleting destructor' // Act1State::`scalar deleting destructor'
@@ -73,13 +88,13 @@ public:
Playlist m_cptClickDialogue; // 0x008 Playlist m_cptClickDialogue; // 0x008
IsleScript::Script m_currentCptClickDialogue; // 0x014 IsleScript::Script m_currentCptClickDialogue; // 0x014
MxU32 m_unk0x018; // 0x018 MxU32 m_state; // 0x018
MxS16 m_elevFloor; // 0x01c MxS16 m_elevFloor; // 0x01c
MxBool m_unk0x01e; // 0x01e MxBool m_playingFloor2Animation; // 0x01e
MxBool m_unk0x01f; // 0x01f MxBool m_switchedToArea; // 0x01f
MxBool m_planeActive; // 0x020 MxBool m_planeActive; // 0x020
undefined m_unk0x021; // 0x021 MxBool m_spawnInInfocenter; // 0x021
MxBool m_unk0x022; // 0x022 MxBool m_playedExitExplanation; // 0x022
undefined m_unk0x023; // 0x023 undefined m_unk0x023; // 0x023
LegoNamedPlane m_motocyclePlane; // 0x024 LegoNamedPlane m_motocyclePlane; // 0x024
LegoNamedPlane m_bikePlane; // 0x070 LegoNamedPlane m_bikePlane; // 0x070
@@ -119,7 +134,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x10030900 // FUNCTION: LEGO1 0x10030900
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x10030910 // FUNCTION: LEGO1 0x10030910
// FUNCTION: BETA10 0x10035d70 // FUNCTION: BETA10 0x10035d70
@@ -135,18 +150,18 @@ public:
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name); return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
} }
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void ReadyWorld() override; // vtable+0x50 void ReadyWorld() override; // vtable+0x50
void Add(MxCore* p_object) override; // vtable+0x58 void Add(MxCore* p_object) override; // vtable+0x58
void VTable0x60() override; // vtable+0x60 void VTable0x60() override; // vtable+0x60
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
void Enable(MxBool p_enable) override; // vtable+0x68 void Enable(MxBool p_enable) override; // vtable+0x68
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+0x6c virtual void RemoveVehicle(LegoPathActor* p_actor); // vtable+0x6c
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; } void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
MxBool HasHelicopter() { return m_helicopter != NULL; } MxBool HasHelicopter() { return m_helicopter != NULL; }
void FUN_10033350(); void SwitchToInfocenter();
friend class Act1State; friend class Act1State;
@@ -160,13 +175,13 @@ protected:
MxLong HandleTransitionEnd(); MxLong HandleTransitionEnd();
void HandleElevatorEndAction(); void HandleElevatorEndAction();
void UpdateGlobe(); void UpdateGlobe();
void FUN_10032620(); void CheckAreaExiting();
void CreateState(); void CreateState();
void FUN_10032d30( void TransitionToOverlay(
IsleScript::Script p_script, IsleScript::Script p_script,
JukeboxScript::Script p_music, JukeboxScript::Script p_music,
const char* p_cameraLocation, const char* p_cameraLocation,
MxBool p_und MxBool p_setCamera
); );
Act1State* m_act1state; // 0xf8 Act1State* m_act1state; // 0xf8

View File

@@ -35,7 +35,7 @@ public:
void ActivateSceneActions(); void ActivateSceneActions();
MxS16 GetUnknown0x160() { return m_jetskiDashboardStreamId; } MxS16 GetJetskiDashboardStreamId() { return m_jetskiDashboardStreamId; }
// SYNTHETIC: LEGO1 0x1007e5c0 // SYNTHETIC: LEGO1 0x1007e5c0
// Jetski::`scalar deleting destructor' // Jetski::`scalar deleting destructor'

View File

@@ -29,12 +29,12 @@ public:
return !strcmp(p_name, JetskiRace::ClassName()) || LegoRace::IsA(p_name); return !strcmp(p_name, JetskiRace::ClassName()) || LegoRace::IsA(p_name);
} }
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void ReadyWorld() override; // vtable+0x50 void ReadyWorld() override; // vtable+0x50
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c MxLong HandleControl(LegoControlManagerNotificationParam&) override; // vtable+0x6c
MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70 MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
void FUN_10016930(MxS32 p_param1, MxS16 p_param2); void FUN_10016930(MxS32 p_param1, MxS16 p_param2);

View File

@@ -60,7 +60,7 @@ public:
MxResult Tickle() override; // vtable+0x08 MxResult Tickle() override; // vtable+0x08
// FUNCTION: LEGO1 0x1005d6e0 // FUNCTION: LEGO1 0x1005d6e0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x1005d6f0 // FUNCTION: LEGO1 0x1005d6f0
// FUNCTION: BETA10 0x100388d0 // FUNCTION: BETA10 0x100388d0

View File

@@ -15,9 +15,13 @@ class MxEndActionNotificationParam;
// SIZE 0x10 // SIZE 0x10
class LegoAct2State : public LegoState { class LegoAct2State : public LegoState {
public: public:
enum {
c_badEnding = 104
};
LegoAct2State() LegoAct2State()
{ {
m_unk0x08 = 0; m_state = 0;
m_enabled = FALSE; m_enabled = FALSE;
} }
~LegoAct2State() override {} ~LegoAct2State() override {}
@@ -43,14 +47,14 @@ public:
// LegoAct2State::`scalar deleting destructor' // LegoAct2State::`scalar deleting destructor'
// FUNCTION: BETA10 0x100151b0 // FUNCTION: BETA10 0x100151b0
void SetUnknown0x08(undefined4 p_unk0x08) { m_unk0x08 = p_unk0x08; } void SetState(MxU32 p_state) { m_state = p_state; }
undefined4 GetUnknown0x08() { return m_unk0x08; } MxU32 GetState() { return m_state; }
// TODO: Most likely getters/setters are not used according to BETA. (?) // TODO: Most likely getters/setters are not used according to BETA. (?)
undefined4 m_unk0x08; // 0x08 MxU32 m_state; // 0x08
MxBool m_enabled; // 0x0c MxBool m_enabled; // 0x0c
}; };
// VTABLE: LEGO1 0x100d82e0 // VTABLE: LEGO1 0x100d82e0
@@ -67,7 +71,7 @@ public:
void ReadyWorld() override; // vtable+0x50 void ReadyWorld() override; // vtable+0x50
// FUNCTION: LEGO1 0x1004fe10 // FUNCTION: LEGO1 0x1004fe10
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
void VTable0x60() override; // vtable+0x60 void VTable0x60() override; // vtable+0x60
MxBool Escape() override; // vtable+0x64 MxBool Escape() override; // vtable+0x64
@@ -76,10 +80,10 @@ public:
void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; } void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; } void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
MxResult FUN_100516b0(); MxResult CreateBrick();
void FUN_100517b0(); void FUN_100517b0();
MxResult BadEnding(); MxResult BadEnding();
MxResult FUN_10052560( MxResult StartAction(
Act2mainScript::Script p_objectId, Act2mainScript::Script p_objectId,
MxBool p_param2, MxBool p_param2,
MxBool p_param3, MxBool p_param3,
@@ -92,48 +96,65 @@ public:
// LegoAct2::`scalar deleting destructor' // LegoAct2::`scalar deleting destructor'
private: private:
enum {
e_initial = 0,
e_startSpeech = 1,
e_holdingSpeech = 2,
e_startDescription = 3,
e_explaining = 4,
e_goingToResidentialArea = 5,
e_atResidentialArea = 6,
e_chase = 7,
e_droppingBrick = 9,
e_goingToHide = 10,
e_hidden = 11,
e_distributeRemainingBricks = 12,
e_brickHunt = 13,
e_allPiecesCollected = 14,
};
MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
MxLong HandleTransitionEnd(); MxLong HandleTransitionEnd();
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param); MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
void PlayMusic(JukeboxScript::Script p_objectId); void PlayMusic(JukeboxScript::Script p_objectId);
void FUN_10051900(); void FUN_10051900();
void FUN_10051960(); void HideMaPaInfo();
void InitBricks(); void InitBricks();
void UninitBricks(); void UninitBricks();
void SpawnBricks(); void SpawnBricks();
void FUN_10051fa0(MxS32 p_param1); void CheckBricksterDestroying(MxS32 p_pathData);
void FUN_100521f0(MxS32 p_param1); void CheckBricksterIsLoose(MxS32 p_pathData);
MxResult FUN_10052800(); MxResult InitializeShooting();
Act2Brick m_bricks[10]; // 0x00f8 Act2Brick m_bricks[10]; // 0x00f8
MxU8 m_nextBrick; // 0x10c0 MxU8 m_nextBrick; // 0x10c0
undefined m_unk0x10c1; // 0x10c1 MxU8 m_removedBricks; // 0x10c1
MxBool m_ready; // 0x10c2 MxBool m_ready; // 0x10c2
undefined4 m_unk0x10c4; // 0x10c4 undefined4 m_state; // 0x10c4
JukeboxScript::Script m_music; // 0x10c8 JukeboxScript::Script m_music; // 0x10c8
LegoAct2State* m_gameState; // 0x10cc LegoAct2State* m_gameState; // 0x10cc
MxS32 m_unk0x10d0; // 0x10d0 MxS32 m_timeSinceLastStage; // 0x10d0
// variable name verified by BETA10 0x10014633 // variable name verified by BETA10 0x10014633
const char* m_siFile; // 0x10d4 const char* m_siFile; // 0x10d4
LegoROI* m_pepper; // 0x10d8 LegoROI* m_pepper; // 0x10d8
MxMatrix m_unk0x10dc; // 0x10dc MxMatrix m_transformOnDisable; // 0x10dc
LegoPathBoundary* m_unk0x1124; // 0x1124 LegoPathBoundary* m_boundaryOnDisable; // 0x1124
LegoROI* m_ambulance; // 0x1128 LegoROI* m_ambulance; // 0x1128
undefined4 m_unk0x112c; // 0x112c undefined4 m_unk0x112c; // 0x112c
undefined4 m_unk0x1130; // 0x1130 undefined4 m_unk0x1130; // 0x1130
undefined4 m_unk0x1134; // 0x1134 undefined4 m_unk0x1134; // 0x1134
Act2Actor* m_unk0x1138; // 0x1138 Act2Actor* m_unk0x1138; // 0x1138
undefined m_unk0x113c; // 0x113c undefined m_unk0x113c; // 0x113c
Act2mainScript::Script m_unk0x1140; // 0x1140 Act2mainScript::Script m_currentAction; // 0x1140
Act2mainScript::Script m_unk0x1144; // 0x1144 Act2mainScript::Script m_infomanDirecting; // 0x1144
undefined4 m_unk0x1148; // 0x1148 undefined4 m_unk0x1148; // 0x1148
undefined m_firstBrick; // 0x114c undefined m_firstBrick; // 0x114c
undefined m_secondBrick; // 0x114d undefined m_secondBrick; // 0x114d
undefined m_thirdBrick; // 0x114e undefined m_thirdBrick; // 0x114e
undefined m_fourthBrick; // 0x114e undefined m_fourthBrick; // 0x114e
LegoGameState::Area m_destLocation; // 0x1150 LegoGameState::Area m_destLocation; // 0x1150
}; };
#endif // LEGOACT2_H #endif // LEGOACT2_H

View File

@@ -34,6 +34,7 @@ public:
} }
// FUNCTION: LEGO1 0x1002d220 // FUNCTION: LEGO1 0x1002d220
// FUNCTION: BETA10 0x10012530
MxBool IsA(const char* p_name) const override // vtable+0x10 MxBool IsA(const char* p_name) const override // vtable+0x10
{ {
return !strcmp(p_name, LegoActor::ClassName()) || LegoEntity::IsA(p_name); return !strcmp(p_name, LegoActor::ClassName()) || LegoEntity::IsA(p_name);
@@ -43,18 +44,22 @@ public:
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24
// FUNCTION: LEGO1 0x10002cc0 // FUNCTION: LEGO1 0x10002cc0
// FUNCTION: BETA10 0x1000f3e0
virtual MxFloat GetSoundFrequencyFactor() { return m_frequencyFactor; } // vtable+0x50 virtual MxFloat GetSoundFrequencyFactor() { return m_frequencyFactor; } // vtable+0x50
// FUNCTION: LEGO1 0x10002cd0 // FUNCTION: LEGO1 0x10002cd0
// FUNCTION: BETA10 0x1000f410
virtual void SetSoundFrequencyFactor(MxFloat p_frequencyFactor) virtual void SetSoundFrequencyFactor(MxFloat p_frequencyFactor)
{ {
m_frequencyFactor = p_frequencyFactor; m_frequencyFactor = p_frequencyFactor;
} // vtable+0x54 } // vtable+0x54
// FUNCTION: LEGO1 0x10002ce0 // FUNCTION: LEGO1 0x10002ce0
// FUNCTION: BETA10 0x1000f440
virtual void VTable0x58(MxFloat p_unk0x70) { m_unk0x70 = p_unk0x70; } // vtable+0x58 virtual void VTable0x58(MxFloat p_unk0x70) { m_unk0x70 = p_unk0x70; } // vtable+0x58
// FUNCTION: LEGO1 0x10002cf0 // FUNCTION: LEGO1 0x10002cf0
// FUNCTION: BETA10 0x1000f470
virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c
// FUNCTION: LEGO1 0x10002d00 // FUNCTION: LEGO1 0x10002d00
@@ -62,6 +67,7 @@ public:
virtual MxU8 GetActorId() { return m_actorId; } // vtable+0x60 virtual MxU8 GetActorId() { return m_actorId; } // vtable+0x60
// FUNCTION: LEGO1 0x10002d10 // FUNCTION: LEGO1 0x10002d10
// FUNCTION: BETA10 0x1000f4d0
virtual void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } // vtable+0x64 virtual void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } // vtable+0x64
static const char* GetActorName(MxU8 p_id); static const char* GetActorName(MxU8 p_id);
@@ -76,6 +82,7 @@ protected:
}; };
// SYNTHETIC: LEGO1 0x1002d300 // SYNTHETIC: LEGO1 0x1002d300
// SYNTHETIC: BETA10 0x1003d900
// LegoActor::`scalar deleting destructor' // LegoActor::`scalar deleting destructor'
#endif // LEGOACTOR_H #endif // LEGOACTOR_H

View File

@@ -11,12 +11,12 @@ class LegoROI;
struct LegoActorInfo { struct LegoActorInfo {
// SIZE 0x18 // SIZE 0x18
struct Part { struct Part {
MxU8* m_unk0x00; // 0x00 MxU8* m_partNameIndices; // 0x00
const char** m_unk0x04; // 0x04 const char** m_partName; // 0x04
MxU8 m_unk0x08; // 0x08 MxU8 m_partNameIndex; // 0x08
MxU8* m_unk0x0c; // 0x0c MxU8* m_nameIndices; // 0x0c
const char** m_unk0x10; // 0x10 const char** m_names; // 0x10
MxU8 m_unk0x14; // 0x14 MxU8 m_nameIndex; // 0x14
}; };
const char* m_name; // 0x00 const char* m_name; // 0x00
@@ -31,8 +31,8 @@ struct LegoActorInfo {
// SIZE 0x58 // SIZE 0x58
struct LegoActorLOD { struct LegoActorLOD {
enum { enum {
c_flag1 = 0x01, c_useTexture = 0x01,
c_flag2 = 0x02 c_useColor = 0x02
}; };
const char* m_name; // 0x00 const char* m_name; // 0x00

View File

@@ -8,13 +8,13 @@ class LegoAnim;
// SIZE 0x20 // SIZE 0x20
struct LegoAnimActorStruct { struct LegoAnimActorStruct {
LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs); LegoAnimActorStruct(float p_worldSpeed, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs);
~LegoAnimActorStruct(); ~LegoAnimActorStruct();
float GetDuration(); float GetDuration();
// FUNCTION: BETA10 0x1000fb10 // FUNCTION: BETA10 0x1000fb10
float GetUnknown0x00() { return m_unk0x00; } float GetWorldSpeed() { return m_worldSpeed; }
// FUNCTION: BETA10 0x10012210 // FUNCTION: BETA10 0x10012210
LegoAnim* GetAnimTreePtr() { return m_AnimTreePtr; } LegoAnim* GetAnimTreePtr() { return m_AnimTreePtr; }
@@ -23,7 +23,7 @@ struct LegoAnimActorStruct {
LegoROI** GetROIMap() { return m_roiMap; } LegoROI** GetROIMap() { return m_roiMap; }
// TODO: Possibly private // TODO: Possibly private
float m_unk0x00; // 0x00 float m_worldSpeed; // 0x00
LegoAnim* m_AnimTreePtr; // 0x04 LegoAnim* m_AnimTreePtr; // 0x04
LegoROI** m_roiMap; // 0x08 LegoROI** m_roiMap; // 0x08
MxU32 m_numROIs; // 0x0c MxU32 m_numROIs; // 0x0c
@@ -47,9 +47,14 @@ public:
void Animate(float p_time) override; // vtable+0x70 void Animate(float p_time) override; // vtable+0x70
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
virtual MxResult FUN_1001c1f0(float& p_und); virtual MxResult GetTimeInCycle(float& p_timeInCycle);
virtual MxResult FUN_1001c360(float, Matrix4& p_transform); virtual MxResult AnimateWithTransform(float p_time, Matrix4& p_transform);
virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs); virtual MxResult CreateAnimActorStruct(
LegoAnim* p_AnimTreePtr,
float p_worldSpeed,
LegoROI** p_roiMap,
MxU32 p_numROIs
);
virtual void ClearMaps(); virtual void ClearMaps();
// FUNCTION: LEGO1 0x1000fba0 // FUNCTION: LEGO1 0x1000fba0

View File

@@ -16,7 +16,7 @@ class LegoFile;
class LegoPathActor; class LegoPathActor;
class LegoPathBoundary; class LegoPathBoundary;
class LegoROIList; class LegoROIList;
struct LegoUnknown100db7f4; struct LegoOrientedEdge;
class LegoWorld; class LegoWorld;
class MxDSAction; class MxDSAction;
@@ -32,20 +32,20 @@ struct ModelInfo {
// SIZE 0x30 // SIZE 0x30
struct AnimInfo { struct AnimInfo {
char* m_name; // 0x00 char* m_name; // 0x00
MxU32 m_objectId; // 0x04 MxU32 m_objectId; // 0x04
MxS16 m_location; // 0x08 MxS16 m_location; // 0x08
MxBool m_unk0x0a; // 0x0a MxBool m_unk0x0a; // 0x0a
MxU8 m_unk0x0b; // 0x0b MxU8 m_unk0x0b; // 0x0b
MxU8 m_unk0x0c; // 0x0c MxU8 m_unk0x0c; // 0x0c
MxU8 m_unk0x0d; // 0x0d MxU8 m_unk0x0d; // 0x0d
float m_unk0x10[4]; // 0x10 float m_unk0x10[4]; // 0x10
MxU8 m_modelCount; // 0x20 MxU8 m_modelCount; // 0x20
MxU16 m_unk0x22; // 0x22 MxU16 m_unk0x22; // 0x22
ModelInfo* m_models; // 0x24 ModelInfo* m_models; // 0x24
MxS8 m_unk0x28; // 0x28 MxS8 m_characterIndex; // 0x28
MxBool m_unk0x29; // 0x29 MxBool m_unk0x29; // 0x29
MxS8 m_unk0x2a[3]; // 0x2a MxS8 m_unk0x2a[3]; // 0x2a
}; };
// VTABLE: LEGO1 0x100d8d80 // VTABLE: LEGO1 0x100d8d80
@@ -231,7 +231,7 @@ private:
MxBool FUN_100623a0(AnimInfo& p_info); MxBool FUN_100623a0(AnimInfo& p_info);
MxBool ModelExists(AnimInfo& p_info, const char* p_name); MxBool ModelExists(AnimInfo& p_info, const char* p_name);
void FUN_10062580(AnimInfo& p_info); void FUN_10062580(AnimInfo& p_info);
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi); MxBool FUN_10062650(Mx3DPointFloat& p_position, float p_und, LegoROI* p_roi);
MxBool FUN_10062710(AnimInfo& p_info); MxBool FUN_10062710(AnimInfo& p_info);
MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter); MxBool FUN_10062e20(LegoROI* p_roi, LegoAnimPresenter* p_presenter);
void FUN_10063950(LegoROI* p_roi); void FUN_10063950(LegoROI* p_roi);
@@ -240,7 +240,7 @@ private:
void FUN_10063d10(); void FUN_10063d10();
void FUN_10063e40(LegoAnimPresenter* p_presenter); void FUN_10063e40(LegoAnimPresenter* p_presenter);
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world); MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale); MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoOrientedEdge* p_edge, float p_destScale);
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2); MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2);
MxResult FUN_10064380( MxResult FUN_10064380(
const char* p_name, const char* p_name,
@@ -284,7 +284,7 @@ private:
MxLong m_unk0x410; // 0x410 MxLong m_unk0x410; // 0x410
MxU32 m_unk0x414; // 0x414 MxU32 m_unk0x414; // 0x414
MxU32 m_numAllowedExtras; // 0x418 MxU32 m_numAllowedExtras; // 0x418
undefined4 m_unk0x41c; // 0x41c MxU32 m_maxAllowedExtras; // 0x41c
AnimState* m_animState; // 0x420 AnimState* m_animState; // 0x420
LegoROIList* m_unk0x424; // 0x424 LegoROIList* m_unk0x424; // 0x424
MxBool m_suspendedEnableCamAnims; // 0x428 MxBool m_suspendedEnableCamAnims; // 0x428
@@ -303,4 +303,7 @@ private:
// TEMPLATE: LEGO1 0x10061750 // TEMPLATE: LEGO1 0x10061750
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *> // MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
// TEMPLATE: BETA10 0x1004b5d0
// MxListCursor<LegoTranInfo *>::Next
#endif // LEGOANIMATIONMANAGER_H #endif // LEGOANIMATIONMANAGER_H

View File

@@ -90,7 +90,7 @@ private:
MxU8 m_unk0x59; // 0x59 MxU8 m_unk0x59; // 0x59
MxU32 m_animmanId; // 0x5c MxU32 m_animmanId; // 0x5c
LegoTranInfo* m_tranInfo; // 0x60 LegoTranInfo* m_tranInfo; // 0x60
LegoWorld* m_unk0x64; // 0x64 LegoWorld* m_world; // 0x64
MxMatrix* m_unk0x68; // 0x68 MxMatrix* m_unk0x68; // 0x68
LegoROI** m_roiMap; // 0x6c LegoROI** m_roiMap; // 0x6c
MxU32 m_roiMapSize; // 0x70 MxU32 m_roiMapSize; // 0x70

View File

@@ -2,6 +2,7 @@
#define LEGOANIMPRESENTER_H #define LEGOANIMPRESENTER_H
#include "legoroilist.h" #include "legoroilist.h"
#include "legoroimaplist.h"
#include "mxatom.h" #include "mxatom.h"
#include "mxvideopresenter.h" #include "mxvideopresenter.h"
@@ -92,7 +93,11 @@ public:
const char* GetActionObjectName(); const char* GetActionObjectName();
void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; } void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
// FUNCTION: BETA10 0x1005aad0
void SetUnknown0x0cTo1() { m_unk0x9c = 1; } void SetUnknown0x0cTo1() { m_unk0x9c = 1; }
// FUNCTION: BETA10 0x1005ab00
void SetUnknown0xa0(Matrix4* p_unk0xa0) { m_unk0xa0 = p_unk0xa0; } void SetUnknown0xa0(Matrix4* p_unk0xa0) { m_unk0xa0 = p_unk0xa0; }
LegoAnim* GetAnimation() { return m_anim; } LegoAnim* GetAnimation() { return m_anim; }
@@ -103,12 +108,17 @@ protected:
LegoChar* FUN_10069150(const LegoChar* p_und1); LegoChar* FUN_10069150(const LegoChar* p_und1);
void FUN_100692b0(); void FUN_100692b0();
void FUN_100695c0(); void FUN_100695c0();
LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2); LegoChar* GetVariableOrIdentity(const LegoChar* p_varName, const LegoChar* p_prefix);
LegoBool FUN_100698b0(const CompoundObject& p_rois, const LegoChar* p_und2); LegoBool FUN_100698b0(const CompoundObject& p_rois, const LegoChar* p_und2);
LegoROI* FUN_100699e0(const LegoChar* p_und); LegoROI* FindROI(const LegoChar* p_name);
void FUN_10069b10(); void FUN_10069b10();
void FUN_1006a3c0(LegoAnimStructMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi); void UpdateStructMapAndROIIndex(LegoAnimStructMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi);
void FUN_1006a4f0(LegoAnimStructMap& p_map, LegoAnimNodeData* p_data, const LegoChar* p_und, LegoROI* p_roi); void UpdateStructMapAndROIIndexForNode(
LegoAnimStructMap& p_map,
LegoAnimNodeData* p_data,
const LegoChar* p_und,
LegoROI* p_roi
);
void FUN_1006aa60(); void FUN_1006aa60();
void FUN_1006ab70(); void FUN_1006ab70();
LegoBool FUN_1006aba0(); LegoBool FUN_1006aba0();
@@ -116,13 +126,13 @@ protected:
void SubstituteVariables(); void SubstituteVariables();
void FUN_1006b900(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix); void FUN_1006b900(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix);
void FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix); void FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix);
void FUN_1006c8a0(MxBool p_bool); void SetDisabled(MxBool p_disabled);
LegoAnim* m_anim; // 0x64 LegoAnim* m_anim; // 0x64
LegoROI** m_roiMap; // 0x68 LegoROI** m_roiMap; // 0x68
MxU32 m_roiMapSize; // 0x6c MxU32 m_roiMapSize; // 0x6c
LegoROIList* m_unk0x70; // 0x70 LegoROIList* m_sceneROIs; // 0x70
LegoROIList* m_unk0x74; // 0x74 LegoROIList* m_managedActors; // 0x74
Matrix4* m_unk0x78; // 0x78 Matrix4* m_unk0x78; // 0x78
MxU32 m_flags; // 0x7c MxU32 m_flags; // 0x7c
LegoWorld* m_currentWorld; // 0x80 LegoWorld* m_currentWorld; // 0x80
@@ -138,14 +148,191 @@ protected:
MxS16 m_unk0x9c; // 0x9c MxS16 m_unk0x9c; // 0x9c
Matrix4* m_unk0xa0; // 0xa0 Matrix4* m_unk0xa0; // 0xa0
// SYNTHETIC: LEGO1 0x10068650
// LegoAnimPresenter::`scalar deleting destructor'
public: public:
float m_unk0xa4; // 0xa4 float m_unk0xa4; // 0xa4
Mx3DPointFloat m_unk0xa8; // 0xa8 Mx3DPointFloat m_unk0xa8; // 0xa8
}; };
// VTABLE: LEGO1 0x100d4900
// SIZE 0xc0
class LegoLoopingAnimPresenter : public LegoAnimPresenter {
public:
// FUNCTION: BETA10 0x1005c6f0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f0700
return "LegoLoopingAnimPresenter";
}
// FUNCTION: LEGO1 0x1000c9a0
// FUNCTION: BETA10 0x1005c6c0
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1000c9b0
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
}
void StreamingTickle() override; // vtable+0x20
void PutFrame() override; // vtable+0x6c
// SYNTHETIC: LEGO1 0x1006d000
// LegoLoopingAnimPresenter::~LegoLoopingAnimPresenter
// SYNTHETIC: LEGO1 0x1000f440
// LegoLoopingAnimPresenter::`scalar deleting destructor'
private:
undefined4 m_unk0xbc; // 0xbc
};
class LegoAnimActor;
// VTABLE: LEGO1 0x100d9170
// SIZE 0xd8
class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoLocomotionAnimPresenter();
~LegoLocomotionAnimPresenter() override;
// FUNCTION: BETA10 0x1005c4e0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f06e4
return "LegoLocomotionAnimPresenter";
}
// FUNCTION: LEGO1 0x1006ce50
// FUNCTION: BETA10 0x1005c4b0
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1006ce60
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoLoopingAnimPresenter::IsA(p_name);
}
void ReadyTickle() override; // vtable+0x18
void StartingTickle() override; // vtable+0x1c
void StreamingTickle() override; // vtable+0x20
MxResult AddToManager() override; // vtable+0x34
void Destroy() override; // vtable+0x38
void EndAction() override; // vtable+0x40
void PutFrame() override; // vtable+0x6c
MxResult CreateAnim(MxStreamChunk* p_chunk) override; // vtable+0x88
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
void DecrementUnknown0xd4()
{
if (m_unk0xd4) {
--m_unk0xd4;
}
}
undefined2 GetUnknown0xd4() { return m_unk0xd4; }
// SYNTHETIC: LEGO1 0x1006cfe0
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
private:
void Init();
void Destroy(MxBool p_fromDestructor);
undefined4 m_unk0xc0; // 0xc0
undefined4* m_unk0xc4; // 0xc4
LegoROIMapList* m_roiMapList; // 0xc8
MxS32 m_unk0xcc; // 0xcc
MxS32 m_unk0xd0; // 0xd0
undefined2 m_unk0xd4; // 0xd4
};
class LegoPathBoundary;
struct LegoHideAnimStructComparator {
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
};
// SIZE 0x08
struct LegoHideAnimStruct {
LegoPathBoundary* m_boundary; // 0x00
MxU32 m_index; // 0x04
};
typedef map<const char*, LegoHideAnimStruct, LegoHideAnimStructComparator> LegoHideAnimStructMap;
// VTABLE: LEGO1 0x100d9278
// SIZE 0xc4
class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoHideAnimPresenter();
~LegoHideAnimPresenter() override;
// FUNCTION: LEGO1 0x1006d860
void VTable0x8c() override {} // vtable+0x8c
// FUNCTION: LEGO1 0x1006d870
void VTable0x90() override {} // vtable+0x90
// FUNCTION: BETA10 0x1005d4a0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f06cc
return "LegoHideAnimPresenter";
}
// FUNCTION: LEGO1 0x1006d880
// FUNCTION: BETA10 0x1005d470
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1006d890
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
}
void ReadyTickle() override; // vtable+0x18
void StartingTickle() override; // vtable+0x18
MxResult AddToManager() override; // vtable+0x34
void Destroy() override; // vtable+0x38
void EndAction() override; // vtable+0x40
void PutFrame() override; // vtable+0x6c
void FUN_1006db40(LegoTime p_time);
// SYNTHETIC: LEGO1 0x1006d9d0
// LegoHideAnimPresenter::`scalar deleting destructor'
private:
void Init();
void Destroy(MxBool p_fromDestructor);
void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time);
void FUN_1006dc10();
void FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
void FUN_1006e470(
LegoHideAnimStructMap& p_map,
LegoAnimNodeData* p_data,
const char* p_name,
LegoPathBoundary* p_boundary
);
LegoPathBoundary** m_boundaryMap; // 0xc0
};
// clang-format off // clang-format off
// SYNTHETIC: LEGO1 0x10068650
// LegoAnimPresenter::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x100689c0 // TEMPLATE: LEGO1 0x100689c0
// map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> >::~map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> > // map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> >::~map<char const *,char const *,LegoAnimSubstComparator,allocator<char const *> >
@@ -203,6 +390,33 @@ public:
// GLOBAL: LEGO1 0x100f7688 // GLOBAL: LEGO1 0x100f7688
// _Tree<char const *,pair<char const * const,LegoAnimStruct>,map<char const *,LegoAnimStruct,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Kfn,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Nil // _Tree<char const *,pair<char const * const,LegoAnimStruct>,map<char const *,LegoAnimStruct,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Kfn,LegoAnimStructComparator,allocator<LegoAnimStruct> >::_Nil
// TEMPLATE: LEGO1 0x1006ddb0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~_Tree<char const *,pair<ch
// TEMPLATE: LEGO1 0x1006de80
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Inc
// TEMPLATE: LEGO1 0x1006dec0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::erase
// TEMPLATE: LEGO1 0x1006e310
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Erase
// TEMPLATE: LEGO1 0x1006e350
// Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>::~Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>
// TEMPLATE: LEGO1 0x1006e3a0
// map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >
// TEMPLATE: LEGO1 0x1006e6d0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Dec
// TEMPLATE: LEGO1 0x1006e720
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Insert
// GLOBAL: LEGO1 0x100f768c
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Nil
// clang-format on // clang-format on
#endif // LEGOANIMPRESENTER_H #endif // LEGOANIMPRESENTER_H

View File

@@ -26,10 +26,10 @@ struct LegoBuildingInfo {
MxU32 m_sound; // 0x08 MxU32 m_sound; // 0x08
MxU32 m_move; // 0x0c MxU32 m_move; // 0x0c
MxU8 m_mood; // 0x10 MxU8 m_mood; // 0x10
MxS8 m_unk0x11; // 0x11 MxS8 m_counter; // 0x11
MxS8 m_initialUnk0x11; // 0x12 - initial value loaded to m_unk0x11 MxS8 m_initialCounter; // 0x12 - initial value loaded to m_counter
MxU8 m_flags; // 0x13 MxU8 m_flags; // 0x13
float m_unk0x14; // 0x14 float m_adjustedY; // 0x14
const char* m_boundaryName; // 0x18 const char* m_boundaryName; // 0x18
float m_x; // 0x1c float m_x; // 0x1c
float m_y; // 0x20 float m_y; // 0x20
@@ -46,7 +46,7 @@ public:
LegoEntity* m_entity; // 0x00 LegoEntity* m_entity; // 0x00
LegoROI* m_roi; // 0x04 LegoROI* m_roi; // 0x04
MxLong m_time; // 0x08 MxLong m_time; // 0x08
float m_unk0x0c; // 0x0c float m_y; // 0x0c
MxBool m_muted; // 0x10 MxBool m_muted; // 0x10
}; };
@@ -58,7 +58,8 @@ public:
// FUNCTION: LEGO1 0x1002f930 // FUNCTION: LEGO1 0x1002f930
const char* ClassName() const override // vtable+0x0c const char* ClassName() const override // vtable+0x0c
{ {
// not in BETA10 // While this class exists in BETA10, it didn't have a ClassName().
// The constructor suggests that it did not inherit from MxCore back then and did not have a VTABLE.
// STRING: LEGO1 0x100f37d0 // STRING: LEGO1 0x100f37d0
return "LegoBuildingManager"; return "LegoBuildingManager";
} }
@@ -78,17 +79,17 @@ public:
MxBool SwitchMove(LegoEntity* p_entity); MxBool SwitchMove(LegoEntity* p_entity);
MxBool SwitchMood(LegoEntity* p_entity); MxBool SwitchMood(LegoEntity* p_entity);
MxU32 GetAnimationId(LegoEntity* p_entity); MxU32 GetAnimationId(LegoEntity* p_entity);
MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state); MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_basedOnMood);
MxBool FUN_10030000(LegoEntity* p_entity); MxBool DecrementCounter(LegoEntity* p_entity);
MxBool FUN_10030030(MxS32 p_index); MxBool DecrementCounter(MxS32 p_index);
MxBool FUN_10030110(LegoBuildingInfo* p_data); MxBool DecrementCounter(LegoBuildingInfo* p_data);
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28); void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_hideAfterAnimation);
void FUN_10030590(); void ClearCounters();
void AdjustHeight(MxS32 p_index); void AdjustHeight(MxS32 p_index);
MxResult FUN_10030630(); MxResult DetermineBoundaries();
LegoBuildingInfo* GetInfoArray(MxS32& p_length); LegoBuildingInfo* GetInfoArray(MxS32& p_length);
void FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust); void AdjustCounter(LegoEntity* p_entity, MxS32 p_adjust);
void FUN_10030800(); void SetInitialCounters();
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; } static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
@@ -100,13 +101,13 @@ private:
static MxS32 g_maxMove[16]; static MxS32 g_maxMove[16];
static MxU32 g_maxSound; static MxU32 g_maxSound;
MxU8 m_nextVariant; // 0x08 MxU8 m_nextVariant; // 0x08
MxBool m_unk0x09; // 0x09 MxBool m_boundariesDetermined; // 0x09
AnimEntry* m_entries[5]; // 0x0c AnimEntry* m_entries[5]; // 0x0c
MxS8 m_numEntries; // 0x20 MxS8 m_numEntries; // 0x20
LegoCacheSound* m_sound; // 0x24 LegoCacheSound* m_sound; // 0x24
MxBool m_unk0x28; // 0x28 MxBool m_hideAfterAnimation; // 0x28
LegoWorld* m_world; // 0x2c LegoWorld* m_world; // 0x2c
}; };
#endif // LEGOBUILDINGMANAGER_H #endif // LEGOBUILDINGMANAGER_H

View File

@@ -46,10 +46,13 @@ typedef set<LegoCacheSoundEntry, Set100d6b4cComparator> Set100d6b4c;
typedef list<LegoCacheSoundEntry> List100d6b4c; typedef list<LegoCacheSoundEntry> List100d6b4c;
// VTABLE: LEGO1 0x100d6b4c // VTABLE: LEGO1 0x100d6b4c
// VTABLE: BETA10 0x101becac
// SIZE 0x20 // SIZE 0x20
class LegoCacheSoundManager { class LegoCacheSoundManager {
public: public:
// FUNCTION: BETA10 0x100d0a60
LegoCacheSoundManager() {} LegoCacheSoundManager() {}
~LegoCacheSoundManager(); ~LegoCacheSoundManager();
virtual MxResult Tickle(); // vtable+0x00 virtual MxResult Tickle(); // vtable+0x00
@@ -66,6 +69,9 @@ private:
List100d6b4c m_list; // 0x14 List100d6b4c m_list; // 0x14
}; };
// SYNTHETIC: BETA10 0x100d06b0
// LegoCacheSoundManager::`scalar deleting destructor'
// TODO: Function names subject to change. // TODO: Function names subject to change.
// clang-format off // clang-format off

View File

@@ -12,6 +12,7 @@
class LegoCacheSound : public MxCore { class LegoCacheSound : public MxCore {
public: public:
LegoCacheSound(); LegoCacheSound();
LegoCacheSound(LegoCacheSound& p_sound);
~LegoCacheSound() override; // vtable+0x00 ~LegoCacheSound() override; // vtable+0x00
// FUNCTION: LEGO1 0x10006580 // FUNCTION: LEGO1 0x10006580
@@ -48,6 +49,10 @@ public:
void SetDistance(MxS32 p_min, MxS32 p_max); void SetDistance(MxS32 p_min, MxS32 p_max);
void MuteSilence(MxBool p_muted); void MuteSilence(MxBool p_muted);
void MuteStop(MxBool p_mute); void MuteStop(MxBool p_mute);
MxResult GetFrequency(LPDWORD p_freq);
MxResult SetFrequency(DWORD p_freq);
LegoCacheSound& operator=(LegoCacheSound& p_sound);
void CopyFrom(LegoCacheSound& p_sound);
// SYNTHETIC: LEGO1 0x10006610 // SYNTHETIC: LEGO1 0x10006610
// SYNTHETIC: BETA10 0x100675b0 // SYNTHETIC: BETA10 0x100675b0

View File

@@ -2,9 +2,9 @@
#define LEGOCAMERACONTROLLER_H #define LEGOCAMERACONTROLLER_H
#include "legopointofviewcontroller.h" #include "legopointofviewcontroller.h"
#include "mxgeometry.h"
#include "mxgeometry/mxgeometry3d.h" #include "mxgeometry/mxgeometry3d.h"
#include "mxgeometry/mxmatrix.h" #include "mxgeometry/mxmatrix.h"
#include "mxpoint32.h"
// VTABLE: LEGO1 0x100d57b0 // VTABLE: LEGO1 0x100d57b0
// VTABLE: BETA10 0x101bb748 // VTABLE: BETA10 0x101bb748
@@ -38,17 +38,17 @@ public:
virtual MxResult Create(); // vtable+0x44 virtual MxResult Create(); // vtable+0x44
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up); void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
void FUN_10012290(float p_angle); void RotateZ(float p_angle);
void FUN_10012320(float p_angle); void RotateY(float p_angle);
MxResult FUN_100123b0(Matrix4& p_matrix); MxResult GetPointOfView(Matrix4& p_matrix);
void FUN_100123e0(const Matrix4& p_transform, MxU32 p_und); void TransformPointOfView(const Matrix4& p_transform, MxU32 p_multiply);
Mx3DPointFloat GetWorldUp(); Mx3DPointFloat GetWorldUp();
Mx3DPointFloat GetWorldLocation(); Mx3DPointFloat GetWorldLocation();
Mx3DPointFloat GetWorldDirection(); Mx3DPointFloat GetWorldDirection();
private: private:
MxMatrix m_matrix1; // 0x38 MxMatrix m_currentTransform; // 0x38
MxMatrix m_matrix2; // 0x80 MxMatrix m_originalTransform; // 0x80
}; };
// SYNTHETIC: LEGO1 0x10011f50 // SYNTHETIC: LEGO1 0x10011f50

View File

@@ -94,7 +94,7 @@ public:
// FUNCTION: LEGO1 0x10022930 // FUNCTION: LEGO1 0x10022930
// FUNCTION: BETA10 0x10070070 // FUNCTION: BETA10 0x10070070
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x10022940 // FUNCTION: LEGO1 0x10022940
// FUNCTION: BETA10 0x10070090 // FUNCTION: BETA10 0x10070090
@@ -135,15 +135,15 @@ public:
void FUN_10022f00(); void FUN_10022f00();
void FUN_10022f30(); void FUN_10022f30();
void FUN_10023130(MxLong p_x, MxLong p_y); void FUN_10023130(MxLong p_x, MxLong p_y);
void FUN_100236d0(); void AddSelectedPartToBuild();
undefined4 FUN_10024250(LegoEventNotificationParam* p_param); undefined4 FUN_10024250(LegoEventNotificationParam* p_param);
void FUN_100243a0(); void FUN_100243a0();
undefined4 FUN_10024480(MxActionNotificationParam* p_param); undefined4 FUN_10024480(MxActionNotificationParam* p_param);
undefined4 FUN_100244e0(MxLong p_x, MxLong p_y); undefined4 SelectPartFromMousePosition(MxLong p_x, MxLong p_y);
undefined4 FUN_100246e0(MxLong p_x, MxLong p_y); undefined4 FUN_100246e0(MxLong p_x, MxLong p_y);
MxS32 FUN_10024850(MxLong p_x, MxLong p_y); MxS32 FUN_10024850(MxLong p_x, MxLong p_y);
undefined4 FUN_10024890(MxParam* p_param); undefined4 FUN_10024890(MxParam* p_param);
undefined4 FUN_10024c20(LegoEventNotificationParam* p_param); undefined4 FUN_10024c20(MxNotificationParam* p_param);
void FUN_10024ef0(); void FUN_10024ef0();
void FUN_10024f30(); void FUN_10024f30();
void FUN_10024f50(); void FUN_10024f50();
@@ -161,7 +161,7 @@ public:
MxS32 FUN_10025ee0(undefined4 p_param1); MxS32 FUN_10025ee0(undefined4 p_param1);
// FUNCTION: BETA10 0x100735b0 // FUNCTION: BETA10 0x100735b0
void SetUnknown0x258(LegoCarBuildAnimPresenter* p_unk0x258) { m_unk0x258 = p_unk0x258; } void SetCarBuildAnimPresenter(LegoCarBuildAnimPresenter* p_animPresenter) { m_animPresenter = p_animPresenter; }
// SYNTHETIC: LEGO1 0x10022a60 // SYNTHETIC: LEGO1 0x10022a60
// LegoCarBuild::`scalar deleting destructor' // LegoCarBuild::`scalar deleting destructor'
@@ -182,7 +182,7 @@ private:
MxU8 m_unk0x109; // 0x109 MxU8 m_unk0x109; // 0x109
MxU16 m_unk0x10a; // 0x10a MxU16 m_unk0x10a; // 0x10a
DWORD m_unk0x10c; // 0x10c DWORD m_unk0x10c; // 0x10c
LegoROI* m_unk0x110; // 0x110 LegoROI* m_selectedPart; // 0x110
BoundingSphere m_unk0x114; // 0x114 BoundingSphere m_unk0x114; // 0x114
MxMatrix m_unk0x12c; // 0x12c MxMatrix m_unk0x12c; // 0x12c
undefined m_unk0x174; // 0x174 undefined m_unk0x174; // 0x174
@@ -193,17 +193,17 @@ private:
// This is likely a location in pixel space // This is likely a location in pixel space
MxS32 m_unk0x250[2]; // 0x250 MxS32 m_unk0x250[2]; // 0x250
LegoCarBuildAnimPresenter* m_unk0x258; // 0x258 LegoCarBuildAnimPresenter* m_animPresenter; // 0x258
MxQuaternionTransformer m_unk0x25c; // 0x25c MxQuaternionTransformer m_unk0x25c; // 0x25c
// These two are likely locations in pixel space // These two are likely locations in pixel space
MxS32 m_unk0x290[2]; // 0x290 MxS32 m_unk0x290[2]; // 0x290
MxS32 m_unk0x298[2]; // 0x298 MxS32 m_unk0x298[2]; // 0x298
MxFloat m_unk0x2a0; // 0x2a0 MxFloat m_unk0x2a0; // 0x2a0
Mx4DPointFloat m_unk0x2a4; // 0x2a4 Mx4DPointFloat m_unk0x2a4; // 0x2a4
Mx4DPointFloat m_unk0x2bc; // 0x2bc Mx4DPointFloat m_unk0x2bc; // 0x2bc
MxBool m_unk0x2d4; // 0x2d4 MxBool m_selectedPartIsPlaced; // 0x2d4
// variable names verified by BETA10 0x1006b27a // variable names verified by BETA10 0x1006b27a
MxStillPresenter* m_ColorBook_Bitmap; // 0x2dc MxStillPresenter* m_ColorBook_Bitmap; // 0x2dc

View File

@@ -13,11 +13,18 @@ public:
c_bit1 = 0x01 c_bit1 = 0x01
}; };
enum ShelfState {
e_undefined = -1,
e_selected = 0,
e_stopped = 1,
e_moving = 2
};
// SIZE 0x0c // SIZE 0x0c
struct UnknownListEntry { struct CarBuildPart {
// FUNCTION: LEGO1 0x100795c0 // FUNCTION: LEGO1 0x100795c0
// FUNCTION: BETA10 0x10073850 // FUNCTION: BETA10 0x10073850
UnknownListEntry() CarBuildPart()
{ {
m_name = NULL; m_name = NULL;
m_wiredName = NULL; m_wiredName = NULL;
@@ -67,18 +74,18 @@ public:
virtual MxResult Serialize(LegoStorage* p_storage); virtual MxResult Serialize(LegoStorage* p_storage);
void FUN_10079050(MxS16 p_index); void MakePartPlaced(MxS16 p_index);
void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2); void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2);
void FUN_10079160(); void InitBuildPlatform();
void FUN_100795d0(LegoChar* p_param); void HideBuildPartByName(LegoChar* p_param);
void FUN_10079680(LegoChar* p_param); void ShowBuildPartByName(LegoChar* p_param);
LegoAnimNodeData* FindNodeDataByName(LegoTreeNode* p_treeNode, const LegoChar* p_name); LegoAnimNodeData* FindNodeDataByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);
LegoTreeNode* FindNodeByName(LegoTreeNode* p_treeNode, const LegoChar* p_name); LegoTreeNode* FindNodeByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);
void FUN_10079790(const LegoChar* p_name); void AddPartToBuildByName(const LegoChar* p_name);
void RotateAroundYAxis(MxFloat p_angle); void RotateAroundYAxis(MxFloat p_angle);
MxBool FUN_10079c30(const LegoChar* p_name); MxBool IsNextPartToPlace(const LegoChar* p_name);
MxBool PartIsPlaced(const LegoChar* p_name); MxBool PartIsPlaced(const LegoChar* p_name);
void FUN_10079a90(); void MoveShelfForward();
MxBool StringEqualsPlatform(const LegoChar* p_string); MxBool StringEqualsPlatform(const LegoChar* p_string);
MxBool StringEqualsShelf(const LegoChar* p_string); MxBool StringEqualsShelf(const LegoChar* p_string);
MxBool StringEndsOnY(const LegoChar* p_string); MxBool StringEndsOnY(const LegoChar* p_string);
@@ -87,15 +94,15 @@ public:
void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId); void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId);
// FUNCTION: BETA10 0x10070180 // FUNCTION: BETA10 0x10070180
void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; } void SetShelfState(MxU16 p_shelfState) { m_shelfState = p_shelfState; }
// FUNCTION: BETA10 0x100703b0 // FUNCTION: BETA10 0x100703b0
Matrix4& GetUnknown0xe0() { return m_unk0xe0; } Matrix4& GetBuildViewMatrix() { return m_buildViewMatrix; }
MxBool StringEndsOnW(LegoChar* p_param); MxBool StringEndsOnW(LegoChar* p_param);
MxBool StringEndsOnYOrN(const LegoChar* p_string); MxBool StringEndsOnYOrN(const LegoChar* p_string);
const BoundingSphere& FUN_10079e20(); const BoundingSphere& GetTargetBoundingSphere();
// FUNCTION: BETA10 0x100703e0 // FUNCTION: BETA10 0x100703e0
const LegoChar* GetWiredNameOfLastPlacedPart() { return m_parts[m_placedPartCount].m_wiredName; } const LegoChar* GetWiredNameOfLastPlacedPart() { return m_parts[m_placedPartCount].m_wiredName; }
@@ -114,9 +121,9 @@ public:
// LegoCarBuildAnimPresenter::`scalar deleting destructor' // LegoCarBuildAnimPresenter::`scalar deleting destructor'
private: private:
void Beta10Inline0x100733d0(); void UpdateFlashingPartVisibility();
MxU16 m_unk0xbc; // 0xbc MxU16 m_shelfState; // 0xbc
// variable name verified by BETA10 0x1007184f // variable name verified by BETA10 0x1007184f
MxS16 m_numberOfParts; // 0xbe MxS16 m_numberOfParts; // 0xbe
@@ -124,21 +131,21 @@ private:
// name derived from LegoVehicleBuildState, field 0x4f // name derived from LegoVehicleBuildState, field 0x4f
MxS16 m_placedPartCount; // 0xc0 MxS16 m_placedPartCount; // 0xc0
LegoAnimNodeData* m_unk0xc4; // 0xc4 LegoAnimNodeData* m_platformAnimNodeData; // 0xc4
LegoAnim m_unk0xc8; // 0xc8 LegoAnim m_platformAnim; // 0xc8
MxMatrix m_unk0xe0; // 0xe0 MxMatrix m_buildViewMatrix; // 0xe0
// variable name verified by BETA10 0x100719f0 // variable name verified by BETA10 0x100719f0
UnknownListEntry* m_parts; // 0x128 CarBuildPart* m_parts; // 0x128
MxFloat m_unk0x12c; // 0x12c MxFloat m_shelfFrameBuffer; // 0x12c
MxFloat m_unk0x130; // 0x130 MxFloat m_shelfFrame; // 0x130
MxFloat m_unk0x134; // 0x134 MxFloat m_shelfFrameMax; // 0x134
MxFloat m_unk0x138; // 0x138 MxFloat m_shelfFrameInterval; // 0x138
MxULong m_unk0x13c; // 0x13c MxULong m_flashingPartTimeState; // 0x13c
LegoEntity* m_unk0x140; // 0x140 LegoEntity* m_carBuildEntity; // 0x140
MxS32 m_unk0x144; // 0x144 MxS32 m_unk0x144; // 0x144
MxS32 m_unk0x148; // 0x148 MxS32 m_unk0x148; // 0x148
// name verified by BETA10 0x10070d63 // name verified by BETA10 0x10070d63
LegoChar* m_mainSourceId; // 0x14c LegoChar* m_mainSourceId; // 0x14c

View File

@@ -46,6 +46,7 @@ struct LegoActorInfo;
typedef map<char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap; typedef map<char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;
// VTABLE: LEGO1 0x100da878 // VTABLE: LEGO1 0x100da878
// VTABLE: BETA10 0x101bc028
// SIZE 0x24 // SIZE 0x24
class CustomizeAnimFileVariable : public MxVariable { class CustomizeAnimFileVariable : public MxVariable {
public: public:
@@ -76,7 +77,7 @@ public:
void ReleaseActor(const char* p_name); void ReleaseActor(const char* p_name);
void ReleaseActor(LegoROI* p_roi); void ReleaseActor(LegoROI* p_roi);
void ReleaseAutoROI(LegoROI* p_roi); void ReleaseAutoROI(LegoROI* p_roi);
MxBool FUN_100849a0(LegoROI* p_roi, LegoTextureInfo* p_texture); MxBool SetHeadTexture(LegoROI* p_roi, LegoTextureInfo* p_texture);
LegoExtraActor* GetExtraActor(const char* p_name); LegoExtraActor* GetExtraActor(const char* p_name);
LegoActorInfo* GetActorInfo(const char* p_name); LegoActorInfo* GetActorInfo(const char* p_name);
LegoActorInfo* GetActorInfo(LegoROI* p_roi); LegoActorInfo* GetActorInfo(LegoROI* p_roi);
@@ -86,10 +87,10 @@ public:
MxBool SwitchMove(LegoROI* p_roi); MxBool SwitchMove(LegoROI* p_roi);
MxBool SwitchMood(LegoROI* p_roi); MxBool SwitchMood(LegoROI* p_roi);
MxU32 GetAnimationId(LegoROI* p_roi); MxU32 GetAnimationId(LegoROI* p_roi);
MxU32 GetSoundId(LegoROI* p_roi, MxBool p_und); MxU32 GetSoundId(LegoROI* p_roi, MxBool p_basedOnMood);
MxU8 GetMood(LegoROI* p_roi); MxU8 GetMood(LegoROI* p_roi);
LegoROI* CreateAutoROI(const char* p_name, const char* p_lodName, MxBool p_createEntity); LegoROI* CreateAutoROI(const char* p_name, const char* p_lodName, MxBool p_createEntity);
MxResult FUN_10085870(LegoROI* p_roi); MxResult UpdateBoundingSphereAndBox(LegoROI* p_roi);
LegoROI* FUN_10085a80(const char* p_name, const char* p_lodName, MxBool p_createEntity); LegoROI* FUN_10085a80(const char* p_name, const char* p_lodName, MxBool p_createEntity);
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; } static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }

View File

@@ -24,11 +24,11 @@ public:
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; } void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; } void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
void SetUnknown0x28(MxS16 p_unk0x28) { m_unk0x28 = p_unk0x28; } void SetEnabledChild(MxS16 p_enabledChild) { m_enabledChild = p_enabledChild; }
MxS32 m_clickedObjectId; // 0x20 MxS32 m_clickedObjectId; // 0x20
const char* m_clickedAtom; // 0x24 const char* m_clickedAtom; // 0x24
MxS16 m_unk0x28; // 0x28 MxS16 m_enabledChild; // 0x28
}; };
// SYNTHETIC: LEGO1 0x10028bf0 // SYNTHETIC: LEGO1 0x10028bf0
@@ -66,27 +66,33 @@ public:
return !strcmp(p_name, LegoControlManager::ClassName()) || MxCore::IsA(p_name); return !strcmp(p_name, LegoControlManager::ClassName()) || MxCore::IsA(p_name);
} }
void FUN_10028df0(MxPresenterList* p_presenterList); void SetPresenterList(MxPresenterList* p_presenterList);
void Register(MxCore* p_listener); void Register(MxCore* p_listener);
void Unregister(MxCore* p_listener); void Unregister(MxCore* p_listener);
MxBool FUN_10029210(LegoEventNotificationParam& p_param, MxPresenter* p_presenter); MxBool HandleButtonDown(LegoEventNotificationParam& p_param, MxPresenter* p_presenter);
void FUN_100293c0(MxU32 p_objectId, const char* p_atom, MxS16 p_unk0x4e); void UpdateEnabledChild(MxU32 p_objectId, const char* p_atom, MxS16 p_enabledChild);
MxControlPresenter* FUN_100294e0(MxS32 p_x, MxS32 p_y); MxControlPresenter* GetControlAt(MxS32 p_x, MxS32 p_y);
MxBool FUN_10029630(); MxBool HandleButtonDown();
MxBool FUN_10029750(); MxBool HandleButtonUp();
void FUN_100292e0(); void Notify();
undefined4 GetUnknown0x0c() { return m_unk0x0c; } MxU32 HandleUpNextTickle() { return m_handleUpNextTickle; }
undefined GetUnknown0x10() { return m_unk0x10; } MxBool IsSecondButtonDown() { return m_secondButtonDown; }
// SYNTHETIC: LEGO1 0x10028d40 // SYNTHETIC: LEGO1 0x10028d40
// LegoControlManager::`scalar deleting destructor' // LegoControlManager::`scalar deleting destructor'
private: private:
undefined4 m_unk0x08; // 0x08 enum {
undefined4 m_unk0x0c; // 0x0c e_idle = 0,
MxBool m_unk0x10; // 0x10 e_waitNextTickle = 1,
MxPresenter* m_unk0x14; // 0x14 e_tickled = 2,
};
MxU32 m_buttonDownState; // 0x08
MxU32 m_handleUpNextTickle; // 0x0c
MxBool m_secondButtonDown; // 0x10
MxPresenter* m_handledPresenter; // 0x14
LegoControlManagerNotificationParam m_event; // 0x18 LegoControlManagerNotificationParam m_event; // 0x18
MxPresenterList* m_presenterList; // 0x44 MxPresenterList* m_presenterList; // 0x44
LegoNotifyList m_notifyList; // 0x48 LegoNotifyList m_notifyList; // 0x48

View File

@@ -28,7 +28,7 @@ public:
}; };
enum { enum {
c_altBit1 = 0x01 c_disabled = 0x01
}; };
LegoEntity() { Init(); } LegoEntity() { Init(); }
@@ -68,22 +68,22 @@ public:
// FUNCTION: BETA10 0x10013260 // FUNCTION: BETA10 0x10013260
virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30 virtual void SetWorldSpeed(MxFloat p_worldSpeed) { m_worldSpeed = p_worldSpeed; } // vtable+0x30
virtual void ClickSound(MxBool p_und); // vtable+0x34 virtual void ClickSound(MxBool p_basedOnMood); // vtable+0x34
virtual void ClickAnimation(); // vtable+0x38 virtual void ClickAnimation(); // vtable+0x38
virtual void SwitchVariant(); // vtable+0x3c virtual void SwitchVariant(); // vtable+0x3c
virtual void SwitchSound(); // vtable+0x40 virtual void SwitchSound(); // vtable+0x40
virtual void SwitchMove(); // vtable+0x44 virtual void SwitchMove(); // vtable+0x44
virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48 virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48
virtual void SwitchMood(); // vtable+0x4c virtual void SwitchMood(); // vtable+0x4c
void FUN_10010c30(); void TransformPointOfView();
void SetType(MxU8 p_type); void SetType(MxU8 p_type);
void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und); void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_updateCamera);
Mx3DPointFloat GetWorldDirection(); Mx3DPointFloat GetWorldDirection();
Mx3DPointFloat GetWorldUp(); Mx3DPointFloat GetWorldUp();
Mx3DPointFloat GetWorldPosition(); Mx3DPointFloat GetWorldPosition();
MxBool GetUnknown0x10IsSet(MxU8 p_flag) { return m_unk0x10 & p_flag; } MxBool IsInteraction(MxU8 p_flag) { return m_interaction & p_flag; }
MxBool GetFlagsIsSet(MxU8 p_flag) { return m_flags & p_flag; } MxBool GetFlagsIsSet(MxU8 p_flag) { return m_flags & p_flag; }
MxU8 GetFlags() { return m_flags; } MxU8 GetFlags() { return m_flags; }
@@ -101,14 +101,14 @@ public:
void SetFlags(MxU8 p_flags) { m_flags = p_flags; } void SetFlags(MxU8 p_flags) { m_flags = p_flags; }
void SetFlag(MxU8 p_flag) { m_flags |= p_flag; } void SetFlag(MxU8 p_flag) { m_flags |= p_flag; }
void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; } void ClearFlag(MxU8 p_flag) { m_flags &= ~p_flag; }
void SetUnknown0x10Flag(MxU8 p_flag) { m_unk0x10 |= p_flag; } void SetInteractionFlag(MxU8 p_flag) { m_interaction |= p_flag; }
void ClearUnknown0x10Flag(MxU8 p_flag) { m_unk0x10 &= ~p_flag; } void ClearInteractionFlag(MxU8 p_flag) { m_interaction &= ~p_flag; }
protected: protected:
void Init(); void Init();
void SetWorld(); void SetWorld();
MxU8 m_unk0x10; // 0x10 MxU8 m_interaction; // 0x10
MxU8 m_flags; // 0x11 MxU8 m_flags; // 0x11
Mx3DPointFloat m_worldLocation; // 0x14 Mx3DPointFloat m_worldLocation; // 0x14
Mx3DPointFloat m_worldDirection; // 0x28 Mx3DPointFloat m_worldDirection; // 0x28

View File

@@ -23,6 +23,7 @@ struct ColorStringStruct {
}; };
// VTABLE: LEGO1 0x100d74a8 // VTABLE: LEGO1 0x100d74a8
// VTABLE: BETA10 0x101bc4f0
// SIZE 0x30 // SIZE 0x30
class LegoBackgroundColor : public MxVariable { class LegoBackgroundColor : public MxVariable {
public: public:
@@ -43,9 +44,11 @@ private:
}; };
// VTABLE: LEGO1 0x100d74b8 // VTABLE: LEGO1 0x100d74b8
// VTABLE: BETA10 0x101bc500
// SIZE 0x24 // SIZE 0x24
class LegoFullScreenMovie : public MxVariable { class LegoFullScreenMovie : public MxVariable {
public: public:
LegoFullScreenMovie();
LegoFullScreenMovie(const char* p_key, const char* p_value); LegoFullScreenMovie(const char* p_key, const char* p_value);
void SetValue(const char* p_option) override; // vtable+0x04 void SetValue(const char* p_option) override; // vtable+0x04
@@ -67,7 +70,7 @@ public:
e_isle, e_isle,
e_infomain, e_infomain,
e_infodoor, e_infodoor,
e_unk4, e_infocenterExited,
e_elevbott, e_elevbott,
e_elevride, e_elevride,
e_elevride2, e_elevride2,
@@ -80,10 +83,10 @@ public:
e_jetrace, e_jetrace,
e_jetrace2, e_jetrace2,
e_jetraceExterior, e_jetraceExterior,
e_unk17, e_jetskibuildExited,
e_carrace, e_carrace,
e_carraceExterior, e_carraceExterior,
e_unk20, e_racecarbuildExited,
e_unk21, e_unk21,
e_pizzeriaExterior, e_pizzeriaExterior,
e_unk23, e_unk23,
@@ -91,31 +94,31 @@ public:
e_garageExterior, e_garageExterior,
e_garage, e_garage,
e_garadoor, e_garadoor,
e_unk28, e_garageExited,
e_hospitalExterior, e_hospitalExterior,
e_hospital, e_hospital,
e_unk31, e_hospitalExited,
e_policeExterior, e_policeExterior,
e_unk33, e_policeExited,
e_police, e_police,
e_polidoor, e_polidoor,
e_copterbuild, e_copterbuild,
e_dunecarbuild, e_dunecarbuild,
e_jetskibuild, e_jetskibuild,
e_racecarbuild, e_racecarbuild,
e_unk40, e_helicopterSpawn,
e_unk41, e_unk41,
e_unk42, e_unk42,
e_unk43, e_dunebuggySpawn,
e_unk44, e_racecarSpawn,
e_unk45, e_jetskiSpawn,
e_act2main, e_act2main,
e_act3script, e_act3script,
e_unk48, e_unk48,
e_unk49, e_unk49,
e_unk50, e_unk50,
e_unk51, e_unk51,
e_unk52, e_towTrackHookedUp,
e_jukeboxw, e_jukeboxw,
e_jukeboxExterior, e_jukeboxExterior,
e_unk55, e_unk55,
@@ -129,7 +132,7 @@ public:
e_towtrack, e_towtrack,
e_jetski, e_jetski,
e_unk66 = 66 e_vehicleExited = 66
}; };
// SIZE 0x0e // SIZE 0x0e
@@ -150,7 +153,18 @@ public:
MxS16 m_totalScore; // 0x00 MxS16 m_totalScore; // 0x00
MxU8 m_scores[5][5]; // 0x02 MxU8 m_scores[5][5]; // 0x02
Username m_name; // 0x1c Username m_name; // 0x1c
MxS16 m_unk0x2a; // 0x2a MxS16 m_playerId; // 0x2a
ScoreItem& operator=(const ScoreItem& p_other)
{
// MSVC auto-generates an operator=, but LegoGameState::WriteScoreHistory() has a much better match
// with a manual implementation.
m_totalScore = p_other.m_totalScore;
memcpy(m_scores, p_other.m_scores, sizeof(m_scores));
m_name = p_other.m_name;
m_playerId = p_other.m_playerId;
return *this;
}
}; };
// SIZE 0x372 // SIZE 0x372
@@ -158,7 +172,7 @@ public:
History(); History();
void WriteScoreHistory(); void WriteScoreHistory();
MxResult Serialize(LegoStorage* p_storage); MxResult Serialize(LegoStorage* p_storage);
ScoreItem* FUN_1003cc90(Username* p_player, MxS16 p_unk0x24, MxS32& p_unk0x2c); ScoreItem* FindPlayerInScoreHistory(Username* p_player, MxS16 p_playerId, MxS32& p_playerScoreHistoryIndex);
// FUNCTION: BETA10 0x1002c2b0 // FUNCTION: BETA10 0x1002c2b0
MxS16 GetCount() { return m_count; } MxS16 GetCount() { return m_count; }
@@ -167,9 +181,12 @@ public:
// FUNCTION: BETA10 0x1002c540 // FUNCTION: BETA10 0x1002c540
ScoreItem* GetScore(MxS32 p_index) { return p_index >= m_count ? NULL : &m_scores[p_index]; } ScoreItem* GetScore(MxS32 p_index) { return p_index >= m_count ? NULL : &m_scores[p_index]; }
MxS16 m_count; // 0x00 MxS16 m_count; // 0x00
ScoreItem m_scores[20]; // 0x02 #ifdef BETA10
MxS16 m_unk0x372; // 0x372 MxS16 m_indices[20]; // 0x02
#endif
ScoreItem m_scores[20]; // 0x02 (0x22 for BETA10)
MxS16 m_nextPlayerId; // 0x372 (0x392 for BETA10)
}; };
LegoGameState(); LegoGameState();
@@ -209,14 +226,8 @@ public:
Act GetCurrentAct() { return m_currentAct; } Act GetCurrentAct() { return m_currentAct; }
Act GetLoadedAct() { return m_loadedAct; } Act GetLoadedAct() { return m_loadedAct; }
Area GetPreviousArea() { return m_previousArea; }
Area GetUnknown0x42c() { return m_unk0x42c; }
void SetDirty(MxBool p_isDirty) { m_isDirty = p_isDirty; }
void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
Username* GetPlayersIndex(MxS32 p_index) { return &m_players[p_index]; }
MxS16 GetPlayerCount() { return m_playerCount; }
LegoBackgroundColor* GetBackgroundColor() { return m_backgroundColor; } LegoBackgroundColor* GetBackgroundColor() { return m_backgroundColor; }
void SetCurrentAct(Act p_currentAct); void SetCurrentAct(Act p_currentAct);
@@ -228,7 +239,7 @@ private:
MxResult WriteEndOfVariables(LegoStorage* p_storage); MxResult WriteEndOfVariables(LegoStorage* p_storage);
MxS32 ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to); MxS32 ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to);
void SetColors(); void SetColors();
void SetROIHandlerFunction(); void SetROIColorOverride();
char* m_savePath; // 0x00 char* m_savePath; // 0x00
MxS16 m_stateCount; // 0x04 MxS16 m_stateCount; // 0x04
@@ -240,22 +251,19 @@ private:
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
LegoFullScreenMovie* m_fullScreenMovie; // 0x20 LegoFullScreenMovie* m_fullScreenMovie; // 0x20
// TODO: Most likely getters/setters are not used according to BETA for the following members:
public: public:
MxS16 m_unk0x24; // 0x24 MxS16 m_currentPlayerId; // 0x24
MxS16 m_playerCount; // 0x26 MxS16 m_playerCount; // 0x26
Username m_players[9]; // 0x28 Username m_players[9]; // 0x28
History m_history; // 0xa6 History m_history; // 0xa6
undefined2 m_unk0x41a; // 0x41a
JukeboxScript::Script m_jukeboxMusic; // 0x41c JukeboxScript::Script m_jukeboxMusic; // 0x41c
MxBool m_isDirty; // 0x420 MxBool m_isDirty; // 0x420
Area m_currentArea; // 0x424 Area m_currentArea; // 0x424
Area m_previousArea; // 0x428 Area m_previousArea; // 0x428
Area m_unk0x42c; // 0x42c Area m_savedPreviousArea; // 0x42c
}; };
MxBool ROIHandlerFunction(const char* p_input, char* p_output, MxU32 p_copyLen); MxBool ROIColorOverride(const char* p_input, char* p_output, MxU32 p_copyLen);
// SYNTHETIC: LEGO1 0x1003c860 // SYNTHETIC: LEGO1 0x1003c860
// LegoGameState::ScoreItem::ScoreItem // LegoGameState::ScoreItem::ScoreItem

View File

@@ -1,111 +0,0 @@
#ifndef LEGOHIDEANIMPRESENTER_H
#define LEGOHIDEANIMPRESENTER_H
#include "decomp.h"
#include "legoloopinganimpresenter.h"
class LegoPathBoundary;
struct LegoHideAnimStructComparator {
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
};
// SIZE 0x08
struct LegoHideAnimStruct {
LegoPathBoundary* m_boundary; // 0x00
MxU32 m_index; // 0x04
};
typedef map<const char*, LegoHideAnimStruct, LegoHideAnimStructComparator> LegoHideAnimStructMap;
// VTABLE: LEGO1 0x100d9278
// SIZE 0xc4
class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoHideAnimPresenter();
~LegoHideAnimPresenter() override;
// FUNCTION: LEGO1 0x1006d860
void VTable0x8c() override {} // vtable+0x8c
// FUNCTION: LEGO1 0x1006d870
void VTable0x90() override {} // vtable+0x90
// FUNCTION: BETA10 0x1005d4a0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f06cc
return "LegoHideAnimPresenter";
}
// FUNCTION: LEGO1 0x1006d880
// FUNCTION: BETA10 0x1005d470
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1006d890
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
}
void ReadyTickle() override; // vtable+0x18
void StartingTickle() override; // vtable+0x18
MxResult AddToManager() override; // vtable+0x34
void Destroy() override; // vtable+0x38
void EndAction() override; // vtable+0x40
void PutFrame() override; // vtable+0x6c
void FUN_1006db40(LegoTime p_time);
private:
void Init();
void Destroy(MxBool p_fromDestructor);
void FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time);
void FUN_1006dc10();
void FUN_1006e3f0(LegoHideAnimStructMap& p_map, LegoTreeNode* p_node);
void FUN_1006e470(
LegoHideAnimStructMap& p_map,
LegoAnimNodeData* p_data,
const char* p_name,
LegoPathBoundary* p_boundary
);
LegoPathBoundary** m_boundaryMap; // 0xc0
};
// clang-format off
// SYNTHETIC: LEGO1 0x1006d9d0
// LegoHideAnimPresenter::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1006ddb0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~_Tree<char const *,pair<ch
// TEMPLATE: LEGO1 0x1006de80
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Inc
// TEMPLATE: LEGO1 0x1006dec0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::erase
// TEMPLATE: LEGO1 0x1006e310
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Erase
// TEMPLATE: LEGO1 0x1006e350
// Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>::~Map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator>
// TEMPLATE: LEGO1 0x1006e3a0
// map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::~map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >
// TEMPLATE: LEGO1 0x1006e6d0
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::iterator::_Dec
// TEMPLATE: LEGO1 0x1006e720
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Insert
// GLOBAL: LEGO1 0x100f768c
// _Tree<char const *,pair<char const * const,LegoHideAnimStruct>,map<char const *,LegoHideAnimStruct,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Kfn,LegoHideAnimStructComparator,allocator<LegoHideAnimStruct> >::_Nil
// clang-format on
#endif // LEGOHIDEANIMPRESENTER_H

View File

@@ -13,8 +13,8 @@ class LegoCameraController;
class LegoControlManager; class LegoControlManager;
class LegoWorld; class LegoWorld;
extern MxS32 g_unk0x100f31b0; extern MxS32 g_clickedObjectId;
extern const char* g_unk0x100f31b4; extern const char* g_clickedAtom;
// VTABLE: LEGO1 0x100d87b8 // VTABLE: LEGO1 0x100d87b8
// class MxCollection<LegoEventNotificationParam> // class MxCollection<LegoEventNotificationParam>
@@ -74,7 +74,7 @@ public:
c_right = 0x02, c_right = 0x02,
c_up = 0x04, c_up = 0x04,
c_down = 0x08, c_down = 0x08,
c_bit5 = 0x10, c_ctrl = 0x10,
c_leftOrRight = c_left | c_right, c_leftOrRight = c_left | c_right,
c_upOrDown = c_up | c_down c_upOrDown = c_up | c_down
@@ -111,15 +111,15 @@ public:
void SetWorld(LegoWorld* p_world); void SetWorld(LegoWorld* p_world);
void ClearWorld(); void ClearWorld();
void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; }
void SetUnknown335(MxBool p_unk0x335) { m_unk0x335 = p_unk0x335; } void SetUnknown335(MxBool p_unk0x335) { m_unk0x335 = p_unk0x335; }
void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; } void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; }
void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; } void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; }
void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; } void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; }
// FUNCTION: BETA10 0x1002e390
void DisableInputProcessing() void DisableInputProcessing()
{ {
m_unk0x88 = TRUE; m_inputProcessingDisabled = TRUE;
m_unk0x336 = FALSE; m_unk0x336 = FALSE;
} }
@@ -154,7 +154,7 @@ private:
MxBool m_unk0x80; // 0x80 MxBool m_unk0x80; // 0x80
MxBool m_unk0x81; // 0x81 MxBool m_unk0x81; // 0x81
LegoControlManager* m_controlManager; // 0x84 LegoControlManager* m_controlManager; // 0x84
MxBool m_unk0x88; // 0x88 MxBool m_inputProcessingDisabled; // 0x88
IDirectInput* m_directInput; // 0x8c IDirectInput* m_directInput; // 0x8c
IDirectInputDevice* m_directInputDevice; // 0x90 IDirectInputDevice* m_directInputDevice; // 0x90
MxBool m_kbStateSuccess; // 0x94 MxBool m_kbStateSuccess; // 0x94

View File

@@ -1,71 +0,0 @@
#ifndef LEGOLOCOMOTIONANIMPRESENTER_H
#define LEGOLOCOMOTIONANIMPRESENTER_H
#include "legoloopinganimpresenter.h"
#include "legoroimaplist.h"
class LegoAnimActor;
// VTABLE: LEGO1 0x100d9170
// SIZE 0xd8
class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoLocomotionAnimPresenter();
~LegoLocomotionAnimPresenter() override;
// FUNCTION: BETA10 0x1005c4e0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f06e4
return "LegoLocomotionAnimPresenter";
}
// FUNCTION: LEGO1 0x1006ce50
// FUNCTION: BETA10 0x1005c4b0
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1006ce60
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoLoopingAnimPresenter::IsA(p_name);
}
void ReadyTickle() override; // vtable+0x18
void StartingTickle() override; // vtable+0x1c
void StreamingTickle() override; // vtable+0x20
MxResult AddToManager() override; // vtable+0x34
void Destroy() override; // vtable+0x38
void EndAction() override; // vtable+0x40
void PutFrame() override; // vtable+0x6c
MxResult CreateAnim(MxStreamChunk* p_chunk) override; // vtable+0x88
// SYNTHETIC: LEGO1 0x1006cfe0
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
void DecrementUnknown0xd4()
{
if (m_unk0xd4) {
--m_unk0xd4;
}
}
undefined2 GetUnknown0xd4() { return m_unk0xd4; }
private:
void Init();
void Destroy(MxBool p_fromDestructor);
undefined4 m_unk0xc0; // 0xc0
undefined4* m_unk0xc4; // 0xc4
LegoROIMapList* m_roiMapList; // 0xc8
MxS32 m_unk0xcc; // 0xcc
MxS32 m_unk0xd0; // 0xd0
undefined2 m_unk0xd4; // 0xd4
};
#endif // LEGOLOCOMOTIONANIMPRESENTER_H

View File

@@ -1,43 +0,0 @@
#ifndef LEGOLOOPINGANIMPRESENTER_H
#define LEGOLOOPINGANIMPRESENTER_H
#include "legoanimpresenter.h"
// VTABLE: LEGO1 0x100d4900
// SIZE 0xc0
class LegoLoopingAnimPresenter : public LegoAnimPresenter {
public:
// FUNCTION: BETA10 0x1005c6f0
static const char* HandlerClassName()
{
// STRING: LEGO1 0x100f0700
return "LegoLoopingAnimPresenter";
}
// FUNCTION: LEGO1 0x1000c9a0
// FUNCTION: BETA10 0x1005c6c0
const char* ClassName() const override // vtable+0x0c
{
return HandlerClassName();
}
// FUNCTION: LEGO1 0x1000c9b0
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
}
void StreamingTickle() override; // vtable+0x20
void PutFrame() override; // vtable+0x6c
private:
undefined4 m_unk0xbc; // 0xbc
};
// SYNTHETIC: LEGO1 0x1006d000
// LegoLoopingAnimPresenter::~LegoLoopingAnimPresenter
// SYNTHETIC: LEGO1 0x1000f440
// LegoLoopingAnimPresenter::`scalar deleting destructor'
#endif // LEGOLOOPINGANIMPRESENTER_H

View File

@@ -3,7 +3,7 @@
#include "compat.h" #include "compat.h"
#include "mxdsaction.h" #include "mxdsaction.h"
#include "mxomni.h" #include "mxmain.h"
class Isle; class Isle;
class LegoAnimationManager; class LegoAnimationManager;
@@ -90,9 +90,6 @@ public:
return *this; return *this;
} }
World GetId() { return m_id; }
const char* GetKey() { return m_key; }
World m_id; // 0x00 World m_id; // 0x00
char m_key[20]; // 0x04 char m_key[20]; // 0x04
MxAtomId* m_atomId; // 0x18 MxAtomId* m_atomId; // 0x18
@@ -112,6 +109,7 @@ public:
} }
// FUNCTION: LEGO1 0x10058ab0 // FUNCTION: LEGO1 0x10058ab0
// FUNCTION: BETA10 0x1008f860
MxBool IsA(const char* p_name) const override // vtable+0x10 MxBool IsA(const char* p_name) const override // vtable+0x10
{ {
return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name); return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name);
@@ -132,7 +130,7 @@ public:
LegoROI* FindROI(const char* p_name); LegoROI* FindROI(const char* p_name);
void AddWorld(LegoWorld* p_world); void AddWorld(LegoWorld* p_world);
void DeleteWorld(LegoWorld* p_world); void DeleteWorld(LegoWorld* p_world);
void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags); void Disable(MxBool p_disable, MxU16 p_flags);
void CreateBackgroundAudio(); void CreateBackgroundAudio();
void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId); void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId);
MxResult RegisterWorlds(); MxResult RegisterWorlds();
@@ -151,9 +149,14 @@ public:
// FUNCTION: BETA10 0x1009e7a0 // FUNCTION: BETA10 0x1009e7a0
LegoInputManager* GetInputManager() { return m_inputManager; } LegoInputManager* GetInputManager() { return m_inputManager; }
// FUNCTION: BETA10 0x100e5400
LegoTextureContainer* GetTextureContainer() { return m_textureContainer; } LegoTextureContainer* GetTextureContainer() { return m_textureContainer; }
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; } ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
// FUNCTION: BETA10 0x100969b0
LegoWorld* GetCurrentWorld() { return m_currentWorld; } LegoWorld* GetCurrentWorld() { return m_currentWorld; }
LegoNavController* GetNavController() { return m_navController; } LegoNavController* GetNavController() { return m_navController; }
LegoPathActor* GetUserActor() { return m_userActor; } LegoPathActor* GetUserActor() { return m_userActor; }
@@ -183,12 +186,13 @@ public:
// FUNCTION: BETA10 0x100d55c0 // FUNCTION: BETA10 0x100d55c0
void SetExit(MxBool p_exit) { m_exit = p_exit; } void SetExit(MxBool p_exit) { m_exit = p_exit; }
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction) { return m_unk0x13c ? Start(&p_dsAction) : SUCCESS; } MxResult StartActionIfInitialized(MxDSAction& p_dsAction) { return m_initialized ? Start(&p_dsAction) : SUCCESS; }
void SetUnknown13c(MxBool p_unk0x13c) { m_unk0x13c = p_unk0x13c; } void SetInitialized(MxBool p_unk0x13c) { m_initialized = p_unk0x13c; }
void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); } void CloseMainWindow() { PostMessage(m_windowHandle, WM_CLOSE, 0, 0); }
// SYNTHETIC: LEGO1 0x10058b30 // SYNTHETIC: LEGO1 0x10058b30
// SYNTHETIC: BETA10 0x1008f8d0
// LegoOmni::`scalar deleting destructor' // LegoOmni::`scalar deleting destructor'
private: private:
@@ -211,7 +215,7 @@ private:
MxTransitionManager* m_transitionManager; // 0x138 MxTransitionManager* m_transitionManager; // 0x138
public: public:
MxBool m_unk0x13c; // 0x13c MxBool m_initialized; // 0x13c
}; };
#endif // LEGOMAIN_H #endif // LEGOMAIN_H

View File

@@ -1,16 +1,10 @@
#ifndef LEGOMETERPRESENTER_H #ifndef LEGOMETERPRESENTER_H
#define LEGOMETERPRESENTER_H #define LEGOMETERPRESENTER_H
#include "mxrect16.h" #include "mxgeometry.h"
#include "mxstillpresenter.h" #include "mxstillpresenter.h"
#include "mxstring.h" #include "mxstring.h"
// SIZE 0x08
struct MeterRect : public MxRect16 {
// FUNCTION: BETA10 0x10097eb0
MeterRect() {}
};
// VTABLE: LEGO1 0x100d7ac8 // VTABLE: LEGO1 0x100d7ac8
// VTABLE: BETA10 0x101bca68 // VTABLE: BETA10 0x101bca68
// SIZE 0x94 // SIZE 0x94
@@ -35,12 +29,12 @@ private:
void DrawMeter(); void DrawMeter();
MxU8* m_meterPixels; // 0x6c MxU8* m_meterPixels; // 0x6c
MxU16 m_fillColor; // 0x70 MxU16 m_fillColor; // 0x70
MxString m_variable; // 0x74 MxString m_variable; // 0x74
MxFloat m_curPercent; // 0x84 MxFloat m_curPercent; // 0x84
MeterRect m_meterRect; // 0x88 MxRect16 m_meterRect; // 0x88
MxS16 m_layout; // 0x90 MxS16 m_layout; // 0x90
}; };
// SYNTHETIC: LEGO1 0x10043760 // SYNTHETIC: LEGO1 0x10043760

View File

@@ -46,7 +46,7 @@ public:
void ReadyTickle() override; // vtable+0x18 void ReadyTickle() override; // vtable+0x18
void ParseExtra() override; // vtable+0x30 void ParseExtra() override; // vtable+0x30
MxResult FUN_1007ff70(MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, LegoWorld* p_world); MxResult CreateROI(MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, LegoWorld* p_world);
void Reset() void Reset()
{ {

View File

@@ -155,7 +155,7 @@ protected:
float m_unk0x60; // 0x60 float m_unk0x60; // 0x60
float m_unk0x64; // 0x64 float m_unk0x64; // 0x64
float m_unk0x68; // 0x68 float m_unk0x68; // 0x68
MxBool m_unk0x6c; // 0x6c MxBool m_isAccelerating; // 0x6c
// one copy of defaults (these can be set by App.) // one copy of defaults (these can be set by App.)
static int g_defdeadZone; static int g_defdeadZone;

View File

@@ -10,10 +10,10 @@ struct LegoNamedPlane;
class LegoPathBoundary; class LegoPathBoundary;
class LegoPathController; class LegoPathController;
struct LegoPathEdgeContainer; struct LegoPathEdgeContainer;
struct LegoUnknown100db7f4; struct LegoOrientedEdge;
class LegoWEEdge; class LegoWEEdge;
extern MxLong g_unk0x100f3308; extern MxLong g_timeLastHitSoundPlayed;
extern const char* g_strHIT_WALL_SOUND; extern const char* g_strHIT_WALL_SOUND;
// VTABLE: LEGO1 0x100d6e28 // VTABLE: LEGO1 0x100d6e28
@@ -51,9 +51,11 @@ public:
virtual void VTable0x74(Matrix4& p_transform); // vtable+0x74 virtual void VTable0x74(Matrix4& p_transform); // vtable+0x74
// FUNCTION: LEGO1 0x10002d20 // FUNCTION: LEGO1 0x10002d20
// FUNCTION: BETA10 0x1000f500
virtual void SetUserNavFlag(MxBool p_userNavFlag) { m_userNavFlag = p_userNavFlag; } // vtable+0x78 virtual void SetUserNavFlag(MxBool p_userNavFlag) { m_userNavFlag = p_userNavFlag; } // vtable+0x78
// FUNCTION: LEGO1 0x10002d30 // FUNCTION: LEGO1 0x10002d30
// FUNCTION: BETA10 0x1000f530
virtual MxBool GetUserNavFlag() { return m_userNavFlag; } // vtable+0x7c virtual MxBool GetUserNavFlag() { return m_userNavFlag; } // vtable+0x7c
virtual MxResult VTable0x80( virtual MxResult VTable0x80(
@@ -67,7 +69,7 @@ public:
float p_time, float p_time,
Vector3& p_p1, Vector3& p_p1,
Vector3& p_p4, Vector3& p_p4,
LegoUnknown100db7f4& p_destEdge, LegoOrientedEdge* p_destEdge,
float p_destScale float p_destScale
); // vtable+0x84 ); // vtable+0x84
virtual MxResult VTable0x88( virtual MxResult VTable0x88(
@@ -75,49 +77,59 @@ public:
float p_time, float p_time,
LegoEdge& p_srcEdge, LegoEdge& p_srcEdge,
float p_srcScale, float p_srcScale,
LegoUnknown100db7f4& p_destEdge, LegoOrientedEdge& p_destEdge,
float p_destScale float p_destScale
); // vtable+0x88 ); // vtable+0x88
virtual MxS32 VTable0x8c(float p_time, Matrix4& p_transform); // vtable+0x8c virtual MxS32 VTable0x8c(float p_time, Matrix4& p_transform); // vtable+0x8c
// FUNCTION: LEGO1 0x10002d40 // FUNCTION: LEGO1 0x10002d40
// FUNCTION: BETA10 0x1000f560
virtual MxU32 VTable0x90(float, Matrix4&) { return FALSE; } // vtable+0x90 virtual MxU32 VTable0x90(float, Matrix4&) { return FALSE; } // vtable+0x90
// FUNCTION: LEGO1 0x10002d50 // FUNCTION: LEGO1 0x10002d50
// FUNCTION: BETA10 0x1000f800
virtual MxResult HitActor(LegoPathActor*, MxBool) { return 0; } // vtable+0x94 virtual MxResult HitActor(LegoPathActor*, MxBool) { return 0; } // vtable+0x94
virtual void SwitchBoundary( virtual void SwitchBoundary(
LegoPathBoundary*& p_boundary, LegoPathBoundary*& p_boundary,
LegoUnknown100db7f4*& p_edge, LegoOrientedEdge*& p_edge,
float& p_unk0xe4 float& p_unk0xe4
); // vtable+0x98 ); // vtable+0x98
virtual MxResult VTable0x9c(); // vtable+0x9c virtual MxResult VTable0x9c(); // vtable+0x9c
// FUNCTION: LEGO1 0x10002d60 // FUNCTION: LEGO1 0x10002d60
// FUNCTION: BETA10 0x1000f820
virtual MxS32 VTable0xa0() { return 0; } // vtable+0xa0 virtual MxS32 VTable0xa0() { return 0; } // vtable+0xa0
virtual void VTable0xa4(MxBool& p_und1, MxS32& p_und2); // vtable+0xa4 virtual void VTable0xa4(MxBool& p_und1, MxS32& p_und2); // vtable+0xa4
virtual void VTable0xa8(); // vtable+0xa8 virtual void VTable0xa8(); // vtable+0xa8
// FUNCTION: LEGO1 0x10002d70 // FUNCTION: LEGO1 0x10002d70
// FUNCTION: BETA10 0x1000f580
virtual void SetMaxLinearVel(MxFloat p_maxLinearVel) { m_maxLinearVel = p_maxLinearVel; } // vtable+0xac virtual void SetMaxLinearVel(MxFloat p_maxLinearVel) { m_maxLinearVel = p_maxLinearVel; } // vtable+0xac
// FUNCTION: LEGO1 0x10002d80 // FUNCTION: LEGO1 0x10002d80
// FUNCTION: BETA10 0x1000f5b0
virtual MxFloat GetMaxLinearVel() { return m_maxLinearVel; } // vtable+0xb0 virtual MxFloat GetMaxLinearVel() { return m_maxLinearVel; } // vtable+0xb0
// FUNCTION: LEGO1 0x10002d90 // FUNCTION: LEGO1 0x10002d90
// FUNCTION: BETA10 0x1000f5e0
virtual MxFloat VTable0xb4() { return m_unk0x140; } // vtable+0xb4 virtual MxFloat VTable0xb4() { return m_unk0x140; } // vtable+0xb4
// FUNCTION: LEGO1 0x10002da0 // FUNCTION: LEGO1 0x10002da0
// FUNCTION: BETA10 0x1000f610
virtual MxFloat VTable0xb8() { return m_unk0x144; } // vtable+0xb8 virtual MxFloat VTable0xb8() { return m_unk0x144; } // vtable+0xb8
// FUNCTION: LEGO1 0x10002db0 // FUNCTION: LEGO1 0x10002db0
// FUNCTION: BETA10 0x1000f640
virtual void VTable0xbc(MxFloat p_unk0x140) { m_unk0x140 = p_unk0x140; } // vtable+0xbc virtual void VTable0xbc(MxFloat p_unk0x140) { m_unk0x140 = p_unk0x140; } // vtable+0xbc
// FUNCTION: LEGO1 0x10002dc0 // FUNCTION: LEGO1 0x10002dc0
// FUNCTION: BETA10 0x1000f670
virtual void VTable0xc0(MxFloat p_unk0x144) { m_unk0x144 = p_unk0x144; } // vtable+0xc0 virtual void VTable0xc0(MxFloat p_unk0x144) { m_unk0x144 = p_unk0x144; } // vtable+0xc0
// FUNCTION: LEGO1 0x10002dd0 // FUNCTION: LEGO1 0x10002dd0
// FUNCTION: BETA10 0x1000f6a0
virtual void VTable0xc4() {} // vtable+0xc4 virtual void VTable0xc4() {} // vtable+0xc4
// FUNCTION: LEGO1 0x10002de0 // FUNCTION: LEGO1 0x10002de0
@@ -132,6 +144,7 @@ public:
} }
// FUNCTION: LEGO1 0x1000c440 // FUNCTION: LEGO1 0x1000c440
// FUNCTION: BETA10 0x100124c0
MxBool IsA(const char* p_name) const override // vtable+0x10 MxBool IsA(const char* p_name) const override // vtable+0x10
{ {
return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name); return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name);
@@ -161,6 +174,7 @@ public:
void PlaceActor(LegoNamedPlane& p_namedPlane); void PlaceActor(LegoNamedPlane& p_namedPlane);
// SYNTHETIC: LEGO1 0x1002d800 // SYNTHETIC: LEGO1 0x1002d800
// SYNTHETIC: BETA10 0x100b04d0
// LegoPathActor::`scalar deleting destructor' // LegoPathActor::`scalar deleting destructor'
protected: protected:
@@ -182,7 +196,7 @@ protected:
LegoPathBoundary* m_boundary; // 0x88 LegoPathBoundary* m_boundary; // 0x88
LegoUnknown m_unk0x8c; // 0x8c LegoUnknown m_unk0x8c; // 0x8c
MxU32 m_actorState; // 0xdc MxU32 m_actorState; // 0xdc
LegoUnknown100db7f4* m_destEdge; // 0xe0 LegoOrientedEdge* m_destEdge; // 0xe0
MxFloat m_unk0xe4; // 0xe4 MxFloat m_unk0xe4; // 0xe4
MxBool m_collideBox; // 0xe8 MxBool m_collideBox; // 0xe8
MxBool m_unk0xe9; // 0xe9 MxBool m_unk0xe9; // 0xe9

View File

@@ -21,7 +21,7 @@ struct LegoPathActorSetCompare {
}; };
struct LegoAnimPresenterSetCompare { struct LegoAnimPresenterSetCompare {
MxBool operator()(const LegoAnimPresenter* p_lhs, const LegoAnimPresenter* p_rhs) const MxU32 operator()(const LegoAnimPresenter* p_lhs, const LegoAnimPresenter* p_rhs) const
{ {
return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs; return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs;
} }
@@ -31,6 +31,7 @@ typedef set<LegoPathActor*, LegoPathActorSetCompare> LegoPathActorSet;
typedef set<LegoAnimPresenter*, LegoAnimPresenterSetCompare> LegoAnimPresenterSet; typedef set<LegoAnimPresenter*, LegoAnimPresenterSetCompare> LegoAnimPresenterSet;
// VTABLE: LEGO1 0x100d8618 // VTABLE: LEGO1 0x100d8618
// VTABLE: BETA10 0x101bdd58
// SIZE 0x74 // SIZE 0x74
class LegoPathBoundary : public LegoWEGEdge { class LegoPathBoundary : public LegoWEGEdge {
public: public:
@@ -39,22 +40,16 @@ public:
MxResult AddActor(LegoPathActor* p_actor); MxResult AddActor(LegoPathActor* p_actor);
MxResult RemoveActor(LegoPathActor* p_actor); MxResult RemoveActor(LegoPathActor* p_actor);
void FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPathActor* p_actor); void CheckAndCallPathTriggers(Vector3& p_point1, Vector3& p_point2, LegoPathActor* p_actor);
void SwitchBoundary( void SwitchBoundary(
LegoPathActor* p_actor, LegoPathActor* p_actor,
LegoPathBoundary*& p_boundary, LegoPathBoundary*& p_boundary,
LegoUnknown100db7f4*& p_edge, LegoOrientedEdge*& p_edge,
float& p_unk0xe4 float& p_unk0xe4
); );
MxU32 Intersect( MxU32 Intersect(float p_scale, Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, LegoOrientedEdge*& p_edge);
float p_scale, MxU32 AddPresenterIfInRange(LegoAnimPresenter* p_presenter);
Vector3& p_point1, MxU32 RemovePresenter(LegoAnimPresenter* p_presenter);
Vector3& p_point2,
Vector3& p_point3,
LegoUnknown100db7f4*& p_edge
);
MxU32 FUN_10057fe0(LegoAnimPresenter* p_presenter);
MxU32 FUN_100586e0(LegoAnimPresenter* p_presenter);
// FUNCTION: BETA10 0x1001ffb0 // FUNCTION: BETA10 0x1001ffb0
LegoPathActorSet& GetActors() { return m_actors; } LegoPathActorSet& GetActors() { return m_actors; }
@@ -63,6 +58,7 @@ public:
LegoAnimPresenterSet& GetPresenters() { return m_presenters; } LegoAnimPresenterSet& GetPresenters() { return m_presenters; }
// SYNTHETIC: LEGO1 0x10047a80 // SYNTHETIC: LEGO1 0x10047a80
// SYNTHETIC: BETA10 0x100bd300
// LegoPathBoundary::`vector deleting destructor' // LegoPathBoundary::`vector deleting destructor'
private: private:
@@ -81,7 +77,7 @@ private:
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::erase // _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::erase
// TEMPLATE: LEGO1 0x1002c440 // TEMPLATE: LEGO1 0x1002c440
// TEMPLATE: BETA10 0x100b6480 // TEMPLATE: BETA10 0x10020480
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::find // _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::find
// TEMPLATE: LEGO1 0x1002c4c0 // TEMPLATE: LEGO1 0x1002c4c0
@@ -188,7 +184,7 @@ private:
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::lower_bound // _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::lower_bound
// TEMPLATE: BETA10 0x10082b90 // TEMPLATE: BETA10 0x10082b90
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::const_iterator::operator++ // ??Econst_iterator@?$_Tree@PAVLegoAnimPresenter@@PAV1@U_Kfn@?$set@PAVLegoAnimPresenter@@ULegoAnimPresenterSetCompare@@V?$allocator@PAVLegoAnimPresenter@@@@@@ULegoAnimPresenterSetCompare@@V?$allocator@PAVLegoAnimPresenter@@@@@@QAE?AV01@H@Z
// TEMPLATE: BETA10 0x10082ee0 // TEMPLATE: BETA10 0x10082ee0
// set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::end // set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::end
@@ -196,14 +192,20 @@ private:
// TEMPLATE: BETA10 0x10082b40 // TEMPLATE: BETA10 0x10082b40
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::const_iterator::operator* // _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::const_iterator::operator*
// TEMPLATE: BETA10 0x100b6440
// set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::find
// TEMPLATE: BETA10 0x100b6480
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::find
// TEMPLATE: BETA10 0x10021dc0 // TEMPLATE: BETA10 0x10021dc0
// Set<LegoPathActor *,LegoPathActorSetCompare>::Set<LegoPathActor *,LegoPathActorSetCompare> // ??0?$Set@PAVLegoPathActor@@ULegoPathActorSetCompare@@@@QAE@ABV0@@Z
// TEMPLATE: BETA10 0x100202d0 // TEMPLATE: BETA10 0x100202d0
// set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::begin // set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::begin
// TEMPLATE: BETA10 0x10020030 // TEMPLATE: BETA10 0x10020030
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::const_iterator::operator++ // ??Econst_iterator@?$_Tree@PAVLegoPathActor@@PAV1@U_Kfn@?$set@PAVLegoPathActor@@ULegoPathActorSetCompare@@V?$allocator@PAVLegoPathActor@@@@@@ULegoPathActorSetCompare@@V?$allocator@PAVLegoPathActor@@@@@@QAE?AV01@H@Z
// TEMPLATE: BETA10 0x100203d0 // TEMPLATE: BETA10 0x100203d0
// set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::end // set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::end

View File

@@ -2,7 +2,7 @@
#define LEGOPATHCONTROLLER_H #define LEGOPATHCONTROLLER_H
#include "decomp.h" #include "decomp.h"
#include "geom/legounkown100db7f4.h" #include "geom/legoorientededge.h"
#include "legopathactor.h" #include "legopathactor.h"
#include "legopathboundary.h" #include "legopathboundary.h"
#include "legopathstruct.h" #include "legopathstruct.h"
@@ -21,7 +21,7 @@ class Vector3;
// VTABLE: LEGO1 0x100d7da8 // VTABLE: LEGO1 0x100d7da8
// SIZE 0x40 // SIZE 0x40
struct LegoPathCtrlEdge : public LegoUnknown100db7f4 {}; struct LegoPathCtrlEdge : public LegoOrientedEdge {};
struct LegoPathCtrlEdgeCompare { struct LegoPathCtrlEdgeCompare {
MxU32 operator()(const LegoPathCtrlEdge* p_lhs, const LegoPathCtrlEdge* p_rhs) const MxU32 operator()(const LegoPathCtrlEdge* p_lhs, const LegoPathCtrlEdge* p_rhs) const
@@ -60,7 +60,7 @@ public:
} }
LegoPathController* m_controller; // 0x00 LegoPathController* m_controller; // 0x00
LegoUnknown100db7f4* m_edge; // 0x04 LegoOrientedEdge* m_edge; // 0x04
}; };
LegoPathController(); LegoPathController();
@@ -105,7 +105,7 @@ public:
MxResult PlaceActor(LegoPathActor* p_actor); MxResult PlaceActor(LegoPathActor* p_actor);
MxResult RemoveActor(LegoPathActor* p_actor); MxResult RemoveActor(LegoPathActor* p_actor);
void FUN_100468f0(LegoAnimPresenter* p_presenter); void FUN_100468f0(LegoAnimPresenter* p_presenter);
void FUN_10046930(LegoAnimPresenter* p_presenter); void RemovePresenterFromBoundaries(LegoAnimPresenter* p_presenter);
MxResult FUN_10046b30(LegoPathBoundary*& p_boundaries, MxS32& p_numL); MxResult FUN_10046b30(LegoPathBoundary*& p_boundaries, MxS32& p_numL);
LegoPathBoundary* GetPathBoundary(const char* p_name); LegoPathBoundary* GetPathBoundary(const char* p_name);
void Enable(MxBool p_enable); void Enable(MxBool p_enable);
@@ -126,7 +126,7 @@ public:
Vector3& p_v1, Vector3& p_v1,
Vector3& p_v2, Vector3& p_v2,
float p_f1, float p_f1,
LegoUnknown100db7f4*& p_edge, LegoOrientedEdge*& p_edge,
LegoPathBoundary*& p_boundary LegoPathBoundary*& p_boundary
); );
MxResult FUN_1004a380( MxResult FUN_1004a380(
@@ -144,13 +144,13 @@ public:
static MxResult Reset(); static MxResult Reset();
// FUNCTION: BETA10 0x100cf580 // FUNCTION: BETA10 0x100cf580
static LegoUnknown100db7f4* GetControlEdgeA(MxS32 p_index) { return g_ctrlEdgesA[p_index].m_edge; } static LegoOrientedEdge* GetControlEdgeA(MxS32 p_index) { return g_ctrlEdgesA[p_index].m_edge; }
// FUNCTION: BETA10 0x100cf5b0 // FUNCTION: BETA10 0x100cf5b0
static LegoPathBoundary* GetControlBoundaryA(MxS32 p_index) { return g_ctrlBoundariesA[p_index].m_boundary; } static LegoPathBoundary* GetControlBoundaryA(MxS32 p_index) { return g_ctrlBoundariesA[p_index].m_boundary; }
// These two are an educated guess because BETA10 does not have the g_ctrl.*B globals // These two are an educated guess because BETA10 does not have the g_ctrl.*B globals
static LegoUnknown100db7f4* GetControlEdgeB(MxS32 p_index) { return g_ctrlEdgesB[p_index].m_edge; } static LegoOrientedEdge* GetControlEdgeB(MxS32 p_index) { return g_ctrlEdgesB[p_index].m_edge; }
static LegoPathBoundary* GetControlBoundaryB(MxS32 p_index) { return g_ctrlBoundariesB[p_index].m_boundary; } static LegoPathBoundary* GetControlBoundaryB(MxS32 p_index) { return g_ctrlBoundariesB[p_index].m_boundary; }
private: private:
@@ -189,12 +189,12 @@ private:
LegoPathBoundary* m_boundaries; // 0x08 LegoPathBoundary* m_boundaries; // 0x08
LegoPathCtrlEdge* m_edges; // 0x0c LegoPathCtrlEdge* m_edges; // 0x0c
Mx3DPointFloat* m_unk0x10; // 0x10 Mx3DPointFloat* m_nodes; // 0x10
LegoPathStruct* m_structs; // 0x14 LegoPathStruct* m_structs; // 0x14
MxU16 m_numL; // 0x18 MxU16 m_numL; // 0x18 Number of boundaries
MxU16 m_numE; // 0x1a MxU16 m_numE; // 0x1a Number of edges
MxU16 m_numN; // 0x1c MxU16 m_numN; // 0x1c Number of nodes
MxU16 m_numT; // 0x1e MxU16 m_numT; // 0x1e Number of structs
LegoPathCtrlEdgeSet m_pfsE; // 0x20 LegoPathCtrlEdgeSet m_pfsE; // 0x20
LegoPathActorSet m_actors; // 0x30 LegoPathActorSet m_actors; // 0x30
@@ -264,7 +264,7 @@ private:
// LegoPathCtrlEdge::~LegoPathCtrlEdge // LegoPathCtrlEdge::~LegoPathCtrlEdge
// SYNTHETIC: LEGO1 0x10047ae0 // SYNTHETIC: LEGO1 0x10047ae0
// LegoUnknown100db7f4::~LegoUnknown100db7f4 // LegoOrientedEdge::~LegoOrientedEdge
// TEMPLATE: LEGO1 0x10048f00 // TEMPLATE: LEGO1 0x10048f00
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::begin // list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::begin

View File

@@ -10,32 +10,32 @@ class LegoTextureInfo;
// SIZE 0x20 // SIZE 0x20
class LegoPhoneme { class LegoPhoneme {
public: public:
LegoPhoneme(const char* p_name, undefined4 p_unk0x14) LegoPhoneme(const char* p_name, MxU32 p_count)
{ {
m_name = p_name; m_name = p_name;
m_name.ToUpperCase(); m_name.ToUpperCase();
Init(); Init();
m_unk0x14 = p_unk0x14; m_count = p_count;
} }
~LegoPhoneme(); ~LegoPhoneme();
virtual undefined4 VTable0x00(); // vtable+0x00 virtual MxU32 GetCount(); // vtable+0x00
virtual void VTable0x04(undefined4 p_unk0x14); // vtable+0x04 virtual void SetCount(MxU32 p_count); // vtable+0x04
virtual LegoTextureInfo* VTable0x08(); // vtable+0x08 virtual LegoTextureInfo* GetTextureInfo(); // vtable+0x08
virtual void VTable0x0c(LegoTextureInfo* p_unk0x18); // vtable+0x0c virtual void SetTextureInfo(LegoTextureInfo* p_textureInfo); // vtable+0x0c
virtual LegoTextureInfo* VTable0x10(); // vtable+0x10 virtual LegoTextureInfo* GetCachedTextureInfo(); // vtable+0x10
virtual void VTable0x14(LegoTextureInfo* p_unk0x1c); // vtable+0x14 virtual void SetCachedTextureInfo(LegoTextureInfo* p_cachedTextureInfo); // vtable+0x14
virtual void VTable0x18(); // vtable+0x18 virtual void VTable0x18(); // vtable+0x18
virtual void Init(); // vtable+0x1c virtual void Init(); // vtable+0x1c
virtual void VTable0x20(undefined4); // vtable+0x20 virtual void VTable0x20(undefined4); // vtable+0x20
MxString& GetName() { return m_name; } MxString& GetName() { return m_name; }
private: private:
MxString m_name; // 0x04 MxString m_name; // 0x04
undefined4 m_unk0x14; // 0x14 MxU32 m_count; // 0x14
LegoTextureInfo* m_unk0x18; // 0x18 LegoTextureInfo* m_textureInfo; // 0x18
LegoTextureInfo* m_unk0x1c; // 0x1c LegoTextureInfo* m_cachedTextureInfo; // 0x1c
}; };
#endif // LEGOPHONEME_H #endif // LEGOPHONEME_H

View File

@@ -42,9 +42,9 @@ private:
MxS32 m_rectCount; // 0x68 MxS32 m_rectCount; // 0x68
LegoTextureInfo* m_textureInfo; // 0x6c LegoTextureInfo* m_textureInfo; // 0x6c
MxBool m_unk0x70; // 0x70 MxBool m_reusedPhoneme; // 0x70
MxString m_roiName; // 0x74 MxString m_roiName; // 0x74
MxBool m_unk0x84; // 0x84 MxBool m_isPartOfAnimMM; // 0x84
}; };
// TEMPLATE: LEGO1 0x1004eb20 // TEMPLATE: LEGO1 0x1004eb20

View File

@@ -32,7 +32,7 @@ public:
const char* ClassName() const override // vtable+0x0c const char* ClassName() const override // vtable+0x0c
{ {
// While this class exists in BETA10, it didn't have a ClassName(). // While this class exists in BETA10, it didn't have a ClassName().
// I suppose it did not inherit from MxCore back then and likely did not have a VTABLE. // The constructor suggests that it did not inherit from MxCore back then and did not have a VTABLE.
// STRING: LEGO1 0x100f318c // STRING: LEGO1 0x100f318c
return "LegoPlantManager"; return "LegoPlantManager";
} }
@@ -49,14 +49,14 @@ public:
MxBool SwitchMove(LegoEntity* p_entity); MxBool SwitchMove(LegoEntity* p_entity);
MxBool SwitchMood(LegoEntity* p_entity); MxBool SwitchMood(LegoEntity* p_entity);
MxU32 GetAnimationId(LegoEntity* p_entity); MxU32 GetAnimationId(LegoEntity* p_entity);
MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state); MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_basedOnMood);
LegoPlantInfo* GetInfoArray(MxS32& p_length); LegoPlantInfo* GetInfoArray(MxS32& p_length);
LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId); LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId);
MxBool FUN_10026c50(LegoEntity* p_entity); MxBool DecrementCounter(LegoEntity* p_entity);
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length); void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length);
MxResult FUN_10026410(); MxResult DetermineBoundaries();
void FUN_10027120(); void ClearCounters();
void FUN_10027200(); void SetInitialCounters();
static void SetCustomizeAnimFile(const char* p_value); static void SetCustomizeAnimFile(const char* p_value);
@@ -68,20 +68,20 @@ public:
private: private:
void RemovePlant(MxS32 p_index, LegoOmni::World p_worldId); void RemovePlant(MxS32 p_index, LegoOmni::World p_worldId);
void FUN_10026860(MxS32 p_index); void AdjustHeight(MxS32 p_index);
LegoPlantInfo* GetInfo(LegoEntity* p_entity); LegoPlantInfo* GetInfo(LegoEntity* p_entity);
MxBool FUN_10026c80(MxS32 p_index); MxBool DecrementCounter(MxS32 p_index);
void FUN_100271b0(LegoEntity* p_entity, MxS32 p_adjust); void AdjustCounter(LegoEntity* p_entity, MxS32 p_adjust);
static char* g_customizeAnimFile; static char* g_customizeAnimFile;
static MxS32 g_maxMove[4]; static MxS32 g_maxMove[4];
static MxU32 g_maxSound; static MxU32 g_maxSound;
LegoOmni::World m_worldId; // 0x08 LegoOmni::World m_worldId; // 0x08
undefined m_unk0x0c; // 0x0c MxBool m_boundariesDetermined; // 0x0c
AnimEntry* m_entries[5]; // 0x10 AnimEntry* m_entries[5]; // 0x10
MxS8 m_numEntries; // 0x24 MxS8 m_numEntries; // 0x24
LegoWorld* m_world; // 0x28 LegoWorld* m_world; // 0x28
}; };
#endif // LEGOPLANTMANAGER_H #endif // LEGOPLANTMANAGER_H

View File

@@ -41,8 +41,8 @@ struct LegoPlantInfo {
MxU32 m_move; // 0x10 MxU32 m_move; // 0x10
MxU8 m_mood; // 0x14 MxU8 m_mood; // 0x14
MxU8 m_color; // 0x15 - see enum for possible values MxU8 m_color; // 0x15 - see enum for possible values
MxS8 m_unk0x16; // 0x16 MxS8 m_counter; // 0x16
MxS8 m_initialUnk0x16; // 0x17 - initial value loaded to m_unk0x16 MxS8 m_initialCounter; // 0x17 - initial value loaded to m_counter
const char* m_name; // 0x18 const char* m_name; // 0x18
undefined4 m_unk0x1c; // 0x1c undefined4 m_unk0x1c; // 0x1c
float m_x; // 0x20 float m_x; // 0x20

View File

@@ -3,7 +3,7 @@
#include "decomp.h" #include "decomp.h"
#include "mxcore.h" #include "mxcore.h"
#include "mxpoint32.h" #include "mxgeometry.h"
#include <windows.h> #include <windows.h>

View File

@@ -7,11 +7,11 @@
#include "legoracemap.h" #include "legoracemap.h"
#include "legostate.h" #include "legostate.h"
#include "legoworld.h" #include "legoworld.h"
#include "mxrect32.h" #include "mxgeometry.h"
#include "mxtypes.h" #include "mxtypes.h"
class Act1State; class Act1State;
class LegoEventNotificationParam; class LegoControlManagerNotificationParam;
class LegoPathActor; class LegoPathActor;
class MxEndActionNotificationParam; class MxEndActionNotificationParam;
class MxNotificationParam; class MxNotificationParam;
@@ -117,7 +117,7 @@ public:
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual MxLong HandleClick(LegoEventNotificationParam&) = 0; // vtable+0x6c virtual MxLong HandleControl(LegoControlManagerNotificationParam&) = 0; // vtable+0x6c
// FUNCTION: LEGO1 0x10015b70 // FUNCTION: LEGO1 0x10015b70
virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0x70 virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0x70
@@ -153,7 +153,7 @@ public:
} }
// FUNCTION: LEGO1 0x1000dae0 // FUNCTION: LEGO1 0x1000dae0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
void Enable(MxBool p_enable) override; // vtable+0x68 void Enable(MxBool p_enable) override; // vtable+0x68

View File

@@ -72,7 +72,7 @@ public:
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
// FUNCTION: LEGO1 0x100141d0 // FUNCTION: LEGO1 0x100141d0
void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoOrientedEdge*& p_edge, float& p_unk0xe4) override
{ {
LegoJetskiRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4); LegoJetskiRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4);
} // vtable+0x98 } // vtable+0x98
@@ -136,7 +136,7 @@ public:
// FUNCTION: LEGO1 0x10014560 // FUNCTION: LEGO1 0x10014560
// FUNCTION: BETA10 0x100cd660 // FUNCTION: BETA10 0x100cd660
void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoOrientedEdge*& p_edge, float& p_unk0xe4) override
{ {
LegoCarRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4); LegoCarRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4);
} // vtable+0x98 } // vtable+0x98
@@ -144,10 +144,10 @@ public:
MxResult VTable0x9c() override; // vtable+0x9c MxResult VTable0x9c() override; // vtable+0x9c
virtual void SetMaxLinearVelocity(float p_maxLinearVelocity); virtual void SetMaxLinearVelocity(float p_maxLinearVelocity);
virtual void FUN_10012ff0(float p_param); virtual void KickCamera(float p_param);
virtual MxU32 HandleSkeletonKicks(float p_param1); virtual MxU32 HandleSkeletonKicks(float p_param1);
static void FUN_10012de0(); static void InitYouCantStopSound();
static void InitSoundIndices(); static void InitSoundIndices();
// SYNTHETIC: LEGO1 0x10014240 // SYNTHETIC: LEGO1 0x10014240
@@ -155,7 +155,7 @@ public:
private: private:
undefined m_userState; // 0x54 undefined m_userState; // 0x54
float m_unk0x58; // 0x58 float m_kickStart; // 0x58
Mx3DPointFloat m_unk0x5c; // 0x5c Mx3DPointFloat m_unk0x5c; // 0x5c
// Names verified by BETA10 0x100cb4a9 // Names verified by BETA10 0x100cb4a9

View File

@@ -44,8 +44,11 @@ public:
Vector3& p_v3 Vector3& p_v3
) override; // vtable+0x6c ) override; // vtable+0x6c
void Animate(float p_time) override; // vtable+0x70 void Animate(float p_time) override; // vtable+0x70
void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) void SwitchBoundary(
override; // vtable+0x98 LegoPathBoundary*& p_boundary,
LegoOrientedEdge*& p_edge,
float& p_unk0xe4
) override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c MxResult VTable0x9c() override; // vtable+0x9c
// LegoCarRaceActor vtable // LegoCarRaceActor vtable
@@ -83,7 +86,7 @@ public:
protected: protected:
MxFloat m_unk0x08; // 0x08 MxFloat m_unk0x08; // 0x08
MxU8 m_unk0x0c; // 0x0c MxU8 m_animState; // 0x0c
// Could be a multiplier for the maximum speed when going straight // Could be a multiplier for the maximum speed when going straight
MxFloat m_unk0x10; // 0x10 MxFloat m_unk0x10; // 0x10

View File

@@ -17,15 +17,15 @@ public:
void Destroy() override; // vtable+0x18 void Destroy() override; // vtable+0x18
MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x30 MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x30
// SYNTHETIC: LEGO1 0x10029920
// SYNTHETIC: BETA10 0x100d0660
// LegoSoundManager::`scalar deleting destructor'
void UpdateListener(const float* p_position, const float* p_direction, const float* p_up, const float* p_velocity); void UpdateListener(const float* p_position, const float* p_direction, const float* p_up, const float* p_velocity);
// FUNCTION: BETA10 0x1000f350 // FUNCTION: BETA10 0x1000f350
LegoCacheSoundManager* GetCacheSoundManager() { return m_cacheSoundManager; } LegoCacheSoundManager* GetCacheSoundManager() { return m_cacheSoundManager; }
// SYNTHETIC: LEGO1 0x10029920
// SYNTHETIC: BETA10 0x100d0660
// LegoSoundManager::`scalar deleting destructor'
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor); void Destroy(MxBool p_fromDestructor);

View File

@@ -19,7 +19,7 @@ public:
static BOOL SetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo* p_textureInfo); static BOOL SetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo* p_textureInfo);
static BOOL GetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo*& p_textureInfo); static BOOL GetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo*& p_textureInfo);
LegoResult FUN_10066010(const LegoU8* p_bits); LegoResult LoadBits(const LegoU8* p_bits);
// private: // private:
char* m_name; // 0x00 char* m_name; // 0x00

View File

@@ -28,9 +28,11 @@ public:
// class MxPtrListCursor<LegoTranInfo> // class MxPtrListCursor<LegoTranInfo>
// VTABLE: LEGO1 0x100d8d20 // VTABLE: LEGO1 0x100d8d20
// VTABLE: BETA10 0x101bad70
// SIZE 0x10 // SIZE 0x10
class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> { class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
public: public:
// FUNCTION: BETA10 0x100496d0
LegoTranInfoListCursor(LegoTranInfoList* p_list) : MxPtrListCursor<LegoTranInfo>(p_list) {} LegoTranInfoListCursor(LegoTranInfoList* p_list) : MxPtrListCursor<LegoTranInfo>(p_list) {}
}; };
@@ -62,9 +64,14 @@ public:
// MxPtrList<LegoTranInfo>::`scalar deleting destructor' // MxPtrList<LegoTranInfo>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100612f0 // SYNTHETIC: LEGO1 0x100612f0
// SYNTHETIC: BETA10 0x100498c0
// LegoTranInfoListCursor::`scalar deleting destructor' // LegoTranInfoListCursor::`scalar deleting destructor'
// SYNTHETIC: BETA10 0x10049770
// MxPtrListCursor<LegoTranInfo>::MxPtrListCursor<LegoTranInfo>
// FUNCTION: LEGO1 0x10061360 // FUNCTION: LEGO1 0x10061360
// FUNCTION: BETA10 0x10049910
// MxPtrListCursor<LegoTranInfo>::~MxPtrListCursor<LegoTranInfo> // MxPtrListCursor<LegoTranInfo>::~MxPtrListCursor<LegoTranInfo>
// SYNTHETIC: LEGO1 0x100613b0 // SYNTHETIC: LEGO1 0x100613b0
@@ -77,6 +84,7 @@ public:
// MxListCursor<LegoTranInfo *>::~MxListCursor<LegoTranInfo *> // MxListCursor<LegoTranInfo *>::~MxListCursor<LegoTranInfo *>
// FUNCTION: LEGO1 0x100614e0 // FUNCTION: LEGO1 0x100614e0
// FUNCTION: BETA10 0x10049ab0
// LegoTranInfoListCursor::~LegoTranInfoListCursor // LegoTranInfoListCursor::~LegoTranInfoListCursor
#endif // LEGOTRANINFOLIST_H #endif // LEGOTRANINFOLIST_H

View File

@@ -45,28 +45,33 @@ LegoROI* PickROI(MxLong p_x, MxLong p_y);
LegoROI* PickRootROI(MxLong p_x, MxLong p_y); LegoROI* PickRootROI(MxLong p_x, MxLong p_y);
void RotateY(LegoROI* p_roi, MxFloat p_angle); void RotateY(LegoROI* p_roi, MxFloat p_angle);
MxBool SpheresIntersect(const BoundingSphere& p_sphere1, const BoundingSphere& p_sphere2); MxBool SpheresIntersect(const BoundingSphere& p_sphere1, const BoundingSphere& p_sphere2);
MxBool FUN_1003ded0(MxFloat p_param1[2], MxFloat p_param2[3], MxFloat p_param3[3]); MxBool CalculateRayOriginDirection(MxFloat p_coordinates[2], MxFloat p_direction[3], MxFloat p_origin[3]);
MxBool TransformWorldToScreen(const MxFloat p_world[3], MxFloat p_screen[4]); MxBool TransformWorldToScreen(const MxFloat p_world[3], MxFloat p_screen[4]);
MxS16 CountTotalTreeNodes(LegoTreeNode* p_node); MxS16 CountTotalTreeNodes(LegoTreeNode* p_node);
LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index); LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index);
void FUN_1003e050(LegoAnimPresenter* p_presenter); void CalculateViewFromAnimation(LegoAnimPresenter* p_presenter);
Extra::ActionType MatchActionString(const char*); Extra::ActionType MatchActionString(const char*);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender); void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender);
void SetCameraControllerFromIsle(); void SetCameraControllerFromIsle();
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut); void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool); void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool);
void FUN_1003eda0(); void ResetViewVelocity();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id); MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
void EnableAnimations(MxBool p_enable); void EnableAnimations(MxBool p_enable);
void SetAppCursor(Cursor p_cursor); void SetAppCursor(Cursor p_cursor);
MxBool FUN_1003ef60(); MxBool CanExit();
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId); MxBool RemoveFromWorld(
const MxAtomId& p_entityAtom,
MxS32 p_entityId,
const MxAtomId& p_worldAtom,
MxS32 p_worldEntityId
);
MxS32 UpdateLightPosition(MxS32 p_increase); MxS32 UpdateLightPosition(MxS32 p_increase);
void SetLightPosition(MxS32 p_index); void SetLightPosition(MxS32 p_index);
LegoNamedTexture* ReadNamedTexture(LegoStorage* p_storage); LegoNamedTexture* ReadNamedTexture(LegoStorage* p_storage);
void WriteDefaultTexture(LegoStorage* p_storage, const char* p_name); void WriteDefaultTexture(LegoStorage* p_storage, const char* p_name);
void WriteNamedTexture(LegoStorage* p_storage, LegoNamedTexture* p_namedTexture); void WriteNamedTexture(LegoStorage* p_storage, LegoNamedTexture* p_namedTexture);
void FUN_1003f930(LegoNamedTexture* p_namedTexture); void LoadFromNamedTexture(LegoNamedTexture* p_namedTexture);
// FUNCTION: BETA10 0x100260a0 // FUNCTION: BETA10 0x100260a0
inline void StartIsleAction(IsleScript::Script p_objectId) inline void StartIsleAction(IsleScript::Script p_objectId)

View File

@@ -17,41 +17,60 @@ extern const char* g_varVISIBILITY;
extern const char* g_varCAMERALOCATION; extern const char* g_varCAMERALOCATION;
extern const char* g_varCURSOR; extern const char* g_varCURSOR;
extern const char* g_varWHOAMI; extern const char* g_varWHOAMI;
extern const char* g_varDEBUG;
// VTABLE: LEGO1 0x100d86c8 // VTABLE: LEGO1 0x100d86c8
// VTABLE: BETA10 0x101bc980
// SIZE 0x24 // SIZE 0x24
class VisibilityVariable : public MxVariable { class VisibilityVariable : public MxVariable {
public: public:
// FUNCTION: BETA10 0x10093470
VisibilityVariable() { m_key = g_varVISIBILITY; } VisibilityVariable() { m_key = g_varVISIBILITY; }
void SetValue(const char* p_value) override; // vtable+0x04 void SetValue(const char* p_value) override; // vtable+0x04
}; };
// VTABLE: LEGO1 0x100d86b8 // VTABLE: LEGO1 0x100d86b8
// VTABLE: BETA10 0x101bc990
// SIZE 0x24 // SIZE 0x24
class CameraLocationVariable : public MxVariable { class CameraLocationVariable : public MxVariable {
public: public:
// FUNCTION: BETA10 0x10093510
CameraLocationVariable() { m_key = g_varCAMERALOCATION; } CameraLocationVariable() { m_key = g_varCAMERALOCATION; }
void SetValue(const char* p_value) override; // vtable+0x04 void SetValue(const char* p_value) override; // vtable+0x04
}; };
// VTABLE: LEGO1 0x100d86a8 // VTABLE: LEGO1 0x100d86a8
// VTABLE: BETA10 0x101bc9a0
// SIZE 0x24 // SIZE 0x24
class CursorVariable : public MxVariable { class CursorVariable : public MxVariable {
public: public:
// FUNCTION: BETA10 0x100935b0
CursorVariable() { m_key = g_varCURSOR; } CursorVariable() { m_key = g_varCURSOR; }
void SetValue(const char* p_value) override; // vtable+0x04 void SetValue(const char* p_value) override; // vtable+0x04
}; };
// VTABLE: LEGO1 0x100d8698 // VTABLE: LEGO1 0x100d8698
// VTABLE: BETA10 0x101bc9b0
// SIZE 0x24 // SIZE 0x24
class WhoAmIVariable : public MxVariable { class WhoAmIVariable : public MxVariable {
public: public:
// FUNCTION: BETA10 0x10093650
WhoAmIVariable() { m_key = g_varWHOAMI; } WhoAmIVariable() { m_key = g_varWHOAMI; }
void SetValue(const char* p_value) override; // vtable+0x04 void SetValue(const char* p_value) override; // vtable+0x04
}; };
// VTABLE: BETA10 0x101bc9c0
// SIZE 0x24
class DebugVariable : public MxVariable {
public:
// FUNCTION: BETA10 0x100936f0
DebugVariable() { m_key = g_varDEBUG; }
void SetValue(const char* p_value) override; // vtable+0x04
};
#endif // LEGOVARIABLES_H #endif // LEGOVARIABLES_H

View File

@@ -20,6 +20,7 @@ class Renderer;
} }
// VTABLE: LEGO1 0x100d9c88 // VTABLE: LEGO1 0x100d9c88
// VTABLE: BETA10 0x101bef08
// SIZE 0x590 // SIZE 0x590
class LegoVideoManager : public MxVideoManager { class LegoVideoManager : public MxVideoManager {
public: public:
@@ -41,6 +42,7 @@ public:
virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38 virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38
// FUNCTION: LEGO1 0x1007ab10 // FUNCTION: LEGO1 0x1007ab10
// FUNCTION: BETA10 0x100d8010
virtual LegoPhonemeList* GetPhonemeList() { return m_phonemeRefList; } // vtable+0x3c virtual LegoPhonemeList* GetPhonemeList() { return m_phonemeRefList; } // vtable+0x3c
void SetSkyColor(float p_red, float p_green, float p_blue); void SetSkyColor(float p_red, float p_green, float p_blue);
@@ -62,9 +64,15 @@ public:
MxBool GetRender3D() { return m_render3d; } MxBool GetRender3D() { return m_render3d; }
double GetElapsedSeconds() { return m_elapsedSeconds; } double GetElapsedSeconds() { return m_elapsedSeconds; }
// FUNCTION: BETA10 0x1002e290
void SetRender3D(MxBool p_render3d) { m_render3d = p_render3d; } void SetRender3D(MxBool p_render3d) { m_render3d = p_render3d; }
void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; } void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; }
// SYNTHETIC: LEGO1 0x1007ab20
// SYNTHETIC: BETA10 0x100d8040
// LegoVideoManager::`scalar deleting destructor'
private: private:
MxResult CreateDirect3D(); MxResult CreateDirect3D();
MxResult ConfigureD3DRM(); MxResult ConfigureD3DRM();
@@ -120,7 +128,4 @@ private:
DWORD m_bufferCount; // 0x58c DWORD m_bufferCount; // 0x58c
}; };
// SYNTHETIC: LEGO1 0x1007ab20
// LegoVideoManager::`scalar deleting destructor'
#endif // LEGOVIDEOMANAGER_H #endif // LEGOVIDEOMANAGER_H

View File

@@ -47,18 +47,18 @@ public:
LegoWorld(); LegoWorld();
~LegoWorld() override; // vtable+0x00 ~LegoWorld() override; // vtable+0x00
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Tickle() override; // vtable+0x08 MxResult Tickle() override; // vtable+0x08
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
virtual void ReadyWorld(); // vtable+0x50 virtual void ReadyWorld(); // vtable+0x50
virtual LegoCameraController* VTable0x54(); // vtable+0x54 virtual LegoCameraController* InitializeCameraController(); // vtable+0x54
virtual void Add(MxCore* p_object); // vtable+0x58 virtual void Add(MxCore* p_object); // vtable+0x58
// The BETA10 match could also be LegoWorld::Escape(), only the child classes might be able to tell // The BETA10 match could also be LegoWorld::Escape(), only the child classes might be able to tell
// FUNCTION: LEGO1 0x1001d670 // FUNCTION: LEGO1 0x1001d670
// FUNCTION: BETA10 0x10017530 // FUNCTION: BETA10 0x10017530
virtual MxBool VTable0x5c() { return FALSE; } // vtable+0x5c virtual MxBool WaitForTransition() { return FALSE; } // vtable+0x5c
// FUNCTION: LEGO1 0x100010a0 // FUNCTION: LEGO1 0x100010a0
virtual void VTable0x60() {} // vtable+0x60 virtual void VTable0x60() {} // vtable+0x60
@@ -102,8 +102,8 @@ public:
); );
void RemoveActor(LegoPathActor* p_actor); void RemoveActor(LegoPathActor* p_actor);
MxBool ActorExists(LegoPathActor* p_actor); MxBool ActorExists(LegoPathActor* p_actor);
void FUN_1001fda0(LegoAnimPresenter* p_presenter); void AddPresenterIfInRange(LegoAnimPresenter* p_presenter);
void FUN_1001fe90(LegoAnimPresenter* p_presenter); void RemovePresenterFromBoundaries(LegoAnimPresenter* p_presenter);
LegoPathBoundary* FindPathBoundary(const char* p_name); LegoPathBoundary* FindPathBoundary(const char* p_name);
void AddPath(LegoPathController* p_controller); void AddPath(LegoPathController* p_controller);
MxResult GetCurrPathInfo(LegoPathBoundary** p_boundaries, MxS32& p_numL); MxResult GetCurrPathInfo(LegoPathBoundary** p_boundaries, MxS32& p_numL);
@@ -115,7 +115,7 @@ public:
LegoEntityList* GetEntityList() { return m_entityList; } LegoEntityList* GetEntityList() { return m_entityList; }
LegoOmni::World GetWorldId() { return m_worldId; } LegoOmni::World GetWorldId() { return m_worldId; }
MxBool GetUnknown0xd0Empty() { return m_set0xd0.empty(); } MxBool NoDisabledObjects() { return m_disabledObjects.empty(); }
list<LegoROI*>& GetROIList() { return m_roiList; } list<LegoROI*>& GetROIList() { return m_roiList; }
LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnim; } LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnim; }
@@ -125,17 +125,17 @@ public:
// LegoWorld::`scalar deleting destructor' // LegoWorld::`scalar deleting destructor'
protected: protected:
LegoPathControllerList m_list0x68; // 0x68 LegoPathControllerList m_pathControllerList; // 0x68
MxPresenterList m_animPresenters; // 0x80 MxPresenterList m_animPresenters; // 0x80
LegoCameraController* m_cameraController; // 0x98 LegoCameraController* m_cameraController; // 0x98
LegoEntityList* m_entityList; // 0x9c LegoEntityList* m_entityList; // 0x9c
LegoCacheSoundList* m_cacheSoundList; // 0xa0 LegoCacheSoundList* m_cacheSoundList; // 0xa0
MxBool m_destroyed; // 0xa4 MxBool m_destroyed; // 0xa4
MxCoreSet m_set0xa8; // 0xa8 MxCoreSet m_objects; // 0xa8
MxPresenterList m_controlPresenters; // 0xb8 MxPresenterList m_controlPresenters; // 0xb8
MxCoreSet m_set0xd0; // 0xd0 MxCoreSet m_disabledObjects; // 0xd0
list<LegoROI*> m_roiList; // 0xe0 list<LegoROI*> m_roiList; // 0xe0
LegoOmni::World m_worldId; // 0xec LegoOmni::World m_worldId; // 0xec
// name verified by BETA10 0x100c7f59 // name verified by BETA10 0x100c7f59
LegoHideAnimPresenter* m_hideAnim; // 0xf0 LegoHideAnimPresenter* m_hideAnim; // 0xf0

View File

@@ -16,12 +16,15 @@ class LegoWorld;
// class MxPtrList<LegoWorld> // class MxPtrList<LegoWorld>
// VTABLE: LEGO1 0x100d8680 // VTABLE: LEGO1 0x100d8680
// VTABLE: BETA10 0x101bc900
// SIZE 0x18 // SIZE 0x18
class LegoWorldList : public MxPtrList<LegoWorld> { class LegoWorldList : public MxPtrList<LegoWorld> {
public: public:
// FUNCTION: BETA10 0x10092ce0
LegoWorldList(MxBool p_ownership = FALSE) : MxPtrList<LegoWorld>(p_ownership) {} LegoWorldList(MxBool p_ownership = FALSE) : MxPtrList<LegoWorld>(p_ownership) {}
// FUNCTION: LEGO1 0x100598d0 // FUNCTION: LEGO1 0x100598d0
// FUNCTION: BETA10 0x10092d80
MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14
// SYNTHETIC: LEGO1 0x10059a00 // SYNTHETIC: LEGO1 0x10059a00

View File

@@ -50,10 +50,10 @@ public:
// LegoWorldPresenter::`scalar deleting destructor' // LegoWorldPresenter::`scalar deleting destructor'
private: private:
MxResult FUN_10067360(ModelDbPart& p_part, FILE* p_wdbFile); MxResult LoadWorldPart(ModelDbPart& p_part, FILE* p_wdbFile);
MxResult FUN_100674b0(ModelDbModel& p_model, FILE* p_wdbFile, LegoWorld* p_world); MxResult LoadWorldModel(ModelDbModel& p_model, FILE* p_wdbFile, LegoWorld* p_world);
undefined4 m_unk0x50; MxU32 m_nextObjectId;
}; };
#endif // LEGOWORLDPRESENTER_H #endif // LEGOWORLDPRESENTER_H

View File

@@ -48,11 +48,11 @@ LegoPlantManager* PlantManager();
LegoBuildingManager* BuildingManager(); LegoBuildingManager* BuildingManager();
LegoTextureContainer* TextureContainer(); LegoTextureContainer* TextureContainer();
ViewLODListManager* GetViewLODListManager(); ViewLODListManager* GetViewLODListManager();
void FUN_10015820(MxBool p_disable, MxU16 p_flags); void Disable(MxBool p_disable, MxU16 p_flags);
LegoROI* FindROI(const char* p_name); LegoROI* FindROI(const char* p_name);
void SetROIVisible(const char* p_name, MxBool p_visible); void SetROIVisible(const char* p_name, MxBool p_visible);
void SetUserActor(LegoPathActor* p_userActor); void SetUserActor(LegoPathActor* p_userActor);
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction); MxResult StartActionIfInitialized(MxDSAction& p_dsAction);
void DeleteAction(); void DeleteAction();
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid); LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
MxDSAction& GetCurrentAction(); MxDSAction& GetCurrentAction();

View File

@@ -37,20 +37,21 @@ public:
void StartAction(MxParam& p_param); void StartAction(MxParam& p_param);
void StopAction(MxParam& p_param); void StopAction(MxParam& p_param);
MxResult PlayMusic(MxDSAction& p_action, undefined4 p_speed, MxPresenter::TickleState p_tickleState); MxResult PlayMusic(MxDSAction& p_action, MxS32 p_speed, MxPresenter::TickleState p_tickleState);
void FUN_1007ee70(); void MakePendingPresenterActive();
void FUN_1007ef40(); void FadeInPendingPresenter();
void FadeInOrFadeOut(); void FadeToTargetVolume();
void Enable(MxBool p_enable); void Enable(MxBool p_enable);
virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS); virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS);
void Init(); void Init();
void Update(MxS32 p_targetVolume, MxS32 p_speed, MxPresenter::TickleState p_tickleState);
void Stop(); void Stop();
void LowerVolume(); void LowerVolume();
void RaiseVolume(); void RaiseVolume();
undefined4 FUN_1007f610(MxPresenter* p_unk0x138, MxS32 p_speed, MxPresenter::TickleState p_tickleState); MxResult SetPendingPresenter(MxPresenter* p_presenter, MxS32 p_speed, MxPresenter::TickleState p_tickleState);
// SYNTHETIC: LEGO1 0x1007ec00 // SYNTHETIC: LEGO1 0x1007ec00
// MxBackgroundAudioManager::`scalar deleting destructor' // MxBackgroundAudioManager::`scalar deleting destructor'
@@ -59,11 +60,11 @@ private:
MxResult OpenMusic(MxAtomId& p_script); MxResult OpenMusic(MxAtomId& p_script);
void DestroyMusic(); void DestroyMusic();
MxBool m_enabled; // 0x08 MxBool m_enabled; // 0x08
MxDSAction m_action1; // 0x0c MxDSAction m_action1; // 0x0c
MxAudioPresenter* m_unk0xa0; // 0xa0 MxAudioPresenter* m_activePresenter; // 0xa0
MxDSAction m_action2; // 0xa4 MxDSAction m_action2; // 0xa4
MxAudioPresenter* m_unk0x138; // 0x138 MxAudioPresenter* m_pendingPresenter; // 0x138
// name is inferred from context // name is inferred from context
MxPresenter::TickleState m_tickleState; // 0x13c MxPresenter::TickleState m_tickleState; // 0x13c
@@ -71,9 +72,9 @@ private:
// name inferred from parameter p_speed // name inferred from parameter p_speed
MxS32 m_speed; // 0x140 MxS32 m_speed; // 0x140
MxS32 m_targetVolume; // 0x144 MxS32 m_targetVolume; // 0x144
MxS16 m_unk0x148; // 0x148 MxS16 m_volumeSuppressionAmount; // 0x148
MxAtomId m_script; // 0x14c MxAtomId m_script; // 0x14c
}; };
#endif // MXBACKGROUNDAUDIOMANAGER_H #endif // MXBACKGROUNDAUDIOMANAGER_H

View File

@@ -5,7 +5,6 @@
#include "mxcompositepresenter.h" #include "mxcompositepresenter.h"
class LegoControlManagerNotificationParam; class LegoControlManagerNotificationParam;
class MxVideoPresenter;
// VTABLE: LEGO1 0x100d7b88 // VTABLE: LEGO1 0x100d7b88
// VTABLE: BETA10 0x101bf5d0 // VTABLE: BETA10 0x101bf5d0
@@ -45,21 +44,28 @@ public:
void EndAction() override; // vtable+0x40 void EndAction() override; // vtable+0x40
MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48 MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48
void Enable(MxBool p_enable) override; // vtable+0x54 void Enable(MxBool p_enable) override; // vtable+0x54
virtual void VTable0x6c(MxS16 p_unk0x4e); // vtable+0x6c virtual void UpdateEnabledChild(MxS16 p_enabledChild); // vtable+0x6c
MxBool FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter); MxBool Notify(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter);
MxBool FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter* p_presenter); MxBool CheckButtonDown(MxS32 p_x, MxS32 p_y, MxPresenter* p_presenter);
MxS16 GetUnknown0x4e() { return m_unk0x4e; } MxS16 GetEnabledChild() { return m_enabledChild; }
private: private:
undefined2 m_unk0x4c; // 0x4c enum {
MxS16 m_unk0x4e; // 0x4e e_none,
MxBool m_unk0x50; // 0x50 e_toggle,
undefined2 m_unk0x52; // 0x52 e_grid,
undefined2 m_unk0x54; // 0x54 e_map,
undefined2 m_unk0x56; // 0x56 };
MxS16* m_unk0x58; // 0x58
MxS16 m_style; // 0x4c
MxS16 m_enabledChild; // 0x4e
MxBool m_unk0x50; // 0x50
MxS16 m_columnsOrRows; // 0x52
MxS16 m_rowsOrColumns; // 0x54
MxS16 m_stateOrCellIndex; // 0x56
MxS16* m_states; // 0x58
}; };
// SYNTHETIC: LEGO1 0x100440f0 // SYNTHETIC: LEGO1 0x100440f0

View File

@@ -37,7 +37,7 @@ public:
m_unk0x08 = 1; m_unk0x08 = 1;
m_finishTimes = p_finishTimes; m_finishTimes = p_finishTimes;
m_startTime = INT_MIN; m_startTime = INT_MIN;
m_unk0x14 = 1; m_counter = 1;
m_score = LegoState::e_grey; m_score = LegoState::e_grey;
m_hiScore = LegoState::e_grey; m_hiScore = LegoState::e_grey;
m_actions = p_actions; m_actions = p_actions;
@@ -52,7 +52,7 @@ public:
m_unk0x08 = p_mission.m_unk0x08; m_unk0x08 = p_mission.m_unk0x08;
m_finishTimes = p_mission.m_finishTimes; m_finishTimes = p_mission.m_finishTimes;
m_startTime = p_mission.m_startTime; m_startTime = p_mission.m_startTime;
m_unk0x14 = p_mission.m_unk0x14; m_counter = p_mission.m_counter;
m_score = p_mission.m_score; m_score = p_mission.m_score;
m_hiScore = p_mission.m_hiScore; m_hiScore = p_mission.m_hiScore;
m_actions = p_mission.m_actions; m_actions = p_mission.m_actions;
@@ -100,12 +100,24 @@ public:
undefined m_unk0x08; // 0x08 undefined m_unk0x08; // 0x08
MxLong* m_finishTimes; // 0x0c MxLong* m_finishTimes; // 0x0c
MxLong m_startTime; // 0x10 MxLong m_startTime; // 0x10
MxS16 m_unk0x14; // 0x14 MxS16 m_counter; // 0x14
MxS16 m_score; // 0x16 MxS16 m_score; // 0x16
MxS16 m_hiScore; // 0x18 MxS16 m_hiScore; // 0x18
IsleScript::Script* m_actions; // 0x1c IsleScript::Script* m_actions; // 0x1c
}; };
enum {
e_none = 0,
e_introduction = 1,
e_waitAcceptingQuest = 2,
e_started = 3,
e_delivering = 4,
e_arrivedAtDestination = 5,
e_suggestHelicopter = 6,
e_transitionToAct2 = 8,
e_timeoutAcceptingQuest = 9,
};
PizzaMissionState(); PizzaMissionState();
// FUNCTION: LEGO1 0x10039290 // FUNCTION: LEGO1 0x10039290
@@ -125,10 +137,10 @@ public:
MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c
// FUNCTION: BETA10 0x100ef470 // FUNCTION: BETA10 0x100ef470
void SetUnknown0xb0(MxU32 p_unk0xb0) { m_unk0xb0 = p_unk0xb0; } void SetPlayedAction(MxU32 p_playedAction) { m_playedAction = p_playedAction; }
// FUNCTION: BETA10 0x100ef850 // FUNCTION: BETA10 0x100ef850
MxU32 GetUnknown0xb0() { return m_unk0xb0; } MxU32 GetPlayedAction() { return m_playedAction; }
// FUNCTION: BETA10 0x10088850 // FUNCTION: BETA10 0x10088850
MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; } MxS16 GetHighScore(MxU8 p_actorId) { return GetMission(p_actorId)->m_hiScore; }
@@ -137,12 +149,12 @@ public:
// PizzaMissionState::`scalar deleting destructor' // PizzaMissionState::`scalar deleting destructor'
Mission* GetMission(MxU8 p_actorId); Mission* GetMission(MxU8 p_actorId);
MxS16 FUN_10039540(); MxS16 GetActorState();
PizzeriaState* m_pizzeriaState; // 0x08 PizzeriaState* m_pizzeriaState; // 0x08
undefined4 m_unk0x0c; // 0x0c MxU32 m_state; // 0x0c
Mission m_missions[5]; // 0x10 Mission m_missions[5]; // 0x10
MxU32 m_unk0xb0; // 0xb0 MxU32 m_playedAction; // 0xb0
static IsleScript::Script g_pepperActions[]; static IsleScript::Script g_pepperActions[];
static IsleScript::Script g_mamaActions[]; static IsleScript::Script g_mamaActions[];
@@ -187,8 +199,8 @@ public:
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80 MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0x80
void CreateState(); void CreateState();
void FUN_10038220(IsleScript::Script p_objectId); void Start(IsleScript::Script p_objectId);
void FUN_100382b0(); void Reset();
void StopActions(); void StopActions();
void PlayAction(MxU32 p_objectId, MxBool p_param7); void PlayAction(MxU32 p_objectId, MxBool p_param7);
@@ -202,10 +214,10 @@ private:
PizzaMissionState::Mission* m_mission; // 0x80 PizzaMissionState::Mission* m_mission; // 0x80
SkateBoard* m_skateBoard; // 0x84 SkateBoard* m_skateBoard; // 0x84
Act1State* m_act1state; // 0x88 Act1State* m_act1state; // 0x88
IsleScript::Script m_unk0x8c; // 0x8c IsleScript::Script m_speechAction; // 0x8c
MxLong m_unk0x90; // 0x90 MxLong m_startTime; // 0x90
MxLong m_unk0x94; // 0x94 MxLong m_duration; // 0x94
MxBool m_unk0x98; // 0x98 MxBool m_playedLocationAnimation; // 0x98
}; };
#endif // PIZZA_H #endif // PIZZA_H

View File

@@ -34,11 +34,11 @@ public:
// SYNTHETIC: LEGO1 0x10017ce0 // SYNTHETIC: LEGO1 0x10017ce0
// PizzeriaState::`scalar deleting destructor' // PizzeriaState::`scalar deleting destructor'
MxS16 FUN_10017d50(); MxS16 GetActorState();
MxU32 NextAction(); MxU32 NextAction();
Playlist m_unk0x08[5]; // 0x08 Playlist m_playerPlaylists[5]; // 0x08
MxS32 m_unk0x44[5]; // 0x44 MxS32 m_states[5]; // 0x44
static IsleScript::Script g_pepperActions[]; static IsleScript::Script g_pepperActions[];
static IsleScript::Script g_mamaActions[]; static IsleScript::Script g_mamaActions[];

View File

@@ -16,6 +16,11 @@ class MxDSAction;
// SIZE 0x10 // SIZE 0x10
class PoliceState : public LegoState { class PoliceState : public LegoState {
public: public:
enum {
e_noAnimation = 0,
e_playingAnimation = 1,
};
PoliceState(); PoliceState();
~PoliceState() override {} ~PoliceState() override {}
@@ -38,15 +43,15 @@ public:
// SYNTHETIC: LEGO1 0x1005e920 // SYNTHETIC: LEGO1 0x1005e920
// PoliceState::`scalar deleting destructor' // PoliceState::`scalar deleting destructor'
undefined4 GetUnknown0x0c() { return m_unk0x0c; } MxS32 GetState() { return m_state; }
void SetUnknown0x0c(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; } void SetState(MxS32 p_state) { m_state = p_state; }
void FUN_1005ea40(); void StartAnimation();
// TODO: Most likely getters/setters are not used according to BETA. // TODO: Most likely getters/setters are not used according to BETA.
PoliceScript::Script m_policeScript; // 0x08 PoliceScript::Script m_policeScript; // 0x08
undefined4 m_unk0x0c; // 0x0c MxS32 m_state; // 0x0c
}; };
// VTABLE: LEGO1 0x100d8a80 // VTABLE: LEGO1 0x100d8a80
@@ -60,7 +65,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x1005e1d0 // FUNCTION: LEGO1 0x1005e1d0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x1005e1e0 // FUNCTION: LEGO1 0x1005e1e0
// FUNCTION: BETA10 0x100f0c50 // FUNCTION: BETA10 0x100f0c50

View File

@@ -15,7 +15,7 @@ public:
void ParseAction(char* p_extra) override; // vtable+0x20 void ParseAction(char* p_extra) override; // vtable+0x20
MxResult FUN_1001c360(float p_und, Matrix4& p_transform) override; MxResult AnimateWithTransform(float p_time, Matrix4& p_transform) override;
virtual void FUN_10071c80(Vector3& p_vec); virtual void FUN_10071c80(Vector3& p_vec);

View File

@@ -39,14 +39,14 @@ public:
void SetActive(MxBool p_active) { m_active = p_active; } void SetActive(MxBool p_active) { m_active = p_active; }
undefined4 FUN_1002d090(); MxU32 NextPlaylistObjectId();
MxBool FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId); MxBool IsRadioObjectId(const MxAtomId& p_atom, MxU32 p_objectId);
// TODO: Most likely getters/setters are not used according to BETA. // TODO: Most likely getters/setters are not used according to BETA.
Playlist m_unk0x08[3]; // 0x08 Playlist m_playlists[3]; // 0x08
MxS16 m_unk0x2c; // 0x2c MxS16 m_activePlaylist; // 0x2c
MxBool m_active; // 0x2e MxBool m_active; // 0x2e
}; };
// VTABLE: LEGO1 0x100d6d10 // VTABLE: LEGO1 0x100d6d10
@@ -85,7 +85,7 @@ public:
private: private:
RadioState* m_state; // 0x08 RadioState* m_state; // 0x08
MxBool m_unk0x0c; // 0x0c MxBool m_enabled; // 0x0c
MxBool m_audioEnabled; // 0x0d MxBool m_audioEnabled; // 0x0d
MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleEndAction(MxEndActionNotificationParam& p_param);

View File

@@ -54,12 +54,12 @@ private:
struct { struct {
MxS16 m_letters[7]; // 0x00 MxS16 m_letters[7]; // 0x00
MxS16 m_cursorPos; // 0x0e MxS16 m_cursorPos; // 0x0e
} m_unk0x280; // 0x280 } m_newName; // 0x280
MxControlPresenter* m_checkmark[10]; // 0x290 MxControlPresenter* m_checkmark[10]; // 0x290
undefined2 m_unk0x2b8; // 0x2b8 undefined2 m_vehiclesToPosition; // 0x2b8
InfocenterState* m_infocenterState; // 0x2bc InfocenterState* m_infocenterState; // 0x2bc
undefined m_unk0x2c0; // 0x2c0 undefined m_unk0x2c0; // 0x2c0
undefined m_unk0x2c1; // 0x2c1 undefined m_awaitLoad; // 0x2c1
undefined m_unk0x2c2[0x02]; // 0x2c2 undefined m_unk0x2c2[0x02]; // 0x2c2
LPDIRECTDRAWSURFACE m_checkboxHilite; // 0x2c4 LPDIRECTDRAWSURFACE m_checkboxHilite; // 0x2c4
LPDIRECTDRAWSURFACE m_checkboxSurface; // 0x2c8 LPDIRECTDRAWSURFACE m_checkboxSurface; // 0x2c8
@@ -69,9 +69,9 @@ private:
MxLong HandleKeyPress(MxU8 p_key); MxLong HandleKeyPress(MxU8 p_key);
MxLong HandleControl(LegoControlManagerNotificationParam& p_param); MxLong HandleControl(LegoControlManagerNotificationParam& p_param);
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param); MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
void FUN_100775c0(MxS16 p_playerIndex); void LoadSave(MxS16 p_checkMarkIndex);
void WriteInfocenterLetters(MxS16); void WriteInfocenterLetters(MxS16);
void FUN_100778c0(); void LoadVehicles();
MxBool CreateSurface(); MxBool CreateSurface();
}; };

View File

@@ -60,7 +60,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04 MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x100010b0 // FUNCTION: LEGO1 0x100010b0
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c MxBool WaitForTransition() override { return TRUE; } // vtable+0x5c
// FUNCTION: LEGO1 0x100010c0 // FUNCTION: LEGO1 0x100010c0
// FUNCTION: BETA10 0x100f4f20 // FUNCTION: BETA10 0x100f4f20

View File

@@ -12,6 +12,13 @@ class MxEndActionNotificationParam;
// SIZE 0x28 // SIZE 0x28
class TowTrackMissionState : public LegoState { class TowTrackMissionState : public LegoState {
public: public:
enum {
e_none = 0,
e_started = 1,
e_hookedUp = 2,
e_hookingUp = 3,
};
TowTrackMissionState(); TowTrackMissionState();
// FUNCTION: LEGO1 0x1004dde0 // FUNCTION: LEGO1 0x1004dde0
@@ -126,19 +133,19 @@ public:
// SYNTHETIC: LEGO1 0x1004e060 // SYNTHETIC: LEGO1 0x1004e060
// TowTrackMissionState::`scalar deleting destructor' // TowTrackMissionState::`scalar deleting destructor'
undefined4 m_unk0x08; // 0x08 MxU32 m_state; // 0x08
MxLong m_startTime; // 0x0c MxLong m_startTime; // 0x0c
MxBool m_unk0x10; // 0x10 MxBool m_takingTooLong; // 0x10
MxS16 m_peScore; // 0x12 MxS16 m_peScore; // 0x12
MxS16 m_maScore; // 0x14 MxS16 m_maScore; // 0x14
MxS16 m_paScore; // 0x16 MxS16 m_paScore; // 0x16
MxS16 m_niScore; // 0x18 MxS16 m_niScore; // 0x18
MxS16 m_laScore; // 0x1a MxS16 m_laScore; // 0x1a
MxS16 m_peHighScore; // 0x1c MxS16 m_peHighScore; // 0x1c
MxS16 m_maHighScore; // 0x1e MxS16 m_maHighScore; // 0x1e
MxS16 m_paHighScore; // 0x20 MxS16 m_paHighScore; // 0x20
MxS16 m_niHighScore; // 0x22 MxS16 m_niHighScore; // 0x22
MxS16 m_laHighScore; // 0x24 MxS16 m_laHighScore; // 0x24
}; };
// VTABLE: LEGO1 0x100d7ee0 // VTABLE: LEGO1 0x100d7ee0
@@ -174,10 +181,10 @@ public:
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf0 virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf0
void CreateState(); void CreateState();
void FUN_1004dab0(); void Init();
void ActivateSceneActions(); void ActivateSceneActions();
void StopActions(); void StopActions();
void FUN_1004dbe0(); void Reset();
// SYNTHETIC: LEGO1 0x1004c950 // SYNTHETIC: LEGO1 0x1004c950
// TowTrack::`scalar deleting destructor' // TowTrack::`scalar deleting destructor'
@@ -192,8 +199,8 @@ private:
TowTrackMissionState* m_state; // 0x164 TowTrackMissionState* m_state; // 0x164
MxS16 m_unk0x168; // 0x168 MxS16 m_unk0x168; // 0x168
MxS16 m_actorId; // 0x16a MxS16 m_actorId; // 0x16a
MxS16 m_unk0x16c; // 0x16c MxS16 m_treeBlockageTriggered; // 0x16c
MxS16 m_unk0x16e; // 0x16e MxS16 m_speedComplaintTriggered; // 0x16e
IsleScript::Script m_lastAction; // 0x170 IsleScript::Script m_lastAction; // 0x170
IsleScript::Script m_lastAnimation; // 0x174 IsleScript::Script m_lastAnimation; // 0x174
MxFloat m_fuel; // 0x178 MxFloat m_fuel; // 0x178

View File

@@ -36,7 +36,9 @@ Act2Actor::Location g_brickstrLocations[] = {
{{26.470566, 0.069, -44.670845}, {0.004602, 0.0, -0.99998897}, "int26", FALSE}, {{26.470566, 0.069, -44.670845}, {0.004602, 0.0, -0.99998897}, "int26", FALSE},
{{-6.323625, 0.069, -47.96045}, {-0.982068, 0.0, 0.188529}, "edg02_53", FALSE}, {{-6.323625, 0.069, -47.96045}, {-0.982068, 0.0, 0.188529}, "edg02_53", FALSE},
{{-36.689, -0.978409, 31.449}, {0.083792, -0.94303, -0.66398698}, "edg00_157", FALSE}, {{-36.689, -0.978409, 31.449}, {0.083792, -0.94303, -0.66398698}, "edg00_157", FALSE},
#ifndef BETA10
{{-44.6, 0.1, 45.3}, {0.95, 0.0, -0.3}, "edg00_154", FALSE}, {{-44.6, 0.1, 45.3}, {0.95, 0.0, -0.3}, "edg00_154", FALSE},
#endif
}; };
// GLOBAL: LEGO1 0x100f0f1c // GLOBAL: LEGO1 0x100f0f1c
@@ -57,39 +59,39 @@ MxBool g_unk0x100f0f28 = FALSE;
// GLOBAL: LEGO1 0x100f0f30 // GLOBAL: LEGO1 0x100f0f30
// GLOBAL: BETA10 0x101dbe48 // GLOBAL: BETA10 0x101dbe48
MxS32 g_unk0x100f0f30[] = {2, 23, 32, 66, 71, 72, 73, -1}; MxS32 g_stage0Plants[] = {2, 23, 32, 66, 71, 72, 73, -1};
// GLOBAL: LEGO1 0x100f0f50 // GLOBAL: LEGO1 0x100f0f50
// GLOBAL: BETA10 0x101dbe68 // GLOBAL: BETA10 0x101dbe68
MxS32 g_unk0x100f0f50[] = {0, 7, 16, 18, 20, 21, 34, 49, 58, 59, 63, 65, 69, 74, -1}; MxS32 g_stage1Plants[] = {0, 7, 16, 18, 20, 21, 34, 49, 58, 59, 63, 65, 69, 74, -1};
// GLOBAL: LEGO1 0x100f0f90 // GLOBAL: LEGO1 0x100f0f90
// GLOBAL: BETA10 0x101dbea8 // GLOBAL: BETA10 0x101dbea8
MxS32 g_unk0x100f0f90[] = {12, 19, 24, 48, 60, -1}; MxS32 g_stage2Plants[] = {12, 19, 24, 48, 60, -1};
// GLOBAL: LEGO1 0x100f0fa8 // GLOBAL: LEGO1 0x100f0fa8
// GLOBAL: BETA10 0x101dbec0 // GLOBAL: BETA10 0x101dbec0
MxS32 g_unk0x100f0fa8[] = {8, 15, 46, -1}; MxS32 g_stage3Plants[] = {8, 15, 46, -1};
// GLOBAL: LEGO1 0x100f0fb8 // GLOBAL: LEGO1 0x100f0fb8
// GLOBAL: BETA10 0x101dbed0 // GLOBAL: BETA10 0x101dbed0
MxS32 g_unk0x100f0fb8[] = {25, 26, 28, 29, 38, 39, 42, 50, 51, 56, -1}; MxS32 g_stage4Plants[] = {25, 26, 28, 29, 38, 39, 42, 50, 51, 56, -1};
// GLOBAL: LEGO1 0x100f0fe8 // GLOBAL: LEGO1 0x100f0fe8
// GLOBAL: BETA10 0x101dbf00 // GLOBAL: BETA10 0x101dbf00
MxS32 g_unk0x100f0fe8[] = {3, 40, 53, 55, -1}; MxS32 g_stage5Plants[] = {3, 40, 53, 55, -1};
// GLOBAL: LEGO1 0x100f1000 // GLOBAL: LEGO1 0x100f1000
// GLOBAL: BETA10 0x101dbf18 // GLOBAL: BETA10 0x101dbf18
MxS32 g_unk0x100f1000[] = {22, 33, 41, 45, 67, -1}; MxS32 g_stage6Plants[] = {22, 33, 41, 45, 67, -1};
// GLOBAL: LEGO1 0x100f1018 // GLOBAL: LEGO1 0x100f1018
// GLOBAL: BETA10 0x101dbf30 // GLOBAL: BETA10 0x101dbf30
MxS32 g_unk0x100f1018[] = {13, 30, 31, 62, -1}; MxS32 g_stage7Plants[] = {13, 30, 31, 62, -1};
// GLOBAL: LEGO1 0x100f1030 // GLOBAL: LEGO1 0x100f1030
// GLOBAL: BETA10 0x101dbf48 // GLOBAL: BETA10 0x101dbf48
MxS32 g_unk0x100f1030[] = {1, 27, 37, 44, 47, 54, 61, 64, -1}; MxS32 g_stage8Plants[] = {1, 27, 37, 44, 47, 54, 61, 64, -1};
// --- End of indices into g_plantInfo --- // --- End of indices into g_plantInfo ---
@@ -133,7 +135,6 @@ Act2Actor::Act2Actor()
} }
// FUNCTION: LEGO1 0x10018940 // FUNCTION: LEGO1 0x10018940
// FUNCTION: BETA10 0x1003d65f
void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
{ {
LegoAnimActor::SetROI(p_roi, p_bool1, p_bool2); LegoAnimActor::SetROI(p_roi, p_bool1, p_bool2);
@@ -145,7 +146,7 @@ void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
void Act2Actor::FUN_10018980() void Act2Actor::FUN_10018980()
{ {
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_shootAnim = m_animMaps[i]; m_shootAnim = m_animMaps[i];
} }
} }
@@ -354,7 +355,7 @@ void Act2Actor::Animate(float p_time)
m_unk0x1e = 3; m_unk0x1e = 3;
m_unk0x24 = p_time; m_unk0x24 = p_time;
if (((LegoAct2*) CurrentWorld())->FUN_100516b0() == SUCCESS) { if (((LegoAct2*) CurrentWorld())->CreateBrick() == SUCCESS) {
FUN_100199f0(1); FUN_100199f0(1);
} }
#ifndef BETA10 #ifndef BETA10
@@ -417,7 +418,7 @@ void Act2Actor::FUN_100192a0(undefined4 p_location)
newPosition, newPosition,
newDirection, newDirection,
newBoundary, newBoundary,
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
NULL NULL
); );
@@ -611,8 +612,8 @@ MxU32 Act2Actor::FUN_10019700(MxFloat p_param)
MxMatrix matrix = m_roi->GetLocal2World(); MxMatrix matrix = m_roi->GetLocal2World();
matrix[3][1] += 1.0f; matrix[3][1] += 1.0f;
brickstrROI->FUN_100a58f0(matrix); brickstrROI->SetLocal2World(matrix);
brickstrROI->VTable0x14(); brickstrROI->WrappedUpdateWorldData();
Vector3 col0(matrix[0]); Vector3 col0(matrix[0]);
Vector3 col1(matrix[1]); Vector3 col1(matrix[1]);
@@ -632,7 +633,7 @@ MxU32 Act2Actor::FUN_10019700(MxFloat p_param)
MxFloat time = p_param - (m_unk0x2c - m_shootAnim->GetDuration()); MxFloat time = p_param - (m_unk0x2c - m_shootAnim->GetDuration());
for (MxS32 i = 0; i < root->GetNumChildren(); i++) { for (MxS32 i = 0; i < root->GetNumChildren(); i++) {
LegoROI::FUN_100a8e80(root->GetChild(i), matrix, time, m_shootAnim->GetROIMap()); LegoROI::ApplyAnimationTransformation(root->GetChild(i), matrix, time, m_shootAnim->GetROIMap());
} }
return FALSE; return FALSE;
@@ -647,13 +648,13 @@ void Act2Actor::FUN_100199f0(MxS8 p_param)
switch (g_nextHeadWavIndex) { switch (g_nextHeadWavIndex) {
case 0: case 0:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOhead0_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOhead0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextHeadWavIndex++; g_nextHeadWavIndex++;
break; break;
default: default:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOhead1_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOhead1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextHeadWavIndex = 0; g_nextHeadWavIndex = 0;
break; break;
} }
@@ -662,22 +663,22 @@ void Act2Actor::FUN_100199f0(MxS8 p_param)
switch (g_nextBehindWavIndex) { switch (g_nextBehindWavIndex) {
case 0: case 0:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VObehind0_PlayWav, FALSE, TRUE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VObehind0_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
g_nextBehindWavIndex++; g_nextBehindWavIndex++;
break; break;
case 1: case 1:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VObehind1_PlayWav, FALSE, TRUE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VObehind1_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
g_nextBehindWavIndex++; g_nextBehindWavIndex++;
break; break;
case 2: case 2:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VObehind2_PlayWav, FALSE, TRUE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VObehind2_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
g_nextBehindWavIndex++; g_nextBehindWavIndex++;
break; break;
default: default:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VObehind3_PlayWav, FALSE, TRUE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VObehind3_PlayWav, FALSE, TRUE, NULL, NULL, NULL);
g_nextBehindWavIndex = 0; g_nextBehindWavIndex = 0;
break; break;
} }
@@ -686,22 +687,22 @@ void Act2Actor::FUN_100199f0(MxS8 p_param)
switch (g_nextInterruptWavIndex) { switch (g_nextInterruptWavIndex) {
case 0: case 0:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOinterrupt0_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOinterrupt0_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextInterruptWavIndex++; g_nextInterruptWavIndex++;
break; break;
case 1: case 1:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOinterrupt1_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOinterrupt1_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextInterruptWavIndex++; g_nextInterruptWavIndex++;
break; break;
case 2: case 2:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOinterrupt2_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOinterrupt2_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextInterruptWavIndex++; g_nextInterruptWavIndex++;
break; break;
default: default:
((LegoAct2*) CurrentWorld()) ((LegoAct2*) CurrentWorld())
->FUN_10052560(Act2mainScript::c_VOinterrupt3_PlayWav, FALSE, FALSE, NULL, NULL, NULL); ->StartAction(Act2mainScript::c_VOinterrupt3_PlayWav, FALSE, FALSE, NULL, NULL, NULL);
g_nextInterruptWavIndex = 0; g_nextInterruptWavIndex = 0;
break; break;
} }
@@ -719,141 +720,141 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
switch (m_unk0x1d) { switch (m_unk0x1d) {
case 0: case 0:
if (buildingInfo[12].m_unk0x11) { if (buildingInfo[12].m_counter) {
result = buildingInfo[12].m_entity; result = buildingInfo[12].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[14].m_unk0x11) { else if (buildingInfo[14].m_counter) {
result = buildingInfo[14].m_entity; result = buildingInfo[14].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0f30[i] != -1; i++) { for (i = 0; g_stage0Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0f30[i]].m_unk0x16) { if (plantInfo[g_stage0Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0f30[i]].m_entity; result = plantInfo[g_stage0Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 1: case 1:
if (buildingInfo[13].m_unk0x11) { if (buildingInfo[13].m_counter) {
result = buildingInfo[13].m_entity; result = buildingInfo[13].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0f50[i] != -1; i++) { for (i = 0; g_stage1Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0f50[i]].m_unk0x16) { if (plantInfo[g_stage1Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0f50[i]].m_entity; result = plantInfo[g_stage1Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 2: case 2:
if (buildingInfo[9].m_unk0x11) { if (buildingInfo[9].m_counter) {
result = buildingInfo[9].m_entity; result = buildingInfo[9].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[11].m_unk0x11) { else if (buildingInfo[11].m_counter) {
result = buildingInfo[11].m_entity; result = buildingInfo[11].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0f90[i] != -1; i++) { for (i = 0; g_stage2Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0f90[i]].m_unk0x16) { if (plantInfo[g_stage2Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0f90[i]].m_entity; result = plantInfo[g_stage2Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 3: case 3:
if (buildingInfo[7].m_unk0x11) { if (buildingInfo[7].m_counter) {
result = buildingInfo[7].m_entity; result = buildingInfo[7].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[8].m_unk0x11) { else if (buildingInfo[8].m_counter) {
result = buildingInfo[8].m_entity; result = buildingInfo[8].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[3].m_unk0x11) { else if (buildingInfo[3].m_counter) {
result = buildingInfo[3].m_entity; result = buildingInfo[3].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0fa8[i] != -1; i++) { for (i = 0; g_stage3Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0fa8[i]].m_unk0x16) { if (plantInfo[g_stage3Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0fa8[i]].m_entity; result = plantInfo[g_stage3Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 4: case 4:
if (buildingInfo[5].m_unk0x11) { if (buildingInfo[5].m_counter) {
result = buildingInfo[5].m_entity; result = buildingInfo[5].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[10].m_unk0x11) { else if (buildingInfo[10].m_counter) {
result = buildingInfo[10].m_entity; result = buildingInfo[10].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0fb8[i] != -1; i++) { for (i = 0; g_stage4Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0fb8[i]].m_unk0x16) { if (plantInfo[g_stage4Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0fb8[i]].m_entity; result = plantInfo[g_stage4Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 5: case 5:
if (buildingInfo[4].m_unk0x11) { if (buildingInfo[4].m_counter) {
result = buildingInfo[4].m_entity; result = buildingInfo[4].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f0fe8[i] != -1; i++) { for (i = 0; g_stage5Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f0fe8[i]].m_unk0x16) { if (plantInfo[g_stage5Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f0fe8[i]].m_entity; result = plantInfo[g_stage5Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 6: case 6:
if (buildingInfo[2].m_unk0x11) { if (buildingInfo[2].m_counter) {
result = buildingInfo[2].m_entity; result = buildingInfo[2].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f1000[i] != -1; i++) { for (i = 0; g_stage6Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f1000[i]].m_unk0x16) { if (plantInfo[g_stage6Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f1000[i]].m_entity; result = plantInfo[g_stage6Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 7: case 7:
if (buildingInfo[6].m_unk0x11) { if (buildingInfo[6].m_counter) {
result = buildingInfo[6].m_entity; result = buildingInfo[6].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else { else {
for (i = 0; g_unk0x100f1018[i] != -1; i++) { for (i = 0; g_stage7Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f1018[i]].m_unk0x16) { if (plantInfo[g_stage7Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f1018[i]].m_entity; result = plantInfo[g_stage7Plants[i]].m_entity;
break; break;
} }
} }
} }
break; break;
case 8: case 8:
for (i = 0; g_unk0x100f1030[i] != -1; i++) { for (i = 0; g_stage8Plants[i] != -1; i++) {
if (plantInfo[g_unk0x100f1030[i]].m_unk0x16) { if (plantInfo[g_stage8Plants[i]].m_counter) {
result = plantInfo[g_unk0x100f1030[i]].m_entity; result = plantInfo[g_stage8Plants[i]].m_entity;
break; break;
} }
} }
@@ -862,7 +863,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
return result; return result;
} }
if (buildingInfo[15].m_unk0x11) { if (buildingInfo[15].m_counter) {
result = buildingInfo[15].m_entity; result = buildingInfo[15].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }

View File

@@ -4,9 +4,9 @@
#include "act3ammo.h" #include "act3ammo.h"
#include "anim/legoanim.h" #include "anim/legoanim.h"
#include "define.h" #include "define.h"
#include "legoanimpresenter.h"
#include "legobuildingmanager.h" #include "legobuildingmanager.h"
#include "legocachesoundmanager.h" #include "legocachesoundmanager.h"
#include "legolocomotionanimpresenter.h"
#include "legopathedgecontainer.h" #include "legopathedgecontainer.h"
#include "legoplantmanager.h" #include "legoplantmanager.h"
#include "legoplants.h" #include "legoplants.h"
@@ -138,8 +138,8 @@ MxU32 Act3Actor::VTable0x90(float p_time, Matrix4& p_transform)
m_unk0x1c = 0; m_unk0x1c = 0;
positionRef -= g_unk0x10104ef0; positionRef -= g_unk0x10104ef0;
m_roi->FUN_100a58f0(p_transform); m_roi->SetLocal2World(p_transform);
m_roi->VTable0x14(); m_roi->WrappedUpdateWorldData();
return TRUE; return TRUE;
} }
} }
@@ -163,8 +163,8 @@ MxResult Act3Actor::HitActor(LegoPathActor* p_actor, MxBool p_bool)
Vector3(local2world[3]) += g_unk0x10104ef0; Vector3(local2world[3]) += g_unk0x10104ef0;
roi->FUN_100a58f0(local2world); roi->SetLocal2World(local2world);
roi->VTable0x14(); roi->WrappedUpdateWorldData();
p_actor->SetActorState(c_two | c_noCollide); p_actor->SetActorState(c_two | c_noCollide);
} }
@@ -244,7 +244,7 @@ void Act3Cop::ParseAction(char* p_extra)
} }
} }
Mx4DPointFloat* boundary0x14 = boundary->GetUnknown0x14(); Mx4DPointFloat* boundary0x14 = boundary->GetUp();
if (point.Dot(point, *boundary0x14) + boundary0x14->index_operator(3) <= 0.001 && if (point.Dot(point, *boundary0x14) + boundary0x14->index_operator(3) <= 0.001 &&
point.Dot(point, *boundary0x14) + boundary0x14->index_operator(3) >= -0.001) { point.Dot(point, *boundary0x14) + boundary0x14->index_operator(3) >= -0.001) {
@@ -270,7 +270,7 @@ void Act3Cop::ParseAction(char* p_extra)
} }
for (i = 0; i < m_animMaps.size(); i++) { for (i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_eatAnim = m_animMaps[i]; m_eatAnim = m_animMaps[i];
} }
} }
@@ -353,7 +353,7 @@ MxResult Act3Cop::FUN_10040360()
local7c, local7c,
local5c, local5c,
boundary, boundary,
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
&local34 &local34
) != SUCCESS) { ) != SUCCESS) {
delete grec; delete grec;
@@ -391,7 +391,7 @@ MxResult Act3Cop::FUN_10040360()
local88, local88,
localec, localec,
donut->GetBoundary(), donut->GetBoundary(),
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
&locald8 &locald8
) == SUCCESS && ) == SUCCESS &&
(grec == NULL || locald8 < local18)) { (grec == NULL || locald8 < local18)) {
@@ -431,7 +431,7 @@ MxResult Act3Cop::FUN_10040360()
localf8, localf8,
local108, local108,
boundary, boundary,
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
&local100 &local100
) != SUCCESS) { ) != SUCCESS) {
local14c = local150 = grec; local14c = local150 = grec;
@@ -558,7 +558,7 @@ void Act3Brickster::ParseAction(char* p_extra)
((Act3*) m_world)->SetBrickster(this); ((Act3*) m_world)->SetBrickster(this);
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_shootAnim = m_animMaps[i]; m_shootAnim = m_animMaps[i];
} }
} }
@@ -579,7 +579,7 @@ void Act3Brickster::Animate(float p_time)
} }
if (m_unk0x54 < p_time) { if (m_unk0x54 < p_time) {
((Act3*) m_world)->FUN_10072ad0(5); ((Act3*) m_world)->TriggerHitSound(5);
m_unk0x54 = p_time + 15000.0f; m_unk0x54 = p_time + 15000.0f;
} }
@@ -595,7 +595,7 @@ void Act3Brickster::Animate(float p_time)
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
if (m_unk0x58 >= 8) { if (m_unk0x58 >= 8) {
((Act3*) m_world)->FUN_10072ad0(6); ((Act3*) m_world)->TriggerHitSound(6);
} }
else { else {
SoundManager()->GetCacheSoundManager()->Play("eatpz", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("eatpz", NULL, FALSE);
@@ -607,8 +607,8 @@ void Act3Brickster::Animate(float p_time)
assert(m_shootAnim && m_pInfo); assert(m_shootAnim && m_pInfo);
if (m_unk0x50 < p_time) { if (m_unk0x50 < p_time) {
while (m_pInfo->m_unk0x16) { while (m_pInfo->m_counter) {
PlantManager()->FUN_10026c50(m_pInfo->m_entity); PlantManager()->DecrementCounter(m_pInfo->m_entity);
} }
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
@@ -638,7 +638,7 @@ void Act3Brickster::Animate(float p_time)
float time = p_time - (m_unk0x50 - m_shootAnim->GetDuration()); float time = p_time - (m_unk0x50 - m_shootAnim->GetDuration());
for (MxS32 i = 0; i < root->GetNumChildren(); i++) { for (MxS32 i = 0; i < root->GetNumChildren(); i++) {
LegoROI::FUN_100a8e80(root->GetChild(i), local70, time, m_shootAnim->GetROIMap()); LegoROI::ApplyAnimationTransformation(root->GetChild(i), local70, time, m_shootAnim->GetROIMap());
} }
} }
@@ -653,8 +653,8 @@ void Act3Brickster::Animate(float p_time)
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE);
while (m_bInfo->m_unk0x11 > 0 || m_bInfo->m_unk0x11 == -1) { while (m_bInfo->m_counter > 0 || m_bInfo->m_counter == -1) {
if (!BuildingManager()->FUN_10030110(m_bInfo)) { if (!BuildingManager()->DecrementCounter(m_bInfo)) {
break; break;
} }
} }
@@ -685,7 +685,7 @@ void Act3Brickster::Animate(float p_time)
float time = p_time - (m_unk0x50 - m_shootAnim->GetDuration()); float time = p_time - (m_unk0x50 - m_shootAnim->GetDuration());
for (MxS32 i = 0; i < root->GetNumChildren(); i++) { for (MxS32 i = 0; i < root->GetNumChildren(); i++) {
LegoROI::FUN_100a8e80(root->GetChild(i), locale4, time, m_shootAnim->GetROIMap()); LegoROI::ApplyAnimationTransformation(root->GetChild(i), locale4, time, m_shootAnim->GetROIMap());
} }
} }
@@ -831,7 +831,7 @@ MxResult Act3Brickster::FUN_100417c0()
local88, local88,
localec, localec,
pizza->GetBoundary(), pizza->GetBoundary(),
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
&locald8 &locald8
) == SUCCESS && ) == SUCCESS &&
(grec == NULL || locald8 < local18)) { (grec == NULL || locald8 < local18)) {
@@ -865,7 +865,7 @@ MxResult Act3Brickster::FUN_100417c0()
float local124; float local124;
for (MxS32 i = 0; i < length; i++) { for (MxS32 i = 0; i < length; i++) {
if (bInfo[i].m_unk0x11 < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 && if (bInfo[i].m_counter < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 &&
(local120 == -1 || i != 15)) { (local120 == -1 || i != 15)) {
Mx3DPointFloat local188(bInfo[i].m_x, bInfo[i].m_y, bInfo[i].m_z); Mx3DPointFloat local188(bInfo[i].m_x, bInfo[i].m_y, bInfo[i].m_z);
@@ -915,7 +915,7 @@ MxResult Act3Brickster::FUN_100417c0()
local108, local108,
local138, local138,
localf4, localf4,
LegoUnknown100db7f4::c_bit1, LegoOrientedEdge::c_bit1,
&local13c &local13c
) != SUCCESS) { ) != SUCCESS) {
local1bc = local1c0 = grec; local1bc = local1c0 = grec;
@@ -1055,7 +1055,7 @@ MxS32 Act3Brickster::FUN_10042300()
assert(m_boundary && m_destEdge && m_roi); assert(m_boundary && m_destEdge && m_roi);
LegoPathBoundary* boundaries[2]; LegoPathBoundary* boundaries[2];
LegoUnknown100db7f4* maxE = NULL; LegoOrientedEdge* maxE = NULL;
boundaries[0] = m_boundary; boundaries[0] = m_boundary;
if (m_destEdge->FUN_10048c40(local38)) { if (m_destEdge->FUN_10048c40(local38)) {
@@ -1069,7 +1069,7 @@ MxS32 Act3Brickster::FUN_10042300()
for (MxS32 i = 0; i < (MxS32) sizeOfArray(boundaries); i++) { for (MxS32 i = 0; i < (MxS32) sizeOfArray(boundaries); i++) {
if (boundaries[i] != NULL) { if (boundaries[i] != NULL) {
for (MxS32 j = 0; j < boundaries[i]->GetNumEdges(); j++) { for (MxS32 j = 0; j < boundaries[i]->GetNumEdges(); j++) {
LegoUnknown100db7f4* e = boundaries[i]->GetEdges()[j]; LegoOrientedEdge* e = boundaries[i]->GetEdges()[j];
if (e->GetMask0x03()) { if (e->GetMask0x03()) {
Mx3DPointFloat local94(*e->GetPointA()); Mx3DPointFloat local94(*e->GetPointA());
@@ -1109,7 +1109,7 @@ MxS32 Act3Brickster::FUN_10042300()
// FUNCTION: LEGO1 0x10042990 // FUNCTION: LEGO1 0x10042990
// FUNCTION: BETA10 0x1001b6e2 // FUNCTION: BETA10 0x1001b6e2
void Act3Brickster::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) void Act3Brickster::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoOrientedEdge*& p_edge, float& p_unk0xe4)
{ {
if (m_unk0x38 != 8) { if (m_unk0x38 != 8) {
m_boundary->SwitchBoundary(this, p_boundary, p_edge, p_unk0xe4); m_boundary->SwitchBoundary(this, p_boundary, p_edge, p_unk0xe4);
@@ -1186,7 +1186,7 @@ void Act3Shark::Animate(float p_time)
vec = m_unk0x3c; vec = m_unk0x3c;
LegoTreeNode* node = m_unk0x34->GetAnimTreePtr()->GetRoot(); LegoTreeNode* node = m_unk0x34->GetAnimTreePtr()->GetRoot();
LegoROI::FUN_100a8e80(node, mat, duration, m_unk0x34->GetROIMap()); LegoROI::ApplyAnimationTransformation(node, mat, duration, m_unk0x34->GetROIMap());
} }
else { else {
roiMap[1] = m_unk0x38; roiMap[1] = m_unk0x38;

View File

@@ -70,7 +70,9 @@ MxResult Act3Ammo::Remove()
// FUNCTION: BETA10 0x1001d8b3 // FUNCTION: BETA10 0x1001d8b3
MxResult Act3Ammo::Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index) MxResult Act3Ammo::Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index)
{ {
#ifdef BETA10
assert(m_ammoFlag); assert(m_ammoFlag);
#endif
char name[12]; char name[12];
if (p_isPizza) { if (p_isPizza) {
@@ -198,7 +200,7 @@ MxResult Act3Ammo::FUN_10053d30(LegoPathController* p_p, MxFloat p_unk0x19c)
// FUNCTION: LEGO1 0x10053db0 // FUNCTION: LEGO1 0x10053db0
// FUNCTION: BETA10 0x1001e0f0 // FUNCTION: BETA10 0x1001e0f0
MxResult Act3Ammo::FUN_10053db0(float p_param1, const Matrix4& p_param2) MxResult Act3Ammo::FUN_10053db0(float p_param1, Matrix4& p_param2)
{ {
float local34 = p_param1 * p_param1; float local34 = p_param1 * p_param1;
@@ -271,8 +273,8 @@ void Act3Ammo::Animate(float p_time)
positionRef.Clear(); positionRef.Clear();
transform.RotateX(0.6); transform.RotateX(0.6);
positionRef = position; positionRef = position;
m_roi->FUN_100a58f0(transform); m_roi->SetLocal2World(transform);
m_roi->VTable0x14(); m_roi->WrappedUpdateWorldData();
return; return;
} }
else { else {
@@ -280,8 +282,8 @@ void Act3Ammo::Animate(float p_time)
m_unk0x158 = 0; m_unk0x158 = 0;
positionRef -= g_unk0x10104f08; positionRef -= g_unk0x10104f08;
m_roi->FUN_100a58f0(transform); m_roi->SetLocal2World(transform);
m_roi->VTable0x14(); m_roi->WrappedUpdateWorldData();
return; return;
} }
} }
@@ -337,7 +339,7 @@ void Act3Ammo::Animate(float p_time)
Vector3 local174(local104[2]); Vector3 local174(local104[2]);
if (IsPizza()) { if (IsPizza()) {
local184 = *m_boundary->GetUnknown0x14(); local184 = *m_boundary->GetUp();
local17c[0] = 1.0f; local17c[0] = 1.0f;
local17c[1] = local17c[2] = 0.0f; local17c[1] = local17c[2] = 0.0f;
local174.EqualsCross(local17c, local184); local174.EqualsCross(local17c, local184);
@@ -345,7 +347,7 @@ void Act3Ammo::Animate(float p_time)
local17c.EqualsCross(local184, local174); local17c.EqualsCross(local184, local174);
} }
else { else {
local17c = *m_boundary->GetUnknown0x14(); local17c = *m_boundary->GetUp();
local184[0] = 1.0f; local184[0] = 1.0f;
local184[1] = local184[2] = 0.0f; local184[1] = local184[2] = 0.0f;
local174.EqualsCross(local17c, local184); local174.EqualsCross(local17c, local184);
@@ -363,8 +365,8 @@ void Act3Ammo::Animate(float p_time)
MxMatrix localb0(local104); MxMatrix localb0(local104);
local104.Product(local60, localb0); local104.Product(local60, localb0);
m_roi->FUN_100a58f0(local104); m_roi->SetLocal2World(local104);
m_roi->VTable0x14(); m_roi->WrappedUpdateWorldData();
if (m_BADuration <= m_unk0x7c) { if (m_BADuration <= m_unk0x7c) {
m_worldSpeed = 0.0f; m_worldSpeed = 0.0f;
@@ -376,12 +378,14 @@ void Act3Ammo::Animate(float p_time)
if (IsBit4()) { if (IsBit4()) {
if (IsPizza()) { if (IsPizza()) {
m_world->RemovePizza(*this); m_world->RemovePizza(*this);
m_world->FUN_10072ad0(2); m_world->TriggerHitSound(2);
} }
else { else {
m_world->RemoveDonut(*this); m_world->RemoveDonut(*this);
m_world->FUN_10072ad0(4); m_world->TriggerHitSound(4);
} }
return;
} }
else { else {
if (IsPizza()) { if (IsPizza()) {
@@ -392,89 +396,99 @@ void Act3Ammo::Animate(float p_time)
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("stickdn", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("stickdn", NULL, FALSE);
} }
}
LegoPathActorSet& plpas = m_boundary->GetActors(); LegoPathActorSet& plpas = m_boundary->GetActors();
LegoPathActorSet lpas(plpas); LegoPathActorSet lpas(plpas);
for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) { for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
if (plpas.find(*itpa) != plpas.end() && this != *itpa) { if (plpas.find(*itpa) == plpas.end()) {
LegoROI* r = (*itpa)->GetROI(); continue;
assert(r); }
if (!strncmp(r->GetName(), "pammo", 5)) { if (this == *itpa) {
Mx3DPointFloat local1c8; continue;
Mx3DPointFloat local1b4; }
local1c8 = r->GetLocal2World()[3]; LegoROI* r = (*itpa)->GetROI();
local1b4 = m_roi->GetLocal2World()[3]; assert(r);
local1b4 -= local1c8; if (!strncmp(r->GetName(), "pammo", 5)) {
Mx3DPointFloat local1c8;
Mx3DPointFloat local1b4;
float radius = r->GetWorldBoundingSphere().Radius(); local1c8 = r->GetLocal2World()[3];
if (local1b4.LenSquared() <= radius * radius) { local1b4 = m_roi->GetLocal2World()[3];
MxS32 index = -1;
if (sscanf(r->GetName(), "pammo%d", &index) != 1) {
assert(0);
}
assert(m_world); local1b4 -= local1c8;
if (m_world->m_pizzas[index].IsValid() && !m_world->m_pizzas[index].IsSharkFood()) { float radius = r->GetWorldBoundingSphere().Radius();
m_world->EatPizza(index); if (local1b4.LenSquared() <= radius * radius) {
m_world->m_brickster->FUN_100417c0(); MxS32 index = -1;
} if (sscanf(r->GetName(), "pammo%d", &index) != 1) {
assert(0);
if (IsDonut()) {
assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("dnhitpz", NULL, FALSE);
m_world->RemoveDonut(*this);
local14 = TRUE;
break;
}
}
} }
else if (!strncmp(r->GetName(), "dammo", 5)) {
Mx3DPointFloat local1f8;
Mx3DPointFloat local1e4;
local1f8 = r->GetLocal2World()[3]; assert(m_world);
local1e4 = m_roi->GetLocal2World()[3];
local1e4 -= local1f8; #ifdef BETA10
m_world->EatPizza(index);
#else
if (m_world->m_pizzas[index].IsValid() && !m_world->m_pizzas[index].IsSharkFood()) {
m_world->EatPizza(index);
m_world->m_brickster->FUN_100417c0();
}
#endif
float radius = r->GetWorldBoundingSphere().Radius(); if (IsDonut()) {
if (local1e4.LenSquared() <= radius * radius) { assert(SoundManager()->GetCacheSoundManager());
MxS32 index = -1; SoundManager()->GetCacheSoundManager()->Play("dnhitpz", NULL, FALSE);
if (sscanf(r->GetName(), "dammo%d", &index) != 1) { m_world->RemoveDonut(*this);
assert(0); local14 = TRUE;
} break;
assert(m_world);
m_world->EatDonut(index);
if (IsPizza()) {
assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("pzhitdn", NULL, FALSE);
m_world->RemovePizza(*this);
local14 = TRUE;
break;
}
}
} }
} }
} }
else if (!strncmp(r->GetName(), "dammo", 5)) {
Mx3DPointFloat local1f8;
Mx3DPointFloat local1e4;
if (!local14) { local1f8 = r->GetLocal2World()[3];
if (IsPizza()) { local1e4 = m_roi->GetLocal2World()[3];
m_world->FUN_10073360(*this, local68);
}
else {
m_world->FUN_10073390(*this, local68);
}
m_worldSpeed = -1.0f; local1e4 -= local1f8;
float radius = r->GetWorldBoundingSphere().Radius();
if (local1e4.LenSquared() <= radius * radius) {
MxS32 index = -1;
if (sscanf(r->GetName(), "dammo%d", &index) != 1) {
assert(0);
}
assert(m_world);
m_world->EatDonut(index);
if (IsPizza()) {
assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("pzhitdn", NULL, FALSE);
m_world->RemovePizza(*this);
local14 = TRUE;
break;
}
}
} }
} }
if (!local14) {
if (IsPizza()) {
m_world->FUN_10073360(*this, local68);
}
else {
m_world->FUN_10073390(*this, local68);
}
m_worldSpeed = -1.0f;
}
} }
} }

View File

@@ -37,11 +37,11 @@ Ambulance::Ambulance()
m_state = NULL; m_state = NULL;
m_unk0x168 = 0; m_unk0x168 = 0;
m_actorId = -1; m_actorId = -1;
m_unk0x16c = 0; m_atPoliceTask = 0;
m_unk0x16e = 0; m_atBeachTask = 0;
m_unk0x170 = 0; m_taskState = Ambulance::e_none;
m_lastAction = IsleScript::c_noneIsle; m_lastAction = IsleScript::c_noneIsle;
m_unk0x172 = 0; m_enableRandomAudio = 0;
m_lastAnimation = IsleScript::c_noneIsle; m_lastAnimation = IsleScript::c_noneIsle;
m_fuel = 1.0; m_fuel = 1.0;
} }
@@ -70,7 +70,7 @@ MxResult Ambulance::Create(MxDSAction& p_dsAction)
m_state = (AmbulanceMissionState*) GameState()->GetState("AmbulanceMissionState"); m_state = (AmbulanceMissionState*) GameState()->GetState("AmbulanceMissionState");
if (!m_state) { if (!m_state) {
m_state = new AmbulanceMissionState(); m_state = new AmbulanceMissionState();
m_state->m_unk0x08 = 0; m_state->m_state = AmbulanceMissionState::e_ready;
GameState()->RegisterState(m_state); GameState()->RegisterState(m_state);
} }
} }
@@ -170,25 +170,25 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
m_lastAction = IsleScript::c_noneIsle; m_lastAction = IsleScript::c_noneIsle;
} }
else if (objectId == IsleScript::c_hho027en_RunAnim) { else if (objectId == IsleScript::c_hho027en_RunAnim) {
m_state->m_unk0x08 = 1; m_state->m_state = AmbulanceMissionState::e_enteredAmbulance;
CurrentWorld()->PlaceActor(UserActor()); CurrentWorld()->PlaceActor(UserActor());
HandleClick(); HandleClick();
m_unk0x172 = 0; m_enableRandomAudio = 0;
TickleManager()->RegisterClient(this, 40000); TickleManager()->RegisterClient(this, 40000);
} }
else if (objectId == IsleScript::c_hpz047pe_RunAnim || objectId == IsleScript::c_hpz048pe_RunAnim || objectId == IsleScript::c_hpz049bd_RunAnim || objectId == IsleScript::c_hpz053pa_RunAnim) { else if (objectId == IsleScript::c_hpz047pe_RunAnim || objectId == IsleScript::c_hpz048pe_RunAnim || objectId == IsleScript::c_hpz049bd_RunAnim || objectId == IsleScript::c_hpz053pa_RunAnim) {
if (m_unk0x170 == 3) { if (m_taskState == Ambulance::e_finished) {
PlayAnimation(IsleScript::c_hpz055pa_RunAnim); PlayAnimation(IsleScript::c_hpz055pa_RunAnim);
m_unk0x170 = 0; m_taskState = Ambulance::e_none;
} }
else { else {
PlayAnimation(IsleScript::c_hpz053pa_RunAnim); PlayAnimation(IsleScript::c_hpz053pa_RunAnim);
} }
} }
else if (objectId == IsleScript::c_hpz050bd_RunAnim || objectId == IsleScript::c_hpz052ma_RunAnim) { else if (objectId == IsleScript::c_hpz050bd_RunAnim || objectId == IsleScript::c_hpz052ma_RunAnim) {
if (m_unk0x170 == 3) { if (m_taskState == Ambulance::e_finished) {
PlayAnimation(IsleScript::c_hpz057ma_RunAnim); PlayAnimation(IsleScript::c_hpz057ma_RunAnim);
m_unk0x170 = 0; m_taskState = Ambulance::e_none;
} }
else { else {
PlayAnimation(IsleScript::c_hpz052ma_RunAnim); PlayAnimation(IsleScript::c_hpz052ma_RunAnim);
@@ -198,21 +198,21 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
CurrentWorld()->PlaceActor(UserActor()); CurrentWorld()->PlaceActor(UserActor());
HandleClick(); HandleClick();
SpawnPlayer(LegoGameState::e_pizzeriaExterior, TRUE, 0); SpawnPlayer(LegoGameState::e_pizzeriaExterior, TRUE, 0);
m_unk0x172 = 0; m_enableRandomAudio = 0;
TickleManager()->RegisterClient(this, 40000); TickleManager()->RegisterClient(this, 40000);
if (m_unk0x16c != 0) { if (m_atPoliceTask != 0) {
StopActions(); StopActions();
} }
} }
else if (objectId == IsleScript::c_hps116bd_RunAnim || objectId == IsleScript::c_hps118re_RunAnim) { else if (objectId == IsleScript::c_hps116bd_RunAnim || objectId == IsleScript::c_hps118re_RunAnim) {
if (objectId == IsleScript::c_hps116bd_RunAnim && m_unk0x170 != 3) { if (objectId == IsleScript::c_hps116bd_RunAnim && m_taskState != Ambulance::e_finished) {
PlayAction(IsleScript::c_Avo923In_PlayWav); PlayAction(IsleScript::c_Avo923In_PlayWav);
} }
if (m_unk0x170 == 3) { if (m_taskState == Ambulance::e_finished) {
PlayAnimation(IsleScript::c_hps117bd_RunAnim); PlayAnimation(IsleScript::c_hps117bd_RunAnim);
m_unk0x170 = 0; m_taskState = Ambulance::e_none;
} }
else { else {
PlayAnimation(IsleScript::c_hps118re_RunAnim); PlayAnimation(IsleScript::c_hps118re_RunAnim);
@@ -221,16 +221,16 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
else if (objectId == IsleScript::c_hps117bd_RunAnim) { else if (objectId == IsleScript::c_hps117bd_RunAnim) {
CurrentWorld()->PlaceActor(UserActor()); CurrentWorld()->PlaceActor(UserActor());
HandleClick(); HandleClick();
SpawnPlayer(LegoGameState::e_unk33, TRUE, 0); SpawnPlayer(LegoGameState::e_policeExited, TRUE, 0);
m_unk0x172 = 0; m_enableRandomAudio = 0;
TickleManager()->RegisterClient(this, 40000); TickleManager()->RegisterClient(this, 40000);
if (m_unk0x16e != 0) { if (m_atBeachTask != 0) {
StopActions(); StopActions();
} }
} }
else if (objectId == IsleScript::c_hho142cl_RunAnim || objectId == IsleScript::c_hho143cl_RunAnim || objectId == IsleScript::c_hho144cl_RunAnim) { else if (objectId == IsleScript::c_hho142cl_RunAnim || objectId == IsleScript::c_hho143cl_RunAnim || objectId == IsleScript::c_hho144cl_RunAnim) {
FUN_10037250(); Reset();
} }
} }
@@ -241,18 +241,18 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
// FUNCTION: BETA10 0x100230bf // FUNCTION: BETA10 0x100230bf
MxLong Ambulance::HandleButtonDown(LegoControlManagerNotificationParam& p_param) MxLong Ambulance::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
{ {
if (m_unk0x170 == 1) { if (m_taskState == Ambulance::e_waiting) {
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY()); LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
if (roi != NULL && !strcmpi(roi->GetName(), "ps-gate")) { if (roi != NULL && !strcmpi(roi->GetName(), "ps-gate")) {
m_unk0x170 = 3; m_taskState = Ambulance::e_finished;
return 1; return 1;
} }
roi = PickRootROI(p_param.GetX(), p_param.GetY()); roi = PickRootROI(p_param.GetX(), p_param.GetY());
if (roi != NULL && !strcmpi(roi->GetName(), "gd")) { if (roi != NULL && !strcmpi(roi->GetName(), "gd")) {
m_unk0x170 = 3; m_taskState = Ambulance::e_finished;
return 1; return 1;
} }
} }
@@ -270,9 +270,9 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
} }
if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && p_param.GetData() == 0x0b) { if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && p_param.GetData() == 0x0b) {
if (m_unk0x16e != 0) { if (m_atBeachTask != 0) {
if (m_unk0x16c != 0) { if (m_atPoliceTask != 0) {
m_state->m_unk0x08 = 2; m_state->m_state = AmbulanceMissionState::e_prepareAmbulance;
if (m_lastAction != IsleScript::c_noneIsle) { if (m_lastAction != IsleScript::c_noneIsle) {
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL); InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
@@ -297,7 +297,7 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
return 0; return 0;
} }
if (m_unk0x16e != 0) { if (m_atBeachTask != 0) {
if (m_lastAction != IsleScript::c_noneIsle) { if (m_lastAction != IsleScript::c_noneIsle) {
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL); InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
} }
@@ -307,7 +307,7 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
} }
} }
if (m_unk0x16c != 0) { if (m_atPoliceTask != 0) {
if (m_lastAction != IsleScript::c_noneIsle) { if (m_lastAction != IsleScript::c_noneIsle) {
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL); InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
} }
@@ -315,9 +315,9 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
PlayAction(IsleScript::c_Avo915In_PlayWav); PlayAction(IsleScript::c_Avo915In_PlayWav);
} }
} }
else if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x131 && m_unk0x16e == 0) { else if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x131 && m_atBeachTask == 0) {
m_unk0x16e = 1; m_atBeachTask = 1;
m_unk0x170 = 1; m_taskState = Ambulance::e_waiting;
if (m_lastAction != IsleScript::c_noneIsle) { if (m_lastAction != IsleScript::c_noneIsle) {
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL); InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
@@ -345,9 +345,9 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
break; break;
} }
} }
else if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 0x22 || p_param.GetData() == 0x23 || p_param.GetData() == 0x24) && m_unk0x16c == 0) { else if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 0x22 || p_param.GetData() == 0x23 || p_param.GetData() == 0x24) && m_atPoliceTask == 0) {
m_unk0x16c = 1; m_atPoliceTask = 1;
m_unk0x170 = 1; m_taskState = Ambulance::e_waiting;
if (m_lastAction != IsleScript::c_noneIsle) { if (m_lastAction != IsleScript::c_noneIsle) {
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL); InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
@@ -364,15 +364,15 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
// FUNCTION: BETA10 0x10023506 // FUNCTION: BETA10 0x10023506
MxLong Ambulance::HandleClick() MxLong Ambulance::HandleClick()
{ {
if (((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 != 10) { if (((Act1State*) GameState()->GetState("Act1State"))->m_state != Act1State::e_ambulance) {
return 1; return 1;
} }
if (m_state->m_unk0x08 == 2) { if (m_state->m_state == AmbulanceMissionState::e_prepareAmbulance) {
return 1; return 1;
} }
FUN_10015820(TRUE, 0); Disable(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_ambulance); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_ambulance);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
@@ -387,8 +387,8 @@ MxLong Ambulance::HandleClick()
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_AmbulanceDashboard, NULL); InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_AmbulanceDashboard, NULL);
ControlManager()->Register(this); ControlManager()->Register(this);
if (m_state->m_unk0x08 == 1) { if (m_state->m_state == AmbulanceMissionState::e_enteredAmbulance) {
SpawnPlayer(LegoGameState::e_unk31, TRUE, 0); SpawnPlayer(LegoGameState::e_hospitalExited, TRUE, 0);
m_state->m_startTime = Timer()->GetTime(); m_state->m_startTime = Timer()->GetTime();
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns018rd_RunAnim, NULL); InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns018rd_RunAnim, NULL);
} }
@@ -398,9 +398,9 @@ MxLong Ambulance::HandleClick()
// FUNCTION: LEGO1 0x10036e60 // FUNCTION: LEGO1 0x10036e60
// FUNCTION: BETA10 0x100236bb // FUNCTION: BETA10 0x100236bb
void Ambulance::FUN_10036e60() void Ambulance::Init()
{ {
m_state->m_unk0x08 = 2; m_state->m_state = AmbulanceMissionState::e_prepareAmbulance;
PlayAnimation(IsleScript::c_hho027en_RunAnim); PlayAnimation(IsleScript::c_hho027en_RunAnim);
m_lastAction = IsleScript::c_noneIsle; m_lastAction = IsleScript::c_noneIsle;
m_lastAnimation = IsleScript::c_noneIsle; m_lastAnimation = IsleScript::c_noneIsle;
@@ -411,7 +411,7 @@ void Ambulance::Exit()
{ {
GameState()->m_currentArea = LegoGameState::e_hospitalExterior; GameState()->m_currentArea = LegoGameState::e_hospitalExterior;
StopActions(); StopActions();
FUN_10037250(); Reset();
Leave(); Leave();
} }
@@ -437,24 +437,24 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
{ {
MxLong result = 0; MxLong result = 0;
if (p_param.m_unk0x28 == 1) { if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_AmbulanceArms_Ctl: case IsleScript::c_AmbulanceArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_AmbulanceInfo_Ctl: case IsleScript::c_AmbulanceInfo_Ctl:
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_AmbulanceHorn_Ctl: case IsleScript::c_AmbulanceHorn_Ctl:
MxSoundPresenter* presenter = MxSoundPresenter* presenter =
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound"); (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
presenter->Enable(p_param.m_unk0x28); presenter->Enable(p_param.m_enabledChild);
break; break;
} }
} }
@@ -467,11 +467,11 @@ void Ambulance::ActivateSceneActions()
{ {
PlayMusic(JukeboxScript::c_Hospital_Music); PlayMusic(JukeboxScript::c_Hospital_Music);
if (m_state->m_unk0x08 == 1) { if (m_state->m_state == AmbulanceMissionState::e_enteredAmbulance) {
m_state->m_unk0x08 = 0; m_state->m_state = AmbulanceMissionState::e_ready;
PlayAction(IsleScript::c_ham033cl_PlayWav); PlayAction(IsleScript::c_ham033cl_PlayWav);
} }
else if (m_unk0x16c != 0 && m_unk0x16e != 0) { else if (m_atPoliceTask != 0 && m_atBeachTask != 0) {
IsleScript::Script objectId; IsleScript::Script objectId;
switch (rand() % 2) { switch (rand() % 2) {
@@ -513,8 +513,8 @@ void Ambulance::ActivateSceneActions()
// FUNCTION: BETA10 0x100237df // FUNCTION: BETA10 0x100237df
MxResult Ambulance::Tickle() MxResult Ambulance::Tickle()
{ {
if (m_unk0x172 == 0) { if (m_enableRandomAudio == 0) {
m_unk0x172 = 1; m_enableRandomAudio = 1;
} }
else if (m_lastAction == IsleScript::c_noneIsle) { else if (m_lastAction == IsleScript::c_noneIsle) {
IsleScript::Script objectId; IsleScript::Script objectId;
@@ -571,14 +571,14 @@ void Ambulance::StopActions()
} }
// FUNCTION: LEGO1 0x10037250 // FUNCTION: LEGO1 0x10037250
void Ambulance::FUN_10037250() void Ambulance::Reset()
{ {
StopAction(m_lastAction); StopAction(m_lastAction);
BackgroundAudioManager()->RaiseVolume(); BackgroundAudioManager()->RaiseVolume();
((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 0; ((Act1State*) GameState()->GetState("Act1State"))->m_state = Act1State::e_none;
m_state->m_unk0x08 = 0; m_state->m_state = AmbulanceMissionState::e_ready;
m_unk0x16e = 0; m_atBeachTask = 0;
m_unk0x16c = 0; m_atPoliceTask = 0;
g_isleFlags |= Isle::c_playMusic; g_isleFlags |= Isle::c_playMusic;
AnimationManager()->EnableCamAnims(TRUE); AnimationManager()->EnableCamAnims(TRUE);
AnimationManager()->FUN_1005f6d0(TRUE); AnimationManager()->FUN_1005f6d0(TRUE);
@@ -626,7 +626,7 @@ void Ambulance::PlayAction(IsleScript::Script p_objectId)
// FUNCTION: LEGO1 0x100373a0 // FUNCTION: LEGO1 0x100373a0
AmbulanceMissionState::AmbulanceMissionState() AmbulanceMissionState::AmbulanceMissionState()
{ {
m_unk0x08 = 0; m_state = AmbulanceMissionState::e_ready;
m_startTime = 0; m_startTime = 0;
m_peScore = 0; m_peScore = 0;
m_maScore = 0; m_maScore = 0;

View File

@@ -52,9 +52,9 @@ void Bike::Exit()
// FUNCTION: LEGO1 0x100769a0 // FUNCTION: LEGO1 0x100769a0
MxLong Bike::HandleClick() MxLong Bike::HandleClick()
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
FUN_10015820(TRUE, 0); Disable(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_bike); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_bike);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
@@ -81,11 +81,11 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
{ {
MxLong result = 0; MxLong result = 0;
if (p_param.m_unk0x28 == 1) { if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_BikeArms_Ctl: case IsleScript::c_BikeArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_BikeInfo_Ctl: case IsleScript::c_BikeInfo_Ctl:
@@ -97,7 +97,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
case IsleScript::c_BikeHorn_Ctl: case IsleScript::c_BikeHorn_Ctl:
MxSoundPresenter* presenter = MxSoundPresenter* presenter =
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound"); (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
presenter->Enable(p_param.m_unk0x28); presenter->Enable(p_param.m_enabledChild);
break; break;
} }
} }
@@ -111,8 +111,8 @@ void Bike::ActivateSceneActions()
PlayMusic(JukeboxScript::c_InformationCenter_Music); PlayMusic(JukeboxScript::c_InformationCenter_Music);
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
if (!act1state->m_unk0x022) { if (!act1state->m_playedExitExplanation) {
act1state->m_unk0x022 = TRUE; act1state->m_playedExitExplanation = TRUE;
MxMatrix mat(UserActor()->GetROI()->GetLocal2World()); MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5); mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);

View File

@@ -49,11 +49,11 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
} }
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle); Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
isle->FUN_10033350(); isle->SwitchToInfocenter();
isle->SetDestLocation(LegoGameState::Area::e_infomain); isle->SetDestLocation(LegoGameState::Area::e_infomain);
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
act1state->SetUnknown18(0); act1state->SetState(Act1State::e_none);
break; break;
} }
case LegoGameState::Act::e_act2: { case LegoGameState::Act::e_act2: {
@@ -80,11 +80,11 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x100151d0 // FUNCTION: LEGO1 0x100151d0
MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 8) { if (state->GetState() != Act1State::e_towtrack) {
state->SetUnknown18(0); state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();
@@ -104,11 +104,11 @@ MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015270 // FUNCTION: LEGO1 0x10015270
MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
if (act1State->GetUnknown18() != 10) { if (act1State->GetState() != Act1State::e_ambulance) {
act1State->SetUnknown18(0); act1State->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();
@@ -128,11 +128,11 @@ MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015310 // FUNCTION: LEGO1 0x10015310
MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 10) { if (state->GetState() != Act1State::e_ambulance) {
state->SetUnknown18(0); state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();
@@ -152,9 +152,9 @@ MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x100153b0 // FUNCTION: LEGO1 0x100153b0
MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0); state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();
@@ -173,9 +173,9 @@ MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015450 // FUNCTION: LEGO1 0x10015450
MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0); state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();
@@ -195,7 +195,7 @@ MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: BETA10 0x100256e8 // FUNCTION: BETA10 0x100256e8
MxLong JailEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong JailEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
PlayCamAnim(UserActor(), FALSE, 18, TRUE); PlayCamAnim(UserActor(), FALSE, 18, TRUE);
} }

View File

@@ -45,7 +45,7 @@ MxLong BumpBouy::Notify(MxParam& p_param)
Act1State* isleState = (Act1State*) GameState()->GetState("Act1State"); Act1State* isleState = (Act1State*) GameState()->GetState("Act1State");
assert(isleState); assert(isleState);
isleState->m_unk0x018 = 5; isleState->m_state = Act1State::e_transitionToJetski;
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle); Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
assert(isle); assert(isle);

View File

@@ -89,24 +89,24 @@ void Doors::Animate(float p_time)
local10.Clear(); local10.Clear();
local58.RotateY(-local8); local58.RotateY(-local8);
local10 = m_ltDoorLocal[3]; local10 = m_ltDoorLocal[3];
m_ltDoor->FUN_100a58f0(local58); m_ltDoor->SetLocal2World(local58);
m_ltDoor->VTable0x14(); m_ltDoor->WrappedUpdateWorldData();
local58 = m_rtDoorLocal; local58 = m_rtDoorLocal;
local10.Clear(); local10.Clear();
local58.RotateY(local8); local58.RotateY(local8);
local10 = m_rtDoorLocal[3]; local10 = m_rtDoorLocal[3];
m_rtDoor->FUN_100a58f0(local58); m_rtDoor->SetLocal2World(local58);
m_rtDoor->VTable0x14(); m_rtDoor->WrappedUpdateWorldData();
m_unk0x1f4 = local8; m_unk0x1f4 = local8;
} }
if (m_unk0x158 + g_unk0x100d8e84 < p_time) { if (m_unk0x158 + g_unk0x100d8e84 < p_time) {
m_ltDoor->FUN_100a58f0(m_ltDoorLocal); m_ltDoor->SetLocal2World(m_ltDoorLocal);
m_rtDoor->FUN_100a58f0(m_rtDoorLocal); m_rtDoor->SetLocal2World(m_rtDoorLocal);
m_ltDoor->VTable0x14(); m_ltDoor->WrappedUpdateWorldData();
m_rtDoor->VTable0x14(); m_rtDoor->WrappedUpdateWorldData();
m_unk0x154 = 1; m_unk0x154 = 1;
m_actorState = c_initial; m_actorState = c_initial;
m_unk0x1f4 = 0; m_unk0x1f4 = 0;

View File

@@ -88,11 +88,11 @@ void DuneBuggy::Exit()
// FUNCTION: LEGO1 0x10068060 // FUNCTION: LEGO1 0x10068060
MxLong DuneBuggy::HandleClick() MxLong DuneBuggy::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }
FUN_10015820(TRUE, 0); Disable(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_dunecar); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_dunecar);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
@@ -121,11 +121,11 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
{ {
MxLong result = 0; MxLong result = 0;
if (p_param.m_unk0x28 == 1) { if (p_param.m_enabledChild == 1) {
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_DuneCarArms_Ctl: case IsleScript::c_DuneCarArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_DuneCarInfo_Ctl: case IsleScript::c_DuneCarInfo_Ctl:
@@ -137,7 +137,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
case IsleScript::c_DuneCarHorn_Ctl: case IsleScript::c_DuneCarHorn_Ctl:
MxSoundPresenter* presenter = MxSoundPresenter* presenter =
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound"); (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
presenter->Enable(p_param.m_unk0x28); presenter->Enable(p_param.m_enabledChild);
break; break;
} }
} }
@@ -192,8 +192,8 @@ void DuneBuggy::ActivateSceneActions()
PlayMusic(JukeboxScript::c_GarageArea_Music); PlayMusic(JukeboxScript::c_GarageArea_Music);
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
if (!act1state->m_unk0x022) { if (!act1state->m_playedExitExplanation) {
act1state->m_unk0x022 = TRUE; act1state->m_playedExitExplanation = TRUE;
MxMatrix mat(UserActor()->GetROI()->GetLocal2World()); MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5); mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);

View File

@@ -82,7 +82,7 @@ void Helicopter::Exit()
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
SpawnPlayer( SpawnPlayer(
LegoGameState::e_unk40, LegoGameState::e_helicopterSpawn,
TRUE, TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3 IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
); );
@@ -121,7 +121,7 @@ void Helicopter::Exit()
// FUNCTION: BETA10 0x1002a3db // FUNCTION: BETA10 0x1002a3db
MxLong Helicopter::HandleClick() MxLong Helicopter::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }
@@ -148,7 +148,7 @@ MxLong Helicopter::HandleClick()
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3 IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
); );
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_copter); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_copter);
FUN_10015820(TRUE, 0); Disable(TRUE, 0);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
SetActorState(c_disabled); SetActorState(c_disabled);
PlayMusic(JukeboxScript::c_Jail_Music); PlayMusic(JukeboxScript::c_Jail_Music);
@@ -189,7 +189,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
break; break;
} }
if (p_param.m_unk0x28 == 1) { if (p_param.m_enabledChild == 1) {
MxU32 isPizza = FALSE; MxU32 isPizza = FALSE;
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
@@ -203,7 +203,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
} }
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_Helicopter_TakeOff_Ctl: { case IsleScript::c_Helicopter_TakeOff_Ctl: {
@@ -214,7 +214,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
assert(act1State); assert(act1State);
if (m_state->m_unk0x08 == 0) { if (m_state->m_unk0x08 == 0) {
act1State->m_unk0x018 = 4; act1State->m_state = Act1State::e_helicopter;
m_state->m_unk0x08 = 1; m_state->m_unk0x08 = 1;
m_world->RemoveActor(this); m_world->RemoveActor(this);
InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterTakeOff_Anim, NULL); InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterTakeOff_Anim, NULL);
@@ -318,7 +318,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
assert(act1State); assert(act1State);
act1State->m_unk0x018 = 4; act1State->m_state = Act1State::e_helicopter;
SpawnPlayer( SpawnPlayer(
LegoGameState::e_unk42, LegoGameState::e_unk42,
TRUE, TRUE,
@@ -342,7 +342,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
assert(m_world && m_world->GetCameraController()); assert(m_world && m_world->GetCameraController());
m_world->GetCameraController()->SetWorldTransform(at, dir, up); m_world->GetCameraController()->SetWorldTransform(at, dir, up);
FUN_10010c30(); TransformPointOfView();
result = 1; result = 1;
break; break;
} }
@@ -359,7 +359,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
assert(act1State); assert(act1State);
act1State->m_unk0x018 = 0; act1State->m_state = Act1State::e_none;
SpawnPlayer( SpawnPlayer(
LegoGameState::e_unk41, LegoGameState::e_unk41,
TRUE, TRUE,
@@ -388,13 +388,13 @@ void Helicopter::VTable0x74(Matrix4& p_transform)
{ {
if (m_userNavFlag) { if (m_userNavFlag) {
m_roi->UpdateTransformationRelativeToParent(p_transform); m_roi->UpdateTransformationRelativeToParent(p_transform);
FUN_10010c30(); TransformPointOfView();
} }
else { else {
m_roi->FUN_100a58f0(p_transform); m_roi->SetLocal2World(p_transform);
m_roi->VTable0x14(); m_roi->WrappedUpdateWorldData();
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_10010c30(); TransformPointOfView();
} }
} }
} }
@@ -426,7 +426,7 @@ void Helicopter::Animate(float p_time)
v2 *= f2; v2 *= f2;
v2 += v1; v2 += v1;
m_world->GetCameraController()->FUN_100123e0(mat, 0); m_world->GetCameraController()->TransformPointOfView(mat, 0);
} }
else { else {
if (m_state->m_unk0x08 == 4) { if (m_state->m_unk0x08 == 4) {
@@ -455,9 +455,11 @@ void Helicopter::FUN_100042a0(const Matrix4& p_matrix)
Vector3 vec3(m_unk0x1a8[0]); // locala8 // esp+0x20 Vector3 vec3(m_unk0x1a8[0]); // locala8 // esp+0x20
Vector3 vec4(m_unk0x1a8[1]); // localb8 // esp+0x10 Vector3 vec4(m_unk0x1a8[1]); // localb8 // esp+0x10
Vector3 vec5(m_unk0x1a8[2]); // EDI Vector3 vec5(m_unk0x1a8[2]); // EDI
Vector3 vec6(m_unk0x1a8[3]); // locala0 // esp+0x28
m_world->GetCameraController()->FUN_100123b0(local48); // the typecast makes this function match for unknown reasons
Vector3 vec6((const float*) m_unk0x1a8[3]); // locala0 // esp+0x28
m_world->GetCameraController()->GetPointOfView(local48);
m_unk0x1a8.SetIdentity(); m_unk0x1a8.SetIdentity();
local90 = p_matrix; local90 = p_matrix;

Some files were not shown because too many files have changed in this diff Show More