From ca8f8c0dbd6f1a83ee2a4a2b6cf1bef5f1485f38 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 8 Aug 2019 01:58:04 +0000 Subject: [PATCH] save name in exts git-svn-id: https://svn.eduke32.com/eduke32@7924 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 3 ++- source/duke3d/src/player.h | 2 +- source/duke3d/src/savegame.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 71cc217ad..d5e41118b 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -5640,7 +5640,7 @@ HORIZONLY:; #define SJSON_IMPLEMENT #include "sjson.h" -int portableBackupSave(const char * path, int volume, int level) +int portableBackupSave(const char * path, const char * name, int volume, int level) { if (!FURY) return 0; @@ -5661,6 +5661,7 @@ int portableBackupSave(const char * path, int volume, int level) sjson_node * root = sjson_mkobject(ctx); + sjson_put_string(ctx, root, "name", name); // sjson_put_string(ctx, root, "map", currentboardfilename); sjson_put_int(ctx, root, "volume", volume); sjson_put_int(ctx, root, "level", level); diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index cc4623678..393a85d9b 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -417,6 +417,6 @@ static inline int P_Get(int32_t spriteNum) { return P_GetP((uspriteptr_t)&sprite } #endif -extern int portableBackupSave(const char *, int, int); +extern int portableBackupSave(const char *, const char *, int, int); #endif diff --git a/source/duke3d/src/savegame.cpp b/source/duke3d/src/savegame.cpp index 0d8f85d79..4acd24074 100644 --- a/source/duke3d/src/savegame.cpp +++ b/source/duke3d/src/savegame.cpp @@ -822,7 +822,7 @@ int32_t G_SavePlayer(savebrief_t & sv, bool isAutoSave) VM_OnEvent(EVENT_SAVEGAME, g_player[screenpeek].ps->i, screenpeek); - portableBackupSave(sv.path, ud.last_stateless_volume, ud.last_stateless_level); + portableBackupSave(sv.path, sv.name, ud.last_stateless_volume, ud.last_stateless_level); // SAVE! sv_saveandmakesnapshot(fil, sv.name, 0, 0, 0, 0, isAutoSave);