mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Match
This commit is contained in:
parent
82de1453ed
commit
169d85e170
@ -188,8 +188,9 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ModelDbWorld* worlds = NULL;
|
ModelDbWorld* worlds = NULL;
|
||||||
MxS32 numWorlds;
|
MxS32 numWorlds, i, j;
|
||||||
MxS32 i, j;
|
MxU32 size;
|
||||||
|
MxU8* buff;
|
||||||
FILE* wdbFile = fopen(wdbPath, "rb");
|
FILE* wdbFile = fopen(wdbPath, "rb");
|
||||||
|
|
||||||
if (wdbFile == NULL) {
|
if (wdbFile == NULL) {
|
||||||
@ -209,12 +210,11 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_wdbOffset == 0) {
|
if (g_wdbOffset == 0) {
|
||||||
MxU32 size;
|
|
||||||
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MxU8* buff = new MxU8[size];
|
buff = new MxU8[size];
|
||||||
if (fread(buff, size, 1, wdbFile) != 1) {
|
if (fread(buff, size, 1, wdbFile) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
@ -229,7 +229,6 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete[] buff;
|
delete[] buff;
|
||||||
// buff = NULL;
|
|
||||||
|
|
||||||
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user