From b475bf91fb5ecc9ac32275d1b4b6111729fbe9d5 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Thu, 14 Oct 2021 09:25:15 +0800 Subject: [PATCH] Updated Polish translation Added char* variant functions to Logging.cpp. --- artifacts/translations/polish.ini | 2 +- sfall/FalloutEngine/Functions.cpp | 2 +- sfall/Logging.cpp | 16 +++++++++++++++- sfall/Logging.h | 4 +++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/artifacts/translations/polish.ini b/artifacts/translations/polish.ini index 0d3130da..5d5398d8 100644 --- a/artifacts/translations/polish.ini +++ b/artifacts/translations/polish.ini @@ -10,7 +10,7 @@ SaveSfallDataFail=B PartyLvlMsg=Lvl: PartyACMsg=AC: PartyAddictMsg=Uzależniony -NPCPickupFail=%s nie można podnieść przedmiotu. +NPCPickupFail=%s nie może podnieść przedmiotu. PartyOrderAttackHuman=Zajmę się tym.|Okej, zrozumiałem.|No to mamy plan. PartyOrderAttackCreature=::Warknięcie:: diff --git a/sfall/FalloutEngine/Functions.cpp b/sfall/FalloutEngine/Functions.cpp index 78755a4b..ac38c512 100644 --- a/sfall/FalloutEngine/Functions.cpp +++ b/sfall/FalloutEngine/Functions.cpp @@ -156,7 +156,7 @@ void __declspec(naked) interpretError(const char* fmt, ...) { long __fastcall tile_num(long x, long y) { __asm push ebx; // don't delete (bug in tile_num_) - WRAP_WATCOM_FCALL2(tile_num_, x, y) + WRAP_WATCOM_FCALL2(tile_num_, x, y); __asm pop ebx; } diff --git a/sfall/Logging.cpp b/sfall/Logging.cpp index 0d34bf44..c76d78ea 100644 --- a/sfall/Logging.cpp +++ b/sfall/Logging.cpp @@ -29,11 +29,18 @@ namespace sfall static int DebugTypes = 0; static std::ofstream Log; -void dlog(const std::string& a) { +void dlog(const char* a) { Log << a; Log.flush(); } +void dlog(const char* a, int type) { + if (isDebug && (type == DL_MAIN || (type & DebugTypes))) { + Log << a; + Log.flush(); + } +} + void dlog(const std::string& a, int type) { if (isDebug && (type == DL_MAIN || (type & DebugTypes))) { Log << a; @@ -41,6 +48,13 @@ void dlog(const std::string& a, int type) { } } +void dlogr(const char* a, int type) { + if (isDebug && (type == DL_MAIN || (type & DebugTypes))) { + Log << a << "\n"; + Log.flush(); + } +} + void dlogr(const std::string& a, int type) { if (isDebug && (type == DL_MAIN || (type & DebugTypes))) { Log << a << "\n"; diff --git a/sfall/Logging.h b/sfall/Logging.h index 1c7b5943..65a6a81b 100644 --- a/sfall/Logging.h +++ b/sfall/Logging.h @@ -30,8 +30,10 @@ namespace sfall { -void dlog(const std::string& msg); +void dlog(const char* msg); +void dlog(const char* msg, int type); void dlog(const std::string& msg, int type); +void dlogr(const char* msg, int type); void dlogr(const std::string& msg, int type); void dlog_f(const char* fmt, int type, ...);