Add target_pick_global_var

This commit is contained in:
Alexander Batalov 2023-07-24 08:13:45 +03:00
parent 3a271a399f
commit f6461a44dc
2 changed files with 27 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include <string.h> #include <string.h>
#include "art.h" #include "art.h"
#include "game.h"
#include "proto.h" #include "proto.h"
#include "window_manager_private.h" #include "window_manager_private.h"
@ -74,4 +75,29 @@ int pick_rot()
return value; 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 } // namespace fallout

View File

@ -9,6 +9,7 @@ void target_make_path(char* path, int pid);
int target_init(); int target_init();
int target_exit(); int target_exit();
int pick_rot(); int pick_rot();
int target_pick_global_var(int* value_ptr);
} // namespace fallout } // namespace fallout