diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-30 22:16:05 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-30 22:16:05 +0000 |
commit | 55423efb0687d937256d17ad267fce67ed9bf5cf (patch) | |
tree | a128ca9df2fa6efee823ebaf238898eddb20617b /win32.c | |
parent | 628b1adbd24e1c0753e91030fb2080ca64340719 (diff) | |
download | openttd-55423efb0687d937256d17ad267fce67ed9bf5cf.tar.xz |
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -181,7 +181,7 @@ static void ClientSizeChanged(int w, int h) } } -void DoExitSave(void); +extern void DoExitSave(void); static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -1194,8 +1194,11 @@ static const char _save_succeeded[] = "Be aware that critical parts of the internal game state may have become " "corrupted. The saved game is not guaranteed to work."; -bool EmergencySave(); - +static bool EmergencySave(void) +{ + SaveOrLoad("crash.sav", SL_SAVE); + return true; +} typedef struct { HINTERNET (WINAPI *InternetOpenA)(LPCSTR,DWORD, LPCSTR, LPCSTR, DWORD); |