mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7520c71cf | ||
|
|
45632d6887 | ||
|
|
866c9165c0 | ||
|
|
813abbf452 | ||
|
|
c6864e01f6 | ||
|
|
0eab48932a | ||
|
|
6c3efc5b84 | ||
|
|
cb8d7dc94a |
+2
-2
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v3.8.6
|
||||
;v3.8.7
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -72,7 +72,7 @@ Use32BitHeadGraphics=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through your inventory
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
||||
UseScrollWheel=1
|
||||
|
||||
;The mouse Z position is divided by this modifier to calculate the number of inventory
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
Requires sfall 3.7b or higher
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start;
|
||||
procedure map_enter_p_proc;
|
||||
procedure set_door_flag(variable state);
|
||||
procedure combatturn_handler;
|
||||
|
||||
#define PORTAL (0)
|
||||
#define DOOR_FLAGS (0x24)
|
||||
|
||||
variable only_once := 0;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major >= 4) then
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
else
|
||||
set_global_script_repeat(60);
|
||||
call map_enter_p_proc;
|
||||
end else begin
|
||||
if (only_once == 1 and combat_is_initialized) then begin
|
||||
only_once := 2;
|
||||
call set_door_flag(false);
|
||||
end else if (only_once == 2 and not(combat_is_initialized)) then begin
|
||||
only_once := 1;
|
||||
if (sfall_ver_major >= 4) then
|
||||
set_global_script_repeat(0);
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure map_enter_p_proc begin
|
||||
only_once := 1;
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
|
||||
procedure set_door_flag(variable state) begin
|
||||
variable objectMap, obj, objPid, arrayPid, i;
|
||||
|
||||
objectMap := list_as_array(LIST_SCENERY);
|
||||
arrayPid := temp_array(1, 0);
|
||||
|
||||
foreach (obj in objectMap) begin
|
||||
objPid := obj_pid(obj);
|
||||
|
||||
if (proto_data(objPid, sc_type) != PORTAL) or is_in_array(objPid, arrayPid) then
|
||||
continue;
|
||||
|
||||
arrayPid[i] := objPid;
|
||||
i++;
|
||||
resize_array(arrayPid, i + 1);
|
||||
set_proto_data(objPid, DOOR_FLAGS, state);
|
||||
end
|
||||
end
|
||||
|
||||
procedure combatturn_handler begin
|
||||
if (only_once == 1) then
|
||||
set_global_script_repeat(60);
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
|
||||
Requires sfall 3.7b or higher.
|
||||
|
||||
To use, copy gl_autodoors.int to your scripts folder.
|
||||
@@ -89,6 +89,7 @@
|
||||
#define PROTO_WP_ANIM (36)
|
||||
#define PROTO_WP_DMG_MIN (40)
|
||||
#define PROTO_WP_DMG_MAX (44)
|
||||
#define PROTO_WP_DMG_TYPE (48)
|
||||
#define PROTO_WP_RANGE_1 (52)
|
||||
#define PROTO_WP_RANGE_2 (56)
|
||||
#define PROTO_WP_PROJ_PID (60)
|
||||
|
||||
@@ -309,7 +309,7 @@ Runs when retriving the damage rating of the players used weapon. (Which may be
|
||||
|
||||
int arg1 - The default min damage
|
||||
int arg2 - The default max damage
|
||||
Item arg3 - The weapin used. (0 if unarmed)
|
||||
Item arg3 - The weapon used. (0 if unarmed)
|
||||
Critter arg4 - The critter doing the attacking
|
||||
int arg5 - The type of attack
|
||||
int arg6 - non zero if this is an attack using a melee weapon
|
||||
|
||||
@@ -299,8 +299,8 @@ Some utility/math functions are available:
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise
|
||||
- this is an internal engine variable wich is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
- returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise
|
||||
- this calls an internal engine function which is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
|
||||
> int tile_light(int elevation, int tileNum)
|
||||
- returns light intensity at the given tile in range from 0 to 65535
|
||||
|
||||
@@ -319,6 +319,7 @@
|
||||
|
||||
0x8248 - object get_last_target(object critter)
|
||||
0x8249 - object get_last_attacker(object critter)
|
||||
0x824a - void block_combat(int enable)
|
||||
|
||||
0x824b - int tile_under_cursor
|
||||
0x824c - int gdialog_get_barter_mod
|
||||
|
||||
@@ -378,6 +378,7 @@ const DWORD inven_right_hand_ = 0x471B70;
|
||||
const DWORD inven_unwield_ = 0x472A54;
|
||||
const DWORD inven_wield_ = 0x472758;
|
||||
const DWORD inven_worn_ = 0x471C08;
|
||||
const DWORD is_pc_sneak_working_ = 0x42E3F4;
|
||||
const DWORD is_within_perception_ = 0x42BA04;
|
||||
const DWORD isPartyMember_ = 0x494FC4;
|
||||
const DWORD item_add_force_ = 0x4772B8;
|
||||
|
||||
@@ -551,6 +551,7 @@ extern const DWORD inven_right_hand_;
|
||||
extern const DWORD inven_unwield_;
|
||||
extern const DWORD inven_wield_;
|
||||
extern const DWORD inven_worn_;
|
||||
extern const DWORD is_pc_sneak_working_;
|
||||
extern const DWORD is_within_perception_;
|
||||
extern const DWORD isPartyMember_; // (<eax> - object) - bool result
|
||||
extern const DWORD item_add_force_;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Define.h"
|
||||
#include "FalloutEngine.h"
|
||||
#include "HookScripts.h"
|
||||
#include "input.h"
|
||||
#include "Inventory.h"
|
||||
#include "LoadGameHook.h"
|
||||
|
||||
@@ -633,6 +634,126 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) loot_container_hack2() {
|
||||
__asm {
|
||||
cmp esi, 0x150 // source_down
|
||||
je scroll
|
||||
cmp esi, 0x148 // source_up
|
||||
jne end
|
||||
scroll:
|
||||
push edx
|
||||
push ecx
|
||||
push ebx
|
||||
mov eax, ds:[_i_wid]
|
||||
call GNW_find_
|
||||
mov ebx, [eax+0x8+0x0] // ebx = _i_wid.rect.x
|
||||
mov ecx, [eax+0x8+0x4] // ecx = _i_wid.rect.y
|
||||
mov eax, 297
|
||||
add eax, ebx // x_start
|
||||
add ebx, 297+64 // x_end
|
||||
mov edx, 37
|
||||
add edx, ecx // y_start
|
||||
add ecx, 37+6*48 // y_end
|
||||
call mouse_click_in_
|
||||
pop ebx
|
||||
pop ecx
|
||||
pop edx
|
||||
test eax, eax
|
||||
jz end
|
||||
cmp esi, 0x150 // source_down
|
||||
je targetDown
|
||||
mov esi, 0x18D // target_up
|
||||
jmp end
|
||||
targetDown:
|
||||
mov esi, 0x191 // target_down
|
||||
end:
|
||||
mov eax, ds:[_curr_stack]
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) barter_inventory_hack2() {
|
||||
__asm {
|
||||
push edx
|
||||
push ecx
|
||||
push ebx
|
||||
xchg esi, eax
|
||||
cmp esi, 0x150 // source_down
|
||||
je scroll
|
||||
cmp esi, 0x148 // source_up
|
||||
jne end
|
||||
scroll:
|
||||
mov eax, ds:[_i_wid]
|
||||
call GNW_find_
|
||||
mov ebx, [eax+0x8+0x0] // ebx = _i_wid.rect.x
|
||||
mov ecx, [eax+0x8+0x4] // ecx = _i_wid.rect.y
|
||||
push ebx
|
||||
push ecx
|
||||
mov eax, 395
|
||||
add eax, ebx // x_start
|
||||
add ebx, 395+64 // x_end
|
||||
mov edx, 35
|
||||
add edx, ecx // y_start
|
||||
add ecx, 35+3*48 // y_end
|
||||
call mouse_click_in_
|
||||
pop ecx
|
||||
pop ebx
|
||||
test eax, eax
|
||||
jz notTargetScroll
|
||||
cmp esi, 0x150 // source_down
|
||||
je targetDown
|
||||
mov esi, 0x18D // target_up
|
||||
jmp end
|
||||
targetDown:
|
||||
mov esi, 0x191 // target_down
|
||||
jmp end
|
||||
notTargetScroll:
|
||||
push ebx
|
||||
push ecx
|
||||
mov eax, 250
|
||||
add eax, ebx // x_start
|
||||
add ebx, 250+64 // x_end
|
||||
mov edx, 20
|
||||
add edx, ecx // y_start
|
||||
add ecx, 20+3*48 // y_end
|
||||
call mouse_click_in_
|
||||
pop ecx
|
||||
pop ebx
|
||||
test eax, eax
|
||||
jz notTargetBarter
|
||||
cmp esi, 0x150 // source_down
|
||||
je barterTargetDown
|
||||
mov esi, 0x184 // target_barter_up
|
||||
jmp end
|
||||
barterTargetDown:
|
||||
mov esi, 0x176 // target_barter_down
|
||||
jmp end
|
||||
notTargetBarter:
|
||||
mov eax, 165
|
||||
add eax, ebx // x_start
|
||||
add ebx, 165+64 // x_end
|
||||
mov edx, 20
|
||||
add edx, ecx // y_start
|
||||
add ecx, 20+3*48 // y_end
|
||||
call mouse_click_in_
|
||||
test eax, eax
|
||||
jz end
|
||||
cmp esi, 0x150 // source_down
|
||||
je barterSourceDown
|
||||
mov esi, 0x149 // source_barter_up
|
||||
jmp end
|
||||
barterSourceDown:
|
||||
mov esi, 0x151 // source_barter_down
|
||||
end:
|
||||
pop ebx
|
||||
pop ecx
|
||||
pop edx
|
||||
mov eax, esi
|
||||
cmp eax, 0x11
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InventoryInit() {
|
||||
mode=GetPrivateProfileInt("Misc", "CritterInvSizeLimitMode", 0, ini);
|
||||
@@ -701,6 +822,13 @@ void InventoryInit() {
|
||||
|
||||
// Move items to player's main inventory instead of the opened bag/backpack when confirming a trade
|
||||
SafeWrite32(0x475CF2, _stack);
|
||||
|
||||
// Enable mouse scroll control in barter and loot screens when the cursor is hovering over other lists
|
||||
if (UseScrollWheel) {
|
||||
MakeCall(0x473E66, loot_container_hack2);
|
||||
MakeCall(0x4759F1, barter_inventory_hack2);
|
||||
*((DWORD*)_max) = 100;
|
||||
};
|
||||
}
|
||||
void InventoryReset() {
|
||||
invenapcost=GetPrivateProfileInt("Misc", "InventoryApCost", 4, ini);
|
||||
|
||||
+28
-28
@@ -64,53 +64,53 @@ func:
|
||||
}
|
||||
|
||||
void KillCounterInit(bool use) {
|
||||
if(!use) {
|
||||
usingExtraKillTypes=0;
|
||||
if (!use) {
|
||||
usingExtraKillTypes = 0;
|
||||
return;
|
||||
}
|
||||
usingExtraKillTypes=1;
|
||||
usingExtraKillTypes = 1;
|
||||
|
||||
//Overwrite the function that reads the kill counter with my own
|
||||
SafeWrite32(0x004344C0, ((DWORD)&ReadKillCounter) - 0x004344C4);
|
||||
SafeWrite32(0x0043A163, ((DWORD)&ReadKillCounter) - 0x0043A167);
|
||||
SafeWrite32(0x004571D9, ((DWORD)&ReadKillCounter) - 0x004571DD);
|
||||
HookCall(0x4344BF, &ReadKillCounter);
|
||||
HookCall(0x43A162, &ReadKillCounter);
|
||||
HookCall(0x4571D8, &ReadKillCounter);
|
||||
|
||||
//Overwrite the function that increments the kill counter with my own
|
||||
SafeWrite32(0x00425145, ((DWORD)&IncKillCounter) - 0x00425149);
|
||||
HookCall(0x425144, &IncKillCounter);
|
||||
|
||||
//Edit the GetKillTypeName function to accept kill types over 0x13
|
||||
SafeWrite8(0x0042D980, 38);
|
||||
SafeWrite8(0x0042D990, 38);
|
||||
SafeWrite8(0x42D980, 38);
|
||||
SafeWrite8(0x42D990, 38);
|
||||
|
||||
//And the same for GetKillTypeDesc
|
||||
SafeWrite8(0x0042D9C0, 38);
|
||||
SafeWrite8(0x0042D9D0, 38);
|
||||
SafeWrite32(0x0042D9DD, 1488);
|
||||
SafeWrite8(0x42D9C0, 38);
|
||||
SafeWrite8(0x42D9D0, 38);
|
||||
SafeWrite32(0x42D9DD, 1488);
|
||||
|
||||
//Change char sheet to loop through the extra kill types
|
||||
SafeWrite8(0x004344E4, 38);
|
||||
SafeWrite8(0x4344E4, 38);
|
||||
|
||||
//Where fallout clears the counters
|
||||
/*SafeWrite32(0x0042CF5E, sizeof(KillCounters));
|
||||
SafeWrite32(0x0042CFEC, sizeof(KillCounters));
|
||||
SafeWrite32(0x0042D863, sizeof(KillCounters));
|
||||
SafeWrite32(0x0042CF63, (DWORD)KillCounters);
|
||||
SafeWrite32(0x0042CFF1, (DWORD)KillCounters);
|
||||
SafeWrite32(0x0042D868, (DWORD)KillCounters);
|
||||
/*SafeWrite32(0x42CF5E, sizeof(KillCounters));
|
||||
SafeWrite32(0x42CFEC, sizeof(KillCounters));
|
||||
SafeWrite32(0x42D863, sizeof(KillCounters));
|
||||
SafeWrite32(0x42CF63, (DWORD)KillCounters);
|
||||
SafeWrite32(0x42CFF1, (DWORD)KillCounters);
|
||||
SafeWrite32(0x42D868, (DWORD)KillCounters);
|
||||
|
||||
//Where fallout increments the kill counter
|
||||
SafeWrite8(0x0042D881, COUNTERS);
|
||||
SafeWrite32(0x0042D895, (DWORD)KillCounters);
|
||||
SafeWrite32(0x0042D89E, (DWORD)KillCounters);
|
||||
SafeWrite8(0x42D881, COUNTERS);
|
||||
SafeWrite32(0x42D895, (DWORD)KillCounters);
|
||||
SafeWrite32(0x42D89E, (DWORD)KillCounters);
|
||||
|
||||
//A function that reads the kill counter
|
||||
SafeWrite8(0x0042D8AF, COUNTERS);
|
||||
SafeWrite32(0x0042D8B8, (DWORD)KillCounters);
|
||||
SafeWrite8(0x42D8AF, COUNTERS);
|
||||
SafeWrite32(0x42D8B8, (DWORD)KillCounters);
|
||||
|
||||
//Not sure what these two do. Possibly related to loading the names/descriptions?
|
||||
SafeWrite32(0x0042D8C6, COUNTERS); //This one causes a crash on load?
|
||||
SafeWrite32(0x0042D8CB, (DWORD)KillCounters);
|
||||
SafeWrite32(0x42D8C6, COUNTERS); //This one causes a crash on load?
|
||||
SafeWrite32(0x42D8CB, (DWORD)KillCounters);
|
||||
|
||||
SafeWrite32(0x0042D8F6, COUNTERS);
|
||||
SafeWrite32(0x0042D8FB, (DWORD)KillCounters);*/
|
||||
SafeWrite32(0x42D8F6, COUNTERS);
|
||||
SafeWrite32(0x42D8FB, (DWORD)KillCounters);*/
|
||||
}
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ static DWORD _stdcall CalcKnockback(int flags, int damage,DWORD target,DWORD att
|
||||
return (DWORD)floor(result);
|
||||
}
|
||||
|
||||
static const DWORD KnockbackRetAddr=0x00424B85;
|
||||
static const DWORD KnockbackRetAddr=0x424B85;
|
||||
static void __declspec(naked) KnockbackHook() {
|
||||
__asm {
|
||||
mov ecx, [esp+0x14];
|
||||
|
||||
@@ -170,6 +170,13 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) SetPCBaseStatEMP() {
|
||||
__asm {
|
||||
mov ds:[29*4 + 0x51C394], 100; // set_pc_base_stat(STAT_dmg_resist_emp, 100)
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
// should be called before savegame is loaded
|
||||
static void _stdcall LoadGame2_Before() {
|
||||
ResetState(1);
|
||||
@@ -196,6 +203,7 @@ static void _stdcall LoadGame2_Before() {
|
||||
}
|
||||
|
||||
static void _stdcall LoadGame2_After() {
|
||||
SetPCBaseStatEMP();
|
||||
LoadGlobalScripts();
|
||||
CritLoad();
|
||||
mapLoaded = true;
|
||||
@@ -246,6 +254,7 @@ static void NewGame2() {
|
||||
|
||||
dlogr("Starting new game", DL_MAIN);
|
||||
|
||||
SetPCBaseStatEMP();
|
||||
SetNewCharAppearanceGlobals();
|
||||
|
||||
LoadGlobalScripts();
|
||||
|
||||
+280
-263
File diff suppressed because it is too large
Load Diff
+13
-21
@@ -329,32 +329,24 @@ smpj6:
|
||||
|
||||
void QuestListInit() {
|
||||
//<comments removed because they couldn't display correctly in this encoding>
|
||||
SafeWrite8(0x004974DF, 0xE8);
|
||||
SafeWrite32(0x004974E0, ((DWORD)&newbuttonfct) - 0x004974E4);
|
||||
SafeWrite8(0x004974E4, 0xE9);
|
||||
SafeWrite32(0x004974e5, 0x0000005B);
|
||||
MakeCall(0x4974DF, newbuttonfct);
|
||||
SafeWrite8(0x4974E4, 0xE9);
|
||||
SafeWrite32(0x4974E5, 0x0000005B);
|
||||
//
|
||||
SafeWrite8(0x00497173, 0xE8);
|
||||
SafeWrite32(0x00497174, ((DWORD)&newactbpip) - 0x00497178);
|
||||
SafeWrite8(0x00497178, 0x90);
|
||||
MakeCall(0x497173, newactbpip);
|
||||
SafeWrite8(0x497178, 0x90);
|
||||
//
|
||||
SafeWrite8(0x004971B2, 0xE8);
|
||||
SafeWrite32(0x004971B3, ((DWORD)&newhookpress) - 0x004971B7);
|
||||
SafeWrite8(0x004971B7, 0x90);
|
||||
MakeCall(0x4971B2, newhookpress);
|
||||
SafeWrite8(0x4971B7, 0x90);
|
||||
//
|
||||
SafeWrite8(0x00497183, 0xE8);
|
||||
SafeWrite32(0x00497184, ((DWORD)&newhookpress1) - 0x00497188);
|
||||
SafeWrite8(0x00497188, 0x90);
|
||||
MakeCall(0x497183, newhookpress1);
|
||||
SafeWrite8(0x497188, 0x90);
|
||||
//
|
||||
SafeWrite8(0x00498186, 0xE8);
|
||||
SafeWrite32(0x00498187, ((DWORD)&newhooklooktext) - 0x0049818B);
|
||||
MakeCall(0x498186, newhooklooktext);
|
||||
//
|
||||
SafeWrite8(0x004982B0, 0xE8);
|
||||
SafeWrite32(0x004982B1, ((DWORD)&newhookresetvalue) - 0x004982B5);
|
||||
MakeCall(0x4982B0, newhookresetvalue);
|
||||
//
|
||||
SafeWrite8(0x004971D9, 0xE8);
|
||||
SafeWrite32(0x004971DA, ((DWORD)&nexthookfunct) - 0x004971DE);
|
||||
MakeCall(0x4971D9, nexthookfunct);
|
||||
//
|
||||
SafeWrite8(0x00497219, 0xE8);
|
||||
SafeWrite32(0x0049721A, ((DWORD)&backhookfunct) - 0x0049721E);
|
||||
MakeCall(0x497219, backhookfunct);
|
||||
}
|
||||
|
||||
+25
-25
@@ -469,7 +469,7 @@ static void __declspec(naked) SetGlobalScriptRepeat() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
push ecx;
|
||||
@@ -500,7 +500,7 @@ static void __declspec(naked) SetGlobalScriptType() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
push ecx;
|
||||
@@ -520,7 +520,7 @@ static void __declspec(naked) GetGlobalScriptTypes() {
|
||||
mov edx, AvailableGlobalScriptTypes;
|
||||
mov ecx, eax;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -561,11 +561,11 @@ static void __declspec(naked) SetGlobalVar() {
|
||||
mov edx, eax;
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jz next;
|
||||
cmp dx, 0xc001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push esi;
|
||||
push eax;
|
||||
@@ -612,11 +612,11 @@ static void __declspec(naked) GetGlobalVarInt() {
|
||||
mov esi, eax;
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
cmp si, 0x9001;
|
||||
cmp si, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp si, 0x9801;
|
||||
cmp si, VAR_TYPE_STR;
|
||||
jz next;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call GetGlobalVar2Int;
|
||||
@@ -633,7 +633,7 @@ next:
|
||||
end:
|
||||
mov eax, edi;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, edi;
|
||||
call interpretPushShort_;
|
||||
pop esi;
|
||||
@@ -657,11 +657,11 @@ static void __declspec(naked) GetGlobalVarFloat() {
|
||||
mov esi, eax;
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
cmp si, 0x9001;
|
||||
cmp si, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp si, 0x9801;
|
||||
cmp si, VAR_TYPE_STR;
|
||||
jz next;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call GetGlobalVar2Int;
|
||||
@@ -678,7 +678,7 @@ next:
|
||||
end:
|
||||
mov eax, edi;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xa001;
|
||||
mov edx, VAR_TYPE_FLOAT;
|
||||
mov eax, edi;
|
||||
call interpretPushShort_;
|
||||
pop esi;
|
||||
@@ -700,7 +700,7 @@ static void __declspec(naked) GetSfallArg() {
|
||||
mov eax, ecx;
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -723,7 +723,7 @@ static void __declspec(naked) GetSfallArgs() {
|
||||
mov eax, ecx;
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -743,9 +743,9 @@ static void __declspec(naked) SetSfallArg() {
|
||||
mov esi, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push edx;
|
||||
push eax;
|
||||
@@ -765,7 +765,7 @@ static void __declspec(naked) SetSfallReturn() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xc001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call SetHSReturn;
|
||||
@@ -784,7 +784,7 @@ static void __declspec(naked) InitHook() {
|
||||
mov edx, InitingHookScripts;
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -810,7 +810,7 @@ static void __declspec(naked) set_self() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
push ebp;
|
||||
@@ -828,7 +828,7 @@ static void __declspec(naked) register_hook() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push -1;
|
||||
push eax;
|
||||
@@ -1685,10 +1685,10 @@ void ClearGlobalScripts() {
|
||||
//Pyromaniac bonus
|
||||
SafeWrite8(0x424AB6, 5);
|
||||
//xp mod
|
||||
SafeWrite8(0x004AFAB8, 0x53);
|
||||
SafeWrite32(0x004AFAB9, 0x55575651);
|
||||
SafeWrite8(0x4AFAB8, 0x53);
|
||||
SafeWrite32(0x4AFAB9, 0x55575651);
|
||||
//Perk level mod
|
||||
SafeWrite32(0x00496880, 0x00019078);
|
||||
SafeWrite32(0x496880, 0x00019078);
|
||||
//HP bonus
|
||||
SafeWrite8(0x4AFBC1, 2);
|
||||
//Stat ranges
|
||||
|
||||
@@ -37,12 +37,12 @@ static void __declspec(naked) fs_create() {
|
||||
mov edx, eax;
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp bx, 0xc001;
|
||||
cmp bx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov ebx, eax;
|
||||
mov eax, edi;
|
||||
@@ -59,7 +59,7 @@ end:
|
||||
mov eax, edi;
|
||||
call interpretPushLong_;
|
||||
mov eax, edi;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -79,14 +79,14 @@ static void __declspec(naked) fs_copy() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0x9001;
|
||||
cmp di, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp di, 0x9801;
|
||||
cmp di, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp si, 0x9001;
|
||||
cmp si, VAR_TYPE_STR2;
|
||||
jz next2;
|
||||
cmp si, 0x9801;
|
||||
cmp si, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next2:
|
||||
mov ebx, eax;
|
||||
@@ -109,7 +109,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -123,9 +123,9 @@ static void __declspec(naked) fs_find() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0x9001;
|
||||
cmp di, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp di, 0x9801;
|
||||
cmp di, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
mov ebx, eax;
|
||||
@@ -143,7 +143,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -163,9 +163,9 @@ static void __declspec(naked) fs_write_byte() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push ecx;
|
||||
push eax;
|
||||
@@ -189,9 +189,9 @@ static void __declspec(naked) fs_write_short() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push ecx;
|
||||
push eax;
|
||||
@@ -215,11 +215,11 @@ static void __declspec(naked) fs_write_int() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jz next;
|
||||
cmp si, 0xa001;
|
||||
cmp si, VAR_TYPE_FLOAT;
|
||||
jnz end;
|
||||
next:
|
||||
push ecx;
|
||||
@@ -245,12 +245,12 @@ static void __declspec(naked) fs_write_string() {
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
mov ebp, eax;
|
||||
cmp bx, 0x9001;
|
||||
cmp bx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp bx, 0x9801;
|
||||
cmp bx, VAR_TYPE_STR;
|
||||
jnz end;
|
||||
next:
|
||||
cmp dx, 0xc001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
mov edx, ebx;
|
||||
mov ebx, esi;
|
||||
@@ -279,12 +279,12 @@ static void __declspec(naked) fs_write_bstring() {
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
mov ebp, eax;
|
||||
cmp bx, 0x9001;
|
||||
cmp bx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp bx, 0x9801;
|
||||
cmp bx, VAR_TYPE_STR;
|
||||
jnz end;
|
||||
next:
|
||||
cmp dx, 0xc001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
mov edx, ebx;
|
||||
mov ebx, esi;
|
||||
@@ -306,7 +306,7 @@ static void __declspec(naked) fs_read_byte() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSread_byte;
|
||||
@@ -319,7 +319,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -333,7 +333,7 @@ static void __declspec(naked) fs_read_short() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSread_short;
|
||||
@@ -346,7 +346,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -360,7 +360,7 @@ static void __declspec(naked) fs_read_int() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSread_int;
|
||||
@@ -373,7 +373,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -387,7 +387,7 @@ static void __declspec(naked) fs_read_float() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSread_int;
|
||||
@@ -400,7 +400,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xa001;
|
||||
mov edx, VAR_TYPE_FLOAT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -414,7 +414,7 @@ static void __declspec(naked) fs_delete() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end
|
||||
push eax;
|
||||
call FSdelete;
|
||||
@@ -431,7 +431,7 @@ static void __declspec(naked) fs_size() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSsize;
|
||||
@@ -444,7 +444,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -458,7 +458,7 @@ static void __declspec(naked) fs_pos() {
|
||||
mov edi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call FSpos;
|
||||
@@ -471,7 +471,7 @@ end:
|
||||
mov eax, ebp;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebp;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
popad;
|
||||
retn;
|
||||
@@ -491,9 +491,9 @@ static void __declspec(naked) fs_seek() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push ecx;
|
||||
push eax;
|
||||
@@ -517,9 +517,9 @@ static void __declspec(naked) fs_resize() {
|
||||
mov esi, eax;
|
||||
mov eax, ebp;
|
||||
call interpretPopLong_;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push ecx;
|
||||
push eax;
|
||||
|
||||
@@ -37,7 +37,7 @@ static void __declspec(naked) GraphicsFuncsAvailable() {
|
||||
inc edx;
|
||||
end:
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -57,9 +57,9 @@ static void __declspec(naked) funcLoadShader() {
|
||||
mov edx, eax;
|
||||
mov eax, edi;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz error;
|
||||
next:
|
||||
mov ebx, eax;
|
||||
@@ -74,7 +74,7 @@ error:
|
||||
result:
|
||||
mov eax, edi;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xC001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, edi;
|
||||
call interpretPushShort_;
|
||||
pop edi;
|
||||
@@ -94,7 +94,7 @@ static void __declspec(naked) funcFreeShader() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call FreeShader;
|
||||
@@ -115,7 +115,7 @@ static void __declspec(naked) funcActivateShader() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call ActivateShader;
|
||||
@@ -136,7 +136,7 @@ static void __declspec(naked) funcDeactivateShader() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call DeactivateShader;
|
||||
@@ -167,10 +167,10 @@ static void __declspec(naked) funcGetShaderTexture() {
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
mov ebx, [esp];
|
||||
cmp bx, 0xC001;
|
||||
cmp bx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov ebx, [esp+4];
|
||||
cmp bx, 0xc001;
|
||||
cmp bx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
//set the new value
|
||||
push ecx;
|
||||
@@ -186,7 +186,7 @@ end:
|
||||
//Pass back the result
|
||||
mov eax, ecx;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
//Restore registers and return
|
||||
@@ -227,14 +227,14 @@ static void __declspec(naked) funcSetShaderInt() {
|
||||
call interpretPopLong_;
|
||||
mov [esp], eax;
|
||||
//Error check
|
||||
cmp di, 0xC001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov eax, ecx;
|
||||
mov ebx, ebp;
|
||||
@@ -283,14 +283,14 @@ static void __declspec(naked) funcSetShaderTexture() {
|
||||
call interpretPopLong_;
|
||||
mov [esp], eax;
|
||||
//Error check
|
||||
cmp di, 0xC001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov eax, ecx;
|
||||
mov ebx, ebp;
|
||||
@@ -339,19 +339,19 @@ static void __declspec(naked) funcSetShaderFloat() {
|
||||
call interpretPopLong_;
|
||||
mov [esp], eax;
|
||||
//Error check
|
||||
cmp di, 0xa001;
|
||||
cmp di, VAR_TYPE_FLOAT;
|
||||
jz paramWasFloat;
|
||||
cmp di, 0xc001;
|
||||
cmp di, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
fild [esp+8];
|
||||
fstp [esp+8];
|
||||
paramWasFloat:
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp si, 0xc001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov eax, ecx;
|
||||
mov ebx, ebp;
|
||||
@@ -392,20 +392,20 @@ argloopstart:
|
||||
//Error check
|
||||
mov ecx, 4;
|
||||
checkloopstart:
|
||||
cmp word ptr [esp+ecx*2+0x1a], 0xa001;
|
||||
cmp word ptr [esp+ecx*2+0x1a], VAR_TYPE_FLOAT;
|
||||
jz paramWasFloat;
|
||||
cmp word ptr [esp+ecx*2+0x1a], 0xc001;
|
||||
cmp word ptr [esp+ecx*2+0x1a], VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
fild [esp+ecx*4+0x4];
|
||||
fstp [esp+ecx*4+0x4];
|
||||
paramWasFloat:
|
||||
loop checkloopstart;
|
||||
cmp word ptr [esp+0x1a], 0x9001;
|
||||
cmp word ptr [esp+0x1a], VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp word ptr [esp+0x1a], 0x9801;
|
||||
cmp word ptr [esp+0x1a], VAR_TYPE_STR;
|
||||
jnz fail;
|
||||
next:
|
||||
cmp word ptr [esp+0x18], 0xc001;
|
||||
cmp word ptr [esp+0x18], VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
mov eax, ebp;
|
||||
mov ebx, [esp+4];
|
||||
@@ -437,7 +437,7 @@ static void __declspec(naked) funcGetShaderVersion() {
|
||||
mov edx, eax;
|
||||
mov eax, edi;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, edi;
|
||||
call interpretPushShort_;
|
||||
pop edi;
|
||||
@@ -464,9 +464,9 @@ static void __declspec(naked) funcSetShaderMode() {
|
||||
mov esi, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
cmp si, 0xC001;
|
||||
cmp si, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push eax;
|
||||
call SetShaderMode;
|
||||
@@ -491,7 +491,7 @@ static void __declspec(naked) funcForceGraphicsRefresh() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
push eax;
|
||||
call ForceGraphicsRefresh;
|
||||
|
||||
@@ -32,7 +32,7 @@ static void __declspec(naked) InputFuncsAvailable() {
|
||||
mov ecx, eax;
|
||||
mov edx, 1; //They're always available from 2.9 on
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -51,7 +51,7 @@ static void __declspec(naked) KeyPressed() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
push ecx;
|
||||
push eax;
|
||||
@@ -64,7 +64,7 @@ fail:
|
||||
end:
|
||||
mov eax, ecx;
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -83,7 +83,7 @@ static void __declspec(naked) funcTapKey() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
test eax, eax;
|
||||
jl end;
|
||||
@@ -109,7 +109,7 @@ static void __declspec(naked) get_mouse_x() {
|
||||
add edx, ds:[_mouse_hotx];
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -127,7 +127,7 @@ static void __declspec(naked) get_mouse_y() {
|
||||
add edx, ds:[_mouse_hoty];
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -144,7 +144,7 @@ static void __declspec(naked) get_mouse_buttons() {
|
||||
mov edx, ds:[_last_buttons];
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -161,7 +161,7 @@ static void __declspec(naked) get_window_under_mouse() {
|
||||
mov edx, ds:[_last_button_winID];
|
||||
call interpretPushLong_;
|
||||
mov eax, ecx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_
|
||||
pop edx;
|
||||
pop ecx;
|
||||
@@ -179,7 +179,7 @@ static void __declspec(naked) get_screen_width() {
|
||||
inc edx
|
||||
call interpretPushLong_
|
||||
pop eax
|
||||
mov edx, 0xc001
|
||||
mov edx, VAR_TYPE_INT
|
||||
call interpretPushShort_
|
||||
pop edx
|
||||
retn
|
||||
@@ -196,7 +196,7 @@ static void __declspec(naked) get_screen_height() {
|
||||
inc edx
|
||||
call interpretPushLong_
|
||||
pop eax
|
||||
mov edx, 0xc001
|
||||
mov edx, VAR_TYPE_INT
|
||||
call interpretPushShort_
|
||||
pop edx
|
||||
retn
|
||||
@@ -238,9 +238,9 @@ static void __declspec(naked) create_message_window() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0x9001;
|
||||
cmp dx, VAR_TYPE_STR2;
|
||||
jz next;
|
||||
cmp dx, 0x9801;
|
||||
cmp dx, VAR_TYPE_STR;
|
||||
jnz end;
|
||||
next:
|
||||
mov ebx, eax;
|
||||
@@ -276,7 +276,7 @@ static void __declspec(naked) GetViewportX() {
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[_wmWorldOffsetX];
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -293,7 +293,7 @@ static void __declspec(naked) GetViewportY() {
|
||||
mov ecx, eax;
|
||||
mov edx, ds:[_wmWorldOffsetY];
|
||||
call interpretPushLong_;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
mov eax, ecx;
|
||||
call interpretPushShort_;
|
||||
pop edx;
|
||||
@@ -312,7 +312,7 @@ static void __declspec(naked) SetViewportX() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
mov ds:[_wmWorldOffsetX], eax
|
||||
end:
|
||||
@@ -332,7 +332,7 @@ static void __declspec(naked) SetViewportY() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
mov ds:[_wmWorldOffsetY], eax
|
||||
end:
|
||||
@@ -351,7 +351,7 @@ static void __declspec(naked) ShowIfaceTag() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp eax, 3;
|
||||
je falloutfunc;
|
||||
@@ -376,7 +376,7 @@ static void __declspec(naked) HideIfaceTag() {
|
||||
mov edx, eax;
|
||||
mov eax, ecx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz end;
|
||||
cmp eax, 3;
|
||||
je falloutfunc;
|
||||
@@ -402,7 +402,7 @@ static void __declspec(naked) IsIfaceTagActive() {
|
||||
mov edx, eax;
|
||||
mov eax, ebx;
|
||||
call interpretPopLong_;
|
||||
cmp dx, 0xC001;
|
||||
cmp dx, VAR_TYPE_INT;
|
||||
jnz fail;
|
||||
cmp eax, 3;
|
||||
je falloutfunc;
|
||||
@@ -433,7 +433,7 @@ end:
|
||||
mov eax, ebx;
|
||||
call interpretPushLong_;
|
||||
mov eax, ebx;
|
||||
mov edx, 0xc001;
|
||||
mov edx, VAR_TYPE_INT;
|
||||
call interpretPushShort_;
|
||||
add esp, 4;
|
||||
popad;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user