mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Edits to sfall_ver_* script functions
* they take no arguments and only return constants, simpler structure in ASM is enough.
This commit is contained in:
+2
-2
@@ -233,7 +233,7 @@ GEM
|
|||||||
jekyll-seo-tag (~> 2.1)
|
jekyll-seo-tag (~> 2.1)
|
||||||
minitest (5.15.0)
|
minitest (5.15.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
nokogiri (1.13.9)
|
nokogiri (1.13.10)
|
||||||
mini_portile2 (~> 2.8.0)
|
mini_portile2 (~> 2.8.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
octokit (4.22.0)
|
octokit (4.22.0)
|
||||||
@@ -242,7 +242,7 @@ GEM
|
|||||||
pathutil (0.16.2)
|
pathutil (0.16.2)
|
||||||
forwardable-extended (~> 2.6)
|
forwardable-extended (~> 2.6)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
racc (1.6.0)
|
racc (1.6.1)
|
||||||
rb-fsevent (0.11.1)
|
rb-fsevent (0.11.1)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
|
|||||||
@@ -216,16 +216,25 @@ void mf_remove_timer_event(OpcodeContext& ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void op_sfall_ver_major(OpcodeContext& ctx) {
|
void __declspec(naked) op_sfall_ver_major() {
|
||||||
ctx.setReturn(VERSION_MAJOR);
|
__asm {
|
||||||
|
mov edx, VERSION_MAJOR;
|
||||||
|
_J_RET_VAL_TYPE(VAR_TYPE_INT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void op_sfall_ver_minor(OpcodeContext& ctx) {
|
void __declspec(naked) op_sfall_ver_minor() {
|
||||||
ctx.setReturn(VERSION_MINOR);
|
__asm {
|
||||||
|
mov edx, VERSION_MINOR;
|
||||||
|
_J_RET_VAL_TYPE(VAR_TYPE_INT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void op_sfall_ver_build(OpcodeContext& ctx) {
|
void __declspec(naked) op_sfall_ver_build() {
|
||||||
ctx.setReturn(VERSION_BUILD);
|
__asm {
|
||||||
|
mov edx, VERSION_BUILD;
|
||||||
|
_J_RET_VAL_TYPE(VAR_TYPE_INT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ void mf_add_g_timer_event(OpcodeContext&);
|
|||||||
|
|
||||||
void mf_remove_timer_event(OpcodeContext&);
|
void mf_remove_timer_event(OpcodeContext&);
|
||||||
|
|
||||||
void op_sfall_ver_major(OpcodeContext&);
|
void __declspec() op_sfall_ver_major();
|
||||||
|
|
||||||
void op_sfall_ver_minor(OpcodeContext&);
|
void __declspec() op_sfall_ver_minor();
|
||||||
|
|
||||||
void op_sfall_ver_build(OpcodeContext&);
|
void __declspec() op_sfall_ver_build();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,9 +150,6 @@ static SfallOpcodeInfo opcodeInfoArray[] = {
|
|||||||
{0x20d, "list_begin", op_list_begin, 1, true, 0, {ARG_INT}},
|
{0x20d, "list_begin", op_list_begin, 1, true, 0, {ARG_INT}},
|
||||||
{0x20e, "list_next", op_list_next, 1, true, 0, {ARG_INT}},
|
{0x20e, "list_next", op_list_next, 1, true, 0, {ARG_INT}},
|
||||||
{0x20f, "list_end", op_list_end, 1, false, 0, {ARG_INT}},
|
{0x20f, "list_end", op_list_end, 1, false, 0, {ARG_INT}},
|
||||||
{0x210, "sfall_ver_major", op_sfall_ver_major, 0, true},
|
|
||||||
{0x211, "sfall_ver_minor", op_sfall_ver_minor, 0, true},
|
|
||||||
{0x212, "sfall_ver_build", op_sfall_ver_build, 0, true},
|
|
||||||
{0x216, "set_critter_burst_disable", op_set_critter_burst_disable, 2, false, 0, {ARG_OBJECT, ARG_INT}},
|
{0x216, "set_critter_burst_disable", op_set_critter_burst_disable, 2, false, 0, {ARG_OBJECT, ARG_INT}},
|
||||||
{0x217, "get_weapon_ammo_pid", op_get_weapon_ammo_pid, 1, true, -1, {ARG_OBJECT}},
|
{0x217, "get_weapon_ammo_pid", op_get_weapon_ammo_pid, 1, true, -1, {ARG_OBJECT}},
|
||||||
{0x218, "set_weapon_ammo_pid", op_set_weapon_ammo_pid, 2, false, 0, {ARG_OBJECT, ARG_INT}},
|
{0x218, "set_weapon_ammo_pid", op_set_weapon_ammo_pid, 2, false, 0, {ARG_OBJECT, ARG_INT}},
|
||||||
@@ -391,6 +388,9 @@ void Opcodes::InitNew() {
|
|||||||
|
|
||||||
opcodes[0x1f6] = op_nb_create_char;
|
opcodes[0x1f6] = op_nb_create_char;
|
||||||
opcodes[0x206] = op_set_self;
|
opcodes[0x206] = op_set_self;
|
||||||
|
opcodes[0x210] = op_sfall_ver_major;
|
||||||
|
opcodes[0x211] = op_sfall_ver_minor;
|
||||||
|
opcodes[0x212] = op_sfall_ver_build;
|
||||||
opcodes[0x213] = op_hero_select_win;
|
opcodes[0x213] = op_hero_select_win;
|
||||||
opcodes[0x214] = op_set_hero_race;
|
opcodes[0x214] = op_set_hero_race;
|
||||||
opcodes[0x215] = op_set_hero_style;
|
opcodes[0x215] = op_set_hero_style;
|
||||||
|
|||||||
Reference in New Issue
Block a user