mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 02:31:15 +00:00
WIP
This commit is contained in:
parent
4f053bde26
commit
7619bb0a7b
@ -189,6 +189,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
|
|
||||||
ModelDbWorld* worlds = NULL;
|
ModelDbWorld* worlds = NULL;
|
||||||
MxS32 numWorlds;
|
MxS32 numWorlds;
|
||||||
|
MxS32 i, j;
|
||||||
FILE* wdbFile = fopen(wdbPath, "rb");
|
FILE* wdbFile = fopen(wdbPath, "rb");
|
||||||
|
|
||||||
if (wdbFile == NULL) {
|
if (wdbFile == NULL) {
|
||||||
@ -197,7 +198,6 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
|
|
||||||
ReadModelDbWorlds(wdbFile, worlds, numWorlds);
|
ReadModelDbWorlds(wdbFile, worlds, numWorlds);
|
||||||
|
|
||||||
MxS32 i;
|
|
||||||
for (i = 0; i < numWorlds; i++) {
|
for (i = 0; i < numWorlds; i++) {
|
||||||
if (!strcmpi(worlds[i].m_worldName, p_worldName)) {
|
if (!strcmpi(worlds[i].m_worldName, p_worldName)) {
|
||||||
break;
|
break;
|
||||||
@ -268,7 +268,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (MxS32 j = 0; j < worlds[i].m_numModels; j++) {
|
for (j = 0; j < worlds[i].m_numModels; j++) {
|
||||||
if (!strnicmp(worlds[i].m_models[j].m_modelName, "isle", 4)) {
|
if (!strnicmp(worlds[i].m_models[j].m_modelName, "isle", 4)) {
|
||||||
switch (g_legoWorldPresenterQuality) {
|
switch (g_legoWorldPresenterQuality) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -288,30 +288,27 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
goto ok;
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else if (g_legoWorldPresenterQuality <= 1 && !strnicmp(worlds[i].m_models[j].m_modelName, "haus", 4)) {
|
||||||
if (g_legoWorldPresenterQuality < 1 && !strcmpi(worlds[i].m_models[j].m_modelName, "haus")) {
|
if (worlds[i].m_models[j].m_modelName[4] == '3') {
|
||||||
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (worlds[i].m_models[j].m_modelName[4] == '3') {
|
|
||||||
if (FUN_100674b0(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 (FUN_100674b0(worlds[i].m_models[j - 2], wdbFile, p_world) != SUCCESS) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
|
||||||
|
|
||||||
if (FUN_100674b0(worlds[i].m_models[j - 1], wdbFile, p_world) != SUCCESS) {
|
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FUN_100674b0(worlds[i].m_models[j - 1], wdbFile, p_world) != SUCCESS) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ok:
|
||||||
|
if (FUN_100674b0(worlds[i].m_models[j], wdbFile, p_world) != SUCCESS) {
|
||||||
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,6 +86,9 @@ class ModelDbPartListCursor : public MxListCursor<ModelDbPart*> {
|
|||||||
// SYNTHETIC: LEGO1 0x10027fc0
|
// SYNTHETIC: LEGO1 0x10027fc0
|
||||||
// MxListCursor<ModelDbPart *>::`scalar deleting destructor'
|
// MxListCursor<ModelDbPart *>::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10028030
|
||||||
|
// ModelDbPartListCursor::~ModelDbPartListCursor
|
||||||
|
|
||||||
// SIZE 0x38
|
// SIZE 0x38
|
||||||
struct ModelDbModel {
|
struct ModelDbModel {
|
||||||
MxResult Read(FILE* p_file);
|
MxResult Read(FILE* p_file);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user