Minor code fix for Graphics.cpp

Added notes/correction to hookscripts.txt.
This commit is contained in:
NovaRain
2020-02-22 15:50:06 +08:00
parent 8bb660ff11
commit e3168946ba
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -126,6 +126,7 @@ int ret1 - The new AP cost
HOOK_DEATHANIM1 (hs_deathanim1.int) HOOK_DEATHANIM1 (hs_deathanim1.int)
Runs before Fallout tries to calculate the death animation. Lets you switch out which weapon Fallout sees Runs before Fallout tries to calculate the death animation. Lets you switch out which weapon Fallout sees
Does not run for critters in the knockdown/out state.
int arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed) int arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker critter arg2 - The attacker
@@ -139,7 +140,8 @@ int ret1 - The pid of an object to override the attacking weapon with
HOOK_DEATHANIM2 (hs_deathanim2.int) HOOK_DEATHANIM2 (hs_deathanim2.int)
Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation. Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.
When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and target will point to an object with obj_art_fid == 0x20001F5. When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and attacker will point to an object with obj_art_fid == 0x20001F5.
Does not run for critters in the knockdown/out state.
item arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed) item arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker critter arg2 - The attacker
+4 -2
View File
@@ -68,7 +68,7 @@ static DWORD palette[256];
static DWORD gWidth; static DWORD gWidth;
static DWORD gHeight; static DWORD gHeight;
static short moveWindowKey[2]; static long moveWindowKey[2];
static bool windowInit = false; static bool windowInit = false;
static DWORD windowLeft = 0; static DWORD windowLeft = 0;
@@ -1199,7 +1199,7 @@ HRESULT _stdcall FakeDirectDrawCreate2(void*, IDirectDraw** b, void*) {
else if (GPUBlt == 2) GPUBlt = 0; // Use CPU else if (GPUBlt == 2) GPUBlt = 0; // Use CPU
if (GraphicsMode == 5) { if (GraphicsMode == 5) {
moveWindowKey[0] = (short)GetConfigInt("Input", "WindowScrollKey", 0); moveWindowKey[0] = GetConfigInt("Input", "WindowScrollKey", 0);
if (moveWindowKey[0] < 0) { if (moveWindowKey[0] < 0) {
switch (moveWindowKey[0]) { switch (moveWindowKey[0]) {
case -1: case -1:
@@ -1217,6 +1217,8 @@ HRESULT _stdcall FakeDirectDrawCreate2(void*, IDirectDraw** b, void*) {
default: default:
moveWindowKey[0] = 0; moveWindowKey[0] = 0;
} }
} else {
moveWindowKey[0] &= 0xFF;
} }
} }