mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Renamed all script opcode handlers with op_ prefix
Renamed all metarule functions with mf_ prefix.
This commit is contained in:
@@ -51,18 +51,18 @@ bool checkCombatMode() {
|
||||
return (regAnimCombatCheck & fo::var::combat_state) != 0;
|
||||
}
|
||||
|
||||
void sf_reg_anim_combat_check(OpcodeContext& ctx) {
|
||||
void op_reg_anim_combat_check(OpcodeContext& ctx) {
|
||||
RegAnimCombatCheck(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
void sf_reg_anim_destroy(OpcodeContext& ctx) {
|
||||
void op_reg_anim_destroy(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
fo::func::register_object_must_erase(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_animate_and_hide(OpcodeContext& ctx) {
|
||||
void op_reg_anim_animate_and_hide(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int animId = ctx.arg(1).rawValue(),
|
||||
@@ -72,7 +72,7 @@ void sf_reg_anim_animate_and_hide(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_light(OpcodeContext& ctx) {
|
||||
void op_reg_anim_light(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int radius = ctx.arg(1).rawValue(),
|
||||
@@ -87,7 +87,7 @@ void sf_reg_anim_light(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_change_fid(OpcodeContext& ctx) {
|
||||
void op_reg_anim_change_fid(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int fid = ctx.arg(1).rawValue(),
|
||||
@@ -97,7 +97,7 @@ void sf_reg_anim_change_fid(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_take_out(OpcodeContext& ctx) {
|
||||
void op_reg_anim_take_out(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int holdFrame = ctx.arg(1).rawValue(),
|
||||
@@ -107,7 +107,7 @@ void sf_reg_anim_take_out(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_turn_towards(OpcodeContext& ctx) {
|
||||
void op_reg_anim_turn_towards(OpcodeContext& ctx) {
|
||||
if (!checkCombatMode()) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int tile = ctx.arg(1).rawValue(),
|
||||
@@ -124,7 +124,7 @@ static void __declspec(naked) ExecuteCallback() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reg_anim_callback(OpcodeContext& ctx) {
|
||||
void op_reg_anim_callback(OpcodeContext& ctx) {
|
||||
fo::func::register_object_call(
|
||||
reinterpret_cast<long*>(ctx.program()),
|
||||
reinterpret_cast<long*>(ctx.arg(0).rawValue()), // callback procedure
|
||||
@@ -133,7 +133,7 @@ void sf_reg_anim_callback(OpcodeContext& ctx) {
|
||||
);
|
||||
}
|
||||
|
||||
void sf_explosions_metarule(OpcodeContext& ctx) {
|
||||
void op_explosions_metarule(OpcodeContext& ctx) {
|
||||
int mode = ctx.arg(0).rawValue(),
|
||||
result = ExplosionsMetaruleFunc(mode, ctx.arg(1).rawValue(), ctx.arg(2).rawValue());
|
||||
|
||||
@@ -143,7 +143,7 @@ void sf_explosions_metarule(OpcodeContext& ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_art_cache_flush(OpcodeContext& ctx) {
|
||||
void mf_art_cache_flush(OpcodeContext& ctx) {
|
||||
__asm call fo::funcoffs::art_flush_;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,18 +29,18 @@ void RegAnimCombatCheck(DWORD newValue);
|
||||
|
||||
class OpcodeContext;
|
||||
|
||||
void sf_reg_anim_combat_check(OpcodeContext&);
|
||||
void sf_reg_anim_destroy(OpcodeContext&);
|
||||
void sf_reg_anim_animate_and_hide(OpcodeContext&);
|
||||
void sf_reg_anim_light(OpcodeContext&);
|
||||
void sf_reg_anim_change_fid(OpcodeContext&);
|
||||
void sf_reg_anim_take_out(OpcodeContext&);
|
||||
void sf_reg_anim_turn_towards(OpcodeContext&);
|
||||
void sf_reg_anim_callback(OpcodeContext&);
|
||||
void op_reg_anim_combat_check(OpcodeContext&);
|
||||
void op_reg_anim_destroy(OpcodeContext&);
|
||||
void op_reg_anim_animate_and_hide(OpcodeContext&);
|
||||
void op_reg_anim_light(OpcodeContext&);
|
||||
void op_reg_anim_change_fid(OpcodeContext&);
|
||||
void op_reg_anim_take_out(OpcodeContext&);
|
||||
void op_reg_anim_turn_towards(OpcodeContext&);
|
||||
void op_reg_anim_callback(OpcodeContext&);
|
||||
|
||||
void sf_explosions_metarule(OpcodeContext&);
|
||||
void op_explosions_metarule(OpcodeContext&);
|
||||
|
||||
void sf_art_cache_flush(OpcodeContext&);
|
||||
void mf_art_cache_flush(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_create_array(OpcodeContext& ctx) {
|
||||
void op_create_array(OpcodeContext& ctx) {
|
||||
auto arrayId = CreateArray(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_set_array(OpcodeContext& ctx) {
|
||||
void op_set_array(OpcodeContext& ctx) {
|
||||
SetArray(
|
||||
ctx.arg(0).rawValue(),
|
||||
ctx.arg(1),
|
||||
@@ -47,7 +47,7 @@ void sf_set_array(OpcodeContext& ctx) {
|
||||
so it works as get_array if first argument is int and as substr(x, y, 1) if first argument is string
|
||||
example: vartext[5]
|
||||
*/
|
||||
void sf_get_array(OpcodeContext& ctx) {
|
||||
void op_get_array(OpcodeContext& ctx) {
|
||||
if (ctx.arg(0).isInt()) {
|
||||
ctx.setReturn(
|
||||
GetArray(ctx.arg(0).rawValue(), ctx.arg(1))
|
||||
@@ -70,54 +70,54 @@ void sf_get_array(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_free_array(OpcodeContext& ctx) {
|
||||
void op_free_array(OpcodeContext& ctx) {
|
||||
FreeArray(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
void sf_len_array(OpcodeContext& ctx) {
|
||||
void op_len_array(OpcodeContext& ctx) {
|
||||
ctx.setReturn(
|
||||
LenArray(ctx.arg(0).rawValue())
|
||||
);
|
||||
}
|
||||
|
||||
void sf_resize_array(OpcodeContext& ctx) {
|
||||
void op_resize_array(OpcodeContext& ctx) {
|
||||
if (ResizeArray(ctx.arg(0).rawValue(), ctx.arg(1).rawValue())) {
|
||||
ctx.printOpcodeError("%s() - array sorting error.", ctx.getOpcodeName());
|
||||
}
|
||||
}
|
||||
|
||||
void sf_temp_array(OpcodeContext& ctx) {
|
||||
void op_temp_array(OpcodeContext& ctx) {
|
||||
auto arrayId = TempArray(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_fix_array(OpcodeContext& ctx) {
|
||||
void op_fix_array(OpcodeContext& ctx) {
|
||||
FixArray(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
void sf_scan_array(OpcodeContext& ctx) {
|
||||
void op_scan_array(OpcodeContext& ctx) {
|
||||
ctx.setReturn(
|
||||
ScanArray(ctx.arg(0).rawValue(), ctx.arg(1))
|
||||
);
|
||||
}
|
||||
|
||||
void sf_save_array(OpcodeContext& ctx) {
|
||||
void op_save_array(OpcodeContext& ctx) {
|
||||
SaveArray(ctx.arg(0), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_load_array(OpcodeContext& ctx) {
|
||||
void op_load_array(OpcodeContext& ctx) {
|
||||
ctx.setReturn(
|
||||
LoadArray(ctx.arg(0))
|
||||
);
|
||||
}
|
||||
|
||||
void sf_get_array_key(OpcodeContext& ctx) {
|
||||
void op_get_array_key(OpcodeContext& ctx) {
|
||||
ctx.setReturn(
|
||||
GetArrayKey(ctx.arg(0).rawValue(), ctx.arg(1).rawValue())
|
||||
);
|
||||
}
|
||||
|
||||
void sf_stack_array(OpcodeContext& ctx) {
|
||||
void op_stack_array(OpcodeContext& ctx) {
|
||||
ctx.setReturn(
|
||||
StackArray(ctx.arg(0), ctx.arg(1))
|
||||
);
|
||||
@@ -203,7 +203,7 @@ static DWORD ListAsArray(DWORD type) {
|
||||
return id;
|
||||
}
|
||||
|
||||
void sf_list_as_array(OpcodeContext& ctx) {
|
||||
void op_list_as_array(OpcodeContext& ctx) {
|
||||
auto arrayId = ListAsArray(ctx.arg(0).rawValue());
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
@@ -216,7 +216,7 @@ static DWORD ListBegin(DWORD type) {
|
||||
return listID;
|
||||
}
|
||||
|
||||
void sf_list_begin(OpcodeContext& ctx) {
|
||||
void op_list_begin(OpcodeContext& ctx) {
|
||||
ctx.setReturn(ListBegin(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ static fo::GameObject* ListNext(sList* list) {
|
||||
return (!list || list->pos == list->len) ? 0 : list->obj[list->pos++];
|
||||
}
|
||||
|
||||
void sf_list_next(OpcodeContext& ctx) {
|
||||
void op_list_next(OpcodeContext& ctx) {
|
||||
fo::GameObject* obj = nullptr;
|
||||
auto id = ctx.arg(0).rawValue();
|
||||
if (id != 0) {
|
||||
@@ -252,7 +252,7 @@ static void ListEnd(DWORD id) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_list_end(OpcodeContext& ctx) {
|
||||
void op_list_end(OpcodeContext& ctx) {
|
||||
ListEnd(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,43 +23,43 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_create_array(OpcodeContext&);
|
||||
void op_create_array(OpcodeContext&);
|
||||
|
||||
void sf_set_array(OpcodeContext&);
|
||||
void op_set_array(OpcodeContext&);
|
||||
|
||||
/*
|
||||
used in place of [] operator when compiling in sslc
|
||||
so it works as get_array if first argument is int and as substr(x, y, 1) if first argument is string
|
||||
*/
|
||||
void sf_get_array(OpcodeContext&);
|
||||
void op_get_array(OpcodeContext&);
|
||||
|
||||
void sf_free_array(OpcodeContext&);
|
||||
void op_free_array(OpcodeContext&);
|
||||
|
||||
void sf_len_array(OpcodeContext&);
|
||||
void op_len_array(OpcodeContext&);
|
||||
|
||||
void sf_resize_array(OpcodeContext&);
|
||||
void op_resize_array(OpcodeContext&);
|
||||
|
||||
void sf_temp_array(OpcodeContext&);
|
||||
void op_temp_array(OpcodeContext&);
|
||||
|
||||
void sf_fix_array(OpcodeContext&);
|
||||
void op_fix_array(OpcodeContext&);
|
||||
|
||||
void sf_scan_array(OpcodeContext&);
|
||||
void op_scan_array(OpcodeContext&);
|
||||
|
||||
void sf_save_array(OpcodeContext&);
|
||||
void op_save_array(OpcodeContext&);
|
||||
|
||||
void sf_load_array(OpcodeContext&);
|
||||
void op_load_array(OpcodeContext&);
|
||||
|
||||
void sf_get_array_key(OpcodeContext&);
|
||||
void op_get_array_key(OpcodeContext&);
|
||||
|
||||
void sf_stack_array(OpcodeContext&);
|
||||
void op_stack_array(OpcodeContext&);
|
||||
|
||||
void sf_list_begin(OpcodeContext&);
|
||||
void op_list_begin(OpcodeContext&);
|
||||
|
||||
void sf_list_as_array(OpcodeContext&);
|
||||
void op_list_as_array(OpcodeContext&);
|
||||
|
||||
void sf_list_next(OpcodeContext&);
|
||||
void op_list_next(OpcodeContext&);
|
||||
|
||||
void sf_list_end(OpcodeContext&);
|
||||
void op_list_end(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_typeof(OpcodeContext& ctx) {
|
||||
void op_typeof(OpcodeContext& ctx) {
|
||||
ctx.setReturn(static_cast<int>(ctx.arg(0).type()));
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ void __declspec(naked) op_available_global_script_types() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_sfall_global(OpcodeContext& ctx) {
|
||||
void op_set_sfall_global(OpcodeContext& ctx) {
|
||||
if (ctx.arg(0).isString()) {
|
||||
if (SetGlobalVar(ctx.arg(0).strValue(), ctx.arg(1).rawValue())) {
|
||||
ctx.printOpcodeError("%s() - the name of the global variable must consist of 8 characters.", ctx.getOpcodeName());
|
||||
@@ -99,11 +99,11 @@ static void GetGlobalVar(OpcodeContext& ctx, DataType type) {
|
||||
ctx.setReturn(result, type);
|
||||
}
|
||||
|
||||
void sf_get_sfall_global_int(OpcodeContext& ctx) {
|
||||
void op_get_sfall_global_int(OpcodeContext& ctx) {
|
||||
GetGlobalVar(ctx, DataType::INT);
|
||||
}
|
||||
|
||||
void sf_get_sfall_global_float(OpcodeContext& ctx) {
|
||||
void op_get_sfall_global_float(OpcodeContext& ctx) {
|
||||
GetGlobalVar(ctx, DataType::FLOAT);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ void __declspec(naked) op_get_sfall_arg() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_sfall_arg_at(OpcodeContext& ctx) {
|
||||
void mf_get_sfall_arg_at(OpcodeContext& ctx) {
|
||||
long argVal = 0;
|
||||
long id = ctx.arg(0).rawValue();
|
||||
if (id >= static_cast<long>(HookScripts::GetHSArgCount()) || id < 0) {
|
||||
@@ -130,7 +130,7 @@ void sf_get_sfall_arg_at(OpcodeContext& ctx) {
|
||||
ctx.setReturn(argVal);
|
||||
}
|
||||
|
||||
void sf_get_sfall_args(OpcodeContext& ctx) {
|
||||
void op_get_sfall_args(OpcodeContext& ctx) {
|
||||
DWORD argCount = HookScripts::GetHSArgCount();
|
||||
DWORD id = TempArray(argCount, 0);
|
||||
DWORD* args = HookScripts::GetHSArgs();
|
||||
@@ -140,7 +140,7 @@ void sf_get_sfall_args(OpcodeContext& ctx) {
|
||||
ctx.setReturn(id);
|
||||
}
|
||||
|
||||
void sf_set_sfall_arg(OpcodeContext& ctx) {
|
||||
void op_set_sfall_arg(OpcodeContext& ctx) {
|
||||
HookScripts::SetHSArg(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ end:
|
||||
}
|
||||
|
||||
// used for both register_hook and register_hook_proc
|
||||
void sf_register_hook(OpcodeContext& ctx) {
|
||||
void op_register_hook(OpcodeContext& ctx) {
|
||||
bool specReg = false;
|
||||
int proc;
|
||||
switch (ctx.opcode()) {
|
||||
@@ -194,11 +194,11 @@ void sf_register_hook(OpcodeContext& ctx) {
|
||||
RegisterHook(ctx.program(), ctx.arg(0).rawValue(), proc, specReg);
|
||||
}
|
||||
|
||||
void sf_add_g_timer_event(OpcodeContext& ctx) {
|
||||
void mf_add_g_timer_event(OpcodeContext& ctx) {
|
||||
ScriptExtender::AddTimerEventScripts(ctx.program(), ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_remove_timer_event(OpcodeContext& ctx) {
|
||||
void mf_remove_timer_event(OpcodeContext& ctx) {
|
||||
if (ctx.numArgs() > 0) {
|
||||
ScriptExtender::RemoveTimerEventScripts(ctx.program(), ctx.arg(0).rawValue());
|
||||
} else {
|
||||
@@ -206,15 +206,15 @@ void sf_remove_timer_event(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_sfall_ver_major(OpcodeContext& ctx) {
|
||||
void op_sfall_ver_major(OpcodeContext& ctx) {
|
||||
ctx.setReturn(VERSION_MAJOR);
|
||||
}
|
||||
|
||||
void sf_sfall_ver_minor(OpcodeContext& ctx) {
|
||||
void op_sfall_ver_minor(OpcodeContext& ctx) {
|
||||
ctx.setReturn(VERSION_MINOR);
|
||||
}
|
||||
|
||||
void sf_sfall_ver_build(OpcodeContext& ctx) {
|
||||
void op_sfall_ver_build(OpcodeContext& ctx) {
|
||||
ctx.setReturn(VERSION_BUILD);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_typeof(OpcodeContext&);
|
||||
void op_typeof(OpcodeContext&);
|
||||
|
||||
void __declspec() op_set_global_script_repeat();
|
||||
|
||||
@@ -33,19 +33,19 @@ void __declspec() op_set_global_script_type();
|
||||
|
||||
void __declspec() op_available_global_script_types();
|
||||
|
||||
void sf_set_sfall_global(OpcodeContext&);
|
||||
void op_set_sfall_global(OpcodeContext&);
|
||||
|
||||
void sf_get_sfall_global_int(OpcodeContext&);
|
||||
void op_get_sfall_global_int(OpcodeContext&);
|
||||
|
||||
void sf_get_sfall_global_float(OpcodeContext&);
|
||||
void op_get_sfall_global_float(OpcodeContext&);
|
||||
|
||||
void __declspec() op_get_sfall_arg();
|
||||
|
||||
void sf_get_sfall_arg_at(OpcodeContext&);
|
||||
void mf_get_sfall_arg_at(OpcodeContext&);
|
||||
|
||||
void sf_get_sfall_args(OpcodeContext&);
|
||||
void op_get_sfall_args(OpcodeContext&);
|
||||
|
||||
void sf_set_sfall_arg(OpcodeContext&);
|
||||
void op_set_sfall_arg(OpcodeContext&);
|
||||
|
||||
void __declspec() op_set_sfall_return();
|
||||
|
||||
@@ -54,17 +54,17 @@ void __declspec() op_init_hook();
|
||||
void __declspec() op_set_self();
|
||||
|
||||
// used for both register_hook and register_hook_proc
|
||||
void sf_register_hook(OpcodeContext&);
|
||||
void op_register_hook(OpcodeContext&);
|
||||
|
||||
void sf_add_g_timer_event(OpcodeContext&);
|
||||
void mf_add_g_timer_event(OpcodeContext&);
|
||||
|
||||
void sf_remove_timer_event(OpcodeContext&);
|
||||
void mf_remove_timer_event(OpcodeContext&);
|
||||
|
||||
void sf_sfall_ver_major(OpcodeContext&);
|
||||
void op_sfall_ver_major(OpcodeContext&);
|
||||
|
||||
void sf_sfall_ver_minor(OpcodeContext&);
|
||||
void op_sfall_ver_minor(OpcodeContext&);
|
||||
|
||||
void sf_sfall_ver_build(OpcodeContext&);
|
||||
void op_sfall_ver_build(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,71 +28,71 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_fs_create(OpcodeContext& ctx) {
|
||||
void op_fs_create(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FScreate(ctx.arg(0).strValue(), ctx.arg(1).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_copy(OpcodeContext& ctx) {
|
||||
void op_fs_copy(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FScopy(ctx.arg(0).strValue(), ctx.arg(1).strValue()));
|
||||
}
|
||||
|
||||
void sf_fs_find(OpcodeContext& ctx) {
|
||||
void op_fs_find(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSfind(ctx.arg(0).strValue()));
|
||||
}
|
||||
|
||||
void sf_fs_write_byte(OpcodeContext& ctx) {
|
||||
void op_fs_write_byte(OpcodeContext& ctx) {
|
||||
FSwrite_byte(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_fs_write_short(OpcodeContext& ctx) {
|
||||
void op_fs_write_short(OpcodeContext& ctx) {
|
||||
FSwrite_short(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_fs_write_int(OpcodeContext& ctx) {
|
||||
void op_fs_write_int(OpcodeContext& ctx) {
|
||||
FSwrite_int(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_fs_write_string(OpcodeContext& ctx) {
|
||||
void op_fs_write_string(OpcodeContext& ctx) {
|
||||
FSwrite_string(ctx.arg(0).rawValue(), ctx.arg(1).strValue());
|
||||
}
|
||||
|
||||
void sf_fs_write_bstring(OpcodeContext& ctx) {
|
||||
void op_fs_write_bstring(OpcodeContext& ctx) {
|
||||
FSwrite_bstring(ctx.arg(0).rawValue(), ctx.arg(1).strValue());
|
||||
}
|
||||
|
||||
void sf_fs_read_byte(OpcodeContext& ctx) {
|
||||
void op_fs_read_byte(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSread_byte(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_read_short(OpcodeContext& ctx) {
|
||||
void op_fs_read_short(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSread_short(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_read_int(OpcodeContext& ctx) {
|
||||
void op_fs_read_int(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSread_int(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_read_float(OpcodeContext& ctx) {
|
||||
void op_fs_read_float(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSread_int(ctx.arg(0).rawValue()), DataType::FLOAT);
|
||||
}
|
||||
|
||||
void sf_fs_delete(OpcodeContext& ctx) {
|
||||
void op_fs_delete(OpcodeContext& ctx) {
|
||||
FSdelete(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
void sf_fs_size(OpcodeContext& ctx) {
|
||||
void op_fs_size(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSsize(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_pos(OpcodeContext& ctx) {
|
||||
void op_fs_pos(OpcodeContext& ctx) {
|
||||
ctx.setReturn(FSpos(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_fs_seek(OpcodeContext& ctx) {
|
||||
void op_fs_seek(OpcodeContext& ctx) {
|
||||
FSseek(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void sf_fs_resize(OpcodeContext& ctx) {
|
||||
void op_fs_resize(OpcodeContext& ctx) {
|
||||
FSresize(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
|
||||
@@ -27,39 +27,39 @@ namespace script
|
||||
|
||||
class OpcodeContext;
|
||||
|
||||
void sf_fs_create(OpcodeContext&);
|
||||
void op_fs_create(OpcodeContext&);
|
||||
|
||||
void sf_fs_copy(OpcodeContext&);
|
||||
void op_fs_copy(OpcodeContext&);
|
||||
|
||||
void sf_fs_find(OpcodeContext&);
|
||||
void op_fs_find(OpcodeContext&);
|
||||
|
||||
void sf_fs_write_byte(OpcodeContext&);
|
||||
void op_fs_write_byte(OpcodeContext&);
|
||||
|
||||
void sf_fs_write_short(OpcodeContext&);
|
||||
void op_fs_write_short(OpcodeContext&);
|
||||
|
||||
void sf_fs_write_int(OpcodeContext&);
|
||||
void op_fs_write_int(OpcodeContext&);
|
||||
|
||||
void sf_fs_write_string(OpcodeContext&);
|
||||
void op_fs_write_string(OpcodeContext&);
|
||||
|
||||
void sf_fs_write_bstring(OpcodeContext&);
|
||||
void op_fs_write_bstring(OpcodeContext&);
|
||||
|
||||
void sf_fs_read_byte(OpcodeContext&);
|
||||
void op_fs_read_byte(OpcodeContext&);
|
||||
|
||||
void sf_fs_read_short(OpcodeContext&);
|
||||
void op_fs_read_short(OpcodeContext&);
|
||||
|
||||
void sf_fs_read_int(OpcodeContext&);
|
||||
void op_fs_read_int(OpcodeContext&);
|
||||
|
||||
void sf_fs_read_float(OpcodeContext&);
|
||||
void op_fs_read_float(OpcodeContext&);
|
||||
|
||||
void sf_fs_delete(OpcodeContext&);
|
||||
void op_fs_delete(OpcodeContext&);
|
||||
|
||||
void sf_fs_size(OpcodeContext&);
|
||||
void op_fs_size(OpcodeContext&);
|
||||
|
||||
void sf_fs_pos(OpcodeContext&);
|
||||
void op_fs_pos(OpcodeContext&);
|
||||
|
||||
void sf_fs_seek(OpcodeContext&);
|
||||
void op_fs_seek(OpcodeContext&);
|
||||
|
||||
void sf_fs_resize(OpcodeContext&);
|
||||
void op_fs_resize(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ void __declspec(naked) op_input_funcs_available() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_key_pressed(OpcodeContext& ctx) {
|
||||
void op_key_pressed(OpcodeContext& ctx) {
|
||||
ctx.setReturn(KeyDown(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void __declspec(naked) op_get_mouse_y() {
|
||||
|
||||
enum { MOUSE_MIDDLE_BTN = 4 };
|
||||
|
||||
void sf_get_mouse_buttons(OpcodeContext& ctx) {
|
||||
void op_get_mouse_buttons(OpcodeContext& ctx) {
|
||||
DWORD button = fo::var::last_buttons;
|
||||
if (button == 0 && middleMouseDown) {
|
||||
button = MOUSE_MIDDLE_BTN;
|
||||
@@ -144,7 +144,7 @@ static void SplitToBuffer(const char* str, const char** str_ptr, long &lines) {
|
||||
ScriptExtender::gTextBuffer[i] = '\0';
|
||||
}
|
||||
|
||||
void sf_create_message_window(OpcodeContext &ctx) {
|
||||
void op_create_message_window(OpcodeContext &ctx) {
|
||||
static bool dialogShow = false;
|
||||
if (dialogShow) return;
|
||||
|
||||
@@ -160,7 +160,7 @@ void sf_create_message_window(OpcodeContext &ctx) {
|
||||
dialogShow = false;
|
||||
}
|
||||
|
||||
void sf_message_box(OpcodeContext &ctx) {
|
||||
void mf_message_box(OpcodeContext &ctx) {
|
||||
static int dialogShowCount = 0;
|
||||
|
||||
long lines = 0;
|
||||
@@ -219,13 +219,13 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_add_iface_tag(OpcodeContext &ctx) {
|
||||
void mf_add_iface_tag(OpcodeContext &ctx) {
|
||||
int result = BarBoxes::AddExtraBox();
|
||||
if (result == -1) ctx.printOpcodeError("%s() - cannot add new tag as the maximum limit of 126 tags has been reached.", ctx.getMetaruleName());
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_show_iface_tag(OpcodeContext &ctx) {
|
||||
void op_show_iface_tag(OpcodeContext &ctx) {
|
||||
int tag = ctx.arg(0).rawValue();
|
||||
if (tag == 3 || tag == 4) {
|
||||
__asm mov eax, tag;
|
||||
@@ -235,7 +235,7 @@ void sf_show_iface_tag(OpcodeContext &ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_hide_iface_tag(OpcodeContext &ctx) {
|
||||
void op_hide_iface_tag(OpcodeContext &ctx) {
|
||||
int tag = ctx.arg(0).rawValue();
|
||||
if (tag == 3 || tag == 4) {
|
||||
__asm mov eax, tag;
|
||||
@@ -245,7 +245,7 @@ void sf_hide_iface_tag(OpcodeContext &ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_is_iface_tag_active(OpcodeContext &ctx) {
|
||||
void op_is_iface_tag_active(OpcodeContext &ctx) {
|
||||
bool result = false;
|
||||
int tag = ctx.arg(0).rawValue();
|
||||
if (tag >= 0 && tag < 5) {
|
||||
@@ -271,42 +271,42 @@ void sf_is_iface_tag_active(OpcodeContext &ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_intface_redraw(OpcodeContext& ctx) {
|
||||
void mf_intface_redraw(OpcodeContext& ctx) {
|
||||
fo::func::intface_redraw();
|
||||
}
|
||||
|
||||
void sf_intface_show(OpcodeContext& ctx) {
|
||||
void mf_intface_show(OpcodeContext& ctx) {
|
||||
__asm call fo::funcoffs::intface_show_;
|
||||
}
|
||||
|
||||
void sf_intface_hide(OpcodeContext& ctx) {
|
||||
void mf_intface_hide(OpcodeContext& ctx) {
|
||||
__asm call fo::funcoffs::intface_hide_;
|
||||
}
|
||||
|
||||
void sf_intface_is_hidden(OpcodeContext& ctx) {
|
||||
void mf_intface_is_hidden(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::intface_is_hidden());
|
||||
}
|
||||
|
||||
void sf_tile_refresh_display(OpcodeContext& ctx) {
|
||||
void mf_tile_refresh_display(OpcodeContext& ctx) {
|
||||
fo::func::tile_refresh_display();
|
||||
}
|
||||
|
||||
void sf_get_cursor_mode(OpcodeContext& ctx) {
|
||||
void mf_get_cursor_mode(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::gmouse_3d_get_mode());
|
||||
}
|
||||
|
||||
void sf_set_cursor_mode(OpcodeContext& ctx) {
|
||||
void mf_set_cursor_mode(OpcodeContext& ctx) {
|
||||
fo::func::gmouse_3d_set_mode(ctx.arg(0).rawValue());
|
||||
}
|
||||
|
||||
void sf_display_stats(OpcodeContext& ctx) {
|
||||
void mf_display_stats(OpcodeContext& ctx) {
|
||||
// calling the function outside of inventory screen will crash the game
|
||||
if (GetLoopFlags() & INVENTORY) {
|
||||
fo::func::display_stats();
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_iface_tag_text(OpcodeContext& ctx) {
|
||||
void mf_set_iface_tag_text(OpcodeContext& ctx) {
|
||||
int boxTag = ctx.arg(0).rawValue();
|
||||
int maxBox = BarBoxes::MaxBox();
|
||||
|
||||
@@ -318,7 +318,7 @@ void sf_set_iface_tag_text(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_inventory_redraw(OpcodeContext& ctx) {
|
||||
void mf_inventory_redraw(OpcodeContext& ctx) {
|
||||
int mode;
|
||||
DWORD loopFlag = GetLoopFlags() & (INVENTORY | INTFACEUSE | INTFACELOOT | BARTER);
|
||||
switch (loopFlag) {
|
||||
@@ -349,7 +349,7 @@ void sf_inventory_redraw(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_dialog_message(OpcodeContext& ctx) {
|
||||
void mf_dialog_message(OpcodeContext& ctx) {
|
||||
DWORD loopFlag = GetLoopFlags();
|
||||
if ((loopFlag & DIALOGVIEW) == 0 && (loopFlag & DIALOG)) {
|
||||
const char* message = ctx.arg(0).strValue();
|
||||
@@ -357,7 +357,7 @@ void sf_dialog_message(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_create_win(OpcodeContext& ctx) {
|
||||
void mf_create_win(OpcodeContext& ctx) {
|
||||
int flags = (ctx.numArgs() > 5)
|
||||
? ctx.arg(5).rawValue()
|
||||
: fo::WinFlags::MoveOnTop;
|
||||
@@ -372,7 +372,7 @@ void sf_create_win(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_show_window(OpcodeContext& ctx) {
|
||||
void mf_show_window(OpcodeContext& ctx) {
|
||||
if (ctx.numArgs() > 0) {
|
||||
const char* name = ctx.arg(0).strValue();
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
@@ -387,7 +387,7 @@ void sf_show_window(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_hide_window(OpcodeContext& ctx) {
|
||||
void mf_hide_window(OpcodeContext& ctx) {
|
||||
if (ctx.numArgs() > 0) {
|
||||
const char* name = ctx.arg(0).strValue();
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
@@ -402,7 +402,7 @@ void sf_hide_window(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_window_flag(OpcodeContext& ctx) {
|
||||
void mf_set_window_flag(OpcodeContext& ctx) {
|
||||
long bitFlag = ctx.arg(1).rawValue();
|
||||
switch (bitFlag) {
|
||||
case fo::WinFlags::MoveOnTop:
|
||||
@@ -519,15 +519,15 @@ static long DrawImage(OpcodeContext& ctx, bool isScaled) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void sf_draw_image(OpcodeContext& ctx) {
|
||||
void mf_draw_image(OpcodeContext& ctx) {
|
||||
ctx.setReturn(DrawImage(ctx, false));
|
||||
}
|
||||
|
||||
void sf_draw_image_scaled(OpcodeContext& ctx) {
|
||||
void mf_draw_image_scaled(OpcodeContext& ctx) {
|
||||
ctx.setReturn(DrawImage(ctx, true));
|
||||
}
|
||||
|
||||
void sf_unwield_slot(OpcodeContext& ctx) {
|
||||
void mf_unwield_slot(OpcodeContext& ctx) {
|
||||
fo::InvenType slot = static_cast<fo::InvenType>(ctx.arg(1).rawValue());
|
||||
if (slot < fo::INVEN_TYPE_WORN || slot > fo::INVEN_TYPE_LEFT_HAND) {
|
||||
ctx.printOpcodeError("%s() - incorrect slot number.", ctx.getMetaruleName());
|
||||
@@ -589,7 +589,7 @@ void sf_unwield_slot(OpcodeContext& ctx) {
|
||||
if (update) fo::func::intface_update_items(0, -1, -1);
|
||||
}
|
||||
|
||||
void sf_get_window_attribute(OpcodeContext& ctx) {
|
||||
void mf_get_window_attribute(OpcodeContext& ctx) {
|
||||
fo::Window* win = fo::GetWindow(ctx.arg(0).rawValue());
|
||||
if (win == nullptr) {
|
||||
if (ctx.arg(1).rawValue() != 0) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class OpcodeContext;
|
||||
// input_functions
|
||||
void __declspec() op_input_funcs_available();
|
||||
|
||||
void sf_key_pressed(OpcodeContext& ctx);
|
||||
void op_key_pressed(OpcodeContext& ctx);
|
||||
|
||||
void __declspec() op_tap_key();
|
||||
|
||||
@@ -39,7 +39,7 @@ void __declspec() op_get_mouse_x();
|
||||
void __declspec() op_get_mouse_y();
|
||||
|
||||
//Return pressed mouse button (1=left, 2=right, 3=left+right, 4=middle)
|
||||
void sf_get_mouse_buttons(OpcodeContext&);
|
||||
void op_get_mouse_buttons(OpcodeContext&);
|
||||
|
||||
//Return the window number under the mous
|
||||
void __declspec() op_get_window_under_mouse();
|
||||
@@ -57,9 +57,9 @@ void __declspec() op_stop_game();
|
||||
void __declspec() op_resume_game();
|
||||
|
||||
//Create a message window with given string
|
||||
void sf_create_message_window(OpcodeContext&);
|
||||
void op_create_message_window(OpcodeContext&);
|
||||
|
||||
void sf_message_box(OpcodeContext&);
|
||||
void mf_message_box(OpcodeContext&);
|
||||
|
||||
void __declspec() op_get_viewport_x();
|
||||
|
||||
@@ -69,51 +69,51 @@ void __declspec() op_set_viewport_x();
|
||||
|
||||
void __declspec() op_set_viewport_y();
|
||||
|
||||
void sf_add_iface_tag(OpcodeContext&);
|
||||
void mf_add_iface_tag(OpcodeContext&);
|
||||
|
||||
void sf_show_iface_tag(OpcodeContext&);
|
||||
void op_show_iface_tag(OpcodeContext&);
|
||||
|
||||
void sf_hide_iface_tag(OpcodeContext&);
|
||||
void op_hide_iface_tag(OpcodeContext&);
|
||||
|
||||
void sf_is_iface_tag_active(OpcodeContext&);
|
||||
void op_is_iface_tag_active(OpcodeContext&);
|
||||
|
||||
void sf_intface_redraw(OpcodeContext&);
|
||||
void mf_intface_redraw(OpcodeContext&);
|
||||
|
||||
void sf_intface_show(OpcodeContext&);
|
||||
void mf_intface_show(OpcodeContext&);
|
||||
|
||||
void sf_intface_hide(OpcodeContext&);
|
||||
void mf_intface_hide(OpcodeContext&);
|
||||
|
||||
void sf_intface_is_hidden(OpcodeContext&);
|
||||
void mf_intface_is_hidden(OpcodeContext&);
|
||||
|
||||
void sf_tile_refresh_display(OpcodeContext&);
|
||||
void mf_tile_refresh_display(OpcodeContext&);
|
||||
|
||||
void sf_get_cursor_mode(OpcodeContext&);
|
||||
void mf_get_cursor_mode(OpcodeContext&);
|
||||
|
||||
void sf_set_cursor_mode(OpcodeContext&);
|
||||
void mf_set_cursor_mode(OpcodeContext&);
|
||||
|
||||
void sf_display_stats(OpcodeContext&);
|
||||
void mf_display_stats(OpcodeContext&);
|
||||
|
||||
void sf_set_iface_tag_text(OpcodeContext&);
|
||||
void mf_set_iface_tag_text(OpcodeContext&);
|
||||
|
||||
void sf_inventory_redraw(OpcodeContext&);
|
||||
void mf_inventory_redraw(OpcodeContext&);
|
||||
|
||||
void sf_dialog_message(OpcodeContext&);
|
||||
void mf_dialog_message(OpcodeContext&);
|
||||
|
||||
void sf_create_win(OpcodeContext&);
|
||||
void mf_create_win(OpcodeContext&);
|
||||
|
||||
void sf_show_window(OpcodeContext&);
|
||||
void mf_show_window(OpcodeContext&);
|
||||
|
||||
void sf_hide_window(OpcodeContext&);
|
||||
void mf_hide_window(OpcodeContext&);
|
||||
|
||||
void sf_set_window_flag(OpcodeContext&);
|
||||
void mf_set_window_flag(OpcodeContext&);
|
||||
|
||||
void sf_draw_image(OpcodeContext&);
|
||||
void mf_draw_image(OpcodeContext&);
|
||||
|
||||
void sf_draw_image_scaled(OpcodeContext&);
|
||||
void mf_draw_image_scaled(OpcodeContext&);
|
||||
|
||||
void sf_unwield_slot(OpcodeContext&);
|
||||
void mf_unwield_slot(OpcodeContext&);
|
||||
|
||||
void sf_get_window_attribute(OpcodeContext&);
|
||||
void mf_get_window_attribute(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_div(OpcodeContext& ctx) {
|
||||
void op_div(OpcodeContext& ctx) {
|
||||
if (ctx.arg(1).rawValue() == 0) {
|
||||
ctx.printOpcodeError("%s - division by zero.", ctx.getOpcodeName());
|
||||
return;
|
||||
@@ -39,11 +39,11 @@ void sf_div(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_sqrt(OpcodeContext& ctx) {
|
||||
void op_sqrt(OpcodeContext& ctx) {
|
||||
ctx.setReturn(sqrt(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_abs(OpcodeContext& ctx) {
|
||||
void op_abs(OpcodeContext& ctx) {
|
||||
if (ctx.arg(0).isInt()) {
|
||||
ctx.setReturn(abs(static_cast<int>(ctx.arg(0).rawValue())));
|
||||
} else {
|
||||
@@ -51,23 +51,23 @@ void sf_abs(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_sin(OpcodeContext& ctx) {
|
||||
void op_sin(OpcodeContext& ctx) {
|
||||
ctx.setReturn(sin(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_cos(OpcodeContext& ctx) {
|
||||
void op_cos(OpcodeContext& ctx) {
|
||||
ctx.setReturn(cos(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_tan(OpcodeContext& ctx) {
|
||||
void op_tan(OpcodeContext& ctx) {
|
||||
ctx.setReturn(tan(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_arctan(OpcodeContext& ctx) {
|
||||
void op_arctan(OpcodeContext& ctx) {
|
||||
ctx.setReturn(atan2(ctx.arg(0).asFloat(), ctx.arg(1).asFloat()));
|
||||
}
|
||||
|
||||
void sf_power(OpcodeContext& ctx) {
|
||||
void op_power(OpcodeContext& ctx) {
|
||||
const ScriptValue &base = ctx.arg(0),
|
||||
&power = ctx.arg(1);
|
||||
float result = 0.0;
|
||||
@@ -83,19 +83,19 @@ void sf_power(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_log(OpcodeContext& ctx) {
|
||||
void op_log(OpcodeContext& ctx) {
|
||||
ctx.setReturn(log(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_exponent(OpcodeContext& ctx) {
|
||||
void op_exponent(OpcodeContext& ctx) {
|
||||
ctx.setReturn(exp(ctx.arg(0).asFloat()));
|
||||
}
|
||||
|
||||
void sf_ceil(OpcodeContext& ctx) {
|
||||
void op_ceil(OpcodeContext& ctx) {
|
||||
ctx.setReturn(static_cast<int>(ceil(ctx.arg(0).asFloat())));
|
||||
}
|
||||
|
||||
void sf_round(OpcodeContext& ctx) {
|
||||
void op_round(OpcodeContext& ctx) {
|
||||
float arg = ctx.arg(0).asFloat();
|
||||
|
||||
int argI = static_cast<int>(arg);
|
||||
@@ -104,7 +104,7 @@ void sf_round(OpcodeContext& ctx) {
|
||||
ctx.setReturn(argI);
|
||||
}
|
||||
|
||||
void sf_floor2(OpcodeContext& ctx) {
|
||||
void mf_floor2(OpcodeContext& ctx) {
|
||||
ctx.setReturn(static_cast<int>(floor(ctx.arg(0).asFloat())));
|
||||
}
|
||||
|
||||
|
||||
@@ -25,31 +25,31 @@ namespace script
|
||||
|
||||
class OpcodeContext;
|
||||
|
||||
void sf_div(OpcodeContext&);
|
||||
void op_div(OpcodeContext&);
|
||||
|
||||
void sf_sqrt(OpcodeContext&);
|
||||
void op_sqrt(OpcodeContext&);
|
||||
|
||||
void sf_abs(OpcodeContext&);
|
||||
void op_abs(OpcodeContext&);
|
||||
|
||||
void sf_sin(OpcodeContext&);
|
||||
void op_sin(OpcodeContext&);
|
||||
|
||||
void sf_cos(OpcodeContext&);
|
||||
void op_cos(OpcodeContext&);
|
||||
|
||||
void sf_tan(OpcodeContext&);
|
||||
void op_tan(OpcodeContext&);
|
||||
|
||||
void sf_arctan(OpcodeContext&);
|
||||
void op_arctan(OpcodeContext&);
|
||||
|
||||
void sf_power(OpcodeContext&);
|
||||
void op_power(OpcodeContext&);
|
||||
|
||||
void sf_log(OpcodeContext&);
|
||||
void op_log(OpcodeContext&);
|
||||
|
||||
void sf_exponent(OpcodeContext&);
|
||||
void op_exponent(OpcodeContext&);
|
||||
|
||||
void sf_ceil(OpcodeContext&);
|
||||
void op_ceil(OpcodeContext&);
|
||||
|
||||
void sf_round(OpcodeContext&);
|
||||
void op_round(OpcodeContext&);
|
||||
|
||||
void sf_floor2(OpcodeContext&);
|
||||
void mf_floor2(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace script
|
||||
{
|
||||
|
||||
// Metarule is a universal opcode(s) for all kinds of new sfall scripting functions.
|
||||
// Prefix all function handlers with sf_ and add them to sfall_metarule_table.
|
||||
// Prefix all function handlers with mf_ and add them to sfall_metarule_table.
|
||||
// DO NOT add arguments and/or return values to function handlers!
|
||||
// Use ctx.arg(i), inside handler function to access arguments.
|
||||
// Use ctx.setReturn(x) to set return value.
|
||||
@@ -62,95 +62,95 @@ static MetaruleTableType metaruleTable;
|
||||
- arg1, arg2, ... - argument types for automatic validation
|
||||
*/
|
||||
static const SfallMetarule metarules[] = {
|
||||
{"add_extra_msg_file", sf_add_extra_msg_file, 1, 2, -1, {ARG_STRING, ARG_INT}},
|
||||
{"add_iface_tag", sf_add_iface_tag, 0, 0},
|
||||
{"add_g_timer_event", sf_add_g_timer_event, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"add_trait", sf_add_trait, 1, 1, -1, {ARG_INT}},
|
||||
{"art_cache_clear", sf_art_cache_flush, 0, 0},
|
||||
{"attack_is_aimed", sf_attack_is_aimed, 0, 0},
|
||||
{"car_gas_amount", sf_car_gas_amount, 0, 0},
|
||||
{"create_win", sf_create_win, 5, 6, -1, {ARG_STRING, ARG_INT, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"critter_inven_obj2", sf_critter_inven_obj2, 2, 2, 0, {ARG_OBJECT, ARG_INT}},
|
||||
{"dialog_message", sf_dialog_message, 1, 1, -1, {ARG_STRING}},
|
||||
{"dialog_obj", sf_get_dialog_object, 0, 0},
|
||||
{"display_stats", sf_display_stats, 0, 0}, // refresh
|
||||
{"draw_image", sf_draw_image, 1, 5, -1, {ARG_INTSTR, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"draw_image_scaled", sf_draw_image_scaled, 1, 6, -1, {ARG_INTSTR, ARG_INT, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"exec_map_update_scripts", sf_exec_map_update_scripts, 0, 0},
|
||||
{"floor2", sf_floor2, 1, 1, 0, {ARG_NUMBER}},
|
||||
{"get_can_rest_on_map", sf_get_rest_on_map, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"get_current_inven_size", sf_get_current_inven_size, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_cursor_mode", sf_get_cursor_mode, 0, 0},
|
||||
{"get_flags", sf_get_flags, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_ini_section", sf_get_ini_section, 2, 2, -1, {ARG_STRING, ARG_STRING}},
|
||||
{"get_ini_sections", sf_get_ini_sections, 1, 1, -1, {ARG_STRING}},
|
||||
{"get_inven_ap_cost", sf_get_inven_ap_cost, 0, 0},
|
||||
{"get_map_enter_position", sf_get_map_enter_position, 0, 0},
|
||||
{"get_metarule_table", sf_get_metarule_table, 0, 0},
|
||||
{"get_object_ai_data", sf_get_object_ai_data, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"get_object_data", sf_get_object_data, 2, 2, 0, {ARG_OBJECT, ARG_INT}},
|
||||
{"get_outline", sf_get_outline, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_sfall_arg_at", sf_get_sfall_arg_at, 1, 1, 0, {ARG_INT}},
|
||||
{"get_string_pointer", sf_get_string_pointer, 1, 1, 0, {ARG_STRING}},
|
||||
{"get_text_width", sf_get_text_width, 1, 1, 0, {ARG_STRING}},
|
||||
{"get_window_attribute", sf_get_window_attribute, 1, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"has_fake_perk_npc", sf_has_fake_perk_npc, 2, 2, 0, {ARG_OBJECT, ARG_STRING}},
|
||||
{"has_fake_trait_npc", sf_has_fake_trait_npc, 2, 2, 0, {ARG_OBJECT, ARG_STRING}},
|
||||
{"hide_window", sf_hide_window, 0, 1, -1, {ARG_STRING}},
|
||||
{"intface_hide", sf_intface_hide, 0, 0},
|
||||
{"intface_is_hidden", sf_intface_is_hidden, 0, 0},
|
||||
{"intface_redraw", sf_intface_redraw, 0, 0},
|
||||
{"intface_show", sf_intface_show, 0, 0},
|
||||
{"inventory_redraw", sf_inventory_redraw, 0, 1, -1, {ARG_INT}},
|
||||
{"item_make_explosive", sf_item_make_explosive, 3, 4, -1, {ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"item_weight", sf_item_weight, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"lock_is_jammed", sf_lock_is_jammed, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"loot_obj", sf_get_loot_object, 0, 0},
|
||||
{"message_box", sf_message_box, 1, 4, -1, {ARG_STRING, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"metarule_exist", sf_metarule_exist, 1, 1}, // no arg check
|
||||
{"npc_engine_level_up", sf_npc_engine_level_up, 1, 1},
|
||||
{"obj_under_cursor", sf_obj_under_cursor, 2, 2, 0, {ARG_INT, ARG_INT}},
|
||||
{"objects_in_radius", sf_objects_in_radius, 3, 4, 0, {ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"outlined_object", sf_outlined_object, 0, 0},
|
||||
{"real_dude_obj", sf_real_dude_obj, 0, 0},
|
||||
{"remove_timer_event", sf_remove_timer_event, 0, 1, -1, {ARG_INT}},
|
||||
{"set_can_rest_on_map", sf_set_rest_on_map, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_car_intface_art", sf_set_car_intface_art, 1, 1, -1, {ARG_INT}},
|
||||
{"set_cursor_mode", sf_set_cursor_mode, 1, 1, -1, {ARG_INT}},
|
||||
{"set_drugs_data", sf_set_drugs_data, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_dude_obj", sf_set_dude_obj, 1, 1, -1, {ARG_INT}},
|
||||
{"set_fake_perk_npc", sf_set_fake_perk_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_fake_trait_npc", sf_set_fake_trait_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_flags", sf_set_flags, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_iface_tag_text", sf_set_iface_tag_text, 3, 3, -1, {ARG_INT, ARG_STRING, ARG_INT}},
|
||||
{"set_ini_setting", sf_set_ini_setting, 2, 2, -1, {ARG_STRING, ARG_INTSTR}},
|
||||
{"set_map_enter_position", sf_set_map_enter_position, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_object_data", sf_set_object_data, 3, 3, -1, {ARG_OBJECT, ARG_INT, ARG_INT}},
|
||||
{"set_outline", sf_set_outline, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_rest_heal_time", sf_set_rest_heal_time, 1, 1, -1, {ARG_INT}},
|
||||
{"set_rest_mode", sf_set_rest_mode, 1, 1, -1, {ARG_INT}},
|
||||
{"set_selectable_perk_npc", sf_set_selectable_perk_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_terrain_name", sf_set_terrain_name, 3, 3, -1, {ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_town_title", sf_set_town_title, 2, 2, -1, {ARG_INT, ARG_STRING}},
|
||||
{"set_unique_id", sf_set_unique_id, 1, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_unjam_locks_time", sf_set_unjam_locks_time, 1, 1, -1, {ARG_INT}},
|
||||
{"set_window_flag", sf_set_window_flag, 3, 3, -1, {ARG_INTSTR, ARG_INT, ARG_INT}},
|
||||
{"show_window", sf_show_window, 0, 1, -1, {ARG_STRING}},
|
||||
{"spatial_radius", sf_spatial_radius, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"string_compare", sf_string_compare, 2, 3, 0, {ARG_STRING, ARG_STRING, ARG_INT}},
|
||||
{"string_format", sf_string_format, 2, 5, 0, {ARG_STRING, ARG_ANY, ARG_ANY, ARG_ANY, ARG_ANY}},
|
||||
{"string_to_case", sf_string_to_case, 2, 2, -1, {ARG_STRING, ARG_INT}},
|
||||
{"tile_by_position", sf_tile_by_position, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"tile_refresh_display", sf_tile_refresh_display, 0, 0},
|
||||
{"unjam_lock", sf_unjam_lock, 1, 1, -1, {ARG_OBJECT}},
|
||||
{"unwield_slot", sf_unwield_slot, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"add_extra_msg_file", mf_add_extra_msg_file, 1, 2, -1, {ARG_STRING, ARG_INT}},
|
||||
{"add_iface_tag", mf_add_iface_tag, 0, 0},
|
||||
{"add_g_timer_event", mf_add_g_timer_event, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"add_trait", mf_add_trait, 1, 1, -1, {ARG_INT}},
|
||||
{"art_cache_clear", mf_art_cache_flush, 0, 0},
|
||||
{"attack_is_aimed", mf_attack_is_aimed, 0, 0},
|
||||
{"car_gas_amount", mf_car_gas_amount, 0, 0},
|
||||
{"create_win", mf_create_win, 5, 6, -1, {ARG_STRING, ARG_INT, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"critter_inven_obj2", mf_critter_inven_obj2, 2, 2, 0, {ARG_OBJECT, ARG_INT}},
|
||||
{"dialog_message", mf_dialog_message, 1, 1, -1, {ARG_STRING}},
|
||||
{"dialog_obj", mf_get_dialog_object, 0, 0},
|
||||
{"display_stats", mf_display_stats, 0, 0}, // refresh
|
||||
{"draw_image", mf_draw_image, 1, 5, -1, {ARG_INTSTR, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"draw_image_scaled", mf_draw_image_scaled, 1, 6, -1, {ARG_INTSTR, ARG_INT, ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"exec_map_update_scripts", mf_exec_map_update_scripts, 0, 0},
|
||||
{"floor2", mf_floor2, 1, 1, 0, {ARG_NUMBER}},
|
||||
{"get_can_rest_on_map", mf_get_rest_on_map, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"get_current_inven_size", mf_get_current_inven_size, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_cursor_mode", mf_get_cursor_mode, 0, 0},
|
||||
{"get_flags", mf_get_flags, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_ini_section", mf_get_ini_section, 2, 2, -1, {ARG_STRING, ARG_STRING}},
|
||||
{"get_ini_sections", mf_get_ini_sections, 1, 1, -1, {ARG_STRING}},
|
||||
{"get_inven_ap_cost", mf_get_inven_ap_cost, 0, 0},
|
||||
{"get_map_enter_position", mf_get_map_enter_position, 0, 0},
|
||||
{"get_metarule_table", mf_get_metarule_table, 0, 0},
|
||||
{"get_object_ai_data", mf_get_object_ai_data, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"get_object_data", mf_get_object_data, 2, 2, 0, {ARG_OBJECT, ARG_INT}},
|
||||
{"get_outline", mf_get_outline, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"get_sfall_arg_at", mf_get_sfall_arg_at, 1, 1, 0, {ARG_INT}},
|
||||
{"get_string_pointer", mf_get_string_pointer, 1, 1, 0, {ARG_STRING}},
|
||||
{"get_text_width", mf_get_text_width, 1, 1, 0, {ARG_STRING}},
|
||||
{"get_window_attribute", mf_get_window_attribute, 1, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"has_fake_perk_npc", mf_has_fake_perk_npc, 2, 2, 0, {ARG_OBJECT, ARG_STRING}},
|
||||
{"has_fake_trait_npc", mf_has_fake_trait_npc, 2, 2, 0, {ARG_OBJECT, ARG_STRING}},
|
||||
{"hide_window", mf_hide_window, 0, 1, -1, {ARG_STRING}},
|
||||
{"intface_hide", mf_intface_hide, 0, 0},
|
||||
{"intface_is_hidden", mf_intface_is_hidden, 0, 0},
|
||||
{"intface_redraw", mf_intface_redraw, 0, 0},
|
||||
{"intface_show", mf_intface_show, 0, 0},
|
||||
{"inventory_redraw", mf_inventory_redraw, 0, 1, -1, {ARG_INT}},
|
||||
{"item_make_explosive", mf_item_make_explosive, 3, 4, -1, {ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"item_weight", mf_item_weight, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"lock_is_jammed", mf_lock_is_jammed, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"loot_obj", mf_get_loot_object, 0, 0},
|
||||
{"message_box", mf_message_box, 1, 4, -1, {ARG_STRING, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"metarule_exist", mf_metarule_exist, 1, 1}, // no arg check
|
||||
{"npc_engine_level_up", mf_npc_engine_level_up, 1, 1},
|
||||
{"obj_under_cursor", mf_obj_under_cursor, 2, 2, 0, {ARG_INT, ARG_INT}},
|
||||
{"objects_in_radius", mf_objects_in_radius, 3, 4, 0, {ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"outlined_object", mf_outlined_object, 0, 0},
|
||||
{"real_dude_obj", mf_real_dude_obj, 0, 0},
|
||||
{"remove_timer_event", mf_remove_timer_event, 0, 1, -1, {ARG_INT}},
|
||||
{"set_can_rest_on_map", mf_set_rest_on_map, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_car_intface_art", mf_set_car_intface_art, 1, 1, -1, {ARG_INT}},
|
||||
{"set_cursor_mode", mf_set_cursor_mode, 1, 1, -1, {ARG_INT}},
|
||||
{"set_drugs_data", mf_set_drugs_data, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_dude_obj", mf_set_dude_obj, 1, 1, -1, {ARG_INT}},
|
||||
{"set_fake_perk_npc", mf_set_fake_perk_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_fake_trait_npc", mf_set_fake_trait_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_flags", mf_set_flags, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_iface_tag_text", mf_set_iface_tag_text, 3, 3, -1, {ARG_INT, ARG_STRING, ARG_INT}},
|
||||
{"set_ini_setting", mf_set_ini_setting, 2, 2, -1, {ARG_STRING, ARG_INTSTR}},
|
||||
{"set_map_enter_position", mf_set_map_enter_position, 3, 3, -1, {ARG_INT, ARG_INT, ARG_INT}},
|
||||
{"set_object_data", mf_set_object_data, 3, 3, -1, {ARG_OBJECT, ARG_INT, ARG_INT}},
|
||||
{"set_outline", mf_set_outline, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_rest_heal_time", mf_set_rest_heal_time, 1, 1, -1, {ARG_INT}},
|
||||
{"set_rest_mode", mf_set_rest_mode, 1, 1, -1, {ARG_INT}},
|
||||
{"set_selectable_perk_npc", mf_set_selectable_perk_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_terrain_name", mf_set_terrain_name, 3, 3, -1, {ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_town_title", mf_set_town_title, 2, 2, -1, {ARG_INT, ARG_STRING}},
|
||||
{"set_unique_id", mf_set_unique_id, 1, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
{"set_unjam_locks_time", mf_set_unjam_locks_time, 1, 1, -1, {ARG_INT}},
|
||||
{"set_window_flag", mf_set_window_flag, 3, 3, -1, {ARG_INTSTR, ARG_INT, ARG_INT}},
|
||||
{"show_window", mf_show_window, 0, 1, -1, {ARG_STRING}},
|
||||
{"spatial_radius", mf_spatial_radius, 1, 1, 0, {ARG_OBJECT}},
|
||||
{"string_compare", mf_string_compare, 2, 3, 0, {ARG_STRING, ARG_STRING, ARG_INT}},
|
||||
{"string_format", mf_string_format, 2, 5, 0, {ARG_STRING, ARG_ANY, ARG_ANY, ARG_ANY, ARG_ANY}},
|
||||
{"string_to_case", mf_string_to_case, 2, 2, -1, {ARG_STRING, ARG_INT}},
|
||||
{"tile_by_position", mf_tile_by_position, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"tile_refresh_display", mf_tile_refresh_display, 0, 0},
|
||||
{"unjam_lock", mf_unjam_lock, 1, 1, -1, {ARG_OBJECT}},
|
||||
{"unwield_slot", mf_unwield_slot, 2, 2, -1, {ARG_OBJECT, ARG_INT}},
|
||||
#ifndef NDEBUG
|
||||
{"validate_test", sf_test, 2, 5, -1, {ARG_INT, ARG_NUMBER, ARG_STRING, ARG_OBJECT, ARG_ANY}},
|
||||
{"validate_test", mf_test, 2, 5, -1, {ARG_INT, ARG_NUMBER, ARG_STRING, ARG_OBJECT, ARG_ANY}},
|
||||
#endif
|
||||
};
|
||||
|
||||
// returns current contents of metarule table
|
||||
static void sf_get_metarule_table(OpcodeContext& ctx) {
|
||||
static void mf_get_metarule_table(OpcodeContext& ctx) {
|
||||
DWORD arrId = TempArray(metaruleTable.size(), 0);
|
||||
int i = 0;
|
||||
for (auto it = metaruleTable.begin(); it != metaruleTable.end(); ++it) {
|
||||
@@ -160,7 +160,7 @@ static void sf_get_metarule_table(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrId, DataType::INT);
|
||||
}
|
||||
|
||||
static void sf_metarule_exist(OpcodeContext& ctx) {
|
||||
static void mf_metarule_exist(OpcodeContext& ctx) {
|
||||
bool result = false;
|
||||
auto funcXName = ctx.arg(0).asString();
|
||||
if (funcXName[0] != '\0') {
|
||||
@@ -220,8 +220,8 @@ void HandleMetarule(OpcodeContext& ctx) {
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
static std::string sf_test_stringBuf;
|
||||
void sf_test(OpcodeContext& ctx) {
|
||||
static std::string mf_test_stringBuf;
|
||||
void mf_test(OpcodeContext& ctx) {
|
||||
std::ostringstream sstream;
|
||||
sstream << "sfall_funcX(\"test\"";
|
||||
for (int i = 0; i < ctx.numArgs(); i++) {
|
||||
@@ -244,8 +244,8 @@ void sf_test(OpcodeContext& ctx) {
|
||||
}
|
||||
sstream << ")";
|
||||
|
||||
sf_test_stringBuf = sstream.str();
|
||||
ctx.setReturn(sf_test_stringBuf.c_str());
|
||||
mf_test_stringBuf = sstream.str();
|
||||
ctx.setReturn(mf_test_stringBuf.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ namespace script
|
||||
|
||||
// Example handler. Feel free to add handlers in other files.
|
||||
#ifndef NDEBUG
|
||||
void sf_test(OpcodeContext&);
|
||||
void mf_test(OpcodeContext&);
|
||||
#endif
|
||||
|
||||
// returns current contents of metarule table
|
||||
void sf_get_metarule_table(OpcodeContext&);
|
||||
void mf_get_metarule_table(OpcodeContext&);
|
||||
|
||||
void sf_metarule_exist(OpcodeContext&);
|
||||
void mf_metarule_exist(OpcodeContext&);
|
||||
|
||||
void InitMetaruleTable();
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace script
|
||||
|
||||
const char* stringTooLong = "%s() - the string exceeds maximum length of 64 characters.";
|
||||
|
||||
void sf_set_dm_model(OpcodeContext& ctx) {
|
||||
void op_set_dm_model(OpcodeContext& ctx) {
|
||||
auto model = ctx.arg(0).strValue();
|
||||
if (strlen(model) > 64) {
|
||||
ctx.printOpcodeError(stringTooLong, ctx.getOpcodeName());
|
||||
@@ -59,7 +59,7 @@ void sf_set_dm_model(OpcodeContext& ctx) {
|
||||
strcpy(defaultMaleModelName, model);
|
||||
}
|
||||
|
||||
void sf_set_df_model(OpcodeContext& ctx) {
|
||||
void op_set_df_model(OpcodeContext& ctx) {
|
||||
auto model = ctx.arg(0).strValue();
|
||||
if (strlen(model) > 64) {
|
||||
ctx.printOpcodeError(stringTooLong, ctx.getOpcodeName());
|
||||
@@ -68,7 +68,7 @@ void sf_set_df_model(OpcodeContext& ctx) {
|
||||
strcpy(defaultFemaleModelName, model);
|
||||
}
|
||||
|
||||
void sf_set_movie_path(OpcodeContext& ctx) {
|
||||
void op_set_movie_path(OpcodeContext& ctx) {
|
||||
long movieID = ctx.arg(1).rawValue();
|
||||
if (movieID < 0 || movieID >= MaxMovies) return;
|
||||
auto fileName = ctx.arg(0).strValue();
|
||||
@@ -79,7 +79,7 @@ void sf_set_movie_path(OpcodeContext& ctx) {
|
||||
strcpy(&MoviePaths[movieID * 65], fileName);
|
||||
}
|
||||
|
||||
void sf_get_year(OpcodeContext& ctx) {
|
||||
void op_get_year(OpcodeContext& ctx) {
|
||||
int year = 0;
|
||||
__asm {
|
||||
xor eax, eax;
|
||||
@@ -168,7 +168,7 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_object_knockback(OpcodeContext& ctx) {
|
||||
void op_set_object_knockback(OpcodeContext& ctx) {
|
||||
int mode = 0;
|
||||
switch (ctx.opcode()) {
|
||||
case 0x196:
|
||||
@@ -193,7 +193,7 @@ void sf_set_object_knockback(OpcodeContext& ctx) {
|
||||
KnockbackSetMod(object, ctx.arg(1).rawValue(), ctx.arg(2).asFloat(), mode);
|
||||
}
|
||||
|
||||
void sf_remove_object_knockback(OpcodeContext& ctx) {
|
||||
void op_remove_object_knockback(OpcodeContext& ctx) {
|
||||
int mode = 0;
|
||||
switch (ctx.opcode()) {
|
||||
case 0x199:
|
||||
@@ -263,7 +263,7 @@ static void __cdecl IncNPCLevel(const char* fmt, const char* name) {
|
||||
__asm pop edx;
|
||||
}
|
||||
|
||||
void sf_inc_npc_level(OpcodeContext& ctx) {
|
||||
void op_inc_npc_level(OpcodeContext& ctx) {
|
||||
nameNPCToInc = ctx.arg(0).asString();
|
||||
pidNPCToInc = ctx.arg(0).asInt(); // set to 0 if passing npc name
|
||||
if (pidNPCToInc == 0 && nameNPCToInc[0] == 0) return;
|
||||
@@ -285,7 +285,7 @@ void sf_inc_npc_level(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_npc_level(OpcodeContext& ctx) {
|
||||
void op_get_npc_level(OpcodeContext& ctx) {
|
||||
int level = -1;
|
||||
DWORD findPid = ctx.arg(0).asInt(); // set to 0 if passing npc name
|
||||
const char *critterName, *name = ctx.arg(0).asString();
|
||||
@@ -386,11 +386,11 @@ static DWORD GetIniSetting(const char* str, bool isString) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_ini_setting(OpcodeContext& ctx) {
|
||||
void op_get_ini_setting(OpcodeContext& ctx) {
|
||||
ctx.setReturn(GetIniSetting(ctx.arg(0).strValue(), false));
|
||||
}
|
||||
|
||||
void sf_get_ini_string(OpcodeContext& ctx) {
|
||||
void op_get_ini_string(OpcodeContext& ctx) {
|
||||
DWORD result = GetIniSetting(ctx.arg(0).strValue(), true);
|
||||
ctx.setReturn(result, (result != -1) ? DataType::STR : DataType::INT);
|
||||
}
|
||||
@@ -463,7 +463,7 @@ end:
|
||||
|
||||
static const char* valueOutRange = "%s() - argument values out of range.";
|
||||
|
||||
void sf_set_critical_table(OpcodeContext& ctx) {
|
||||
void op_set_critical_table(OpcodeContext& ctx) {
|
||||
DWORD critter = ctx.arg(0).rawValue(),
|
||||
bodypart = ctx.arg(1).rawValue(),
|
||||
slot = ctx.arg(2).rawValue(),
|
||||
@@ -476,7 +476,7 @@ void sf_set_critical_table(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_critical_table(OpcodeContext& ctx) {
|
||||
void op_get_critical_table(OpcodeContext& ctx) {
|
||||
DWORD critter = ctx.arg(0).rawValue(),
|
||||
bodypart = ctx.arg(1).rawValue(),
|
||||
slot = ctx.arg(2).rawValue(),
|
||||
@@ -489,7 +489,7 @@ void sf_get_critical_table(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_reset_critical_table(OpcodeContext& ctx) {
|
||||
void op_reset_critical_table(OpcodeContext& ctx) {
|
||||
DWORD critter = ctx.arg(0).rawValue(),
|
||||
bodypart = ctx.arg(1).rawValue(),
|
||||
slot = ctx.arg(2).rawValue(),
|
||||
@@ -536,7 +536,7 @@ void __declspec(naked) op_get_unspent_ap_perk_bonus() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_palette(OpcodeContext& ctx) {
|
||||
void op_set_palette(OpcodeContext& ctx) {
|
||||
const char* palette = ctx.arg(0).strValue();
|
||||
__asm {
|
||||
mov eax, palette;
|
||||
@@ -604,11 +604,11 @@ void __declspec(naked) op_refresh_pc_art() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_attack_type(OpcodeContext& ctx) {
|
||||
void op_get_attack_type(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::GetCurrentAttackMode());
|
||||
}
|
||||
|
||||
void sf_play_sfall_sound(OpcodeContext& ctx) {
|
||||
void op_play_sfall_sound(OpcodeContext& ctx) {
|
||||
DWORD soundID = 0;
|
||||
long mode = ctx.arg(1).rawValue();
|
||||
if (mode >= 0) soundID = Sound::PlaySfallSound(ctx.arg(0).strValue(), mode);
|
||||
@@ -783,29 +783,29 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_inven_ap_cost(OpcodeContext& ctx) {
|
||||
void mf_get_inven_ap_cost(OpcodeContext& ctx) {
|
||||
ctx.setReturn(Inventory::GetInvenApCost());
|
||||
}
|
||||
|
||||
void sf_attack_is_aimed(OpcodeContext& ctx) {
|
||||
void mf_attack_is_aimed(OpcodeContext& ctx) {
|
||||
DWORD isAimed, unused;
|
||||
ctx.setReturn(!fo::func::intface_get_attack(&unused, &isAimed) ? isAimed : 0);
|
||||
}
|
||||
|
||||
void sf_sneak_success(OpcodeContext& ctx) {
|
||||
void op_sneak_success(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::is_pc_sneak_working());
|
||||
}
|
||||
|
||||
void sf_tile_light(OpcodeContext& ctx) {
|
||||
void op_tile_light(OpcodeContext& ctx) {
|
||||
int lightLevel = fo::func::light_get_tile(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
ctx.setReturn(lightLevel);
|
||||
}
|
||||
|
||||
void sf_exec_map_update_scripts(OpcodeContext& ctx) {
|
||||
void mf_exec_map_update_scripts(OpcodeContext& ctx) {
|
||||
__asm call fo::funcoffs::scr_exec_map_update_scripts_
|
||||
}
|
||||
|
||||
void sf_set_ini_setting(OpcodeContext& ctx) {
|
||||
void mf_set_ini_setting(OpcodeContext& ctx) {
|
||||
const ScriptValue &argVal = ctx.arg(1);
|
||||
|
||||
const char* saveValue;
|
||||
@@ -854,7 +854,7 @@ static std::string GetIniFilePath(const ScriptValue &arg) {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
void sf_get_ini_sections(OpcodeContext& ctx) {
|
||||
void mf_get_ini_sections(OpcodeContext& ctx) {
|
||||
if (!GetPrivateProfileSectionNamesA(ScriptExtender::gTextBuffer, ScriptExtender::TextBufferSize(), GetIniFilePath(ctx.arg(0)).c_str())) {
|
||||
ctx.setReturn(TempArray(0, 0));
|
||||
return;
|
||||
@@ -877,7 +877,7 @@ void sf_get_ini_sections(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_get_ini_section(OpcodeContext& ctx) {
|
||||
void mf_get_ini_section(OpcodeContext& ctx) {
|
||||
auto section = ctx.arg(1).strValue();
|
||||
int arrayId = TempArray(-1, 0); // associative
|
||||
|
||||
@@ -901,7 +901,7 @@ void sf_get_ini_section(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_npc_engine_level_up(OpcodeContext& ctx) {
|
||||
void mf_npc_engine_level_up(OpcodeContext& ctx) {
|
||||
if (ctx.arg(0).asBool()) {
|
||||
if (!npcEngineLevelUp) SafeWrite16(0x4AFC1C, 0x840F); // enable
|
||||
npcEngineLevelUp = true;
|
||||
|
||||
@@ -29,13 +29,13 @@ namespace script
|
||||
|
||||
class OpcodeContext;
|
||||
|
||||
void sf_set_dm_model(OpcodeContext&);
|
||||
void op_set_dm_model(OpcodeContext&);
|
||||
|
||||
void sf_set_df_model(OpcodeContext&);
|
||||
void op_set_df_model(OpcodeContext&);
|
||||
|
||||
void sf_set_movie_path(OpcodeContext&);
|
||||
void op_set_movie_path(OpcodeContext&);
|
||||
|
||||
void sf_get_year(OpcodeContext&);
|
||||
void op_get_year(OpcodeContext&);
|
||||
|
||||
void __declspec() op_game_loaded();
|
||||
|
||||
@@ -48,9 +48,9 @@ void __declspec() op_get_kill_counter();
|
||||
|
||||
void __declspec() op_mod_kill_counter();
|
||||
|
||||
void sf_set_object_knockback(OpcodeContext&);
|
||||
void op_set_object_knockback(OpcodeContext&);
|
||||
|
||||
void sf_remove_object_knockback(OpcodeContext&);
|
||||
void op_remove_object_knockback(OpcodeContext&);
|
||||
|
||||
void __declspec() op_active_hand();
|
||||
|
||||
@@ -58,13 +58,13 @@ void __declspec() op_toggle_active_hand();
|
||||
|
||||
void __declspec() op_eax_available();
|
||||
|
||||
void sf_inc_npc_level(OpcodeContext&);
|
||||
void op_inc_npc_level(OpcodeContext&);
|
||||
|
||||
void sf_get_npc_level(OpcodeContext&);
|
||||
void op_get_npc_level(OpcodeContext&);
|
||||
|
||||
void sf_get_ini_setting(OpcodeContext&);
|
||||
void op_get_ini_setting(OpcodeContext&);
|
||||
|
||||
void sf_get_ini_string(OpcodeContext&);
|
||||
void op_get_ini_string(OpcodeContext&);
|
||||
|
||||
void __declspec() op_get_uptime();
|
||||
|
||||
@@ -76,11 +76,11 @@ void __declspec() op_get_bodypart_hit_modifier();
|
||||
|
||||
void __declspec() op_set_bodypart_hit_modifier();
|
||||
|
||||
void sf_set_critical_table(OpcodeContext&);
|
||||
void op_set_critical_table(OpcodeContext&);
|
||||
|
||||
void sf_get_critical_table(OpcodeContext&);
|
||||
void op_get_critical_table(OpcodeContext&);
|
||||
|
||||
void sf_reset_critical_table(OpcodeContext&);
|
||||
void op_reset_critical_table(OpcodeContext&);
|
||||
|
||||
void __declspec() op_set_unspent_ap_bonus();
|
||||
|
||||
@@ -90,7 +90,7 @@ void __declspec() op_set_unspent_ap_perk_bonus();
|
||||
|
||||
void __declspec() op_get_unspent_ap_perk_bonus();
|
||||
|
||||
void sf_set_palette(OpcodeContext&);
|
||||
void op_set_palette(OpcodeContext&);
|
||||
|
||||
//numbers subgame functions
|
||||
void __declspec() op_nb_create_char();
|
||||
@@ -105,9 +105,9 @@ void __declspec() op_get_light_level();
|
||||
|
||||
void __declspec() op_refresh_pc_art();
|
||||
|
||||
void sf_get_attack_type(OpcodeContext&);
|
||||
void op_get_attack_type(OpcodeContext&);
|
||||
|
||||
void sf_play_sfall_sound(OpcodeContext&);
|
||||
void op_play_sfall_sound(OpcodeContext&);
|
||||
|
||||
void __declspec() op_stop_sfall_sound();
|
||||
|
||||
@@ -133,23 +133,23 @@ void __declspec() op_gdialog_get_barter_mod();
|
||||
|
||||
void __declspec() op_set_inven_ap_cost();
|
||||
|
||||
void sf_get_inven_ap_cost(OpcodeContext&);
|
||||
void mf_get_inven_ap_cost(OpcodeContext&);
|
||||
|
||||
void sf_attack_is_aimed(OpcodeContext&);
|
||||
void mf_attack_is_aimed(OpcodeContext&);
|
||||
|
||||
void sf_sneak_success(OpcodeContext&);
|
||||
void op_sneak_success(OpcodeContext&);
|
||||
|
||||
void sf_tile_light(OpcodeContext&);
|
||||
void op_tile_light(OpcodeContext&);
|
||||
|
||||
void sf_exec_map_update_scripts(OpcodeContext&);
|
||||
void mf_exec_map_update_scripts(OpcodeContext&);
|
||||
|
||||
void sf_set_ini_setting(OpcodeContext&);
|
||||
void mf_set_ini_setting(OpcodeContext&);
|
||||
|
||||
void sf_get_ini_sections(OpcodeContext&);
|
||||
void mf_get_ini_sections(OpcodeContext&);
|
||||
|
||||
void sf_get_ini_section(OpcodeContext&);
|
||||
void mf_get_ini_section(OpcodeContext&);
|
||||
|
||||
void sf_npc_engine_level_up(OpcodeContext&);
|
||||
void mf_npc_engine_level_up(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace script
|
||||
__asm call fo::funcoffs::exec_script_proc_ \
|
||||
}
|
||||
|
||||
void sf_remove_script(OpcodeContext& ctx) {
|
||||
void op_remove_script(OpcodeContext& ctx) {
|
||||
auto object = ctx.arg(0).object();
|
||||
if (object->scriptId != 0xFFFFFFFF) {
|
||||
fo::func::scr_remove(object->scriptId);
|
||||
@@ -50,7 +50,7 @@ void sf_remove_script(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_script(OpcodeContext& ctx) {
|
||||
void op_set_script(OpcodeContext& ctx) {
|
||||
using fo::Scripts::start;
|
||||
using fo::Scripts::map_enter_p_proc;
|
||||
|
||||
@@ -81,7 +81,7 @@ void sf_set_script(OpcodeContext& ctx) {
|
||||
if ((valArg & 0x80000000) == 0) exec_script_proc(scriptId, map_enter_p_proc);
|
||||
}
|
||||
|
||||
void sf_create_spatial(OpcodeContext& ctx) {
|
||||
void op_create_spatial(OpcodeContext& ctx) {
|
||||
using fo::Scripts::start;
|
||||
|
||||
DWORD scriptIndex = ctx.arg(0).rawValue(),
|
||||
@@ -104,7 +104,7 @@ void sf_create_spatial(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::scr_find_obj_from_program(scriptPtr->program));
|
||||
}
|
||||
|
||||
void sf_spatial_radius(OpcodeContext& ctx) {
|
||||
void mf_spatial_radius(OpcodeContext& ctx) {
|
||||
auto spatialObj = ctx.arg(0).object();
|
||||
fo::ScriptInstance* script;
|
||||
if (fo::func::scr_ptr(spatialObj->scriptId, &script) != -1) {
|
||||
@@ -112,31 +112,31 @@ void sf_spatial_radius(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_script(OpcodeContext& ctx) {
|
||||
void op_get_script(OpcodeContext& ctx) {
|
||||
auto scriptIndex = ctx.arg(0).object()->scriptIndex;
|
||||
ctx.setReturn((scriptIndex >= 0) ? ++scriptIndex : 0);
|
||||
}
|
||||
|
||||
void sf_set_critter_burst_disable(OpcodeContext& ctx) {
|
||||
void op_set_critter_burst_disable(OpcodeContext& ctx) {
|
||||
SetNoBurstMode(ctx.arg(0).object(), ctx.arg(1).asBool());
|
||||
}
|
||||
|
||||
void sf_get_weapon_ammo_pid(OpcodeContext& ctx) {
|
||||
void op_get_weapon_ammo_pid(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
ctx.setReturn(obj->item.ammoPid);
|
||||
}
|
||||
|
||||
void sf_set_weapon_ammo_pid(OpcodeContext& ctx) {
|
||||
void op_set_weapon_ammo_pid(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
obj->item.ammoPid = ctx.arg(1).rawValue();
|
||||
}
|
||||
|
||||
void sf_get_weapon_ammo_count(OpcodeContext& ctx) {
|
||||
void op_get_weapon_ammo_count(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
ctx.setReturn(obj->item.charges);
|
||||
}
|
||||
|
||||
void sf_set_weapon_ammo_count(OpcodeContext& ctx) {
|
||||
void op_set_weapon_ammo_count(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
obj->item.charges = ctx.arg(1).rawValue();
|
||||
}
|
||||
@@ -164,7 +164,7 @@ static DWORD getBlockingFunc(DWORD type) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_make_straight_path(OpcodeContext& ctx) {
|
||||
void op_make_straight_path(OpcodeContext& ctx) {
|
||||
auto objFrom = ctx.arg(0).object();
|
||||
DWORD tileTo = ctx.arg(1).rawValue(),
|
||||
type = ctx.arg(2).rawValue();
|
||||
@@ -175,7 +175,7 @@ void sf_make_straight_path(OpcodeContext& ctx) {
|
||||
ctx.setReturn(resultObj);
|
||||
}
|
||||
|
||||
void sf_make_path(OpcodeContext& ctx) {
|
||||
void op_make_path(OpcodeContext& ctx) {
|
||||
auto objFrom = ctx.arg(0).object();
|
||||
auto tileTo = ctx.arg(1).rawValue(),
|
||||
type = ctx.arg(2).rawValue();
|
||||
@@ -193,7 +193,7 @@ void sf_make_path(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_obj_blocking_at(OpcodeContext& ctx) {
|
||||
void op_obj_blocking_at(OpcodeContext& ctx) {
|
||||
DWORD tile = ctx.arg(0).rawValue(),
|
||||
elevation = ctx.arg(1).rawValue(),
|
||||
type = ctx.arg(2).rawValue();
|
||||
@@ -206,7 +206,7 @@ void sf_obj_blocking_at(OpcodeContext& ctx) {
|
||||
ctx.setReturn(resultObj);
|
||||
}
|
||||
|
||||
void sf_tile_get_objects(OpcodeContext& ctx) {
|
||||
void op_tile_get_objects(OpcodeContext& ctx) {
|
||||
DWORD tile = ctx.arg(0).rawValue(),
|
||||
elevation = ctx.arg(1).rawValue();
|
||||
DWORD arrayId = TempArray(0, 4);
|
||||
@@ -218,7 +218,7 @@ void sf_tile_get_objects(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_get_party_members(OpcodeContext& ctx) {
|
||||
void op_get_party_members(OpcodeContext& ctx) {
|
||||
auto includeHidden = ctx.arg(0).rawValue();
|
||||
int actualCount = fo::var::partyMemberCount;
|
||||
DWORD arrayId = TempArray(0, 4);
|
||||
@@ -232,11 +232,11 @@ void sf_get_party_members(OpcodeContext& ctx) {
|
||||
ctx.setReturn(arrayId);
|
||||
}
|
||||
|
||||
void sf_art_exists(OpcodeContext& ctx) {
|
||||
void op_art_exists(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::art_exists(ctx.arg(0).rawValue()));
|
||||
}
|
||||
|
||||
void sf_obj_is_carrying_obj(OpcodeContext& ctx) {
|
||||
void op_obj_is_carrying_obj(OpcodeContext& ctx) {
|
||||
int num = 0;
|
||||
const ScriptValue &invenObjArg = ctx.arg(0),
|
||||
&itemObjArg = ctx.arg(1);
|
||||
@@ -254,7 +254,7 @@ void sf_obj_is_carrying_obj(OpcodeContext& ctx) {
|
||||
ctx.setReturn(num);
|
||||
}
|
||||
|
||||
void sf_critter_inven_obj2(OpcodeContext& ctx) {
|
||||
void mf_critter_inven_obj2(OpcodeContext& ctx) {
|
||||
fo::GameObject* critter = ctx.arg(0).object();
|
||||
int slot = ctx.arg(1).rawValue();
|
||||
switch (slot) {
|
||||
@@ -275,37 +275,37 @@ void sf_critter_inven_obj2(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_outline(OpcodeContext& ctx) {
|
||||
void mf_set_outline(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int color = ctx.arg(1).rawValue();
|
||||
obj->outline = color;
|
||||
}
|
||||
|
||||
void sf_get_outline(OpcodeContext& ctx) {
|
||||
void mf_get_outline(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
ctx.setReturn(obj->outline);
|
||||
}
|
||||
|
||||
void sf_set_flags(OpcodeContext& ctx) {
|
||||
void mf_set_flags(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
int flags = ctx.arg(1).rawValue();
|
||||
obj->flags = flags;
|
||||
}
|
||||
|
||||
void sf_get_flags(OpcodeContext& ctx) {
|
||||
void mf_get_flags(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
ctx.setReturn(obj->flags);
|
||||
}
|
||||
|
||||
void sf_outlined_object(OpcodeContext& ctx) {
|
||||
void mf_outlined_object(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::var::outlined_object);
|
||||
}
|
||||
|
||||
void sf_item_weight(OpcodeContext& ctx) {
|
||||
void mf_item_weight(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::item_weight(ctx.arg(0).object()));
|
||||
}
|
||||
|
||||
void sf_set_dude_obj(OpcodeContext& ctx) {
|
||||
void mf_set_dude_obj(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj == nullptr || obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER) {
|
||||
//if (!InCombat && obj && obj != PartyControl::RealDudeObject()) {
|
||||
@@ -319,23 +319,23 @@ void sf_set_dude_obj(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_real_dude_obj(OpcodeContext& ctx) {
|
||||
void mf_real_dude_obj(OpcodeContext& ctx) {
|
||||
ctx.setReturn(PartyControl::RealDudeObject());
|
||||
}
|
||||
|
||||
void sf_car_gas_amount(OpcodeContext& ctx) {
|
||||
void mf_car_gas_amount(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::var::carGasAmount);
|
||||
}
|
||||
|
||||
void sf_lock_is_jammed(OpcodeContext& ctx) {
|
||||
void mf_lock_is_jammed(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::obj_lock_is_jammed(ctx.arg(0).object()));
|
||||
}
|
||||
|
||||
void sf_unjam_lock(OpcodeContext& ctx) {
|
||||
void mf_unjam_lock(OpcodeContext& ctx) {
|
||||
fo::func::obj_unjam_lock(ctx.arg(0).object());
|
||||
}
|
||||
|
||||
void sf_set_unjam_locks_time(OpcodeContext& ctx) {
|
||||
void mf_set_unjam_locks_time(OpcodeContext& ctx) {
|
||||
int time = ctx.arg(0).rawValue();
|
||||
if (time < 0 || time > 127) {
|
||||
ctx.printOpcodeError("%s() - time argument must be in the range of 0 to 127.", ctx.getMetaruleName());
|
||||
@@ -345,7 +345,7 @@ void sf_set_unjam_locks_time(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_item_make_explosive(OpcodeContext& ctx) {
|
||||
void mf_item_make_explosive(OpcodeContext& ctx) {
|
||||
DWORD pid = ctx.arg(0).rawValue();
|
||||
DWORD pidActive = ctx.arg(1).rawValue();
|
||||
DWORD min = ctx.arg(2).rawValue();
|
||||
@@ -364,26 +364,26 @@ void sf_item_make_explosive(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_current_inven_size(OpcodeContext& ctx) {
|
||||
void mf_get_current_inven_size(OpcodeContext& ctx) {
|
||||
ctx.setReturn(sf_item_total_size(ctx.arg(0).object()));
|
||||
}
|
||||
|
||||
void sf_get_dialog_object(OpcodeContext& ctx) {
|
||||
void mf_get_dialog_object(OpcodeContext& ctx) {
|
||||
ctx.setReturn(InDialog() ? fo::var::dialog_target : 0);
|
||||
}
|
||||
|
||||
void sf_obj_under_cursor(OpcodeContext& ctx) {
|
||||
void mf_obj_under_cursor(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::object_under_mouse(ctx.arg(0).asBool() ? 1 : -1, ctx.arg(1).rawValue(), fo::var::map_elevation));
|
||||
}
|
||||
|
||||
void sf_get_loot_object(OpcodeContext& ctx) {
|
||||
void mf_get_loot_object(OpcodeContext& ctx) {
|
||||
ctx.setReturn((GetLoopFlags() & INTFACELOOT) ? fo::var::target_stack[fo::var::target_curr_stack] : 0);
|
||||
}
|
||||
|
||||
static const char* failedLoad = "%s() - failed to load a prototype ID: %d";
|
||||
static bool protoMaxLimitPatch = false;
|
||||
|
||||
void sf_get_proto_data(OpcodeContext& ctx) {
|
||||
void op_get_proto_data(OpcodeContext& ctx) {
|
||||
fo::Proto* protoPtr;
|
||||
int pid = ctx.arg(0).rawValue();
|
||||
int result = fo::func::proto_ptr(pid, &protoPtr);
|
||||
@@ -395,7 +395,7 @@ void sf_get_proto_data(OpcodeContext& ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_set_proto_data(OpcodeContext& ctx) {
|
||||
void op_set_proto_data(OpcodeContext& ctx) {
|
||||
int pid = ctx.arg(0).rawValue();
|
||||
if (CritterStats::SetProtoData(pid, ctx.arg(1).rawValue(), ctx.arg(2).rawValue()) != -1) {
|
||||
if (!protoMaxLimitPatch) {
|
||||
@@ -407,7 +407,7 @@ void sf_set_proto_data(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_object_data(OpcodeContext& ctx) {
|
||||
void mf_get_object_data(OpcodeContext& ctx) {
|
||||
DWORD result = 0;
|
||||
DWORD* object_ptr = (DWORD*)ctx.arg(0).rawValue();
|
||||
if (*(object_ptr - 1) != 0xFEEDFACE) {
|
||||
@@ -418,7 +418,7 @@ void sf_get_object_data(OpcodeContext& ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_set_object_data(OpcodeContext& ctx) {
|
||||
void mf_set_object_data(OpcodeContext& ctx) {
|
||||
DWORD* object_ptr = (DWORD*)ctx.arg(0).rawValue();
|
||||
if (*(object_ptr - 1) != 0xFEEDFACE) {
|
||||
ctx.printOpcodeError("%s() - invalid object pointer.", ctx.getMetaruleName());
|
||||
@@ -428,7 +428,7 @@ void sf_set_object_data(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_object_ai_data(OpcodeContext& ctx) {
|
||||
void mf_get_object_ai_data(OpcodeContext& ctx) {
|
||||
fo::AIcap* cap = fo::func::ai_cap(ctx.arg(0).object());
|
||||
DWORD arrayId, value = -1;
|
||||
switch (ctx.arg(1).rawValue()) {
|
||||
@@ -487,7 +487,7 @@ void sf_get_object_ai_data(OpcodeContext& ctx) {
|
||||
ctx.setReturn(value);
|
||||
}
|
||||
|
||||
void sf_set_drugs_data(OpcodeContext& ctx) {
|
||||
void mf_set_drugs_data(OpcodeContext& ctx) {
|
||||
int type = ctx.arg(0).rawValue();
|
||||
int pid = ctx.arg(1).rawValue();
|
||||
int val = ctx.arg(2).rawValue();
|
||||
@@ -509,7 +509,7 @@ void sf_set_drugs_data(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_unique_id(OpcodeContext& ctx) {
|
||||
void mf_set_unique_id(OpcodeContext& ctx) {
|
||||
fo::GameObject* obj = ctx.arg(0).object();
|
||||
long id;
|
||||
if (ctx.arg(1).rawValue() == -1) {
|
||||
@@ -521,7 +521,7 @@ void sf_set_unique_id(OpcodeContext& ctx) {
|
||||
ctx.setReturn(id);
|
||||
}
|
||||
|
||||
void sf_objects_in_radius(OpcodeContext& ctx) {
|
||||
void mf_objects_in_radius(OpcodeContext& ctx) {
|
||||
long radius = ctx.arg(1).rawValue();
|
||||
if (radius <= 0) radius = 1; else if (radius > 50) radius = 50;
|
||||
long elev = ctx.arg(2).rawValue();
|
||||
|
||||
@@ -27,91 +27,91 @@ namespace sfall
|
||||
namespace script
|
||||
{
|
||||
|
||||
void sf_remove_script(OpcodeContext&);
|
||||
void op_remove_script(OpcodeContext&);
|
||||
|
||||
void sf_set_script(OpcodeContext&);
|
||||
void op_set_script(OpcodeContext&);
|
||||
|
||||
void sf_create_spatial(OpcodeContext&);
|
||||
void op_create_spatial(OpcodeContext&);
|
||||
|
||||
void sf_spatial_radius(OpcodeContext&);
|
||||
void mf_spatial_radius(OpcodeContext&);
|
||||
|
||||
void sf_get_script(OpcodeContext&);
|
||||
void op_get_script(OpcodeContext&);
|
||||
|
||||
void sf_set_critter_burst_disable(OpcodeContext&);
|
||||
void op_set_critter_burst_disable(OpcodeContext&);
|
||||
|
||||
void sf_get_weapon_ammo_pid(OpcodeContext&);
|
||||
void op_get_weapon_ammo_pid(OpcodeContext&);
|
||||
|
||||
void sf_set_weapon_ammo_pid(OpcodeContext&);
|
||||
void op_set_weapon_ammo_pid(OpcodeContext&);
|
||||
|
||||
void sf_get_weapon_ammo_count(OpcodeContext&);
|
||||
void op_get_weapon_ammo_count(OpcodeContext&);
|
||||
|
||||
void sf_set_weapon_ammo_count(OpcodeContext&);
|
||||
void op_set_weapon_ammo_count(OpcodeContext&);
|
||||
|
||||
void sf_make_straight_path(OpcodeContext&);
|
||||
void op_make_straight_path(OpcodeContext&);
|
||||
|
||||
void sf_make_path(OpcodeContext&);
|
||||
void op_make_path(OpcodeContext&);
|
||||
|
||||
void sf_obj_blocking_at(OpcodeContext&);
|
||||
void op_obj_blocking_at(OpcodeContext&);
|
||||
|
||||
void sf_tile_get_objects(OpcodeContext&);
|
||||
void op_tile_get_objects(OpcodeContext&);
|
||||
|
||||
void sf_get_party_members(OpcodeContext&);
|
||||
void op_get_party_members(OpcodeContext&);
|
||||
|
||||
void sf_art_exists(OpcodeContext&);
|
||||
void op_art_exists(OpcodeContext&);
|
||||
|
||||
void sf_obj_is_carrying_obj(OpcodeContext&);
|
||||
void op_obj_is_carrying_obj(OpcodeContext&);
|
||||
|
||||
void sf_critter_inven_obj2(OpcodeContext&);
|
||||
void mf_critter_inven_obj2(OpcodeContext&);
|
||||
|
||||
void sf_set_outline(OpcodeContext&);
|
||||
void mf_set_outline(OpcodeContext&);
|
||||
|
||||
void sf_get_outline(OpcodeContext&);
|
||||
void mf_get_outline(OpcodeContext&);
|
||||
|
||||
void sf_set_flags(OpcodeContext&);
|
||||
void mf_set_flags(OpcodeContext&);
|
||||
|
||||
void sf_get_flags(OpcodeContext&);
|
||||
void mf_get_flags(OpcodeContext&);
|
||||
|
||||
void sf_outlined_object(OpcodeContext&);
|
||||
void mf_outlined_object(OpcodeContext&);
|
||||
|
||||
void sf_item_weight(OpcodeContext&);
|
||||
void mf_item_weight(OpcodeContext&);
|
||||
|
||||
void sf_set_dude_obj(OpcodeContext&);
|
||||
void mf_set_dude_obj(OpcodeContext&);
|
||||
|
||||
void sf_real_dude_obj(OpcodeContext&);
|
||||
void mf_real_dude_obj(OpcodeContext&);
|
||||
|
||||
void sf_car_gas_amount(OpcodeContext&);
|
||||
void mf_car_gas_amount(OpcodeContext&);
|
||||
|
||||
void sf_lock_is_jammed(OpcodeContext&);
|
||||
void mf_lock_is_jammed(OpcodeContext&);
|
||||
|
||||
void sf_unjam_lock(OpcodeContext&);
|
||||
void mf_unjam_lock(OpcodeContext&);
|
||||
|
||||
void sf_set_unjam_locks_time(OpcodeContext&);
|
||||
void mf_set_unjam_locks_time(OpcodeContext&);
|
||||
|
||||
void sf_item_make_explosive(OpcodeContext&);
|
||||
void mf_item_make_explosive(OpcodeContext&);
|
||||
|
||||
void sf_get_current_inven_size(OpcodeContext&);
|
||||
void mf_get_current_inven_size(OpcodeContext&);
|
||||
|
||||
void sf_get_dialog_object(OpcodeContext&);
|
||||
void mf_get_dialog_object(OpcodeContext&);
|
||||
|
||||
void sf_obj_under_cursor(OpcodeContext&);
|
||||
void mf_obj_under_cursor(OpcodeContext&);
|
||||
|
||||
void sf_get_loot_object(OpcodeContext&);
|
||||
void mf_get_loot_object(OpcodeContext&);
|
||||
|
||||
void sf_get_proto_data(OpcodeContext&);
|
||||
void op_get_proto_data(OpcodeContext&);
|
||||
|
||||
void sf_set_proto_data(OpcodeContext&);
|
||||
void op_set_proto_data(OpcodeContext&);
|
||||
|
||||
void sf_get_object_data(OpcodeContext&);
|
||||
void mf_get_object_data(OpcodeContext&);
|
||||
|
||||
void sf_set_object_data(OpcodeContext&);
|
||||
void mf_set_object_data(OpcodeContext&);
|
||||
|
||||
void sf_get_object_ai_data(OpcodeContext&);
|
||||
void mf_get_object_ai_data(OpcodeContext&);
|
||||
|
||||
void sf_set_drugs_data(OpcodeContext&);
|
||||
void mf_set_drugs_data(OpcodeContext&);
|
||||
|
||||
void sf_set_unique_id(OpcodeContext&);
|
||||
void mf_set_unique_id(OpcodeContext&);
|
||||
|
||||
void sf_objects_in_radius(OpcodeContext&);
|
||||
void mf_objects_in_radius(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_get_perk_available(OpcodeContext& ctx) {
|
||||
void op_get_perk_available(OpcodeContext& ctx) {
|
||||
int result = 0, perkId = ctx.arg(0).rawValue();
|
||||
if (perkId >= 0 && perkId < 256) { // start fake id
|
||||
result = fo::func::perk_can_add(fo::var::obj_dude, perkId);
|
||||
@@ -70,11 +70,11 @@ void sf_get_perk_available(OpcodeContext& ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_set_perk_name(OpcodeContext& ctx) {
|
||||
void op_set_perk_name(OpcodeContext& ctx) {
|
||||
Perks::SetPerkName(ctx.arg(0).rawValue(), ctx.arg(1).strValue());
|
||||
}
|
||||
|
||||
void sf_set_perk_desc(OpcodeContext& ctx) {
|
||||
void op_set_perk_desc(OpcodeContext& ctx) {
|
||||
Perks::SetPerkDesc(ctx.arg(0).rawValue(), ctx.arg(1).strValue());
|
||||
}
|
||||
|
||||
@@ -100,21 +100,21 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_selectable_perk(OpcodeContext& ctx) {
|
||||
void op_set_selectable_perk(OpcodeContext& ctx) {
|
||||
Perks::SetSelectablePerk(ctx.arg(0).strValue(), ctx.arg(1).rawValue(), ctx.arg(2).rawValue(), ctx.arg(3).strValue());
|
||||
}
|
||||
|
||||
void sf_set_fake_perk(OpcodeContext& ctx) {
|
||||
void op_set_fake_perk(OpcodeContext& ctx) {
|
||||
Perks::SetFakePerk(ctx.arg(0).strValue(), ctx.arg(1).rawValue(), ctx.arg(2).rawValue(), ctx.arg(3).strValue());
|
||||
}
|
||||
|
||||
void sf_set_fake_trait(OpcodeContext& ctx) {
|
||||
void op_set_fake_trait(OpcodeContext& ctx) {
|
||||
Perks::SetFakeTrait(ctx.arg(0).strValue(), ctx.arg(1).rawValue(), ctx.arg(2).rawValue(), ctx.arg(3).strValue());
|
||||
}
|
||||
|
||||
const char* notPartyMemberErr = "%s() - the object is not a party member.";
|
||||
|
||||
void sf_set_selectable_perk_npc(OpcodeContext& ctx) {
|
||||
void mf_set_selectable_perk_npc(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER && fo::func::isPartyMember(obj)) {
|
||||
Perks::SetSelectablePerk(ctx.arg(1).strValue(), ctx.arg(2).rawValue(), ctx.arg(3).rawValue(), ctx.arg(4).strValue(), (obj->id != fo::PLAYER_ID) ? obj->id : 0);
|
||||
@@ -124,7 +124,7 @@ void sf_set_selectable_perk_npc(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_fake_perk_npc(OpcodeContext& ctx) {
|
||||
void mf_set_fake_perk_npc(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER && fo::func::isPartyMember(obj)) {
|
||||
Perks::SetFakePerk(ctx.arg(1).strValue(), ctx.arg(2).rawValue(), ctx.arg(3).rawValue(), ctx.arg(4).strValue(), (obj->id != fo::PLAYER_ID) ? obj->id : 0);
|
||||
@@ -134,7 +134,7 @@ void sf_set_fake_perk_npc(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_set_fake_trait_npc(OpcodeContext& ctx) {
|
||||
void mf_set_fake_trait_npc(OpcodeContext& ctx) {
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER && fo::func::isPartyMember(obj)) {
|
||||
Perks::SetFakeTrait(ctx.arg(1).strValue(), ctx.arg(2).rawValue(), ctx.arg(3).rawValue(), ctx.arg(4).strValue(), (obj->id != fo::PLAYER_ID) ? obj->id : 0);
|
||||
@@ -193,15 +193,15 @@ void __declspec(naked) op_clear_selectable_perks() {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_has_fake_perk(OpcodeContext& ctx) {
|
||||
void op_has_fake_perk(OpcodeContext& ctx) {
|
||||
ctx.setReturn(Perks::HasFakePerk(ctx.arg(0).asString(), ctx.arg(0).asInt()));
|
||||
}
|
||||
|
||||
void sf_has_fake_trait(OpcodeContext& ctx) {
|
||||
void op_has_fake_trait(OpcodeContext& ctx) {
|
||||
ctx.setReturn(Perks::HasFakeTrait(ctx.arg(0).strValue()));
|
||||
}
|
||||
|
||||
void sf_has_fake_perk_npc(OpcodeContext& ctx) {
|
||||
void mf_has_fake_perk_npc(OpcodeContext& ctx) {
|
||||
long result = 0;
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER && fo::func::isPartyMember(obj)) {
|
||||
@@ -212,7 +212,7 @@ void sf_has_fake_perk_npc(OpcodeContext& ctx) {
|
||||
ctx.setReturn(result);
|
||||
}
|
||||
|
||||
void sf_has_fake_trait_npc(OpcodeContext& ctx) {
|
||||
void mf_has_fake_trait_npc(OpcodeContext& ctx) {
|
||||
long result = 0;
|
||||
auto obj = ctx.arg(0).object();
|
||||
if (obj->Type() == fo::ObjType::OBJ_TYPE_CRITTER && fo::func::isPartyMember(obj)) {
|
||||
@@ -325,7 +325,7 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
void sf_add_trait(OpcodeContext& ctx) {
|
||||
void mf_add_trait(OpcodeContext& ctx) {
|
||||
if (fo::var::obj_dude->protoId != fo::PID_Player) {
|
||||
ctx.printOpcodeError("%s() - traits can be added only to the player.", ctx.getMetaruleName());
|
||||
ctx.setReturn(-1);
|
||||
|
||||
@@ -29,25 +29,25 @@ void __declspec() op_set_perk_owed();
|
||||
|
||||
void __declspec() op_set_perk_freq();
|
||||
|
||||
void sf_get_perk_available(OpcodeContext&);
|
||||
void op_get_perk_available(OpcodeContext&);
|
||||
|
||||
void sf_set_perk_name(OpcodeContext&);
|
||||
void op_set_perk_name(OpcodeContext&);
|
||||
|
||||
void sf_set_perk_desc(OpcodeContext&);
|
||||
void op_set_perk_desc(OpcodeContext&);
|
||||
|
||||
void __declspec() op_set_perk_value();
|
||||
|
||||
void sf_set_selectable_perk(OpcodeContext&);
|
||||
void op_set_selectable_perk(OpcodeContext&);
|
||||
|
||||
void sf_set_fake_perk(OpcodeContext&);
|
||||
void op_set_fake_perk(OpcodeContext&);
|
||||
|
||||
void sf_set_fake_trait(OpcodeContext&);
|
||||
void op_set_fake_trait(OpcodeContext&);
|
||||
|
||||
void sf_set_selectable_perk_npc(OpcodeContext&);
|
||||
void mf_set_selectable_perk_npc(OpcodeContext&);
|
||||
|
||||
void sf_set_fake_perk_npc(OpcodeContext&);
|
||||
void mf_set_fake_perk_npc(OpcodeContext&);
|
||||
|
||||
void sf_set_fake_trait_npc(OpcodeContext&);
|
||||
void mf_set_fake_trait_npc(OpcodeContext&);
|
||||
|
||||
void __declspec() op_set_perkbox_title();
|
||||
|
||||
@@ -57,13 +57,13 @@ void __declspec() op_show_real_perks();
|
||||
|
||||
void __declspec() op_clear_selectable_perks();
|
||||
|
||||
void sf_has_fake_perk(OpcodeContext&);
|
||||
void op_has_fake_perk(OpcodeContext&);
|
||||
|
||||
void sf_has_fake_trait(OpcodeContext&);
|
||||
void op_has_fake_trait(OpcodeContext&);
|
||||
|
||||
void sf_has_fake_perk_npc(OpcodeContext&);
|
||||
void mf_has_fake_perk_npc(OpcodeContext&);
|
||||
|
||||
void sf_has_fake_trait_npc(OpcodeContext&);
|
||||
void mf_has_fake_trait_npc(OpcodeContext&);
|
||||
|
||||
void __declspec() op_perk_add_mode();
|
||||
|
||||
@@ -77,7 +77,7 @@ void __declspec() op_set_swiftlearner_mod();
|
||||
|
||||
void __declspec() op_set_perk_level_mod();
|
||||
|
||||
void sf_add_trait(OpcodeContext&);
|
||||
void mf_add_trait(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user