From f93aa710a424f9ee2d550c32ed44a39a864c1586 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Mon, 24 Jul 2023 08:20:15 +0300 Subject: [PATCH] Add target_pick_local_var --- src/mapper/mp_targt.cc | 25 +++++++++++++++++++++++++ src/mapper/mp_targt.h | 1 + 2 files changed, 26 insertions(+) diff --git a/src/mapper/mp_targt.cc b/src/mapper/mp_targt.cc index e5249d2..b654011 100644 --- a/src/mapper/mp_targt.cc +++ b/src/mapper/mp_targt.cc @@ -126,4 +126,29 @@ int target_pick_map_var(int* value_ptr) return 0; } +// 0x49BE70 +int target_pick_local_var(int* value_ptr) +{ + int value; + int rc; + + if (gMapLocalVarsLength == 0) { + return -1; + } + + rc = win_get_num_i(&value, + 0, + gMapLocalVarsLength - 1, + false, + "Local Variable Index #:", + 100, + 100); + if (rc == -1) { + return -1; + } + + *value_ptr = value; + return 0; +} + } // namespace fallout diff --git a/src/mapper/mp_targt.h b/src/mapper/mp_targt.h index d22c700..2a0578d 100644 --- a/src/mapper/mp_targt.h +++ b/src/mapper/mp_targt.h @@ -11,6 +11,7 @@ int target_exit(); int pick_rot(); int target_pick_global_var(int* value_ptr); int target_pick_map_var(int* value_ptr); +int target_pick_local_var(int* value_ptr); } // namespace fallout