Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brings an actor to link #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/gz/gz_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,22 @@ static void goto_actor_proc(struct menu_item *item, void *data)
z64_actor_t *actor = z64_game.actor_list[adi->type].first;
for (int i = 0; i < adi->index; ++i)
actor = actor->next;
z64_link.common.pos_1 = actor->pos_2;
//z64_link.common.pos_1 = actor->pos_2;
z64_link.common.pos_2 = actor->pos_2;
}
}

static void bring_to_link(struct menu_item* item, void * data)
{
struct actor_debug_info *adi = data;
if (adi->index < z64_game.actor_list[adi->type].length) {
z64_actor_t *actor = z64_game.actor_list[adi->type].first;
for (int i = 0; i < adi->index; ++i)
actor = actor->next;
actor->pos_2 = z64_link.common.pos_2;
}
}

static void toggle_cullzone_proc(struct menu_item *item, void *data)
{
if (gz.cull_view_state != CULLVIEW_INACTIVE &&
Expand Down Expand Up @@ -607,6 +618,7 @@ struct menu *gz_debug_menu(void)
adi.edit_item = item;
menu_add_button(&actors, 0, 5, "kill", &kill_actor_proc, &adi);
menu_add_button(&actors, 10, 5, "go to", &goto_actor_proc, &adi);
menu_add_button(&actors, 10, 12, "bring to link", &bring_to_link, &adi);
menu_add_button(&actors, 17, 5, "cull zone", &toggle_cullzone_proc, &adi);
/* actor spawn controls */
static struct actor_spawn_info asi;
Expand Down