mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 02:21:15 +00:00
Merge remote-tracking branch 'isle/master' into merge
This commit is contained in:
commit
69bac21488
@ -192,12 +192,8 @@ target_include_directories(roi PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include"
|
||||
target_link_libraries(roi PRIVATE viewmanager Vec::Vec)
|
||||
|
||||
add_library(geom STATIC
|
||||
LEGO1/lego/sources/geom/legobox.cpp
|
||||
LEGO1/lego/sources/geom/legoedge.cpp
|
||||
LEGO1/lego/sources/geom/legomesh.cpp
|
||||
LEGO1/lego/sources/geom/legosphere.cpp
|
||||
LEGO1/lego/sources/geom/legounkown100db7f4.cpp
|
||||
LEGO1/lego/sources/geom/legovertex.cpp
|
||||
LEGO1/lego/sources/geom/legoweedge.cpp
|
||||
LEGO1/lego/sources/geom/legowegedge.cpp
|
||||
)
|
||||
@ -206,6 +202,18 @@ set_property(TARGET geom PROPERTY ARCHIVE_OUTPUT_NAME "geom$<$<CONFIG:Debug>:d>"
|
||||
target_include_directories(geom PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(geom PRIVATE)
|
||||
|
||||
add_library(shape STATIC
|
||||
LEGO1/lego/sources/shape/legocolor.cpp
|
||||
LEGO1/lego/sources/shape/legobox.cpp
|
||||
LEGO1/lego/sources/shape/legomesh.cpp
|
||||
LEGO1/lego/sources/shape/legosphere.cpp
|
||||
LEGO1/lego/sources/shape/legovertex.cpp
|
||||
)
|
||||
register_lego1_target(shape)
|
||||
set_property(TARGET shape PROPERTY ARCHIVE_OUTPUT_NAME "shape$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(shape PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(shape PRIVATE)
|
||||
|
||||
add_library(anim STATIC
|
||||
LEGO1/lego/sources/anim/legoanim.cpp
|
||||
)
|
||||
@ -215,7 +223,6 @@ target_include_directories(anim PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include"
|
||||
target_link_libraries(anim PRIVATE)
|
||||
|
||||
add_library(misc STATIC
|
||||
LEGO1/lego/sources/misc/legocolor.cpp
|
||||
LEGO1/lego/sources/misc/legocontainer.cpp
|
||||
LEGO1/lego/sources/misc/legoimage.cpp
|
||||
LEGO1/lego/sources/misc/legostorage.cpp
|
||||
@ -287,7 +294,6 @@ add_library(omni STATIC
|
||||
LEGO1/omni/src/stream/mxdsbuffer.cpp
|
||||
LEGO1/omni/src/stream/mxdschunk.cpp
|
||||
LEGO1/omni/src/stream/mxdsfile.cpp
|
||||
LEGO1/omni/src/stream/mxdssource.cpp
|
||||
LEGO1/omni/src/stream/mxdssubscriber.cpp
|
||||
LEGO1/omni/src/stream/mxio.cpp
|
||||
LEGO1/omni/src/stream/mxramstreamcontroller.cpp
|
||||
@ -295,8 +301,6 @@ add_library(omni STATIC
|
||||
LEGO1/omni/src/stream/mxstreamchunk.cpp
|
||||
LEGO1/omni/src/stream/mxstreamcontroller.cpp
|
||||
LEGO1/omni/src/stream/mxstreamer.cpp
|
||||
LEGO1/omni/src/stream/mxstreamlist.cpp
|
||||
LEGO1/omni/src/stream/mxstreamprovider.cpp
|
||||
LEGO1/omni/src/system/mxautolock.cpp
|
||||
LEGO1/omni/src/system/mxcriticalsection.cpp
|
||||
LEGO1/omni/src/system/mxscheduler.cpp
|
||||
@ -465,7 +469,7 @@ target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni/include/actions")
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(lego1 PRIVATE tglrl viewmanager realtime mxdirectx roi geom anim Vec::Vec dxguid d3drm_guid misc 3dmanager miniaudio omni)
|
||||
target_link_libraries(lego1 PRIVATE tglrl viewmanager realtime mxdirectx roi geom anim Vec::Vec dxguid d3drm_guid misc 3dmanager miniaudio omni shape)
|
||||
|
||||
foreach(tgt IN LISTS lego1_targets)
|
||||
target_include_directories(${tgt} PRIVATE $<$<BOOL:${ISLE_D3DRM_FROM_WINE}>:$<TARGET_PROPERTY:d3drm-wine,INTERFACE_INCLUDE_DIRECTORIES>>)
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "legopathactor.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d9b60
|
||||
// VTABLE: BETA10 0x101b85b8
|
||||
// SIZE 0x194
|
||||
class Act2Brick : public LegoPathActor {
|
||||
public:
|
||||
@ -14,6 +15,7 @@ class Act2Brick : public LegoPathActor {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1007a360
|
||||
// FUNCTION: BETA10 0x10013290
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0438
|
||||
|
||||
@ -4,12 +4,14 @@
|
||||
#include "legoentity.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d53a8
|
||||
// VTABLE: BETA10 0x101bd570
|
||||
// SIZE 0x68
|
||||
class Act2PoliceStation : public LegoEntity {
|
||||
public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e200
|
||||
// FUNCTION: BETA10 0x100a8e00
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03fc
|
||||
|
||||
@ -47,12 +47,14 @@ class Act3List : private list<Act3ListElement> {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4fc8
|
||||
// VTABLE: BETA10 0x101b89b8
|
||||
// SIZE 0x0c
|
||||
class Act3State : public LegoState {
|
||||
public:
|
||||
Act3State() { m_unk0x08 = 0; }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e300
|
||||
// FUNCTION: BETA10 0x10017e10
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03f0
|
||||
@ -79,6 +81,7 @@ class Act3State : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d9628
|
||||
// VTABLE: BETA10 0x101b8940
|
||||
// SIZE 0x4274
|
||||
class Act3 : public LegoWorld {
|
||||
public:
|
||||
@ -89,6 +92,7 @@ class Act3 : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10072510
|
||||
// FUNCTION: BETA10 0x10017550
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f013c
|
||||
|
||||
@ -13,6 +13,7 @@ class LegoWorld;
|
||||
// VTABLE: LEGO1 0x100d7668 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d7738 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101b8a98 LegoPathActor
|
||||
// VTABLE: BETA10 0x101b8b88 LegoAnimActor
|
||||
// SIZE 0x178
|
||||
class Act3Actor : public LegoAnimActor {
|
||||
public:
|
||||
@ -30,6 +31,7 @@ class Act3Actor : public LegoAnimActor {
|
||||
Act3Actor();
|
||||
|
||||
// FUNCTION: LEGO1 0x100431b0
|
||||
// FUNCTION: BETA10 0x1001d320
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03ac
|
||||
@ -145,6 +147,7 @@ class Act3Shark : public LegoAnimActor {
|
||||
// FUNCTION: LEGO1 0x100430d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// Does not exist in BETA10
|
||||
// STRING: LEGO1 0x100f03a0
|
||||
return "Act3Shark";
|
||||
}
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d72a0
|
||||
// VTABLE: BETA10 0x101b91a8
|
||||
// SIZE 0x24
|
||||
class AmbulanceMissionState : public LegoState {
|
||||
public:
|
||||
AmbulanceMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x10037600
|
||||
// FUNCTION: BETA10 0x100246c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f00e8
|
||||
@ -100,6 +102,7 @@ class AmbulanceMissionState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d71a8
|
||||
// VTABLE: BETA10 0x101b8f70
|
||||
// SIZE 0x184
|
||||
class Ambulance : public IslePathActor {
|
||||
public:
|
||||
@ -110,6 +113,7 @@ class Ambulance : public IslePathActor {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10035fa0
|
||||
// FUNCTION: BETA10 0x100240b0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03c4
|
||||
|
||||
@ -5,12 +5,14 @@
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d9808
|
||||
// VTABLE: BETA10 0x101b91e8
|
||||
// SIZE 0x164
|
||||
class Bike : public IslePathActor {
|
||||
public:
|
||||
Bike();
|
||||
|
||||
// FUNCTION: LEGO1 0x100766f0
|
||||
// FUNCTION: BETA10 0x10024bd0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03d0
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
class LegoEventNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5c88
|
||||
// VTABLE: BETA10 0x101b9320
|
||||
// SIZE 0x68
|
||||
class BuildingEntity : public LegoEntity {
|
||||
public:
|
||||
@ -15,6 +16,7 @@ class BuildingEntity : public LegoEntity {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10014f20
|
||||
// FUNCTION: BETA10 0x10025f50
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f07e8
|
||||
|
||||
@ -6,9 +6,11 @@
|
||||
class LegoEventNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d48a8
|
||||
// VTABLE: BETA10 0x101bd818
|
||||
// SIZE 0x68
|
||||
class RaceStandsEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000efa0
|
||||
// FUNCTION: BETA10 0x100a9820
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// at LEGO1 0x100f0300, needs no annotation
|
||||
@ -28,10 +30,12 @@ class RaceStandsEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4a18
|
||||
// VTABLE: BETA10 0x101bd7b0
|
||||
// SIZE 0x68
|
||||
class BeachHouseEntity : public BuildingEntity {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000ee80
|
||||
// FUNCTION: BETA10 0x100a96f0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0314
|
||||
@ -51,10 +55,12 @@ class BeachHouseEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4ab0
|
||||
// VTABLE: BETA10 0x101bd748
|
||||
// SIZE 0x68
|
||||
class PoliceEntity : public BuildingEntity {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000ed60
|
||||
// FUNCTION: BETA10 0x100a95c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0328
|
||||
@ -74,10 +80,12 @@ class PoliceEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4b90
|
||||
// VTABLE: BETA10 0x101bd610
|
||||
// SIZE 0x68
|
||||
class InfoCenterEntity : public BuildingEntity {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000ea00
|
||||
// FUNCTION: BETA10 0x100a9230
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f035c
|
||||
@ -97,10 +105,12 @@ class InfoCenterEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d5068
|
||||
// VTABLE: BETA10 0x101bd678
|
||||
// SIZE 0x68
|
||||
class HospitalEntity : public BuildingEntity {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000ec40
|
||||
// FUNCTION: BETA10 0x100a9360
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0338
|
||||
@ -120,9 +130,11 @@ class HospitalEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d50c0
|
||||
// VTABLE: BETA10 0x101bd880
|
||||
// SIZE 0x68
|
||||
class CaveEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000f1e0
|
||||
// FUNCTION: BETA10 0x100a9950
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// at LEGO1 0x100f0300, needs no annotation
|
||||
@ -142,9 +154,11 @@ class CaveEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d5200
|
||||
// VTABLE: BETA10 0x101bd8e8
|
||||
// SIZE 0x68
|
||||
class JailEntity : public BuildingEntity {
|
||||
// FUNCTION: LEGO1 0x1000f0c0
|
||||
// FUNCTION: BETA10 0x100a9a80
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// at LEGO1 0x100f0300, needs no annotation
|
||||
@ -164,10 +178,12 @@ class JailEntity : public BuildingEntity {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d5258
|
||||
// VTABLE: BETA10 0x101bd6e0
|
||||
// SIZE 0x68
|
||||
class GasStationEntity : public BuildingEntity {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000eb20
|
||||
// FUNCTION: BETA10 0x100a9490
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0348
|
||||
|
||||
@ -6,6 +6,8 @@
|
||||
|
||||
// VTABLE: LEGO1 0x100d6790 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d6860 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101b9430 LegoPathActor
|
||||
// VTABLE: BETA10 0x101b9520 LegoAnimActor
|
||||
// SIZE 0x174
|
||||
class BumpBouy : public LegoAnimActor {
|
||||
public:
|
||||
@ -14,6 +16,7 @@ class BumpBouy : public LegoAnimActor {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100274f0
|
||||
// FUNCTION: BETA10 0x10026790
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0394
|
||||
|
||||
@ -6,12 +6,14 @@
|
||||
class LegoROI;
|
||||
|
||||
// VTABLE: LEGO1 0x100d4788
|
||||
// VTABLE: BETA10 0x101bcfb8
|
||||
// SIZE 0x1f8
|
||||
class Doors : public LegoPathActor {
|
||||
public:
|
||||
Doors() : m_unk0x154(0), m_ltDoor(NULL), m_rtDoor(NULL), m_unk0x1f4(0) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e430
|
||||
// FUNCTION: BETA10 0x100a7f20
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03e8
|
||||
|
||||
@ -5,12 +5,14 @@
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d8f98
|
||||
// VTABLE: BETA10 0x101b95c0
|
||||
// SIZE 0x16c
|
||||
class DuneBuggy : public IslePathActor {
|
||||
public:
|
||||
DuneBuggy();
|
||||
|
||||
// FUNCTION: LEGO1 0x10067c30
|
||||
// FUNCTION: BETA10 0x100278a0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0410
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
class LegoControlManagerNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5f20
|
||||
// VTABLE: BETA10 0x101b96f0
|
||||
// SIZE 0xfc
|
||||
class ElevatorBottom : public LegoWorld {
|
||||
public:
|
||||
@ -17,6 +18,7 @@ class ElevatorBottom : public LegoWorld {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10017f20
|
||||
// FUNCTION: BETA10 0x10028130
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04ac
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
class MxStillPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100d46e0
|
||||
// VTABLE: BETA10 0x101b9818
|
||||
// SIZE 0x24
|
||||
class GasStationState : public LegoState {
|
||||
public:
|
||||
@ -21,6 +22,7 @@ class GasStationState : public LegoState {
|
||||
GasStationState();
|
||||
|
||||
// FUNCTION: LEGO1 0x100061d0
|
||||
// FUNCTION: BETA10 0x10029f50
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0174
|
||||
@ -54,6 +56,7 @@ class GasStationState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4650
|
||||
// VTABLE: BETA10 0x101b97a0
|
||||
// SIZE 0x128
|
||||
class GasStation : public LegoWorld {
|
||||
public:
|
||||
@ -64,6 +67,7 @@ class GasStation : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10004780
|
||||
// FUNCTION: BETA10 0x10029d40
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0168
|
||||
|
||||
@ -8,12 +8,14 @@
|
||||
class Act3;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5418
|
||||
// VTABLE: BETA10 0x101bcf98
|
||||
// SIZE 0x0c
|
||||
class HelicopterState : public LegoState {
|
||||
public:
|
||||
HelicopterState() : m_unk0x08(0) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e0d0
|
||||
// FUNCTION: BETA10 0x100a7cc0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0144
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
class MxStillPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100da328
|
||||
// VTABLE: BETA10 0x101b99b0
|
||||
// SIZE 0x3e4
|
||||
class HistoryBook : public LegoWorld {
|
||||
public:
|
||||
@ -17,6 +18,7 @@ class HistoryBook : public LegoWorld {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10082390
|
||||
// FUNCTION: BETA10 0x1002c1c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04bc
|
||||
|
||||
@ -12,6 +12,7 @@ class MxEndActionNotificationParam;
|
||||
class MxStillPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100d97a0
|
||||
// VTABLE: BETA10 0x101b9ad8
|
||||
// SIZE 0x18
|
||||
class HospitalState : public LegoState {
|
||||
public:
|
||||
@ -24,6 +25,7 @@ class HospitalState : public LegoState {
|
||||
~HospitalState() override {}
|
||||
|
||||
// FUNCTION: LEGO1 0x10076400
|
||||
// FUNCTION: BETA10 0x1002e3c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0480
|
||||
@ -53,6 +55,7 @@ class HospitalState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d9730
|
||||
// VTABLE: BETA10 0x101b9a60
|
||||
// SIZE 0x12c
|
||||
class Hospital : public LegoWorld {
|
||||
public:
|
||||
@ -63,6 +66,7 @@ class Hospital : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x100746b0
|
||||
// FUNCTION: BETA10 0x1002e1a0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0490
|
||||
|
||||
@ -13,6 +13,7 @@ class MxStillPresenter;
|
||||
class LegoControlManagerNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d93a8
|
||||
// VTABLE: BETA10 0x101b9b88
|
||||
// SIZE 0x94
|
||||
class InfocenterState : public LegoState {
|
||||
public:
|
||||
@ -20,6 +21,7 @@ class InfocenterState : public LegoState {
|
||||
~InfocenterState() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x10071840
|
||||
// FUNCTION: BETA10 0x10031ee0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04dc
|
||||
@ -73,6 +75,7 @@ struct InfocenterMapEntry {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d9338
|
||||
// VTABLE: BETA10 0x101b9b10
|
||||
// SIZE 0x1d8
|
||||
class Infocenter : public LegoWorld {
|
||||
public:
|
||||
@ -102,6 +105,7 @@ class Infocenter : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1006eb40
|
||||
// FUNCTION: BETA10 0x100316e0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04ec
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
class LegoControlManagerNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d72d8
|
||||
// VTABLE: BETA10 0x101b9bc0
|
||||
// SIZE 0xfc
|
||||
class InfocenterDoor : public LegoWorld {
|
||||
public:
|
||||
@ -16,6 +17,7 @@ class InfocenterDoor : public LegoWorld {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100377b0
|
||||
// FUNCTION: BETA10 0x10032790
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f049c
|
||||
|
||||
@ -24,6 +24,7 @@ class SkateBoard;
|
||||
class TowTrack;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7028
|
||||
// VTABLE: BETA10 0x101b9d40
|
||||
// SIZE 0x26c
|
||||
class Act1State : public LegoState {
|
||||
public:
|
||||
@ -36,6 +37,7 @@ class Act1State : public LegoState {
|
||||
Act1State();
|
||||
|
||||
// FUNCTION: LEGO1 0x100338a0
|
||||
// FUNCTION: BETA10 0x10036040
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0154
|
||||
|
||||
@ -10,12 +10,14 @@ class MxEndActionNotificationParam;
|
||||
class MxNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5178
|
||||
// VTABLE: BETA10 0x101bd150
|
||||
// SIZE 0x7c
|
||||
class IsleActor : public LegoActor {
|
||||
public:
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e660
|
||||
// FUNCTION: BETA10 0x100a8300
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f07dc
|
||||
|
||||
@ -12,6 +12,7 @@ class LegoWorld;
|
||||
class LegoPathStructNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d4398
|
||||
// VTABLE: BETA10 0x101b9090
|
||||
// SIZE 0x160
|
||||
class IslePathActor : public LegoPathActor {
|
||||
public:
|
||||
@ -91,6 +92,7 @@ class IslePathActor : public LegoPathActor {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10002ea0
|
||||
// FUNCTION: BETA10 0x10023fa0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0104
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
class LegoControlManagerNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9ec8
|
||||
// VTABLE: BETA10 0x101ba540
|
||||
// SIZE 0x164
|
||||
class Jetski : public IslePathActor {
|
||||
public:
|
||||
Jetski();
|
||||
|
||||
// FUNCTION: LEGO1 0x1007e430
|
||||
// FUNCTION: BETA10 0x10037910
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03d8
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
class LegoControlManagerNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d4a90
|
||||
// VTABLE: BETA10 0x101ba6e8
|
||||
// SIZE 0x10
|
||||
class JukeBoxState : public LegoState {
|
||||
public:
|
||||
@ -24,6 +25,7 @@ class JukeBoxState : public LegoState {
|
||||
JukeBoxState() : m_music(e_pasquell), m_active(FALSE) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000f310
|
||||
// FUNCTION: BETA10 0x100389c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f02bc
|
||||
@ -47,6 +49,7 @@ class JukeBoxState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8958
|
||||
// VTABLE: BETA10 0x101ba670
|
||||
// SIZE 0x104
|
||||
class JukeBox : public LegoWorld {
|
||||
public:
|
||||
@ -57,6 +60,7 @@ class JukeBox : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1005d6f0
|
||||
// FUNCTION: BETA10 0x100388d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f02cc
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include "legoentity.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100da8a0
|
||||
// VTABLE: BETA10 0x101ba728
|
||||
// SIZE 0x6c
|
||||
class JukeBoxEntity : public LegoEntity {
|
||||
public:
|
||||
@ -14,6 +15,7 @@ class JukeBoxEntity : public LegoEntity {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10085cc0
|
||||
// FUNCTION: BETA10 0x10039480
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f02f0
|
||||
|
||||
@ -11,6 +11,7 @@ class LegoPathStructNotificationParam;
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d4a70
|
||||
// VTABLE: BETA10 0x101ba910
|
||||
// SIZE 0x10
|
||||
class LegoAct2State : public LegoState {
|
||||
public:
|
||||
@ -22,6 +23,7 @@ class LegoAct2State : public LegoState {
|
||||
~LegoAct2State() override {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000df80
|
||||
// FUNCTION: BETA10 0x1003c7e0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0428
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
class LegoCacheSound;
|
||||
|
||||
// VTABLE: LEGO1 0x100d6d68
|
||||
// VTABLE: BETA10 0x101ba970
|
||||
// SIZE 0x78
|
||||
class LegoActor : public LegoEntity {
|
||||
public:
|
||||
@ -24,6 +25,7 @@ class LegoActor : public LegoEntity {
|
||||
~LegoActor() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d210
|
||||
// FUNCTION: BETA10 0x10012760
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0124
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legolocations.h"
|
||||
#include "legomain.h"
|
||||
#include "legostate.h"
|
||||
#include "legotraninfolist.h"
|
||||
#include "mxcore.h"
|
||||
@ -48,6 +49,7 @@ struct AnimInfo {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8d80
|
||||
// VTABLE: BETA10 0x101bae58
|
||||
// SIZE 0x1c
|
||||
class AnimState : public LegoState {
|
||||
public:
|
||||
@ -55,6 +57,7 @@ class AnimState : public LegoState {
|
||||
~AnimState() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x10065070
|
||||
// FUNCTION: BETA10 0x1004afe0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0460
|
||||
@ -90,6 +93,7 @@ class AnimState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8c18
|
||||
// VTABLE: BETA10 0x101bab60
|
||||
// SIZE 0x500
|
||||
class LegoAnimationManager : public MxCore {
|
||||
public:
|
||||
@ -127,6 +131,12 @@ class LegoAnimationManager : public MxCore {
|
||||
MxBool m_unk0x14; // 0x14
|
||||
};
|
||||
|
||||
enum PlayMode {
|
||||
e_unk0 = 0,
|
||||
e_unk1,
|
||||
e_unk2
|
||||
};
|
||||
|
||||
LegoAnimationManager();
|
||||
~LegoAnimationManager() override;
|
||||
|
||||
@ -134,6 +144,7 @@ class LegoAnimationManager : public MxCore {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1005ec80
|
||||
// FUNCTION: BETA10 0x100483d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f7508
|
||||
@ -151,7 +162,7 @@ class LegoAnimationManager : public MxCore {
|
||||
void Resume();
|
||||
void FUN_1005f6d0(MxBool p_unk0x400);
|
||||
void EnableCamAnims(MxBool p_enableCamAnims);
|
||||
MxResult LoadWorldInfo(MxS32 p_worldId);
|
||||
MxResult LoadWorldInfo(LegoOmni::World p_worldId);
|
||||
MxBool FindVehicle(const char* p_name, MxU32& p_index);
|
||||
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
|
||||
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
|
||||
@ -165,7 +176,7 @@ class LegoAnimationManager : public MxCore {
|
||||
MxU32 p_objectId,
|
||||
MxMatrix* p_matrix,
|
||||
MxBool p_param3,
|
||||
MxBool p_param4,
|
||||
MxU8 p_param4,
|
||||
LegoROI* p_roi,
|
||||
MxBool p_param6,
|
||||
MxBool p_param7,
|
||||
@ -247,7 +258,7 @@ class LegoAnimationManager : public MxCore {
|
||||
void FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404);
|
||||
void FUN_10064b50(MxLong p_time);
|
||||
|
||||
MxS32 m_worldId; // 0x08
|
||||
LegoOmni::World m_worldId; // 0x08
|
||||
MxU16 m_animCount; // 0x0c
|
||||
MxU16 m_unk0x0e; // 0x0e
|
||||
MxU16 m_unk0x10; // 0x10
|
||||
|
||||
@ -58,6 +58,7 @@ class LegoBuildingManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x1002f930
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// not in BETA10
|
||||
// STRING: LEGO1 0x100f37d0
|
||||
return "LegoBuildingManager";
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ class LegoCacheSound : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10006580
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// not in BETA10
|
||||
// STRING: LEGO1 0x100f01c4
|
||||
return "LegoCacheSound";
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include "mxpoint32.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d57b0
|
||||
// VTABLE: BETA10 0x101bb748
|
||||
// SIZE 0xc8
|
||||
class LegoCameraController : public LegoPointOfViewController {
|
||||
public:
|
||||
@ -16,6 +17,7 @@ class LegoCameraController : public LegoPointOfViewController {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+04
|
||||
|
||||
// FUNCTION: LEGO1 0x10011ec0
|
||||
// FUNCTION: BETA10 0x1006a950
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0850
|
||||
|
||||
@ -45,8 +45,6 @@ class LegoVehicleBuildState : public LegoState {
|
||||
// SYNTHETIC: LEGO1 0x100260a0
|
||||
// LegoVehicleBuildState::`scalar deleting destructor'
|
||||
|
||||
// TODO: Most likely getters/setters are not used according to BETA.
|
||||
|
||||
Playlist m_unk0x08[4]; // 0x08
|
||||
|
||||
// This can be one of the following:
|
||||
@ -93,6 +91,7 @@ class LegoCarBuild : public LegoWorld {
|
||||
~LegoCarBuild() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x10022940
|
||||
// FUNCTION: BETA10 0x10070090
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0504
|
||||
|
||||
@ -53,6 +53,8 @@ class LegoCharacterManager {
|
||||
|
||||
MxResult Write(LegoStorage* p_storage);
|
||||
MxResult Read(LegoStorage* p_storage);
|
||||
const char* GetActorName(MxS32 p_index);
|
||||
MxU32 GetNumActors();
|
||||
LegoROI* GetActorROI(const char* p_name, MxBool p_createEntity);
|
||||
|
||||
void Init();
|
||||
|
||||
@ -40,6 +40,7 @@ class LegoControlManagerNotificationParam : public LegoEventNotificationParam {
|
||||
// LegoControlManagerNotificationParam::~LegoControlManagerNotificationParam
|
||||
|
||||
// VTABLE: LEGO1 0x100d6a80
|
||||
// VTABLE: BETA10 0x101bc610
|
||||
class LegoControlManager : public MxCore {
|
||||
public:
|
||||
LegoControlManager();
|
||||
|
||||
@ -6,7 +6,9 @@
|
||||
// VTABLE: LEGO1 0x100d6c00 LegoAnimActor
|
||||
// VTABLE: LEGO1 0x100d6c10 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d6cdc LegoExtraActor
|
||||
// VTABLE: BETA10 0x101bc2a0 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101bc2b8 LegoPathActor
|
||||
// VTABLE: BETA10 0x101bc3a8 LegoExtraActor
|
||||
// SIZE 0x1dc
|
||||
class LegoExtraActor : public virtual LegoAnimActor {
|
||||
public:
|
||||
@ -21,6 +23,7 @@ class LegoExtraActor : public virtual LegoAnimActor {
|
||||
~LegoExtraActor() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1002b7b0
|
||||
// FUNCTION: BETA10 0x100831a0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f3204
|
||||
|
||||
@ -28,6 +28,7 @@ class MxTransitionManager;
|
||||
class ViewLODListManager;
|
||||
|
||||
// VTABLE: LEGO1 0x100d8638
|
||||
// VTABLE: BETA10 0x101bc8b8
|
||||
// SIZE 0x140
|
||||
class LegoOmni : public MxOmni {
|
||||
public:
|
||||
@ -37,16 +38,39 @@ class LegoOmni : public MxOmni {
|
||||
c_clearScreen = 0x04
|
||||
};
|
||||
|
||||
enum World {
|
||||
e_undefined = -1,
|
||||
e_act1 = 0,
|
||||
e_imain,
|
||||
e_icube,
|
||||
e_ireg,
|
||||
e_ielev,
|
||||
e_iisle,
|
||||
e_hosp,
|
||||
e_police,
|
||||
e_gmain,
|
||||
e_bldh,
|
||||
e_bldd,
|
||||
e_bldj,
|
||||
e_bldr,
|
||||
e_racc,
|
||||
e_racj,
|
||||
e_act2,
|
||||
e_act3,
|
||||
e_test,
|
||||
e_numWorlds = e_test + 2 // count e_undefined
|
||||
};
|
||||
|
||||
// SIZE 0x1c
|
||||
struct WorldContainer {
|
||||
// FUNCTION: LEGO1 0x1005ac40
|
||||
WorldContainer()
|
||||
{
|
||||
m_id = -1;
|
||||
m_id = e_undefined;
|
||||
m_atomId = NULL;
|
||||
}
|
||||
|
||||
WorldContainer(MxS32 p_id, const char* p_key, MxAtomId* p_atomId)
|
||||
WorldContainer(World p_id, const char* p_key, MxAtomId* p_atomId)
|
||||
{
|
||||
m_id = p_id;
|
||||
|
||||
@ -66,10 +90,10 @@ class LegoOmni : public MxOmni {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxS32 GetId() { return m_id; }
|
||||
World GetId() { return m_id; }
|
||||
const char* GetKey() { return m_key; }
|
||||
|
||||
MxS32 m_id; // 0x00
|
||||
World m_id; // 0x00
|
||||
char m_key[20]; // 0x04
|
||||
MxAtomId* m_atomId; // 0x18
|
||||
};
|
||||
@ -80,6 +104,7 @@ class LegoOmni : public MxOmni {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10058aa0
|
||||
// FUNCTION: BETA10 0x1008f830
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f671c
|
||||
@ -111,9 +136,9 @@ class LegoOmni : public MxOmni {
|
||||
void CreateBackgroundAudio();
|
||||
void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId);
|
||||
MxResult RegisterWorlds();
|
||||
const char* GetWorldName(MxU32 p_id);
|
||||
MxAtomId* GetWorldAtom(MxU32 p_id);
|
||||
MxS32 GetWorldId(const char* p_key);
|
||||
const char* GetWorldName(LegoOmni::World p_id);
|
||||
MxAtomId* GetWorldAtom(LegoOmni::World p_id);
|
||||
World GetWorldId(const char* p_key);
|
||||
void DeleteAction();
|
||||
|
||||
static MxS32 GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
||||
|
||||
@ -39,6 +39,7 @@ class LegoPathActor : public LegoActor {
|
||||
~LegoPathActor() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c430
|
||||
// FUNCTION: BETA10 0x10012790
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0114
|
||||
|
||||
@ -34,6 +34,7 @@ struct LegoPathCtrlEdgeCompare {
|
||||
typedef set<LegoPathCtrlEdge*, LegoPathCtrlEdgeCompare> LegoPathCtrlEdgeSet;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7d60
|
||||
// VTABLE: BETA10 0x101bde20
|
||||
// SIZE 0x40
|
||||
class LegoPathController : public MxCore {
|
||||
public:
|
||||
@ -69,6 +70,7 @@ class LegoPathController : public MxCore {
|
||||
MxResult Tickle() override; // vtable+08
|
||||
|
||||
// FUNCTION: LEGO1 0x10045110
|
||||
// FUNCTION: BETA10 0x100ba560
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f11b8
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOPLANTMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legomain.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
class LegoEntity;
|
||||
@ -30,15 +31,18 @@ class LegoPlantManager : public MxCore {
|
||||
// FUNCTION: LEGO1 0x10026290
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// 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.
|
||||
// STRING: LEGO1 0x100f318c
|
||||
return "LegoPlantManager";
|
||||
}
|
||||
|
||||
void Init();
|
||||
void LoadWorldInfo(MxS32 p_worldId);
|
||||
void Reset(MxS32 p_worldId);
|
||||
void LoadWorldInfo(LegoOmni::World p_worldId);
|
||||
void Reset(LegoOmni::World p_worldId);
|
||||
MxResult Write(LegoStorage* p_storage);
|
||||
MxResult Read(LegoStorage* p_storage);
|
||||
MxS32 GetNumPlants();
|
||||
MxBool SwitchColor(LegoEntity* p_entity);
|
||||
MxBool SwitchVariant(LegoEntity* p_entity);
|
||||
MxBool SwitchSound(LegoEntity* p_entity);
|
||||
@ -47,6 +51,7 @@ class LegoPlantManager : public MxCore {
|
||||
MxU32 GetAnimationId(LegoEntity* p_entity);
|
||||
MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state);
|
||||
LegoPlantInfo* GetInfoArray(MxS32& p_length);
|
||||
LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId);
|
||||
MxBool FUN_10026c50(LegoEntity* p_entity);
|
||||
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length);
|
||||
MxResult FUN_10026410();
|
||||
@ -54,14 +59,15 @@ class LegoPlantManager : public MxCore {
|
||||
void FUN_10027200();
|
||||
|
||||
static void SetCustomizeAnimFile(const char* p_value);
|
||||
|
||||
// FUNCTION: BETA10 0x1007ffa0
|
||||
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100262a0
|
||||
// LegoPlantManager::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
LegoEntity* CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId);
|
||||
void RemovePlant(MxS32 p_index, MxS32 p_worldId);
|
||||
void RemovePlant(MxS32 p_index, LegoOmni::World p_worldId);
|
||||
void FUN_10026860(MxS32 p_index);
|
||||
LegoPlantInfo* GetInfo(LegoEntity* p_entity);
|
||||
MxBool FUN_10026c80(MxS32 p_index);
|
||||
@ -71,11 +77,11 @@ class LegoPlantManager : public MxCore {
|
||||
static MxS32 g_maxMove[4];
|
||||
static MxU32 g_maxSound;
|
||||
|
||||
MxS32 m_worldId; // 0x08
|
||||
undefined m_unk0x0c; // 0x0c
|
||||
AnimEntry* m_entries[5]; // 0x10
|
||||
MxS8 m_numEntries; // 0x24
|
||||
LegoWorld* m_world; // 0x28
|
||||
LegoOmni::World m_worldId; // 0x08
|
||||
undefined m_unk0x0c; // 0x0c
|
||||
AnimEntry* m_entries[5]; // 0x10
|
||||
MxS8 m_numEntries; // 0x24
|
||||
LegoWorld* m_world; // 0x28
|
||||
};
|
||||
|
||||
#endif // LEGOPLANTMANAGER_H
|
||||
|
||||
@ -105,6 +105,11 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
|
||||
// VTABLE: LEGO1 0x100d5a30 LegoAnimActor
|
||||
// VTABLE: LEGO1 0x100d5a40 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d5b10 LegoRaceMap
|
||||
// VTABLE: BETA10 0x101be8a0 LegoCarRaceActor
|
||||
// VTABLE: BETA10 0x101be8c8 LegoRaceActor
|
||||
// VTABLE: BETA10 0x101be8d0 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101be8e8 LegoPathActor
|
||||
// VTABLE: BETA10 0x101be9d8 LegoRaceMap
|
||||
// SIZE 0x1dc
|
||||
class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap {
|
||||
public:
|
||||
@ -114,6 +119,7 @@ class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x10013e90
|
||||
// FUNCTION: BETA10 0x100cd1f0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f053c
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOWORLD_H
|
||||
|
||||
#include "legoentity.h"
|
||||
#include "legomain.h"
|
||||
#include "legopathcontrollerlist.h"
|
||||
#include "mxpresenterlist.h"
|
||||
#include "roi/legoroi.h"
|
||||
@ -104,12 +105,12 @@ class LegoWorld : public LegoEntity {
|
||||
LegoCameraController* GetCamera() { return m_cameraController; }
|
||||
|
||||
LegoEntityList* GetEntityList() { return m_entityList; }
|
||||
MxS32 GetWorldId() { return m_worldId; }
|
||||
LegoOmni::World GetWorldId() { return m_worldId; }
|
||||
MxBool GetUnknown0xd0Empty() { return m_set0xd0.empty(); }
|
||||
list<LegoROI*>& GetROIList() { return m_roiList; }
|
||||
LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnim; }
|
||||
|
||||
void SetWorldId(MxS32 p_worldId) { m_worldId = p_worldId; }
|
||||
void SetWorldId(LegoOmni::World p_worldId) { m_worldId = p_worldId; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1001dee0
|
||||
// LegoWorld::`scalar deleting destructor'
|
||||
@ -125,7 +126,7 @@ class LegoWorld : public LegoEntity {
|
||||
MxPresenterList m_controlPresenters; // 0xb8
|
||||
MxCoreSet m_set0xd0; // 0xd0
|
||||
list<LegoROI*> m_roiList; // 0xe0
|
||||
MxS32 m_worldId; // 0xec
|
||||
LegoOmni::World m_worldId; // 0xec
|
||||
|
||||
// name verified by BETA10 0x100c7f59
|
||||
LegoHideAnimPresenter* m_hideAnim; // 0xf0
|
||||
|
||||
@ -5,12 +5,14 @@
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d7090
|
||||
// VTABLE: BETA10 0x101bf3d8
|
||||
// SIZE 0x16c
|
||||
class Motocycle : public IslePathActor {
|
||||
public:
|
||||
Motocycle();
|
||||
|
||||
// FUNCTION: LEGO1 0x10035840
|
||||
// FUNCTION: BETA10 0x100e83c0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f38e8
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
class MxAudioPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9fe8
|
||||
// VTABLE: BETA10 0x101bf508
|
||||
// SIZE 0x150
|
||||
class MxBackgroundAudioManager : public MxCore {
|
||||
public:
|
||||
@ -19,6 +20,7 @@ class MxBackgroundAudioManager : public MxCore {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1007eb70
|
||||
// FUNCTION: BETA10 0x100e9af0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f7ac4
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "mxcompositepresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d96b0
|
||||
// VTABLE: BETA10 0x101bf540
|
||||
// SIZE 0x50
|
||||
class MxCompositeMediaPresenter : public MxCompositePresenter {
|
||||
public:
|
||||
@ -13,6 +14,7 @@ class MxCompositeMediaPresenter : public MxCompositePresenter {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10073f10
|
||||
// FUNCTION: BETA10 0x100ea920
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f02d4
|
||||
|
||||
@ -8,6 +8,7 @@ class LegoControlManagerNotificationParam;
|
||||
class MxVideoPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7b88
|
||||
// VTABLE: BETA10 0x101bf5d0
|
||||
// SIZE 0x5c
|
||||
class MxControlPresenter : public MxCompositePresenter {
|
||||
public:
|
||||
@ -15,6 +16,7 @@ class MxControlPresenter : public MxCompositePresenter {
|
||||
~MxControlPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x10044000
|
||||
// FUNCTION: BETA10 0x100ebf80
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0514
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
class MxVideoPresenter;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7ea0
|
||||
// VTABLE: BETA10 0x101bf670
|
||||
// SIZE 0x900
|
||||
class MxTransitionManager : public MxCore {
|
||||
public:
|
||||
@ -20,6 +21,7 @@ class MxTransitionManager : public MxCore {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1004b950
|
||||
// FUNCTION: BETA10 0x100ed8e0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return "MxTransitionManager";
|
||||
|
||||
@ -11,6 +11,7 @@ class PizzeriaState;
|
||||
class SkateBoard;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7408
|
||||
// VTABLE: BETA10 0x101bf750
|
||||
// SIZE 0xb4
|
||||
class PizzaMissionState : public LegoState {
|
||||
public:
|
||||
@ -126,6 +127,7 @@ class PizzaMissionState : public LegoState {
|
||||
PizzaMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x10039290
|
||||
// FUNCTION: BETA10 0x100efa20
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f00d4
|
||||
@ -173,6 +175,7 @@ class PizzaMissionState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d7380
|
||||
// VTABLE: BETA10 0x101bf6b0
|
||||
// SIZE 0x9c
|
||||
class Pizza : public IsleActor {
|
||||
public:
|
||||
@ -182,6 +185,7 @@ class Pizza : public IsleActor {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10037f90
|
||||
// FUNCTION: BETA10 0x100ef300
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f038c
|
||||
|
||||
@ -9,12 +9,14 @@
|
||||
class PizzaMissionState;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5ee8
|
||||
// VTABLE: BETA10 0x101bf788
|
||||
// SIZE 0x58
|
||||
class PizzeriaState : public LegoState {
|
||||
public:
|
||||
PizzeriaState();
|
||||
|
||||
// FUNCTION: LEGO1 0x10017c20
|
||||
// FUNCTION: BETA10 0x100f0020
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0370
|
||||
@ -46,12 +48,14 @@ class PizzeriaState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d5520
|
||||
// VTABLE: BETA10 0x101bd0b0
|
||||
// SIZE 0x84
|
||||
class Pizzeria : public IsleActor {
|
||||
public:
|
||||
Pizzeria() : m_pizzeriaState(NULL) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000e780
|
||||
// FUNCTION: BETA10 0x100a81f0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0380
|
||||
|
||||
@ -12,6 +12,7 @@ class LegoEventNotificationParam;
|
||||
class MxDSAction;
|
||||
|
||||
// VTABLE: LEGO1 0x100d8af0
|
||||
// VTABLE: BETA10 0x101bf838
|
||||
// SIZE 0x10
|
||||
class PoliceState : public LegoState {
|
||||
public:
|
||||
@ -19,6 +20,7 @@ class PoliceState : public LegoState {
|
||||
~PoliceState() override {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e860
|
||||
// FUNCTION: BETA10 0x100f0d40
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0444
|
||||
@ -48,6 +50,7 @@ class PoliceState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8a80
|
||||
// VTABLE: BETA10 0x101bf7c0
|
||||
// SIZE 0x110
|
||||
class Police : public LegoWorld {
|
||||
public:
|
||||
@ -57,6 +60,7 @@ class Police : public LegoWorld {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e1e0
|
||||
// FUNCTION: BETA10 0x100f0c50
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0450
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d6918
|
||||
// VTABLE: BETA10 0x101bf878
|
||||
// SIZE 0x164
|
||||
class RaceCar : public IslePathActor {
|
||||
public:
|
||||
@ -12,6 +13,7 @@ class RaceCar : public IslePathActor {
|
||||
~RaceCar() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x10028270
|
||||
// FUNCTION: BETA10 0x100f1150
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03e0
|
||||
|
||||
@ -9,12 +9,14 @@ class MxAtomId;
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d6d28
|
||||
// VTABLE: BETA10 0x101bfb08
|
||||
// SIZE 0x30
|
||||
class RadioState : public LegoState {
|
||||
public:
|
||||
RadioState();
|
||||
|
||||
// FUNCTION: LEGO1 0x1002cf60
|
||||
// FUNCTION: BETA10 0x100f2850
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04f8
|
||||
@ -47,6 +49,7 @@ class RadioState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d6d10
|
||||
// VTABLE: BETA10 0x101bfaf0
|
||||
// SIZE 0x10
|
||||
class Radio : public MxCore {
|
||||
public:
|
||||
@ -56,6 +59,7 @@ class Radio : public MxCore {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x1002c8e0
|
||||
// FUNCTION: BETA10 0x100f2670
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f328c
|
||||
|
||||
@ -11,6 +11,7 @@ class LegoControlManagerNotificationParam;
|
||||
class LegoPathStructNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d9928
|
||||
// VTABLE: BETA10 0x101bfb48
|
||||
// SIZE 0x2d0
|
||||
class RegistrationBook : public LegoWorld {
|
||||
public:
|
||||
@ -21,6 +22,7 @@ class RegistrationBook : public LegoWorld {
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x10076e10
|
||||
// FUNCTION: BETA10 0x100f4000
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f04c8
|
||||
|
||||
@ -9,12 +9,14 @@ class LegoControlManagerNotificationParam;
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d53f8
|
||||
// VTABLE: BETA10 0x101bcf78
|
||||
// SIZE 0x0c
|
||||
class ScoreState : public LegoState {
|
||||
public:
|
||||
ScoreState() : m_playCubeTutorial(TRUE) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000de40
|
||||
// FUNCTION: BETA10 0x100a7a70
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0084
|
||||
@ -49,6 +51,7 @@ class ScoreState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d4018
|
||||
// VTABLE: BETA10 0x101bfbd8
|
||||
// SIZE 0x104
|
||||
class Score : public LegoWorld {
|
||||
public:
|
||||
@ -57,6 +60,7 @@ class Score : public LegoWorld {
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100010c0
|
||||
// FUNCTION: BETA10 0x100f4f20
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0050
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
class Act1State;
|
||||
|
||||
// VTABLE: LEGO1 0x100d55f0
|
||||
// VTABLE: BETA10 0x101bfc70
|
||||
// SIZE 0x168
|
||||
class SkateBoard : public IslePathActor {
|
||||
public:
|
||||
@ -14,6 +15,7 @@ class SkateBoard : public IslePathActor {
|
||||
~SkateBoard() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1000fdd0
|
||||
// FUNCTION: BETA10 0x100f55d0
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f041c
|
||||
|
||||
@ -8,12 +8,14 @@
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d7fd8
|
||||
// VTABLE: BETA10 0x101bfee0
|
||||
// SIZE 0x28
|
||||
class TowTrackMissionState : public LegoState {
|
||||
public:
|
||||
TowTrackMissionState();
|
||||
|
||||
// FUNCTION: LEGO1 0x1004dfa0
|
||||
// FUNCTION: BETA10 0x100f8920
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f00bc
|
||||
@ -102,6 +104,7 @@ class TowTrackMissionState : public LegoState {
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d7ee0
|
||||
// VTABLE: BETA10 0x101bfdc0
|
||||
// SIZE 0x180
|
||||
class TowTrack : public IslePathActor {
|
||||
public:
|
||||
@ -109,6 +112,7 @@ class TowTrack : public IslePathActor {
|
||||
~TowTrack() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1004c7c0
|
||||
// FUNCTION: BETA10 0x100f8440
|
||||
const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f03b8
|
||||
|
||||
@ -93,6 +93,7 @@ Act3Actor::Act3CopDest g_copDest[5] = {
|
||||
Mx3DPointFloat Act3Actor::g_unk0x10104ef0 = Mx3DPointFloat(0.0, 5.0, 0.0);
|
||||
|
||||
// FUNCTION: LEGO1 0x1003fa50
|
||||
// FUNCTION: BETA10 0x10017fb8
|
||||
Act3Actor::Act3Actor()
|
||||
{
|
||||
m_unk0x1c = 0;
|
||||
|
||||
@ -597,7 +597,8 @@ void Ambulance::FUN_10037250()
|
||||
// FUNCTION: BETA10 0x100241a0
|
||||
void Ambulance::PlayAnimation(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, FALSE, NULL, FALSE, FALSE, FALSE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, FALSE, FALSE, TRUE);
|
||||
m_lastAnimation = p_objectId;
|
||||
}
|
||||
|
||||
@ -605,7 +606,8 @@ void Ambulance::PlayAnimation(IsleScript::Script p_objectId)
|
||||
// FUNCTION: BETA10 0x10024440
|
||||
void Ambulance::PlayFinalAnimation(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, TRUE, NULL, FALSE, FALSE, TRUE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk1, NULL, FALSE, FALSE, TRUE, TRUE);
|
||||
m_lastAnimation = p_objectId;
|
||||
}
|
||||
|
||||
|
||||
@ -117,7 +117,16 @@ void Bike::ActivateSceneActions()
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sns006in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
IsleScript::c_sns006in_RunAnim,
|
||||
&mat,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,16 @@ void DuneBuggy::ActivateSceneActions()
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sns005in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
IsleScript::c_sns005in_RunAnim,
|
||||
&mat,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,36 +386,34 @@ void Helicopter::VTable0x74(Matrix4& p_transform)
|
||||
// FUNCTION: LEGO1 0x10003ee0
|
||||
void Helicopter::Animate(float p_time)
|
||||
{
|
||||
MxU32 state = m_state->GetUnkown8();
|
||||
switch (state) {
|
||||
default:
|
||||
LegoPathActor::Animate(p_time);
|
||||
return;
|
||||
case 4:
|
||||
case 5:
|
||||
float f = m_unk0x1f0 - p_time + 3000;
|
||||
if (m_state->m_unk0x08 == 4 || m_state->m_unk0x08 == 5) {
|
||||
float f = m_unk0x1f0 - p_time + 3000.0f;
|
||||
if (f >= 0) {
|
||||
float f2 = f / 3000 + 1;
|
||||
float f2 = f / -3000.0f + 1;
|
||||
if (f2 < 0) {
|
||||
f2 = 0;
|
||||
}
|
||||
if (1.0f < f2) {
|
||||
if (f2 > 1.0f) {
|
||||
f2 = 1.0f;
|
||||
}
|
||||
Vector3 v(m_unk0x160[3]);
|
||||
|
||||
MxMatrix mat;
|
||||
Vector3 v2(m_unk0x1a8[3]);
|
||||
float* loc = m_unk0x1a8[3];
|
||||
Vector3 v1(m_unk0x160[3]);
|
||||
Vector3 v2(mat[3]);
|
||||
Vector3 v3(m_unk0x1a8[3]);
|
||||
|
||||
mat.SetIdentity();
|
||||
m_unk0x1f4.BETA_1004aaa0(mat, f2);
|
||||
v2.SetVector(loc);
|
||||
v2 -= v;
|
||||
|
||||
v2 = v3;
|
||||
v2 -= v1;
|
||||
v2 *= f2;
|
||||
v2 += v;
|
||||
v2 += v1;
|
||||
|
||||
m_world->GetCamera()->FUN_100123e0(mat, 0);
|
||||
}
|
||||
else {
|
||||
if (state == 4) {
|
||||
if (m_state->m_unk0x08 == 4) {
|
||||
((Act3*) m_world)->FUN_10073400();
|
||||
}
|
||||
else {
|
||||
@ -425,6 +423,9 @@ void Helicopter::Animate(float p_time)
|
||||
LegoPathActor::m_actorState = c_disabled;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LegoPathActor::Animate(p_time);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100042a0
|
||||
|
||||
@ -582,7 +582,8 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8
|
||||
}
|
||||
|
||||
if (state != NULL && state->m_unk0x4d && !state->m_unk0x4e) {
|
||||
if (AnimationManager()->FUN_10060dc0(anim, NULL, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE) ==
|
||||
if (AnimationManager()
|
||||
->FUN_10060dc0(anim, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, TRUE, TRUE) ==
|
||||
SUCCESS) {
|
||||
state->m_unk0x4e = TRUE;
|
||||
camAnim = FALSE;
|
||||
|
||||
@ -157,8 +157,17 @@ void Jetski::ActivateSceneActions()
|
||||
MxMatrix mat(user->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.6, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sjs007in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
IsleScript::c_sjs007in_RunAnim,
|
||||
&mat,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,16 @@ void Motocycle::ActivateSceneActions()
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sns006in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
IsleScript::c_sns006in_RunAnim,
|
||||
&mat,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -586,7 +586,8 @@ void Pizza::PlayAction(MxU32 p_objectId, MxBool p_param7)
|
||||
InvokeAction(Extra::e_stop, *g_isleScript, m_unk0x8c, NULL);
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, FALSE, NULL, FALSE, p_param7, TRUE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, p_param7, TRUE, TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10039030
|
||||
|
||||
@ -157,8 +157,17 @@ void SkateBoard::ActivateSceneActions()
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.2, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sns008in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
IsleScript::c_sns008in_RunAnim,
|
||||
&mat,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -567,7 +567,8 @@ void TowTrack::FUN_1004dbe0()
|
||||
// FUNCTION: BETA10 0x100f86a0
|
||||
void TowTrack::PlayFinalAnimation(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, FALSE, NULL, FALSE, FALSE, FALSE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, FALSE, FALSE, TRUE);
|
||||
m_lastAnimation = p_objectId;
|
||||
}
|
||||
|
||||
@ -575,7 +576,8 @@ void TowTrack::PlayFinalAnimation(IsleScript::Script p_objectId)
|
||||
void TowTrack::FUN_1004dcb0(IsleScript::Script p_objectId)
|
||||
{
|
||||
AnimationManager()->FUN_1005f6d0(TRUE);
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, TRUE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk1, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
m_lastAnimation = p_objectId;
|
||||
}
|
||||
|
||||
|
||||
@ -417,7 +417,7 @@ void LegoAnimationManager::Suspend()
|
||||
m_animState = (AnimState*) GameState()->CreateState("AnimState");
|
||||
}
|
||||
|
||||
if (m_worldId == 0) {
|
||||
if (m_worldId == LegoOmni::e_act1) {
|
||||
m_animState->InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ void LegoAnimationManager::Resume()
|
||||
void LegoAnimationManager::Init()
|
||||
{
|
||||
m_unk0x402 = FALSE;
|
||||
m_worldId = -1;
|
||||
m_worldId = LegoOmni::e_undefined;
|
||||
m_animCount = 0;
|
||||
m_anims = NULL;
|
||||
m_unk0x18 = 0;
|
||||
@ -581,7 +581,7 @@ void LegoAnimationManager::EnableCamAnims(MxBool p_enableCamAnims)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005f720
|
||||
MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
|
||||
MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
MxS32 i, j, k;
|
||||
@ -616,7 +616,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
|
||||
m_animState = (AnimState*) GameState()->CreateState("AnimState");
|
||||
}
|
||||
|
||||
if (m_worldId == 0) {
|
||||
if (m_worldId == LegoOmni::e_act1) {
|
||||
m_animState->InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
|
||||
}
|
||||
|
||||
@ -624,7 +624,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(MxS32 p_worldId)
|
||||
|
||||
LegoFile file;
|
||||
|
||||
if (p_worldId == -1) {
|
||||
if (p_worldId == LegoOmni::e_undefined) {
|
||||
result = SUCCESS;
|
||||
goto done;
|
||||
}
|
||||
@ -962,7 +962,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
if (m_worldId != -1 && p_index < m_animCount && m_tranInfoList != NULL) {
|
||||
if (m_worldId != LegoOmni::e_undefined && p_index < m_animCount && m_tranInfoList != NULL) {
|
||||
PurgeExtra(FALSE);
|
||||
FUN_10062770();
|
||||
|
||||
@ -1139,7 +1139,7 @@ MxResult LegoAnimationManager::FUN_10060dc0(
|
||||
MxU32 p_objectId,
|
||||
MxMatrix* p_matrix,
|
||||
MxBool p_param3,
|
||||
MxBool p_param4,
|
||||
MxU8 p_param4,
|
||||
LegoROI* p_roi,
|
||||
MxBool p_param6,
|
||||
MxBool p_param7,
|
||||
@ -1160,10 +1160,10 @@ MxResult LegoAnimationManager::FUN_10060dc0(
|
||||
MxBool unk0x0a;
|
||||
|
||||
switch (p_param4) {
|
||||
case FALSE:
|
||||
case e_unk0:
|
||||
unk0x0a = m_anims[i].m_unk0x0a;
|
||||
break;
|
||||
case TRUE:
|
||||
case e_unk1:
|
||||
unk0x0a = TRUE;
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -222,6 +222,24 @@ MxResult LegoCharacterManager::Read(LegoStorage* p_storage)
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100834d0
|
||||
// FUNCTION: BETA10 0x100742eb
|
||||
const char* LegoCharacterManager::GetActorName(MxS32 p_index)
|
||||
{
|
||||
if (p_index < sizeOfArray(g_actorInfo)) {
|
||||
return g_actorInfo[p_index].m_name;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100834f0
|
||||
// FUNCTION: BETA10 0x1007432a
|
||||
MxU32 LegoCharacterManager::GetNumActors()
|
||||
{
|
||||
return sizeOfArray(g_actorInfo);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10083500
|
||||
// FUNCTION: BETA10 0x10074345
|
||||
LegoROI* LegoCharacterManager::GetActorROI(const char* p_name, MxBool p_createEntity)
|
||||
|
||||
@ -408,7 +408,7 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
|
||||
Read(&fileStorage, &actArea);
|
||||
|
||||
if (m_currentAct == 0) {
|
||||
if (m_currentAct == e_act1) {
|
||||
m_unk0x42c = e_undefined;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -52,6 +52,7 @@ MxS32 LegoPlantManager::g_maxMove[4] = {3, 3, 3, 3};
|
||||
MxU32 g_plantAnimationId[4] = {30, 33, 36, 39};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3188
|
||||
// GLOBAL: BETA10 0x101f4e70
|
||||
char* LegoPlantManager::g_customizeAnimFile = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x10103180
|
||||
@ -65,6 +66,7 @@ LegoPlantManager::LegoPlantManager()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100262c0
|
||||
// FUNCTION: BETA10 0x100c5002
|
||||
LegoPlantManager::~LegoPlantManager()
|
||||
{
|
||||
delete[] g_customizeAnimFile;
|
||||
@ -74,18 +76,20 @@ LegoPlantManager::~LegoPlantManager()
|
||||
// FUNCTION: BETA10 0x100c4f90
|
||||
void LegoPlantManager::Init()
|
||||
{
|
||||
// In BETA10 this appears to be LegoPlantManager::LegoPlantManager()
|
||||
|
||||
for (MxS32 i = 0; i < sizeOfArray(g_plantInfo); i++) {
|
||||
g_plantInfo[i] = g_plantInfoInit[i];
|
||||
}
|
||||
|
||||
m_worldId = -1;
|
||||
m_worldId = LegoOmni::e_undefined;
|
||||
m_unk0x0c = 0;
|
||||
m_numEntries = 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10026360
|
||||
// FUNCTION: BETA10 0x100c5032
|
||||
void LegoPlantManager::LoadWorldInfo(MxS32 p_worldId)
|
||||
void LegoPlantManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
||||
{
|
||||
m_worldId = p_worldId;
|
||||
LegoWorld* world = CurrentWorld();
|
||||
@ -98,7 +102,8 @@ void LegoPlantManager::LoadWorldInfo(MxS32 p_worldId)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100263a0
|
||||
void LegoPlantManager::Reset(MxS32 p_worldId)
|
||||
// FUNCTION: BETA10 0x100c5093
|
||||
void LegoPlantManager::Reset(LegoOmni::World p_worldId)
|
||||
{
|
||||
MxU32 i;
|
||||
DeleteObjects(g_sndAnimScript, SndanimScript::c_AnimC1, SndanimScript::c_AnimBld18);
|
||||
@ -113,7 +118,7 @@ void LegoPlantManager::Reset(MxS32 p_worldId)
|
||||
RemovePlant(i, p_worldId);
|
||||
}
|
||||
|
||||
m_worldId = -1;
|
||||
m_worldId = LegoOmni::e_undefined;
|
||||
m_unk0x0c = 0;
|
||||
}
|
||||
|
||||
@ -205,7 +210,7 @@ LegoPlantInfo* LegoPlantManager::GetInfoArray(MxS32& p_length)
|
||||
|
||||
// FUNCTION: LEGO1 0x10026590
|
||||
// FUNCTION: BETA10 0x100c561e
|
||||
LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS32 p_worldId)
|
||||
LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, LegoOmni::World p_worldId)
|
||||
{
|
||||
LegoEntity* entity = NULL;
|
||||
|
||||
@ -244,7 +249,7 @@ LegoEntity* LegoPlantManager::CreatePlant(MxS32 p_index, LegoWorld* p_world, MxS
|
||||
|
||||
// FUNCTION: LEGO1 0x100266c0
|
||||
// FUNCTION: BETA10 0x100c5859
|
||||
void LegoPlantManager::RemovePlant(MxS32 p_index, MxS32 p_worldId)
|
||||
void LegoPlantManager::RemovePlant(MxS32 p_index, LegoOmni::World p_worldId)
|
||||
{
|
||||
if (p_index < sizeOfArray(g_plantInfo)) {
|
||||
MxU32 world = 1 << (MxU8) p_worldId;
|
||||
@ -344,6 +349,13 @@ void LegoPlantManager::FUN_10026860(MxS32 p_index)
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100268d0
|
||||
// FUNCTION: BETA10 0x100c5c7a
|
||||
MxS32 LegoPlantManager::GetNumPlants()
|
||||
{
|
||||
return sizeOfArray(g_plantInfo);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100268e0
|
||||
// FUNCTION: BETA10 0x100c5c95
|
||||
LegoPlantInfo* LegoPlantManager::GetInfo(LegoEntity* p_entity)
|
||||
|
||||
@ -1,25 +1,30 @@
|
||||
#include "legonavcontroller.h"
|
||||
|
||||
#include "3dmanager/lego3dmanager.h"
|
||||
#include "act3.h"
|
||||
#include "infocenter.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocameracontroller.h"
|
||||
#include "legocharactermanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legolocations.h"
|
||||
#include "legomain.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legosoundmanager.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxdebug.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxtimer.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "mxutilities.h"
|
||||
#include "realtime/realtime.h"
|
||||
#include "realtime/realtimeview.h"
|
||||
#include "viewmanager/viewmanager.h"
|
||||
|
||||
#include <vec.h>
|
||||
|
||||
@ -74,19 +79,28 @@ float LegoNavController::g_defrotSensitivity = 0.4f;
|
||||
MxBool LegoNavController::g_defuseRotationalVel = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66a0
|
||||
MxBool g_unk0x100f66a0 = FALSE;
|
||||
MxU32 g_changeLight = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66a4
|
||||
MxBool g_unk0x100f66a4 = FALSE;
|
||||
MxS32 g_locationCalcStep = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66a8
|
||||
MxS32 g_nextLocation = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66ac
|
||||
MxBool g_resetPlants = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66b0
|
||||
undefined4 g_unk0x100f66b0 = 0;
|
||||
MxS32 g_animationCalcStep = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66b4
|
||||
undefined4 g_unk0x100f66b4 = 0;
|
||||
MxS32 g_nextAnimation = 0;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66b8
|
||||
MxU32 g_switchAct = FALSE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66bc
|
||||
undefined4 g_unk0x100f66bc = 2;
|
||||
LegoAnimationManager::PlayMode g_unk0x100f66bc = LegoAnimationManager::e_unk2;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66c0
|
||||
char g_debugPassword[] = "OGEL";
|
||||
@ -94,11 +108,14 @@ char g_debugPassword[] = "OGEL";
|
||||
// GLOBAL: LEGO1 0x100f66c8
|
||||
char* g_currentInput = g_debugPassword;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66cc
|
||||
MxS32 g_unk0x100f66cc = -1;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66d0
|
||||
MxBool g_musicEnabled = TRUE;
|
||||
MxBool g_enableMusic = TRUE;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f66d4
|
||||
undefined4 g_unk0x100f66d4 = 1;
|
||||
MxU32 g_fpsEnabled = TRUE;
|
||||
|
||||
// FUNCTION: LEGO1 0x10054ac0
|
||||
LegoNavController::LegoNavController()
|
||||
@ -588,8 +605,8 @@ MxResult LegoNavController::ProcessKeyboardInput()
|
||||
bool2 = TRUE;
|
||||
}
|
||||
|
||||
MxFloat val = keyFlags & 0x10 ? 1.0f : 4.0f;
|
||||
MxFloat val2 = keyFlags & 0x10 ? 1.0f : 2.0f;
|
||||
MxFloat val = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 4.0f;
|
||||
MxFloat val2 = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 2.0f;
|
||||
|
||||
if (!bool1) {
|
||||
m_targetRotationalVel = CalculateNewTargetVel(hMax, m_hMax / 2, m_maxRotationalVel);
|
||||
@ -606,14 +623,16 @@ MxResult LegoNavController::ProcessKeyboardInput()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10055a60
|
||||
// FUNCTION: LEGO1 0x10055a60
|
||||
// FUNCTION: BETA10 0x1009c712
|
||||
MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationKeyPress) {
|
||||
m_unk0x5d = TRUE;
|
||||
MxU8 key = ((LegoEventNotificationParam&) p_param).GetKey();
|
||||
|
||||
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
||||
case VK_PAUSE:
|
||||
switch (key) {
|
||||
case VK_PAUSE: // Pause game
|
||||
if (Lego()->IsPaused()) {
|
||||
Lego()->Resume();
|
||||
}
|
||||
@ -621,32 +640,95 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
Lego()->Pause();
|
||||
}
|
||||
break;
|
||||
case VK_ESCAPE: {
|
||||
case VK_ESCAPE: { // Return to infocenter
|
||||
LegoWorld* currentWorld = CurrentWorld();
|
||||
if (currentWorld != NULL) {
|
||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
assert(state);
|
||||
|
||||
if (currentWorld) {
|
||||
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (infocenterState && infocenterState->GetUnknown0x74() != 8 && currentWorld->Escape()) {
|
||||
if (state != NULL && state->m_unk0x74 != 8 && currentWorld->Escape()) {
|
||||
BackgroundAudioManager()->Stop();
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
infocenterState->SetUnknown0x74(8);
|
||||
state->m_unk0x74 = 8;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VK_SPACE:
|
||||
case VK_SPACE: // Interrupt/end animations or free navigation
|
||||
AnimationManager()->FUN_10061010(TRUE);
|
||||
break;
|
||||
case 'Z':
|
||||
// TODO
|
||||
case 'Z': { // Make nearby plants "dance"
|
||||
LegoOmni* omni = Lego();
|
||||
|
||||
if (omni->GetCurrentWorld() != NULL && omni->GetCurrentWorld()->GetWorldId() == LegoOmni::e_act1) {
|
||||
LegoVideoManager* videoMgr = LegoOmni::GetInstance()->GetVideoManager();
|
||||
ViewROI* roi = videoMgr->GetViewROI();
|
||||
ViewManager* view = videoMgr->Get3DManager()->GetLego3DView()->GetViewManager();
|
||||
LegoPlantManager* plantMgr = LegoOmni::GetInstance()->GetPlantManager();
|
||||
Mx3DPointFloat viewPosition(roi->GetWorldPosition());
|
||||
MxS32 numPlants = plantMgr->GetNumPlants();
|
||||
|
||||
for (MxS32 i = 0; i < numPlants; i++) {
|
||||
LegoEntity* entity = plantMgr->CreatePlant(i, NULL, LegoOmni::e_act1);
|
||||
|
||||
if (entity != NULL && !entity->GetUnknown0x10IsSet(LegoEntity::c_altBit1)) {
|
||||
LegoROI* roi = entity->GetROI();
|
||||
|
||||
if (roi != NULL && roi->GetVisibility()) {
|
||||
const BoundingBox& box = roi->GetWorldBoundingBox();
|
||||
|
||||
if (view->IsBoundingBoxInFrustum(box)) {
|
||||
Mx3DPointFloat roiPosition(roi->GetWorldPosition());
|
||||
roiPosition -= viewPosition;
|
||||
|
||||
if (roiPosition.LenSquared() < 2000.0 || roi->GetUnknown0xe0() > 0) {
|
||||
entity->ClickAnimation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'k':
|
||||
case 'm':
|
||||
// TODO
|
||||
case 'm': { // Keys need to be uppercased to trigger this code, but seems dysfunctional
|
||||
if (g_unk0x100f66cc == -1) {
|
||||
g_unk0x100f66cc = 0;
|
||||
}
|
||||
else {
|
||||
CharacterManager()->ReleaseActor(CharacterManager()->GetActorName(g_unk0x100f66cc));
|
||||
|
||||
if (key == 'k') {
|
||||
g_unk0x100f66cc++;
|
||||
if (g_unk0x100f66cc >= CharacterManager()->GetNumActors()) {
|
||||
g_unk0x100f66cc = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
g_unk0x100f66cc--;
|
||||
if (g_unk0x100f66cc < 0) {
|
||||
g_unk0x100f66cc = CharacterManager()->GetNumActors() - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LegoROI* roi = CharacterManager()->GetActorROI(CharacterManager()->GetActorName(g_unk0x100f66cc), TRUE);
|
||||
if (roi != NULL) {
|
||||
MxMatrix mat;
|
||||
ViewROI* viewRoi = LegoOmni::GetInstance()->GetVideoManager()->GetViewROI();
|
||||
const float* position = viewRoi->GetWorldPosition();
|
||||
const float* direction = viewRoi->GetWorldDirection();
|
||||
const float* up = viewRoi->GetWorldUp();
|
||||
CalcLocalTransform(position, direction, up, mat);
|
||||
mat.TranslateBy(direction[0] * 2.0f, direction[1] - 1.0, direction[2] * 2.0f);
|
||||
roi->UpdateTransformationRelativeToParent(mat);
|
||||
}
|
||||
break;
|
||||
case '{': {
|
||||
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (infocenterState && infocenterState->HasRegistered()) {
|
||||
}
|
||||
case '{': { // Saves the game. Can't actually be triggered
|
||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (state && state->HasRegistered()) {
|
||||
GameState()->Save(0);
|
||||
}
|
||||
break;
|
||||
@ -657,15 +739,15 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
// password "protected" debug shortcuts
|
||||
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
||||
case VK_TAB:
|
||||
VideoManager()->ToggleFPS(g_unk0x100f66d4);
|
||||
if (g_unk0x100f66d4 == 0) {
|
||||
g_unk0x100f66d4 = 1;
|
||||
m_unk0x5d = FALSE;
|
||||
break;
|
||||
VideoManager()->ToggleFPS(g_fpsEnabled);
|
||||
if (g_fpsEnabled) {
|
||||
g_fpsEnabled = FALSE;
|
||||
}
|
||||
else {
|
||||
g_unk0x100f66d4 = 0;
|
||||
g_fpsEnabled = TRUE;
|
||||
}
|
||||
default:
|
||||
m_unk0x5d = FALSE;
|
||||
break;
|
||||
case '0':
|
||||
case '1':
|
||||
@ -677,17 +759,130 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
// TODO
|
||||
if (g_changeLight && key <= '1') {
|
||||
LegoROI* roi = VideoManager()->GetViewROI();
|
||||
Tgl::FloatMatrix4 matrix;
|
||||
Matrix4 in(matrix);
|
||||
roi->GetLocalTransform(in);
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->SetLightTransform(key - '0', matrix);
|
||||
g_changeLight = FALSE;
|
||||
}
|
||||
else if (g_locationCalcStep) {
|
||||
if (g_locationCalcStep == 1) {
|
||||
// Calculate base offset into g_locations
|
||||
g_nextLocation = (key - '0') * 10;
|
||||
g_locationCalcStep = 2;
|
||||
}
|
||||
else {
|
||||
// Add to base g_locations offset
|
||||
g_nextLocation += key - '0';
|
||||
g_locationCalcStep = 0;
|
||||
UpdateLocation(g_nextLocation);
|
||||
}
|
||||
}
|
||||
else if (g_animationCalcStep) {
|
||||
if (g_animationCalcStep == 1) {
|
||||
// Calculate base offset into possible animation object IDs (up to 999)
|
||||
g_nextAnimation = (key - '0') * 100;
|
||||
g_animationCalcStep = 2;
|
||||
}
|
||||
else if (g_animationCalcStep == 2) {
|
||||
// Add to animation object ID offset
|
||||
g_nextAnimation += (key - '0') * 10;
|
||||
g_animationCalcStep = 3;
|
||||
}
|
||||
else {
|
||||
// Add to animation object ID offset
|
||||
g_nextAnimation += key - '0';
|
||||
g_animationCalcStep = 0;
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
g_nextAnimation,
|
||||
NULL,
|
||||
TRUE,
|
||||
g_unk0x100f66bc,
|
||||
NULL,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
|
||||
g_unk0x100f66bc = LegoAnimationManager::e_unk2;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_switchAct && key >= '1' && key <= '5') {
|
||||
switch (GameState()->GetCurrentAct()) {
|
||||
case LegoGameState::e_act1:
|
||||
GameState()->m_currentArea = LegoGameState::e_isle;
|
||||
break;
|
||||
case LegoGameState::e_act2:
|
||||
GameState()->m_currentArea = LegoGameState::e_act2main;
|
||||
break;
|
||||
case LegoGameState::e_act3:
|
||||
GameState()->m_currentArea = LegoGameState::e_act3script;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (key) {
|
||||
case '1':
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act1);
|
||||
GameState()->SwitchArea(LegoGameState::e_isle);
|
||||
break;
|
||||
case '2':
|
||||
GameState()->SwitchArea(LegoGameState::e_act2main);
|
||||
break;
|
||||
case '3':
|
||||
GameState()->SwitchArea(LegoGameState::e_act3script);
|
||||
break;
|
||||
case '4': {
|
||||
Act3State* act3State = (Act3State*) GameState()->GetState("Act3State");
|
||||
if (act3State == NULL) {
|
||||
act3State = new Act3State();
|
||||
assert(act3State);
|
||||
GameState()->RegisterState(act3State);
|
||||
}
|
||||
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act3);
|
||||
act3State->m_unk0x08 = 2;
|
||||
GameState()->m_currentArea = LegoGameState::e_act3script;
|
||||
GameState()->SwitchArea(LegoGameState::e_infomain);
|
||||
break;
|
||||
}
|
||||
case '5': {
|
||||
Act3State* act3State = (Act3State*) GameState()->GetState("Act3State");
|
||||
if (act3State == NULL) {
|
||||
act3State = new Act3State();
|
||||
assert(act3State);
|
||||
GameState()->RegisterState(act3State);
|
||||
}
|
||||
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act3);
|
||||
act3State->m_unk0x08 = 3;
|
||||
GameState()->m_currentArea = LegoGameState::e_act3script;
|
||||
GameState()->SwitchArea(LegoGameState::e_infomain);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_switchAct = FALSE;
|
||||
}
|
||||
else {
|
||||
MxDSAction action;
|
||||
action.SetObjectId(key - '0');
|
||||
action.SetAtomId(MxAtomId("q:\\lego\\media\\model\\common\\common", e_lowerCase2));
|
||||
LegoOmni::GetInstance()->Start(&action);
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
if (g_unk0x100f66b0 == 1) {
|
||||
Lego()->SetUnknown13c(TRUE);
|
||||
AnimationManager()->FUN_10060570(1);
|
||||
g_unk0x100f66b0 = 0;
|
||||
if (g_animationCalcStep == 1) {
|
||||
Lego()->m_unk0x13c = TRUE;
|
||||
AnimationManager()->FUN_10060570(TRUE);
|
||||
g_animationCalcStep = 0;
|
||||
}
|
||||
else {
|
||||
LegoWorld* world = CurrentWorld();
|
||||
if (world) {
|
||||
if (world != NULL) {
|
||||
MxDSAction action;
|
||||
action.SetObjectId(1);
|
||||
action.SetAtomId(world->GetAtomId());
|
||||
@ -696,7 +891,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
g_unk0x100f66a4 = TRUE;
|
||||
g_locationCalcStep = 1;
|
||||
break;
|
||||
case 'D':
|
||||
m_unk0x60 = -1.0;
|
||||
@ -705,73 +900,132 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
RealtimeView::SetUserMaxLOD(0.0);
|
||||
break;
|
||||
case 'G':
|
||||
g_unk0x100f66b4 = 1;
|
||||
g_switchAct = TRUE;
|
||||
break;
|
||||
case 'H':
|
||||
RealtimeView::SetUserMaxLOD(5.0);
|
||||
break;
|
||||
case 'I':
|
||||
// TODO
|
||||
case 'I': {
|
||||
LegoROI* roi = VideoManager()->GetViewROI();
|
||||
MxMatrix mat;
|
||||
mat.SetIdentity();
|
||||
mat.RotateX(0.2618f);
|
||||
roi->WrappedVTable0x24(mat);
|
||||
break;
|
||||
case 'J':
|
||||
// TODO
|
||||
}
|
||||
case 'J': {
|
||||
LegoROI* roi = VideoManager()->GetViewROI();
|
||||
MxMatrix mat;
|
||||
mat.SetIdentity();
|
||||
mat.RotateZ(0.2618f);
|
||||
roi->WrappedVTable0x24(mat);
|
||||
break;
|
||||
case 'K':
|
||||
// TODO
|
||||
}
|
||||
case 'K': {
|
||||
MxMatrix mat;
|
||||
LegoROI* roi = LegoOmni::GetInstance()->GetVideoManager()->GetViewROI();
|
||||
mat.SetIdentity();
|
||||
mat.RotateZ(-0.2618f);
|
||||
roi->WrappedVTable0x24(mat);
|
||||
break;
|
||||
}
|
||||
case 'L':
|
||||
g_unk0x100f66a0 = TRUE;
|
||||
g_changeLight = TRUE;
|
||||
break;
|
||||
case 'M':
|
||||
// TODO
|
||||
case 'M': {
|
||||
LegoROI* roi = LegoOmni::GetInstance()->GetVideoManager()->GetViewROI();
|
||||
MxMatrix mat;
|
||||
mat.SetIdentity();
|
||||
mat.RotateX(-0.2618f);
|
||||
roi->WrappedVTable0x24(mat);
|
||||
break;
|
||||
}
|
||||
case 'N':
|
||||
if (VideoManager()) {
|
||||
VideoManager()->SetRender3D(!VideoManager()->GetRender3D());
|
||||
}
|
||||
break;
|
||||
case 'P':
|
||||
// TODO
|
||||
if (!g_resetPlants) {
|
||||
PlantManager()->LoadWorldInfo(LegoOmni::e_act1);
|
||||
g_resetPlants = TRUE;
|
||||
}
|
||||
else {
|
||||
PlantManager()->Reset(LegoOmni::e_act1);
|
||||
g_resetPlants = FALSE;
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
BackgroundAudioManager()->Enable(!g_musicEnabled);
|
||||
g_enableMusic = g_enableMusic == FALSE;
|
||||
BackgroundAudioManager()->Enable(g_enableMusic);
|
||||
break;
|
||||
case 'U':
|
||||
m_unk0x60 = 1.0;
|
||||
break;
|
||||
case 'V':
|
||||
// TODO
|
||||
case 'W':
|
||||
// TODO
|
||||
if (g_nextAnimation > 0 && g_animationCalcStep == 0) {
|
||||
AnimationManager()->FUN_10061010(FALSE);
|
||||
}
|
||||
|
||||
if (g_animationCalcStep != 0) {
|
||||
g_unk0x100f66bc = LegoAnimationManager::e_unk2;
|
||||
}
|
||||
|
||||
g_nextAnimation = 0;
|
||||
g_animationCalcStep = 1;
|
||||
break;
|
||||
case 'W': {
|
||||
MxMatrix mat;
|
||||
LegoROI* roi = LegoOmni::GetInstance()->GetVideoManager()->GetViewROI();
|
||||
const float* position = roi->GetWorldPosition();
|
||||
const float* direction = roi->GetWorldDirection();
|
||||
const float* up = roi->GetWorldUp();
|
||||
|
||||
MxTrace(
|
||||
"pos: %f, %f, %f\ndir: %f, %f, %f\nup: %f, %f, %f\n",
|
||||
EXPAND3(position),
|
||||
EXPAND3(direction),
|
||||
EXPAND3(up)
|
||||
);
|
||||
break;
|
||||
}
|
||||
case 'X':
|
||||
RealtimeView::SetUserMaxLOD(3.6);
|
||||
break;
|
||||
case 'j':
|
||||
// TODO
|
||||
case 'j': {
|
||||
MxU8 newActor = GameState()->GetActorId() + 1;
|
||||
|
||||
if (newActor > LegoActor::c_laura) {
|
||||
newActor = LegoActor::c_pepper;
|
||||
}
|
||||
|
||||
GameState()->SetActorId(newActor);
|
||||
break;
|
||||
}
|
||||
case 'o':
|
||||
GameState()->SetActorId(6);
|
||||
GameState()->SetActorId(LegoActor::c_brickster);
|
||||
break;
|
||||
case 'z':
|
||||
if (GameState()->m_isDirty) {
|
||||
GameState()->m_isDirty = FALSE;
|
||||
}
|
||||
else {
|
||||
GameState()->m_isDirty = TRUE;
|
||||
}
|
||||
break;
|
||||
case 0xbd:
|
||||
g_unk0x100f66bc = 1;
|
||||
break;
|
||||
default:
|
||||
m_unk0x5d = FALSE;
|
||||
g_unk0x100f66bc = LegoAnimationManager::e_unk1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (*g_currentInput == ((LegoEventNotificationParam&) p_param).GetKey()) {
|
||||
g_currentInput++;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
g_currentInput = g_debugPassword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legomain.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legoplantmanager.h"
|
||||
#include "legosoundmanager.h"
|
||||
@ -102,8 +101,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
SetIsWorldActive(TRUE);
|
||||
m_worldId = -1;
|
||||
|
||||
m_worldId = LegoOmni::e_undefined;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -180,7 +178,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_worldId != -1 && m_set0xd0.empty()) {
|
||||
if (m_worldId != LegoOmni::e_undefined && m_set0xd0.empty()) {
|
||||
PlantManager()->Reset(m_worldId);
|
||||
BuildingManager()->Reset();
|
||||
}
|
||||
@ -701,7 +699,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
Lego()->SetNavController(m_cameraController->GetNavController());
|
||||
}
|
||||
|
||||
if (m_worldId != -1) {
|
||||
if (m_worldId != LegoOmni::e_undefined) {
|
||||
PlantManager()->LoadWorldInfo(m_worldId);
|
||||
AnimationManager()->LoadWorldInfo(m_worldId);
|
||||
BuildingManager()->LoadWorldInfo();
|
||||
@ -724,7 +722,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
AnimationManager()->Reset(FALSE);
|
||||
m_set0xd0.insert(this);
|
||||
|
||||
if (m_worldId != -1) {
|
||||
if (m_worldId != LegoOmni::e_undefined) {
|
||||
PlantManager()->Reset(m_worldId);
|
||||
BuildingManager()->Reset();
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ LegoWorldPresenter::~LegoWorldPresenter()
|
||||
{
|
||||
MxBool result = FALSE;
|
||||
if (m_entity) {
|
||||
MxS32 worldId = ((LegoWorld*) m_entity)->GetWorldId();
|
||||
LegoOmni::World worldId = ((LegoWorld*) m_entity)->GetWorldId();
|
||||
PlantManager()->LoadWorldInfo(worldId);
|
||||
AnimationManager()->LoadWorldInfo(worldId);
|
||||
BuildingManager()->LoadWorldInfo();
|
||||
|
||||
@ -153,6 +153,7 @@ void LegoOmni::Destroy()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058e70
|
||||
// FUNCTION: BETA10 0x1008d6bf
|
||||
MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
@ -266,32 +267,31 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
// FUNCTION: LEGO1 0x1005a5f0
|
||||
MxResult LegoOmni::RegisterWorlds()
|
||||
{
|
||||
m_worlds = new WorldContainer[19];
|
||||
m_worlds = new WorldContainer[e_numWorlds];
|
||||
|
||||
if (!m_worlds) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_worlds[0] = WorldContainer();
|
||||
m_worlds[1] = WorldContainer(0, "ACT1", g_isleScript);
|
||||
m_worlds[2] = WorldContainer(1, "IMAIN", g_infomainScript);
|
||||
m_worlds[3] = WorldContainer(2, "ICUBE", g_infoscorScript);
|
||||
m_worlds[4] = WorldContainer(3, "IREG", g_regbookScript);
|
||||
m_worlds[5] = WorldContainer(4, "IELEV", g_elevbottScript);
|
||||
m_worlds[6] = WorldContainer(5, "IISLE", g_infodoorScript);
|
||||
m_worlds[7] = WorldContainer(6, "HOSP", g_hospitalScript);
|
||||
m_worlds[8] = WorldContainer(7, "POLICE", g_policeScript);
|
||||
m_worlds[9] = WorldContainer(8, "GMAIN", g_garageScript);
|
||||
m_worlds[10] = WorldContainer(9, "BLDH", g_copterScript);
|
||||
m_worlds[11] = WorldContainer(10, "BLDD", g_dunecarScript);
|
||||
m_worlds[12] = WorldContainer(11, "BLDJ", g_jetskiScript);
|
||||
m_worlds[13] = WorldContainer(12, "BLDR", g_racecarScript);
|
||||
m_worlds[14] = WorldContainer(13, "RACC", g_carraceScript);
|
||||
m_worlds[15] = WorldContainer(14, "RACJ", g_jetraceScript);
|
||||
m_worlds[16] = WorldContainer(15, "ACT2", g_act2mainScript);
|
||||
m_worlds[17] = WorldContainer(16, "ACT3", g_act3Script);
|
||||
m_worlds[18] = WorldContainer(17, "TEST", g_testScript);
|
||||
|
||||
m_worlds[1] = WorldContainer(e_act1, "ACT1", g_isleScript);
|
||||
m_worlds[2] = WorldContainer(e_imain, "IMAIN", g_infomainScript);
|
||||
m_worlds[3] = WorldContainer(e_icube, "ICUBE", g_infoscorScript);
|
||||
m_worlds[4] = WorldContainer(e_ireg, "IREG", g_regbookScript);
|
||||
m_worlds[5] = WorldContainer(e_ielev, "IELEV", g_elevbottScript);
|
||||
m_worlds[6] = WorldContainer(e_iisle, "IISLE", g_infodoorScript);
|
||||
m_worlds[7] = WorldContainer(e_hosp, "HOSP", g_hospitalScript);
|
||||
m_worlds[8] = WorldContainer(e_police, "POLICE", g_policeScript);
|
||||
m_worlds[9] = WorldContainer(e_gmain, "GMAIN", g_garageScript);
|
||||
m_worlds[10] = WorldContainer(e_bldh, "BLDH", g_copterScript);
|
||||
m_worlds[11] = WorldContainer(e_bldd, "BLDD", g_dunecarScript);
|
||||
m_worlds[12] = WorldContainer(e_bldj, "BLDJ", g_jetskiScript);
|
||||
m_worlds[13] = WorldContainer(e_bldr, "BLDR", g_racecarScript);
|
||||
m_worlds[14] = WorldContainer(e_racc, "RACC", g_carraceScript);
|
||||
m_worlds[15] = WorldContainer(e_racj, "RACJ", g_jetraceScript);
|
||||
m_worlds[16] = WorldContainer(e_act2, "ACT2", g_act2mainScript);
|
||||
m_worlds[17] = WorldContainer(e_act3, "ACT3", g_act3Script);
|
||||
m_worlds[18] = WorldContainer(e_test, "TEST", g_testScript);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -476,10 +476,10 @@ MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b430
|
||||
const char* LegoOmni::GetWorldName(MxU32 p_id)
|
||||
const char* LegoOmni::GetWorldName(LegoOmni::World p_worldId)
|
||||
{
|
||||
for (MxS32 i = 0; i < 19; i++) {
|
||||
if (m_worlds[i].m_id == p_id) {
|
||||
for (MxS32 i = 0; i < e_numWorlds; i++) {
|
||||
if (m_worlds[i].m_id == p_worldId) {
|
||||
return m_worlds[i].m_key;
|
||||
}
|
||||
}
|
||||
@ -489,10 +489,10 @@ const char* LegoOmni::GetWorldName(MxU32 p_id)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b460
|
||||
// FUNCTION: BETA10 0x1008edd8
|
||||
MxAtomId* LegoOmni::GetWorldAtom(MxU32 p_id)
|
||||
MxAtomId* LegoOmni::GetWorldAtom(LegoOmni::World p_worldId)
|
||||
{
|
||||
for (MxS32 i = 0; i < 19; i++) {
|
||||
if (m_worlds[i].m_id == p_id) {
|
||||
for (MxS32 i = 0; i < e_numWorlds; i++) {
|
||||
if (m_worlds[i].m_id == p_worldId) {
|
||||
return m_worlds[i].m_atomId;
|
||||
}
|
||||
}
|
||||
@ -503,16 +503,16 @@ MxAtomId* LegoOmni::GetWorldAtom(MxU32 p_id)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b490
|
||||
MxS32 LegoOmni::GetWorldId(const char* p_key)
|
||||
LegoOmni::World LegoOmni::GetWorldId(const char* p_key)
|
||||
{
|
||||
for (MxS32 i = 0; i < 19; i++) {
|
||||
for (MxS32 i = 0; i < e_numWorlds; i++) {
|
||||
// FIXME: this looks very fishy. Is this guarding against out-of-bounds access?
|
||||
if ((MxS32*) &m_worlds[i] != (MxS32*) -4 && !strcmpi(m_worlds[i].GetKey(), p_key)) {
|
||||
return m_worlds[i].GetId();
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return e_undefined;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b4f0
|
||||
|
||||
@ -28,6 +28,7 @@ MxS32 g_unk0x100f31dc = 0;
|
||||
Mx3DPointFloat g_unk0x10104c18 = Mx3DPointFloat(0.0f, 2.5f, 0.0f);
|
||||
|
||||
// FUNCTION: LEGO1 0x1002a500
|
||||
// FUNCTION: BETA10 0x10080908
|
||||
LegoExtraActor::LegoExtraActor()
|
||||
{
|
||||
m_unk0x70 = 0.0f;
|
||||
|
||||
@ -48,7 +48,7 @@ void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPa
|
||||
{
|
||||
Vector3* ccwV = NULL;
|
||||
|
||||
if (m_unk0x48 > 0 && m_unk0x50 != NULL) {
|
||||
if (m_numTriggers > 0 && m_unk0x50 != NULL) {
|
||||
ccwV = m_edges[0]->CCWVertex(*this);
|
||||
Mx3DPointFloat v;
|
||||
|
||||
@ -61,7 +61,7 @@ void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPa
|
||||
float dot2 = v.Dot(&v, m_unk0x50);
|
||||
|
||||
if (dot2 > dot1) {
|
||||
for (MxS32 i = 0; i < m_unk0x48; i++) {
|
||||
for (MxS32 i = 0; i < m_numTriggers; i++) {
|
||||
LegoPathStruct* s = m_pathTrigger[i].m_pathStruct;
|
||||
|
||||
if (m_pathTrigger[i].m_unk0x08 >= dot1 && m_pathTrigger[i].m_unk0x08 < dot2) {
|
||||
@ -70,7 +70,7 @@ void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPa
|
||||
}
|
||||
}
|
||||
else if (dot2 < dot1) {
|
||||
for (MxS32 i = 0; i < m_unk0x48; i++) {
|
||||
for (MxS32 i = 0; i < m_numTriggers; i++) {
|
||||
LegoPathStruct* s = m_pathTrigger[i].m_pathStruct;
|
||||
|
||||
if (m_pathTrigger[i].m_unk0x08 >= dot2 && m_pathTrigger[i].m_unk0x08 < dot1) {
|
||||
|
||||
@ -673,15 +673,15 @@ MxResult LegoPathController::ReadBoundaries(LegoStorage* p_storage)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (p_storage->Read(&boundary.m_unk0x48, sizeof(boundary.m_unk0x48)) != SUCCESS) {
|
||||
if (p_storage->Read(&boundary.m_numTriggers, sizeof(boundary.m_numTriggers)) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (boundary.m_unk0x48 > 0) {
|
||||
if (boundary.m_numTriggers > 0) {
|
||||
boundary.m_unk0x50 = new Mx3DPointFloat;
|
||||
boundary.m_pathTrigger = new LegoWEGEdge::PathWithTrigger[boundary.m_unk0x48];
|
||||
boundary.m_pathTrigger = new LegoWEGEdge::PathWithTrigger[boundary.m_numTriggers];
|
||||
|
||||
for (j = 0; j < boundary.m_unk0x48; j++) {
|
||||
for (j = 0; j < boundary.m_numTriggers; j++) {
|
||||
if (p_storage->Read(&s, sizeof(s)) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@ -131,7 +131,8 @@ void CarRace::ReadyWorld()
|
||||
|
||||
m_unk0x144 = g_unk0x100d5d10[rand() & 7];
|
||||
|
||||
AnimationManager()->FUN_10060dc0(m_unk0x144, NULL, TRUE, FALSE, NULL, FALSE, TRUE, FALSE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(m_unk0x144, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, FALSE, TRUE);
|
||||
|
||||
m_unk0x128 = (MxStillPresenter*) Find("MxPresenter", "CarLocator2");
|
||||
m_unk0x128->SetPosition(m_unk0x130.GetLeft(), m_unk0x130.GetTop());
|
||||
@ -164,7 +165,8 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
result = 1;
|
||||
}
|
||||
else if (m_unk0x148 == objectId) {
|
||||
AnimationManager()->FUN_10060dc0(m_unk0x14c, NULL, TRUE, FALSE, NULL, FALSE, TRUE, FALSE, TRUE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(m_unk0x14c, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, FALSE, TRUE);
|
||||
}
|
||||
else if (m_unk0x14c == objectId) {
|
||||
NotificationManager()->Send(this, MxNotificationParam());
|
||||
@ -255,7 +257,17 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
raceState->m_score = position;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(m_unk0x148, NULL, TRUE, FALSE, NULL, FALSE, TRUE, FALSE, TRUE);
|
||||
AnimationManager()->FUN_10060dc0(
|
||||
m_unk0x148,
|
||||
NULL,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
FALSE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
|
||||
result = 1;
|
||||
|
||||
@ -635,12 +635,14 @@ void LegoJetski::Animate(float p_time)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10013820
|
||||
// FUNCTION: BETA10 0x100cc335
|
||||
LegoJetski::LegoJetski()
|
||||
{
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10013aa0
|
||||
// FUNCTION: BETA10 0x100cc58e
|
||||
LegoJetski::~LegoJetski()
|
||||
{
|
||||
NotificationManager()->Unregister(this);
|
||||
|
||||
@ -406,13 +406,13 @@ LegoROI* LegoAnimPresenter::FUN_100699e0(const LegoChar* p_und)
|
||||
// FUNCTION: LEGO1 0x10069b10
|
||||
void LegoAnimPresenter::FUN_10069b10()
|
||||
{
|
||||
LegoAnimStructMap map;
|
||||
LegoAnimStructMap anims;
|
||||
|
||||
if (m_unk0x8c != NULL) {
|
||||
memset(m_unk0x8c, 0, m_unk0x94 * sizeof(*m_unk0x8c));
|
||||
}
|
||||
|
||||
FUN_1006a3c0(map, m_anim->GetRoot(), NULL);
|
||||
FUN_1006a3c0(anims, m_anim->GetRoot(), NULL);
|
||||
|
||||
if (m_roiMap != NULL) {
|
||||
delete[] m_roiMap;
|
||||
@ -420,10 +420,10 @@ void LegoAnimPresenter::FUN_10069b10()
|
||||
}
|
||||
|
||||
m_roiMapSize = 0;
|
||||
m_roiMap = new LegoROI*[map.size() + 1];
|
||||
memset(m_roiMap, 0, (map.size() + 1) * sizeof(*m_roiMap));
|
||||
m_roiMap = new LegoROI*[anims.size() + 1];
|
||||
memset(m_roiMap, 0, (anims.size() + 1) * sizeof(*m_roiMap));
|
||||
|
||||
for (LegoAnimStructMap::iterator it = map.begin(); it != map.end();) {
|
||||
for (LegoAnimStructMap::iterator it = anims.begin(); it != anims.end();) {
|
||||
MxU32 index = (*it).second.m_index;
|
||||
m_roiMap[index] = (*it).second.m_roi;
|
||||
|
||||
|
||||
@ -143,18 +143,18 @@ void LegoHideAnimPresenter::FUN_1006db60(LegoTreeNode* p_node, LegoTime p_time)
|
||||
// FUNCTION: BETA10 0x100532fd
|
||||
void LegoHideAnimPresenter::FUN_1006dc10()
|
||||
{
|
||||
LegoHideAnimStructMap map;
|
||||
LegoHideAnimStructMap anims;
|
||||
|
||||
FUN_1006e3f0(map, m_anim->GetRoot());
|
||||
FUN_1006e3f0(anims, m_anim->GetRoot());
|
||||
|
||||
if (m_boundaryMap != NULL) {
|
||||
delete[] m_boundaryMap;
|
||||
}
|
||||
|
||||
m_boundaryMap = new LegoPathBoundary*[map.size() + 1];
|
||||
m_boundaryMap = new LegoPathBoundary*[anims.size() + 1];
|
||||
m_boundaryMap[0] = NULL;
|
||||
|
||||
for (LegoHideAnimStructMap::iterator it = map.begin(); !(it == map.end()); it++) {
|
||||
for (LegoHideAnimStructMap::iterator it = anims.begin(); !(it == anims.end()); it++) {
|
||||
m_boundaryMap[(*it).second.m_index] = (*it).second.m_boundary;
|
||||
delete[] const_cast<char*>((*it).first);
|
||||
}
|
||||
|
||||
@ -640,7 +640,7 @@ MxLong Act3::Notify(MxParam& p_param)
|
||||
case c_notificationEndAnim:
|
||||
if (m_state->m_unk0x08 == 1) {
|
||||
assert(m_copter && m_brickster && m_cop1 && m_cop2);
|
||||
m_unk0x4220.FUN_100720d0(NULL);
|
||||
m_unk0x4220.FUN_100720d0(0);
|
||||
m_state->m_unk0x08 = 0;
|
||||
FUN_10015820(TRUE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
m_copter->HandleClick();
|
||||
@ -677,7 +677,8 @@ void Act3::ReadyWorld()
|
||||
VideoManager()->Get3DManager()->SetFrustrum(90.0f, 0.1f, 125.0f);
|
||||
|
||||
m_unk0x426c = g_unk0x100d95e8[rand() % 3];
|
||||
AnimationManager()->FUN_10060dc0(m_unk0x426c, NULL, TRUE, FALSE, NULL, TRUE, FALSE, FALSE, FALSE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(m_unk0x426c, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, TRUE, FALSE, FALSE, FALSE);
|
||||
|
||||
m_state->m_unk0x08 = 1;
|
||||
}
|
||||
|
||||
@ -65,6 +65,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
|
||||
ret = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
assert(m_destLocation != LegoGameState::e_undefined);
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -757,7 +757,8 @@ void Isle::Enable(MxBool p_enable)
|
||||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(script, NULL, TRUE, TRUE, NULL, FALSE, FALSE, TRUE, FALSE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(script, NULL, TRUE, LegoAnimationManager::e_unk1, NULL, FALSE, FALSE, TRUE, FALSE);
|
||||
}
|
||||
|
||||
m_act1state->m_unk0x018 = 0;
|
||||
@ -790,7 +791,8 @@ void Isle::Enable(MxBool p_enable)
|
||||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(script, NULL, TRUE, TRUE, NULL, FALSE, FALSE, TRUE, FALSE);
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(script, NULL, TRUE, LegoAnimationManager::e_unk1, NULL, FALSE, FALSE, TRUE, FALSE);
|
||||
}
|
||||
|
||||
m_act1state->m_unk0x018 = 0;
|
||||
|
||||
@ -1111,7 +1111,7 @@ MxResult LegoAct2::FUN_10052560(
|
||||
|
||||
action.SetObjectId(p_objectId);
|
||||
// World index: see LegoOmni::RegisterWorlds
|
||||
action.SetAtomId(*Lego()->GetWorldAtom(15));
|
||||
action.SetAtomId(*Lego()->GetWorldAtom(LegoOmni::e_act2));
|
||||
|
||||
if (p_location) {
|
||||
action.SetUp(Mx3DPointFloat(0.0f, 1.0f, 0.0f));
|
||||
@ -1167,12 +1167,30 @@ MxResult LegoAct2::FUN_10052560(
|
||||
MxResult result;
|
||||
|
||||
if (p_objectId == Act2mainScript::c_tja009ni_RunAnim) {
|
||||
result =
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, pmatrix, TRUE, FALSE, NULL, TRUE, TRUE, TRUE, TRUE);
|
||||
result = AnimationManager()->FUN_10060dc0(
|
||||
p_objectId,
|
||||
pmatrix,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE
|
||||
);
|
||||
}
|
||||
else {
|
||||
result =
|
||||
AnimationManager()->FUN_10060dc0(p_objectId, pmatrix, TRUE, FALSE, NULL, TRUE, TRUE, TRUE, FALSE);
|
||||
result = AnimationManager()->FUN_10060dc0(
|
||||
p_objectId,
|
||||
pmatrix,
|
||||
TRUE,
|
||||
LegoAnimationManager::e_unk0,
|
||||
NULL,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
FALSE
|
||||
);
|
||||
}
|
||||
|
||||
if (result == SUCCESS) {
|
||||
|
||||
@ -576,12 +576,12 @@ MxLong RegistrationBook::HandlePathStruct(LegoPathStructNotificationParam& p_par
|
||||
// FUNCTION: LEGO1 0x10078350
|
||||
MxBool RegistrationBook::CreateSurface()
|
||||
{
|
||||
MxCompositePresenterList* list = m_checkmark[0]->GetList();
|
||||
MxCompositePresenterList* presenters = m_checkmark[0]->GetList();
|
||||
MxStillPresenter *presenter, *uninitialized;
|
||||
|
||||
if (list) {
|
||||
if (list->begin() != list->end()) {
|
||||
presenter = (MxStillPresenter*) list->front();
|
||||
if (presenters) {
|
||||
if (presenters->begin() != presenters->end()) {
|
||||
presenter = (MxStillPresenter*) presenters->front();
|
||||
}
|
||||
else {
|
||||
presenter = uninitialized; // intentionally uninitialized variable
|
||||
|
||||
@ -19,6 +19,12 @@ struct LegoEdge {
|
||||
|
||||
LegoResult FUN_1002ddc0(LegoWEEdge& p_face, Vector3& p_point);
|
||||
|
||||
// FUNCTION: BETA10 0x10184170
|
||||
LegoWEEdge* GetFaceA() { return m_faceA; }
|
||||
|
||||
// FUNCTION: BETA10 0x10184190
|
||||
LegoWEEdge* GetFaceB() { return m_faceB; }
|
||||
|
||||
// FUNCTION: BETA10 0x1001cb80
|
||||
Vector3* GetPointA() { return m_pointA; }
|
||||
|
||||
|
||||
@ -93,6 +93,9 @@ struct LegoUnknown100db7f4 : public LegoEdge {
|
||||
// FUNCTION: BETA10 0x1001cc60
|
||||
LegoU32 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
|
||||
|
||||
// FUNCTION: BETA10 0x101841b0
|
||||
void SetFlags(LegoU16 p_flags) { m_flags = p_flags; }
|
||||
|
||||
inline LegoU32 FUN_10048c40(const Vector3& p_position);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1009a6c0
|
||||
|
||||
@ -20,7 +20,7 @@ LegoWEEdge::~LegoWEEdge()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a5b0
|
||||
LegoResult LegoWEEdge::VTable0x04()
|
||||
LegoS32 LegoWEEdge::VTable0x04()
|
||||
{
|
||||
for (LegoS32 i = 0; i < m_numEdges; i++) {
|
||||
LegoUnknown100db7f4* e1 = m_edges[i];
|
||||
@ -52,5 +52,5 @@ LegoResult LegoWEEdge::VTable0x04()
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ class LegoWEEdge {
|
||||
LegoWEEdge();
|
||||
virtual ~LegoWEEdge(); // vtable+0x00
|
||||
|
||||
virtual LegoResult VTable0x04(); // vtable+0x04
|
||||
virtual LegoS32 VTable0x04(); // vtable+0x04
|
||||
|
||||
// FUNCTION: BETA10 0x1001c980
|
||||
LegoU8 GetNumEdges() { return m_numEdges; }
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
#include "legowegedge.h"
|
||||
|
||||
#include "legounkown100db7f4.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoWEGEdge, 0x54)
|
||||
DECOMP_SIZE_ASSERT(LegoWEGEdge::PathWithTrigger, 0x0c)
|
||||
|
||||
// FUNCTION: LEGO1 0x1009a730
|
||||
// FUNCTION: BETA10 0x101830ec
|
||||
LegoWEGEdge::LegoWEGEdge()
|
||||
{
|
||||
m_unk0x0d = 0;
|
||||
@ -11,7 +16,7 @@ LegoWEGEdge::LegoWEGEdge()
|
||||
m_unk0x14.Clear();
|
||||
m_edgeNormals = NULL;
|
||||
m_flags = 0;
|
||||
m_unk0x48 = 0;
|
||||
m_numTriggers = 0;
|
||||
m_pathTrigger = NULL;
|
||||
m_unk0x50 = NULL;
|
||||
}
|
||||
@ -37,9 +42,241 @@ LegoWEGEdge::~LegoWEGEdge()
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1009a8c0
|
||||
LegoResult LegoWEGEdge::VTable0x04()
|
||||
// FUNCTION: LEGO1 0x1009a8c0
|
||||
// FUNCTION: BETA10 0x101832f7
|
||||
LegoS32 LegoWEGEdge::VTable0x04()
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
LegoS32 result = 0;
|
||||
m_unk0x30.Clear();
|
||||
LegoWEEdge::VTable0x04();
|
||||
|
||||
assert(m_numEdges > 1);
|
||||
|
||||
Vector3* local20;
|
||||
if (IsEqual(m_edges[0]->m_faceA)) {
|
||||
local20 = m_edges[0]->m_pointB;
|
||||
}
|
||||
else {
|
||||
assert(IsEqual(m_edges[0]->m_faceB));
|
||||
local20 = m_edges[0]->m_pointA;
|
||||
}
|
||||
|
||||
Vector3 *local1c, *local14;
|
||||
if (IsEqual(m_edges[1]->m_faceA)) {
|
||||
local1c = m_edges[1]->m_pointB;
|
||||
local14 = m_edges[1]->m_pointA;
|
||||
}
|
||||
else {
|
||||
assert(IsEqual(m_edges[1]->m_faceB));
|
||||
local1c = m_edges[1]->m_pointA;
|
||||
local14 = m_edges[1]->m_pointB;
|
||||
}
|
||||
|
||||
result = FUN_1009aea0();
|
||||
if (result != 0) {
|
||||
result = -2;
|
||||
}
|
||||
|
||||
assert(m_edgeNormals == NULL);
|
||||
m_edgeNormals = new Mx4DPointFloat[m_numEdges];
|
||||
assert(m_edgeNormals);
|
||||
|
||||
LegoUnknown100db7f4* edge;
|
||||
LegoS32 i;
|
||||
|
||||
for (i = 0; i < m_numEdges; i++) {
|
||||
edge = m_edges[i];
|
||||
m_unk0x30 += *edge->m_pointA;
|
||||
m_unk0x30 += *edge->m_pointB;
|
||||
}
|
||||
|
||||
m_unk0x30 /= m_numEdges * 2;
|
||||
m_unk0x44 = 0.0f;
|
||||
|
||||
for (i = 0; i < m_numEdges; i++) {
|
||||
Mx3DPointFloat local44;
|
||||
edge = m_edges[i];
|
||||
|
||||
local44 = *edge->m_pointA;
|
||||
local44 -= m_unk0x30;
|
||||
float length = local44.LenSquared();
|
||||
|
||||
if (m_unk0x44 < length) {
|
||||
m_unk0x44 = length;
|
||||
}
|
||||
|
||||
local44 = *edge->m_pointB;
|
||||
local44 -= m_unk0x30;
|
||||
length = local44.LenSquared();
|
||||
|
||||
if (m_unk0x44 < length) {
|
||||
m_unk0x44 = length;
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x44 = sqrt((double) m_unk0x44);
|
||||
|
||||
for (i = 0; i < m_numEdges; i++) {
|
||||
edge = m_edges[i];
|
||||
Vector3& local5c = edge->m_unk0x28;
|
||||
|
||||
if (edge->m_unk0x3c == 0) {
|
||||
local5c = *m_edges[i]->m_pointB;
|
||||
local5c -= *m_edges[i]->m_pointA;
|
||||
edge->m_unk0x3c = local5c.LenSquared();
|
||||
|
||||
if (edge->m_unk0x3c <= 0.0f) {
|
||||
assert(0);
|
||||
if (result == 0) {
|
||||
result = -1;
|
||||
}
|
||||
}
|
||||
|
||||
edge->m_unk0x3c = sqrt((double) edge->m_unk0x3c);
|
||||
local5c /= edge->m_unk0x3c;
|
||||
}
|
||||
|
||||
Mx3DPointFloat local58;
|
||||
Vector3 local64(&m_edgeNormals[i][0]);
|
||||
edge->FUN_1002ddc0(*this, local58);
|
||||
local64.EqualsCross(&local58, &m_unk0x14);
|
||||
|
||||
m_edgeNormals[i][3] = -local64.Dot(m_edges[i]->m_pointA, &local64);
|
||||
if (m_edgeNormals[i][3] + m_unk0x30.Dot(&m_unk0x30, &local64) < 0.0f) {
|
||||
m_edgeNormals[i] *= -1.0f;
|
||||
}
|
||||
|
||||
if (edge->GetFaceA() != NULL && edge->GetFaceB() != NULL) {
|
||||
edge->SetFlags(LegoUnknown100db7f4::c_bit1 | LegoUnknown100db7f4::c_bit2);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_numTriggers > 0) {
|
||||
Vector3* vTrig1 = m_edges[0]->CCWVertex(*this);
|
||||
Vector3* vTrig2 = m_edges[1]->CCWVertex(*this);
|
||||
assert(vTrig1 && vTrig2);
|
||||
|
||||
m_unk0x50 = new Mx3DPointFloat();
|
||||
*m_unk0x50 = *vTrig2;
|
||||
*m_unk0x50 -= *vTrig1;
|
||||
|
||||
if (m_unk0x50->Unitize() < 0) {
|
||||
assert(0);
|
||||
delete m_unk0x50;
|
||||
m_unk0x50 = NULL;
|
||||
}
|
||||
|
||||
if (GetNumEdges() == 4) {
|
||||
float local98 = 0.0f;
|
||||
Mx3DPointFloat localb8(*m_edges[0]->CWVertex(*this));
|
||||
Mx3DPointFloat local80(*m_edges[2]->CCWVertex(*this));
|
||||
Mx3DPointFloat local94(*vTrig2);
|
||||
|
||||
local94 -= *vTrig1;
|
||||
float local9c = sqrt(local94.LenSquared());
|
||||
|
||||
localb8 -= *vTrig1;
|
||||
local80 -= *vTrig1;
|
||||
|
||||
float locala4 = localb8.Dot(m_unk0x50, &localb8);
|
||||
if (local98 < locala4) {
|
||||
local98 = locala4;
|
||||
}
|
||||
|
||||
locala4 = local80.Dot(m_unk0x50, &local80);
|
||||
if (locala4 < local9c) {
|
||||
local9c = locala4;
|
||||
}
|
||||
|
||||
if (local9c < local98) {
|
||||
result = -3;
|
||||
}
|
||||
if (local9c - local98 < 0.0025) {
|
||||
result = -4;
|
||||
}
|
||||
|
||||
local98 += 0.001;
|
||||
local9c -= 0.001;
|
||||
|
||||
for (LegoS32 j = 0; j < m_numTriggers; j++) {
|
||||
if (m_pathTrigger[j].m_unk0x08 < local98) {
|
||||
m_pathTrigger[j].m_unk0x08 = local98;
|
||||
}
|
||||
|
||||
if (m_pathTrigger[j].m_unk0x08 > local9c) {
|
||||
m_pathTrigger[j].m_unk0x08 = local9c;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = -5;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1009aea0
|
||||
// FUNCTION: BETA10 0x10183e2a
|
||||
LegoS32 LegoWEGEdge::FUN_1009aea0()
|
||||
{
|
||||
LegoU32 localc = FALSE;
|
||||
Mx3DPointFloat local24;
|
||||
|
||||
if (m_numEdges < 3) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Vector3** local8 = new Vector3*[m_numEdges];
|
||||
LegoS32 i;
|
||||
|
||||
for (i = 0; i < m_numEdges; i++) {
|
||||
local8[i] = m_edges[i]->CWVertex(*this);
|
||||
}
|
||||
|
||||
for (i = 2; i < m_numEdges; i++) {
|
||||
Mx3DPointFloat local3c;
|
||||
Mx3DPointFloat local50;
|
||||
float local28 = 0.0f;
|
||||
|
||||
local3c = *local8[i];
|
||||
local3c -= *local8[i - 1];
|
||||
local50 = *local8[i - 2];
|
||||
local50 -= *local8[i - 1];
|
||||
|
||||
local24.EqualsCross(&local50, &local3c);
|
||||
local28 = local24.LenSquared();
|
||||
|
||||
if (local28 < 0.00001f) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float local58 = sqrt((double) local28);
|
||||
local24 /= local58;
|
||||
|
||||
if (localc) {
|
||||
float local54 = local24.Dot(&m_unk0x14, &local24);
|
||||
if (local54 < 0.98) {
|
||||
delete[] local8;
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_unk0x14[0] = local24[0];
|
||||
m_unk0x14[1] = local24[1];
|
||||
m_unk0x14[2] = local24[2];
|
||||
m_unk0x14[3] = -local8[i]->Dot(local8[i], &local24);
|
||||
localc = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (local8 != NULL) {
|
||||
delete[] local8;
|
||||
}
|
||||
|
||||
if (!localc) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
LegoWEGEdge();
|
||||
~LegoWEGEdge() override;
|
||||
|
||||
LegoResult VTable0x04() override; // vtable+0x04
|
||||
LegoS32 VTable0x04() override; // vtable+0x04
|
||||
|
||||
// FUNCTION: BETA10 0x100270c0
|
||||
LegoU32 GetFlag0x10() { return m_flags & c_bit5 ? FALSE : TRUE; }
|
||||
@ -72,6 +72,8 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
friend class LegoPathController;
|
||||
|
||||
protected:
|
||||
LegoS32 FUN_1009aea0();
|
||||
|
||||
LegoU8 m_flags; // 0x0c
|
||||
LegoU8 m_unk0x0d; // 0x0d
|
||||
LegoChar* m_name; // 0x10
|
||||
@ -79,7 +81,7 @@ class LegoWEGEdge : public LegoWEEdge {
|
||||
Mx4DPointFloat* m_edgeNormals; // 0x2c
|
||||
Mx3DPointFloat m_unk0x30; // 0x30
|
||||
float m_unk0x44; // 0x44
|
||||
LegoU8 m_unk0x48; // 0x48
|
||||
LegoU8 m_numTriggers; // 0x48
|
||||
PathWithTrigger* m_pathTrigger; // 0x4c
|
||||
Mx3DPointFloat* m_unk0x50; // 0x50
|
||||
};
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
#include "legolod.h"
|
||||
|
||||
#include "geom/legomesh.h"
|
||||
#include "legoroi.h"
|
||||
#include "misc/legocontainer.h"
|
||||
#include "misc/legostorage.h"
|
||||
#include "shape/legomesh.h"
|
||||
#include "tgl/d3drm/impl.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LODObject, 0x04)
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
#include "legoroi.h"
|
||||
|
||||
#include "anim/legoanim.h"
|
||||
#include "geom/legobox.h"
|
||||
#include "geom/legosphere.h"
|
||||
#include "legolod.h"
|
||||
#include "misc/legocontainer.h"
|
||||
#include "misc/legostorage.h"
|
||||
#include "realtime/realtime.h"
|
||||
#include "shape/legobox.h"
|
||||
#include "shape/legosphere.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <vec.h>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
DECOMP_SIZE_ASSERT(LegoBox, 0x18)
|
||||
|
||||
// FUNCTION: LEGO1 0x100d3740
|
||||
// FUNCTION: BETA10 0x1018f83c
|
||||
LegoResult LegoBox::Read(LegoStorage* p_storage)
|
||||
{
|
||||
LegoResult result;
|
||||
@ -1,7 +1,7 @@
|
||||
#include "legocolor.h"
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legostorage.h"
|
||||
#include "misc/legostorage.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoColor, 0x03)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef __LEGOCOLOR_H
|
||||
#define __LEGOCOLOR_H
|
||||
|
||||
#include "legotypes.h"
|
||||
#include "misc/legotypes.h"
|
||||
|
||||
class LegoStorage;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define __LEGOMESH_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "misc/legocolor.h"
|
||||
#include "legocolor.h"
|
||||
#include "misc/legotypes.h"
|
||||
|
||||
class LegoStorage;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user