mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Improve symbol order until LegoActor
, match LegoPlantManager::ScheduleAnimation
(#1327)
* Order `LegoCarBuild`, `LegoPlantManager` * Order until `LegoActor`
This commit is contained in:

committed by
GitHub

parent
ee2bcb4d53
commit
ac3a551bcc
@@ -321,11 +321,9 @@ function(add_lego_libraries NAME)
|
|||||||
LEGO1/lego/legoomni/src/paths/legoanimactor.cpp
|
LEGO1/lego/legoomni/src/paths/legoanimactor.cpp
|
||||||
LEGO1/lego/legoomni/src/entity/legoworld.cpp
|
LEGO1/lego/legoomni/src/entity/legoworld.cpp
|
||||||
LEGO1/lego/legoomni/src/build/legocarbuild.cpp
|
LEGO1/lego/legoomni/src/build/legocarbuild.cpp
|
||||||
LEGO1/lego/legoomni/src/actors/ambulance.cpp
|
|
||||||
LEGO1/lego/legoomni/src/common/legoplantmanager.cpp
|
LEGO1/lego/legoomni/src/common/legoplantmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/actors/bumpbouy.cpp
|
LEGO1/lego/legoomni/src/actors/bumpbouy.cpp
|
||||||
LEGO1/modeldb/modeldb.cpp
|
LEGO1/modeldb/modeldb.cpp
|
||||||
LEGO1/lego/legoomni/src/actors/pizza.cpp
|
|
||||||
LEGO1/lego/legoomni/src/actors/racecar.cpp
|
LEGO1/lego/legoomni/src/actors/racecar.cpp
|
||||||
LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp
|
LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
|
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
|
||||||
@@ -336,6 +334,8 @@ function(add_lego_libraries NAME)
|
|||||||
LEGO1/lego/legoomni/src/paths/legopathactor.cpp
|
LEGO1/lego/legoomni/src/paths/legopathactor.cpp
|
||||||
LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp
|
LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/worlds/isle.cpp
|
LEGO1/lego/legoomni/src/worlds/isle.cpp
|
||||||
|
LEGO1/lego/legoomni/src/actors/ambulance.cpp
|
||||||
|
LEGO1/lego/legoomni/src/actors/pizza.cpp
|
||||||
LEGO1/lego/legoomni/src/actors/motorcycle.cpp
|
LEGO1/lego/legoomni/src/actors/motorcycle.cpp
|
||||||
LEGO1/lego/legoomni/src/actors/act3ammo.cpp
|
LEGO1/lego/legoomni/src/actors/act3ammo.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp
|
LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp
|
||||||
|
@@ -91,6 +91,10 @@ public:
|
|||||||
LegoCarBuild();
|
LegoCarBuild();
|
||||||
~LegoCarBuild() override;
|
~LegoCarBuild() override;
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10022930
|
||||||
|
// FUNCTION: BETA10 0x10070070
|
||||||
|
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10022940
|
// FUNCTION: LEGO1 0x10022940
|
||||||
// FUNCTION: BETA10 0x10070090
|
// FUNCTION: BETA10 0x10070090
|
||||||
const char* ClassName() const override // vtable+0x0c
|
const char* ClassName() const override // vtable+0x0c
|
||||||
@@ -110,7 +114,6 @@ public:
|
|||||||
|
|
||||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||||
void ReadyWorld() override; // vtable+0x50
|
void ReadyWorld() override; // vtable+0x50
|
||||||
MxBool VTable0x5c() override; // vtable+0x5c
|
|
||||||
MxBool Escape() override; // vtable+0x64
|
MxBool Escape() override; // vtable+0x64
|
||||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||||
virtual void VTable0x6c(); // vtable+0x6c
|
virtual void VTable0x6c(); // vtable+0x6c
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
#define LEGOEXTRAACTOR_H
|
#define LEGOEXTRAACTOR_H
|
||||||
|
|
||||||
#include "legoanimactor.h"
|
#include "legoanimactor.h"
|
||||||
|
#include "legopathboundary.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6c00 LegoAnimActor
|
// VTABLE: LEGO1 0x100d6c00 LegoAnimActor
|
||||||
// VTABLE: LEGO1 0x100d6c10 LegoPathActor
|
// VTABLE: LEGO1 0x100d6c10 LegoPathActor
|
||||||
@@ -36,9 +37,9 @@ public:
|
|||||||
return !strcmp(p_name, LegoExtraActor::ClassName()) || LegoAnimActor::IsA(p_name);
|
return !strcmp(p_name, LegoExtraActor::ClassName()) || LegoAnimActor::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
|
||||||
MxS32 VTable0x68(Vector3&, Vector3&, Vector3&) override; // vtable+0x68
|
MxS32 VTable0x68(Vector3& p_point1, Vector3& p_point2, Vector3& p_point3) override; // vtable+0x68
|
||||||
MxU32 VTable0x6c(
|
inline MxU32 VTable0x6c(
|
||||||
LegoPathBoundary* p_boundary,
|
LegoPathBoundary* p_boundary,
|
||||||
Vector3& p_v1,
|
Vector3& p_v1,
|
||||||
Vector3& p_v2,
|
Vector3& p_v2,
|
||||||
@@ -77,6 +78,108 @@ private:
|
|||||||
LegoAnimActorStruct* m_disAnim; // 0x64
|
LegoAnimActorStruct* m_disAnim; // 0x64
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1002b980
|
||||||
|
inline MxU32 LegoExtraActor::VTable0x6c(
|
||||||
|
LegoPathBoundary* p_boundary,
|
||||||
|
Vector3& p_v1,
|
||||||
|
Vector3& p_v2,
|
||||||
|
float p_f1,
|
||||||
|
float p_f2,
|
||||||
|
Vector3& p_v3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LegoAnimPresenterSet& presenters = p_boundary->GetPresenters();
|
||||||
|
|
||||||
|
for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
|
||||||
|
if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LegoPathActorSet& plpas = p_boundary->GetActors();
|
||||||
|
LegoPathActorSet lpas(plpas);
|
||||||
|
|
||||||
|
for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
|
||||||
|
if (plpas.find(*itpa) != plpas.end()) {
|
||||||
|
LegoPathActor* actor = *itpa;
|
||||||
|
|
||||||
|
if (this != actor && !(actor->GetActorState() & LegoPathActor::c_noCollide)) {
|
||||||
|
LegoROI* roi = actor->GetROI();
|
||||||
|
|
||||||
|
if ((roi != NULL && roi->GetVisibility()) || actor->GetCameraFlag()) {
|
||||||
|
if (actor->GetUserNavFlag()) {
|
||||||
|
MxMatrix local2world = roi->GetLocal2World();
|
||||||
|
Vector3 local60(local2world[3]);
|
||||||
|
Mx3DPointFloat local54(p_v1);
|
||||||
|
|
||||||
|
local54 -= local60;
|
||||||
|
float local1c = p_v2.Dot(p_v2, p_v2);
|
||||||
|
float local24 = p_v2.Dot(p_v2, local54) * 2.0f;
|
||||||
|
float local20 = local54.Dot(local54, local54);
|
||||||
|
|
||||||
|
if (m_unk0x15 != 0 && local20 < 10.0f) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
local20 -= 1.0f;
|
||||||
|
|
||||||
|
if (local1c >= 0.001 || local1c <= -0.001) {
|
||||||
|
float local40 = (local24 * local24) + (local20 * local1c * -4.0f);
|
||||||
|
|
||||||
|
if (local40 >= -0.001) {
|
||||||
|
local1c *= 2.0f;
|
||||||
|
local24 = -local24;
|
||||||
|
|
||||||
|
if (local40 < 0.0f) {
|
||||||
|
local40 = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
local40 = sqrt(local40);
|
||||||
|
float local20X = (local24 + local40) / local1c;
|
||||||
|
float local1cX = (local24 - local40) / local1c;
|
||||||
|
|
||||||
|
if (local1cX < local20X) {
|
||||||
|
local40 = local20X;
|
||||||
|
local20X = local1cX;
|
||||||
|
local1cX = local40;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((local20X >= 0.0f && local20X <= p_f1) || (local1cX >= 0.0f && local1cX <= p_f1) ||
|
||||||
|
(local20X <= -0.01 && p_f1 + 0.01 <= local1cX)) {
|
||||||
|
p_v3 = p_v1;
|
||||||
|
|
||||||
|
if (HitActor(actor, TRUE) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
actor->HitActor(this, FALSE);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->GetCollideBox())) {
|
||||||
|
if (HitActor(actor, TRUE) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
actor->HitActor(this, FALSE);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x15 != 0) {
|
||||||
|
m_unk0x15--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100d6be8
|
// GLOBAL: LEGO1 0x100d6be8
|
||||||
// LegoExtraActor::`vbtable'{for `LegoAnimActor'}
|
// LegoExtraActor::`vbtable'{for `LegoAnimActor'}
|
||||||
|
|
||||||
|
@@ -15,6 +15,9 @@ class RadioState : public LegoState {
|
|||||||
public:
|
public:
|
||||||
RadioState();
|
RadioState();
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1002cf50
|
||||||
|
MxBool IsSerializable() override { return FALSE; } // vtable+0x14
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002cf60
|
// FUNCTION: LEGO1 0x1002cf60
|
||||||
// FUNCTION: BETA10 0x100f2850
|
// FUNCTION: BETA10 0x100f2850
|
||||||
const char* ClassName() const override // vtable+0x0c
|
const char* ClassName() const override // vtable+0x0c
|
||||||
@@ -29,8 +32,6 @@ public:
|
|||||||
return !strcmp(p_name, RadioState::ClassName()) || LegoState::IsA(p_name);
|
return !strcmp(p_name, RadioState::ClassName()) || LegoState::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxBool IsSerializable() override; // vtable+0x14
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1002d020
|
// SYNTHETIC: LEGO1 0x1002d020
|
||||||
// RadioState::`scalar deleting destructor'
|
// RadioState::`scalar deleting destructor'
|
||||||
|
|
||||||
|
@@ -228,12 +228,6 @@ RadioState::RadioState()
|
|||||||
m_active = FALSE;
|
m_active = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002cf50
|
|
||||||
MxBool RadioState::IsSerializable()
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002d090
|
// FUNCTION: LEGO1 0x1002d090
|
||||||
MxU32 RadioState::FUN_1002d090()
|
MxU32 RadioState::FUN_1002d090()
|
||||||
{
|
{
|
||||||
|
@@ -130,13 +130,6 @@ LegoCarBuild::LegoCarBuild()
|
|||||||
NotificationManager()->Register(this);
|
NotificationManager()->Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10022930
|
|
||||||
// FUNCTION: BETA10 0x10070070
|
|
||||||
MxBool LegoCarBuild::VTable0x5c()
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10022a80
|
// FUNCTION: LEGO1 0x10022a80
|
||||||
// FUNCTION: BETA10 0x1006aea3
|
// FUNCTION: BETA10 0x1006aea3
|
||||||
LegoCarBuild::~LegoCarBuild()
|
LegoCarBuild::~LegoCarBuild()
|
||||||
|
@@ -661,7 +661,6 @@ MxBool LegoBuildingManager::FUN_10030110(LegoBuildingInfo* p_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10030150
|
// FUNCTION: LEGO1 0x10030150
|
||||||
// FUNCTION: BETA10 0x100644ff
|
|
||||||
void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28)
|
void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28)
|
||||||
{
|
{
|
||||||
m_world = CurrentWorld();
|
m_world = CurrentWorld();
|
||||||
|
@@ -618,7 +618,11 @@ void LegoPlantManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_length)
|
|||||||
|
|
||||||
entry->m_entity = p_entity;
|
entry->m_entity = p_entity;
|
||||||
entry->m_roi = p_entity->GetROI();
|
entry->m_roi = p_entity->GetROI();
|
||||||
entry->m_time = Timer()->GetTime() + p_length + 1000;
|
|
||||||
|
MxLong time = Timer()->GetTime();
|
||||||
|
time += p_length;
|
||||||
|
entry->m_time = time + 1000;
|
||||||
|
|
||||||
FUN_100271b0(p_entity, -1);
|
FUN_100271b0(p_entity, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
#include "anim/legoanim.h"
|
#include "anim/legoanim.h"
|
||||||
#include "legocachesoundmanager.h"
|
#include "legocachesoundmanager.h"
|
||||||
#include "legolocomotionanimpresenter.h"
|
#include "legolocomotionanimpresenter.h"
|
||||||
#include "legopathboundary.h"
|
|
||||||
#include "legosoundmanager.h"
|
#include "legosoundmanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
@@ -421,105 +420,3 @@ MxS32 LegoExtraActor::VTable0x68(Vector3& p_point1, Vector3& p_point2, Vector3&
|
|||||||
{
|
{
|
||||||
return LegoPathActor::VTable0x68(p_point1, p_point2, p_point3);
|
return LegoPathActor::VTable0x68(p_point1, p_point2, p_point3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002b980
|
|
||||||
MxU32 LegoExtraActor::VTable0x6c(
|
|
||||||
LegoPathBoundary* p_boundary,
|
|
||||||
Vector3& p_v1,
|
|
||||||
Vector3& p_v2,
|
|
||||||
float p_f1,
|
|
||||||
float p_f2,
|
|
||||||
Vector3& p_v3
|
|
||||||
)
|
|
||||||
{
|
|
||||||
LegoAnimPresenterSet& presenters = p_boundary->GetPresenters();
|
|
||||||
|
|
||||||
for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
|
|
||||||
if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LegoPathActorSet& plpas = p_boundary->GetActors();
|
|
||||||
LegoPathActorSet lpas(plpas);
|
|
||||||
|
|
||||||
for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
|
|
||||||
if (plpas.find(*itpa) != plpas.end()) {
|
|
||||||
LegoPathActor* actor = *itpa;
|
|
||||||
|
|
||||||
if (this != actor && !(actor->GetActorState() & LegoPathActor::c_noCollide)) {
|
|
||||||
LegoROI* roi = actor->GetROI();
|
|
||||||
|
|
||||||
if ((roi != NULL && roi->GetVisibility()) || actor->GetCameraFlag()) {
|
|
||||||
if (actor->GetUserNavFlag()) {
|
|
||||||
MxMatrix local2world = roi->GetLocal2World();
|
|
||||||
Vector3 local60(local2world[3]);
|
|
||||||
Mx3DPointFloat local54(p_v1);
|
|
||||||
|
|
||||||
local54 -= local60;
|
|
||||||
float local1c = p_v2.Dot(p_v2, p_v2);
|
|
||||||
float local24 = p_v2.Dot(p_v2, local54) * 2.0f;
|
|
||||||
float local20 = local54.Dot(local54, local54);
|
|
||||||
|
|
||||||
if (m_unk0x15 != 0 && local20 < 10.0f) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
local20 -= 1.0f;
|
|
||||||
|
|
||||||
if (local1c >= 0.001 || local1c <= -0.001) {
|
|
||||||
float local40 = (local24 * local24) + (local20 * local1c * -4.0f);
|
|
||||||
|
|
||||||
if (local40 >= -0.001) {
|
|
||||||
local1c *= 2.0f;
|
|
||||||
local24 = -local24;
|
|
||||||
|
|
||||||
if (local40 < 0.0f) {
|
|
||||||
local40 = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
local40 = sqrt(local40);
|
|
||||||
float local20X = (local24 + local40) / local1c;
|
|
||||||
float local1cX = (local24 - local40) / local1c;
|
|
||||||
|
|
||||||
if (local1cX < local20X) {
|
|
||||||
local40 = local20X;
|
|
||||||
local20X = local1cX;
|
|
||||||
local1cX = local40;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((local20X >= 0.0f && local20X <= p_f1) || (local1cX >= 0.0f && local1cX <= p_f1) ||
|
|
||||||
(local20X <= -0.01 && p_f1 + 0.01 <= local1cX)) {
|
|
||||||
p_v3 = p_v1;
|
|
||||||
|
|
||||||
if (HitActor(actor, TRUE) < 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor->HitActor(this, FALSE);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->GetCollideBox())) {
|
|
||||||
if (HitActor(actor, TRUE) < 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor->HitActor(this, FALSE);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_unk0x15 != 0) {
|
|
||||||
m_unk0x15--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user