Fixed some code in AnimationsAtOnceLimit.cpp

Renamed F1EngineBehavior option to Fallout1Behavior.
This commit is contained in:
NovaRain
2019-09-10 06:53:48 +08:00
parent 4bb9828f3e
commit d26097e9ae
3 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -178,10 +178,10 @@ DebugEditorKey=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Misc]
;Changes some of Fallout 2 engine features to Fallout 1 behavior:
;Changes some of Fallout 2 engine functions to Fallout 1 behavior:
;- disables playing the final movie/credits after the endgame slideshow
;- disables halving the weight for power armor items
F1EngineBehavior=0
Fallout1Behavior=0
;Time limit in years. Must be between -3 and 13
;Set to 0 if you want to die the instant you leave arroyo
+6 -4
View File
@@ -57,7 +57,7 @@ static const DWORD anim_set_0[] = {
0x414E48, 0x414EDA, 0x414F5E, 0x414FEE, 0x41505C, 0x4150D0, 0x415158,
0x4151B8, 0x415286, 0x41535C, 0x4153D0, 0x41544A, 0x4154EC, 0x4155EA,
0x4156C0, 0x4156D5, 0x4156F2, 0x41572F, 0x41573E, 0x415B1B, 0x415B56,
0x415BB6, 0x415C7C, 0x415CA3, 0x415DE4,
0x415BB6, 0x415C7C, 0x415CA3, /*0x415DE4, - conflct with 0x415DE2*/
};
static const DWORD anim_set_4[] = {
@@ -150,14 +150,14 @@ static const DWORD sad_28[] = {
0x4173CE, 0x4174C1, 0x4175F1, 0x417730,
};
static DWORD __fastcall AnimCombatFix(DWORD* src, BYTE combatFlag) {
static DWORD __fastcall AnimCombatFix(TGameObj* src, BYTE combatFlag) {
DWORD animAddr = animSetAddr;
if (animationLimit > 32) {
animAddr += animRecordSize; // include a dummy
}
if (combatFlag & 2) { // combat flag is set
if (combatFlag & 2) { // combat flag is set
__asm call combat_anim_finished_;
}
return animAddr;
@@ -165,9 +165,11 @@ static DWORD __fastcall AnimCombatFix(DWORD* src, BYTE combatFlag) {
static void __declspec(naked) anim_set_end_hack() {
__asm {
push ecx;
call AnimCombatFix;
mov [eax][esi], ebx;
xor dl, dl; // goto 0x415DF2;
pop ecx;
xor dl, dl; // for goto 0x415DF2;
retn;
}
}
+1 -1
View File
@@ -1122,7 +1122,7 @@ static void DllMain2() {
SafeWrite8(0x43ACD5, 144); // 136
SafeWrite8(0x43DD37, 144); // 133
if (GetPrivateProfileIntA("Misc", "F1EngineBehavior", 0, ini)) {
if (GetPrivateProfileIntA("Misc", "Fallout1Behavior", 0, ini)) {
dlog("Applying Fallout 1 engine behavior patch.", DL_INIT);
BlockCall(0x4A4343); // disable playing the final movie/credits after the endgame slideshow
SafeWrite8(0x477C71, 0xEB); // disable halving the weight for power armor items