summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-05-30 22:16:05 +0000
committerDarkvater <darkvater@openttd.org>2005-05-30 22:16:05 +0000
commit55423efb0687d937256d17ad267fce67ed9bf5cf (patch)
treea128ca9df2fa6efee823ebaf238898eddb20617b /win32.c
parent628b1adbd24e1c0753e91030fb2080ca64340719 (diff)
downloadopenttd-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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/win32.c b/win32.c
index 6f2a746b3..a2ef16322 100644
--- a/win32.c
+++ b/win32.c
@@ -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);