Add proto_wall_light_str

This commit is contained in:
Alexander Batalov 2023-07-24 10:57:31 +03:00
parent c5ad0c294f
commit 6ce6639f10
2 changed files with 37 additions and 0 deletions

View File

@ -18,6 +18,16 @@ static void proto_critter_flags_redraw(int win, int pid);
static int proto_critter_flags_modify(int pid);
static int mp_pick_kill_type();
// 0x559B94
static const char* wall_light_strs[] = {
"North/South",
"East/West",
"North Corner",
"South Corner",
"East Corner",
"West Corner",
};
// 0x559C60
bool can_modify_protos = false;
@ -55,6 +65,32 @@ void init_mapper_protos()
// TODO: Incomplete.
}
// 0x495438
const char* proto_wall_light_str(int flags)
{
if ((flags & 0x8000000) != 0) {
return wall_light_strs[1];
}
if ((flags & 0x10000000) != 0) {
return wall_light_strs[2];
}
if ((flags & 0x20000000) != 0) {
return wall_light_strs[3];
}
if ((flags & 0x40000000) != 0) {
return wall_light_strs[4];
}
if ((flags & 0x80000000) != 0) {
return wall_light_strs[5];
}
return wall_light_strs[0];
}
// 0x4960B8
void proto_critter_flags_redraw(int win, int pid)
{

View File

@ -6,6 +6,7 @@ namespace fallout {
extern bool can_modify_protos;
void init_mapper_protos();
const char* proto_wall_light_str(int flags);
int proto_pick_ai_packet(int* value);
} // namespace fallout