diff --git a/sfall/FalloutEngine/EngineUtils.cpp b/sfall/FalloutEngine/EngineUtils.cpp index 182beb24..c3e692cf 100644 --- a/sfall/FalloutEngine/EngineUtils.cpp +++ b/sfall/FalloutEngine/EngineUtils.cpp @@ -404,8 +404,8 @@ long wmGetCurrentTerrainType() { if (terrainId == nullptr) { __asm { lea ebx, terrainId; - mov edx, dword ptr ds:[FO_VAR_world_ypos]; - mov eax, dword ptr ds:[FO_VAR_world_xpos]; + mov edx, ds:[FO_VAR_world_ypos]; + mov eax, ds:[FO_VAR_world_xpos]; call fo::funcoffs::wmFindCurSubTileFromPos_; } } diff --git a/sfall/Modules/AI.cpp b/sfall/Modules/AI.cpp index da27c400..85104c32 100644 --- a/sfall/Modules/AI.cpp +++ b/sfall/Modules/AI.cpp @@ -96,7 +96,7 @@ static __declspec(naked) void combat_ai_hook_FleeFix() { reTarget: and byte ptr [ebp], ~(InFlee | ReTarget); // unset CombatStateFlag flags xor edi, edi; - mov dword ptr [esi + whoHitMe], edi; + mov [esi + whoHitMe], edi; add esp, 4; jmp combat_ai_flee_Ret; } @@ -134,7 +134,7 @@ tryHeal: /*static __declspec(naked) void ai_check_drugs_hook() { __asm { call fo::funcoffs::stat_level_; // current hp - mov edx, dword ptr [esp + 0x34 - 0x1C + 4]; // ai cap + mov edx, [esp + 0x34 - 0x1C + 4]; // ai cap mov edx, [edx + 0x10]; // min_hp cmp eax, edx; // curr_hp < cap.min_hp cmovl edi, edx; // min_hp <- cap.min_hp diff --git a/sfall/Modules/Animations.cpp b/sfall/Modules/Animations.cpp index 96e007da..6b400ad3 100644 --- a/sfall/Modules/Animations.cpp +++ b/sfall/Modules/Animations.cpp @@ -461,7 +461,7 @@ static __declspec(naked) void action_climb_ladder_hook() { je reset; push edx; mov edx, ds:[FO_VAR_map_number]; - cmp dword ptr [edi + 0x3C], edx; + cmp [edi + 0x3C], edx; pop edx; jne skip; reset: diff --git a/sfall/Modules/BugFixes.cpp b/sfall/Modules/BugFixes.cpp index 73e1654f..3463692c 100644 --- a/sfall/Modules/BugFixes.cpp +++ b/sfall/Modules/BugFixes.cpp @@ -197,7 +197,7 @@ end: static __declspec(naked) void SharpShooterFix() { __asm { call fo::funcoffs::stat_level_; // Perception - cmp edi, dword ptr ds:[FO_VAR_obj_dude]; + cmp edi, ds:[FO_VAR_obj_dude]; jne end; xchg ecx, eax; mov eax, edi; // _obj_dude @@ -236,7 +236,7 @@ static __declspec(naked) void PipAlarm_hack() { static __declspec(naked) void PipStatus_hook() { __asm { call fo::funcoffs::ListHoloDiskTitles_; - mov dword ptr ds:[FO_VAR_holodisk], ebx; + mov ds:[FO_VAR_holodisk], ebx; retn; } } @@ -244,7 +244,7 @@ static __declspec(naked) void PipStatus_hook() { static __declspec(naked) void PipStatus_hack() { static const DWORD PipStatus_Ret = 0x497DD6; __asm { - cmp dword ptr ds:[FO_VAR_statcount], eax; // eax - "result" argument + cmp ds:[FO_VAR_statcount], eax; // eax - "result" argument jl skip; cmp dword ptr ds:[FO_VAR_mouse_x], 429; // overwritten engine code retn; @@ -275,21 +275,21 @@ end: // overwritten engine code static __declspec(naked) void scr_write_ScriptNode_hook() { __asm { mov ecx, 16; // maximum number of scripts in block - cmp dword ptr [esp + 0xEC + 4], ecx; // number_of_scripts (total scripts) + cmp [esp + 0xEC + 4], ecx; // number_of_scripts (total scripts) jg writeBlock; - mov ecx, dword ptr [esp + 0xEC + 4]; + mov ecx, [esp + 0xEC + 4]; test ecx, ecx; jg writeBlock; // > 0 xor eax, eax; retn; // don't save the current ScriptBlock writeBlock: - sub dword ptr [esp + 0xEC + 4], ecx; // number_of_scripts (reduce number [e.g. 24-16=8] or set it to 0) - xchg dword ptr [ebp + 0xE00], ecx; // ScriptBlocks.num (keep and set correct value: 16 or previous value of number_of_scripts) + sub [esp + 0xEC + 4], ecx; // number_of_scripts (reduce number [e.g. 24-16=8] or set it to 0) + xchg [ebp + 0xE00], ecx; // ScriptBlocks.num (keep and set correct value: 16 or previous value of number_of_scripts) xor esi, esi; - xchg dword ptr [ebp + 0xE04], esi; // ScriptBlocks.NextBlock (keep pointer and set it to 0) + xchg [ebp + 0xE04], esi; // ScriptBlocks.NextBlock (keep pointer and set it to 0) call fo::funcoffs::scr_write_ScriptNode_; - mov dword ptr [ebp + 0xE04], esi; // restore ScriptBlocks.NextBlock - mov dword ptr [ebp + 0xE00], ecx; // restore ScriptBlocks.num + mov [ebp + 0xE04], esi; // restore ScriptBlocks.NextBlock + mov [ebp + 0xE00], ecx; // restore ScriptBlocks.num retn; } } @@ -298,7 +298,7 @@ static __declspec(naked) void protinst_default_use_item_hack() { static const DWORD protinst_default_use_item_Ret = 0x49C38B; static const DWORD protinst_default_use_item_End = 0x49C3C5; __asm { - mov eax, dword ptr [edx + protoId]; // eax = target pid + mov eax, [edx + protoId]; // eax = target pid cmp eax, PID_DRIVABLE_CAR; je isCar; cmp eax, PID_CAR_TRUNK; @@ -364,7 +364,7 @@ static __declspec(naked) void item_d_take_drug_hook() { static __declspec(naked) void RemoveJetAddictFunc() { __asm { - cmp eax, dword ptr ds:[FO_VAR_wd_obj]; + cmp eax, ds:[FO_VAR_wd_obj]; jne end; cmp dword ptr [edx + 0x4], PID_JET; // queue_addict.drug_pid == PID_JET? end: @@ -381,7 +381,7 @@ static __declspec(naked) void item_d_take_drug_hack() { mov eax, esi; call fo::funcoffs::perform_withdrawal_end_; skip: // remove event from queue - mov dword ptr ds:[FO_VAR_wd_obj], esi; + mov ds:[FO_VAR_wd_obj], esi; mov eax, addict_event; // type = addiction mov edx, offset RemoveJetAddictFunc; jmp fo::funcoffs::queue_clear_type_; @@ -602,7 +602,7 @@ end: static __declspec(naked) void gdProcessUpdate_hack() { __asm { lea edx, [eax - 2]; - cmp edx, dword ptr ds:[FO_VAR_optionRect + 0xC]; // _optionRect.offy + cmp edx, ds:[FO_VAR_optionRect + 0xC]; // _optionRect.offy jl skip; mov eax, edx; skip: @@ -625,7 +625,7 @@ static __declspec(naked) void invenWieldFunc_item_get_type_hook() { xor ebx, ebx; inc ebx; push ebx; - mov cl, byte ptr [edi + 0x27]; + mov cl, [edi + 0x27]; and cl, 0x3; xchg edx, eax; // eax = who, edx = item push eax; @@ -646,7 +646,7 @@ removeFlag: jz noWeapon; and byte ptr [eax + 0x27], 0xFC; // Unset flag of a weapon in hand noWeapon: - or byte ptr [edi + 0x27], cl; // Set flag of a weapon in hand + or [edi + 0x27], cl; // Set flag of a weapon in hand inc ebx; pop ebx; jz skip; @@ -825,7 +825,7 @@ static __declspec(naked) void item_total_weight_hack() { mov ebx, [edi]; // Inventory.inv_size xor esi, esi; //------ - cmp eax, dword ptr ds:[FO_VAR_obj_dude]; // eax - source + cmp eax, ds:[FO_VAR_obj_dude]; // eax - source jz skip; cmp critterBody, eax; // if condition is true, then now it's exchanging/bartering with source object cmovz esi, weightOnBody; // take the weight of target's equipped items into account @@ -841,7 +841,7 @@ static __declspec(naked) void item_c_curr_size_hack() { mov edx, [ecx]; // Inventory.inv_size xor edi, edi; //------ - cmp eax, dword ptr ds:[FO_VAR_obj_dude]; // eax - source + cmp eax, ds:[FO_VAR_obj_dude]; // eax - source jz skip; cmp critterBody, eax; // if condition is true, then now it's exchanging/bartering with source object cmovz edi, sizeOnBody; // take the size of target's equipped items into account @@ -965,7 +965,7 @@ static __declspec(naked) void PipStatus_AddHotLines_hook() { __asm { call fo::funcoffs::AddHotLines_; xor eax, eax; - mov dword ptr ds:[FO_VAR_hot_line_count], eax; + mov ds:[FO_VAR_hot_line_count], eax; retn; } } @@ -1002,7 +1002,7 @@ static __declspec(naked) void NPCStage6Fix2() { static const DWORD partyMemberGetAIOptions_End = 0x49423A; __asm { imul edx, 220; // multiply record size 220 bytes by NPC number as listed in party.txt - mov eax, dword ptr ds:[FO_VAR_partyMemberAIOptions]; // get starting offset of internal NPC table + mov eax, ds:[FO_VAR_partyMemberAIOptions]; // get starting offset of internal NPC table jmp partyMemberGetAIOptions_End; // eax + edx = offset of specific NPC record } } @@ -1603,7 +1603,7 @@ static __declspec(naked) void combat_load_hook() { jnz end; // No push PERK_bonus_move; pop edx; - mov eax, dword ptr ds:[FO_VAR_obj_dude]; + mov eax, ds:[FO_VAR_obj_dude]; call fo::funcoffs::perk_level_; test eax, eax; // Have the perk? jz end; // No @@ -1671,7 +1671,7 @@ end: static __declspec(naked) void partyMemberGetCurLevel_hack() { __asm { mov esi, 0xFFFFFFFF; // initialize party member index - mov edi, dword ptr ds:[FO_VAR_partyMemberMaxCount]; + mov edi, ds:[FO_VAR_partyMemberMaxCount]; retn; } } @@ -1711,7 +1711,7 @@ static __declspec(naked) void obj_move_to_tile_hack_seen() { cmp dword ptr ds:[FO_VAR_mapEntranceTileNum], -1; jne end; // fix skip: - or byte ptr ds:[FO_VAR_obj_seen][eax], dl; + or ds:[FO_VAR_obj_seen][eax], dl; end: retn; } @@ -1864,9 +1864,9 @@ static __declspec(naked) void statPCAddExperienceCheckPMs_hack() { mov expSwiftLearner, edi; cmp dword ptr [esp + 0x24 + 4], 0x496CAA + 5; // called from perk_add_effect_ (PERK_here_and_now) jne notHereAndNow; - mov dword ptr ds:[FO_VAR_hereAndNowExps], edi; + mov ds:[FO_VAR_hereAndNowExps], edi; notHereAndNow: - mov eax, dword ptr ds:[FO_VAR_Experience_pc]; + mov eax, ds:[FO_VAR_Experience_pc]; retn; } } @@ -1992,7 +1992,7 @@ static __declspec(naked) void wmSetupRandomEncounter_hook() { static __declspec(naked) void inven_obj_examine_func_hack() { __asm { - mov edx, dword ptr ds:[0x519064]; // inven_display_msg_line + mov edx, ds:[0x519064]; // inven_display_msg_line cmp edx, 2; // >2 ja fix; retn; @@ -2033,7 +2033,7 @@ static __declspec(naked) void Add4thTagSkill_hook() { mov edi, eax; call fo::funcoffs::skill_set_tags_; mov eax, ds:[FO_VAR_obj_dude]; - mov edx, dword ptr ds:[edi + 3 * 4]; // _temp_tag_skill4 + mov edx, ds:[edi + 3 * 4]; // _temp_tag_skill4 call fo::funcoffs::skill_level_; mov tagSkill4LevelBase, eax; // x2 retn; @@ -2075,7 +2075,7 @@ static __declspec(naked) void op_start_gdialog_hack() { __asm { cmp eax, -1; // check mood arg jnz useMood; - mov eax, dword ptr [esp + 0x3C - 0x30 + 4]; // fix dialog_target (overwritten engine code) + mov eax, [esp + 0x3C - 0x30 + 4]; // fix dialog_target (overwritten engine code) retn; useMood: add esp, 4; // Destroy the return address @@ -2143,10 +2143,10 @@ static __declspec(naked) void process_rads_hook_msg() { mov eax, 1; call fo::funcoffs::gmouse_set_cursor_; skip: - mov ebx, dword ptr ds:[FO_VAR_game_user_wants_to_quit]; + mov ebx, ds:[FO_VAR_game_user_wants_to_quit]; mov dword ptr ds:[FO_VAR_game_user_wants_to_quit], 0; call fo::func::DialogOut; - mov dword ptr ds:[FO_VAR_game_user_wants_to_quit], ebx; + mov ds:[FO_VAR_game_user_wants_to_quit], ebx; retn; } } @@ -2163,7 +2163,7 @@ static __declspec(naked) void ai_check_drugs_hack_break() { add esp, 4; jmp ai_check_drugs_break_Ret; // break loop useDrugs: // use the first found item - mov dword ptr [esp + 4], eax; // slot set -1 + mov [esp + 4], eax; // slot set -1 mov edi, firstItemDrug; mov ebx, edi; mov firstItemDrug, eax; // set -1 @@ -2222,7 +2222,7 @@ static __declspec(naked) void config_get_values_hack() { mov eax, [esp + 0x100]; cmp byte ptr [eax], 0; // check char jz getFail; - mov eax, dword ptr [esp + 0x114]; // total num of values + mov eax, [esp + 0x114]; // total num of values sub eax, ebp; cmp eax, 1; ja getFail; @@ -2248,8 +2248,8 @@ skip: static __declspec(naked) void op_attack_hook() { __asm { - mov esi, dword ptr [esp + 0x3C + 4]; // free_move - mov ebx, dword ptr [esp + 0x40 + 4]; // add amount damage to target + mov esi, [esp + 0x3C + 4]; // free_move + mov ebx, [esp + 0x40 + 4]; // add amount damage to target jmp fo::funcoffs::gdialogActive_; } } @@ -2327,7 +2327,7 @@ static __declspec(naked) void op_use_obj_on_obj_hack() { jz fail; mov edx, [eax + protoId]; shr edx, 24; - cmp dword ptr [esp + 4], eax; // target != source + cmp [esp + 4], eax; // target != source jne skip; xor edx, edx; // for calling obj_use_item_on_ instead of action_use_an_item_on_object_ skip: @@ -2558,7 +2558,7 @@ bad: static __declspec(naked) void obj_pickup_hook() { __asm { - cmp edi, dword ptr ds:[FO_VAR_obj_dude]; + cmp edi, ds:[FO_VAR_obj_dude]; je dude; test byte ptr ds:[FO_VAR_combat_state], 1; // in combat? jz dude; @@ -2577,7 +2577,7 @@ static const char* __fastcall GetPickupMessage(const char* name) { static __declspec(naked) void obj_pickup_hook_message() { __asm { - cmp edi, dword ptr ds:[FO_VAR_obj_dude]; + cmp edi, ds:[FO_VAR_obj_dude]; je dude; mov eax, edi; call fo::funcoffs::critter_name_; @@ -2603,7 +2603,7 @@ static __declspec(naked) void anim_move_to_tile_hook() { isDude: test eax, eax; jnz skip; // tile is blocked - mov ebx, dword ptr [esp + 0x18 - 0x10 + 4]; // distance + mov ebx, [esp + 0x18 - 0x10 + 4]; // distance test ebx, ebx; jl skip; // dist < 0 sub ebx, ds:[FO_VAR_combat_free_move]; @@ -2826,7 +2826,7 @@ break: static __declspec(naked) void wmInterfaceInit_hack() { __asm { mov eax, GVAR_CAR_PLACED_TILE; - cmp eax, dword ptr ds:[FO_VAR_num_game_global_vars]; + cmp eax, ds:[FO_VAR_num_game_global_vars]; jge skip; mov edx, ds:[FO_VAR_game_global_vars]; lea edx, [edx + eax * 4]; diff --git a/sfall/Modules/DamageMod.cpp b/sfall/Modules/DamageMod.cpp index cd936281..55b7fcc3 100644 --- a/sfall/Modules/DamageMod.cpp +++ b/sfall/Modules/DamageMod.cpp @@ -389,7 +389,7 @@ static __declspec(naked) void CommonDmgRngDispFix_hook() { static __declspec(naked) void HtHDamageFix1a_hack() { using namespace fo; __asm { - cmp ecx, dword ptr ds:[FO_VAR_obj_dude]; // Is the critter == PC? + cmp ecx, ds:[FO_VAR_obj_dude]; // Is the critter == PC? je fix; // Skip if no mov edx, 1; // Min_Damage = 1 retn; @@ -407,7 +407,7 @@ static __declspec(naked) void HtHDamageFix1b_hook() { using namespace fo; __asm { call fo::funcoffs::stat_level_; // Get Total_Melee_Damage - cmp ecx, dword ptr ds:[FO_VAR_obj_dude]; // Is the critter == PC? + cmp ecx, ds:[FO_VAR_obj_dude]; // Is the critter == PC? je fix; // Skip to exit if no retn; fix: @@ -416,7 +416,7 @@ fix: mov eax, ecx; // pointer to PC call fo::funcoffs::perk_level_; // Return Rank_of_Bonus_HtH_Damage_perk shl eax, 1; // Rank_of_Bonus_HtH_Damage_perk *= 2 - add dword ptr [esp + 0x24 - 0x20 + 8], eax; // Min_Damage += Rank_of_Bonus_HtH_Damage_perk + add [esp + 0x24 - 0x20 + 8], eax; // Min_Damage += Rank_of_Bonus_HtH_Damage_perk pop eax; retn; } @@ -426,11 +426,11 @@ static __declspec(naked) void DisplayBonusRangedDmg_hook() { using namespace fo; __asm { mov edx, PERK_bonus_ranged_damage; - mov eax, dword ptr ds:[FO_VAR_stack]; + mov eax, ds:[FO_VAR_stack]; call fo::funcoffs::perk_level_; shl eax, 1; // Multiply by 2 - add dword ptr [esp + 4 * 4], eax; // min_dmg + perk bonus - add dword ptr [esp + 4 * 5], eax; // max_dmg + perk bonus + add [esp + 4 * 4], eax; // min_dmg + perk bonus + add [esp + 4 * 5], eax; // max_dmg + perk bonus jmp fo::funcoffs::sprintf_; } } @@ -439,10 +439,10 @@ static __declspec(naked) void DisplayBonusHtHDmg1_hook() { using namespace fo; __asm { mov edx, PERK_bonus_hth_damage; - mov eax, dword ptr ds:[FO_VAR_stack]; + mov eax, ds:[FO_VAR_stack]; call fo::funcoffs::perk_level_; shl eax, 1; // Multiply by 2 - add dword ptr [esp + 4 * 4], eax; // min_dmg + perk bonus + add [esp + 4 * 4], eax; // min_dmg + perk bonus jmp fo::funcoffs::sprintf_; } } diff --git a/sfall/Modules/Explosions.cpp b/sfall/Modules/Explosions.cpp index 318192b3..97fc1081 100644 --- a/sfall/Modules/Explosions.cpp +++ b/sfall/Modules/Explosions.cpp @@ -229,7 +229,7 @@ static __declspec(naked) void obj_use_explosive_active_hack() { call CheckExplosives; test eax, eax; jz skipSet; - mov dword ptr [esi + protoId], eax; // change item pid to active; + mov [esi + protoId], eax; // change item pid to active; skipSet: mov dword ptr [esp], 0x49BD62; end: diff --git a/sfall/Modules/ExtraSaveSlots.cpp b/sfall/Modules/ExtraSaveSlots.cpp index 79ad3f8a..8a13927c 100644 --- a/sfall/Modules/ExtraSaveSlots.cpp +++ b/sfall/Modules/ExtraSaveSlots.cpp @@ -72,7 +72,7 @@ static void LoadPageOffsets() { } } -static __declspec(naked) void load_page_offsets(void) { +static __declspec(naked) void load_page_offsets() { __asm { call LoadPageOffsets; mov edx, 0x50A480; // ASCII "SAV" (restore original code) @@ -229,7 +229,7 @@ static long __fastcall CheckPage(long button) { return 0; } -static __declspec(naked) void check_page_buttons(void) { +static __declspec(naked) void check_page_buttons() { __asm { push eax; push ecx; @@ -320,7 +320,7 @@ static void DrawPageText() { SaveLoadWin = nullptr; } -static __declspec(naked) void draw_page_text(void) { +static __declspec(naked) void draw_page_text() { __asm { push eax; call DrawPageText; @@ -331,16 +331,16 @@ static __declspec(naked) void draw_page_text(void) { } // add page num offset when reading and writing various save data files -static __declspec(naked) void add_page_offset_hack1(void) { +static __declspec(naked) void add_page_offset_hack1() { __asm { - mov eax, dword ptr ds:[FO_VAR_slot_cursor]; // list position 0-9 - add eax, LSPageOffset; // add page num offset + mov eax, ds:[FO_VAR_slot_cursor]; // list position 0-9 + add eax, LSPageOffset; // add page num offset retn; } } // getting info for the 10 currently displayed save slots from save.dats -static __declspec(naked) void add_page_offset_hack2(void) { +static __declspec(naked) void add_page_offset_hack2() { __asm { pop edx; // ret addr push 0x50A514; // ASCII "SAVE.DAT" @@ -351,11 +351,11 @@ static __declspec(naked) void add_page_offset_hack2(void) { } // printing current 10 slot numbers -static __declspec(naked) void add_page_offset_hack3(void) { +static __declspec(naked) void add_page_offset_hack3() { __asm { inc eax; - add eax, LSPageOffset; // add page num offset - mov bl, byte ptr ss:[esp + 0x10]; // add 4 bytes - func ret addr + add eax, LSPageOffset; // add page num offset + mov bl, ss:[esp + 0x10]; // add 4 bytes - func ret addr retn; } } diff --git a/sfall/Modules/HeroAppearance.cpp b/sfall/Modules/HeroAppearance.cpp index f48dfe6c..47eb4d7e 100644 --- a/sfall/Modules/HeroAppearance.cpp +++ b/sfall/Modules/HeroAppearance.cpp @@ -230,14 +230,14 @@ static __declspec(noinline) int __stdcall LoadHeroDat(unsigned int race, unsigne // insert hero art path in front of main path structure when loading art static __declspec(naked) void LoadNewHeroArt() { __asm { - cmp byte ptr ds:[esi], 'r'; - jne isNotReading; - mov ecx, heroAppPaths; - mov ecx, dword ptr ds:[ecx]; // set app path + cmp byte ptr ds:[esi], 'r'; + jne isNotReading; + mov ecx, heroAppPaths; + mov ecx, ds:[ecx]; // set app path retn; isNotReading: - mov ecx, FO_VAR_paths; - mov ecx, dword ptr ds:[ecx]; + mov ecx, FO_VAR_paths; + mov ecx, ds:[ecx]; retn; } } @@ -265,8 +265,8 @@ notExists: // if file not found load regular critter art instead // adjust base hero art if num below hero art range static __declspec(naked) void AdjustHeroBaseArt() { __asm { - add eax, critterListSize; - mov dword ptr ds:[FO_VAR_art_vault_guy_num], eax; + add eax, critterListSize; + mov ds:[FO_VAR_art_vault_guy_num], eax; retn; } } @@ -1061,7 +1061,7 @@ static __declspec(naked) void SexScrnEnd() { __asm { push edx; mov edx, STAT_gender; - mov eax, dword ptr ds:[FO_VAR_obj_dude]; + mov eax, ds:[FO_VAR_obj_dude]; call fo::funcoffs::stat_level_; // get PC stat current gender mov ecx, eax; // gender call fo::funcoffs::SexWindow_; // call gender selection window @@ -1071,7 +1071,7 @@ static __declspec(naked) void SexScrnEnd() { jne NoVaultSuit mov ebx, 0x8 NoVaultSuit: - mov eax, dword ptr ds:[ebx + FO_VAR_art_vault_person_nums]; // base male model + mov eax, ds:[ebx + FO_VAR_art_vault_person_nums]; // base male model */ call HeroGenderChange; pop edx; @@ -1139,8 +1139,8 @@ static __declspec(naked) void AddCharScrnButtons() { // Loading or creating a background image for the character creation/editing interface static __declspec(naked) void FixCharScrnBack() { __asm { - mov dword ptr ds:[FO_VAR_bckgnd], eax; // surface ptr for char scrn back - test eax, eax; // check if frm loaded ok + mov ds:[FO_VAR_bckgnd], eax; // surface ptr for char scrn back + test eax, eax; // check if frm loaded ok je endFunc; // prolog pushad; @@ -1271,7 +1271,7 @@ static __declspec(naked) void CharScrnEnd() { push eax; call DeleteCharSurfaces; pop eax; - mov ebp, dword ptr ds:[FO_VAR_info_line]; + mov ebp, ds:[FO_VAR_info_line]; retn; } } diff --git a/sfall/Modules/HookScripts/InventoryHs.cpp b/sfall/Modules/HookScripts/InventoryHs.cpp index d5ce1b36..2561c50d 100644 --- a/sfall/Modules/HookScripts/InventoryHs.cpp +++ b/sfall/Modules/HookScripts/InventoryHs.cpp @@ -311,7 +311,7 @@ static __declspec(naked) void InvenActionExplosiveDropHack() { cmp eax, -1; // ret value popadc; jnz noDrop; - mov dword ptr ds:[FO_VAR_dropped_explosive], ebp; // overwritten engine code (ebp = 1) + mov ds:[FO_VAR_dropped_explosive], ebp; // overwritten engine code (ebp = 1) mov nextHookDropSkip, ebp; retn; noDrop: diff --git a/sfall/Modules/HookScripts/MiscHs.cpp b/sfall/Modules/HookScripts/MiscHs.cpp index c4c349ef..8329d6ec 100644 --- a/sfall/Modules/HookScripts/MiscHs.cpp +++ b/sfall/Modules/HookScripts/MiscHs.cpp @@ -79,9 +79,9 @@ static __declspec(naked) void PC_BarterPriceHook() { push edx; push ecx; //------- - push -1; // address on call stack - mov ecx, dword ptr ds:[FO_VAR_obj_dude]; // source - mov edx, dword ptr ds:[FO_VAR_target_stack]; // target + push -1; // address on call stack + mov ecx, ds:[FO_VAR_obj_dude]; // source + mov edx, ds:[FO_VAR_target_stack]; // target call BarterPriceHook_Script; pop ecx; pop edx; @@ -166,7 +166,7 @@ static __declspec(naked) void UseSkillOnHack() { cmp bakupCombatState, -1; jz skip; mov ebp, bakupCombatState; - mov dword ptr ds:[FO_VAR_combat_state], ebp; + mov ds:[FO_VAR_combat_state], ebp; skip: cmp resultSkillOn, 0; jz default; @@ -174,14 +174,14 @@ skip: retn; // flag ZF = 0 default: // engine code - cmp eax, dword ptr ds:[FO_VAR_obj_dude]; + cmp eax, ds:[FO_VAR_obj_dude]; retn; } } static __declspec(naked) void skill_use_hack() { __asm { - cmp ebp, dword ptr ds:[FO_VAR_obj_dude]; + cmp ebp, ds:[FO_VAR_obj_dude]; setnz al; retn; } @@ -353,7 +353,7 @@ static __declspec(naked) void PerceptionRangeSeeHook() { cmp eax, 2; jne nevermind; // normal return dec eax; - mov dword ptr [esp + 0x2C - 0x1C + 4], eax; // set 1, skip blocking check + mov [esp + 0x2C - 0x1C + 4], eax; // set 1, skip blocking check dec eax; nevermind: retn; @@ -645,11 +645,11 @@ hookRun: ///////////////////////////////// push ecx; push ecx; // encType xor edx, edx; - mov ecx, dword ptr ds:[FO_VAR_EncounterMapID]; + mov ecx, ds:[FO_VAR_EncounterMapID]; call EncounterHook_Script; pop ecx; pop edx; - mov dword ptr ds:[FO_VAR_EncounterMapID], eax; + mov ds:[FO_VAR_EncounterMapID], eax; cmp eax, -1; je cancelEnc; jl clearEnc; diff --git a/sfall/Modules/Input.cpp b/sfall/Modules/Input.cpp index ef338c34..d65d7ed4 100644 --- a/sfall/Modules/Input.cpp +++ b/sfall/Modules/Input.cpp @@ -56,7 +56,7 @@ static void __declspec(naked) get_input_str2_hack() { pop getInputStrRet; push edx; mov dl, xltKey; - test byte ptr ds:[FO_VAR_kb_lock_flags], dl; + test ds:[FO_VAR_kb_lock_flags], dl; jz end; and eax, 0xFF; cmp eax, 32; // skip the space char diff --git a/sfall/Modules/Interface.cpp b/sfall/Modules/Interface.cpp index d19c74a5..4c87fc92 100644 --- a/sfall/Modules/Interface.cpp +++ b/sfall/Modules/Interface.cpp @@ -381,13 +381,13 @@ skipX: add ecx, eax; // xpos * 1.5 add ecx, ebx; pop ebx; - mov eax, dword ptr [esp + 8]; // ypos + mov eax, [esp + 8]; // ypos sar eax, 1; test eax, eax; jz skipY; sub eax, 5; // y adjust skipY: - add dword ptr [esp + 8], eax; // ypos * 1.5 + add [esp + 8], eax; // ypos * 1.5 pop eax; jmp fo::funcoffs::win_print_; } @@ -757,7 +757,7 @@ static __declspec(naked) void wmWorldMap_hack() { __asm { cmp dword ptr ds:[FO_VAR_In_WorldMap], 1; // player is moving jne checkHover; - mov eax, dword ptr ds:[FO_VAR_wmWorldOffsetY]; // overwritten code + mov eax, ds:[FO_VAR_wmWorldOffsetY]; // overwritten code retn; checkHover: cmp esi, 328; @@ -773,12 +773,12 @@ checkHover: mov edx, [esp + 0x38 - 0x34 + 8]; // y call wmDetectHotspotHover; pop ecx; - mov eax, dword ptr ds:[FO_VAR_wmWorldOffsetY]; + mov eax, ds:[FO_VAR_wmWorldOffsetY]; retn; isScroll: mov isHoveringHotspot, 0; mov backImageIsCopy, 0; - mov eax, dword ptr ds:[FO_VAR_wmWorldOffsetY]; + mov eax, ds:[FO_VAR_wmWorldOffsetY]; retn; } } @@ -838,14 +838,14 @@ static __declspec(naked) void wmDrawCursorStopped_hack_hotspot() { __asm { mov eax, 0x503E34; // 'ib2p1xx1' call fo::funcoffs::gsound_play_sfx_file_; - mov eax, dword ptr ds:[0x672E90]; // hotspot2_pic + mov eax, ds:[0x672E90]; // hotspot2_pic retn; } } static __declspec(naked) void wmTownMapInit_hack() { __asm { - mov dword ptr ds:[edi + 0x672DD8], eax; // _wmTownMapButtonId + mov ds:[edi + 0x672DD8], eax; // _wmTownMapButtonId mov ecx, eax; // save button ID mov edx, fo::funcoffs::gsound_med_butt_press_; xor ebx, ebx; // no button release sfx diff --git a/sfall/Modules/Inventory.cpp b/sfall/Modules/Inventory.cpp index f7049abf..1833b6ca 100644 --- a/sfall/Modules/Inventory.cpp +++ b/sfall/Modules/Inventory.cpp @@ -688,8 +688,8 @@ static __declspec(naked) void do_move_timer_hack() { __asm { push ecx; push ebp; // max - mov edx, dword ptr [esp + 32]; // return address - mov ecx, dword ptr [esp + 20]; // item, potentially + mov edx, [esp + 32]; // return address + mov ecx, [esp + 20]; // item, potentially call CalculateDefaultMoveCount; mov ebx, eax; pop ecx; @@ -719,7 +719,7 @@ static __declspec(naked) void move_inventory_hack() { retn; skipDrag: call DragSkipPrepare; - mov eax, dword ptr [esp + 0x54 - 0x18 + 4]; // isPlanting flag + mov eax, [esp + 0x54 - 0x18 + 4]; // isPlanting flag add esp, 4; test eax, eax; jz jmpTaking; @@ -747,7 +747,7 @@ static __declspec(naked) void barter_move_inventory_skip_drag_hack_common() { retn; skipDrag: call DragSkipPrepare; - mov eax, dword ptr [esp + 0x38 + 0xC + 4]; // fromDude flag + mov eax, [esp + 0x38 + 0xC + 4]; // fromDude flag add esp, 4; test eax, eax; jz jmpTaking; diff --git a/sfall/Modules/KillCounter.cpp b/sfall/Modules/KillCounter.cpp index e48d9941..de98750a 100644 --- a/sfall/Modules/KillCounter.cpp +++ b/sfall/Modules/KillCounter.cpp @@ -37,7 +37,7 @@ static __declspec(naked) DWORD ReadKillCounter() { static __declspec(naked) void IncKillCounter() { __asm { inc bx; - mov word ptr ds:[FO_VAR_pc_kill_counts][edx], bx; + mov ds:[FO_VAR_pc_kill_counts][edx], bx; retn; } } diff --git a/sfall/Modules/LoadOrder.cpp b/sfall/Modules/LoadOrder.cpp index d81ffece..9a7c2cb3 100644 --- a/sfall/Modules/LoadOrder.cpp +++ b/sfall/Modules/LoadOrder.cpp @@ -590,7 +590,7 @@ checkFile: jz noFile; retn; noFile: - mov eax, dword ptr [esp + 0xA4 - 0x20 + 4]; // splash value + mov eax, [esp + 0xA4 - 0x20 + 4]; // splash value push eax; push 0x5023E8; // "art\splash\" push 0x502404; // "%ssplash%d.rix" diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 1bb1be9f..b8fc8bde 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -129,18 +129,18 @@ end: static __declspec(naked) void intface_item_reload_hook() { __asm { push eax; - mov eax, dword ptr ds:[FO_VAR_obj_dude]; + mov eax, ds:[FO_VAR_obj_dude]; call fo::funcoffs::register_clear_; xor edx, edx; // ANIM_stand xor ebx, ebx; // delay (unused) lea eax, [edx + 1]; // RB_UNRESERVED call fo::funcoffs::register_begin_; - mov eax, dword ptr ds:[FO_VAR_obj_dude]; + mov eax, ds:[FO_VAR_obj_dude]; call fo::funcoffs::register_object_animate_; - mov ecx, dword ptr ds:[FO_VAR_combat_highlight]; // backup setting - mov dword ptr ds:[FO_VAR_combat_highlight], eax; // prevent calling combat_outline_off_ (eax is never 2) + mov ecx, ds:[FO_VAR_combat_highlight]; // backup setting + mov ds:[FO_VAR_combat_highlight], eax; // prevent calling combat_outline_off_ (eax is never 2) call fo::funcoffs::register_end_; - mov dword ptr ds:[FO_VAR_combat_highlight], ecx; // restore setting + mov ds:[FO_VAR_combat_highlight], ecx; // restore setting pop eax; jmp fo::funcoffs::gsound_play_sfx_file_; } diff --git a/sfall/Modules/Objects.cpp b/sfall/Modules/Objects.cpp index 95dff26a..79a9863e 100644 --- a/sfall/Modules/Objects.cpp +++ b/sfall/Modules/Objects.cpp @@ -92,7 +92,7 @@ notIdentical: static __declspec(naked) void new_obj_id_hook() { __asm { mov eax, 83535; - cmp dword ptr ds:[FO_VAR_cur_id], eax; + cmp ds:[FO_VAR_cur_id], eax; jle pickNewID; retn; pickNewID: // skip PM range (18000 - 83535) diff --git a/sfall/Modules/QuestList.cpp b/sfall/Modules/QuestList.cpp index f30e0505..4c876830 100644 --- a/sfall/Modules/QuestList.cpp +++ b/sfall/Modules/QuestList.cpp @@ -62,12 +62,12 @@ static __declspec(naked) void PipStatus_hook_printfix() { movzx eax, word ptr [esp + 0x49C + 8]; dec eax; shl eax, 1; - add eax, dword ptr ds:[FO_VAR_cursor_line]; - cmp eax, dword ptr ds:[FO_VAR_bottom_line]; // check max + add eax, ds:[FO_VAR_cursor_line]; + cmp eax, ds:[FO_VAR_bottom_line]; // check max jb skip; - mov eax, dword ptr ds:[FO_VAR_quest_count]; + mov eax, ds:[FO_VAR_quest_count]; sub eax, 2; - mov dword ptr [esp + 0x4BC - 0x24 + 8], eax; // set last counter + mov [esp + 0x4BC - 0x24 + 8], eax; // set last counter mov outRangeFlag, 1; skip: pop eax; @@ -123,7 +123,7 @@ skip: mov calledflag, 1; mov called_quest_number, ebx // engine - mov edx, dword ptr ds:[FO_VAR_crnt_func]; + mov edx, ds:[FO_VAR_crnt_func]; retn; } } @@ -266,8 +266,8 @@ static __declspec(naked) void PrintPages() { add esp, 0x18; mov ebx, 1; - mov dword ptr ds:[FO_VAR_cursor_line], ebx; - mov bl, byte ptr ds:[FO_VAR_GreenColor]; + mov ds:[FO_VAR_cursor_line], ebx; + mov bl, ds:[FO_VAR_GreenColor]; mov edx, 0x21; lea eax, bufPage; jmp fo::funcoffs::pip_print_; diff --git a/sfall/Modules/Scripting/Handlers/Combat.cpp b/sfall/Modules/Scripting/Handlers/Combat.cpp index 3170814d..c94ab9a0 100644 --- a/sfall/Modules/Scripting/Handlers/Combat.cpp +++ b/sfall/Modules/Scripting/Handlers/Combat.cpp @@ -78,7 +78,7 @@ __declspec(naked) void op_mod_kill_counter() { skip: cmp eax, 38; jae end; - add word ptr ds:[FO_VAR_pc_kill_counts][eax * 2], cx; + add ds:[FO_VAR_pc_kill_counts][eax * 2], cx; end: pop ecx; retn; diff --git a/sfall/Modules/Scripting/Handlers/Graphics.cpp b/sfall/Modules/Scripting/Handlers/Graphics.cpp index 2f76e6f8..ead1cb96 100644 --- a/sfall/Modules/Scripting/Handlers/Graphics.cpp +++ b/sfall/Modules/Scripting/Handlers/Graphics.cpp @@ -358,7 +358,7 @@ __declspec(naked) void op_set_shader_vector() { argloopstart: mov eax, ebp; call fo::funcoffs::interpretPopShort_; - mov word ptr [esp + ecx * 2 + 0x16], ax; + mov [esp + ecx * 2 + 0x16], ax; mov eax, ebp; call fo::funcoffs::interpretPopLong_; mov [esp + ecx * 4 - 0x4], eax; @@ -386,7 +386,7 @@ next: mov eax, ebp; mov ebx, [esp + 4]; xor edx, edx; - mov dx, word ptr [esp + 0x1a]; + mov dx, [esp + 0x1a]; call fo::funcoffs::interpretGetString_; mov [esp + 4], eax; call SetShaderVector; diff --git a/sfall/Modules/Scripting/Handlers/Inventory.cpp b/sfall/Modules/Scripting/Handlers/Inventory.cpp index 7d23adb7..304429bd 100644 --- a/sfall/Modules/Scripting/Handlers/Inventory.cpp +++ b/sfall/Modules/Scripting/Handlers/Inventory.cpp @@ -32,7 +32,7 @@ namespace script __declspec(naked) void op_active_hand() { __asm { - mov edx, dword ptr ds:[FO_VAR_itemCurrentItem]; + mov edx, ds:[FO_VAR_itemCurrentItem]; _J_RET_VAL_TYPE(VAR_TYPE_INT); } } diff --git a/sfall/Modules/Scripting/Handlers/Memory.cpp b/sfall/Modules/Scripting/Handlers/Memory.cpp index 853754df..be25a1e9 100644 --- a/sfall/Modules/Scripting/Handlers/Memory.cpp +++ b/sfall/Modules/Scripting/Handlers/Memory.cpp @@ -70,7 +70,7 @@ __declspec(naked) void op_read_int() { _GET_ARG_INT(error); test eax, eax; jz error; - mov edx, dword ptr ds:[eax]; // read memory + mov edx, ds:[eax]; // read memory result: mov eax, ebx; _J_RET_VAL_TYPE(VAR_TYPE_INT); diff --git a/sfall/Modules/Scripting/Handlers/Misc.cpp b/sfall/Modules/Scripting/Handlers/Misc.cpp index 586aace2..29e5ef6a 100644 --- a/sfall/Modules/Scripting/Handlers/Misc.cpp +++ b/sfall/Modules/Scripting/Handlers/Misc.cpp @@ -330,7 +330,7 @@ __declspec(naked) void op_tile_under_cursor() { __declspec(naked) void op_gdialog_get_barter_mod() { __asm { - mov edx, dword ptr ds:[FO_VAR_gdBarterMod]; + mov edx, ds:[FO_VAR_gdBarterMod]; _J_RET_VAL_TYPE(VAR_TYPE_INT); } } diff --git a/sfall/Modules/Scripting/Handlers/Perks.cpp b/sfall/Modules/Scripting/Handlers/Perks.cpp index 215bd42b..52ea2831 100644 --- a/sfall/Modules/Scripting/Handlers/Perks.cpp +++ b/sfall/Modules/Scripting/Handlers/Perks.cpp @@ -44,7 +44,7 @@ __declspec(naked) void op_set_perk_owed() { and eax, 0xFF; cmp eax, 250; jg end; - mov byte ptr ds:[FO_VAR_free_perk], al; + mov ds:[FO_VAR_free_perk], al; end: retn; } diff --git a/sfall/Modules/Scripting/Handlers/Stats.cpp b/sfall/Modules/Scripting/Handlers/Stats.cpp index 0392801a..8c3a48dc 100644 --- a/sfall/Modules/Scripting/Handlers/Stats.cpp +++ b/sfall/Modules/Scripting/Handlers/Stats.cpp @@ -212,7 +212,7 @@ end: __declspec(naked) void op_get_available_skill_points() { __asm { - mov edx, dword ptr ds:[FO_VAR_curr_pc_stat]; + mov edx, ds:[FO_VAR_curr_pc_stat]; _J_RET_VAL_TYPE(VAR_TYPE_INT); } } diff --git a/sfall/Modules/Sound.cpp b/sfall/Modules/Sound.cpp index d7ae6580..fb15bb60 100644 --- a/sfall/Modules/Sound.cpp +++ b/sfall/Modules/Sound.cpp @@ -629,7 +629,7 @@ static __declspec(naked) void endgame_pan_desert_hack() { mov ecx, speechSound; test ecx, ecx; jnz skip; - mov ecx, dword ptr ds:[FO_VAR_endgame_voiceover_loaded]; + mov ecx, ds:[FO_VAR_endgame_voiceover_loaded]; skip: retn; } @@ -647,7 +647,7 @@ static __declspec(naked) void endgame_display_image_hack() { __asm { mov ecx, speechSound; call ResumeSfallSound; - mov edx, dword ptr ds:[FO_VAR_endgame_voiceover_loaded]; + mov edx, ds:[FO_VAR_endgame_voiceover_loaded]; retn; } } @@ -656,7 +656,7 @@ static __declspec(naked) void endgame_pan_desert_hack_play() { __asm { mov ecx, speechSound; call ResumeSfallSound; - mov eax, dword ptr ds:[FO_VAR_endgame_voiceover_loaded]; + mov eax, ds:[FO_VAR_endgame_voiceover_loaded]; xor ecx, ecx; retn; } @@ -726,7 +726,7 @@ static __declspec(naked) void gsound_speech_stop_hack() { mov speechSound, 0; pop edx; skip: - mov ecx, dword ptr ds:[FO_VAR_gsound_speech_tag]; + mov ecx, ds:[FO_VAR_gsound_speech_tag]; retn; } } @@ -783,7 +783,7 @@ skip: static __declspec(naked) void gsound_background_volume_set_hack() { __asm { - mov dword ptr ds:[FO_VAR_background_volume], eax; + mov ds:[FO_VAR_background_volume], eax; push ecx; mov ecx, backgroundMusic; test ecx, ecx; @@ -804,11 +804,11 @@ skip: static __declspec(naked) void gsound_master_volume_set_hack() { __asm { - mov dword ptr ds:[FO_VAR_master_volume], edx; + mov ds:[FO_VAR_master_volume], edx; push eax; push ecx; push edx; - push dword ptr ds:[FO_VAR_background_volume]; + push ds:[FO_VAR_background_volume]; push 3; // SoundType::game_master push 0; // set volume for all sounds call SetSoundVolume; @@ -824,7 +824,7 @@ static __declspec(naked) void gsound_set_sfx_volume_hack() { __asm { push ecx; push edx; - mov dword ptr ds:[FO_VAR_sndfx_volume], eax; + mov ds:[FO_VAR_sndfx_volume], eax; push eax; push 2; // SoundType::game_sfx push 0; // set volume for all sounds diff --git a/sfall/Modules/Stats.cpp b/sfall/Modules/Stats.cpp index ea45290b..1469fdb3 100644 --- a/sfall/Modules/Stats.cpp +++ b/sfall/Modules/Stats.cpp @@ -99,7 +99,7 @@ static __declspec(naked) void stat_set_base_hack_check() { static const DWORD StatSetBaseHack_RetMax = 0x4AF591; static const DWORD StatSetBaseHack_Ret = 0x4AF59C; __asm { - cmp esi, dword ptr ds:[FO_VAR_obj_dude]; + cmp esi, ds:[FO_VAR_obj_dude]; jz pc; cmp ebx, statMinimumsNPC[eax]; jl failMin; @@ -153,7 +153,7 @@ static __declspec(naked) void CalcApToAcBonus() { cmp dword ptr [esp + 0x1C - 0x18 + 4], 2; // has HtH Evade perk (2 - vanilla bonus) jb standard; mov edx, PERK_hth_evade_perk; - mov eax, dword ptr ds:[FO_VAR_obj_dude]; + mov eax, ds:[FO_VAR_obj_dude]; call fo::funcoffs::perk_level_; imul eax, Stats::extraApAcBonus; // bonus = perkLvl * extraApBonus imul eax, edi; // perkBonus = bonus * curAP diff --git a/sfall/Modules/SubModules/CombatBlock.cpp b/sfall/Modules/SubModules/CombatBlock.cpp index 5dcd87ab..19958472 100644 --- a/sfall/Modules/SubModules/CombatBlock.cpp +++ b/sfall/Modules/SubModules/CombatBlock.cpp @@ -46,7 +46,7 @@ block: static __declspec(naked) void game_handle_input_hook() { __asm { - mov eax, dword ptr ds:[FO_VAR_intfaceEnabled]; + mov eax, ds:[FO_VAR_intfaceEnabled]; test eax, eax; jz end; cmp combatDisabled, 0; // eax = 1 diff --git a/sfall/Modules/Tiles.cpp b/sfall/Modules/Tiles.cpp index 723afcaa..f91c6797 100644 --- a/sfall/Modules/Tiles.cpp +++ b/sfall/Modules/Tiles.cpp @@ -225,11 +225,11 @@ static int __stdcall ArtInitHook() { static __declspec(naked) void iso_init_hook() { __asm { - mov ebx, dword ptr ds:[FO_VAR_read_callback]; + mov ebx, ds:[FO_VAR_read_callback]; xor eax, eax; - mov dword ptr ds:[FO_VAR_read_callback], eax; + mov ds:[FO_VAR_read_callback], eax; call ArtInitHook; - mov dword ptr ds:[FO_VAR_read_callback], ebx; + mov ds:[FO_VAR_read_callback], ebx; retn; } } diff --git a/sfall/Modules/Worldmap.cpp b/sfall/Modules/Worldmap.cpp index 9fd6db2b..527b0bb2 100644 --- a/sfall/Modules/Worldmap.cpp +++ b/sfall/Modules/Worldmap.cpp @@ -108,9 +108,9 @@ static void TimerReset() { static __declspec(naked) void script_chk_timed_events_hack() { using namespace fo; __asm { - mov eax, dword ptr ds:[FO_VAR_fallout_game_time]; + mov eax, ds:[FO_VAR_fallout_game_time]; inc eax; - mov dword ptr ds:[FO_VAR_fallout_game_time], eax; + mov ds:[FO_VAR_fallout_game_time], eax; cmp eax, ONE_GAME_YEAR * 13; jae reset; retn; @@ -122,7 +122,7 @@ reset: static __declspec(naked) void set_game_time_hack() { using namespace fo; __asm { - mov dword ptr ds:[FO_VAR_fallout_game_time], eax; + mov ds:[FO_VAR_fallout_game_time], eax; mov edx, eax; call IsGameLoaded; test al, al; @@ -250,7 +250,7 @@ static __declspec(naked) void critter_can_obj_dude_rest_hook() { __asm { push eax; mov ecx, eax; // elevation - mov edx, dword ptr ds:[FO_VAR_map_number]; + mov edx, ds:[FO_VAR_map_number]; call Worldmap::GetRestMapLevel; xor edx, edx; cmp eax, edx; @@ -341,7 +341,7 @@ static __declspec(naked) void main_load_new_hook() { push edx; sub esp, 4; // buff outAreaID mov edx, esp; - mov eax, dword ptr ds:[FO_VAR_map_number]; + mov eax, ds:[FO_VAR_map_number]; call fo::funcoffs::wmMatchAreaContainingMapIdx_; pop eax; // area ID cmp customPosition, 0; @@ -353,9 +353,9 @@ skip: pop edx; test eax, eax; js end; - cmp eax, dword ptr ds:[FO_VAR_wmMaxAreaNum]; + cmp eax, ds:[FO_VAR_wmMaxAreaNum]; jge end; - mov dword ptr ds:[FO_VAR_WorldMapCurrArea], eax; + mov ds:[FO_VAR_WorldMapCurrArea], eax; end: retn; }