Added a tweak to the ammo info for Glovz's/YAAM

* to display correct ammo stats based on the formulas w/o editing
proto.msg manually.

Updated translation ini files.

Set the maximum number of screenshots to 10k (was 100k)

* 100k is impractical because the max files per directory on FAT32 is
65535 (only if all files are in 8.3 format) when the game came out.
This commit is contained in:
NovaRain
2023-03-01 09:13:48 +08:00
parent 64dc30d922
commit a75886a020
11 changed files with 42 additions and 2 deletions
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=Lvl:
PartyACMsg=AC: PartyACMsg=AC:
PartyAddictMsg=Addict PartyAddictMsg=Addict
NPCPickupFail=%s cannot pick up the item. NPCPickupFail=%s cannot pick up the item.
AmmoInfoGlovz=Div: DR/%d, DT/%d
AmmoInfoYAAM=DT Mod: %d
PartyOrderAttackHuman=I'll take care of it.|Okay, I got it.|Sounds like a plan. PartyOrderAttackHuman=I'll take care of it.|Okay, I got it.|Sounds like a plan.
PartyOrderAttackCreature=::Growl:: PartyOrderAttackCreature=::Growl::
@@ -11,6 +11,8 @@ PartyLvlMsg=Nvl:
PartyACMsg=CA: PartyACMsg=CA:
PartyAddictMsg=Viciado PartyAddictMsg=Viciado
NPCPickupFail=%s não pôde pegar o item. NPCPickupFail=%s não pôde pegar o item.
AmmoInfoGlovz=Div: DR/%d, DT/%d
AmmoInfoYAAM=DT Mod: %d
PartyOrderAttackHuman=Eu tomarei conta disso.|Ok, eu entendi.|Soa como um plano. PartyOrderAttackHuman=Eu tomarei conta disso.|Ok, eu entendi.|Soa como um plano.
PartyOrderAttackCreature=::Rosnado:: PartyOrderAttackCreature=::Rosnado::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=
PartyACMsg=AC: PartyACMsg=AC:
PartyAddictMsg=上瘾 PartyAddictMsg=上瘾
NPCPickupFail=%s无法将东西捡起来。 NPCPickupFail=%s无法将东西捡起来。
AmmoInfoGlovz=Div: DR/%d, DT/%d
AmmoInfoYAAM=DT Mod: %d
PartyOrderAttackHuman=我会对付他的。|好,我知道了。|好主意。 PartyOrderAttackHuman=我会对付他的。|好,我知道了。|好主意。
PartyOrderAttackCreature=::吼吼:: PartyOrderAttackCreature=::吼吼::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=
PartyACMsg=AC: PartyACMsg=AC:
PartyAddictMsg=上癮 PartyAddictMsg=上癮
NPCPickupFail=%s無法將東西撿起來。 NPCPickupFail=%s無法將東西撿起來。
AmmoInfoGlovz=Div: DR/%d, DT/%d
AmmoInfoYAAM=DT Mod: %d
PartyOrderAttackHuman=我會對付他的。|好,我知道了。|好主意。 PartyOrderAttackHuman=我會對付他的。|好,我知道了。|好主意。
PartyOrderAttackCreature=::吼吼:: PartyOrderAttackCreature=::吼吼::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=Niveau:
PartyACMsg=CA: PartyACMsg=CA:
PartyAddictMsg=Accroc PartyAddictMsg=Accroc
NPCPickupFail=%s ne peux pas prendre cet objet. NPCPickupFail=%s ne peux pas prendre cet objet.
AmmoInfoGlovz=Div. : RD/%d, SD/%d
AmmoInfoYAAM=Mod. SD : %d
PartyOrderAttackHuman=Je m'en occupe|Okay, je fais ça|Bonne idée PartyOrderAttackHuman=Je m'en occupe|Okay, je fais ça|Bonne idée
PartyOrderAttackCreature=::Grogne:: PartyOrderAttackCreature=::Grogne::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=Lvl:
PartyACMsg=RÜ: PartyACMsg=RÜ:
PartyAddictMsg=Abhäng PartyAddictMsg=Abhäng
NPCPickupFail=%s kann das Objekt nicht nehmen. NPCPickupFail=%s kann das Objekt nicht nehmen.
AmmoInfoGlovz=Div: RV/%d, SV/%d
AmmoInfoYAAM=SV-Mod: %d
PartyOrderAttackHuman=Ich kümmere mich darum.|Wird gemacht.|Geht klar. PartyOrderAttackHuman=Ich kümmere mich darum.|Wird gemacht.|Geht klar.
PartyOrderAttackCreature=::Grrrr:: PartyOrderAttackCreature=::Grrrr::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=Lvl:
PartyACMsg=AC: PartyACMsg=AC:
PartyAddictMsg=Uzależniony PartyAddictMsg=Uzależniony
NPCPickupFail=%s nie może podnieść przedmiotu. NPCPickupFail=%s nie może podnieść przedmiotu.
AmmoInfoGlovz=Dz.: OO/%d, PO/%d
AmmoInfoYAAM=Mod. PO: %d
PartyOrderAttackHuman=Zajmę się tym.|Okej, zrozumiałem.|No to mamy plan. PartyOrderAttackHuman=Zajmę się tym.|Okej, zrozumiałem.|No to mamy plan.
PartyOrderAttackCreature=::Warknięcie:: PartyOrderAttackCreature=::Warknięcie::
+2
View File
@@ -11,6 +11,8 @@ PartyLvlMsg=
PartyACMsg=КБ: PartyACMsg=КБ:
PartyAddictMsg=Зависимость PartyAddictMsg=Зависимость
NPCPickupFail=%s не может подобрать предмет. NPCPickupFail=%s не может подобрать предмет.
AmmoInfoGlovz=Дел.: СУ/%d, ПУ/%d
AmmoInfoYAAM=Изм. ПУ: %d
PartyOrderAttackHuman=Хорошо, я им займусь.|Цель ясна.|Действую по плану. PartyOrderAttackHuman=Хорошо, я им займусь.|Цель ясна.|Действую по плану.
PartyOrderAttackCreature=::Гррр:: PartyOrderAttackCreature=::Гррр::
-2
View File
@@ -82,7 +82,6 @@ static const char* ExtraLines[] = {
}; };
static DWORD ExtraLineCount = sizeof(ExtraLines) / 4; static DWORD ExtraLineCount = sizeof(ExtraLines) / 4;
//static const char* creditsFile = "credits.txt";
static DWORD __fastcall CreditsNextLine(char* buf, DWORD* font, DWORD* colour) { static DWORD __fastcall CreditsNextLine(char* buf, DWORD* font, DWORD* colour) {
if (!InCredits || CreditsLine >= ExtraLineCount) return 0; if (!InCredits || CreditsLine >= ExtraLineCount) return 0;
@@ -172,7 +171,6 @@ static void __declspec(naked) ShowCreditsHook() {
pop eax; pop eax;
mov InCredits, 1; mov InCredits, 1;
mov CreditsLine, 0; mov CreditsLine, 0;
//mov eax, creditsFile;
call fo::funcoffs::credits_; call fo::funcoffs::credits_;
mov InCredits, 0; mov InCredits, 0;
retn; retn;
+23
View File
@@ -20,6 +20,7 @@
#include "..\FalloutEngine\Fallout2.h" #include "..\FalloutEngine\Fallout2.h"
#include "..\Logging.h" #include "..\Logging.h"
#include "..\Translate.h"
#include "HookScripts.h" #include "HookScripts.h"
#include "Unarmed.h" #include "Unarmed.h"
@@ -32,6 +33,8 @@ namespace sfall
int DamageMod::formula; int DamageMod::formula;
static char ammoInfoFmt[32];
// Integer division w/ round half to even for Glovz's damage formula // Integer division w/ round half to even for Glovz's damage formula
// Prerequisite: both dividend and divisor must be positive integers (should already be handled in the main function) // Prerequisite: both dividend and divisor must be positive integers (should already be handled in the main function)
static long DivRound(long dividend, long divisor) { static long DivRound(long dividend, long divisor) {
@@ -117,6 +120,13 @@ void DamageMod::DamageGlovz(fo::ComputeAttackResult &ctd, DWORD &accumulatedDama
} }
} }
static __declspec(naked) void AmmoInfoPrintGlovz() {
__asm {
lea edi, ammoInfoFmt;
retn;
}
}
// YAAM v1.1a by Haenlomal 2010.05.13 // YAAM v1.1a by Haenlomal 2010.05.13
void DamageMod::DamageYAAM(fo::ComputeAttackResult &ctd, DWORD &accumulatedDamage, long rounds, long armorDT, long armorDR, long bonusRangedDamage, long multiplyDamage, long difficulty) { void DamageMod::DamageYAAM(fo::ComputeAttackResult &ctd, DWORD &accumulatedDamage, long rounds, long armorDT, long armorDR, long bonusRangedDamage, long multiplyDamage, long difficulty) {
if (rounds <= 0) return; // Check number of hits if (rounds <= 0) return; // Check number of hits
@@ -169,6 +179,13 @@ void DamageMod::DamageYAAM(fo::ComputeAttackResult &ctd, DWORD &accumulatedDamag
} }
} }
static __declspec(naked) void AmmoInfoPrintYAAM() {
__asm {
lea ecx, ammoInfoFmt;
retn;
}
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Display melee damage w/o PERK_bonus_hth_damage bonus // Display melee damage w/o PERK_bonus_hth_damage bonus
@@ -326,8 +343,14 @@ void DamageMod::init() {
switch (formula) { switch (formula) {
case 1: case 1:
case 2: case 2:
HookScripts::InjectingHook(HOOK_SUBCOMBATDAMAGE);
MakeCall(0x49B54A, AmmoInfoPrintGlovz, 2); // Dmg Mod (obj_examine_func_)
Translate::Get("sfall", "AmmoInfoGlovz", "Div: DR/%d, DT/%d", ammoInfoFmt, 32);
break;
case 5: case 5:
HookScripts::InjectingHook(HOOK_SUBCOMBATDAMAGE); HookScripts::InjectingHook(HOOK_SUBCOMBATDAMAGE);
MakeCall(0x49B4EB, AmmoInfoPrintYAAM, 2); // DR Mod (obj_examine_func_)
Translate::Get("sfall", "AmmoInfoYAAM", "DT Mod: %d", ammoInfoFmt, 32);
break; break;
default: default:
formula = 0; formula = 0;
+3
View File
@@ -1307,6 +1307,9 @@ void Graphics::init() {
LoadGameHook::OnBeforeGameInit() += []() { WinProc::SetWindowProc(); }; LoadGameHook::OnBeforeGameInit() += []() { WinProc::SetWindowProc(); };
} }
// Set the maximum number of BMP screenshots to 10k (was 100k)
SafeWriteBatch<DWORD>(10000, {0x4C908B, 0x4C9093}); // default_screendump_
WindowRender::init(); WindowRender::init();
} }