diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index dc087d57..9b2a6512 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -164,16 +164,10 @@ void IsleApp::Close() TransitionManager()->SetWaitIndicator(NULL); Lego()->StopTimer(); - MxLong lVar8; - do { - lVar8 = Streamer()->Close(NULL); - } while (lVar8 == 0); - - while (Lego()) { - if (Lego()->DoesEntityExist(ds)) { - break; - } + while (Streamer()->Close(NULL) == SUCCESS) { + } + while (Lego() && !Lego()->DoesEntityExist(ds)) { Timer()->GetRealTime(); TickleManager()->Tickle(); } @@ -404,9 +398,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DefWindowProcA(hWnd, uMsg, wParam, lParam); case WM_CLOSE: if (!g_closed && g_isle) { - if (g_isle) { - delete g_isle; - } + delete g_isle; g_isle = NULL; g_closed = TRUE; return 0; @@ -646,8 +638,8 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine) } GameState()->SetSavePath(m_savePath); - GameState()->SerializePlayersInfo(1); - GameState()->SerializeScoreHistory(1); + GameState()->SerializePlayersInfo(LegoStorage::c_read); + GameState()->SerializeScoreHistory(LegoStorage::c_read); int iVar10; switch (m_islandQuality) { diff --git a/ISLE/library_msvc.h b/ISLE/library_msvc.h index a837fd3b..b65591d6 100644 --- a/ISLE/library_msvc.h +++ b/ISLE/library_msvc.h @@ -18,6 +18,18 @@ // LIBRARY: ISLE 0x407ec0 // ___CxxFrameHandler +// LIBRARY: ISLE 0x4080ec +// __global_unwind2 + +// LIBRARY: ISLE 0x40812e +// __local_unwind2 + +// LIBRARY: ISLE 0x4081b9 +// __NLG_Notify1 + +// LIBRARY: ISLE 0x4081c2 +// __NLG_Notify + // LIBRARY: ISLE 0x4081e0 // _srand @@ -30,6 +42,9 @@ // LIBRARY: ISLE 0x4082d0 // _atoi +// LIBRARY: ISLE 0x408490 +// __amsg_exit + // LIBRARY: ISLE 0x4084c0 // ?_query_new_handler@@YAP6AHI@ZXZ @@ -42,22 +57,295 @@ // LIBRARY: ISLE 0x408630 // _abort +// LIBRARY: ISLE 0x408650 +// ___InternalCxxFrameHandler + +// LIBRARY: ISLE 0x408b30 +// ___FrameUnwindToState + +// LIBRARY: ISLE 0x4090c0 +// __CallSettingFrame@12 + // LIBRARY: ISLE 0x409110 // __mtinit +// LIBRARY: ISLE 0x409170 +// __initptd + // LIBRARY: ISLE 0x409190 // __getptd +// LIBRARY: ISLE 0x409200 +// __isctype + +// LIBRARY: ISLE 0x4092e0 +// ?terminate@@YAXXZ + +// LIBRARY: ISLE 0x409360 +// ?_inconsistency@@YAXXZ + +// LIBRARY: ISLE 0x4093e0 +// __cinit + +// LIBRARY: ISLE 0x409410 +// _exit + +// LIBRARY: ISLE 0x409430 +// __exit + +// LIBRARY: ISLE 0x409550 +// __XcptFilter + +// LIBRARY: ISLE 0x4096d0 +// __ismbblead + +// LIBRARY: ISLE 0x409730 +// __setenvp + +// LIBRARY: ISLE 0x409820 +// __setargv + +// LIBRARY: ISLE 0x409a90 +// ___crtGetEnvironmentStringsA + +// LIBRARY: ISLE 0x409c20 +// __setmbcp + +// LIBRARY: ISLE 0x409f30 +// ___initmbctable + +// LIBRARY: ISLE 0x409f40 +// __ioinit + +// LIBRARY: ISLE 0x40a120 +// __heap_init + +// LIBRARY: ISLE 0x40a160 +// __FF_MSGBANNER + +// LIBRARY: ISLE 0x40a1a0 +// __NMSG_WRITE + +// LIBRARY: ISLE 0x40a3a0 +// __mtinitlocks + +// LIBRARY: ISLE 0x40a3d0 +// __lock + +// LIBRARY: ISLE 0x40a440 +// __unlock + +// LIBRARY: ISLE 0x40a540 +// __flsbuf + +// LIBRARY: ISLE 0x40a690 +// __output + +// LIBRARY: ISLE 0x40b090 +// _write_multi_char + +// LIBRARY: ISLE 0x40b0d0 +// _write_string + +// LIBRARY: ISLE 0x40b150 +// _raise + +// LIBRARY: ISLE 0x40b780 +// ___crtGetStringTypeA + +// LIBRARY: ISLE 0x40b8b0 +// ___sbh_new_region + +// LIBRARY: ISLE 0x40ba20 +// ___crtMessageBoxA + +// LIBRARY: ISLE 0x40bac0 +// _strncpy + +// LIBRARY: ISLE 0x40bcb0 +// __write + +// LIBRARY: ISLE 0x40bd30 +// __write_lk + +// LIBRARY: ISLE 0x40bf30 +// __lseek + +// LIBRARY: ISLE 0x40bfb0 +// __lseek_lk + +// LIBRARY: ISLE 0x40c040 +// __getbuf + +// LIBRARY: ISLE 0x40c090 +// __isatty + +// LIBRARY: ISLE 0x40c0c0 +// _wctomb + +// LIBRARY: ISLE 0x40c120 +// __wctomb_lk + +// LIBRARY: ISLE 0x40c1c0 +// __aulldiv + +// LIBRARY: ISLE 0x40c230 +// __aullrem + +// LIBRARY: ISLE 0x40c2b0 +// __dosmaperr + +// LIBRARY: ISLE 0x40c330 +// __errno + +// LIBRARY: ISLE 0x40c340 +// ___doserrno + +// LIBRARY: ISLE 0x40c710 +// __get_osfhandle + +// LIBRARY: ISLE 0x40c760 +// __lock_fhandle + +// LIBRARY: ISLE 0x40c7d0 +// __unlock_fhandle + +// LIBRARY: ISLE 0x40c810 +// __fptrap + +// GLOBAL: ISLE 0x40f448 +// ___lookuptable + +// GLOBAL: ISLE 0x410000 +// ___xc_a + +// GLOBAL: ISLE 0x410008 +// ___xc_z + +// GLOBAL: ISLE 0x41000c +// ___xi_a + +// GLOBAL: ISLE 0x410018 +// ___xi_z + +// GLOBAL: ISLE 0x41068c +// __NLG_Destination + +// GLOBAL: ISLE 0x41069c +// __aenvptr + +// GLOBAL: ISLE 0x4106a8 +// ___error_mode + +// GLOBAL: ISLE 0x4106ac +// ___app_type + +// GLOBAL: ISLE 0x4106c0 +// ___tlsindex + +// GLOBAL: ISLE 0x4106c8 +// __pctype + +// GLOBAL: ISLE 0x4108d4 +// ___mb_cur_max + +// GLOBAL: ISLE 0x4108e0 +// ?__pInconsistency@@3P6AXXZA + // GLOBAL: ISLE 0x4108e8 // __osver +// GLOBAL: ISLE 0x4108ec +// __winver + // GLOBAL: ISLE 0x4108f0 // __winmajor // GLOBAL: ISLE 0x4108f4 // __winminor +// GLOBAL: ISLE 0x4108f8 +// ___argc + +// GLOBAL: ISLE 0x4108fc +// ___argv + +// GLOBAL: ISLE 0x410904 +// __environ + +// GLOBAL: ISLE 0x410914 +// __pgmptr + +// GLOBAL: ISLE 0x410928 +// __XcptActTab + +// GLOBAL: ISLE 0x4109a0 +// __First_FPE_Indx + +// GLOBAL: ISLE 0x4109a4 +// __Num_FPE + +// GLOBAL: ISLE 0x4109b8 +// __mbctype + +// GLOBAL: ISLE 0x410abc +// ___mbcodepage + +// GLOBAL: ISLE 0x410ac0 +// ___mblcid + +// GLOBAL: ISLE 0x410ac8 +// ___mbulinfo + +// GLOBAL: ISLE 0x410bd0 +// ___badioinfo + +// GLOBAL: ISLE 0x410c88 +// __adbgmsg + +// GLOBAL: ISLE 0x410c90 +// __locktable + // GLOBAL: ISLE 0x410d50 // __newmode +// GLOBAL: ISLE 0x410d54 +// ___nullstring + +// GLOBAL: ISLE 0x410d58 +// ___wnullstring + +// GLOBAL: ISLE 0x410d90 +// ___lc_codepage + +// GLOBAL: ISLE 0x410d98 +// ___small_block_heap + +// GLOBAL: ISLE 0x411850 +// __cflush + +// XGLOBAL ISLE 0x4125f8 +// ?_pnhHeap@@3P6AHI@ZA + +// GLOBAL: ISLE 0x412888 +// ___setlc_active + +// GLOBAL: ISLE 0x41288c +// ___unguarded_readlc_active + +// GLOBAL: ISLE 0x4138a4 +// __crtheap + +// GLOBAL: ISLE 0x4138b0 +// ___pioinfo + +// GLOBAL: ISLE 0x4139b0 +// __nhandle + +// GLOBAL: ISLE 0x4139bc +// __FPinit + +// GLOBAL: ISLE 0x4139c0 +// __acmdln + #endif diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index f643cc94..1e8ea520 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -44,7 +44,7 @@ DECOMP_SIZE_ASSERT(Isle, 0x140) // GLOBAL: LEGO1 0x100f1198 MxU32 g_isleFlags = 0x7f; -// GLOBAL: ISLE 0x100f37f0 +// GLOBAL: LEGO1 0x100f37f0 MxS32 g_unk0x100f37f0[] = { Act1State::e_unk953, Act1State::e_unk954,