mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 18:04:06 +00:00
Implement/match LegoActor::ParseAction (#785)
* Implement/match LegoActor::ParseAction * Add call to parent
This commit is contained in:
committed by
GitHub
parent
cf18aa8072
commit
5cf04bc3c3
@@ -104,10 +104,10 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dae0
|
||||
void LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
||||
LegoCacheSound* LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
||||
{
|
||||
// DECOMP: Second parameter is LegoRoi::m_name (0xe4)
|
||||
FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
|
||||
return FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003db10
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#include "legoactor.h"
|
||||
|
||||
#include "define.h"
|
||||
#include "legosoundmanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxutilities.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f32d0
|
||||
@@ -23,10 +28,89 @@ LegoActor::~LegoActor()
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002d390
|
||||
void LegoActor::ParseAction(char*)
|
||||
// FUNCTION: LEGO1 0x1002d390
|
||||
void LegoActor::ParseAction(char* p_extra)
|
||||
{
|
||||
// TODO
|
||||
MxFloat speed = 0.0F;
|
||||
char value[256];
|
||||
value[0] = '\0';
|
||||
|
||||
if (KeyValueStringParse(value, g_strATTACH_CAMERA, p_extra)) {
|
||||
GetROI()->SetVisibility(FALSE);
|
||||
|
||||
if (value[0]) {
|
||||
Mx3DPointFloat location(0.0F, 0.0F, 0.0F);
|
||||
Mx3DPointFloat direction(0.0F, 0.0F, 1.0F);
|
||||
Mx3DPointFloat up(0.0F, 1.0F, 0.0F);
|
||||
|
||||
char* token = strtok(value, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
location[0] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
location[1] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
location[2] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
direction[0] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
direction[1] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
direction[2] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
up[0] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
up[1] = atof(token);
|
||||
}
|
||||
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
if (token != NULL) {
|
||||
up[2] = atof(token);
|
||||
}
|
||||
|
||||
SetWorldTransform(location, direction, up);
|
||||
}
|
||||
else {
|
||||
ResetWorldTransform(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strSPEED, p_extra)) {
|
||||
speed = atof(value);
|
||||
SetWorldSpeed(speed);
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strSOUND, p_extra)) {
|
||||
m_sound = SoundManager()->GetCacheSoundManager()->FUN_1003dae0(value, GetROI()->GetName(), TRUE);
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strMUTE, p_extra)) {
|
||||
FUN_1002d6e0(TRUE);
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strVISIBILITY, p_extra)) {
|
||||
GetROI()->SetVisibility(strcmpi(value, "FALSE") != 0);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002d660
|
||||
@@ -52,3 +136,9 @@ void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
|
||||
LegoEntity::SetROI(p_roi, p_bool1, p_bool2);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002d6e0
|
||||
void LegoActor::FUN_1002d6e0(MxBool)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ void LegoPathActor::VTable0x68(Mx3DPointFloat&, Mx3DPointFloat&, Mx3DPointFloat&
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002f020
|
||||
void LegoPathActor::ParseAction(char*)
|
||||
void LegoPathActor::ParseAction(char* p_extra)
|
||||
{
|
||||
// TODO
|
||||
LegoActor::ParseAction(p_extra);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002f1b0
|
||||
|
||||
Reference in New Issue
Block a user