mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 14:11:15 +00:00
Add target_remove_all
This commit is contained in:
parent
caf28a7286
commit
96573a7209
@ -214,6 +214,34 @@ int target_find_free_subnode(TargetSubNode** subnode_ptr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 0x49BCBC
|
||||||
|
int target_remove_all()
|
||||||
|
{
|
||||||
|
TargetNode* node;
|
||||||
|
TargetNode* node_next;
|
||||||
|
TargetSubNode* subnode;
|
||||||
|
TargetSubNode* subnode_next;
|
||||||
|
|
||||||
|
node = targetlist.tail;
|
||||||
|
targetlist.tail = NULL;
|
||||||
|
|
||||||
|
while (node != NULL) {
|
||||||
|
node_next = node->next;
|
||||||
|
|
||||||
|
subnode = node->subnode.next;
|
||||||
|
while (subnode != NULL) {
|
||||||
|
subnode_next = subnode->next;
|
||||||
|
internal_free(subnode);
|
||||||
|
subnode = subnode_next;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal_free(node);
|
||||||
|
node = node_next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 0x49BD00
|
// 0x49BD00
|
||||||
int target_ptr(int pid, TargetSubNode** subnode_ptr)
|
int target_ptr(int pid, TargetSubNode** subnode_ptr)
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,7 @@ int target_header_save();
|
|||||||
int target_header_load();
|
int target_header_load();
|
||||||
int target_load(int pid, TargetSubNode** subnode_ptr);
|
int target_load(int pid, TargetSubNode** subnode_ptr);
|
||||||
int target_find_free_subnode(TargetSubNode** subnode_ptr);
|
int target_find_free_subnode(TargetSubNode** subnode_ptr);
|
||||||
|
int target_remove_all();
|
||||||
int target_ptr(int pid, TargetSubNode** subnode_ptr);
|
int target_ptr(int pid, TargetSubNode** subnode_ptr);
|
||||||
int target_tid_ptr(int pid, int tid, TargetSubNode** subnode_ptr);
|
int target_tid_ptr(int pid, int tid, TargetSubNode** subnode_ptr);
|
||||||
int pick_rot();
|
int pick_rot();
|
||||||
|
Loading…
Reference in New Issue
Block a user