mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 05:10:59 +00:00
Add target_tid_ptr
This commit is contained in:
parent
25a3de62e7
commit
caf28a7286
@ -228,6 +228,24 @@ int target_ptr(int pid, TargetSubNode** subnode_ptr)
|
||||
return target_load(pid, subnode_ptr);
|
||||
}
|
||||
|
||||
// 0x49BD38
|
||||
int target_tid_ptr(int pid, int tid, TargetSubNode** subnode_ptr)
|
||||
{
|
||||
TargetSubNode* subnode;
|
||||
if (target_ptr(pid, &subnode) == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (subnode != NULL) {
|
||||
if (subnode->field_4 == tid) {
|
||||
*subnode_ptr = subnode;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 0x49BD98
|
||||
int pick_rot()
|
||||
{
|
||||
|
@ -56,6 +56,7 @@ int target_header_load();
|
||||
int target_load(int pid, TargetSubNode** subnode_ptr);
|
||||
int target_find_free_subnode(TargetSubNode** subnode_ptr);
|
||||
int target_ptr(int pid, TargetSubNode** subnode_ptr);
|
||||
int target_tid_ptr(int pid, int tid, TargetSubNode** subnode_ptr);
|
||||
int pick_rot();
|
||||
int target_pick_global_var(int* value_ptr);
|
||||
int target_pick_map_var(int* value_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user