fallout2-ce/src/mapper/mp_targt.cc

104 lines
1.6 KiB
C++
Raw Normal View History

2023-07-23 20:50:07 -07:00
#include "mapper/mp_targt.h"
2023-07-23 22:08:01 -07:00
#include <string.h>
#include "art.h"
2023-07-23 22:13:45 -07:00
#include "game.h"
2023-07-23 22:08:01 -07:00
#include "proto.h"
2023-07-23 22:10:46 -07:00
#include "window_manager_private.h"
2023-07-23 22:08:01 -07:00
2023-07-23 20:50:07 -07:00
namespace fallout {
2023-07-23 22:08:01 -07:00
// 0x53F354
static char default_target_path_base[] = "\\fallout2\\dev\\proto\\";
// 0x559CD0
static char* target_path_base = default_target_path_base;
2023-07-23 22:03:25 -07:00
// 0x559DBC
static bool tgt_overriden = false;
2023-07-23 20:50:07 -07:00
// 0x49B2F0
void target_override_protection()
{
// TODO: Incomplete.
}
2023-07-23 22:03:25 -07:00
// 0x49B2F0
bool target_overriden()
{
return tgt_overriden;
}
2023-07-23 22:08:01 -07:00
// 0x49B34C
void target_make_path(char* path, int pid)
{
if (_cd_path_base[0] != '\0' && _cd_path_base[1] == ':') {
strncpy(path, _cd_path_base, 2);
strcat(path, target_path_base);
} else {
strcpy(path, target_path_base);
}
if (pid != -1) {
strcat(path, artGetObjectTypeName(PID_TYPE(pid)));
}
}
2023-07-23 20:50:07 -07:00
// 0x49B424
int target_init()
{
// TODO: Incomplete.
return 0;
}
2023-07-23 21:17:21 -07:00
// 0x49B434
int target_exit()
{
// TODO: Incomplete.
return 0;
}
2023-07-23 22:10:46 -07:00
// 0x49BD98
int pick_rot()
{
int value;
win_get_num_i(&value,
-1,
5,
false,
"Rotation",
100,
100);
return value;
}
2023-07-23 22:13:45 -07:00
// 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;
}
2023-07-23 20:50:07 -07:00
} // namespace fallout