mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed mistake of using constant pointer variables in ASM blocks (resulted in incorrect references in most cases).
Now each variable has preprocessor constant with prefix VARPTR_ .
This commit is contained in:
@@ -19,192 +19,13 @@
|
||||
#include "Variables.h"
|
||||
|
||||
|
||||
#define _aiInfoList 0x510948
|
||||
#define _ambient_light 0x51923C
|
||||
#define _art 0x510738
|
||||
#define _art_name 0x56C9E4
|
||||
#define _art_vault_guy_num 0x5108A4
|
||||
#define _art_vault_person_nums 0x5108A8
|
||||
#define _bckgnd 0x5707A4
|
||||
#define _black_palette 0x663FD0
|
||||
#define _bottom_line 0x664524
|
||||
#define _btable 0x59E944
|
||||
#define _btncnt 0x43EA1C
|
||||
#define _CarCurrArea 0x672E68
|
||||
#define _cmap 0x51DF34
|
||||
#define _colorTable 0x6A38D0
|
||||
#define _combat_free_move 0x56D39C
|
||||
#define _combat_list 0x56D390
|
||||
#define _combat_state 0x510944
|
||||
#define _combat_turn_running 0x51093C
|
||||
#define _combatNumTurns 0x510940
|
||||
#define _crit_succ_eff 0x510978
|
||||
#define _critter_db_handle 0x58E94C
|
||||
#define _critterClearObj 0x518438
|
||||
#define _crnt_func 0x664508
|
||||
#define _curr_font_num 0x51E3B0
|
||||
#define _curr_pc_stat 0x6681AC
|
||||
#define _curr_stack 0x59E96C
|
||||
#define _cursor_line 0x664514
|
||||
#define _dialog_target 0x518848
|
||||
#define _dialog_target_is_party 0x51884C
|
||||
#define _drugInfoList 0x5191CC
|
||||
#define _edit_win 0x57060C
|
||||
#define _Educated 0x57082C
|
||||
#define _Experience_ 0x6681B4
|
||||
#define _fallout_game_time 0x51C720
|
||||
#define _flptr 0x614808
|
||||
#define _folder_card_desc 0x5705CC
|
||||
#define _folder_card_fid 0x5705B0
|
||||
#define _folder_card_title 0x5705B8
|
||||
#define _folder_card_title2 0x5705BC
|
||||
#define _frame_time 0x5709C4
|
||||
#define _free_perk 0x570A29
|
||||
#define _game_global_vars 0x5186C0
|
||||
#define _game_user_wants_to_quit 0x5186CC
|
||||
#define _gcsd 0x51094C
|
||||
#define _gdBarterMod 0x51873C
|
||||
#define _gdNumOptions 0x5186D8
|
||||
#define _gIsSteal 0x51D430
|
||||
#define _glblmode 0x5709D0
|
||||
#define _gmouse_current_cursor 0x518C0C
|
||||
#define _gmovie_played_list 0x596C78
|
||||
#define _GreenColor 0x6A3CB0
|
||||
#define _gsound_initialized 0x518E30
|
||||
#define _hit_location_penalty 0x510954
|
||||
#define _holo_flag 0x664529
|
||||
#define _holopages 0x66445C
|
||||
#define _hot_line_count 0x6644F8
|
||||
#define _i_fid 0x59E95C
|
||||
#define _i_lhand 0x59E958
|
||||
#define _i_rhand 0x59E968
|
||||
#define _i_wid 0x59E964
|
||||
#define _i_worn 0x59E954
|
||||
#define _In_WorldMap 0x672E1C
|
||||
#define _info_line 0x5707D0
|
||||
#define _interfaceWindow 0x519024
|
||||
#define _intfaceEnabled 0x518F10
|
||||
#define _intotal 0x43E95C
|
||||
#define _inven_dude 0x519058
|
||||
#define _inven_pid 0x51905C
|
||||
#define _inven_scroll_dn_bid 0x5190E8
|
||||
#define _inven_scroll_up_bid 0x5190E4
|
||||
#define _inventry_message_file 0x59E814
|
||||
#define _itemButtonItems 0x5970F8
|
||||
#define _itemCurrentItem 0x518F78
|
||||
#define _kb_lock_flags 0x51E2EA
|
||||
#define _last_buttons 0x51E2AC
|
||||
#define _last_button_winID 0x51E404
|
||||
#define _last_level 0x5707B4
|
||||
#define _Level_ 0x6681B0
|
||||
#define _Lifegiver 0x570854
|
||||
#define _list_com 0x56D394
|
||||
#define _list_total 0x56D37C
|
||||
#define _loadingGame 0x5194C4
|
||||
#define _LSData 0x613D30
|
||||
#define _lsgwin 0x6142C4
|
||||
#define _main_ctd 0x56D2B0
|
||||
#define _main_window 0x5194F0
|
||||
#define _map_elevation 0x519578
|
||||
#define _map_global_vars 0x51956C
|
||||
#define _master_db_handle 0x58E948
|
||||
#define _max 0x56FB50
|
||||
#define _maxScriptNum 0x51C7CC
|
||||
#define _Meet_Frank_Horrigan 0x672E04
|
||||
#define _mouse_hotx 0x6AC7D0
|
||||
#define _mouse_hoty 0x6AC7CC
|
||||
#define _mouse_is_hidden 0x6AC790
|
||||
#define _mouse_x_ 0x6AC7A8
|
||||
#define _mouse_y 0x664450
|
||||
#define _mouse_y_ 0x6AC7A4
|
||||
#define _Mutate_ 0x5708B4
|
||||
#define _name_color 0x56D744
|
||||
#define _name_font 0x56D74C
|
||||
#define _name_sort_list 0x56FCB0
|
||||
#define _num_game_global_vars 0x5186C4
|
||||
#define _num_map_global_vars 0x519574
|
||||
#define _obj_dude 0x6610B8
|
||||
#define _objectTable 0x639DA0
|
||||
#define _objItemOutlineState 0x519798
|
||||
#define _optionRect 0x58ECC0
|
||||
#define _outlined_object 0x518D94
|
||||
#define _partyMemberAIOptions 0x519DB8
|
||||
#define _partyMemberCount 0x519DAC
|
||||
#define _partyMemberLevelUpInfoList 0x519DBC
|
||||
#define _partyMemberList 0x519DA8 // each struct - 4 integers, first integer - objPtr
|
||||
#define _partyMemberMaxCount 0x519D9C
|
||||
#define _partyMemberPidList 0x519DA0
|
||||
#define _patches 0x5193CC
|
||||
#define _paths 0x6B24D0
|
||||
#define _pc_crit_succ_eff 0x5179B0
|
||||
#define _pc_kill_counts 0x56D780
|
||||
#define _pc_name 0x56D75C
|
||||
#define _pc_proto 0x51C370
|
||||
#define _pc_trait 0x66BE40
|
||||
#define _pc_trait2 0x66BE44
|
||||
#define _perk_data 0x519DCC
|
||||
#define _perkLevelDataList 0x51C120
|
||||
#define _pip_win 0x6644C4
|
||||
#define _pipboy_message_file 0x664348
|
||||
#define _pipmesg 0x664338
|
||||
#define _preload_list_index 0x519640
|
||||
#define _procTableStrs 0x51C758 // table of procId (from define.h) => procName map
|
||||
#define _proto_main_msg_file 0x6647FC
|
||||
#define _ptable 0x59E934
|
||||
#define _pud 0x59E960
|
||||
#define _queue 0x6648C0
|
||||
#define _quick_done 0x5193BC
|
||||
#define _read_callback 0x51DEEC
|
||||
#define _RedColor 0x6AB4D0
|
||||
#define _retvals 0x43EA7C
|
||||
#define _scr_size 0x6AC9F0
|
||||
#define _scriptListInfo 0x51C7C8
|
||||
#define _skill_data 0x51D118
|
||||
#define _slot_cursor 0x5193B8
|
||||
#define _sneak_working 0x56D77C // DWORD var
|
||||
#define _square 0x631E40
|
||||
#define _squares 0x66BE08
|
||||
#define _stack 0x59E86C
|
||||
#define _stack_offset 0x59E844
|
||||
#define _stat_data 0x51D53C
|
||||
#define _stat_flag 0x66452A
|
||||
#define _Tag_ 0x5708B0
|
||||
#define _tag_skill 0x668070
|
||||
#define _target_curr_stack 0x59E948
|
||||
#define _target_pud 0x59E978
|
||||
#define _target_stack 0x59E81C
|
||||
#define _target_stack_offset 0x59E7EC
|
||||
#define _target_str 0x56D518
|
||||
#define _target_xpos 0x672E20
|
||||
#define _target_ypos 0x672E24
|
||||
#define _text_char_width 0x51E3C4
|
||||
#define _text_height 0x51E3BC
|
||||
#define _text_max 0x51E3D4
|
||||
#define _text_mono_width 0x51E3C8
|
||||
#define _text_spacing 0x51E3CC
|
||||
#define _text_to_buf 0x51E3B8
|
||||
#define _text_width 0x51E3C0
|
||||
#define _title_color 0x56D750
|
||||
#define _title_font 0x56D748
|
||||
#define _trait_data 0x51DB84
|
||||
#define _view_page 0x664520
|
||||
#define _wd_obj 0x59E98C
|
||||
#define _wmAreaInfoList 0x51DDF8
|
||||
#define _wmLastRndTime 0x51DEA0
|
||||
#define _wmWorldOffsetX 0x51DE2C
|
||||
#define _wmWorldOffsetY 0x51DE30
|
||||
#define _world_xpos 0x672E0C
|
||||
#define _world_ypos 0x672E10
|
||||
#define _WorldMapCurrArea 0x672E08
|
||||
#define _YellowColor 0x6AB8BB
|
||||
|
||||
// Pointers to engine global variables
|
||||
namespace VarPtr
|
||||
{
|
||||
|
||||
// defines const pointer to a variable (pointer is constant, but value can be changed)
|
||||
#define VARDEFN(type, name, addr) \
|
||||
type* const name = reinterpret_cast<type*>(addr);
|
||||
#define VARDEFN(type, name, addrConst) \
|
||||
type* const name = reinterpret_cast<type*>(VARPTR##addrConst);
|
||||
|
||||
|
||||
VARDEFN(long, pc_trait, _pc_trait) // 2 of them
|
||||
|
||||
@@ -23,8 +23,194 @@
|
||||
#define DWORD unsigned long
|
||||
#define BYTE unsigned char
|
||||
|
||||
// Global variable pointers
|
||||
// Global variable constants
|
||||
|
||||
// PLEASE USE THOSE IN ASM BLOCKS!
|
||||
#define VARPTR_aiInfoList 0x510948
|
||||
#define VARPTR_ambient_light 0x51923C
|
||||
#define VARPTR_art 0x510738
|
||||
#define VARPTR_art_name 0x56C9E4
|
||||
#define VARPTR_art_vault_guy_num 0x5108A4
|
||||
#define VARPTR_art_vault_person_nums 0x5108A8
|
||||
#define VARPTR_bckgnd 0x5707A4
|
||||
#define VARPTR_black_palette 0x663FD0
|
||||
#define VARPTR_bottom_line 0x664524
|
||||
#define VARPTR_btable 0x59E944
|
||||
#define VARPTR_btncnt 0x43EA1C
|
||||
#define VARPTR_CarCurrArea 0x672E68
|
||||
#define VARPTR_cmap 0x51DF34
|
||||
#define VARPTR_colorTable 0x6A38D0
|
||||
#define VARPTR_combat_free_move 0x56D39C
|
||||
#define VARPTR_combat_list 0x56D390
|
||||
#define VARPTR_combat_state 0x510944
|
||||
#define VARPTR_combat_turn_running 0x51093C
|
||||
#define VARPTR_combatNumTurns 0x510940
|
||||
#define VARPTR_crit_succ_eff 0x510978
|
||||
#define VARPTR_critter_db_handle 0x58E94C
|
||||
#define VARPTR_critterClearObj 0x518438
|
||||
#define VARPTR_crnt_func 0x664508
|
||||
#define VARPTR_curr_font_num 0x51E3B0
|
||||
#define VARPTR_curr_pc_stat 0x6681AC
|
||||
#define VARPTR_curr_stack 0x59E96C
|
||||
#define VARPTR_cursor_line 0x664514
|
||||
#define VARPTR_dialog_target 0x518848
|
||||
#define VARPTR_dialog_target_is_party 0x51884C
|
||||
#define VARPTR_drugInfoList 0x5191CC
|
||||
#define VARPTR_edit_win 0x57060C
|
||||
#define VARPTR_Educated 0x57082C
|
||||
#define VARPTR_Experience_ 0x6681B4
|
||||
#define VARPTR_fallout_game_time 0x51C720
|
||||
#define VARPTR_flptr 0x614808
|
||||
#define VARPTR_folder_card_desc 0x5705CC
|
||||
#define VARPTR_folder_card_fid 0x5705B0
|
||||
#define VARPTR_folder_card_title 0x5705B8
|
||||
#define VARPTR_folder_card_title2 0x5705BC
|
||||
#define VARPTR_frame_time 0x5709C4
|
||||
#define VARPTR_free_perk 0x570A29
|
||||
#define VARPTR_game_global_vars 0x5186C0
|
||||
#define VARPTR_game_user_wants_to_quit 0x5186CC
|
||||
#define VARPTR_gcsd 0x51094C
|
||||
#define VARPTR_gdBarterMod 0x51873C
|
||||
#define VARPTR_gdNumOptions 0x5186D8
|
||||
#define VARPTR_gIsSteal 0x51D430
|
||||
#define VARPTR_glblmode 0x5709D0
|
||||
#define VARPTR_gmouse_current_cursor 0x518C0C
|
||||
#define VARPTR_gmovie_played_list 0x596C78
|
||||
#define VARPTR_GreenColor 0x6A3CB0
|
||||
#define VARPTR_gsound_initialized 0x518E30
|
||||
#define VARPTR_hit_location_penalty 0x510954
|
||||
#define VARPTR_holo_flag 0x664529
|
||||
#define VARPTR_holopages 0x66445C
|
||||
#define VARPTR_hot_line_count 0x6644F8
|
||||
#define VARPTR_i_fid 0x59E95C
|
||||
#define VARPTR_i_lhand 0x59E958
|
||||
#define VARPTR_i_rhand 0x59E968
|
||||
#define VARPTR_i_wid 0x59E964
|
||||
#define VARPTR_i_worn 0x59E954
|
||||
#define VARPTR_In_WorldMap 0x672E1C
|
||||
#define VARPTR_info_line 0x5707D0
|
||||
#define VARPTR_interfaceWindow 0x519024
|
||||
#define VARPTR_intfaceEnabled 0x518F10
|
||||
#define VARPTR_intotal 0x43E95C
|
||||
#define VARPTR_inven_dude 0x519058
|
||||
#define VARPTR_inven_pid 0x51905C
|
||||
#define VARPTR_inven_scroll_dn_bid 0x5190E8
|
||||
#define VARPTR_inven_scroll_up_bid 0x5190E4
|
||||
#define VARPTR_inventry_message_file 0x59E814
|
||||
#define VARPTR_itemButtonItems 0x5970F8
|
||||
#define VARPTR_itemCurrentItem 0x518F78
|
||||
#define VARPTR_kb_lock_flags 0x51E2EA
|
||||
#define VARPTR_last_buttons 0x51E2AC
|
||||
#define VARPTR_last_button_winID 0x51E404
|
||||
#define VARPTR_last_level 0x5707B4
|
||||
#define VARPTR_Level_ 0x6681B0
|
||||
#define VARPTR_Lifegiver 0x570854
|
||||
#define VARPTR_list_com 0x56D394
|
||||
#define VARPTR_list_total 0x56D37C
|
||||
#define VARPTR_loadingGame 0x5194C4
|
||||
#define VARPTR_LSData 0x613D30
|
||||
#define VARPTR_lsgwin 0x6142C4
|
||||
#define VARPTR_main_ctd 0x56D2B0
|
||||
#define VARPTR_main_window 0x5194F0
|
||||
#define VARPTR_map_elevation 0x519578
|
||||
#define VARPTR_map_global_vars 0x51956C
|
||||
#define VARPTR_master_db_handle 0x58E948
|
||||
#define VARPTR_max 0x56FB50
|
||||
#define VARPTR_maxScriptNum 0x51C7CC
|
||||
#define VARPTR_Meet_Frank_Horrigan 0x672E04
|
||||
#define VARPTR_mouse_hotx 0x6AC7D0
|
||||
#define VARPTR_mouse_hoty 0x6AC7CC
|
||||
#define VARPTR_mouse_is_hidden 0x6AC790
|
||||
#define VARPTR_mouse_x_ 0x6AC7A8
|
||||
#define VARPTR_mouse_y 0x664450
|
||||
#define VARPTR_mouse_y_ 0x6AC7A4
|
||||
#define VARPTR_Mutate_ 0x5708B4
|
||||
#define VARPTR_name_color 0x56D744
|
||||
#define VARPTR_name_font 0x56D74C
|
||||
#define VARPTR_name_sort_list 0x56FCB0
|
||||
#define VARPTR_num_game_global_vars 0x5186C4
|
||||
#define VARPTR_num_map_global_vars 0x519574
|
||||
#define VARPTR_obj_dude 0x6610B8
|
||||
#define VARPTR_objectTable 0x639DA0
|
||||
#define VARPTR_objItemOutlineState 0x519798
|
||||
#define VARPTR_optionRect 0x58ECC0
|
||||
#define VARPTR_outlined_object 0x518D94
|
||||
#define VARPTR_partyMemberAIOptions 0x519DB8
|
||||
#define VARPTR_partyMemberCount 0x519DAC
|
||||
#define VARPTR_partyMemberLevelUpInfoList 0x519DBC
|
||||
#define VARPTR_partyMemberList 0x519DA8 // each struct - 4 integers, first integer - objPtr
|
||||
#define VARPTR_partyMemberMaxCount 0x519D9C
|
||||
#define VARPTR_partyMemberPidList 0x519DA0
|
||||
#define VARPTR_patches 0x5193CC
|
||||
#define VARPTR_paths 0x6B24D0
|
||||
#define VARPTR_pc_crit_succ_eff 0x5179B0
|
||||
#define VARPTR_pc_kill_counts 0x56D780
|
||||
#define VARPTR_pc_name 0x56D75C
|
||||
#define VARPTR_pc_proto 0x51C370
|
||||
#define VARPTR_pc_trait 0x66BE40
|
||||
#define VARPTR_pc_trait2 0x66BE44
|
||||
#define VARPTR_perk_data 0x519DCC
|
||||
#define VARPTR_perkLevelDataList 0x51C120
|
||||
#define VARPTR_pip_win 0x6644C4
|
||||
#define VARPTR_pipboy_message_file 0x664348
|
||||
#define VARPTR_pipmesg 0x664338
|
||||
#define VARPTR_preload_list_index 0x519640
|
||||
#define VARPTR_procTableStrs 0x51C758 // table of procId (from define.h) => procName map
|
||||
#define VARPTR_proto_main_msg_file 0x6647FC
|
||||
#define VARPTR_ptable 0x59E934
|
||||
#define VARPTR_pud 0x59E960
|
||||
#define VARPTR_queue 0x6648C0
|
||||
#define VARPTR_quick_done 0x5193BC
|
||||
#define VARPTR_read_callback 0x51DEEC
|
||||
#define VARPTR_RedColor 0x6AB4D0
|
||||
#define VARPTR_retvals 0x43EA7C
|
||||
#define VARPTR_scr_size 0x6AC9F0
|
||||
#define VARPTR_scriptListInfo 0x51C7C8
|
||||
#define VARPTR_skill_data 0x51D118
|
||||
#define VARPTR_slot_cursor 0x5193B8
|
||||
#define VARPTR_sneak_working 0x56D77C // DWORD var
|
||||
#define VARPTR_square 0x631E40
|
||||
#define VARPTR_squares 0x66BE08
|
||||
#define VARPTR_stack 0x59E86C
|
||||
#define VARPTR_stack_offset 0x59E844
|
||||
#define VARPTR_stat_data 0x51D53C
|
||||
#define VARPTR_stat_flag 0x66452A
|
||||
#define VARPTR_Tag_ 0x5708B0
|
||||
#define VARPTR_tag_skill 0x668070
|
||||
#define VARPTR_target_curr_stack 0x59E948
|
||||
#define VARPTR_target_pud 0x59E978
|
||||
#define VARPTR_target_stack 0x59E81C
|
||||
#define VARPTR_target_stack_offset 0x59E7EC
|
||||
#define VARPTR_target_str 0x56D518
|
||||
#define VARPTR_target_xpos 0x672E20
|
||||
#define VARPTR_target_ypos 0x672E24
|
||||
#define VARPTR_text_char_width 0x51E3C4
|
||||
#define VARPTR_text_height 0x51E3BC
|
||||
#define VARPTR_text_max 0x51E3D4
|
||||
#define VARPTR_text_mono_width 0x51E3C8
|
||||
#define VARPTR_text_spacing 0x51E3CC
|
||||
#define VARPTR_text_to_buf 0x51E3B8
|
||||
#define VARPTR_text_width 0x51E3C0
|
||||
#define VARPTR_title_color 0x56D750
|
||||
#define VARPTR_title_font 0x56D748
|
||||
#define VARPTR_trait_data 0x51DB84
|
||||
#define VARPTR_view_page 0x664520
|
||||
#define VARPTR_wd_obj 0x59E98C
|
||||
#define VARPTR_wmAreaInfoList 0x51DDF8
|
||||
#define VARPTR_wmLastRndTime 0x51DEA0
|
||||
#define VARPTR_wmWorldOffsetX 0x51DE2C
|
||||
#define VARPTR_wmWorldOffsetY 0x51DE30
|
||||
#define VARPTR_world_xpos 0x672E0C
|
||||
#define VARPTR_world_ypos 0x672E10
|
||||
#define VARPTR_WorldMapCurrArea 0x672E08
|
||||
#define VARPTR_YellowColor 0x6AB8BB
|
||||
|
||||
|
||||
//
|
||||
// Global variable pointers.
|
||||
//
|
||||
// Use those in normal C++ code.
|
||||
//
|
||||
namespace VarPtr
|
||||
{
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ end:
|
||||
|
||||
static void __declspec(naked) BlockCombatHook2() {
|
||||
__asm {
|
||||
mov eax, dword ptr ds:[VarPtr::intfaceEnabled];
|
||||
mov eax, dword ptr ds:[VARPTR_intfaceEnabled];
|
||||
test eax, eax;
|
||||
jz end;
|
||||
mov eax, CombatDisabled;
|
||||
|
||||
+10
-10
@@ -513,7 +513,7 @@ static __declspec(naked) void MeleeDmgDispFix() {
|
||||
__asm {
|
||||
call FuncOffs::stat_level_; // Get Melee Damage
|
||||
mov ecx,eax; // Store value
|
||||
mov eax,dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov eax,dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
mov edx,PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
call FuncOffs::perk_level_; // Get rank of Bonus HtH Damage
|
||||
shl eax,0x1; // Multiply by 2
|
||||
@@ -527,7 +527,7 @@ static __declspec(naked) void MeleeDmgPrintFix() {
|
||||
__asm {
|
||||
call FuncOffs::stat_level_; // Get Melee Damage
|
||||
mov ebx,eax; // Store value
|
||||
mov eax,dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov eax,dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
mov edx,PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
call FuncOffs::perk_level_; // Get rank of Bonus HtH Damage
|
||||
shl eax,0x1; // Multiply by 2
|
||||
@@ -542,8 +542,8 @@ static __declspec(naked) void MeleeWeapDmgRngDispFix() {
|
||||
__asm {
|
||||
call FuncOffs::stat_level_; // Get Melee Damage
|
||||
mov ebx,eax; // Store Melee Damage value
|
||||
mov edx,dword ptr ds:[VarPtr::stack]; // Get pointer to critter
|
||||
mov eax,dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov edx,dword ptr ds:[VARPTR_stack]; // Get pointer to critter
|
||||
mov eax,dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
cmp eax,edx; // Is PC == critter?
|
||||
jnz end; // exit if no
|
||||
mov edx,PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
@@ -558,8 +558,8 @@ end:
|
||||
static __declspec(naked) void UnarmedDmgRngDispFix() {
|
||||
__asm {
|
||||
mov ebx,eax; // Store Melee Damage value
|
||||
mov edx,dword ptr ds:[VarPtr::stack]; // Get pointer to critter
|
||||
mov eax,dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov edx,dword ptr ds:[VARPTR_stack]; // Get pointer to critter
|
||||
mov eax,dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
cmp eax,edx; // Is PC == critter?
|
||||
jnz end; // exit if no
|
||||
mov edx,PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
@@ -583,7 +583,7 @@ static __declspec(naked) void HtHDamageFix1a() {
|
||||
add eax,2; // Total_Melee_Damage += 2
|
||||
mov dword ptr ss:[esp],eax; // Max_Damage = Total_Melee_Damage
|
||||
xor edx,edx;
|
||||
mov eax,dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov eax,dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
cmp ecx,eax; // Is the critter == PC?
|
||||
jnz ajmp; // Skip to ajmp if no
|
||||
mov edx,PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
@@ -602,7 +602,7 @@ static __declspec(naked) void HtHDamageFix1b() {
|
||||
__asm {
|
||||
call FuncOffs::stat_level_; // Get Total_Melee_Damage
|
||||
mov ebp, eax;
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude]; // Get pointer to PC
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude]; // Get pointer to PC
|
||||
cmp ecx, eax; // Is the critter == PC?
|
||||
jnz end; // Skip to exit if no
|
||||
mov edx, PERK_bonus_hth_damage; // perk_level_ argument: PERK_bonus_hth_damage
|
||||
@@ -618,7 +618,7 @@ end:
|
||||
static void __declspec(naked) DisplayBonusRangedDmg() {
|
||||
__asm {
|
||||
mov edx, PERK_bonus_ranged_damage
|
||||
mov eax, dword ptr ds:[VarPtr::stack]
|
||||
mov eax, dword ptr ds:[VARPTR_stack]
|
||||
call FuncOffs::perk_level_
|
||||
shl eax, 1
|
||||
add dword ptr [esp+4*4], eax // min_dmg
|
||||
@@ -631,7 +631,7 @@ static void __declspec(naked) DisplayBonusRangedDmg() {
|
||||
static void __declspec(naked) DisplayBonusHtHDmg1() {
|
||||
__asm {
|
||||
mov edx, PERK_bonus_hth_damage
|
||||
mov eax, dword ptr ds:[VarPtr::stack]
|
||||
mov eax, dword ptr ds:[VARPTR_stack]
|
||||
call FuncOffs::perk_level_
|
||||
shl eax, 1
|
||||
add dword ptr [esp+4*4], eax // min_dmg
|
||||
|
||||
+28
-28
@@ -9,7 +9,7 @@ DWORD WeightOnBody = 0;
|
||||
static void __declspec(naked) SharpShooterFix() {
|
||||
__asm {
|
||||
call FuncOffs::stat_level_ // Perception
|
||||
cmp edi, dword ptr ds:[VarPtr::obj_dude]
|
||||
cmp edi, dword ptr ds:[VARPTR_obj_dude]
|
||||
jne end
|
||||
xchg ecx, eax
|
||||
mov eax, edi // _obj_dude
|
||||
@@ -26,18 +26,18 @@ static void __declspec(naked) pipboy_hack() {
|
||||
__asm {
|
||||
cmp ebx, 0x210 // Back button?
|
||||
je end
|
||||
cmp byte ptr ds:[VarPtr::holo_flag], 0
|
||||
cmp byte ptr ds:[VARPTR_holo_flag], 0
|
||||
jne end
|
||||
xor ebx, ebx // No man, no problem (c) :-p
|
||||
end:
|
||||
mov eax, ds:[VarPtr::crnt_func]
|
||||
mov eax, ds:[VARPTR_crnt_func]
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) PipAlarm_hack() {
|
||||
__asm {
|
||||
mov ds:[VarPtr::crnt_func], eax
|
||||
mov ds:[VARPTR_crnt_func], eax
|
||||
mov eax, 0x400
|
||||
call FuncOffs::PipStatus_
|
||||
mov eax, 0x50CC04 // 'iisxxxx1'
|
||||
@@ -123,7 +123,7 @@ loopQueue:
|
||||
call FuncOffs::queue_find_next_
|
||||
jmp loopQueue
|
||||
skip:
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude]
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude]
|
||||
call FuncOffs::queue_find_first_
|
||||
end:
|
||||
push 0x47A6A1
|
||||
@@ -133,7 +133,7 @@ end:
|
||||
|
||||
static void __declspec(naked) remove_jet_addict() {
|
||||
__asm {
|
||||
cmp eax, dword ptr ds:[VarPtr::wd_obj]
|
||||
cmp eax, dword ptr ds:[VARPTR_wd_obj]
|
||||
jne end
|
||||
cmp dword ptr [edx+0x4], PID_JET // queue_addict.drug_pid == PID_JET?
|
||||
jne end
|
||||
@@ -154,7 +154,7 @@ static void __declspec(naked) item_d_take_drug_hack() {
|
||||
mov eax, esi
|
||||
call FuncOffs::perform_withdrawal_end_
|
||||
skip:
|
||||
mov dword ptr ds:[VarPtr::wd_obj], esi
|
||||
mov dword ptr ds:[VARPTR_wd_obj], esi
|
||||
mov eax, 2 // type = addiction
|
||||
mov edx, offset remove_jet_addict
|
||||
call FuncOffs::queue_clear_type_
|
||||
@@ -168,7 +168,7 @@ static void __declspec(naked) item_d_load_hack() {
|
||||
sub esp, 4
|
||||
mov [ebp], edi // edi->queue_drug
|
||||
mov ecx, 7
|
||||
mov esi, VarPtr::drugInfoList + 12
|
||||
mov esi, VARPTR_drugInfoList + 12
|
||||
loopDrug:
|
||||
cmp dword ptr [esi+8], 0 // drugInfoList.numeffects
|
||||
je nextDrug
|
||||
@@ -244,11 +244,11 @@ static void __declspec(naked) partyMemberCopyLevelInfo_hook() {
|
||||
cmp eax, -1
|
||||
je end
|
||||
pushad
|
||||
mov dword ptr ds:[VarPtr::critterClearObj], ebx
|
||||
mov dword ptr ds:[VARPTR_critterClearObj], ebx
|
||||
mov edx, FuncOffs::critterClearObjDrugs_
|
||||
call FuncOffs::queue_clear_type_
|
||||
mov ecx, 8
|
||||
mov edi, VarPtr::drugInfoList
|
||||
mov edi, VARPTR_drugInfoList
|
||||
mov esi, ebx
|
||||
loopAddict:
|
||||
mov eax, dword ptr [edi] // eax = drug pid
|
||||
@@ -273,7 +273,7 @@ end:
|
||||
static void __declspec(naked) gdProcessUpdate_hack() {
|
||||
__asm {
|
||||
add eax, esi
|
||||
cmp eax, dword ptr ds:[VarPtr::optionRect + 0xC] // _optionRect.offy
|
||||
cmp eax, dword ptr ds:[VARPTR_optionRect + 0xC] // _optionRect.offy
|
||||
jge skip
|
||||
add eax, 2
|
||||
push 0x44702D
|
||||
@@ -358,7 +358,7 @@ noArmor:
|
||||
mov eax, [esp+0x1C+0x4]
|
||||
test eax, eax
|
||||
jnz haveWeapon
|
||||
cmp dword ptr ds:[VarPtr::dialog_target_is_party], eax
|
||||
cmp dword ptr ds:[VARPTR_dialog_target_is_party], eax
|
||||
jne end // This is a party member
|
||||
mov eax, [esp+0x18+0x4]
|
||||
test eax, eax
|
||||
@@ -403,7 +403,7 @@ end:
|
||||
|
||||
static void __declspec(naked) inven_pickup_hack() {
|
||||
__asm {
|
||||
mov edx, ds:[VarPtr::pud]
|
||||
mov edx, ds:[VARPTR_pud]
|
||||
mov edx, [edx] // itemsCount
|
||||
dec edx
|
||||
sub edx, eax
|
||||
@@ -417,7 +417,7 @@ static void __declspec(naked) inven_pickup_hack2() {
|
||||
__asm {
|
||||
test eax, eax
|
||||
jz end
|
||||
mov eax, ds:[VarPtr::i_wid]
|
||||
mov eax, ds:[VARPTR_i_wid]
|
||||
call FuncOffs::GNW_find_
|
||||
mov ecx, [eax+0x8+0x4] // ecx = _i_wid.rect.y
|
||||
mov eax, [eax+0x8+0x0] // eax = _i_wid.rect.x
|
||||
@@ -451,7 +451,7 @@ end:
|
||||
found:
|
||||
mov ebx, 0x4711DF
|
||||
add edx, [esp+0x40] // inventory_offset
|
||||
mov eax, ds:[VarPtr::pud]
|
||||
mov eax, ds:[VARPTR_pud]
|
||||
mov ecx, [eax] // itemsCount
|
||||
jecxz skip
|
||||
dec ecx
|
||||
@@ -509,7 +509,7 @@ static void __declspec(naked) PipStatus_AddHotLines_hook() {
|
||||
__asm {
|
||||
call FuncOffs::AddHotLines_
|
||||
xor eax, eax
|
||||
mov dword ptr ds:[VarPtr::hot_line_count], eax
|
||||
mov dword ptr ds:[VARPTR_hot_line_count], eax
|
||||
retn
|
||||
}
|
||||
}
|
||||
@@ -677,7 +677,7 @@ static void __declspec(naked) obj_save_hack() {
|
||||
dec eax
|
||||
mov edx, [esp+0x1C] // combat_data
|
||||
mov eax, [eax+0x68] // pobj.who_hit_me.cid
|
||||
test byte ptr ds:[VarPtr::combat_state], 1 // in combat?
|
||||
test byte ptr ds:[VARPTR_combat_state], 1 // in combat?
|
||||
jz clear // No
|
||||
cmp dword ptr [edx], 0 // in combat?
|
||||
jne skip // Yes
|
||||
@@ -743,7 +743,7 @@ static void __declspec(naked) combat_hack() {
|
||||
push eax
|
||||
mov edx, STAT_max_move_points
|
||||
call FuncOffs::stat_level_
|
||||
mov edx, ds:[VarPtr::gcsd]
|
||||
mov edx, ds:[VARPTR_gcsd]
|
||||
test edx, edx
|
||||
jz skip
|
||||
add eax, [edx+0x8] // gcsd.free_move
|
||||
@@ -751,13 +751,13 @@ skip:
|
||||
pop edx
|
||||
xchg edx, eax // eax = source, edx = Max action points
|
||||
mov [eax+0x40], edx // pobj.curr_mp
|
||||
test byte ptr ds:[VarPtr::combat_state], 1 // in combat?
|
||||
test byte ptr ds:[VARPTR_combat_state], 1 // in combat?
|
||||
jz end // No
|
||||
mov edx, [eax+0x68] // pobj.cid
|
||||
cmp edx, -1
|
||||
je end
|
||||
push eax
|
||||
mov eax, ds:[VarPtr::aiInfoList]
|
||||
mov eax, ds:[VARPTR_aiInfoList]
|
||||
shl edx, 4
|
||||
mov dword ptr [edx+eax+0xC], 0 // aiInfo.lastMove
|
||||
pop eax
|
||||
@@ -769,20 +769,20 @@ end:
|
||||
|
||||
static void __declspec(naked) wmTeleportToArea_hack() {
|
||||
__asm {
|
||||
cmp ebx, ds:[VarPtr::WorldMapCurrArea]
|
||||
cmp ebx, ds:[VARPTR_WorldMapCurrArea]
|
||||
je end
|
||||
mov ds:[VarPtr::WorldMapCurrArea], ebx
|
||||
mov ds:[VARPTR_WorldMapCurrArea], ebx
|
||||
sub eax, edx
|
||||
add eax, ds:[VarPtr::wmAreaInfoList]
|
||||
add eax, ds:[VARPTR_wmAreaInfoList]
|
||||
mov edx, [eax+0x30] // wmAreaInfoList.world_posy
|
||||
mov ds:[VarPtr::world_ypos], edx
|
||||
mov ds:[VARPTR_world_ypos], edx
|
||||
mov edx, [eax+0x2C] // wmAreaInfoList.world_posx
|
||||
mov ds:[VarPtr::world_xpos], edx
|
||||
mov ds:[VARPTR_world_xpos], edx
|
||||
end:
|
||||
xor eax, eax
|
||||
mov ds:[VarPtr::target_xpos], eax
|
||||
mov ds:[VarPtr::target_ypos], eax
|
||||
mov ds:[VarPtr::In_WorldMap], eax
|
||||
mov ds:[VARPTR_target_xpos], eax
|
||||
mov ds:[VARPTR_target_ypos], eax
|
||||
mov ds:[VARPTR_In_WorldMap], eax
|
||||
push 0x4C5A77
|
||||
retn
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ static void __declspec(naked) GetNumButtonsHook1() {
|
||||
__asm {
|
||||
lea esi, Menus;
|
||||
mov eax, [esi+edi*4];
|
||||
mov eax, [VarPtr::btncnt + eax*4];
|
||||
mov eax, [VARPTR_btncnt + eax*4];
|
||||
push 0x43F064;
|
||||
retn;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ static void __declspec(naked) GetNumButtonsHook2() {
|
||||
__asm {
|
||||
lea edx, Menus;
|
||||
mov eax, [edx+edi*4];
|
||||
mov eax, [VarPtr::btncnt + eax*4];
|
||||
mov eax, [VARPTR_btncnt + eax*4];
|
||||
push 0x43F18B;
|
||||
retn;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ static void __declspec(naked) GetNumButtonsHook3() {
|
||||
__asm {
|
||||
lea eax, Menus;
|
||||
mov eax, [eax+edi*4];
|
||||
mov eax, [VarPtr::btncnt+eax*4];
|
||||
mov eax, [VARPTR_btncnt+eax*4];
|
||||
push 0x43F1EB;
|
||||
retn;
|
||||
}
|
||||
|
||||
@@ -714,7 +714,7 @@ void PrintText(char *DisplayText, BYTE ColourIndex, DWORD Xpos, DWORD Ypos, DWOR
|
||||
mov ecx, ToWidth
|
||||
mov eax, ToSurface
|
||||
add eax, posOffset
|
||||
call dword ptr ds:[VarPtr::text_to_buf]
|
||||
call dword ptr ds:[VARPTR_text_to_buf]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -723,7 +723,7 @@ void PrintText(char *DisplayText, BYTE ColourIndex, DWORD Xpos, DWORD Ypos, DWOR
|
||||
DWORD GetTextHeight() {
|
||||
DWORD TxtHeight;
|
||||
__asm {
|
||||
call dword ptr ds:[VarPtr::text_height] //get text height
|
||||
call dword ptr ds:[VARPTR_text_height] //get text height
|
||||
mov TxtHeight, eax
|
||||
}
|
||||
return TxtHeight;
|
||||
@@ -735,7 +735,7 @@ DWORD GetTextWidth(char *TextMsg) {
|
||||
DWORD TxtWidth;
|
||||
__asm {
|
||||
mov eax, TextMsg
|
||||
call dword ptr ds:[VarPtr::text_width] //get text width
|
||||
call dword ptr ds:[VARPTR_text_width] //get text width
|
||||
mov TxtWidth, eax
|
||||
}
|
||||
return TxtWidth;
|
||||
@@ -747,7 +747,7 @@ DWORD GetCharWidth(char CharVal) {
|
||||
DWORD charWidth;
|
||||
__asm {
|
||||
mov al, CharVal
|
||||
call dword ptr ds:[VarPtr::text_char_width]
|
||||
call dword ptr ds:[VARPTR_text_char_width]
|
||||
mov charWidth, eax
|
||||
}
|
||||
return charWidth;
|
||||
@@ -759,7 +759,7 @@ DWORD GetMaxTextWidth(char *TextMsg) {
|
||||
DWORD msgWidth;
|
||||
__asm {
|
||||
mov eax, TextMsg
|
||||
call dword ptr ds:[VarPtr::text_mono_width]
|
||||
call dword ptr ds:[VARPTR_text_mono_width]
|
||||
mov msgWidth, eax
|
||||
}
|
||||
return msgWidth;
|
||||
@@ -770,7 +770,7 @@ DWORD GetMaxTextWidth(char *TextMsg) {
|
||||
DWORD GetCharGapWidth() {
|
||||
DWORD gapWidth;
|
||||
__asm {
|
||||
call dword ptr ds:[VarPtr::text_spacing]
|
||||
call dword ptr ds:[VARPTR_text_spacing]
|
||||
mov gapWidth, eax
|
||||
}
|
||||
return gapWidth;
|
||||
@@ -781,7 +781,7 @@ DWORD GetCharGapWidth() {
|
||||
DWORD GetMaxCharWidth() {
|
||||
DWORD charWidth = 0;
|
||||
__asm {
|
||||
call dword ptr ds:[VarPtr::text_max]
|
||||
call dword ptr ds:[VARPTR_text_max]
|
||||
mov charWidth, eax
|
||||
}
|
||||
return charWidth;
|
||||
@@ -878,7 +878,7 @@ char _stdcall GetSex(void) {
|
||||
char sex;
|
||||
__asm {
|
||||
mov edx, STAT_gender //sex stat ref
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //hero state structure
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //hero state structure
|
||||
call FuncOffs::stat_level_ //get Player stat val
|
||||
test eax, eax //male=0, female=1
|
||||
jne Female
|
||||
@@ -947,7 +947,7 @@ static void __declspec(naked) LoadNewHeroArt() {
|
||||
__asm {
|
||||
cmp byte ptr ds:[esi], 'r'
|
||||
je isReading
|
||||
mov ecx, VarPtr::paths
|
||||
mov ecx, VARPTR_paths
|
||||
jmp setPath
|
||||
isReading:
|
||||
mov ecx, TempPathPtr
|
||||
@@ -984,7 +984,7 @@ static void __declspec(naked) CheckHeroExist() {
|
||||
sub esp, 0x4
|
||||
lea ebx, [esp]
|
||||
push ebx
|
||||
push VarPtr::art_name //critter art file name address
|
||||
push VARPTR_art_name //critter art file name address
|
||||
//call CheckHeroFile//check if art file exists
|
||||
call CheckFile
|
||||
add esp, 0xC
|
||||
@@ -1000,7 +1000,7 @@ static void __declspec(naked) CheckHeroExist() {
|
||||
jmp eax
|
||||
EndFunc:
|
||||
//popad
|
||||
mov eax, VarPtr::art_name
|
||||
mov eax, VARPTR_art_name
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -1015,7 +1015,7 @@ static void __declspec(naked) AdjustHeroBaseArt() {
|
||||
// jg EndFunc
|
||||
add eax, critterListSize
|
||||
//EndFunc:
|
||||
mov dword ptr ds:[VarPtr::art_vault_guy_num],eax
|
||||
mov dword ptr ds:[VARPTR_art_vault_guy_num],eax
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -1037,7 +1037,7 @@ static void __declspec(naked) AdjustHeroArmorArt() {
|
||||
jg EndFunc
|
||||
add eax, critterListSize //shift critter art index up into hero range
|
||||
EndFunc:
|
||||
//mov dword ptr ds:[VarPtr::i_fid],eax
|
||||
//mov dword ptr ds:[VARPTR_i_fid],eax
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -1047,7 +1047,7 @@ EndFunc:
|
||||
void _stdcall SetHeroArt(int NewArtFlag) {
|
||||
|
||||
__asm {
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //hero state struct
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //hero state struct
|
||||
mov eax, dword ptr ds:[eax + 0x20] //get hero FrmID
|
||||
xor edx, edx
|
||||
mov dx, ax
|
||||
@@ -1065,7 +1065,7 @@ IsHero:
|
||||
SetArt:
|
||||
mov ebx, 0 //SomePtr
|
||||
mov edx, eax
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //hero state struct
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //hero state struct
|
||||
mov dword ptr ds:[eax + 0x20],edx //copy new FrmID to hero state struct
|
||||
//call obj_change_fid_ // set critter FrmID function
|
||||
EndFunc:
|
||||
@@ -1144,7 +1144,7 @@ static void __declspec(naked) AddHeroCritNames() {
|
||||
|
||||
__asm {
|
||||
call FixCritList //insert names for hero critters
|
||||
mov eax, dword ptr ds:[VarPtr::art + 0x3C]
|
||||
mov eax, dword ptr ds:[VARPTR_art + 0x3C]
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -1183,15 +1183,15 @@ void DrawPC(void) {
|
||||
__asm {
|
||||
/*
|
||||
lea ebx, //-out- RECT*
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //critter struct
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //critter struct
|
||||
mov edx, dword ptr ds:[eax + 0x20] // new frmId
|
||||
call obj_change_fid_ //set new critt FrmID func
|
||||
*/
|
||||
lea edx, critRect //out critter RECT*
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //dude critter struct
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //dude critter struct
|
||||
call FuncOffs::obj_bound_ //get critter rect func
|
||||
|
||||
mov edx, dword ptr ds:[VarPtr::obj_dude] //dude critter struct
|
||||
mov edx, dword ptr ds:[VARPTR_obj_dude] //dude critter struct
|
||||
lea eax, critRect //RECT*
|
||||
mov edx, dword ptr ds:[edx + 0x28] //map level the dude is on
|
||||
call FuncOffs::tile_refresh_rect_ //draw rect area func
|
||||
@@ -1208,11 +1208,11 @@ void _stdcall RefreshPCArt() {
|
||||
call FuncOffs::proto_dude_update_gender_ //refresh PC base model art
|
||||
|
||||
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //PC state struct
|
||||
mov dword ptr ds:[VarPtr::inven_dude], eax //inventory temp pointer to PC state struct
|
||||
mov eax, dword ptr ds:[VarPtr::inven_dude]
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //PC state struct
|
||||
mov dword ptr ds:[VARPTR_inven_dude], eax //inventory temp pointer to PC state struct
|
||||
mov eax, dword ptr ds:[VARPTR_inven_dude]
|
||||
lea edx, dword ptr ds:[eax + 0x2C]
|
||||
mov dword ptr ds:[VarPtr::pud], edx //PC inventory
|
||||
mov dword ptr ds:[VARPTR_pud], edx //PC inventory
|
||||
|
||||
|
||||
xor eax, eax
|
||||
@@ -1220,9 +1220,9 @@ void _stdcall RefreshPCArt() {
|
||||
xor ebx, ebx //itemNum
|
||||
|
||||
|
||||
mov dword ptr ds:[VarPtr::i_rhand], eax //item2
|
||||
mov dword ptr ds:[VarPtr::i_worn], eax //armor
|
||||
mov dword ptr ds:[VarPtr::i_lhand], eax //item1
|
||||
mov dword ptr ds:[VARPTR_i_rhand], eax //item2
|
||||
mov dword ptr ds:[VARPTR_i_worn], eax //armor
|
||||
mov dword ptr ds:[VARPTR_i_lhand], eax //item1
|
||||
jmp LoopStart
|
||||
|
||||
CheckNextItem:
|
||||
@@ -1238,22 +1238,22 @@ CheckNextItem:
|
||||
jmp SetNextItem
|
||||
|
||||
IsItem1:
|
||||
mov dword ptr ds:[VarPtr::i_lhand], eax //set item1
|
||||
mov dword ptr ds:[VARPTR_i_lhand], eax //set item1
|
||||
test byte ptr ds:[eax + 0x27], 2 //check if same item type also in item2 slot
|
||||
jz SetNextItem
|
||||
|
||||
IsItem2:
|
||||
mov dword ptr ds:[VarPtr::i_rhand], eax //set item2
|
||||
mov dword ptr ds:[VARPTR_i_rhand], eax //set item2
|
||||
jmp SetNextItem
|
||||
|
||||
IsArmor:
|
||||
mov dword ptr ds:[VarPtr::i_worn], eax //set armor
|
||||
mov dword ptr ds:[VARPTR_i_worn], eax //set armor
|
||||
|
||||
SetNextItem:
|
||||
inc ebx //itemNum++
|
||||
add edx, 0x8 //itemListOffset + itemsize
|
||||
LoopStart:
|
||||
mov eax, dword ptr ds:[VarPtr::pud] //PC inventory
|
||||
mov eax, dword ptr ds:[VARPTR_pud] //PC inventory
|
||||
cmp ebx, dword ptr ds:[eax] //size of item list
|
||||
jl CheckNextItem
|
||||
|
||||
@@ -1262,16 +1262,16 @@ LoopStart:
|
||||
call FuncOffs::adjust_fid_
|
||||
|
||||
//copy new FrmID to hero state struct
|
||||
mov edx, dword ptr ds:[VarPtr::i_fid]
|
||||
mov eax, dword ptr ds:[VarPtr::inven_dude]
|
||||
mov edx, dword ptr ds:[VARPTR_i_fid]
|
||||
mov eax, dword ptr ds:[VARPTR_inven_dude]
|
||||
mov dword ptr ds:[eax + 0x20], edx
|
||||
//call FuncOffs::obj_change_fid_
|
||||
|
||||
|
||||
xor eax,eax
|
||||
mov dword ptr ds:[VarPtr::i_rhand], eax //item2
|
||||
mov dword ptr ds:[VarPtr::i_worn], eax //armor
|
||||
mov dword ptr ds:[VarPtr::i_lhand], eax //item1
|
||||
mov dword ptr ds:[VARPTR_i_rhand], eax //item2
|
||||
mov dword ptr ds:[VARPTR_i_worn], eax //armor
|
||||
mov dword ptr ds:[VARPTR_i_lhand], eax //item1
|
||||
}
|
||||
|
||||
|
||||
@@ -1612,10 +1612,10 @@ void DrawCharNote(bool Style, int WinRef, DWORD xPosWin, DWORD yPosWin, BYTE *BG
|
||||
void DrawCharNote(DWORD LstNum, char *TitleTxt, char *AltTitleTxt, char *Message) {
|
||||
|
||||
__asm {
|
||||
MOV ECX,Message//100//DWORD PTR ds:[VarPtr::folder_card_desc]
|
||||
MOV EBX,AltTitleTxt//DWORD PTR ds:[VarPtr::folder_card_title2]
|
||||
MOV EDX,TitleTxt//DWORD PTR ds:[VarPtr::folder_card_title]
|
||||
MOV EAX,LstNum//11//LstNum//DWORD PTR ds:[VarPtr::folder_card_fid]
|
||||
MOV ECX,Message//100//DWORD PTR ds:[VARPTR_folder_card_desc]
|
||||
MOV EBX,AltTitleTxt//DWORD PTR ds:[VARPTR_folder_card_title2]
|
||||
MOV EDX,TitleTxt//DWORD PTR ds:[VARPTR_folder_card_title]
|
||||
MOV EAX,LstNum//11//LstNum//DWORD PTR ds:[VARPTR_folder_card_fid]
|
||||
CALL FuncOffs::DrawCard_
|
||||
}
|
||||
}
|
||||
@@ -2076,7 +2076,7 @@ static void __declspec(naked) CharScrnEnd(void) {
|
||||
pushad
|
||||
call DeleteCharSurfaces
|
||||
popad
|
||||
mov ebp, dword ptr ds:[VarPtr::info_line]
|
||||
mov ebp, dword ptr ds:[VARPTR_info_line]
|
||||
retn
|
||||
}
|
||||
}
|
||||
@@ -2088,31 +2088,31 @@ static void __declspec(naked) SexScrnEnd(void) {
|
||||
__asm {
|
||||
pushad
|
||||
mov edx, STAT_gender
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude]
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude]
|
||||
call FuncOffs::stat_level_ //get PC stat current gender
|
||||
mov ecx, eax
|
||||
call FuncOffs::SexWindow_ //call gender selection window
|
||||
mov edx, STAT_gender
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude]
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude]
|
||||
call FuncOffs::stat_level_ //get PC stat current gender
|
||||
cmp ecx, eax //check if gender has been changed
|
||||
je EndFunc
|
||||
|
||||
xor ebx, ebx
|
||||
//cmp byte ptr ds:[VarPtr::gmovie_played_list + 0x3],1 //check if wearing vault suit
|
||||
//cmp byte ptr ds:[VARPTR_gmovie_played_list + 0x3],1 //check if wearing vault suit
|
||||
//jne NoVaultSuit
|
||||
//mov ebx, 0x8
|
||||
//NoVaultSuit:
|
||||
test eax, eax //check if male 0
|
||||
jnz IsFemale
|
||||
mov eax, dword ptr ds:[ebx + VarPtr::art_vault_person_nums] //base male model
|
||||
mov eax, dword ptr ds:[ebx + VARPTR_art_vault_person_nums] //base male model
|
||||
jmp ChangeSex
|
||||
IsFemale:
|
||||
mov eax, dword ptr ds:[ebx + 0x5108AC] //base female model
|
||||
ChangeSex:
|
||||
call AdjustHeroBaseArt
|
||||
//mov dword ptr ds:[VarPtr::art_vault_guy_num], eax //current base dude model
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude] //dude state structure
|
||||
//mov dword ptr ds:[VARPTR_art_vault_guy_num], eax //current base dude model
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude] //dude state structure
|
||||
call FuncOffs::inven_worn_
|
||||
mov CurrentRaceVal, 0 //reset race and style to defaults
|
||||
mov CurrentStyleVal, 0
|
||||
@@ -2122,12 +2122,12 @@ ChangeSex:
|
||||
call LoadHeroDat
|
||||
call RefreshPCArt
|
||||
//Check If Race or Style selected to redraw info note
|
||||
cmp dword ptr ds:[VarPtr::info_line], 0x501
|
||||
cmp dword ptr ds:[VARPTR_info_line], 0x501
|
||||
jne CheckIfStyle
|
||||
push 0
|
||||
call DrawCharNoteNewChar
|
||||
CheckIfStyle:
|
||||
cmp dword ptr ds:[VarPtr::info_line], 0x502
|
||||
cmp dword ptr ds:[VARPTR_info_line], 0x502
|
||||
jne EndFunc
|
||||
push 1
|
||||
call DrawCharNoteNewChar
|
||||
@@ -2216,7 +2216,7 @@ static void __declspec(naked) AddCharScrnButtons(void) {
|
||||
static void __declspec(naked) FixCharScrnBack(void) {
|
||||
//00432B92 |. A3 A4075700 MOV DWORD PTR DS:[5707A4],EAX
|
||||
__asm {
|
||||
mov dword ptr ds:[VarPtr::bckgnd], eax //surface ptr for char scrn back
|
||||
mov dword ptr ds:[VARPTR_bckgnd], eax //surface ptr for char scrn back
|
||||
test eax, eax //check if frm loaded ok
|
||||
je EndFunc
|
||||
|
||||
@@ -2321,7 +2321,7 @@ static void __declspec(naked) FixCharScrnBack(void) {
|
||||
pop ebp
|
||||
mov eax, CharScrnBackSurface
|
||||
EndFunc:
|
||||
mov dword ptr ds:[VarPtr::bckgnd], eax //surface ptr for char scrn back
|
||||
mov dword ptr ds:[VARPTR_bckgnd], eax //surface ptr for char scrn back
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,13 +523,13 @@ static void __declspec(naked) BarterPriceHook() {
|
||||
mov args[0], eax;
|
||||
mov args[4], edx;
|
||||
call FuncOffs::barter_compute_value_
|
||||
mov edx, ds:[VarPtr::btable]
|
||||
mov edx, ds:[VARPTR_btable]
|
||||
mov args[8], eax;
|
||||
mov args[12], edx;
|
||||
xchg eax, edx;
|
||||
call FuncOffs::item_caps_total_
|
||||
mov args[16], eax;
|
||||
mov eax, ds:[VarPtr::btable]
|
||||
mov eax, ds:[VARPTR_btable]
|
||||
call FuncOffs::item_total_cost_
|
||||
mov args[20], eax;
|
||||
mov eax, edx;
|
||||
@@ -896,7 +896,7 @@ static void _declspec(naked) UseArmorHack() {
|
||||
mov args[0], 3;
|
||||
mov eax, [esp+24]; // item
|
||||
mov args[4], eax;
|
||||
mov eax, ds:[VarPtr::i_worn]
|
||||
mov eax, ds:[VARPTR_i_worn]
|
||||
mov args[8], eax;
|
||||
pushad;
|
||||
push HOOK_INVENTORYMOVE;
|
||||
|
||||
@@ -176,7 +176,7 @@ static const DWORD ObjPickupEnd=0x49B6F8;
|
||||
static const DWORD size_limit;
|
||||
static __declspec(naked) void ObjPickupHook() {
|
||||
__asm {
|
||||
cmp edi, ds:[VarPtr::obj_dude];
|
||||
cmp edi, ds:[VARPTR_obj_dude];
|
||||
jnz end;
|
||||
end:
|
||||
lea edx, [esp+0x10];
|
||||
@@ -192,7 +192,7 @@ static __declspec(naked) int CritterCheck() {
|
||||
sub esp, 4;
|
||||
mov ebx, eax;
|
||||
|
||||
cmp eax, dword ptr ds:[VarPtr::obj_dude];
|
||||
cmp eax, dword ptr ds:[VARPTR_obj_dude];
|
||||
je single;
|
||||
test mode, 3;
|
||||
jnz run;
|
||||
@@ -354,13 +354,13 @@ static __declspec(naked) void DisplayStatsHook() {
|
||||
call CritterCheck;
|
||||
jz nolimit;
|
||||
push eax;
|
||||
mov eax, ds:[VarPtr::stack];
|
||||
mov eax, ds:[VARPTR_stack];
|
||||
push ecx;
|
||||
push InvenFmt1;
|
||||
push offset InvenFmt;
|
||||
call strcpy_wrapper;
|
||||
pop ecx;
|
||||
mov eax, ds:[VarPtr::stack];
|
||||
mov eax, ds:[VARPTR_stack];
|
||||
call item_total_size;
|
||||
push eax;
|
||||
push ecx;
|
||||
@@ -378,7 +378,7 @@ nolimit:
|
||||
push eax;
|
||||
push eax;
|
||||
end:
|
||||
mov eax, ds:[VarPtr::stack];
|
||||
mov eax, ds:[VARPTR_stack];
|
||||
mov edx, 0xc;
|
||||
jmp DisplayStatsEnd;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ static DWORD __declspec(naked) ReadKillCounter(DWORD killtype) {
|
||||
ret;
|
||||
func:
|
||||
push ebx;
|
||||
lea ebx, ds:[VarPtr::pc_kill_counts+eax*2];
|
||||
lea ebx, ds:[VARPTR_pc_kill_counts+eax*2];
|
||||
xor eax,eax;
|
||||
mov ax, word ptr [ebx]
|
||||
pop ebx;
|
||||
@@ -53,7 +53,7 @@ static void __declspec(naked) IncKillCounter(DWORD killtype) {
|
||||
ret;
|
||||
func:
|
||||
push ebx;
|
||||
lea ebx, ds:[VarPtr::pc_kill_counts+eax*2];
|
||||
lea ebx, ds:[VARPTR_pc_kill_counts+eax*2];
|
||||
xor eax, eax;
|
||||
mov ax, word ptr [ebx];
|
||||
inc ax;
|
||||
|
||||
@@ -115,10 +115,10 @@ static DWORD _stdcall combatSaveTest() {
|
||||
DWORD bonusmove;
|
||||
__asm {
|
||||
mov edx, 8;
|
||||
mov eax, ds:[VarPtr::obj_dude];
|
||||
mov eax, ds:[VARPTR_obj_dude];
|
||||
call FuncOffs::stat_level_;
|
||||
mov ap, eax;
|
||||
mov eax, ds:[VarPtr::obj_dude];
|
||||
mov eax, ds:[VARPTR_obj_dude];
|
||||
mov edx, 3;
|
||||
call FuncOffs::perk_level_;
|
||||
mov bonusmove, eax;
|
||||
@@ -250,7 +250,7 @@ static void __declspec(naked) NewGame() {
|
||||
pushad;
|
||||
call NewGame2;
|
||||
mov al, DisableHorrigan;
|
||||
mov byte ptr ds:[VarPtr::Meet_Frank_Horrigan], al;
|
||||
mov byte ptr ds:[VARPTR_Meet_Frank_Horrigan], al;
|
||||
popad;
|
||||
call FuncOffs::main_game_loop_;
|
||||
retn;
|
||||
@@ -269,7 +269,7 @@ static void __declspec(naked) MainMenu() {
|
||||
push 0;
|
||||
call ResetState;
|
||||
mov al, PipBoyAvailableAtGameStart;
|
||||
mov byte ptr ds:[VarPtr::gmovie_played_list + 0x3], al;
|
||||
mov byte ptr ds:[VARPTR_gmovie_played_list + 0x3], al;
|
||||
call ReadExtraGameMsgFilesIfNeeded;
|
||||
call LoadHeroAppearance;
|
||||
popad;
|
||||
|
||||
@@ -37,7 +37,7 @@ static void __declspec(naked) MainMenuButtonYHook() {
|
||||
static void __declspec(naked) MainMenuTextYHook() {
|
||||
__asm {
|
||||
add eax, MainMenuTextOffset;
|
||||
jmp dword ptr ds:[VarPtr::text_to_buf];
|
||||
jmp dword ptr ds:[VARPTR_text_to_buf];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ static void __declspec(naked) MainMenuTextHook() {
|
||||
dec ecx; //xpos
|
||||
add edi, 12;
|
||||
push edi; //ypos
|
||||
mov eax, dword ptr ds:[VarPtr::main_window];//winptr
|
||||
mov eax, dword ptr ds:[VARPTR_main_window];//winptr
|
||||
call FuncOffs::win_print_;
|
||||
jmp MainMenuTextRet;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ static void _declspec(naked) CombatHack_add_noncoms_() {
|
||||
call CombatWrapper_v2;
|
||||
cmp eax, -1;
|
||||
jne gonormal;
|
||||
mov eax, VarPtr::list_com;
|
||||
mov eax, VARPTR_list_com;
|
||||
mov [eax], 0;
|
||||
mov ecx, [esp];
|
||||
gonormal:
|
||||
|
||||
@@ -126,17 +126,17 @@ static void __declspec(naked) LevelUpHook() {
|
||||
notskilled:
|
||||
mov ecx, 3;
|
||||
afterskilled:
|
||||
mov eax, ds:[VarPtr::Level_]; //Get players level
|
||||
mov eax, ds:[VARPTR_Level_]; //Get players level
|
||||
inc eax;
|
||||
xor edx, edx;
|
||||
div ecx;
|
||||
test edx, edx;
|
||||
jnz end;
|
||||
inc byte ptr ds:[VarPtr::free_perk]; //Increment the number of perks owed
|
||||
inc byte ptr ds:[VARPTR_free_perk]; //Increment the number of perks owed
|
||||
end:
|
||||
pop ebx;
|
||||
pop ecx;
|
||||
mov edx, ds:[VarPtr::Level_];
|
||||
mov edx, ds:[VARPTR_Level_];
|
||||
retn;
|
||||
}
|
||||
}
|
||||
@@ -353,7 +353,7 @@ static void __declspec(naked) PlayerHasPerkHook() {
|
||||
mov ecx, eax;
|
||||
xor ebx, ebx;
|
||||
oloop:
|
||||
mov eax, ds:[VarPtr::obj_dude];
|
||||
mov eax, ds:[VARPTR_obj_dude];
|
||||
mov edx, ebx;
|
||||
call FuncOffs::perk_level_;
|
||||
test eax, eax;
|
||||
@@ -582,7 +582,7 @@ end:
|
||||
jl end2;
|
||||
cmp edx, 90;
|
||||
jg end2;
|
||||
inc ds:[edx*4 + (VarPtr::pc_proto + 0x24 - PERK_gain_strength_perk*4)]; // base_stat_srength
|
||||
inc ds:[edx*4 + (VARPTR_pc_proto + 0x24 - PERK_gain_strength_perk*4)]; // base_stat_srength
|
||||
end2:
|
||||
retn;
|
||||
}
|
||||
@@ -742,7 +742,7 @@ static int _stdcall stat_get_base_direct(DWORD statID) {
|
||||
DWORD result;
|
||||
__asm {
|
||||
mov edx, statID;
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude];
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude];
|
||||
call FuncOffs::stat_get_base_direct_;
|
||||
mov result, eax;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ static void __declspec(naked) newhookpress() {
|
||||
mov wait_flag, 0;
|
||||
mov total_quests, 0;
|
||||
pop eax;
|
||||
mov edx,ds:[VarPtr::crnt_func];
|
||||
mov edx,ds:[VARPTR_crnt_func];
|
||||
retn;
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ smpj1:
|
||||
mov ebx, ds:[0x6642E4];
|
||||
push -0x1;
|
||||
mov ecx, ds:[0x6642E0];
|
||||
mov eax, ds:[VarPtr::pip_win];
|
||||
mov eax, ds:[VARPTR_pip_win];
|
||||
push ebx;
|
||||
mov edx, 0x35;
|
||||
mov ebx, edi;
|
||||
@@ -280,7 +280,7 @@ smpj4:
|
||||
mov ebx, 0xE;
|
||||
push -0x1;
|
||||
mov ecx, 0xB;
|
||||
mov eax, ds:[VarPtr::pip_win];
|
||||
mov eax, ds:[VARPTR_pip_win];
|
||||
push ebx;
|
||||
mov edx, 0x8B;
|
||||
mov ebx, edi;
|
||||
@@ -307,7 +307,7 @@ smpj16:
|
||||
mov ebx, 0xE;
|
||||
push -0x1;
|
||||
mov ecx, 0xB;
|
||||
mov eax, ds:[VarPtr::pip_win];
|
||||
mov eax, ds:[VARPTR_pip_win];
|
||||
push ebx;
|
||||
mov edx, 0x8B;
|
||||
mov ebx, edi;
|
||||
|
||||
@@ -1089,12 +1089,12 @@ static void __declspec(naked) FreeProgramHook() {
|
||||
static void __declspec(naked) obj_outline_all_items_on() {
|
||||
__asm {
|
||||
pushad
|
||||
mov eax, dword ptr ds:[VarPtr::map_elevation]
|
||||
mov eax, dword ptr ds:[VARPTR_map_elevation]
|
||||
call FuncOffs::obj_find_first_at_
|
||||
loopObject:
|
||||
test eax, eax
|
||||
jz end
|
||||
cmp eax, ds:[VarPtr::outlined_object]
|
||||
cmp eax, ds:[VARPTR_outlined_object]
|
||||
je nextObject
|
||||
xchg ecx, eax
|
||||
mov eax, [ecx+0x20]
|
||||
@@ -1127,12 +1127,12 @@ end:
|
||||
static void __declspec(naked) obj_outline_all_items_off() {
|
||||
__asm {
|
||||
pushad
|
||||
mov eax, dword ptr ds:[VarPtr::map_elevation]
|
||||
mov eax, dword ptr ds:[VARPTR_map_elevation]
|
||||
call FuncOffs::obj_find_first_at_
|
||||
loopObject:
|
||||
test eax, eax
|
||||
jz end
|
||||
cmp eax, ds:[VarPtr::outlined_object]
|
||||
cmp eax, ds:[VARPTR_outlined_object]
|
||||
je nextObject
|
||||
xchg ecx, eax
|
||||
mov eax, [ecx+0x20]
|
||||
@@ -1160,7 +1160,7 @@ static void __declspec(naked) obj_remove_outline_hook() {
|
||||
jnz end
|
||||
cmp highlightingToggled, 1
|
||||
jne end
|
||||
mov ds:[VarPtr::outlined_object], eax
|
||||
mov ds:[VARPTR_outlined_object], eax
|
||||
call obj_outline_all_items_on
|
||||
end:
|
||||
retn
|
||||
@@ -1739,7 +1739,7 @@ static void RunGlobalScripts1() {
|
||||
if (MotionSensorMode&4) {
|
||||
DWORD scanner;
|
||||
__asm {
|
||||
mov eax, ds:[VarPtr::obj_dude];
|
||||
mov eax, ds:[VARPTR_obj_dude];
|
||||
mov edx, PID_MOTION_SENSOR
|
||||
call FuncOffs::inven_pid_is_carried_ptr_
|
||||
mov scanner, eax;
|
||||
|
||||
@@ -50,7 +50,7 @@ end1:
|
||||
// checks if combat mode is enabled (using R8 8-bit register) and jumps to GOTOFAIL if it is (does nothing if reg_anim_combat_check is 0)
|
||||
#define _CHECK_COMBAT_MODE(R8, GOTOFAIL) __asm { \
|
||||
__asm mov R8, reg_anim_combat_check \
|
||||
__asm test byte ptr VarPtr::combat_state, R8 \
|
||||
__asm test byte ptr ds:VARPTR_combat_state, R8 \
|
||||
__asm jnz GOTOFAIL }
|
||||
|
||||
static void __declspec(naked) op_reg_anim_destroy() {
|
||||
|
||||
@@ -106,8 +106,8 @@ static void __declspec(naked) get_mouse_x() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::mouse_x_];
|
||||
add edx, ds:[VarPtr::mouse_hotx];
|
||||
mov edx, ds:[VARPTR_mouse_x_];
|
||||
add edx, ds:[VARPTR_mouse_hotx];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -124,8 +124,8 @@ static void __declspec(naked) get_mouse_y() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::mouse_y_];
|
||||
add edx, ds:[VarPtr::mouse_hoty];
|
||||
mov edx, ds:[VARPTR_mouse_y_];
|
||||
add edx, ds:[VARPTR_mouse_hoty];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -142,7 +142,7 @@ static void __declspec(naked) get_mouse_buttons() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::last_buttons];
|
||||
mov edx, ds:[VARPTR_last_buttons];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -159,7 +159,7 @@ static void __declspec(naked) get_window_under_mouse() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::last_button_winID];
|
||||
mov edx, ds:[VARPTR_last_button_winID];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -175,8 +175,8 @@ static void __declspec(naked) get_screen_width() {
|
||||
__asm {
|
||||
push edx
|
||||
push eax
|
||||
mov edx, ds:[VarPtr::scr_size+8] // _scr_size.offx
|
||||
sub edx, ds:[VarPtr::scr_size] // _scr_size.x
|
||||
mov edx, ds:[VARPTR_scr_size+8] // _scr_size.offx
|
||||
sub edx, ds:[VARPTR_scr_size] // _scr_size.x
|
||||
inc edx
|
||||
call FuncOffs::interpretPushLong_
|
||||
pop eax
|
||||
@@ -192,8 +192,8 @@ static void __declspec(naked) get_screen_height() {
|
||||
__asm {
|
||||
push edx
|
||||
push eax
|
||||
mov edx, ds:[VarPtr::scr_size+12] // _scr_size.offy
|
||||
sub edx, ds:[VarPtr::scr_size+4] // _scr_size.y
|
||||
mov edx, ds:[VARPTR_scr_size+12] // _scr_size.offy
|
||||
sub edx, ds:[VARPTR_scr_size+4] // _scr_size.y
|
||||
inc edx
|
||||
call FuncOffs::interpretPushLong_
|
||||
pop eax
|
||||
@@ -230,7 +230,7 @@ static void __declspec(naked) resume_game() {
|
||||
static void __declspec(naked) create_message_window() {
|
||||
__asm {
|
||||
pushad
|
||||
mov ebx, dword ptr ds:[VarPtr::curr_font_num];
|
||||
mov ebx, dword ptr ds:[VARPTR_curr_font_num];
|
||||
cmp ebx, 0x65;
|
||||
je end;
|
||||
|
||||
@@ -275,7 +275,7 @@ static void __declspec(naked) GetViewportX() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::wmWorldOffsetX];
|
||||
mov edx, ds:[VARPTR_wmWorldOffsetX];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov eax, ecx;
|
||||
@@ -292,7 +292,7 @@ static void __declspec(naked) GetViewportY() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::wmWorldOffsetY];
|
||||
mov edx, ds:[VARPTR_wmWorldOffsetY];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov eax, ecx;
|
||||
@@ -315,7 +315,7 @@ static void __declspec(naked) SetViewportX() {
|
||||
call FuncOffs::interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
jnz end;
|
||||
mov ds:[VarPtr::wmWorldOffsetX], eax
|
||||
mov ds:[VARPTR_wmWorldOffsetX], eax
|
||||
end:
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -335,7 +335,7 @@ static void __declspec(naked) SetViewportY() {
|
||||
call FuncOffs::interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
jnz end;
|
||||
mov ds:[VarPtr::wmWorldOffsetY], eax
|
||||
mov ds:[VARPTR_wmWorldOffsetY], eax
|
||||
end:
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -415,7 +415,7 @@ static void __declspec(naked) IsIfaceTagActive() {
|
||||
jmp end;
|
||||
falloutfunc:
|
||||
mov ecx, eax;
|
||||
mov eax, dword ptr ds:[VarPtr::obj_dude];
|
||||
mov eax, dword ptr ds:[VARPTR_obj_dude];
|
||||
mov edx, esp;
|
||||
mov eax, [eax+0x64];
|
||||
call FuncOffs::proto_ptr_;
|
||||
|
||||
@@ -164,7 +164,7 @@ static void __declspec(naked) GetYear() {
|
||||
mov eax, AddUnarmedStatToGetYear;
|
||||
test eax, eax;
|
||||
jz end;
|
||||
add edx, ds:[VarPtr::pc_proto + 0x4C];
|
||||
add edx, ds:[VARPTR_pc_proto + 0x4C];
|
||||
end:
|
||||
mov eax, edi;
|
||||
call FuncOffs::interpretPushLong_;
|
||||
@@ -247,7 +247,7 @@ static void __declspec(naked) SetPipBoyAvailable() {
|
||||
jl end;
|
||||
cmp eax, 1;
|
||||
jg end;
|
||||
mov byte ptr ds:[VarPtr::gmovie_played_list + 0x3], al;
|
||||
mov byte ptr ds:[VARPTR_gmovie_played_list + 0x3], al;
|
||||
end:
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -273,7 +273,7 @@ static void __declspec(naked) GetKillCounter() {
|
||||
jnz fail;
|
||||
cmp eax, 19;
|
||||
jge fail;
|
||||
mov edx, ds:[VarPtr::pc_kill_counts+eax*4];
|
||||
mov edx, ds:[VARPTR_pc_kill_counts+eax*4];
|
||||
jmp end;
|
||||
fail:
|
||||
|
||||
@@ -314,7 +314,7 @@ static void __declspec(naked) ModKillCounter() {
|
||||
jnz end;
|
||||
cmp eax, 19;
|
||||
jge end;
|
||||
add ds:[VarPtr::pc_kill_counts+eax*4], edi;
|
||||
add ds:[VARPTR_pc_kill_counts+eax*4], edi;
|
||||
end:
|
||||
pop esi;
|
||||
pop edi;
|
||||
@@ -443,7 +443,7 @@ static void __declspec(naked) GetKillCounter2() {
|
||||
jnz fail;
|
||||
cmp eax, 38;
|
||||
jge fail;
|
||||
movzx edx, word ptr ds:[VarPtr::pc_kill_counts+eax*2];
|
||||
movzx edx, word ptr ds:[VARPTR_pc_kill_counts+eax*2];
|
||||
jmp end;
|
||||
fail:
|
||||
xor edx, edx;
|
||||
@@ -483,7 +483,7 @@ static void __declspec(naked) ModKillCounter2() {
|
||||
jnz end;
|
||||
cmp eax, 38;
|
||||
jge end;
|
||||
add word ptr ds:[VarPtr::pc_kill_counts+eax*2], di;
|
||||
add word ptr ds:[VARPTR_pc_kill_counts+eax*2], di;
|
||||
end:
|
||||
pop esi;
|
||||
pop edi;
|
||||
@@ -500,7 +500,7 @@ static void __declspec(naked) GetActiveHand() {
|
||||
push ecx;
|
||||
push edx;
|
||||
mov ecx, eax;
|
||||
mov edx, dword ptr ds:[VarPtr::itemCurrentItem];
|
||||
mov edx, dword ptr ds:[VARPTR_itemCurrentItem];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov eax, ecx;
|
||||
@@ -671,11 +671,11 @@ next:
|
||||
mov eax, edi;
|
||||
call FuncOffs::interpretGetString_;
|
||||
push eax;
|
||||
push ds:[VarPtr::partyMemberLevelUpInfoList];
|
||||
push ds:[VarPtr::partyMemberPidList];
|
||||
push ds:[VarPtr::partyMemberList];
|
||||
push ds:[VarPtr::partyMemberMaxCount];
|
||||
push ds:[VarPtr::partyMemberCount];
|
||||
push ds:[VARPTR_partyMemberLevelUpInfoList];
|
||||
push ds:[VARPTR_partyMemberPidList];
|
||||
push ds:[VARPTR_partyMemberList];
|
||||
push ds:[VARPTR_partyMemberMaxCount];
|
||||
push ds:[VARPTR_partyMemberCount];
|
||||
call get_npc_level2;
|
||||
mov edx, eax;
|
||||
jmp end;
|
||||
@@ -839,7 +839,7 @@ static void __declspec(naked) SetCarTown() {
|
||||
call FuncOffs::interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
jnz end;
|
||||
mov ds:[VarPtr::CarCurrArea], eax;
|
||||
mov ds:[VARPTR_CarCurrArea], eax;
|
||||
end:
|
||||
pop edi;
|
||||
pop edx;
|
||||
@@ -887,7 +887,7 @@ static void __declspec(naked) GetBodypartHitModifier() {
|
||||
jg fail
|
||||
test eax, eax
|
||||
jl fail
|
||||
mov edx, ds:[VarPtr::hit_location_penalty+eax*4]
|
||||
mov edx, ds:[VARPTR_hit_location_penalty+eax*4]
|
||||
jmp end
|
||||
fail:
|
||||
xor edx, edx
|
||||
@@ -930,7 +930,7 @@ static void __declspec(naked) SetBodypartHitModifier() {
|
||||
skip:
|
||||
test eax, eax
|
||||
jl end
|
||||
mov ds:[VarPtr::hit_location_penalty+eax*4], ebx
|
||||
mov ds:[VARPTR_hit_location_penalty+eax*4], ebx
|
||||
cmp eax, 8 // Body_Uncalled?
|
||||
jne end // No
|
||||
sub eax, 5 // Body_Torso
|
||||
@@ -1125,7 +1125,7 @@ next:
|
||||
mov eax, ecx;
|
||||
call FuncOffs::interpretGetString_;
|
||||
call FuncOffs::loadColorTable_
|
||||
mov eax, VarPtr::cmap
|
||||
mov eax, VARPTR_cmap
|
||||
call FuncOffs::palette_set_to_
|
||||
end:
|
||||
pop edx;
|
||||
@@ -1316,7 +1316,7 @@ static void __declspec(naked) get_light_level() {
|
||||
__asm {
|
||||
pushad;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::ambient_light];
|
||||
mov edx, ds:[VARPTR_ambient_light];
|
||||
call FuncOffs::interpretPushLong_
|
||||
mov edx, 0xc001;
|
||||
mov eax, ecx;
|
||||
@@ -1342,7 +1342,7 @@ static void __declspec(naked) get_attack_type() {
|
||||
push edx;
|
||||
push ecx;
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[VarPtr::main_ctd + 0x4];
|
||||
mov edx, ds:[VARPTR_main_ctd + 0x4];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -1427,7 +1427,7 @@ static void __declspec(naked) get_tile_pid() {
|
||||
mov eax, [esp];
|
||||
mov edx, [esp+4];
|
||||
call FuncOffs::square_num_;
|
||||
mov edx, ds:[VarPtr::square];
|
||||
mov edx, ds:[VARPTR_square];
|
||||
movzx edx, word ptr ds:[edx+eax*4];
|
||||
add esp, 8;
|
||||
jmp end;
|
||||
@@ -1510,7 +1510,7 @@ static void __declspec(naked) mark_movie_played() {
|
||||
jl end;
|
||||
cmp eax, 0x11;
|
||||
jge end;
|
||||
mov byte ptr ds:[eax + VarPtr::gmovie_played_list], 1;
|
||||
mov byte ptr ds:[eax + VARPTR_gmovie_played_list], 1;
|
||||
end:
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -1596,7 +1596,7 @@ static void __declspec(naked) tile_under_cursor() {
|
||||
lea edx, [esp];
|
||||
lea eax, [esp+4];
|
||||
call FuncOffs::mouse_get_position_;
|
||||
mov ebx, dword ptr ds:[VarPtr::map_elevation];
|
||||
mov ebx, dword ptr ds:[VARPTR_map_elevation];
|
||||
mov edx, [esp];
|
||||
mov eax, [esp+4];
|
||||
call FuncOffs::tile_num_;
|
||||
@@ -1618,7 +1618,7 @@ static void __declspec(naked) gdialog_get_barter_mod() {
|
||||
push edx;
|
||||
push ecx;
|
||||
mov ecx, eax;
|
||||
mov edx, dword ptr ds:[VarPtr::gdBarterMod];
|
||||
mov edx, dword ptr ds:[VARPTR_gdBarterMod];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
@@ -1651,7 +1651,7 @@ end:
|
||||
static void __declspec(naked) op_sneak_success() {
|
||||
_OP_BEGIN(ebp)
|
||||
__asm {
|
||||
mov eax, ds:[VarPtr::sneak_working]
|
||||
mov eax, ds:[VARPTR_sneak_working]
|
||||
}
|
||||
_RET_VAL_INT(ebp)
|
||||
_OP_END
|
||||
|
||||
@@ -27,7 +27,7 @@ static void __declspec(naked) GetPerkOwed() {
|
||||
__asm {
|
||||
pushad;
|
||||
mov ecx, eax;
|
||||
movzx edx, byte ptr ds:[VarPtr::free_perk];
|
||||
movzx edx, byte ptr ds:[VARPTR_free_perk];
|
||||
call FuncOffs::interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov eax, ecx;
|
||||
@@ -49,7 +49,7 @@ static void __declspec(naked) SetPerkOwed() {
|
||||
and eax, 0xff;
|
||||
cmp eax, 250;
|
||||
jg end;
|
||||
mov byte ptr ds:[VarPtr::free_perk], al
|
||||
mov byte ptr ds:[VARPTR_free_perk], al
|
||||
end:
|
||||
popad
|
||||
retn;
|
||||
@@ -85,7 +85,7 @@ static void __declspec(naked) GetPerkAvailable() {
|
||||
cmp eax, PERK_count;
|
||||
jge fail;
|
||||
mov edx, eax;
|
||||
mov eax, ds:[VarPtr::obj_dude];
|
||||
mov eax, ds:[VARPTR_obj_dude];
|
||||
call FuncOffs::perk_make_list_;
|
||||
mov edx, eax;
|
||||
jmp end;
|
||||
@@ -583,16 +583,16 @@ static void __declspec(naked) remove_trait() {
|
||||
jnz end;
|
||||
xor ebx, ebx;
|
||||
dec ebx;
|
||||
mov ecx, ds:[VarPtr::pc_trait + 4];
|
||||
cmp eax, ds:[VarPtr::pc_trait];
|
||||
mov ecx, ds:[VARPTR_pc_trait + 4];
|
||||
cmp eax, ds:[VARPTR_pc_trait];
|
||||
jne next;
|
||||
mov ds:[VarPtr::pc_trait], ecx;
|
||||
mov ds:[VarPtr::pc_trait + 4], ebx;
|
||||
mov ds:[VARPTR_pc_trait], ecx;
|
||||
mov ds:[VARPTR_pc_trait + 4], ebx;
|
||||
jmp end;
|
||||
next:
|
||||
cmp eax, ds:[VarPtr::pc_trait + 4];
|
||||
cmp eax, ds:[VARPTR_pc_trait + 4];
|
||||
jne end;
|
||||
mov ds:[VarPtr::pc_trait + 4], ebx;
|
||||
mov ds:[VARPTR_pc_trait + 4], ebx;
|
||||
end:
|
||||
popad;
|
||||
retn;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user