Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sfall-team/sfall into bet…
Browse files Browse the repository at this point in the history
…ter-docs
  • Loading branch information
actions-user committed Jul 16, 2024
2 parents 692e788 + 190ebc4 commit 909d4b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions sfall/FalloutEngine/Functions_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ WRAP_WATCOM_FUNC1(long, obj_lock_is_jammed, fo::GameObject*, object) // Checks/u
WRAP_WATCOM_FUNC1(void, obj_unjam_lock, fo::GameObject*, object)
WRAP_WATCOM_FUNC0(void, object_anim_compact)
WRAP_WATCOM_FUNC1(long, partyMemberGetCurLevel, fo::GameObject*, obj)
WRAP_WATCOM_FUNC1(void, pc_flag_off, long, flag)
WRAP_WATCOM_FUNC1(void, pc_flag_on, long, flag)
WRAP_WATCOM_FUNC2(void, perk_add_effect, fo::GameObject*, critter, long, perkId)
WRAP_WATCOM_FUNC2(long, perk_can_add, fo::GameObject*, critter, long, perkId)
Expand Down
4 changes: 2 additions & 2 deletions sfall/Modules/BarBoxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ bool BarBoxes::GetBox(int i) {
}

void BarBoxes::AddBox(int i) {
if (i < 5 || i > BarBoxes::MaxBox()) return;
if (i < 5 || i > BarBoxes::MaxBox() || boxText[i - 5].isActive) return;
boxText[i - 5].isActive = true;
__asm call fo::funcoffs::refresh_box_bar_win_;
}

void BarBoxes::RemoveBox(int i) {
if (i < 5 || i > BarBoxes::MaxBox()) return;
if (i < 5 || i > BarBoxes::MaxBox() || !boxText[i - 5].isActive) return;
boxText[i - 5].isActive = false;
__asm call fo::funcoffs::refresh_box_bar_win_;
}
Expand Down
6 changes: 2 additions & 4 deletions sfall/Modules/Scripting/Handlers/Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ void mf_add_iface_tag(OpcodeContext &ctx) {
void op_show_iface_tag(OpcodeContext &ctx) {
int tag = ctx.arg(0).rawValue();
if (tag == 0 || tag == 3 || tag == 4) {
__asm mov eax, tag;
__asm call fo::funcoffs::pc_flag_on_;
if (!fo::func::is_pc_flag(tag)) fo::func::pc_flag_on(tag);
} else {
BarBoxes::AddBox(tag);
}
Expand All @@ -248,8 +247,7 @@ void op_show_iface_tag(OpcodeContext &ctx) {
void op_hide_iface_tag(OpcodeContext &ctx) {
int tag = ctx.arg(0).rawValue();
if (tag == 0 || tag == 3 || tag == 4) {
__asm mov eax, tag;
__asm call fo::funcoffs::pc_flag_off_;
if (fo::func::is_pc_flag(tag)) fo::func::pc_flag_off(tag);
} else {
BarBoxes::RemoveBox(tag);
}
Expand Down

0 comments on commit 909d4b1

Please sign in to comment.