Removed deprecated "register" keyword

Minor edits to documents.
This commit is contained in:
NovaRain
2023-03-10 21:01:21 +08:00
parent 30802e8e21
commit 656b122f3e
5 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -757,7 +757,7 @@
- makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
- `maxDamage` is optional
- `activePid` is for an item with an active timer, can be the same as the `pid` argument
- the item proto must be "Misc Item" type and have "Use" action flag
- the item proto must be the **Misc Item** type and have the **Use** action flag
- minDamage/maxDamage are the minimum and maximum explosion damage
- using the function on an item that is already set as an explosive will override its previous settings
- NOTE: this function does not work for pids of Dynamite and Plastic Explosives
+2 -2
View File
@@ -693,8 +693,8 @@ sfall_funcX metarule functions
`void sfall_func3("item_make_explosive", int pid, int activePid, int damage)`\
`void sfall_func4("item_make_explosive", int pid, int activePid, int min, int max)`
- Makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
- `activePid` is for an item with an active timer, can be the same as the pid argument
- The item proto must be **Misc Item** type and have **Use** action flag
- `activePid` is for an item with an active timer, can be the same as the `pid` argument
- The item proto must be the **Misc Item** type and have the **Use** action flag
- `min` and `max` are the minimum and maximum explosion damage
- Using the function on an item that is already set as an explosive will override its previous settings
- __NOTE:__ this function does not work for pid's of Dynamite and Plastic Explosives
+8 -8
View File
@@ -165,23 +165,23 @@ static void __declspec(naked) fire_dance_lighting_fix1() {
}
}
//-----------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
static DWORD __fastcall CheckExplosives(DWORD register pid) {
static DWORD __fastcall CheckExplosives(DWORD pid) {
for (const auto &item: explosives) {
if (item.pid == pid) return item.pidActive;
}
return 0;
}
static DWORD __fastcall CheckActiveExplosives(DWORD register pid) {
static DWORD __fastcall CheckActiveExplosives(DWORD pid) {
for (const auto &item: explosives) {
if (item.pidActive == pid) return 0;
}
return 1;
}
static DWORD __fastcall GetDamage(DWORD register pid, DWORD &min, DWORD &max) {
static DWORD __fastcall GetDamage(DWORD pid, DWORD &min, DWORD &max) {
DWORD result = 0;
for (const auto &item: explosives) {
if (item.pidActive == pid) {
@@ -194,7 +194,7 @@ static DWORD __fastcall GetDamage(DWORD register pid, DWORD &min, DWORD &max) {
return result;
}
static DWORD __fastcall SetQueueExplosionDamage(DWORD register pid) {
static DWORD __fastcall SetQueueExplosionDamage(DWORD pid) {
DWORD min, max;
DWORD result = GetDamage(pid, min, max);
@@ -288,7 +288,7 @@ static void __declspec(naked) protinstTestDroppedExplosive_hack() {
call CheckActiveExplosives;
test eax, eax;
jz end;
mov dword ptr [esp], 0x49C112; // exit, no active item explosive
mov dword ptr [esp], 0x49C112; // exit, no active explosive item
end:
retn;
}
@@ -318,7 +318,7 @@ void Explosions::AddToExplosives(DWORD pid, DWORD activePid, DWORD minDmg, DWORD
}
}
//-----------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
static const DWORD explosion_dmg_check_adr[] = {0x411709, 0x4119FC, 0x411C08, 0x4517C1, 0x423BC8, 0x42381A};
static const DWORD explosion_art_adr[] = {0x411A19, 0x411A29, 0x411A35, 0x411A3C};
@@ -468,7 +468,7 @@ void ResetExplosionRadius() {
}
static void ResetExplosionDamage() {
if (!explosives.empty()) explosives.clear();
explosives.clear();
if (!explosionsDamageReset) return;
SafeWrite32(dynamite_min_dmg_addr, dynamite_minDmg);
+3 -3
View File
@@ -11,7 +11,7 @@ namespace sfall
{
// The hook is executed twice when entering the barter screen and after transaction: the first time is for the player; the second time is for NPC
static DWORD __fastcall BarterPriceHook_Script(register fo::GameObject* source, register fo::GameObject* target, DWORD callAddr) {
static DWORD __fastcall BarterPriceHook_Script(fo::GameObject* source, fo::GameObject* target, DWORD callAddr) {
bool barterIsParty = (fo::var::dialog_target_is_party != 0);
long computeCost = fo::func::barter_compute_value(source, target);
@@ -100,7 +100,7 @@ void SourceUseSkillOnInit() { sourceSkillOn = fo::var::obj_dude; }
static char resultSkillOn; // -1 - cancel handler, 1 - replace user
static long bakupCombatState;
static void __fastcall UseSkillOnHook_Script(DWORD source, DWORD target, register DWORD skillId) {
static void __fastcall UseSkillOnHook_Script(DWORD source, DWORD target, DWORD skillId) {
BeginHook();
argCount = 3;
@@ -389,7 +389,7 @@ static void __declspec(naked) CarTravelHack() {
}
}
static long __fastcall GlobalVarHook_Script(register DWORD number, register int value) {
static long __fastcall GlobalVarHook_Script(DWORD number, int value) {
int old = fo::var::game_global_vars[number];
if (IsGameLoaded() && HookScripts::HookHasScript(HOOK_SETGLOBALVAR)) { // IsGameLoaded - don't execute hook until loading sfall scripts
+1 -1
View File
@@ -1049,7 +1049,7 @@ static void InterfaceWindowPatch() {
SafeWriteBatch<BYTE>(127, {0x435160, 0x435189}); // 100 (PrintBigname_)
// Increase the max text width of the information card on the character screen
SafeWriteBatch<BYTE>(145, {0x43ACD5, 0x43DD37}); // 136, 133 (DrawCard_, DrawCard2_)
SafeWriteBatch<BYTE>(146, {0x43ACD5, 0x43DD37}); // 136, 133 (DrawCard_, DrawCard2_)
// Increase the width of the mouse drop area from 64px to 80px for the PC's and NPC's inventory on the barter screen
// barter_move_from_table_inventory_