From 9dce219eb1f2ef5568b1f49b4ebd60f99530dc5c Mon Sep 17 00:00:00 2001 From: NovaRain Date: Mon, 8 Jul 2024 09:35:50 +0800 Subject: [PATCH] Updated version number Minor code cosmetic edits. --- sfall/Modules/HeroAppearance.cpp | 6 +++--- sfall/Modules/LoadGameHook.cpp | 5 ++--- sfall/Modules/Scripting/Handlers/Utils.cpp | 6 +++--- sfall/version.h | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sfall/Modules/HeroAppearance.cpp b/sfall/Modules/HeroAppearance.cpp index e382649d6..d7f50cc0b 100644 --- a/sfall/Modules/HeroAppearance.cpp +++ b/sfall/Modules/HeroAppearance.cpp @@ -518,7 +518,7 @@ static void surface_draw(long width, long height, long fromWidth, long fromX, lo static void DrawBody(long critNum, BYTE* surface, long x, long y, long toWidth) { DWORD critFrmLock; - fo::FrmFile *critFrm = fo::func::art_ptr_lock(BuildFrmId(1, critNum), &critFrmLock); + fo::FrmFile* critFrm = fo::func::art_ptr_lock(BuildFrmId(1, critNum), &critFrmLock); DWORD critWidth = fo::func::art_frame_width(critFrm, 0, charRotOri); DWORD critHeight = fo::func::art_frame_length(critFrm, 0, charRotOri); BYTE* critSurface = fo::func::art_frame_data(critFrm, 0, charRotOri); @@ -656,7 +656,7 @@ static void __stdcall DrawCharNoteNewChar(bool type) { void __stdcall HeroSelectWindow(int raceStyleFlag) { if (!HeroAppearance::appModEnabled) return; - fo::FrmFile *frm = LoadUnlistedFrmCached("AppHeroWin.frm", fo::OBJ_TYPE_INTRFACE); + fo::FrmFile* frm = LoadUnlistedFrmCached("AppHeroWin.frm", fo::OBJ_TYPE_INTRFACE); if (frm == nullptr) { fo::func::debug_printf("\nApperanceMod: art\\intrface\\AppHeroWin.frm file not found."); return; @@ -1150,7 +1150,7 @@ static __declspec(naked) void FixCharScrnBack() { if (charScrnBackSurface == nullptr) { charScrnBackSurface = new BYTE [640 * 480]; - fo::FrmFile *frm = LoadUnlistedFrmCached((fo::var::glblmode) ? "AppChCrt.frm" : "AppChEdt.frm", fo::OBJ_TYPE_INTRFACE); + fo::FrmFile* frm = LoadUnlistedFrmCached((fo::var::glblmode) ? "AppChCrt.frm" : "AppChEdt.frm", fo::OBJ_TYPE_INTRFACE); if (frm != nullptr) { surface_draw(640, 480, 640, 0, 0, frm->frameData[0].data, 640, 0, 0, charScrnBackSurface); } else { diff --git a/sfall/Modules/LoadGameHook.cpp b/sfall/Modules/LoadGameHook.cpp index 78cdff6d3..344219dcd 100644 --- a/sfall/Modules/LoadGameHook.cpp +++ b/sfall/Modules/LoadGameHook.cpp @@ -288,13 +288,12 @@ static bool LoadGame_Before() { // called whenever game is being reset (prior to loading a save or when returning to main menu) static bool __stdcall GameReset(DWORD isGameLoad) { onGameReset.invoke(); - inLoop = 0; - gameLoaded = false; - if (isDebug) { char* str = (isGameLoad) ? "on Load" : "on Exit"; fo::func::debug_printf("\nSFALL: [State reset %s]\n", str); } + inLoop = 0; + gameLoaded = false; return (isGameLoad) ? LoadGame_Before() : false; } diff --git a/sfall/Modules/Scripting/Handlers/Utils.cpp b/sfall/Modules/Scripting/Handlers/Utils.cpp index 1c9b2e085..fd87c6ba3 100644 --- a/sfall/Modules/Scripting/Handlers/Utils.cpp +++ b/sfall/Modules/Scripting/Handlers/Utils.cpp @@ -267,15 +267,15 @@ static const char* sprintf_lite(OpcodeContext& ctx, const char* opcodeName) { c = 's'; // don't allow wide strings } if (c == 's' && !arg.isString() || // don't allow treating non-string values as string pointers - c == 'n') // don't allow "n" specifier + c == 'n') // don't allow "n" specifier { c = 'd'; } newFmt[j++] = c; newFmt[j] = '\0'; partLen = arg.isFloat() - ? _snprintf(outBuf, bufCount, newFmt, arg.floatValue()) - : _snprintf(outBuf, bufCount, newFmt, arg.rawValue()); + ? _snprintf(outBuf, bufCount, newFmt, arg.floatValue()) + : _snprintf(outBuf, bufCount, newFmt, arg.rawValue()); } outBuf += partLen; bufCount -= partLen; diff --git a/sfall/version.h b/sfall/version.h index 94d3efb24..aed7dacae 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -25,6 +25,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 4 #define VERSION_BUILD 4 -#define VERSION_REV 0 +#define VERSION_REV 1 -#define VERSION_STRING "4.4.4" +#define VERSION_STRING "4.4.4.1"