mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-24 04:26:55 -04:00
Merge remote-tracking branch 'isle/master'
This commit is contained in:
commit
d9dac02db5
@ -44,7 +44,7 @@ struct AnimInfo {
|
||||
MxU8 m_modelCount; // 0x20
|
||||
MxU16 m_unk0x22; // 0x22
|
||||
ModelInfo* m_models; // 0x24
|
||||
MxS8 m_unk0x28; // 0x28
|
||||
MxS8 m_characterIndex; // 0x28
|
||||
MxBool m_unk0x29; // 0x29
|
||||
MxS8 m_unk0x2a[3]; // 0x2a
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ private:
|
||||
MxU8 m_unk0x59; // 0x59
|
||||
MxU32 m_animmanId; // 0x5c
|
||||
LegoTranInfo* m_tranInfo; // 0x60
|
||||
LegoWorld* m_unk0x64; // 0x64
|
||||
LegoWorld* m_world; // 0x64
|
||||
MxMatrix* m_unk0x68; // 0x68
|
||||
LegoROI** m_roiMap; // 0x6c
|
||||
MxU32 m_roiMapSize; // 0x70
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
// LegoWorld::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
LegoPathControllerList m_list0x68; // 0x68
|
||||
LegoPathControllerList m_pathControllerList; // 0x68
|
||||
MxPresenterList m_animPresenters; // 0x80
|
||||
LegoCameraController* m_cameraController; // 0x98
|
||||
LegoEntityList* m_entityList; // 0x9c
|
||||
|
@ -51,10 +51,10 @@ public:
|
||||
// LegoWorldPresenter::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
MxResult FUN_10067360(ModelDbPart& p_part, SDL_IOStream* p_wdbFile);
|
||||
MxResult FUN_100674b0(ModelDbModel& p_model, SDL_IOStream* p_wdbFile, LegoWorld* p_world);
|
||||
MxResult LoadWorldPart(ModelDbPart& p_part, SDL_IOStream* p_wdbFile);
|
||||
MxResult LoadWorldModel(ModelDbModel& p_model, SDL_IOStream* p_wdbFile, LegoWorld* p_world);
|
||||
|
||||
undefined4 m_unk0x50;
|
||||
MxU32 m_nextObjectId;
|
||||
};
|
||||
|
||||
#endif // LEGOWORLDPRESENTER_H
|
||||
|
@ -878,18 +878,23 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100246e0
|
||||
// FUNCTION: BETA10 0x1006d25a
|
||||
undefined4 LegoCarBuild::FUN_100246e0(MxLong p_x, MxLong p_y)
|
||||
{
|
||||
undefined4 result = 0;
|
||||
|
||||
switch (m_unk0x100) {
|
||||
case 3:
|
||||
FUN_10022f30();
|
||||
return 1;
|
||||
result = 1;
|
||||
break;
|
||||
case 4:
|
||||
FUN_10022f00();
|
||||
return 1;
|
||||
result = 1;
|
||||
break;
|
||||
case 6:
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (SpheresIntersect(m_unk0x114, m_unk0x110->GetWorldBoundingSphere())) {
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName()) &&
|
||||
SpheresIntersect(m_unk0x114, m_unk0x110->GetWorldBoundingSphere())) {
|
||||
FUN_10024f70(FALSE);
|
||||
FUN_100250e0(FALSE);
|
||||
m_unk0x100 = 0;
|
||||
@ -897,29 +902,28 @@ undefined4 LegoCarBuild::FUN_100246e0(MxLong p_x, MxLong p_y)
|
||||
m_PlaceBrick_Sound->Enable(FALSE);
|
||||
m_PlaceBrick_Sound->Enable(TRUE);
|
||||
m_unk0x258->SetUnknown0xbc(1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_unk0x258->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
else if (m_unk0x258->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
if (SpheresIntersect(m_unk0x114, m_unk0x110->GetWorldBoundingSphere())) {
|
||||
m_PlaceBrick_Sound->Enable(FALSE);
|
||||
m_PlaceBrick_Sound->Enable(TRUE);
|
||||
FUN_100236d0();
|
||||
return 1;
|
||||
}
|
||||
|
||||
else {
|
||||
VTable0x6c();
|
||||
m_unk0x100 = 5;
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
VTable0x6c();
|
||||
m_unk0x100 = 5;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10024850
|
||||
|
@ -682,7 +682,7 @@ MxResult LegoAnimationManager::LoadWorldInfo(LegoOmni::World p_worldId)
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_anims[j].m_unk0x28 = GetCharacterIndex(m_anims[j].m_name + strlen(m_anims[j].m_name) - 2);
|
||||
m_anims[j].m_characterIndex = GetCharacterIndex(m_anims[j].m_name + strlen(m_anims[j].m_name) - 2);
|
||||
m_anims[j].m_unk0x29 = FALSE;
|
||||
|
||||
for (k = 0; k < 3; k++) {
|
||||
@ -1618,7 +1618,8 @@ MxU16 LegoAnimationManager::FUN_10062110(
|
||||
MxS8 index = GetCharacterIndex(p_roi->GetName());
|
||||
|
||||
for (MxU16 i = m_unk0x0e; i <= m_unk0x10; i++) {
|
||||
if (m_anims[i].m_unk0x28 == index && m_anims[i].m_unk0x0c & p_unk0x0c && m_anims[i].m_unk0x29) {
|
||||
if (m_anims[i].m_characterIndex == index && m_anims[i].m_unk0x0c & p_unk0x0c &&
|
||||
m_anims[i].m_unk0x29) {
|
||||
MxS32 vehicleId = g_characters[index].m_vehicleId;
|
||||
if (vehicleId >= 0) {
|
||||
MxBool found = FALSE;
|
||||
@ -1639,7 +1640,7 @@ MxU16 LegoAnimationManager::FUN_10062110(
|
||||
MxU16 unk0x22 = m_anims[i].m_unk0x22;
|
||||
|
||||
for (i = i + 1; i <= m_unk0x10; i++) {
|
||||
if (m_anims[i].m_unk0x28 == index && m_anims[i].m_unk0x0c & p_unk0x0c &&
|
||||
if (m_anims[i].m_characterIndex == index && m_anims[i].m_unk0x0c & p_unk0x0c &&
|
||||
m_anims[i].m_unk0x29 && m_anims[i].m_unk0x22 < unk0x22) {
|
||||
result = i;
|
||||
unk0x22 = m_anims[i].m_unk0x22;
|
||||
|
@ -30,7 +30,7 @@ LegoAnimMMPresenter::LegoAnimMMPresenter()
|
||||
m_unk0x59 = 0;
|
||||
m_tranInfo = NULL;
|
||||
m_unk0x54 = 0;
|
||||
m_unk0x64 = NULL;
|
||||
m_world = NULL;
|
||||
m_unk0x68 = NULL;
|
||||
m_roiMap = NULL;
|
||||
m_roiMapSize = 0;
|
||||
@ -101,9 +101,9 @@ MxResult LegoAnimMMPresenter::StartAction(MxStreamController* p_controller, MxDS
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x64 = CurrentWorld();
|
||||
if (m_unk0x64) {
|
||||
m_unk0x64->Add(this);
|
||||
m_world = CurrentWorld();
|
||||
if (m_world) {
|
||||
m_world->Add(this);
|
||||
}
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
|
||||
@ -133,8 +133,8 @@ void LegoAnimMMPresenter::EndAction()
|
||||
if (m_action != NULL) {
|
||||
MxCompositePresenter::EndAction();
|
||||
|
||||
if (m_unk0x64 != NULL) {
|
||||
m_unk0x64->Remove(this);
|
||||
if (m_world != NULL) {
|
||||
m_world->Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -429,11 +429,11 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||
LegoPathActor* actor = UserActor();
|
||||
|
||||
if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_location != -1 && actor != NULL) {
|
||||
if (m_unk0x64 != NULL) {
|
||||
if (m_world != NULL) {
|
||||
undefined4 und = 1;
|
||||
|
||||
if (m_presenter != NULL) {
|
||||
m_unk0x64->RemoveActor(actor);
|
||||
m_world->RemoveActor(actor);
|
||||
|
||||
if (m_tranInfo->m_unk0x29) {
|
||||
Mx3DPointFloat position, direction;
|
||||
@ -442,7 +442,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||
direction = viewROI->GetWorldDirection();
|
||||
position[1] -= 1.25;
|
||||
|
||||
und = m_unk0x64->PlaceActor(actor, m_presenter, position, direction);
|
||||
und = m_world->PlaceActor(actor, m_presenter, position, direction);
|
||||
}
|
||||
else {
|
||||
und = 0;
|
||||
@ -452,7 +452,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||
if (und != 0) {
|
||||
viewROI->WrappedSetLocalTransform(m_tranInfo->m_unk0x2c);
|
||||
VideoManager()->Get3DManager()->Moved(*viewROI);
|
||||
m_unk0x64->PlaceActor(actor);
|
||||
m_world->PlaceActor(actor);
|
||||
}
|
||||
|
||||
if (m_tranInfo->m_unk0x29) {
|
||||
|
@ -34,7 +34,7 @@ DECOMP_SIZE_ASSERT(LegoCacheSoundList, 0x18)
|
||||
DECOMP_SIZE_ASSERT(LegoCacheSoundListCursor, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x1001ca40
|
||||
LegoWorld::LegoWorld() : m_list0x68(TRUE)
|
||||
LegoWorld::LegoWorld() : m_pathControllerList(TRUE)
|
||||
{
|
||||
m_startupTicks = e_four;
|
||||
m_cameraController = NULL;
|
||||
@ -102,7 +102,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
SetCurrentWorld(NULL);
|
||||
}
|
||||
|
||||
m_list0x68.DeleteAll();
|
||||
m_pathControllerList.DeleteAll();
|
||||
|
||||
if (m_cameraController) {
|
||||
delete m_cameraController;
|
||||
@ -275,7 +275,7 @@ MxResult LegoWorld::PlaceActor(
|
||||
float p_destScale
|
||||
)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -290,7 +290,7 @@ MxResult LegoWorld::PlaceActor(
|
||||
// FUNCTION: LEGO1 0x1001fa70
|
||||
MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -310,7 +310,7 @@ MxResult LegoWorld::PlaceActor(
|
||||
Vector3& p_direction
|
||||
)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -326,7 +326,7 @@ MxResult LegoWorld::PlaceActor(
|
||||
// FUNCTION: BETA10 0x100da4bf
|
||||
void LegoWorld::RemoveActor(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -339,7 +339,7 @@ void LegoWorld::RemoveActor(LegoPathActor* p_actor)
|
||||
// FUNCTION: BETA10 0x100da560
|
||||
MxBool LegoWorld::ActorExists(LegoPathActor* p_actor)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -355,7 +355,7 @@ MxBool LegoWorld::ActorExists(LegoPathActor* p_actor)
|
||||
// FUNCTION: BETA10 0x100da621
|
||||
void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -367,7 +367,7 @@ void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
|
||||
// FUNCTION: BETA10 0x100da6b5
|
||||
void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -379,14 +379,14 @@ void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter)
|
||||
void LegoWorld::AddPath(LegoPathController* p_controller)
|
||||
{
|
||||
p_controller->FUN_10046bb0(this);
|
||||
m_list0x68.Append(p_controller);
|
||||
m_pathControllerList.Append(p_controller);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10020020
|
||||
// FUNCTION: BETA10 0x100da77c
|
||||
LegoPathBoundary* LegoWorld::FindPathBoundary(const char* p_name)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
@ -403,7 +403,7 @@ LegoPathBoundary* LegoWorld::FindPathBoundary(const char* p_name)
|
||||
// FUNCTION: LEGO1 0x10020120
|
||||
MxResult LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_boundaries, MxS32& p_numL)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||
LegoPathController* controller;
|
||||
|
||||
cursor.Next(controller);
|
||||
@ -797,7 +797,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||
}
|
||||
}
|
||||
|
||||
LegoPathControllerListCursor pathControllerCursor(&m_list0x68);
|
||||
LegoPathControllerListCursor pathControllerCursor(&m_pathControllerList);
|
||||
|
||||
while (pathControllerCursor.Next(controller)) {
|
||||
controller->Enable(FALSE);
|
||||
|
@ -47,7 +47,7 @@ void LegoWorldPresenter::configureLegoWorldPresenter(MxS32 p_legoWorldPresenterQ
|
||||
// FUNCTION: LEGO1 0x100665c0
|
||||
LegoWorldPresenter::LegoWorldPresenter()
|
||||
{
|
||||
m_unk0x50 = 50000;
|
||||
m_nextObjectId = 50000;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066770
|
||||
@ -261,7 +261,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
|
||||
while (cursor.Next(part)) {
|
||||
if (GetViewLODListManager()->Lookup(part->m_roiName.GetData()) == NULL &&
|
||||
FUN_10067360(*part, wdbFile) != SUCCESS) {
|
||||
LoadWorldPart(*part, wdbFile) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
@ -287,15 +287,15 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
}
|
||||
else if (g_legoWorldPresenterQuality <= 1 && !SDL_strncasecmp(worlds[i].m_models[j].m_modelName, "haus", 4)) {
|
||||
if (worlds[i].m_models[j].m_modelName[4] == '3') {
|
||||
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||
if (LoadWorldModel(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (FUN_100674b0(worlds[i].m_models[j - 2], wdbFile, p_world) != SUCCESS) {
|
||||
if (LoadWorldModel(worlds[i].m_models[j - 2], wdbFile, p_world) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (FUN_100674b0(worlds[i].m_models[j - 1], wdbFile, p_world) != SUCCESS) {
|
||||
if (LoadWorldModel(worlds[i].m_models[j - 1], wdbFile, p_world) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
@ -303,7 +303,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||
if (LoadWorldModel(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10067360
|
||||
MxResult LegoWorldPresenter::FUN_10067360(ModelDbPart& p_part, SDL_IOStream* p_wdbFile)
|
||||
MxResult LegoWorldPresenter::LoadWorldPart(ModelDbPart& p_part, SDL_IOStream* p_wdbFile)
|
||||
{
|
||||
MxResult result;
|
||||
MxU8* buff = new MxU8[p_part.m_partDataLength];
|
||||
@ -340,7 +340,11 @@ MxResult LegoWorldPresenter::FUN_10067360(ModelDbPart& p_part, SDL_IOStream* p_w
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100674b0
|
||||
<<<<<<< HEAD
|
||||
MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, SDL_IOStream* p_wdbFile, LegoWorld* p_world)
|
||||
=======
|
||||
MxResult LegoWorldPresenter::LoadWorldModel(ModelDbModel& p_model, FILE* p_wdbFile, LegoWorld* p_world)
|
||||
>>>>>>> isle/master
|
||||
{
|
||||
MxU8* buff = new MxU8[p_model.m_modelDataLength];
|
||||
|
||||
@ -359,8 +363,8 @@ MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, SDL_IOStream* p
|
||||
action.SetDirection(p_model.m_direction);
|
||||
action.SetUp(p_model.m_up);
|
||||
|
||||
MxU32 objectId = m_unk0x50;
|
||||
m_unk0x50++;
|
||||
MxU32 objectId = m_nextObjectId;
|
||||
m_nextObjectId++;
|
||||
action.SetObjectId(objectId);
|
||||
|
||||
action.SetAtomId(atom);
|
||||
|
@ -66,13 +66,12 @@ MxResult JetskiRace::Create(MxDSAction& p_dsAction)
|
||||
m_unk0x130.SetRight(543);
|
||||
m_unk0x130.SetBottom(333);
|
||||
LegoJetski::InitSoundIndices();
|
||||
InvokeAction(
|
||||
Extra::e_start,
|
||||
m_atomId,
|
||||
DuneBuggy::GetColorOffset(g_varJSFRNTY5) + (DuneBuggy::GetColorOffset(g_varJSWNSHY5) * 5 + 0xf) * 2,
|
||||
NULL
|
||||
);
|
||||
|
||||
MxS32 streamId =
|
||||
DuneBuggy::GetColorOffset(g_varJSFRNTY5) + (DuneBuggy::GetColorOffset(g_varJSWNSHY5) * 5 + 0xf) * 2;
|
||||
InvokeAction(Extra::e_start, m_atomId, streamId, NULL);
|
||||
InvokeAction(Extra::e_start, m_atomId, JetraceScript::c_JetskiDashboard, NULL);
|
||||
|
||||
g_unk0x100f119c = TRUE;
|
||||
|
||||
return result;
|
||||
|
@ -203,6 +203,7 @@ void Hospital::ReadyWorld()
|
||||
|
||||
PlayAction(hospitalScript[m_hospitalState->m_unk0x0c]);
|
||||
m_currentAction = hospitalScript[m_hospitalState->m_unk0x0c];
|
||||
m_unk0x108 = 1;
|
||||
}
|
||||
else {
|
||||
m_unk0x100 = 1;
|
||||
@ -212,9 +213,8 @@ void Hospital::ReadyWorld()
|
||||
|
||||
PlayAction(HospitalScript::c_hho003cl_RunAnim);
|
||||
m_currentAction = HospitalScript::c_hho003cl_RunAnim;
|
||||
}
|
||||
|
||||
m_unk0x108 = 1;
|
||||
}
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
break;
|
||||
case 0x131:
|
||||
if (m_act1state->m_unk0x018 != 10) {
|
||||
AnimationManager()->FUN_10064740(FALSE);
|
||||
AnimationManager()->FUN_10064740(NULL);
|
||||
}
|
||||
result = 1;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user