mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed extra hidden buttons appearing below the location list
* in the Status section in the pipboy (a partial fix). (ref. alexbatalov/fallout2-ce#465)
This commit is contained in:
@@ -156,6 +156,7 @@
|
||||
#define FO_VAR_hereAndNowExps 0x51C124
|
||||
#define FO_VAR_hit_location_penalty 0x510954
|
||||
#define FO_VAR_holo_flag 0x664529
|
||||
#define FO_VAR_holocount 0x66444C
|
||||
#define FO_VAR_holodisk 0x6644F4
|
||||
#define FO_VAR_holopages 0x66445C
|
||||
#define FO_VAR_hot_line_count 0x6644F8
|
||||
@@ -327,6 +328,7 @@
|
||||
#define FO_VAR_stack_offset 0x59E844
|
||||
#define FO_VAR_stat_data 0x51D53C
|
||||
#define FO_VAR_stat_flag 0x66452A
|
||||
#define FO_VAR_statcount 0x664418
|
||||
#define FO_VAR_subtitleH 0x638EA0
|
||||
#define FO_VAR_subtitleList 0x638E74
|
||||
#define FO_VAR_subtitles 0x663974
|
||||
|
||||
@@ -949,6 +949,11 @@ end:
|
||||
|
||||
static __declspec(naked) void PipStatus_AddHotLines_hook() {
|
||||
__asm {
|
||||
// Fix extra hidden buttons appearing below the location list in the Status section (partially)
|
||||
mov edx, dword ptr ds:[FO_VAR_statcount];
|
||||
mov ecx, dword ptr ds:[FO_VAR_holocount];
|
||||
cmp edx, ecx;
|
||||
cmovl edx, ecx; // count = (statcount < holocount) ? holocount : statcount
|
||||
call fo::funcoffs::AddHotLines_;
|
||||
xor eax, eax;
|
||||
mov dword ptr ds:[FO_VAR_hot_line_count], eax;
|
||||
|
||||
@@ -230,7 +230,7 @@ void op_list_next(OpcodeContext& ctx) {
|
||||
auto id = ctx.arg(0).rawValue();
|
||||
if (id != 0) {
|
||||
sList* list = nullptr;
|
||||
for (std::vector<ListId>::const_iterator it = mList.cbegin(), it_end = mList.cend(); it != it_end; ++it) {
|
||||
for (std::vector<ListId>::const_iterator it = mList.cbegin(), it_end = mList.cend(); it != it_end; ++it) {
|
||||
if (it->id == id) {
|
||||
list = it->list;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user