Merge branch 'cpp-11' into save_ext

# Conflicts:
#	src/saveload/saveload.h
This commit is contained in:
Jonathan G Rennison
2019-02-13 18:51:53 +00:00
108 changed files with 795 additions and 350 deletions

View File

@@ -395,18 +395,21 @@ void NORETURN SlErrorCorrupt(const char *msg, bool already_malloced)
}
/**
* As SlErrorCorruptFmt, except that it takes a format string and additional parameters
* Issue an SlErrorCorrupt with a format string.
* @param format format string
* @param ... arguments to format string
* @note This function does never return as it throws an exception to
* break out of all the saveload code.
*/
void NORETURN CDECL SlErrorCorruptFmt(const char *msg, ...)
void NORETURN CDECL SlErrorCorruptFmt(const char *format, ...)
{
va_list va;
va_start(va, msg);
char *str = str_vfmt(msg, va);
va_start(va, format);
char *str = str_vfmt(format, va);
va_end(va);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, str, true);
}
typedef void (*AsyncSaveFinishProc)(); ///< Callback for when the savegame loading is finished.
static AsyncSaveFinishProc _async_save_finish = NULL; ///< Callback to call when the savegame loading is finished.
static ThreadObject *_save_thread; ///< The thread we're using to compress and write a savegame