diff --git a/src/mapper/mp_targt.cc b/src/mapper/mp_targt.cc index bc0c6e1..4a8f517 100644 --- a/src/mapper/mp_targt.cc +++ b/src/mapper/mp_targt.cc @@ -3,6 +3,7 @@ #include #include "art.h" +#include "game.h" #include "proto.h" #include "window_manager_private.h" @@ -74,4 +75,29 @@ int pick_rot() return value; } +// 0x49BDD0 +int target_pick_global_var(int* value_ptr) +{ + int value; + int rc; + + if (gGameGlobalVarsLength == 0) { + return -1; + } + + rc = win_get_num_i(&value, + 0, + gGameGlobalVarsLength - 1, + false, + "Global 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 b27660a..b553db3 100644 --- a/src/mapper/mp_targt.h +++ b/src/mapper/mp_targt.h @@ -9,6 +9,7 @@ void target_make_path(char* path, int pid); int target_init(); int target_exit(); int pick_rot(); +int target_pick_global_var(int* value_ptr); } // namespace fallout