From 1f8552aa5113b472a6a1d151329d0b122d5e5678 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 25 Dec 2019 19:47:51 +1000 Subject: [PATCH] Rename functions related to AI commands --- src/files/setup/mp_setupame.c | 2 +- src/files/setup/mp_setuparec.c | 8 +- src/files/setup/mp_setupash.c | 2 +- src/files/setup/mp_setupazt.c | 2 +- src/files/setup/mp_setupcrad.c | 8 +- src/files/setup/mp_setupcryp.c | 8 +- src/files/setup/mp_setupear.c | 2 +- src/files/setup/mp_setupeld.c | 2 +- src/files/setup/mp_setupimp.c | 2 +- src/files/setup/mp_setupjun.c | 6 +- src/files/setup/mp_setuplee.c | 2 +- src/files/setup/mp_setuplen.c | 2 +- src/files/setup/mp_setuplip.c | 2 +- src/files/setup/mp_setuplue.c | 2 +- src/files/setup/mp_setupmp1.c | 8 +- src/files/setup/mp_setupmp10.c | 8 +- src/files/setup/mp_setupmp11.c | 4 +- src/files/setup/mp_setupmp12.c | 8 +- src/files/setup/mp_setupmp13.c | 4 +- src/files/setup/mp_setupmp14.c | 4 +- src/files/setup/mp_setupmp15.c | 8 +- src/files/setup/mp_setupmp16.c | 4 +- src/files/setup/mp_setupmp17.c | 8 +- src/files/setup/mp_setupmp18.c | 4 +- src/files/setup/mp_setupmp19.c | 4 +- src/files/setup/mp_setupmp2.c | 6 +- src/files/setup/mp_setupmp20.c | 4 +- src/files/setup/mp_setupmp3.c | 8 +- src/files/setup/mp_setupmp4.c | 8 +- src/files/setup/mp_setupmp5.c | 8 +- src/files/setup/mp_setupmp6.c | 4 +- src/files/setup/mp_setupmp7.c | 4 +- src/files/setup/mp_setupmp8.c | 4 +- src/files/setup/mp_setupmp9.c | 4 +- src/files/setup/mp_setupoat.c | 6 +- src/files/setup/mp_setuppam.c | 2 +- src/files/setup/mp_setupref.c | 6 +- src/files/setup/mp_setuprit.c | 2 +- src/files/setup/mp_setuprun.c | 8 +- src/files/setup/mp_setupuff.c | 2 +- src/files/setup/mp_setupwax.c | 2 +- src/files/setup/setupame.c | 438 ++++++------ src/files/setup/setuparec.c | 8 +- src/files/setup/setupark.c | 376 +++++------ src/files/setup/setupash.c | 2 +- src/files/setup/setupate.c | 106 +-- src/files/setup/setupazt.c | 304 ++++----- src/files/setup/setupcave.c | 618 ++++++++--------- src/files/setup/setupdam.c | 386 +++++------ src/files/setup/setupdepo.c | 330 +++++----- src/files/setup/setupdish.c | 570 ++++++++-------- src/files/setup/setupear.c | 326 ++++----- src/files/setup/setupeld.c | 362 +++++----- src/files/setup/setupimp.c | 662 +++++++++---------- src/files/setup/setuplee.c | 482 +++++++------- src/files/setup/setuplip.c | 732 ++++++++++----------- src/files/setup/setuplue.c | 394 +++++------ src/files/setup/setupmp3.c | 4 +- src/files/setup/setupmp4.c | 2 +- src/files/setup/setupoat.c | 54 +- src/files/setup/setupold.c | 6 +- src/files/setup/setuppam.c | 666 +++++++++---------- src/files/setup/setuppete.c | 436 ++++++------ src/files/setup/setuprit.c | 660 +++++++++---------- src/files/setup/setupsev.c | 258 ++++---- src/files/setup/setupsho.c | 350 +++++----- src/files/setup/setupstat.c | 198 +++--- src/files/setup/setuptra.c | 498 +++++++------- src/files/setup/setupwax.c | 206 +++--- src/game/chr/chr.c | 22 +- src/game/chr/chraicommands.c | 174 ++--- src/game/game_00c490.c | 10 +- src/game/game_013540.c | 2 +- src/game/game_0601b0.c | 2 +- src/game/game_066310.c | 116 ++-- src/game/game_097a50.c | 38 +- src/game/game_0b0420.c | 14 +- src/game/game_0b28d0.c | 42 +- src/game/game_0c79f0.c | 4 +- src/game/game_0cf150.c | 2 +- src/game/game_0dcdb0.c | 6 +- src/game/game_0f09f0.c | 18 +- src/game/game_102240.c | 18 +- src/game/game_10ccd0.c | 14 +- src/game/game_111600.c | 4 +- src/game/game_129900.c | 6 +- src/game/game_1668e0.c | 4 +- src/game/game_16cfa0.c | 24 +- src/game/game_19c990.c | 6 +- src/game/game_1a3340.c | 2 +- src/include/commands.h | 32 +- src/include/constants.h | 4 +- src/include/game/chr/chr.h | 10 +- src/include/game/chr/chraicommands.h | 18 +- src/include/game/game_066310.h | 32 +- src/include/game/game_097a50.h | 6 +- src/include/game/game_0b0420.h | 4 +- src/include/game/game_0b28d0.h | 6 +- src/include/game/game_0c79f0.h | 4 +- src/include/game/game_0dcdb0.h | 2 +- src/include/game/game_111600.h | 2 +- src/include/game/game_129900.h | 4 +- src/include/game/game_1668e0.h | 2 +- src/include/game/game_16cfa0.h | 16 +- src/include/gunscript.h | 4 +- src/setup/ailists.c | 622 +++++++++--------- src/setup/inventory.c | 950 +++++++++++++-------------- src/setup/setup_000000.c | 18 +- 108 files changed, 5945 insertions(+), 5945 deletions(-) diff --git a/src/files/setup/mp_setupame.c b/src/files/setup/mp_setupame.c index 2e1290806..7f39da922 100644 --- a/src/files/setup/mp_setupame.c +++ b/src/files/setup/mp_setupame.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuparec.c b/src/files/setup/mp_setuparec.c index e1a9eb66a..b46e7cac9 100644 --- a/src/files/setup/mp_setuparec.c +++ b/src/files/setup/mp_setuparec.c @@ -129,16 +129,16 @@ struct path paths[] = { u8 func1001_start_lift[] = { activate_lift(1, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_1b30[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupash.c b/src/files/setup/mp_setupash.c index b7e57c4ff..da91d2bd8 100644 --- a/src/files/setup/mp_setupash.c +++ b/src/files/setup/mp_setupash.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupazt.c b/src/files/setup/mp_setupazt.c index db1c1c95a..431b1378c 100644 --- a/src/files/setup/mp_setupazt.c +++ b/src/files/setup/mp_setupazt.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupcrad.c b/src/files/setup/mp_setupcrad.c index b5c465c53..6cbea5a51 100644 --- a/src/files/setup/mp_setupcrad.c +++ b/src/files/setup/mp_setupcrad.c @@ -121,16 +121,16 @@ struct path paths[] = { u8 func1001_start_lift[] = { activate_lift(1, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_14e0[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupcryp.c b/src/files/setup/mp_setupcryp.c index a0e42665a..0c8da1282 100644 --- a/src/files/setup/mp_setupcryp.c +++ b/src/files/setup/mp_setupcryp.c @@ -118,16 +118,16 @@ struct path paths[] = { u8 func1001_13d4[] = { cmd01b2_mponly(11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_13e0[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupear.c b/src/files/setup/mp_setupear.c index 0f8201431..a5b64d46f 100644 --- a/src/files/setup/mp_setupear.c +++ b/src/files/setup/mp_setupear.c @@ -39,7 +39,7 @@ struct path paths[] = { }; u8 func0000_004c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupeld.c b/src/files/setup/mp_setupeld.c index f9c1bcb74..dd19e0b46 100644 --- a/src/files/setup/mp_setupeld.c +++ b/src/files/setup/mp_setupeld.c @@ -39,7 +39,7 @@ struct path paths[] = { }; u8 func0000_004c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupimp.c b/src/files/setup/mp_setupimp.c index ee97497cf..0e35e809c 100644 --- a/src/files/setup/mp_setupimp.c +++ b/src/files/setup/mp_setupimp.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupjun.c b/src/files/setup/mp_setupjun.c index 8518efaaf..df69958e0 100644 --- a/src/files/setup/mp_setupjun.c +++ b/src/files/setup/mp_setupjun.c @@ -118,15 +118,15 @@ struct path paths[] = { }; u8 unregistered_func1[] = { - endfunction + endlist }; u8 func1000_1898[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuplee.c b/src/files/setup/mp_setuplee.c index 28cab89df..b93153ef2 100644 --- a/src/files/setup/mp_setuplee.c +++ b/src/files/setup/mp_setuplee.c @@ -39,7 +39,7 @@ struct path paths[] = { }; u8 func0000_004c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuplen.c b/src/files/setup/mp_setuplen.c index 9df33a0f4..375ff1cd0 100644 --- a/src/files/setup/mp_setuplen.c +++ b/src/files/setup/mp_setuplen.c @@ -38,7 +38,7 @@ struct path paths[] = { }; u8 func0000_003c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuplip.c b/src/files/setup/mp_setuplip.c index 559150a41..82dbfb25b 100644 --- a/src/files/setup/mp_setuplip.c +++ b/src/files/setup/mp_setuplip.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuplue.c b/src/files/setup/mp_setuplue.c index 4c7001360..d15296204 100644 --- a/src/files/setup/mp_setuplue.c +++ b/src/files/setup/mp_setuplue.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp1.c b/src/files/setup/mp_setupmp1.c index ded61e8f7..6607d08ac 100644 --- a/src/files/setup/mp_setupmp1.c +++ b/src/files/setup/mp_setupmp1.c @@ -146,16 +146,16 @@ struct path paths[] = { u8 func1001_start_lifts[] = { activate_lift(1, 0x01) activate_lift(2, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_21d4[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp10.c b/src/files/setup/mp_setupmp10.c index f5bff144a..9f134da40 100644 --- a/src/files/setup/mp_setupmp10.c +++ b/src/files/setup/mp_setupmp10.c @@ -120,16 +120,16 @@ u8 func1001_start_lifts[] = { activate_lift(1, 0x00) activate_lift(2, 0x01) activate_lift(3, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_1680[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp11.c b/src/files/setup/mp_setupmp11.c index 6ca98d061..40a9cd4a5 100644 --- a/src/files/setup/mp_setupmp11.c +++ b/src/files/setup/mp_setupmp11.c @@ -138,8 +138,8 @@ u8 func1000_26fc[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp12.c b/src/files/setup/mp_setupmp12.c index 72a6410e6..85b181e67 100644 --- a/src/files/setup/mp_setupmp12.c +++ b/src/files/setup/mp_setupmp12.c @@ -189,16 +189,16 @@ u8 func1001_start_lifts[] = { activate_lift(6, 0x06) activate_lift(7, 0x07) activate_lift(8, 0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_3cc8[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp13.c b/src/files/setup/mp_setupmp13.c index ba4098075..94843c091 100644 --- a/src/files/setup/mp_setupmp13.c +++ b/src/files/setup/mp_setupmp13.c @@ -111,8 +111,8 @@ u8 func1000_1368[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp14.c b/src/files/setup/mp_setupmp14.c index e21063b56..ca11078dc 100644 --- a/src/files/setup/mp_setupmp14.c +++ b/src/files/setup/mp_setupmp14.c @@ -37,8 +37,8 @@ u8 unregistered_func1[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp15.c b/src/files/setup/mp_setupmp15.c index ccbd4cf09..ec1d520ff 100644 --- a/src/files/setup/mp_setupmp15.c +++ b/src/files/setup/mp_setupmp15.c @@ -141,16 +141,16 @@ struct path paths[] = { u8 func1001_start_lift[] = { activate_lift(1, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_2400[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp16.c b/src/files/setup/mp_setupmp16.c index a8fa206c5..7ef836cd6 100644 --- a/src/files/setup/mp_setupmp16.c +++ b/src/files/setup/mp_setupmp16.c @@ -36,8 +36,8 @@ u8 unregistered_func1[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp17.c b/src/files/setup/mp_setupmp17.c index 489121961..078abf82d 100644 --- a/src/files/setup/mp_setupmp17.c +++ b/src/files/setup/mp_setupmp17.c @@ -35,16 +35,16 @@ struct path paths[] = { u8 func1001_0038[] = { cmd01b2_mponly(130) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_0044[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp18.c b/src/files/setup/mp_setupmp18.c index e624092bf..8e69f45fc 100644 --- a/src/files/setup/mp_setupmp18.c +++ b/src/files/setup/mp_setupmp18.c @@ -37,8 +37,8 @@ u8 func1000_0038[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp19.c b/src/files/setup/mp_setupmp19.c index 691c606db..50b0a439d 100644 --- a/src/files/setup/mp_setupmp19.c +++ b/src/files/setup/mp_setupmp19.c @@ -37,8 +37,8 @@ u8 func1000_0038[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp2.c b/src/files/setup/mp_setupmp2.c index 6f2242f87..e90277af7 100644 --- a/src/files/setup/mp_setupmp2.c +++ b/src/files/setup/mp_setupmp2.c @@ -37,15 +37,15 @@ struct path paths[] = { }; u8 unregistered_func1[] = { - endfunction + endlist }; u8 unregistered_func2[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp20.c b/src/files/setup/mp_setupmp20.c index 8fcd56972..1b0d02cb3 100644 --- a/src/files/setup/mp_setupmp20.c +++ b/src/files/setup/mp_setupmp20.c @@ -37,8 +37,8 @@ u8 func1000_0038[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp3.c b/src/files/setup/mp_setupmp3.c index 41e74d0bc..52ae3bf0a 100644 --- a/src/files/setup/mp_setupmp3.c +++ b/src/files/setup/mp_setupmp3.c @@ -138,16 +138,16 @@ struct path paths[] = { u8 func1001_27e0[] = { cmd01b2_mponly(15) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_27ec[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp4.c b/src/files/setup/mp_setupmp4.c index 56677bce9..44543a156 100644 --- a/src/files/setup/mp_setupmp4.c +++ b/src/files/setup/mp_setupmp4.c @@ -112,16 +112,16 @@ struct path paths[] = { u8 func1001_1590[] = { cmd01b2_mponly(22) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_159c[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp5.c b/src/files/setup/mp_setupmp5.c index c28775585..d95973178 100644 --- a/src/files/setup/mp_setupmp5.c +++ b/src/files/setup/mp_setupmp5.c @@ -122,16 +122,16 @@ struct path paths[] = { u8 func1001_1dc0[] = { cmd01b2_mponly(8) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_1dcc[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp6.c b/src/files/setup/mp_setupmp6.c index cb7624926..16607ebf8 100644 --- a/src/files/setup/mp_setupmp6.c +++ b/src/files/setup/mp_setupmp6.c @@ -36,8 +36,8 @@ u8 unregistered_func1[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp7.c b/src/files/setup/mp_setupmp7.c index e49243b1d..d037dbbaa 100644 --- a/src/files/setup/mp_setupmp7.c +++ b/src/files/setup/mp_setupmp7.c @@ -37,8 +37,8 @@ u8 func1000_0038[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp8.c b/src/files/setup/mp_setupmp8.c index ebbd9e120..0bd717085 100644 --- a/src/files/setup/mp_setupmp8.c +++ b/src/files/setup/mp_setupmp8.c @@ -37,8 +37,8 @@ u8 func1000_0038[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupmp9.c b/src/files/setup/mp_setupmp9.c index 62e7a224e..876b2adcd 100644 --- a/src/files/setup/mp_setupmp9.c +++ b/src/files/setup/mp_setupmp9.c @@ -125,8 +125,8 @@ u8 func1000_1cf8[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupoat.c b/src/files/setup/mp_setupoat.c index d832522e0..f9d01a485 100644 --- a/src/files/setup/mp_setupoat.c +++ b/src/files/setup/mp_setupoat.c @@ -127,15 +127,15 @@ struct path paths[] = { }; u8 unregistered_func1[] = { - endfunction + endlist }; u8 func1000_1c08[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuppam.c b/src/files/setup/mp_setuppam.c index 015a3ec44..6172790a8 100644 --- a/src/files/setup/mp_setuppam.c +++ b/src/files/setup/mp_setuppam.c @@ -39,7 +39,7 @@ struct path paths[] = { }; u8 func0000_004c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupref.c b/src/files/setup/mp_setupref.c index e57778d9f..bae0e0efc 100644 --- a/src/files/setup/mp_setupref.c +++ b/src/files/setup/mp_setupref.c @@ -125,15 +125,15 @@ struct path paths[] = { }; u8 unregistered_func1[] = { - endfunction + endlist }; u8 func1000_1598[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuprit.c b/src/files/setup/mp_setuprit.c index 04d041608..d21186619 100644 --- a/src/files/setup/mp_setuprit.c +++ b/src/files/setup/mp_setuprit.c @@ -39,7 +39,7 @@ struct path paths[] = { }; u8 func0000_004c[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setuprun.c b/src/files/setup/mp_setuprun.c index 9dec23ae2..8833415cc 100644 --- a/src/files/setup/mp_setuprun.c +++ b/src/files/setup/mp_setuprun.c @@ -34,16 +34,16 @@ struct path paths[] = { }; u8 unregistered_func1[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_func2[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupuff.c b/src/files/setup/mp_setupuff.c index 2baa55686..a098ebb41 100644 --- a/src/files/setup/mp_setupuff.c +++ b/src/files/setup/mp_setupuff.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/mp_setupwax.c b/src/files/setup/mp_setupwax.c index 1b2efe0f2..5109e94e1 100644 --- a/src/files/setup/mp_setupwax.c +++ b/src/files/setup/mp_setupwax.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupame.c b/src/files/setup/setupame.c index c60e080b7..a7e8ebcab 100644 --- a/src/files/setup/setupame.c +++ b/src/files/setup/setupame.c @@ -1018,41 +1018,41 @@ s32 path29[] = { * @unused */ u8 func0401_do_some_animation[] = { - // Do some animation + // Do some chr_do_animation restart_timer - animation(0x0066, 0, 1, 0x04, 0x10, CHR_SELF, 2) + chr_do_animation(0x0066, 0, 1, 0x04, 0x10, CHR_SELF, 2) beginloop(0x08) if_timer_gt(0, /*goto*/ 0x2c) endloop(0x08) label(0x2c) - animation(0x0066, 1, -1, 0x04, 0x10, CHR_SELF, 2) + chr_do_animation(0x0066, 1, -1, 0x04, 0x10, CHR_SELF, 2) beginloop(0x85) endloop(0x85) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * @unregistered */ u8 unregistered_function[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * @unused */ u8 func0402_guard_with_chrflag[] = { - set_return_function(CHR_SELF, 0x0402) + set_returnlist(CHR_SELF, 0x0402) set_self_chrflag(CHRCFLAG_00000200) - set_function(CHR_SELF, GFUNC_UNALERTED_0001) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) + endlist }; /** @@ -1061,8 +1061,8 @@ u8 func0402_guard_with_chrflag[] = { u8 func0403_shielded_guard[] = { set_shield(200) set_self_chrflag(CHRCFLAG_00000200) - set_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_CHOOSE_TARGET) + endlist }; u8 func0404_init_hovercar[] = { @@ -1102,14 +1102,14 @@ u8 func0404_init_hovercar[] = { set_vehicle_speed(0x0d00, 120) endloop(0x04) - endfunction + endlist }; #define do_path(path) \ assign_path(path) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) \ - endfunction \ + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) \ + endlist \ }; @@ -1138,11 +1138,11 @@ u8 func040a_start_path31[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_return_function(CHR_SELF, 0x040a) + set_returnlist(CHR_SELF, 0x040a) assign_path(31) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040b_start_path32[] = { @@ -1156,8 +1156,8 @@ u8 func040b_start_path32[] = { set_shield(0) assign_path(32) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040c_start_path33[] = { @@ -1171,8 +1171,8 @@ u8 func040c_start_path33[] = { set_shield(0) assign_path(33) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040d_start_path34[] = { @@ -1186,35 +1186,35 @@ u8 func040d_start_path34[] = { set_shield(0) assign_path(34) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040e_start_path35[] = { assign_path(35) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0410_init_cass[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_CASS) - endfunction + set_ailist(CHR_SELF, FUNC_CASS) + endlist }; u8 func040f_cass[] = { - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) if_chr_dying(CHR_CASS, /*goto*/ 0x06) if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) // Dying label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) - animation(ANIM_TALKING_00A0, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, 193, 0x18, 0x10, CHR_SELF, 2) // Wait for player to enter room beginloop(0x59) @@ -1249,7 +1249,7 @@ u8 func040f_cass[] = { label(0x5c) speak(CHR_TARGET, 0x0215, 0x0af4, CHANNEL_6, COLOR_04_ORANGE) // "Who are you and what are you doing here?" restart_timer - animation(ANIM_TALKING_0098, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0098, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x5d) if_sound_finished(CHANNEL_6, /*goto*/ 0x5e) @@ -1258,7 +1258,7 @@ u8 func040f_cass[] = { // Walk backwards for 4 seconds label(0x5e) stop_chr - animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0x5f) @@ -1294,7 +1294,7 @@ u8 func040f_cass[] = { label(0x2c) speak(CHR_TARGET, 0x0217, 0x0af5, CHANNEL_6, COLOR_04_ORANGE) // "You won't shoot me, foolish child!" - animation(ANIM_TALKING_00A0, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x66) if_sound_finished(CHANNEL_6, /*goto*/ 0x67) @@ -1314,7 +1314,7 @@ u8 func040f_cass[] = { goto_next(0x68) label(0x2c) - animation(ANIM_TALKING_00A3, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, 193, 0x18, 0x10, CHR_SELF, 2) speak(CHR_TARGET, 0x0218, 0x0af6, CHANNEL_6, COLOR_04_ORANGE) // "Don't you know who I am?" beginloop(0x68) @@ -1366,7 +1366,7 @@ u8 func040f_cass[] = { label(0x2c) speak(CHR_TARGET, 0x0219, 0x0af7, CHANNEL_6, COLOR_04_ORANGE) // "Let's see how you deal with security." label(0x06) - animation(ANIM_PUSH_BUTTON, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_PUSH_BUTTON, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x6a) if_chr_stopped(/*goto*/ 0x06) @@ -1395,7 +1395,7 @@ u8 func040f_cass[] = { label(0x6d) restart_timer say_quip(CHR_TARGET, 0x00, 0xff, 0x00, 0xff, BANK_1, 0x01, 0x04) // "How dare you disturb me","You will regret this intrusion girl","If I were you I'd leave, now" - animation(ANIM_TALKING_00A3, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x6e) if_timer_gt(100, /*goto*/ 0x6f) @@ -1411,13 +1411,13 @@ u8 func040f_cass[] = { label(0x71) goto_first(0x6b) - endfunction + endlist }; u8 func0412_init_secretary[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_SECRETARY) - endfunction + set_ailist(CHR_SELF, FUNC_SECRETARY) + endlist }; u8 func0411_secretary[] = { @@ -1429,16 +1429,16 @@ u8 func0411_secretary[] = { label(0x2c) stop_chr label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) if_chr_dying(CHR_SECRETARY, /*goto*/ 0x06) if_chr_unloaded(CHR_SECRETARY, /*goto*/ 0x06) goto_next(0x2c) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) - animation(0x00a1, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x00a1, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x72) set_target_chr(CHR_BOND) @@ -1474,7 +1474,7 @@ u8 func0411_secretary[] = { if_chr_weapon_equipped(CHR_TARGET, WEAPON_UNARMED, /*goto*/ 0x2c) speak(CHR_TARGET, 0x0216, 0x1aed, CHANNEL_5, COLOR_07_RED) // "Look out! She's got a gun." label(0x2c) - animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x75) if_timer_gt(60, /*goto*/ 0x76) @@ -1489,7 +1489,7 @@ u8 func0411_secretary[] = { endloop(0x77) label(0x78) - animation(ANIM_COWER_01F5, -1, -1, 0x50, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_01F5, -1, -1, 0x50, 0x14, CHR_SELF, 2) beginloop(0x79) if_chr_distance_gt(500, /*goto*/ 0x06) @@ -1499,7 +1499,7 @@ u8 func0411_secretary[] = { label(0x7e) restart_timer - animation(ANIM_COWER_01F5, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_01F5, -1, -1, 0x10, 0x0a, CHR_SELF, 2) yield goto_next(0x81) @@ -1514,14 +1514,14 @@ u8 func0411_secretary[] = { label(0x81) restart_timer say_quip(CHR_TARGET, 0x01, 0xff, 0x00, 0xff, BANK_1, 0x02, 0x07) // "Please don't kill me","Don't shoot!" - animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x10, CHR_SELF, 2) beginloop(0x82) if_timer_gt(180, /*goto*/ 0x83) endloop(0x82) label(0x83) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x14, CHR_SELF, 2) beginloop(0x84) call_rng @@ -1531,7 +1531,7 @@ u8 func0411_secretary[] = { label(0x06) goto_first(0x78) - endfunction + endlist }; u8 func0414_programmer[] = { @@ -1543,11 +1543,11 @@ u8 func0414_programmer[] = { // PA only if_difficulty_gt(DIFF_SA, /*goto*/ 0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) set_reaction_speed(100) - set_onshot_function(FUNC_PROGRAMMER) + set_shotlist(FUNC_PROGRAMMER) set_chr_chrflag(CHR_PROGRAMMER, CHRCFLAG_00000080) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) @@ -1555,7 +1555,7 @@ u8 func0414_programmer[] = { goto_next(0x2c) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) if_num_times_shot_lt(1, /*goto*/ 0x06) @@ -1620,7 +1620,7 @@ u8 func0414_programmer[] = { restart_timer speak(CHR_TARGET, 0x0244, 0x8104, CHANNEL_3, COLOR_03_RED) // "Yes, yes, I agree. Personality is expendable in th..." restart_timer - animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x08) pause_timer @@ -1705,7 +1705,7 @@ u8 func0414_programmer[] = { label(0x06) if_stage_flag_eq(STAGEFLAG_TALKED_TO_PROGRAMMER, TRUE, /*goto*/ 0x06) speak(CHR_TARGET, 0x0224, 0x1300, CHANNEL_3, COLOR_03_RED) // "HELP - Intruder!" - animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0xa3) if_sound_finished(CHANNEL_3, /*goto*/ 0x06) @@ -1752,7 +1752,7 @@ u8 func0414_programmer[] = { set_stage_flag(STAGEFLAG_PROGRAMMER_INJURED) restart_timer unlock_door(OBJ_LAPTOPGUNDOOR, 0x02) - animation(ANIM_COWER_01F5, 0, -1, 0x50, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_01F5, 0, -1, 0x50, 0x10, CHR_SELF, 2) beginloop(0x0d) if_timer_gt(300, /*goto*/ 0xb5) @@ -1803,7 +1803,7 @@ u8 func0414_programmer[] = { endloop(0x9b) label(0x06) - animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x10) if_sound_finished(CHANNEL_3, /*goto*/ 0x06) @@ -1817,7 +1817,7 @@ u8 func0414_programmer[] = { label(0x2c) speak(CHR_TARGET, 0x0249, 0x12fe, CHANNEL_5, COLOR_03_RED) // "Don't shoot, don't shoot!" label(0x06) - animation(ANIM_DONT_SHOOT, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DONT_SHOOT, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x9f) if_sound_finished(CHANNEL_5, /*goto*/ 0x9d) @@ -1861,7 +1861,7 @@ u8 func0414_programmer[] = { label(0x2c) speak(CHR_TARGET, 0x026d, 0x1304, CHANNEL_3, COLOR_03_RED) // "I...I'm logging on now." label(0x06) - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x18, 0x10, CHR_SELF, 2) speak(CHR_TARGET, -1, 0x8116, -1, COLOR_00_GREEN) beginloop(0xae) @@ -1871,7 +1871,7 @@ u8 func0414_programmer[] = { label(0x06) if_stage_flag_eq(STAGEFLAG_PC_DESTROYED, TRUE, /*goto*/ LABEL_PC_BROKEN) - animation(ANIM_PUSH_BUTTON, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_PUSH_BUTTON, 0, 193, 0x18, 0x10, CHR_SELF, 2) set_stage_flag(STAGEFLAG_PROGRAMMER_LOGGED_IN) if_detected_chr(CHR_TARGET, /*goto*/ 0x2c) speak(CHR_TARGET, 0x0229, 0x1302, CHANNEL_3, COLOR_03_RED) // "Okay, I'm in..." @@ -1891,7 +1891,7 @@ u8 func0414_programmer[] = { if_stage_flag_eq(STAGEFLAG_PC_DESTROYED, TRUE, /*goto*/ LABEL_PC_BROKEN) set_stage_flag(STAGEFLAG_PERSONALITY_DELETED) set_chr_health(CHR_SELF, 1) - animation(ANIM_TALKING_003D, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_003D, 0, 193, 0x18, 0x10, CHR_SELF, 2) speak(CHR_TARGET, 0x022a, 0x1303, CHANNEL_3, COLOR_03_RED) // "Goodbye, Dr. Caroll." if_stage_flag_eq(STAGEFLAG_DOWNLOAD_COMPLETE, TRUE, /*goto*/ 0x2c) set_stage_flag(STAGEFLAG_DELETED_WITHOUT_DOWNLOAD) @@ -1902,7 +1902,7 @@ u8 func0414_programmer[] = { endloop(0xb0) label(0xb1) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(LABEL_PC_BROKEN) set_self_flag_bankx(CHRFLAG0_CANT_ALERT_GROUP, BANK_0) @@ -1914,9 +1914,9 @@ u8 func0414_programmer[] = { endloop(0xc6) label(0x06) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1935,16 +1935,16 @@ u8 func1005_give_control[] = { grant_control(CHR_BOND) grant_control(CHR_COOP) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * @unused */ u8 func0415_set_idle[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1962,8 +1962,8 @@ u8 func0413_c318[] = { set_self_chrflag(CHRCFLAG_00000200) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_UNALERTED_0001) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) + endlist }; u8 func100e_check_ecm_mines[] = { @@ -2105,7 +2105,7 @@ u8 func100e_check_ecm_mines[] = { beginloop(0x06) endloop(0x06) - endfunction + endlist }; u8 func1004_check_lab_lift_located[] = { @@ -2139,12 +2139,12 @@ u8 func1004_check_lab_lift_located[] = { label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func1006_check_programmer_dead[] = { @@ -2159,17 +2159,17 @@ u8 func1006_check_programmer_dead[] = { if_stage_flag_eq(STAGEFLAG_PROGRAMMER_LOGGED_IN, TRUE, /*goto*/ 0x06) message(CHR_BOND, 0x0239) // "Critical mission personnel killed." set_stage_flag(STAGEFLAG_PROGRAMMER_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable label(0xac) yield goto_first(0x06) - endfunction + endlist }; u8 func1007_uplinking[] = { @@ -2254,7 +2254,7 @@ u8 func1007_uplinking[] = { message(CHR_TARGET, 0x022d) // "File download completed." yield set_stage_flag(STAGEFLAG_DOWNLOAD_COMPLETE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) message(CHR_TARGET, 0x024a) // "Datalink broken - connection terminated." @@ -2286,7 +2286,7 @@ u8 func1007_uplinking[] = { mute_channel(CHANNEL_6) endloop(0x04) - endfunction + endlist }; u8 func1008_doorswitch[] = { @@ -2298,7 +2298,7 @@ u8 func1008_doorswitch[] = { unset_object_flag_bank1(OBJ_OFFICEDOOR1, OBJECTFLAG1_20000000) unset_object_flag_bank1(OBJ_OFFICEDOOR2, OBJECTFLAG1_20000000) set_stage_flag(STAGEFLAG_OFFICE_DOOR_UNLOCKED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // PA beginloop(0x04) @@ -2325,8 +2325,8 @@ u8 func1008_doorswitch[] = { label(0x06) assign_sound(0x043b, CHANNEL_7) control_sound_from_object(CHANNEL_7, OBJ_OFFICEDOOR1, TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_civilians_killed[] = { @@ -2339,13 +2339,13 @@ u8 func1009_check_civilians_killed[] = { label(0x2c) message(CHR_BOND, 0x0237) // "Unacceptable civilian casualties." set_stage_flag(STAGEFLAG_CIVILIANS_KILLED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x09) message(CHR_BOND, 0x0239) // "Critical mission personnel killed." set_stage_flag(STAGEFLAG_CIVILIANS_KILLED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2371,7 +2371,7 @@ u8 func100a_alarm_guard[] = { label(0xb2) endloop(0x04) - endfunction + endlist }; u8 func100b_lightswitch[] = { @@ -2414,7 +2414,7 @@ u8 func100b_lightswitch[] = { set_lights_state(0x0040, 0x06, 0x00, 0x00, 0x00) endloop(0x04) - endfunction + endlist }; u8 func100c_noop2[] = { @@ -2423,8 +2423,8 @@ u8 func100c_noop2[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100d_check_objects_destroyed[] = { @@ -2470,8 +2470,8 @@ u8 func100d_check_objects_destroyed[] = { // Agent label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_objectives_failed_msg[] = { @@ -2479,8 +2479,8 @@ u8 func1002_objectives_failed_msg[] = { set_chr_chrflag(CHR_CASS, CHRCFLAG_04000000) set_chr_chrflag(CHR_SECRETARY, CHRCFLAG_04000000) set_chr_chrflag(CHR_PROGRAMMER, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; #define wait_for_camera_finished \ @@ -2537,7 +2537,7 @@ u8 func041b_intro_041b[] = { hide_object(OBJ_HOVERCAB3) label(0x36) return - endfunction + endlist }; u8 func041a_intro_041a[] = { @@ -2583,7 +2583,7 @@ u8 func041a_intro_041a[] = { hide_object(OBJ_HOVERTRUCK3) label(0x36) return - endfunction + endlist }; u8 func0419_intro_0419[] = { @@ -2617,7 +2617,7 @@ u8 func0419_intro_0419[] = { hide_object(OBJ_HOVERCAR3) label(0x36) return - endfunction + endlist }; u8 func041c_intro_041c[] = { @@ -2662,7 +2662,7 @@ u8 func041c_intro_041c[] = { hide_object(OBJ_HOVERMOTO3) label(0x36) return - endfunction + endlist }; /** @@ -2695,52 +2695,52 @@ u8 func041d_intro_041d[] = { hide_object(0x1d) label(0x36) return - endfunction + endlist }; /** * @unregistered */ u8 unregistered_function2[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO_041B) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO_041B) + endlist }; /** * @unregistered */ u8 unregistered_function3[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO_041A) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO_041A) + endlist }; /** * @unregistered */ u8 unregistered_function4[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO_0419) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO_0419) + endlist }; /** * @unregistered */ u8 unregistered_function5[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO_041C) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO_041C) + endlist }; /** * @unregistered */ u8 unregistered_function6[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO_041D) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO_041D) + endlist }; /** @@ -2785,33 +2785,33 @@ u8 func0422_intro[] = { goto_first(0x08) label(0x2c) - set_return_function(CHR_SELF, FUNC_INTRO_041E) - set_function(CHR_SELF, FUNC_INTRO_041B) - endfunction + set_returnlist(CHR_SELF, FUNC_INTRO_041E) + set_ailist(CHR_SELF, FUNC_INTRO_041B) + endlist }; u8 func041e_intro_041e[] = { - set_return_function(CHR_SELF, FUNC_INTRO_041F) - set_function(CHR_SELF, FUNC_INTRO_041A) - endfunction + set_returnlist(CHR_SELF, FUNC_INTRO_041F) + set_ailist(CHR_SELF, FUNC_INTRO_041A) + endlist }; u8 func041f_intro_041f[] = { - set_return_function(CHR_SELF, FUNC_INTRO_0420) - set_function(CHR_SELF, FUNC_INTRO_0419) - endfunction + set_returnlist(CHR_SELF, FUNC_INTRO_0420) + set_ailist(CHR_SELF, FUNC_INTRO_0419) + endlist }; u8 func0420_intro_0420[] = { - set_return_function(CHR_SELF, FUNC_INTRO_0421) - set_function(CHR_SELF, FUNC_INTRO_041C) - endfunction + set_returnlist(CHR_SELF, FUNC_INTRO_0421) + set_ailist(CHR_SELF, FUNC_INTRO_041C) + endlist }; u8 func0421_intro_0421[] = { - set_return_function(CHR_SELF, 0x0428) - set_function(CHR_SELF, FUNC_INTRO_041D) - endfunction + set_returnlist(CHR_SELF, 0x0428) + set_ailist(CHR_SELF, FUNC_INTRO_041D) + endlist }; u8 func0422_intro_0423[] = { @@ -2834,8 +2834,8 @@ u8 func0422_intro_0423[] = { hide_object(OBJ_JUMPSHIP1) set_tinted_glass_enabled(FALSE) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0426) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0426) + endlist }; u8 func0422_intro_0424[] = { @@ -2851,7 +2851,7 @@ u8 func0422_intro_0424[] = { set_chr_chrflag(CHR_SECRETARY, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_SECRETARY, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_SECRETARY, CHRHFLAG_00020000) - animation(0x00fe, -1, -1, 0x06, 0x00, CHR_SECRETARY, 4) + chr_do_animation(0x00fe, -1, -1, 0x06, 0x00, CHR_SECRETARY, 4) wait_for_camera_finished @@ -2863,8 +2863,8 @@ u8 func0422_intro_0424[] = { unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_SECRETARY, CHRCFLAG_UNPLAYABLE) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0425) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0425) + endlist }; u8 func0422_intro_0425[] = { @@ -2889,8 +2889,8 @@ u8 func0422_intro_0425[] = { hide_object(OBJ_BANNER1) hide_object(OBJ_BANNER2) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0423) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0423) + endlist }; u8 func0422_intro_0426[] = { @@ -2919,8 +2919,8 @@ u8 func0422_intro_0426[] = { hide_object(OBJ_BANNER1) hide_object(OBJ_BANNER2) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0429) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0429) + endlist }; u8 func0422_intro_0427[] = { @@ -2953,8 +2953,8 @@ u8 func0422_intro_0427[] = { hide_object(OBJ_BANNER1) hide_object(OBJ_BANNER2) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_042A) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_042A) + endlist }; u8 func0422_intro_0428[] = { @@ -2995,8 +2995,8 @@ u8 func0422_intro_0428[] = { unset_object_flag_bank1(OBJ_HOVERCAB1, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank1(OBJ_HOVERCAB2, OBJECTFLAG1_INVISIBLE) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0424) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0424) + endlist }; u8 func0422_intro_0429[] = { @@ -3019,8 +3019,8 @@ u8 func0422_intro_0429[] = { hide_object(OBJ_JUMPSHIP1) set_tinted_glass_enabled(FALSE) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_0427) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_0427) + endlist }; u8 func0422_intro_042a[] = { @@ -3033,7 +3033,7 @@ u8 func0422_intro_042a[] = { object_do_animation(0x0108, OBJ_JUMPSHIP1, 0x04ff, 0xff) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0109, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0109, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, TRUE) show_object(OBJ_ROPE) set_object_flag_bank2(OBJ_ROPE, OBJECTFLAG2_00000010) @@ -3047,8 +3047,8 @@ u8 func0422_intro_042a[] = { hide_object(OBJ_JUMPSHIP1) hide_object(OBJ_ROPE) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_042B) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_042B) + endlist }; u8 func0422_intro_042b[] = { @@ -3061,7 +3061,7 @@ u8 func0422_intro_042b[] = { object_do_animation(0x010c, OBJ_JUMPSHIP1, 0x04ff, 0xff) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x010d, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x010d, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, TRUE) show_object(OBJ_ROPE) set_object_flag_bank2(OBJ_ROPE, OBJECTFLAG2_00000010) @@ -3083,13 +3083,13 @@ u8 func0422_intro_042b[] = { hide_object(OBJ_BANNER1) hide_object(OBJ_BANNER2) label(0x36) - set_function(CHR_SELF, FUNC_INTRO_042C) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_042C) + endlist }; u8 func0422_intro_042c[] = { - set_function(CHR_SELF, FUNC_INTRO_042D) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO_042D) + endlist }; u8 func0422_intro_042d[] = { @@ -3100,7 +3100,7 @@ u8 func0422_intro_042d[] = { set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0156, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0156, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, FALSE) wait_for_camera_finished @@ -3119,12 +3119,12 @@ u8 func0422_intro_042d[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0156, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0156, -2, -1, 0x06, 0x00, CHR_BOND, 2) set_chr_hud_visible(CHR_BOND, FALSE) mute_channel(CHANNEL_7) mute_channel(CHANNEL_6) mute_channel(CHANNEL_5) - set_function(CHR_SECRETARY, FUNC_INIT_SECRETARY) + set_ailist(CHR_SECRETARY, FUNC_INIT_SECRETARY) enter_firstperson set_stage_flag(STAGEFLAG_STOP_INTRO) restart_timer @@ -3137,13 +3137,13 @@ u8 func0422_intro_042d[] = { restart_default_music reset_ambience set_eeprom_flag(EEPROMFLAG_CI_TOUR_DONE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0416_outro_from_menu[] = { - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func0416_outro[] = { @@ -3151,11 +3151,11 @@ u8 func0416_outro[] = { set_music_track(MUSIC_DEFECTION_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x00f3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x00f3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) restart_timer unset_stage_flag(STAGEFLAG_LAB_ELEVATOR_CLOSED) open_door2(OBJ_LABLIFTDOOR1) @@ -3239,21 +3239,21 @@ u8 func0416_outro[] = { label(0xbd) mute_channel(CHANNEL_10) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1000_rebuild_groups[] = { - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1401_setup_counterop[] = { noop016c yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func100f_check_necklace_collected[] = { @@ -3264,13 +3264,13 @@ u8 func100f_check_necklace_collected[] = { label(0x2c) remove_cass_necklace(CHR_CASS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_start_intro[] = { - set_function(CHR_SELF, FUNC_INTRO) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO) + endlist }; u8 func1010_start_hub_humms[] = { @@ -3278,8 +3278,8 @@ u8 func1010_start_hub_humms[] = { play_sound_from_object2(CHANNEL_0, OBJ_SECURITYHUB, 0x8111, 0x0f, 0x02) yield play_sound_from_object2(CHANNEL_1, OBJ_EXTCOMMSHUB, 0x8111, 0x0f, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_check_hubs_activated[] = { @@ -3307,7 +3307,7 @@ u8 func1011_check_hubs_activated[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1012_trigger_x_music[] = { @@ -3327,8 +3327,8 @@ u8 func1012_trigger_x_music[] = { if_stage_flag_eq(STAGEFLAG_LAB_ELEVATOR_CLOSED, TRUE, /*goto*/ 0x2c) play_x_music(CHANNEL_10, 60) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_guard(accuracy, health) \ @@ -3345,8 +3345,8 @@ u8 func1012_trigger_x_music[] = { u8 func0417_init_dd_guard[] = { init_guard(0, 40) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0418_init_shock_guard[] = { @@ -3354,13 +3354,13 @@ u8 func0418_init_shock_guard[] = { // Agent init_guard(10, 40) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // SA and PA label(0x2c) init_guard(20, 40) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0430_init_falcon_guard[] = { @@ -3368,13 +3368,13 @@ u8 func0430_init_falcon_guard[] = { // Agent init_guard(20, 40) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // SA and PA label(0x2c) init_guard(30, 60) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1013_msg_commshubnearby[] = { @@ -3391,8 +3391,8 @@ u8 func1013_msg_commshubnearby[] = { label(0x2c) speak(CHR_BOND, 0x025d, 0x8170, CHANNEL_6, COLOR_09_BLUE) // "We're getting a positive reading - the internal co..." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_msg_officefloor[] = { @@ -3406,8 +3406,8 @@ u8 func1014_msg_officefloor[] = { label(0x2c) speak(CHR_BOND, 0x025e, 0x8171, CHANNEL_6, COLOR_09_BLUE) // "You're on the same floor as Cassandra's office." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_msg_securityroom[] = { @@ -3420,8 +3420,8 @@ u8 func1015_msg_securityroom[] = { label(0x2c) speak(CHR_BOND, 0x025f, 0x73a2, CHANNEL_6, COLOR_09_BLUE) // "The other hub has got to be in the Security Room." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_basementelevator[] = { @@ -3431,19 +3431,19 @@ u8 func1016_msg_basementelevator[] = { label(0x2c) speak(CHR_BOND, 0x0260, 0x8172, CHANNEL_6, COLOR_09_BLUE) // "The basement elevator must be around there somewhe..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_unlock_basement_door[] = { if_difficulty_lt(DIFF_SA, /*goto*/ 0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Agent only - unlock basement door (SA and PA requires necklace) label(0x2c) unlock_door(OBJ_SECRETDOOR, 0x20) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3533,7 +3533,7 @@ u8 func0422_intro_speaking[] = { mute_channel(CHANNEL_6) goto_first(0xbe) - endfunction + endlist }; /** @@ -3587,23 +3587,23 @@ u8 func1019_toggle_guards[] = { show_chr(0x15) yield show_chr(0x16) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_noop[] = { yield yield yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func141c_start_lifts[] = { activate_lift(2, OBJ_LIFT1) activate_lift(1, OBJ_LIFT2) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_disable_cameras[] = { @@ -3670,8 +3670,8 @@ u8 func101d_disable_cameras[] = { label(0x06) message(CHR_BOND, 0x0261) // "Security system is now back online." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3679,8 +3679,8 @@ u8 func101d_disable_cameras[] = { */ u8 unregistered_function7[] = { message(CHR_BOND, 0x0263) // "2023 AD, 2214 Hours Lucerne Tower - dataDyne HQ" - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_lift_door_sounds[] = { @@ -3707,7 +3707,7 @@ u8 func101e_lift_door_sounds[] = { label(0x06) endloop(0xc4) - endfunction + endlist }; /** @@ -3716,8 +3716,8 @@ u8 func101e_lift_door_sounds[] = { u8 func042e_init_surrendering_guard[] = { label(0xc4) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_SURRENDERING_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_SURRENDERING_GUARD) + endlist }; /** @@ -3737,7 +3737,7 @@ u8 func042f_surrendering_guard[] = { // Be surprised label(0x2c) say_quip(CHR_BOND, 0x12, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "What the?!","Who the?!" - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) // Wait 1 second beginloop(0x08) @@ -3797,8 +3797,8 @@ u8 func042f_surrendering_guard[] = { // Surrender label(0x28) surrender - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_setup_rtracker[] = { @@ -3806,8 +3806,8 @@ u8 func101f_setup_rtracker[] = { set_object_flag_bank2(OBJ_FALCONSIL1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_FALCONSIL2, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_LAPTOPGUN, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1420_setup_portals[] = { @@ -3922,8 +3922,8 @@ u8 func1420_setup_portals[] = { set_portal_flag(0x00f0, 0x08) set_portal_flag(0x00f8, 0x08) set_portal_flag(0x00f1, 0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1421_setup_lighting[] = { @@ -3960,13 +3960,13 @@ u8 func1421_setup_lighting[] = { misc_command(0x00a4, 0x06, 0x01) misc_command(0x00a5, 0x06, 0x01) misc_command(0x00a7, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function8[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuparec.c b/src/files/setup/setuparec.c index 2727f81f9..97a455924 100644 --- a/src/files/setup/setuparec.c +++ b/src/files/setup/setuparec.c @@ -26,13 +26,13 @@ u8 props[] = { }; u8 unregistered_func1[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_func2[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 intro[] = { diff --git a/src/files/setup/setupark.c b/src/files/setup/setupark.c index f32b7e7b5..d31a07ffe 100644 --- a/src/files/setup/setupark.c +++ b/src/files/setup/setupark.c @@ -521,24 +521,24 @@ u8 func0403_stop_and_idle[] = { beginloop(0x00) endloop(0x00) - endfunction + endlist }; u8 func0404_init_drcaroll[] = { set_self_chrflag(CHRCFLAG_01000000) set_shield(100) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_start_drcaroll[] = { stop_chr - set_function(CHR_SELF, FUNC_DRCAROLL_FOLLOWING) - endfunction + set_ailist(CHR_SELF, FUNC_DRCAROLL_FOLLOWING) + endlist }; u8 func0401_drcaroll_following[] = { - set_onshot_function(FUNC_DRCAROLL_FOLLOWING) + set_shotlist(FUNC_DRCAROLL_FOLLOWING) set_self_chrflag(CHRCFLAG_00040000) stop_chr set_target_chr(CHR_BOND) @@ -552,7 +552,7 @@ u8 func0401_drcaroll_following[] = { goto_next(0x20) label(0x00) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x0b) @@ -561,8 +561,8 @@ u8 func0401_drcaroll_following[] = { label(0x00) say_quip(CHR_TARGET, 0x06, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) set_target_chr(CHR_BOND) set_shield(100) set_chr_health(CHR_SELF, 100) @@ -667,8 +667,8 @@ u8 func0401_drcaroll_following[] = { goto_first(0x02) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -681,7 +681,7 @@ u8 func0405_drcaroll_waiting[] = { goto_next(0x00) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) dprint 'D','R',' ','C','H','A','N','G','E','L','I','S','T','\n',0, @@ -696,8 +696,8 @@ u8 func0405_drcaroll_waiting[] = { endloop(0x1f) label(0x00) - set_function(CHR_SELF, FUNC_DRCAROLL_FOLLOWING) - endfunction + set_ailist(CHR_SELF, FUNC_DRCAROLL_FOLLOWING) + endlist }; u8 func100c_foyer_lights_timer[] = { @@ -717,7 +717,7 @@ u8 func100c_foyer_lights_timer[] = { // Agent label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable set_countdown_timer(60) @@ -781,12 +781,12 @@ u8 func100c_foyer_lights_timer[] = { set_lights_state(0x0013, 0x01, 0x64, 0x00, 0x00) set_lights_state(0x0014, 0x01, 0x64, 0x00, 0x00) set_lights_state(0x000d, 0x01, 0x64, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0410_init_top_guard[] = { - set_onshot_function(FUNC_TOP_GUARD) + set_shotlist(FUNC_TOP_GUARD) if_difficulty_lt(DIFF_SA, /*goto*/ 0x20) // SA and PA @@ -815,8 +815,8 @@ u8 func0410_init_top_guard[] = { endloop(0x8d) label(0x20) - set_function(CHR_SELF, FUNC_TOP_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_TOP_GUARD) + endlist }; u8 func040f_top_guard[] = { @@ -841,12 +841,12 @@ u8 func040f_top_guard[] = { endloop(0x1f) label(0x00) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) label(0x20) set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) + endlist }; u8 func0411_top_guard_blinded[] = { @@ -856,10 +856,10 @@ u8 func0411_top_guard_blinded[] = { goto_next(0x00) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) - animation(ANIM_BLINDED, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_BLINDED, 0, -1, 0x10, 0x10, CHR_SELF, 2) say_quip(CHR_BOND, 0x11, 0x64, 0x02, 0xff, BANK_1, 0x00, 0x00) beginloop(0x1f) @@ -867,18 +867,18 @@ u8 func0411_top_guard_blinded[] = { endloop(0x1f) label(0x00) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) + endlist }; u8 func0406_general_combat[] = { set_self_chrflag(CHRCFLAG_00000040) - set_onshot_function(FUNC_GENERAL_COMBAT) + set_shotlist(FUNC_GENERAL_COMBAT) if_has_gun(CHR_SELF, /*goto*/ 0x20) // No gun - set_onshot_function(GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Has gun label(0x20) @@ -889,7 +889,7 @@ u8 func0406_general_combat[] = { // Dying - wait a few frames then say quip label(0x00) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x0b) @@ -898,8 +898,8 @@ u8 func0406_general_combat[] = { label(0x00) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive with gun label(0x20) @@ -1074,20 +1074,20 @@ u8 func0406_general_combat[] = { try_jog_to_target_chr(/*goto*/ 0x20) label(0x20) dprint 'U','N',' ','E','N','T','R','Y','\n',0, - set_return_function(CHR_SELF, FUNC_GENERAL_COMBAT) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, FUNC_GENERAL_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x2a) label(0x20) if_chr_lost_track_of_target_maybe(/*goto*/ 0x20) - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) - set_return_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x20) - set_onshot_function(GFUNC_ALERTED) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_shotlist(GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0408_hovercopter[] = { @@ -1313,7 +1313,7 @@ u8 func0408_hovercopter[] = { hovercopter_fire_rocket(1) // right side goto_first(0x4e) - endfunction + endlist }; u8 func1002_check_accessed_foyer_elevator[] = { @@ -1328,8 +1328,8 @@ u8 func1002_check_accessed_foyer_elevator[] = { label(0x00) set_stage_flag(STAGEFLAG_ACCESSED_FOYER_ELEVATOR) message(CHR_TARGET, 0x0621) // "Foyer elevator accessed." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_check_end_level[] = { @@ -1365,12 +1365,12 @@ u8 func1003_check_end_level[] = { label(0x20) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func1004_elevator_unlocking[] = { @@ -1378,7 +1378,7 @@ u8 func1004_elevator_unlocking[] = { if_difficulty_gt(DIFF_SA, /*goto*/ 0x1f) unlock_door(0x02, 0x01) unlock_door(0x03, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x1f) chr_toggle_p1p2(CHR_SELF) @@ -1395,7 +1395,7 @@ u8 func1004_elevator_unlocking[] = { set_stage_flag(STAGEFLAG_ELEVATOR_PC_DESTROYED) message(CHR_BOND, 0x062d) // "Critical mission object destroyed." label(0x00) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Computer activated label(0x20) @@ -1440,8 +1440,8 @@ u8 func1004_elevator_unlocking[] = { unlock_door(0x03, 0x01) message(CHR_TARGET, 0x0622) // "Office elevator door has been unlocked." set_stage_flag(STAGEFLAG_ELEVATOR_UNLOCKED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_check_bodyguards_dead[] = { @@ -1484,8 +1484,8 @@ u8 func1005_check_bodyguards_dead[] = { label(0x26) message(CHR_BOND, 0x0624) // "Cassandra's bodyguards have been defeated." set_stage_flag(STAGEFLAG_OBJECTIVE_BODYGUARDS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_check_hovercopter_destroyed[] = { @@ -1495,13 +1495,13 @@ u8 func1006_check_hovercopter_destroyed[] = { if_object_in_good_condition(OBJ_HOVERCOPTER, /*goto*/ 0x00) message(CHR_BOND, 0x0623) // "DataDyne Hovercopter eliminated." set_stage_flag(STAGEFLAG_HOVERCOPTER_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) endloop(0x1f) label(0x26) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_drcaroll_warnings[] = { @@ -1528,7 +1528,7 @@ u8 func100e_drcaroll_warnings[] = { label(0x00) message(CHR_BOND, 0x0610) // "Dr. Caroll has been killed!" set_stage_flag(STAGEFLAG_DRCAROLL_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Shield under 100 label(0x30) @@ -1541,12 +1541,12 @@ u8 func100e_drcaroll_warnings[] = { set_stage_flag(STAGEFLAG_DRCAROLL_DAMAGED) endloop(0x1f) - endfunction + endlist }; u8 func1007_noop[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_trigger_hovercopter_roof[] = { @@ -1565,8 +1565,8 @@ u8 func1008_trigger_hovercopter_roof[] = { label(0x21) set_stage_flag(STAGEFLAG_CHOPPER_GO_TO_ROOF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_init_top_room[] = { @@ -1616,18 +1616,18 @@ u8 func1009_init_top_room[] = { label(0x20) set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040b_init_tech1[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, 0x0409) - endfunction + set_ailist(CHR_SELF, 0x0409) + endlist }; u8 func0409_tech_conversation[] = { - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) beginloop(0x01) chr_toggle_p1p2(CHR_SELF) @@ -1652,9 +1652,9 @@ u8 func0409_tech_conversation[] = { unset_chr_chrflag(CHR_TECH1, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_TECH2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_RLSHOCK, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_RLSHOCK, GFUNC_UNALERTED) + set_ailist(CHR_RLSHOCK, GFUNC_UNALERTED) restart_timer - animation(0x0204, -1, -1, 0x02, 0x14, 0x10, 2) + chr_do_animation(0x0204, -1, -1, 0x02, 0x14, 0x10, 2) beginloop(0x28) if_saw_injury(0x00, /*goto*/ 0x33) @@ -1664,7 +1664,7 @@ u8 func0409_tech_conversation[] = { label(0x20) dprint 'T','E','C','H',' ','2',' ','L','O','O','P','\n',0, - animation(ANIM_TALKING_00A0, 0, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, -1, 0x10, 0x14, CHR_SELF, 2) speak(CHR_PRESET, 0x0625, 0x811d, CHANNEL_7, COLOR_06_WHITE) // "That's not how it goes." restart_timer @@ -1685,8 +1685,8 @@ u8 func0409_tech_conversation[] = { goto_first(0x21) label(0x20) - animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) - animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, 0x10, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, 0x10, 2) speak(CHR_PRESET, 0x0626, 0x8120, CHANNEL_7, COLOR_08_RED) // "Yes, it is." beginloop(0x22) @@ -1706,8 +1706,8 @@ u8 func0409_tech_conversation[] = { endloop(0x22) label(0x20) - animation(ANIM_TALKING_00A0, 0, -1, 0x10, 0x14, CHR_SELF, 2) - animation(0x0205, -1, -1, 0x02, 0x14, 0x10, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(0x0205, -1, -1, 0x02, 0x14, 0x10, 2) speak(CHR_PRESET, 0x0627, 0x811e, CHANNEL_7, COLOR_06_WHITE) // "Give it to me - you're doing it wrong." beginloop(0x23) @@ -1727,8 +1727,8 @@ u8 func0409_tech_conversation[] = { endloop(0x23) label(0x20) - animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) - animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, 0x10, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, 0x10, 2) speak(CHR_PRESET, 0x0628, 0x8121, CHANNEL_7, COLOR_08_RED) // "Stop annoying me." beginloop(0x24) @@ -1748,9 +1748,9 @@ u8 func0409_tech_conversation[] = { endloop(0x24) label(0x20) - animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) - animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, CHR_RLSHOCK, 2) - animation(0x0206, -1, -1, 0x02, 0x14, 0x10, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, -1, -1, 0x02, 0x14, CHR_RLSHOCK, 2) + chr_do_animation(0x0206, -1, -1, 0x02, 0x14, 0x10, 2) speak(CHR_PRESET, 0x0629, 0x8123, CHANNEL_7, COLOR_09_BLUE) // "Will you just hurry up!" beginloop(0x25) @@ -1792,7 +1792,7 @@ u8 func0409_tech_conversation[] = { open_door(0x04) restart_timer speak(CHR_TARGET, 0x062a, 0x811f, CHANNEL_7, COLOR_06_WHITE) // "Oh, no...too late." - animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x34) if_timer_gt(60, /*goto*/ 0x35) @@ -1808,10 +1808,10 @@ u8 func0409_tech_conversation[] = { label(0x37) restart_timer surrender - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x38) if_chr_idle(/*goto*/ 0x5e) @@ -1826,24 +1826,24 @@ u8 func0409_tech_conversation[] = { label(0x00) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_cass_necklace[] = { remove_cass_necklace(CHR_CASS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_init_tech2[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, 0x040a) - endfunction + set_ailist(CHR_SELF, 0x040a) + endlist }; u8 func040a_tech2[] = { - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) stop_chr beginloop(0x1f) @@ -1873,18 +1873,18 @@ u8 func040a_tech2[] = { open_door(0x04) yield restart_timer - animation(0x0205, 0, -1, 0x18, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0205, 0, -1, 0x18, 0x0a, CHR_SELF, 2) // @bug: Duplicate label. I suspect the goto first 0x21 below is // supposed to go here. The only possible side effect is the tech may - // restart his animation repeatedly. + // restart his chr_do_animation repeatedly. label(0x21) yield if_sound_finished(CHANNEL_7, /*goto*/ 0x20) endloop(0x21) label(0x20) - animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x0a, CHR_SELF, 2) speak(CHR_TARGET, 0x062b, 0x8122, CHANNEL_7, COLOR_08_RED) // "She's here..." beginloop(0x22) @@ -1901,10 +1901,10 @@ u8 func040a_tech2[] = { label(0x37) restart_timer surrender - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x38) if_chr_idle(/*goto*/ 0x5e) @@ -1919,8 +1919,8 @@ u8 func040a_tech2[] = { label(0x00) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_cass[] = { @@ -1970,7 +1970,7 @@ u8 func040d_cass[] = { if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x20) if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x20) - set_function(CHR_DRCAROLL, 0x0405) + set_ailist(CHR_DRCAROLL, 0x0405) label(0x20) goto_next(0x00) @@ -1986,7 +1986,7 @@ u8 func040d_cass[] = { label(0x00) restart_timer speak(CHR_TARGET, 0x0620, 0x80ff, CHANNEL_6, COLOR_04_ORANGE) // "We meet again, girl!" - animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x27) if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x5b) @@ -1996,7 +1996,7 @@ u8 func040d_cass[] = { label(0x00) restart_timer speak(CHR_TARGET, 0x0614, 0x80fe, CHANNEL_6, COLOR_04_ORANGE) // "You've become quite an annoyance..." - animation(ANIM_TALKING_00A3, 0, 193, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, 193, 0x10, 0x14, CHR_SELF, 2) beginloop(0x28) if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x5b) @@ -2012,13 +2012,13 @@ u8 func040d_cass[] = { label(0x20) speak(CHR_TARGET, 0x062c, 0x8101, CHANNEL_6, COLOR_04_ORANGE) // "Get her!" - animation(ANIM_TALKING_00A3, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, 193, 0x10, 0x10, CHR_SELF, 2) goto_next(0x20) label(0x00) restart_timer speak(CHR_TARGET, 0x0615, 0x8100, CHANNEL_6, COLOR_04_ORANGE) // "Good night, Ms. Dark." - animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A0, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x2a) if_timer_gt(150, /*goto*/ 0x20) @@ -2096,8 +2096,8 @@ u8 func040d_cass[] = { dprint 'M','O','V','E',' ','G','O','O','D','\n',0, try_face_entity(0x0200, 0x0000, /*goto*/ 0x20) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_unlock_top_door[] = { @@ -2109,16 +2109,16 @@ u8 func101f_unlock_top_door[] = { label(0x20) unlock_door(OBJ_TOPROOMDOOR, 0x02) unset_object_flag_bank1(OBJ_TOPROOMDOOR, OBJECTFLAG1_20000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * @unused */ u8 func040e_noop2[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_lightswitch[] = { @@ -2158,7 +2158,7 @@ u8 func100a_lightswitch[] = { set_lights_state(0x0040, 0x06, 0x00, 0x00, 0x00) endloop(0x1f) - endfunction + endlist }; u8 func100b_check_top_lights_on[] = { @@ -2175,13 +2175,13 @@ u8 func100b_check_top_lights_on[] = { label(0x20) set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED) - set_function(CHR_TOPGUARD1, FUNC_TOP_GUARD_BLINDED) - set_function(CHR_TOPGUARD2, FUNC_TOP_GUARD_BLINDED) - set_function(CHR_TOPGUARD3, FUNC_TOP_GUARD_BLINDED) - set_function(CHR_TOPGUARD4, FUNC_TOP_GUARD_BLINDED) - set_function(CHR_TOPGUARD5, FUNC_TOP_GUARD_BLINDED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_TOPGUARD1, FUNC_TOP_GUARD_BLINDED) + set_ailist(CHR_TOPGUARD2, FUNC_TOP_GUARD_BLINDED) + set_ailist(CHR_TOPGUARD3, FUNC_TOP_GUARD_BLINDED) + set_ailist(CHR_TOPGUARD4, FUNC_TOP_GUARD_BLINDED) + set_ailist(CHR_TOPGUARD5, FUNC_TOP_GUARD_BLINDED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_foyer_lights[] = { @@ -2283,8 +2283,8 @@ u8 func100c_foyer_lights[] = { set_lights_state(0x0013, 0x01, 0x02, 0x00, 0x00) set_lights_state(0x0014, 0x01, 0x02, 0x00, 0x00) set_lights_state(0x000d, 0x01, 0x02, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1400_setup_counterop[] = { @@ -2292,8 +2292,8 @@ u8 func1400_setup_counterop[] = { set_chr_team(CHR_ANTI, TEAM_ENEMY) give_object_to_chr(OBJ_NIGHTVISION, CHR_BOND) give_object_to_chr(OBJ_NIGHTVISION, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func100d_intro[] = { @@ -2304,13 +2304,13 @@ u8 func100d_intro[] = { set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0139, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0139, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(0x00, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x00, CHRHFLAG_00020000) - animation(0x013d, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) + chr_do_animation(0x013d, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000) - animation(0x013a, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) + chr_do_animation(0x013a, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) unset_stage_flag(STAGEFLAG_00800000) restart_timer fade_to_color(0x000000ff, 0) @@ -2382,28 +2382,28 @@ u8 func100d_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0139, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0139, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000) - animation(0x013d, -2, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x013d, -2, -1, 0x06, 0x00, CHR_DRCAROLL, 2) unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_00010000) - animation(0x013a, -2, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) + chr_do_animation(0x013a, -2, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) restart_default_music reset_ambience enter_firstperson yield - animation(0x020c, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) - set_function(CHR_DRCAROLL, 0x0402) + chr_do_animation(0x020c, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) + set_ailist(CHR_DRCAROLL, 0x0402) yield kill(CHR_INTRO_GUARD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_outro[] = { @@ -2412,7 +2412,7 @@ u8 func0412_outro[] = { camera_movement(0x0157) set_object_flag_bank1(OBJ_HOVERCOPTER, OBJECTFLAG1_INVISIBLE) hide_object(OBJ_HOVERCOPTER) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) dprint 'c','u','t',' ','s','c','e','n','e',' ','2',0, @@ -2424,45 +2424,45 @@ u8 func0412_outro[] = { set_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_DRCAROLL, GFUNC_IDLE) + set_ailist(CHR_DRCAROLL, GFUNC_IDLE) set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000) - animation(0x015d, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) + chr_do_animation(0x015d, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) - set_function(CHR_CASS, FUNC_CASS_OUTRO) + set_ailist(CHR_CASS, FUNC_CASS_OUTRO) set_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000) - animation(0x0159, -1, -1, 0x06, 0x00, CHR_CASS, 4) + chr_do_animation(0x0159, -1, -1, 0x06, 0x00, CHR_CASS, 4) - set_function(CHR_MRBLONDE, GFUNC_IDLE) + set_ailist(CHR_MRBLONDE, GFUNC_IDLE) set_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_MRBLONDE, CHRHFLAG_00020000) - animation(0x015a, -1, -1, 0x06, 0x00, CHR_MRBLONDE, 4) + chr_do_animation(0x015a, -1, -1, 0x06, 0x00, CHR_MRBLONDE, 4) - set_function(CHR_OUTRO_GUARD1, GFUNC_IDLE) + set_ailist(CHR_OUTRO_GUARD1, GFUNC_IDLE) set_chr_chrflag(CHR_OUTRO_GUARD1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_OUTRO_GUARD1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_OUTRO_GUARD1, CHRHFLAG_00020000) - animation(0x015b, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD1, 4) + chr_do_animation(0x015b, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD1, 4) - set_function(CHR_OUTRO_GUARD2, GFUNC_IDLE) + set_ailist(CHR_OUTRO_GUARD2, GFUNC_IDLE) set_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_OUTRO_GUARD2, CHRHFLAG_00020000) - animation(0x015c, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD2, 4) + chr_do_animation(0x015c, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD2, 4) show_object(OBJ_JUMPSHIP) set_object_flag_bank2(OBJ_JUMPSHIP, OBJECTFLAG2_00000010) set_object_flag_bank1(OBJ_JUMPSHIP, OBJECTFLAG1_04000000) object_do_animation(0x015e, OBJ_JUMPSHIP, 0x04ff, 0xff) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0158, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0158, -1, -1, 0x06, 0x00, CHR_P1P2, 4) show_nonessential_chrs(FALSE) restart_timer set_cutscene_weapon(CHR_P1P2, -1, -1) @@ -2618,8 +2618,8 @@ u8 func0412_outro[] = { label(0x5d) hide_object(OBJ_JUMPSHIP) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0413_defend_pad[] = { @@ -2630,7 +2630,7 @@ u8 func0413_defend_pad[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_onshot_function(FUNC_GENERAL_COMBAT) + set_shotlist(FUNC_GENERAL_COMBAT) beginloop(0x1f) chr_toggle_p1p2(CHR_SELF) @@ -2641,7 +2641,7 @@ u8 func0413_defend_pad[] = { endloop(0x1f) label(0x21) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) label(0x22) go_to_target_pad(SPEED_RUN) @@ -2653,34 +2653,34 @@ u8 func0413_defend_pad[] = { endloop(0x23) label(0x00) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) + endlist }; u8 func100f_move_rocket_ammo[] = { if_difficulty_lt(DIFF_SA, /*goto*/ 0x00) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Agent only label(0x00) move_object_to_pad(OBJ_ROCKETAMMO1, 0x000f) move_object_to_pad(OBJ_ROCKETAMMO2, 0x000d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_cass_outro[] = { set_shield(0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1001_objectives_failed_msg[] = { yield set_chr_chrflag(CHR_TECH1, CHRCFLAG_04000000) set_chr_chrflag(CHR_TECH2, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func0414_init_shock[] = { @@ -2691,8 +2691,8 @@ u8 func0414_init_shock[] = { set_armor(0) set_recovery_speed(10) set_shield(0) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) + endlist }; /** @@ -2706,8 +2706,8 @@ u8 func0415_init_10hp[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_GENERAL_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_GENERAL_COMBAT) + endlist }; u8 func1012_msg_lockeddown[] = { @@ -2717,8 +2717,8 @@ u8 func1012_msg_lockeddown[] = { label(0x20) speak(CHR_BOND, 0x0633, 0x8176, CHANNEL_6, COLOR_09_BLUE) // "They've locked down the ground floor - get to the ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_msg_thatcopter[] = { @@ -2739,8 +2739,8 @@ u8 func1013_msg_thatcopter[] = { speak(CHR_BOND, 0x0634, 0x8177, CHANNEL_6, COLOR_09_BLUE) // "That copter needs to be taken out, or the jumpship..." label(0x26) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_msg_cantleaveany[] = { @@ -2777,12 +2777,12 @@ u8 func1014_msg_cantleaveany[] = { endloop(0x5f) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x27) mute_channel(CHANNEL_6) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_msg_jumpshipwaiting[] = { @@ -2799,8 +2799,8 @@ u8 func1015_msg_jumpshipwaiting[] = { speak(CHR_BOND, 0x0636, 0x8178, CHANNEL_6, COLOR_09_BLUE) // "Don't keep the jumpship waiting - get back to the ..." label(0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_make_foyer_guards_alerted[] = { @@ -2812,7 +2812,7 @@ u8 func1016_msg_make_foyer_guards_alerted[] = { if_chr_death_animation_finished(chr, /*goto*/ 0x20) \ if_chr_dying(chr, /*goto*/ 0x20) \ if_chr_unloaded(chr, /*goto*/ 0x20) \ - set_function(chr, GFUNC_ALERTED) \ + set_ailist(chr, GFUNC_ALERTED) \ increase_chr_alertness(100, chr) \ label(0x20) @@ -2830,8 +2830,8 @@ u8 func1016_msg_make_foyer_guards_alerted[] = { if_alive_set_alerted(0x09) if_alive_set_alerted(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_remove_special_shock[] = { @@ -2899,12 +2899,12 @@ u8 func1017_remove_special_shock[] = { endloop(0x1f) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) remove_chr(CHR_SPECIAL_SHOCK) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_give_magnum[] = { @@ -2915,15 +2915,15 @@ u8 func1018_give_magnum[] = { // This seems wrong. The magnum is actually given to the special shock... label(0x00) give_object_to_chr(OBJ_DY357, CHR_MRBLONDE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1419_start_lifts[] = { activate_lift(2, 0x1d) activate_lift(1, 0x1e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_set_rocketlauncher_flag[] = { @@ -2934,8 +2934,8 @@ u8 func101a_set_rocketlauncher_flag[] = { set_object_flag_bank1(OBJ_ROCKETLAUNCHER, OBJECTFLAG1_20000000) label(0x20) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101b_lift_door_sounds[] = { @@ -2975,7 +2975,7 @@ u8 func101b_lift_door_sounds[] = { label(0x00) endloop(0x8d) - endfunction + endlist }; u8 func141c_setup_portals[] = { @@ -3090,8 +3090,8 @@ u8 func141c_setup_portals[] = { set_portal_flag(0x00f0, 0x08) set_portal_flag(0x00f8, 0x08) set_portal_flag(0x00f1, 0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func141e_setup_lighting[] = { @@ -3128,16 +3128,16 @@ u8 func141e_setup_lighting[] = { misc_command(0x00a4, 0x06, 0x01) misc_command(0x00a5, 0x06, 0x01) misc_command(0x00a7, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_GRENADE, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_DRAGON, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupash.c b/src/files/setup/setupash.c index b7e57c4ff..da91d2bd8 100644 --- a/src/files/setup/setupash.c +++ b/src/files/setup/setupash.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupate.c b/src/files/setup/setupate.c index 0d4557e54..c62b6ab70 100644 --- a/src/files/setup/setupate.c +++ b/src/files/setup/setupate.c @@ -85,14 +85,14 @@ struct path paths[] = { u8 func1000_counterop_setup[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1001_objectives_failed[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1002_first_walk[] = { @@ -103,7 +103,7 @@ u8 func1002_first_walk[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) display_text(0x00, COLOR_02_WHITE, 0x5e07) // "THE DUEL" - animation(ANIM_RELOAD, -1, -1, 0x06, 0x00, CHR_GUARD, 2) + chr_do_animation(ANIM_RELOAD, -1, -1, 0x06, 0x00, CHR_GUARD, 2) label(0x2d) message(CHR_BOND, 0x5e0c) // "Opponent skill level: AGENT" @@ -131,9 +131,9 @@ u8 func1002_first_walk[] = { label(0x0c) grant_control(CHR_BOND) - set_function(CHR_GUARD, FUNC_GUARD_COMBAT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_GUARD, FUNC_GUARD_COMBAT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_second_walk[] = { @@ -146,14 +146,14 @@ u8 func1007_second_walk[] = { // Begin cutscene label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) revoke_control(CHR_BOND, 0) camera_movement(0x0488) // Place chrs label(0x8f) - set_function(CHR_P1P2, FUNC_MOVE_TO_PAD) + set_ailist(CHR_P1P2, FUNC_MOVE_TO_PAD) chr_move_to_pad(CHR_JONATHAN, 0x0279, 0x01, /*goto*/ 0x2d) yield goto_first(0x8f) @@ -166,7 +166,7 @@ u8 func1007_second_walk[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(ANIM_GRAB_CROTCH, -1, -1, 0x06, 0x00, CHR_JONATHAN, 2) + chr_do_animation(ANIM_GRAB_CROTCH, -1, -1, 0x06, 0x00, CHR_JONATHAN, 2) label(0x2d) message(CHR_BOND, 0x5e0d) // "Opponent skill level: SPECIAL AGENT" @@ -202,9 +202,9 @@ u8 func1007_second_walk[] = { // Give control back to Jo label(0x0c) grant_control(CHR_BOND) - set_function(CHR_JONATHAN, FUNC_JON_COMBAT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_JONATHAN, FUNC_JON_COMBAT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0401_move_to_pad[] = { @@ -212,8 +212,8 @@ u8 func0401_move_to_pad[] = { label(0x06) yield stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_third_walk[] = { @@ -226,7 +226,7 @@ u8 func1008_third_walk[] = { // Jo dead label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Do cutscene label(0x06) @@ -234,7 +234,7 @@ u8 func1008_third_walk[] = { camera_movement(0x0488) label(0x8f) - set_function(CHR_P1P2, FUNC_MOVE_TO_PAD) + set_ailist(CHR_P1P2, FUNC_MOVE_TO_PAD) chr_move_to_pad(CHR_TRENT, 0x0279, 0x01, /*goto*/ 0x2d) yield goto_first(0x8f) @@ -247,7 +247,7 @@ u8 func1008_third_walk[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(ANIM_HEAD_ROLL, -1, -1, 0x06, 0x00, CHR_TRENT, 2) + chr_do_animation(ANIM_HEAD_ROLL, -1, -1, 0x06, 0x00, CHR_TRENT, 2) label(0x2d) message(CHR_BOND, 0x5e0e) // "Opponent skill level: PERFECT AGENT" @@ -273,17 +273,17 @@ u8 func1008_third_walk[] = { endloop(0x0b) label(0x0c) - set_function(CHR_TRENT, FUNC_TRENT_COMBAT) + set_ailist(CHR_TRENT, FUNC_TRENT_COMBAT) grant_control(CHR_BOND) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_revoke_control[] = { yield revoke_control(CHR_BOND, 0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_main[] = { @@ -309,7 +309,7 @@ u8 func1005_main[] = { goto_next(0x06) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_stage_flag(STAGEFLAG_SA_WALK_TRIGGER) @@ -336,7 +336,7 @@ u8 func1005_main[] = { goto_next(0x06) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_stage_flag(STAGEFLAG_PA_WALK_TRIGGER) @@ -358,15 +358,15 @@ u8 func1005_main[] = { endloop(0x0d) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_init_audio[] = { restart_default_music reset_ambience - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_check_objectives_complete[] = { @@ -386,12 +386,12 @@ u8 func1006_check_objectives_complete[] = { // End level label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_guard_combat[] = { - set_onshot_function(FUNC_GUARD_COMBAT) + set_shotlist(FUNC_GUARD_COMBAT) if_just_injured(CHR_SELF, /*goto*/ 0x03) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00008000) @@ -435,17 +435,17 @@ u8 func0402_guard_combat[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Hand combat label(0x0e) - set_return_function(CHR_SELF, FUNC_TRENT_COMBAT) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) - endfunction + set_returnlist(CHR_SELF, FUNC_TRENT_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) + endlist }; u8 func0403_jon_combat[] = { - set_onshot_function(FUNC_JON_COMBAT) + set_shotlist(FUNC_JON_COMBAT) if_just_injured(CHR_SELF, /*goto*/ 0x58) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00008000) restart_timer @@ -477,14 +477,14 @@ u8 func0403_jon_combat[] = { endloop(0x58) label(0x0e) - set_return_function(CHR_SELF, FUNC_JON_COMBAT) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_returnlist(CHR_SELF, FUNC_JON_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_trent_combat[] = { - set_onshot_function(FUNC_TRENT_COMBAT) + set_shotlist(FUNC_TRENT_COMBAT) if_just_injured(CHR_SELF, /*goto*/ 0x03) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00008000) restart_timer @@ -516,11 +516,11 @@ u8 func0404_trent_combat[] = { // Hand combat label(0x0e) - set_return_function(CHR_SELF, FUNC_TRENT_COMBAT) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, FUNC_TRENT_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_guard_init[] = { @@ -531,8 +531,8 @@ u8 func0405_guard_init[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0406_jon_init[] = { @@ -546,8 +546,8 @@ u8 func0406_jon_init[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_trent_init[] = { @@ -561,8 +561,8 @@ u8 func0407_trent_init[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupazt.c b/src/files/setup/setupazt.c index bea0701a4..735e04a22 100644 --- a/src/files/setup/setupazt.c +++ b/src/files/setup/setupazt.c @@ -383,21 +383,21 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(CHR_PRES_CLONE, CHRCFLAG_04000000) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_04000000) set_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1011_setup_snow[] = { enable_snow(TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -409,7 +409,7 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01b6, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01b6, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, TRUE) restart_timer @@ -514,33 +514,33 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01b6, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01b6, -2, -1, 0x06, 0x00, CHR_BOND, 2) restart_default_music reset_ambience set_chr_hud_visible(CHR_BOND, FALSE) enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_outro_from_menu[] = { - set_function(0x06, GFUNC_IDLE) - set_function(0x03, GFUNC_IDLE) - set_function(CHR_SKEDAR, GFUNC_IDLE) - set_function(CHR_ELVIS_OUTRO, GFUNC_IDLE) - set_function(CHR_TRENT, GFUNC_IDLE) + set_ailist(0x06, GFUNC_IDLE) + set_ailist(0x03, GFUNC_IDLE) + set_ailist(CHR_SKEDAR, GFUNC_IDLE) + set_ailist(CHR_ELVIS_OUTRO, GFUNC_IDLE) + set_ailist(CHR_TRENT, GFUNC_IDLE) hide_chr(CHR_ROBOT1) hide_chr(CHR_ROBOT2) hide_chr(CHR_ROBOT3) hide_chr(CHR_ROBOT4) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func0402_outro[] = { set_stage_flag(STAGEFLAG_OUTRO_STARTED) hide_object(OBJ_HOVERBIKE) - set_function(CHR_PRESIDENT, GFUNC_IDLE) + set_ailist(CHR_PRESIDENT, GFUNC_IDLE) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) set_target_chr(CHR_BOND) goto_next(0x08) @@ -553,48 +553,48 @@ u8 func0402_outro[] = { set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) - set_function(CHR_TARGET, GFUNC_IDLE) + set_ailist(CHR_TARGET, GFUNC_IDLE) remove_chr(CHR_ELVIS) - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) set_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_PRESIDENT, GFUNC_IDLE) + set_ailist(CHR_PRESIDENT, GFUNC_IDLE) set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x01df, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x01df, -1, -1, 0x06, 0x00, CHR_TARGET, 4) set_chr_chrflag(CHR_SKEDAR, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_SKEDAR, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_SKEDAR, CHRHFLAG_00020000) - animation(0x01da, -1, -1, 0x06, 0x00, CHR_SKEDAR, 4) + chr_do_animation(0x01da, -1, -1, 0x06, 0x00, CHR_SKEDAR, 4) set_chr_chrflag(CHR_ELVIS_OUTRO, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_ELVIS_OUTRO, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS_OUTRO, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS_OUTRO, CHRHFLAG_00020000) - animation(0x01db, -1, -1, 0x06, 0x00, CHR_ELVIS_OUTRO, 4) + chr_do_animation(0x01db, -1, -1, 0x06, 0x00, CHR_ELVIS_OUTRO, 4) set_chr_chrflag(CHR_TRENT, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_TRENT, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TRENT, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TRENT, CHRHFLAG_00020000) - animation(0x01dc, -1, -1, 0x06, 0x00, CHR_TRENT, 4) + chr_do_animation(0x01dc, -1, -1, 0x06, 0x00, CHR_TRENT, 4) set_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_MRBLONDE, CHRHFLAG_00020000) - animation(0x01dd, -1, -1, 0x06, 0x00, CHR_MRBLONDE, 4) + chr_do_animation(0x01dd, -1, -1, 0x06, 0x00, CHR_MRBLONDE, 4) set_chr_chrflag(CHR_PRESIDENT_OUTRO, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_PRESIDENT_OUTRO, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_PRESIDENT_OUTRO, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_PRESIDENT_OUTRO, CHRHFLAG_00020000) - animation(0x01de, -1, -1, 0x06, 0x00, CHR_PRESIDENT_OUTRO, 4) + chr_do_animation(0x01de, -1, -1, 0x06, 0x00, CHR_PRESIDENT_OUTRO, 4) show_object(0x00) set_object_flag_bank1(OBJ_CRATE, OBJECTFLAG1_04000000) @@ -755,8 +755,8 @@ u8 func0402_outro[] = { label(0x65) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_init_blonde[] = { @@ -766,8 +766,8 @@ u8 func0407_init_blonde[] = { set_armor(60) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0406_init_stripes[] = { @@ -778,8 +778,8 @@ u8 func0406_init_stripes[] = { set_armor(0) set_recovery_speed(30) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1003_msg_therestheescapepod[] = { @@ -790,8 +790,8 @@ u8 func1003_msg_therestheescapepod[] = { label(0x31) speak(CHR_P1P2, 0x0a0a, 0x73cc, CHANNEL_6, COLOR_09_BLUE) // "There's the escape pod." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_msg_maybetheresabeacon[] = { @@ -802,8 +802,8 @@ u8 func1004_msg_maybetheresabeacon[] = { // Unreachable label(0x31) speak(CHR_BOND, 0x0a0b, 0x73cd, CHANNEL_6, COLOR_09_BLUE) // "Maybe there's a beacon in there." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_msg_thejamming[] = { @@ -818,8 +818,8 @@ u8 func1005_msg_thejamming[] = { label(0x31) speak(CHR_P1P2, 0x0a0c, 0x73ce, CHANNEL_6, COLOR_09_BLUE) // "The jamming... It's coming from that ship." label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_msg_elvisbeable[] = { @@ -830,8 +830,8 @@ u8 func1006_msg_elvisbeable[] = { label(0x31) speak(CHR_P1P2, 0x0a0d, 0x73cf, CHANNEL_6, COLOR_09_BLUE) // "Elvis... He'll be able to protect the President." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(pathid, function) \ @@ -842,71 +842,71 @@ u8 func1006_msg_elvisbeable[] = { set_armor(0) \ set_recovery_speed(30) \ set_shield(0) \ - set_return_function(CHR_SELF, function) \ + set_returnlist(CHR_SELF, function) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func0408_start_path00[] = { init_path(0, 0x0408) - endfunction + endlist }; u8 func0409_start_path01[] = { init_path(1, 0x0409) - endfunction + endlist }; u8 func040a_start_path02[] = { init_path(2, 0x040a) - endfunction + endlist }; u8 func040b_start_path03[] = { init_path(3, 0x040b) - endfunction + endlist }; u8 func040c_start_path04[] = { init_path(4, 0x040c) - endfunction + endlist }; u8 func040d_start_path05[] = { init_path(5, 0x040d) - endfunction + endlist }; u8 func040e_start_path06[] = { init_path(6, 0x040e) - endfunction + endlist }; u8 func040f_start_path07[] = { init_path(7, 0x040f) - endfunction + endlist }; u8 func0410_start_path08[] = { init_path(8, 0x0410) - endfunction + endlist }; u8 func0411_start_path09[] = { init_path(9, 0x0411) - endfunction + endlist }; u8 func0412_start_path10[] = { init_path(10, 0x0412) - endfunction + endlist }; u8 func0413_start_path11[] = { init_path(11, 0x0413) - endfunction + endlist }; /** @@ -937,7 +937,7 @@ u8 unregistered_function1[] = { rebuild_squadrons goto_first(0x66) - endfunction + endlist }; u8 func0415_unused[] = { @@ -955,8 +955,8 @@ u8 func0415_unused[] = { set_squadron(SQUADRON_0F) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func100c_spawn_dd_guards[] = { @@ -986,25 +986,25 @@ u8 func100c_spawn_dd_guards[] = { // 1 if_stage_flag_eq(STAGEFLAG_OUTRO_STARTED, TRUE, /*goto*/ 0x0f) - try_spawn_chr(BODY_DD_GUARD, HEAD_RANDOM, 0x0126, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) + try_spawn_chr_at_pad(BODY_DD_GUARD, HEAD_RANDOM, 0x0126, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) goto_next(0x98) // 2 label(0x69) if_stage_flag_eq(STAGEFLAG_OUTRO_STARTED, TRUE, /*goto*/ 0x0f) - try_spawn_chr(BODY_DD_GUARD, HEAD_RANDOM, 0x00e5, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) + try_spawn_chr_at_pad(BODY_DD_GUARD, HEAD_RANDOM, 0x00e5, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) goto_next(0x98) // 3 label(0x6a) if_stage_flag_eq(STAGEFLAG_OUTRO_STARTED, TRUE, /*goto*/ 0x0f) - try_spawn_chr(BODY_DD_GUARD, HEAD_RANDOM, 0x0130, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) + try_spawn_chr_at_pad(BODY_DD_GUARD, HEAD_RANDOM, 0x0130, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) goto_next(0x98) // 4 label(0x6b) if_stage_flag_eq(STAGEFLAG_OUTRO_STARTED, TRUE, /*goto*/ 0x0f) - try_spawn_chr(BODY_DD_GUARD, HEAD_RANDOM, 0x00fd, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) + try_spawn_chr_at_pad(BODY_DD_GUARD, HEAD_RANDOM, 0x00fd, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x68) goto_next(0x98) // Spawn failed @@ -1020,8 +1020,8 @@ u8 func100c_spawn_dd_guards[] = { goto_first(0x66) label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0416_spawned_guard[] = { @@ -1042,9 +1042,9 @@ u8 func0416_spawned_guard[] = { rebuild_squadrons // Pad is next to UFO run_to_pad(0x0105) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1008_escapepod[] = { @@ -1056,7 +1056,7 @@ u8 func1008_escapepod[] = { mute_channel(CHANNEL_0) message(CHR_BOND, 0x0a0f) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_ESCAPEPOD_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Pod healthy label(0x31) @@ -1072,8 +1072,8 @@ u8 func1008_escapepod[] = { set_stage_flag(STAGEFLAG_BEACON_ACTIVATED) endloop(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_shuttle_destroyed[] = { @@ -1087,11 +1087,11 @@ u8 func1009_check_shuttle_destroyed[] = { if_object_in_good_condition(OBJ_SKEDAR_SHUTTLE, /*goto*/ 0x31) message(CHR_BOND, 0x0a15) // "Jamming device has been shut down." set_stage_flag(STAGEFLAG_SKEDAR_SHUTTLE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) endloop(0x06) - endfunction + endlist }; u8 func100a_check_president_dead[] = { @@ -1104,8 +1104,8 @@ u8 func100a_check_president_dead[] = { label(0x31) message(CHR_BOND, 0x0a16) // "President has been killed." set_stage_flag(STAGEFLAG_PRESIDENT_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_clone_dead[] = { @@ -1118,8 +1118,8 @@ u8 func100b_check_clone_dead[] = { label(0x31) message(CHR_BOND, 0x0a17) // "Presidential clone has been eliminated." set_stage_flag(STAGEFLAG_CLONE_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_init_elvis[] = { @@ -1133,12 +1133,12 @@ u8 func0403_init_elvis[] = { set_self_chrflag(CHRCFLAG_00080000) assign_path(12) start_path - set_function(CHR_SELF, FUNC_ELVIS) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS) + endlist }; u8 func0404_elvis[] = { - set_onshot_function(FUNC_ELVIS) + set_shotlist(FUNC_ELVIS) label(0x04) restart_timer @@ -1171,26 +1171,26 @@ u8 func0404_elvis[] = { call_rng if_rand_gt(128, /*goto*/ 0x31) - // 50% chance of doing look around animation + // 50% chance of doing look around chr_do_animation call_rng if_rand_lt(64, /*goto*/ 0x99) if_rand_lt(128, /*goto*/ 0x9a) if_rand_lt(196, /*goto*/ 0x9b) set_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1) - animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x31) label(0x99) - animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x31) label(0x9a) - animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x31) label(0x9b) - animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x10, 0x0a, CHR_SELF, 2) label(0x31) goto_first(0x04) @@ -1198,9 +1198,9 @@ u8 func0404_elvis[] = { // Detected enemy label(0x0a) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_INIT_ELVIS) - set_onshot_function(FUNC_INIT_ELVIS) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_INIT_ELVIS) + set_shotlist(FUNC_INIT_ELVIS) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // Sees player label(0xa5) @@ -1236,7 +1236,7 @@ u8 func0404_elvis[] = { set_stage_flag(STAGEFLAG_ELVIS_GAVE_PROXYMINE) goto_first(0x04) - endfunction + endlist }; u8 func0405_unused[] = { @@ -1244,19 +1244,19 @@ u8 func0405_unused[] = { beginloop(0x06) endloop(0x06) - endfunction + endlist }; u8 func0417_init_robot[] = { set_accuracy(40) set_self_chrflag(CHRCFLAG_00020000) set_chr_health(CHR_SELF, 250) - set_function(CHR_SELF, FUNC_ROBOT) - endfunction + set_ailist(CHR_SELF, FUNC_ROBOT) + endlist }; u8 func0418_robot[] = { - set_onshot_function(FUNC_ROBOT) + set_shotlist(FUNC_ROBOT) label(0x66) set_self_chrflag(CHRCFLAG_00040000) if_chr_dying(CHR_SELF, /*goto*/ 0x11) @@ -1350,8 +1350,8 @@ u8 func0418_robot[] = { label(0x11) assign_sound(0x1aec, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1377,38 +1377,38 @@ u8 func0414_spawner[] = { endloop(0x06) label(0x0a) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x52) dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x52) - set_function(CHR_SELF, FUNC_SPAWNER) + set_ailist(CHR_SELF, FUNC_SPAWNER) label(0x52) dprint 'C','R','E','A','T','E',' ','S','P','A','W','N','\n',0, try_spawn_clone2(CHR_SELF, GFUNC_ALERTED, 0x00000000, /*goto*/ 0x31) dprint 'C','R','E','A','T','E',' ','F','A','I','L','\n',0, - set_function(CHR_SELF, FUNC_SPAWNER) + set_ailist(CHR_SELF, FUNC_SPAWNER) label(0x31) yield - set_function(CHR_SELF, FUNC_SPAWNER) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_SPAWNER) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0419_unused[] = { set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0422_hide[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041a_pres_clone[] = { @@ -1436,7 +1436,7 @@ u8 func041a_pres_clone[] = { stop_chr label(0xa5) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x10) if_chr_stopped(/*goto*/ 0x31) @@ -1445,20 +1445,20 @@ u8 func041a_pres_clone[] = { label(0x31) goto_first(0xa5) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041b_init_president[] = { set_self_chrflag(CHRCFLAG_00080000) set_chr_health(CHR_SELF, 300) set_shield(0) - set_function(CHR_SELF, FUNC_PRESIDENT_WAITING) - endfunction + set_ailist(CHR_SELF, FUNC_PRESIDENT_WAITING) + endlist }; u8 func041c_president_waiting[] = { - set_onshot_function(FUNC_PRESIDENT_WAITING) + set_shotlist(FUNC_PRESIDENT_WAITING) if_chr_dying(CHR_SELF, /*goto*/ 0x08) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x08) if_chr_unloaded(CHR_SELF, /*goto*/ 0x08) @@ -1466,8 +1466,8 @@ u8 func041c_president_waiting[] = { // Dying label(0x08) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) stop_chr @@ -1485,15 +1485,15 @@ u8 func041c_president_waiting[] = { endloop(0x06) label(0x31) - set_onshot_function(FUNC_PRESIDENT_RUNNING) - set_function(CHR_SELF, FUNC_PRESIDENT_RUNNING) - endfunction + set_shotlist(FUNC_PRESIDENT_RUNNING) + set_ailist(CHR_SELF, FUNC_PRESIDENT_RUNNING) + endlist }; u8 func041d_president_running[] = { set_self_chrflag(CHRCFLAG_01000000) set_alertness(100) - set_onshot_function(FUNC_PRESIDENT_RUNNING) + set_shotlist(FUNC_PRESIDENT_RUNNING) dprint 'R','E','S','T','A','R','T','\n',0, yield if_chr_dying(CHR_SELF, /*goto*/ 0x08) @@ -1503,7 +1503,7 @@ u8 func041d_president_running[] = { // Dying label(0x08) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x9c) @@ -1514,8 +1514,8 @@ u8 func041d_president_running[] = { label(0x08) assign_sound(0x1abf, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x31) @@ -1641,8 +1641,8 @@ u8 func041d_president_running[] = { message(CHR_TARGET, 0x0a19) // "President has been rescued." set_stage_flag(STAGEFLAG_PRESIDENT_RESCUED) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_robots_left[] = { @@ -1700,8 +1700,8 @@ u8 func100e_check_robots_left[] = { label(0x31) set_stage_flag(STAGEFLAG_TRIGGER_PRESIDENT_RUNNING) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041e_trent_waiting[] = { @@ -1719,15 +1719,15 @@ u8 func041e_trent_waiting[] = { label(0x08) restart_timer speak(CHR_P1P2, 0x0a18, 0x12ca, CHANNEL_6, COLOR_05_GREEN) // "You'll never save him now!" - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0a) if_timer_gt(120, /*goto*/ 0x08) endloop(0x0a) label(0x08) - set_function(CHR_SELF, FUNC_TRENT_SHOOTING) - endfunction + set_ailist(CHR_SELF, FUNC_TRENT_SHOOTING) + endlist }; u8 func041f_trent_shooting[] = { @@ -1742,7 +1742,7 @@ u8 func041f_trent_shooting[] = { endloop(0x06) label(0x31) - set_function(CHR_SELF, FUNC_TRENT_RUNNING) + set_ailist(CHR_SELF, FUNC_TRENT_RUNNING) label(0x08) label(0xa8) @@ -1770,15 +1770,15 @@ u8 func041f_trent_shooting[] = { label(0x0b) restart_timer - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0c) if_timer_gt(120, /*goto*/ 0x08) endloop(0x0c) label(0x08) - set_function(CHR_SELF, FUNC_TRENT_RUNNING) - endfunction + set_ailist(CHR_SELF, FUNC_TRENT_RUNNING) + endlist }; u8 func0420_trent_running[] = { @@ -1813,8 +1813,8 @@ u8 func0420_trent_running[] = { // Player definitely not in sight label(0x08) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_end_level[] = { @@ -1845,7 +1845,7 @@ u8 func100f_check_end_level[] = { if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x32) if_chr_dying(CHR_PRESIDENT, /*goto*/ 0x32) if_chr_unloaded(CHR_PRESIDENT, /*goto*/ 0x32) - set_function(CHR_PRESIDENT, GFUNC_STOP_AND_IDLE) + set_ailist(CHR_PRESIDENT, GFUNC_STOP_AND_IDLE) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) if_chr_dying(CHR_BOND, /*goto*/ 0x31) @@ -1861,17 +1861,17 @@ u8 func100f_check_end_level[] = { label(0x31) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x08) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) // President dead label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1879,9 +1879,9 @@ u8 func100f_check_end_level[] = { */ u8 func0421_starting_area_guard[] = { label(0x0a) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func1010_set_cave_lights[] = { @@ -1901,8 +1901,8 @@ u8 func1010_set_cave_lights[] = { set_lights_state(0x0053, 0x01, 0x06, 0x00, 0x00) set_lights_state(0x0058, 0x01, 0x06, 0x00, 0x00) set_lights_state(0x0056, 0x01, 0x06, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_give_medicalscanner[] = { @@ -1910,15 +1910,15 @@ u8 func1012_give_medicalscanner[] = { if_difficulty_gt(DIFF_A, /*goto*/ 0x31) give_object_to_chr(OBJ_MEDICALSCANNER, CHR_BOND) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_PROXYMINE, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_hide_hoverbike[] = { @@ -1926,8 +1926,8 @@ u8 func1016_hide_hoverbike[] = { if_eeprom_flag_is_set(EEPROMFLAG_CRASHSITE_BIKE, /*goto*/ 0x08) hide_object(OBJ_HOVERBIKE) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_setup_skedar_shuttle[] = { @@ -1936,8 +1936,8 @@ u8 func1014_setup_skedar_shuttle[] = { set_object_flag_bank2(OBJ_SKEDAR_SHUTTLE, OBJECTFLAG2_00000010) set_object_part_visible(OBJ_SKEDAR_SHUTTLE, FALSE) object_do_animation(0x0486, OBJ_SKEDAR_SHUTTLE, 0x01ff, 0xff) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1415_setup_lighting[] = { @@ -2039,8 +2039,8 @@ u8 func1415_setup_lighting[] = { misc_command(0x0045, 0x05, 0x01) misc_command(0x0065, 0x05, 0x01) misc_command(0x0065, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupcave.c b/src/files/setup/setupcave.c index 08c836446..8003cfb3a 100644 --- a/src/files/setup/setupcave.c +++ b/src/files/setup/setupcave.c @@ -752,26 +752,26 @@ u8 func1002_objectives_failed_msg[] = { set_chr_chrflag(0x44, CHRCFLAG_04000000) set_chr_chrflag(0x45, CHRCFLAG_04000000) set_chr_chrflag(0x46, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1000_rebuild_groups[] = { - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1401_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_04) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 unregistered_function1[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0401) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0401) + endlist }; /** @@ -786,24 +786,24 @@ u8 func0401_unused_cutscene[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0170, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0170, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, TRUE) set_chr_chrflag(0x00, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x00, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x00, CHRHFLAG_00020000) - animation(0x016c, -1, -1, 0x06, 0x00, 0x00, 4) + chr_do_animation(0x016c, -1, -1, 0x06, 0x00, 0x00, 4) set_chr_chrflag(0x01, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x01, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x01, CHRHFLAG_00020000) - animation(0x016d, -1, -1, 0x06, 0x00, 0x01, 4) + chr_do_animation(0x016d, -1, -1, 0x06, 0x00, 0x01, 4) set_chr_chrflag(0x02, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x02, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x02, CHRHFLAG_00020000) - animation(0x016e, -1, -1, 0x06, 0x00, 0x02, 4) + chr_do_animation(0x016e, -1, -1, 0x06, 0x00, 0x02, 4) set_chr_chrflag(CHR_STEWARDESS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_STEWARDESS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_STEWARDESS, CHRHFLAG_00020000) - animation(0x016f, -1, -1, 0x06, 0x00, CHR_STEWARDESS, 4) + chr_do_animation(0x016f, -1, -1, 0x06, 0x00, CHR_STEWARDESS, 4) fade_to_color(0x000000ff, 0) fade_to_color(0x00000000, 90) set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) @@ -823,14 +823,14 @@ u8 func0401_unused_cutscene[] = { label(0x02) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(0x00, 0x0405) - set_function(0x01, 0x0405) + set_ailist(0x00, 0x0405) + set_ailist(0x01, 0x0405) remove_chr(0x02) - set_function(CHR_STEWARDESS, 0x040b) + set_ailist(CHR_STEWARDESS, 0x040b) restart_default_music reset_ambience - set_function(CHR_SELF, GFUNC_END_CINEMA) - endfunction + set_ailist(CHR_SELF, GFUNC_END_CINEMA) + endlist }; u8 func0425_outro[] = { @@ -840,13 +840,13 @@ u8 func0425_outro[] = { set_music_track(MUSIC_AIRBASE_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_OUTRO_NSA, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_OUTRO_NSA, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_OUTRO_NSA, CHRHFLAG_00020000) - animation(0x031b, -1, -1, 0x06, 0x00, CHR_OUTRO_NSA, 4) + chr_do_animation(0x031b, -1, -1, 0x06, 0x00, CHR_OUTRO_NSA, 4) show_object(OBJ_PLANE) set_object_flag_bank1(OBJ_PLANE, OBJECTFLAG1_04000000) @@ -908,14 +908,14 @@ u8 func0425_outro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) hide_object(OBJ_PLANE) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_init_stripes[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_guard_activation[] = { @@ -985,7 +985,7 @@ u8 func1004_guard_activation[] = { #define remove_alaskan_guard(chr) \ set_chr_flag_bankx(chr, CHRFLAG1_WARNED, BANK_1) \ - set_function(chr, FUNC_REMOVE_OR_UNALERT) \ + set_ailist(chr, FUNC_REMOVE_OR_UNALERT) \ set_chr_flag_bankx(chr, CHRFLAG0_AIVSAI, BANK_0) \ yield @@ -1007,10 +1007,10 @@ u8 func1004_guard_activation[] = { remove_alaskan_guard(0x0e) remove_alaskan_guard(0x0f) - set_function(CHR_SECRETARY, FUNC_REMOVE_OR_COWER) - set_function(CHR_STEWARDESS, FUNC_REMOVE_OR_COWER) - set_function(CHR_OFFICE1, FUNC_REMOVE_OR_COWER) - set_function(CHR_OFFICE2, FUNC_REMOVE_OR_COWER) + set_ailist(CHR_SECRETARY, FUNC_REMOVE_OR_COWER) + set_ailist(CHR_STEWARDESS, FUNC_REMOVE_OR_COWER) + set_ailist(CHR_OFFICE1, FUNC_REMOVE_OR_COWER) + set_ailist(CHR_OFFICE2, FUNC_REMOVE_OR_COWER) yield yield yield @@ -1029,12 +1029,12 @@ u8 func1004_guard_activation[] = { yield yield yield - set_function(0x10, FUNC_INIT_POSTTAKEOVER_GUARD) - set_function(0x11, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x10, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x11, FUNC_INIT_POSTTAKEOVER_GUARD) #define enable_takeover_guard2(chr, function) \ show_chr(chr) \ - set_function(chr, function) \ + set_ailist(chr, function) \ unset_chr_hiddenflag(chr, CHRHFLAG_40000000) \ unset_chr_chrflag(chr, CHRCFLAG_HIDDEN) \ yield @@ -1056,11 +1056,11 @@ u8 func1004_guard_activation[] = { enable_takeover_guard2(0x36, FUNC_INIT_POSTTAKEOVER_GUARD) show_chr(0x42) - set_function(0x42, FUNC_FOYER_SPAWNER) + set_ailist(0x42, FUNC_FOYER_SPAWNER) yield show_chr(0x43) - set_function(0x43, FUNC_FOYER_SPAWNER) + set_ailist(0x43, FUNC_FOYER_SPAWNER) yield enable_takeover_guard2(0x22, FUNC_INIT_POSTTAKEOVER_GUARD) @@ -1075,8 +1075,8 @@ u8 func1004_guard_activation[] = { enable_takeover_guard2(0x35, FUNC_INIT_POSTTAKEOVER_GUARD) enable_takeover_guard2(0x37, FUNC_INIT_POSTTAKEOVER_GUARD) - set_function(0x10, FUNC_DRAW_MAGNUM) - set_function(0x11, FUNC_DRAW_MAGNUM) + set_ailist(0x10, FUNC_DRAW_MAGNUM) + set_ailist(0x11, FUNC_DRAW_MAGNUM) unset_object_flag_bank0(0x2b, OBJECTFLAG0_INVINCIBLE) unset_object_flag_bank1(0x2b, OBJECTFLAG1_INVISIBLE) @@ -1086,7 +1086,7 @@ u8 func1004_guard_activation[] = { #define enable_bottom_guard(chr) \ show_chr(chr) \ - set_function(chr, FUNC_INIT_POSTTAKEOVER_GUARD) \ + set_ailist(chr, FUNC_INIT_POSTTAKEOVER_GUARD) \ unset_chr_hiddenflag(chr, CHRHFLAG_40000000) \ unset_chr_chrflag(chr, CHRCFLAG_HIDDEN) \ yield @@ -1101,8 +1101,8 @@ u8 func1004_guard_activation[] = { enable_bottom_guard(0x1a) enable_bottom_guard(0x1c) enable_bottom_guard(0x1f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_start_path15[] = { @@ -1122,8 +1122,8 @@ u8 func0405_start_path15[] = { label(0x02) assign_path(15) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -1131,19 +1131,19 @@ u8 func0405_start_path15[] = { */ u8 func040b_unused[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, 0x040b) - endfunction + set_ailist(CHR_SELF, 0x040b) + endlist }; u8 func0407_stewardess[] = { - set_onshot_function(FUNC_STEWARDESS) + set_shotlist(FUNC_STEWARDESS) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) if_just_injured(CHR_SELF, /*goto*/ 0x02) @@ -1174,7 +1174,7 @@ u8 func0407_stewardess[] = { goto_next(0x16) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) restart_timer @@ -1237,7 +1237,7 @@ u8 func0407_stewardess[] = { label(0x02) speak(CHR_TARGET, 0x0e19, 0x1adc, CHANNEL_4, COLOR_07_RED) // "Look out - it's an intruder..." set_squadron_alertness(100) - animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x06) if_chr_stopped(/*goto*/ 0x02) @@ -1253,7 +1253,7 @@ u8 func0407_stewardess[] = { label(0x0b) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x31) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - animation(ANIM_SNEEZE, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SNEEZE, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x69) if_chr_stopped(/*goto*/ 0x02) @@ -1267,7 +1267,7 @@ u8 func0407_stewardess[] = { label(0x62) set_stage_flag(STAGEFLAG_DISGUISE_UNCOVERED) - animation(ANIM_COWER_0229, -1, 190, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, 190, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x63) if_chr_stopped(/*goto*/ 0x31) @@ -1337,7 +1337,7 @@ u8 func0407_stewardess[] = { label(0x4e) goto_first(0x04) - endfunction + endlist }; u8 func0406_become_unalerted[] = { @@ -1345,21 +1345,21 @@ u8 func0406_become_unalerted[] = { label(0x00) yield if_enemy_distance_lt_and_los(2540, /*goto*/ 0x02) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x02) if_chr_lost_track_of_target_maybe(/*goto*/ 0x02) if_chr_dying(CHR_TARGET, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x02) if_chr_unloaded(CHR_TARGET, /*goto*/ 0x02) - set_onshot_function(FUNC_BECOME_UNALERTED) - set_return_function(CHR_SELF, FUNC_BECOME_UNALERTED) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(FUNC_BECOME_UNALERTED) + set_returnlist(CHR_SELF, FUNC_BECOME_UNALERTED) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x02) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1005_check_civilians_killed[] = { @@ -1374,11 +1374,11 @@ u8 func1005_check_civilians_killed[] = { label(0x31) message(CHR_BOND, 0x0e1a) // "Innocent civilians have been killed." set_stage_flag(STAGEFLAG_CIVILIANS_KILLED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(reaction, health, armor, recovery, pathid) \ @@ -1390,43 +1390,43 @@ u8 func1005_check_civilians_killed[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) u8 func041b_start_path06[] = { init_path(70, 40, 0, 0, 0x06) - endfunction + endlist }; u8 func041c_start_path07[] = { init_path(70, 40, 0, 0, 0x07) - endfunction + endlist }; u8 func041d_start_path08[] = { init_path(70, 40, 0, 0, 0x08) - endfunction + endlist }; u8 func041e_start_path09[] = { init_path(70, 40, 0, 0, 0x09) - endfunction + endlist }; u8 func041f_start_path10[] = { init_path(70, 40, 0, 0, 0x0a) - endfunction + endlist }; u8 func0420_start_path11[] = { init_path(45, 60, 40, 30, 0x0b) - endfunction + endlist }; u8 func0421_start_path12[] = { init_path(45, 60, 40, 30, 0x0c) - endfunction + endlist }; /** @@ -1444,8 +1444,8 @@ u8 func0422_start_path13[] = { rebuild_squadrons assign_path(13) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0423_start_path14[] = { @@ -1460,8 +1460,8 @@ u8 func0423_start_path14[] = { rebuild_squadrons assign_path(14) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0424_start_path15_unused[] = { @@ -1473,14 +1473,14 @@ u8 func0424_start_path15_unused[] = { set_shield(0) assign_path(15) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040c_init_secretary[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_SECRETARY) - endfunction + set_ailist(CHR_SELF, FUNC_SECRETARY) + endlist }; /** @@ -1493,7 +1493,7 @@ u8 func040c_init_secretary[] = { * 4 = Said "weapons are not allowed" */ u8 func0408_secretary[] = { - set_onshot_function(FUNC_SECRETARY) + set_shotlist(FUNC_SECRETARY) set_morale(0) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) @@ -1501,7 +1501,7 @@ u8 func0408_secretary[] = { goto_next(0x00) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) #define LABEL_MAIN_LOOP 0x00 #define LABEL_BECOME_ALERT1 0x66 #define LABEL_BECOME_ALERT2 0x68 @@ -1546,7 +1546,7 @@ u8 func0408_secretary[] = { label(0x67) set_squadron_alertness(100) restart_timer - animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x06) if_chr_stopped(/*goto*/ 0x4f) @@ -1554,7 +1554,7 @@ u8 func0408_secretary[] = { label(0x4f) set_stage_flag(STAGEFLAG_DISGUISE_UNCOVERED) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x0f) if_chr_stopped(/*goto*/ 0x31) @@ -1568,7 +1568,7 @@ u8 func0408_secretary[] = { goto_first(0x4f) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Seen Jo while disguised label(0x07) @@ -1580,7 +1580,7 @@ u8 func0408_secretary[] = { // label(0x32) speak(CHR_TARGET, 0x0e1d, 0x8161, CHANNEL_4, COLOR_06_WHITE) // "Good afternoon." - animation(ANIM_TALKING_0231, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, 193, 0x18, 0x10, CHR_SELF, 2) restart_timer set_morale(2) @@ -1611,7 +1611,7 @@ u8 func0408_secretary[] = { label(0x32) speak(CHR_TARGET, 0x0e1f, 0x1273, CHANNEL_4, COLOR_06_WHITE) // "You'll have to check that weapon in here." restart_timer - animation(ANIM_TALKING_0232, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0232, 0, 193, 0x18, 0x10, CHR_SELF, 2) set_morale(3) beginloop(0x09) @@ -1636,7 +1636,7 @@ u8 func0408_secretary[] = { label(0x32) speak(CHR_TARGET, 0x0e21, 0x1274, CHANNEL_4, COLOR_06_WHITE) // "Weapons are not allowed in the base." restart_timer - animation(ANIM_TALKING_0233, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0233, 0, 193, 0x18, 0x10, CHR_SELF, 2) set_morale(4) beginloop(0x0a) @@ -1669,7 +1669,7 @@ u8 func0408_secretary[] = { set_stage_flag(STAGEFLAG_RECEPTIONIST_CALLED_SECURITY) activate_alarm restart_timer - animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x0b) if_timer_gt(180, /*goto*/ 0x02) @@ -1679,14 +1679,14 @@ u8 func0408_secretary[] = { goto_first(0x4f) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // // TALK 2 // label(0x31) speak(CHR_TARGET, 0x0e1e, 0x1272, CHANNEL_4, COLOR_06_WHITE) // "OK, you know the way from here." - animation(0x0232, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x0232, 0, 193, 0x18, 0x10, CHR_SELF, 2) unlock_door(0x18, 0x02) beginloop(0x0e) @@ -1696,12 +1696,12 @@ u8 func0408_secretary[] = { endloop(0x0e) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(LABEL_BECOME_ALERT2) goto_first(LABEL_BECOME_ALERT1) - endfunction + endlist }; u8 unregistered_function2[] = { @@ -1716,8 +1716,8 @@ u8 unregistered_function2[] = { set_stage_flag(STAGEFLAG_DISGUISED) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_console_activation[] = { @@ -1777,8 +1777,8 @@ u8 func1007_console_activation[] = { label(0x0c) mute_channel(CHANNEL_1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define weapon_detection_logic(chr) \ @@ -1913,18 +1913,18 @@ u8 func1007_console_activation[] = { mute_channel(CHANNEL_6) \ yield \ activate_alarm \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ /* Agent, or suitcase deposited */ \ label(0x08) \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func1020_weapon_scanning_bond[] = { yield weapon_detection_logic(CHR_BOND) - endfunction + endlist }; u8 func1021_weapon_scanning_coop[] = { @@ -1934,11 +1934,11 @@ u8 func1021_weapon_scanning_coop[] = { goto_next(0x02) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x02) weapon_detection_logic(CHR_COOP) - endfunction + endlist }; u8 func1009_carousel_activation[] = { @@ -1956,7 +1956,7 @@ u8 func1009_carousel_activation[] = { yield message(CHR_BOND, 0x0e43) // "Equipment cannot be checked in." label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Carrier activated label(0x02) @@ -1989,8 +1989,8 @@ u8 func1009_carousel_activation[] = { label(0x02) set_object_flag_bank0(OBJ_BAGGAGE_CARRIER, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_suitcase_scanning[] = { @@ -2035,14 +2035,14 @@ u8 func100b_suitcase_scanning[] = { label(0x07) stop_countdown_timer hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_init_office1[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_OFFICE1) - endfunction + set_ailist(CHR_SELF, FUNC_OFFICE1) + endlist }; u8 func0409_office1[] = { @@ -2050,17 +2050,17 @@ u8 func0409_office1[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) - set_onshot_function(FUNC_OFFICE1) + set_shotlist(FUNC_OFFICE1) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x42) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x10, CHR_SELF, 2) beginloop(0x00) chr_toggle_p1p2(CHR_SELF) @@ -2090,7 +2090,7 @@ u8 func0409_office1[] = { // Disguised and unarmed-ish label(0x31) - animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x10, CHR_SELF, 2) speak(CHR_TARGET, 0x0e29, 0x1ae6, CHANNEL_4, COLOR_08_RED) // "Are you new around here?" beginloop(0x09) @@ -2110,7 +2110,7 @@ u8 func0409_office1[] = { reloop(0x09) label(0x7b) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x00, CHR_SELF, 2) endloop(0x09) // Picked up briefcase @@ -2155,7 +2155,7 @@ u8 func0409_office1[] = { speak(CHR_TARGET, 0x0e28, 0x1ae5, CHANNEL_4, COLOR_08_RED) // "Hey, you - this is a restricted area." set_squadron_alertness(100) restart_timer - animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x06) if_timer_gt(180, /*goto*/ LABEL_RUN_TO_FOYER) @@ -2174,30 +2174,30 @@ u8 func0409_office1[] = { set_squadron_alertness(100) set_stage_flag(STAGEFLAG_DISGUISE_UNCOVERED) activate_alarm - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040e_init_office2[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_OFFICE2) - endfunction + set_ailist(CHR_SELF, FUNC_OFFICE2) + endlist }; u8 func040a_office2[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) - set_onshot_function(FUNC_OFFICE2) + set_shotlist(FUNC_OFFICE2) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x42) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x10, CHR_SELF, 2) beginloop(0x00) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x02) @@ -2261,11 +2261,11 @@ u8 func040a_office2[] = { // Attack player label(0x02) set_self_flag_bankx(CHRFLAG1_00000001, BANK_1) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_check_end_level[] = { @@ -2311,12 +2311,12 @@ u8 func100c_check_end_level[] = { // Both players dead label(0x31) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x02) set_invincible(CHR_BOND) - set_function(CHR_SELF, 0x0425) + set_ailist(CHR_SELF, 0x0425) // Pad 0x00d5 label(0x05) @@ -2336,13 +2336,13 @@ u8 func100c_check_end_level[] = { // Both players dead label(0x31) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x02) set_invincible(CHR_BOND) - set_function(CHR_SELF, 0x0425) - endfunction + set_ailist(CHR_SELF, 0x0425) + endlist }; u8 func100d_laser_panel[] = { @@ -2364,8 +2364,8 @@ u8 func100d_laser_panel[] = { label(0x05) set_stage_flag(STAGEFLAG_LASERS_OVERLOADED) message(CHR_P1P2, 0x0e2e) // "Laser grid system has been overloaded." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_alaskans_killed[] = { @@ -2395,8 +2395,8 @@ u8 func100e_check_alaskans_killed[] = { message(CHR_BOND, 0x0e2f) // "Too many neutral casualties inflicted." set_stage_flag(STAGEFLAG_TOO_MANY_NEUTRALS_KILLED) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2412,19 +2412,19 @@ u8 func0410_unused[] = { set_shield(0) set_self_chrflag(CHRCFLAG_00000040) set_chr_chrflag(CHR_SELF, CHRCFLAG_00040000) - set_function(CHR_SELF, FUNC_NSA) - endfunction + set_ailist(CHR_SELF, FUNC_NSA) + endlist }; u8 func040f_nsa[] = { - set_onshot_function(FUNC_NSA) + set_shotlist(FUNC_NSA) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x44) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x44) if_chr_distance_to_pad_lt(CHR_SELF, 70, TARGET_PAD, /*goto*/ 0x02) @@ -2512,7 +2512,7 @@ u8 func040f_nsa[] = { endloop(0x09) label(0x02) - animation(ANIM_TALKING_0098, 0, 90, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0098, 0, 90, 0x00, 0x10, CHR_SELF, 2) say_quip(CHR_BOND, 0x1c, 0xff, 0x02, 0xff, 0x81, 0x00, 0x00) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) @@ -2521,8 +2521,8 @@ u8 func040f_nsa[] = { endloop(0x0a) label(0x02) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Unreachable restart_timer @@ -2537,8 +2537,8 @@ u8 func040f_nsa[] = { try_run_to_target_chr(/*goto*/ 0x05) beginloop(0x05) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) dprint 'G','O',' ','F','O','R',' ','C','H','R','\n',0, if_chr_stopped(/*goto*/ 0x32) if_timer_gt(30, /*goto*/ 0x32) @@ -2570,11 +2570,11 @@ u8 func040f_nsa[] = { label(0x02) set_self_flag_bankx(CHRFLAG1_00000001, BANK_1) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - set_return_function(CHR_SELF, FUNC_NSA) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, FUNC_NSA) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x07) - animation(ANIM_TALKING_0098, 0, 90, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0098, 0, 90, 0x00, 0x10, CHR_SELF, 2) say_quip(CHR_BOND, 0x1d, 0xff, 0x02, 0xff, 0x81, 0x00, 0x00) label(0x08) yield @@ -2585,12 +2585,12 @@ u8 func040f_nsa[] = { goto_first(0x44) label(0x0b) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0412_init_takeover_lackey[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) set_self_chrflag(CHRCFLAG_00000040) set_chr_dodge_rating(2, 0x0a) set_accuracy(60) @@ -2599,19 +2599,19 @@ u8 func0412_init_takeover_lackey[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_TAKEOVER_LACKEY) - endfunction + set_ailist(CHR_SELF, FUNC_TAKEOVER_LACKEY) + endlist }; u8 func0411_takeover_lackey[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x00) chr_toggle_p1p2(CHR_SELF) @@ -2656,20 +2656,20 @@ u8 func0411_takeover_lackey[] = { label(0x02) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISE_UNCOVERED) set_chr_hiddenflag(CHR_COOP, CHRHFLAG_DISGUISE_UNCOVERED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0413_alaskan_console_guard[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 unregistered_function3[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_OFFICEWORKER) - endfunction + set_ailist(CHR_SELF, FUNC_OFFICEWORKER) + endlist }; u8 func0414_officeworker[] = { @@ -2680,10 +2680,10 @@ u8 func0414_officeworker[] = { goto_next(0x00) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x44) - animation(ANIM_SITTING_DORMANT, -1, 60, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, -1, 60, 0x14, 0x00, CHR_SELF, 2) beginloop(0x00) chr_toggle_p1p2(CHR_SELF) @@ -2698,7 +2698,7 @@ u8 func0414_officeworker[] = { endloop(0x00) label(0x02) - animation(ANIM_SITTING_0265, 0, 120, 0x14, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_0265, 0, 120, 0x14, 0x10, CHR_SELF, 2) say_quip(CHR_BOND, 0x20, 0xff, 0x0a, 0xff, BANK_1, 0x00, 0x00) restart_timer @@ -2724,10 +2724,10 @@ u8 func0414_officeworker[] = { chr_move_to_pad(0x3a, 0x00d7, 0x00, /*goto*/ 0x31) label(0x31) - animation(ANIM_SITTING_DORMANT, -1, 60, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, -1, 60, 0x14, 0x00, CHR_SELF, 2) label(0x77) - animation(ANIM_COWER_0229, -1, 60, 0x14, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, 60, 0x14, 0x0a, CHR_SELF, 2) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -2757,7 +2757,7 @@ u8 func0414_officeworker[] = { endloop(0x05) label(0x79) - animation(0x0229, -1, 60, 0x14, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0229, -1, 60, 0x14, 0x0a, CHR_SELF, 2) beginloop(0x06) if_chr_idle(/*goto*/ 0x02) @@ -2767,7 +2767,7 @@ u8 func0414_officeworker[] = { endloop(0x06) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x6d) damage_chr(CHR_SELF, 18) @@ -2775,20 +2775,20 @@ u8 func0414_officeworker[] = { endloop(0x6d) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_alaskan_mountainlift_guard[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1010_setup_baggage_carrier[] = { set_object_flag_bank0(OBJ_BAGGAGE_CARRIER, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define laser_overloaded_logic(laser1, laser2, time) \ @@ -2816,23 +2816,23 @@ u8 func1010_setup_baggage_carrier[] = { label(0x02) \ goto_first(0x04) \ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func1011_lasers1[] = { laser_overloaded_logic(0x07, 0x0c, 120) - endfunction + endlist }; u8 func1012_lasers2[] = { laser_overloaded_logic(0x0e, 0x10, 180) - endfunction + endlist }; u8 func1013_lasers3[] = { laser_overloaded_logic(0x0b, 0x12, 90) - endfunction + endlist }; u8 func1014_lasers4[] = { @@ -2858,8 +2858,8 @@ u8 func1014_lasers4[] = { label(0x02) goto_first(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2873,7 +2873,7 @@ u8 func1017_laser5[] = { label(0x04) restart_timer hide_object(0x13) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable open_door(0x13) @@ -2885,8 +2885,8 @@ u8 func1017_laser5[] = { label(0x31) goto_first(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_unused[] = { @@ -2898,8 +2898,8 @@ u8 func0403_unused[] = { set_recovery_speed(30) set_shield(0) set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_unhide_laser_guards[] = { @@ -2913,7 +2913,7 @@ u8 func1015_unhide_laser_guards[] = { set_chr_chrflag(0x3f, CHRCFLAG_HIDDEN) set_chr_chrflag(0x40, CHRCFLAG_HIDDEN) set_chr_chrflag(0x41, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable beginloop(0x00) @@ -2926,15 +2926,15 @@ u8 func1015_unhide_laser_guards[] = { unset_chr_chrflag(0x40, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x41, CHRCFLAG_HIDDEN) show_chr(0x3e) - set_function(0x3e, 0x0404) + set_ailist(0x3e, 0x0404) show_chr(0x3f) - set_function(0x3f, GFUNC_ALERTED) + set_ailist(0x3f, GFUNC_ALERTED) show_chr(0x40) - set_function(0x40, GFUNC_ALERTED) + set_ailist(0x40, GFUNC_ALERTED) show_chr(0x41) - set_function(0x41, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x41, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2944,14 +2944,14 @@ u8 func1015_unhide_laser_guards[] = { * @unused */ u8 func0404_laser_guard[] = { - set_onshot_function(GFUNC_UNALERTED) + set_shotlist(GFUNC_UNALERTED) run_to_pad(0x0002) label(0x04) yield label(0x02) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_console_noises[] = { @@ -3042,8 +3042,8 @@ u8 func1016_console_noises[] = { label(0x09) mute_channel(CHANNEL_1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0426_init_alaskan_guard[] = { @@ -3054,8 +3054,8 @@ u8 func0426_init_alaskan_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -3074,8 +3074,8 @@ u8 func0427_init_posttakeover_guard[] = { set_shield(0) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_POSTTAKEOVER_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_POSTTAKEOVER_GUARD) + endlist }; /** @@ -3098,7 +3098,7 @@ u8 func0428_posttakeover_guard[] = { label(0x02) unset_self_chrflag(CHRCFLAG_HIDDEN) unset_self_chrflag(CHRCFLAG_00040000) - set_function(CHR_SELF, FUNC_BECOME_UNALERTED) + set_ailist(CHR_SELF, FUNC_BECOME_UNALERTED) label(0x31) restart_timer @@ -3110,7 +3110,7 @@ u8 func0428_posttakeover_guard[] = { label(0x02) endloop(0x00) - endfunction + endlist }; /** @@ -3124,8 +3124,8 @@ u8 func0429_unused[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -3161,7 +3161,7 @@ u8 func042a_foyer_spawner[] = { reloop(0x00) label(0x04) - set_function(CHR_SELF, FUNC_FOYER_CLONE) + set_ailist(CHR_SELF, FUNC_FOYER_CLONE) label(0x6a) unset_self_chrflag(CHRCFLAG_HIDDEN) @@ -3176,8 +3176,8 @@ u8 func042a_foyer_spawner[] = { // Player has gone to bottom without disabling security label(0x09) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func042b_init_foyer_clone[] = { @@ -3187,13 +3187,13 @@ u8 func042b_init_foyer_clone[] = { rebuild_squadrons try_inherit_properties(0x42, /*goto*/ 0x02) label(0x02) - set_function(CHR_SELF, FUNC_FOYER_CLONE) - endfunction + set_ailist(CHR_SELF, FUNC_FOYER_CLONE) + endlist }; u8 func042c_foyer_clone[] = { - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; #define hoverbot_do_paths(path1, path2, path3) \ @@ -3230,38 +3230,38 @@ u8 func042c_foyer_clone[] = { label(0x02) \ goto_first(0x44) \ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func042d_hoverbot1[] = { hoverbot_do_paths(0, 1, 2) - endfunction + endlist }; u8 func042e_hoverbot2[] = { hoverbot_do_paths(1, 2, 0) - endfunction + endlist }; u8 func042f_hoverbot3[] = { hoverbot_do_paths(2, 0, 1) - endfunction + endlist }; u8 func0430_hoverbot4[] = { hoverbot_do_paths(3, 4, 5) - endfunction + endlist }; u8 func0431_hoverbot5[] = { hoverbot_do_paths(4, 5, 3) - endfunction + endlist }; u8 func0432_hoverbot6[] = { hoverbot_do_paths(5, 3, 4) - endfunction + endlist }; /** @@ -3270,15 +3270,15 @@ u8 func0432_hoverbot6[] = { */ u8 func0419_ba8c[] = { set_alertness(255) - set_return_function(CHR_SELF, 0x0419) - set_onshot_function(0x0419) + set_returnlist(CHR_SELF, 0x0419) + set_shotlist(0x0419) if_chr_dying(CHR_SELF, /*goto*/ 0x02) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) if_chr_unloaded(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) if_chr_idle(/*goto*/ 0x6b) @@ -3327,23 +3327,23 @@ u8 func0419_ba8c[] = { if_rand_lt(128, /*goto*/ 0x6f) if_rand_lt(196, /*goto*/ 0x70) set_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1) - animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x72) label(0x6e) - animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x72) label(0x6f) - animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x72) label(0x70) - animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x72) label(0x71) - animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x72) label(0x31) @@ -3401,8 +3401,8 @@ u8 func0419_ba8c[] = { if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x31) if_chr_distance_gt(450, /*goto*/ 0x31) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - set_return_function(CHR_SELF, 0x0419) - set_function(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) + set_returnlist(CHR_SELF, 0x0419) + set_ailist(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) label(0x31) if_timer_lt(600, /*goto*/ 0x31) unset_self_flag_bankx(CHRFLAG0_00002000, BANK_0) @@ -3421,7 +3421,7 @@ u8 func0419_ba8c[] = { label(0x4f) restart_timer - animation(0x025f, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x025f, 0, 193, 0x10, 0x10, CHR_SELF, 2) label(0x0f) yield if_timer_gt(90, /*goto*/ 0x0b) @@ -3429,7 +3429,7 @@ u8 func0419_ba8c[] = { label(0x02) say_quip(CHR_BOND, 0x24, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00) - animation(0x002e, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x002e, 0, 193, 0x10, 0x10, CHR_SELF, 2) label(0x09) yield if_timer_gt(120, /*goto*/ 0x0b) @@ -3452,7 +3452,7 @@ u8 func0419_ba8c[] = { set_squadron_alertness(100) say_quip(CHR_BOND, 0x25, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00) label(0x0e) - animation(0x0229, -1, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(0x0229, -1, -1, 0x10, 0x14, CHR_SELF, 2) label(0x0a) yield if_chr_stopped(/*goto*/ 0x31) @@ -3461,7 +3461,7 @@ u8 func0419_ba8c[] = { label(0x31) goto_first(0x0e) - endfunction + endlist }; u8 func041a_draw_magnum[] = { @@ -3473,16 +3473,16 @@ u8 func041a_draw_magnum[] = { set_self_flag_bankx(CHRFLAG1_WARNED, BANK_1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func141b_setup_lifts[] = { activate_lift(1, 0x20) activate_lift(2, 0x21) activate_lift(9, 0x36) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_safe_switch[] = { @@ -3547,8 +3547,8 @@ u8 func1018_safe_switch[] = { open_door(OBJ_SAFEDOOR) endloop(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_safe_switch_cover[] = { @@ -3569,8 +3569,8 @@ u8 func1018_safe_switch_cover[] = { label(0x31) set_object_flag_bank0(OBJ_SAFE_SWITCH_COVER, OBJECTFLAG0_02000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_check_disguise_used[] = { @@ -3581,8 +3581,8 @@ u8 func101a_check_disguise_used[] = { label(0x31) message(CHR_P1P2, 0x0e31) // "Disguise worn." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_intro[] = { @@ -3594,32 +3594,32 @@ u8 func1003_intro[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01e6, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01e6, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_hud_visible(CHR_BOND, TRUE) set_chr_chrflag(CHR_TRENT, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TRENT, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TRENT, CHRHFLAG_00020000) - animation(0x01e7, -1, -1, 0x06, 0x00, CHR_TRENT, 4) + chr_do_animation(0x01e7, -1, -1, 0x06, 0x00, CHR_TRENT, 4) set_chr_chrflag(0x48, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x48, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x48, CHRHFLAG_00020000) - animation(0x01e8, -1, -1, 0x06, 0x00, 0x48, 4) + chr_do_animation(0x01e8, -1, -1, 0x06, 0x00, 0x48, 4) set_chr_chrflag(0x49, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x49, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x49, CHRHFLAG_00020000) - animation(0x01e9, -1, -1, 0x06, 0x00, 0x49, 4) + chr_do_animation(0x01e9, -1, -1, 0x06, 0x00, 0x49, 4) set_chr_chrflag(0x4a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x4a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x4a, CHRHFLAG_00020000) - animation(0x01ea, -1, -1, 0x06, 0x00, 0x4a, 4) + chr_do_animation(0x01ea, -1, -1, 0x06, 0x00, 0x4a, 4) set_chr_chrflag(0x4b, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x4b, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x4b, CHRHFLAG_00020000) - animation(0x01eb, -1, -1, 0x06, 0x00, 0x4b, 4) + chr_do_animation(0x01eb, -1, -1, 0x06, 0x00, 0x4b, 4) set_chr_chrflag(0x4c, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x4c, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x4c, CHRHFLAG_00020000) - animation(0x01ec, -1, -1, 0x06, 0x00, 0x4c, 4) + chr_do_animation(0x01ec, -1, -1, 0x06, 0x00, 0x4c, 4) show_object(0x22) set_object_flag_bank1(0x22, OBJECTFLAG1_04000000) set_object_flag_bank2(0x22, OBJECTFLAG2_00000010) @@ -3837,22 +3837,22 @@ u8 func1003_intro[] = { set_chr_chrflag(0x49, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(0x49, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x49, CHRHFLAG_00020000) - animation(0x01e9, -2, -1, 0x06, 0x00, 0x49, 2) + chr_do_animation(0x01e9, -2, -1, 0x06, 0x00, 0x49, 2) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01e6, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01e6, -2, -1, 0x06, 0x00, CHR_BOND, 2) set_chr_hud_visible(CHR_BOND, FALSE) unset_object_flag_bank1(0x22, OBJECTFLAG1_04000000) set_object_flag_bank2(0x22, OBJECTFLAG2_00000010) object_do_animation(0x01ed, 0x22, 0x01ff, 0xfe) - set_function(0x00, 0x0405) - set_function(0x01, 0x0405) - set_function(CHR_STEWARDESS, FUNC_STEWARDESS) + set_ailist(0x00, 0x0405) + set_ailist(0x01, 0x0405) + set_ailist(CHR_STEWARDESS, FUNC_STEWARDESS) restart_default_music reset_ambience enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_msg_nowsyourchance[] = { @@ -3862,8 +3862,8 @@ u8 func101c_msg_nowsyourchance[] = { label(0x31) speak(CHR_BOND, 0x0e32, 0x8182, CHANNEL_6, COLOR_09_BLUE) // "Now's your chance! Grab the stewardess's bag and g..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_msg_usethatcase[] = { @@ -3891,8 +3891,8 @@ u8 func101d_msg_usethatcase[] = { speak(CHR_P1P2, 0x0e33, 0x8183, CHANNEL_4, COLOR_09_BLUE) // "Use that case to conceal your equipment." label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_msg_casewillgetstopped[] = { @@ -3909,8 +3909,8 @@ u8 func101e_msg_casewillgetstopped[] = { label(0x31) speak(CHR_BOND, 0x0e34, 0x8184, CHANNEL_6, COLOR_09_BLUE) // "The case will get stopped unless you do something." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_msg_smallerthanithought[] = { @@ -3922,8 +3922,8 @@ u8 func101f_msg_smallerthanithought[] = { label(0x31) speak(CHR_P1P2, 0x0e35, 0x73c7, CHANNEL_6, COLOR_09_BLUE) // "So that's Air Force One? ... Huh, smaller than I t..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_check_office1_dead[] = { @@ -3935,8 +3935,8 @@ u8 func1022_check_office1_dead[] = { label(0x31) set_stage_flag(STAGEFLAG_OFFICE1_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1023_check_office2_dead[] = { @@ -3948,8 +3948,8 @@ u8 func1023_check_office2_dead[] = { label(0x31) set_stage_flag(STAGEFLAG_OFFICE2_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_double_dy357[] = { @@ -3971,8 +3971,8 @@ u8 func1024_double_dy357[] = { unset_object_flag_bank1(0x30, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank0(0x31, OBJECTFLAG0_00100000) unset_object_flag_bank1(0x31, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3988,7 +3988,7 @@ u8 func0416_watch_flag[] = { dprint 'F','L','A','G',' ','S','E','T','\n',0, endloop(0x00) - endfunction + endlist }; u8 func101a_check_disguise_used2[] = { @@ -4010,21 +4010,21 @@ u8 func101a_check_disguise_used2[] = { set_stage_flag(STAGEFLAG_DISGUISED) set_stage_flag(STAGEFLAG_DISGUISED2) label(0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x00) - endfunction + endlist }; u8 func1026_check_alarm_destroyed[] = { beginloop(0x00) if_object_in_good_condition(OBJ_ALARM, /*goto*/ 0x31) activate_alarm - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) endloop(0x00) - endfunction + endlist }; u8 func0417_remove_or_unalert[] = { @@ -4046,11 +4046,11 @@ u8 func0417_remove_or_unalert[] = { chr_drop_weapon(CHR_SELF) remove_chr(CHR_SELF) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x02) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0418_remove_or_cower[] = { @@ -4070,10 +4070,10 @@ u8 func0418_remove_or_cower[] = { yield remove_chr(CHR_SELF) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x02) label(0x62) - animation(ANIM_COWER_0229, -1, -1, 0x14, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x14, 0x0a, CHR_SELF, 2) beginloop(0x63) if_chr_stopped(/*goto*/ 0x31) @@ -4082,13 +4082,13 @@ u8 func0418_remove_or_cower[] = { label(0x31) goto_first(0x62) - endfunction + endlist }; u8 func102a_setup_snow[] = { enable_snow(TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1027_remotemine[] = { @@ -4105,11 +4105,11 @@ u8 func1027_remotemine[] = { destroy_object(0x46) yield destroy_object(0x47) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) endloop(0x00) - endfunction + endlist }; u8 func141b_setup_lifts_and_doors[] = { @@ -4133,8 +4133,8 @@ u8 func141b_setup_lifts_and_doors[] = { label(0x02) unset_object_flag_bank0(OBJ_DIAGONAL_LIFT, OBJECTFLAG0_DEACTIVATED) unset_object_flag_bank0(OBJ_VERTICAL_LIFT, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1029_lift_doors[] = { @@ -4180,7 +4180,7 @@ u8 func1029_lift_doors[] = { label(0x02) endloop(0x00) - endfunction + endlist }; u8 func102b_check_secretary_dead[] = { @@ -4193,14 +4193,14 @@ u8 func102b_check_secretary_dead[] = { label(0x31) if_door_locked(0x18, 0x02, /*goto*/ 0x31) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x31) message(CHR_BOND, 0x0e3e) // "Critical mission personnel disabled." set_stage_flag(STAGEFLAG_SECRETARY_DEAD) label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102c_lock_door_on_alarm[] = { @@ -4211,8 +4211,8 @@ u8 func102c_lock_door_on_alarm[] = { label(0x31) lock_door(0x18, 0x04) close_door(0x18) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102d_check_console_destroyed[] = { @@ -4229,8 +4229,8 @@ u8 func102d_check_console_destroyed[] = { set_stage_flag(STAGEFLAG_CONSOLE_DESTROYED) message(CHR_BOND, 0x0e3f) // "Critical mission object destroyed." label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102e_check_base_entered[] = { @@ -4242,8 +4242,8 @@ u8 func102e_check_base_entered[] = { label(0x31) message(CHR_BOND, 0x0e40) // "Entrance to base secured." set_stage_flag(STAGEFLAG_ENTERED_BASE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102f_undisguise_on_alarm[] = { @@ -4256,16 +4256,16 @@ u8 func102f_undisguise_on_alarm[] = { if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) set_chr_hiddenflag(CHR_COOP, CHRHFLAG_DISGUISE_UNCOVERED) label(0x31) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1030_setup_rtracker[] = { yield set_object_flag_bank2(0x30, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(0x31, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1031_setup_lighting[] = { @@ -4302,8 +4302,8 @@ u8 func1031_setup_lighting[] = { misc_command(0x008f, 0x05, 0x01) misc_command(0x0090, 0x06, 0x01) misc_command(0x0091, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1032_unhide_guards_near_plane[] = { @@ -4318,38 +4318,38 @@ u8 func1032_unhide_guards_near_plane[] = { label(0x31) show_chr(0x1b) - set_function(0x1b, 0x0422) + set_ailist(0x1b, 0x0422) unset_chr_hiddenflag(0x1b, CHRHFLAG_40000000) unset_chr_chrflag(0x1b, CHRCFLAG_HIDDEN) yield show_chr(0x19) - set_function(0x19, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x19, FUNC_INIT_POSTTAKEOVER_GUARD) unset_chr_hiddenflag(0x19, CHRHFLAG_40000000) unset_chr_chrflag(0x19, CHRCFLAG_HIDDEN) yield show_chr(0x1d) - set_function(0x1d, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x1d, FUNC_INIT_POSTTAKEOVER_GUARD) unset_chr_hiddenflag(0x1d, CHRHFLAG_40000000) unset_chr_chrflag(0x1d, CHRCFLAG_HIDDEN) yield show_chr(0x1e) - set_function(0x1e, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x1e, FUNC_INIT_POSTTAKEOVER_GUARD) unset_chr_hiddenflag(0x1e, CHRHFLAG_40000000) unset_chr_chrflag(0x1e, CHRCFLAG_HIDDEN) yield show_chr(0x20) - set_function(0x20, FUNC_INIT_POSTTAKEOVER_GUARD) + set_ailist(0x20, FUNC_INIT_POSTTAKEOVER_GUARD) unset_chr_hiddenflag(0x20, CHRHFLAG_40000000) unset_chr_chrflag(0x20, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1420_setup_portals[] = { yield configure_room_portals(0x0080) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupdam.c b/src/files/setup/setupdam.c index 4e5ee39f6..49f88ac27 100644 --- a/src/files/setup/setupdam.c +++ b/src/files/setup/setupdam.c @@ -649,15 +649,15 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(CHR_PILOT1, CHRCFLAG_04000000) set_chr_chrflag(CHR_PILOT2, CHRCFLAG_04000000) set_chr_chrflag(CHR_PILOT3, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func0408_guard_unalerted[] = { @@ -669,8 +669,8 @@ u8 func0408_guard_unalerted[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1002_intro[] = { @@ -681,15 +681,15 @@ u8 func1002_intro[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02cf, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x02cf, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02d0, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02d0, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000) - animation(0x02d1, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) + chr_do_animation(0x02d1, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) restart_timer set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) yield @@ -803,15 +803,15 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02cf, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x02cf, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02d0, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x02d0, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) hide_chr(CHR_INTRO_GUARD) enter_firstperson yield - set_function(CHR_ELVIS, FUNC_ELVIS_AT_START) + set_ailist(CHR_ELVIS, FUNC_ELVIS_AT_START) restart_timer beginloop(0x0c) @@ -821,8 +821,8 @@ u8 func1002_intro[] = { label(0x04) restart_default_music reset_ambience - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c01_outro[] = { @@ -830,17 +830,17 @@ u8 func0c01_outro[] = { set_music_track(MUSIC_PELAGIC_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x02e3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) - set_function(CHR_ELVIS, GFUNC_IDLE) + chr_do_animation(0x02e3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + set_ailist(CHR_ELVIS, GFUNC_IDLE) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02e4, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02e4, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) show_object(OBJ_OUTRO_SUBMARINE) set_object_flag_bank1(OBJ_OUTRO_SUBMARINE, OBJECTFLAG1_04000000) @@ -992,20 +992,20 @@ u8 func0c01_outro[] = { label(0x39) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x02cf, -2, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x02cf, -2, -1, 0x06, 0x00, CHR_P1P2, 2) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02d0, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x02d0, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function1[] = { label(0x00) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_msg_controlledfrom[] = { @@ -1017,8 +1017,8 @@ u8 func1004_msg_controlledfrom[] = { label(0x07) speak(CHR_P1P2, 0x160b, 0x73d1, CHANNEL_6, COLOR_09_BLUE) // "This must be where the sub's controlled from." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_msg_withoutautopilot[] = { @@ -1029,8 +1029,8 @@ u8 func1005_msg_withoutautopilot[] = { label(0x07) speak(CHR_P1P2, 0x160c, 0x73d2, CHANNEL_6, COLOR_09_BLUE) // "Without the autopilot and the GPS, the ship will w..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_msg_conductoperations[] = { @@ -1041,8 +1041,8 @@ u8 func1006_msg_conductoperations[] = { label(0x07) speak(CHR_P1P2, 0x160d, 0x73d3, CHANNEL_6, COLOR_09_BLUE) // "They'll be unable to conduct any operations withou..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function2[] = { @@ -1061,8 +1061,8 @@ u8 unregistered_function2[] = { label(0x04) message(CHR_BOND, 0x1610) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_00000400) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_open_reactor_hatch[] = { @@ -1089,8 +1089,8 @@ u8 func1009_open_reactor_hatch[] = { set_object_flag_bank1(OBJ_REACTOR_HATCH, OBJECTFLAG1_INVISIBLE) message(CHR_P1P2, 0x1611) // "Reactor shutdown control hatch opened." set_stage_flag(STAGEFLAG_REACTOR_HATCH_OPEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_reactor_switch[] = { @@ -1099,7 +1099,7 @@ u8 func100a_reactor_switch[] = { if_object_in_good_condition(OBJ_REACTOR_SWITCH, /*goto*/ 0x07) message(CHR_BOND, 0x1624) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_REACTOR_SWITCH_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x07) if_chr_activated_object(CHR_P1P2, OBJ_REACTOR_SWITCH, /*goto*/ 0x07) @@ -1120,8 +1120,8 @@ u8 func100a_reactor_switch[] = { set_object_image(OBJ_REACTOR_SWITCH, 0x02, 0x12) message(CHR_P1P2, 0x1612) // "Reactor has been shut down." set_stage_flag(STAGEFLAG_REACTOR_SHUT_DOWN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_diving_area_located[] = { @@ -1142,8 +1142,8 @@ u8 func100b_check_diving_area_located[] = { label(0x07) message(CHR_P1P2, 0x1613) // "Diving control center has been located." set_stage_flag(STAGEFLAG_LOCATED_DIVING_AREA) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_check_end_level[] = { @@ -1176,7 +1176,7 @@ u8 func100c_check_end_level[] = { set_stage_flag(STAGEFLAG_ELVIS_APPEARED_AT_MOONPOOL) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_ELVIS, FUNC_ELVIS_AT_MOONPOOL) + set_ailist(CHR_ELVIS, FUNC_ELVIS_AT_MOONPOOL) beginloop(0x00) chr_toggle_p1p2(CHR_SELF) @@ -1231,17 +1231,17 @@ u8 func100c_check_end_level[] = { // Both players dead label(0x07) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x04) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) // Elvis dead label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_labtech_dead[] = { @@ -1260,8 +1260,8 @@ u8 func100e_check_labtech_dead[] = { message(CHR_BOND, 0x1614) // "Critical mission personnel killed." set_stage_flag(STAGEFLAG_LABTECH_DEAD) label(0x0b) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_researchdata_collected[] = { @@ -1283,8 +1283,8 @@ u8 func100f_check_researchdata_collected[] = { label(0x07) message(CHR_BOND, 0x1615) // "Research data has been secured." set_stage_flag(STAGEFLAG_COLLECTED_RESEARCH_DATA) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(pathid) \ @@ -1297,35 +1297,35 @@ u8 func100f_check_researchdata_collected[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func0405_start_path00[] = { init_path(0) - endfunction + endlist }; u8 func0409_start_path03[] = { set_chr_cloaked(CHR_SELF, FALSE, TRUE) init_path(3) - endfunction + endlist }; u8 func040a_start_path04[] = { set_chr_cloaked(CHR_SELF, FALSE, TRUE) init_path(4) - endfunction + endlist }; u8 func0406_start_path01[] = { init_path(1) - endfunction + endlist }; u8 func0407_start_path02[] = { init_path(2) - endfunction + endlist }; #define labtech_logic(function, pad1, pad2, pad3) \ @@ -1336,12 +1336,12 @@ u8 func0407_start_path02[] = { u8 func040e_init_labtech1[] = { set_self_chrflag(CHRCFLAG_04000000) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_LABTECH1) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH1) + endlist }; u8 func040b_labtech1[] = { - set_onshot_function(FUNC_LABTECH1) + set_shotlist(FUNC_LABTECH1) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -1349,8 +1349,8 @@ u8 func040b_labtech1[] = { // Dying label(0x07) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) @@ -1370,15 +1370,15 @@ u8 func040b_labtech1[] = { if_rand_lt(86, /*goto*/ 0x3b) if_rand_lt(172, /*goto*/ 0x3c) - animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3b) - animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3c) - animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x27) @@ -1404,19 +1404,19 @@ u8 func040b_labtech1[] = { endloop(0x00) label(0x0f) - set_function(CHR_SELF, FUNC_LABTECH_ALERTED) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_ALERTED) + endlist }; u8 func040f_init_labtech2[] = { set_self_chrflag(CHRCFLAG_04000000) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_LABTECH2) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH2) + endlist }; u8 func040c_labtech2[] = { - set_onshot_function(FUNC_LABTECH2) + set_shotlist(FUNC_LABTECH2) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -1424,8 +1424,8 @@ u8 func040c_labtech2[] = { // Dying label(0x07) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) @@ -1445,15 +1445,15 @@ u8 func040c_labtech2[] = { if_rand_lt(86, /*goto*/ 0x3b) if_rand_lt(172, /*goto*/ 0x3c) - animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3b) - animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3c) - animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x27) @@ -1479,15 +1479,15 @@ u8 func040c_labtech2[] = { endloop(0x00) label(0x0f) - set_function(CHR_SELF, FUNC_LABTECH_ALERTED) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_ALERTED) + endlist }; u8 func0410_init_labtech3[] = { set_self_chrflag(CHRCFLAG_04000000) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_LABTECH3) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH3) + endlist }; u8 func040d_labtech3[] = { @@ -1495,7 +1495,7 @@ u8 func040d_labtech3[] = { // anyway and will die in one shot. Theroetically, if you use PD mode with // max health and shoot him with a weak weapon then he will start running to // lab tech 1's pads. - set_onshot_function(FUNC_LABTECH1) + set_shotlist(FUNC_LABTECH1) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -1503,8 +1503,8 @@ u8 func040d_labtech3[] = { // Dying label(0x07) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) @@ -1524,15 +1524,15 @@ u8 func040d_labtech3[] = { if_rand_lt(86, /*goto*/ 0x3b) if_rand_lt(172, /*goto*/ 0x3c) - animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3b) - animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x3c) - animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x07) label(0x27) @@ -1561,8 +1561,8 @@ u8 func040d_labtech3[] = { set_alertness(100) label(0x0f) - set_function(CHR_SELF, FUNC_LABTECH_ALERTED) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_ALERTED) + endlist }; u8 func0411_labtech_alerted[] = { @@ -1580,7 +1580,7 @@ u8 func0411_labtech_alerted[] = { set_alertness(100) dprint 'T','A','L','K',' ','1','\n',0, say_quip(CHR_BOND, 0x2a, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00) - animation(ANIM_SURRENDER_002E, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x3e) if_timer_gt(90, /*goto*/ 0x04) @@ -1621,7 +1621,7 @@ u8 func0411_labtech_alerted[] = { if_chr_distance_lt(300, /*goto*/ 0x04) label(0x00) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x11) chr_toggle_p1p2(CHR_SELF) @@ -1653,15 +1653,15 @@ u8 func0411_labtech_alerted[] = { label(0x07) goto_first(0x13) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_hide[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_alarm_responders[] = { @@ -1779,31 +1779,31 @@ u8 func1010_alarm_responders[] = { rebuild_teams rebuild_squadrons yield - set_function(0x57, 0x0409) - set_function(0x58, 0x0409) - set_function(0x59, 0x040a) - set_function(0x5a, 0x040a) - set_function(0x5b, FUNC_GUARD_ALERTED) - set_function(0x5c, FUNC_GUARD_ALERTED) - set_function(0x5d, FUNC_GUARD_ALERTED) - set_function(0x5e, FUNC_GUARD_ALERTED) - set_function(0x04, FUNC_GUARD_UNALERTED) - set_function(0x25, FUNC_GUARD_UNALERTED) - set_function(0x06, FUNC_GUARD_UNALERTED) - set_function(0x08, FUNC_GUARD_UNALERTED) - set_function(0x0a, FUNC_GUARD_UNALERTED) - set_function(0x0c, FUNC_GUARD_UNALERTED) - set_function(0x0e, FUNC_GUARD_UNALERTED) - set_function(0x10, FUNC_GUARD_UNALERTED) - set_function(0x12, FUNC_GUARD_UNALERTED) - set_function(0x14, FUNC_GUARD_UNALERTED) - set_function(0x16, FUNC_GUARD_UNALERTED) - set_function(0x18, FUNC_GUARD_UNALERTED) - set_function(0x1a, FUNC_GUARD_UNALERTED) - set_function(0x1c, FUNC_GUARD_UNALERTED) - set_function(0x1e, FUNC_GUARD_UNALERTED) - set_function(0x20, FUNC_GUARD_UNALERTED) - set_function(0x22, FUNC_GUARD_UNALERTED) + set_ailist(0x57, 0x0409) + set_ailist(0x58, 0x0409) + set_ailist(0x59, 0x040a) + set_ailist(0x5a, 0x040a) + set_ailist(0x5b, FUNC_GUARD_ALERTED) + set_ailist(0x5c, FUNC_GUARD_ALERTED) + set_ailist(0x5d, FUNC_GUARD_ALERTED) + set_ailist(0x5e, FUNC_GUARD_ALERTED) + set_ailist(0x04, FUNC_GUARD_UNALERTED) + set_ailist(0x25, FUNC_GUARD_UNALERTED) + set_ailist(0x06, FUNC_GUARD_UNALERTED) + set_ailist(0x08, FUNC_GUARD_UNALERTED) + set_ailist(0x0a, FUNC_GUARD_UNALERTED) + set_ailist(0x0c, FUNC_GUARD_UNALERTED) + set_ailist(0x0e, FUNC_GUARD_UNALERTED) + set_ailist(0x10, FUNC_GUARD_UNALERTED) + set_ailist(0x12, FUNC_GUARD_UNALERTED) + set_ailist(0x14, FUNC_GUARD_UNALERTED) + set_ailist(0x16, FUNC_GUARD_UNALERTED) + set_ailist(0x18, FUNC_GUARD_UNALERTED) + set_ailist(0x1a, FUNC_GUARD_UNALERTED) + set_ailist(0x1c, FUNC_GUARD_UNALERTED) + set_ailist(0x1e, FUNC_GUARD_UNALERTED) + set_ailist(0x20, FUNC_GUARD_UNALERTED) + set_ailist(0x22, FUNC_GUARD_UNALERTED) yield unset_chr_chrflag(0x57, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x58, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) @@ -1855,25 +1855,25 @@ u8 func1010_alarm_responders[] = { unset_chr_chrflag(0x1e, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x20, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x22, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_init_pilot[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_PILOT) - endfunction + set_ailist(CHR_SELF, FUNC_PILOT) + endlist }; u8 func0401_pilot_dying[] = { unset_stage_flag(STAGEFLAG_SAID_PULLTHEPLUG) unset_stage_flag(STAGEFLAG_SAID_SWITCHTHINGOFF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0401_pilot[] = { - set_onshot_function(FUNC_PILOT) + set_shotlist(FUNC_PILOT) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -1881,7 +1881,7 @@ u8 func0401_pilot[] = { // Dying label(0x07) - set_function(CHR_SELF, FUNC_PILOT_DYING) + set_ailist(CHR_SELF, FUNC_PILOT_DYING) // Alive - wait for player to arrive beginloop(0x00) @@ -1982,7 +1982,7 @@ u8 func0401_pilot[] = { // Push button label(0x07) - animation(ANIM_PUSH_BUTTON, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_PUSH_BUTTON, 0, -1, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0x0e) @@ -2021,8 +2021,8 @@ u8 func0401_pilot[] = { surrender goto_first(0x0b) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_check_pilots_dead[] = { @@ -2052,13 +2052,13 @@ u8 func1011_check_pilots_dead[] = { label(0x08) if_stage_flag_eq(STAGEFLAG_AUTOPILOT_DISABLED, FALSE, /*goto*/ 0x07) if_stage_flag_eq(STAGEFLAG_GPS_DISABLED, FALSE, /*goto*/ 0x07) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x07) message(CHR_BOND, 0x161b) // "Critical mission personnel have been killed." set_stage_flag(STAGEFLAG_PILOT_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2087,24 +2087,24 @@ u8 func1012_choose_angry_pilot[] = { if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x3b) if_chr_unloaded(CHR_PILOT1, /*goto*/ 0x3b) if_chr_has_flag_bankx(CHR_PILOT1, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x3b) - set_function(CHR_PILOT1, FUNC_ANGRY_PILOT) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_PILOT1, FUNC_ANGRY_PILOT) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x3b) if_chr_dying(CHR_PILOT2, /*goto*/ 0x3c) if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x3c) if_chr_unloaded(CHR_PILOT2, /*goto*/ 0x3c) if_chr_has_flag_bankx(CHR_PILOT2, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x3c) - set_function(CHR_PILOT2, FUNC_ANGRY_PILOT) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_PILOT2, FUNC_ANGRY_PILOT) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x3c) if_chr_dying(CHR_PILOT3, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x04) if_chr_unloaded(CHR_PILOT3, /*goto*/ 0x04) if_chr_has_flag_bankx(CHR_PILOT3, CHRFLAG0_08000000, BANK_0, /*goto*/ 0x04) - set_function(CHR_PILOT3, FUNC_ANGRY_PILOT) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_PILOT3, FUNC_ANGRY_PILOT) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x04) endloop(0x03) @@ -2113,8 +2113,8 @@ u8 func1012_choose_angry_pilot[] = { label(0x08) message(CHR_BOND, 0x1623) // "Civilians have been killed." set_stage_flag(STAGEFLAG_JO_KILLED_A_PILOT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_angry_pilot[] = { @@ -2126,7 +2126,7 @@ u8 func0404_angry_pilot[] = { rebuild_squadrons unset_self_flag_bankx(CHRFLAG0_00100000, BANK_0) set_self_chrflag(CHRCFLAG_00000040) - set_onshot_function(FUNC_ANGRY_PILOT) + set_shotlist(FUNC_ANGRY_PILOT) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -2134,14 +2134,14 @@ u8 func0404_angry_pilot[] = { // Dying label(0x07) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) set_self_flag_bankx(CHRFLAG0_00000004, BANK_0) speak(CHR_TARGET, 0x162f, 0x14dd, CHANNEL_7, COLOR_04_ORANGE) // "Die, you traitors." - animation(ANIM_DRAW_PISTOL_0245, -1, 120, 0x06, 0x00, CHR_SELF, 3) + chr_do_animation(ANIM_DRAW_PISTOL_0245, -1, 120, 0x06, 0x00, CHR_SELF, 3) try_draw_weapon(MODEL_CHRDY357, WEAPON_DY357MAGNUM, 0x00000000, /*goto*/ 0x6c) beginloop(0x6c) @@ -2196,8 +2196,8 @@ u8 func0404_angry_pilot[] = { if_chr_lost_track_of_target_maybe(/*goto*/ 0x07) goto_next(0x04) label(0x07) - set_onshot_function(GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x04) restart_timer @@ -2223,7 +2223,7 @@ u8 func0404_angry_pilot[] = { label(0x07) goto_first(0x03) - endfunction + endlist }; u8 func1013_lift_switch[] = { @@ -2239,8 +2239,8 @@ u8 func1013_lift_switch[] = { open_door(0x18) open_door(0x19) set_stage_flag(STAGEFLAG_LIFT_UNLOCKED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_moonpool_switch[] = { @@ -2252,7 +2252,7 @@ u8 func1014_moonpool_switch[] = { set_stage_flag(STAGEFLAG_MOONPOOL_SWITCH_DESTROYED) label(0x10) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x08) if_chr_activated_object(CHR_P1P2, OBJ_MOONPOOL_SWITCH, /*goto*/ 0x07) @@ -2262,8 +2262,8 @@ u8 func1014_moonpool_switch[] = { label(0x07) message(CHR_P1P2, 0x161d) // "Lift has been activated." set_stage_flag(STAGEFLAG_MOONPOOL_ACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0413_guard_alerted[] = { @@ -2275,8 +2275,8 @@ u8 func0413_guard_alerted[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func1015_shuffle_hatchswitches[] = { @@ -2300,8 +2300,8 @@ u8 func1015_shuffle_hatchswitches[] = { yield set_object_image(OBJ_HATCHSWITCH4, 0x00, 0x13) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define hatchswitch_logic(switch, flag) \ @@ -2340,22 +2340,22 @@ u8 func1015_shuffle_hatchswitches[] = { u8 func1016_hatchswitch1[] = { hatchswitch_logic(OBJ_HATCHSWITCH1, STAGEFLAG_HATCHSWITCH1_ACTIVATED) - endfunction + endlist }; u8 func1017_hatchswitch2[] = { hatchswitch_logic(OBJ_HATCHSWITCH2, STAGEFLAG_HATCHSWITCH2_ACTIVATED) - endfunction + endlist }; u8 func1018_hatchswitch3[] = { hatchswitch_logic(OBJ_HATCHSWITCH3, STAGEFLAG_HATCHSWITCH3_ACTIVATED) - endfunction + endlist }; u8 func1019_hatchswitch4[] = { hatchswitch_logic(OBJ_HATCHSWITCH4, STAGEFLAG_HATCHSWITCH4_ACTIVATED) - endfunction + endlist }; u8 func101a_badhatchswitches[] = { @@ -2427,19 +2427,19 @@ u8 func101a_badhatchswitches[] = { set_object_image(OBJ_BADHATCHSWITCH4, 0x00, 0x12) goto_first(0x00) - endfunction + endlist }; u8 func101b_reactor_hum[] = { yield assign_sound(0x8146, CHANNEL_1) play_sound_from_object(CHANNEL_1, OBJ_REACTOR_SWITCH, 0x07d0, 0x0bb8) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_elvis_at_start[] = { - set_onshot_function(FUNC_ELVIS_AT_START) + set_shotlist(FUNC_ELVIS_AT_START) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -2450,7 +2450,7 @@ u8 func0415_elvis_at_start[] = { if_sound_finished(CHANNEL_6, /*goto*/ 0x08) mute_channel(CHANNEL_6) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) @@ -2485,30 +2485,30 @@ u8 func0415_elvis_at_start[] = { call_rng if_rand_gt(128, /*goto*/ 0x07) - // 50% chance of doing an idle animation + // 50% chance of doing an idle chr_do_animation call_rng if_rand_lt(64, /*goto*/ 0x44) if_rand_lt(128, /*goto*/ 0x45) if_rand_lt(196, /*goto*/ 0x46) set_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1) - animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x4c) label(0x44) - animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x4c) label(0x45) - animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x4c) label(0x46) - animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x4c) label(0x47) - animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x4c) // 50% chance @@ -2575,15 +2575,15 @@ u8 func0415_elvis_at_start[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_armor(2000) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * Elvis leading the way from the moon pool to the diving area. */ u8 func0416_elvis_leading[] = { - set_onshot_function(FUNC_ELVIS_LEADING) + set_shotlist(FUNC_ELVIS_LEADING) if_chr_dying(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_unloaded(CHR_SELF, /*goto*/ 0x07) @@ -2591,8 +2591,8 @@ u8 func0416_elvis_leading[] = { // Dying label(0x07) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x04) @@ -2654,10 +2654,10 @@ u8 func0416_elvis_leading[] = { say_quip(CHR_BOND, 0x28, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00) label(0x07) - set_onshot_function(FUNC_ELVIS_LEADING) - set_return_function(CHR_SELF, FUNC_ELVIS_LEADING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_ELVIS_LEADING) + set_returnlist(CHR_SELF, FUNC_ELVIS_LEADING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func101c_check_elvis_dead[] = { @@ -2670,8 +2670,8 @@ u8 func101c_check_elvis_dead[] = { label(0x07) message(CHR_BOND, 0x1621) // "Elvis has been killed." set_stage_flag(STAGEFLAG_ELVIS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0418_elvis_at_moonpool[] = { @@ -2679,7 +2679,7 @@ u8 func0418_elvis_at_moonpool[] = { // he'll jump straight to leading the way without enabling AIVSAI on // everyone. This may allow him to run past guards without engaging in // combat. - set_onshot_function(FUNC_ELVIS_LEADING) + set_shotlist(FUNC_ELVIS_LEADING) beginloop(0x00) chr_toggle_p1p2(CHR_SELF) @@ -2700,8 +2700,8 @@ u8 func0418_elvis_at_moonpool[] = { endloop(0x0b) label(0x07) - set_function(CHR_SELF, FUNC_ELVIS_PREPARE_LEADING) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_PREPARE_LEADING) + endlist }; u8 func0417_elvis_prepare_leading[] = { @@ -2795,8 +2795,8 @@ u8 func0417_elvis_prepare_leading[] = { set_chr_flag_bankx(0x5c, CHRFLAG0_AIVSAI, BANK_0) set_chr_flag_bankx(0x5d, CHRFLAG0_AIVSAI, BANK_0) set_chr_flag_bankx(0x5e, CHRFLAG0_AIVSAI, BANK_0) - set_function(CHR_SELF, FUNC_ELVIS_LEADING) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_LEADING) + endlist }; u8 func101d_alarm_switches[] = { @@ -2833,8 +2833,8 @@ u8 func101d_alarm_switches[] = { // @bug: This function is surely not meant to be assigned here. But it has // no consequences because the function will bail because CHR_SELF doesn't // exist. - set_function(CHR_SELF, FUNC_ELVIS_LEADING) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_LEADING) + endlist }; u8 func101e_alarm_images[] = { @@ -2868,7 +2868,7 @@ u8 func101e_alarm_images[] = { set_object_image(0x25, 0x00, 0x14) goto_first(0x00) - endfunction + endlist }; u8 func101f_unlock_doors[] = { @@ -2887,16 +2887,16 @@ u8 func101f_unlock_doors[] = { // A + SA + PA label(0x0b) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_setup_rtracker[] = { yield set_object_flag_bank2(0x27, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(0x28, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1421_setup_lighting[] = { @@ -2931,8 +2931,8 @@ u8 func1421_setup_lighting[] = { misc_command(0x0072, 0x06, 0x01) misc_command(0x0073, 0x05, 0x01) misc_command(0x0077, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupdepo.c b/src/files/setup/setupdepo.c index ece0bfea6..54a35a3d7 100644 --- a/src/files/setup/setupdepo.c +++ b/src/files/setup/setupdepo.c @@ -485,8 +485,8 @@ u8 func0409_start_path00[] = { set_shield(0) assign_path(0) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040a_start_path01[] = { @@ -499,8 +499,8 @@ u8 func040a_start_path01[] = { set_shield(0) assign_path(1) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040b_start_path02[] = { @@ -513,8 +513,8 @@ u8 func040b_start_path02[] = { set_shield(0) assign_path(2) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040c_start_path03[] = { @@ -527,8 +527,8 @@ u8 func040c_start_path03[] = { set_shield(0) assign_path(3) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func1008_check_generator[] = { @@ -544,7 +544,7 @@ u8 func1008_check_generator[] = { message(CHR_BOND, 0x1818) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_GENERATOR_DESTROYED) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) reloop(0x04) @@ -566,7 +566,7 @@ u8 func1008_check_generator[] = { message(CHR_P1P2, 0x181a) // "Generator cannot be restarted." endloop(0x04) - endfunction + endlist }; u8 func1003_laser_switch_1[] = { @@ -580,7 +580,7 @@ u8 func1003_laser_switch_1[] = { if_stage_flag_eq(STAGEFLAG_LASERSET1_DISABLED, TRUE, /*goto*/ 0x2c) message(CHR_BOND, 0x1818) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_LASERSWITCH1_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) reloop(0x04) @@ -632,7 +632,7 @@ u8 func1003_laser_switch_1[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1004_laser_switch_2[] = { @@ -646,7 +646,7 @@ u8 func1004_laser_switch_2[] = { if_stage_flag_eq(STAGEFLAG_LASERSET2_DISABLED, TRUE, /*goto*/ 0x2c) message(CHR_BOND, 0x1818) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_LASERSWITCH2_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) reloop(0x04) @@ -699,7 +699,7 @@ u8 func1004_laser_switch_2[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1005_laser_switch_3[] = { @@ -713,7 +713,7 @@ u8 func1005_laser_switch_3[] = { if_stage_flag_eq(STAGEFLAG_LASERSET3_DISABLED, TRUE, /*goto*/ 0x2c) message(CHR_BOND, 0x1818) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_LASERSWITCH3_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) reloop(0x04) @@ -765,7 +765,7 @@ u8 func1005_laser_switch_3[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1006_laser_switch_4[] = { @@ -779,7 +779,7 @@ u8 func1006_laser_switch_4[] = { if_stage_flag_eq(STAGEFLAG_LASERSET4_DISABLED, TRUE, /*goto*/ 0x2c) message(CHR_BOND, 0x1818) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_LASERSWITCH4_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) reloop(0x04) @@ -831,7 +831,7 @@ u8 func1006_laser_switch_4[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1007_init_lasers[] = { @@ -944,8 +944,8 @@ u8 func1007_init_lasers[] = { mute_channel(CHANNEL_1) mute_channel(CHANNEL_2) mute_channel(CHANNEL_3) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_spawner_during_decode[] = { @@ -972,9 +972,9 @@ u8 func1009_spawner_during_decode[] = { // Spawn two swat guards label(0x61) - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x0058, 0x0401, 0x00000200, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x0058, 0x0401, 0x00000200, /*goto*/ 0x06) label(0x06) - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x003f, 0x0402, 0x00000200, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x003f, 0x0402, 0x00000200, /*goto*/ 0x06) label(0x06) // Every half second, use RNG to decide whether to consider spawning more. @@ -1015,7 +1015,7 @@ u8 func1009_spawner_during_decode[] = { call_rng if_rand_gt(128, /*goto*/ 0x0b) if_stage_flag_eq(STAGEFLAG_VISITED_TOP_DOOR, TRUE, /*goto*/ 0x2c) - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x0058, 0x0401, 0x00000200, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x0058, 0x0401, 0x00000200, /*goto*/ 0x06) label(0x06) goto_next(0x0d) @@ -1024,7 +1024,7 @@ u8 func1009_spawner_during_decode[] = { reloop(0x09) label(0x0b) - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x003f, 0x0402, 0x00000200, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, 0x003f, 0x0402, 0x00000200, /*goto*/ 0x06) label(0x06) label(0x0d) restart_timer @@ -1036,7 +1036,7 @@ u8 func1009_spawner_during_decode[] = { label(0x06) endloop(0x09) - endfunction + endlist }; #define init_swat \ @@ -1076,12 +1076,12 @@ u8 func0401_init_swat1[] = { endloop(0x08) label(0x2c) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x06) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1101,12 +1101,12 @@ u8 func0402_init_swat2[] = { endloop(0x08) label(0x2c) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x06) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func100a_give_keycards[] = { @@ -1206,8 +1206,8 @@ u8 func100a_give_keycards[] = { label(0x2c) unset_object_flag_bank0(OBJ_KEYCARD2, OBJECTFLAG0_00100000) unset_object_flag_bank1(OBJ_KEYCARD2, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_backup_collected[] = { @@ -1218,13 +1218,13 @@ u8 func100b_check_backup_collected[] = { label(0x2c) set_stage_flag(STAGEFLAG_BACKUP_COLLECTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_set_ai[] = { - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1400_setup_counterop[] = { @@ -1236,8 +1236,8 @@ u8 func1400_setup_counterop[] = { give_object_to_chr(OBJ_CMP150_BOND, CHR_BOND) give_object_to_chr(OBJ_CMP150_COOP, CHR_COOP) label(0x06) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func100e_check_conspirators_alerted[] = { @@ -1264,9 +1264,9 @@ u8 func100e_check_conspirators_alerted[] = { set_stage_flag(STAGEFLAG_ALARM_SOUNDING) if_stage_flag_eq(STAGEFLAG_MEETING_STARTED, TRUE, /*goto*/ 0x06) set_stage_flag(STAGEFLAG_CONSPIRATORS_ALERTED) - set_function(CHR_CASS, FUNC_RUN_FROM_MEETING) - set_function(0x1c, FUNC_RUN_FROM_MEETING) // chr doesn't exist - set_function(CHR_BLONDE, FUNC_RUN_FROM_MEETING) + set_ailist(CHR_CASS, FUNC_RUN_FROM_MEETING) + set_ailist(0x1c, FUNC_RUN_FROM_MEETING) // chr doesn't exist + set_ailist(CHR_BLONDE, FUNC_RUN_FROM_MEETING) message(CHR_BOND, 0x1829) // "Conspirators have been alerted." // Wait until alarm not active @@ -1282,8 +1282,8 @@ u8 func100e_check_conspirators_alerted[] = { unset_stage_flag(STAGEFLAG_ALARM_SOUNDING) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_alarm_switches[] = { @@ -1307,7 +1307,7 @@ u8 func100f_alarm_switches[] = { deactivate_alarm endloop(0x04) - endfunction + endlist }; u8 func1010_safe_cracking[] = { @@ -1317,7 +1317,7 @@ u8 func1010_safe_cracking[] = { if_object_in_good_condition(OBJ_SAFEKEYPAD, /*goto*/ 0x2c) message(CHR_BOND, 0x1840) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_SAFEKEYPAD_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) if_chr_activated_object(CHR_P1P2, OBJ_SAFEKEYPAD, /*goto*/ 0x2c) reloop(0x04) @@ -1363,7 +1363,7 @@ u8 func1010_safe_cracking[] = { message(CHR_BOND, 0x1840) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_SAFEKEYPAD_DESTROYED) hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) if_countdown_timer_lt(1, /*goto*/ 0x06) endloop(0x08) @@ -1378,8 +1378,8 @@ u8 func1010_safe_cracking[] = { unset_object_flag_bank1(OBJ_SAFEDOOR, OBJECTFLAG1_20000000) open_door(OBJ_SAFEDOOR) hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_check_for_end[] = { @@ -1418,7 +1418,7 @@ u8 func1012_check_for_end[] = { label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Objectives complete label(0x53) @@ -1435,12 +1435,12 @@ u8 func1012_check_for_end[] = { label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x06) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func1013_check_escape_doors[] = { @@ -1452,13 +1452,13 @@ u8 func1013_check_escape_doors[] = { label(0x2c) dprint 'S','T','A','R','T',' ','A','L','A','R','M','\n',0, activate_alarm - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) reloop(0x04) label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1014_check_camspy_location[] = { @@ -1472,8 +1472,8 @@ u8 func1014_check_camspy_location[] = { set_stage_flag(STAGEFLAG_MEETING_HOLOGRAPHED) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_check_for_meeting_trigger[] = { @@ -1484,8 +1484,8 @@ u8 func100c_check_for_meeting_trigger[] = { label(0x06) dprint 's','h','o','t',' ','1',0, - set_function(CHR_SELF, FUNC_MEETING_CUTSCENE) - endfunction + set_ailist(CHR_SELF, FUNC_MEETING_CUTSCENE) + endlist }; u8 func0403_walk_from_meeting[] = { @@ -1497,8 +1497,8 @@ u8 func0403_walk_from_meeting[] = { label(0x06) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_run_from_meeting[] = { @@ -1510,14 +1510,14 @@ u8 func0404_run_from_meeting[] = { label(0x06) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; /** @@ -1544,8 +1544,8 @@ u8 func1017_check_lasers_closed[] = { endloop(0x04) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_intro[] = { @@ -1557,12 +1557,12 @@ u8 func040d_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0166, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0166, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_INTRO_VICTIM, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_INTRO_VICTIM, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_INTRO_VICTIM, CHRHFLAG_00020000) - animation(0x0167, -1, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 4) + chr_do_animation(0x0167, -1, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 4) restart_timer set_cutscene_weapon(CHR_BOND, WEAPON_FALCON2_SILENCER, WEAPON_NONE) @@ -1767,26 +1767,26 @@ u8 func040d_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0166, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0166, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_INTRO_VICTIM, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_INTRO_VICTIM, CHRHFLAG_00020000) set_chr_chrflag(CHR_INTRO_VICTIM, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_INTRO_VICTIM, CHRCFLAG_00010000) - animation(0x0167, -2, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 2) + chr_do_animation(0x0167, -2, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 2) restart_default_music reset_ambience enter_firstperson - animation(0x022a, -1, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 2) + chr_do_animation(0x022a, -1, -1, 0x06, 0x00, CHR_INTRO_VICTIM, 2) chr_drop_weapon(CHR_INTRO_VICTIM) yield - set_function(CHR_CLOAK_1A, FUNC_INIT_CLOAK1_GUARD) - set_function(CHR_CLOAK_1B, FUNC_INIT_CLOAK1_GUARD) + set_ailist(CHR_CLOAK_1A, FUNC_INIT_CLOAK1_GUARD) + set_ailist(CHR_CLOAK_1B, FUNC_INIT_CLOAK1_GUARD) yield kill(CHR_INTRO_VICTIM) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; // Used in both mid and outro cutscenes @@ -1807,30 +1807,30 @@ u8 func040e_meeting_cutscene[] = { set_music_track(MUSIC_G5_MIDCUTSCENE) camera_movement(0x0191) set_stage_flag(STAGEFLAG_MEETING_STARTED) - set_function(CHR_BLONDE, GFUNC_IDLE) - set_function(CHR_CASS, GFUNC_IDLE) - set_function(CHR_TRENT, GFUNC_IDLE) - set_function(CHR_STRIPES, GFUNC_IDLE) + set_ailist(CHR_BLONDE, GFUNC_IDLE) + set_ailist(CHR_CASS, GFUNC_IDLE) + set_ailist(CHR_TRENT, GFUNC_IDLE) + set_ailist(CHR_STRIPES, GFUNC_IDLE) set_chr_chrflag(CHR_BLONDE, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_BLONDE, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_BLONDE, CHRHFLAG_00020000) - animation(0x0192, -1, -1, 0x06, 0x00, CHR_BLONDE, 4) + chr_do_animation(0x0192, -1, -1, 0x06, 0x00, CHR_BLONDE, 4) set_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000) - animation(0x0193, -1, -1, 0x06, 0x00, CHR_CASS, 4) + chr_do_animation(0x0193, -1, -1, 0x06, 0x00, CHR_CASS, 4) set_chr_chrflag(CHR_TRENT, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TRENT, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TRENT, CHRHFLAG_00020000) - animation(0x0194, -1, -1, 0x06, 0x00, CHR_TRENT, 4) + chr_do_animation(0x0194, -1, -1, 0x06, 0x00, CHR_TRENT, 4) set_chr_chrflag(CHR_STRIPES, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_STRIPES, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_STRIPES, CHRHFLAG_00020000) - animation(0x0195, -1, -1, 0x06, 0x00, CHR_STRIPES, 4) + chr_do_animation(0x0195, -1, -1, 0x06, 0x00, CHR_STRIPES, 4) restart_timer beginloop(0x55) @@ -2040,14 +2040,14 @@ u8 func040e_meeting_cutscene[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) restart_timer label(0x06) - set_function(CHR_CASS, FUNC_WALK_FROM_MEETING) + set_ailist(CHR_CASS, FUNC_WALK_FROM_MEETING) beginloop(0x0e) if_timer_gt(140, /*goto*/ 0x06) endloop(0x0e) label(0x06) - set_function(CHR_TRENT, FUNC_WALK_FROM_MEETING) + set_ailist(CHR_TRENT, FUNC_WALK_FROM_MEETING) beginloop(0x0f) if_timer_gt(300, /*goto*/ 0x06) @@ -2056,17 +2056,17 @@ u8 func040e_meeting_cutscene[] = { label(0x06) chr_move_to_pad(0x1e, 0x003c, 0x01, /*goto*/ 0x2c) // invalid chr? label(0x2c) - set_function(CHR_BLONDE, FUNC_WALK_FROM_MEETING) - set_function(CHR_STRIPES, FUNC_WALK_FROM_MEETING) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_BLONDE, FUNC_WALK_FROM_MEETING) + set_ailist(CHR_STRIPES, FUNC_WALK_FROM_MEETING) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_outro_from_menu[] = { hide_object(OBJ_MINE1) hide_object(OBJ_MINE2) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func040f_outro[] = { @@ -2074,11 +2074,11 @@ u8 func040f_outro[] = { set_music_track(MUSIC_G5_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0197, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0197, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_hud_visible(CHR_P1P2, TRUE) restart_timer deactivate_alarm @@ -2192,22 +2192,22 @@ u8 func040f_outro[] = { label(0x06) set_chr_hud_visible(CHR_P1P2, FALSE) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_intro_from_menu[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO) + endlist }; u8 func1019_generator_hum[] = { yield assign_sound(0x8146, CHANNEL_4) play_sound_from_object(CHANNEL_4, OBJ_GENERATOR, 0x0640, 0x0898) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2236,13 +2236,13 @@ u8 func101a_init_laser_switch_guards[] = { set_chr_flag_bankx(0x0d, CHRFLAG0_CAN_RUN_FOR_ALARM, BANK_0) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_cloak_guard[] = { set_morale(0) - set_onshot_function(FUNC_CLOAK_GUARD) + set_shotlist(FUNC_CLOAK_GUARD) set_chr_cloaked(CHR_SELF, TRUE, FALSE) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) @@ -2311,21 +2311,21 @@ u8 func0412_cloak_guard[] = { label(0x10) if_chr_has_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED, /*goto*/ 0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0413_cloak1_guard[] = { yield - set_onshot_function(FUNC_CLOAK_GUARD) + set_shotlist(FUNC_CLOAK_GUARD) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) label(0x06) set_reaction_speed(100) - set_onshot_function(FUNC_CLOAK_GUARD) + set_shotlist(FUNC_CLOAK_GUARD) restart_timer beginloop(0x04) @@ -2343,13 +2343,13 @@ u8 func0413_cloak1_guard[] = { unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_00040000) set_chr_cloaked(CHR_SELF, TRUE, TRUE) - set_function(CHR_SELF, FUNC_CLOAK_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_CLOAK_GUARD) + endlist }; u8 func0414_init_cloak2_guard[] = { stop_chr - set_onshot_function(FUNC_CLOAK_GUARD) + set_shotlist(FUNC_CLOAK_GUARD) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_dodge_rating(2, 0x0a) set_accuracy(5) @@ -2361,8 +2361,8 @@ u8 func0414_init_cloak2_guard[] = { unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_00040000) set_chr_cloaked(CHR_SELF, TRUE, TRUE) - set_function(CHR_SELF, FUNC_CLOAK_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_CLOAK_GUARD) + endlist }; u8 func101b_cloak2_entry[] = { @@ -2502,18 +2502,18 @@ u8 func101b_cloak2_entry[] = { unset_chr_chrflag(CHR_CLOAK_2B, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_CLOAK_2C, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_CLOAK_2D, CHRCFLAG_HIDDEN) - set_function(CHR_CLOAK_2A, FUNC_CLOAK2_GUARD) - set_function(CHR_CLOAK_2B, FUNC_CLOAK2_GUARD) - set_function(CHR_CLOAK_2C, FUNC_CLOAK2_GUARD) - set_function(CHR_CLOAK_2D, FUNC_CLOAK2_GUARD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_CLOAK_2A, FUNC_CLOAK2_GUARD) + set_ailist(CHR_CLOAK_2B, FUNC_CLOAK2_GUARD) + set_ailist(CHR_CLOAK_2C, FUNC_CLOAK2_GUARD) + set_ailist(CHR_CLOAK_2D, FUNC_CLOAK2_GUARD) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_cloak2_hide[] = { set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_check_visited_top_door[] = { @@ -2530,8 +2530,8 @@ u8 func101c_check_visited_top_door[] = { label(0x06) set_stage_flag(STAGEFLAG_VISITED_TOP_DOOR) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_init_mines[] = { @@ -2549,13 +2549,13 @@ u8 func101d_init_mines[] = { hide_object(OBJ_MINE1) dprint 'E','P','R','O','M','F','L','A','G',' ','N','O','T','S','E','T',0, - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) dprint 'E','P','R','O','M','F','L','A','G',' ','S','E','T',0, hide_object(OBJ_MINE2) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_guard(accuracy, reaction, function) \ @@ -2566,24 +2566,24 @@ u8 func101d_init_mines[] = { set_armor(0) \ set_recovery_speed(0) \ set_shield(0) \ - set_function(CHR_SELF, function) + set_ailist(CHR_SELF, function) u8 func0406_init_type1_guard[] = { init_guard(5, 30, GFUNC_UNALERTED) - endfunction + endlist }; // Never assigned u8 func0407_init_type2_guard[] = { init_guard(15, 25, GFUNC_UNALERTED) - endfunction + endlist }; u8 func0408_init_cloak1_guard[] = { init_guard(5, 25, 0x0413) - endfunction + endlist }; u8 func101e_msg_nowaythrough[] = { @@ -2602,8 +2602,8 @@ u8 func101e_msg_nowaythrough[] = { label(0x2c) speak(CHR_P1P2, 0x183c, 0x73b4, CHANNEL_6, COLOR_09_BLUE) // "There's no way through while those lasers are acti..." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_msg_meetingroomahead[] = { @@ -2625,8 +2625,8 @@ u8 func101f_msg_meetingroomahead[] = { speak(CHR_P1P2, 0x183d, 0x73b5, CHANNEL_6, COLOR_09_BLUE) // "That must be the meeting room up ahead. Time to us..." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_msg_heavilyencrypted[] = { @@ -2637,8 +2637,8 @@ u8 func1020_msg_heavilyencrypted[] = { label(0x2c) speak(CHR_P1P2, 0x183e, 0x817c, CHANNEL_6, COLOR_09_BLUE) // "The safe's heavily encrypted. The decoder's gonna ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_blow_mines[] = { @@ -2659,7 +2659,7 @@ u8 func1021_blow_mines[] = { label(0x2c) if_difficulty_lt(DIFF_SA, /*goto*/ 0x2c) speak(CHR_P1P2, 0x183f, 0x73b7, CHANNEL_6, COLOR_09_BLUE) // "Time to leave! Let's get to the door I set up earl..." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Agent label(0x2c) @@ -2689,8 +2689,8 @@ u8 func1021_blow_mines[] = { label(0x2c) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_light_switch[] = { @@ -2825,17 +2825,17 @@ u8 func1022_light_switch[] = { set_lights_state(0x000a, 0x01, 0xff, 0x00, 0x00) endloop(0x04) - endfunction + endlist }; u8 func1023_hide_nbomb_crate[] = { if_eeprom_flag_is_unset(EEPROMFLAG_G5_MINE, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) hide_object(OBJ_NBOMB_CRATE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2873,7 +2873,7 @@ u8 unregistered_function[] = { label(0x2c) endloop(0x04) - endfunction + endlist }; /** @@ -2930,8 +2930,8 @@ u8 func1026_unlock_doors[] = { unlock_door(0x40, 0x10) label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0410_invincible[] = { @@ -2939,8 +2939,8 @@ u8 func0410_invincible[] = { yield set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0411_hide[] = { @@ -2949,8 +2949,8 @@ u8 func0411_hide[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1027_cloak1_check_one_remaining[] = { @@ -2966,8 +2966,8 @@ u8 func1027_cloak1_check_one_remaining[] = { label(0x2c) set_stage_flag(STAGEFLAG_CLOAK1_ONE_REMAINING) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1028_cloak2_check_one_remaining[] = { @@ -3008,19 +3008,19 @@ u8 func1028_cloak2_check_one_remaining[] = { label(0x06) if_morale_lt(3, /*goto*/ 0x2c) set_stage_flag(STAGEFLAG_CLOAK2_ONE_REMAINING) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func1029_set_secret_weapon_props[] = { yield set_object_flag_bank2(OBJ_NBOMB_CRATE, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_CROSSBOW, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102a_8174[] = { @@ -3037,8 +3037,8 @@ u8 func102a_8174[] = { set_chr_hiddenflag(0x0f, CHRHFLAG_08000000) set_chr_hiddenflag(0x10, CHRHFLAG_08000000) set_chr_hiddenflag(0x11, CHRHFLAG_08000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102b_81bc[] = { @@ -3067,8 +3067,8 @@ u8 func102b_81bc[] = { set_chr_team(0x17, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3090,8 +3090,8 @@ u8 func102c_set_lightswitch_guard_team[] = { set_chr_team(CHR_LIGHTSWITCH_GUARD, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupdish.c b/src/files/setup/setupdish.c index 76ff1f451..6eac5e636 100644 --- a/src/files/setup/setupdish.c +++ b/src/files/setup/setupdish.c @@ -556,16 +556,16 @@ u8 func041d_init_collegue_when_sighted[] = { yield yield if_stage_flag_eq(STAGEFLAG_TRIGGER_CLOAK, TRUE, /*goto*/ 0x2f) - set_function(CHR_SELF, FUNC_COLLEAGUE) + set_ailist(CHR_SELF, FUNC_COLLEAGUE) label(0x2f) goto_first(0x04) - endfunction + endlist }; u8 func041e_colleague[] = { - set_return_function(CHR_SELF, FUNC_COLLEAGUE) + set_returnlist(CHR_SELF, FUNC_COLLEAGUE) if_alertness(1, OPERATOR_LESS_THAN, /*goto*/ 0x04) if_alertness(2, OPERATOR_LESS_THAN, /*goto*/ 0x7c) if_alertness(3, OPERATOR_LESS_THAN, /*goto*/ 0x7d) @@ -575,14 +575,14 @@ u8 func041e_colleague[] = { if_target_chr_in_sight(/*goto*/ 0x2f) if_chr_idle(/*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x7f) - animation(0x0227, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(0x0227, 0, -1, 0x14, 0x00, CHR_SELF, 2) reloop(0x04) - // Player not in sight - 2 in 255 chance of doing a bored animation + // Player not in sight - 2 in 255 chance of doing a bored chr_do_animation label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) reloop(0x04) @@ -604,7 +604,7 @@ u8 func041e_colleague[] = { goto_next(0x2f) label(0x7f) - animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x00, CHR_SELF, 2) label(0x2f) play_cistaff_quip(BANK_0, CHANNEL_6) restart_timer @@ -662,13 +662,13 @@ u8 func041e_colleague[] = { label(0x2f) if_chr_idle(/*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x7f) - set_function(CHR_SELF, GFUNC_DO_SITTING_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_SITTING_ANIMATION) reloop(0x04) label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) endloop(0x0a) @@ -678,7 +678,7 @@ u8 func041e_colleague[] = { goto_next(0x06) label(0x7f) - animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_0265, 0, -1, 0x14, 0x00, CHR_SELF, 2) label(0x06) play_cistaff_quip(BANK_2, CHANNEL_6) restart_timer @@ -696,105 +696,105 @@ u8 func041e_colleague[] = { yield if_chr_idle(/*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x7f) - set_function(CHR_SELF, GFUNC_DO_SITTING_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_SITTING_ANIMATION) endloop(0x04) label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) goto_first(0x7d) - endfunction + endlist }; u8 func041f_colleague1[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(0) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0420_colleague2[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(1) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0421_colleague3[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(2) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0422_colleague4[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(3) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0423_colleague5[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(4) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0424_colleague6[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(5) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0425_colleague7[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(6) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0426_colleague8[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(7) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0427_colleague9[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(8) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func0428_colleague10[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_morale(9) - set_function(CHR_SELF, FUNC_COLLEAGUE) - endfunction + set_ailist(CHR_SELF, FUNC_COLLEAGUE) + endlist }; u8 func1001_set_jo_team[] = { yield set_chr_team(CHR_BOND, TEAM_32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_devicetraining_camspy[] = { @@ -898,8 +898,8 @@ u8 func1002_devicetraining_camspy[] = { hide_object(OBJ_CAMSPY) goto_first(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_devicetraining_nightvision[] = { @@ -1039,8 +1039,8 @@ u8 func1003_devicetraining_nightvision[] = { label(0x2f) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_devicetraining_doordecoder[] = { @@ -1204,8 +1204,8 @@ u8 func1004_devicetraining_doordecoder[] = { hide_object(0x28) goto_first(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_devicetraining_xray[] = { @@ -1413,8 +1413,8 @@ u8 func1005_devicetraining_xray[] = { hide_object(0x29) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_devicetraining_disguise[] = { @@ -1435,7 +1435,7 @@ u8 func1006_devicetraining_disguise[] = { move_object_to_pad(0x2a, 0x011d) unset_object_flag_bank0(0x2a, OBJECTFLAG0_00100000) unset_object_flag_bank1(0x2a, OBJECTFLAG1_INVISIBLE) - set_function(0x03, FUNC_GRIMSHAW_DISGUISE) + set_ailist(0x03, FUNC_GRIMSHAW_DISGUISE) unset_stage_flag(STAGEFLAG_TRIGGER_CANNOTEXIT_MSG) close_door(0x31) close_door(0x8a) @@ -1554,11 +1554,11 @@ u8 func1006_devicetraining_disguise[] = { endloop(0x6d) label(0x2f) - set_function(0x03, FUNC_INIT_COLLEAGUE_WHEN_SIGHTED) + set_ailist(0x03, FUNC_INIT_COLLEAGUE_WHEN_SIGHTED) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_devicetrainign_ir[] = { @@ -1697,8 +1697,8 @@ u8 func1007_devicetrainign_ir[] = { hide_object(0x2b) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_devicetraining_rtracker[] = { @@ -1823,8 +1823,8 @@ u8 func1008_devicetraining_rtracker[] = { hide_object(0x36) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_devicetraining_cloak[] = { @@ -1884,7 +1884,7 @@ u8 func1009_devicetraining_cloak[] = { goto_first(0x8c) label(0x2f) - set_function(CHR_CARRINGTON, FUNC_CARRINGTON_CLOAK) + set_ailist(CHR_CARRINGTON, FUNC_CARRINGTON_CLOAK) label(0x8d) remove_displayed_text if_chr_has_weapon_equipped(CHR_BOND, WEAPON_CLOAKINGDEVICE, /*goto*/ 0x2f) @@ -1975,11 +1975,11 @@ u8 func1009_devicetraining_cloak[] = { endloop(0x5c) label(0x2f) - set_function(CHR_CARRINGTON, FUNC_INIT_COLLEAGUE_WHEN_SIGHTED) + set_ailist(CHR_CARRINGTON, FUNC_INIT_COLLEAGUE_WHEN_SIGHTED) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_devicetraining_ecmmine[] = { @@ -2122,8 +2122,8 @@ u8 func100a_devicetraining_ecmmine[] = { hide_object(0x2e) goto_first(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_devicetraining_uplink[] = { @@ -2334,8 +2334,8 @@ u8 func100b_devicetraining_uplink[] = { hide_object(0x2f) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_move_jo_to_training_room[] = { @@ -2386,12 +2386,12 @@ u8 func101a_move_jo_to_training_room[] = { if_chr_in_room(CHR_BOND, 0x00, 0x0019, /*goto*/ 0x2f) if_chr_in_room(CHR_BOND, 0x00, 0x0014, /*goto*/ 0x2f) enter_camera_and_move_to_pad(0x0151) - set_function(CHR_P1P2, FUNC_MOVE_TO_DEVICEROOM) + set_ailist(CHR_P1P2, FUNC_MOVE_TO_DEVICEROOM) goto_next(0x06) label(0x2f) enter_camera_and_move_to_pad(0x020a) - set_function(CHR_P1P2, FUNC_MOVE_TO_HOLOROOM) + set_ailist(CHR_P1P2, FUNC_MOVE_TO_HOLOROOM) label(0x06) yield @@ -2413,7 +2413,7 @@ u8 func101a_move_jo_to_training_room[] = { unset_stage_flag(STAGEFLAG_CONSIDER_WARP) goto_first(0x04) - endfunction + endlist }; u8 func0401_move_to_deviceroom[] = { @@ -2421,8 +2421,8 @@ u8 func0401_move_to_deviceroom[] = { label(0x06) stop_chr yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_move_to_holoroom[] = { @@ -2430,12 +2430,12 @@ u8 func0402_move_to_holoroom[] = { label(0x06) stop_chr yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0429_grimshaw_disguise[] = { - set_return_function(CHR_SELF, FUNC_GRIMSHAW_DISGUISE) + set_returnlist(CHR_SELF, FUNC_GRIMSHAW_DISGUISE) dprint 'I','n','i','t','i','a','l','i','s','e','a',0, restart_timer @@ -2455,7 +2455,7 @@ u8 func0429_grimshaw_disguise[] = { label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) endloop(0x04) @@ -2535,8 +2535,8 @@ u8 func0429_grimshaw_disguise[] = { give_object_to_chr(0x3c, CHR_BOND) set_stage_flag(STAGEFLAG_DISGUISE_COMPLETE) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_cloak_detection[] = { @@ -2625,11 +2625,11 @@ u8 func100c_cloak_detection[] = { label(0x06) goto_first(0x8f) - endfunction + endlist }; u8 func042a_carrington_cloak[] = { - set_return_function(CHR_SELF, FUNC_CARRINGTON_CLOAK) + set_returnlist(CHR_SELF, FUNC_CARRINGTON_CLOAK) beginloop(0x8f) chr_move_to_pad(CHR_SELF, PAD_CARRINGTON_OFFICE, 0x01, /*goto*/ 0x06) @@ -2644,7 +2644,7 @@ u8 func042a_carrington_cloak[] = { label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) endloop(0x04) @@ -2666,7 +2666,7 @@ u8 func042a_carrington_cloak[] = { label(0x06) dprint 'I','n','i','t','i','a','l','i','s','e','c',0, restart_timer - animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0x57) @@ -2699,8 +2699,8 @@ u8 func042a_carrington_cloak[] = { label(0x06) stop_chr set_stage_flag(STAGEFLAG_CLOAK_COMPLETE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_training_unlockables[] = { @@ -2762,8 +2762,8 @@ u8 func100e_training_unlockables[] = { label(0x2f) hide_object(0x3a) hide_object(0x3b) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define do_door_proxy(eepromflag, pad, door) \ @@ -2793,24 +2793,24 @@ u8 func100e_training_unlockables[] = { u8 func100f_doorproxy_unused1[] = { - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable do_door_proxy(EEPROMFLAG_CI_ECMMINE_DONE, 0x0185, 0x3d) - endfunction + endlist }; u8 func1010_doorproxy[] = { do_door_proxy(EEPROMFLAG_CI_UPLINK_DONE, 0x0186, 0x3e) - endfunction + endlist }; u8 func1010_doorproxy_unused2[] = { - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable do_door_proxy(EEPROMFLAG_CI_ECMMINE_DONE, 0x0187, 0x3f) - endfunction + endlist }; u8 func1012_cloak_doorproxy[] = { @@ -2842,7 +2842,7 @@ u8 func1012_cloak_doorproxy[] = { label(0x2f) goto_first(0x04) - endfunction + endlist }; u8 func101b_ir_door[] = { @@ -2870,7 +2870,7 @@ u8 func101b_ir_door[] = { label(0x2f) goto_first(0x04) - endfunction + endlist }; u8 func042b_init_carrington[] = { @@ -2887,7 +2887,7 @@ u8 func042b_init_carrington[] = { endloop(0x08) label(0x2f) - set_function(CHR_SELF, 0x041e) + set_ailist(CHR_SELF, 0x041e) label(0x06) dprint 'E','E','P','R','O','M',' ','N','O','T','S','E','T',0, @@ -2900,8 +2900,8 @@ u8 func042b_init_carrington[] = { label(0x2f) stop_chr - set_function(CHR_SELF, FUNC_CARRINGTON_TOUR) - endfunction + set_ailist(CHR_SELF, FUNC_CARRINGTON_TOUR) + endlist }; u8 func1019_setup_carrington[] = { @@ -2911,16 +2911,16 @@ u8 func1019_setup_carrington[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2f) - set_function(CHR_CARRINGTON, FUNC_INIT_CARRINGTON) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_CARRINGTON, FUNC_INIT_CARRINGTON) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042c_carrington_tour[] = { - set_return_function(CHR_SELF, FUNC_CARRINGTON_TOUR) + set_returnlist(CHR_SELF, FUNC_CARRINGTON_TOUR) set_self_chrflag(CHRCFLAG_00040000) restart_timer try_face_entity(ENTITYTYPE_PAD, 0x0054, /*goto*/ 0x04) @@ -2933,7 +2933,7 @@ u8 func042c_carrington_tour[] = { label(0x7f) call_rng if_rand_gt(1, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x06) endloop(0x04) @@ -3018,7 +3018,7 @@ u8 func042c_carrington_tour[] = { goto_first(0x63) label(0x2f) - set_function(0x01, GFUNC_IDLE) + set_ailist(0x01, GFUNC_IDLE) do_special_animation(-1) speak(CHR_TARGET, 0x1c45, 0x151f, CHANNEL_6, COLOR_06_WHITE) // "In here we have the device lab." restart_timer @@ -3038,7 +3038,7 @@ u8 func042c_carrington_tour[] = { label(0x06) do_special_animation(-1) play_sound(0x8028, CHANNEL_6) - set_function(0x01, FUNC_DEVICEGIRL_REPLY_TO_CARRINGTON) + set_ailist(0x01, FUNC_DEVICEGIRL_REPLY_TO_CARRINGTON) restart_timer beginloop(0x66) @@ -3197,9 +3197,9 @@ u8 func042c_carrington_tour[] = { endloop(0x76) label(0x06) - set_function(CHR_SELF, 0x041e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, 0x041e) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042d_unused[] = { @@ -3227,8 +3227,8 @@ u8 func042d_unused[] = { endloop(0x61) label(0x06) - set_function(CHR_SELF, 0x041e) - endfunction + set_ailist(CHR_SELF, 0x041e) + endlist }; u8 func042e_devicegirl_reply_to_carrington[] = { @@ -3259,13 +3259,13 @@ u8 func042e_devicegirl_reply_to_carrington[] = { endloop(0x61) label(0x06) - set_function(CHR_SELF, 0x041e) - endfunction + set_ailist(CHR_SELF, 0x041e) + endlist }; u8 func1013_msg_hovercrate[] = { if_eeprom_flag_is_unset(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_eeprom_flag_is_set(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x06) @@ -3273,7 +3273,7 @@ u8 func1013_msg_hovercrate[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2f) remove_displayed_text @@ -3287,13 +3287,13 @@ u8 func1013_msg_hovercrate[] = { label(0x06) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c4a) // "Press B Button when crate grabbed to release it." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_msg_hoverbike[] = { if_eeprom_flag_is_unset(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_eeprom_flag_is_set(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x06) @@ -3301,7 +3301,7 @@ u8 func1014_msg_hoverbike[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2f) remove_displayed_text @@ -3315,20 +3315,20 @@ u8 func1014_msg_hoverbike[] = { label(0x06) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c4c) // "Double tap B Button when on Hovbike to dismount." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_msg_doors[] = { if_eeprom_flag_is_unset(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_eeprom_flag_is_set(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x06) endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2f) remove_displayed_text @@ -3342,13 +3342,13 @@ u8 func1015_msg_doors[] = { label(0x06) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c4e) // "B Button will also activate any object nearby." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_elevators[] = { if_eeprom_flag_is_unset(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_eeprom_flag_is_set(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x06) @@ -3360,13 +3360,13 @@ u8 func1016_msg_elevators[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c4f) // "ELEVATORS Press B Button next to door to call elevator." label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_msg_terminals[] = { if_eeprom_flag_is_unset(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_eeprom_flag_is_set(EEPROMFLAG_CI_TOUR_STARTED, /*goto*/ 0x06) @@ -3383,8 +3383,8 @@ u8 func1017_msg_terminals[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c72) // "TERMINALS - Press B Button next to terminal to use it." label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_lightswitch[] = { @@ -3398,8 +3398,8 @@ u8 func1018_lightswitch[] = { unset_object_flag_bank1(OBJ_LIGHTSWITCH, OBJECTFLAG1_INVISIBLE) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_holo1_main[] = { @@ -3534,8 +3534,8 @@ u8 func101c_holo1_main[] = { remove_displayed_text goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define holo1_some_terminal(object, function) \ @@ -3560,24 +3560,24 @@ u8 func101c_holo1_main[] = { set_object_flag_bank1(object, OBJECTFLAG1_00040000) \ assign_sound(0x043a, CHANNEL_7) \ control_sound_from_object(CHANNEL_7, object, TRUE) \ - set_return_function(CHR_SELF, function) \ - set_function(CHR_SELF, FUNC_HOLO1_CHECK_DONE) + set_returnlist(CHR_SELF, function) \ + set_ailist(CHR_SELF, FUNC_HOLO1_CHECK_DONE) u8 func101d_holo1_switch1[] = { holo1_some_terminal(0x4c, FUNC_HOLO1_SWITCH1) - endfunction + endlist }; u8 func101e_holo1_switch2[] = { holo1_some_terminal(0x4d, FUNC_HOLO1_SWITCH2) - endfunction + endlist }; u8 func101f_holo1_switch3[] = { holo1_some_terminal(0x4e, FUNC_HOLO1_SWITCH3) - endfunction + endlist }; u8 func1020_holo1_monitor_switches[] = { @@ -3602,9 +3602,9 @@ u8 func1020_holo1_monitor_switches[] = { set_object_flag_bank1(0x4f, OBJECTFLAG1_00040000) assign_sound(0x043a, CHANNEL_7) control_sound_from_object(CHANNEL_7, 0x4f, TRUE) - set_return_function(CHR_SELF, FUNC_HOLO1_MONITOR_SWITCHES) - set_function(CHR_SELF, FUNC_HOLO1_CHECK_DONE) - endfunction + set_returnlist(CHR_SELF, FUNC_HOLO1_MONITOR_SWITCHES) + set_ailist(CHR_SELF, FUNC_HOLO1_CHECK_DONE) + endlist }; #define holo1_code_thing_p1(object1, object2, pad) \ @@ -3680,7 +3680,7 @@ u8 func1021_holo1_code1[] = { // 0x1c65 = "Code 1 has been obtained." holo1_code_thing_p2(0x48, 0x4c, 0x1c55, 0x1c65) - endfunction + endlist }; u8 func1021_holo1_code2[] = { @@ -3695,7 +3695,7 @@ u8 func1021_holo1_code2[] = { // 0x1c56 = "LOOK DOWN - Press Up C Button to look down at the target." // 0x1c66 = "Code 2 has been obtained." holo1_code_thing_p2(0x49, 0x4d, 0x1c56, 0x1c66) - endfunction + endlist }; u8 func1021_holo1_code3[] = { @@ -3710,7 +3710,7 @@ u8 func1021_holo1_code3[] = { // 0x1c55 = "LOOK UP - Press Down C Button to look up at the target." // 0x1c67 = "Code 3 has been obtained." holo1_code_thing_p2(0x4a, 0x4e, 0x1c55, 0x1c67) - endfunction + endlist }; u8 func1021_holo1_code4[] = { @@ -3725,7 +3725,7 @@ u8 func1021_holo1_code4[] = { // 0x1c55 = "LOOK UP - Press Down C Button to look up at the target." // 0x1c68 = "Code 4 has been obtained." holo1_code_thing_p2(0x4b, 0x4f, 0x1c55, 0x1c68) - endfunction + endlist }; u8 func0430_holo1_check_done[] = { @@ -3772,8 +3772,8 @@ u8 func0430_holo1_check_done[] = { label(0x2f) return - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_holo2_main[] = { @@ -3882,8 +3882,8 @@ u8 func1022_holo2_main[] = { remove_displayed_text goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define holo2_do_thing(object, function) \ @@ -3907,29 +3907,29 @@ u8 func1022_holo2_main[] = { control_sound_from_object(CHANNEL_7, object, TRUE) \ set_object_image(object, 0x00, 0x13) \ set_object_flag_bank1(object, OBJECTFLAG1_00000001) \ - set_return_function(CHR_SELF, function) \ - set_function(CHR_SELF, 0x041b) + set_returnlist(CHR_SELF, function) \ + set_ailist(CHR_SELF, 0x041b) u8 func1023_holo2_object1[] = { holo2_do_thing(0x54, 0x0431) - endfunction + endlist }; u8 func1024_holo2_object2[] = { holo2_do_thing(0x55, 0x0432) - endfunction + endlist }; u8 func1025_holo2_object3[] = { holo2_do_thing(0x56, 0x0433) - endfunction + endlist }; u8 func1026_holo2_object4[] = { holo2_do_thing(0x57, 0x0434) - endfunction + endlist }; u8 func041b_holo2_part1[] = { @@ -3967,7 +3967,7 @@ u8 func041b_holo2_part1[] = { set_stage_flag(STAGEFLAG_TRIGGER_HOLO_SUCCESS) label(0x06) return - endfunction + endlist }; u8 func042f_holo2_part2[] = { @@ -3989,7 +3989,7 @@ u8 func042f_holo2_part2[] = { restart_timer remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c69) // "Training failed - you must face forward." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) set_object_image(0x54, 0x00, 0x12) set_object_image(0x55, 0x00, 0x12) set_object_image(0x56, 0x00, 0x12) @@ -4009,7 +4009,7 @@ u8 func042f_holo2_part2[] = { label(0x2f) goto_first(0x08) - endfunction + endlist }; u8 func1027_holo3_main[] = { @@ -4215,8 +4215,8 @@ u8 func1027_holo3_main[] = { remove_displayed_text goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102a_holo3_part1[] = { @@ -4241,8 +4241,8 @@ u8 func102a_holo3_part1[] = { label(0x06) goto_first(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102b_holo3_part2[] = { @@ -4267,8 +4267,8 @@ u8 func102b_holo3_part2[] = { label(0x06) goto_first(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102c_holo3_object1[] = { @@ -4281,9 +4281,9 @@ u8 func102c_holo3_object1[] = { control_sound_from_object(CHANNEL_7, 0x65, TRUE) set_object_image(0x65, 0x00, 0x13) set_object_flag_bank1(0x65, OBJECTFLAG1_00000001) - set_return_function(CHR_SELF, FUNC_HOLO3_OBJECT1) - set_function(CHR_SELF, FUNC_HOLO3_CHECK_DONE) - endfunction + set_returnlist(CHR_SELF, FUNC_HOLO3_OBJECT1) + set_ailist(CHR_SELF, FUNC_HOLO3_CHECK_DONE) + endlist }; u8 func102d_holo3_object2[] = { @@ -4296,9 +4296,9 @@ u8 func102d_holo3_object2[] = { control_sound_from_object(CHANNEL_7, 0x65, TRUE) set_object_image(0x66, 0x00, 0x13) set_object_flag_bank1(0x66, OBJECTFLAG1_00000001) - set_return_function(CHR_SELF, FUNC_HOLO3_OBJECT2) - set_function(CHR_SELF, FUNC_HOLO3_CHECK_DONE) - endfunction + set_returnlist(CHR_SELF, FUNC_HOLO3_OBJECT2) + set_ailist(CHR_SELF, FUNC_HOLO3_CHECK_DONE) + endlist }; u8 func041c_holo3_check_done[] = { @@ -4326,8 +4326,8 @@ u8 func041c_holo3_check_done[] = { set_stage_flag(STAGEFLAG_TRIGGER_HOLO_SUCCESS) label(0x06) return - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1028_holo4_main[] = { @@ -4352,7 +4352,7 @@ u8 func1028_holo4_main[] = { unset_stage_flag(STAGEFLAG_GENERAL_PURPOSE) hide_object(0x45) hide_chr(0x04) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0274, FUNC_HOLO4_GUARD1, 0x00002210, /*goto*/ 0x08) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0274, FUNC_HOLO4_GUARD1, 0x00002210, /*goto*/ 0x08) label(0x08) dprint 't','r','a','i','n','i','n','g',0, label(0x91) @@ -4428,13 +4428,13 @@ u8 func1028_holo4_main[] = { label(0x2f) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_holo4_guard1[] = { set_chr_id(0x0d) - set_onshot_function(FUNC_HOLO4_GUARD1) + set_shotlist(FUNC_HOLO4_GUARD1) beginloop(0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) @@ -4444,18 +4444,18 @@ u8 func0403_holo4_guard1[] = { label(0x2f) set_self_chrflag(CHRCFLAG_00000040) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0277, FUNC_HOLO4_GUARD2, 0x00002210, /*goto*/ 0x08) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0277, FUNC_HOLO4_GUARD2, 0x00002210, /*goto*/ 0x08) label(0x08) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c6c) // "Now try against a moving target..." - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_holo4_guard2[] = { set_chr_id(0x0e) - set_onshot_function(FUNC_HOLO4_GUARD2) + set_shotlist(FUNC_HOLO4_GUARD2) label(0x04) yield if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) @@ -4465,12 +4465,12 @@ u8 func0404_holo4_guard2[] = { label(0x2f) set_self_chrflag(CHRCFLAG_00000040) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x027a, FUNC_HOLO4_GUARD3, 0x00002210, /*goto*/ 0x0a) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x027a, FUNC_HOLO4_GUARD3, 0x00002210, /*goto*/ 0x0a) label(0x0a) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c6d) // "And finally against a target that fights back." - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_chr_distance_lt(500, /*goto*/ 0x2f) try_face_entity(0x0200, 0x0000, /*goto*/ 0x08) @@ -4490,12 +4490,12 @@ u8 func0404_holo4_guard2[] = { label(0x06) goto_first(0x04) - endfunction + endlist }; u8 func0405_holo4_guard3[] = { set_chr_id(0x0f) - set_onshot_function(FUNC_HOLO4_GUARD3) + set_shotlist(FUNC_HOLO4_GUARD3) restart_timer beginloop(0x04) @@ -4503,8 +4503,8 @@ u8 func0405_holo4_guard3[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func1033_holo4_part1[] = { @@ -4567,8 +4567,8 @@ u8 func1033_holo4_part1[] = { label(0x2f) goto_first(0x8f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1029_holo5_main[] = { @@ -4593,7 +4593,7 @@ u8 func1029_holo5_main[] = { unset_stage_flag(STAGEFLAG_GENERAL_PURPOSE) hide_object(0x45) hide_chr(0x04) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0126, FUNC_HOLO5_INIT_GUARD1, 0x00002210, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0126, FUNC_HOLO5_INIT_GUARD1, 0x00002210, /*goto*/ 0x06) label(0x06) yield dprint 't','r','a','i','n','i','n','g',0, @@ -4671,7 +4671,7 @@ u8 func1029_holo5_main[] = { label(0x2f) goto_first(0x08) - endfunction + endlist }; u8 func0406_holo5_init_guard1[] = { @@ -4679,14 +4679,14 @@ u8 func0406_holo5_init_guard1[] = { set_chr_id(0x10) try_draw_weapon(MODEL_CHRFALCON2, WEAPON_FALCON2, 0x40000000, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_HOLO5_GUARD1) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO5_GUARD1) + endlist }; u8 func0407_holo5_guard1[] = { set_self_flag_bankx(CHRFLAG0_80000000, BANK_0) dprint 'C','R','E','A','T','E','D',' ','4',0, - set_onshot_function(FUNC_HOLO5_GUARD1) + set_shotlist(FUNC_HOLO5_GUARD1) set_chr_health(CHR_SELF, 300) set_armor(300) label(0x04) @@ -4699,7 +4699,7 @@ u8 func0407_holo5_guard1[] = { label(0x2f) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_chrflag(CHRCFLAG_00000040) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) goto_next(0x0a) label(0x30) restart_timer @@ -4712,8 +4712,8 @@ u8 func0407_holo5_guard1[] = { label(0x63) set_stage_flag(STAGEFLAG_TRIGGER_HOLO_FAILURE) set_stage_flag(STAGEFLAG_GENERAL_PURPOSE) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0a) set_self_chrflag(CHRCFLAG_00000040) @@ -4722,11 +4722,11 @@ u8 func0407_holo5_guard1[] = { message(CHR_BOND, 0x1c5a) // "Guard has been successfully disarmed." beginloop(0x59) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0272, FUNC_HOLO5_INIT_GUARD2, 0x00002210, /*goto*/ 0x2f) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0272, FUNC_HOLO5_INIT_GUARD2, 0x00002210, /*goto*/ 0x2f) endloop(0x59) label(0x2f) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) beginloop(0x0b) endloop(0x0b) @@ -4750,7 +4750,7 @@ u8 func0407_holo5_guard1[] = { label(0x06) goto_first(0x04) - endfunction + endlist }; u8 func0408_holo5_init_guard2[] = { @@ -4761,13 +4761,13 @@ u8 func0408_holo5_init_guard2[] = { label(0x06) remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c5d) // "Knock out this target - stealth is the key." - set_function(CHR_SELF, FUNC_HOLO5_GUARD2) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO5_GUARD2) + endlist }; u8 func0409_holo5_guard2[] = { dprint 'C','R','E','A','T','E','D',' ','5',0, - set_onshot_function(FUNC_HOLO5_GUARD2) + set_shotlist(FUNC_HOLO5_GUARD2) label(0x04) yield if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) @@ -4804,13 +4804,13 @@ u8 func0409_holo5_guard2[] = { set_self_chrflag(CHRCFLAG_00000040) beginloop(0x57) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0125, FUNC_HOLO5_INIT_GUARD3, 0x00002210, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0125, FUNC_HOLO5_INIT_GUARD3, 0x00002210, /*goto*/ 0x06) endloop(0x57) label(0x06) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040a_holo5_init_guard3[] = { @@ -4821,13 +4821,13 @@ u8 func040a_holo5_init_guard3[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c5e) // "And the final guard..." set_alertness(100) - set_function(CHR_SELF, FUNC_HOLO5_GUARD3) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO5_GUARD3) + endlist }; u8 func040b_holo5_guard3[] = { dprint 'C','R','E','A','T','E','D',' ','6',0, - set_onshot_function(FUNC_HOLO_GUARD_ARMED_UNALERT) + set_shotlist(FUNC_HOLO_GUARD_ARMED_UNALERT) restart_timer beginloop(0x08) @@ -4835,7 +4835,7 @@ u8 func040b_holo5_guard3[] = { endloop(0x08) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) beginloop(0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) @@ -4854,8 +4854,8 @@ u8 func040b_holo5_guard3[] = { label(0x06) set_stage_flag(STAGEFLAG_TRIGGER_HOLO_SUCCESS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1034_holo5_part1[] = { @@ -4924,8 +4924,8 @@ u8 func1034_holo5_part1[] = { label(0x2f) goto_first(0x8f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102e_holo6_main[] = { @@ -4952,19 +4952,19 @@ u8 func102e_holo6_main[] = { hide_chr(0x04) beginloop(0x57) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0127, FUNC_HOLO6_INIT_GUARD1, 0x00002210, /*goto*/ 0x59) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0127, FUNC_HOLO6_INIT_GUARD1, 0x00002210, /*goto*/ 0x59) endloop(0x57) beginloop(0x59) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0128, FUNC_HOLO6_INIT_GUARD2, 0x00002210, /*goto*/ 0x5b) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0128, FUNC_HOLO6_INIT_GUARD2, 0x00002210, /*goto*/ 0x5b) endloop(0x59) beginloop(0x5b) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0129, FUNC_HOLO6_INIT_GUARD3, 0x00002210, /*goto*/ 0x5c) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0129, FUNC_HOLO6_INIT_GUARD3, 0x00002210, /*goto*/ 0x5c) endloop(0x5b) beginloop(0x5c) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012a, FUNC_HOLO6_INIT_GUARD4, 0x00002210, /*goto*/ 0x5d) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012a, FUNC_HOLO6_INIT_GUARD4, 0x00002210, /*goto*/ 0x5d) endloop(0x5c) label(0x5d) @@ -5031,32 +5031,32 @@ u8 func102e_holo6_main[] = { label(0x2f) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_holo6_init_guard1[] = { set_chr_id(0x13) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func040d_holo6_init_guard2[] = { set_chr_id(0x14) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func040e_holo6_init_guard3[] = { set_chr_id(0x15) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func040f_holo6_init_guard4[] = { set_chr_id(0x16) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func0415_holo_guard_unarmed_unalert[] = { @@ -5072,7 +5072,7 @@ u8 func0415_holo_guard_unarmed_unalert[] = { yield yield set_action(MA_NORMAL, FALSE) - set_onshot_function(FUNC_HOLO_GUARD_UNARMED_ALERT) + set_shotlist(FUNC_HOLO_GUARD_UNARMED_ALERT) restart_timer beginloop(0x08) @@ -5088,12 +5088,12 @@ u8 func0415_holo_guard_unarmed_unalert[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) + endlist }; u8 func0416_holo_guard_unarmed_alert[] = { - set_onshot_function(FUNC_HOLO_GUARD_UNARMED_ALERT) + set_shotlist(FUNC_HOLO_GUARD_UNARMED_ALERT) set_action(MA_UNARMEDATTACK, FALSE) if_chr_injured_target(CHR_SELF, /*goto*/ 0x09) label(0x8f) @@ -5110,8 +5110,8 @@ u8 func0416_holo_guard_unarmed_alert[] = { goto_first(0x8f) label(0x2f) - set_return_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT2) + set_returnlist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT2) label(0x09) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0a) @@ -5120,7 +5120,7 @@ u8 func0416_holo_guard_unarmed_alert[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c6f) // "Training failed - you have been hit." restart_timer - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x5e) if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x2f) @@ -5130,8 +5130,8 @@ u8 func0416_holo_guard_unarmed_alert[] = { label(0x2f) set_stage_flag(STAGEFLAG_TRIGGER_HOLO_FAILURE) label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0416_holo_guard_unarmed_alert2[] = { @@ -5215,7 +5215,7 @@ u8 func0416_holo_guard_unarmed_alert2[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c6f) // "Training failed - you have been hit." restart_timer - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x5e) if_timer_gt(180, /*goto*/ 0x2f) @@ -5224,13 +5224,13 @@ u8 func0416_holo_guard_unarmed_alert2[] = { label(0x2f) set_stage_flag(STAGEFLAG_TRIGGER_HOLO_FAILURE) label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) label(0x57) label(0x10) return - endfunction + endlist }; u8 func041a_handle_holo_failure[] = { @@ -5252,7 +5252,7 @@ u8 func041a_handle_holo_failure[] = { unset_stage_flag(STAGEFLAG_HOLO_FAILED) goto_first(0x8f) - endfunction + endlist }; u8 func102f_holo1_part1[] = { @@ -5333,8 +5333,8 @@ u8 func102f_holo1_part1[] = { label(0x2f) goto_first(0x8f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1030_holo7_main[] = { @@ -5361,23 +5361,23 @@ u8 func1030_holo7_main[] = { hide_chr(0x04) beginloop(0x57) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012b, FUNC_HOLO7_INIT_GUARD1, 0x00002210, /*goto*/ 0x59) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012b, FUNC_HOLO7_INIT_GUARD1, 0x00002210, /*goto*/ 0x59) endloop(0x57) beginloop(0x59) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012c, FUNC_HOLO7_INIT_GUARD2, 0x00002210, /*goto*/ 0x5b) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012c, FUNC_HOLO7_INIT_GUARD2, 0x00002210, /*goto*/ 0x5b) endloop(0x59) beginloop(0x5b) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012d, FUNC_HOLO7_INIT_GUARD3, 0x00002210, /*goto*/ 0x5c) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012d, FUNC_HOLO7_INIT_GUARD3, 0x00002210, /*goto*/ 0x5c) endloop(0x5b) beginloop(0x5c) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012e, FUNC_HOLO7_INIT_GUARD4, 0x00002210, /*goto*/ 0x5d) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012e, FUNC_HOLO7_INIT_GUARD4, 0x00002210, /*goto*/ 0x5d) endloop(0x5c) beginloop(0x5d) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x012f, FUNC_HOLO7_INIT_GUARD5, 0x00002210, /*goto*/ 0x5e) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x012f, FUNC_HOLO7_INIT_GUARD5, 0x00002210, /*goto*/ 0x5e) endloop(0x5d) label(0x5e) @@ -5446,8 +5446,8 @@ u8 func1030_holo7_main[] = { label(0x2f) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_holo7_init_guard1[] = { @@ -5455,8 +5455,8 @@ u8 func0412_holo7_init_guard1[] = { set_chr_id(0x19) try_draw_weapon(MODEL_CHRFALCON2, WEAPON_FALCON2, 0x00000000, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) + endlist }; u8 func0413_holo7_init_guard2[] = { @@ -5464,8 +5464,8 @@ u8 func0413_holo7_init_guard2[] = { set_chr_id(0x1a) try_draw_weapon(MODEL_CHRFALCON2, WEAPON_FALCON2, 0x00000000, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) + endlist }; u8 func0414_holo7_init_guard3[] = { @@ -5473,20 +5473,20 @@ u8 func0414_holo7_init_guard3[] = { set_chr_id(0x1b) try_draw_weapon(MODEL_CHRFALCON2, WEAPON_FALCON2, 0x00000000, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_ARMED_UNALERT) + endlist }; u8 func0410_holo7_init_guard4[] = { set_chr_id(0x17) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func0411_holo7_init_guard5[] = { set_chr_id(0x18) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_UNALERT) + endlist }; u8 func0418_holo_guard_armed_unalert[] = { @@ -5499,7 +5499,7 @@ u8 func0418_holo_guard_armed_unalert[] = { rebuild_teams rebuild_squadrons set_action(MA_NORMAL, FALSE) - set_onshot_function(FUNC_HOLO_GUARD_UNARMED_ALERT) + set_shotlist(FUNC_HOLO_GUARD_UNARMED_ALERT) restart_timer beginloop(0x04) @@ -5516,16 +5516,16 @@ u8 func0418_holo_guard_armed_unalert[] = { goto_first(0x04) label(0x06) - set_function(CHR_SELF, FUNC_HOLO_GUARD_ARMED_ALERT) - endfunction + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_ARMED_ALERT) + endlist }; u8 func0419_holo_guard_armed_alert[] = { - set_onshot_function(FUNC_HOLO_GUARD_ARMED_ALERT) + set_shotlist(FUNC_HOLO_GUARD_ARMED_ALERT) if_has_gun(CHR_SELF, /*goto*/ 0x2f) set_squadron_alertness(100) - set_return_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) - set_function(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) + set_returnlist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) + set_ailist(CHR_SELF, FUNC_HOLO_GUARD_UNARMED_ALERT) label(0x2f) label(0x8f) try_aim_and_shoot_thing1(0x0220, 0x0000, /*goto*/ 0x04) @@ -5554,7 +5554,7 @@ u8 func0419_holo_guard_armed_alert[] = { remove_displayed_text display_text(0x01, COLOR_04_ORANGE, 0x1c6f) // "Training failed - you have been hit." restart_timer - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x5e) if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x2f) @@ -5564,8 +5564,8 @@ u8 func0419_holo_guard_armed_alert[] = { label(0x2f) set_stage_flag(STAGEFLAG_TRIGGER_HOLO_FAILURE) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1031_holo7_part1[] = { @@ -5658,8 +5658,8 @@ u8 func1031_holo7_part1[] = { label(0x2f) goto_first(0x8f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1035_manage_music[] = { @@ -5679,7 +5679,7 @@ u8 func1035_manage_music[] = { reset_ambience endloop(0x8f) - endfunction + endlist }; #define do_gun_msg(object, text) \ @@ -5702,42 +5702,42 @@ u8 func1035_manage_music[] = { u8 func1038_msg_pp7[] = { do_gun_msg(0x1e, 0x1c74) // "PP7" - endfunction + endlist }; u8 func1039_msg_tt33[] = { do_gun_msg(0x1f, 0x1c75) // "TT33" - endfunction + endlist }; u8 func103a_msg_skorpion[] = { do_gun_msg(0x20, 0x1c76) // "Skorpion" - endfunction + endlist }; u8 func103b_msg_ak47[] = { do_gun_msg(0x21, 0x1c77) // "AK47" - endfunction + endlist }; u8 func103c_msg_uzi9mm[] = { do_gun_msg(0x22, 0x1c78) // "Uzi 9mm" - endfunction + endlist }; u8 func103d_msg_mp5k[] = { do_gun_msg(0x23, 0x1c79) // "MP5K" - endfunction + endlist }; u8 func103e_msg_m16[] = { do_gun_msg(0x24, 0x1c7a) // "M-16" - endfunction + endlist }; u8 func103f_msg_fnp90[] = { do_gun_msg(0x25, 0x1c7b) // "FNP90" - endfunction + endlist }; u8 func1000_jo_typing[] = { @@ -5750,7 +5750,7 @@ u8 func1000_jo_typing[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0485, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0485, -1, -1, 0x06, 0x00, CHR_BOND, 4) restart_timer fade_to_color(0x000000ff, 0) fade_to_color(0x00000000, 110) @@ -5783,7 +5783,7 @@ u8 func1000_jo_typing[] = { label(0x7b) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0485, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0485, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) enter_firstperson @@ -5795,8 +5795,8 @@ u8 func1000_jo_typing[] = { yield restart_default_music reset_ambience - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1040_lift_door_sounds[] = { @@ -5840,7 +5840,7 @@ u8 func1040_lift_door_sounds[] = { label(0x06) endloop(0x8f) - endfunction + endlist }; u8 intro[] = { @@ -5862,8 +5862,8 @@ u8 func1032_setup_lifts[] = { set_lights_state(0x0008, 0x01, 0x32, 0x00, 0x00) set_lights_state(0x0009, 0x01, 0x32, 0x00, 0x00) set_lights_state(0x000a, 0x01, 0x19, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1042_check_jo_in_training_room[] = { @@ -5950,7 +5950,7 @@ u8 func1042_check_jo_in_training_room[] = { label(0x2f) goto_first(0x04) - endfunction + endlist }; u8 func1041_setup_lighting[] = { @@ -5961,8 +5961,8 @@ u8 func1041_setup_lighting[] = { misc_command(0x0048, 0x06, 0x01) misc_command(0x0055, 0x06, 0x01) misc_command(0x0056, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1043_remove_hovercrate[] = { @@ -5988,7 +5988,7 @@ u8 func1043_remove_hovercrate[] = { move_object_to_pad(OBJ_HOVERCRATE, 0x0141) endloop(0x8f) - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupear.c b/src/files/setup/setupear.c index 54f87b288..eefbc570c 100644 --- a/src/files/setup/setupear.c +++ b/src/files/setup/setupear.c @@ -831,33 +831,33 @@ s32 path13[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func040c_start_path00[] = { init_path(0) - endfunction + endlist }; u8 func040d_start_path01[] = { init_path(1) - endfunction + endlist }; u8 func040e_start_path02[] = { init_path(2) - endfunction + endlist }; u8 func040f_start_path03[] = { init_path(3) - endfunction + endlist }; u8 func0410_start_path04[] = { init_path(4) - endfunction + endlist }; /** @@ -891,7 +891,7 @@ u8 func0414_walk_3_pads[] = { label(0x0a) goto_first(0x03) - endfunction + endlist }; /** @@ -899,18 +899,18 @@ u8 func0414_walk_3_pads[] = { */ u8 func0401_init_chr_with_flag[] = { set_self_chrflag(CHRCFLAG_00000200) - set_function(CHR_SELF, GFUNC_UNALERTED_0001) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) + endlist }; u8 func0405_init_scientist[] = { set_chr_health(CHR_SELF, 20) - set_function(CHR_SELF, FUNC_SCIENTIST) - endfunction + set_ailist(CHR_SELF, FUNC_SCIENTIST) + endlist }; u8 func0404_scientist[] = { - set_onshot_function(FUNC_SCIENTIST) + set_shotlist(FUNC_SCIENTIST) if_chr_dying(CHR_SELF, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f) @@ -918,8 +918,8 @@ u8 func0404_scientist[] = { label(0x2f) dprint 'N','I','S','D','E','A','D','\n',0, - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) dprint 'N','I','S','2','\n',0, @@ -932,7 +932,7 @@ u8 func0404_scientist[] = { endloop(0x10) label(0x2f) - set_function(CHR_SELF, FUNC_INIT_NASTY_SCIENTIST) + set_ailist(CHR_SELF, FUNC_INIT_NASTY_SCIENTIST) label(0x06) stop_chr @@ -957,7 +957,7 @@ u8 func0404_scientist[] = { label(0x06) set_stage_flag(STAGEFLAG_THREE_SCIENTISTS_DONE) if_stage_flag_eq(STAGEFLAG_THREE_SCIENTISTS_DONE, FALSE, /*goto*/ 0x03) - set_function(CHR_SELF, FUNC_INIT_NASTY_SCIENTIST) + set_ailist(CHR_SELF, FUNC_INIT_NASTY_SCIENTIST) label(0x03) if_chr_in_room(CHR_P1P2, 0x00, 0x0031, /*goto*/ 0x6a) @@ -967,7 +967,7 @@ u8 func0404_scientist[] = { goto_next(0x06) label(0x6a) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x6b) if_chr_dying(0x2b, /*goto*/ 0x2f) @@ -987,7 +987,7 @@ u8 func0404_scientist[] = { goto_first(0x6a) label(0x6d) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x6e) if_chr_dying(0x2d, /*goto*/ 0x2f) @@ -1045,7 +1045,7 @@ u8 func0404_scientist[] = { label(0x0a) say_quip(CHR_TARGET, 0x0c, 0xff, 0x00, 0xff, 0x81, 0x05, 0x08) restart_timer - animation(ANIM_SURRENDER_002E, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0b) if_jo_ccw_direction_lt(10, /*goto*/ 0x06) @@ -1128,7 +1128,7 @@ u8 func0404_scientist[] = { label(0x0f) message(CHR_TARGET, 0x1e1c) // "Powering down active systems." speak(CHR_TARGET, 0xffff, 0x8118, CHANNEL_9, COLOR_00_GREEN) // unknown text - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0d) if_chr_stopped(/*goto*/ 0x06) @@ -1141,16 +1141,16 @@ u8 func0404_scientist[] = { beginloop(0x0e) endloop(0x0e) - endfunction + endlist }; u8 func0407_init_nasty_scientist[] = { - set_function(CHR_SELF, FUNC_NASTY_SCIENTIST) - endfunction + set_ailist(CHR_SELF, FUNC_NASTY_SCIENTIST) + endlist }; u8 func0406_nasty_scientist[] = { - set_onshot_function(FUNC_NASTY_SCIENTIST) + set_shotlist(FUNC_NASTY_SCIENTIST) dprint 'N','A','S','T','Y','1','\n',0, if_chr_dying(CHR_SELF, /*goto*/ 0x2f) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) @@ -1159,8 +1159,8 @@ u8 func0406_nasty_scientist[] = { label(0x2f) dprint 'N','A','S','T','Y',' ','D','E','A','D','\n',0, - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) dprint 'N','A','S','T','Y','2','\n',0, @@ -1276,7 +1276,7 @@ u8 func0406_nasty_scientist[] = { label(0x0f) speak(CHR_TARGET, 0xffff, 0x8118, CHANNEL_9, COLOR_00_GREEN) // unknown text say_quip(CHR_TARGET, 0x0e, 0xff, 0x00, 0xff, 0x81, 0x07, 0x08) - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0d) if_chr_stopped(/*goto*/ 0x30) @@ -1291,7 +1291,7 @@ u8 func0406_nasty_scientist[] = { beginloop(0x0e) endloop(0x0e) - endfunction + endlist }; u8 func1009_weaponscache[] = { @@ -1315,15 +1315,15 @@ u8 func1009_weaponscache[] = { unset_object_flag_bank1(OBJ_CMP150_2, OBJECTFLAG1_INVISIBLE) set_object_flag_bank1(OBJ_CMP150_1, OBJECTFLAG1_00001000) set_object_flag_bank1(OBJ_CMP150_2, OBJECTFLAG1_00001000) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2f) message(CHR_TARGET, 0x1e63) // "Enemy detected - weapon cache locked." play_sound(0x00f7, -1) unset_stage_flag(STAGEFLAG_BOT_ACTIVE) unset_stage_flag(STAGEFLAG_BOT_REPROGRAMMED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1340,7 +1340,7 @@ u8 func1002_bot_activation_terminal[] = { goto_next(0x04) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -1401,7 +1401,7 @@ u8 func1002_bot_activation_terminal[] = { message(CHR_TARGET, 0x1e17) // "Maintenance robot system offline." endloop(0x04) - endfunction + endlist }; /** @@ -1418,7 +1418,7 @@ u8 func1003_bot_programming_terminal[] = { goto_next(0x04) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -1469,7 +1469,7 @@ u8 func1003_bot_programming_terminal[] = { message(CHR_TARGET, 0x1e17) // "Maintenance robot system offline." endloop(0x04) - endfunction + endlist }; u8 func1004_check_items_collected[] = { @@ -1497,8 +1497,8 @@ u8 func1004_check_items_collected[] = { yield set_stage_flag(STAGEFLAG_ALL_ITEMS_COLLECTED) unset_stage_flag(STAGEFLAG_ITEMS_UNCOLLECTABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_item_pickup_messages[] = { @@ -1533,8 +1533,8 @@ u8 func1018_item_pickup_messages[] = { endloop(0x04) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_check_unacceptable_casualties[] = { @@ -1590,8 +1590,8 @@ u8 func1005_check_unacceptable_casualties[] = { label(0x0f) set_stage_flag(STAGEFLAG_UNACCEPTABLE_CASUALTIES) message(CHR_BOND, 0x1e1a) // "Unacceptable scientist casualties." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_terminal_activation[] = { @@ -1774,7 +1774,7 @@ u8 func1006_terminal_activation[] = { label(0x2f) endloop(0x04) - endfunction + endlist }; u8 func1007_uplink[] = { @@ -1908,8 +1908,8 @@ u8 func1007_uplink[] = { label(0x0d) mute_channel(CHANNEL_5) mute_channel(CHANNEL_6) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_check_bot_terminals_destroyed[] = { @@ -1930,8 +1930,8 @@ u8 func1008_check_bot_terminals_destroyed[] = { endloop(0x04) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1001_objectives_failed_msg[] = { @@ -1941,8 +1941,8 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(0x36, CHRCFLAG_04000000) set_chr_chrflag(0x37, CHRCFLAG_04000000) set_chr_chrflag(0x38, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func100a_spawn_alarm_responders[] = { @@ -1956,7 +1956,7 @@ u8 func100a_spawn_alarm_responders[] = { restart_timer beginloop(0x56) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x08) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x08) endloop(0x56) beginloop(0x08) @@ -1965,7 +1965,7 @@ u8 func100a_spawn_alarm_responders[] = { label(0x06) beginloop(0x57) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x09) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x09) endloop(0x57) beginloop(0x09) @@ -1974,7 +1974,7 @@ u8 func100a_spawn_alarm_responders[] = { label(0x06) beginloop(0x58) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x0a) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x0a) endloop(0x58) beginloop(0x0a) @@ -1983,7 +1983,7 @@ u8 func100a_spawn_alarm_responders[] = { label(0x06) beginloop(0x59) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x0b) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x005d, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x0b) endloop(0x59) beginloop(0x0b) @@ -1994,7 +1994,7 @@ u8 func100a_spawn_alarm_responders[] = { label(0x0c) endloop(0x04) - endfunction + endlist }; u8 func0408_alarm_responder[] = { @@ -2035,8 +2035,8 @@ u8 func0408_alarm_responder[] = { label(0x06) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_UNALERTED_0001) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) + endlist }; u8 func100b_check_uplink_pc_destroyed[] = { @@ -2050,8 +2050,8 @@ u8 func100b_check_uplink_pc_destroyed[] = { endloop(0x04) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0411_yellowbot[] = { @@ -2075,7 +2075,7 @@ u8 func0411_yellowbot[] = { label(0x06) goto_first(0x03) - endfunction + endlist }; u8 func0412_purplebot_programs[] = { @@ -2132,7 +2132,7 @@ u8 func0412_purplebot_programs[] = { label(0x14) label(0x06) - set_function(CHR_SELF, FUNC_PURPLEBOT_AT_LASERS) + set_ailist(CHR_SELF, FUNC_PURPLEBOT_AT_LASERS) // Returning to offline label(0x0e) @@ -2162,7 +2162,7 @@ u8 func0412_purplebot_programs[] = { label(0x10) goto_first(0x08) - endfunction + endlist }; u8 func0413_purplebot_at_lasers[] = { @@ -2173,7 +2173,7 @@ u8 func0413_purplebot_at_lasers[] = { beginloop(0x13) endloop(0x13) - endfunction + endlist }; u8 func100c_shuffle_terminals[] = { @@ -2181,8 +2181,8 @@ u8 func100c_shuffle_terminals[] = { shuffle_investigation_terminals(OBJ_GOODTERM2, OBJ_ALARMTERM2, 0x1a, 0x1b, 0x1c, 0x1d) shuffle_investigation_terminals(OBJ_GOODTERM3, OBJ_ALARMTERM3, 0x15, 0x16, 0x17, 0x18) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_experiment_terminals_destroyed[] = { @@ -2210,7 +2210,7 @@ u8 func100e_experiment_terminals_destroyed[] = { label(0x2f) endloop(0x04) - endfunction + endlist }; u8 func0416_intro[] = { @@ -2223,13 +2223,13 @@ u8 func0416_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_chrflag(CHR_BOND, CHRCFLAG_00010000) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00f6, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x00f6, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_00010000) unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000) - animation(0x00f7, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) + chr_do_animation(0x00f7, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 4) restart_timer fade_to_color(0x000000ff, 0) @@ -2319,12 +2319,12 @@ u8 func0416_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_BOND, CHRCFLAG_00010000) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00f6, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x00f6, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000) - animation(0x00f7, -2, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) + chr_do_animation(0x00f7, -2, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) @@ -2332,11 +2332,11 @@ u8 func0416_intro[] = { reset_ambience enter_firstperson yield - animation(0x020b, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) + chr_do_animation(0x020b, -1, -1, 0x06, 0x00, CHR_INTRO_GUARD, 2) yield kill(CHR_INTRO_GUARD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0417_outro[] = { @@ -2349,12 +2349,12 @@ u8 func0417_outro[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - set_function(CHR_DRCAROLL, GFUNC_IDLE) - set_function(CHR_K7_GUARD, GFUNC_IDLE) + set_ailist(CHR_DRCAROLL, GFUNC_IDLE) + set_ailist(CHR_K7_GUARD, GFUNC_IDLE) restart_timer dprint 's','h','o','t',' ','1',0, camera_movement(0x00f9) - animation(0x00fa, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x00fa, -1, -1, 0x06, 0x00, CHR_P1P2, 2) set_cutscene_weapon(CHR_P1P2, -1, -1) yield set_cutscene_weapon(CHR_P1P2, -1, WEAPON_FALCON2) @@ -2376,21 +2376,21 @@ u8 func0417_outro[] = { dprint 's','h','o','t',' ','2',0, if_controller_button_pressed(/*goto*/ 0x06) camera_movement(0x0140) - animation(0x0141, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x0141, -1, -1, 0x06, 0x00, CHR_P1P2, 2) wait_for_camera(0x09) dprint 's','h','o','t',' ','3',0, if_controller_button_pressed(/*goto*/ 0x06) camera_movement(0x0143) - animation(0x0144, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x0144, -1, -1, 0x06, 0x00, CHR_P1P2, 2) wait_for_camera(0x0a) dprint 's','h','o','t',' ','4',0, if_controller_button_pressed(/*goto*/ 0x06) camera_movement(0x0146) - animation(0x0147, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x0147, -1, -1, 0x06, 0x00, CHR_P1P2, 2) restart_timer beginloop(0x0b) @@ -2419,61 +2419,61 @@ u8 func0417_outro[] = { set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000) camera_movement(0x0149) - animation(0x014a, -1, -1, 0x06, 0x00, CHR_P1P2, 2) - animation(0x014b, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x014a, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x014b, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) wait_for_camera(0x0c) dprint 's','h','o','t',' ','6',0, if_controller_button_pressed(/*goto*/ 0x06) camera_movement(0x014c) - animation(0x014d, -1, -1, 0x06, 0x00, CHR_P1P2, 2) - animation(0x014e, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x014d, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x014e, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) wait_for_camera(0x0d) dprint 's','h','o','t',' ','7',0, if_controller_button_pressed(/*goto*/ 0x06) camera_movement(0x014f) - animation(0x0150, -1, -1, 0x06, 0x00, CHR_P1P2, 2) - animation(0x0151, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x0150, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x0151, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) wait_for_camera(0x0e) dprint 's','h','o','t',' ','8',0, camera_movement(0x0152) - animation(0x0153, -1, -1, 0x06, 0x00, CHR_P1P2, 2) - animation(0x0154, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x0153, -1, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x0154, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 2) wait_for_camera(0x0f) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_intro_from_menu[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0416) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0416) + endlist }; u8 func0417_outro_from_menu[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 unregistered_function1[] = { - set_return_function(CHR_SELF, 0x0419) - set_function(CHR_SELF, 0x0416) - endfunction + set_returnlist(CHR_SELF, 0x0419) + set_ailist(CHR_SELF, 0x0416) + endlist }; u8 unregistered_function2[] = { - set_return_function(CHR_SELF, 0x041a) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_returnlist(CHR_SELF, 0x041a) + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func1415_outro_audio[] = { @@ -2597,7 +2597,7 @@ u8 func1415_outro_audio[] = { label(0x77) goto_first(0x79) - endfunction + endlist }; u8 func100f_check_for_end_level[] = { @@ -2632,13 +2632,13 @@ u8 func100f_check_for_end_level[] = { label(0x2f) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1400_setup_counterop[] = { @@ -2646,8 +2646,8 @@ u8 func1400_setup_counterop[] = { set_chr_team(CHR_ANTI, TEAM_ENEMY) give_object_to_chr(OBJ_DATAUPLINK_BOND, CHR_BOND) give_object_to_chr(OBJ_DATAUPLINK_COOP, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1011_spawn_guards_during_uplink[] = { @@ -2658,14 +2658,14 @@ u8 func1011_spawn_guards_during_uplink[] = { label(0x2f) restart_timer - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0131, FUNC_UPLINK_RESPONDER, 0x00000210, /*goto*/ 0x09) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0131, FUNC_UPLINK_RESPONDER, 0x00000210, /*goto*/ 0x09) beginloop(0x09) if_timer_gt(30, /*goto*/ 0x06) endloop(0x09) label(0x06) - try_spawn_chr(BODY_DDSHOCK, HEAD_RANDOM, 0x0132, FUNC_UPLINK_RESPONDER, 0x00000210, /*goto*/ 0x0a) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, 0x0132, FUNC_UPLINK_RESPONDER, 0x00000210, /*goto*/ 0x0a) beginloop(0x0a) if_timer_gt(60, /*goto*/ 0x06) @@ -2673,8 +2673,8 @@ u8 func1011_spawn_guards_during_uplink[] = { label(0x06) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0409_uplink_responder[] = { @@ -2697,8 +2697,8 @@ u8 func0409_uplink_responder[] = { label(0x06) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1012_start_laser_sound[] = { @@ -2716,8 +2716,8 @@ u8 func1012_start_laser_sound[] = { play_sound_from_object(CHANNEL_3, 0x38, 0x0258, 0x0320) assign_sound(0x01c5, CHANNEL_4) play_sound_from_object(CHANNEL_4, 0x37, 0x0258, 0x0320) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_hatch_pc[] = { @@ -2748,8 +2748,8 @@ u8 func1013_hatch_pc[] = { label(0x2f) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_radioactivity[] = { @@ -2787,40 +2787,40 @@ u8 func0415_radioactivity[] = { label(0x06) goto_first(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_jo_radioactivity[] = { set_target_chr(CHR_BOND) - set_function(CHR_SELF, FUNC_RADIOACTIVITY) - endfunction + set_ailist(CHR_SELF, FUNC_RADIOACTIVITY) + endlist }; u8 func101d_coop_radioactivty[] = { yield set_target_chr(CHR_COOP) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2f) - set_function(CHR_SELF, FUNC_RADIOACTIVITY) + set_ailist(CHR_SELF, FUNC_RADIOACTIVITY) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_counterop_radioactivity[] = { yield set_target_chr(CHR_ANTI) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2f) - set_function(CHR_SELF, FUNC_RADIOACTIVITY) + set_ailist(CHR_SELF, FUNC_RADIOACTIVITY) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_k7_guard[] = { set_accuracy(20) set_reaction_speed(100) - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) beginloop(0x0f) chr_toggle_p1p2(CHR_SELF) @@ -2922,8 +2922,8 @@ u8 func0402_k7_guard[] = { goto_first(0x03) label(0x0c) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0403_k7_scientist[] = { @@ -2958,16 +2958,16 @@ u8 func0403_k7_scientist[] = { if_rand_lt(64, /*goto*/ 0x09) if_rand_lt(128, /*goto*/ 0x0a) if_rand_lt(196, /*goto*/ 0x0b) - animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x0f) label(0x09) - animation(ANIM_YAWN, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x0f) label(0x0a) - animation(ANIM_ROLL_HEAD, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_ROLL_HEAD, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x0f) label(0x0b) - animation(ANIM_GRAB_BUTT, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_BUTT, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x0f) beginloop(0x0f) @@ -2995,7 +2995,7 @@ u8 func0403_k7_scientist[] = { endloop(0x0d) label(0x10) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x0e) if_chr_stopped(/*goto*/ 0x2f) @@ -3004,14 +3004,14 @@ u8 func0403_k7_scientist[] = { label(0x2f) goto_first(0x10) - endfunction + endlist }; u8 func1016_setup_drcaroll[] = { set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_HIDDEN) - set_function(CHR_DRCAROLL, GFUNC_INVINCIBLE_AND_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_DRCAROLL, GFUNC_INVINCIBLE_AND_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040a_init_basic_guard[] = { @@ -3022,8 +3022,8 @@ u8 func040a_init_basic_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040b_init_shock_guard[] = { @@ -3034,8 +3034,8 @@ u8 func040b_init_shock_guard[] = { set_armor(0) set_recovery_speed(10) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1019_msg_securitysector[] = { @@ -3046,8 +3046,8 @@ u8 func1019_msg_securitysector[] = { label(0x2f) speak(CHR_P1P2, 0x1e5e, 0x8173, CHANNEL_6, COLOR_09_BLUE) // "That's the highest security sector - Dr. Caroll ha..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_msg_lotofpower[] = { @@ -3059,8 +3059,8 @@ u8 func101a_msg_lotofpower[] = { label(0x2f) speak(CHR_P1P2, 0x1e5f, 0x73a5, CHANNEL_6, COLOR_09_BLUE) // "Something around here's using a lot of power." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101b_msg_reprogram[] = { @@ -3075,8 +3075,8 @@ u8 func101b_msg_reprogram[] = { label(0x2f) speak(CHR_P1P2, 0x1e60, 0x8174, CHANNEL_6, COLOR_09_BLUE) // "Reprogram that cleaning bot - it'll give you a way..." label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_msg_radioactive[] = { @@ -3089,8 +3089,8 @@ u8 func101c_msg_radioactive[] = { label(0x2f) speak(CHR_P1P2, 0x1e61, 0x8175, CHANNEL_6, COLOR_09_BLUE) // "Get out, Jo! The levels are too high. Use the CamS..." label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_unlock_drcaroll_door[] = { @@ -3115,8 +3115,8 @@ u8 func101e_unlock_drcaroll_door[] = { label(0x06) unlock_door(0x26, 0x40) unlock_door(0x5a, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_check_bot_destroyed[] = { @@ -3213,7 +3213,7 @@ u8 func101f_check_bot_destroyed[] = { if_stage_flag_eq(STAGEFLAG_HAS_NIGHTVISION, TRUE, /*goto*/ 0x2f) set_stage_flag(STAGEFLAG_ITEMS_UNCOLLECTABLE) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_objective_complete(0, /*goto*/ 0x2f) @@ -3234,8 +3234,8 @@ u8 func101f_check_bot_destroyed[] = { if_chr_has_object(CHR_BOND, OBJ_NIGHTVISION, /*goto*/ 0x2f) if_chr_has_object(CHR_COOP, OBJ_NIGHTVISION, /*goto*/ 0x2f) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_lock_agent_doors[] = { @@ -3248,8 +3248,8 @@ u8 func1020_lock_agent_doors[] = { lock_door(0x5e, 0x08) lock_door(0x5f, 0x08) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_setup_rtracker[] = { @@ -3257,8 +3257,8 @@ u8 func1022_setup_rtracker[] = { set_object_flag_bank2(OBJ_CMP150_1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_CMP150_2, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_PROXYMINES, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1423_setup_lighting[] = { @@ -3306,14 +3306,14 @@ u8 func1423_setup_lighting[] = { misc_command(0x0067, 0x05, 0x01) misc_command(0x0069, 0x05, 0x01) misc_command(0x006a, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1424_start_lift[] = { activate_lift(1, 0x60) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupeld.c b/src/files/setup/setupeld.c index b6e44d8be..43e9dcc7f 100644 --- a/src/files/setup/setupeld.c +++ b/src/files/setup/setupeld.c @@ -755,21 +755,21 @@ s32 path01[] = { u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_20) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1002_intro_from_menu[] = { set_stage_flag(STAGEFLAG_PLAYING_INTRO_FROM_MENU) - set_function(CHR_SELF, FUNC_INTRO) - endfunction + set_ailist(CHR_SELF, FUNC_INTRO) + endlist }; u8 func1002_intro[] = { @@ -781,22 +781,22 @@ u8 func1002_intro[] = { if_stage_flag_eq(STAGEFLAG_PLAYING_INTRO_FROM_MENU, TRUE, /*goto*/ 0x2e) if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) label(0x2e) - animation(0x0172, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0172, -1, -1, 0x06, 0x00, CHR_BOND, 4) remove_chr(CHR_NEGOTIATOR) set_music_track(MUSIC_VILLA_INTRO3) goto_next(0x06) label(0x2d) set_music_track(MUSIC_VILLA_INTRO2) - animation(0x0172, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) + chr_do_animation(0x0172, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) label(0x06) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) - animation(0x0173, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) + chr_do_animation(0x0173, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) - animation(0x0174, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) + chr_do_animation(0x0174, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) show_object(OBJ_DROPSHIP) set_object_flag_bank1(OBJ_DROPSHIP, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_DROPSHIP, OBJECTFLAG2_00000010) @@ -942,21 +942,21 @@ u8 func1002_intro[] = { if_stage_flag_eq(STAGEFLAG_PLAYING_INTRO_FROM_MENU, TRUE, /*goto*/ 0x2e) if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) label(0x2e) - animation(0x01b8, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01b8, -1, -1, 0x06, 0x00, CHR_BOND, 4) goto_next(0x06) label(0x2d) - animation(0x01b8, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) + chr_do_animation(0x01b8, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) label(0x06) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) - animation(0x01b9, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) + chr_do_animation(0x01b9, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) - animation(0x01ba, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) + chr_do_animation(0x01ba, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) restart_timer @@ -1033,20 +1033,20 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_NEGOTIATOR, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_NEGOTIATOR, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_NEGOTIATOR, CHRHFLAG_00020000) - animation(0x0001, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) + chr_do_animation(0x0001, -1, -1, 0x06, 0x00, CHR_NEGOTIATOR, 4) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) - animation(0x0001, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) + chr_do_animation(0x0001, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_HIDDEN) - animation(0x0001, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) + chr_do_animation(0x0001, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01bc, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01bc, -1, -1, 0x06, 0x00, CHR_BOND, 4) show_object(OBJ_DROPSHIP) set_object_flag_bank1(OBJ_DROPSHIP, OBJECTFLAG1_04000000) @@ -1101,19 +1101,19 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01bc, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01bc, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_NEGOTIATOR, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_NEGOTIATOR, CHRHFLAG_00020000) - animation(0x01b8, -2, -1, 0x06, 0x00, CHR_NEGOTIATOR, 2) + chr_do_animation(0x01b8, -2, -1, 0x06, 0x00, CHR_NEGOTIATOR, 2) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) - animation(0x01b9, -2, -1, 0x06, 0x00, CHR_TAKER1, 2) + chr_do_animation(0x01b9, -2, -1, 0x06, 0x00, CHR_TAKER1, 2) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) - animation(0x01ba, -2, -1, 0x06, 0x00, CHR_TAKER2, 2) + chr_do_animation(0x01ba, -2, -1, 0x06, 0x00, CHR_TAKER2, 2) hide_object(OBJ_DROPSHIP) restart_default_music @@ -1122,15 +1122,15 @@ u8 func1002_intro[] = { unset_stage_flag(STAGEFLAG_PLAYING_INTRO_FROM_MENU) enter_firstperson yield - animation(0x0001, -1, -1, 0x02, 0x00, CHR_NEGOTIATOR, 2) - animation(0x0001, -1, -1, 0x02, 0x00, CHR_TAKER1, 2) - animation(0x0001, -1, -1, 0x02, 0x00, CHR_TAKER2, 2) - set_function(CHR_TAKER1, FUNC_INIT_TAKER) - set_function(CHR_TAKER2, FUNC_INIT_TAKER) - set_function(CHR_NEGOTIATOR, FUNC_NEGOTIATOR) + chr_do_animation(0x0001, -1, -1, 0x02, 0x00, CHR_NEGOTIATOR, 2) + chr_do_animation(0x0001, -1, -1, 0x02, 0x00, CHR_TAKER1, 2) + chr_do_animation(0x0001, -1, -1, 0x02, 0x00, CHR_TAKER2, 2) + set_ailist(CHR_TAKER1, FUNC_INIT_TAKER) + set_ailist(CHR_TAKER2, FUNC_INIT_TAKER) + set_ailist(CHR_NEGOTIATOR, FUNC_NEGOTIATOR) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x4f) camera_movement(0x01be) cmd0175(60) @@ -1138,15 +1138,15 @@ u8 func1002_intro[] = { if_controller_button_pressed(/*goto*/ 0x56) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01bf, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01bf, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) - animation(0x01c0, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) + chr_do_animation(0x01c0, -1, -1, 0x06, 0x00, CHR_TAKER1, 4) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) - animation(0x01c1, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) + chr_do_animation(0x01c1, -1, -1, 0x06, 0x00, CHR_TAKER2, 4) restart_timer label(0xa6) yield @@ -1202,33 +1202,33 @@ u8 func1002_intro[] = { mute_channel(CHANNEL_7) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01bf, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01bf, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_00000001) - animation(0x01c0, -2, -1, 0x06, 0x00, CHR_TAKER1, 2) + chr_do_animation(0x01c0, -2, -1, 0x06, 0x00, CHR_TAKER1, 2) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_00000001) - animation(0x01c1, -2, -1, 0x06, 0x00, CHR_TAKER2, 2) + chr_do_animation(0x01c1, -2, -1, 0x06, 0x00, CHR_TAKER2, 2) hide_object(OBJ_DROPSHIP) restart_default_music reset_ambience play_x_music(CHANNEL_10, 30) enter_firstperson yield - set_function(CHR_TAKER1, FUNC_TAKER) - set_function(CHR_TAKER2, FUNC_TAKER) + set_ailist(CHR_TAKER1, FUNC_TAKER) + set_ailist(CHR_TAKER2, FUNC_TAKER) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c02_outro_from_menu[] = { - set_function(CHR_CARRINGTON, GFUNC_IDLE) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_CARRINGTON, GFUNC_IDLE) + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func0408_outro[] = { @@ -1236,19 +1236,19 @@ u8 func0408_outro[] = { set_music_track(MUSIC_VILLA_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_UNEXPLODABLE) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x017c, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x017c, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_CARRINGTON, CHRHFLAG_00020000) - animation(0x017b, -1, -1, 0x06, 0x00, CHR_CARRINGTON, 4) + chr_do_animation(0x017b, -1, -1, 0x06, 0x00, CHR_CARRINGTON, 4) show_nonessential_chrs(FALSE) restart_timer @@ -1386,8 +1386,8 @@ u8 func0408_outro[] = { restart_default_music reset_ambience end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_give_items[] = { @@ -1406,7 +1406,7 @@ u8 func1003_give_items[] = { hide_object(0x02) hide_object(0x8a) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // A and SA label(0x06) @@ -1417,14 +1417,14 @@ u8 func1003_give_items[] = { hide_object(0x01) hide_object(0x89) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Velvet doesn't exist label(0x08) hide_object(0x8a) hide_object(0x89) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_check_negotiator[] = { @@ -1443,8 +1443,8 @@ u8 func1004_check_negotiator[] = { // PA label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0401_init_taker[] = { @@ -1452,8 +1452,8 @@ u8 func0401_init_taker[] = { if_difficulty_gt(DIFF_SA, /*goto*/ 0x2d) unset_self_flag_bankx(CHRFLAG0_80000000, BANK_0) label(0x2d) - set_function(CHR_SELF, FUNC_TAKER) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER) + endlist }; u8 func0402_taker[] = { @@ -1463,12 +1463,12 @@ u8 func0402_taker[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) // PA - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) goto_next(0x06) // A and SA label(0x2d) - set_onshot_function(FUNC_TAKER) + set_shotlist(FUNC_TAKER) // All difficulties label(0x06) @@ -1513,8 +1513,8 @@ u8 func0402_taker[] = { // Jo got away label(0x2e) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Jo got too close label(0x06) @@ -1533,7 +1533,7 @@ u8 func0402_taker[] = { set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) say_quip(CHR_BOND, 0x12, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) restart_timer - animation(0x0202, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0202, 0, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x5f) if_timer_gt(180, /*goto*/ 0x5e) @@ -1612,10 +1612,10 @@ u8 func0402_taker[] = { label(0x2d) if_self_flag_bankx_eq(CHRFLAG0_NOHEAR, TRUE, BANK_0, /*goto*/ 0x06) - animation(0x01fd, 0, -1, 0x00, 0x0a, CHR_SELF, 2) + chr_do_animation(0x01fd, 0, -1, 0x00, 0x0a, CHR_SELF, 2) goto_next(0x0e) label(0x06) - animation(0x0232, 0, -1, 0x00, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0232, 0, -1, 0x00, 0x0a, CHR_SELF, 2) beginloop(0x0e) if_saw_injury(0x00, /*goto*/ 0x2e) @@ -1636,12 +1636,12 @@ u8 func0402_taker[] = { label(0x2d) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_takers_dead[] = { @@ -1659,8 +1659,8 @@ u8 func100f_check_takers_dead[] = { label(0x2d) set_stage_flag(STAGEFLAG_TAKERS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_negotiator[] = { @@ -1684,8 +1684,8 @@ u8 func0403_negotiator[] = { set_stage_flag(STAGEFLAG_NEGOTIATOR_ESCAPED) stop_music_channel(CHANNEL_1) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_toggle_snipers[] = { @@ -1716,8 +1716,8 @@ u8 func1005_toggle_snipers[] = { hide_chr(CHR_SNIPER4) hide_chr(CHR_SNIPER6) hide_chr(CHR_SNIPER7) - set_function(CHR_SNIPER5, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER8, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER5, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER8, FUNC_ENABLE_SNIPER) // Room 0x004e is the dock, ramp, and wooden floor at the top of the ramp. // @bug: When using small characters or play as Elvis cheats, the height @@ -1757,21 +1757,21 @@ u8 func1005_toggle_snipers[] = { // All difficulties label(0x06) - set_function(CHR_SNIPER1, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER2, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER3, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER4, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER5, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER6, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER7, FUNC_ENABLE_SNIPER) - set_function(CHR_SNIPER8, FUNC_ENABLE_SNIPER) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SNIPER1, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER2, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER3, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER4, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER5, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER6, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER7, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SNIPER8, FUNC_ENABLE_SNIPER) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_sniper[] = { stop_chr - set_onshot_function(FUNC_SNIPER) + set_shotlist(FUNC_SNIPER) set_target_chr(CHR_BOND) if_chr_dying(CHR_SELF, /*goto*/ 0x64) if_self_flag_bankx_eq(CHRFLAG0_08000000, TRUE, BANK_0, /*goto*/ 0x04) @@ -1838,23 +1838,23 @@ u8 func0404_sniper[] = { label(0x10) // 4 in 255 chance of looking around, - // and the animation used is random too. + // and the chr_do_animation used is random too. call_rng if_rand_gt(3, /*goto*/ 0x0b) call_rng if_rand_lt(64, /*goto*/ 0x59) if_rand_lt(128, /*goto*/ 0x5a) if_rand_lt(196, /*goto*/ 0x5b) - animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x50, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x50, 0x0a, CHR_SELF, 2) goto_next(0x0b) label(0x59) - animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x50, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x50, 0x0a, CHR_SELF, 2) goto_next(0x0b) label(0x5a) - animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x50, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x50, 0x0a, CHR_SELF, 2) goto_next(0x0b) label(0x5b) - animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x50, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x50, 0x0a, CHR_SELF, 2) label(0x0b) yield @@ -1903,8 +1903,8 @@ u8 func0404_sniper[] = { label(0x64) dprint 'S','N','I','P','E',' ','D','I','E','\n',0, - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_check_snipers_dead[] = { @@ -1951,8 +1951,8 @@ u8 func1006_check_snipers_dead[] = { label(0x2d) message(CHR_BOND, 0x200c) // "Snipers have been eliminated." set_stage_flag(STAGEFLAG_SNIPERS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_cooling_switch[] = { @@ -2002,7 +2002,7 @@ u8 func1007_cooling_switch[] = { label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func1008_power_switch[] = { @@ -2052,7 +2052,7 @@ u8 func1008_power_switch[] = { label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func1009_windmill_switch[] = { @@ -2085,7 +2085,7 @@ u8 func1009_windmill_switch[] = { set_object_flag_bank1(OBJ_WINDMILL, OBJECTFLAG1_20000000) unlock_door(0x06, 0x02) unlock_door(0x07, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Cooling and power not active label(0x06) @@ -2100,7 +2100,7 @@ u8 func1009_windmill_switch[] = { label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func100a_check_switches_destroyed[] = { @@ -2109,26 +2109,26 @@ u8 func100a_check_switches_destroyed[] = { if_stage_flag_eq(STAGEFLAG_COOLING_ACTIVE, TRUE, /*goto*/ 0x2d) message(CHR_BOND, 0x2015) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_WINDMILL_SWITCH_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_object_in_good_condition(0x04, /*goto*/ 0x2d) if_stage_flag_eq(STAGEFLAG_POWER_ACTIVE, TRUE, /*goto*/ 0x2d) message(CHR_BOND, 0x2015) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_WINDMILL_SWITCH_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_object_in_good_condition(0x05, /*goto*/ 0x2d) if_stage_flag_eq(STAGEFLAG_WINDMILL_ACTIVATED, TRUE, /*goto*/ 0x2d) message(CHR_BOND, 0x2015) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_WINDMILL_SWITCH_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func100b_invoke_hackers[] = { @@ -2145,7 +2145,7 @@ u8 func100b_invoke_hackers[] = { // A or SA - exit label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // PA - wait for windmill beginloop(0x04) @@ -2171,9 +2171,9 @@ u8 func100b_invoke_hackers[] = { yield show_chr(CHR_HACKER3) yield - set_function(CHR_HACKER1, FUNC_HACKER) - set_function(CHR_HACKER2, FUNC_HACKER) - set_function(CHR_HACKER3, FUNC_HACKER) + set_ailist(CHR_HACKER1, FUNC_HACKER) + set_ailist(CHR_HACKER2, FUNC_HACKER) + set_ailist(CHR_HACKER3, FUNC_HACKER) unset_chr_chrflag(CHR_HACKER1, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_HACKER2, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_HACKER3, CHRCFLAG_HIDDEN) @@ -2197,18 +2197,18 @@ u8 func100b_invoke_hackers[] = { // Hackers dead label(0x2d) hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0406_init_hacker[] = { set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_hacker[] = { - animation(ANIM_SITTING_TYPING, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_TYPING, 0, -1, 0x14, 0x00, CHR_SELF, 2) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -2232,12 +2232,12 @@ u8 func0405_hacker[] = { label(0x06) stop_chr remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Sees player label(0x09) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func100c_check_hackers_dead[] = { @@ -2281,8 +2281,8 @@ u8 func100c_check_hackers_dead[] = { // Hackers succeeded label(0x2d) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_objectives_complete[] = { @@ -2322,7 +2322,7 @@ u8 func100e_check_objectives_complete[] = { // Mission failed - objectives incomplete end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) @@ -2338,7 +2338,7 @@ u8 func100e_check_objectives_complete[] = { // Mission failed - players dead label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_chr_dying(CHR_CARRINGTON, /*goto*/ 0x2d) @@ -2346,21 +2346,21 @@ u8 func100e_check_objectives_complete[] = { if_chr_unloaded(CHR_CARRINGTON, /*goto*/ 0x2d) // Mission complete - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) // Carrington died... somehow label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_set_pa_negotiator_flag[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x06) set_stage_flag(STAGEFLAG_NEGOTIATOR_ESCAPED) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_setup_snipers[] = { @@ -2376,8 +2376,8 @@ u8 func1011_setup_snipers[] = { set_chr_chrflag(CHR_SNIPER2, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION) set_chr_chrflag(CHR_SNIPER6, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION) set_chr_chrflag(CHR_SNIPER8, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_check_guard_subdued[] = { @@ -2409,8 +2409,8 @@ u8 func1013_check_guard_subdued[] = { // A and SA label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_give_keycard[] = { @@ -2460,8 +2460,8 @@ u8 func1014_give_keycard[] = { label(0x09) unset_object_flag_bank0(OBJ_KEYCARD, OBJECTFLAG0_00100000) unset_object_flag_bank1(OBJ_KEYCARD, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_check_computers_destroyed[] = { @@ -2486,8 +2486,8 @@ u8 func1015_check_computers_destroyed[] = { message(CHR_BOND, 0x2015) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_HACKER_PC_DESTROYED) label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_guard(accuracy, reaction, health, recovery) \ @@ -2503,31 +2503,31 @@ u8 func1015_check_computers_destroyed[] = { u8 func040a_enable_sniper[] = { init_guard(13, 15, 10, 15) - set_function(CHR_SELF, FUNC_SNIPER) - endfunction + set_ailist(CHR_SELF, FUNC_SNIPER) + endlist }; u8 func040c_init_type1_guard[] = { init_guard(3, 15, 40, 0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040d_init_type2_guard[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) init_guard(15, 15, 40, 0) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x2d) init_guard(3, 15, 40, 0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040b_init_basement_guard[] = { init_guard(13, 15, 40, 10) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1016_msg_generator[] = { @@ -2538,13 +2538,13 @@ u8 func1016_msg_generator[] = { label(0x2d) speak(CHR_P1P2, 0x2023, 0x73ac, CHANNEL_6, COLOR_09_BLUE) // "If I get the wind generator back online, I'll get ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_msg_gottobequick[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) restart_timer @@ -2562,8 +2562,8 @@ u8 func1017_msg_gottobequick[] = { label(0x06) speak(CHR_BOND, 0x2024, 0x73ad, CHANNEL_6, COLOR_09_BLUE) // "I've got to be quick, or they'll kill the negotiat..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_msg_hidingdaniel[] = { @@ -2584,8 +2584,8 @@ u8 func1018_msg_hidingdaniel[] = { label(0x2d) speak(CHR_P1P2, 0x2025, 0x73ae, CHANNEL_6, COLOR_09_BLUE) // "Here's where they must be holding Daniel." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1019_msg_hackershavetobestopped[] = { @@ -2602,24 +2602,24 @@ u8 func1019_msg_hackershavetobestopped[] = { label(0x2d) speak(CHR_BOND, 0x2026, 0x73af, CHANNEL_6, COLOR_09_BLUE) // "Those hackers have to be stopped before I rescue D..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040e_start_path00[] = { init_guard(3, 15, 40, 0) assign_path(0) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040f_start_path01[] = { init_guard(3, 15, 40, 0) assign_path(1) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func101b_toggle_basement_chrs[] = { @@ -2783,11 +2783,11 @@ u8 func101b_toggle_basement_chrs[] = { if_object_in_good_condition(0x87, /*goto*/ 0x06) if_object_in_good_condition(0x88, /*goto*/ 0x06) play_sound(0x17cb, -1) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) goto_first(0x08) - endfunction + endlist }; /** @@ -2796,7 +2796,7 @@ u8 func101b_toggle_basement_chrs[] = { */ u8 func101c_toggle_villa_guards[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // A and SA label(0x2d) @@ -2906,8 +2906,8 @@ u8 func101c_toggle_villa_guards[] = { show_chr(0x42) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_dual_cmp150[] = { @@ -2937,15 +2937,15 @@ u8 func101d_dual_cmp150[] = { unset_object_flag_bank1(OBJ_CMP150_1, OBJECTFLAG1_INVISIBLE) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_init_sniper[] = { set_chr_health(CHR_SELF, 1) stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0410_carrington[] = { @@ -2953,9 +2953,9 @@ u8 func0410_carrington[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) set_chr_health(CHR_SELF, 1) - animation(0x017b, 1, 1, 0x06, 0x00, CHR_CARRINGTON, 2) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + chr_do_animation(0x017b, 1, 1, 0x06, 0x00, CHR_CARRINGTON, 2) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2973,8 +2973,8 @@ u8 func101e_unlock_doors[] = { unlock_door(0x97, 0x80) unlock_door(0x98, 0x80) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_check_one_basement_guard_remaining[] = { @@ -3004,11 +3004,11 @@ u8 func101f_check_one_basement_guard_remaining[] = { if_morale_lt(8, /*goto*/ 0x2d) set_stage_flag(STAGEFLAG_ONE_BASEMENT_GUARD_REMAINING) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) - endfunction + endlist }; /** @@ -3022,8 +3022,8 @@ u8 func1420_setup_portals[] = { configure_room_portals(0x004d) configure_room_portals(0x0065) configure_room_portals(0x0059) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1423_setup_lighting[] = { @@ -3112,8 +3112,8 @@ u8 func1423_setup_lighting[] = { misc_command(0x0070, 0x06, 0x01) misc_command(0x0071, 0x05, 0x01) misc_command(0x0071, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_toggle_last_basement_guard[] = { @@ -3147,8 +3147,8 @@ u8 func1021_toggle_last_basement_guard[] = { label(0x2d) unset_chr_chrflag(CHR_BASEMENT9, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BASEMENT9, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_setup_rtracker[] = { @@ -3156,8 +3156,8 @@ u8 func1022_setup_rtracker[] = { set_object_flag_bank2(OBJ_CMP150_1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_CMP150_2, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_DEVASTATOR, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0411_cisoldier[] = { @@ -3165,14 +3165,14 @@ u8 func0411_cisoldier[] = { chr_drop_weapon(CHR_SELF) label(0x08) yield - animation(0x0487, -1, -1, 0x06, 0x00, CHR_CISOLDIER, 2) + chr_do_animation(0x0487, -1, -1, 0x06, 0x00, CHR_CISOLDIER, 2) yield yield yield kill(CHR_CISOLDIER) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3191,8 +3191,8 @@ u8 func1024_set_chr_flags_on_pa[] = { set_chr_hiddenflag(CHR_BASEMENT6, CHRHFLAG_08000000) set_chr_hiddenflag(CHR_BASEMENT8, CHRHFLAG_08000000) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1025_check_basement_entered_without_subdue[] = { @@ -3211,8 +3211,8 @@ u8 func1025_check_basement_entered_without_subdue[] = { set_stage_flag(STAGEFLAG_FORGOT_TO_KO_GUARD) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupimp.c b/src/files/setup/setupimp.c index 441daee88..a59c23693 100644 --- a/src/files/setup/setupimp.c +++ b/src/files/setup/setupimp.c @@ -568,15 +568,15 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(CHR_HOSTAGE_FR2, CHRCFLAG_UNEXPLODABLE) set_chr_chrflag(CHR_TAKER_FR1, CHRCFLAG_UNEXPLODABLE) set_chr_chrflag(CHR_TAKER_FR2, CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; #define spawner_logic(initfunc, clonefunc) \ @@ -594,7 +594,7 @@ u8 func1400_setup_counterop[] = { reloop(0x04) \ \ label(0x0a) \ - set_function(CHR_SELF, clonefunc) \ + set_ailist(CHR_SELF, clonefunc) \ \ label(0x4f) \ if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) \ @@ -602,7 +602,7 @@ u8 func1400_setup_counterop[] = { \ label(0x4f) \ try_spawn_clone2(CHR_SELF, initfunc, 0x00000000, /*goto*/ 0x2e) \ - set_function(CHR_SELF, clonefunc) \ + set_ailist(CHR_SELF, clonefunc) \ label(0x2e) \ yield \ endloop(0x04) @@ -625,70 +625,70 @@ u8 func1400_setup_counterop[] = { set_chr_team(CHR_SELF, TEAM_ENEMY) \ rebuild_teams \ rebuild_squadrons \ - set_function(CHR_SELF, clonefunc) + set_ailist(CHR_SELF, clonefunc) // Spawn clones in autogun hall dead end room u8 func0401_spawner1[] = { spawner_logic(FUNC_INIT_CLONE1, FUNC_CLONE1) - endfunction + endlist }; u8 func0403_init_clone1[] = { initclone_logic(0x0b, FUNC_CLONE1) - endfunction + endlist }; u8 func0402_clone1[] = { unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) run_to_pad(0x00c2) - set_return_function(CHR_SELF, FUNC_CLONE1) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE1) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; // Spawn clones in vehicle maintenance area - assigned to two spawners u8 func0404_spawner2[] = { spawner_logic(FUNC_INIT_CLONE2, FUNC_CLONE2) - endfunction + endlist }; u8 func0406_init_clone2[] = { initclone_logic(0x0d, FUNC_CLONE2) - endfunction + endlist }; u8 func0405_clone2[] = { run_to_pad(0x00b1) - set_return_function(CHR_SELF, FUNC_CLONE2) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE2) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; // Spawn clones in room with pit near autogun switches u8 func0407_spawner3[] = { spawner_logic(FUNC_INIT_CLONE3, FUNC_CLONE3) - endfunction + endlist }; u8 func0409_init_clone3[] = { initclone_logic(0x0f, FUNC_CLONE3) - endfunction + endlist }; u8 func0408_clone3[] = { run_to_pad(0x00af) - set_return_function(CHR_SELF, FUNC_CLONE3) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE3) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** * Assigned to CI soldiers, Jon and hangar guy */ u8 func0413_defend_pad[] = { - set_onshot_function(FUNC_DEFEND_PAD) + set_shotlist(FUNC_DEFEND_PAD) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0a) if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x08) @@ -718,10 +718,10 @@ u8 func0413_defend_pad[] = { // Detected enemy label(0x0a) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_onshot_function(FUNC_DEFEND_PAD) - set_return_function(CHR_SELF, FUNC_DEFEND_PAD) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_DEFEND_PAD) + set_returnlist(CHR_SELF, FUNC_DEFEND_PAD) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func100b_setup_autoguns[] = { @@ -744,8 +744,8 @@ u8 func100b_setup_autoguns[] = { set_object_flag_bank0(OBJ_AUTOGUN3, OBJECTFLAG0_DEACTIVATED) label(0x2f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_check_hostages_killed[] = { @@ -780,8 +780,8 @@ u8 func1004_check_hostages_killed[] = { message(CHR_BOND, 0x2210) // "Too many hostages killed." label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_check_safeinfo_destroyed[] = { @@ -795,8 +795,8 @@ u8 func1005_check_safeinfo_destroyed[] = { label(0x08) message(CHR_BOND, 0x2212) // "Sensitive information has been destroyed." set_stage_flag(STAGEFLAG_SAFEINFO_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define autogun_switch_logic(switch, autogun, stageflag) \ @@ -840,24 +840,24 @@ u8 func1005_check_safeinfo_destroyed[] = { u8 func1007_autogun_switch1[] = { autogun_switch_logic(OBJ_AUTOGUN_SWITCH1, OBJ_AUTOGUN1, STAGEFLAG_AUTOGUN1_ACTIVE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_autogun_switch2[] = { autogun_switch_logic(OBJ_AUTOGUN_SWITCH2, OBJ_AUTOGUN2, STAGEFLAG_AUTOGUN2_ACTIVE) label(0x11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_autogun_switch3[] = { autogun_switch_logic(OBJ_AUTOGUN_SWITCH3, OBJ_AUTOGUN3, STAGEFLAG_AUTOGUN3_ACTIVE) label(0x11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c01_outro[] = { @@ -865,18 +865,18 @@ u8 func0c01_outro[] = { set_music_track(MUSIC_DEFENSE_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x01a3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x01a3, -1, -1, 0x06, 0x00, CHR_P1P2, 4) - #define show_object_with_animation(object, animation) \ + #define show_object_with_animation(object, chr_do_animation) \ show_object(object) \ set_object_flag_bank1(object, OBJECTFLAG1_04000000) \ set_object_flag_bank2(object, OBJECTFLAG2_00000010) \ - object_do_animation(animation, object, 0x04ff, 0xff) + object_do_animation(chr_do_animation, object, 0x04ff, 0xff) @@ -946,12 +946,12 @@ u8 func0c01_outro[] = { set_chr_chrflag(CHR_SKEDAR1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_SKEDAR1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_SKEDAR1, CHRHFLAG_00020000) - animation(0x01ad, -1, -1, 0x06, 0x00, CHR_SKEDAR1, 4) + chr_do_animation(0x01ad, -1, -1, 0x06, 0x00, CHR_SKEDAR1, 4) set_chr_chrflag(CHR_SKEDAR2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_SKEDAR2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_SKEDAR2, CHRHFLAG_00020000) - animation(0x01ae, -1, -1, 0x06, 0x00, CHR_SKEDAR2, 4) + chr_do_animation(0x01ae, -1, -1, 0x06, 0x00, CHR_SKEDAR2, 4) wait_until(16, 0x78) play_sound(0x0530, CHANNEL_10) @@ -974,7 +974,7 @@ u8 func0c01_outro[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0306, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0306, -1, -1, 0x06, 0x00, CHR_P1P2, 4) show_object_with_animation(0x0e, 0x0307) show_object_with_animation(0x0f, 0x0308) @@ -1087,12 +1087,12 @@ u8 func0c01_outro[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0311, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0311, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_chrflag(CHR_SKEDAR1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_SKEDAR1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_SKEDAR1, CHRHFLAG_00020000) - animation(0x0312, -1, -1, 0x06, 0x00, CHR_SKEDAR1, 4) + chr_do_animation(0x0312, -1, -1, 0x06, 0x00, CHR_SKEDAR1, 4) show_object_with_animation(0x0e, 0x0313) show_object_with_animation(0x0f, 0x0314) @@ -1146,8 +1146,8 @@ u8 func0c01_outro[] = { restart_default_music reset_ambience end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -1155,26 +1155,26 @@ u8 func1002_intro[] = { camera_movement(0x02bc) set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(CHR_CARRINGTON, GFUNC_IDLE) - set_function(0x19, GFUNC_IDLE) - set_function(0x1a, GFUNC_IDLE) + set_ailist(CHR_CARRINGTON, GFUNC_IDLE) + set_ailist(0x19, GFUNC_IDLE) + set_ailist(0x1a, GFUNC_IDLE) set_chr_chrflag(0x16, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02bd, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x02bd, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_CARRINGTON, CHRHFLAG_00020000) - animation(0x02be, -1, -1, 0x06, 0x00, CHR_CARRINGTON, 4) + chr_do_animation(0x02be, -1, -1, 0x06, 0x00, CHR_CARRINGTON, 4) set_chr_chrflag(0x19, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x19, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x19, CHRHFLAG_00020000) - animation(0x02bf, -1, -1, 0x06, 0x00, 0x19, 4) + chr_do_animation(0x02bf, -1, -1, 0x06, 0x00, 0x19, 4) set_chr_chrflag(0x1a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x1a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x1a, CHRHFLAG_00020000) - animation(0x02c0, -1, -1, 0x06, 0x00, 0x1a, 4) + chr_do_animation(0x02c0, -1, -1, 0x06, 0x00, 0x1a, 4) show_object(0x0d) set_object_flag_bank1(0x0d, OBJECTFLAG1_04000000) set_object_flag_bank2(0x0d, OBJECTFLAG2_00000010) @@ -1406,10 +1406,10 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_SKEDAR4, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SKEDAR4, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_SKEDAR4, CHRHFLAG_00020000) - animation(0x02c3, -1, -1, 0x06, 0x00, CHR_SKEDAR4, 4) + chr_do_animation(0x02c3, -1, -1, 0x06, 0x00, CHR_SKEDAR4, 4) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02c4, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x02c4, -1, -1, 0x06, 0x00, CHR_BOND, 4) show_object(0x52) set_object_flag_bank1(0x52, OBJECTFLAG1_04000000) set_object_flag_bank2(0x52, OBJECTFLAG2_00000010) @@ -1491,20 +1491,20 @@ u8 func1002_intro[] = { set_cutscene_weapon(CHR_BOND, WEAPON_AR34, WEAPON_NONE) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02c4, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x02c4, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_CARRINGTON, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_CARRINGTON, CHRHFLAG_00020000) - animation(0x02be, -2, -1, 0x06, 0x00, CHR_CARRINGTON, 2) + chr_do_animation(0x02be, -2, -1, 0x06, 0x00, CHR_CARRINGTON, 2) unset_chr_chrflag(0x19, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x19, CHRHFLAG_00020000) - animation(0x02bf, -2, -1, 0x06, 0x00, 0x19, 2) + chr_do_animation(0x02bf, -2, -1, 0x06, 0x00, 0x19, 2) unset_chr_chrflag(0x1a, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x1a, CHRHFLAG_00020000) - animation(0x02c0, -2, -1, 0x06, 0x00, 0x1a, 2) + chr_do_animation(0x02c0, -2, -1, 0x06, 0x00, 0x1a, 2) unset_chr_chrflag(CHR_SKEDAR4, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_SKEDAR4, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_SKEDAR4, CHRHFLAG_00020000) - animation(0x02c3, -2, -1, 0x06, 0x00, CHR_SKEDAR4, 2) + chr_do_animation(0x02c3, -2, -1, 0x06, 0x00, CHR_SKEDAR4, 2) unset_object_flag_bank1(0x0d, OBJECTFLAG1_04000000) set_object_flag_bank0(0x0d, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank2(0x0d, OBJECTFLAG2_00000010) @@ -1524,16 +1524,16 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) remove_chr(0x19) remove_chr(0x1a) - set_function(0x19, GFUNC_IDLE) - set_function(0x1a, GFUNC_IDLE) + set_ailist(0x19, GFUNC_IDLE) + set_ailist(0x1a, GFUNC_IDLE) unset_chr_chrflag(0x16, CHRCFLAG_HIDDEN) enter_firstperson yield - set_function(CHR_CARRINGTON, FUNC_CARRINGTON) - set_function(CHR_SKEDAR4, FUNC_SKEDAR4) + set_ailist(CHR_CARRINGTON, FUNC_CARRINGTON) + set_ailist(CHR_SKEDAR4, FUNC_SKEDAR4) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_hide_blondes_and_skedar[] = { @@ -1557,8 +1557,8 @@ u8 func1003_hide_blondes_and_skedar[] = { set_chr_chrflag(CHR_BLONDE4, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_BLONDE5, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_BLONDE6, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_check_carrington_dead[] = { @@ -1569,36 +1569,36 @@ u8 func100c_check_carrington_dead[] = { label(0x2e) message(CHR_BOND, 0x2213) // "Carrington has been killed." set_stage_flag(STAGEFLAG_CARRINGTON_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_init_hostage_fr1[] = { set_morale(5) set_chr_health(CHR_SELF, 1) set_accuracy(0) - set_function(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) + endlist }; u8 func0416_init_hostage_fr2[] = { set_morale(7) set_chr_health(CHR_SELF, 1) set_accuracy(0) - set_function(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) + endlist }; u8 func0414_firingrange_hostage[] = { - set_onshot_function(FUNC_FIRINGRANGE_HOSTAGE) + set_shotlist(FUNC_FIRINGRANGE_HOSTAGE) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x2e) @@ -1631,15 +1631,15 @@ u8 func0414_firingrange_hostage[] = { label(0x0a) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) - set_onshot_function(FUNC_FIRINGRANGE_HOSTAGE) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_IDLE) + set_returnlist(CHR_SELF, FUNC_FIRINGRANGE_HOSTAGE) + set_shotlist(FUNC_FIRINGRANGE_HOSTAGE) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_IDLE) // Enemy not detected label(0x12) - set_function(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) + endlist }; u8 func100e_setup_firingrange[] = { @@ -1665,8 +1665,8 @@ u8 func100e_setup_firingrange[] = { // Configure FR takers and hostages label(0x2e) - set_function(CHR_TAKER_FR1, FUNC_INIT_FIRINGRANGE_TAKER) - set_function(CHR_TAKER_FR2, FUNC_INIT_FIRINGRANGE_TAKER) + set_ailist(CHR_TAKER_FR1, FUNC_INIT_FIRINGRANGE_TAKER) + set_ailist(CHR_TAKER_FR2, FUNC_INIT_FIRINGRANGE_TAKER) set_chr_flag_bankx(CHR_HOSTAGE_FR1, CHRFLAG0_00002000, BANK_0) set_chr_flag_bankx(CHR_HOSTAGE_FR2, CHRFLAG0_00002000, BANK_0) restart_timer @@ -1695,27 +1695,27 @@ u8 func100e_setup_firingrange[] = { unset_chr_chrflag(CHR_HOSTAGE_FR2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_TAKER_FR1, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_TAKER_FR2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0419_init_firingrange_taker[] = { - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func041b_init_hostage_holo[] = { set_morale(3) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_HOSTAGE_HOLO) - endfunction + set_ailist(CHR_SELF, FUNC_HOSTAGE_HOLO) + endlist }; u8 func041a_hostage_holo[] = { set_self_chrflag(CHRCFLAG_00000002) set_self_chrflag(CHRCFLAG_00040000) - set_onshot_function(FUNC_HOSTAGE_HOLO) + set_shotlist(FUNC_HOSTAGE_HOLO) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -1723,8 +1723,8 @@ u8 func041a_hostage_holo[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive - wait until holo room door opened beginloop(0x04) @@ -1756,7 +1756,7 @@ u8 func041a_hostage_holo[] = { play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01) label(0x08) label(0x08) - try_spawn_chr(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0104, FUNC_INIT_HOLOCLONE1, 0x00002010, /*goto*/ 0x2e) + try_spawn_chr_at_pad(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0104, FUNC_INIT_HOLOCLONE1, 0x00002010, /*goto*/ 0x2e) label(0x2e) yield yield @@ -1768,7 +1768,7 @@ u8 func041a_hostage_holo[] = { yield yield yield - try_spawn_chr(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0105, FUNC_INIT_HOLOCLONE2, 0x00002010, /*goto*/ 0x2e) + try_spawn_chr_at_pad(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0105, FUNC_INIT_HOLOCLONE2, 0x00002010, /*goto*/ 0x2e) label(0x2e) yield yield @@ -1781,11 +1781,11 @@ u8 func041a_hostage_holo[] = { yield yield yield - try_spawn_chr(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0106, FUNC_INIT_HOLOCLONE3, 0x00002010, /*goto*/ 0x2e) + try_spawn_chr_at_pad(BODY_CIFEMTECH, HEAD_SECRETARY, 0x0106, FUNC_INIT_HOLOCLONE3, 0x00002010, /*goto*/ 0x2e) label(0x2e) - set_function(CHR_TAKER_HOLO1, FUNC_TAKER_HOLO1) - set_function(CHR_TAKER_HOLO2, FUNC_TAKER_HOLO2) - set_function(CHR_TAKER_HOLO3, FUNC_TAKER_HOLO3) + set_ailist(CHR_TAKER_HOLO1, FUNC_TAKER_HOLO1) + set_ailist(CHR_TAKER_HOLO2, FUNC_TAKER_HOLO2) + set_ailist(CHR_TAKER_HOLO3, FUNC_TAKER_HOLO3) jog_to_pad(0x0107) beginloop(0x0b) @@ -1795,7 +1795,7 @@ u8 func041a_hostage_holo[] = { label(0x08) label(0x12) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x10) if_stage_flag_eq(STAGEFLAG_HOLO_TAKERS_DEAD, TRUE, /*goto*/ 0x08) @@ -1806,8 +1806,8 @@ u8 func041a_hostage_holo[] = { goto_first(0x12) label(0x08) - set_function(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) + endlist }; u8 func041c_init_holoclone1[] = { @@ -1815,12 +1815,12 @@ u8 func041c_init_holoclone1[] = { rebuild_teams rebuild_squadrons play_sound(0x05bc, CHANNEL_9) - set_onshot_function(FUNC_HOLOCLONE_ONSHOT) + set_shotlist(FUNC_HOLOCLONE_ONSHOT) set_chr_health(CHR_SELF, 1) set_chr_id(CHR_HOLOCLONE1) jog_to_pad(0x0108) - set_function(CHR_SELF, FUNC_HOLOCLONE) - endfunction + set_ailist(CHR_SELF, FUNC_HOLOCLONE) + endlist }; u8 func041d_init_holoclone2[] = { @@ -1828,12 +1828,12 @@ u8 func041d_init_holoclone2[] = { rebuild_teams rebuild_squadrons play_sound(0x05bc, CHANNEL_5) - set_onshot_function(FUNC_HOLOCLONE_ONSHOT) + set_shotlist(FUNC_HOLOCLONE_ONSHOT) set_chr_health(CHR_SELF, 1) set_chr_id(CHR_HOLOCLONE2) jog_to_pad(0x0109) - set_function(CHR_SELF, FUNC_HOLOCLONE) - endfunction + set_ailist(CHR_SELF, FUNC_HOLOCLONE) + endlist }; u8 func041e_init_holoclone3[] = { @@ -1841,19 +1841,19 @@ u8 func041e_init_holoclone3[] = { rebuild_teams rebuild_squadrons play_sound(0x05bc, CHANNEL_6) - set_onshot_function(FUNC_HOLOCLONE_ONSHOT) + set_shotlist(FUNC_HOLOCLONE_ONSHOT) set_chr_health(CHR_SELF, 1) set_chr_id(CHR_HOLOCLONE3) jog_to_pad(0x010a) - set_function(CHR_SELF, FUNC_HOLOCLONE) - endfunction + set_ailist(CHR_SELF, FUNC_HOLOCLONE) + endlist }; u8 func041f_holoclone_onshot[] = { play_sound(0x05bb, CHANNEL_6) drop_gun_and_fade_out - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041f_holoclone[] = { @@ -1864,7 +1864,7 @@ u8 func041f_holoclone[] = { label(0x08) label(0x12) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x10) if_chr_stopped(/*goto*/ 0x2e) @@ -1873,12 +1873,12 @@ u8 func041f_holoclone[] = { label(0x2e) goto_first(0x12) - endfunction + endlist }; #define holo_taker_logic(holoclone) \ restart_timer \ - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) \ + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) \ \ beginloop(0xba) \ set_target_chr(CHR_BOND) \ @@ -1904,16 +1904,16 @@ u8 func041f_holoclone[] = { endloop(0x0a) \ \ label(0x08) \ - set_onshot_function(GFUNC_UNALERTED) \ - set_return_function(CHR_SELF, GFUNC_UNALERTED) \ - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(GFUNC_UNALERTED) \ + set_returnlist(CHR_SELF, GFUNC_UNALERTED) \ + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) u8 func0420_taker_holo1[] = { set_self_chrflag(CHRCFLAG_00040000) holo_taker_logic(CHR_HOLOCLONE1) - endfunction + endlist }; u8 func0421_taker_holo2[] = { @@ -1921,13 +1921,13 @@ u8 func0421_taker_holo2[] = { assign_sound(0x025b, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) holo_taker_logic(CHR_HOLOCLONE2) - endfunction + endlist }; u8 func0422_taker_holo3[] = { set_self_chrflag(CHRCFLAG_00040000) holo_taker_logic(CHR_HOLOCLONE3) - endfunction + endlist }; u8 func0423_init_shock[] = { @@ -1938,12 +1938,12 @@ u8 func0423_init_shock[] = { set_armor(0) set_recovery_speed(0) set_shield(90) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0426_init_saved_hostage[] = { - set_onshot_function(FUNC_HOSTAGE_THANK_AND_RUN) + set_shotlist(FUNC_HOSTAGE_THANK_AND_RUN) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -1952,24 +1952,24 @@ u8 func0426_init_saved_hostage[] = { set_chr_health(CHR_SELF, 1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_HOSTAGE_THANK_AND_RUN) + set_ailist(CHR_SELF, FUNC_HOSTAGE_THANK_AND_RUN) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0425_hostage_thank_and_run[] = { - set_onshot_function(FUNC_HOSTAGE_THANK_AND_RUN) + set_shotlist(FUNC_HOSTAGE_THANK_AND_RUN) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) goto_next(0x03) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) set_target_chr(CHR_COOP) @@ -1996,7 +1996,7 @@ u8 func0425_hostage_thank_and_run[] = { label(0x08) play_cistaff_quip(BANK_3, CHANNEL_6) - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0x2f) restart_timer @@ -2028,30 +2028,30 @@ u8 func0425_hostage_thank_and_run[] = { label(0x08) unset_self_chrflag(CHRCFLAG_KILLCOUNTABLE) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0428_init_drop_devastator[] = { unset_self_chrflag(CHRCFLAG_KILLCOUNTABLE) - set_onshot_function(FUNC_HOSTAGE_THANK_AND_RUN) + set_shotlist(FUNC_HOSTAGE_THANK_AND_RUN) set_chr_team(CHR_SELF, TEAM_NONCOMBAT) set_chr_health(CHR_SELF, 40) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_DROP_DEVASTATOR) - endfunction + set_ailist(CHR_SELF, FUNC_DROP_DEVASTATOR) + endlist }; u8 func0427_drop_devastator[] = { - set_onshot_function(FUNC_HOSTAGE_THANK_AND_RUN) + set_shotlist(FUNC_HOSTAGE_THANK_AND_RUN) if_stage_flag_eq(STAGEFLAG_DROPPED_DEVASTATOR, TRUE, /*goto*/ 0x2e) set_stage_flag(STAGEFLAG_DROPPED_DEVASTATOR) goto_next(0x08) // Other hostage already dropped Devastator label(0x2e) - set_function(CHR_SELF, FUNC_HOSTAGE_THANK_AND_RUN) + set_ailist(CHR_SELF, FUNC_HOSTAGE_THANK_AND_RUN) label(0x08) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) @@ -2060,8 +2060,8 @@ u8 func0427_drop_devastator[] = { goto_next(0x03) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) set_target_chr(CHR_COOP) @@ -2086,7 +2086,7 @@ u8 func0427_drop_devastator[] = { yield drop_concealed_items(CHR_SELF) play_cistaff_quip(BANK_3, CHANNEL_6) - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0x71) @@ -2111,8 +2111,8 @@ u8 func0427_drop_devastator[] = { label(0x08) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_holo_takers_dead[] = { @@ -2136,8 +2136,8 @@ u8 func100f_check_holo_takers_dead[] = { label(0x2e) set_stage_flag(STAGEFLAG_HOLO_TAKERS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_check_device_takers_dead[] = { @@ -2155,8 +2155,8 @@ u8 func1010_check_device_takers_dead[] = { label(0x2e) set_stage_flag(STAGEFLAG_DEVICE_TAKERS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_check_info_takers_dead[] = { @@ -2174,34 +2174,34 @@ u8 func1011_check_info_takers_dead[] = { label(0x2e) set_stage_flag(STAGEFLAG_INFO_TAKERS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042c_init_hostage_device_f[] = { set_morale(1) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_DEVICEROOM_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_DEVICEROOM_HOSTAGE) + endlist }; u8 func042d_init_hostage_device_m[] = { set_morale(6) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_DEVICEROOM_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_DEVICEROOM_HOSTAGE) + endlist }; u8 func042b_deviceroom_hostage[] = { - set_onshot_function(FUNC_DEVICEROOM_HOSTAGE) + set_shotlist(FUNC_DEVICEROOM_HOSTAGE) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) goto_next(0x12) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x12) set_target_chr(CHR_BOND) @@ -2212,7 +2212,7 @@ u8 func042b_deviceroom_hostage[] = { goto_next(0x10) label(0x2e) - animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x10) if_stage_flag_eq(STAGEFLAG_DEVICE_TAKERS_DEAD, TRUE, /*goto*/ 0x08) @@ -2223,18 +2223,18 @@ u8 func042b_deviceroom_hostage[] = { goto_first(0x12) label(0x08) - set_function(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) + endlist }; u8 func042f_init_taker_device_m[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_TAKER_DEVICE_M) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_DEVICE_M) + endlist }; u8 func042e_taker_device_m[] = { - set_onshot_function(FUNC_TAKER_DEVICE_M) + set_shotlist(FUNC_TAKER_DEVICE_M) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) @@ -2242,8 +2242,8 @@ u8 func042e_taker_device_m[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x08) @@ -2265,7 +2265,7 @@ u8 func042e_taker_device_m[] = { assign_sound(0x025b, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) restart_timer - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0xba) if_timer_gt(60, /*goto*/ 0xbb) @@ -2275,18 +2275,18 @@ u8 func042e_taker_device_m[] = { set_self_chrflag(CHRCFLAG_00000040) set_accuracy(50) set_target_chr(CHR_HOSTAGE_DEVICE_M) - set_function(CHR_SELF, FUNC_TAKER_ATTACK) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_ATTACK) + endlist }; u8 func0431_init_taker_device_f[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_TAKER_DEVICE_F) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_DEVICE_F) + endlist }; u8 func0430_taker_device_f[] = { - set_onshot_function(FUNC_TAKER_DEVICE_F) + set_shotlist(FUNC_TAKER_DEVICE_F) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) @@ -2294,8 +2294,8 @@ u8 func0430_taker_device_f[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x08) @@ -2312,7 +2312,7 @@ u8 func0430_taker_device_f[] = { set_squadron_alertness(100) set_self_flag_bankx(CHRFLAG1_00000020, BANK_1) restart_timer - animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0xbc) if_self_flag_bankx_eq(CHRFLAG1_00000020, FALSE, BANK_1, /*goto*/ 0x08) @@ -2328,12 +2328,12 @@ u8 func0430_taker_device_f[] = { set_self_chrflag(CHRCFLAG_00000040) set_accuracy(50) set_target_chr(CHR_HOSTAGE_DEVICE_F) - set_function(CHR_SELF, FUNC_TAKER_ATTACK) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_ATTACK) + endlist }; u8 func0432_taker_attack[] = { - set_onshot_function(FUNC_TAKER_ATTACK) + set_shotlist(FUNC_TAKER_ATTACK) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -2341,8 +2341,8 @@ u8 func0432_taker_attack[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x08) @@ -2372,38 +2372,38 @@ u8 func0432_taker_attack[] = { label(0x08) label(0x0f) - set_onshot_function(GFUNC_UNALERTED) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func0434_init_hostage_info_m[] = { set_morale(2) set_armor(10) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_INFOROOM_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INFOROOM_HOSTAGE) + endlist }; u8 func0435_init_hostage_info_f[] = { set_morale(8) set_armor(10) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_INFOROOM_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INFOROOM_HOSTAGE) + endlist }; u8 func0433_inforoom_hostage[] = { - set_onshot_function(FUNC_INFOROOM_HOSTAGE) + set_shotlist(FUNC_INFOROOM_HOSTAGE) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x04) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x08) @@ -2426,7 +2426,7 @@ u8 func0433_inforoom_hostage[] = { endloop(0x0a) label(0x12) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x10) if_stage_flag_eq(STAGEFLAG_INFO_TAKERS_DEAD, TRUE, /*goto*/ 0x0d) @@ -2443,17 +2443,17 @@ u8 func0433_inforoom_hostage[] = { label(0x2e) unset_self_flag_bankx(CHRFLAG0_00000004, BANK_0) - set_onshot_function(FUNC_INFOROOM_HOSTAGE) - set_return_function(CHR_SELF, FUNC_INFOROOM_HOSTAGE) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(FUNC_INFOROOM_HOSTAGE) + set_returnlist(CHR_SELF, FUNC_INFOROOM_HOSTAGE) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x0d) if_kill_count_gt(1, /*goto*/ 0x2e) - set_function(CHR_SELF, FUNC_INIT_DROP_DEVASTATOR) + set_ailist(CHR_SELF, FUNC_INIT_DROP_DEVASTATOR) label(0x2e) - set_function(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_SAVED_HOSTAGE) + endlist }; u8 func1012_info_room[] = { @@ -2489,18 +2489,18 @@ u8 func1012_info_room[] = { label(0x08) set_chr_flag_bankx(CHR_TAKER_INFO_F, CHRFLAG0_00002000, BANK_0) set_chr_flag_bankx(CHR_TAKER_INFO_M, CHRFLAG0_00002000, BANK_0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0437_init_taker_info_m[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_TAKER_INFO_M) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_INFO_M) + endlist }; u8 func0436_taker_info_m[] = { - set_onshot_function(FUNC_TAKER_INFO_M) + set_shotlist(FUNC_TAKER_INFO_M) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -2508,8 +2508,8 @@ u8 func0436_taker_info_m[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x08) @@ -2522,18 +2522,18 @@ u8 func0436_taker_info_m[] = { set_self_chrflag(CHRCFLAG_00000040) set_accuracy(50) set_target_chr(CHR_HOSTAGE_INFO_M) - set_function(CHR_SELF, FUNC_TAKER_ATTACK) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_ATTACK) + endlist }; u8 func0439_init_taker_info_f[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_TAKER_INFO_F) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_INFO_F) + endlist }; u8 func0438_taker_info_f[] = { - set_onshot_function(FUNC_TAKER_INFO_F) + set_shotlist(FUNC_TAKER_INFO_F) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -2541,8 +2541,8 @@ u8 func0438_taker_info_f[] = { // Dying label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x08) @@ -2555,8 +2555,8 @@ u8 func0438_taker_info_f[] = { set_self_chrflag(CHRCFLAG_00000040) set_accuracy(20) set_target_chr(CHR_HOSTAGE_INFO_F) - set_function(CHR_SELF, FUNC_TAKER_ATTACK) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER_ATTACK) + endlist }; u8 func1013_check_hostages_saved[] = { @@ -2635,8 +2635,8 @@ u8 func1013_check_hostages_saved[] = { set_stage_flag(STAGEFLAG_ENOUGH_HOSTAGES_SAVED) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_carrington_messages[] = { @@ -2915,15 +2915,15 @@ u8 func1014_carrington_messages[] = { label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x08) set_invincible(CHR_BOND) - set_function(CHR_SELF, 0x0418) + set_ailist(CHR_SELF, 0x0418) label(0xd9) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_firingrange_pc[] = { @@ -2939,7 +2939,7 @@ u8 func1015_firingrange_pc[] = { label(0x2f) message(CHR_BOND, 0x2222) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_FR_PC_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x08) play_sound(0x8116, -1) @@ -2959,8 +2959,8 @@ u8 func1015_firingrange_pc[] = { unset_object_flag_bank0(OBJ_RCP120, OBJECTFLAG0_00100000) unset_object_flag_bank0(OBJ_RCP120_GLASS, OBJECTFLAG0_INVINCIBLE) destroy_object(OBJ_RCP120_GLASS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define topspawner_logic(initfunc, clonefunc) \ @@ -2979,7 +2979,7 @@ u8 func1015_firingrange_pc[] = { reloop(0x04) \ \ label(0x0a) \ - set_function(CHR_SELF, clonefunc) \ + set_ailist(CHR_SELF, clonefunc) \ \ label(0x4f) \ unset_self_chrflag(CHRCFLAG_HIDDEN) \ @@ -2988,7 +2988,7 @@ u8 func1015_firingrange_pc[] = { \ label(0x4f) \ try_spawn_clone2(CHR_SELF, initfunc, 0x00000000, /*goto*/ 0x2e) \ - set_function(CHR_SELF, clonefunc) \ + set_ailist(CHR_SELF, clonefunc) \ \ label(0x2e) \ yield \ @@ -3011,38 +3011,38 @@ u8 func1015_firingrange_pc[] = { set_chr_team(CHR_SELF, TEAM_ENEMY) \ rebuild_teams \ rebuild_squadrons \ - set_function(CHR_SELF, clonefunc) + set_ailist(CHR_SELF, clonefunc) // Spawner at top of ramp at start u8 func040a_spawner4[] = { topspawner_logic(FUNC_INIT_CLONE4, FUNC_CLONE4) - endfunction + endlist }; u8 func040c_init_clone4[] = { inittopclone_logic(0x11, FUNC_CLONE4) - endfunction + endlist }; u8 func040b_clone4[] = { set_target_chr(CHR_BOND) try_run_to_target_chr(/*goto*/ 0x2e) label(0x2e) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; // Spawner at helipad u8 func040d_spawner5[] = { topspawner_logic(FUNC_INIT_CLONE5, FUNC_CLONE5) - endfunction + endlist }; u8 func040f_init_clone5[] = { inittopclone_logic(0x12, FUNC_CLONE5) - endfunction + endlist }; u8 func040e_clone5[] = { @@ -3055,9 +3055,9 @@ u8 func040e_clone5[] = { run_to_pad(0x0069) label(0x2e) - set_return_function(CHR_SELF, FUNC_CLONE5) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE5) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -3097,8 +3097,8 @@ u8 func1016_remove_spawners[] = { label(0x2e) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; // Spawner outside Jo's office @@ -3123,7 +3123,7 @@ u8 func0410_spawner6[] = { reloop(0x04) label(0x0a) - set_function(CHR_SELF, FUNC_CLONE6) + set_ailist(CHR_SELF, FUNC_CLONE6) label(0x4f) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) @@ -3131,26 +3131,26 @@ u8 func0410_spawner6[] = { label(0x4f) try_spawn_clone2(CHR_SELF, FUNC_INIT_CLONE6, 0x00000000, /*goto*/ 0x2e) - set_function(CHR_SELF, FUNC_CLONE6) + set_ailist(CHR_SELF, FUNC_CLONE6) label(0x2e) yield endloop(0x04) - endfunction + endlist }; u8 func0412_init_clone6[] = { inittopclone_logic(0x13, FUNC_CLONE6) - endfunction + endlist }; u8 func0411_clone6[] = { set_target_chr(CHR_BOND) try_run_to_target_chr(/*goto*/ 0x2e) label(0x2e) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func1022_skedar_shuttle[] = { @@ -3210,12 +3210,12 @@ u8 func1022_skedar_shuttle[] = { unset_chr_chrflag(CHR_BLONDE4, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_BLONDE5, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_BLONDE6, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_BLONDE1, FUNC_INIT_BLONDE) - set_function(CHR_BLONDE2, FUNC_INIT_BLONDE) - set_function(CHR_BLONDE3, FUNC_INIT_BLONDE) - set_function(CHR_BLONDE4, FUNC_INIT_BLONDE) - set_function(CHR_BLONDE5, FUNC_INIT_BLONDE) - set_function(CHR_BLONDE6, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE1, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE2, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE3, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE4, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE5, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE6, FUNC_INIT_BLONDE) beginloop(0x04) if_stage_flag_eq(STAGEFLAG_BOMB_EXPLODING_ON_GROUND, TRUE, /*goto*/ 0x2e) @@ -3253,7 +3253,7 @@ u8 func1022_skedar_shuttle[] = { label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Bomb deactivated label(0x0a) @@ -3292,8 +3292,8 @@ u8 func1022_skedar_shuttle[] = { mute_channel(CHANNEL_3) mute_channel(CHANNEL_4) destroy_object(OBJ_SKEDAR_SHUTTLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func043a_unused[] = { @@ -3308,7 +3308,7 @@ u8 func043a_unused[] = { beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 unregistered_function1[] = { @@ -3347,8 +3347,8 @@ u8 unregistered_function1[] = { label(0x2e) set_stage_flag(STAGEFLAG_TRIGGER_SHUTTLE_TAKEOFF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func043b_init_blonde[] = { @@ -3359,9 +3359,9 @@ u8 func043b_init_blonde[] = { set_armor(0) set_recovery_speed(0) set_shield(90) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func043c_init_cisolder[] = { @@ -3372,8 +3372,8 @@ u8 func043c_init_cisolder[] = { set_armor(90) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_DEFEND_PAD) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND_PAD) + endlist }; u8 func043d_unused[] = { @@ -3384,12 +3384,12 @@ u8 func043d_unused[] = { set_armor(90) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func043e_carrington[] = { - set_onshot_function(FUNC_CARRINGTON) + set_shotlist(FUNC_CARRINGTON) jog_to_pad(0x0142) beginloop(0x04) @@ -3402,7 +3402,7 @@ u8 func043e_carrington[] = { beginloop(0x0a) endloop(0x0a) - endfunction + endlist }; u8 func0429_skedar4[] = { @@ -3414,8 +3414,8 @@ u8 func0429_skedar4[] = { set_recovery_speed(0) set_shield(0) jog_to_pad(0x000c) - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - endfunction + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + endlist }; u8 func1018_hurt_carrington[] = { @@ -3432,16 +3432,16 @@ u8 func1018_hurt_carrington[] = { label(0x08) damage_chr(CHR_CARRINGTON, 18) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1019_setup_safeinfo[] = { label(0x08) unset_object_flag_bank0(OBJ_SAFEDOOR, OBJECTFLAG0_INVINCIBLE) unset_object_flag_bank0(OBJ_SAFEINFO, OBJECTFLAG0_INVINCIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101b_msg_autodefenses[] = { @@ -3460,8 +3460,8 @@ u8 func101b_msg_autodefenses[] = { yield speak(CHR_BOND, 0x2223, 0x73d8, CHANNEL_6, COLOR_09_BLUE) // "The autodefenses will really help me out." label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_msg_fosterworkingon[] = { @@ -3483,8 +3483,8 @@ u8 func101c_msg_fosterworkingon[] = { label(0x2e) speak(CHR_P1P2, 0x2224, 0x73d9, CHANNEL_6, COLOR_09_BLUE) // "So this is what Foster was working on." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_msg_countingonme[] = { @@ -3505,8 +3505,8 @@ u8 func101d_msg_countingonme[] = { label(0x2e) speak(CHR_BOND, 0x2225, 0x73da, CHANNEL_6, COLOR_09_BLUE) // "I'll have to go carefully... The hostages are coun..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3518,8 +3518,8 @@ u8 func101e_msg_wontknow[] = { label(0x2e) speak(CHR_BOND, 0x2226, 0x73db, CHANNEL_6, COLOR_09_BLUE) // "Well, at least I won't know if I'm doing anything ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_configure_cisoldiers[] = { @@ -3528,20 +3528,20 @@ u8 func101f_configure_cisoldiers[] = { endloop(0x04) label(0x2e) - set_function(CHR_JONATHAN, FUNC_INIT_JONATHAN) - set_function(0x15, FUNC_INIT_CISOLDIER) - set_function(0x16, FUNC_INIT_CISOLDIER) - set_function(0x17, FUNC_INIT_CISOLDIER) - set_function(0x18, FUNC_INIT_CISOLDIER) - set_function(0x19, FUNC_INIT_CISOLDIER) - set_function(0x1a, FUNC_INIT_CISOLDIER) - set_function(0x1b, FUNC_INIT_CISOLDIER) - set_function(0x1c, FUNC_INIT_CISOLDIER) - set_function(0x1d, FUNC_INIT_CISOLDIER) - set_function(0x1e, FUNC_INIT_CISOLDIER) - set_function(CHR_HANGARGUY, FUNC_INIT_CISOLDIER) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_JONATHAN, FUNC_INIT_JONATHAN) + set_ailist(0x15, FUNC_INIT_CISOLDIER) + set_ailist(0x16, FUNC_INIT_CISOLDIER) + set_ailist(0x17, FUNC_INIT_CISOLDIER) + set_ailist(0x18, FUNC_INIT_CISOLDIER) + set_ailist(0x19, FUNC_INIT_CISOLDIER) + set_ailist(0x1a, FUNC_INIT_CISOLDIER) + set_ailist(0x1b, FUNC_INIT_CISOLDIER) + set_ailist(0x1c, FUNC_INIT_CISOLDIER) + set_ailist(0x1d, FUNC_INIT_CISOLDIER) + set_ailist(0x1e, FUNC_INIT_CISOLDIER) + set_ailist(CHR_HANGARGUY, FUNC_INIT_CISOLDIER) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_trigger_spawning[] = { @@ -3559,8 +3559,8 @@ u8 func1020_trigger_spawning[] = { label(0x2e) set_stage_flag(STAGEFLAG_TRIGGER_SPAWNING) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042a_init_jonathan[] = { @@ -3569,8 +3569,8 @@ u8 func042a_init_jonathan[] = { set_chr_health(CHR_SELF, 40) set_armor(1200) set_recovery_speed(100) - set_function(CHR_SELF, FUNC_DEFEND_PAD) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND_PAD) + endlist }; u8 func1021_setup_jonathan[] = { @@ -3578,8 +3578,8 @@ u8 func1021_setup_jonathan[] = { if_eeprom_flag_is_set(EEPROMFLAG_DEFENSE_JON, /*goto*/ 0x08) remove_chr(CHR_JONATHAN) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1023_check_skeder_shuttle_destroyed[] = { @@ -3636,18 +3636,18 @@ u8 func1023_check_skeder_shuttle_destroyed[] = { label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_setup_lifts[] = { activate_lift(1, 0x41) activate_lift(2, 0x42) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1025_lift_door_sounds[] = { @@ -3674,7 +3674,7 @@ u8 func1025_lift_door_sounds[] = { label(0x08) endloop(0xe4) - endfunction + endlist }; u8 func100e_setup_firingrange_doors[] = { @@ -3688,8 +3688,8 @@ u8 func100e_setup_firingrange_doors[] = { label(0x2e) unset_object_flag_bank1(0x23, OBJECTFLAG1_20000000) unset_object_flag_bank1(0x24, OBJECTFLAG1_20000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1027_uplink[] = { @@ -3769,7 +3769,7 @@ u8 func1027_uplink[] = { endloop(0x14) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) reloop(0x04) // Connection broken @@ -3789,8 +3789,8 @@ u8 func1027_uplink[] = { endloop(0x04) label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1028_shuttle_immunity[] = { @@ -3810,15 +3810,15 @@ u8 func1028_shuttle_immunity[] = { endloop(0xe4) label(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1029_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_DEVASTATOR, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102a_setup_lighting[] = { @@ -3829,8 +3829,8 @@ u8 func102a_setup_lighting[] = { misc_command(0x0048, 0x06, 0x01) misc_command(0x0055, 0x06, 0x01) misc_command(0x0056, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102b_safedoor_immunity[] = { @@ -3843,7 +3843,7 @@ u8 func102b_safedoor_immunity[] = { label(0x2e) if_object_in_good_condition(OBJ_SAFEDOOR, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_chr_in_room(CHR_BOND, 0x00, 0x000c, /*goto*/ 0x2e) @@ -3872,8 +3872,8 @@ u8 func102b_safedoor_immunity[] = { // A and SA label(0x10) set_object_flag_bank0(OBJ_SAFEDOOR, OBJECTFLAG0_INVINCIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102c_door_flags[] = { @@ -3924,8 +3924,8 @@ u8 func102c_door_flags[] = { endloop(0xe4) label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function2[] = { @@ -3938,10 +3938,10 @@ u8 unregistered_function2[] = { endloop(0x0a) label(0x2e) - animation(0x02c3, -1, -1, 0x06, 0x00, 0x34, 4) + chr_do_animation(0x02c3, -1, -1, 0x06, 0x00, 0x34, 4) endloop(0x03) - endfunction + endlist }; u8 unregistered_function3[] = { @@ -3958,7 +3958,7 @@ u8 unregistered_function3[] = { damage_chr(CHR_TAKER_INFO_M, 18) endloop(0x03) - endfunction + endlist }; u8 func102d_firingrange_taker_invincibility[] = { @@ -3985,7 +3985,7 @@ u8 func102d_firingrange_taker_invincibility[] = { label(0x2e) endloop(0x03) - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuplee.c b/src/files/setup/setuplee.c index 607f4c38d..52b53906d 100644 --- a/src/files/setup/setuplee.c +++ b/src/files/setup/setuplee.c @@ -534,8 +534,8 @@ s32 path05[] = { u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { @@ -543,8 +543,8 @@ u8 func1400_setup_counterop[] = { set_object_flag_bank0(OBJ_HANGARLIFT_JO, OBJECTFLAG0_DEACTIVATED) yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1019_check_shields_lowered[] = { @@ -563,14 +563,14 @@ u8 func1019_check_shields_lowered[] = { label(0x2c) speak(CHR_BOND, 0x2611, 0x81a1, CHANNEL_6, COLOR_04_ORANGE) // "You've got to open the hangar doors so we can dock..." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) endloop(0x04) label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_check_hangar_doors_opened[] = { @@ -589,7 +589,7 @@ u8 func1004_check_hangar_doors_opened[] = { // Console destroyed message(CHR_BOND, 0x2630) // "Critical mission object destroyed." set_stage_flag(STAGEFLAG_HANGAR_DOOR_CONSOLE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Console healthy label(0x2d) @@ -646,8 +646,8 @@ u8 func1004_check_hangar_doors_opened[] = { label(0x08) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_elvis_wait_for_hangar_entry[] = { @@ -691,20 +691,20 @@ u8 func040d_elvis_wait_for_hangar_entry[] = { yield yield yield - set_function(CHR_SELF, FUNC_ELVIS_GIVE_AR34) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_GIVE_AR34) + endlist }; u8 func040e_elvis_give_ar34[] = { - set_onshot_function(FUNC_ELVIS_GIVE_AR34) + set_shotlist(FUNC_ELVIS_GIVE_AR34) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) stop_chr @@ -748,7 +748,7 @@ u8 func040e_elvis_give_ar34[] = { rebuild_squadrons set_stage_flag(STAGEFLAG_MET_ELVIS) speak(CHR_P1P2, 0x2613, 0x12e1, CHANNEL_6, COLOR_04_ORANGE) // "Good to see you, Joanna." - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0c) if_timer_gt(180, /*goto*/ 0x06) @@ -776,8 +776,8 @@ u8 func040e_elvis_give_ar34[] = { label(0x06) label(0x0f) yield - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW) + endlist }; /** @@ -787,8 +787,8 @@ u8 func040e_elvis_give_ar34[] = { */ u8 func0409_elvis_follow[] = { set_self_chrflag(CHRCFLAG_00000040) - set_onshot_function(FUNC_ELVIS_FOLLOW) - set_return_function(CHR_SELF, FUNC_ELVIS_FOLLOW) + set_shotlist(FUNC_ELVIS_FOLLOW) + set_returnlist(CHR_SELF, FUNC_ELVIS_FOLLOW) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) @@ -796,7 +796,7 @@ u8 func0409_elvis_follow[] = { // Dying label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -892,9 +892,9 @@ u8 func0409_elvis_follow[] = { label(0x66) say_quip(CHR_BOND, 0x28, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00) label(0x2c) - set_return_function(CHR_SELF, FUNC_ELVIS_FOLLOW) - set_onshot_function(FUNC_ELVIS_FOLLOW) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_ELVIS_FOLLOW) + set_shotlist(FUNC_ELVIS_FOLLOW) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // Elvis in nav room label(0xb5) @@ -906,7 +906,7 @@ u8 func0409_elvis_follow[] = { label(0x2c) restart_timer - animation(ANIM_OPERATE_0221, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x10) if_timer_gt(180, /*goto*/ 0x06) @@ -929,19 +929,19 @@ u8 func0409_elvis_follow[] = { // Elvis outside prebridgelift label(0xc4) - set_function(CHR_SELF, FUNC_INIT_ELVIS_OUTSIDE_PREBRIDGELIFT) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_ELVIS_OUTSIDE_PREBRIDGELIFT) + endlist }; u8 func041d_init_elvis_outside_prebridgelift[] = { - set_onshot_function(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) + set_shotlist(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) set_armor(600) - set_function(CHR_SELF, FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) + endlist }; u8 func041c_elvis_outside_prebridgelift[] = { - set_onshot_function(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) + set_shotlist(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) @@ -949,7 +949,7 @@ u8 func041c_elvis_outside_prebridgelift[] = { // Dying label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -974,14 +974,14 @@ u8 func041c_elvis_outside_prebridgelift[] = { label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_onshot_function(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) - set_return_function(CHR_SELF, FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) + set_returnlist(CHR_SELF, FUNC_ELVIS_OUTSIDE_PREBRIDGELIFT) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func040a_elvis_go_to_hangar_lift[] = { - set_onshot_function(FUNC_ELVIS_GO_TO_HANGAR_LIFT) + set_shotlist(FUNC_ELVIS_GO_TO_HANGAR_LIFT) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) @@ -989,7 +989,7 @@ u8 func040a_elvis_go_to_hangar_lift[] = { // Dying label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1014,7 +1014,7 @@ u8 func040a_elvis_go_to_hangar_lift[] = { // At player label(0x06) speak(CHR_BOND, 0x2616, 0x12e4, CHANNEL_6, COLOR_04_ORANGE) // "Time to head upwards. I'll take this lift; you tak..." - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) set_morale(50) beginloop(0x0c) @@ -1032,13 +1032,13 @@ u8 func040a_elvis_go_to_hangar_lift[] = { label(0x06) stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041b_elvis_at_bridge[] = { stop_chr - set_onshot_function(FUNC_ELVIS_AT_BRIDGE) + set_shotlist(FUNC_ELVIS_AT_BRIDGE) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) @@ -1046,7 +1046,7 @@ u8 func041b_elvis_at_bridge[] = { // Dying label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1089,10 +1089,10 @@ u8 func041b_elvis_at_bridge[] = { label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_onshot_function(FUNC_ELVIS_AT_BRIDGE) - set_return_function(CHR_SELF, FUNC_ELVIS_AT_BRIDGE) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_ELVIS_AT_BRIDGE) + set_returnlist(CHR_SELF, FUNC_ELVIS_AT_BRIDGE) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func1005_check_elvis_dead[] = { @@ -1105,8 +1105,8 @@ u8 func1005_check_elvis_dead[] = { label(0x2c) message(CHR_BOND, 0x260c) // "Elvis has been killed." set_stage_flag(STAGEFLAG_ELVIS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_init_skedar[] = { @@ -1121,13 +1121,13 @@ u8 func040f_init_skedar[] = { set_armor(190) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) // Dying or dead label(0x0d) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0410_wake_suspendedanim_skedar[] = { @@ -1137,7 +1137,7 @@ u8 func0410_wake_suspendedanim_skedar[] = { goto_next(0x06) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_accuracy(20) @@ -1150,9 +1150,9 @@ u8 func0410_wake_suspendedanim_skedar[] = { try_walk_to_target_chr(/*goto*/ 0x2c) label(0x2c) - set_onshot_function(GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - endfunction + set_shotlist(GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + endlist }; u8 func1006_wake_slayer_skedar[] = { @@ -1176,7 +1176,7 @@ u8 func1006_wake_slayer_skedar[] = { set_chr_team(CHR_SUSPENDEDANIM1, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SUSPENDEDANIM1, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) + set_ailist(CHR_SUSPENDEDANIM1, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) restart_timer beginloop(0x09) @@ -1192,7 +1192,7 @@ u8 func1006_wake_slayer_skedar[] = { if_chr_death_animation_finished(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) if_chr_dying(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) if_chr_unloaded(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) - set_function(CHR_SUSPENDEDANIM3, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) + set_ailist(CHR_SUSPENDEDANIM3, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) set_chr_team(CHR_SUSPENDEDANIM3, TEAM_ENEMY) rebuild_teams @@ -1218,18 +1218,18 @@ u8 func1006_wake_slayer_skedar[] = { unlock_door(0x16, 0x02) open_door(0x11) open_door(0x15) - set_function(CHR_SUSPENDEDANIM2, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) + set_ailist(CHR_SUSPENDEDANIM2, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) set_chr_team(CHR_SUSPENDEDANIM2, TEAM_ENEMY) rebuild_teams rebuild_squadrons // 4 - set_function(CHR_SUSPENDEDANIM4, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) + set_ailist(CHR_SUSPENDEDANIM4, FUNC_WAKE_SUSPENDEDANIM_SKEDAR) set_chr_team(CHR_SUSPENDEDANIM4, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_check_entered_slayer_area[] = { @@ -1250,8 +1250,8 @@ u8 func1007_check_entered_slayer_area[] = { label(0x06) set_stage_flag(STAGEFLAG_ENTERED_SLAYER_AREA) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_hangar_lifts[] = { @@ -1346,7 +1346,7 @@ u8 func1008_hangar_lifts[] = { if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) - set_function(CHR_ELVIS, GFUNC_STOP_AND_IDLE) + set_ailist(CHR_ELVIS, GFUNC_STOP_AND_IDLE) yield if_chr_y(CHR_ELVIS, 400, OPERATOR_LESS_THAN, /*goto*/ 0x06) goto_next(0x2c) @@ -1378,7 +1378,7 @@ u8 func1008_hangar_lifts[] = { if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW) + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW) label(0x2c) // Check Elvis actually rode the lift up, and if not then go into a loop @@ -1393,14 +1393,14 @@ u8 func1008_hangar_lifts[] = { // Handle case where Elvis is still in the hangar for some reason label(0x06) - set_function(CHR_ELVIS, FUNC_SET_CLOAKED) + set_ailist(CHR_ELVIS, FUNC_SET_CLOAKED) beginloop(0x6d) chr_move_to_pad(CHR_ELVIS, 0x0012, 0x01, /*goto*/ 0x2c) endloop(0x6d) label(0x2c) - set_function(CHR_ELVIS, FUNC_SET_UNCLOAKED) + set_ailist(CHR_ELVIS, FUNC_SET_UNCLOAKED) endloop(0x64) // Elvis is at top now @@ -1460,20 +1460,20 @@ u8 func1008_hangar_lifts[] = { label(0x2c) goto_first(0x64) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_init_knifeable_skedar[] = { set_armor(160) set_self_flag_bankx(CHRFLAG1_00080000, BANK_1) set_self_chrflag(CHRCFLAG_00040000) - set_function(CHR_SELF, FUNC_KNIFEABLE_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_KNIFEABLE_SKEDAR) + endlist }; u8 func0408_knifeable_skedar[] = { - set_onshot_function(FUNC_KNIFEABLE_SKEDAR) + set_shotlist(FUNC_KNIFEABLE_SKEDAR) if_just_injured(CHR_SELF, /*goto*/ 0x0c) label(0x08) yield @@ -1545,8 +1545,8 @@ u8 func0408_knifeable_skedar[] = { // Saw player or got injured label(0x0c) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // Arrived at cell - wait 20 seconds label(0x0d) @@ -1567,10 +1567,10 @@ u8 func0408_knifeable_skedar[] = { // Become idle label(0x2c) stop_chr - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1598,8 +1598,8 @@ u8 func1009_keep_door_open_in_intro[] = { label(0x06) set_chr_flag_bankx(CHR_KNIFEABLE_SKEDAR, CHRFLAG0_00002000, BANK_0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(pathid) \ @@ -1611,38 +1611,38 @@ u8 func1009_keep_door_open_in_intro[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) u8 func0401_start_path00[] = { init_path(0) - endfunction + endlist }; u8 func0402_start_path01[] = { init_path(1) - endfunction + endlist }; u8 func0403_start_path02[] = { init_path(2) - endfunction + endlist }; u8 func0404_start_path03[] = { init_path(3) - endfunction + endlist }; u8 func0405_start_path04[] = { init_path(4) - endfunction + endlist }; u8 func0406_start_path05[] = { init_path(5) - endfunction + endlist }; u8 func0412_hangarspawner[] = { @@ -1674,7 +1674,7 @@ u8 func0412_hangarspawner[] = { // Seen player, or kills done label(0x08) unset_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, FUNC_HANGARCLONE) + set_ailist(CHR_SELF, FUNC_HANGARCLONE) // chrflag3_00000008 was unset label(0x4d) @@ -1684,13 +1684,13 @@ u8 func0412_hangarspawner[] = { // Clone dead label(0x4d) try_spawn_clone2(CHR_SELF, FUNC_INIT_HANGARCLONE, 0x00000000, /*goto*/ 0x2c) - set_function(CHR_SELF, FUNC_HANGARCLONE) + set_ailist(CHR_SELF, FUNC_HANGARCLONE) label(0x2c) add_morale(1) yield endloop(0x04) - endfunction + endlist }; u8 func0413_init_hangarclone[] = { @@ -1702,28 +1702,28 @@ u8 func0413_init_hangarclone[] = { rebuild_squadrons try_inherit_properties(0x07, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_HANGARCLONE) - endfunction + set_ailist(CHR_SELF, FUNC_HANGARCLONE) + endlist }; u8 func0414_hangarclone[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE) run_to_pad(0x00b4) - set_return_function(CHR_SELF, FUNC_HANGARCLONE) + set_returnlist(CHR_SELF, FUNC_HANGARCLONE) beginloop(0x03) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x2c) endloop(0x03) label(0x2c) - set_onshot_function(FUNC_HANGARCLONE) - set_return_function(CHR_SELF, FUNC_HANGARCLONE) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_HANGARCLONE) + set_returnlist(CHR_SELF, FUNC_HANGARCLONE) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func0419_hangar_maian[] = { - set_onshot_function(FUNC_HANGAR_MAIAN) + set_shotlist(FUNC_HANGAR_MAIAN) set_self_chrflag(CHRCFLAG_NOAUTOAIM) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) @@ -1731,7 +1731,7 @@ u8 func0419_hangar_maian[] = { goto_next(0x06) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) @@ -1780,9 +1780,9 @@ u8 func0419_hangar_maian[] = { // Enemy detected label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_HANGAR_MAIAN) - set_onshot_function(FUNC_HANGAR_MAIAN) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_HANGAR_MAIAN) + set_shotlist(FUNC_HANGAR_MAIAN) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // Everything below here is unreachable label(0xb5) @@ -1794,7 +1794,7 @@ u8 func0419_hangar_maian[] = { label(0x2c) restart_timer - animation(ANIM_SNEEZE, 0, 193, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SNEEZE, 0, 193, 0x00, 0x10, CHR_SELF, 2) beginloop(0x10) if_timer_gt(180, /*goto*/ 0x06) @@ -1805,7 +1805,7 @@ u8 func0419_hangar_maian[] = { set_stage_flag(STAGEFLAG_NAVIGATION_ROOM_DONE) goto_first(0x03) - endfunction + endlist }; u8 func0418_init_hangar_maian[] = { @@ -1820,8 +1820,8 @@ u8 func0418_init_hangar_maian[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) set_armor(200) set_reaction_speed(100) - set_function(CHR_SELF, FUNC_HANGAR_MAIAN) - endfunction + set_ailist(CHR_SELF, FUNC_HANGAR_MAIAN) + endlist }; u8 func100a_check_hangar_kills_done[] = { @@ -1858,9 +1858,9 @@ u8 func100a_check_hangar_kills_done[] = { label(0x2c) set_stage_flag(STAGEFLAG_HANGAR_KILLS_DONE) - set_function(CHR_ELVIS, FUNC_ELVIS_GO_TO_HANGAR_LIFT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_ELVIS, FUNC_ELVIS_GO_TO_HANGAR_LIFT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_msg_getshieldsdown[] = { @@ -1887,8 +1887,8 @@ u8 func100b_msg_getshieldsdown[] = { label(0x06) speak(CHR_BOND, 0x2610, 0x81a0, CHANNEL_6, COLOR_04_ORANGE) // "Outside, Joanna. Get the shields down and we can h..." set_stage_flag(STAGEFLAG_SAID_GETSHIELDSDOWN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_engineroom[] = { @@ -1907,7 +1907,7 @@ u8 func100c_engineroom[] = { if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) if_chr_dying(CHR_ELVIS, /*goto*/ 0x2c) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x2c) - set_function(CHR_ELVIS, FUNC_ELVIS_RUN_FROM_ENGINEROOM) + set_ailist(CHR_ELVIS, FUNC_ELVIS_RUN_FROM_ENGINEROOM) play_x_music(CHANNEL_10, 10) speak(CHR_BOND, 0x262e, 0x73d7, CHANNEL_6, COLOR_04_ORANGE) // "We have to get out of here!" label(0x2c) @@ -1945,8 +1945,8 @@ u8 func100c_engineroom[] = { destroy_object(0x20) message(CHR_BOND, 0x2617) // "Engines have been disabled." set_stage_flag(STAGEFLAG_ENGINES_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2031,8 +2031,8 @@ u8 func100d_prebridgelift[] = { label(0x2c) goto_first(0x64) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_bridgelift[] = { @@ -2113,8 +2113,8 @@ u8 func100e_bridgelift[] = { label(0x2c) goto_first(0x64) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2170,7 +2170,7 @@ u8 func0415_bridgespawner[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) yield set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, FUNC_INIT_BRIDGESPAWNER_REVEAL) + set_ailist(CHR_SELF, FUNC_INIT_BRIDGESPAWNER_REVEAL) // chrflag3_00000008 was unset // 1 in 256 chance of spawning on any given frame (or script invocation?) @@ -2197,14 +2197,14 @@ u8 func0415_bridgespawner[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) yield set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, FUNC_INIT_BRIDGESPAWNER_REVEAL) + set_ailist(CHR_SELF, FUNC_INIT_BRIDGESPAWNER_REVEAL) label(0x2c) add_morale(1) yield goto_first(0x04) - endfunction + endlist }; u8 func0416_init_bridgeclone[] = { @@ -2233,8 +2233,8 @@ u8 func0416_init_bridgeclone[] = { label(0x06) set_armor(40) - set_function(CHR_SELF, FUNC_BRIDGECLONE) - endfunction + set_ailist(CHR_SELF, FUNC_BRIDGECLONE) + endlist }; /** @@ -2244,12 +2244,12 @@ u8 func0416_init_bridgeclone[] = { */ u8 func0417_init_spawner_reveal[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE) - set_function(CHR_SELF, FUNC_BRIDGECLONE) - endfunction + set_ailist(CHR_SELF, FUNC_BRIDGECLONE) + endlist }; u8 func041a_bridgeclone[] = { - set_onshot_function(FUNC_BRIDGECLONE) + set_shotlist(FUNC_BRIDGECLONE) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) if_chr_dying(CHR_SELF, /*goto*/ 0x2c) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2c) @@ -2257,8 +2257,8 @@ u8 func041a_bridgeclone[] = { // Dying label(0x2c) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -2372,8 +2372,8 @@ u8 func041a_bridgeclone[] = { goto_first(0xc2) label(0xb8) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_bridge_entry[] = { @@ -2408,7 +2408,7 @@ u8 func100f_bridge_entry[] = { label(0x06) set_stage_flag(STAGEFLAG_ELVIS_COMING_TO_BRIDGE) - set_function(CHR_ELVIS, GFUNC_STOP_AND_IDLE) + set_ailist(CHR_ELVIS, GFUNC_STOP_AND_IDLE) yield if_chr_y(CHR_ELVIS, 3500, OPERATOR_LESS_THAN, /*goto*/ 0x65) goto_next(0x2c) @@ -2419,7 +2419,7 @@ u8 func100f_bridge_entry[] = { endloop(0x65) label(0x2c) - set_function(CHR_ELVIS, FUNC_ELVIS_AT_BRIDGE) + set_ailist(CHR_ELVIS, FUNC_ELVIS_AT_BRIDGE) restart_timer // Wait another 11.66 seconds @@ -2429,8 +2429,8 @@ u8 func100f_bridge_entry[] = { label(0x06) set_stage_flag(STAGEFLAG_TRIGGER_BRIDGE_SPAWNING) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_check_bridge_captured[] = { @@ -2471,8 +2471,8 @@ u8 func1010_check_bridge_captured[] = { label(0x2c) message(CHR_BOND, 0x2619) // "Bridge has been captured." set_stage_flag(STAGEFLAG_BRIDGE_CAPTURED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_check_end_level[] = { @@ -2502,7 +2502,7 @@ u8 func1011_check_end_level[] = { // Both players dead label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Either buddy is alive label(0x06) @@ -2512,12 +2512,12 @@ u8 func1011_check_end_level[] = { // Mission complete set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) // Elvis dead label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_intro[] = { @@ -2529,17 +2529,17 @@ u8 func1003_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01c3, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01c3, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000) - animation(0x01c4, -1, -1, 0x06, 0x00, CHR_CASS, 4) + chr_do_animation(0x01c4, -1, -1, 0x06, 0x00, CHR_CASS, 4) set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000) - animation(0x01c5, -1, -1, 0x06, 0x00, CHR_INTRO_SKEDAR, 4) + chr_do_animation(0x01c5, -1, -1, 0x06, 0x00, CHR_INTRO_SKEDAR, 4) restart_timer set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) @@ -2754,29 +2754,29 @@ u8 func1003_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01c3, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01c3, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000) set_chr_chrflag(CHR_CASS, CHRCFLAG_00000001) - animation(0x01c4, -2, -1, 0x06, 0x00, CHR_CASS, 2) + chr_do_animation(0x01c4, -2, -1, 0x06, 0x00, CHR_CASS, 2) unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000) set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_00000001) - animation(0x01c5, -2, -1, 0x06, 0x00, CHR_INTRO_SKEDAR, 2) + chr_do_animation(0x01c5, -2, -1, 0x06, 0x00, CHR_INTRO_SKEDAR, 2) remove_chr(CHR_INTRO_SKEDAR) - set_function(CHR_SHY_SKEDAR, FUNC_SHY_SKEDAR_WAIT) + set_ailist(CHR_SHY_SKEDAR, FUNC_SHY_SKEDAR_WAIT) enter_firstperson yield chr_move_to_pad(CHR_CASS, 0x00df, 0x01, /*goto*/ 0x2c) label(0x2c) - set_function(CHR_CASS, FUNC_CASS) + set_ailist(CHR_CASS, FUNC_CASS) restart_default_music reset_ambience - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c01_outro[] = { @@ -2797,14 +2797,14 @@ u8 func0c01_outro[] = { set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x01e2, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x01e2, -1, -1, 0x06, 0x00, CHR_TARGET, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01e3, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x01e3, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) show_object(OBJ_OUTRO_SHUTTLE) set_object_flag_bank1(OBJ_OUTRO_SHUTTLE, OBJECTFLAG1_04000000) @@ -2912,8 +2912,8 @@ u8 func0c01_outro[] = { label(0xb0) mute_channel(CHANNEL_10) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_skedar(function) \ @@ -2923,30 +2923,30 @@ u8 func0c01_outro[] = { set_armor(190) \ set_recovery_speed(0) \ set_shield(0) \ - set_function(CHR_SELF, function) + set_ailist(CHR_SELF, function) u8 func041e_init_bridge1and2[] = { init_skedar(FUNC_BRIDGE_SKEDAR) - endfunction + endlist }; u8 func0425_init_shy_skedar[] = { init_skedar(GFUNC_IDLE) - endfunction + endlist }; u8 func0420_init_bridge3[] = { init_skedar(FUNC_BRIDGE_SKEDAR) - endfunction + endlist }; /** * Assigned to the 3 Skedar on the bridge. */ u8 func0421_bridge_skedar[] = { - set_onshot_function(FUNC_BRIDGE_SKEDAR) + set_shotlist(FUNC_BRIDGE_SKEDAR) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -2954,7 +2954,7 @@ u8 func0421_bridge_skedar[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x53) @@ -2963,8 +2963,8 @@ u8 func0421_bridge_skedar[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x2c) @@ -3091,7 +3091,7 @@ u8 func0421_bridge_skedar[] = { label(0x2c) goto_first(0xcc) - endfunction + endlist }; u8 func1013_msg_gottogetshieldsdown[] = { @@ -3108,8 +3108,8 @@ u8 func1013_msg_gottogetshieldsdown[] = { label(0x2c) speak(CHR_BOND, 0x261b, 0x73dc, CHANNEL_6, COLOR_09_BLUE) // "I've got to get those shields down to let Elvis in..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_msg_hangarbaydoors[] = { @@ -3131,8 +3131,8 @@ u8 func1014_msg_hangarbaydoors[] = { speak(CHR_BOND, 0x261c, 0x73dd, CHANNEL_6, COLOR_09_BLUE) // "Now only the hangar bay doors are in the way." label(0x09) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_msg_starmaps[] = { @@ -3143,8 +3143,8 @@ u8 func1015_msg_starmaps[] = { label(0x2c) speak(CHR_P1P2, 0x261d, 0x73de, CHANNEL_6, COLOR_09_BLUE) // "This machine contains the Skedar star maps." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_ifwecontrolthebridge[] = { @@ -3159,12 +3159,12 @@ u8 func1016_msg_ifwecontrolthebridge[] = { unset_chr_chrflag(CHR_BRIDGE2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_BRIDGE3, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) speak(CHR_P1P2, 0x261e, 0x73df, CHANNEL_6, COLOR_09_BLUE) // "If we control the bridge, then the ship is ours." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0422_cass[] = { - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) set_self_chrflag(CHRCFLAG_00040000) run_to_pad(0x01dd) @@ -3197,12 +3197,12 @@ u8 func0422_cass[] = { endloop(0xc2) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0423_shy_skedar[] = { - set_onshot_function(FUNC_INIT_SKEDAR) + set_shotlist(FUNC_INIT_SKEDAR) set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_00040000) set_target_chr(CHR_CASS) @@ -3265,14 +3265,14 @@ u8 func0423_shy_skedar[] = { label(0x2c) stop_chr - set_onshot_function(FUNC_INIT_SKEDAR) - set_return_function(CHR_SELF, FUNC_INIT_SKEDAR) - set_function(CHR_SELF, FUNC_INIT_SKEDAR) - endfunction + set_shotlist(FUNC_INIT_SKEDAR) + set_returnlist(CHR_SELF, FUNC_INIT_SKEDAR) + set_ailist(CHR_SELF, FUNC_INIT_SKEDAR) + endlist }; u8 func0423_shy_skedar_wait[] = { - set_onshot_function(FUNC_SHY_SKEDAR) + set_shotlist(FUNC_SHY_SKEDAR) set_target_chr(CHR_CASS) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) restart_timer @@ -3282,8 +3282,8 @@ u8 func0423_shy_skedar_wait[] = { endloop(0x08) label(0x2c) - set_function(CHR_SELF, FUNC_SHY_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_SHY_SKEDAR) + endlist }; u8 func141b_setup_lifts[] = { @@ -3293,8 +3293,8 @@ u8 func141b_setup_lifts[] = { activate_lift(5, 0x29) activate_lift(6, 0x2a) activate_lift(7, 0x2b) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3315,9 +3315,9 @@ u8 func1017_pa_skedar_alertness[] = { endloop(0x08) label(0x2c) - set_function(0x02, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x02, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_update_elvis_target_chr[] = { @@ -3339,8 +3339,8 @@ u8 func1012_update_elvis_target_chr[] = { set_chr_target_chr(CHR_ELVIS, CHR_BOND) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3350,7 +3350,7 @@ u8 func1012_update_elvis_target_chr[] = { u8 func1018_place_elvis_in_hangar[] = { label(0x04) if_difficulty_lt(DIFF_PA, /*goto*/ 0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // A and SA beginloop(0x03) @@ -3358,8 +3358,8 @@ u8 func1018_place_elvis_in_hangar[] = { endloop(0x03) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_hangar_shuttle[] = { @@ -3382,8 +3382,8 @@ u8 func1002_hangar_shuttle[] = { label(0x06) hide_object(OBJ_HANGAR_SHUTTLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_kill_maian[] = { @@ -3395,8 +3395,8 @@ u8 func101a_kill_maian[] = { damage_chr(CHR_MAIAN3, 18) yield damage_chr(CHR_MAIAN3, 18) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_lift_door_sounds[] = { @@ -3430,7 +3430,7 @@ u8 func101c_lift_door_sounds[] = { label(0x06) goto_first(0xc2) - endfunction + endlist }; u8 func101d_unlock_doors[] = { @@ -3448,8 +3448,8 @@ u8 func101d_unlock_doors[] = { // All difficulties label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_bridge_music[] = { @@ -3460,12 +3460,12 @@ u8 func101e_bridge_music[] = { label(0x2c) play_x_music(CHANNEL_10, 60) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_elvis_run_from_engineroom[] = { - set_onshot_function(FUNC_ELVIS_RUN_FROM_ENGINEROOM) + set_shotlist(FUNC_ELVIS_RUN_FROM_ENGINEROOM) run_to_pad(0x005c) beginloop(0x08) @@ -3474,8 +3474,8 @@ u8 func040c_elvis_run_from_engineroom[] = { endloop(0x08) label(0x2c) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW) + endlist }; u8 func101f_enable_bridge_skedar[] = { @@ -3519,16 +3519,16 @@ u8 func101f_enable_bridge_skedar[] = { show_chr(CHR_BRIDGE3) show_chr(CHR_BRIDGESPAWNER1) show_chr(CHR_BRIDGESPAWNER2) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_engine_hum_noise[] = { yield assign_sound(0x81a5, CHANNEL_0) play_sound_from_object(CHANNEL_0, 0x1b, 0x07d0, 0x0fa0) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_check_ammo_wasted[] = { @@ -3558,8 +3558,8 @@ u8 func1021_check_ammo_wasted[] = { // Shields disabled label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_setup_rtracker[] = { @@ -3567,14 +3567,14 @@ u8 func1022_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_MAULER1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_MAULER2, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040b_init_cass[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_set_bridge_skedar_invincible[] = { @@ -3584,8 +3584,8 @@ u8 func1024_set_bridge_skedar_invincible[] = { set_chr_chrflag(CHR_BRIDGE1, CHRCFLAG_UNEXPLODABLE) set_chr_chrflag(CHR_BRIDGE2, CHRCFLAG_UNEXPLODABLE) set_chr_chrflag(CHR_BRIDGE3, CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3600,15 +3600,15 @@ u8 unregistered_function1[] = { label(0x2c) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1423_setup_lighting[] = { yield misc_command(0x0000, 0x09, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1025_toggle_chrs[] = { @@ -3714,12 +3714,12 @@ u8 func1025_toggle_chrs[] = { yield show_chr(0x2c) yield - set_function(CHR_MAIAN1, FUNC_CLOAK_AND_REMOVE) - set_function(CHR_MAIAN2, FUNC_CLOAK_AND_REMOVE) - set_function(0x07, FUNC_CLOAK_AND_REMOVE) - set_function(0x08, FUNC_CLOAK_AND_REMOVE) - set_function(0x09, FUNC_CLOAK_AND_REMOVE) - set_function(0x0a, FUNC_CLOAK_AND_REMOVE) + set_ailist(CHR_MAIAN1, FUNC_CLOAK_AND_REMOVE) + set_ailist(CHR_MAIAN2, FUNC_CLOAK_AND_REMOVE) + set_ailist(0x07, FUNC_CLOAK_AND_REMOVE) + set_ailist(0x08, FUNC_CLOAK_AND_REMOVE) + set_ailist(0x09, FUNC_CLOAK_AND_REMOVE) + set_ailist(0x0a, FUNC_CLOAK_AND_REMOVE) rebuild_teams rebuild_squadrons @@ -3732,12 +3732,12 @@ u8 func1025_toggle_chrs[] = { endloop(0x09) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041f_cloak_and_remove[] = { - set_onshot_function(FUNC_CLOAK_AND_REMOVE) + set_shotlist(FUNC_CLOAK_AND_REMOVE) set_chr_cloaked(CHR_SELF, TRUE, FALSE) restart_timer @@ -3747,34 +3747,34 @@ u8 func041f_cloak_and_remove[] = { label(0x2c) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1026_hide_necklace[] = { yield if_difficulty_lt(DIFF_PA, /*goto*/ 0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // A and SA label(0x2c) hide_object(OBJ_NECKLACE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0427_set_cloaked[] = { stop_chr set_chr_cloaked(CHR_SELF, TRUE, TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0428_set_uncloaked[] = { stop_chr set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuplip.c b/src/files/setup/setuplip.c index 941330928..4526b4fec 100644 --- a/src/files/setup/setuplip.c +++ b/src/files/setup/setuplip.c @@ -852,8 +852,8 @@ u8 func1400_give_datauplinks[] = { set_chr_team(CHR_ANTI, TEAM_22) give_object_to_chr(OBJ_DATAUPLINK_BOND, CHR_BOND) give_object_to_chr(OBJ_DATAUPLINK_COOP, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1007_check_disguise_collected[] = { @@ -875,8 +875,8 @@ u8 func1007_check_disguise_collected[] = { label(0x2d) set_stage_flag(STAGEFLAG_USED_DISGUISE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1026_check_records_destroyed[] = { @@ -884,11 +884,11 @@ u8 func1026_check_records_destroyed[] = { if_object_in_good_condition(0x04, /*goto*/ 0x06) message(CHR_BOND, 0x2a0e) // "Research records destroyed." set_stage_flag(STAGEFLAG_RECORDS_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1003_uplink_doors[] = { @@ -940,7 +940,7 @@ u8 func1003_uplink_doors[] = { label(0x06) mute_channel(CHANNEL_5) if_object_in_good_condition(0x02, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) assign_sound(0x01c1, CHANNEL_5) @@ -965,7 +965,7 @@ u8 func1003_uplink_doors[] = { mute_channel(CHANNEL_6) endloop(0x04) - endfunction + endlist }; u8 func1004_uplink_lights[] = { @@ -1017,7 +1017,7 @@ u8 func1004_uplink_lights[] = { label(0x06) mute_channel(CHANNEL_5) if_object_in_good_condition(0x01, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) assign_sound(0x01c1, CHANNEL_5) @@ -1056,7 +1056,7 @@ u8 func1004_uplink_lights[] = { mute_channel(CHANNEL_6) endloop(0x04) - endfunction + endlist }; u8 func1005_uplink_autoguns[] = { @@ -1108,7 +1108,7 @@ u8 func1005_uplink_autoguns[] = { label(0x06) mute_channel(CHANNEL_5) if_object_in_good_condition(0x03, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) assign_sound(0x01c1, CHANNEL_5) control_sound_from_object(CHANNEL_5, 0x00, TRUE) @@ -1137,7 +1137,7 @@ u8 func1005_uplink_autoguns[] = { set_stage_flag(STAGEFLAG_AUTOGUN_VIRUS_DONE) endloop(0x04) - endfunction + endlist }; u8 func1006_check_lab_accessed[] = { @@ -1149,8 +1149,8 @@ u8 func1006_check_lab_accessed[] = { label(0x06) message(CHR_P1P2, 0x2a1d) // "Laboratory accessed successfully." set_stage_flag(STAGEFLAG_ENTERED_LAB) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(accuracy, health, recovery, pathid) \ @@ -1163,83 +1163,83 @@ u8 func1006_check_lab_accessed[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func0401_start_path00[] = { init_path(8, 50, 35, 0x00) - endfunction + endlist }; u8 func0402_start_path01[] = { init_path(8, 50, 35, 0x01) - endfunction + endlist }; u8 func0403_start_path02[] = { init_path(8, 50, 35, 0x02) - endfunction + endlist }; u8 func0404_start_path03[] = { init_path(8, 50, 35, 0x03) - endfunction + endlist }; u8 func0405_start_path04[] = { init_path(8, 50, 35, 0x04) - endfunction + endlist }; u8 func0406_start_path05[] = { init_path(8, 50, 35, 0x05) - endfunction + endlist }; u8 func0407_start_path06[] = { init_path(10, 80, 0, 0x06) - endfunction + endlist }; u8 func0408_start_path07[] = { init_path(10, 80, 0, 0x07) - endfunction + endlist }; u8 func0409_start_path08[] = { init_path(10, 80, 0, 0x08) - endfunction + endlist }; u8 func040a_start_path09[] = { init_path(10, 80, 0, 0x09) - endfunction + endlist }; u8 func040b_start_path10[] = { init_path(10, 80, 0, 0x0a) - endfunction + endlist }; u8 func040c_start_path11[] = { init_path(10, 80, 0, 0x0b) - endfunction + endlist }; u8 func040d_start_path12[] = { init_path(10, 80, 0, 0x0c) - endfunction + endlist }; u8 func040e_start_path13[] = { init_path(10, 80, 0, 0x0d) - endfunction + endlist }; u8 func040f_start_path14[] = { init_path(10, 80, 0, 0x0e) - endfunction + endlist }; u8 func1001_objectives_failed_msg[] = { @@ -1254,8 +1254,8 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(CHR_BIOTECH2, CHRCFLAG_04000000) set_chr_chrflag(CHR_LABTECH_DOORS2, CHRCFLAG_04000000) set_chr_chrflag(CHR_MECHANIC, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func0411_labtech_showers_agent[] = { @@ -1272,8 +1272,8 @@ u8 func0411_labtech_showers_agent[] = { endloop(0x64) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_init_labtech_showers[] = { @@ -1289,23 +1289,23 @@ u8 func0412_init_labtech_showers[] = { endloop(0x08) label(0x2e) - set_function(CHR_SELF, FUNC_LABTECH_AGENT) + set_ailist(CHR_SELF, FUNC_LABTECH_AGENT) // SA and PA label(0x06) - set_function(CHR_SELF, FUNC_LABTECH_SA_PA) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_SA_PA) + endlist }; u8 func0410_labtech_showers_sa_pa[] = { - set_onshot_function(FUNC_LABTECH_SA_PA) + set_shotlist(FUNC_LABTECH_SA_PA) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) set_stage_flag(STAGEFLAG_LABTECH_DEAD) restart_timer @@ -1315,8 +1315,8 @@ u8 func0410_labtech_showers_sa_pa[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -1461,8 +1461,8 @@ u8 func0410_labtech_showers_sa_pa[] = { endloop(0x6f) label(0x2d) - set_return_function(CHR_SELF, FUNC_LABTECH_SA_PA) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, FUNC_LABTECH_SA_PA) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) // Chasing Jo for over 10 seconds - do room check again label(0x06) @@ -1474,7 +1474,7 @@ u8 func0410_labtech_showers_sa_pa[] = { // Tech saw weapon label(0x53) - animation(ANIM_SURPRISED_0202, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x10, 0x10, CHR_SELF, 2) dprint 'T','A','L','K',' ','1','\n',0, speak(CHR_TARGET, 0x2a29, 0x8156, CHANNEL_4, COLOR_08_RED) // "Oh, my God - a gun!" restart_timer @@ -1512,8 +1512,8 @@ u8 func0410_labtech_showers_sa_pa[] = { beginloop(0x0c) endloop(0x0c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_disguise_timer[] = { @@ -1573,7 +1573,7 @@ u8 func1009_disguise_timer[] = { label(0x2d) stop_countdown_timer hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Timer expired label(0x06) @@ -1587,8 +1587,8 @@ u8 func1009_disguise_timer[] = { message(CHR_BOND, 0x2a2f) // "The enemy has discovered the disguise." set_stage_flag(STAGEFLAG_DISGUISE_UNCOVERED) hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_random_doors[] = { @@ -1666,7 +1666,7 @@ u8 func100a_random_doors[] = { close_door(0x0e) endloop(0x03) - endfunction + endlist }; u8 func0419_init_doorman[] = { @@ -1676,19 +1676,19 @@ u8 func0419_init_doorman[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_DOORMAN) - endfunction + set_ailist(CHR_SELF, FUNC_DOORMAN) + endlist }; u8 func0418_doorman[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x54) @@ -1697,8 +1697,8 @@ u8 func0418_doorman[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x2d) @@ -1709,7 +1709,7 @@ u8 func0418_doorman[] = { label(0x06) set_squadron_alertness(100) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Waiting for Jo to arrive label(0x2d) @@ -1838,14 +1838,14 @@ u8 func0418_doorman[] = { label(0x06) set_squadron_alertness(100) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x64) yield goto_first(0x64) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_doorman_dead[] = { @@ -1889,25 +1889,25 @@ u8 func100b_check_doorman_dead[] = { label(0x2d) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) endloop(0x04) - endfunction + endlist }; /** * The lab guy who stands in the room behind the doorman. */ u8 func041a_labtech_harrysmate[] = { - set_onshot_function(FUNC_LABTECH_HARRYSMATE) + set_shotlist(FUNC_LABTECH_HARRYSMATE) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x54) @@ -1916,8 +1916,8 @@ u8 func041a_labtech_harrysmate[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -1969,7 +1969,7 @@ u8 func041a_labtech_harrysmate[] = { speak(CHR_TARGET, 0x2a3a, 0x1abb, CHANNEL_4, COLOR_08_RED) // "Hey, that's not Harry. It's an intruder." set_squadron_alertness(120) restart_timer - animation(0x002e, 0, -1, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x002e, 0, -1, 0x18, 0x10, CHR_SELF, 2) beginloop(0x0a) if_timer_gt(120, /*goto*/ 0x06) @@ -1983,7 +1983,7 @@ u8 func041a_labtech_harrysmate[] = { endloop(0x0b) label(0x5a) - animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x0c) if_chr_stopped(/*goto*/ 0x06) @@ -1994,12 +1994,12 @@ u8 func041a_labtech_harrysmate[] = { try_draw_weapon(MODEL_CHRDRUGGUN, WEAPON_TRANQUILIZER, 0x10000000, /*goto*/ 0x06) label(0x06) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func041b_labtech_keycardguy[] = { - set_onshot_function(FUNC_LABTECH_KEYCARDGUY) + set_shotlist(FUNC_LABTECH_KEYCARDGUY) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -2007,7 +2007,7 @@ u8 func041b_labtech_keycardguy[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x54) @@ -2016,8 +2016,8 @@ u8 func041b_labtech_keycardguy[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x2d) @@ -2061,7 +2061,7 @@ u8 func041b_labtech_keycardguy[] = { label(0x2d) restart_timer - animation(ANIM_SURRENDER_002E, 0, 190, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 190, 0x10, 0x10, CHR_SELF, 2) beginloop(0x09) if_timer_gt(60, /*goto*/ 0x06) @@ -2073,7 +2073,7 @@ u8 func041b_labtech_keycardguy[] = { endloop(0x09) label(0x5a) - animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x0a) if_chr_stopped(/*goto*/ 0x06) @@ -2084,8 +2084,8 @@ u8 func041b_labtech_keycardguy[] = { try_draw_weapon(MODEL_CHRDRUGGUN, WEAPON_TRANQUILIZER, 0x10000000, /*goto*/ 0x06) label(0x06) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func100c_keycardguy_lights[] = { @@ -2097,8 +2097,8 @@ u8 func100c_keycardguy_lights[] = { label(0x2d) set_lights_state(0x0088, 0x01, 0x64, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100d_check_entered_lab[] = { @@ -2116,8 +2116,8 @@ u8 func100d_check_entered_lab[] = { label(0x06) set_stage_flag(STAGEFLAG_ENTERED_LAB) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_elvis_timer[] = { @@ -2142,13 +2142,13 @@ u8 func100e_elvis_timer[] = { hide_countdown_timer set_stage_flag(STAGEFLAG_ELVIS_DEAD) message(CHR_BOND, 0x2a40) // "Elvis has been killed." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) stop_countdown_timer hide_countdown_timer - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_end_level[] = { @@ -2185,17 +2185,17 @@ u8 func100f_check_end_level[] = { label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) if_timer_gt(280, /*goto*/ 0x5b) endloop(0x5c) label(0x5b) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_give_keycard[] = { @@ -2241,26 +2241,26 @@ u8 func1010_give_keycard[] = { label(0x2d) unset_object_flag_bank1(0x10, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0414_init_mechanic[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_MECHANIC) - endfunction + set_ailist(CHR_SELF, FUNC_MECHANIC) + endlist }; u8 func0413_mechanic[] = { - set_onshot_function(FUNC_MECHANIC) + set_shotlist(FUNC_MECHANIC) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) restart_timer @@ -2270,8 +2270,8 @@ u8 func0413_mechanic[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -2339,7 +2339,7 @@ u8 func0413_mechanic[] = { dprint 'T','A','L','K',' ','1','\n',0, speak(CHR_BOND, 0x2a41, 0x80fb, CHANNEL_4, COLOR_08_RED) // "Get the hell out of here!" restart_timer - animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, -1, 0x18, 0x10, CHR_SELF, 2) beginloop(0x64) if_timer_gt(120, /*goto*/ 0x2d) @@ -2355,7 +2355,7 @@ u8 func0413_mechanic[] = { label(0x06) label(0x0f) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x8a) if_chr_stopped(/*goto*/ 0x2d) @@ -2364,7 +2364,7 @@ u8 func0413_mechanic[] = { label(0x2d) goto_first(0x0f) - endfunction + endlist }; u8 func1011_unhide_warehouse_spawner[] = { @@ -2381,9 +2381,9 @@ u8 func1011_unhide_warehouse_spawner[] = { label(0x06) unset_chr_chrflag(0x44, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x44, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x44, FUNC_WAREHOUSE_SPAWNER) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x44, FUNC_WAREHOUSE_SPAWNER) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_warehouse_spawner[] = { @@ -2411,7 +2411,7 @@ u8 func0415_warehouse_spawner[] = { label(0x08) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x4e) dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, @@ -2429,8 +2429,8 @@ u8 func0415_warehouse_spawner[] = { yield endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0417_warehouse_clone[] = { @@ -2438,9 +2438,9 @@ u8 func0417_warehouse_clone[] = { set_alertness(100) try_run_to_target_chr(/*goto*/ 0x2d) label(0x2d) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1013_check_chamber_switch_destroyed[] = { @@ -2451,7 +2451,7 @@ u8 func1013_check_chamber_switch_destroyed[] = { if_stage_flag_eq(STAGEFLAG_CHAMBER1_RAISED, TRUE, /*goto*/ 0x2d) message(CHR_BOND, 0x2a44) // "Mission critical equipment destroyed." set_stage_flag(STAGEFLAG_CHAMBER_SWITCH_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) reloop(0x04) @@ -2460,8 +2460,8 @@ u8 func1013_check_chamber_switch_destroyed[] = { endloop(0x04) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_check_crate_destroyed[] = { @@ -2482,7 +2482,7 @@ u8 func1014_check_crate_destroyed[] = { yield yield if_object_in_good_condition(OBJ_WALL, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) message(CHR_BOND, 0x2a44) // "Mission critical equipment destroyed." @@ -2498,12 +2498,12 @@ u8 func1014_check_crate_destroyed[] = { label(0x2e) unset_stage_flag(STAGEFLAG_CRATE_DESTROYED) message(CHR_BOND, 0x2a59) // "Alternative entrance to medlabs created." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) endloop(0x04) - endfunction + endlist }; /** @@ -2512,8 +2512,8 @@ u8 func1014_check_crate_destroyed[] = { u8 func041c_unused_041c[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2522,8 +2522,8 @@ u8 func041c_unused_041c[] = { u8 func041d_unused_041d[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2539,8 +2539,8 @@ u8 func041e_unused_041e[] = { set_shield(0) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_check_undisguised[] = { @@ -2556,12 +2556,12 @@ u8 func1016_check_undisguised[] = { label(0x06) unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISED) unset_chr_hiddenflag(CHR_COOP, CHRHFLAG_DISGUISED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041f_labtech_lights[] = { - set_onshot_function(FUNC_LABTECH_LIGHTS) + set_shotlist(FUNC_LABTECH_LIGHTS) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -2576,8 +2576,8 @@ u8 func041f_labtech_lights[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -2603,15 +2603,15 @@ u8 func041f_labtech_lights[] = { call_rng if_rand_lt(86, /*goto*/ 0x69) if_rand_lt(172, /*goto*/ 0x6a) - animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x69) - animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x6a) - animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, -1, -1, 0x14, 0x01, CHR_SELF, 2) goto_next(0x04) beginloop(0x04) @@ -2694,8 +2694,8 @@ u8 func041f_labtech_lights[] = { label(0x2d) set_self_flag_bankx(CHRFLAG0_00000004, BANK_0) - set_return_function(CHR_SELF, FUNC_LABTECH_LIGHTS) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, FUNC_LABTECH_LIGHTS) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x0c) walk_to_pad(0x020d) @@ -2728,15 +2728,15 @@ u8 func041f_labtech_lights[] = { call_rng if_rand_lt(86, /*goto*/ 0x64) if_rand_lt(172, /*goto*/ 0x66) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x0e) label(0x64) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x0e) label(0x66) - animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x0e) chr_toggle_p1p2(CHR_SELF) @@ -2758,7 +2758,7 @@ u8 func041f_labtech_lights[] = { label(0x0f) speak(CHR_TARGET, 0x2a54, 0x8124, CHANNEL_4, COLOR_08_RED) // "Holy..." set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - animation(ANIM_SURPRISED_0202, -1, -1, 0x14, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, -1, -1, 0x14, 0x0a, CHR_SELF, 2) restart_timer beginloop(0x10) @@ -2769,18 +2769,18 @@ u8 func041f_labtech_lights[] = { set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) goto_first(0x53) - endfunction + endlist }; u8 func0421_init_labtech_doors[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_LABTECH_DOORS) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_DOORS) + endlist }; u8 func0420_labtech_doors[] = { set_self_chrflag(CHRCFLAG_00000080) - set_onshot_function(FUNC_LABTECH_DOORS) + set_shotlist(FUNC_LABTECH_DOORS) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -2788,8 +2788,8 @@ u8 func0420_labtech_doors[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -2810,15 +2810,15 @@ u8 func0420_labtech_doors[] = { endloop(0x55) label(0x5e) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x6f) label(0x64) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x6f) label(0x66) - animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) label(0x6f) beginloop(0x04) @@ -2924,7 +2924,7 @@ u8 func0420_labtech_doors[] = { endloop(0x70) label(0x2d) - animation(ANIM_OPERATE_0221, -1, 120, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, 120, 0x10, 0x01, CHR_SELF, 2) restart_timer beginloop(0x71) @@ -2955,7 +2955,7 @@ u8 func0420_labtech_doors[] = { label(0x06) dprint 'F','L','A','G',' ','S','E','T','\n',0, label(0x10) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x77) if_chr_stopped(/*goto*/ 0x2d) @@ -2964,7 +2964,7 @@ u8 func0420_labtech_doors[] = { label(0x2d) goto_first(0x10) - endfunction + endlist }; u8 func1017_activate_autogun[] = { @@ -2981,24 +2981,24 @@ u8 func1017_activate_autogun[] = { label(0x2d) unset_object_flag_bank0(OBJ_AUTOGUN, OBJECTFLAG0_DEACTIVATED) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0423_init_labtech_records[] = { set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_LABTECH_RECORDS) - endfunction + set_ailist(CHR_SELF, FUNC_LABTECH_RECORDS) + endlist }; u8 func0422_labtech_records[] = { - set_onshot_function(FUNC_LABTECH_RECORDS) + set_shotlist(FUNC_LABTECH_RECORDS) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer label(0x54) yield @@ -3007,8 +3007,8 @@ u8 func0422_labtech_records[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_just_injured(CHR_SELF, /*goto*/ 0x06) goto_next(0x5e) @@ -3035,28 +3035,28 @@ u8 func0422_labtech_records[] = { if_rand_lt(160, /*goto*/ 0x6a) if_rand_lt(192, /*goto*/ 0x6b) if_rand_lt(224, /*goto*/ 0x6c) - animation(0x0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(0x0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x64) - animation(0x0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(0x0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x66) - animation(0x0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(0x0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x68) - animation(0x0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x69) - animation(0x0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x6a) - animation(0x0223, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x0223, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x6b) - animation(0x023a, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x023a, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x04) label(0x6c) - animation(0x023b, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x023b, -1, -1, 0x11, 0x01, CHR_SELF, 2) label(0x04) yield if_chr_idle(/*goto*/ 0x2d) @@ -3096,7 +3096,7 @@ u8 func0422_labtech_records[] = { if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d) set_squadron_alertness(100) speak(CHR_TARGET, 0x2a57, 0x1aa5, CHANNEL_4, COLOR_08_RED) // "Imposter!" - animation(0x0202, -1, -1, 0x14, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0202, -1, -1, 0x14, 0x0a, CHR_SELF, 2) restart_timer label(0x79) yield @@ -3117,7 +3117,7 @@ u8 func0422_labtech_records[] = { label(0x06) dprint 'F','L','A','G',' ','S','E','T','\n',0, label(0x10) - animation(0x0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(0x0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) label(0x0e) yield if_chr_stopped(/*goto*/ 0x2d) @@ -3126,7 +3126,7 @@ u8 func0422_labtech_records[] = { label(0x2d) goto_first(0x10) - endfunction + endlist }; /** @@ -3142,8 +3142,8 @@ u8 func1018_disable_chambers[] = { set_object_flag_bank0(OBJ_CHAMBER6, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(OBJ_CHAMBER7, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(OBJ_CHAMBER8, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; // This macro is here is reduce the amount of duplicate code. However, each @@ -3250,7 +3250,7 @@ u8 func1019_chamber1[] = { label(0x06) yield unset_chr_chrflag(CHR_ALIEN, CHRCFLAG_HIDDEN) - set_function(CHR_ALIEN, FUNC_CHECK_LOOKING_AT_ALIEN) + set_ailist(CHR_ALIEN, FUNC_CHECK_LOOKING_AT_ALIEN) label(0x06) set_object_flag_bank0(OBJ_CHAMBER1, OBJECTFLAG0_DEACTIVATED) reloop(0x04) @@ -3279,7 +3279,7 @@ u8 func1019_chamber1[] = { control_sound_from_object(CHANNEL_0, OBJ_CHAMBER1, TRUE) set_object_flag_bank0(OBJ_CHAMBER1, OBJECTFLAG0_DEACTIVATED) endloop(0x04) - endfunction + endlist }; u8 func101a_chamber2[] = { @@ -3339,32 +3339,32 @@ u8 func101a_chamber2[] = { control_sound_from_object(CHANNEL_0, OBJ_CHAMBER2, TRUE) set_object_flag_bank0(OBJ_CHAMBER2, OBJECTFLAG0_DEACTIVATED) endloop(0x04) - endfunction + endlist }; u8 func101b_chamber3[] = { chamber_logic(OBJ_CHAMBER3_SWITCH, OBJ_CHAMBER3, STAGEFLAG_CHAMBER3_RAISED) - endfunction + endlist }; u8 func101c_chamber4[] = { chamber_logic(OBJ_CHAMBER4_SWITCH, OBJ_CHAMBER4, STAGEFLAG_CHAMBER4_RAISED) - endfunction + endlist }; u8 func101d_chamber5[] = { chamber_logic(OBJ_CHAMBER5_SWITCH, OBJ_CHAMBER5, STAGEFLAG_CHAMBER5_RAISED) - endfunction + endlist }; u8 func101e_chamber6[] = { chamber_logic(OBJ_CHAMBER6_SWITCH, OBJ_CHAMBER6, STAGEFLAG_CHAMBER6_RAISED) - endfunction + endlist }; u8 func101f_chamber7[] = { chamber_logic(OBJ_CHAMBER7_SWITCH, OBJ_CHAMBER7, STAGEFLAG_CHAMBER7_RAISED) - endfunction + endlist }; u8 func1020_chamber8[] = { @@ -3427,14 +3427,14 @@ u8 func1020_chamber8[] = { control_sound_from_object(CHANNEL_0, OBJ_CHAMBER8, TRUE) set_object_flag_bank0(OBJ_CHAMBER8, OBJECTFLAG0_DEACTIVATED) endloop(0x04) - endfunction + endlist }; u8 func0424_alien[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, FUNC_CHECK_LOOKING_AT_ALIEN) - endfunction + set_ailist(CHR_SELF, FUNC_CHECK_LOOKING_AT_ALIEN) + endlist }; /** @@ -3444,8 +3444,8 @@ u8 func0424_alien[] = { u8 func0425_hiddenguy[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0426_check_looking_at_alien[] = { @@ -3481,7 +3481,7 @@ u8 func0426_check_looking_at_alien[] = { set_stage_flag(STAGEFLAG_LOOKING_AT_CHAMBER) endloop(0x04) - endfunction + endlist }; u8 func1021_xray_scanning[] = { @@ -3508,13 +3508,13 @@ u8 func1021_xray_scanning[] = { label(0x06) message(CHR_P1P2, 0x2a4b) // "Target ID confirmed - XT origin." set_stage_flag(STAGEFLAG_XRAY_DONE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) message(CHR_P1P2, 0x2a4c) // "Scanner lock lost." endloop(0x04) - endfunction + endlist }; /** @@ -3561,7 +3561,7 @@ u8 unregistered_function1[] = { reloop(0x04) label(0x2d) - try_spawn_chr(BODY_DDSHOCK, HEAD_DDSHOCK, 0x0101, 0x0427, 0x00000200, /*goto*/ 0x06) + try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_DDSHOCK, 0x0101, 0x0427, 0x00000200, /*goto*/ 0x06) goto_next(0x2d) label(0x06) @@ -3571,7 +3571,7 @@ u8 unregistered_function1[] = { label(0x2d) endloop(0x04) - endfunction + endlist }; /** @@ -3602,12 +3602,12 @@ u8 func0427_shock_clone[] = { if_chr_in_room(CHR_P1P2, 0x00, 0x0108, /*goto*/ 0x06) if_chr_in_room(CHR_P1P2, 0x00, 0x0109, /*goto*/ 0x06) run_to_pad(0x0184) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x06) run_to_pad(0x013b) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1023_setup_door_locks[] = { @@ -3615,13 +3615,13 @@ u8 func1023_setup_door_locks[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x09) // PA - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Agent - lock big door at bottom of ramp near showers label(0x06) lock_door(0x44, 0x80) lock_door(0x45, 0x80) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA - unlock the small shower doors label(0x09) @@ -3629,8 +3629,8 @@ u8 func1023_setup_door_locks[] = { unlock_door(0x2c, 0x80) unlock_door(0x2d, 0x80) unlock_door(0x2e, 0x80) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c01_outro[] = { @@ -3639,25 +3639,25 @@ u8 func0c01_outro[] = { set_music_track(MUSIC_RESCUE_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) - set_function(CHR_BIOTECH1, GFUNC_IDLE) - set_function(CHR_BIOTECH2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_BIOTECH1, GFUNC_IDLE) + set_ailist(CHR_BIOTECH2, GFUNC_IDLE) set_invincible(CHR_BOND) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0199, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0199, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_chrflag(CHR_BIOTECH1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_BIOTECH1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_BIOTECH1, CHRHFLAG_00020000) - animation(0x019a, -1, -1, 0x06, 0x00, CHR_BIOTECH1, 4) + chr_do_animation(0x019a, -1, -1, 0x06, 0x00, CHR_BIOTECH1, 4) set_chr_chrflag(CHR_BIOTECH2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_BIOTECH2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_BIOTECH2, CHRHFLAG_00020000) - animation(0x019b, -1, -1, 0x06, 0x00, CHR_BIOTECH2, 4) + chr_do_animation(0x019b, -1, -1, 0x06, 0x00, CHR_BIOTECH2, 4) set_object_flag_bank1(0x2f, OBJECTFLAG1_04000000) set_object_flag_bank2(0x2f, OBJECTFLAG2_00000010) @@ -3736,8 +3736,8 @@ u8 func0c01_outro[] = { restart_default_music reset_ambience end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -3749,17 +3749,17 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01c8, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01c8, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000) - animation(0x01c7, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) + chr_do_animation(0x01c7, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) set_chr_chrflag(CHR_INTRO_DEAD_GUARD, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_INTRO_DEAD_GUARD, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_INTRO_DEAD_GUARD, CHRHFLAG_00020000) - animation(0x01c9, -1, -1, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 4) + chr_do_animation(0x01c9, -1, -1, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 4) set_object_flag_bank1(OBJ_CRATE, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_CRATE, OBJECTFLAG2_00000010) @@ -3902,7 +3902,7 @@ u8 func1002_intro[] = { control_sound_from_object(CHANNEL_1, OBJ_CRATE, TRUE) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01c8, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01c8, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) @@ -3910,7 +3910,7 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_INTRO_DEAD_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_chrflag(CHR_INTRO_DEAD_GUARD, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_hiddenflag(CHR_INTRO_DEAD_GUARD, CHRHFLAG_00020000) - animation(0x01c9, -2, -1, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 2) + chr_do_animation(0x01c9, -2, -1, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 2) mute_channel(CHANNEL_10) unset_object_flag_bank1(OBJ_CRATE, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_CRATE, OBJECTFLAG2_00000010) @@ -3922,12 +3922,12 @@ u8 func1002_intro[] = { enter_firstperson yield set_chr_chrflag(CHR_INTRO_DEAD_GUARD, CHRCFLAG_00010000) - animation(0x01c9, 2, 3, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 2) - set_function(CHR_INTRO_DEAD_GUARD, GFUNC_IDLE) + chr_do_animation(0x01c9, 2, 3, 0x06, 0x00, CHR_INTRO_DEAD_GUARD, 2) + set_ailist(CHR_INTRO_DEAD_GUARD, GFUNC_IDLE) yield kill(CHR_INTRO_DEAD_GUARD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_noop[] = { @@ -3936,8 +3936,8 @@ u8 func1024_noop[] = { endloop(0x04) label(0x03) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3977,8 +3977,8 @@ u8 func1025_toggle_guards[] = { unset_chr_chrflag(0x34, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x33, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x34, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x33, FUNC_BIOTECH_GUARD_ALERTED) - set_function(0x34, FUNC_BIOTECH_GUARD_ALERTED) + set_ailist(0x33, FUNC_BIOTECH_GUARD_ALERTED) + set_ailist(0x34, FUNC_BIOTECH_GUARD_ALERTED) unset_chr_chrflag(0x37, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x2c, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x2d, CHRCFLAG_HIDDEN) @@ -3987,10 +3987,10 @@ u8 func1025_toggle_guards[] = { unset_chr_chrflag(0x2c, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x2d, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x2e, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x37, FUNC_SUPERDRAGON_GUARD) - set_function(0x2c, FUNC_SUPERDRAGON_GUARD) - set_function(0x2d, FUNC_SUPERDRAGON_GUARD) - set_function(0x2e, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x37, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x2c, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x2d, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x2e, FUNC_SUPERDRAGON_GUARD) unset_chr_chrflag(0x2f, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x30, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x31, CHRCFLAG_HIDDEN) @@ -3999,12 +3999,12 @@ u8 func1025_toggle_guards[] = { unset_chr_chrflag(0x30, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x31, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x32, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x2f, FUNC_BIOTECH_GUARD) - set_function(0x30, FUNC_SUPERDRAGON_GUARD) - set_function(0x31, FUNC_SUPERDRAGON_GUARD) - set_function(0x32, FUNC_SUPERDRAGON_GUARD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x2f, FUNC_BIOTECH_GUARD) + set_ailist(0x30, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x31, FUNC_SUPERDRAGON_GUARD) + set_ailist(0x32, FUNC_SUPERDRAGON_GUARD) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0429_spawn_while_xraying[] = { @@ -4067,8 +4067,8 @@ u8 func0429_spawn_while_xraying[] = { endloop(0x04) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042a_init_xray_clone[] = { @@ -4078,14 +4078,14 @@ u8 func042a_init_xray_clone[] = { rebuild_squadrons try_inherit_properties(0x47, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, 0x042b) - endfunction + set_ailist(CHR_SELF, 0x042b) + endlist }; u8 func042b_xray_clone[] = { set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func042c_dragon_guard[] = { @@ -4096,8 +4096,8 @@ u8 func042c_dragon_guard[] = { set_armor(0) set_recovery_speed(35) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func042d_superdragon_guard[] = { @@ -4108,8 +4108,8 @@ u8 func042d_superdragon_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func042e_biotech_guard[] = { @@ -4120,8 +4120,8 @@ u8 func042e_biotech_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func042e_biotech_guard_alerted[] = { @@ -4133,16 +4133,16 @@ u8 func042e_biotech_guard_alerted[] = { set_recovery_speed(0) set_shield(0) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func142d_start_lifts[] = { activate_lift(1, 0x35) activate_lift(4, 0x38) activate_lift(5, 0x39) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1027_check_disguise_worn[] = { @@ -4152,94 +4152,94 @@ u8 func1027_check_disguise_worn[] = { label(0x2d) message(CHR_BOND, 0x2a4d) // "Disguise has been worn." - set_return_function(0x00, 0x0401) - set_return_function(0x01, 0x0402) - set_return_function(0x02, 0x0403) - set_return_function(0x03, 0x0404) - set_return_function(0x04, 0x0405) - set_return_function(0x05, FUNC_DRAGON_GUARD) - set_return_function(0x06, FUNC_DRAGON_GUARD) - set_return_function(0x07, FUNC_DRAGON_GUARD) - set_return_function(0x08, FUNC_DRAGON_GUARD) - set_return_function(0x09, FUNC_DRAGON_GUARD) - set_return_function(0x0a, FUNC_DRAGON_GUARD) - set_return_function(0x0b, FUNC_DRAGON_GUARD) - set_return_function(0x0c, 0x0406) - set_return_function(0x0d, 0x0406) - set_return_function(0x0e, 0x0406) - set_return_function(0x0f, 0x0407) - set_return_function(0x10, 0x0408) - set_return_function(0x11, FUNC_DRAGON_GUARD) - set_return_function(0x27, FUNC_DRAGON_GUARD) - set_return_function(0x28, FUNC_DRAGON_GUARD) - set_return_function(0x12, FUNC_DRAGON_GUARD) - set_return_function(0x13, FUNC_DRAGON_GUARD) - set_return_function(0x14, 0x0409) - set_return_function(0x15, 0x040a) - set_return_function(0x16, FUNC_DRAGON_GUARD) - set_return_function(0x17, FUNC_DRAGON_GUARD) - set_return_function(0x18, FUNC_DRAGON_GUARD) - set_return_function(0x1e, FUNC_DRAGON_GUARD) - set_return_function(0x19, FUNC_DRAGON_GUARD) - set_return_function(0x1a, FUNC_DRAGON_GUARD) - set_return_function(0x1d, FUNC_DRAGON_GUARD) - set_return_function(0x1b, 0x040b) - set_return_function(0x1c, 0x040c) - set_return_function(0x1f, FUNC_DRAGON_GUARD) - set_return_function(0x20, FUNC_DRAGON_GUARD) - set_return_function(0x21, FUNC_DRAGON_GUARD) - set_return_function(0x22, FUNC_DRAGON_GUARD) - set_function(0x00, FUNC_BECOME_UNAWARE) - set_function(0x01, FUNC_BECOME_UNAWARE) - set_function(0x02, FUNC_BECOME_UNAWARE) - set_function(0x03, FUNC_BECOME_UNAWARE) - set_function(0x04, FUNC_BECOME_UNAWARE) - set_function(0x05, FUNC_BECOME_UNAWARE) - set_function(0x06, FUNC_BECOME_UNAWARE) - set_function(0x07, FUNC_BECOME_UNAWARE) - set_function(0x08, FUNC_BECOME_UNAWARE) - set_function(0x09, FUNC_BECOME_UNAWARE) - set_function(0x0a, FUNC_BECOME_UNAWARE) - set_function(0x0b, FUNC_BECOME_UNAWARE) - set_function(0x0c, FUNC_BECOME_UNAWARE) - set_function(0x0d, FUNC_BECOME_UNAWARE) - set_function(0x0e, FUNC_BECOME_UNAWARE) - set_function(0x0f, FUNC_BECOME_UNAWARE) - set_function(0x10, FUNC_BECOME_UNAWARE) - set_function(0x11, FUNC_BECOME_UNAWARE) - set_function(0x27, FUNC_BECOME_UNAWARE) - set_function(0x28, FUNC_BECOME_UNAWARE) - set_function(0x12, FUNC_BECOME_UNAWARE) - set_function(0x13, FUNC_BECOME_UNAWARE) - set_function(0x14, FUNC_BECOME_UNAWARE) - set_function(0x15, FUNC_BECOME_UNAWARE) - set_function(0x16, FUNC_BECOME_UNAWARE) - set_function(0x17, FUNC_BECOME_UNAWARE) - set_function(0x18, FUNC_BECOME_UNAWARE) - set_function(0x1e, FUNC_BECOME_UNAWARE) - set_function(0x19, FUNC_BECOME_UNAWARE) - set_function(0x1a, FUNC_BECOME_UNAWARE) - set_function(0x1d, FUNC_BECOME_UNAWARE) - set_function(0x1b, FUNC_BECOME_UNAWARE) - set_function(0x1c, FUNC_BECOME_UNAWARE) - set_function(0x1f, FUNC_BECOME_UNAWARE) - set_function(0x20, FUNC_BECOME_UNAWARE) - set_function(0x21, FUNC_BECOME_UNAWARE) - set_function(0x22, FUNC_BECOME_UNAWARE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_returnlist(0x00, 0x0401) + set_returnlist(0x01, 0x0402) + set_returnlist(0x02, 0x0403) + set_returnlist(0x03, 0x0404) + set_returnlist(0x04, 0x0405) + set_returnlist(0x05, FUNC_DRAGON_GUARD) + set_returnlist(0x06, FUNC_DRAGON_GUARD) + set_returnlist(0x07, FUNC_DRAGON_GUARD) + set_returnlist(0x08, FUNC_DRAGON_GUARD) + set_returnlist(0x09, FUNC_DRAGON_GUARD) + set_returnlist(0x0a, FUNC_DRAGON_GUARD) + set_returnlist(0x0b, FUNC_DRAGON_GUARD) + set_returnlist(0x0c, 0x0406) + set_returnlist(0x0d, 0x0406) + set_returnlist(0x0e, 0x0406) + set_returnlist(0x0f, 0x0407) + set_returnlist(0x10, 0x0408) + set_returnlist(0x11, FUNC_DRAGON_GUARD) + set_returnlist(0x27, FUNC_DRAGON_GUARD) + set_returnlist(0x28, FUNC_DRAGON_GUARD) + set_returnlist(0x12, FUNC_DRAGON_GUARD) + set_returnlist(0x13, FUNC_DRAGON_GUARD) + set_returnlist(0x14, 0x0409) + set_returnlist(0x15, 0x040a) + set_returnlist(0x16, FUNC_DRAGON_GUARD) + set_returnlist(0x17, FUNC_DRAGON_GUARD) + set_returnlist(0x18, FUNC_DRAGON_GUARD) + set_returnlist(0x1e, FUNC_DRAGON_GUARD) + set_returnlist(0x19, FUNC_DRAGON_GUARD) + set_returnlist(0x1a, FUNC_DRAGON_GUARD) + set_returnlist(0x1d, FUNC_DRAGON_GUARD) + set_returnlist(0x1b, 0x040b) + set_returnlist(0x1c, 0x040c) + set_returnlist(0x1f, FUNC_DRAGON_GUARD) + set_returnlist(0x20, FUNC_DRAGON_GUARD) + set_returnlist(0x21, FUNC_DRAGON_GUARD) + set_returnlist(0x22, FUNC_DRAGON_GUARD) + set_ailist(0x00, FUNC_BECOME_UNAWARE) + set_ailist(0x01, FUNC_BECOME_UNAWARE) + set_ailist(0x02, FUNC_BECOME_UNAWARE) + set_ailist(0x03, FUNC_BECOME_UNAWARE) + set_ailist(0x04, FUNC_BECOME_UNAWARE) + set_ailist(0x05, FUNC_BECOME_UNAWARE) + set_ailist(0x06, FUNC_BECOME_UNAWARE) + set_ailist(0x07, FUNC_BECOME_UNAWARE) + set_ailist(0x08, FUNC_BECOME_UNAWARE) + set_ailist(0x09, FUNC_BECOME_UNAWARE) + set_ailist(0x0a, FUNC_BECOME_UNAWARE) + set_ailist(0x0b, FUNC_BECOME_UNAWARE) + set_ailist(0x0c, FUNC_BECOME_UNAWARE) + set_ailist(0x0d, FUNC_BECOME_UNAWARE) + set_ailist(0x0e, FUNC_BECOME_UNAWARE) + set_ailist(0x0f, FUNC_BECOME_UNAWARE) + set_ailist(0x10, FUNC_BECOME_UNAWARE) + set_ailist(0x11, FUNC_BECOME_UNAWARE) + set_ailist(0x27, FUNC_BECOME_UNAWARE) + set_ailist(0x28, FUNC_BECOME_UNAWARE) + set_ailist(0x12, FUNC_BECOME_UNAWARE) + set_ailist(0x13, FUNC_BECOME_UNAWARE) + set_ailist(0x14, FUNC_BECOME_UNAWARE) + set_ailist(0x15, FUNC_BECOME_UNAWARE) + set_ailist(0x16, FUNC_BECOME_UNAWARE) + set_ailist(0x17, FUNC_BECOME_UNAWARE) + set_ailist(0x18, FUNC_BECOME_UNAWARE) + set_ailist(0x1e, FUNC_BECOME_UNAWARE) + set_ailist(0x19, FUNC_BECOME_UNAWARE) + set_ailist(0x1a, FUNC_BECOME_UNAWARE) + set_ailist(0x1d, FUNC_BECOME_UNAWARE) + set_ailist(0x1b, FUNC_BECOME_UNAWARE) + set_ailist(0x1c, FUNC_BECOME_UNAWARE) + set_ailist(0x1f, FUNC_BECOME_UNAWARE) + set_ailist(0x20, FUNC_BECOME_UNAWARE) + set_ailist(0x21, FUNC_BECOME_UNAWARE) + set_ailist(0x22, FUNC_BECOME_UNAWARE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1028_toggle_mechanic[] = { if_eeprom_flag_is_set(EEPROMFLAG_RESCUE_MECHANIC_DEAD, /*goto*/ 0x06) dprint 'K','E','E','P',' ','M','E','C','H','\n',0, - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) dprint 'D','E','L','E','T','E',' ','M','E','C','H','\n',0, hide_chr(CHR_MECHANIC) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1029_msg_showers[] = { @@ -4255,8 +4255,8 @@ u8 func1029_msg_showers[] = { label(0x2d) speak(CHR_BOND, 0x2a4e, 0x73bc, CHANNEL_6, COLOR_09_BLUE) // "The showers... Now, if I can convince someone to p..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102a_msg_temperaturedropping[] = { @@ -4268,8 +4268,8 @@ u8 func102a_msg_temperaturedropping[] = { label(0x2d) speak(CHR_BOND, 0x2a4f, 0x8180, CHANNEL_6, COLOR_09_BLUE) // "The temperature's dropping... You must be close to..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102b_msg_airrecycled[] = { @@ -4279,8 +4279,8 @@ u8 func102b_msg_airrecycled[] = { label(0x2d) speak(CHR_BOND, 0x2a50, 0x73be, CHANNEL_6, COLOR_09_BLUE) // "The air's heavily recycled around here - must be n..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102c_msg_hurry[] = { @@ -4290,8 +4290,8 @@ u8 func102c_msg_hurry[] = { label(0x2d) speak(CHR_BOND, 0x2a51, 0x8181, CHANNEL_6, COLOR_09_BLUE) // "There he is, Jo! Hurry or you'll be too late!" - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4308,12 +4308,12 @@ u8 func0416_become_unaware[] = { label(0x2d) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Dying/dead label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function2[] = { @@ -4329,8 +4329,8 @@ u8 unregistered_function2[] = { // Crate destroyed label(0x06) unset_object_flag_bank0(OBJ_WALL, OBJECTFLAG0_INVINCIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102f_shuffle_disguise[] = { @@ -4348,7 +4348,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT2) hide_object(OBJ_LABCOAT3) hide_object(OBJ_LABCOAT4) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Rand < 51 (51 out of 256 chance) label(0x08) @@ -4356,7 +4356,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT3) hide_object(OBJ_LABCOAT4) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Rand >= 51 and < 102 (51 out of 256 chance) label(0x09) @@ -4364,7 +4364,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT3) hide_object(OBJ_LABCOAT4) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Rand >= 102 and < 153 (51 out of 256 chance) label(0x0a) @@ -4372,7 +4372,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT2) hide_object(OBJ_LABCOAT4) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Rand >= 153 and < 204 (51 out of 256 chance) label(0x0b) @@ -4380,7 +4380,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT2) hide_object(OBJ_LABCOAT3) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // A and SA label(0x0c) @@ -4389,7 +4389,7 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT3) hide_object(OBJ_LABCOAT4) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable label(0x0d) @@ -4397,8 +4397,8 @@ u8 func102f_shuffle_disguise[] = { hide_object(OBJ_LABCOAT2) hide_object(OBJ_LABCOAT4) hide_object(OBJ_LABCOAT5) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1030_lift_door_sounds[] = { @@ -4421,7 +4421,7 @@ u8 func1030_lift_door_sounds[] = { label(0x06) endloop(0x5e) - endfunction + endlist }; u8 func1031_toggle_doorman[] = { @@ -4443,8 +4443,8 @@ u8 func1031_toggle_doorman[] = { label(0x2d) unset_chr_chrflag(CHR_DOORMAN, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_DOORMAN, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1032_count_last_room_guards[] = { @@ -4484,12 +4484,12 @@ u8 func1032_count_last_room_guards[] = { label(0x06) if_morale_lt(3, /*goto*/ 0x2d) set_stage_flag(STAGEFLAG_ONE_KEYCARD_GUARD_REMAINING) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) - endfunction + endlist }; /** @@ -4510,8 +4510,8 @@ u8 func1033_update_buddy_placed_flag[] = { label(0x2d) unset_chr_hiddenflag(CHR_P1P2, CHRHFLAG_BUDDY_PLACED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1034_setup_rtracker[] = { @@ -4519,8 +4519,8 @@ u8 func1034_setup_rtracker[] = { set_object_flag_bank2(OBJ_FALCON2SILENCED1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_FALCON2SILENCED2, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_PHOENIX, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1435_setup_lighting[] = { @@ -4616,22 +4616,22 @@ u8 func1435_setup_lighting[] = { misc_command(0x010c, 0x05, 0x01) misc_command(0x010d, 0x05, 0x01) misc_command(0x010e, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0432_init_biotech1[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, FUNC_BIOTECH1) - endfunction + set_ailist(CHR_SELF, FUNC_BIOTECH1) + endlist }; u8 func0433_init_biotech2[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, FUNC_BIOTECH2) - endfunction + set_ailist(CHR_SELF, FUNC_BIOTECH2) + endlist }; u8 func0430_biotech2[] = { @@ -4640,15 +4640,15 @@ u8 func0430_biotech2[] = { if_rand_gt(85, /*goto*/ 0x62) if_rand_gt(170, /*goto*/ 0x63) - animation(ANIM_OPERATE_0221, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) label(0x62) - animation(ANIM_OPERATE_0222, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0222, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) label(0x63) - animation(ANIM_OPERATE_0223, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) beginloop(0x04) @@ -4658,7 +4658,7 @@ u8 func0430_biotech2[] = { label(0x2d) goto_first(0x0b) - endfunction + endlist }; u8 func0431_biotech1[] = { @@ -4667,15 +4667,15 @@ u8 func0431_biotech1[] = { if_rand_gt(85, /*goto*/ 0x62) if_rand_gt(170, /*goto*/ 0x63) - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) label(0x62) - animation(ANIM_OPERATE_0205, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) label(0x63) - animation(ANIM_OPERATE_0206, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x04) beginloop(0x04) @@ -4685,7 +4685,7 @@ u8 func0431_biotech1[] = { label(0x2d) goto_first(0x0b) - endfunction + endlist }; u8 func1036_check_door_terminal_destroyed[] = { @@ -4697,12 +4697,12 @@ u8 func1036_check_door_terminal_destroyed[] = { message(CHR_BOND, 0x2a44) // "Mission critical equipment destroyed." set_stage_flag(STAGEFLAG_UPLINK_TERMINAL_DESTROYED) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x0b) - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuplue.c b/src/files/setup/setuplue.c index 5f21ca266..6846a4ac0 100644 --- a/src/files/setup/setuplue.c +++ b/src/files/setup/setuplue.c @@ -843,8 +843,8 @@ struct path paths[] = { u8 func0426_8420[] = { try_inherit_properties(0x04, /*goto*/ 0x2e) label(0x2e) - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; #define init_path(pathid) \ @@ -857,52 +857,52 @@ u8 func0426_8420[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func0401_start_path00[] = { init_path(0) - endfunction + endlist }; u8 func0402_start_path01[] = { init_path(1) - endfunction + endlist }; u8 func0403_start_path02[] = { init_path(2) - endfunction + endlist }; u8 func0404_start_path03[] = { init_path(3) - endfunction + endlist }; u8 func0405_start_path04[] = { init_path(4) - endfunction + endlist }; u8 func0406_start_path05[] = { init_path(5) - endfunction + endlist }; u8 func0407_start_path06[] = { assign_path(6) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0408_start_path07[] = { assign_path(7) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0409_set_rotor_speed[] = { @@ -910,7 +910,7 @@ u8 func0409_set_rotor_speed[] = { beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 func040b_stop_vehicle[] = { @@ -919,13 +919,13 @@ u8 func040b_stop_vehicle[] = { beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 func0c00_init_intro[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, FUNC_INTRO) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, FUNC_INTRO) + endlist }; u8 func140e_check_interceptors_destroyed[] = { @@ -955,11 +955,11 @@ u8 func140e_check_interceptors_destroyed[] = { if_stage_flag_eq(STAGEFLAG_INTERCEPTOR3_DESTROYED, FALSE, /*goto*/ 0x2e) message(CHR_BOND, 0x2c14) // "All robot interceptors disabled." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) endloop(0x04) - endfunction + endlist }; u8 func100c_maingate_switch[] = { @@ -1007,7 +1007,7 @@ u8 func100c_maingate_switch[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1400_give_bugs[] = { @@ -1022,10 +1022,10 @@ u8 func1400_give_bugs[] = { give_object_to_chr(OBJ_BUG1_COOP, CHR_COOP) label(0x2e) give_object_to_chr(OBJ_BUG2_COOP, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) label(0x2e) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; #define check_bug_wasted(chr) \ @@ -1049,17 +1049,17 @@ u8 func1400_give_bugs[] = { label(0x0a) \ set_stage_flag(STAGEFLAG_COMMSBUG_PLACED) \ message(chr, 0x2c1a) /* "Communications bug placed correctly." */ \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x0b) \ if_stage_flag_eq(STAGEFLAG_ONE_BUG_WASTED, TRUE, /*goto*/ 0x2e) \ set_stage_flag(STAGEFLAG_ONE_BUG_WASTED) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x2e) \ set_stage_flag(STAGEFLAG_COMMSBUG_MISPLACED) \ message(chr, 0x2c1b) /* "Communications bug placed incorrectly." */ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) @@ -1068,13 +1068,13 @@ u8 func1400_give_bugs[] = { */ u8 func0422_check_bug_wasted_target[] = { check_bug_wasted(CHR_TARGET) - endfunction + endlist }; u8 func1003_check_bug_wasted_bond[] = { set_target_chr(CHR_BOND) check_bug_wasted(CHR_BOND) - endfunction + endlist }; u8 func1023_check_bug_wasted_coop[] = { @@ -1084,11 +1084,11 @@ u8 func1023_check_bug_wasted_coop[] = { label(0x2e) set_stage_flag(STAGEFLAG_ONE_BUG_WASTED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) check_bug_wasted(CHR_COOP) - endfunction + endlist }; u8 func1004_check_antenna_destroyed[] = { @@ -1096,11 +1096,11 @@ u8 func1004_check_antenna_destroyed[] = { if_object_in_good_condition(OBJ_ANTENNA, /*goto*/ 0x2e) message(CHR_BOND, 0x2c1c) // "Antenna has been destroyed." set_stage_flag(STAGEFLAG_ANTENNA_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) endloop(0x04) - endfunction + endlist }; u8 func1405_antenna_switch[] = { @@ -1158,7 +1158,7 @@ u8 func1405_antenna_switch[] = { set_object_flag_bank0(OBJ_ANTENNA, OBJECTFLAG0_DEACTIVATED) endloop(0x04) - endfunction + endlist }; u8 func1006_lift_switches[] = { @@ -1224,7 +1224,7 @@ u8 func1006_lift_switches[] = { label(0x06) endloop(0x04) - endfunction + endlist }; u8 func1007_check_hangar_accessed[] = { @@ -1237,8 +1237,8 @@ u8 func1007_check_hangar_accessed[] = { label(0x06) set_stage_flag(STAGEFLAG_HANGAR_ACCESSED) message(CHR_P1P2, 0x2c27) // "Hangar has been accessed." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_check_end_level[] = { @@ -1270,13 +1270,13 @@ u8 func1008_check_end_level[] = { label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_radar_shut_down[] = { @@ -1290,8 +1290,8 @@ u8 func1009_check_radar_shut_down[] = { message(CHR_BOND, 0x2c29) // "Air intercept radar shut down." mute_channel(CHANNEL_0) set_stage_flag(STAGEFLAG_RADAR_SHUT_DOWN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_final_hangar[] = { @@ -1324,28 +1324,28 @@ u8 func100b_final_hangar[] = { restart_timer unlock_door(0x11, 0x08) unlock_door(0x12, 0x08) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0411, 0x00000210, /*goto*/ 0x09) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0411, 0x00000210, /*goto*/ 0x09) beginloop(0x09) if_timer_gt(30, /*goto*/ 0x06) endloop(0x09) label(0x06) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0412, 0x00000210, /*goto*/ 0x0a) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0412, 0x00000210, /*goto*/ 0x0a) beginloop(0x0a) if_timer_gt(60, /*goto*/ 0x06) endloop(0x0a) label(0x06) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0413, 0x00000210, /*goto*/ 0x0b) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0413, 0x00000210, /*goto*/ 0x0b) beginloop(0x0b) if_timer_gt(90, /*goto*/ 0x06) endloop(0x0b) label(0x06) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0414, 0x00000210, /*goto*/ 0x0c) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, 0x0414, 0x00000210, /*goto*/ 0x0c) // @bug: This timer check will pass immediately. // It was probably intended to be 120. @@ -1357,13 +1357,13 @@ u8 func100b_final_hangar[] = { // This guard will shoot the spawned guards above, but this guard is NOT Jon beginloop(0x60) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, FUNC_TRAITOR, 0x00000210, /*goto*/ 0x0d) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x01c6, FUNC_TRAITOR, 0x00000210, /*goto*/ 0x0d) endloop(0x60) label(0x0d) yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0411_init_hangar_guard1[] = { @@ -1384,8 +1384,8 @@ u8 func0411_init_hangar_guard1[] = { label(0x06) jog_to_pad(0x0420) yield - set_function(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) - endfunction + set_ailist(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) + endlist }; u8 func0412_init_hangar_guard2[] = { @@ -1406,8 +1406,8 @@ u8 func0412_init_hangar_guard2[] = { label(0x06) jog_to_pad(0x041f) yield - set_function(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) - endfunction + set_ailist(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) + endlist }; u8 func0413_init_hangar_guard3[] = { @@ -1428,8 +1428,8 @@ u8 func0413_init_hangar_guard3[] = { label(0x06) jog_to_pad(0x041e) yield - set_function(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) - endfunction + set_ailist(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) + endlist }; u8 func0414_init_hangar_guard4[] = { @@ -1451,8 +1451,8 @@ u8 func0414_init_hangar_guard4[] = { jog_to_pad(0x041d) yield set_target_chr(CHR_BOND) - set_function(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) - endfunction + set_ailist(CHR_SELF, FUNC_ALERT_WHEN_STOPPED) + endlist }; u8 func0415_alert_when_stopped[] = { @@ -1464,8 +1464,8 @@ u8 func0415_alert_when_stopped[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1558,20 +1558,20 @@ u8 func0417_traitor[] = { endloop(0x60) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0416_mechanic[] = { - set_onshot_function(FUNC_MECHANIC) + set_shotlist(FUNC_MECHANIC) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_just_injured(CHR_SELF, /*goto*/ 0x2e) @@ -1590,7 +1590,7 @@ u8 func0416_mechanic[] = { // Not alert - at interceptor label(0x04) call_rng - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x09) chr_toggle_p1p2(CHR_SELF) @@ -1613,7 +1613,7 @@ u8 func0416_mechanic[] = { // In bunker label(0x0e) - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0d) chr_toggle_p1p2(CHR_SELF) @@ -1642,9 +1642,9 @@ u8 func0416_mechanic[] = { rebuild_squadrons play_sound(0x80f7, CHANNEL_7) label(0x06) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func1001_objectives_failed_msg[] = { @@ -1657,8 +1657,8 @@ u8 func1001_objectives_failed_msg[] = { set_object_flag_bank1(OBJ_MINE5, OBJECTFLAG1_INVISIBLE) set_object_flag_bank1(OBJ_MINE6, OBJECTFLAG1_INVISIBLE) set_chr_chrflag(CHR_MECHANIC, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func040a_top_interceptor[] = { @@ -1668,7 +1668,7 @@ u8 func040a_top_interceptor[] = { beginloop(0x03) if_object_in_good_condition(OBJ_INTERCEPTOR3, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_TRIGGER_INTERCEPTOR, TRUE, /*goto*/ 0x06) endloop(0x03) @@ -1723,7 +1723,7 @@ u8 func040a_top_interceptor[] = { label(0x5c) goto_first(0x5b) - endfunction + endlist }; u8 func040c_init_bottom_interceptors[] = { @@ -1734,14 +1734,14 @@ u8 func040c_init_bottom_interceptors[] = { beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 func040d_90c8[] = { set_self_chrflag(CHRCFLAG_00000020) set_accuracy(30) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040e_outro[] = { @@ -1751,25 +1751,25 @@ u8 func040e_outro[] = { set_music_track(MUSIC_INFILTRATION_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x017f, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x017f, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_hud_visible(CHR_P1P2, TRUE) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000) - animation(0x017e, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) + chr_do_animation(0x017e, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) set_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_OUTRO_GUARD, CHRHFLAG_00020000) - animation(0x0180, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD, 4) + chr_do_animation(0x0180, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD, 4) restart_timer show_nonessential_chrs(FALSE) @@ -1884,8 +1884,8 @@ u8 func040e_outro[] = { remove_chr(CHR_OUTRO_GUARD) set_chr_hud_visible(CHR_P1P2, FALSE) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0410_intro[] = { @@ -1899,7 +1899,7 @@ u8 func0410_intro[] = { set_chr_chrflag(0x32, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x32, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x32, CHRHFLAG_00020000) - animation(0x0182, -1, -1, 0x06, 0x00, 0x32, 4) + chr_do_animation(0x0182, -1, -1, 0x06, 0x00, 0x32, 4) set_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) restart_timer fade_to_color(0x000000ff, 0) @@ -1943,17 +1943,17 @@ u8 func0410_intro[] = { set_chr_chrflag(0x29, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x29, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x29, CHRHFLAG_00020000) - animation(0x0184, -1, -1, 0x06, 0x00, 0x29, 4) + chr_do_animation(0x0184, -1, -1, 0x06, 0x00, 0x29, 4) set_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x2a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x2a, CHRHFLAG_00020000) - animation(0x0185, -1, -1, 0x06, 0x00, 0x2a, 4) + chr_do_animation(0x0185, -1, -1, 0x06, 0x00, 0x2a, 4) set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x2b, CHRHFLAG_00020000) - animation(0x0186, -1, -1, 0x06, 0x00, 0x2b, 4) + chr_do_animation(0x0186, -1, -1, 0x06, 0x00, 0x2b, 4) set_object_flag_bank1(0x2f, OBJECTFLAG1_04000000) set_object_flag_bank2(0x2f, OBJECTFLAG2_00000010) @@ -1989,12 +1989,12 @@ u8 func0410_intro[] = { set_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x2a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x2a, CHRHFLAG_00020000) - animation(0x0189, -1, -1, 0x06, 0x00, 0x2a, 4) + chr_do_animation(0x0189, -1, -1, 0x06, 0x00, 0x2a, 4) set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x2b, CHRHFLAG_00020000) - animation(0x018a, -1, -1, 0x06, 0x00, 0x2b, 4) + chr_do_animation(0x018a, -1, -1, 0x06, 0x00, 0x2b, 4) set_object_flag_bank1(0x2f, OBJECTFLAG1_04000000) set_object_flag_bank2(0x2f, OBJECTFLAG2_00000010) @@ -2027,7 +2027,7 @@ u8 func0410_intro[] = { if_controller_button_pressed(/*goto*/ 0x54) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00f1, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x00f1, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(0x03, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x03, CHRHFLAG_00020000) unset_chr_chrflag(0x03, CHRCFLAG_HIDDEN) @@ -2095,10 +2095,10 @@ u8 func0410_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00f1, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x00f1, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(0x03, CHRCFLAG_UNPLAYABLE) - set_function(0x02, 0x0426) - set_function(0x03, 0x0426) + set_ailist(0x02, 0x0426) + set_ailist(0x03, 0x0426) unset_object_flag_bank1(OBJ_INTERCEPTOR1, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank1(OBJ_INTERCEPTOR2, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank1(OBJ_INTERCEPTOR3, OBJECTFLAG1_INVISIBLE) @@ -2106,8 +2106,8 @@ u8 func0410_intro[] = { reset_ambience enter_firstperson set_stage_flag(STAGEFLAG_INTRO_FINISHED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2121,7 +2121,7 @@ u8 func0418_walk_to_pad[] = { beginloop(0x09) endloop(0x09) - endfunction + endlist }; u8 func1010_bunker_lighting[] = { @@ -2155,13 +2155,13 @@ u8 func1010_bunker_lighting[] = { label(0x2e) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_bunker_laser1[] = { if_difficulty_gt(DIFF_A, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA and PA only label(0x2e) @@ -2194,13 +2194,13 @@ u8 func1012_bunker_laser1[] = { goto_first(0x0a) label(0x10) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_bunker_lasers234[] = { if_difficulty_gt(DIFF_A, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) restart_timer @@ -2236,13 +2236,13 @@ u8 func1013_bunker_lasers234[] = { goto_first(0x0a) label(0x10) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_bunker_lasers56[] = { if_difficulty_gt(DIFF_A, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) restart_timer @@ -2296,8 +2296,8 @@ u8 func1013_bunker_lasers56[] = { goto_first(0x0a) label(0x10) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_bunker_lasers[] = { @@ -2311,7 +2311,7 @@ u8 func1013_bunker_lasers[] = { hide_object(0x22) hide_object(0x23) hide_object(0x24) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA and PA label(0x03) @@ -2358,8 +2358,8 @@ u8 func1013_bunker_lasers[] = { open_door(0x22) open_door(0x23) open_door(0x24) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_bunker_explosives[] = { @@ -2501,8 +2501,8 @@ u8 func1011_bunker_explosives[] = { endloop(0x10) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_trigger_interceptor[] = { @@ -2532,16 +2532,16 @@ u8 func1016_trigger_interceptor[] = { label(0x06) set_stage_flag(STAGEFLAG_TRIGGER_INTERCEPTOR) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_radar_terminal_noise[] = { yield assign_sound(0x8146, CHANNEL_0) play_sound_from_object(CHANNEL_0, OBJ_RADAR_TERMINAL, 0x0320, 0x044c) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_unhide_guards[] = { @@ -2590,10 +2590,10 @@ u8 func1018_unhide_guards[] = { unset_chr_chrflag(0x20, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x21, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x22, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1f, FUNC_TROOPER_ALERTED) - set_function(0x20, FUNC_TROOPER_ALERTED) - set_function(0x21, FUNC_TROOPER_ALERTED) - set_function(0x22, FUNC_TROOPER_ALERTED) + set_ailist(0x1f, FUNC_TROOPER_ALERTED) + set_ailist(0x20, FUNC_TROOPER_ALERTED) + set_ailist(0x21, FUNC_TROOPER_ALERTED) + set_ailist(0x22, FUNC_TROOPER_ALERTED) // Wait until player in room 0x0044 (first hangar ramp) beginloop(0x09) @@ -2607,10 +2607,10 @@ u8 func1018_unhide_guards[] = { unset_chr_chrflag(0x24, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x23, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x24, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x23, FUNC_DRAGON_ALERTED) - set_function(0x24, FUNC_DRAGON_ALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x23, FUNC_DRAGON_ALERTED) + set_ailist(0x24, FUNC_DRAGON_ALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0419_clone_spawner[] = { @@ -2637,7 +2637,7 @@ u8 func0419_clone_spawner[] = { reloop(0x04) label(0x09) - set_function(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) + set_ailist(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) label(0x4f) unset_self_chrflag(CHRCFLAG_HIDDEN) @@ -2647,13 +2647,13 @@ u8 func0419_clone_spawner[] = { label(0x4f) try_spawn_clone2(CHR_SELF, FUNC_INIT_ALERTED_SPAWNED_GUARD, 0x00000000, /*goto*/ 0x2e) - set_function(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) + set_ailist(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) label(0x2e) yield endloop(0x04) - endfunction + endlist }; u8 func041a_init_alerted_spawned_guard[] = { @@ -2663,13 +2663,13 @@ u8 func041a_init_alerted_spawned_guard[] = { rebuild_squadrons try_inherit_properties(0x25, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) - endfunction + set_ailist(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD) + endlist }; u8 func041b_alerted_spawned_guard[] = { - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func1019_spawn_guards_at_antenna[] = { @@ -2702,7 +2702,7 @@ u8 func1019_spawn_guards_at_antenna[] = { beginloop(0x56) dprint 'T','R','Y',' ','C','R','E','A','T','E','\n',0, if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_A51TROOPER, HEAD_RANDOM, 0x00a0, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x57) + try_spawn_chr_at_pad(BODY_A51TROOPER, HEAD_RANDOM, 0x00a0, FUNC_SPAWNED_GUARD, 0x00000200, /*goto*/ 0x57) reloop(0x56) label(0x57) @@ -2726,11 +2726,11 @@ u8 func1019_spawn_guards_at_antenna[] = { yield unset_chr_chrflag(0x35, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x35, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x35, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(0x35, GFUNC_SEARCH_FOR_PLAYER) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_spawned_guard[] = { @@ -2757,8 +2757,8 @@ u8 func040f_spawned_guard[] = { endloop(0x09) label(0x06) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; #define init_guard(accuracy, reaction, armor, recovery, function) \ @@ -2768,38 +2768,38 @@ u8 func040f_spawned_guard[] = { set_armor(armor) \ set_recovery_speed(recovery) \ set_shield(0) \ - set_function(CHR_SELF, function) + set_ailist(CHR_SELF, function) u8 func041d_trooper_unalerted[] = { set_chr_dodge_rating(2, 0x0a) init_guard(6, 50, 0, 0, GFUNC_UNALERTED) - endfunction + endlist }; u8 func041f_trooper_alerted[] = { set_chr_dodge_rating(2, 0x0a) init_guard(6, 50, 0, 0, GFUNC_ALERTED) - endfunction + endlist }; u8 func041e_dragon_unalerted[] = { init_guard(8, 30, 10, 35, GFUNC_UNALERTED) - endfunction + endlist }; u8 func0420_dragon_alerted[] = { init_guard(8, 30, 10, 35, GFUNC_ALERTED) - endfunction + endlist }; u8 func141f_start_lifts[] = { activate_lift(2, 0x31) activate_lift(3, 0x32) activate_lift(4, 0x33) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_check_mechanic_dead[] = { @@ -2813,8 +2813,8 @@ u8 func101a_check_mechanic_dead[] = { label(0x2e) set_eeprom_flag(EEPROMFLAG_RESCUE_MECHANIC_DEAD) dprint 'D','E','L','E','T','E',' ','M','E','C','H','\n',0, - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2829,8 +2829,8 @@ u8 func101b_msg_airinterceptradar[] = { label(0x2e) speak(CHR_P1P2, 0x2c35, 0x817d, CHANNEL_6, COLOR_09_BLUE) // "The air intercept radar is controlled from that bu..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_msg_cantthrow[] = { @@ -2845,8 +2845,8 @@ u8 func101c_msg_cantthrow[] = { label(0x2e) speak(CHR_P1P2, 0x2c36, 0x73b9, CHANNEL_6, COLOR_09_BLUE) // "There's the antenna, but... I can't throw a bug th..." label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2865,8 +2865,8 @@ u8 func101d_msg_hangarlift[] = { label(0x2e) speak(CHR_P1P2, 0x2c37, 0x817e, CHANNEL_6, COLOR_09_BLUE) // "The hangar lift is on the other side of that huge ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_msg_triggerfinger[] = { @@ -2877,12 +2877,12 @@ u8 func101e_msg_triggerfinger[] = { label(0x2e) speak(CHR_P1P2, 0x2c38, 0x817f, CHANNEL_6, COLOR_09_BLUE) // "Careful with that trigger finger, Agent Dark - you..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0421_activate_autogun[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) beginloop(0x04) chr_toggle_p1p2(CHR_SELF) @@ -2904,7 +2904,7 @@ u8 func0421_activate_autogun[] = { endloop(0x09) label(0x2e) - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 120, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 120, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0a) if_chr_stopped(/*goto*/ 0x2e) @@ -2917,20 +2917,20 @@ u8 func0421_activate_autogun[] = { label(0x2e) unset_object_flag_bank0(OBJ_AUTOGUN_AT_START, OBJECTFLAG0_DEACTIVATED) label(0x06) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x0e) say_quip(CHR_BOND, 0x12, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) restart_timer - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x7c) if_timer_gt(60, /*goto*/ 0x7d) endloop(0x7c) label(0x7d) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -2941,13 +2941,13 @@ u8 func1020_choose_autogun_guard[] = { yield call_rng if_rand_gt(128, /*goto*/ 0x2e) - set_function(0x00, FUNC_ACTIVATE_AUTOGUN) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(0x00, FUNC_ACTIVATE_AUTOGUN) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) - set_function(0x01, FUNC_ACTIVATE_AUTOGUN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x01, FUNC_ACTIVATE_AUTOGUN) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_damage_rl_guard[] = { @@ -2959,8 +2959,8 @@ u8 func1021_damage_rl_guard[] = { damage_chr(CHR_ROCKETLAUNCHER_GUARD, 18) yield damage_chr(CHR_ROCKETLAUNCHER_GUARD, 18) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_check_lift_switches_destroyed[] = { @@ -2977,8 +2977,8 @@ u8 func1022_check_lift_switches_destroyed[] = { endloop(0x04) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_lift_door_sounds[] = { @@ -3022,7 +3022,7 @@ u8 func1024_lift_door_sounds[] = { label(0x06) endloop(0x7e) - endfunction + endlist }; u8 func1025_spawn_bunker_guards[] = { @@ -3050,7 +3050,7 @@ u8 func1025_spawn_bunker_guards[] = { restart_timer beginloop(0x60) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x0057, 0x0423, 0x00000300, /*goto*/ 0x0a) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x0057, 0x0423, 0x00000300, /*goto*/ 0x0a) endloop(0x60) beginloop(0x0a) @@ -3060,7 +3060,7 @@ u8 func1025_spawn_bunker_guards[] = { label(0x06) beginloop(0x61) - try_spawn_chr(BODY_A51AIRMAN, HEAD_RANDOM, 0x0050, 0x0423, 0x00000300, /*goto*/ 0x0b) + try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, 0x0050, 0x0423, 0x00000300, /*goto*/ 0x0b) endloop(0x61) beginloop(0x0b) @@ -3069,8 +3069,8 @@ u8 func1025_spawn_bunker_guards[] = { label(0x06) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0423_a5e8[] = { @@ -3095,13 +3095,13 @@ u8 func0423_a5e8[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_TROOPER_ALERTED) - endfunction + set_ailist(CHR_SELF, FUNC_TROOPER_ALERTED) + endlist }; #define watch_for_laser_broken(crate1, crate2, laser) \ if_difficulty_gt(DIFF_A, /*goto*/ 0x7e) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ /* SA and PA */ \ beginloop(0x7e) \ @@ -3117,43 +3117,43 @@ u8 func0423_a5e8[] = { \ label(0x06) \ hide_object(laser) \ - set_function(CHR_SELF, FUNC_ACTIVATE_LASERS) + set_ailist(CHR_SELF, FUNC_ACTIVATE_LASERS) u8 func1026_check_laser1_broken[] = { watch_for_laser_broken(0x44, 0x45, 0x1e) - endfunction + endlist }; u8 func1027_check_laser2_broken[] = { watch_for_laser_broken(0x46, 0x47, 0x1f) - endfunction + endlist }; u8 func1028_check_laser3_broken[] = { watch_for_laser_broken(0x48, 0x49, 0x20) - endfunction + endlist }; u8 func1029_check_laser4_broken[] = { watch_for_laser_broken(0x4a, 0x4b, 0x21) - endfunction + endlist }; u8 func102a_check_laser5_broken[] = { watch_for_laser_broken(0x4c, 0x4d, 0x22) - endfunction + endlist }; u8 func102b_check_laser6_broken[] = { watch_for_laser_broken(0x4e, 0x4f, 0x23) - endfunction + endlist }; u8 func102c_check_laser7_broken[] = { watch_for_laser_broken(0x50, 0x52, 0x24) - endfunction + endlist }; u8 func0424_activate_lasers[] = { @@ -3168,8 +3168,8 @@ u8 func0424_activate_lasers[] = { // A and SA label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0425_a7d4[] = { @@ -3177,8 +3177,8 @@ u8 func0425_a7d4[] = { yield set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3189,8 +3189,8 @@ u8 func041c_template_guard[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102d_check_antenna_switch_destroyed[] = { @@ -3209,15 +3209,15 @@ u8 func102d_check_antenna_switch_destroyed[] = { set_stage_flag(STAGEFLAG_ANTENNA_DESTROYED) label(0x2e) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102e_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_ROCKETLAUNCHER, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func142f_setup_lighting[] = { @@ -3266,8 +3266,8 @@ u8 func142f_setup_lighting[] = { misc_command(0x0020, 0x05, 0x01) misc_command(0x0020, 0x06, 0x01) misc_command(0x0017, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupmp3.c b/src/files/setup/setupmp3.c index fbe6b13ec..78771a594 100644 --- a/src/files/setup/setupmp3.c +++ b/src/files/setup/setupmp3.c @@ -35,8 +35,8 @@ struct path paths[] = { u8 func1000_0038[] = { cmd01b2_mponly(20) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupmp4.c b/src/files/setup/setupmp4.c index 8187da249..674f5b7c8 100644 --- a/src/files/setup/setupmp4.c +++ b/src/files/setup/setupmp4.c @@ -37,7 +37,7 @@ struct path paths[] = { }; u8 func0000_0034[] = { - endfunction + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupoat.c b/src/files/setup/setupoat.c index 7ab2cb27f..6f70a3935 100644 --- a/src/files/setup/setupoat.c +++ b/src/files/setup/setupoat.c @@ -41,14 +41,14 @@ u8 intro[] = { }; u8 func0406_idle[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0408_idle_with_10_health[] = { set_chr_health(CHR_SELF, 10) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0404_spawn_enemies[] = { @@ -59,7 +59,7 @@ u8 func0404_spawn_enemies[] = { set_morale(12) label(0x04) if_morale_lt(1, /*goto*/ 0x01) - try_spawn_clone(BODY_DDSHOCK, HEAD_DDSHOCK, 0x06, FUNC0401_INIT_ENEMY, 0x00000010, /*goto*/ 0xa2) + try_spawn_chr_at_chr(BODY_DDSHOCK, HEAD_DDSHOCK, 0x06, FUNC0401_INIT_ENEMY, 0x00000010, /*goto*/ 0xa2) goto_next(0x01) label(0xa2) yield @@ -74,8 +74,8 @@ u8 func0404_spawn_enemies[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC0401_INIT_ENEMY) - endfunction + set_ailist(CHR_SELF, FUNC0401_INIT_ENEMY) + endlist }; u8 func0401_init_enemy[] = { @@ -85,9 +85,9 @@ u8 func0401_init_enemy[] = { label(0x01) assign_path(0) start_path - set_return_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - set_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_CHOOSE_TARGET) + set_ailist(CHR_SELF, GFUNC_CHOOSE_TARGET) + endlist }; u8 func0405_spawn_maians[] = { @@ -99,7 +99,7 @@ u8 func0405_spawn_maians[] = { set_morale(12) label(0x04) if_morale_lt(1, /*goto*/ 0x01) - try_spawn_clone(BODY_ELVIS1, HEAD_ELVIS, 0x07, FUNC0402_INIT_MAIAN, 0x00000010, /*goto*/ 0xa2) + try_spawn_chr_at_chr(BODY_ELVIS1, HEAD_ELVIS, 0x07, FUNC0402_INIT_MAIAN, 0x00000010, /*goto*/ 0xa2) goto_next(0x01) label(0xa2) yield @@ -114,8 +114,8 @@ u8 func0405_spawn_maians[] = { yield yield yield - set_function(CHR_SELF, FUNC0402_INIT_MAIAN) - endfunction + set_ailist(CHR_SELF, FUNC0402_INIT_MAIAN) + endlist }; u8 func0402_init_maian[] = { @@ -126,17 +126,17 @@ u8 func0402_init_maian[] = { label(0x01) assign_path(0) start_path - set_return_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - set_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_CHOOSE_TARGET) + set_ailist(CHR_SELF, GFUNC_CHOOSE_TARGET) + endlist }; u8 func1001_01a4[] = { noop016c rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function1[] = { @@ -151,23 +151,23 @@ u8 unregistered_function1[] = { dprint 't',0, goto_first(0x04) - endfunction + endlist }; u8 func1000_idle[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_init_some_sound[] = { play_sound(0x0037, -1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; // This function is never assigned. u8 func0407_defend_pad[] = { - set_onshot_function(0x0407) + set_shotlist(0x0407) if_enemy_distance_lt_and_los(2540, /*goto*/ 0xa5) if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x01) @@ -197,9 +197,9 @@ u8 func0407_defend_pad[] = { // Do combat label(0xa5) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, 0x0407) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, 0x0407) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupold.c b/src/files/setup/setupold.c index 4b584d1c2..33a5f4d37 100644 --- a/src/files/setup/setupold.c +++ b/src/files/setup/setupold.c @@ -41,7 +41,7 @@ struct path paths[] = { /** * Some kind of camera movement test? When you press a button it jumps forward - * to the next camera animation rather than ending the cutscene. + * to the next camera chr_do_animation rather than ending the cutscene. */ u8 func0c00_017c[] = { set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) @@ -159,8 +159,8 @@ u8 func0c00_017c[] = { restart_default_music reset_ambience enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuppam.c b/src/files/setup/setuppam.c index 432547fa7..da35b2704 100644 --- a/src/files/setup/setuppam.c +++ b/src/files/setup/setuppam.c @@ -721,20 +721,20 @@ u8 func0401_unused[] = { beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func040b_init_elvis[] = { @@ -746,14 +746,14 @@ u8 func040b_init_elvis[] = { set_alertness(100) set_chr_health(CHR_SELF, 1) set_armor(900) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + endlist }; u8 func0402_elvis_follow_and_reactive_teleportals[] = { dprint 'B','A','C','K',' ','T','O',' ','E','L','V','I','S','\n',0, - set_return_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - set_onshot_function(FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_returnlist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_shotlist(FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -762,7 +762,7 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) if_just_injured(CHR_SELF, /*goto*/ 0x2e) @@ -866,9 +866,9 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { label(0x64) say_quip(CHR_BOND, 0x28, 0xff, 0x0f, 0xff, BANK_1, 0x00, 0x00) label(0x2e) - set_onshot_function(FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - set_return_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_returnlist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // In teleport control room label(0x5f) @@ -883,7 +883,7 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { label(0x6f) label(0x2e) unset_self_chrflag(CHRCFLAG_01000000) - animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) beginloop(0x10) if_chr_stopped(/*goto*/ 0x06) @@ -902,14 +902,14 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { unset_chr_chrflag(0x14, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x15, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x14, FUNC_TELEPORT_ACTIVATION_RESPONDER) - set_function(0x15, FUNC_TELEPORT_ACTIVATION_RESPONDER) - set_function(0x16, FUNC_TELEPORT_ACTIVATION_RESPONDER) + set_ailist(0x14, FUNC_TELEPORT_ACTIVATION_RESPONDER) + set_ailist(0x15, FUNC_TELEPORT_ACTIVATION_RESPONDER) + set_ailist(0x16, FUNC_TELEPORT_ACTIVATION_RESPONDER) goto_first(0x03) label(0x60) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + endlist }; u8 func0433_unused[] = { @@ -927,8 +927,8 @@ u8 func0433_unused[] = { label(0x2e) unset_self_flag_bankx(CHRFLAG0_UNSURPRISABLE, BANK_0) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -938,7 +938,7 @@ u8 func0433_unused[] = { u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { set_self_chrflag(CHRCFLAG_00080000) unset_self_flag_bankx(CHRFLAG1_00200000, BANK_1) - set_onshot_function(FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + set_shotlist(FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -947,7 +947,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1026,9 +1026,9 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { say_quip(CHR_BOND, 0x28, 0xff, 0x0f, 0xff, BANK_1, 0x00, 0x00) label(0x2e) - set_onshot_function(FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) - set_return_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_shotlist(FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + set_returnlist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // In Agent megaweapon room label(0x1d) @@ -1046,7 +1046,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { label(0x2e) unset_self_chrflag(CHRCFLAG_01000000) restart_timer - animation(ANIM_OPERATE_0205, -1, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x10) if_chr_stopped(/*goto*/ 0x06) @@ -1066,8 +1066,8 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { goto_first(0x03) label(0x60) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + endlist }; /** @@ -1079,7 +1079,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { u8 func0405_elvis_follow_nocombat[] = { set_self_chrflag(CHRCFLAG_00080000) unset_self_flag_bankx(CHRFLAG1_00200000, BANK_1) - set_onshot_function(0x0405) + set_shotlist(0x0405) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -1088,7 +1088,7 @@ u8 func0405_elvis_follow_nocombat[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1155,11 +1155,11 @@ u8 func0405_elvis_follow_nocombat[] = { label(0x2e) goto_first(0x03) - endfunction + endlist }; u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { - set_onshot_function(FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) + set_shotlist(FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -1168,7 +1168,7 @@ u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1221,15 +1221,15 @@ u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { if_rand_lt(86, /*goto*/ 0x63) if_rand_lt(172, /*goto*/ 0x64) - animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x11) label(0x63) - animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x11) label(0x64) - animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, -1, -1, 0x02, 0x10, CHR_SELF, 2) goto_next(0x11) beginloop(0x11) @@ -1250,16 +1250,16 @@ u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { set_stage_flag(STAGEFLAG_MEGAWEAPON_DISABLED) try_draw_weapon(MODEL_CHRMAIANPISTOL, WEAPON_PHOENIX, 0x00000000, /*goto*/ 0x04) label(0x04) - set_function(CHR_SELF, FUNC_ELVIS_GO_TO_SA_TELEPORT) + set_ailist(CHR_SELF, FUNC_ELVIS_GO_TO_SA_TELEPORT) goto_first(0x03) label(0x60) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) + endlist }; u8 func0407_elvis_go_to_sa_teleport[] = { - set_onshot_function(FUNC_ELVIS_GO_TO_SA_TELEPORT) + set_shotlist(FUNC_ELVIS_GO_TO_SA_TELEPORT) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -1268,7 +1268,7 @@ u8 func0407_elvis_go_to_sa_teleport[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1327,14 +1327,14 @@ u8 func0407_elvis_go_to_sa_teleport[] = { label(0x64) say_quip(CHR_BOND, 0x28, 0xff, 0x0f, 0xff, BANK_1, 0x00, 0x00) label(0x2e) - set_onshot_function(FUNC_ELVIS_GO_TO_SA_TELEPORT) - set_return_function(CHR_SELF, FUNC_ELVIS_GO_TO_SA_TELEPORT) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_ELVIS_GO_TO_SA_TELEPORT) + set_returnlist(CHR_SELF, FUNC_ELVIS_GO_TO_SA_TELEPORT) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func0403_elvis_give_farsight[] = { - set_onshot_function(FUNC_ELVIS_GIVE_FARSIGHT) + set_shotlist(FUNC_ELVIS_GIVE_FARSIGHT) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -1343,7 +1343,7 @@ u8 func0403_elvis_give_farsight[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1403,19 +1403,19 @@ u8 func0403_elvis_give_farsight[] = { yield try_draw_weapon(MODEL_CHRMAIANPISTOL, WEAPON_PHOENIX, 0x00000000, /*goto*/ 0x2f) label(0x2f) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) // SA label(0x06) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) // Agent label(0x2e) yield try_draw_weapon(MODEL_CHRMAIANPISTOL, WEAPON_PHOENIX, 0x00000000, /*goto*/ 0x2e) label(0x2e) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) + endlist }; u8 func1003_powernode1[] = { @@ -1435,7 +1435,7 @@ u8 func1003_powernode1[] = { label(0x2e) goto_first(0x04) - endfunction + endlist }; u8 func1004_powernode2[] = { @@ -1455,7 +1455,7 @@ u8 func1004_powernode2[] = { label(0x2e) goto_first(0x04) - endfunction + endlist }; u8 func1005_powernode3[] = { @@ -1475,7 +1475,7 @@ u8 func1005_powernode3[] = { label(0x2e) goto_first(0x04) - endfunction + endlist }; u8 func0c01_midcutscene[] = { @@ -1484,21 +1484,21 @@ u8 func0c01_midcutscene[] = { fade_to_color(0x00000000, 15) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) set_music_track(MUSIC_DEEPSEA_MIDCUTSCENE) camera_movement(0x01d4) set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x01d5, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x01d5, -1, -1, 0x06, 0x00, CHR_P1P2, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01d6, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x01d6, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000) - animation(0x01d7, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) + chr_do_animation(0x01d7, -1, -1, 0x06, 0x00, CHR_DRCAROLL, 4) show_object(0xbb) set_object_flag_bank1(0xbb, OBJECTFLAG1_04000000) set_object_flag_bank2(0xbb, OBJECTFLAG2_00000010) @@ -1818,17 +1818,17 @@ u8 func0c01_midcutscene[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x01d5, -2, -1, 0x06, 0x00, CHR_P1P2, 2) + chr_do_animation(0x01d5, -2, -1, 0x06, 0x00, CHR_P1P2, 2) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01d6, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x01d6, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000) - animation(0x01d7, -2, -1, 0x06, 0x00, CHR_DRCAROLL, 2) + chr_do_animation(0x01d7, -2, -1, 0x06, 0x00, CHR_DRCAROLL, 2) set_cutscene_weapon(CHR_ELVIS, WEAPON_NONE, WEAPON_NONE) yield set_cutscene_weapon(CHR_ELVIS, WEAPON_PHOENIX, WEAPON_NONE) - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) yield chr_move_to_pad(CHR_ELVIS, 0x0013, 0x01, /*goto*/ 0x2e) label(0x2e) @@ -1839,15 +1839,15 @@ u8 func0c01_midcutscene[] = { restart_default_music reset_ambience play_x_music(CHANNEL_10, 60) - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) chr_move_to_pad(CHR_ELVIS, 0x0017, 0x01, /*goto*/ 0x2e) label(0x2e) remove_weapon_from_inventory(WEAPON_BACKUPDISK) - set_function(CHR_ELVIS, FUNC_ELVIS_WARP_TO_OUTSIDE_DRCAROLL) + set_ailist(CHR_ELVIS, FUNC_ELVIS_WARP_TO_OUTSIDE_DRCAROLL) show_nonessential_chrs(TRUE) set_stage_flag(STAGEFLAG_MIDCUTSCENE_FINISHED) - set_function(CHR_SELF, GFUNC_END_CINEMA) - endfunction + set_ailist(CHR_SELF, GFUNC_END_CINEMA) + endlist }; u8 func042d_elvis_warp_to_outside_drcaroll[] = { @@ -1862,8 +1862,8 @@ u8 func042d_elvis_warp_to_outside_drcaroll[] = { dprint 'T','E','L','E','P','O','R','T',' ','G','O','O','D','\n',0, set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) stop_chr - set_function(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) + endlist }; u8 func0c02_outro[] = { @@ -2009,12 +2009,12 @@ u8 func0c02_outro[] = { label(0x06) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -2027,11 +2027,11 @@ u8 func1002_intro[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01f0, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01f0, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01f1, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x01f1, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_object_flag_bank0(0x07, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank1(0x07, OBJECTFLAG1_04000000) set_object_flag_bank2(0x07, OBJECTFLAG2_00000010) @@ -2039,7 +2039,7 @@ u8 func1002_intro[] = { set_chr_chrflag(0x40, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x40, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x40, CHRHFLAG_00020000) - animation(0x0471, -1, -1, 0x06, 0x00, 0x40, 4) + chr_do_animation(0x0471, -1, -1, 0x06, 0x00, 0x40, 4) restart_timer set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) yield @@ -2185,10 +2185,10 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01f0, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01f0, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01f1, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x01f1, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) if_coop_mode(/*goto*/ 0x45) unset_object_flag_bank0(0x07, OBJECTFLAG0_DEACTIVATED) unset_object_flag_bank1(0x07, OBJECTFLAG1_04000000) @@ -2204,9 +2204,9 @@ u8 func1002_intro[] = { label(0x0d) enter_firstperson yield - set_function(CHR_ELVIS, FUNC_INIT_ELVIS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_ELVIS, FUNC_INIT_ELVIS) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042f_init_pelagic_guard[] = { @@ -2217,8 +2217,8 @@ u8 func042f_init_pelagic_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0430_unused[] = { @@ -2228,8 +2228,8 @@ u8 func0430_unused[] = { set_armor(70) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1006_msg_thiswillhelpus[] = { @@ -2253,8 +2253,8 @@ u8 func1006_msg_thiswillhelpus[] = { label(0x2e) speak(CHR_P1P2, 0x300a, 0x73d4, CHANNEL_6, COLOR_04_ORANGE) // "This will help us to get round the ship quicker." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_msg_antibodymasking[] = { @@ -2271,8 +2271,8 @@ u8 func1007_msg_antibodymasking[] = { speak(CHR_BOND, 0x300b, 0x73d5, CHANNEL_6, COLOR_09_BLUE) // "This antibody masking will protect us from the aut..." label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_msg_theresdrcaroll[] = { @@ -2301,8 +2301,8 @@ u8 func1008_msg_theresdrcaroll[] = { // Elvis dead, Dr Caroll dead, or Elvis didn't get teleported label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_msg_getoutofhere[] = { @@ -2324,8 +2324,8 @@ u8 func1009_msg_getoutofhere[] = { speak(CHR_BOND, 0x300d, 0x73d7, CHANNEL_6, COLOR_04_ORANGE) // "We have to get out of here!" label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2386,11 +2386,11 @@ u8 func100a_bond_teleports[] = { goto_first(0x5b) label(0x5e) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x2e) if_difficulty_lt(DIFF_SA, /*goto*/ 0x64) - set_function(CHR_BOND, FUNC_TELEPORT_BOND_TO_SAPA) + set_ailist(CHR_BOND, FUNC_TELEPORT_BOND_TO_SAPA) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x31) @@ -2427,7 +2427,7 @@ u8 func100a_bond_teleports[] = { goto_first(0x5c) label(0x5e) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) if_difficulty_lt(DIFF_PA, /*goto*/ 0x64) goto_next(0x2e) @@ -2438,7 +2438,7 @@ u8 func100a_bond_teleports[] = { goto_next(0x2e) label(0x2e) - set_function(CHR_BOND, FUNC_TELEPORT_BOND_TO_A_PA_DRCAROLL) + set_ailist(CHR_BOND, FUNC_TELEPORT_BOND_TO_A_PA_DRCAROLL) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x32) @@ -2454,7 +2454,7 @@ u8 func100a_bond_teleports[] = { goto_first(0x04) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // // At Agent or PA teleport @@ -2481,8 +2481,8 @@ u8 func100a_bond_teleports[] = { goto_first(0x5d) label(0x5e) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) - set_function(CHR_BOND, FUNC_TELEPORT_BOND_TO_DRCAROLL) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_BOND, FUNC_TELEPORT_BOND_TO_DRCAROLL) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x33) @@ -2492,8 +2492,8 @@ u8 func100a_bond_teleports[] = { label(0x2e) grant_control(CHR_BOND) teleport_to_pad(0x0000, CHR_BOND) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0414_teleport_bond_to_sapa[] = { @@ -2505,7 +2505,7 @@ u8 func0414_teleport_bond_to_sapa[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) @@ -2534,10 +2534,10 @@ u8 func0414_teleport_bond_to_sapa[] = { if_chr_unloaded(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) + set_ailist(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_teleport_bond_to_drcaroll[] = { @@ -2549,7 +2549,7 @@ u8 func0415_teleport_bond_to_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) @@ -2581,11 +2581,11 @@ u8 func0415_teleport_bond_to_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2602,7 +2602,7 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x62) if_difficulty_lt(DIFF_SA, /*goto*/ 0x09) @@ -2644,15 +2644,15 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) label(0x62) set_stage_flag(STAGEFLAG_TELEPORT_DONE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA label(0x08) - set_function(CHR_SELF, FUNC_TELEPORT_BOND_TO_DRCAROLL) + set_ailist(CHR_SELF, FUNC_TELEPORT_BOND_TO_DRCAROLL) // Agent label(0x09) @@ -2692,10 +2692,10 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) + set_ailist(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2714,7 +2714,7 @@ u8 func100b_coop_teleports[] = { goto_next(0x1f) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x1f) if_stage_flag_eq(STAGEFLAG_TELEPORTALS_ACTIVATED, TRUE, /*goto*/ 0x04) @@ -2746,11 +2746,11 @@ u8 func100b_coop_teleports[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x62) label(0x2e) if_difficulty_lt(DIFF_SA, /*goto*/ 0x64) - set_function(CHR_COOP, FUNC_TELEPORT_COOP_TO_SAPA) + set_ailist(CHR_COOP, FUNC_TELEPORT_COOP_TO_SAPA) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x31) @@ -2792,7 +2792,7 @@ u8 func100b_coop_teleports[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x62) if_difficulty_lt(DIFF_PA, /*goto*/ 0x64) goto_next(0x2e) @@ -2801,7 +2801,7 @@ u8 func100b_coop_teleports[] = { goto_next(0x2e) label(0x2e) - set_function(CHR_COOP, FUNC_TELEPORT_COOP_TO_A_PA_DRCAROLL) + set_ailist(CHR_COOP, FUNC_TELEPORT_COOP_TO_A_PA_DRCAROLL) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x32) @@ -2817,7 +2817,7 @@ u8 func100b_coop_teleports[] = { goto_first(0x04) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // // At Agent or PA area teleport @@ -2850,9 +2850,9 @@ u8 func100b_coop_teleports[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x62) - set_function(CHR_COOP, FUNC_TELEPORT_COOP_TO_DRCAROLL) + set_ailist(CHR_COOP, FUNC_TELEPORT_COOP_TO_DRCAROLL) unset_stage_flag(STAGEFLAG_TELEPORT_DONE) beginloop(0x33) @@ -2862,8 +2862,8 @@ u8 func100b_coop_teleports[] = { label(0x2e) grant_control(CHR_COOP) teleport_to_pad(0x0000, CHR_COOP) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0417_teleport_coop_to_sapa[] = { @@ -2874,7 +2874,7 @@ u8 func0417_teleport_coop_to_sapa[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x08) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) @@ -2904,11 +2904,11 @@ u8 func0417_teleport_coop_to_sapa[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) + set_ailist(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0418_teleport_coop_to_drcaroll[] = { @@ -2919,7 +2919,7 @@ u8 func0418_teleport_coop_to_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) if_chr_dying(CHR_ELVIS, /*goto*/ 0x07) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x07) @@ -2951,10 +2951,10 @@ u8 func0418_teleport_coop_to_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2970,7 +2970,7 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_STOP) + set_ailist(CHR_ELVIS, FUNC_ELVIS_STOP) label(0x62) if_difficulty_lt(DIFF_SA, /*goto*/ 0x09) if_difficulty_lt(DIFF_PA, /*goto*/ 0x08) @@ -3011,14 +3011,14 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) label(0x62) set_stage_flag(STAGEFLAG_TELEPORT_DONE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA label(0x08) - set_function(CHR_SELF, FUNC_TELEPORT_COOP_TO_DRCAROLL) + set_ailist(CHR_SELF, FUNC_TELEPORT_COOP_TO_DRCAROLL) // Agent label(0x09) @@ -3057,10 +3057,10 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { goto_next(0x62) label(0x61) - set_function(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) + set_ailist(CHR_ELVIS, FUNC_ELVIS_GIVE_FARSIGHT) label(0x62) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3076,11 +3076,11 @@ u8 func041c_teleport_activation_responder[] = { set_target_chr(CHR_COOP) if_chr_sees_player(/*goto*/ 0x2e) unset_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, FUNC_INIT_SNIPER) + set_ailist(CHR_SELF, FUNC_INIT_SNIPER) label(0x2e) endloop(0x04) - endfunction + endlist }; u8 func041a_init_sniper[] = { @@ -3093,7 +3093,7 @@ u8 func041a_init_sniper[] = { set_armor(70) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_SNIPER_WAIT_FOR_DETECTION) + set_ailist(CHR_SELF, FUNC_SNIPER_WAIT_FOR_DETECTION) // Agent label(0x2e) @@ -3103,17 +3103,17 @@ u8 func041a_init_sniper[] = { set_armor(70) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_SNIPER_WAIT_FOR_DETECTION) - endfunction + set_ailist(CHR_SELF, FUNC_SNIPER_WAIT_FOR_DETECTION) + endlist }; u8 func041b_sniper_wait_for_detection[] = { unset_self_chrflag(CHRCFLAG_UNEXPLODABLE) yield - set_onshot_function(FUNC_SNIPER) + set_shotlist(FUNC_SNIPER) label(0x06) set_reaction_speed(100) - set_onshot_function(FUNC_SNIPER) + set_shotlist(FUNC_SNIPER) restart_timer beginloop(0x04) @@ -3139,13 +3139,13 @@ u8 func041b_sniper_wait_for_detection[] = { set_squadron_alertness(100) set_self_chrflag(CHRCFLAG_00040000) set_chr_cloaked(CHR_SELF, TRUE, TRUE) - set_function(CHR_SELF, FUNC_SNIPER) - endfunction + set_ailist(CHR_SELF, FUNC_SNIPER) + endlist }; u8 func041d_sniper[] = { set_self_chrflag(CHRCFLAG_00000040) - set_onshot_function(FUNC_SNIPER) + set_shotlist(FUNC_SNIPER) set_chr_cloaked(CHR_SELF, TRUE, FALSE) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) @@ -3242,11 +3242,11 @@ u8 func041d_sniper[] = { label(0x10) if_chr_has_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_blonde[] = { @@ -3260,7 +3260,7 @@ u8 func040c_blonde[] = { set_chr_team(CHR_SELF, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) beginloop(0x08) if_saw_injury(0x00, /*goto*/ 0x06) @@ -3269,9 +3269,9 @@ u8 func040c_blonde[] = { endloop(0x08) label(0x06) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func100c_countdown_timer[] = { @@ -3294,8 +3294,8 @@ u8 func100c_countdown_timer[] = { label(0x06) set_stage_flag(STAGEFLAG_TIMER_EXPIRED) yield - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) // Player escaped label(0x2e) @@ -3322,15 +3322,15 @@ u8 func100c_countdown_timer[] = { // Both players dead label(0x2e) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x06) set_chr_chrflag(CHR_BOND, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_COOP, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_elvis_dead[] = { @@ -3343,8 +3343,8 @@ u8 func100e_check_elvis_dead[] = { label(0x2e) message(CHR_BOND, 0x300e) // "Elvis has been killed." set_stage_flag(STAGEFLAG_ALLY_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_check_drcaroll_dead[] = { @@ -3357,8 +3357,8 @@ u8 func100f_check_drcaroll_dead[] = { label(0x2e) message(CHR_BOND, 0x300f) // "Dr. Caroll has been killed." set_stage_flag(STAGEFLAG_ALLY_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_miniskedar_send_clones[] = { @@ -3383,7 +3383,7 @@ u8 func040f_miniskedar_send_clones[] = { yield endloop(0x04) - endfunction + endlist }; u8 func040e_init_miniskedar[] = { @@ -3399,12 +3399,12 @@ u8 func040e_init_miniskedar[] = { set_chr_team(CHR_SELF, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_MINISKEDAR) + endlist }; u8 func040f_miniskedar[] = { - set_onshot_function(FUNC_MINISKEDAR) + set_shotlist(FUNC_MINISKEDAR) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2e) @@ -3421,7 +3421,7 @@ u8 func040f_miniskedar[] = { label(0x2e) say_quip(CHR_BOND, 0x05, 0xff, 0x00, 0xff, BANK_0, 0x00, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -3497,7 +3497,7 @@ u8 func040f_miniskedar[] = { label(0x06) endloop(0x03) - endfunction + endlist }; u8 func1010_agent_hallway_spawner[] = { @@ -3511,8 +3511,8 @@ u8 func1010_agent_hallway_spawner[] = { endloop(0x03) label(0x2e) - set_function(0x25, FUNC_MINISKEDAR_SEND_CLONES) - set_function(0x26, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x25, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x26, FUNC_MINISKEDAR_SEND_CLONES) // Wait until player in a certain room beginloop(0x04) @@ -3524,8 +3524,8 @@ u8 func1010_agent_hallway_spawner[] = { label(0x2e) remove_chr(0x25) remove_chr(0x26) - set_function(0x27, FUNC_MINISKEDAR_SEND_CLONES) - set_function(0x28, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x27, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x28, FUNC_MINISKEDAR_SEND_CLONES) // Wait until player in a certain room beginloop(0x08) @@ -3537,8 +3537,8 @@ u8 func1010_agent_hallway_spawner[] = { label(0x2e) remove_chr(0x27) remove_chr(0x28) - set_function(0x2b, FUNC_MINISKEDAR_SEND_CLONES) - set_function(0x2a, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x2b, FUNC_MINISKEDAR_SEND_CLONES) + set_ailist(0x2a, FUNC_MINISKEDAR_SEND_CLONES) // Wait until player in a certain room beginloop(0x09) @@ -3547,22 +3547,22 @@ u8 func1010_agent_hallway_spawner[] = { endloop(0x09) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0411_hide[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_unused[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3575,8 +3575,8 @@ u8 func0413_cloak_and_hide[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_sa_megaweapon_spawner[] = { @@ -3606,15 +3606,15 @@ u8 func1012_sa_megaweapon_spawner[] = { call_rng if_rand_gt(86, /*goto*/ 0x63) if_rand_gt(172, /*goto*/ 0x64) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f4, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f4, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) goto_next(0x21) label(0x63) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f5, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f5, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) goto_next(0x21) label(0x64) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f6, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01f6, FUNC_INIT_SA_MEGAWEAPON_MINISKEDAR, 0x00000010, /*goto*/ 0x22) goto_next(0x21) label(0x21) @@ -3626,7 +3626,7 @@ u8 func1012_sa_megaweapon_spawner[] = { rebuild_squadrons goto_first(0x1f) - endfunction + endlist }; // SA megaweapon miniskedar @@ -3634,8 +3634,8 @@ u8 func041e_init_sa_megaweapon_miniskedar[] = { set_squadron(SQUADRON_0E) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_INIT_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_MINISKEDAR) + endlist }; /** @@ -3663,7 +3663,7 @@ u8 func041e_init_sa_megaweapon_miniskedar[] = { destroy_object(glass2) \ destroy_object(glass3) \ set_stage_flag(stageflag) \ - set_function(CHR_SELF, 0x0408) + set_ailist(CHR_SELF, 0x0408) @@ -3681,46 +3681,46 @@ u8 func1013_pa_doorcylinder1[] = { set_lights_state(0x006c, 0x04, 0x00, 0xff, 0xf0) doorcylinder_logic(0x11, 0x12, 0x13, 0x9c, STAGEFLAG_PA_EARLYDOORCYLINDER1_DESTROYED) - endfunction + endlist }; u8 func1014_pa_doorcylinder2[] = { doorcylinder_logic(0x14, 0x15, 0x16, 0x9d, STAGEFLAG_PA_EARLYDOORCYLINDER2_DESTROYED) - endfunction + endlist }; u8 func1015_pa_doorcylinder3[] = { doorcylinder_logic(0x17, 0x18, 0x19, 0x9e, STAGEFLAG_PA_EARLYDOORCYLINDER3_DESTROYED) - endfunction + endlist }; u8 func1016_pa_doorcylinder4[] = { doorcylinder_logic(0x1a, 0x1b, 0x1c, 0x9f, STAGEFLAG_PA_EARLYDOORCYLINDER4_DESTROYED) - endfunction + endlist }; u8 func1017_pa_doorcylinder5[] = { doorcylinder_logic(0x1d, 0x1e, 0x1f, 0xa0, STAGEFLAG_PA_EARLYDOORCYLINDER5_DESTROYED) - endfunction + endlist }; u8 func0408_check_pa_earlydoorcylinders_destroyed[] = { label(0x04) yield if_stage_flag_eq(STAGEFLAG_PA_EARLYDOORCYLINDER1_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_EARLYDOORCYLINDER2_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_EARLYDOORCYLINDER3_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_EARLYDOORCYLINDER4_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_EARLYDOORCYLINDER5_DESTROYED, TRUE, /*goto*/ 0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x08) if_door_state(0x09, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06) @@ -3737,7 +3737,7 @@ u8 func0408_check_pa_earlydoorcylinders_destroyed[] = { open_door(0x0a) goto_first(0x08) - endfunction + endlist }; #define pa_cylinder(glass, mine) \ @@ -3812,7 +3812,7 @@ u8 func1018_pa_door1[] = { open_door(0x0c) endloop(0x08) - endfunction + endlist }; /** @@ -3823,16 +3823,16 @@ u8 func0409_check_pa_latedoorcylinders_destroyed[] = { label(0x04) yield if_stage_flag_eq(STAGEFLAG_PA_LATEDOORCYLINDER1_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_LATEDOORCYLINDER2_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_LATEDOORCYLINDER3_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_LATEDOORCYLINDER4_DESTROYED, TRUE, /*goto*/ 0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x08) if_door_state(0x0d, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06) @@ -3843,7 +3843,7 @@ u8 func0409_check_pa_latedoorcylinders_destroyed[] = { open_door(0x0e) goto_first(0x08) - endfunction + endlist }; u8 func1019_pa_door2[] = { @@ -3851,8 +3851,8 @@ u8 func1019_pa_door2[] = { set_lights_state(0x00a9, 0x03, 0xff, 0x0a, 0x78) label(0x08) set_stage_flag(STAGEFLAG_PA_LATEDOORCYLINDER1_DESTROYED) - set_function(CHR_SELF, 0x0409) - endfunction + set_ailist(CHR_SELF, 0x0409) + endlist }; u8 func101a_pa_door3[] = { @@ -3860,8 +3860,8 @@ u8 func101a_pa_door3[] = { set_lights_state(0x00ac, 0x03, 0xff, 0x0a, 0x78) label(0x08) set_stage_flag(STAGEFLAG_PA_LATEDOORCYLINDER2_DESTROYED) - set_function(CHR_SELF, 0x0409) - endfunction + set_ailist(CHR_SELF, 0x0409) + endlist }; u8 func101b_pa_door4[] = { @@ -3869,8 +3869,8 @@ u8 func101b_pa_door4[] = { set_lights_state(0x00b4, 0x03, 0xff, 0x0a, 0x78) label(0x08) set_stage_flag(STAGEFLAG_PA_LATEDOORCYLINDER3_DESTROYED) - set_function(CHR_SELF, 0x0409) - endfunction + set_ailist(CHR_SELF, 0x0409) + endlist }; u8 func101c_pa_door5[] = { @@ -3935,34 +3935,34 @@ u8 func101c_pa_door5[] = { set_lights_state(0x00b7, 0x03, 0xff, 0x0a, 0x78) label(0x08) set_stage_flag(STAGEFLAG_PA_LATEDOORCYLINDER4_DESTROYED) - set_function(CHR_SELF, 0x0409) - endfunction + set_ailist(CHR_SELF, 0x0409) + endlist }; u8 func101d_pa_canister1[] = { pa_cylinder(0x5b, 0xa6) label(0x08) set_stage_flag(STAGEFLAG_PA_CANISTER1_DESTROYED) - set_function(CHR_SELF, 0x040a) - endfunction + set_ailist(CHR_SELF, 0x040a) + endlist }; u8 func101e_pa_canister2[] = { pa_cylinder(0x67, 0xa7) label(0x08) set_stage_flag(STAGEFLAG_PA_CANISDER2_DESTROYED) - set_function(CHR_SELF, 0x040a) - endfunction + set_ailist(CHR_SELF, 0x040a) + endlist }; u8 func040a_check_pa_canisters_destroyed[] = { label(0x04) yield if_stage_flag_eq(STAGEFLAG_PA_CANISTER1_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2e) if_stage_flag_eq(STAGEFLAG_PA_CANISDER2_DESTROYED, TRUE, /*goto*/ 0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Both canisters destroyed label(0x2e) @@ -3982,7 +3982,7 @@ u8 func040a_check_pa_canisters_destroyed[] = { open_door(0x10) goto_first(0x08) - endfunction + endlist }; /** @@ -4016,10 +4016,10 @@ u8 func101f_pa_circleroom_spawner[] = { if_num_chrs_in_squadron_gt(3, 0x0d, /*goto*/ 0x21) call_rng if_rand_gt(128, /*goto*/ 0x63) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x00dd, FUNC_INIT_PA_CIRCLEROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x00dd, FUNC_INIT_PA_CIRCLEROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x63) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x00dd, FUNC_INIT_PA_CIRCLEROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x00dd, FUNC_INIT_PA_CIRCLEROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x21) endloop(0x20) @@ -4031,16 +4031,16 @@ u8 func101f_pa_circleroom_spawner[] = { goto_first(0x1f) label(0x58) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041f_init_pa_circleroom_miniskedar[] = { set_squadron(SQUADRON_0D) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_INIT_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_MINISKEDAR) + endlist }; u8 func1020_pa_deadendroom_spawner[] = { @@ -4051,10 +4051,10 @@ u8 func1020_pa_deadendroom_spawner[] = { endloop(0x04) label(0x2e) - set_function(0x38, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) - set_function(0x39, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) - set_function(0x3a, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) - set_function(0x3b, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) + set_ailist(0x38, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) + set_ailist(0x39, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) + set_ailist(0x3a, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) + set_ailist(0x3b, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR) label(0x1f) restart_timer @@ -4068,16 +4068,16 @@ u8 func1020_pa_deadendroom_spawner[] = { if_rand_gt(64, /*goto*/ 0x63) if_rand_gt(128, /*goto*/ 0x64) if_rand_gt(196, /*goto*/ 0x65) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01af, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01af, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x63) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b0, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b0, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x64) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b1, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b1, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x65) - try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b2, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) + try_spawn_chr_at_pad(BODY_MINISKEDAR, HEAD_RANDOM, 0x01b2, FUNC_INIT_PA_DEADENDROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22) goto_next(0x21) label(0x21) endloop(0x20) @@ -4088,15 +4088,15 @@ u8 func1020_pa_deadendroom_spawner[] = { rebuild_squadrons goto_first(0x1f) - endfunction + endlist }; u8 func0420_init_pa_deadendroom_miniskedar[] = { set_squadron(SQUADRON_0B) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_INIT_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_MINISKEDAR) + endlist }; u8 func1021_c6c4[] = { @@ -4111,14 +4111,14 @@ u8 func1021_c6c4[] = { endloop(0x04) label(0x2e) - set_function(0x30, FUNC_INIT_MINISKEDAR) - set_function(0x31, FUNC_INIT_MINISKEDAR) - set_function(0x32, FUNC_INIT_MINISKEDAR) - set_function(0x33, FUNC_INIT_MINISKEDAR) - set_function(0x34, FUNC_INIT_MINISKEDAR) - set_function(0x35, FUNC_INIT_MINISKEDAR) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x30, FUNC_INIT_MINISKEDAR) + set_ailist(0x31, FUNC_INIT_MINISKEDAR) + set_ailist(0x32, FUNC_INIT_MINISKEDAR) + set_ailist(0x33, FUNC_INIT_MINISKEDAR) + set_ailist(0x34, FUNC_INIT_MINISKEDAR) + set_ailist(0x35, FUNC_INIT_MINISKEDAR) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_path(pathid, function) \ @@ -4129,56 +4129,56 @@ u8 func1021_c6c4[] = { set_armor(0) \ set_recovery_speed(0) \ set_shield(0) \ - set_return_function(CHR_SELF, function) \ + set_returnlist(CHR_SELF, function) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) u8 func0421_start_path02[] = { init_path(2, 0x0421) - endfunction + endlist }; u8 func0422_start_path03[] = { init_path(3, 0x0422) - endfunction + endlist }; u8 func0423_start_path04[] = { init_path(4, 0x0423) - endfunction + endlist }; u8 func0424_start_path05[] = { init_path(5, 0x0424) - endfunction + endlist }; u8 func0425_start_path06[] = { init_path(6, 0x0425) - endfunction + endlist }; u8 func0426_start_path07[] = { init_path(7, 0x0426) - endfunction + endlist }; u8 func0427_start_path08[] = { init_path(8, 0x0427) - endfunction + endlist }; u8 func0428_start_path09[] = { init_path(9, 0x0428) - endfunction + endlist }; u8 func0429_start_path10[] = { init_path(10, 0x0429) - endfunction + endlist }; u8 func1022_control_room[] = { @@ -4189,7 +4189,7 @@ u8 func1022_control_room[] = { label(0x2e) remove_chr(CHR_BLONDE1) remove_chr(CHR_BLONDE2) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA and PA beginloop(0x04) @@ -4212,8 +4212,8 @@ u8 func1022_control_room[] = { label(0x2e) message(CHR_P1P2, 0x3015) // "Control Room has been secured." set_stage_flag(STAGEFLAG_BLONDES_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1023_check_drcaroll_restored[] = { @@ -4249,10 +4249,10 @@ u8 func1023_check_drcaroll_restored[] = { label(0x2e) set_stage_flag(STAGEFLAG_DRCAROLL_RESTORED) label(0x08) - set_function(CHR_SELF, FUNC_MIDCUTSCENE) + set_ailist(CHR_SELF, FUNC_MIDCUTSCENE) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_update_elvis_target_chr[] = { @@ -4275,7 +4275,7 @@ u8 func1024_update_elvis_target_chr[] = { label(0x2e) goto_first(0x04) - endfunction + endlist }; u8 unregistered_function1[] = { @@ -4283,9 +4283,9 @@ u8 unregistered_function1[] = { chr_move_to_pad(CHR_ELVIS, 0x01bf, 0x01, /*goto*/ 0x06) label(0x06) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - set_function(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_ELVIS, FUNC_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1026_setup_autoguns[] = { @@ -4293,14 +4293,14 @@ u8 func1026_setup_autoguns[] = { set_autoturret_type(0xa8, 0x12) set_autoturret_type(0xa9, 0x12) set_autoturret_type(0xaa, 0x12) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042e_elvis_run_to_exit[] = { set_self_chrflag(CHRCFLAG_00080000) - set_onshot_function(FUNC_ELVIS_RUN_TO_EXIT) - set_return_function(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) + set_shotlist(FUNC_ELVIS_RUN_TO_EXIT) + set_returnlist(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) @@ -4309,7 +4309,7 @@ u8 func042e_elvis_run_to_exit[] = { // Dying label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -4371,10 +4371,10 @@ u8 func042e_elvis_run_to_exit[] = { label(0x64) say_quip(CHR_BOND, 0x28, 0xff, 0x0f, 0xff, BANK_1, 0x00, 0x00) label(0x2e) - set_onshot_function(FUNC_ELVIS_RUN_TO_EXIT) - set_return_function(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(FUNC_ELVIS_RUN_TO_EXIT) + set_returnlist(CHR_SELF, FUNC_ELVIS_RUN_TO_EXIT) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func1027_powernode_illumination[] = { @@ -4401,8 +4401,8 @@ u8 func1027_powernode_illumination[] = { label(0x06) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4424,11 +4424,11 @@ u8 func1028_enable_last_3_guards[] = { unset_chr_chrflag(0x3c, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x3d, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(0x3e, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x3c, FUNC_RUN_TO_EXIT) - set_function(0x3d, FUNC_RUN_TO_EXIT) - set_function(0x3e, FUNC_RUN_TO_EXIT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x3c, FUNC_RUN_TO_EXIT) + set_ailist(0x3d, FUNC_RUN_TO_EXIT) + set_ailist(0x3e, FUNC_RUN_TO_EXIT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func042b_run_to_exit[] = { @@ -4441,16 +4441,16 @@ u8 func042b_run_to_exit[] = { set_shield(0) label(0x04) run_to_pad(0x0000) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1429_start_lift[] = { if_coop_mode(/*goto*/ 0x45) activate_lift(1, 0x07) label(0x45) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102a_kill_pelagic_guard[] = { @@ -4462,8 +4462,8 @@ u8 func102a_kill_pelagic_guard[] = { damage_chr(0x3f, 18) yield damage_chr(0x3f, 18) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102b_proxymines[] = { @@ -4479,8 +4479,8 @@ u8 func102b_proxymines[] = { set_object_flag_bank1(OBJ_PROXYMINES, OBJECTFLAG1_INVISIBLE) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102c_lock_doors[] = { @@ -4496,12 +4496,12 @@ u8 func102c_lock_doors[] = { // A and SA label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_miniskedar_unalerted[] = { - set_onshot_function(FUNC_MINISKEDAR) + set_shotlist(FUNC_MINISKEDAR) set_self_chrflag(CHRCFLAG_00080000) set_self_chrflag(CHRCFLAG_00020000) set_accuracy(0) @@ -4522,8 +4522,8 @@ u8 func040f_miniskedar_unalerted[] = { endloop(0x04) label(0x2e) - set_function(CHR_SELF, FUNC_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_MINISKEDAR) + endlist }; u8 func0432_dead_skedar[] = { @@ -4531,10 +4531,10 @@ u8 func0432_dead_skedar[] = { label(0x08) yield - animation(ANIM_SKEDAR_COLLAPSE, -1, -1, 0x06, 0x00, 0x21, 2) + chr_do_animation(ANIM_SKEDAR_COLLAPSE, -1, -1, 0x06, 0x00, 0x21, 2) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function2[] = { @@ -4544,13 +4544,13 @@ u8 unregistered_function2[] = { endloop(0x08) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102e_open_powernode_doors_on_agent[] = { if_difficulty_lt(DIFF_SA, /*goto*/ 0x08) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Agent label(0x08) @@ -4561,8 +4561,8 @@ u8 func102e_open_powernode_doors_on_agent[] = { open_door(0x05) set_object_flag_bank0(0x05, OBJECTFLAG0_40000000) label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4576,8 +4576,8 @@ u8 func042c_elvis_stop[] = { // his function will be reassigned if he takes damage between here and the // teleport. This causes him to not teleport. label(0x2e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102f_unlock_drcaroll_door[] = { @@ -4593,8 +4593,8 @@ u8 func102f_unlock_drcaroll_door[] = { unlock_door(0x76, 0x02) unset_object_flag_bank1(0x75, OBJECTFLAG1_20000000) unset_object_flag_bank1(0x76, OBJECTFLAG1_20000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1030_unlock_agent_teleport_door[] = { @@ -4606,8 +4606,8 @@ u8 func1030_unlock_agent_teleport_door[] = { label(0x2e) unlock_door(0xb7, 0x02) unlock_door(0xb8, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4630,8 +4630,8 @@ u8 func1031_unset_trigger_buddy_warp[] = { unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) endloop(0x08) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4660,15 +4660,15 @@ u8 unregistered_function3[] = { set_stage_flag(STAGEFLAG_SA_EXIT_TELEPORT_DISABLED) goto_first(0x1f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1032_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_PROXYMINES, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1433_setup_lighting[] = { @@ -4682,8 +4682,8 @@ u8 func1433_setup_lighting[] = { misc_command(0x0008, 0x05, 0x00) misc_command(0x000c, 0x05, 0x00) misc_command(0x000d, 0x05, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1034_enable_blondes[] = { @@ -4700,11 +4700,11 @@ u8 func1034_enable_blondes[] = { label(0x2e) show_chr(CHR_BLONDE1) show_chr(CHR_BLONDE2) - set_function(CHR_BLONDE1, FUNC_BLONDE) - set_function(CHR_BLONDE2, FUNC_BLONDE) + set_ailist(CHR_BLONDE1, FUNC_BLONDE) + set_ailist(CHR_BLONDE2, FUNC_BLONDE) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102d_check_farsight_ammo_wasted[] = { @@ -4732,18 +4732,18 @@ u8 func102d_check_farsight_ammo_wasted[] = { label(0x2e) message(CHR_BOND, 0x302c) // "Ammo wasted - unable to disable megaweapon." set_stage_flag(STAGEFLAG_FARSIGHT_AMMO_WASTED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function4[] = { cmd0185_mponly rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuppete.c b/src/files/setup/setuppete.c index 03a81a2f6..d496bb90d 100644 --- a/src/files/setup/setuppete.c +++ b/src/files/setup/setuppete.c @@ -478,11 +478,11 @@ s32 path13[] = { -1, }; -#define chicago_car_do_animation(object, animation) \ +#define chicago_car_do_animation(object, chr_do_animation) \ show_object(object) \ set_object_flag_bank1(object, OBJECTFLAG1_04000000) \ set_object_flag_bank2(object, OBJECTFLAG2_00000010) \ - object_do_animation(animation, object, 0x04ff, 0xff) + object_do_animation(chr_do_animation, object, 0x04ff, 0xff) @@ -523,7 +523,7 @@ u8 func0401_3ae8[] = { unset_chr_chrflag(CHR_CIA1, CHRCFLAG_HIDDEN) label(0x00) return - endfunction + endlist }; u8 func0402_3bb4[] = { @@ -550,7 +550,7 @@ u8 func0402_3bb4[] = { unset_chr_chrflag(CHR_CIA1, CHRCFLAG_HIDDEN) label(0x00) return - endfunction + endlist }; u8 func0403_3c74[] = { @@ -574,7 +574,7 @@ u8 func0403_3c74[] = { unset_chr_chrflag(CHR_CIA1, CHRCFLAG_HIDDEN) label(0x00) return - endfunction + endlist }; u8 func0404_3ce0[] = { @@ -587,7 +587,7 @@ u8 func0404_3ce0[] = { camera_movement(0x00e0) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00e1, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x00e1, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_CIA1, CHRCFLAG_HIDDEN) chicago_wait_for_camera @@ -596,7 +596,7 @@ u8 func0404_3ce0[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) label(0x00) return - endfunction + endlist }; u8 func0405_3d50[] = { @@ -605,7 +605,7 @@ u8 func0405_3d50[] = { if_controller_button_pressed(/*goto*/ 0x00) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00df, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x00df, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_CIA1, CHRCFLAG_HIDDEN) restart_timer @@ -636,72 +636,72 @@ u8 func0405_3d50[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x00df, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x00df, -2, -1, 0x06, 0x00, CHR_BOND, 2) restart_default_music reset_ambience set_stage_flag(STAGEFLAG_INTRO_FINISHED) enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function1[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0401) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0401) + endlist }; u8 unregistered_function2[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0402) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0402) + endlist }; u8 unregistered_function3[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0403) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0403) + endlist }; u8 unregistered_function4[] = { - set_return_function(CHR_SELF, GFUNC_END_CINEMA) - set_function(CHR_SELF, 0x0404) - endfunction + set_returnlist(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, 0x0404) + endlist }; u8 unregistered_function5[] = { - set_function(CHR_SELF, 0x0405) - endfunction + set_ailist(CHR_SELF, 0x0405) + endlist }; u8 func040a_intro[] = { - set_return_function(CHR_SELF, 0x0406) - set_function(CHR_SELF, 0x0401) - endfunction + set_returnlist(CHR_SELF, 0x0406) + set_ailist(CHR_SELF, 0x0401) + endlist }; u8 func0406_3e54[] = { - set_return_function(CHR_SELF, 0x0407) - set_function(CHR_SELF, 0x0402) - endfunction + set_returnlist(CHR_SELF, 0x0407) + set_ailist(CHR_SELF, 0x0402) + endlist }; u8 func0407_3e60[] = { - set_return_function(CHR_SELF, 0x0408) - set_function(CHR_SELF, 0x0403) - endfunction + set_returnlist(CHR_SELF, 0x0408) + set_ailist(CHR_SELF, 0x0403) + endlist }; u8 func0408_3e6c[] = { - set_return_function(CHR_SELF, 0x0409) - set_function(CHR_SELF, 0x0404) - endfunction + set_returnlist(CHR_SELF, 0x0409) + set_ailist(CHR_SELF, 0x0404) + endlist }; u8 func0409_3e78[] = { - set_function(CHR_SELF, 0x0405) - endfunction + set_ailist(CHR_SELF, 0x0405) + endlist }; u8 func100f_check_mine[] = { @@ -787,15 +787,15 @@ u8 func100f_check_mine[] = { label(0x04) set_stage_flag(STAGEFLAG_MINE_WASTED) message(CHR_P1P2, 0x3248) // "Remote Mine has been wasted." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x07) set_stage_flag(STAGEFLAG_MINE_WASTED) message(CHR_P1P2, 0x3210) // "Mine placed incorrectly." label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1026_uplink[] = { @@ -835,7 +835,7 @@ u8 func1026_uplink[] = { control_sound_from_object(CHANNEL_7, OBJ_TAXI, TRUE) yield set_stage_flag(STAGEFLAG_TAXI_REPROGRAMMED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Moved away while uplinking label(0x06) @@ -856,7 +856,7 @@ u8 func1026_uplink[] = { mute_channel(CHANNEL_4) endloop(0x10) - endfunction + endlist }; u8 func040d_limo[] = { @@ -878,7 +878,7 @@ u8 func040d_limo[] = { // Wait for flag set, provided limo not destroyed beginloop(0x05) if_object_in_good_condition(OBJ_LIMO, /*goto*/ 0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) if_stage_flag_eq(STAGEFLAG_LIMO_READY_TO_LEAVE, TRUE, /*goto*/ 0x04) @@ -908,8 +908,8 @@ u8 func040d_limo[] = { set_stage_flag(STAGEFLAG_LIMO_ESCAPED) message(CHR_BOND, 0x321c) // "DataDyne limo has escaped." label(0x03) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_taxi[] = { @@ -936,7 +936,7 @@ u8 func040c_taxi[] = { // Check taxi healthy label(0x04) if_object_in_good_condition(OBJ_TAXI, /*goto*/ 0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Take off label(0x03) @@ -953,7 +953,7 @@ u8 func040c_taxi[] = { // Check taxi healthy label(0x04) if_object_in_good_condition(OBJ_TAXI, /*goto*/ 0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) set_stage_flag(STAGEFLAG_TAXI_READY_TO_CRASH) @@ -971,8 +971,8 @@ u8 func040c_taxi[] = { mute_channel(CHANNEL_0) object_do_animation(0x0169, OBJ_TAXI, 0x04ff, 0xff) label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define tracerbug_logic(chr, chr2) \ @@ -982,7 +982,7 @@ u8 func040c_taxi[] = { \ /* A or SA */ \ label(0x54) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ /* PA */ \ label(0x04) \ @@ -1026,7 +1026,7 @@ u8 func040c_taxi[] = { /* Check limo healthy */ \ label(0x04) \ if_object_in_good_condition(OBJ_LIMO, /*goto*/ 0x04) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x04) \ restart_timer \ @@ -1050,7 +1050,7 @@ u8 func040c_taxi[] = { \ label(0x04) \ set_stage_flag(STAGEFLAG_TRACERBUG_SAFE) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ /* Bug wasted */ \ label(0x07) \ @@ -1058,19 +1058,19 @@ u8 func040c_taxi[] = { if_stage_flag_eq(STAGEFLAG_ONE_BUG_REMAINING, TRUE, /*goto*/ 0x03) \ dprint 'W','R','O','N','G','2','\n',0, \ set_stage_flag(STAGEFLAG_ONE_BUG_REMAINING) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x03) \ dprint 'W','R','O','N','G','3','\n',0, \ set_stage_flag(STAGEFLAG_TRACERBUG_WASTED) \ message(chr, 0x3218) /* "Tracer Bug placed incorrectly." */ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func1004_tracerbug_bond[] = { tracerbug_logic(CHR_BOND, CHR_BOND) - endfunction + endlist }; u8 func1011_trackerbug_coop[] = { @@ -1080,11 +1080,11 @@ u8 func1011_trackerbug_coop[] = { label(0x03) set_stage_flag(STAGEFLAG_ONE_BUG_REMAINING) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x04) tracerbug_logic(CHR_COOP, CHR_PRESET) - endfunction + endlist }; u8 func1005_check_things_destroyed[] = { @@ -1126,7 +1126,7 @@ u8 func1005_check_things_destroyed[] = { label(0x03) endloop(0x10) - endfunction + endlist }; u8 func1006_check_for_end[] = { @@ -1179,7 +1179,7 @@ u8 func1006_check_for_end[] = { label(0x12) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Objectives complete label(0x05) @@ -1196,12 +1196,12 @@ u8 func1006_check_for_end[] = { label(0x03) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x04) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_limo_timing[] = { @@ -1248,8 +1248,8 @@ u8 func040d_limo_timing[] = { label(0x04) set_stage_flag(STAGEFLAG_LIMO_READY_15SEC_AGO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_taxi_timing[] = { @@ -1282,20 +1282,20 @@ u8 func040c_taxi_timing[] = { label(0x04) set_stage_flag(STAGEFLAG_TAXI_ALMOST_READY_TO_CRASH) unset_object_flag_bank1(OBJ_TAXI, OBJECTFLAG1_04000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_cia[] = { - set_return_function(CHR_SELF, FUNC_CIA) - set_onshot_function(FUNC_CIA) + set_returnlist(CHR_SELF, FUNC_CIA) + set_shotlist(FUNC_CIA) if_chr_dying(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) if_chr_idle(/*goto*/ 0x43) @@ -1352,23 +1352,23 @@ u8 func0412_cia[] = { if_rand_lt(128, /*goto*/ 0x51) if_rand_lt(196, /*goto*/ 0x52) set_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1) - animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SMOKE_CIGARETTE, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x36) label(0x50) - animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_SCRATCH_HEAD, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x36) label(0x51) - animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x36) label(0x52) - animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x36) label(0x53) - animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, 0, 100, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x36) label(0x03) @@ -1425,8 +1425,8 @@ u8 func0412_cia[] = { if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x03) if_chr_distance_gt(450, /*goto*/ 0x03) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - set_return_function(CHR_SELF, FUNC_CIA) - set_function(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) + set_returnlist(CHR_SELF, FUNC_CIA) + set_ailist(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) label(0x03) if_timer_lt(600, /*goto*/ 0x03) @@ -1447,7 +1447,7 @@ u8 func0412_cia[] = { // Saw a death label(0x1d) restart_timer - animation(ANIM_LOOK_AROUND_FRANTIC, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_FRANTIC, 0, 193, 0x10, 0x10, CHR_SELF, 2) // Shot near chr, or follow through from above beginloop(0x1e) @@ -1458,7 +1458,7 @@ u8 func0412_cia[] = { set_squadron_alertness(100) beginloop(0x38) - if_any_chr_doing_action(MA_TALKING, /*goto*/ 0x04) + if_chr_in_squadron_doing_action(MA_TALKING, /*goto*/ 0x04) goto_next(0x03) // A civilian is cowering @@ -1479,7 +1479,7 @@ u8 func0412_cia[] = { rebuild_squadrons set_action(MA_TALKING, FALSE) say_quip(CHR_BOND, 0x18, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00) - animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURRENDER_002E, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x0a) if_timer_gt(120, /*goto*/ 0x0c) @@ -1543,7 +1543,7 @@ u8 func0412_cia[] = { label(0x04) label(0x0e) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x0f) if_chr_stopped(/*goto*/ 0x03) @@ -1552,21 +1552,21 @@ u8 func0412_cia[] = { label(0x03) goto_first(0x0e) - endfunction + endlist }; u8 func0413_bugspotter[] = { #define LABEL_RUN_AWAY 0x0d set_alertness(255) - set_onshot_function(FUNC_BUGSPOTTER) + set_shotlist(FUNC_BUGSPOTTER) if_chr_dying(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) @@ -1602,7 +1602,7 @@ u8 func0413_bugspotter[] = { label(0x03) say_quip(CHR_BOND, 0x17, 0xff, 0x0a, 0xff, 0x81, 0x00, 0x00) label(0x04) - animation(ANIM_TALKING_00A3, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, -1, 0x00, 0x10, CHR_SELF, 2) // Looks like he spots if the tracer bug if he sees Jo within 8.3 seconds of // the bug landing on the limo. @@ -1633,13 +1633,13 @@ u8 func0413_bugspotter[] = { // Bug was thrown recently label(0x04) - animation(ANIM_TALKING_00A3, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_00A3, 0, -1, 0x00, 0x10, CHR_SELF, 2) assign_sound(0x044a, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) set_stage_flag(STAGEFLAG_TRACERBUG_SPOTTED) message(CHR_BOND, 0x3243) // "Tracer Bug has been spotted." - // Wait for talking animation to finish + // Wait for talking chr_do_animation to finish beginloop(0x05) if_stage_flag_eq(STAGEFLAG_LIMO_READY_TO_LEAVE, TRUE, /*goto*/ LABEL_RUN_AWAY) if_stage_flag_eq(STAGEFLAG_TAXI_READY_TO_CRASH, TRUE, /*goto*/ LABEL_RUN_AWAY) @@ -1713,7 +1713,7 @@ u8 func0413_bugspotter[] = { set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) yield drop_gun_and_fade_out - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(LABEL_RUN_AWAY) jog_to_pad(0x004f) @@ -1724,8 +1724,8 @@ u8 func0413_bugspotter[] = { label(0x04) stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define init_patroller(pathid) \ @@ -1738,7 +1738,7 @@ u8 func0413_bugspotter[] = { set_shield(0) \ assign_path(pathid) \ start_path \ - set_function(CHR_SELF, GFUNC_UNALERTED) \ + set_ailist(CHR_SELF, GFUNC_UNALERTED) \ \ beginloop(0x04) \ endloop(0x04) @@ -1747,27 +1747,27 @@ u8 func0413_bugspotter[] = { u8 func0414_start_path07[] = { init_patroller(0x07) - endfunction + endlist }; u8 func0415_start_path08[] = { init_patroller(0x08) - endfunction + endlist }; u8 func0416_start_path09[] = { init_patroller(0x09) - endfunction + endlist }; u8 func0417_start_path10[] = { init_patroller(0x0a) - endfunction + endlist }; u8 func0418_start_path11[] = { init_patroller(0x0b) - endfunction + endlist }; /** @@ -1783,28 +1783,28 @@ u8 func0419_init_cia1[] = { label(0x04) assign_path(12) start_path - set_function(CHR_SELF, FUNC_CIA) + set_ailist(CHR_SELF, FUNC_CIA) beginloop(0x04) endloop(0x04) - endfunction + endlist }; u8 func041d_fbi[] = { - set_onshot_function(FUNC_FBI) + set_shotlist(FUNC_FBI) if_chr_dying(CHR_SELF, /*goto*/ 0x04) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) if_chr_unloaded(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) if_num_times_shot_lt(1, /*goto*/ 0x19) - // Shot - wait for animation to finish + // Shot - wait for chr_do_animation to finish beginloop(0x05) if_chr_stopped(/*goto*/ 0x04) endloop(0x05) @@ -1844,7 +1844,7 @@ u8 func041d_fbi[] = { label(0x17) try_draw_weapon(MODEL_CHRDY357, WEAPON_DY357MAGNUM, 0x10000000, /*goto*/ 0x03) label(0x03) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x04) dprint 'T','R','A','C','K',' ','P','L','A','Y','E','R','\n',0, @@ -1864,7 +1864,7 @@ u8 func041d_fbi[] = { if_stage_flag_eq(STAGEFLAG_ALARM_SOUNDED, FALSE, /*goto*/ 0x04) try_draw_weapon(MODEL_CHRDY357, WEAPON_DY357MAGNUM, 0x10000000, /*goto*/ 0x03) label(0x03) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x04) restart_timer @@ -1877,7 +1877,7 @@ u8 func041d_fbi[] = { label(0x04) say_quip(CHR_BOND, 0x1b, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00) - animation(0x0266, 0, 193, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(0x0266, 0, 193, 0x00, 0x10, CHR_SELF, 2) beginloop(0x0e) if_difficulty_lt(DIFF_SA, /*goto*/ 0x03) @@ -1894,8 +1894,8 @@ u8 func041d_fbi[] = { set_stage_flag(STAGEFLAG_ALARM_SOUNDED) activate_alarm dprint 'C','R','E','A','T','E','D',' ','W','E','A','P','\n',0, - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; #define check_cia_dead(chr) \ @@ -1905,18 +1905,18 @@ u8 func041d_fbi[] = { \ /* Unreachable */ \ label(0x03) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x05) \ set_stage_flag(STAGEFLAG_CIVILIAN_DEAD) \ message(CHR_BOND, 0x321d) /* "Mission failed - unacceptable civilian casualties." */ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func1009_check_cia1_dead[] = { check_cia_dead(CHR_CIA1) - endfunction + endlist }; /** @@ -1930,31 +1930,31 @@ u8 func100a_check_cia2_dead[] = { // Stop checking this chr label(0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x05) set_stage_flag(STAGEFLAG_CIVILIAN_DEAD) message(CHR_BOND, 0x321d) // "Mission failed - unacceptable civilian casualties." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_cia3_dead[] = { check_cia_dead(CHR_CIA3) - endfunction + endlist }; u8 func100c_check_cia4_dead[] = { check_cia_dead(CHR_CIA4) - endfunction + endlist }; u8 func041b_init_robot[] = { set_accuracy(40) set_shield(100) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_10000000) - set_function(CHR_SELF, FUNC_ROBOT) - endfunction + set_ailist(CHR_SELF, FUNC_ROBOT) + endlist }; u8 func041a_robot[] = { @@ -2059,7 +2059,7 @@ u8 func041a_robot[] = { label(0x0c) assign_sound(0x1aec, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x01) label(0x04) @@ -2069,9 +2069,9 @@ u8 func041a_robot[] = { set_chr_hiddenflag(CHR_ROBOT, CHRHFLAG_00020000) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_hiddenflag(CHR_SELF, CHRHFLAG_10000000) - set_function(CHR_ROBOT, GFUNC_IDLE) + set_ailist(CHR_ROBOT, GFUNC_IDLE) set_shield(0) - animation(0x016a, 0, -1, 0x06, 0x00, CHR_SELF, 4) + chr_do_animation(0x016a, 0, -1, 0x06, 0x00, CHR_SELF, 4) beginloop(0x2d) dprint 'P','A','R','T',' ','4','\n',0, @@ -2079,8 +2079,8 @@ u8 func041a_robot[] = { goto_first(0x2d) label(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041e_sealer1[] = { @@ -2093,7 +2093,7 @@ u8 func041e_sealer1[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) beginloop(0x19) chr_toggle_p1p2(CHR_SELF) @@ -2116,9 +2116,9 @@ u8 func041e_sealer1[] = { label(0x03) unset_chr_hiddenflag(CHR_SELF, CHRHFLAG_00000400) jog_to_pad(0x00c4) - set_function(CHR_SEALER2, FUNC_JOG_TO_ACCIDENT) - set_function(CHR_SEALER3, FUNC_JOG_TO_ACCIDENT) - set_function(CHR_SEALER4, FUNC_JOG_TO_ACCIDENT) + set_ailist(CHR_SEALER2, FUNC_JOG_TO_ACCIDENT) + set_ailist(CHR_SEALER3, FUNC_JOG_TO_ACCIDENT) + set_ailist(CHR_SEALER4, FUNC_JOG_TO_ACCIDENT) beginloop(0x0d) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x03) @@ -2135,13 +2135,13 @@ u8 func041e_sealer1[] = { endloop(0x0c) label(0x03) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // Conversation label(0x04) assign_sound(0x814b, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - animation(ANIM_TALKING_0098, -1, -1, 0x02, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0098, -1, -1, 0x02, 0x00, CHR_SELF, 2) restart_timer beginloop(0x07) @@ -2152,8 +2152,8 @@ u8 func041e_sealer1[] = { label(0x03) assign_sound(0x044f, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - animation(ANIM_TALKING_0231, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) - animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SELF, 2) beginloop(0x08) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04) @@ -2163,8 +2163,8 @@ u8 func041e_sealer1[] = { label(0x03) assign_sound(0x0450, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - animation(ANIM_TALKING_0233, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) - animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) + chr_do_animation(ANIM_TALKING_0233, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) restart_timer beginloop(0x09) @@ -2175,8 +2175,8 @@ u8 func041e_sealer1[] = { label(0x03) assign_sound(0x0451, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - animation(ANIM_TALKING_0232, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) - animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) + chr_do_animation(ANIM_TALKING_0232, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) restart_timer beginloop(0x0a) @@ -2187,8 +2187,8 @@ u8 func041e_sealer1[] = { label(0x03) assign_sound(0x0452, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - animation(ANIM_TALKING_0234, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) - animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) + chr_do_animation(ANIM_TALKING_0234, -1, -1, 0x02, 0x00, CHR_SEALER3, 2) + chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, 0x02, 0x00, CHR_SEALER1, 2) beginloop(0x0b) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04) @@ -2197,7 +2197,7 @@ u8 func041e_sealer1[] = { endloop(0x0b) label(0x04) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // Alerted - seal elevator label(LABEL_ALERTED) @@ -2210,15 +2210,15 @@ u8 func041e_sealer1[] = { assign_sound(0x0469, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) message(CHR_BOND, 0x3221) // "Elevator access sealed." - animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, 0x10, 0x10, CHR_SELF, 2) beginloop(0x06) if_chr_stopped(/*goto*/ 0x04) goto_first(0x06) label(0x04) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func100d_spawn_alarm_responders[] = { @@ -2253,28 +2253,28 @@ u8 func100d_spawn_alarm_responders[] = { // Each group spawns at a different location. #define spawn_group(pad) \ - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ label(0x04) \ yield \ yield \ yield \ yield \ yield \ - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ label(0x04) \ yield \ yield \ yield \ yield \ yield \ - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ label(0x04) \ yield \ yield \ yield \ yield \ yield \ - try_spawn_chr(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ + try_spawn_chr_at_pad(BODY_G5_SWAT_GUARD, HEAD_RANDOM, pad, FUNC_ALARM_RESPONDER, 0x00000200, /*goto*/ 0x04) \ label(0x04) @@ -2337,7 +2337,7 @@ u8 func100d_spawn_alarm_responders[] = { goto_next(0x03) label(0x04) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Wait 15 seconds label(0x03) @@ -2351,7 +2351,7 @@ u8 func100d_spawn_alarm_responders[] = { label(0x04) goto_first(0x07) - endfunction + endlist }; u8 func041f_alarm_responder[] = { @@ -2374,8 +2374,8 @@ u8 func041f_alarm_responder[] = { set_self_chrflag(CHRCFLAG_00000200) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func0420_jog_to_accident[] = { @@ -2383,30 +2383,30 @@ u8 func0420_jog_to_accident[] = { label(0x03) go_to_target_pad(SPEED_JOG) - // This is a bit weird. I'm pretty sure the set_function causes this + // This is a bit weird. I'm pretty sure the set_ailist causes this // function to stop. But because the guard has been issued the // go_to_target_pad command, he'll continue to do so while running the // unalerted function. label(0x0d) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) yield if_chr_stopped(/*goto*/ 0x04) goto_first(0x0d) label(0x04) - endfunction + endlist }; u8 func040a_intro_from_gameplay[] = { - set_function(CHR_SELF, 0x040a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, 0x040a) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_setup_robot_noise[] = { play_sound_from_object2(CHANNEL_2, CHR_ROBOT, 0x80b9, 0x00, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2437,20 +2437,20 @@ u8 func1400_give_briefcases[] = { // All difficulties label(0x04) give_object_to_chr(OBJ_BRIEFCASE6, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) // Velvet doesn't exist label(0x03) hide_object(OBJ_BRIEFCASE3) hide_object(OBJ_BRIEFCASE5) hide_object(OBJ_BRIEFCASE6) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1002_rebuild_groups[] = { - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1010_elevator_switch[] = { @@ -2480,7 +2480,7 @@ u8 func1010_elevator_switch[] = { message(CHR_P1P2, 0x3230) // "Elevator door cannot be reopened." goto_first(0x10) - endfunction + endlist }; u8 func1001_objectives_failed_msg[] = { @@ -2489,8 +2489,8 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(CHR_CIA2, CHRCFLAG_04000000) set_chr_chrflag(CHR_CIA3, CHRCFLAG_04000000) set_chr_chrflag(CHR_CIA4, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1014_crash[] = { @@ -2521,8 +2521,8 @@ u8 func1014_crash[] = { move_object_to_pad(OBJ_MINE2, 0x001c) destroy_object(OBJ_MINE2) set_stage_flag(STAGEFLAG_CRASH_FINISHED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040a_intro_sfx[] = { @@ -2669,7 +2669,7 @@ u8 func040a_intro_sfx[] = { mute_channel(CHANNEL_7) goto_first(0x2b) - endfunction + endlist }; u8 func040b_outro[] = { @@ -2677,7 +2677,7 @@ u8 func040b_outro[] = { set_music_track(MUSIC_CHICAGO_OUTRO) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) open_door2(0x10) open_door2(0x11) hide_object(OBJ_TAXI) @@ -2690,7 +2690,7 @@ u8 func040b_outro[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0179, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0179, -1, -1, 0x06, 0x00, CHR_P1P2, 4) restart_timer set_cutscene_weapon(CHR_P1P2, -1, -1) @@ -2763,8 +2763,8 @@ u8 func040b_outro[] = { mute_channel(CHANNEL_10) label(0x04) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_update_robot_position_flags[] = { @@ -2793,7 +2793,7 @@ u8 func1012_update_robot_position_flags[] = { label(0x03) endloop(0x02) - endfunction + endlist }; u8 func1416_setup_rain[] = { @@ -2836,14 +2836,14 @@ u8 func1416_setup_rain[] = { enable_rain(3) goto_first(0x05) - endfunction + endlist }; u8 func041c_hiddenguy[] = { set_chr_chrflag(CHR_HIDDENGUY, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_HIDDENGUY, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2864,10 +2864,10 @@ u8 func1017_drain_guards[] = { unset_chr_chrflag(0x12, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x11, CHRHFLAG_00400000) set_chr_hiddenflag(0x12, CHRHFLAG_00400000) - set_function(0x11, GFUNC_ALERTED) - set_function(0x12, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x11, GFUNC_ALERTED) + set_ailist(0x12, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_keep_door_open[] = { @@ -2879,13 +2879,13 @@ u8 func1018_keep_door_open[] = { open_door(0x1a) endloop(0x10) - endfunction + endlist }; u8 func1019_setup_topstairs_death_animation[] = { set_chr_special_death_animation(CHR_TOPSTAIRS, 0x05) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040e_6064[] = { @@ -2896,8 +2896,8 @@ u8 func040e_6064[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040f_6088[] = { @@ -2909,7 +2909,7 @@ u8 func040f_6088[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x03) set_chr_dodge_rating(2, 0x0a) set_accuracy(4) @@ -2918,8 +2918,8 @@ u8 func040f_6088[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0410_60d0[] = { @@ -2930,8 +2930,8 @@ u8 func0410_60d0[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0411_60f4[] = { @@ -2943,8 +2943,8 @@ u8 func0411_60f4[] = { set_armor(0) set_recovery_speed(40) set_shield(0) - set_function(CHR_SELF, FUNC_FBI) - endfunction + set_ailist(CHR_SELF, FUNC_FBI) + endlist }; u8 func101a_msg_onlyplace[] = { @@ -2956,8 +2956,8 @@ u8 func101a_msg_onlyplace[] = { label(0x03) speak(CHR_P1P2, 0x323c, 0x8179, CHANNEL_6, COLOR_09_BLUE) // "The only place we could secure the equipment was a..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101b_msg_blockedupdoors[] = { @@ -2977,8 +2977,8 @@ u8 func101b_msg_blockedupdoors[] = { label(0x03) speak(CHR_P1P2, 0x323d, 0x73b1, CHANNEL_6, COLOR_09_BLUE) // "Either of those blocked-up doors will do as an esc..." label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_msg_reprogramthattaxi[] = { @@ -3000,8 +3000,8 @@ u8 func101c_msg_reprogramthattaxi[] = { label(0x03) speak(CHR_P1P2, 0x323e, 0x817a, CHANNEL_6, COLOR_09_BLUE) // "Reprogram that taxi - it's a Mark 2 and should be ..." label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_msg_pointofingress[] = { @@ -3012,8 +3012,8 @@ u8 func101d_msg_pointofingress[] = { label(0x03) speak(CHR_P1P2, 0x323f, 0x817b, CHANNEL_6, COLOR_09_BLUE) // "That car park lift is your only point of ingress." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_check_sealer_guards_dead[] = { @@ -3046,8 +3046,8 @@ u8 func101e_check_sealer_guards_dead[] = { set_stage_flag(STAGEFLAG_DIVERSION_CREATED) label(0x03) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_elevator_doors[] = { @@ -3064,12 +3064,12 @@ u8 func1020_elevator_doors[] = { label(0x03) close_door(0x10) close_door(0x11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** - * Guard at top stairs: Turn off special death animation if he's moved away from + * Guard at top stairs: Turn off special death chr_do_animation if he's moved away from * his pad or if Jo has climbed the staircase. */ u8 func1021_check_topstairs_guy[] = { @@ -3085,8 +3085,8 @@ u8 func1021_check_topstairs_guy[] = { set_chr_special_death_animation(CHR_TOPSTAIRS, 0) unset_chr_chrflag(CHR_TOPSTAIRS, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION) unset_chr_flag_bankx(CHR_TOPSTAIRS, CHRFLAG1_00001000, BANK_1) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_limo_flags[] = { @@ -3111,7 +3111,7 @@ u8 func040d_limo_flags[] = { beginloop(0x2d) if_object_in_good_condition(OBJ_LIMO, /*goto*/ 0x03) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) if_timer_gt(596, /*goto*/ 0x03) endloop(0x2d) @@ -3120,8 +3120,8 @@ u8 func040d_limo_flags[] = { hide_object(OBJ_LIMO) set_object_flag_bank0(OBJ_LIMO, OBJECTFLAG0_INVINCIBLE) set_object_flag_bank1(OBJ_LIMO, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1423_setup_lighting[] = { @@ -3188,8 +3188,8 @@ u8 func1423_setup_lighting[] = { misc_command(0x0066, 0x05, 0x01) misc_command(0x0067, 0x05, 0x01) misc_command(0x0068, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_cia_invincibility[] = { @@ -3219,15 +3219,15 @@ u8 func0412_cia_invincibility[] = { unset_chr_chrflag(CHR_CIA2, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_CIA3, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_CIA4, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1025_rtracker[] = { yield set_object_flag_bank2(OBJ_FALCON2, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1027_untrack_dumpster[] = { @@ -3241,8 +3241,8 @@ u8 func1027_untrack_dumpster[] = { label(0x03) unset_object_flag_bank2(OBJ_DUMPSTER, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index b193f2b1b..0b3bb8165 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -545,8 +545,8 @@ u8 func1001_objectives_failed_msg[] = { set_chr_chrflag(0x15, CHRCFLAG_04000000) set_chr_chrflag(0x16, CHRCFLAG_04000000) set_chr_chrflag(0x17, CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { @@ -556,13 +556,13 @@ u8 func1400_setup_counterop[] = { set_chr_team(CHR_ANTI, TEAM_04) chr_draw_weapon(CHR_BOND, WEAPON_UNARMED) chr_draw_weapon(CHR_COOP, WEAPON_UNARMED) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1003_rebuild_groups[] = { - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1024_give_objects[] = { @@ -592,8 +592,8 @@ u8 func1024_give_objects[] = { give_object_to_chr(OBJ_DATAUPLINK_COOP, CHR_COOP) give_object_to_chr(OBJ_REMOTEMINE_COOP, CHR_COOP) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_reassign_ailists_during_conversation[] = { @@ -609,29 +609,29 @@ u8 func1004_reassign_ailists_during_conversation[] = { dprint 'b','4',' ','s','h','i','e','l','d',' ','c','h','e','c','k','\n',0, set_stage_flag(STAGEFLAG_00100000) set_chr_target_chr(CHR_PRESIDENT, CHR_P1P2) - set_function(0x01, FUNC_BE_UNALERT) - set_function(CHR_STEWARDESS, FUNC_BE_UNALERT) - set_function(CHR_STEWARD, FUNC_BE_UNALERT) - set_function(0x04, FUNC_BE_UNALERT) - set_function(0x05, FUNC_BE_UNALERT) - set_function(0x06, FUNC_BE_UNALERT) - set_function(0x07, FUNC_BE_UNALERT) - set_function(0x08, FUNC_BE_UNALERT) - set_function(0x09, FUNC_BE_UNALERT) - set_function(0x0a, FUNC_BE_UNALERT) - set_function(0x0b, FUNC_BE_UNALERT) - set_function(0x0c, FUNC_BE_UNALERT) - set_function(0x0d, FUNC_BE_UNALERT) - set_function(0x0e, FUNC_BE_UNALERT) - set_function(0x0f, FUNC_BE_UNALERT) - set_function(0x10, FUNC_BE_UNALERT) - set_function(0x11, FUNC_BE_UNALERT) - set_function(0x12, FUNC_BE_UNALERT) - set_function(0x13, FUNC_BE_UNALERT) - set_function(0x14, FUNC_BE_UNALERT) - set_function(0x15, FUNC_BE_UNALERT) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x01, FUNC_BE_UNALERT) + set_ailist(CHR_STEWARDESS, FUNC_BE_UNALERT) + set_ailist(CHR_STEWARD, FUNC_BE_UNALERT) + set_ailist(0x04, FUNC_BE_UNALERT) + set_ailist(0x05, FUNC_BE_UNALERT) + set_ailist(0x06, FUNC_BE_UNALERT) + set_ailist(0x07, FUNC_BE_UNALERT) + set_ailist(0x08, FUNC_BE_UNALERT) + set_ailist(0x09, FUNC_BE_UNALERT) + set_ailist(0x0a, FUNC_BE_UNALERT) + set_ailist(0x0b, FUNC_BE_UNALERT) + set_ailist(0x0c, FUNC_BE_UNALERT) + set_ailist(0x0d, FUNC_BE_UNALERT) + set_ailist(0x0e, FUNC_BE_UNALERT) + set_ailist(0x0f, FUNC_BE_UNALERT) + set_ailist(0x10, FUNC_BE_UNALERT) + set_ailist(0x11, FUNC_BE_UNALERT) + set_ailist(0x12, FUNC_BE_UNALERT) + set_ailist(0x13, FUNC_BE_UNALERT) + set_ailist(0x14, FUNC_BE_UNALERT) + set_ailist(0x15, FUNC_BE_UNALERT) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_check_neutrals_killed[] = { @@ -667,22 +667,22 @@ u8 func1005_check_neutrals_killed[] = { set_stage_flag(STAGEFLAG_KILLED_NEUTRALS) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0401_init_stripes[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0402_init_elvis[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_hijack[] = { @@ -727,52 +727,52 @@ u8 func1006_hijack[] = { set_chr_health(0x17, 10) set_chr_health(CHR_PILOT1, 10) set_chr_health(CHR_PILOT2, 10) - set_function(0x01, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x01, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(CHR_STEWARDESS, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(CHR_STEWARDESS, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(CHR_STEWARD, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(CHR_STEWARD, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x04, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x04, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x05, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x05, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x06, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x06, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x07, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x07, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x08, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x08, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x09, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x09, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x0a, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x0a, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x0b, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x0b, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x0c, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x0c, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x0d, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x0d, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x10, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x10, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x12, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x12, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x13, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x13, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x15, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x15, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x16, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x16, FUNC_REMOVE_IF_OFFSCREEN) yield - set_function(0x17, FUNC_REMOVE_IF_OFFSCREEN) - set_function(0x0e, FUNC_INIT_DEFEND_PAD) - set_function(0x0f, FUNC_INIT_DEFEND_PAD) - set_function(0x11, FUNC_INIT_DEFEND_PAD) - set_function(0x14, FUNC_INIT_DEFEND_PAD) + set_ailist(0x17, FUNC_REMOVE_IF_OFFSCREEN) + set_ailist(0x0e, FUNC_INIT_DEFEND_PAD) + set_ailist(0x0f, FUNC_INIT_DEFEND_PAD) + set_ailist(0x11, FUNC_INIT_DEFEND_PAD) + set_ailist(0x14, FUNC_INIT_DEFEND_PAD) yield #define enable_stripes_chr(chr, function) \ show_chr(chr) \ - set_function(chr, function) \ + set_ailist(chr, function) \ unset_chr_chrflag(chr, CHRCFLAG_HIDDEN) \ set_chr_hiddenflag(chr, CHRHFLAG_00400000) \ yield @@ -827,12 +827,12 @@ u8 func1006_hijack[] = { rebuild_squadrons unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISED) unset_chr_hiddenflag(CHR_COOP, CHRHFLAG_DISGUISED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_stripes[] = { - set_return_function(CHR_SELF, FUNC_STRIPES) + set_returnlist(CHR_SELF, FUNC_STRIPES) set_self_chrflag(CHRCFLAG_00000040) beginloop(0x04) @@ -842,7 +842,7 @@ u8 func0403_stripes[] = { yield unset_self_flag_bankx(CHRFLAG1_00001000, BANK_1) stop_chr - set_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) // Got target label(0x06) @@ -850,26 +850,26 @@ u8 func0403_stripes[] = { if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) - set_return_function(CHR_SELF, FUNC_STRIPES) - set_onshot_function(FUNC_STRIPES) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_STRIPES) + set_shotlist(FUNC_STRIPES) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x06) unset_self_flag_bankx(CHRFLAG1_00001000, BANK_1) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_return_function(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) label(0x2d) set_target_chr(-1) stop_chr endloop(0x04) - endfunction + endlist }; u8 unregistered_function1[] = { - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; #define check_mine_wasted(chr1, chr2, myflag, buddyflag) \ @@ -941,24 +941,24 @@ u8 unregistered_function1[] = { message(CHR_BOND, 0x3615) /* "UFO attachment damaged." */ \ set_stage_flag(STAGEFLAG_UFO_ATTACHMENT_DAMAGED) \ unset_stage_flag(STAGEFLAG_BOTH_MINES_WASTED) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ /* Mine wasted */ \ label(0x0a) \ set_stage_flag(myflag) \ if_stage_flag_eq(buddyflag, TRUE, /*goto*/ 0x2d) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ \ label(0x2d) \ message(CHR_BOND, 0x3645) /* "Timed mine has been wasted." */ \ set_stage_flag(STAGEFLAG_BOTH_MINES_WASTED) \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 func1008_check_mine_wasted_bond[] = { check_mine_wasted(CHR_BOND, CHR_TARGET, STAGEFLAG_BOND_MINE_WASTED, STAGEFLAG_COOP_MINE_WASTED) - endfunction + endlist }; u8 func1021_check_mine_wasted_coop[] = { @@ -966,11 +966,11 @@ u8 func1021_check_mine_wasted_coop[] = { goto_next(0x06) label(0x2d) set_stage_flag(STAGEFLAG_COOP_MINE_WASTED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) check_mine_wasted(CHR_COOP, CHR_COOP, STAGEFLAG_COOP_MINE_WASTED, STAGEFLAG_BOND_MINE_WASTED) - endfunction + endlist }; u8 func101e_blow_mines[] = { @@ -1065,8 +1065,8 @@ u8 func101e_blow_mines[] = { hide_object(0x30) hide_object(0x31) hide_object(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_end_level[] = { @@ -1093,7 +1093,7 @@ u8 func1009_check_end_level[] = { // Both players dead label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Redundant check label(0x06) @@ -1110,13 +1110,13 @@ u8 func1009_check_end_level[] = { label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x06) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func100a_autopilot_switch[] = { @@ -1152,24 +1152,24 @@ u8 func100a_autopilot_switch[] = { label(0x06) misc_command(0x0000, 0x0d, 0x00) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Switch destroyed label(0x08) message(CHR_P1P2, 0x3619) // "Autopilot systems have been destroyed." set_stage_flag(STAGEFLAG_AUTOPILOT_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0406_init_president[] = { set_chr_health(CHR_SELF, 0) - set_function(CHR_SELF, FUNC_PRESIDENT_IN_ROOM) - endfunction + set_ailist(CHR_SELF, FUNC_PRESIDENT_IN_ROOM) + endlist }; u8 func0405_president_in_room[] = { - set_onshot_function(FUNC_PRESIDENT_IN_ROOM) + set_shotlist(FUNC_PRESIDENT_IN_ROOM) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) if_chr_dying(CHR_SELF, /*goto*/ 0x2d) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) @@ -1177,8 +1177,8 @@ u8 func0405_president_in_room[] = { // Dying label(0x2d) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -1194,8 +1194,8 @@ u8 func0405_president_in_room[] = { // Dying label(0x2d) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) set_target_chr(CHR_PRESET) @@ -1287,34 +1287,34 @@ u8 func0405_president_in_room[] = { set_chr_hiddenflag(CHR_COOP, CHRHFLAG_DISGUISE_UNCOVERED) speak(CHR_TARGET, 0x3624, 0x12c4, CHANNEL_6, COLOR_08_RED) // "Security, SECURITY!!" restart_timer - animation(0x0231, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x0231, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x77) if_timer_gt(120, /*goto*/ 0x06) endloop(0x77) label(0x06) - set_function(0x01, GFUNC_UNALERTED) - set_function(CHR_STEWARDESS, GFUNC_UNALERTED) - set_function(CHR_STEWARD, GFUNC_UNALERTED) - set_function(0x04, GFUNC_UNALERTED) - set_function(0x05, GFUNC_UNALERTED) - set_function(0x06, GFUNC_UNALERTED) - set_function(0x07, GFUNC_UNALERTED) - set_function(0x08, GFUNC_UNALERTED) - set_function(0x09, GFUNC_UNALERTED) - set_function(0x0a, GFUNC_UNALERTED) - set_function(0x0b, GFUNC_UNALERTED) - set_function(0x0c, GFUNC_UNALERTED) - set_function(0x0d, GFUNC_UNALERTED) - set_function(0x0e, GFUNC_UNALERTED) - set_function(0x0f, GFUNC_UNALERTED) - set_function(0x10, GFUNC_UNALERTED) - set_function(0x11, GFUNC_UNALERTED) - set_function(0x12, GFUNC_UNALERTED) - set_function(0x13, GFUNC_UNALERTED) - set_function(0x14, GFUNC_UNALERTED) - set_function(0x15, GFUNC_UNALERTED) + set_ailist(0x01, GFUNC_UNALERTED) + set_ailist(CHR_STEWARDESS, GFUNC_UNALERTED) + set_ailist(CHR_STEWARD, GFUNC_UNALERTED) + set_ailist(0x04, GFUNC_UNALERTED) + set_ailist(0x05, GFUNC_UNALERTED) + set_ailist(0x06, GFUNC_UNALERTED) + set_ailist(0x07, GFUNC_UNALERTED) + set_ailist(0x08, GFUNC_UNALERTED) + set_ailist(0x09, GFUNC_UNALERTED) + set_ailist(0x0a, GFUNC_UNALERTED) + set_ailist(0x0b, GFUNC_UNALERTED) + set_ailist(0x0c, GFUNC_UNALERTED) + set_ailist(0x0d, GFUNC_UNALERTED) + set_ailist(0x0e, GFUNC_UNALERTED) + set_ailist(0x0f, GFUNC_UNALERTED) + set_ailist(0x10, GFUNC_UNALERTED) + set_ailist(0x11, GFUNC_UNALERTED) + set_ailist(0x12, GFUNC_UNALERTED) + set_ailist(0x13, GFUNC_UNALERTED) + set_ailist(0x14, GFUNC_UNALERTED) + set_ailist(0x15, GFUNC_UNALERTED) set_stage_flag(STAGEFLAG_PRESIDENT_CALLED_SECURITY) yield set_squadron_alertness(100) @@ -1413,18 +1413,18 @@ u8 func0405_president_in_room[] = { label(0x06) set_follow_chr(CHR_TARGET) set_chr_health(CHR_SELF, 500) - set_onshot_function(FUNC_PRESIDENT_RUNNING) - set_function(CHR_SELF, FUNC_PRESIDENT_RUNNING) + set_shotlist(FUNC_PRESIDENT_RUNNING) + set_ailist(CHR_SELF, FUNC_PRESIDENT_RUNNING) label(0x86) goto_first(0x85) - endfunction + endlist }; u8 func0404_president_running[] = { set_self_chrflag(CHRCFLAG_01000000) - set_onshot_function(FUNC_PRESIDENT_RUNNING) + set_shotlist(FUNC_PRESIDENT_RUNNING) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) @@ -1433,7 +1433,7 @@ u8 func0404_president_running[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x54) @@ -1443,8 +1443,8 @@ u8 func0404_president_running[] = { label(0x06) assign_sound(0x1abf, CHANNEL_6) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x2d) @@ -1469,7 +1469,7 @@ u8 func0404_president_running[] = { if_chr_stopped(/*goto*/ 0x55) endloop(0x56) - // Not injured, or injury animation finished + // Not injured, or injury chr_do_animation finished label(0x55) stop_chr restart_timer @@ -1585,7 +1585,7 @@ u8 func0404_president_running[] = { set_chr_team(CHR_SELF, TEAM_NONCOMBAT) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Player is in the entrace to Trent's room and both blondes are dead. // The intention behind this code is to make the president cower until the @@ -1602,7 +1602,7 @@ u8 func0404_president_running[] = { // Unreachable under real conditions label(0x0b) - animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, -1, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x83) if_stage_flag_eq(STAGEFLAG_BOTH_BLONDES_DEAD, TRUE, /*goto*/ 0x06) @@ -1616,8 +1616,8 @@ u8 func0404_president_running[] = { label(0x06) goto_first(0x55) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_president_dead[] = { @@ -1630,8 +1630,8 @@ u8 func100b_check_president_dead[] = { label(0x06) set_stage_flag(STAGEFLAG_PRESIDENT_DEAD) message(CHR_BOND, 0x361a) // "The President has been incapacitated." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0409_unused[] = { @@ -1646,25 +1646,25 @@ u8 func0409_unused[] = { if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) - set_return_function(CHR_SELF, 0x0409) - set_onshot_function(0x0409) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, 0x0409) + set_shotlist(0x0409) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x2d) endloop(0x04) label(0x06) unset_self_flag_bankx(CHRFLAG1_00001000, BANK_1) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** * This stripes guard is in one of the cockpit rooms. */ u8 func100c_cockpit_stripes[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) set_chr_team(CHR_SELF, TEAM_04) rebuild_teams rebuild_squadrons @@ -1689,17 +1689,17 @@ u8 func100c_cockpit_stripes[] = { if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2d) - set_return_function(CHR_SELF, FUNC_COCKPIT_STRIPES) - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_COCKPIT_STRIPES) + set_shotlist(GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x2d) endloop(0x04) label(0x06) unset_self_flag_bankx(CHRFLAG1_00001000, BANK_1) - set_function(CHR_SELF, GFUNC_UNALERTED) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0413_taker1[] = { @@ -1714,8 +1714,8 @@ u8 func0413_taker1[] = { set_recovery_speed(30) set_shield(0) set_target_chr(CHR_PILOT1) - set_function(CHR_SELF, FUNC_TAKER) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER) + endlist }; u8 func0413_taker2[] = { @@ -1730,12 +1730,12 @@ u8 func0413_taker2[] = { set_recovery_speed(30) set_shield(0) set_target_chr(CHR_PILOT2) - set_function(CHR_SELF, FUNC_TAKER) - endfunction + set_ailist(CHR_SELF, FUNC_TAKER) + endlist }; u8 func0413_taker[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_team(CHR_SELF, TEAM_04) rebuild_teams @@ -1797,8 +1797,8 @@ u8 func0413_taker[] = { label(0x11) label(0x06) unset_self_flag_bankx(CHRFLAG1_00001000, BANK_1) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func100c_cockpit[] = { @@ -1814,7 +1814,7 @@ u8 func100c_cockpit[] = { // All objectives complete label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // UFO attachment damaged label(0x2e) @@ -1916,7 +1916,7 @@ u8 func100c_cockpit[] = { label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable label(0x7c) @@ -1925,7 +1925,7 @@ u8 func100c_cockpit[] = { set_stage_flag(STAGEFLAG_PLANE_STABILIZED) message(CHR_BOND, 0x361c) // "Pilots have been saved." reset_ambience - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable label(0x08) @@ -1933,17 +1933,17 @@ u8 func100c_cockpit[] = { // Plane stabilized or all objectives complete label(0x11) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * Assigned to a pilot and a cyclone guard. */ u8 func0411_typing_guy[] = { - set_onshot_function(FUNC_TYPING_GUY) + set_shotlist(FUNC_TYPING_GUY) label(0x04) - animation(ANIM_SITTING_TYPING, 0, -1, 0x04, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_TYPING, 0, -1, 0x04, 0x10, CHR_SELF, 2) beginloop(0x03) if_chr_idle(/*goto*/ 0x06) @@ -1952,16 +1952,16 @@ u8 func0411_typing_guy[] = { label(0x06) endloop(0x03) - endfunction + endlist }; /** * Assigned to a pilot and a cyclone guard. */ u8 func0412_sitting_guy[] = { - set_onshot_function(FUNC_SITTING_GUY) + set_shotlist(FUNC_SITTING_GUY) label(0x04) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x04, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x04, 0x10, CHR_SELF, 2) beginloop(0x03) if_chr_idle(/*goto*/ 0x06) @@ -1970,7 +1970,7 @@ u8 func0412_sitting_guy[] = { label(0x06) endloop(0x03) - endfunction + endlist }; u8 func0426_start_path00[] = { @@ -1983,8 +1983,8 @@ u8 func0426_start_path00[] = { set_shield(0) assign_path(0) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0427_start_path01[] = { @@ -1997,15 +1997,15 @@ u8 func0427_start_path01[] = { set_shield(0) assign_path(1) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0428_start_path02[] = { assign_path(2) start_path - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1002_intro[] = { @@ -2016,15 +2016,15 @@ u8 func1002_intro[] = { set_chr_chrflag(0x30, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x30, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x30, CHRHFLAG_00020000) - animation(0x018f, -1, -1, 0x06, 0x00, 0x30, 4) + chr_do_animation(0x018f, -1, -1, 0x06, 0x00, 0x30, 4) set_chr_chrflag(0x31, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x31, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x31, CHRHFLAG_00020000) - animation(0x018d, -1, -1, 0x06, 0x00, 0x31, 4) + chr_do_animation(0x018d, -1, -1, 0x06, 0x00, 0x31, 4) set_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_PRESIDENT, CHRHFLAG_00020000) - animation(0x018e, -1, -1, 0x06, 0x00, CHR_PRESIDENT, 4) + chr_do_animation(0x018e, -1, -1, 0x06, 0x00, CHR_PRESIDENT, 4) set_chr_chrflag(0x13, CHRCFLAG_HIDDEN) set_chr_chrflag(0x14, CHRCFLAG_HIDDEN) restart_timer @@ -2128,7 +2128,7 @@ u8 func1002_intro[] = { if_controller_button_pressed(/*goto*/ 0x5f) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01d1, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01d1, -1, -1, 0x06, 0x00, CHR_BOND, 4) beginloop(0x09) if_camera_animating(/*goto*/ 0x2d) @@ -2152,7 +2152,7 @@ u8 func1002_intro[] = { if_controller_button_pressed(/*goto*/ 0x5f) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x01d3, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x01d3, -1, -1, 0x06, 0x00, CHR_BOND, 4) beginloop(0x0a) if_camera_animating(/*goto*/ 0x2d) @@ -2170,20 +2170,20 @@ u8 func1002_intro[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) if_eeprom_flag_is_set(EEPROMFLAG_AF1_ENTRY, /*goto*/ 0x06) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) - animation(0x01d3, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01d3, -2, -1, 0x06, 0x00, CHR_BOND, 2) goto_next(0x2d) label(0x06) - animation(0x01d1, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x01d1, -2, -1, 0x06, 0x00, CHR_BOND, 2) label(0x2d) restart_default_music reset_ambience unset_chr_chrflag(0x13, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x14, CHRCFLAG_HIDDEN) - set_function(CHR_PRESIDENT, FUNC_INIT_PRESIDENT) - set_function(0x09, FUNC_INIT_NEUTRAL) - set_function(0x0a, FUNC_INIT_NEUTRAL) - set_function(0x0c, FUNC_INIT_NEUTRAL) - set_function(0x0d, FUNC_INIT_NEUTRAL) + set_ailist(CHR_PRESIDENT, FUNC_INIT_PRESIDENT) + set_ailist(0x09, FUNC_INIT_NEUTRAL) + set_ailist(0x0a, FUNC_INIT_NEUTRAL) + set_ailist(0x0c, FUNC_INIT_NEUTRAL) + set_ailist(0x0d, FUNC_INIT_NEUTRAL) remove_chr(0x30) remove_chr(0x31) unset_chr_chrflag(0x30, CHRCFLAG_UNPLAYABLE) @@ -2191,8 +2191,8 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_PRESIDENT, CHRCFLAG_UNPLAYABLE) set_stage_flag(STAGEFLAG_INTRO_FINISHED) enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -2256,7 +2256,7 @@ u8 func1010_dumbwaiter1[] = { label(0x2d) goto_first(0x03) - endfunction + endlist }; u8 func1011_dumbwaiter2[] = { @@ -2305,12 +2305,12 @@ u8 func1011_dumbwaiter2[] = { label(0x2d) goto_first(0x03) - endfunction + endlist }; u8 func040a_defend_pad[] = { - set_onshot_function(FUNC_DEFEND_PAD) - set_return_function(CHR_SELF, FUNC_DEFEND_PAD) + set_shotlist(FUNC_DEFEND_PAD) + set_returnlist(CHR_SELF, FUNC_DEFEND_PAD) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) if_chr_dying(CHR_SELF, /*goto*/ 0x2d) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) @@ -2318,8 +2318,8 @@ u8 func040a_defend_pad[] = { // Dying label(0x2d) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -2362,17 +2362,17 @@ u8 func040a_defend_pad[] = { // Detected enemy label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_DEFEND_PAD) - set_onshot_function(FUNC_DEFEND_PAD) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, FUNC_DEFEND_PAD) + set_shotlist(FUNC_DEFEND_PAD) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; /** * Unused, but would have been assigned to a cyclone guard. */ u8 func040b_defend_president[] = { - set_onshot_function(FUNC_DEFEND_PRESIDENT) + set_shotlist(FUNC_DEFEND_PRESIDENT) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) if_self_distance_to_chr_lt(200, CHR_PRESIDENT, /*goto*/ 0x06) @@ -2409,10 +2409,10 @@ u8 func040b_defend_president[] = { // Detected enemy label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_DEFEND_PRESIDENT) - set_onshot_function(FUNC_DEFEND_PRESIDENT) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, FUNC_DEFEND_PRESIDENT) + set_shotlist(FUNC_DEFEND_PRESIDENT) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func0415_cloner1[] = { @@ -2447,7 +2447,7 @@ u8 func0415_cloner1[] = { // Line of sight to player label(0x08) - set_function(CHR_SELF, FUNC_CLONE1) + set_ailist(CHR_SELF, FUNC_CLONE1) // Chr flag is unset label(0x4f) @@ -2475,8 +2475,8 @@ u8 func0415_cloner1[] = { // UFO attachment damaged label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0416_init_clone1[] = { @@ -2494,16 +2494,16 @@ u8 func0416_init_clone1[] = { rebuild_squadrons try_inherit_properties(0x35, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_CLONE1) - endfunction + set_ailist(CHR_SELF, FUNC_CLONE1) + endlist }; u8 func0417_clone1[] = { // Pad is at the cockpit door run_to_pad(0x0042) - set_return_function(CHR_SELF, FUNC_CLONE1) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE1) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0418_cloner2[] = { @@ -2543,7 +2543,7 @@ u8 func0418_cloner2[] = { // Line of sight to player label(0x08) - set_function(CHR_SELF, FUNC_CLONE2) + set_ailist(CHR_SELF, FUNC_CLONE2) // Chr flag is unset label(0x4f) @@ -2571,8 +2571,8 @@ u8 func0418_cloner2[] = { // UFO attachment damaged label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0419_init_clone2[] = { @@ -2590,16 +2590,16 @@ u8 func0419_init_clone2[] = { rebuild_squadrons try_inherit_properties(0x36, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_CLONE2) - endfunction + set_ailist(CHR_SELF, FUNC_CLONE2) + endlist }; u8 func041a_clone2[] = { // Pad is at back of the plane, top floor run_to_pad(0x005c) - set_return_function(CHR_SELF, FUNC_CLONE2) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE2) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -2641,7 +2641,7 @@ u8 func041b_cloner3[] = { reloop(0x04) label(0x08) - set_function(CHR_SELF, FUNC_CLONE3) + set_ailist(CHR_SELF, FUNC_CLONE3) label(0x4f) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) reloop(0x04) @@ -2663,8 +2663,8 @@ u8 func041b_cloner3[] = { endloop(0x04) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041c_init_clone3[] = { @@ -2682,8 +2682,8 @@ u8 func041c_init_clone3[] = { rebuild_squadrons try_inherit_properties(0x37, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_CLONE3) - endfunction + set_ailist(CHR_SELF, FUNC_CLONE3) + endlist }; u8 func041d_clone3[] = { @@ -2691,9 +2691,9 @@ u8 func041d_clone3[] = { try_run_to_target_chr(/*goto*/ 0x04) label(0x04) yield - set_return_function(CHR_SELF, FUNC_CLONE3) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, FUNC_CLONE3) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func041f_init_blonde[] = { @@ -2707,8 +2707,8 @@ u8 func041f_init_blonde[] = { set_armor(100) set_recovery_speed(100) set_shield(0) - set_function(CHR_SELF, FUNC_BLONDE) - endfunction + set_ailist(CHR_SELF, FUNC_BLONDE) + endlist }; u8 func041e_blonde[] = { @@ -2716,7 +2716,7 @@ u8 func041e_blonde[] = { rebuild_teams rebuild_squadrons set_accuracy(30) - set_onshot_function(FUNC_BLONDE) + set_shotlist(FUNC_BLONDE) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -2724,7 +2724,7 @@ u8 func041e_blonde[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x54) @@ -2733,8 +2733,8 @@ u8 func041e_blonde[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive // This injured check is pointless @@ -2783,7 +2783,7 @@ u8 func041e_blonde[] = { label(0x6e) restart_timer - animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x66) if_self_flag_bankx_eq(CHRFLAG1_00000020, FALSE, BANK_1, /*goto*/ 0x06) @@ -2853,7 +2853,7 @@ u8 func041e_blonde[] = { label(0x2d) goto_first(0x6e) - endfunction + endlist }; u8 func0421_trent_waiting[] = { @@ -2873,15 +2873,15 @@ u8 func0421_trent_waiting[] = { label(0x06) restart_timer speak(CHR_TARGET, 0x362d, 0x816f, CHANNEL_6, COLOR_05_GREEN) // "How the hell did you get on board?" - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x08) if_timer_gt(120, /*goto*/ 0x06) endloop(0x08) label(0x06) - set_function(CHR_SELF, FUNC_TRENT_ATTACKING) - endfunction + set_ailist(CHR_SELF, FUNC_TRENT_ATTACKING) + endlist }; u8 func0420_trent_attacking[] = { @@ -2902,7 +2902,7 @@ u8 func0420_trent_attacking[] = { set_shield(500) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_10000000) speak(CHR_P1P2, 0x3646, 0x12cb, CHANNEL_6, COLOR_05_GREEN) // "Ha, Ha, Ha, Ha, Ha." - set_function(CHR_SELF, FUNC_TRENT_RUNNING) + set_ailist(CHR_SELF, FUNC_TRENT_RUNNING) // President in sight label(0x06) @@ -2928,7 +2928,7 @@ u8 func0420_trent_attacking[] = { label(0x09) restart_timer - animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_TALKING_0231, 0, -1, 0x10, 0x10, CHR_SELF, 2) speak(CHR_P1P2, 0x3647, 0x12ca, CHANNEL_6, COLOR_05_GREEN) // "You'll never save him now." beginloop(0x0a) @@ -2936,8 +2936,8 @@ u8 func0420_trent_attacking[] = { endloop(0x0a) label(0x06) - set_function(CHR_SELF, FUNC_TRENT_RUNNING) - endfunction + set_ailist(CHR_SELF, FUNC_TRENT_RUNNING) + endlist }; u8 func0422_trent_running[] = { @@ -2954,13 +2954,13 @@ u8 func0422_trent_running[] = { if_chr_sees_player(/*goto*/ 0x06) set_self_chrflag(CHRCFLAG_HIDDEN) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_alertness(100) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func1012_check_blondes_dead[] = { @@ -2990,8 +2990,8 @@ u8 func1012_check_blondes_dead[] = { // Both blondes dead label(0x2d) set_stage_flag(STAGEFLAG_BOTH_BLONDES_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_unhide_trent_and_blondes[] = { @@ -3011,24 +3011,24 @@ u8 func1013_unhide_trent_and_blondes[] = { label(0x2d) show_chr(CHR_TRENT) - set_function(CHR_TRENT, FUNC_TRENT_WAITING) + set_ailist(CHR_TRENT, FUNC_TRENT_WAITING) show_chr(CHR_BLONDE1) - set_function(CHR_BLONDE1, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE1, FUNC_INIT_BLONDE) show_chr(CHR_BLONDE2) - set_function(CHR_BLONDE2, FUNC_INIT_BLONDE) + set_ailist(CHR_BLONDE2, FUNC_INIT_BLONDE) yield unset_chr_chrflag(CHR_TRENT, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BLONDE1, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BLONDE2, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** * Assigned to basically everyone during president conversation. */ u8 func0429_be_unalert[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) set_target_chr(CHR_BOND) set_alertness(0) @@ -3046,16 +3046,16 @@ u8 func0429_be_unalert[] = { goto_first(0x03) label(0x2d) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** * Would have given the player one minute before the diguise was uncovered. - * The set_function at the start has effectively disabled this function. + * The set_ailist at the start has effectively disabled this function. */ u8 func1014_uncover_disguise[] = { - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) restart_timer beginloop(0x04) @@ -3064,8 +3064,8 @@ u8 func1014_uncover_disguise[] = { label(0x06) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISE_UNCOVERED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3105,8 +3105,8 @@ u8 func042a_init_neutral[] = { set_shield(0) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func042b_reinit_stripes[] = { @@ -3120,12 +3120,12 @@ u8 func042b_reinit_stripes[] = { set_chr_team(CHR_SELF, TEAM_04) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_STRIPES) - endfunction + set_ailist(CHR_SELF, FUNC_STRIPES) + endlist }; u8 func0407_steward[] = { - set_onshot_function(FUNC_STEWARD_SHOT) + set_shotlist(FUNC_STEWARD_SHOT) beginloop(0x03) chr_toggle_p1p2(CHR_SELF) @@ -3142,35 +3142,35 @@ u8 func0407_steward[] = { if_rand_lt(192, /*goto*/ 0x8f) if_rand_lt(224, /*goto*/ 0x90) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8a) - animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8b) - animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, -1, -1, 0x10, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8c) - animation(ANIM_OPERATE_0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8d) - animation(ANIM_OPERATE_0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8e) - animation(ANIM_OPERATE_0223, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x8f) - animation(0x023a, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x023a, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x90) - animation(0x023b, -1, -1, 0x11, 0x01, CHR_SELF, 2) + chr_do_animation(0x023b, -1, -1, 0x11, 0x01, CHR_SELF, 2) goto_next(0x2d) label(0x0f) @@ -3220,7 +3220,7 @@ u8 func0407_steward[] = { label(0x06) reloop(0x03) - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0x2d) if_target_chr_in_sight(/*goto*/ 0x89) if_saw_injury(0x00, /*goto*/ 0x89) @@ -3250,32 +3250,32 @@ u8 func0407_steward[] = { label(0x2d) mute_channel(CHANNEL_4) - set_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_steward_shot[] = { mute_channel(CHANNEL_4) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0407_stewardess[] = { set_chr_health(CHR_SELF, 0) - set_onshot_function(FUNC_STEWARDESS) + set_shotlist(FUNC_STEWARDESS) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Wait until alerted beginloop(0x03) if_chr_idle(/*goto*/ 0x2d) - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0x2d) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d) if_saw_injury(0x00, /*goto*/ 0x2d) @@ -3295,7 +3295,7 @@ u8 func0407_stewardess[] = { label(0x06) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISE_UNCOVERED) - animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_WALK_BACKWARDS, -1, -1, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0x08) @@ -3320,7 +3320,7 @@ u8 func0407_stewardess[] = { label(0x0a) set_self_chrflag(CHRCFLAG_01000000) - animation(ANIM_COWER_0229, -1, 190, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_COWER_0229, -1, 190, 0x10, 0x0a, CHR_SELF, 2) beginloop(0x83) if_chr_stopped(/*goto*/ 0x2d) @@ -3329,7 +3329,7 @@ u8 func0407_stewardess[] = { label(0x2d) goto_first(0x0a) - endfunction + endlist }; u8 func1015_msg_retrievetheevidence[] = { @@ -3349,8 +3349,8 @@ u8 func1015_msg_retrievetheevidence[] = { label(0x2d) speak(CHR_BOND, 0x362e, 0x73c8, CHANNEL_6, COLOR_09_BLUE) // "Now, let's retrieve the evidence." label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_onthislevel[] = { @@ -3367,8 +3367,8 @@ u8 func1016_msg_onthislevel[] = { label(0x2d) set_target_chr(CHR_PRESET) speak(CHR_TARGET, 0x362f, 0x8185, CHANNEL_6, COLOR_09_BLUE) // "The President's room is on this level, Joanna." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_msg_gettothecockpit[] = { @@ -3393,8 +3393,8 @@ u8 func1017_msg_gettothecockpit[] = { speak(CHR_BOND, 0x3630, 0x8186, CHANNEL_5, COLOR_09_BLUE) // "Something's wrong... You have to get to the cockpi..." label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_msg_maybeamine[] = { @@ -3412,14 +3412,14 @@ u8 func1018_msg_maybeamine[] = { speak(CHR_P1P2, 0x3631, 0x73cb, CHANNEL_6, COLOR_09_BLUE) // "Maybe a mine will detach the UFO." label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c02_outro_from_menu[] = { - set_function(CHR_ELVIS, GFUNC_IDLE) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func0423_outro[] = { @@ -3436,16 +3436,16 @@ u8 func0423_outro[] = { set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) - set_function(CHR_TARGET, GFUNC_IDLE) + set_ailist(CHR_TARGET, GFUNC_IDLE) set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x02da, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x02da, -1, -1, 0x06, 0x00, CHR_TARGET, 4) set_chr_hud_visible(CHR_TARGET, TRUE) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02d9, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02d9, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) show_object(0x19) set_object_flag_bank1(0x19, OBJECTFLAG1_04000000) set_object_flag_bank2(0x19, OBJECTFLAG2_00000010) @@ -3549,8 +3549,8 @@ u8 func0423_outro[] = { hide_object(0x1a) set_chr_hud_visible(CHR_TARGET, FALSE) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1019_midcutscene[] = { @@ -3602,14 +3602,14 @@ u8 func1019_midcutscene[] = { reset_ambience unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_END_CINEMA) - endfunction + set_ailist(CHR_SELF, GFUNC_END_CINEMA) + endlist }; u8 func1019_midcutscene_from_menu[] = { set_stage_flag(STAGEFLAG_TRIGGER_MIDCUTSCENE) - set_function(CHR_SELF, FUNC_MIDCUTSCENE) - endfunction + set_ailist(CHR_SELF, FUNC_MIDCUTSCENE) + endlist }; u8 func101a_equipment_switch[] = { @@ -3667,7 +3667,7 @@ u8 func101a_equipment_switch[] = { open_door(0x1c) endloop(0x09) - endfunction + endlist }; u8 func101b_hoverbike_switch[] = { @@ -3723,8 +3723,8 @@ u8 func101b_hoverbike_switch[] = { label(0x06) set_object_flag_bank0(0x1f, OBJECTFLAG0_DEACTIVATED) set_object_image(OBJ_HOVERBIKE_SWITCH, 0x00, 0x12) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_check_equipment_switch_destroyed[] = { @@ -3740,8 +3740,8 @@ u8 func101c_check_equipment_switch_destroyed[] = { set_stage_flag(STAGEFLAG_EQUIPMENT_SWITCH_DESTROYED) message(CHR_BOND, 0x363e) // "Mission critical object has been destroyed." label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_init_defend_pad[] = { @@ -3753,16 +3753,16 @@ u8 func040c_init_defend_pad[] = { label(0x04) try_draw_weapon(MODEL_CHRCYCLONE, WEAPON_CYCLONE, 0x00000000, /*goto*/ 0x2d) label(0x2d) - set_function(CHR_SELF, FUNC_DEFEND_PAD) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND_PAD) + endlist }; u8 func040e_unused[] = { label(0x04) try_draw_weapon(MODEL_CHRCYCLONE, WEAPON_CYCLONE, 0x00000000, /*goto*/ 0x2d) label(0x2d) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** @@ -3772,8 +3772,8 @@ u8 func040d_init_defend_president[] = { label(0x04) try_draw_weapon(MODEL_CHRCYCLONE, WEAPON_CYCLONE, 0x00000000, /*goto*/ 0x2d) label(0x2d) - set_function(CHR_SELF, FUNC_DEFEND_PRESIDENT) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND_PRESIDENT) + endlist }; u8 func042c_remove_if_offscreen[] = { @@ -3793,11 +3793,11 @@ u8 func042c_remove_if_offscreen[] = { chr_drop_weapon(CHR_SELF) remove_chr(CHR_SELF) yield - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) - set_function(CHR_SELF, FUNC_INIT_DEFEND_PAD) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_DEFEND_PAD) + endlist }; /** @@ -3826,8 +3826,8 @@ u8 func101d_handle_early_president_death[] = { label(0x2d) set_stage_flag(STAGEFLAG_PRESIDENT_STARTED_RUNNING) unlock_door(OBJ_COCKPITDOOR, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_check_pod_destroyed[] = { @@ -3835,19 +3835,19 @@ u8 func1007_check_pod_destroyed[] = { if_object_in_good_condition(OBJ_ESCAPE_POD, /*goto*/ 0x2d) message(CHR_BOND, 0x363e) // "Mission critical object has been destroyed." set_stage_flag(STAGEFLAG_POD_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func101f_setup_rtracker[] = { yield set_object_flag_bank2(0x38, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(0x39, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1420_setup_lighting[] = { @@ -3877,9 +3877,9 @@ u8 func1420_setup_lighting[] = { misc_command(0x0042, 0x05, 0x01) misc_command(0x0043, 0x05, 0x01) misc_command(0x0059, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_pilots_stabilizing[] = { @@ -3912,8 +3912,8 @@ u8 func1022_pilots_stabilizing[] = { set_stage_flag(STAGEFLAG_PLANE_STABILIZED) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1023_check_pilots_dead[] = { @@ -3931,8 +3931,8 @@ u8 func1023_check_pilots_dead[] = { label(0x2d) set_stage_flag(STAGEFLAG_PILOTS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3964,8 +3964,8 @@ u8 func1025_disable_buddy_warp[] = { yield yield unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1026_buddy_floor_hatch[] = { @@ -3988,8 +3988,8 @@ u8 func1026_buddy_floor_hatch[] = { hide_object(OBJ_FLOORHATCH) set_object_flag_bank0(OBJ_FLOOR_HATCH_DETACHED, OBJECTFLAG0_00000100) unset_object_flag_bank1(OBJ_FLOOR_HATCH_DETACHED, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupsev.c b/src/files/setup/setupsev.c index 20776f4a5..e453c7faf 100644 --- a/src/files/setup/setupsev.c +++ b/src/files/setup/setupsev.c @@ -871,8 +871,8 @@ u8 func1000_setup_counterop[] = { give_object_to_chr(0x05, CHR_BOND) give_object_to_chr(0x3a, CHR_COOP) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func0401_start_path00[] = { @@ -884,8 +884,8 @@ u8 func0401_start_path00[] = { set_shield(0) assign_path(0) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0402_start_path01[] = { @@ -897,8 +897,8 @@ u8 func0402_start_path01[] = { set_shield(0) assign_path(1) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0403_start_path02[] = { @@ -910,8 +910,8 @@ u8 func0403_start_path02[] = { set_shield(0) assign_path(2) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0404_start_path03[] = { @@ -923,8 +923,8 @@ u8 func0404_start_path03[] = { set_shield(0) assign_path(3) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0405_start_path04[] = { @@ -936,8 +936,8 @@ u8 func0405_start_path04[] = { set_shield(0) assign_path(4) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0406_start_path05[] = { @@ -949,8 +949,8 @@ u8 func0406_start_path05[] = { set_shield(0) assign_path(5) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0407_start_path06[] = { @@ -962,8 +962,8 @@ u8 func0407_start_path06[] = { set_shield(0) assign_path(6) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0408_start_path07[] = { @@ -975,8 +975,8 @@ u8 func0408_start_path07[] = { set_shield(0) assign_path(7) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0409_start_path08[] = { @@ -988,8 +988,8 @@ u8 func0409_start_path08[] = { set_shield(0) assign_path(8) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040a_start_path09[] = { @@ -1001,8 +1001,8 @@ u8 func040a_start_path09[] = { set_shield(0) assign_path(9) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040b_start_path10[] = { @@ -1014,8 +1014,8 @@ u8 func040b_start_path10[] = { set_shield(0) assign_path(10) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040c_start_path11[] = { @@ -1027,8 +1027,8 @@ u8 func040c_start_path11[] = { set_shield(0) assign_path(11) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040d_start_path12[] = { @@ -1040,8 +1040,8 @@ u8 func040d_start_path12[] = { set_shield(0) assign_path(12) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040e_start_path13[] = { @@ -1053,8 +1053,8 @@ u8 func040e_start_path13[] = { set_shield(0) assign_path(13) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040f_start_path14[] = { @@ -1066,13 +1066,13 @@ u8 func040f_start_path14[] = { set_shield(0) assign_path(14) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func1001_objectives_failed_msg[] = { - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func0415_init_50hp_guard[] = { @@ -1082,8 +1082,8 @@ u8 func0415_init_50hp_guard[] = { set_armor(0) set_recovery_speed(35) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0416_init_80hp_guard[] = { @@ -1093,8 +1093,8 @@ u8 func0416_init_80hp_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0417_init_lx_guard[] = { @@ -1104,8 +1104,8 @@ u8 func0417_init_lx_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; // This function is never assigned @@ -1116,16 +1116,16 @@ u8 func0418_init_alerted_guard[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func100d_start_lifts[] = { activate_lift(1, 0x35) activate_lift(4, 0x38) activate_lift(5, 0x39) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1003_check_experiment_destroyed[] = { @@ -1133,11 +1133,11 @@ u8 func1003_check_experiment_destroyed[] = { if_object_in_good_condition(OBJ_EXPERIMENT, /*goto*/ 0x2c) message(CHR_BOND, 0x3c07) // "Medical experiment has been sabotaged." set_stage_flag(STAGEFLAG_EXPERIMENT_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func1004_check_saucer_destroyed[] = { @@ -1145,22 +1145,22 @@ u8 func1004_check_saucer_destroyed[] = { if_object_in_good_condition(0x3e, /*goto*/ 0x2c) message(CHR_BOND, 0x3c08) // "Captured Maian saucer has been destroyed." set_stage_flag(STAGEFLAG_SAUCER_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func1005_check_experiemnt_destroyed_pointless[] = { // This is a pointless function beginloop(0x04) if_object_in_good_condition(OBJ_EXPERIMENT, /*goto*/ 0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func1006_activate_alarm[] = { @@ -1174,8 +1174,8 @@ u8 func1006_activate_alarm[] = { label(0x2c) activate_alarm set_stage_flag(STAGEFLAG_ALARM_SOUNDED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1214,13 +1214,13 @@ u8 func0410_clone_spawner[] = { // Spawn a clone label(0x06) try_spawn_clone2(CHR_SELF, FUNC_INIT_CLONE, 0x00000000, /*goto*/ 0x2c) - set_function(CHR_SELF, FUNC_CLONE) + set_ailist(CHR_SELF, FUNC_CLONE) label(0x2c) yield endloop(0x04) - endfunction + endlist }; u8 func0411_init_clone[] = { @@ -1238,15 +1238,15 @@ u8 func0411_init_clone[] = { set_chr_team(CHR_SELF, TEAM_ENEMY) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_CLONE) - endfunction + set_ailist(CHR_SELF, FUNC_CLONE) + endlist }; u8 func0412_clone[] = { set_self_chrflag(CHRCFLAG_00040000) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0410_clone_spawner2[] = { @@ -1283,13 +1283,13 @@ u8 func0410_clone_spawner2[] = { // Spawn clone label(0x06) try_spawn_clone2(CHR_SELF, FUNC_INIT_CLONE, 0x00000000, /*goto*/ 0x2c) - set_function(CHR_SELF, FUNC_CLONE) + set_ailist(CHR_SELF, FUNC_CLONE) label(0x2c) yield endloop(0x04) - endfunction + endlist }; u8 func1007_disable_pods[] = { @@ -1302,8 +1302,8 @@ u8 func1007_disable_pods[] = { set_object_flag_bank0(0x1f, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(0x20, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(0x21, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_check_console[] = { @@ -1329,14 +1329,14 @@ u8 func1008_check_console[] = { play_sound_from_object(CHANNEL_0, OBJ_CONSOLE, 0x012c, 0x0190) message(CHR_BOND, 0x3c09) // "Distress signal has been sent." set_stage_flag(STAGEFLAG_CONSOLE_ACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Console destroyed label(0x08) message(CHR_BOND, 0x3c0a) // "Critical mission object has been destroyed." set_stage_flag(STAGEFLAG_CONSOLE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_for_exit[] = { @@ -1370,14 +1370,14 @@ u8 func1009_check_for_exit[] = { // Both players dead label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // At least one player survived label(0x06) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_vertical_door_sounds[] = { @@ -1401,7 +1401,7 @@ u8 func100a_vertical_door_sounds[] = { label(0x06) endloop(0x5d) - endfunction + endlist }; u8 func100b_check_medlab_escapable[] = { @@ -1493,7 +1493,7 @@ u8 func100b_check_medlab_escapable[] = { // Glass broken label(0x0d) unset_stage_flag(STAGEFLAG_TRAPPED_AT_START) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x0e) if_chr_in_room(CHR_BOND, 0x00, 0x0095, /*goto*/ 0x2c) @@ -1509,7 +1509,7 @@ u8 func100b_check_medlab_escapable[] = { unset_stage_flag(STAGEFLAG_TRAPPED_AT_START) goto_first(0x04) - endfunction + endlist }; u8 func1002_intro[] = { @@ -1520,7 +1520,7 @@ u8 func1002_intro[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0477, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0477, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_object_flag_bank1(OBJ_TROLLEY, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_TROLLEY, OBJECTFLAG2_00000010) object_do_animation(0x0478, OBJ_TROLLEY, 0x04ff, 0xff) @@ -1564,15 +1564,15 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0477, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0477, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_object_flag_bank1(OBJ_TROLLEY, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_TROLLEY, OBJECTFLAG2_00000010) object_do_animation(0x0478, OBJ_TROLLEY, 0x04ff, 0xfe) restart_default_music reset_ambience enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func041b_outro[] = { @@ -1584,12 +1584,12 @@ u8 func041b_outro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x047a, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x047a, -1, -1, 0x06, 0x00, CHR_BOND, 4) unset_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_OUTRO_GUARD, CHRHFLAG_00020000) - animation(0x047b, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD, 4) + chr_do_animation(0x047b, -1, -1, 0x06, 0x00, CHR_OUTRO_GUARD, 4) show_nonessential_chrs(FALSE) restart_timer @@ -1626,32 +1626,32 @@ u8 func041b_outro[] = { label(0x87) label(0x06) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0419_init_outro_guard[] = { set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_unset_trolley_flag_when_destroyed[] = { beginloop(0x04) if_object_in_good_condition(OBJ_TROLLEY, /*goto*/ 0x2c) unset_object_flag_bank2(OBJ_TROLLEY, OBJECTFLAG2_PUSHABLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func041c_init_labtech[] = { set_self_chrflag(CHRCFLAG_04000000) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func100e_break_glass[] = { @@ -1666,8 +1666,8 @@ u8 func100e_break_glass[] = { label(0x0d) hide_object(0x4f) hide_object(0x50) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func100f_init_lighting[] = { @@ -1828,8 +1828,8 @@ u8 func100f_init_lighting[] = { misc_command(0x0088, 0x05, 0x01) misc_command(0x0089, 0x05, 0x01) misc_command(0x008a, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_unload_part1_chrs[] = { @@ -1841,41 +1841,41 @@ u8 func1010_unload_part1_chrs[] = { // Unload all chrs in first part of the stage label(0x2c) - set_function(CHR_LABTECH1, FUNC_UNLOAD) - set_function(CHR_LABTECH2, FUNC_UNLOAD) - set_function(0x00, FUNC_UNLOAD) - set_function(0x01, FUNC_UNLOAD) - set_function(0x02, FUNC_UNLOAD) - set_function(0x03, FUNC_UNLOAD) - set_function(0x04, FUNC_UNLOAD) - set_function(0x07, FUNC_UNLOAD) - set_function(0x08, FUNC_UNLOAD) - set_function(0x09, FUNC_UNLOAD) - set_function(0x0b, FUNC_UNLOAD) - set_function(0x0c, FUNC_UNLOAD) - set_function(0x0f, FUNC_UNLOAD) - set_function(0x10, FUNC_UNLOAD) - set_function(0x11, FUNC_UNLOAD) - set_function(0x12, FUNC_UNLOAD) - set_function(0x13, FUNC_UNLOAD) - set_function(0x14, FUNC_UNLOAD) - set_function(0x15, FUNC_UNLOAD) - set_function(0x16, FUNC_UNLOAD) - set_function(0x17, FUNC_UNLOAD) - set_function(0x18, FUNC_UNLOAD) - set_function(0x19, FUNC_UNLOAD) - set_function(0x1a, FUNC_UNLOAD) - set_function(0x46, FUNC_UNLOAD) - set_function(0x47, FUNC_UNLOAD) - set_function(0x1b, FUNC_UNLOAD) - set_function(0x1c, FUNC_UNLOAD) - set_function(0x1d, FUNC_UNLOAD) - set_function(0x1e, FUNC_UNLOAD) - set_function(0x1f, FUNC_UNLOAD) - set_function(0x20, FUNC_UNLOAD) - set_function(0x21, FUNC_UNLOAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_LABTECH1, FUNC_UNLOAD) + set_ailist(CHR_LABTECH2, FUNC_UNLOAD) + set_ailist(0x00, FUNC_UNLOAD) + set_ailist(0x01, FUNC_UNLOAD) + set_ailist(0x02, FUNC_UNLOAD) + set_ailist(0x03, FUNC_UNLOAD) + set_ailist(0x04, FUNC_UNLOAD) + set_ailist(0x07, FUNC_UNLOAD) + set_ailist(0x08, FUNC_UNLOAD) + set_ailist(0x09, FUNC_UNLOAD) + set_ailist(0x0b, FUNC_UNLOAD) + set_ailist(0x0c, FUNC_UNLOAD) + set_ailist(0x0f, FUNC_UNLOAD) + set_ailist(0x10, FUNC_UNLOAD) + set_ailist(0x11, FUNC_UNLOAD) + set_ailist(0x12, FUNC_UNLOAD) + set_ailist(0x13, FUNC_UNLOAD) + set_ailist(0x14, FUNC_UNLOAD) + set_ailist(0x15, FUNC_UNLOAD) + set_ailist(0x16, FUNC_UNLOAD) + set_ailist(0x17, FUNC_UNLOAD) + set_ailist(0x18, FUNC_UNLOAD) + set_ailist(0x19, FUNC_UNLOAD) + set_ailist(0x1a, FUNC_UNLOAD) + set_ailist(0x46, FUNC_UNLOAD) + set_ailist(0x47, FUNC_UNLOAD) + set_ailist(0x1b, FUNC_UNLOAD) + set_ailist(0x1c, FUNC_UNLOAD) + set_ailist(0x1d, FUNC_UNLOAD) + set_ailist(0x1e, FUNC_UNLOAD) + set_ailist(0x1f, FUNC_UNLOAD) + set_ailist(0x20, FUNC_UNLOAD) + set_ailist(0x21, FUNC_UNLOAD) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0414_unload[] = { @@ -1895,10 +1895,10 @@ u8 func0414_unload[] = { chr_drop_weapon(CHR_SELF) remove_chr(CHR_SELF) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupsho.c b/src/files/setup/setupsho.c index 50d6471cf..7fac99fc2 100644 --- a/src/files/setup/setupsho.c +++ b/src/files/setup/setupsho.c @@ -494,12 +494,12 @@ u8 func0401_init_unarmed_skedar[] = { set_recovery_speed(0) set_shield(0) set_self_chrflag(CHRCFLAG_00020000) - set_function(CHR_SELF, FUNC_UNARMED_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_UNARMED_SKEDAR) + endlist }; u8 func0402_unarmed_skedar[] = { - set_onshot_function(FUNC_UNARMED_SKEDAR) + set_shotlist(FUNC_UNARMED_SKEDAR) set_action(MA_NORMAL, TRUE) if_chr_dying(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) @@ -508,7 +508,7 @@ u8 func0402_unarmed_skedar[] = { // Dying label(0x2d) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) yield restart_timer @@ -517,7 +517,7 @@ u8 func0402_unarmed_skedar[] = { endloop(0x11) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) #define LABEL_HANDLE_PHOENIX_AREA 0x5a #define LABEL_HANDLE_WALL_AREA 0x5b @@ -691,8 +691,8 @@ u8 func0402_unarmed_skedar[] = { set_self_flag_bankx(CHRFLAG0_00000004, BANK_0) goto_first(0x03) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_puzzleroom_miniskedar_waiting[] = { @@ -712,8 +712,8 @@ u8 func0405_puzzleroom_miniskedar_waiting[] = { // Detected player label(0x2d) - set_function(CHR_SELF, FUNC_INIT_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_MINISKEDAR) + endlist }; u8 func0403_init_miniskedar[] = { @@ -725,12 +725,12 @@ u8 func0403_init_miniskedar[] = { set_recovery_speed(0) set_shield(0) set_self_chrflag(CHRCFLAG_00080000) - set_function(CHR_SELF, FUNC_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_MINISKEDAR) + endlist }; u8 func0404_miniskedar[] = { - set_onshot_function(FUNC_MINISKEDAR) + set_shotlist(FUNC_MINISKEDAR) if_chr_dying(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) if_chr_unloaded(CHR_SELF, /*goto*/ 0x2d) @@ -746,7 +746,7 @@ u8 func0404_miniskedar[] = { endloop(0x11) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x06) @@ -838,7 +838,7 @@ u8 func0404_miniskedar[] = { label(0x06) goto_first(0x03) - endfunction + endlist }; /** @@ -865,11 +865,11 @@ u8 func0407_init_cloaked_skedar[] = { // Remove self label(0x2d) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) yield endloop(0x04) - endfunction + endlist }; u8 func0408_cloaked_skedar[] = { @@ -899,13 +899,13 @@ u8 func0408_cloaked_skedar[] = { // Player went close to cloaked skedar label(0x2d) unset_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, FUNC_INIT_UNARMED_SKEDAR) + set_ailist(CHR_SELF, FUNC_INIT_UNARMED_SKEDAR) // King is dead label(0x0e) remove_chr(CHR_SELF) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -941,14 +941,14 @@ u8 func0404_miniskedar_spawner[] = { yield endloop(0x04) - endfunction + endlist }; u8 unregistered_function3[] = { camera_movement(0x00c3) yield set_chr_hiddenflag(0x00, CHRHFLAG_00020000) - animation(0x00c4, -1, -1, 0x06, 0x00, 0x00, 4) + chr_do_animation(0x00c4, -1, -1, 0x06, 0x00, 0x00, 4) beginloop(0x08) if_camera_animating(/*goto*/ 0x2d) @@ -958,8 +958,8 @@ u8 unregistered_function3[] = { endloop(0x08) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1001_objectives_failed_msg[] = { @@ -967,19 +967,19 @@ u8 func1001_objectives_failed_msg[] = { give_object_to_chr(OBJ_TARGETAMP_BOND, CHR_BOND) give_object_to_chr(OBJ_TARGETAMP_COOP, CHR_COOP) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) label(0x2d) hide_object(OBJ_TARGETAMP_COOP) - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1003_remove_random_skedar[] = { @@ -1001,8 +1001,8 @@ u8 func1003_remove_random_skedar[] = { remove_random(0x11, 0x12) remove_random(0x13, 0x14) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101a_pointless[] = { @@ -1011,8 +1011,8 @@ u8 func101a_pointless[] = { endloop(0x04) label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_check_army_defeated[] = { @@ -1057,8 +1057,8 @@ u8 func100c_check_army_defeated[] = { label(0x2d) unset_object_flag_bank1(0x45, OBJECTFLAG1_08000000) unset_object_flag_bank1(0x46, OBJECTFLAG1_10000000) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_5e0c[] = { @@ -1128,7 +1128,7 @@ u8 func1005_5e0c[] = { set_stage_flag(STAGEFLAG_TRIGGER_BRIDGE) goto_first(0x04) - endfunction + endlist }; u8 func1006_bridge[] = { @@ -1184,7 +1184,7 @@ u8 func1006_bridge[] = { control_sound_from_object(CHANNEL_4, OBJ_BRIDGE, TRUE) goto_first(0x04) - endfunction + endlist }; u8 func1007_bug_throws_bond[] = { @@ -1292,12 +1292,12 @@ u8 func1007_bug_throws_bond[] = { set_stage_flag(STAGEFLAG_BUG_WASTED) message(CHR_BOND, 0x421a) // "Target Amplifier placed incorrectly." label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0f) goto_first(0x03) - endfunction + endlist }; u8 func101b_bug_throws_coop[] = { @@ -1306,7 +1306,7 @@ u8 func101b_bug_throws_coop[] = { label(0x2d) set_stage_flag(STAGEFLAG_COOP_BUGS_WASTED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) beginloop(0x03) if_stage_flag_eq(STAGEFLAG_COOP_THREW_FIRST_BUG, FALSE, /*goto*/ 0x55) @@ -1411,12 +1411,12 @@ u8 func101b_bug_throws_coop[] = { set_stage_flag(STAGEFLAG_BUG_WASTED) message(CHR_COOP, 0x421a) // "Target Amplifier placed incorrectly." label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0f) goto_first(0x03) - endfunction + endlist }; u8 func1008_lock_door[] = { @@ -1425,15 +1425,15 @@ u8 func1008_lock_door[] = { // A label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA and PA label(0x04) yield lock_door(0x09, 0x02) lock_door(0x0a, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_altar[] = { @@ -1542,8 +1542,8 @@ u8 func1009_altar[] = { if_difficulty_lt(DIFF_SA, /*goto*/ 0x2d) message(CHR_P1P2, 0x421b) // "Generator has been reactivated." label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1587,7 +1587,7 @@ u8 func101c_setup_corridor_lighting[] = { set_lights_state(0x007e, 0x01, 0x06, 0x00, 0x00) set_lights_state(0x007f, 0x01, 0x06, 0x00, 0x00) yield - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // The rest of this function is unreachable restart_timer @@ -1631,8 +1631,8 @@ u8 func101c_setup_corridor_lighting[] = { set_lights_state(0x007f, 0x03, 0x06, 0xff, 0x78) goto_first(0x59) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040a_init_reaper_slayer_skedar[] = { @@ -1642,13 +1642,13 @@ u8 func040a_init_reaper_slayer_skedar[] = { set_armor(160) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, FUNC_REAPER_SLAYER_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_REAPER_SLAYER_SKEDAR) + endlist }; u8 func0409_reaper_slayer_skedar[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) - set_onshot_function(FUNC_REAPER_SLAYER_SKEDAR) + set_shotlist(FUNC_REAPER_SLAYER_SKEDAR) if_chr_dying(CHR_SELF, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) if_chr_unloaded(CHR_SELF, /*goto*/ 0x06) @@ -1656,7 +1656,7 @@ u8 func0409_reaper_slayer_skedar[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x5d) @@ -1665,8 +1665,8 @@ u8 func0409_reaper_slayer_skedar[] = { label(0x06) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x2d) @@ -1805,7 +1805,7 @@ u8 func0409_reaper_slayer_skedar[] = { label(0x2d) goto_first(0x63) - endfunction + endlist }; u8 func100a_army_room[] = { @@ -1843,10 +1843,10 @@ u8 func100a_army_room[] = { set_lights_state(0x0087, 0x03, 0x06, 0xff, 0x78) set_stage_flag(STAGEFLAG_TRIGGER_SKEDAR_ARMY) play_x_music(CHANNEL_10, 60) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) goto_first(0x04) - endfunction + endlist }; u8 func100b_check_sanctum_accessed[] = { @@ -1858,8 +1858,8 @@ u8 func100b_check_sanctum_accessed[] = { label(0x2d) message(CHR_P1P2, 0x421c) // "Skedar Inner Sanctum has been reached." set_stage_flag(STAGEFLAG_ACCESSED_SANCTUM) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040b_mauler_skedar[] = { @@ -1880,11 +1880,11 @@ u8 func040b_mauler_skedar[] = { set_target_chr(CHR_BOND) try_jog_to_target_chr(/*goto*/ 0x2d) label(0x2d) - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) - set_return_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_shotlist(GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_wake_skedar_army[] = { @@ -1912,8 +1912,8 @@ u8 func100e_wake_skedar_army[] = { enable_army_skedar(0x32, 0x0e) enable_army_skedar(0x30, 0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_king_waiting[] = { @@ -1944,8 +1944,8 @@ u8 func040c_king_waiting[] = { label(0x2d) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, FUNC_KING_COMBAT) - endfunction + set_ailist(CHR_SELF, FUNC_KING_COMBAT) + endlist }; /** @@ -2059,7 +2059,7 @@ u8 func040d_king_combat[] = { say_quip(CHR_BOND, 0x01, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) set_morale(0) restart_timer - animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x66) if_chr_death_animation_finished(CHR_P1P2, /*goto*/ LABEL_PLAYER_DEAD) @@ -2078,7 +2078,7 @@ u8 func040d_king_combat[] = { say_quip(CHR_BOND, 0x01, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) set_morale(0) restart_timer - animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x67) if_chr_death_animation_finished(CHR_P1P2, /*goto*/ LABEL_PLAYER_DEAD) @@ -2097,7 +2097,7 @@ u8 func040d_king_combat[] = { say_quip(CHR_BOND, 0x01, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) set_morale(0) restart_timer - animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) set_chr_cloaked(CHR_SELF, TRUE, TRUE) beginloop(0x68) @@ -2203,7 +2203,7 @@ u8 func040d_king_combat[] = { say_quip(CHR_BOND, 0x01, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) set_morale(0) restart_timer - animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0350, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x69) if_chr_shield_lt(CHR_SELF, 20, /*goto*/ LABEL_LOW_SHIELD) @@ -2225,7 +2225,7 @@ u8 func040d_king_combat[] = { label(0x06) restart_timer set_stage_flag(STAGEFLAG_SPIKES_VULNERABLE) - animation(0x0351, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0351, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x7e) if_stage_flag_eq(STAGEFLAG_SPIKE_DESTROYED, TRUE, /*goto*/ 0x06) @@ -2266,7 +2266,7 @@ u8 func040d_king_combat[] = { label(LABEL_PLAYER_DEAD) goto_first(0x59) - endfunction + endlist }; u8 func040e_king_skedar_spawner[] = { @@ -2306,7 +2306,7 @@ u8 func040e_king_skedar_spawner[] = { yield endloop(0x04) - endfunction + endlist }; u8 func0410_init_king_skedar_clone[] = { @@ -2322,8 +2322,8 @@ u8 func0410_init_king_skedar_clone[] = { yield unset_self_chrflag(CHRCFLAG_HIDDEN) set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, FUNC_INIT_UNARMED_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_UNARMED_SKEDAR) + endlist }; u8 func0411_king_miniskedar_spawner[] = { @@ -2365,7 +2365,7 @@ u8 func0411_king_miniskedar_spawner[] = { yield endloop(0x04) - endfunction + endlist }; u8 func0412_init_king_miniskedar_clone[] = { @@ -2381,8 +2381,8 @@ u8 func0412_init_king_miniskedar_clone[] = { yield unset_self_chrflag(CHRCFLAG_HIDDEN) set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_function(CHR_SELF, FUNC_INIT_MINISKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_INIT_MINISKEDAR) + endlist }; u8 func100f_spikes_vulnerability[] = { @@ -2437,7 +2437,7 @@ u8 func100f_spikes_vulnerability[] = { label(0x2d) goto_first(0x03) - endfunction + endlist }; #define wait_for_spike_destroyed(spike, shadow, noshadow) \ @@ -2456,26 +2456,26 @@ u8 func100f_spikes_vulnerability[] = { u8 func1010_spike_ml[] = { wait_for_spike_destroyed(OBJ_SPIKE_ML, OBJ_SPIKE_SHAD_ML, OBJ_SPIKE_NOSHAD_ML) - set_function(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) - endfunction + set_ailist(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) + endlist }; u8 func1011_spike_mr[] = { wait_for_spike_destroyed(OBJ_SPIKE_MR, OBJ_SPIKE_SHAD_MR, OBJ_SPIKE_NOSHAD_MR) - set_function(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) - endfunction + set_ailist(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) + endlist }; u8 func1012_spike_bl[] = { wait_for_spike_destroyed(OBJ_SPIKE_BL, OBJ_SPIKE_SHAD_BL, OBJ_SPIKE_NOSHAD_BL) - set_function(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) - endfunction + set_ailist(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) + endlist }; u8 func1013_spike_br[] = { wait_for_spike_destroyed(OBJ_SPIKE_BR, OBJ_SPIKE_SHAD_BR, OBJ_SPIKE_NOSHAD_BR) - set_function(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) - endfunction + set_ailist(CHR_SELF, FUNC_UPDATE_SPIKE_STAGEFLAGS) + endlist }; u8 func1014_spike_top[] = { @@ -2496,38 +2496,38 @@ u8 func1014_spike_top[] = { label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040f_update_spike_stageflags[] = { if_stage_flag_eq(STAGEFLAG_SPIKE1_DESTROYED, TRUE, /*goto*/ 0x09) set_stage_flag(STAGEFLAG_SPIKE1_DESTROYED) set_stage_flag(STAGEFLAG_SPIKE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x09) if_stage_flag_eq(STAGEFLAG_SPIKE2_DESTROYED, TRUE, /*goto*/ 0x0b) set_stage_flag(STAGEFLAG_SPIKE2_DESTROYED) set_stage_flag(STAGEFLAG_SPIKE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0b) if_stage_flag_eq(STAGEFLAG_SPIKE3_DESTROYED, TRUE, /*goto*/ 0x0c) set_stage_flag(STAGEFLAG_SPIKE3_DESTROYED) set_stage_flag(STAGEFLAG_SPIKE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0c) set_stage_flag(STAGEFLAG_SPIKE4_DESTROYED) set_stage_flag(STAGEFLAG_SPIKE_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c00_intro[] = { @@ -2554,12 +2554,12 @@ u8 func0c00_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02eb, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x02eb, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02ec, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02ec, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) yield @@ -2583,17 +2583,17 @@ u8 func0c00_intro[] = { set_chr_chrflag(0x37, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x37, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x37, CHRHFLAG_00020000) - animation(0x02ee, -1, -1, 0x06, 0x00, 0x37, 4) + chr_do_animation(0x02ee, -1, -1, 0x06, 0x00, 0x37, 4) set_chr_chrflag(0x38, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x38, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x38, CHRHFLAG_00020000) - animation(0x02ef, -1, -1, 0x06, 0x00, 0x38, 4) + chr_do_animation(0x02ef, -1, -1, 0x06, 0x00, 0x38, 4) set_chr_chrflag(0x39, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x39, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x39, CHRHFLAG_00020000) - animation(0x02f0, -1, -1, 0x06, 0x00, 0x39, 4) + chr_do_animation(0x02f0, -1, -1, 0x06, 0x00, 0x39, 4) beginloop(0x0b) if_camera_animating(/*goto*/ 0x2d) @@ -2613,12 +2613,12 @@ u8 func0c00_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x02f2, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x02f2, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02f3, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02f3, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) yield @@ -2642,22 +2642,22 @@ u8 func0c00_intro[] = { set_chr_chrflag(0x37, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x37, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x37, CHRHFLAG_00020000) - animation(0x02f5, -1, -1, 0x06, 0x00, 0x37, 4) + chr_do_animation(0x02f5, -1, -1, 0x06, 0x00, 0x37, 4) set_chr_chrflag(0x38, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x38, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x38, CHRHFLAG_00020000) - animation(0x02f6, -1, -1, 0x06, 0x00, 0x38, 4) + chr_do_animation(0x02f6, -1, -1, 0x06, 0x00, 0x38, 4) set_chr_chrflag(0x39, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x39, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x39, CHRHFLAG_00020000) - animation(0x02f7, -1, -1, 0x06, 0x00, 0x39, 4) + chr_do_animation(0x02f7, -1, -1, 0x06, 0x00, 0x39, 4) set_chr_chrflag(0x3a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x3a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x3a, CHRHFLAG_00020000) - animation(0x02f8, -1, -1, 0x06, 0x00, 0x3a, 4) + chr_do_animation(0x02f8, -1, -1, 0x06, 0x00, 0x3a, 4) beginloop(0x0d) if_camera_animating(/*goto*/ 0x2d) @@ -2699,28 +2699,28 @@ u8 func0c00_intro[] = { set_chr_chrflag(0x37, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x37, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x37, CHRHFLAG_00020000) - animation(0x02fc, -1, -1, 0x06, 0x00, 0x37, 4) + chr_do_animation(0x02fc, -1, -1, 0x06, 0x00, 0x37, 4) set_chr_chrflag(0x38, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x38, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x38, CHRHFLAG_00020000) - animation(0x02fd, -1, -1, 0x06, 0x00, 0x38, 4) + chr_do_animation(0x02fd, -1, -1, 0x06, 0x00, 0x38, 4) set_chr_chrflag(0x39, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x39, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x39, CHRHFLAG_00020000) - animation(0x02fe, -1, -1, 0x06, 0x00, 0x39, 4) + chr_do_animation(0x02fe, -1, -1, 0x06, 0x00, 0x39, 4) set_chr_chrflag(0x3a, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x3a, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x3a, CHRHFLAG_00020000) - animation(0x02ff, -1, -1, 0x06, 0x00, 0x3a, 4) + chr_do_animation(0x02ff, -1, -1, 0x06, 0x00, 0x3a, 4) unset_chr_chrflag(CHR_KING2, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_KING2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_KING2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_KING2, CHRHFLAG_00020000) - animation(0x0300, -1, -1, 0x06, 0x00, CHR_KING2, 4) + chr_do_animation(0x0300, -1, -1, 0x06, 0x00, CHR_KING2, 4) set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) yield @@ -2753,7 +2753,7 @@ u8 func0c00_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0303, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0303, -1, -1, 0x06, 0x00, CHR_BOND, 4) beginloop(0x10) if_camera_animating(/*goto*/ 0x2d) @@ -2771,7 +2771,7 @@ u8 func0c00_intro[] = { label(0x06) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0303, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0303, -2, -1, 0x06, 0x00, CHR_BOND, 2) hide_object(0x36) remove_chr(0x37) remove_chr(0x38) @@ -2779,7 +2779,7 @@ u8 func0c00_intro[] = { remove_chr(0x3a) remove_chr(CHR_KING2) unset_chr_chrflag(CHR_KING1, CHRCFLAG_HIDDEN) - set_function(CHR_KING1, FUNC_KING_WAITING) + set_ailist(CHR_KING1, FUNC_KING_WAITING) set_object_flag_bank1(0x2a, OBJECTFLAG1_04000000) set_object_flag_bank1(0x2b, OBJECTFLAG1_04000000) set_object_flag_bank1(0x2c, OBJECTFLAG1_04000000) @@ -2790,18 +2790,18 @@ u8 func0c00_intro[] = { restart_default_music reset_ambience enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0414_outro_from_menu[] = { - set_function(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) hide_object(OBJ_SPIKE_ML) hide_object(OBJ_SPIKE_MR) hide_object(OBJ_SPIKE_BL) hide_object(OBJ_SPIKE_BR) - set_function(CHR_SELF, FUNC_OUTRO) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + endlist }; u8 func0414_outro[] = { @@ -2820,7 +2820,7 @@ u8 func0414_outro[] = { set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) - set_function(CHR_TARGET, GFUNC_IDLE) + set_ailist(CHR_TARGET, GFUNC_IDLE) remove_chr(0x05) remove_chr(0x06) remove_chr(0x07) @@ -2849,12 +2849,12 @@ u8 func0414_outro[] = { remove_chr(0x1d) remove_chr(0x1e) remove_chr(0x1f) - set_function(CHR_KING1, GFUNC_IDLE) + set_ailist(CHR_KING1, GFUNC_IDLE) set_chr_chrflag(CHR_KING1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_KING1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_KING1, CHRHFLAG_00020000) - animation(0x044d, -1, -1, 0x06, 0x00, CHR_KING1, 4) + chr_do_animation(0x044d, -1, -1, 0x06, 0x00, CHR_KING1, 4) object_do_animation(0x044e, OBJ_SPIKE_T, 0x04ff, 0xff) set_stage_flag(STAGEFLAG_IN_OUTRO) @@ -2875,12 +2875,12 @@ u8 func0414_outro[] = { set_chr_chrflag(CHR_KING1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_KING1, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_KING1, CHRHFLAG_00020000) - animation(0x0450, -1, -1, 0x06, 0x00, CHR_KING1, 4) + chr_do_animation(0x0450, -1, -1, 0x06, 0x00, CHR_KING1, 4) set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x0451, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x0451, -1, -1, 0x06, 0x00, CHR_TARGET, 4) object_do_animation(0x0452, OBJ_SPIKE_T, 0x04ff, 0xff) @@ -2930,12 +2930,12 @@ u8 func0414_outro[] = { set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x02c8, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x02c8, -1, -1, 0x06, 0x00, CHR_TARGET, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x02c9, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x02c9, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) show_object(0x23) set_object_flag_bank1(0x23, OBJECTFLAG1_04000000) @@ -2978,15 +2978,15 @@ u8 func0414_outro[] = { restart_default_music reset_ambience end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0413_hide[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1015_msg_specialpillars[] = { @@ -3031,8 +3031,8 @@ u8 func1015_msg_specialpillars[] = { label(0x2d) speak(CHR_P1P2, 0x421e, 0x73e0, CHANNEL_6, COLOR_09_BLUE) // "This seems to be one of the special pillars." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_msg_powersmoreconstant[] = { @@ -3045,8 +3045,8 @@ u8 func1016_msg_powersmoreconstant[] = { label(0x2d) speak(CHR_P1P2, 0x421f, 0x73e1, CHANNEL_6, COLOR_09_BLUE) // "The power's more constant in this area. The Inner ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_msg_skedararmy[] = { @@ -3056,9 +3056,9 @@ u8 func1017_msg_skedararmy[] = { endloop(0x04) label(0x2d) - speak(CHR_P1P2, 0x4220, 0x73e2, CHANNEL_6, COLOR_09_BLUE) // "OH, NO!!! A Skedar army in suspended animation!" - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + speak(CHR_P1P2, 0x4220, 0x73e2, CHANNEL_6, COLOR_09_BLUE) // "OH, NO!!! A Skedar army in suspended chr_do_animation!" + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_msg_cutoffthehead[] = { @@ -3076,8 +3076,8 @@ u8 func1018_msg_cutoffthehead[] = { label(0x2d) speak(CHR_P1P2, 0x4221, 0x73e3, CHANNEL_6, COLOR_09_BLUE) // "Okay, this is it... Cut off the head and the body ..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1019_blow_pillars[] = { @@ -3147,8 +3147,8 @@ u8 func1019_blow_pillars[] = { yield yield yield - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_setup_pillars[] = { @@ -3161,8 +3161,8 @@ u8 func1004_setup_pillars[] = { set_object_flag_bank0(OBJ_PILLAR1, OBJECTFLAG0_INVINCIBLE) set_object_flag_bank0(OBJ_PILLAR2, OBJECTFLAG0_INVINCIBLE) set_object_flag_bank0(OBJ_PILLAR3, OBJECTFLAG0_INVINCIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_remove_pillar_shadow[] = { @@ -3176,14 +3176,14 @@ u8 func101d_remove_pillar_shadow[] = { hide_object(0x3e) unset_object_flag_bank1(0x4e, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank1(0x4f, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c00_intro_sounds[] = { @@ -3361,7 +3361,7 @@ u8 func0c00_intro_sounds[] = { mute_channel(CHANNEL_10) goto_first(0xda) - endfunction + endlist }; u8 func0414_outro_sounds[] = { @@ -3574,7 +3574,7 @@ u8 func0414_outro_sounds[] = { mute_channel(CHANNEL_6) goto_first(0xda) - endfunction + endlist }; u8 func1020_show_phoenix[] = { @@ -3589,11 +3589,11 @@ u8 func1020_show_phoenix[] = { unset_object_flag_bank1(OBJ_PHOENIX1, OBJECTFLAG1_INVISIBLE) unset_object_flag_bank0(OBJ_PHOENIX2, OBJECTFLAG0_00100000) unset_object_flag_bank1(OBJ_PHOENIX2, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) endloop(0x04) - endfunction + endlist }; /** @@ -3609,8 +3609,8 @@ u8 func1021_handle_mine[] = { // A label(0x2d) destroy_object(OBJ_REMOTEMINE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1022_armyroom_exitdoors[] = { @@ -3630,8 +3630,8 @@ u8 func1022_armyroom_exitdoors[] = { // All difficulties label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 unregistered_function1[] = { @@ -3644,8 +3644,8 @@ u8 unregistered_function1[] = { label(0x2d) chr_drop_weapon(CHR_BOND) message(CHR_BOND, 0x421a) // "Target Amplifier placed incorrectly." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3661,7 +3661,7 @@ u8 unregistered_function2[] = { dprint 'C','A','N',' ','P','U','S','H','\n',0, endloop(0x04) - endfunction + endlist }; u8 func1024_check_grenades_wasted[] = { @@ -3683,7 +3683,7 @@ u8 func1024_check_grenades_wasted[] = { label(0x2d) if_object_in_good_condition(0x4d, /*goto*/ 0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) label(0x2d) @@ -3699,7 +3699,7 @@ u8 func1024_check_grenades_wasted[] = { // Blown up using other means (eg. Phoenix or all guns cheat) unset_stage_flag(STAGEFLAG_GRENADES_WASTED) message(CHR_BOND, 0x4235) // "Alternative entrance to Shrine created." - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) if_stage_flag_eq(STAGEFLAG_GRENADES_WASTED, TRUE, /*goto*/ 0x2d) @@ -3708,15 +3708,15 @@ u8 func1024_check_grenades_wasted[] = { label(0x2d) endloop(0x09) - endfunction + endlist }; u8 func1023_setup_rtracker[] = { yield set_object_flag_bank2(OBJ_PHOENIX1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_PHOENIX2, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1427_setup_lighting[] = { @@ -3856,8 +3856,8 @@ u8 func1427_setup_lighting[] = { misc_command(0x0036, 0x06, 0x01) misc_command(0x0037, 0x06, 0x01) misc_command(0x0038, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1025_unlock_doors_for_buddy[] = { @@ -3882,15 +3882,15 @@ u8 func1025_unlock_doors_for_buddy[] = { // Buddy doesn't exist label(0x2d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1426_setup_portals[] = { yield set_portal_flag(0x0072, 0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1028_buddybridge[] = { @@ -3915,15 +3915,15 @@ u8 func1028_buddybridge[] = { // This flag is set by global ailists label(0x2d) if_stage_flag_eq(STAGEFLAG_AI_BUDDY_EXISTS, FALSE, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Flag not set - so this is solo mode // Remove the bridge and barricade over the first ravine label(0x2d) hide_object(OBJ_BUDDYBRIDGE) hide_object(OBJ_BUDDYBARRICADE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupstat.c b/src/files/setup/setupstat.c index d847602c4..5cd3f2bda 100644 --- a/src/files/setup/setupstat.c +++ b/src/files/setup/setupstat.c @@ -289,15 +289,15 @@ struct path paths[] = { u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1000_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func0403_init_maian_leader[] = { @@ -310,8 +310,8 @@ u8 func0403_init_maian_leader[] = { set_armor(300) set_recovery_speed(100) set_shield(0) - set_function(CHR_SELF, FUNC_DEFEND) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND) + endlist }; u8 func0402_init_king[] = { @@ -324,12 +324,12 @@ u8 func0402_init_king[] = { set_recovery_speed(100) set_shield(0) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, FUNC_DEFEND) - endfunction + set_ailist(CHR_SELF, FUNC_DEFEND) + endlist }; u8 func0401_defend[] = { - set_onshot_function(FUNC_DEFEND) + set_shotlist(FUNC_DEFEND) set_self_chrflag(CHRCFLAG_NOAUTOAIM) if_chr_dying(CHR_SELF, /*goto*/ 0x2d) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) @@ -338,8 +338,8 @@ u8 func0401_defend[] = { // Dying label(0x2d) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Not dying - go to pad label(0x06) @@ -394,14 +394,14 @@ u8 func0401_defend[] = { if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) if_chr_dying(CHR_TARGET, /*goto*/ 0x2d) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_DEFEND) - set_onshot_function(FUNC_DEFEND) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_DEFEND) + set_shotlist(FUNC_DEFEND) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x2d) goto_first(0x03) - endfunction + endlist }; u8 func1003_spawn_maians[] = { @@ -428,12 +428,12 @@ u8 func1003_spawn_maians[] = { // Loop until a Maian is able to be spawned or counter depleted beginloop(0x8d) if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x0053, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x0050, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x004d, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x004c, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x004e, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) - try_spawn_chr(BODY_ELVIS1, HEAD_MAIAN_S, 0x004a, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x0053, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x0050, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x004d, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x004c, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x004e, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_ELVIS1, HEAD_MAIAN_S, 0x004a, FUNC_INIT_MAIAN, 0x00000000, /*goto*/ 0x8e) reloop(0x8d) // Successful spawn @@ -483,8 +483,8 @@ u8 func1003_spawn_maians[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0405_init_maian[] = { @@ -507,13 +507,13 @@ u8 func0405_init_maian[] = { set_self_flag_bankx(CHRFLAG1_00080000, BANK_1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_MAIAN) - endfunction + set_ailist(CHR_SELF, FUNC_MAIAN) + endlist }; u8 func0404_maian[] = { - set_return_function(CHR_SELF, FUNC_MAIAN) - set_onshot_function(FUNC_MAIAN) + set_returnlist(CHR_SELF, FUNC_MAIAN) + set_shotlist(FUNC_MAIAN) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) label(0x03) @@ -559,15 +559,15 @@ u8 func0404_maian[] = { if_chr_dying(CHR_TARGET, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x06) if_chr_unloaded(CHR_TARGET, /*goto*/ 0x06) - set_return_function(CHR_SELF, FUNC_MAIAN) - set_onshot_function(FUNC_MAIAN) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, FUNC_MAIAN) + set_shotlist(FUNC_MAIAN) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // King died while fighting label(0x06) goto_first(0x03) - endfunction + endlist }; u8 func1004_spawn_king1_skedar[] = { @@ -593,10 +593,10 @@ u8 func1004_spawn_king1_skedar[] = { beginloop(0x8d) if_stage_flag_eq(STAGEFLAG_KING1_DEAD, TRUE, /*goto*/ 0x0e) if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0079, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x007d, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0083, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0085, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0079, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x007d, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0083, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0085, FUNC_KING1_SKEDAR, 0x00000200, /*goto*/ 0x8e) reloop(0x8d) // Successful spawn @@ -654,8 +654,8 @@ u8 func1004_spawn_king1_skedar[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_spawn_king2_skedar[] = { @@ -681,10 +681,10 @@ u8 func1008_spawn_king2_skedar[] = { beginloop(0x8d) if_stage_flag_eq(STAGEFLAG_KING2_DEAD, TRUE, /*goto*/ 0x0e) if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x008e, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0090, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x008f, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0091, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x008e, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0090, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x008f, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0091, FUNC_KING2_SKEDAR, 0x00000210, /*goto*/ 0x8e) reloop(0x8d) // Successful spawn @@ -738,10 +738,10 @@ u8 func1008_spawn_king2_skedar[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_spawn_king3_skedar[] = { @@ -767,10 +767,10 @@ u8 func100c_spawn_king3_skedar[] = { beginloop(0x8d) if_stage_flag_eq(STAGEFLAG_KING3_DEAD, TRUE, /*goto*/ 0x0e) if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0095, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0096, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x012e, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) - try_spawn_chr(BODY_SKEDAR, HEAD_RANDOM, 0x0132, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0095, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0096, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x012e, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) + try_spawn_chr_at_pad(BODY_SKEDAR, HEAD_RANDOM, 0x0132, FUNC_KING3_SKEDAR, 0x00000200, /*goto*/ 0x8e) reloop(0x8d) // Successful spawn @@ -808,10 +808,10 @@ u8 func100c_spawn_king3_skedar[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0407_king1_skedar[] = { @@ -831,8 +831,8 @@ u8 func0407_king1_skedar[] = { set_self_flag_bankx(CHRFLAG1_00080000, BANK_1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_SKEDAR) + endlist }; u8 func0408_king2_skedar[] = { @@ -852,8 +852,8 @@ u8 func0408_king2_skedar[] = { set_self_flag_bankx(CHRFLAG1_00080000, BANK_1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_SKEDAR) + endlist }; u8 func0409_king3_skedar[] = { @@ -873,12 +873,12 @@ u8 func0409_king3_skedar[] = { set_self_flag_bankx(CHRFLAG1_00080000, BANK_1) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, FUNC_SKEDAR) - endfunction + set_ailist(CHR_SELF, FUNC_SKEDAR) + endlist }; u8 func0406_skedar[] = { - set_onshot_function(FUNC_SKEDAR) + set_shotlist(FUNC_SKEDAR) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) label(0x03) @@ -893,10 +893,10 @@ u8 func0406_skedar[] = { label(0x08) dprint 'D','E','T','E','C','T','E','D','\n',0, - set_return_function(CHR_SELF, FUNC_SKEDAR) - set_onshot_function(FUNC_SKEDAR) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, FUNC_SKEDAR) + set_shotlist(FUNC_SKEDAR) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func1005_check_leader_dead[] = { @@ -909,8 +909,8 @@ u8 func1005_check_leader_dead[] = { label(0x2d) message(CHR_BOND, 0x4607) // "Maian leader has been killed." set_stage_flag(STAGEFLAG_LEADER_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1009_check_king1_dead[] = { @@ -927,8 +927,8 @@ u8 func1009_check_king1_dead[] = { set_stage_flag(STAGEFLAG_KING1_DEAD) unlock_door(0x3e, 0x40) unlock_door(0x3f, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_check_king2_dead[] = { @@ -945,8 +945,8 @@ u8 func100a_check_king2_dead[] = { message(CHR_BOND, 0x4608) // "Skedar King has been killed." set_stage_flag(STAGEFLAG_KING2_DEAD) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_king3_dead[] = { @@ -963,8 +963,8 @@ u8 func100b_check_king3_dead[] = { message(CHR_BOND, 0x4608) // "Skedar King has been killed." set_stage_flag(STAGEFLAG_KING3_DEAD) label(0x0e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_check_end_level[] = { @@ -998,21 +998,21 @@ u8 func1007_check_end_level[] = { // Mission failed label(0x2d) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x06) - set_function(CHR_SELF, FUNC_OUTRO) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_hide[] = { label(0x03) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100d_king1_invincible[] = { @@ -1034,7 +1034,7 @@ u8 func100d_king1_invincible[] = { unset_chr_chrflag(CHR_KING1, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) endloop(0x03) - endfunction + endlist }; u8 unregistered_function[] = { @@ -1057,11 +1057,11 @@ u8 unregistered_function[] = { // Remove Blonde if counterop doesn't exist label(0x03) if_chr_death_animation_finished(CHR_ANTI, /*goto*/ 0x2d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2d) remove_chr(CHR_BLONDE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -1075,17 +1075,17 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x047d, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x047d, -1, -1, 0x06, 0x00, CHR_BOND, 4) unset_chr_chrflag(CHR_MAIAN1, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_MAIAN1, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN1, CHRHFLAG_00020000) - animation(0x047e, -1, -1, 0x06, 0x00, CHR_MAIAN1, 4) + chr_do_animation(0x047e, -1, -1, 0x06, 0x00, CHR_MAIAN1, 4) unset_chr_chrflag(CHR_MAIAN2, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_MAIAN2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN2, CHRHFLAG_00020000) - animation(0x047f, -1, -1, 0x06, 0x00, CHR_MAIAN2, 4) + chr_do_animation(0x047f, -1, -1, 0x06, 0x00, CHR_MAIAN2, 4) restart_timer fade_to_color(0x000000ff, 0) @@ -1122,25 +1122,25 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x047d, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x047d, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(CHR_MAIAN3, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN3, CHRHFLAG_00020000) - animation(0x047e, -2, -1, 0x06, 0x00, CHR_MAIAN3, 2) + chr_do_animation(0x047e, -2, -1, 0x06, 0x00, CHR_MAIAN3, 2) unset_chr_chrflag(CHR_MAIAN4, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN4, CHRHFLAG_00020000) - animation(0x047f, -2, -1, 0x06, 0x00, CHR_MAIAN4, 2) + chr_do_animation(0x047f, -2, -1, 0x06, 0x00, CHR_MAIAN4, 2) - set_function(CHR_MAIAN1, FUNC_INIT_MAIAN) - set_function(CHR_MAIAN2, FUNC_INIT_MAIAN) + set_ailist(CHR_MAIAN1, FUNC_INIT_MAIAN) + set_ailist(CHR_MAIAN2, FUNC_INIT_MAIAN) restart_default_music reset_ambience enter_firstperson yield label(0x2d) - set_function(CHR_SELF, FUNC_BLOW_MINES) - endfunction + set_ailist(CHR_SELF, FUNC_BLOW_MINES) + endlist }; u8 func040b_outro[] = { @@ -1156,17 +1156,17 @@ u8 func040b_outro[] = { unset_chr_chrflag(CHR_MAIAN3, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_MAIAN3, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN3, CHRHFLAG_00020000) - animation(0x0481, -1, -1, 0x06, 0x00, CHR_MAIAN3, 4) + chr_do_animation(0x0481, -1, -1, 0x06, 0x00, CHR_MAIAN3, 4) unset_chr_chrflag(CHR_MAIAN4, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_MAIAN4, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN4, CHRHFLAG_00020000) - animation(0x0482, -1, -1, 0x06, 0x00, CHR_MAIAN4, 4) + chr_do_animation(0x0482, -1, -1, 0x06, 0x00, CHR_MAIAN4, 4) unset_chr_chrflag(CHR_MAIAN5, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_MAIAN5, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_MAIAN5, CHRHFLAG_00020000) - animation(0x0483, -1, -1, 0x06, 0x00, CHR_MAIAN5, 4) + chr_do_animation(0x0483, -1, -1, 0x06, 0x00, CHR_MAIAN5, 4) show_nonessential_chrs(FALSE) @@ -1215,8 +1215,8 @@ u8 func040b_outro[] = { label(0x06) mute_channel(CHANNEL_10) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100f_blow_mines[] = { @@ -1247,8 +1247,8 @@ u8 func100f_blow_mines[] = { destroy_object(OBJ_MINE5) wait(0x93) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_init_lighting[] = { @@ -1376,8 +1376,8 @@ u8 func1010_init_lighting[] = { misc_command(0x0058, 0x05, 0x01) misc_command(0x0059, 0x05, 0x01) misc_command(0x0059, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setuptra.c b/src/files/setup/setuptra.c index f8fca7f07..5b118a978 100644 --- a/src/files/setup/setuptra.c +++ b/src/files/setup/setuptra.c @@ -598,30 +598,30 @@ u8 intro[] = { u8 func1400_setup_counterop[] = { yield set_chr_team(CHR_ANTI, TEAM_ENEMY) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func1001_objectives_failed_msg[] = { yield - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1022_gas_damage_bond[] = { set_target_chr(CHR_BOND) - set_function(CHR_SELF, FUNC_GAS_DAMAGE) - endfunction + set_ailist(CHR_SELF, FUNC_GAS_DAMAGE) + endlist }; u8 func1023_gas_damage_coop[] = { set_target_chr(CHR_COOP) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x32) - set_function(CHR_SELF, FUNC_GAS_DAMAGE) + set_ailist(CHR_SELF, FUNC_GAS_DAMAGE) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0401_gas_damage[] = { @@ -681,8 +681,8 @@ u8 func0401_gas_damage[] = { goto_first(0x08) label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_jon_msgs_gravedanger[] = { @@ -730,8 +730,8 @@ u8 func1004_jon_msgs_gravedanger[] = { endloop(0x0c) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_jon_msgs_meetup[] = { @@ -766,8 +766,8 @@ u8 func1005_jon_msgs_meetup[] = { label(0x06) set_stage_flag(STAGEFLAG_JON_SAID_MAINT_HATCH) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_check_medpack_collected[] = { @@ -778,8 +778,8 @@ u8 func1007_check_medpack_collected[] = { label(0x06) set_stage_flag(STAGEFLAG_COLLECTED_MEDPACK) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0403_init_jonathan[] = { @@ -797,19 +797,19 @@ u8 func0403_init_jonathan[] = { set_armor(1200) set_alertness(150) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_JONATHAN_WAITING_FOR_MEETUP) - endfunction + set_ailist(CHR_SELF, FUNC_JONATHAN_WAITING_FOR_MEETUP) + endlist }; u8 func0402_jonathan_waiting_for_meetup[] = { - set_onshot_function(FUNC_JONATHAN_WAITING_FOR_MEETUP) + set_shotlist(FUNC_JONATHAN_WAITING_FOR_MEETUP) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) if_chr_dying(CHR_SELF, /*goto*/ 0x32) if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) goto_next(0x67) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x67) set_self_flag_bankx(CHRFLAG0_10000000, BANK_0) @@ -861,8 +861,8 @@ u8 func0402_jonathan_waiting_for_meetup[] = { label(0x06) stop_chr - set_function(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) - endfunction + set_ailist(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) + endlist }; u8 func0404_jonathan_following_and_mine[] = { @@ -872,15 +872,15 @@ u8 func0404_jonathan_following_and_mine[] = { yield rebuild_teams rebuild_squadrons - set_return_function(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) - set_onshot_function(FUNC_JONATHAN_FOLLOWING_AND_MINE) + set_returnlist(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) + set_shotlist(FUNC_JONATHAN_FOLLOWING_AND_MINE) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) if_chr_dying(CHR_SELF, /*goto*/ 0x32) if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x32) @@ -963,14 +963,14 @@ u8 func0404_jonathan_following_and_mine[] = { // Saw enemy label(0x09) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // In mine room label(0x0a) unset_self_chrflag(CHRCFLAG_01000000) set_stage_flag(STAGEFLAG_JON_ENTERED_MINE_ROOM) speak(CHR_P1P2, 0x481b, 0x12b5, CHANNEL_4, COLOR_03_RED) // "Right, we're near. Cover me, Jo..." - set_onshot_function(FUNC_JONATHAN_SHOT_WHILE_PLANTING) + set_shotlist(FUNC_JONATHAN_SHOT_WHILE_PLANTING) label(0x0b) jog_to_pad(0x038b) @@ -995,18 +995,18 @@ u8 func0404_jonathan_following_and_mine[] = { call_rng if_rand_lt(86, /*goto*/ 0x6a) if_rand_lt(172, /*goto*/ 0x6b) - animation(ANIM_OPERATE_0204, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, -1, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x0e) label(0x6a) - animation(ANIM_OPERATE_0205, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0205, -1, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x0e) label(0x6b) - animation(ANIM_OPERATE_0206, -1, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0206, -1, -1, 0x10, 0x0a, CHR_SELF, 2) label(0x0e) - set_onshot_function(FUNC_JONATHAN_SHOT_WHILE_PLANTING) + set_shotlist(FUNC_JONATHAN_SHOT_WHILE_PLANTING) resume_timer unset_self_flag_bankx(CHRFLAG0_SAID_INJURY_QUIP, BANK_0) @@ -1020,7 +1020,7 @@ u8 func0404_jonathan_following_and_mine[] = { endloop(0x0d) label(0x06) - set_onshot_function(FUNC_JONATHAN_FOLLOWING_AND_MINE) + set_shotlist(FUNC_JONATHAN_FOLLOWING_AND_MINE) set_stage_flag(STAGEFLAG_JON_FINISHED_EXPLOSIVES) unset_stage_flag(STAGEFLAG_JON_SHOT_WHILE_PLANTING) set_self_chrflag(CHRCFLAG_01000000) @@ -1050,20 +1050,20 @@ u8 func0404_jonathan_following_and_mine[] = { label(0x06) goto_first(LABEL_FOLLOW) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0413_jonathan_hangar[] = { - set_return_function(CHR_SELF, FUNC_JONATHAN_HANGAR) - set_onshot_function(FUNC_JONATHAN_HANGAR) + set_returnlist(CHR_SELF, FUNC_JONATHAN_HANGAR) + set_shotlist(FUNC_JONATHAN_HANGAR) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) if_chr_dying(CHR_SELF, /*goto*/ 0x32) if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x32) if_just_injured(CHR_SELF, /*goto*/ 0x06) @@ -1079,7 +1079,7 @@ u8 func0413_jonathan_hangar[] = { // Attack enemy (jumped to from further below) label(0x09) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // Alive and well label(0x63) @@ -1119,7 +1119,7 @@ u8 func0413_jonathan_hangar[] = { if_chr_dying(CHR_ELVIS, /*goto*/ 0xc3) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0xc3) restart_timer - animation(0x0232, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x0232, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) speak(CHR_P1P2, 0x483b, 0x1a9a, CHANNEL_5, COLOR_06_WHITE) // "Oh, no! We have a problem. It's a single seater!" beginloop(0x7d) @@ -1135,7 +1135,7 @@ u8 func0413_jonathan_hangar[] = { label(0x06) restart_timer - animation(0x0233, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x0233, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) speak(CHR_P1P2, 0x483c, 0x1a9b, CHANNEL_5, COLOR_06_WHITE) // "Two can get in but no more." beginloop(0x7e) @@ -1166,7 +1166,7 @@ u8 func0413_jonathan_hangar[] = { label(0x06) restart_timer - animation(0x0232, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x0232, -1, 200, 0x02, 0x00, CHR_ELVIS, 2) speak(CHR_P1P2, 0x483d, 0x1a9c, CHANNEL_5, COLOR_06_WHITE) // "Plus, it's got no style, you know what I'm saying?" beginloop(0x7f) @@ -1197,7 +1197,7 @@ u8 func0413_jonathan_hangar[] = { label(0x06) restart_timer - animation(0x0231, -1, 200, 0x02, 0x00, CHR_JONATHAN, 2) + chr_do_animation(0x0231, -1, 200, 0x02, 0x00, CHR_JONATHAN, 2) speak(CHR_P1P2, 0x482d, 0x12b9, CHANNEL_5, COLOR_03_RED) // "One of us will have to stay behind and open the ha..." beginloop(0x1a) @@ -1243,7 +1243,7 @@ u8 func0413_jonathan_hangar[] = { label(0x06) restart_timer - animation(0x0232, -1, 200, 0x02, 0x00, CHR_JONATHAN, 2) + chr_do_animation(0x0232, -1, 200, 0x02, 0x00, CHR_JONATHAN, 2) speak(CHR_P1P2, 0x482e, 0x12ba, CHANNEL_5, COLOR_03_RED) // "I'll get out on that hoverbike. Cover me while I o..." beginloop(0x1b) @@ -1254,7 +1254,7 @@ u8 func0413_jonathan_hangar[] = { if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) if_chr_dying(CHR_ELVIS, /*goto*/ 0x06) if_chr_unloaded(CHR_ELVIS, /*goto*/ 0x06) - set_function(CHR_ELVIS, FUNC_ELVIS_GO_TO_UFO) + set_ailist(CHR_ELVIS, FUNC_ELVIS_GO_TO_UFO) label(0x06) set_stage_flag(STAGEFLAG_HANGAR_CONVERSATION_FINISHED) @@ -1287,7 +1287,7 @@ u8 func0413_jonathan_hangar[] = { // At first terminal label(0x06) - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x1d) if_chr_stopped(/*goto*/ 0x06) @@ -1313,7 +1313,7 @@ u8 func0413_jonathan_hangar[] = { // At second terminal label(0x06) - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0x1f) if_chr_stopped(/*goto*/ 0x06) @@ -1329,7 +1329,7 @@ u8 func0413_jonathan_hangar[] = { message(CHR_P1P2, 0x4825) // "Outer hangar door is opening." beginloop(0x20) - set_function(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) + set_ailist(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) endloop(0x20) // Jo taking over @@ -1354,25 +1354,25 @@ u8 func0413_jonathan_hangar[] = { set_stage_flag(STAGEFLAG_JO_DOING_TERMINALS) set_stage_flag(STAGEFLAG_HANGAR_X_MUSIC_STARTED) play_x_music(CHANNEL_10, 90) - set_function(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) + set_ailist(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) // Elvis dead label(0xc3) - set_return_function(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) - set_function(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) - endfunction + set_returnlist(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) + set_ailist(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) + endlist }; u8 func041c_elvis_go_to_ufo[] = { - set_return_function(CHR_SELF, FUNC_ELVIS_GO_TO_UFO) - set_onshot_function(FUNC_ELVIS_GO_TO_UFO) + set_returnlist(CHR_SELF, FUNC_ELVIS_GO_TO_UFO) + set_shotlist(FUNC_ELVIS_GO_TO_UFO) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) if_chr_dying(CHR_SELF, /*goto*/ 0x32) if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) run_to_pad(0x03fe) @@ -1387,19 +1387,19 @@ u8 func041c_elvis_go_to_ufo[] = { beginloop(0x6a) endloop(0x6a) - endfunction + endlist }; u8 func041b_jonathan_after_terminals[] = { - set_return_function(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) - set_onshot_function(FUNC_JONATHAN_AFTER_TERMINALS) + set_returnlist(CHR_SELF, FUNC_JONATHAN_AFTER_TERMINALS) + set_shotlist(FUNC_JONATHAN_AFTER_TERMINALS) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) if_chr_dying(CHR_SELF, /*goto*/ 0x32) if_chr_unloaded(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) run_to_pad(0x015f) // conversation corner @@ -1425,8 +1425,8 @@ u8 func041b_jonathan_after_terminals[] = { endloop(0x4d) label(0x09) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func0405_jonathan_shot_while_planting[] = { @@ -1467,9 +1467,9 @@ u8 func0405_jonathan_shot_while_planting[] = { endloop(0xc4) label(0x06) - set_onshot_function(FUNC_JONATHAN_FOLLOWING_AND_MINE) - set_function(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) - endfunction + set_shotlist(FUNC_JONATHAN_FOLLOWING_AND_MINE) + set_ailist(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE) + endlist }; /** @@ -1483,8 +1483,8 @@ u8 func0406_unused_0406[] = { label(0x06) set_alertness(100) set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1511,7 +1511,7 @@ u8 func1008_spawngroup1[] = { // Keep doing this until explosives finished, or 15 guards spawned if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x06) if_morale_lt(1, /*goto*/ 0x06) - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x00c7, FUNC_SPAWNGROUP1_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x00c7, FUNC_SPAWNGROUP1_GUARD, 0x00000200, /*goto*/ 0x60) reloop(0x5f) // Spawned a guard @@ -1540,8 +1540,8 @@ u8 func1008_spawngroup1[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_spawngroup1_guard[] = { @@ -1561,8 +1561,8 @@ u8 func1008_spawngroup1_guard[] = { run_to_pad(0x013e) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_CHOOSE_TARGET) + endlist }; /** @@ -1583,11 +1583,11 @@ u8 func1013_spawngroup2[] = { if_morale_lt(1, /*goto*/ 0x06) call_rng if_rand_gt(128, /*goto*/ 0x32) - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0144, FUNC_SPAWNGROUP2_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x0144, FUNC_SPAWNGROUP2_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) label(0x32) - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0138, FUNC_SPAWNGROUP2_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x0138, FUNC_SPAWNGROUP2_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) label(0x60) @@ -1615,8 +1615,8 @@ u8 func1013_spawngroup2[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1013_spawngroup2_guard[] = { @@ -1636,8 +1636,8 @@ u8 func1013_spawngroup2_guard[] = { rebuild_teams rebuild_squadrons set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1658,7 +1658,7 @@ u8 func1014_spawngroup3[] = { // Agent - do nothing label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA nad PA beginloop(0x04) @@ -1675,11 +1675,11 @@ u8 func1014_spawngroup3[] = { // @bug: If either of these fail to spawn, the function jumps straight // to the end rather than attempting to respawn them. - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0117, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x0117, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) label(0x32) - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x013e, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x013e, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) // Spawned a guard @@ -1718,8 +1718,8 @@ u8 func1014_spawngroup3[] = { label(0x06) set_stage_flag(STAGEFLAG_TRIGGER_MEDPACK_FINISH) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1014_spawngroup3_guard[] = { @@ -1739,8 +1739,8 @@ u8 func1014_spawngroup3_guard[] = { rebuild_teams rebuild_squadrons set_target_chr(CHR_BOND) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -1764,11 +1764,11 @@ u8 func1015_spawngroup4[] = { // spawn group. This causes the guards to set their group to spawngroup3 // which causes the if_num_chrs_in_squadron_gt check further below to // never pass. - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0140, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x0140, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) label(0x32) - try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0117, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) + try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, 0x0117, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60) goto_next(0x06) label(0x60) @@ -1797,8 +1797,8 @@ u8 func1015_spawngroup4[] = { yield rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -1821,8 +1821,8 @@ u8 func1015_spawngroup4_guard[] = { rebuild_teams rebuild_squadrons run_to_pad(0x0168) - set_function(CHR_SELF, GFUNC_CHOOSE_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_CHOOSE_TARGET) + endlist }; u8 func1009_blow_up_wall[] = { @@ -1846,8 +1846,8 @@ u8 func1009_blow_up_wall[] = { yield destroy_object(OBJ_WALLMINE) set_stage_flag(STAGEFLAG_WALL_EXPLODED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_check_hangar_accessed[] = { @@ -1859,8 +1859,8 @@ u8 func100a_check_hangar_accessed[] = { label(0x06) set_stage_flag(STAGEFLAG_ENTERED_HANGAR) message(CHR_P1P2, 0x481f) // "The secret hangar has been located." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100b_check_jonathan_dead[] = { @@ -1890,8 +1890,8 @@ u8 func100b_check_jonathan_dead[] = { set_stage_flag(STAGEFLAG_JON_DEAD) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_medpack_activation[] = { @@ -1960,14 +1960,14 @@ u8 func100c_medpack_activation[] = { // Everyone is alive label(0x06) - set_function(CHR_JONATHAN, GFUNC_IDLE) - set_function(CHR_ELVIS, GFUNC_IDLE) - set_function(CHR_SELF, 0x0411) + set_ailist(CHR_JONATHAN, GFUNC_IDLE) + set_ailist(CHR_ELVIS, GFUNC_IDLE) + set_ailist(CHR_SELF, 0x0411) // Jonathan is dead label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0412_init_elvis[] = { @@ -1979,9 +1979,9 @@ u8 func0412_init_elvis[] = { label(0x06) set_armor(200) set_chr_health(CHR_SELF, 1) - set_function(CHR_SELF, FUNC_ELVIS_FOLLOW) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, FUNC_ELVIS_FOLLOW) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040b_elvis_follow[] = { @@ -2025,7 +2025,7 @@ u8 func040b_elvis_follow[] = { beginloop(0x09) endloop(0x09) - endfunction + endlist }; u8 func100f_terminals[] = { @@ -2088,7 +2088,7 @@ u8 func100f_terminals[] = { label(0x32) endloop(0x04) - endfunction + endlist }; u8 func100d_check_terminals_destroyed[] = { @@ -2110,8 +2110,8 @@ u8 func100d_check_terminals_destroyed[] = { label(0x08) message(CHR_BOND, 0x4824) // "Mission critical object destroyed." set_stage_flag(STAGEFLAG_HANGAR_TERMINAL_DESTROYED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_check_elvis_dead[] = { @@ -2126,8 +2126,8 @@ u8 func100e_check_elvis_dead[] = { set_stage_flag(STAGEFLAG_ELVIS_DEAD) message(CHR_BOND, 0x481e) // "Elvis has been killed." label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_check_end_level[] = { @@ -2187,21 +2187,21 @@ u8 func1010_check_end_level[] = { // Both Joanna and Velvet are dead label(0x33) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Mission complete label(0x06) if_stage_flag_eq(STAGEFLAG_JO_DOING_TERMINALS, FALSE, /*goto*/ 0x32) - set_function(CHR_SELF, FUNC_UFO_EXIT) + set_ailist(CHR_SELF, FUNC_UFO_EXIT) label(0x32) set_invincible(CHR_BOND) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) // Jonathan and/or Elvis are dead label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_unlock_doors_when_jo_escaping[] = { @@ -2216,8 +2216,8 @@ u8 func1011_unlock_doors_when_jo_escaping[] = { unlock_door(0x09, 0x04) unlock_door(0x1d, 0x40) unlock_door(0x1e, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_hoverbike_auto_doors[] = { @@ -2286,15 +2286,15 @@ u8 func1012_hoverbike_auto_doors[] = { open_door(0x05) endloop(0x04) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040c_hidden_guardtype1[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1016_enable_guards_after_meetup[] = { @@ -2315,38 +2315,38 @@ u8 func1016_enable_guards_after_meetup[] = { show_chr(0x16) unset_chr_chrflag(0x0d, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x0d, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x0d, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x0d, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x0e, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x0e, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x0e, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x0e, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x0f, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x0f, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x0f, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x0f, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x10, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x10, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x10, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x10, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x11, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x11, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x11, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x11, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x12, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x12, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x12, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x12, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x13, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x13, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x13, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x13, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x14, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x14, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x14, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x14, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x15, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x15, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x15, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x15, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x16, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x16, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x16, FUNC_INIT_SUPERDRAGON_GUARD) rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1017_check_both_hangar_doors_open[] = { @@ -2361,15 +2361,15 @@ u8 func1017_check_both_hangar_doors_open[] = { label(0x32) message(CHR_BOND, 0x4835) // "The hangar doors are now open." set_stage_flag(STAGEFLAG_BOTH_HANGAR_DOORS_OPEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040d_hidden_guardtype2[] = { set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1018_unhide_guards_when_jo_escaping[] = { @@ -2380,34 +2380,34 @@ u8 func1018_unhide_guards_when_jo_escaping[] = { label(0x06) unset_chr_chrflag(0x16, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x16, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x16, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x17, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x17, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x17, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x17, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x18, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x18, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x18, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x18, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x19, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x19, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x19, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x19, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1a, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1a, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1a, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1a, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1b, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1b, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1b, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1b, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1c, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1c, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1c, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1c, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1d, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1d, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1d, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1d, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1e, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1e, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1e, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1e, FUNC_INIT_SUPERDRAGON_GUARD) unset_chr_chrflag(0x1f, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x1f, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x1f, FUNC_INIT_SUPERDRAGON_GUARD) + set_ailist(0x1f, FUNC_INIT_SUPERDRAGON_GUARD) unlock_door(0x0c, 0x40) unlock_door(0x15, 0x40) unlock_door(0x16, 0x40) @@ -2417,16 +2417,16 @@ u8 func1018_unhide_guards_when_jo_escaping[] = { unlock_door(0x1a, 0x40) unlock_door(0x1b, 0x40) unlock_door(0x1c, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func040e_hidden_biotech[] = { label(0x04) set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1019_enable_biotechs_after_stash[] = { @@ -2437,18 +2437,18 @@ u8 func1019_enable_biotechs_after_stash[] = { label(0x32) unset_chr_chrflag(0x25, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x25, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x25, FUNC_INIT_BIOTECH) + set_ailist(0x25, FUNC_INIT_BIOTECH) unset_chr_chrflag(0x26, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x26, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x26, FUNC_INIT_BIOTECH) + set_ailist(0x26, FUNC_INIT_BIOTECH) unset_chr_chrflag(0x27, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x27, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x27, FUNC_INIT_BIOTECH) + set_ailist(0x27, FUNC_INIT_BIOTECH) unset_chr_chrflag(0x28, CHRCFLAG_HIDDEN) unset_chr_chrflag(0x28, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(0x28, FUNC_INIT_BIOTECH) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(0x28, FUNC_INIT_BIOTECH) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1002_intro[] = { @@ -2460,19 +2460,19 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x019d, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x019d, -1, -1, 0x06, 0x00, CHR_BOND, 4) set_chr_chrflag(0x23, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(0x23, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x23, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x23, CHRHFLAG_00020000) - animation(0x019e, -1, -1, 0x06, 0x00, 0x23, 4) + chr_do_animation(0x019e, -1, -1, 0x06, 0x00, 0x23, 4) set_chr_chrflag(0x24, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(0x24, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x24, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x24, CHRHFLAG_00020000) - animation(0x019f, -1, -1, 0x06, 0x00, 0x24, 4) + chr_do_animation(0x019f, -1, -1, 0x06, 0x00, 0x24, 4) set_object_flag_bank1(0x00, OBJECTFLAG1_04000000) set_object_flag_bank2(0x00, OBJECTFLAG2_00000010) @@ -2753,15 +2753,15 @@ u8 func1002_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x019d, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x019d, -2, -1, 0x06, 0x00, CHR_BOND, 2) unset_chr_chrflag(0x23, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x23, CHRHFLAG_00020000) - animation(0x019e, -2, -1, 0x06, 0x00, 0x23, 2) + chr_do_animation(0x019e, -2, -1, 0x06, 0x00, 0x23, 2) unset_chr_chrflag(0x24, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(0x24, CHRHFLAG_00020000) - animation(0x019f, -2, -1, 0x06, 0x00, 0x24, 2) + chr_do_animation(0x019f, -2, -1, 0x06, 0x00, 0x24, 2) unset_object_flag_bank1(OBJ_HOVERBED, OBJECTFLAG1_04000000) set_object_flag_bank2(OBJ_HOVERBED, OBJECTFLAG2_00000010) @@ -2779,8 +2779,8 @@ u8 func1002_intro[] = { yield kill(0x23) kill(0x24) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c01_midcutscene[] = { @@ -2806,22 +2806,22 @@ u8 func0c01_midcutscene[] = { unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_JONATHAN, GFUNC_IDLE) + set_ailist(CHR_JONATHAN, GFUNC_IDLE) set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x01ce, -1, -1, 0x06, 0x00, CHR_TARGET, 4) + chr_do_animation(0x01ce, -1, -1, 0x06, 0x00, CHR_TARGET, 4) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01cc, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) + chr_do_animation(0x01cc, -1, -1, 0x06, 0x00, CHR_ELVIS, 4) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000) - animation(0x01cd, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) + chr_do_animation(0x01cd, -1, -1, 0x06, 0x00, CHR_JONATHAN, 4) set_object_flag_bank1(0x11, OBJECTFLAG1_04000000) set_object_flag_bank2(0x11, OBJECTFLAG2_00000010) @@ -2953,15 +2953,15 @@ u8 func0c01_midcutscene[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) - animation(0x01ce, -2, -1, 0x06, 0x00, CHR_TARGET, 2) + chr_do_animation(0x01ce, -2, -1, 0x06, 0x00, CHR_TARGET, 2) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) - animation(0x01cc, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) + chr_do_animation(0x01cc, -2, -1, 0x06, 0x00, CHR_ELVIS, 2) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000) - animation(0x01cd, -2, -1, 0x06, 0x00, CHR_JONATHAN, 2) + chr_do_animation(0x01cd, -2, -1, 0x06, 0x00, CHR_JONATHAN, 2) unset_object_flag_bank1(0x11, OBJECTFLAG1_04000000) set_object_flag_bank2(0x11, OBJECTFLAG2_00000010) @@ -2970,14 +2970,14 @@ u8 func0c01_midcutscene[] = { unset_object_flag_bank1(0x0a, OBJECTFLAG1_20000000) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_JONATHAN, FUNC_JONATHAN_HANGAR) - set_function(CHR_ELVIS, FUNC_INIT_ELVIS) + set_ailist(CHR_JONATHAN, FUNC_JONATHAN_HANGAR) + set_ailist(CHR_ELVIS, FUNC_INIT_ELVIS) if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32) chr_move_to_pad(CHR_COOP, 0x0156, 0x01, /*goto*/ 0x32) label(0x32) show_nonessential_chrs(TRUE) - set_function(CHR_SELF, GFUNC_END_CINEMA) - endfunction + set_ailist(CHR_SELF, GFUNC_END_CINEMA) + endlist }; u8 func101b_gas_sound[] = { @@ -2989,8 +2989,8 @@ u8 func101b_gas_sound[] = { yield assign_sound(0x816a, CHANNEL_0) play_sound_from_object(CHANNEL_0, 0x2b, 0x1f40, 0x0bb8) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0c02_outro[] = { @@ -3040,7 +3040,7 @@ u8 func0c02_outro[] = { set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x2b, CHRHFLAG_00020000) - animation(0x0304, -1, -1, 0x06, 0x00, 0x2b, 4) + chr_do_animation(0x0304, -1, -1, 0x06, 0x00, 0x2b, 4) open_door(0x2c) open_door(0x2e) @@ -3067,7 +3067,7 @@ u8 func0c02_outro[] = { // Unreachable label(0x09) set_stage_flag(STAGEFLAG_UFO_LEAVING) - set_function(CHR_SELF, GFUNC_END_CINEMA) + set_ailist(CHR_SELF, GFUNC_END_CINEMA) label(0x06) set_stage_flag(STAGEFLAG_ESCAPED) @@ -3079,8 +3079,8 @@ u8 func0c02_outro[] = { stop_countdown_timer unset_eeprom_flag(EEPROMFLAG_DEFENSE_JON) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3111,9 +3111,9 @@ u8 func0415_ufo_exit[] = { misc_command(0x0000, 0x0f, 0x00) reset_ambience hide_object(OBJ_UFO1) - set_function(CHR_SELF, GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1021_jo_escaping[] = { @@ -3151,7 +3151,7 @@ u8 func1021_jo_escaping[] = { camera_movement(0x02d4) set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN) - set_function(CHR_P1P2, GFUNC_IDLE) + set_ailist(CHR_P1P2, GFUNC_IDLE) show_object(OBJ_UFO1) set_object_flag_bank1(OBJ_UFO1, OBJECTFLAG1_04000000) @@ -3161,7 +3161,7 @@ u8 func1021_jo_escaping[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) - animation(0x0304, -1, -1, 0x06, 0x00, CHR_P1P2, 4) + chr_do_animation(0x0304, -1, -1, 0x06, 0x00, CHR_P1P2, 4) beginloop(0x09) if_camera_animating(/*goto*/ 0x32) @@ -3174,13 +3174,13 @@ u8 func1021_jo_escaping[] = { label(0x69) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Unreachable end_level end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3232,8 +3232,8 @@ u8 func0416_spawn_during_follow[] = { endloop(0x04) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0417_init_follower_clone[] = { @@ -3243,8 +3243,8 @@ u8 func0417_init_follower_clone[] = { rebuild_squadrons try_inherit_properties(0x09, /*goto*/ 0x06) label(0x06) - set_function(CHR_SELF, FUNC_FOLLOWER_CLONE) - endfunction + set_ailist(CHR_SELF, FUNC_FOLLOWER_CLONE) + endlist }; u8 func0418_follower_clone[] = { @@ -3257,8 +3257,8 @@ u8 func0418_follower_clone[] = { label(0x32) set_target_chr(CHR_BOND) label(0x06) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0419_init_biotech[] = { @@ -3269,9 +3269,9 @@ u8 func0419_init_biotech[] = { set_armor(0) set_recovery_speed(0) set_shield(0) - set_return_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_returnlist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func041a_init_superdragon_guard[] = { @@ -3282,8 +3282,8 @@ u8 func041a_init_superdragon_guard[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func101a_medpack_switch[] = { @@ -3294,7 +3294,7 @@ u8 func101a_medpack_switch[] = { set_stage_flag(STAGEFLAG_MEDPACK_SWITCH_DESTROYED) message(CHR_BOND, 0x4824) // "Mission critical object destroyed." label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x32) if_chr_activated_object(CHR_P1P2, OBJ_MEDPACK_SWITCH, /*goto*/ 0x32) @@ -3306,8 +3306,8 @@ u8 func101a_medpack_switch[] = { message(CHR_P1P2, 0x4836) // "Medical containment doors unlocked." unlock_door(0x12, 0x40) unlock_door(0x13, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3327,9 +3327,9 @@ u8 unregistered_function1[] = { endloop(0x08) label(0x32) - set_function(CHR_JONATHAN, 0x040f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_JONATHAN, 0x040f) + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3345,10 +3345,10 @@ u8 func040f_warp_jon_to_catwalk[] = { chr_move_to_pad(CHR_JONATHAN, 0x0152, 0x00, /*goto*/ 0x32) label(0x32) yield - set_function(CHR_JONATHAN, FUNC_JONATHAN_FOLLOWING_AND_MINE) + set_ailist(CHR_JONATHAN, FUNC_JONATHAN_FOLLOWING_AND_MINE) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101d_msg_medpackaroundhere[] = { @@ -3367,8 +3367,8 @@ u8 func101d_msg_medpackaroundhere[] = { label(0x32) speak(CHR_P1P2, 0x4837, 0x73c0, CHANNEL_6, COLOR_09_BLUE) // "The medpack's got to be somewhere around here." label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101e_msg_hookup[] = { @@ -3385,8 +3385,8 @@ u8 func101e_msg_hookup[] = { label(0x32) speak(CHR_BOND, 0x4838, 0x73c1, CHANNEL_6, COLOR_09_BLUE) // "Time to hook up with Jonathan, before he gets into..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101f_msg_oil[] = { @@ -3410,8 +3410,8 @@ u8 func101f_msg_oil[] = { label(0x32) speak(CHR_P1P2, 0x4839, 0x73c2, CHANNEL_6, COLOR_09_BLUE) // "That smell... oil... I smelt that in the other han..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1020_msg_jetbike[] = { @@ -3427,8 +3427,8 @@ u8 func1020_msg_jetbike[] = { label(0x32) speak(CHR_BOND, 0x483a, 0x73c3, CHANNEL_6, COLOR_09_BLUE) // "The jetbike should get me out before they lock the..." - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1024_wall_immune_to_explosives[] = { @@ -3442,8 +3442,8 @@ u8 func1024_wall_immune_to_explosives[] = { label(0x32) unset_object_flag_bank0(OBJ_WALLOBJECT, OBJECTFLAG0_INVINCIBLE) unset_object_flag_bank0(OBJ_WALLDOOR, OBJECTFLAG0_INVINCIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3463,48 +3463,48 @@ u8 func1024_wall_immune_to_explosives[] = { \ label(0x06) \ set_object_flag_bank0(OBJ_MEDPACK_GLASS, OBJECTFLAG0_INVINCIBLE) \ - set_function(CHR_SELF, GFUNC_IDLE) \ + set_ailist(CHR_SELF, GFUNC_IDLE) \ label(0x32) \ endloop(0x04) \ \ - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) u8 unregistered_function2[] = { set_object_flag_bank0(OBJ_MEDPACK_GLASS, OBJECTFLAG0_INVINCIBLE) glass_explosives_thing(0x23) - endfunction + endlist }; u8 unregistered_function3[] = { glass_explosives_thing(0x24) - endfunction + endlist }; u8 unregistered_function4[] = { glass_explosives_thing(0x25) - endfunction + endlist }; u8 unregistered_function5[] = { glass_explosives_thing(0x26) - endfunction + endlist }; u8 unregistered_function6[] = { glass_explosives_thing(0x27) - endfunction + endlist }; u8 unregistered_function7[] = { glass_explosives_thing(0x28) - endfunction + endlist }; u8 unregistered_function8[] = { glass_explosives_thing(0x29) - endfunction + endlist }; u8 func1026_ufo_spinning[] = { @@ -3523,8 +3523,8 @@ u8 func1026_ufo_spinning[] = { label(0x32) goto_first(0x03) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102e_keep_hangar_doors_open[] = { @@ -3566,8 +3566,8 @@ u8 func102e_keep_hangar_doors_open[] = { // Terminal destroyed label(0x0f) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func102f_toggle_remotemines[] = { @@ -3578,27 +3578,27 @@ u8 func102f_toggle_remotemines[] = { endloop(0x08) label(0x32) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x06) unset_object_flag_bank0(OBJ_REMOTEMINES, OBJECTFLAG0_00100000) unset_object_flag_bank1(OBJ_REMOTEMINES, OBJECTFLAG1_INVISIBLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1030_setup_medpack_glass[] = { if_difficulty_gt(DIFF_A, /*goto*/ 0x32) unset_object_flag_bank0(OBJ_MEDPACK_GLASS, OBJECTFLAG0_INVINCIBLE) destroy_object(OBJ_MEDPACK_GLASS) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // SA and PA label(0x32) unlock_door(0x3c, 0x40) unlock_door(0x3d, 0x40) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1031_disable_chambers[] = { @@ -3610,8 +3610,8 @@ u8 func1031_disable_chambers[] = { set_object_flag_bank0(0x4b, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(0x4c, OBJECTFLAG0_DEACTIVATED) set_object_flag_bank0(0x4d, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1032_unlock_door_after_hangar[] = { @@ -3622,8 +3622,8 @@ u8 func1032_unlock_door_after_hangar[] = { label(0x06) unlock_door(0x0a, 0x02) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -3631,8 +3631,8 @@ u8 func1032_unlock_door_after_hangar[] = { */ u8 func1433_start_lift[] = { activate_lift(1, 0x4e) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func101c_setup_rtracker[] = { @@ -3640,8 +3640,8 @@ u8 func101c_setup_rtracker[] = { set_object_flag_bank2(OBJ_FALCON2SCOPE1, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_FALCON2SCOPE2, OBJECTFLAG2_RTRACKED_BLUE) set_object_flag_bank2(OBJ_REMOTEMINES, OBJECTFLAG2_RTRACKED_BLUE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1434_setup_lighting[] = { @@ -3794,8 +3794,8 @@ u8 func1434_setup_lighting[] = { misc_command(0x010d, 0x05, 0x01) misc_command(0x010e, 0x05, 0x01) misc_command(0x00cb, 0x05, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/files/setup/setupwax.c b/src/files/setup/setupwax.c index 8cc435ef2..2bb2ffe41 100644 --- a/src/files/setup/setupwax.c +++ b/src/files/setup/setupwax.c @@ -1030,42 +1030,42 @@ u8 func0401_init_hovercar[] = { set_vehicle_speed(0x0d00, 120) goto_first(0x04) - endfunction + endlist }; u8 func0402_start_path26[] = { assign_path(26) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0403_start_path27[] = { assign_path(27) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0404_start_path28[] = { assign_path(28) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0405_start_path29[] = { assign_path(29) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0406_start_path30[] = { assign_path(30) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0407_start_path31[] = { @@ -1075,11 +1075,11 @@ u8 func0407_start_path31[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_return_function(CHR_SELF, 0x0407) + set_returnlist(CHR_SELF, 0x0407) assign_path(31) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0408_start_path32[] = { @@ -1091,8 +1091,8 @@ u8 func0408_start_path32[] = { set_shield(0) assign_path(32) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func0409_start_path33[] = { @@ -1104,8 +1104,8 @@ u8 func0409_start_path33[] = { set_shield(0) assign_path(33) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040a_start_path34[] = { @@ -1117,8 +1117,8 @@ u8 func040a_start_path34[] = { set_shield(0) assign_path(34) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040b_start_path35[] = { @@ -1130,8 +1130,8 @@ u8 func040b_start_path35[] = { set_shield(0) assign_path(35) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040c_start_path36[] = { @@ -1143,15 +1143,15 @@ u8 func040c_start_path36[] = { set_shield(0) assign_path(36) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func040d_start_path37[] = { assign_path(37) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func1002_lightswitch[] = { @@ -1195,12 +1195,12 @@ u8 func1002_lightswitch[] = { set_lights_state(0x0040, 0x01, 0x64, 0x00, 0x00) endloop(0x04) - endfunction + endlist }; u8 func1001_objectives_failed_msg[] = { - set_function(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) - endfunction + set_ailist(CHR_SELF, GFUNC_SHOW_OBJ_FAILED_MSG) + endlist }; u8 func1000_setup_counterop[] = { @@ -1213,8 +1213,8 @@ u8 func1000_setup_counterop[] = { if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) give_object_to_chr(OBJ_COOP_BOMB, CHR_COOP) label(0x2c) - set_function(CHR_SELF, GFUNC_REBUILD_GROUPS) - endfunction + set_ailist(CHR_SELF, GFUNC_REBUILD_GROUPS) + endlist }; u8 func040e_init_60hp_guard[] = { @@ -1224,8 +1224,8 @@ u8 func040e_init_60hp_guard[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func040f_init_40hp_guard[] = { @@ -1235,8 +1235,8 @@ u8 func040f_init_40hp_guard[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0410_init_searching_guard[] = { @@ -1246,16 +1246,16 @@ u8 func0410_init_searching_guard[] = { set_armor(40) set_recovery_speed(0) set_shield(0) - set_return_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_returnlist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func0412_init_cass[] = { set_chr_health(CHR_SELF, 40) set_self_chrflag(CHRCFLAG_01000000) - set_function(CHR_SELF, FUNC_CASS_IN_OFFICE) - endfunction + set_ailist(CHR_SELF, FUNC_CASS_IN_OFFICE) + endlist }; u8 func0411_cass_in_office[] = { @@ -1266,18 +1266,18 @@ u8 func0411_cass_in_office[] = { // Dying label(0x2c) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Not dying label(0x06) if_has_gun(CHR_SELF, /*goto*/ 0x2c) set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_stage_flag(STAGEFLAG_TRIGGER_YWSM) - set_onshot_function(FUNC_CASS_RUNNING) + set_shotlist(FUNC_CASS_RUNNING) restart_timer speak(CHR_TARGET, 0x4a08, 0x0d23, CHANNEL_6, COLOR_06_WHITE) // "Go to the helipad if you want to live." - animation(0x0226, -1, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0226, -1, -1, 0x10, 0x10, CHR_SELF, 2) yield // Wait 3 seconds @@ -1287,20 +1287,20 @@ u8 func0411_cass_in_office[] = { label(0x06) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_function(CHR_SELF, FUNC_CASS_RUNNING) + set_ailist(CHR_SELF, FUNC_CASS_RUNNING) // Waiting for player to enter office label(0x2c) if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x5a) - set_onshot_function(FUNC_CASS_IN_OFFICE) + set_shotlist(FUNC_CASS_IN_OFFICE) set_self_chrflag(CHRCFLAG_00040000) if_chr_dying(CHR_CASS, /*goto*/ 0x06) if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) - animation(0x00a0, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x00a0, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x54) chr_toggle_p1p2(CHR_SELF) @@ -1322,7 +1322,7 @@ u8 func0411_cass_in_office[] = { // Draw weapon label(0x57) set_self_flag_bankx(CHRFLAG0_00002000, BANK_0) - animation(0x0245, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(0x0245, 0, -1, 0x10, 0x10, CHR_SELF, 2) try_draw_weapon(MODEL_CHRFALCON2, WEAPON_FALCON2, 0x00000000, /*goto*/ 0x2c) label(0x2c) speak(CHR_TARGET, 0x4a07, 0x81a3, CHANNEL_6, COLOR_04_ORANGE) // "Get the hell out of my office..." @@ -1350,7 +1350,7 @@ u8 func0411_cass_in_office[] = { label(0x2c) try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0x82) - // Wait until shooting animation finished + // Wait until shooting chr_do_animation finished beginloop(0x82) if_chr_stopped(/*goto*/ 0x06) endloop(0x82) @@ -1358,13 +1358,13 @@ u8 func0411_cass_in_office[] = { label(0x06) endloop(0x5a) - endfunction + endlist }; u8 func0413_cass_running[] = { remove_cass_necklace(CHR_CASS) unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) - set_onshot_function(FUNC_CASS_RUNNING) + set_shotlist(FUNC_CASS_RUNNING) if_chr_dying(CHR_CASS, /*goto*/ 0x06) if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x06) if_chr_unloaded(CHR_CASS, /*goto*/ 0x06) @@ -1372,15 +1372,15 @@ u8 func0413_cass_running[] = { // Dying label(0x06) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Not dying label(0x2c) if_just_injured(CHR_SELF, /*goto*/ 0xb5) goto_next(0xb1) - // Shot/hurt - wait until animation finished + // Shot/hurt - wait until chr_do_animation finished beginloop(0xb5) if_chr_stopped(/*goto*/ 0xb1) endloop(0xb5) @@ -1451,8 +1451,8 @@ u8 func0413_cass_running[] = { label(0x2c) goto_first(0x03) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1004_check_cass_dead[] = { @@ -1466,8 +1466,8 @@ u8 func1004_check_cass_dead[] = { label(0x2c) message(CHR_BOND, 0x4a0e) // "Cassandra has been immobilized." set_stage_flag(STAGEFLAG_CASS_DEAD) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1005_check_cass_captured[] = { @@ -1479,7 +1479,7 @@ u8 func1005_check_cass_captured[] = { if_chr_y(CHR_CASS, 0, OPERATOR_LESS_THAN, /*goto*/ 0x2c) message(CHR_BOND, 0x4a0f) // "Cassandra has been captured successfully." set_stage_flag(STAGEFLAG_CASS_CAPTURED) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Cass is not at helipad label(0x2c) @@ -1487,8 +1487,8 @@ u8 func1005_check_cass_captured[] = { // Died label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1006_lift_disabling[] = { @@ -1496,7 +1496,7 @@ u8 func1006_lift_disabling[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x06) goto_next(0x2c) label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Disable chief's lift label(0x2c) @@ -1519,7 +1519,7 @@ u8 func1006_lift_disabling[] = { unlock_door(0x50, 0x40) unset_object_flag_bank0(OBJ_CHIEF_LIFT, OBJECTFLAG0_DEACTIVATED) unset_chr_chrflag(CHR_CHIEF, CHRCFLAG_HIDDEN) - set_function(CHR_CHIEF, FUNC_CHIEF) + set_ailist(CHR_CHIEF, FUNC_CHIEF) message(CHR_BOND, 0x4a19) // "Lift has been disabled." // Wait until chief dead @@ -1543,8 +1543,8 @@ u8 func1006_lift_disabling[] = { label(0x2c) unset_object_flag_bank0(OBJ_CHIEF_LIFT, OBJECTFLAG0_DEACTIVATED) unset_object_flag_bank0(OBJ_BLONDE_LIFT, OBJECTFLAG0_DEACTIVATED) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0414_init_chief[] = { @@ -1556,12 +1556,12 @@ u8 func0414_init_chief[] = { set_shield(0) set_morale(0) set_self_chrflag(CHRCFLAG_HIDDEN) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0415_chief[] = { - set_onshot_function(FUNC_CHIEF) + set_shotlist(FUNC_CHIEF) // Check if dying if_chr_dying(CHR_CHIEF, /*goto*/ 0x2c) @@ -1569,7 +1569,7 @@ u8 func0415_chief[] = { if_chr_unloaded(CHR_CHIEF, /*goto*/ 0x2c) goto_next(0x03) label(0x2c) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Wait until player in sight beginloop(0x03) @@ -1593,7 +1593,7 @@ u8 func0415_chief[] = { label(0x06) endloop(0x03) - endfunction + endlist }; u8 func100f_disable_chiefs_lift[] = { @@ -1629,8 +1629,8 @@ u8 func100f_disable_chiefs_lift[] = { // A or SA - return label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1007_bomb_logic[] = { @@ -1700,8 +1700,8 @@ u8 func1007_bomb_logic[] = { label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1008_check_bomb_unplantable[] = { @@ -1716,7 +1716,7 @@ u8 func1008_check_bomb_unplantable[] = { // Bomb planted - return label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alarm active - lock door and wait for door to be closed or bomb planted label(0x2c) @@ -1746,12 +1746,12 @@ u8 func1008_check_bomb_unplantable[] = { // Difficulty is agent or bomb has been planted - return label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x2c) endloop(0x04) - endfunction + endlist }; u8 func1009_toggle_top_guards[] = { @@ -1825,8 +1825,8 @@ u8 func1009_toggle_top_guards[] = { show_chr(0x06) yield show_chr(0x05) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100a_check_for_completion[] = { @@ -1863,27 +1863,27 @@ u8 func100a_check_for_completion[] = { // Both players dead label(0x2c) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // At least one player is alive label(0x06) - set_function(CHR_SELF, FUNC_OUTRO) + set_ailist(CHR_SELF, FUNC_OUTRO) end_level - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Player not at helipad label(0x2d) endloop(0x04) - endfunction + endlist }; u8 func100b_start_lifts[] = { activate_lift(2, 0x55) activate_lift(1, 0x56) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100c_lift_doors[] = { @@ -1923,7 +1923,7 @@ u8 func100c_lift_doors[] = { label(0x06) endloop(0xc1) - endfunction + endlist }; u8 func0416_intro[] = { @@ -1938,7 +1938,7 @@ u8 func0416_intro[] = { cmd0175(60) set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0473, -1, -1, 0x06, 0x00, CHR_BOND, 4) + chr_do_animation(0x0473, -1, -1, 0x06, 0x00, CHR_BOND, 4) restart_timer fade_to_color(0x000000ff, 0) fade_to_color(0x00000000, 110) @@ -1999,12 +1999,12 @@ u8 func0416_intro[] = { unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN) unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) - animation(0x0473, -2, -1, 0x06, 0x00, CHR_BOND, 2) + chr_do_animation(0x0473, -2, -1, 0x06, 0x00, CHR_BOND, 2) restart_default_music reset_ambience enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0417_outro[] = { @@ -2040,8 +2040,8 @@ u8 func0417_outro[] = { label(0x06) end_level - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func100e_cass_speech[] = { @@ -2062,7 +2062,7 @@ u8 func100e_cass_speech[] = { label(0x2c) restart_timer speak(CHR_CASS, 0x4a0d, 0x6af5, CHANNEL_6, COLOR_04_ORANGE) // "You won't shoot me!" - animation(0x00a0, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(0x00a0, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x09) if_timer_gt(80, /*goto*/ 0x06) @@ -2070,8 +2070,8 @@ u8 func100e_cass_speech[] = { label(0x06) set_stage_flag(STAGEFLAG_CASS_SAID_YWSM) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1010_init_lighting[] = { @@ -2108,8 +2108,8 @@ u8 func1010_init_lighting[] = { misc_command(0x00a4, 0x06, 0x01) misc_command(0x00a5, 0x06, 0x01) misc_command(0x00a7, 0x06, 0x01) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1011_shuttle_animation[] = { @@ -2120,15 +2120,15 @@ u8 func1011_shuttle_animation[] = { label(0x09) restart_timer - // Some kind of animation on repeat + // Some kind of chr_do_animation on repeat beginloop(0x08) object_do_animation(0x0489, OBJ_SHUTTLE1, 0x08ff, -1) endloop(0x08) // Unreachable label(0x06) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func1012_chief_lift[] = { @@ -2161,8 +2161,8 @@ u8 func1012_chief_lift[] = { // A or SA - return label(0x0d) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; struct ailist ailists[] = { diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index ba5146edd..5b34be99b 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -1224,7 +1224,7 @@ u32 getNumChrs(void) } GLOBAL_ASM( -glabel func0f01e4dc +glabel chrSetChrnum /* f01e4dc: 3c03800a */ lui $v1,0x800a /* f01e4e0: 8c63cd10 */ lw $v1,-0x32f0($v1) /* f01e4e4: 00053c00 */ sll $a3,$a1,0x10 @@ -18146,7 +18146,7 @@ glabel func0f02d4fc /* f02d758: 8fae0050 */ lw $t6,0x50($sp) /* f02d75c: 86050008 */ lh $a1,0x8($s0) /* f02d760: 8dc40004 */ lw $a0,0x4($t6) -/* f02d764: 0fc07937 */ jal func0f01e4dc +/* f02d764: 0fc07937 */ jal chrSetChrnum /* f02d768: afa4005c */ sw $a0,0x5c($sp) /* f02d76c: 960f0014 */ lhu $t7,0x14($s0) /* f02d770: 8fa6005c */ lw $a2,0x5c($sp) @@ -18511,7 +18511,7 @@ glabel func0f02dbac /* f02dc90: 00022c00 */ sll $a1,$v0,0x10 /* f02dc94: 00055c03 */ sra $t3,$a1,0x10 /* f02dc98: 01602825 */ or $a1,$t3,$zero -/* f02dc9c: 0fc07937 */ jal func0f01e4dc +/* f02dc9c: 0fc07937 */ jal chrSetChrnum /* f02dca0: 02002025 */ or $a0,$s0,$zero /* f02dca4: 44800000 */ mtc1 $zero,$f0 /* f02dca8: 240c006c */ addiu $t4,$zero,0x6c @@ -22891,7 +22891,7 @@ glabel func0f0319a8 .L0f031cec: /* f031cec: 05e0000a */ bltz $t7,.L0f031d18 /* f031cf0: 00000000 */ sll $zero,$zero,0x0 -/* f031cf4: 0fc255a1 */ jal func0f095684 +/* f031cf4: 0fc255a1 */ jal objectiveGetStatus /* f031cf8: 01e02025 */ or $a0,$t7,$zero /* f031cfc: 24010001 */ addiu $at,$zero,0x1 /* f031d00: 10410005 */ beq $v0,$at,.L0f031d18 @@ -24685,7 +24685,7 @@ glabel func0f0336a8 /* f0336d0: 2401001f */ addiu $at,$zero,0x1f /* f0336d4: 50410011 */ beql $v0,$at,.L0f03371c /* f0336d8: 8fbf0014 */ lw $ra,0x14($sp) -/* f0336dc: 0fc2c163 */ jal func0f0b058c +/* f0336dc: 0fc2c163 */ jal getNumKnockedOutChrs /* f0336e0: afa40018 */ sw $a0,0x18($sp) /* f0336e4: 28410002 */ slti $at,$v0,0x2 /* f0336e8: 10200005 */ beqz $at,.L0f033700 @@ -33336,7 +33336,7 @@ bool func0f03b5f0(struct chrdata *chr, s32 pad_id) if (pad_id >= 0) { struct defaultobj *obj = func0f0681c0(pad_id); - if (obj && func0f0869a8(obj)) { + if (obj && objIsHealthy(obj)) { func0f02effc(chr); return true; } @@ -33347,7 +33347,7 @@ bool func0f03b5f0(struct chrdata *chr, s32 pad_id) } GLOBAL_ASM( -glabel func0f03b684 +glabel chrConsiderGrenadeThrow /* f03b684: 27bdff98 */ addiu $sp,$sp,-104 /* f03b688: afb00018 */ sw $s0,0x18($sp) /* f03b68c: 00808025 */ or $s0,$a0,$zero @@ -33723,7 +33723,7 @@ glabel func0f03ba44 ); GLOBAL_ASM( -glabel func0f03bbc8 +glabel chrTryPunchOrKick /* f03bbc8: 27bdffa8 */ addiu $sp,$sp,-88 /* f03bbcc: afb00028 */ sw $s0,0x28($sp) /* f03bbd0: 00808025 */ or $s0,$a0,$zero @@ -44767,7 +44767,7 @@ glabel func0f045a70 /* f045b60: 00002825 */ or $a1,$zero,$zero /* f045b64: 14400008 */ bnez $v0,.L0f045b88 /* f045b68: 24050001 */ addiu $a1,$zero,0x1 -/* f045b6c: 0fc23922 */ jal func0f08e488 +/* f045b6c: 0fc23922 */ jal doorActivate /* f045b70: 8e040004 */ lw $a0,0x4($s0) /* f045b74: 10000005 */ beqz $zero,.L0f045b8c /* f045b78: 8fbf002c */ lw $ra,0x2c($sp) @@ -46645,7 +46645,7 @@ glabel func0f0473cc /* f047678: 00000000 */ sll $zero,$zero,0x0 ); -bool func0f04767c(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) +bool skedarTryPounce(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) { if (chr && chr->actiontype != ACT_SKJUMP && func0f039a18(chr)) { u8 race = chr ? chr->race : RACE_HUMAN; @@ -50321,7 +50321,7 @@ void chrSetPadPresetByChrnum(struct chrdata *basechr, s32 chrnum, s32 pad_id) } GLOBAL_ASM( -glabel func0f04ad08 +glabel chrIsInLoadedRoom /* f04ad08: 27bdff28 */ addiu $sp,$sp,-216 /* f04ad0c: afbf0034 */ sw $ra,0x34($sp) /* f04ad10: afb60030 */ sw $s6,0x30($sp) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index c8ecf9b18..b9e2aa8c2 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -236,7 +236,7 @@ bool aiSetReturnList(void) * @cmd 0007 */ GLOBAL_ASM( -glabel ai0007 +glabel aiSetShotList /* f04de88: 3c06800a */ lui $a2,%hi(g_Vars) /* f04de8c: 24c69fc0 */ addiu $a2,$a2,%lo(g_Vars) /* f04de90: 8cc30438 */ lw $v1,0x438($a2) @@ -259,7 +259,7 @@ glabel ai0007 /* f04ded0: acca0438 */ sw $t2,0x438($a2) ); -//bool ai0007(void) +//bool aiSetShotList(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // u16 ailistid = cmd[3] | (cmd[2] << 8); @@ -407,7 +407,7 @@ bool aiKneel(void) * @cmd 000b */ GLOBAL_ASM( -glabel ai000b +glabel aiChrDoAnimation /* f04e174: 3c09800a */ lui $t1,%hi(g_Vars) /* f04e178: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) /* f04e17c: 8d2e0434 */ lw $t6,0x434($t1) @@ -567,7 +567,7 @@ glabel ai000b // Mismatch because the compiler adds divide-by-zero checks to the division. // We need something like -mno-check-zero-division but that option doesn't exist // in our version of the compiler. -//bool ai000b(void) +//bool aiChrDoAnimation(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // u32 anim_id = cmd[3] | (cmd[2] << 8); @@ -648,7 +648,7 @@ bool func0f04e418(void) /** * @cmd 000d */ -bool ai000d(void) +bool aiBeSurprised000d(void) { func0f03adf4(g_Vars.chrdata); g_Vars.aioffset += 2; @@ -659,7 +659,7 @@ bool ai000d(void) /** * @cmd 000e */ -bool ai000e(void) +bool aiBeSurprised000e(void) { func0f03ae9c(g_Vars.chrdata); g_Vars.aioffset += 2; @@ -1181,7 +1181,7 @@ bool aiConsiderGrenadeThrow(void) u32 value2 = cmd[5] | (cmd[4] << 8); u32 value1 = cmd[3] | (cmd[2] << 8); - if (func0f03b684(g_Vars.chrdata, value1, value2)) { + if (chrConsiderGrenadeThrow(g_Vars.chrdata, value1, value2)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[6]); } else { g_Vars.aioffset += 7; @@ -1253,9 +1253,9 @@ bool aiRemoveChr(void) bool ai0027(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - u16 value = cmd[3] | (cmd[2] << 8); + u16 pad_id = cmd[3] | (cmd[2] << 8); - if (func0f03b5f0(g_Vars.chrdata, value)) { + if (func0f03b5f0(g_Vars.chrdata, pad_id)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { g_Vars.aioffset += 5; @@ -1728,7 +1728,7 @@ bool ai0041(void) */ bool aiIfInLoadedRoom(void) { - if (func0f04ad08(g_Vars.chrdata)) { + if (chrIsInLoadedRoom(g_Vars.chrdata)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -1892,8 +1892,8 @@ glabel ai0048 bool ai0049(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - u16 value1 = cmd[3] | (cmd[2] << 8); - s32 value2 = chrGetPadRoom(g_Vars.chrdata, value1); + u16 pad_id = cmd[3] | (cmd[2] << 8); + s32 value2 = chrGetPadRoom(g_Vars.chrdata, pad_id); if (value2 >= 0 && func0f15d6e8(value2)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); @@ -1995,7 +1995,7 @@ glabel ai004c /* f050600: 01736024 */ and $t4,$t3,$s3 /* f050604: 15800005 */ bnez $t4,.L0f05061c /* f050608: 00000000 */ sll $zero,$zero,0x0 -/* f05060c: 0fc21a6a */ jal func0f0869a8 +/* f05060c: 0fc21a6a */ jal objIsHealthy /* f050610: afa5024c */ sw $a1,0x24c($sp) /* f050614: 1440000e */ bnez $v0,.L0f050650 /* f050618: 8fa5024c */ lw $a1,0x24c($sp) @@ -2946,7 +2946,7 @@ bool aiIfChrHasObject(void) s32 prevplayernum = g_Vars.currentplayernum; playernum = posGetPlayerNum(chr->pos); setCurrentPlayerNum(playernum); - playernum = func0f1128cc(obj->pos); + playernum = currentPlayerHasProp(obj->pos); setCurrentPlayerNum(prevplayernum); } @@ -2966,7 +2966,7 @@ bool aiIfWeaponThrown(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (func0f08aaf4(cmd[2])) { + if (weaponIsThrown(cmd[2])) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -3134,7 +3134,7 @@ bool aiIfObjectHealthy(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && func0f0869a8(obj)) { + if (obj && obj->pos && objIsHealthy(obj)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -3568,7 +3568,7 @@ bool aiOpenDoor(void) if (door && door->pos && door->pos->type == POSITIONTYPE_DOOR) { if (!func0f066310(door->pos, 0)) { - func0f08e488(door, DOORSTATE_OPEN); + doorActivate(door, DOORSTATE_OPEN); } } @@ -3586,7 +3586,7 @@ bool aiCloseDoor(void) struct defaultobj *door = objFindByTagId(cmd[2]); if (door && door->pos && door->pos->type == POSITIONTYPE_DOOR) { - func0f08e488(door, DOORSTATE_CLOSED); + doorActivate(door, DOORSTATE_CLOSED); } g_Vars.aioffset += 3; @@ -3718,9 +3718,9 @@ bool aiIfObjectiveComplete(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (cmd[2] < func0f0955f4() && - func0f095684(cmd[2]) == OBJECTIVE_COMPLETE && - func0f095650(cmd[2]) & (1 << getDifficulty())) { + if (cmd[2] < objectiveGetCount() && + objectiveGetStatus(cmd[2]) == OBJECTIVE_COMPLETE && + objectiveGetDifficultyBits(cmd[2]) & (1 << getDifficulty())) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -3736,9 +3736,9 @@ bool aiIfObjectiveFailed(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (cmd[2] < func0f0955f4() && - func0f095684(cmd[2]) == OBJECTIVE_FAILED && - func0f095650(cmd[2]) & (1 << getDifficulty())) { + if (cmd[2] < objectiveGetCount() && + objectiveGetStatus(cmd[2]) == OBJECTIVE_FAILED && + objectiveGetDifficultyBits(cmd[2]) & (1 << getDifficulty())) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -4211,7 +4211,7 @@ bool aiIfDifficultyGreaterThan(void) return false; } -f32 func0f16cdec(void); +f32 getUptime(void); /** * @cmd 0079 @@ -4220,7 +4220,7 @@ bool aiIfUptimeLessThan(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; f32 target = (f32)(cmd[3] | (cmd[2] << 8)); - f32 uptime = func0f16cdec(); + f32 uptime = getUptime(); if (uptime < target) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); @@ -4238,7 +4238,7 @@ bool aiIfUptimeGreaterThan(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; f32 target = (f32)(cmd[3] | (cmd[2] << 8)); - f32 uptime = func0f16cdec(); + f32 uptime = getUptime(); if (uptime > target) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); @@ -4514,7 +4514,7 @@ bool aiSetChrNum(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f01e4dc(g_Vars.chrdata, cmd[2]); + chrSetChrnum(g_Vars.chrdata, cmd[2]); g_Vars.chrdata->chrnum = cmd[2]; g_Vars.aioffset += 3; @@ -5376,7 +5376,7 @@ bool aiRestartTimer(void) if (g_Vars.chrdata) { chrRestartTimer(g_Vars.chrdata); } else if (g_Vars.hovdata) { - func0f07b0f4(g_Vars.hovdata); + heliRestartTimer(g_Vars.hovdata); } g_Vars.aioffset += 2; @@ -5726,7 +5726,7 @@ bool aiIfCountdownTimerGreaterThan(void) * @cmd 00c6 */ GLOBAL_ASM( -glabel aiSpawnChr +glabel aiSpawnChrAtPad /* f05565c: 27bdffc8 */ addiu $sp,$sp,-56 /* f055660: afb00020 */ sw $s0,0x20($sp) /* f055664: 3c10800a */ lui $s0,%hi(g_Vars) @@ -5788,7 +5788,7 @@ glabel aiSpawnChr /* f05573c: 00001025 */ or $v0,$zero,$zero ); -//bool aiSpawnChr(void) +//bool aiSpawnChrAtPad(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // u16 pad = cmd[5] | (cmd[4] << 8); @@ -5809,7 +5809,7 @@ glabel aiSpawnChr * @cmd 00c7 */ GLOBAL_ASM( -glabel ai00c7 +glabel aiSpawnChrAtChr /* f055740: 27bdffd0 */ addiu $sp,$sp,-48 /* f055744: afb00020 */ sw $s0,0x20($sp) /* f055748: 3c10800a */ lui $s0,%hi(g_Vars) @@ -5866,7 +5866,7 @@ glabel ai00c7 ); // Mismatch due to different temporary registers -//bool ai00c7(void) +//bool aiSpawnChrAtChr(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // u32 flags = (cmd[8] << 16) | (cmd[9] << 8) | cmd[10] | (cmd[7] << 24); @@ -6124,7 +6124,7 @@ glabel aiDuplicateChr /* f055bfc: 00022c00 */ sll $a1,$v0,0x10 /* f055c00: 00057403 */ sra $t6,$a1,0x10 /* f055c04: 01c02825 */ or $a1,$t6,$zero -/* f055c08: 0fc07937 */ jal func0f01e4dc +/* f055c08: 0fc07937 */ jal chrSetChrnum /* f055c0c: 02002025 */ or $a0,$s0,$zero /* f055c10: 860f0000 */ lh $t7,0x0($s0) /* f055c14: 02202025 */ or $a0,$s1,$zero @@ -6279,7 +6279,7 @@ bool aiMessage(void) } setCurrentPlayerNum(playernum); - func0f0ddf1c(text, 0); + currentPlayerQueueMessage(text, 0); setCurrentPlayerNum(prevplayernum); g_Vars.aioffset += 5; @@ -6540,7 +6540,7 @@ bool aiAudioMuteChannel(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; s8 channel = (s8)cmd[2]; - func0f0942d0(channel); + audioMuteChannel(channel); g_Vars.aioffset += 3; return false; @@ -6554,7 +6554,7 @@ bool aiIfChannelIdle(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; s8 channel = (s8) cmd[2]; - if (func0f0943bc(channel)) { + if (audioIfChannelIdle(channel)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -6731,7 +6731,7 @@ glabel ai00d5 .L0f056968: /* f056968: 50800032 */ beqzl $a0,.L0f056a34 /* f05696c: 8cb80438 */ lw $t8,0x438($a1) -/* f056970: 0fc1eb7d */ jal func0f07adf4 +/* f056970: 0fc1eb7d */ jal objGetHeli /* f056974: afa60018 */ sw $a2,0x18($sp) /* f056978: 3c05800a */ lui $a1,%hi(g_Vars) /* f05697c: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars) @@ -6909,12 +6909,12 @@ bool aiSetObjImage(void) if (obj && obj->pos) { if (obj->type == OBJTYPE_SINGLEMONITOR) { struct singlemonitorobj *sm = (struct singlemonitorobj *) obj; - func0f07f924(&sm->image, cmd[4], obj); + imageSlotSetImage(&sm->image, cmd[4], obj); } else if (obj->type == OBJTYPE_MULTIMONITOR) { u8 slot = cmd[3]; if (slot < 4) { struct multimonitorobj *mm = (struct multimonitorobj *) obj; - func0f07f924(&mm->subobjs[slot].image, cmd[4], obj); + imageSlotSetImage(&mm->subobjs[slot].image, cmd[4], obj); } } } @@ -6970,7 +6970,7 @@ bool aiWarpJoToPad(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u16 pad_id = cmd[3] | (cmd[2] << 8); - func0f0b9b68(pad_id); + warpBondToPad(pad_id); g_Vars.aioffset += 4; @@ -6994,7 +6994,7 @@ bool aiSetCameraAnimation(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; s16 anim_id = cmd[3] | (cmd[2] << 8); - func0f0ba0d4(anim_id); + cameraDoAnimation(anim_id); if (g_Vars.currentplayer->unk19c8 == 0) { return true; @@ -7854,7 +7854,7 @@ bool aiIfChrAmmoQuantityLessThan(void) u32 playernum = posGetPlayerNum(chr->pos); setCurrentPlayerNum(playernum); - if (func0f0a9868((s8)cmd[3]) < (s8)cmd[4]) { + if (currentPlayerGetAmmoCount((s8)cmd[3]) < (s8)cmd[4]) { passes = true; } @@ -7882,8 +7882,8 @@ bool aiChrDrawWeapon(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = posGetPlayerNum(chr->pos); setCurrentPlayerNum(playernum); - func0f0a2090(0, (s8)cmd[3]); - func0f0a2090(1, 0); + currentPlayerEquipWeapon(0, (s8)cmd[3]); + currentPlayerEquipWeapon(1, 0); setCurrentPlayerNum(prevplayernum); } @@ -7904,7 +7904,7 @@ bool aiChrDrawWeaponInCutscene(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = posGetPlayerNum(chr->pos); setCurrentPlayerNum(playernum); - func0f0a196c((s8)cmd[3]); + currentPlayerEquipWeaponInCutscene((s8)cmd[3]); setCurrentPlayerNum(prevplayernum); } @@ -8129,7 +8129,7 @@ glabel ai00f4 */ bool ai00f5(void) { - g_8007073c = true; + g_8007073c = 1; g_Vars.aioffset += 2; return false; @@ -8158,7 +8158,7 @@ bool aiIfAllObjectivesComplete(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (func0f095b64()) { + if (objectiveIsAllComplete()) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { g_Vars.aioffset = g_Vars.aioffset + 3; @@ -8200,7 +8200,7 @@ bool aiAudioPlayXMusic(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset += 5; - func0f16e058((s8)cmd[2], cmd[3], cmd[4]); + audioPlayXTrack((s8)cmd[2], cmd[3], cmd[4]); return false; } @@ -8212,7 +8212,7 @@ bool aiAudioStopChannel(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset += 3; - func0f16e0b4((s8)cmd[2]); + audioStopTrack((s8)cmd[2]); return false; } @@ -8226,10 +8226,10 @@ bool aiAudioPlayMusic(void) if (cmd[2] == MUSIC_CI_TRAINING) { u16 something = func0f152f50(); - func0f16de0c(cmd[2]); + audioPlayTrack(cmd[2]); func0f152f70(something); } else { - func0f16de0c(cmd[2]); + audioPlayTrack(cmd[2]); } g_Vars.aioffset += 3; @@ -8243,7 +8243,7 @@ bool aiAudioPlayMusic(void) bool aiAudioRestartMusic(void) { g_Vars.aioffset += 2; - func0f16de80(); + audioRestartTrack(); return false; } @@ -8254,7 +8254,7 @@ bool aiAudioRestartMusic(void) bool aiAudioSetMusicTrack(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f16def8(cmd[2]); + audioSetTrack(cmd[2]); g_Vars.aioffset += 3; return false; @@ -8266,7 +8266,7 @@ bool aiAudioSetMusicTrack(void) bool aiAudioRestartDefaultMusic(void) { g_Vars.aioffset += 2; - func0f16df84(); + audioRestartDefaultTrack(); return false; } @@ -8277,7 +8277,7 @@ bool aiAudioRestartDefaultMusic(void) bool aiAudioSetSfxTrack(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f16dfd0(cmd[2]); + audioSetAuxTrack(cmd[2]); g_Vars.aioffset += 3; return false; @@ -8289,7 +8289,7 @@ bool aiAudioSetSfxTrack(void) bool aiAudioRestartSfx(void) { g_Vars.aioffset += 2; - func0f16e02c(); + audioRestartAuxTrack(); return false; } @@ -8306,7 +8306,7 @@ bool aiChrExplosions(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = posGetPlayerNum(chr->pos); setCurrentPlayerNum(playernum); - func0f0bc0f0(0); + currentPlayerSurroundWithExplosions(0); setCurrentPlayerNum(prevplayernum); } @@ -8338,9 +8338,9 @@ bool aiIfNumKnockedOutChrs(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (cmd[2] < func0f0b058c() && cmd[3] == 0) { + if (cmd[2] < getNumKnockedOutChrs() && cmd[3] == 0) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); - } else if (func0f0b058c() < cmd[2] && cmd[3] == 1) { + } else if (getNumKnockedOutChrs() < cmd[2] && cmd[3] == 1) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { g_Vars.aioffset += 5; @@ -8381,7 +8381,7 @@ bool aiKillBond(void) /** * @cmd 00ff */ -bool ai00ff(void) +bool aiBeSurprised00ff(void) { func0f03ae48(g_Vars.chrdata); g_Vars.aioffset += 2; @@ -8583,7 +8583,7 @@ bool aiSetTarget(void) g_Vars.chrdata->target = prop_id; } } else if (g_Vars.hovdata) { - func0f07afd0(g_Vars.hovdata, cmd[2]); + heliSetTarget(g_Vars.hovdata, cmd[2]); } g_Vars.aioffset += 5; @@ -10789,7 +10789,7 @@ glabel ai0133 * @cmd 0134 */ GLOBAL_ASM( -glabel ai0134 +glabel aiIfOrders /* f05b220: 3c03800a */ lui $v1,%hi(g_Vars) /* f05b224: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) /* f05b228: 8c640434 */ lw $a0,0x434($v1) @@ -10826,7 +10826,7 @@ glabel ai0134 ); // Mismatch because it uses different temporary registers -//bool ai0134(void) +//bool aiIfOrders(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // @@ -10933,7 +10933,7 @@ glabel ai0136 * @cmd 0137 */ GLOBAL_ASM( -glabel ai0137 +glabel aiIfChrInSquadronDoingAction /* f05b3e0: 27bdffc0 */ addiu $sp,$sp,-64 /* f05b3e4: afb20024 */ sw $s2,0x24($sp) /* f05b3e8: 3c12800a */ lui $s2,%hi(g_Vars) @@ -11037,7 +11037,7 @@ glabel ai0137 // Mismatches due to position of rodata. This function uses literal 3500, while // others below in this file use const f32 arrays, but const f32 arrays are // placed in .rodata before all literals. -//bool ai0137(void) +//bool aiIfChrInSquadronDoingAction(void) //{ // s32 ret; // s16 *chrnums = squadronGetChrIds(g_Vars.chrdata->squadron); @@ -11936,7 +11936,7 @@ glabel aiIfAction bool aiHovercopterFireRocket(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f07b290(g_Vars.hovdata, cmd[2]); + heliFireRocket(g_Vars.hovdata, cmd[2]); g_Vars.aioffset += 3; return false; @@ -11999,7 +11999,7 @@ bool aiIfY(void) f32 cutoff_y = ((cmd[4] | (cmd[3] << 8)) << 16) >> 16; if (cmd[2] == CHR_TARGET && g_Vars.hovdata) { - struct heliobj *heli = func0f07adf4(&g_Vars.hovdata->base); + struct heliobj *heli = objGetHeli(&g_Vars.hovdata->base); if (heli) { struct position *target = heliGetTargetPosition(heli); @@ -12409,7 +12409,7 @@ bool aiPunchOrKick(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (g_Vars.chrdata && func0f03bbc8(g_Vars.chrdata, cmd[2])) { + if (g_Vars.chrdata && chrTryPunchOrKick(g_Vars.chrdata, cmd[2])) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -12634,7 +12634,7 @@ glabel ai018a bool aiConfigureRain(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f1329bc(cmd[2]); + rainConfigure(cmd[2]); g_Vars.aioffset += 3; return false; @@ -12646,7 +12646,7 @@ bool aiConfigureRain(void) bool aiConfigureSnow(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - func0f1329ec(cmd[2]); + snowConfigure(cmd[2]); g_Vars.aioffset += 3; return false; @@ -12678,7 +12678,7 @@ bool aiActivateLift(void) struct defaultobj *obj = objFindByTagId(cmd[3]); if (obj && obj->pos) { - func0f070e2c(obj->pos, cmd[2]); + liftActivate(obj->pos, cmd[2]); } g_Vars.aioffset += 4; @@ -12694,7 +12694,7 @@ bool aiMiniSkedarTryPounce(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u16 thing = cmd[4] | (cmd[3] << 8); - if (func0f04767c(g_Vars.chrdata, g_Vars.chrdata->pouncebits, cmd[2], thing, cmd[5])) { + if (skedarTryPounce(g_Vars.chrdata, g_Vars.chrdata->pouncebits, cmd[2], thing, cmd[5])) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[6]); } else { g_Vars.aioffset += 7; @@ -13299,7 +13299,7 @@ glabel ai01ae /* f05e1a8: 24040001 */ addiu $a0,$zero,0x1 /* f05e1ac: 0fc44762 */ jal func0f111d88 /* f05e1b0: adc000c4 */ sw $zero,0xc4($t6) -/* f05e1b4: 0fc2865b */ jal func0f0a196c +/* f05e1b4: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f05e1b8: 24040001 */ addiu $a0,$zero,0x1 /* f05e1bc: 8e0f006c */ lw $t7,0x6c($s0) .L0f05e1c0: @@ -13355,7 +13355,7 @@ glabel ai01ae */ bool aiReleaseObject(void) { - func0f0c7dec(0); + releaseObj(0); g_Vars.aioffset += 3; return false; @@ -13376,7 +13376,7 @@ bool aiChrGrabObject(void) setCurrentPlayerNum(playernum); if (g_Vars.currentplayer->unk01b0 == 0 && func0f0cc680() == 2 && g_Vars.currentplayer->unk00b4 == 0) { - func0f0c7cf0(obj->pos); + currentPlayerGrabProp(obj->pos); } setCurrentPlayerNum(prevplayernum); @@ -13901,7 +13901,7 @@ bool aiIfChrWeaponEquipped(void) u32 prevplayernum = g_Vars.currentplayernum; setCurrentPlayerNum(playernum); - if (func0f0b18bc(cmd[3]) == 1) { + if (currentPlayerHasWeaponEquipped(cmd[3]) == 1) { is_using_weapon = true; } @@ -14064,15 +14064,15 @@ bool aiChrSetCutsceneWeapon(void) bool valid = true; switch (weapon->weapon_id) { - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: + case WEAPON_FALCON2: + case WEAPON_FALCON2_SILENCER: + case WEAPON_FALCON2_SCOPE: + case WEAPON_MAGSEC4: + case WEAPON_MAULER: + case WEAPON_PHOENIX: + case WEAPON_DY357MAGNUM: + case WEAPON_DY357LX: + case WEAPON_CMP150: valid = false; } @@ -14278,7 +14278,7 @@ bool aiSetObjPartVisible(void) struct defaultobj *obj = objFindByTagId(cmd[2]); if (obj && obj->pos) { - func0f091d84(obj, cmd[3], cmd[4]); + objSetPartVisible(obj, cmd[3], cmd[4]); } g_Vars.aioffset += 5; diff --git a/src/game/game_00c490.c b/src/game/game_00c490.c index 6a80128cd..4342f4ff8 100644 --- a/src/game/game_00c490.c +++ b/src/game/game_00c490.c @@ -2019,7 +2019,7 @@ glabel func0f00ddbc /* f00de0c: ad010000 */ sw $at,0x0($t0) /* f00de10: 8dd90004 */ lw $t9,0x4($t6) /* f00de14: ad190004 */ sw $t9,0x4($t0) -/* f00de18: 0fc1fe49 */ jal func0f07f924 +/* f00de18: 0fc1fe49 */ jal imageSlotSetImage /* f00de1c: 920500d3 */ lbu $a1,0xd3($s0) /* f00de20: 86090006 */ lh $t1,0x6($s0) /* f00de24: 8fa500cc */ lw $a1,0xcc($sp) @@ -2212,7 +2212,7 @@ glabel func0f00e084 /* f00e0d4: ad010000 */ sw $at,0x0($t0) /* f00e0d8: 8dd90004 */ lw $t9,0x4($t6) /* f00e0dc: ad190004 */ sw $t9,0x4($t0) -/* f00e0e0: 0fc1fe49 */ jal func0f07f924 +/* f00e0e0: 0fc1fe49 */ jal imageSlotSetImage /* f00e0e4: 9205022c */ lbu $a1,0x22c($s0) /* f00e0e8: 3c09800a */ lui $t1,%hi(var8009ce98) /* f00e0ec: 2529ce98 */ addiu $t1,$t1,%lo(var8009ce98) @@ -2233,7 +2233,7 @@ glabel func0f00e084 /* f00e124: ada10000 */ sw $at,0x0($t5) /* f00e128: 8d2c0004 */ lw $t4,0x4($t1) /* f00e12c: adac0004 */ sw $t4,0x4($t5) -/* f00e130: 0fc1fe49 */ jal func0f07f924 +/* f00e130: 0fc1fe49 */ jal imageSlotSetImage /* f00e134: 9205022d */ lbu $a1,0x22d($s0) /* f00e138: 3c18800a */ lui $t8,%hi(var8009ce98) /* f00e13c: 2718ce98 */ addiu $t8,$t8,%lo(var8009ce98) @@ -2254,7 +2254,7 @@ glabel func0f00e084 /* f00e174: ad010000 */ sw $at,0x0($t0) /* f00e178: 8f0e0004 */ lw $t6,0x4($t8) /* f00e17c: ad0e0004 */ sw $t6,0x4($t0) -/* f00e180: 0fc1fe49 */ jal func0f07f924 +/* f00e180: 0fc1fe49 */ jal imageSlotSetImage /* f00e184: 9205022e */ lbu $a1,0x22e($s0) /* f00e188: 3c0b800a */ lui $t3,%hi(var8009ce98) /* f00e18c: 256bce98 */ addiu $t3,$t3,%lo(var8009ce98) @@ -2275,7 +2275,7 @@ glabel func0f00e084 /* f00e1c4: ada10000 */ sw $at,0x0($t5) /* f00e1c8: 8d690004 */ lw $t1,0x4($t3) /* f00e1cc: ada90004 */ sw $t1,0x4($t5) -/* f00e1d0: 0fc1fe49 */ jal func0f07f924 +/* f00e1d0: 0fc1fe49 */ jal imageSlotSetImage /* f00e1d4: 9205022f */ lbu $a1,0x22f($s0) /* f00e1d8: 02002025 */ or $a0,$s0,$zero /* f00e1dc: 0fc033b9 */ jal func0f00cee4 diff --git a/src/game/game_013540.c b/src/game/game_013540.c index d0335d67d..089d80624 100644 --- a/src/game/game_013540.c +++ b/src/game/game_013540.c @@ -1476,7 +1476,7 @@ glabel func0f014848 /* f01493c: 8fb80070 */ lw $t8,0x70($sp) /* f014940: 87a5007a */ lh $a1,0x7a($sp) /* f014944: 8f100004 */ lw $s0,0x4($t8) -/* f014948: 0fc07937 */ jal func0f01e4dc +/* f014948: 0fc07937 */ jal chrSetChrnum /* f01494c: 02002025 */ or $a0,$s0,$zero /* f014950: 3c013f80 */ lui $at,0x3f80 /* f014954: 8fb90078 */ lw $t9,0x78($sp) diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index dd7e9abbf..a5128ba57 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -4704,7 +4704,7 @@ glabel func0f063dcc /* f0640a8: 24010006 */ addiu $at,$zero,0x6 /* f0640ac: 57210028 */ bnel $t9,$at,.L0f064150 /* f0640b0: 8fbf006c */ lw $ra,0x6c($sp) -/* f0640b4: 0fc256d9 */ jal func0f095b64 +/* f0640b4: 0fc256d9 */ jal objectiveIsAllComplete /* f0640b8: 00000000 */ sll $zero,$zero,0x0 /* f0640bc: 50400024 */ beqzl $v0,.L0f064150 /* f0640c0: 8fbf006c */ lw $ra,0x6c($sp) diff --git a/src/game/game_066310.c b/src/game/game_066310.c index 872259329..358c326a6 100644 --- a/src/game/game_066310.c +++ b/src/game/game_066310.c @@ -1508,7 +1508,7 @@ glabel func0f0665ac /* f0665f8: 8c990014 */ lw $t9,0x14($a0) /* f0665fc: 53200008 */ beqzl $t9,.L0f066620 /* f066600: 8e10000c */ lw $s0,0xc($s0) -/* f066604: 0fc21a6a */ jal func0f0869a8 +/* f066604: 0fc21a6a */ jal objIsHealthy /* f066608: 00000000 */ sll $zero,$zero,0x0 /* f06660c: 50400004 */ beqzl $v0,.L0f066620 /* f066610: 8e10000c */ lw $s0,0xc($s0) @@ -13526,7 +13526,7 @@ glabel func0f070ca0 ); GLOBAL_ASM( -glabel func0f070e2c +glabel liftActivate /* f070e2c: 30ae00ff */ andi $t6,$a1,0xff /* f070e30: 19c00007 */ blez $t6,.L0f070e50 /* f070e34: afa50004 */ sw $a1,0x4($sp) @@ -19009,7 +19009,7 @@ glabel func0f073c6c /* f075d70: 5441000c */ bnel $v0,$at,.L0f075da4 /* f075d74: 24010003 */ addiu $at,$zero,0x3 /* f075d78: 8ca40004 */ lw $a0,0x4($a1) -/* f075d7c: 0fc21a6a */ jal func0f0869a8 +/* f075d7c: 0fc21a6a */ jal objIsHealthy /* f075d80: afa70070 */ sw $a3,0x70($sp) /* f075d84: 1040004c */ beqz $v0,.L0f075eb8 /* f075d88: 8fa70070 */ lw $a3,0x70($sp) @@ -20315,7 +20315,7 @@ glabel func0f076f30 .L0f077054: /* f077054: 14600005 */ bnez $v1,.L0f07706c /* f077058: 00000000 */ sll $zero,$zero,0x0 -/* f07705c: 0fc23922 */ jal func0f08e488 +/* f07705c: 0fc23922 */ jal doorActivate /* f077060: 02002025 */ or $a0,$s0,$zero /* f077064: 1000002e */ beqz $zero,.L0f077120 /* f077068: 820a0084 */ lb $t2,0x84($s0) @@ -20367,7 +20367,7 @@ glabel func0f076f30 /* f07710c: 820a0084 */ lb $t2,0x84($s0) .L0f077110: /* f077110: 02002025 */ or $a0,$s0,$zero -/* f077114: 0fc23922 */ jal func0f08e488 +/* f077114: 0fc23922 */ jal doorActivate /* f077118: 24050002 */ addiu $a1,$zero,0x2 .L0f07711c: /* f07711c: 820a0084 */ lb $t2,0x84($s0) @@ -21165,7 +21165,7 @@ glabel func0f077c10 /* f077ca0: 24050002 */ addiu $a1,$zero,0x2 /* f077ca4: 00095080 */ sll $t2,$t1,0x2 /* f077ca8: 020a5821 */ addu $t3,$s0,$t2 -/* f077cac: 0fc23922 */ jal func0f08e488 +/* f077cac: 0fc23922 */ jal doorActivate /* f077cb0: 8d640064 */ lw $a0,0x64($t3) /* f077cb4: 00001825 */ or $v1,$zero,$zero .L0f077cb8: @@ -21356,7 +21356,7 @@ glabel func0f077c10 /* f077f78: 8c8d0074 */ lw $t5,0x74($a0) /* f077f7c: 55a00004 */ bnezl $t5,.L0f077f90 /* f077f80: 26240008 */ addiu $a0,$s1,0x8 -/* f077f84: 0fc23922 */ jal func0f08e488 +/* f077f84: 0fc23922 */ jal doorActivate /* f077f88: 24050001 */ addiu $a1,$zero,0x1 /* f077f8c: 26240008 */ addiu $a0,$s1,0x8 .L0f077f90: @@ -24584,7 +24584,7 @@ struct position *heliGetTargetPosition(struct heliobj *heli) } GLOBAL_ASM( -glabel func0f07adf4 +glabel objGetHeli /* f07adf4: 908e0003 */ lbu $t6,0x3($a0) /* f07adf8: 24010039 */ addiu $at,$zero,0x39 /* f07adfc: 00001025 */ or $v0,$zero,$zero @@ -24601,7 +24601,7 @@ GLOBAL_ASM( glabel func0f07ae18 /* f07ae18: 27bdffd8 */ addiu $sp,$sp,-40 /* f07ae1c: afbf0014 */ sw $ra,0x14($sp) -/* f07ae20: 0fc1eb7d */ jal func0f07adf4 +/* f07ae20: 0fc1eb7d */ jal objGetHeli /* f07ae24: afa5002c */ sw $a1,0x2c($sp) /* f07ae28: 00402025 */ or $a0,$v0,$zero /* f07ae2c: 1040003c */ beqz $v0,.L0f07af20 @@ -24681,7 +24681,7 @@ GLOBAL_ASM( glabel func0f07af34 /* f07af34: 27bdffd8 */ addiu $sp,$sp,-40 /* f07af38: afbf001c */ sw $ra,0x1c($sp) -/* f07af3c: 0fc1eb7d */ jal func0f07adf4 +/* f07af3c: 0fc1eb7d */ jal objGetHeli /* f07af40: 00000000 */ sll $zero,$zero,0x0 /* f07af44: 1040001d */ beqz $v0,.L0f07afbc /* f07af48: 00402025 */ or $a0,$v0,$zero @@ -24725,10 +24725,10 @@ glabel func0f07af34 ); GLOBAL_ASM( -glabel func0f07afd0 +glabel heliSetTarget /* f07afd0: 27bdffe0 */ addiu $sp,$sp,-32 /* f07afd4: afbf0014 */ sw $ra,0x14($sp) -/* f07afd8: 0fc1eb7d */ jal func0f07adf4 +/* f07afd8: 0fc1eb7d */ jal objGetHeli /* f07afdc: afa50024 */ sw $a1,0x24($sp) /* f07afe0: 10400011 */ beqz $v0,.L0f07b028 /* f07afe4: 00002025 */ or $a0,$zero,$zero @@ -24760,7 +24760,7 @@ GLOBAL_ASM( glabel func0f07b038 /* f07b038: 27bdffe8 */ addiu $sp,$sp,-24 /* f07b03c: afbf0014 */ sw $ra,0x14($sp) -/* f07b040: 0fc1eb7d */ jal func0f07adf4 +/* f07b040: 0fc1eb7d */ jal objGetHeli /* f07b044: 00000000 */ sll $zero,$zero,0x0 /* f07b048: 10400006 */ beqz $v0,.L0f07b064 /* f07b04c: 240e0001 */ addiu $t6,$zero,0x1 @@ -24782,7 +24782,7 @@ GLOBAL_ASM( glabel func0f07b078 /* f07b078: 27bdffe8 */ addiu $sp,$sp,-24 /* f07b07c: afbf0014 */ sw $ra,0x14($sp) -/* f07b080: 0fc1eb7d */ jal func0f07adf4 +/* f07b080: 0fc1eb7d */ jal objGetHeli /* f07b084: 00000000 */ sll $zero,$zero,0x0 /* f07b088: 10400007 */ beqz $v0,.L0f07b0a8 /* f07b08c: 240e0078 */ addiu $t6,$zero,0x78 @@ -24803,7 +24803,7 @@ glabel func0f07b078 bool heliSetField90(struct defaultobj *obj, bool value) { - struct heliobj *heli = func0f07adf4(obj); + struct heliobj *heli = objGetHeli(obj); if (heli) { heli->unk90 = value; @@ -24814,10 +24814,10 @@ bool heliSetField90(struct defaultobj *obj, bool value) } GLOBAL_ASM( -glabel func0f07b0f4 +glabel heliRestartTimer /* f07b0f4: 27bdffe8 */ addiu $sp,$sp,-24 /* f07b0f8: afbf0014 */ sw $ra,0x14($sp) -/* f07b0fc: 0fc1eb7d */ jal func0f07adf4 +/* f07b0fc: 0fc1eb7d */ jal objGetHeli /* f07b100: 00000000 */ sll $zero,$zero,0x0 /* f07b104: 50400003 */ beqzl $v0,.L0f07b114 /* f07b108: 8fbf0014 */ lw $ra,0x14($sp) @@ -24833,7 +24833,7 @@ GLOBAL_ASM( glabel heliGetTimer /* f07b120: 27bdffe8 */ addiu $sp,$sp,-24 /* f07b124: afbf0014 */ sw $ra,0x14($sp) -/* f07b128: 0fc1eb7d */ jal func0f07adf4 +/* f07b128: 0fc1eb7d */ jal objGetHeli /* f07b12c: 00000000 */ sll $zero,$zero,0x0 /* f07b130: 8c4e00c0 */ lw $t6,0xc0($v0) /* f07b134: 3c017f1b */ lui $at,%hi(var7f1aa5c8) @@ -24934,7 +24934,7 @@ glabel func0f07b164 ); GLOBAL_ASM( -glabel func0f07b290 +glabel heliFireRocket /* f07b290: 27bdff30 */ addiu $sp,$sp,-208 /* f07b294: afbf0024 */ sw $ra,0x24($sp) /* f07b298: afb10020 */ sw $s1,0x20($sp) @@ -25793,7 +25793,7 @@ glabel func0f07ba38 /* f07bf2c: 000c6b00 */ sll $t5,$t4,0xc /* f07bf30: 05a20014 */ bltzl $t5,.L0f07bf84 /* f07bf34: 8fa40178 */ lw $a0,0x178($sp) -/* f07bf38: 0fc21a6a */ jal func0f0869a8 +/* f07bf38: 0fc21a6a */ jal objIsHealthy /* f07bf3c: 02002025 */ or $a0,$s0,$zero /* f07bf40: 1040000f */ beqz $v0,.L0f07bf80 /* f07bf44: 3c0e800a */ lui $t6,0x800a @@ -25899,7 +25899,7 @@ glabel func0f07ba38 /* f07c0b4: 00194300 */ sll $t0,$t9,0xc /* f07c0b8: 05020014 */ bltzl $t0,.L0f07c10c /* f07c0bc: 8fa40178 */ lw $a0,0x178($sp) -/* f07c0c0: 0fc21a6a */ jal func0f0869a8 +/* f07c0c0: 0fc21a6a */ jal objIsHealthy /* f07c0c4: 02002025 */ or $a0,$s0,$zero /* f07c0c8: 1040000f */ beqz $v0,.L0f07c108 /* f07c0cc: 3c09800a */ lui $t1,0x800a @@ -27436,7 +27436,7 @@ glabel func0f07d1e4 /* f07d704: 0fc24030 */ jal func0f0900c0 /* f07d708: e7ac0058 */ swc1 $f12,0x58($sp) /* f07d70c: 8fa401a0 */ lw $a0,0x1a0($sp) -/* f07d710: 0fc23922 */ jal func0f08e488 +/* f07d710: 0fc23922 */ jal doorActivate /* f07d714: 24050001 */ addiu $a1,$zero,0x1 /* f07d718: c7ac0058 */ lwc1 $f12,0x58($sp) .L0f07d71c: @@ -29851,7 +29851,7 @@ glabel func0f07f918 ); GLOBAL_ASM( -glabel func0f07f924 +glabel imageSlotSetImage /* f07f924: 27bdffe8 */ addiu $sp,$sp,-24 /* f07f928: 3c068007 */ lui $a2,%hi(var80069d90) /* f07f92c: 2ca10037 */ sltiu $at,$a1,0x37 @@ -31353,7 +31353,7 @@ glabel func0f0809c4 /* f080f0c: 01817824 */ and $t7,$t4,$at /* f080f10: 51e0001a */ beqzl $t7,.L0f080f7c /* f080f14: 8fbf0034 */ lw $ra,0x34($sp) -/* f080f18: 0fc21a6a */ jal func0f0869a8 +/* f080f18: 0fc21a6a */ jal objIsHealthy /* f080f1c: 01a02025 */ or $a0,$t5,$zero /* f080f20: 10400015 */ beqz $v0,.L0f080f78 /* f080f24: 3c0bb700 */ lui $t3,0xb700 @@ -37169,7 +37169,7 @@ glabel func0f085eac /* f08620c: 0fc0a3df */ jal func0f028f7c /* f086210: afae0014 */ sw $t6,0x14($sp) .L0f086214: -/* f086214: 0fc21a6a */ jal func0f0869a8 +/* f086214: 0fc21a6a */ jal objIsHealthy /* f086218: 8fa4011c */ lw $a0,0x11c($sp) /* f08621c: 5040000c */ beqzl $v0,.L0f086250 /* f086220: 8faf00fc */ lw $t7,0xfc($sp) @@ -37631,7 +37631,7 @@ glabel func0f085eac /* f0868b8: 316c0002 */ andi $t4,$t3,0x2 /* f0868bc: 51800007 */ beqzl $t4,.L0f0868dc /* f0868c0: 8fae011c */ lw $t6,0x11c($sp) -/* f0868c4: 0fc21a6a */ jal func0f0869a8 +/* f0868c4: 0fc21a6a */ jal objIsHealthy /* f0868c8: afa30054 */ sw $v1,0x54($sp) /* f0868cc: 14400002 */ bnez $v0,.L0f0868d8 /* f0868d0: 8fa30054 */ lw $v1,0x54($sp) @@ -37704,7 +37704,7 @@ glabel func0f086918 ); GLOBAL_ASM( -glabel func0f0869a8 +glabel objIsHealthy /* f0869a8: 27bdffe8 */ addiu $sp,$sp,-24 /* f0869ac: afbf0014 */ sw $ra,0x14($sp) /* f0869b0: 0fc1a1ee */ jal func0f0687b8 @@ -37831,7 +37831,7 @@ glabel func0f0869cc /* f086b68: 312a0002 */ andi $t2,$t1,0x2 /* f086b6c: 51400078 */ beqzl $t2,.L0f086d50 /* f086b70: 8fbf001c */ lw $ra,0x1c($sp) -/* f086b74: 0fc21a6a */ jal func0f0869a8 +/* f086b74: 0fc21a6a */ jal objIsHealthy /* f086b78: afa60028 */ sw $a2,0x28($sp) /* f086b7c: 10400073 */ beqz $v0,.L0f086d4c /* f086b80: 8fa60028 */ lw $a2,0x28($sp) @@ -38394,7 +38394,7 @@ glabel func0f086f40 /* f087378: 8c5902ac */ lw $t9,0x2ac($v0) /* f08737c: 17200003 */ bnez $t9,.L0f08738c /* f087380: 00000000 */ sll $zero,$zero,0x0 -/* f087384: 0fc31f3c */ jal func0f0c7cf0 +/* f087384: 0fc31f3c */ jal currentPlayerGrabProp /* f087388: 8fa40038 */ lw $a0,0x38($sp) .L0f08738c: /* f08738c: 3c03800a */ lui $v1,%hi(g_Vars) @@ -40213,7 +40213,7 @@ glabel func0f088840 /* f088c84: 9305005c */ lbu $a1,0x5c($t8) /* f088c88: 50450004 */ beql $v0,$a1,.L0f088c9c /* f088c8c: 8fb90074 */ lw $t9,0x74($sp) -/* f088c90: 0fc28824 */ jal func0f0a2090 +/* f088c90: 0fc28824 */ jal currentPlayerEquipWeapon /* f088c94: 24040001 */ addiu $a0,$zero,0x1 /* f088c98: 8fb90074 */ lw $t9,0x74($sp) .L0f088c9c: @@ -42421,7 +42421,7 @@ glabel func0f08aa70 ); GLOBAL_ASM( -glabel func0f08aaf4 +glabel weaponIsThrown /* f08aaf4: 27bdffe0 */ addiu $sp,$sp,-32 /* f08aaf8: afb00014 */ sw $s0,0x14($sp) /* f08aafc: 3c10800a */ lui $s0,0x800a @@ -44247,7 +44247,7 @@ glabel func0f08c190 .L0f08c3d0: /* f08c3d0: 12400003 */ beqz $s2,.L0f08c3e0 /* f08c3d4: 02c02025 */ or $a0,$s6,$zero -/* f08c3d8: 0fc23922 */ jal func0f08e488 +/* f08c3d8: 0fc23922 */ jal doorActivate /* f08c3dc: 24050001 */ addiu $a1,$zero,0x1 .L0f08c3e0: /* f08c3e0: 86e20002 */ lh $v0,0x2($s7) @@ -46561,7 +46561,7 @@ glabel func0f08e3a4 ); GLOBAL_ASM( -glabel func0f08e488 +glabel doorActivate /* f08e488: 27bdffd8 */ addiu $sp,$sp,-40 /* f08e48c: afbf0024 */ sw $ra,0x24($sp) /* f08e490: afb20020 */ sw $s2,0x20($sp) @@ -48455,7 +48455,7 @@ glabel func0f08fee8 /* f08ff18: 54410006 */ bnel $v0,$at,.L0f08ff34 /* f08ff1c: 24010002 */ addiu $at,$zero,0x2 .L0f08ff20: -/* f08ff20: 0fc23922 */ jal func0f08e488 +/* f08ff20: 0fc23922 */ jal doorActivate /* f08ff24: 24050002 */ addiu $a1,$zero,0x2 /* f08ff28: 1000001a */ beqz $zero,.L0f08ff94 /* f08ff2c: 00000000 */ sll $zero,$zero,0x0 @@ -48463,7 +48463,7 @@ glabel func0f08fee8 .L0f08ff34: /* f08ff34: 14410005 */ bne $v0,$at,.L0f08ff4c /* f08ff38: 02002025 */ or $a0,$s0,$zero -/* f08ff3c: 0fc23922 */ jal func0f08e488 +/* f08ff3c: 0fc23922 */ jal doorActivate /* f08ff40: 24050001 */ addiu $a1,$zero,0x1 /* f08ff44: 10000013 */ beqz $zero,.L0f08ff94 /* f08ff48: 00000000 */ sll $zero,$zero,0x0 @@ -48480,12 +48480,12 @@ glabel func0f08fee8 /* f08ff70: 00000000 */ sll $zero,$zero,0x0 /* f08ff74: 45000005 */ bc1f .L0f08ff8c /* f08ff78: 00000000 */ sll $zero,$zero,0x0 -/* f08ff7c: 0fc23922 */ jal func0f08e488 +/* f08ff7c: 0fc23922 */ jal doorActivate /* f08ff80: 02002025 */ or $a0,$s0,$zero /* f08ff84: 10000003 */ beqz $zero,.L0f08ff94 /* f08ff88: 00000000 */ sll $zero,$zero,0x0 .L0f08ff8c: -/* f08ff8c: 0fc23922 */ jal func0f08e488 +/* f08ff8c: 0fc23922 */ jal doorActivate /* f08ff90: 24050001 */ addiu $a1,$zero,0x1 .L0f08ff94: /* f08ff94: 3c03800a */ lui $v1,%hi(g_Vars) @@ -50086,7 +50086,7 @@ glabel func0f0912dc /* f091638: 8fae0200 */ lw $t6,0x200($sp) /* f09163c: 15a1006d */ bne $t5,$at,.L0f0917f4 /* f091640: 00000000 */ sll $zero,$zero,0x0 -/* f091644: 0fc1eb7d */ jal func0f07adf4 +/* f091644: 0fc1eb7d */ jal objGetHeli /* f091648: 8dc40004 */ lw $a0,0x4($t6) /* f09164c: 104001c9 */ beqz $v0,.L0f091d74 /* f091650: 3c017f1b */ lui $at,%hi(var7f1ab20c) @@ -50579,7 +50579,7 @@ glabel func0f0912dc ); GLOBAL_ASM( -glabel func0f091d84 +glabel objSetPartVisible /* f091d84: 27bdffe8 */ addiu $sp,$sp,-24 /* f091d88: afbf0014 */ sw $ra,0x14($sp) /* f091d8c: 10800019 */ beqz $a0,.L0f091df4 @@ -53310,7 +53310,7 @@ glabel audioPlayFromWorldPosition ); GLOBAL_ASM( -glabel func0f0942d0 +glabel audioMuteChannel /* f0942d0: 27bdffd8 */ addiu $sp,$sp,-40 /* f0942d4: 2401000a */ addiu $at,$zero,0xa /* f0942d8: afbf0024 */ sw $ra,0x24($sp) @@ -53382,7 +53382,7 @@ glabel func0f0942d0 ); GLOBAL_ASM( -glabel func0f0943bc +glabel audioIfChannelIdle /* f0943bc: 04800011 */ bltz $a0,.L0f094404 /* f0943c0: 28810008 */ slti $at,$a0,0x8 /* f0943c4: 1020000f */ beqz $at,.L0f094404 @@ -54709,7 +54709,7 @@ struct defaultobj *objFindByTagId(s32 tag_id) } GLOBAL_ASM( -glabel func0f0955f4 +glabel objectiveGetCount /* f0955f4: 3c028007 */ lui $v0,0x8007 /* f0955f8: 8c42ae70 */ lw $v0,-0x5190($v0) /* f0955fc: 03e00008 */ jr $ra @@ -54739,7 +54739,7 @@ glabel func0f0955f4 ); GLOBAL_ASM( -glabel func0f095650 +glabel objectiveGetDifficultyBits /* f095650: 2881000a */ slti $at,$a0,0xa /* f095654: 10200008 */ beqz $at,.L0f095678 /* f095658: 00047080 */ sll $t6,$a0,0x2 @@ -54758,7 +54758,7 @@ glabel func0f095650 ); GLOBAL_ASM( -glabel func0f095684 +glabel objectiveGetStatus /* f095684: 27bdff88 */ addiu $sp,$sp,-120 /* f095688: afb60030 */ sw $s6,0x30($sp) /* f09568c: 2881000a */ slti $at,$a0,0xa @@ -54806,7 +54806,7 @@ glabel func0f095684 /* f09572c: 8c4f0014 */ lw $t7,0x14($v0) /* f095730: 51e000ea */ beqzl $t7,.L0f095adc /* f095734: 24020001 */ addiu $v0,$zero,0x1 -/* f095738: 0fc21a6a */ jal func0f0869a8 +/* f095738: 0fc21a6a */ jal objIsHealthy /* f09573c: 00000000 */ sll $zero,$zero,0x0 /* f095740: 504000e6 */ beqzl $v0,.L0f095adc /* f095744: 24020001 */ addiu $v0,$zero,0x1 @@ -54834,7 +54834,7 @@ glabel func0f095684 /* f09579c: 8c580014 */ lw $t8,0x14($v0) /* f0957a0: 13000005 */ beqz $t8,.L0f0957b8 /* f0957a4: 00000000 */ sll $zero,$zero,0x0 -/* f0957a8: 0fc21a6a */ jal func0f0869a8 +/* f0957a8: 0fc21a6a */ jal objIsHealthy /* f0957ac: 00402025 */ or $a0,$v0,$zero /* f0957b0: 54400004 */ bnezl $v0,.L0f0957c4 /* f0957b4: 8e48006c */ lw $t0,0x6c($s2) @@ -54890,7 +54890,7 @@ glabel func0f095684 .L0f09585c: /* f09585c: 0fc4a24b */ jal setCurrentPlayerNum /* f095860: 02202025 */ or $a0,$s1,$zero -/* f095864: 0fc44a33 */ jal func0f1128cc +/* f095864: 0fc44a33 */ jal currentPlayerHasProp /* f095868: 8e640014 */ lw $a0,0x14($s3) /* f09586c: 10400003 */ beqz $v0,.L0f09587c /* f095870: 24080001 */ addiu $t0,$zero,0x1 @@ -54996,7 +54996,7 @@ glabel func0f095684 .L0f0959c4: /* f0959c4: 0fc4a24b */ jal setCurrentPlayerNum /* f0959c8: 02202025 */ or $a0,$s1,$zero -/* f0959cc: 0fc44a33 */ jal func0f1128cc +/* f0959cc: 0fc44a33 */ jal currentPlayerHasProp /* f0959d0: 8e640014 */ lw $a0,0x14($s3) /* f0959d4: 50400004 */ beqzl $v0,.L0f0959e8 /* f0959d8: 8e58006c */ lw $t8,0x6c($s2) @@ -55054,7 +55054,7 @@ glabel func0f095684 /* f095a88: 8c4b0014 */ lw $t3,0x14($v0) /* f095a8c: 11600005 */ beqz $t3,.L0f095aa4 /* f095a90: 00000000 */ sll $zero,$zero,0x0 -/* f095a94: 0fc21a6a */ jal func0f0869a8 +/* f095a94: 0fc21a6a */ jal objIsHealthy /* f095a98: 00000000 */ sll $zero,$zero,0x0 /* f095a9c: 14400003 */ bnez $v0,.L0f095aac /* f095aa0: 00000000 */ sll $zero,$zero,0x0 @@ -55117,18 +55117,18 @@ glabel func0f095684 ); GLOBAL_ASM( -glabel func0f095b64 +glabel objectiveIsAllComplete /* f095b64: 27bdffd8 */ addiu $sp,$sp,-40 /* f095b68: afbf0024 */ sw $ra,0x24($sp) /* f095b6c: afb00018 */ sw $s0,0x18($sp) /* f095b70: afb20020 */ sw $s2,0x20($sp) /* f095b74: afb1001c */ sw $s1,0x1c($sp) -/* f095b78: 0fc2557d */ jal func0f0955f4 +/* f095b78: 0fc2557d */ jal objectiveGetCount /* f095b7c: 00008025 */ or $s0,$zero,$zero /* f095b80: 18400015 */ blez $v0,.L0f095bd8 /* f095b84: 24120001 */ addiu $s2,$zero,0x1 .L0f095b88: -/* f095b88: 0fc25594 */ jal func0f095650 +/* f095b88: 0fc25594 */ jal objectiveGetDifficultyBits /* f095b8c: 02002025 */ or $a0,$s0,$zero /* f095b90: 0fc5b367 */ jal getDifficulty /* f095b94: 00408825 */ or $s1,$v0,$zero @@ -55137,14 +55137,14 @@ glabel func0f095b64 /* f095ba0: 01f1c024 */ and $t8,$t7,$s1 /* f095ba4: 13000007 */ beqz $t8,.L0f095bc4 /* f095ba8: 00000000 */ sll $zero,$zero,0x0 -/* f095bac: 0fc255a1 */ jal func0f095684 +/* f095bac: 0fc255a1 */ jal objectiveGetStatus /* f095bb0: 02002025 */ or $a0,$s0,$zero /* f095bb4: 10520003 */ beq $v0,$s2,.L0f095bc4 /* f095bb8: 00000000 */ sll $zero,$zero,0x0 /* f095bbc: 10000007 */ beqz $zero,.L0f095bdc /* f095bc0: 00001025 */ or $v0,$zero,$zero .L0f095bc4: -/* f095bc4: 0fc2557d */ jal func0f0955f4 +/* f095bc4: 0fc2557d */ jal objectiveGetCount /* f095bc8: 26100001 */ addiu $s0,$s0,0x1 /* f095bcc: 0202082a */ slt $at,$s0,$v0 /* f095bd0: 1420ffed */ bnez $at,.L0f095b88 @@ -55319,14 +55319,14 @@ glabel func0f095d64 /* f095e04: 26f7b7c4 */ addiu $s7,$s7,-18492 /* f095e08: 241e0001 */ addiu $s8,$zero,0x1 .L0f095e0c: -/* f095e0c: 0fc255a1 */ jal func0f095684 +/* f095e0c: 0fc255a1 */ jal objectiveGetStatus /* f095e10: 02602025 */ or $a0,$s3,$zero /* f095e14: 8e8b0000 */ lw $t3,0x0($s4) /* f095e18: 00408825 */ or $s1,$v0,$zero /* f095e1c: 02602025 */ or $a0,$s3,$zero /* f095e20: 104b0033 */ beq $v0,$t3,.L0f095ef0 /* f095e24: 00000000 */ sll $zero,$zero,0x0 -/* f095e28: 0fc25594 */ jal func0f095650 +/* f095e28: 0fc25594 */ jal objectiveGetDifficultyBits /* f095e2c: ae820000 */ sw $v0,0x0($s4) /* f095e30: 0fc5b367 */ jal getDifficulty /* f095e34: 00408025 */ or $s0,$v0,$zero @@ -55379,7 +55379,7 @@ glabel func0f095d64 /* f095ee8: 0fc25701 */ jal func0f095c04 /* f095eec: 24050002 */ addiu $a1,$zero,0x2 .L0f095ef0: -/* f095ef0: 0fc25594 */ jal func0f095650 +/* f095ef0: 0fc25594 */ jal objectiveGetDifficultyBits /* f095ef4: 02602025 */ or $a0,$s3,$zero /* f095ef8: 0fc5b367 */ jal getDifficulty /* f095efc: 00408025 */ or $s0,$v0,$zero @@ -55551,7 +55551,7 @@ glabel func0f096088 /* f096134: 00000000 */ sll $zero,$zero,0x0 /* f096138: 45020079 */ bc1fl .L0f096320 /* f09613c: 8e31000c */ lw $s1,0xc($s1) -/* f096140: 0fc21a6a */ jal func0f0869a8 +/* f096140: 0fc21a6a */ jal objIsHealthy /* f096144: 00402025 */ or $a0,$v0,$zero /* f096148: 50400075 */ beqzl $v0,.L0f096320 /* f09614c: 8e31000c */ lw $s1,0xc($s1) diff --git a/src/game/game_097a50.c b/src/game/game_097a50.c index 53653a66c..f5391ee53 100644 --- a/src/game/game_097a50.c +++ b/src/game/game_097a50.c @@ -2459,7 +2459,7 @@ glabel func0f0990b0 /* f099150: 8f03001c */ lw $v1,0x1c($t8) /* f099154: 50600008 */ beqzl $v1,.L0f099178 /* f099158: 00001025 */ or $v0,$zero,$zero -/* f09915c: 0fc2a61a */ jal func0f0a9868 +/* f09915c: 0fc2a61a */ jal currentPlayerGetAmmoCount /* f099160: 8c640000 */ lw $a0,0x0($v1) /* f099164: 5c400004 */ bgtzl $v0,.L0f099178 /* f099168: 00001025 */ or $v0,$zero,$zero @@ -11801,7 +11801,7 @@ glabel func0f0a1528 /* f0a1580: 8fbf0044 */ lw $ra,0x44($sp) /* f0a1584: 82b01580 */ lb $s0,0x1580($s5) /* f0a1588: 82b10de4 */ lb $s1,0xde4($s5) -/* f0a158c: 0fc2c62f */ jal func0f0b18bc +/* f0a158c: 0fc2c62f */ jal currentPlayerHasWeaponEquipped /* f0a1590: 82840002 */ lb $a0,0x2($s4) /* f0a1594: 2401ffff */ addiu $at,$zero,-1 /* f0a1598: 10410002 */ beq $v0,$at,.L0f0a15a4 @@ -12075,7 +12075,7 @@ glabel func0f0a1528 ); GLOBAL_ASM( -glabel func0f0a196c +glabel currentPlayerEquipWeaponInCutscene /* f0a196c: 3c02800a */ lui $v0,0x800a /* f0a1970: 8c42a244 */ lw $v0,-0x5dbc($v0) /* f0a1974: 804e1580 */ lb $t6,0x1580($v0) @@ -12191,7 +12191,7 @@ glabel func0f0a1ab0 /* f0a1ad8: 82041581 */ lb $a0,0x1581($s0) /* f0a1adc: 10400015 */ beqz $v0,.L0f0a1b34 /* f0a1ae0: 00002025 */ or $a0,$zero,$zero -/* f0a1ae4: 0fc28824 */ jal func0f0a2090 +/* f0a1ae4: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a1ae8: 82051581 */ lb $a1,0x1581($s0) /* f0a1aec: 82041581 */ lb $a0,0x1581($s0) /* f0a1af0: 0fc4473e */ jal func0f111cf8 @@ -12207,7 +12207,7 @@ glabel func0f0a1ab0 /* f0a1b18: 00000000 */ sll $zero,$zero,0x0 /* f0a1b1c: 03090019 */ multu $t8,$t1 /* f0a1b20: 00002812 */ mflo $a1 -/* f0a1b24: 0fc28824 */ jal func0f0a2090 +/* f0a1b24: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a1b28: 00000000 */ sll $zero,$zero,0x0 /* f0a1b2c: 10000004 */ beqz $zero,.L0f0a1b40 /* f0a1b30: 8fbf001c */ lw $ra,0x1c($sp) @@ -12279,7 +12279,7 @@ glabel func0f0a1b50 /* f0a1c0c: 35090080 */ ori $t1,$t0,0x80 /* f0a1c10: a0691583 */ sb $t1,0x1583($v1) .L0f0a1c14: -/* f0a1c14: 0fc2865b */ jal func0f0a196c +/* f0a1c14: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a1c18: 8fa40024 */ lw $a0,0x24($sp) .L0f0a1c1c: /* f0a1c1c: 8fbf0014 */ lw $ra,0x14($sp) @@ -12348,7 +12348,7 @@ glabel func0f0a1c2c /* f0a1cf4: 37290080 */ ori $t1,$t9,0x80 /* f0a1cf8: a0691583 */ sb $t1,0x1583($v1) .L0f0a1cfc: -/* f0a1cfc: 0fc2865b */ jal func0f0a196c +/* f0a1cfc: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a1d00: 8fa40024 */ lw $a0,0x24($sp) .L0f0a1d04: /* f0a1d04: 8fbf0014 */ lw $ra,0x14($sp) @@ -12392,7 +12392,7 @@ glabel func0f0a1d14 /* f0a1d84: 50600008 */ beqzl $v1,.L0f0a1da8 /* f0a1d88: 26100001 */ addiu $s0,$s0,0x1 /* f0a1d8c: 24120001 */ addiu $s2,$zero,0x1 -/* f0a1d90: 0fc2a61a */ jal func0f0a9868 +/* f0a1d90: 0fc2a61a */ jal currentPlayerGetAmmoCount /* f0a1d94: 8c640000 */ lw $a0,0x0($v1) /* f0a1d98: 58400003 */ blezl $v0,.L0f0a1da8 /* f0a1d9c: 26100001 */ addiu $s0,$s0,0x1 @@ -12588,7 +12588,7 @@ glabel func0f0a1df4 /* f0a2030: 31cfff7f */ andi $t7,$t6,0xff7f /* f0a2034: a04f1583 */ sb $t7,0x1583($v0) .L0f0a2038: -/* f0a2038: 0fc2865b */ jal func0f0a196c +/* f0a2038: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a203c: 03c02025 */ or $a0,$s8,$zero /* f0a2040: 8fb80040 */ lw $t8,0x40($sp) /* f0a2044: 3c02800a */ lui $v0,0x800a @@ -12615,7 +12615,7 @@ glabel func0f0a1df4 ); GLOBAL_ASM( -glabel func0f0a2090 +glabel currentPlayerEquipWeapon /* f0a2090: 27bdffe8 */ addiu $sp,$sp,-24 /* f0a2094: 24010001 */ addiu $at,$zero,0x1 /* f0a2098: 1481000e */ bne $a0,$at,.L0f0a20d4 @@ -12640,7 +12640,7 @@ glabel func0f0a2090 /* f0a20dc: 00000000 */ sll $zero,$zero,0x0 /* f0a20e0: 24050001 */ addiu $a1,$zero,0x1 .L0f0a20e4: -/* f0a20e4: 0fc2865b */ jal func0f0a196c +/* f0a20e4: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a20e8: 00a02025 */ or $a0,$a1,$zero .L0f0a20ec: /* f0a20ec: 8fbf0014 */ lw $ra,0x14($sp) @@ -13335,10 +13335,10 @@ glabel func0f0a29c8 /* f0a2a74: 1632fff8 */ bne $s1,$s2,.L0f0a2a58 /* f0a2a78: 261007a4 */ addiu $s0,$s0,0x7a4 /* f0a2a7c: 24040001 */ addiu $a0,$zero,0x1 -/* f0a2a80: 0fc28824 */ jal func0f0a2090 +/* f0a2a80: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a2a84: 00002825 */ or $a1,$zero,$zero /* f0a2a88: 00002025 */ or $a0,$zero,$zero -/* f0a2a8c: 0fc28824 */ jal func0f0a2090 +/* f0a2a8c: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a2a90: 00002825 */ or $a1,$zero,$zero /* f0a2a94: 8fbf002c */ lw $ra,0x2c($sp) .L0f0a2a98: @@ -13546,10 +13546,10 @@ glabel func0f0a2ae4 /* f0a2d6c: a6800010 */ sh $zero,0x10($s4) .L0f0a2d70: /* f0a2d70: 00002025 */ or $a0,$zero,$zero -/* f0a2d74: 0fc28824 */ jal func0f0a2090 +/* f0a2d74: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a2d78: 24050001 */ addiu $a1,$zero,0x1 /* f0a2d7c: 24040001 */ addiu $a0,$zero,0x1 -/* f0a2d80: 0fc28824 */ jal func0f0a2090 +/* f0a2d80: 0fc28824 */ jal currentPlayerEquipWeapon /* f0a2d84: 00002825 */ or $a1,$zero,$zero .L0f0a2d88: /* f0a2d88: 8fbf0034 */ lw $ra,0x34($sp) @@ -20242,7 +20242,7 @@ glabel func0f0a8d34 /* f0a8dcc: 24010001 */ addiu $at,$zero,0x1 /* f0a8dd0: 51a10006 */ beql $t5,$at,.L0f0a8dec /* f0a8dd4: 90591583 */ lbu $t9,0x1583($v0) -/* f0a8dd8: 0fc2865b */ jal func0f0a196c +/* f0a8dd8: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a8ddc: 24040001 */ addiu $a0,$zero,0x1 /* f0a8de0: 3c02800a */ lui $v0,0x800a /* f0a8de4: 8c42a244 */ lw $v0,-0x5dbc($v0) @@ -20289,7 +20289,7 @@ glabel func0f0a8d34 /* f0a8e7c: 8c59001c */ lw $t9,0x1c($v0) /* f0a8e80: 13200019 */ beqz $t9,.L0f0a8ee8 /* f0a8e84: 00000000 */ sll $zero,$zero,0x0 -/* f0a8e88: 0fc2a61a */ jal func0f0a9868 +/* f0a8e88: 0fc2a61a */ jal currentPlayerGetAmmoCount /* f0a8e8c: 8f240000 */ lw $a0,0x0($t9) /* f0a8e90: 14400015 */ bnez $v0,.L0f0a8ee8 /* f0a8e94: 00000000 */ sll $zero,$zero,0x0 @@ -20311,7 +20311,7 @@ glabel func0f0a8d34 /* f0a8ed4: 8defa244 */ lw $t7,-0x5dbc($t7) /* f0a8ed8: 0fc44b11 */ jal func0f112c44 /* f0a8edc: 8de41874 */ lw $a0,0x1874($t7) -/* f0a8ee0: 0fc2865b */ jal func0f0a196c +/* f0a8ee0: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f0a8ee4: 00402025 */ or $a0,$v0,$zero .L0f0a8ee8: /* f0a8ee8: 0fc44a54 */ jal func0f112950 @@ -21012,7 +21012,7 @@ glabel func0f0a9770 ); GLOBAL_ASM( -glabel func0f0a9868 +glabel currentPlayerGetAmmoCount /* f0a9868: 3c02800a */ lui $v0,0x800a /* f0a986c: 8c47a244 */ lw $a3,-0x5dbc($v0) /* f0a9870: 00047080 */ sll $t6,$a0,0x2 diff --git a/src/game/game_0b0420.c b/src/game/game_0b0420.c index a42a13ac3..2575e8ea9 100644 --- a/src/game/game_0b0420.c +++ b/src/game/game_0b0420.c @@ -219,7 +219,7 @@ glabel func0f0b0574 ); GLOBAL_ASM( -glabel func0f0b058c +glabel getNumKnockedOutChrs /* f0b058c: 3c02800a */ lui $v0,0x800a /* f0b0590: 03e00008 */ jr $ra /* f0b0594: 9042a277 */ lbu $v0,-0x5d89($v0) @@ -260,7 +260,7 @@ glabel func0f0b05a4 /* f0b0610: 0c004dad */ jal func000136b4 /* f0b0614: 8d47001c */ lw $a3,0x1c($t2) /* f0b0618: 27a40038 */ addiu $a0,$sp,0x38 -/* f0b061c: 0fc377c7 */ jal func0f0ddf1c +/* f0b061c: 0fc377c7 */ jal currentPlayerQueueMessage /* f0b0620: 00002825 */ or $a1,$zero,$zero /* f0b0624: 3c08800a */ lui $t0,%hi(g_Vars) /* f0b0628: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -396,7 +396,7 @@ glabel func0f0b0764 /* f0b07f8: 8fa60028 */ lw $a2,0x28($sp) /* f0b07fc: 27a40030 */ addiu $a0,$sp,0x30 .L0f0b0800: -/* f0b0800: 0fc377c7 */ jal func0f0ddf1c +/* f0b0800: 0fc377c7 */ jal currentPlayerQueueMessage /* f0b0804: 00002825 */ or $a1,$zero,$zero /* f0b0808: 8fbf001c */ lw $ra,0x1c($sp) .L0f0b080c: @@ -456,7 +456,7 @@ glabel func0f0b0818 /* f0b08c8: 0c004dad */ jal func000136b4 /* f0b08cc: 00403025 */ or $a2,$v0,$zero /* f0b08d0: 27a40040 */ addiu $a0,$sp,0x40 -/* f0b08d4: 0fc377c7 */ jal func0f0ddf1c +/* f0b08d4: 0fc377c7 */ jal currentPlayerQueueMessage /* f0b08d8: 00002825 */ or $a1,$zero,$zero /* f0b08dc: 3c09800a */ lui $t1,%hi(g_Vars) /* f0b08e0: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -753,7 +753,7 @@ glabel func0f0b09f4 /* f0b0cf8: 0c004dad */ jal func000136b4 /* f0b0cfc: 00403025 */ or $a2,$v0,$zero /* f0b0d00: 27a4003c */ addiu $a0,$sp,0x3c -/* f0b0d04: 0fc377c7 */ jal func0f0ddf1c +/* f0b0d04: 0fc377c7 */ jal currentPlayerQueueMessage /* f0b0d08: 00002825 */ or $a1,$zero,$zero .L0f0b0d0c: /* f0b0d0c: 0fc2c1d9 */ jal func0f0b0764 @@ -836,7 +836,7 @@ glabel func0f0b09f4 /* f0b0e1c: 0c004dad */ jal func000136b4 /* f0b0e20: 00403025 */ or $a2,$v0,$zero /* f0b0e24: 27a4003c */ addiu $a0,$sp,0x3c -/* f0b0e28: 0fc377c7 */ jal func0f0ddf1c +/* f0b0e28: 0fc377c7 */ jal currentPlayerQueueMessage /* f0b0e2c: 00002825 */ or $a1,$zero,$zero .L0f0b0e30: /* f0b0e30: 0fc2c169 */ jal func0f0b05a4 @@ -1629,7 +1629,7 @@ glabel func0f0b184c ); GLOBAL_ASM( -glabel func0f0b18bc +glabel currentPlayerHasWeaponEquipped /* f0b18bc: 27bdffe8 */ addiu $sp,$sp,-24 /* f0b18c0: afbf0014 */ sw $ra,0x14($sp) /* f0b18c4: 0fc2c3f4 */ jal weaponFindById diff --git a/src/game/game_0b28d0.c b/src/game/game_0b28d0.c index cef33060c..2e6a5405f 100644 --- a/src/game/game_0b28d0.c +++ b/src/game/game_0b28d0.c @@ -6310,11 +6310,11 @@ glabel func0f0b7c60 /* f0b7d1c: 00802825 */ or $a1,$a0,$zero /* f0b7d20: 8fae0034 */ lw $t6,0x34($sp) /* f0b7d24: 00002025 */ or $a0,$zero,$zero -/* f0b7d28: 0fc28824 */ jal func0f0a2090 +/* f0b7d28: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7d2c: 91c5005c */ lbu $a1,0x5c($t6) /* f0b7d30: 8faf0034 */ lw $t7,0x34($sp) /* f0b7d34: 24040001 */ addiu $a0,$zero,0x1 -/* f0b7d38: 0fc28824 */ jal func0f0a2090 +/* f0b7d38: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7d3c: 91e5005c */ lbu $a1,0x5c($t7) /* f0b7d40: 10000033 */ beqz $zero,.L0f0b7e10 /* f0b7d44: 00000000 */ sll $zero,$zero,0x0 @@ -6329,7 +6329,7 @@ glabel func0f0b7c60 /* f0b7d64: 0fc44762 */ jal func0f111d88 /* f0b7d68: 2404000f */ addiu $a0,$zero,0xf /* f0b7d6c: 00002025 */ or $a0,$zero,$zero -/* f0b7d70: 0fc28824 */ jal func0f0a2090 +/* f0b7d70: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7d74: 2405000f */ addiu $a1,$zero,0xf /* f0b7d78: 10000025 */ beqz $zero,.L0f0b7e10 /* f0b7d7c: 00000000 */ sll $zero,$zero,0x0 @@ -6338,7 +6338,7 @@ glabel func0f0b7c60 /* f0b7d84: afa3002c */ sw $v1,0x2c($sp) /* f0b7d88: 8fa3002c */ lw $v1,0x2c($sp) /* f0b7d8c: 00002025 */ or $a0,$zero,$zero -/* f0b7d90: 0fc28824 */ jal func0f0a2090 +/* f0b7d90: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7d94: 9065005c */ lbu $a1,0x5c($v1) /* f0b7d98: 1000001d */ beqz $zero,.L0f0b7e10 /* f0b7d9c: 00000000 */ sll $zero,$zero,0x0 @@ -6354,7 +6354,7 @@ glabel func0f0b7c60 /* f0b7dc0: 0fc44762 */ jal func0f111d88 /* f0b7dc4: 2404000f */ addiu $a0,$zero,0xf /* f0b7dc8: 00002025 */ or $a0,$zero,$zero -/* f0b7dcc: 0fc28824 */ jal func0f0a2090 +/* f0b7dcc: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7dd0: 2405000f */ addiu $a1,$zero,0xf /* f0b7dd4: 1000000e */ beqz $zero,.L0f0b7e10 /* f0b7dd8: 00000000 */ sll $zero,$zero,0x0 @@ -6363,7 +6363,7 @@ glabel func0f0b7c60 /* f0b7de0: afa30028 */ sw $v1,0x28($sp) /* f0b7de4: 8fa30028 */ lw $v1,0x28($sp) /* f0b7de8: 00002025 */ or $a0,$zero,$zero -/* f0b7dec: 0fc28824 */ jal func0f0a2090 +/* f0b7dec: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7df0: 9065005c */ lbu $a1,0x5c($v1) /* f0b7df4: 10000006 */ beqz $zero,.L0f0b7e10 /* f0b7df8: 00000000 */ sll $zero,$zero,0x0 @@ -6371,7 +6371,7 @@ glabel func0f0b7c60 /* f0b7dfc: 0fc44762 */ jal func0f111d88 /* f0b7e00: 24040001 */ addiu $a0,$zero,0x1 /* f0b7e04: 00002025 */ or $a0,$zero,$zero -/* f0b7e08: 0fc28824 */ jal func0f0a2090 +/* f0b7e08: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b7e0c: 24050001 */ addiu $a1,$zero,0x1 .L0f0b7e10: /* f0b7e10: 3c03800a */ lui $v1,%hi(g_Vars) @@ -6592,10 +6592,10 @@ glabel func0f0b802c /* f0b8134: 0fc44762 */ jal func0f111d88 /* f0b8138: 2404005d */ addiu $a0,$zero,0x5d /* f0b813c: 24040001 */ addiu $a0,$zero,0x1 -/* f0b8140: 0fc28824 */ jal func0f0a2090 +/* f0b8140: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b8144: 00002825 */ or $a1,$zero,$zero /* f0b8148: 00002025 */ or $a0,$zero,$zero -/* f0b814c: 0fc28824 */ jal func0f0a2090 +/* f0b814c: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b8150: 24050001 */ addiu $a1,$zero,0x1 /* f0b8154: 8ef8000c */ lw $t8,0xc($s7) /* f0b8158: 5b000018 */ blezl $t8,.L0f0b81bc @@ -6852,10 +6852,10 @@ glabel func0f0b802c /* f0b84f4: 1000001a */ beqz $zero,.L0f0b8560 /* f0b84f8: a1a002ff */ sb $zero,0x2ff($t5) .L0f0b84fc: -/* f0b84fc: 0fc28824 */ jal func0f0a2090 +/* f0b84fc: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b8500: 8e050004 */ lw $a1,0x4($s0) /* f0b8504: 00002025 */ or $a0,$zero,$zero -/* f0b8508: 0fc28824 */ jal func0f0a2090 +/* f0b8508: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b850c: 8e050000 */ lw $a1,0x0($s0) /* f0b8510: 8eee0284 */ lw $t6,0x284($s7) /* f0b8514: 3c188009 */ lui $t8,0x8009 @@ -8386,11 +8386,11 @@ glabel func0f0b9a20 /* f0b9ac4: 00002825 */ or $a1,$zero,$zero /* f0b9ac8: 3c05800a */ lui $a1,0x800a /* f0b9acc: 8ca5ddd4 */ lw $a1,-0x222c($a1) -/* f0b9ad0: 0fc28824 */ jal func0f0a2090 +/* f0b9ad0: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b9ad4: 24040001 */ addiu $a0,$zero,0x1 /* f0b9ad8: 3c05800a */ lui $a1,0x800a /* f0b9adc: 8ca5ddd0 */ lw $a1,-0x2230($a1) -/* f0b9ae0: 0fc28824 */ jal func0f0a2090 +/* f0b9ae0: 0fc28824 */ jal currentPlayerEquipWeapon /* f0b9ae4: 00002025 */ or $a0,$zero,$zero /* f0b9ae8: 8fbf0014 */ lw $ra,0x14($sp) /* f0b9aec: 3c018007 */ lui $at,0x8007 @@ -8424,7 +8424,7 @@ glabel func0f0b9afc /* f0b9b44: 24040001 */ addiu $a0,$zero,0x1 /* f0b9b48: 3c018007 */ lui $at,0x8007 /* f0b9b4c: ac200744 */ sw $zero,0x744($at) -/* f0b9b50: 0fc31f7b */ jal func0f0c7dec +/* f0b9b50: 0fc31f7b */ jal releaseObj /* f0b9b54: 00002025 */ or $a0,$zero,$zero .L0f0b9b58: /* f0b9b58: 8fbf0014 */ lw $ra,0x14($sp) @@ -8435,7 +8435,7 @@ glabel func0f0b9afc ); GLOBAL_ASM( -glabel func0f0b9b68 +glabel warpBondToPad /* f0b9b68: 27bdffe8 */ addiu $sp,$sp,-24 /* f0b9b6c: afbf0014 */ sw $ra,0x14($sp) /* f0b9b70: afa40018 */ sw $a0,0x18($sp) @@ -8443,7 +8443,7 @@ glabel func0f0b9b68 /* f0b9b78: 24040003 */ addiu $a0,$zero,0x3 /* f0b9b7c: 3c018007 */ lui $at,0x8007 /* f0b9b80: ac200744 */ sw $zero,0x744($at) -/* f0b9b84: 0fc31f7b */ jal func0f0c7dec +/* f0b9b84: 0fc31f7b */ jal releaseObj /* f0b9b88: 24040005 */ addiu $a0,$zero,0x5 /* f0b9b8c: 0fc30748 */ jal func0f0c1d20 /* f0b9b90: 00000000 */ sll $zero,$zero,0x0 @@ -8466,7 +8466,7 @@ glabel func0f0b9bac /* f0b9bc4: 24040003 */ addiu $a0,$zero,0x3 /* f0b9bc8: 3c018007 */ lui $at,0x8007 /* f0b9bcc: ac200744 */ sw $zero,0x744($at) -/* f0b9bd0: 0fc31f7b */ jal func0f0c7dec +/* f0b9bd0: 0fc31f7b */ jal releaseObj /* f0b9bd4: 24040005 */ addiu $a0,$zero,0x5 /* f0b9bd8: 0fc30748 */ jal func0f0c1d20 /* f0b9bdc: 00000000 */ sll $zero,$zero,0x0 @@ -8499,7 +8499,7 @@ glabel func0f0b9c1c /* f0b9c38: 24040003 */ addiu $a0,$zero,0x3 /* f0b9c3c: 3c018007 */ lui $at,0x8007 /* f0b9c40: ac200744 */ sw $zero,0x744($at) -/* f0b9c44: 0fc31f7b */ jal func0f0c7dec +/* f0b9c44: 0fc31f7b */ jal releaseObj /* f0b9c48: 24040005 */ addiu $a0,$zero,0x5 /* f0b9c4c: 0fc30748 */ jal func0f0c1d20 /* f0b9c50: 00000000 */ sll $zero,$zero,0x0 @@ -8763,7 +8763,7 @@ glabel func0f0ba010 /* f0ba01c: 24040006 */ addiu $a0,$zero,0x6 /* f0ba020: 3c018007 */ lui $at,0x8007 /* f0ba024: ac200744 */ sw $zero,0x744($at) -/* f0ba028: 0fc31f7b */ jal func0f0c7dec +/* f0ba028: 0fc31f7b */ jal releaseObj /* f0ba02c: 24040005 */ addiu $a0,$zero,0x5 /* f0ba030: 0fc30748 */ jal func0f0c1d20 /* f0ba034: 00000000 */ sll $zero,$zero,0x0 @@ -8810,7 +8810,7 @@ glabel func0f0ba010 ); GLOBAL_ASM( -glabel func0f0ba0d4 +glabel cameraDoAnimation /* f0ba0d4: 3c0e8006 */ lui $t6,0x8006 /* f0ba0d8: 8dce24a4 */ lw $t6,0x24a4($t6) /* f0ba0dc: 27bdffe8 */ addiu $sp,$sp,-24 @@ -10983,7 +10983,7 @@ glabel func0f0bbf78 ); GLOBAL_ASM( -glabel func0f0bc0f0 +glabel currentPlayerSurroundWithExplosions /* f0bc0f0: 3c02800a */ lui $v0,%hi(g_Vars) /* f0bc0f4: 24429fc0 */ addiu $v0,$v0,%lo(g_Vars) /* f0bc0f8: 8c4f0284 */ lw $t7,0x284($v0) diff --git a/src/game/game_0c79f0.c b/src/game/game_0c79f0.c index 05733c239..18692716f 100644 --- a/src/game/game_0c79f0.c +++ b/src/game/game_0c79f0.c @@ -412,7 +412,7 @@ glabel func0f0c7cc4 ); GLOBAL_ASM( -glabel func0f0c7cf0 +glabel currentPlayerGrabProp /* f0c7cf0: 27bdffe8 */ addiu $sp,$sp,-24 /* f0c7cf4: afbf0014 */ sw $ra,0x14($sp) /* f0c7cf8: 8c820004 */ lw $v0,0x4($a0) @@ -452,7 +452,7 @@ void func0f0c7d30(u32 arg) } GLOBAL_ASM( -glabel func0f0c7dec +glabel releaseObj /* f0c7dec: 27bdffd0 */ addiu $sp,$sp,-48 /* f0c7df0: afb00018 */ sw $s0,0x18($sp) /* f0c7df4: 3c10800a */ lui $s0,%hi(g_Vars) diff --git a/src/game/game_0cf150.c b/src/game/game_0cf150.c index a504a0d73..9d2e63c8a 100644 --- a/src/game/game_0cf150.c +++ b/src/game/game_0cf150.c @@ -1609,7 +1609,7 @@ glabel func0f0d0310 /* f0d07e0: 0c004dad */ jal func000136b4 /* f0d07e4: 00403825 */ or $a3,$v0,$zero /* f0d07e8: 27a4006c */ addiu $a0,$sp,0x6c -/* f0d07ec: 0fc377c7 */ jal func0f0ddf1c +/* f0d07ec: 0fc377c7 */ jal currentPlayerQueueMessage /* f0d07f0: 00002825 */ or $a1,$zero,$zero /* f0d07f4: 10000033 */ beqz $zero,.L0f0d08c4 /* f0d07f8: afa000a0 */ sw $zero,0xa0($sp) diff --git a/src/game/game_0dcdb0.c b/src/game/game_0dcdb0.c index b759b2f75..be74ecf34 100644 --- a/src/game/game_0dcdb0.c +++ b/src/game/game_0dcdb0.c @@ -5534,7 +5534,7 @@ glabel func0f0ddeac ); GLOBAL_ASM( -glabel func0f0ddf1c +glabel currentPlayerQueueMessage /* f0ddf1c: 3c0f8007 */ lui $t7,%hi(var80070ff0) /* f0ddf20: 25ef0ff0 */ addiu $t7,$t7,%lo(var80070ff0) /* f0ddf24: 00057140 */ sll $t6,$a1,0x5 @@ -7373,7 +7373,7 @@ glabel func0f0df364 /* f0df8d8: 03195021 */ addu $t2,$t8,$t9 /* f0df8dc: 0480000f */ bltz $a0,.L0f0df91c /* f0df8e0: a60a0006 */ sh $t2,0x6($s0) -/* f0df8e4: 0fc250ef */ jal func0f0943bc +/* f0df8e4: 0fc250ef */ jal audioIfChannelIdle /* f0df8e8: afa0004c */ sw $zero,0x4c($sp) /* f0df8ec: 10400003 */ beqz $v0,.L0f0df8fc /* f0df8f0: 8fa3004c */ lw $v1,0x4c($sp) @@ -18496,7 +18496,7 @@ glabel func0f0e98ac /* f0e9ba4: 27a500c4 */ addiu $a1,$sp,0xc4 /* f0e9ba8: 11a00141 */ beqz $t5,.L0f0ea0b0 /* f0e9bac: 3c078008 */ lui $a3,0x8008 -/* f0e9bb0: 0fc255a1 */ jal func0f095684 +/* f0e9bb0: 0fc255a1 */ jal objectiveGetStatus /* f0e9bb4: 8fa40138 */ lw $a0,0x138($sp) /* f0e9bb8: 10400007 */ beqz $v0,.L0f0e9bd8 /* f0e9bbc: 24010001 */ addiu $at,$zero,0x1 diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 34d487b1f..8d610c188 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -14040,7 +14040,7 @@ glabel func0f0fc9f4 /* f0fca3c: 8c58048c */ lw $t8,0x48c($v0) /* f0fca40: 17000005 */ bnez $t8,.L0f0fca58 /* f0fca44: 00000000 */ sll $zero,$zero,0x0 -/* f0fca48: 0fc256d9 */ jal func0f095b64 +/* f0fca48: 0fc256d9 */ jal objectiveIsAllComplete /* f0fca4c: afa4001c */ sw $a0,0x1c($sp) /* f0fca50: 14400003 */ bnez $v0,.L0f0fca60 /* f0fca54: 8fa4001c */ lw $a0,0x1c($sp) @@ -14074,7 +14074,7 @@ glabel func0f0fc9f4 /* f0fcab4: 8d8d048c */ lw $t5,0x48c($t4) /* f0fcab8: 15a00005 */ bnez $t5,.L0f0fcad0 /* f0fcabc: 00000000 */ sll $zero,$zero,0x0 -/* f0fcac0: 0fc256d9 */ jal func0f095b64 +/* f0fcac0: 0fc256d9 */ jal objectiveIsAllComplete /* f0fcac4: afa4001c */ sw $a0,0x1c($sp) /* f0fcac8: 14400003 */ bnez $v0,.L0f0fcad8 /* f0fcacc: 8fa4001c */ lw $a0,0x1c($sp) @@ -14095,7 +14095,7 @@ glabel func0f0fc9f4 /* f0fcafc: 8c58048c */ lw $t8,0x48c($v0) /* f0fcb00: 17000005 */ bnez $t8,.L0f0fcb18 /* f0fcb04: 00000000 */ sll $zero,$zero,0x0 -/* f0fcb08: 0fc256d9 */ jal func0f095b64 +/* f0fcb08: 0fc256d9 */ jal objectiveIsAllComplete /* f0fcb0c: afa4001c */ sw $a0,0x1c($sp) /* f0fcb10: 14400003 */ bnez $v0,.L0f0fcb20 /* f0fcb14: 8fa4001c */ lw $a0,0x1c($sp) @@ -15615,7 +15615,7 @@ glabel func0f0fdf14 /* f0fdfa8: 00408025 */ or $s0,$v0,$zero /* f0fdfac: 10400010 */ beqz $v0,.L0f0fdff0 /* f0fdfb0: 24110001 */ addiu $s1,$zero,0x1 -/* f0fdfb4: 0fc2c62f */ jal func0f0b18bc +/* f0fdfb4: 0fc2c62f */ jal currentPlayerHasWeaponEquipped /* f0fdfb8: 00402025 */ or $a0,$v0,$zero /* f0fdfbc: 2401ffff */ addiu $at,$zero,-1 /* f0fdfc0: 1041000b */ beq $v0,$at,.L0f0fdff0 @@ -15663,14 +15663,14 @@ glabel func0f0fdf14 /* f0fe05c: 00002025 */ or $a0,$zero,$zero /* f0fe060: 10500003 */ beq $v0,$s0,.L0f0fe070 /* f0fe064: 00002025 */ or $a0,$zero,$zero -/* f0fe068: 0fc28824 */ jal func0f0a2090 +/* f0fe068: 0fc28824 */ jal currentPlayerEquipWeapon /* f0fe06c: 02002825 */ or $a1,$s0,$zero .L0f0fe070: /* f0fe070: 0fc2866a */ jal getCurrentPlayerWeaponId /* f0fe074: 24040001 */ addiu $a0,$zero,0x1 /* f0fe078: 1050007c */ beq $v0,$s0,.L0f0fe26c /* f0fe07c: 24040001 */ addiu $a0,$zero,0x1 -/* f0fe080: 0fc28824 */ jal func0f0a2090 +/* f0fe080: 0fc28824 */ jal currentPlayerEquipWeapon /* f0fe084: 02002825 */ or $a1,$s0,$zero /* f0fe088: 10000079 */ beqz $zero,.L0f0fe270 /* f0fe08c: 8fbf001c */ lw $ra,0x1c($sp) @@ -15679,14 +15679,14 @@ glabel func0f0fdf14 /* f0fe094: 00002025 */ or $a0,$zero,$zero /* f0fe098: 10500003 */ beq $v0,$s0,.L0f0fe0a8 /* f0fe09c: 00002025 */ or $a0,$zero,$zero -/* f0fe0a0: 0fc28824 */ jal func0f0a2090 +/* f0fe0a0: 0fc28824 */ jal currentPlayerEquipWeapon /* f0fe0a4: 02002825 */ or $a1,$s0,$zero .L0f0fe0a8: /* f0fe0a8: 0fc2866a */ jal getCurrentPlayerWeaponId /* f0fe0ac: 24040001 */ addiu $a0,$zero,0x1 /* f0fe0b0: 1040006e */ beqz $v0,.L0f0fe26c /* f0fe0b4: 24040001 */ addiu $a0,$zero,0x1 -/* f0fe0b8: 0fc28824 */ jal func0f0a2090 +/* f0fe0b8: 0fc28824 */ jal currentPlayerEquipWeapon /* f0fe0bc: 00002825 */ or $a1,$zero,$zero /* f0fe0c0: 1000006b */ beqz $zero,.L0f0fe270 /* f0fe0c4: 8fbf001c */ lw $ra,0x1c($sp) @@ -15985,7 +15985,7 @@ glabel func0f0fe280 /* f0fe4ec: 008a2021 */ addu $a0,$a0,$t2 /* f0fe4f0: 0fc44b11 */ jal func0f112c44 /* f0fe4f4: 908420f0 */ lbu $a0,0x20f0($a0) -/* f0fe4f8: 0fc2c62f */ jal func0f0b18bc +/* f0fe4f8: 0fc2c62f */ jal currentPlayerHasWeaponEquipped /* f0fe4fc: 00402025 */ or $a0,$v0,$zero /* f0fe500: 24010001 */ addiu $at,$zero,0x1 /* f0fe504: 14410005 */ bne $v0,$at,.L0f0fe51c diff --git a/src/game/game_102240.c b/src/game/game_102240.c index 0e01c93bb..0f6000413 100644 --- a/src/game/game_102240.c +++ b/src/game/game_102240.c @@ -4828,7 +4828,7 @@ glabel menuhandler00106178 /* f1061e4: afa2001c */ sw $v0,0x1c($sp) /* f1061e8: 10400014 */ beqz $v0,.L0f10623c /* f1061ec: afa80018 */ sw $t0,0x18($sp) -/* f1061f0: 0fc2c62f */ jal func0f0b18bc +/* f1061f0: 0fc2c62f */ jal currentPlayerHasWeaponEquipped /* f1061f4: 00402025 */ or $a0,$v0,$zero /* f1061f8: 2401ffff */ addiu $at,$zero,-1 /* f1061fc: 50410010 */ beql $v0,$at,.L0f106240 @@ -4862,18 +4862,18 @@ glabel menuhandler00106178 /* f106260: 10400009 */ beqz $v0,.L0f106288 /* f106264: 00002025 */ or $a0,$zero,$zero /* f106268: 00002025 */ or $a0,$zero,$zero -/* f10626c: 0fc28824 */ jal func0f0a2090 +/* f10626c: 0fc28824 */ jal currentPlayerEquipWeapon /* f106270: 8fa5001c */ lw $a1,0x1c($sp) /* f106274: 24040001 */ addiu $a0,$zero,0x1 -/* f106278: 0fc28824 */ jal func0f0a2090 +/* f106278: 0fc28824 */ jal currentPlayerEquipWeapon /* f10627c: 8fa5001c */ lw $a1,0x1c($sp) /* f106280: 10000007 */ beqz $zero,.L0f1062a0 /* f106284: 8fad0028 */ lw $t5,0x28($sp) .L0f106288: -/* f106288: 0fc28824 */ jal func0f0a2090 +/* f106288: 0fc28824 */ jal currentPlayerEquipWeapon /* f10628c: 8fa5001c */ lw $a1,0x1c($sp) /* f106290: 24040001 */ addiu $a0,$zero,0x1 -/* f106294: 0fc28824 */ jal func0f0a2090 +/* f106294: 0fc28824 */ jal currentPlayerEquipWeapon /* f106298: 00002825 */ or $a1,$zero,$zero /* f10629c: 8fad0028 */ lw $t5,0x28($sp) .L0f1062a0: @@ -4891,7 +4891,7 @@ glabel menuhandler00106178 /* f1062cc: 8f040000 */ lw $a0,0x0($t8) /* f1062d0: 1040002b */ beqz $v0,.L0f106380 /* f1062d4: 00402025 */ or $a0,$v0,$zero -/* f1062d8: 0fc2c62f */ jal func0f0b18bc +/* f1062d8: 0fc2c62f */ jal currentPlayerHasWeaponEquipped /* f1062dc: 00000000 */ sll $zero,$zero,0x0 /* f1062e0: 2401ffff */ addiu $at,$zero,-1 /* f1062e4: 10410026 */ beq $v0,$at,.L0f106380 @@ -5021,7 +5021,7 @@ glabel menudialog001063e4 /* f106484: 5600fff4 */ bnezl $s0,.L0f106458 /* f106488: 8e020004 */ lw $v0,0x4($s0) .L0f10648c: -/* f10648c: 0fc2557d */ jal func0f0955f4 +/* f10648c: 0fc2557d */ jal objectiveGetCount /* f106490: 00008025 */ or $s0,$zero,$zero /* f106494: 18400014 */ blez $v0,.L0f1064e8 /* f106498: 0010c880 */ sll $t9,$s0,0x2 @@ -5036,12 +5036,12 @@ glabel menudialog001063e4 /* f1064b8: 26100001 */ addiu $s0,$s0,0x1 /* f1064bc: 8c4a0008 */ lw $t2,0x8($v0) /* f1064c0: 02002025 */ or $a0,$s0,$zero -/* f1064c4: 0fc25594 */ jal func0f095650 +/* f1064c4: 0fc25594 */ jal objectiveGetDifficultyBits /* f1064c8: a62a0002 */ sh $t2,0x2($s1) /* f1064cc: a622000e */ sh $v0,0xe($s1) /* f1064d0: 26100001 */ addiu $s0,$s0,0x1 .L0f1064d4: -/* f1064d4: 0fc2557d */ jal func0f0955f4 +/* f1064d4: 0fc2557d */ jal objectiveGetCount /* f1064d8: 26520004 */ addiu $s2,$s2,0x4 /* f1064dc: 0202082a */ slt $at,$s0,$v0 /* f1064e0: 5420fff2 */ bnezl $at,.L0f1064ac diff --git a/src/game/game_10ccd0.c b/src/game/game_10ccd0.c index 297cd5697..5dd61a58e 100644 --- a/src/game/game_10ccd0.c +++ b/src/game/game_10ccd0.c @@ -644,7 +644,7 @@ glabel func0f10d2e0 /* f10d474: 10000014 */ beqz $zero,.L0f10d4c8 /* f10d478: 8fbf0014 */ lw $ra,0x14($sp) .L0f10d47c: -/* f10d47c: 0fc256d9 */ jal func0f095b64 +/* f10d47c: 0fc256d9 */ jal objectiveIsAllComplete /* f10d480: 00000000 */ sll $zero,$zero,0x0 /* f10d484: 14400005 */ bnez $v0,.L0f10d49c /* f10d488: 3c0d8008 */ lui $t5,0x8008 @@ -2024,7 +2024,7 @@ glabel func0f10e620 /* f10e778: 8c59048c */ lw $t9,0x48c($v0) /* f10e77c: 17200005 */ bnez $t9,.L0f10e794 /* f10e780: 00000000 */ sll $zero,$zero,0x0 -/* f10e784: 0fc256d9 */ jal func0f095b64 +/* f10e784: 0fc256d9 */ jal objectiveIsAllComplete /* f10e788: 00000000 */ sll $zero,$zero,0x0 /* f10e78c: 1440000a */ bnez $v0,.L0f10e7b8 /* f10e790: 3c048007 */ lui $a0,%hi(menudialog_1bb44) @@ -2176,7 +2176,7 @@ glabel func0f10e620 /* f10e9b8: 8c4f048c */ lw $t7,0x48c($v0) /* f10e9bc: 15e000a9 */ bnez $t7,.L0f10ec64 /* f10e9c0: 00000000 */ sll $zero,$zero,0x0 -/* f10e9c4: 0fc256d9 */ jal func0f095b64 +/* f10e9c4: 0fc256d9 */ jal objectiveIsAllComplete /* f10e9c8: 00000000 */ sll $zero,$zero,0x0 /* f10e9cc: 104000a5 */ beqz $v0,.L0f10ec64 /* f10e9d0: 00000000 */ sll $zero,$zero,0x0 @@ -2432,7 +2432,7 @@ glabel func0f10ecb4 /* f10ed64: 8f19048c */ lw $t9,0x48c($t8) /* f10ed68: 17200005 */ bnez $t9,.L0f10ed80 /* f10ed6c: 00000000 */ sll $zero,$zero,0x0 -/* f10ed70: 0fc256d9 */ jal func0f095b64 +/* f10ed70: 0fc256d9 */ jal objectiveIsAllComplete /* f10ed74: 00000000 */ sll $zero,$zero,0x0 /* f10ed78: 14400011 */ bnez $v0,.L0f10edc0 /* f10ed7c: 00000000 */ sll $zero,$zero,0x0 @@ -2528,7 +2528,7 @@ glabel func0f10ee40 /* f10eeb4: 8d6c048c */ lw $t4,0x48c($t3) /* f10eeb8: 15800005 */ bnez $t4,.L0f10eed0 /* f10eebc: 00000000 */ sll $zero,$zero,0x0 -/* f10eec0: 0fc256d9 */ jal func0f095b64 +/* f10eec0: 0fc256d9 */ jal objectiveIsAllComplete /* f10eec4: 00000000 */ sll $zero,$zero,0x0 /* f10eec8: 14400009 */ bnez $v0,.L0f10eef0 /* f10eecc: 00000000 */ sll $zero,$zero,0x0 @@ -2600,7 +2600,7 @@ glabel func0f10ef10 /* f10efb8: 8c98048c */ lw $t8,0x48c($a0) /* f10efbc: 17000005 */ bnez $t8,.L0f10efd4 /* f10efc0: 00000000 */ sll $zero,$zero,0x0 -/* f10efc4: 0fc256d9 */ jal func0f095b64 +/* f10efc4: 0fc256d9 */ jal objectiveIsAllComplete /* f10efc8: 00000000 */ sll $zero,$zero,0x0 /* f10efcc: 14400011 */ bnez $v0,.L0f10f014 /* f10efd0: 00000000 */ sll $zero,$zero,0x0 @@ -2657,7 +2657,7 @@ glabel func0f10ef10 /* f10f084: 8c8a048c */ lw $t2,0x48c($a0) /* f10f088: 15400005 */ bnez $t2,.L0f10f0a0 /* f10f08c: 00000000 */ sll $zero,$zero,0x0 -/* f10f090: 0fc256d9 */ jal func0f095b64 +/* f10f090: 0fc256d9 */ jal objectiveIsAllComplete /* f10f094: 00000000 */ sll $zero,$zero,0x0 /* f10f098: 14400011 */ bnez $v0,.L0f10f0e0 /* f10f09c: 00000000 */ sll $zero,$zero,0x0 diff --git a/src/game/game_111600.c b/src/game/game_111600.c index 3cd9536ac..71c234988 100644 --- a/src/game/game_111600.c +++ b/src/game/game_111600.c @@ -296,7 +296,7 @@ glabel func0f111980 /* f11199c: 8defa244 */ lw $t7,-0x5dbc($t7) /* f1119a0: 0fc44b11 */ jal func0f112c44 /* f1119a4: 8de41874 */ lw $a0,0x1874($t7) -/* f1119a8: 0fc2865b */ jal func0f0a196c +/* f1119a8: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f1119ac: 00402025 */ or $a0,$v0,$zero /* f1119b0: 8fbf0014 */ lw $ra,0x14($sp) /* f1119b4: 27bd0018 */ addiu $sp,$sp,0x18 @@ -1458,7 +1458,7 @@ glabel func0f112884 ); GLOBAL_ASM( -glabel func0f1128cc +glabel currentPlayerHasProp /* f1128cc: 3c03800a */ lui $v1,0x800a /* f1128d0: 8c63a244 */ lw $v1,-0x5dbc($v1) /* f1128d4: 24060002 */ addiu $a2,$zero,0x2 diff --git a/src/game/game_129900.c b/src/game/game_129900.c index 5ecd87af0..ef0f9708d 100644 --- a/src/game/game_129900.c +++ b/src/game/game_129900.c @@ -2934,7 +2934,7 @@ glabel func0f12b0e0 /* f12b77c: 10000102 */ beqz $zero,.L0f12bb88 /* f12b780: 86820002 */ lh $v0,0x2($s4) .L0f12b784: -/* f12b784: 0fc21a6a */ jal func0f0869a8 +/* f12b784: 0fc21a6a */ jal objIsHealthy /* f12b788: 02202025 */ or $a0,$s1,$zero /* f12b78c: 104000fd */ beqz $v0,.L0f12bb84 /* f12b790: 3c017f1b */ lui $at,%hi(var7f1b5598) @@ -10873,7 +10873,7 @@ glabel func0f1321d0 ); GLOBAL_ASM( -glabel func0f1329bc +glabel rainConfigure /* f1329bc: 3c028008 */ lui $v0,0x8008 /* f1329c0: 8c42f0c0 */ lw $v0,-0xf40($v0) /* f1329c4: 27bdffe8 */ addiu $sp,$sp,-24 @@ -10890,7 +10890,7 @@ glabel func0f1329bc ); GLOBAL_ASM( -glabel func0f1329ec +glabel snowConfigure /* f1329ec: 3c028008 */ lui $v0,0x8008 /* f1329f0: 8c42f0c0 */ lw $v0,-0xf40($v0) /* f1329f4: 27bdffe8 */ addiu $sp,$sp,-24 diff --git a/src/game/game_1668e0.c b/src/game/game_1668e0.c index bb29de6e8..48c7b0911 100644 --- a/src/game/game_1668e0.c +++ b/src/game/game_1668e0.c @@ -6700,7 +6700,7 @@ glabel func0f16b96c /* f16c4b0: 0fc5b9f1 */ jal textGet /* f16c4b4: 24045844 */ addiu $a0,$zero,0x5844 /* f16c4b8: 00402025 */ or $a0,$v0,$zero -/* f16c4bc: 0fc377c7 */ jal func0f0ddf1c +/* f16c4bc: 0fc377c7 */ jal currentPlayerQueueMessage /* f16c4c0: 00002825 */ or $a1,$zero,$zero /* f16c4c4: 8e99006c */ lw $t9,0x6c($s4) /* f16c4c8: 26100001 */ addiu $s0,$s0,0x1 @@ -7342,7 +7342,7 @@ glabel func0f16cde0 ); GLOBAL_ASM( -glabel func0f16cdec +glabel getUptime /* f16cdec: 3c018008 */ lui $at,0x8008 /* f16cdf0: 03e00008 */ jr $ra /* f16cdf4: c420403c */ lwc1 $f0,0x403c($at) diff --git a/src/game/game_16cfa0.c b/src/game/game_16cfa0.c index 57b4bdec7..f2d40c260 100644 --- a/src/game/game_16cfa0.c +++ b/src/game/game_16cfa0.c @@ -583,7 +583,7 @@ glabel func0f16d548 /* f16d61c: 3c04800b */ lui $a0,0x800b /* f16d620: 0fc5db36 */ jal func0f176cd8 /* f16d624: 8c84a5d0 */ lw $a0,-0x5a30($a0) -/* f16d628: 0fc5b7f4 */ jal func0f16dfd0 +/* f16d628: 0fc5b7f4 */ jal audioSetAuxTrack /* f16d62c: 00402025 */ or $a0,$v0,$zero /* f16d630: 10000020 */ beqz $zero,.L0f16d6b4 /* f16d634: 8fbf0014 */ lw $ra,0x14($sp) @@ -1021,7 +1021,7 @@ glabel func0f16dba4 /* f16dbc0: 24040003 */ addiu $a0,$zero,0x3 /* f16dbc4: 0fc5b490 */ jal func0f16d240 /* f16dbc8: 24040004 */ addiu $a0,$zero,0x4 -/* f16dbcc: 0fc5b82d */ jal func0f16e0b4 +/* f16dbcc: 0fc5b82d */ jal audioStopTrack /* f16dbd0: 2404ffff */ addiu $a0,$zero,-1 /* f16dbd4: 0fc5b490 */ jal func0f16d240 /* f16dbd8: 24040002 */ addiu $a0,$zero,0x2 @@ -1192,7 +1192,7 @@ glabel func0f16ddb0 ); GLOBAL_ASM( -glabel func0f16de0c +glabel audioPlayTrack /* f16de0c: 27bdffe8 */ addiu $sp,$sp,-24 /* f16de10: afbf0014 */ sw $ra,0x14($sp) /* f16de14: 0fc5b50c */ jal func0f16d430 @@ -1201,7 +1201,7 @@ glabel func0f16de0c /* f16de20: 24040003 */ addiu $a0,$zero,0x3 /* f16de24: 0fc5b490 */ jal func0f16d240 /* f16de28: 24040004 */ addiu $a0,$zero,0x4 -/* f16de2c: 0fc5b82d */ jal func0f16e0b4 +/* f16de2c: 0fc5b82d */ jal audioStopTrack /* f16de30: 2404ffff */ addiu $a0,$zero,-1 /* f16de34: 0fc5b490 */ jal func0f16d240 /* f16de38: 24040002 */ addiu $a0,$zero,0x2 @@ -1225,7 +1225,7 @@ glabel func0f16de0c ); GLOBAL_ASM( -glabel func0f16de80 +glabel audioRestartTrack /* f16de80: 27bdffe8 */ addiu $sp,$sp,-24 /* f16de84: afbf0014 */ sw $ra,0x14($sp) /* f16de88: 0fc5b490 */ jal func0f16d240 @@ -1263,7 +1263,7 @@ glabel func0f16deb8 ); GLOBAL_ASM( -glabel func0f16def8 +glabel audioSetTrack /* f16def8: 27bdffe8 */ addiu $sp,$sp,-24 /* f16defc: afbf0014 */ sw $ra,0x14($sp) /* f16df00: afa40018 */ sw $a0,0x18($sp) @@ -1271,7 +1271,7 @@ glabel func0f16def8 /* f16df08: 24040003 */ addiu $a0,$zero,0x3 /* f16df0c: 0fc5b490 */ jal func0f16d240 /* f16df10: 24040004 */ addiu $a0,$zero,0x4 -/* f16df14: 0fc5b82d */ jal func0f16e0b4 +/* f16df14: 0fc5b82d */ jal audioStopTrack /* f16df18: 2404ffff */ addiu $a0,$zero,-1 /* f16df1c: 0fc5b490 */ jal func0f16d240 /* f16df20: 24040002 */ addiu $a0,$zero,0x2 @@ -1303,7 +1303,7 @@ glabel func0f16def8 ); GLOBAL_ASM( -glabel func0f16df84 +glabel audioRestartDefaultTrack /* f16df84: 3c0e8006 */ lui $t6,0x8006 /* f16df88: 8dce24a4 */ lw $t6,0x24a4($t6) /* f16df8c: 27bdffe8 */ addiu $sp,$sp,-24 @@ -1327,7 +1327,7 @@ glabel func0f16df84 ); GLOBAL_ASM( -glabel func0f16dfd0 +glabel audioSetAuxTrack /* f16dfd0: 27bdffe8 */ addiu $sp,$sp,-24 /* f16dfd4: 3c018008 */ lui $at,0x8008 /* f16dfd8: afbf0014 */ sw $ra,0x14($sp) @@ -1356,7 +1356,7 @@ glabel func0f16dfd0 ); GLOBAL_ASM( -glabel func0f16e02c +glabel audioRestartAuxTrack /* f16e02c: 27bdffe8 */ addiu $sp,$sp,-24 /* f16e030: afbf0014 */ sw $ra,0x14($sp) /* f16e034: 240effff */ addiu $t6,$zero,-1 @@ -1371,7 +1371,7 @@ glabel func0f16e02c ); GLOBAL_ASM( -glabel func0f16e058 +glabel audioPlayXTrack /* f16e058: 3c0e800b */ lui $t6,%hi(var800aaa68) /* f16e05c: 25ceaa68 */ addiu $t6,$t6,%lo(var800aaa68) /* f16e060: 00041080 */ sll $v0,$a0,0x2 @@ -1399,7 +1399,7 @@ glabel func0f16e058 ); GLOBAL_ASM( -glabel func0f16e0b4 +glabel audioStopTrack /* f16e0b4: 27bdffe8 */ addiu $sp,$sp,-24 /* f16e0b8: 04800006 */ bltz $a0,.L0f16e0d4 /* f16e0bc: afbf0014 */ sw $ra,0x14($sp) diff --git a/src/game/game_19c990.c b/src/game/game_19c990.c index 7c2da57ec..6b7ab7c82 100644 --- a/src/game/game_19c990.c +++ b/src/game/game_19c990.c @@ -2037,7 +2037,7 @@ glabel func0f19df58 /* f19e008: 0fc677c6 */ jal func0f19df18 /* f19e00c: 90c40001 */ lbu $a0,0x1($a2) /* f19e010: 00402025 */ or $a0,$v0,$zero -/* f19e014: 0fc377c7 */ jal func0f0ddf1c +/* f19e014: 0fc377c7 */ jal currentPlayerQueueMessage /* f19e018: 2405000a */ addiu $a1,$zero,0xa /* f19e01c: 3c07800b */ lui $a3,%hi(var800acd20) /* f19e020: 24e7cd20 */ addiu $a3,$a3,%lo(var800acd20) @@ -2536,7 +2536,7 @@ glabel func0f19e6fc /* f19e730: 8c4f0074 */ lw $t7,0x74($v0) /* f19e734: 24050002 */ addiu $a1,$zero,0x2 /* f19e738: 35f80040 */ ori $t8,$t7,0x40 -/* f19e73c: 0fc23922 */ jal func0f08e488 +/* f19e73c: 0fc23922 */ jal doorActivate /* f19e740: ac580074 */ sw $t8,0x74($v0) .L0f19e744: /* f19e744: 8fbf0014 */ lw $ra,0x14($sp) @@ -3894,7 +3894,7 @@ glabel func0f19f994 /* f19fa08: 00000000 */ sll $zero,$zero,0x0 /* f19fa0c: 0fc6749a */ jal func0f19d268 /* f19fa10: 96a40456 */ lhu $a0,0x456($s5) -/* f19fa14: 0fc2865b */ jal func0f0a196c +/* f19fa14: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene /* f19fa18: 00402025 */ or $a0,$v0,$zero .L0f19fa1c: /* f19fa1c: 3c15800b */ lui $s5,%hi(var800acd20) diff --git a/src/game/game_1a3340.c b/src/game/game_1a3340.c index 5c7aae63d..922cb2670 100644 --- a/src/game/game_1a3340.c +++ b/src/game/game_1a3340.c @@ -182,7 +182,7 @@ glabel menuhandler001a3340 /* f1a33d4: 8fa50018 */ lw $a1,0x18($sp) /* f1a33d8: 10450004 */ beq $v0,$a1,.L0f1a33ec /* f1a33dc: 00000000 */ sll $zero,$zero,0x0 -/* f1a33e0: 0fc28824 */ jal func0f0a2090 +/* f1a33e0: 0fc28824 */ jal currentPlayerEquipWeapon /* f1a33e4: 00002025 */ or $a0,$zero,$zero /* f1a33e8: 8fa50018 */ lw $a1,0x18($sp) .L0f1a33ec: diff --git a/src/include/commands.h b/src/include/commands.h index 8afea6504..e06675fc7 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -15,20 +15,20 @@ #define yield \ mkshort(0x0003), -#define endfunction \ +#define endlist \ mkshort(0x0004), -#define set_function(chr, function) \ +#define set_ailist(chr, function) \ mkshort(0x0005), \ chr, \ mkshort(function), -#define set_return_function(chr, function) \ +#define set_returnlist(chr, function) \ mkshort(0x0006), \ chr, \ mkshort(function), -#define set_onshot_function(function) \ +#define set_shotlist(function) \ mkshort(0x0007), \ mkshort(function), @@ -41,9 +41,9 @@ #define kneel \ mkshort(0x000a), -#define animation(animation, startframe, endframe, flags, transition, chr, animspeed) \ +#define chr_do_animation(chr_do_animation, startframe, endframe, flags, transition, chr, animspeed) \ mkshort(0x000b), \ - mkshort(animation), \ + mkshort(chr_do_animation), \ mkshort(startframe), \ mkshort(endframe), \ flags, \ @@ -55,10 +55,10 @@ mkshort(0x000c), \ label, -#define cmd000d \ +#define be_surprised_000d \ mkshort(0x000d), -#define cmd000e \ +#define be_surprised_000e \ mkshort(0x000e), #define try_jump_sideways(label) \ @@ -179,9 +179,9 @@ mkshort(0x0026), \ chr, -#define cmd0027(u1, label) \ +#define cmd0027(pad, label) \ mkshort(0x0027), \ - mkshort(u1), \ + mkshort(pad), \ label, #define activate_alarm \ @@ -359,9 +359,9 @@ label, // Used by CIA guards in chicago -#define cmd0049(u1, label) \ +#define cmd0049(pad, label) \ mkshort(0x0049), \ - mkshort(u1), \ + mkshort(pad), \ label, #define if_chr_in_view(label) \ @@ -995,7 +995,7 @@ mkshort(value), \ label, -#define try_spawn_chr(body, head, pad, function, props, label) \ +#define try_spawn_chr_at_pad(body, head, pad, function, props, label) \ mkshort(0x00c6), \ body, \ head, \ @@ -1004,7 +1004,7 @@ mkword(props), \ label, -#define try_spawn_clone(body, head, u1, function, props, label) \ +#define try_spawn_chr_at_chr(body, head, u1, function, props, label) \ mkshort(0x00c7), \ body, \ head, \ @@ -1282,7 +1282,7 @@ #define kill_bond \ mkshort(0x00fe), -#define cmd00ff \ +#define be_surprised_00ff \ mkshort(0x00ff), #define cmd0100_noop(u1) \ @@ -1592,7 +1592,7 @@ u1, \ u2, -#define if_any_chr_doing_action(action, label) \ +#define if_chr_in_squadron_doing_action(action, label) \ mkshort(0x0137), \ action, \ label, diff --git a/src/include/constants.h b/src/include/constants.h index 817b5629d..1e7722fb3 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -149,7 +149,7 @@ #define CHRFLAG1_00000004 0x00000004 // Globals - If set, avoids cmd0184 #define CHRFLAG1_00000008 0x00000008 // Only used in WAR. If set, chr waits 2 seconds before attacking while defending #define CHRFLAG1_00000010 0x00000010 // Globals - If set, avoids cmd0184 -#define CHRFLAG1_00000020 0x00000020 // Globals, AF1, Defense - related to reload animation +#define CHRFLAG1_00000020 0x00000020 // Globals, AF1, Defense - related to reload chr_do_animation #define CHRFLAG1_CAN_SNIPE 0x00000040 #define CHRFLAG1_00000080 0x00000080 // Not used in scripts #define CHRFLAG1_DOINGIDLEANIMATION 0x00000100 @@ -219,7 +219,7 @@ #define CHRCFLAG_INVINCIBLE_TO_GUNFIRE 0x00000010 #define CHRCFLAG_00000020 0x00000020 // Chicago, Infiltration, AF1, Ruins, WAR #define CHRCFLAG_00000040 0x00000040 // Used quite a lot -#define CHRCFLAG_00000080 0x00000080 // Defection programmer, Rescue lab techs, globals when doing idle animation +#define CHRCFLAG_00000080 0x00000080 // Defection programmer, Rescue lab techs, globals when doing idle chr_do_animation #define CHRCFLAG_JUST_INJURED 0x00000100 #define CHRCFLAG_00000200 0x00000200 // Set on clones #define CHRCFLAG_HIDDEN 0x00000400 diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 822218653..5b13aff26 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -37,7 +37,7 @@ f32 coordGetSquaredDistanceToCoord(struct coord *a, struct coord *b); void decrementByte(u8 *dst, u8 amount); u32 func0f01e050(void); u32 func0f01e250(void); -u32 func0f01e4dc(struct chrdata *chr, u32 arg1); +u32 chrSetChrnum(struct chrdata *chr, u32 arg1); u32 func0f01e5d8(void); u32 func0f01e6a4(void); u32 func0f01e7bc(void); @@ -265,10 +265,10 @@ bool func0f03af44(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendfra u32 func0f03afac(struct chrdata *chr); u32 func0f03b1e0(struct chrdata *chr); bool func0f03b5f0(struct chrdata *chr, s32 pad_id); -u32 func0f03b684(struct chrdata *chr, u32 thingtype, u32 thingid); +u32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 thingtype, u32 thingid); u32 func0f03b97c(struct chrdata *chr, u32 arg1, u32 arg2); u32 func0f03ba44(void); -u32 func0f03bbc8(struct chrdata *chr, u32 arg1); +u32 chrTryPunchOrKick(struct chrdata *chr, u32 arg1); u32 func0f03c044(void); u32 func0f03c138(void); void func0f03c8b4(struct chrdata *chr); @@ -343,7 +343,7 @@ s32 func0f046a30(struct chrdata *chr); u32 func0f046a60(void); u32 func0f046a8c(void); u32 func0f0473cc(void); -bool func0f04767c(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4); +bool skedarTryPounce(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4); bool func0f047700(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4); u32 func0f047934(void); u32 func0f047c80(void); @@ -381,7 +381,7 @@ bool func0f04a848(u8 chrnum, struct chrdata *chr, f32 distance, struct coord *co bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype); void chrSetChrPresetByChrnum(struct chrdata *chr, s32 chrnum, s32 chrpreset); void chrSetPadPresetByChrnum(struct chrdata *chr, s32 chrnum, s32 pad_id); -u32 func0f04ad08(struct chrdata *chr); +u32 chrIsInLoadedRoom(struct chrdata *chr); u32 func0f04aeb0(void); u32 func0f04af84(void); bool chrSpawnAtCoord(s32 body, s32 head, struct coord *coord, s16 *room, f32 arg4, u8 *ailist, u32 flags); diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index abe8f0a24..4a809ef76 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -10,14 +10,14 @@ /*0x0004*/ bool aiEndList(void); /*0x0005*/ bool aiSetList(void); /*0x0006*/ bool aiSetReturnList(void); -/*0x0007*/ bool ai0007(void); +/*0x0007*/ bool aiSetShotList(void); /*0x0008*/ bool aiReturn(void); /*0x0009*/ bool aiStop(void); /*0x000a*/ bool aiKneel(void); -/*0x000b*/ bool ai000b(void); +/*0x000b*/ bool aiChrDoAnimation(void); /*0x000c*/ bool aiIfIdle(void); -/*0x000d*/ bool ai000d(void); -/*0x000e*/ bool ai000e(void); +/*0x000d*/ bool aiBeSurprised000d(void); +/*0x000e*/ bool aiBeSurprised000e(void); /*0x000f*/ bool aiStepSideways(void); /*0x0010*/ bool aiHopSideways(void); /*0x0011*/ bool aiRunSideways(void); @@ -200,8 +200,8 @@ /*0x00c3*/ bool aiIfCountdownTimerStopped(void); /*0x00c4*/ bool aiIfCountdownTimerLessThan(void); /*0x00c5*/ bool aiIfCountdownTimerGreaterThan(void); -/*0x00c6*/ bool aiSpawnChr(void); -/*0x00c7*/ bool ai00c7(void); +/*0x00c6*/ bool aiSpawnChrAtPad(void); +/*0x00c7*/ bool aiSpawnChrAtChr(void); /*0x00c8*/ bool ai00c8(void); /*0x00c9*/ bool ai00c9(void); /*0x00ca*/ bool aiDuplicateChr(void); @@ -255,7 +255,7 @@ /*0x00fc*/ bool aiIfKillCountGreaterThan(void); /*0x00fd*/ bool ai00fd(void); /*0x00fe*/ bool aiKillBond(void); -/*0x00ff*/ bool ai00ff(void); +/*0x00ff*/ bool aiBeSurprised00ff(void); /*0x0100*/ bool aiNoOp0100(void); /*0x0101*/ bool aiNoOp0101(void); /*0x0102*/ bool aiSetLights(void); @@ -306,10 +306,10 @@ /*0x0131*/ bool ai0131(void); /*0x0132*/ bool aiSetAction(void); /*0x0133*/ bool ai0133(void); -/*0x0134*/ bool ai0134(void); +/*0x0134*/ bool aiIfOrders(void); /*0x0135*/ bool aiIfHasOrders(void); /*0x0136*/ bool ai0136(void); -/*0x0137*/ bool ai0137(void); +/*0x0137*/ bool aiIfChrInSquadronDoingAction(void); /*0x0138*/ bool aiIfChannelIdle(void); /*0x0139*/ bool ai0139(void); /*0x013a*/ bool aiSetChrPresetToUnalertedTeammate(void); diff --git a/src/include/game/game_066310.h b/src/include/game/game_066310.h index 6d306a79c..9bf9cc48b 100644 --- a/src/include/game/game_066310.h +++ b/src/include/game/game_066310.h @@ -126,7 +126,7 @@ u32 func0f07092c(void); u32 func0f070a1c(void); u32 func0f070bd0(void); u32 func0f070ca0(void); -void func0f070e2c(struct position *pos, u32 arg1); +void liftActivate(struct position *pos, u32 arg1); u32 func0f070e58(void); u32 func0f070eac(void); u32 func0f070f08(void); @@ -161,18 +161,18 @@ u32 func0f078c78(void); u32 func0f079ca4(void); u32 func0f079f1c(void); u32 func0f07accc(void); -struct heliobj *func0f07adf4(struct defaultobj *obj); +struct heliobj *objGetHeli(struct defaultobj *obj); u32 func0f07ae18(struct heliobj *heli, u32 arg1); u32 func0f07af34(struct heliobj *heli); -void func0f07afd0(struct heliobj *heli, s32 arg1); +void heliSetTarget(struct heliobj *heli, s32 arg1); u32 func0f07b038(struct heliobj *heli); void func0f07b078(struct heliobj *heli); bool heliSetField90(struct defaultobj *obj, u32 value); -u32 func0f07b0f4(struct heliobj *heli); +u32 heliRestartTimer(struct heliobj *heli); f32 heliGetTimer(struct heliobj *heli); u32 func0f07b158(void); u32 func0f07b164(void); -u32 func0f07b290(struct heliobj *heli, u32 arg1); +u32 heliFireRocket(struct heliobj *heli, u32 arg1); u32 func0f07b3f0(void); u32 func0f07ba38(void); u32 func0f07c12c(void); @@ -192,7 +192,7 @@ u32 func0f07e474(void); u32 func0f07e758(void); u32 func0f07f6d0(void); u32 func0f07f918(void); -u32 func0f07f924(struct image *image, u32 arg1, struct defaultobj *obj); +u32 imageSlotSetImage(struct image *image, u32 arg1, struct defaultobj *obj); u32 func0f07fbf0(void); u32 func0f07fbf8(void); u32 func0f0809c4(void); @@ -226,7 +226,7 @@ u32 func0f0859a0(void); u32 func0f085e00(void); u32 func0f085eac(void); u32 func0f086918(void); -u32 func0f0869a8(struct defaultobj *obj); +u32 objIsHealthy(struct defaultobj *obj); u32 func0f0869cc(void); u32 func0f086d60(void); void func0f086f40(struct position *pos); @@ -260,7 +260,7 @@ u32 func0f08a724(void); u32 func0f08a88c(void); u32 func0f08a9f4(void); u32 func0f08aa70(void); -u32 func0f08aaf4(u8 arg0); +u32 weaponIsThrown(u8 arg0); u32 func0f08ab64(void); u32 func0f08ab9c(void); u32 func0f08abd4(void); @@ -307,7 +307,7 @@ u32 func0f08e214(void); u32 func0f08e224(void); u32 func0f08e2ac(void); u32 func0f08e3a4(void); -u32 func0f08e488(struct defaultobj *obj, u32 arg1); +u32 doorActivate(struct defaultobj *obj, u32 arg1); u32 func0f08e520(void); u32 func0f08e564(void); u32 func0f08e5a8(void); @@ -338,7 +338,7 @@ u32 func0f091030(void); u32 func0f0910ac(void); u32 func0f091250(void); u32 func0f0912dc(void); -u32 func0f091d84(struct defaultobj *obj, u32 arg1, u32 arg2); +u32 objSetPartVisible(struct defaultobj *obj, u32 arg1, u32 arg2); s32 setupGetCommandLength(u32 *ptr); u32 func0f092004(u32 arg0); u32 func0f092098(struct tag *tag); @@ -364,8 +364,8 @@ u32 func0f093630(void); u32 func0f093790(void); u32 func0f0938ec(void); void func0f0939f8(s32 arg0, struct position *pos, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14); -void func0f0942d0(s32 channel); -u32 func0f0943bc(s32 channel); +void audioMuteChannel(s32 channel); +u32 audioIfChannelIdle(s32 channel); bool audioPlayFromWorldPosition2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct position *pos, u32 arg4, s32 arg5, s32 arg6, s32 arg7); u32 func0f0946b0(void); u32 func0f094940(void); @@ -380,10 +380,10 @@ u32 func0f095330(void); u32 func0f095340(void); u32 func0f0953cc(void); u32 func0f095560(void); -s32 func0f0955f4(void); -u32 func0f095650(u32 arg0); -u32 func0f095684(u32 arg0); -u32 func0f095b64(void); +s32 objectiveGetCount(void); +u32 objectiveGetDifficultyBits(u32 arg0); +u32 objectiveGetStatus(u32 arg0); +u32 objectiveIsAllComplete(void); u32 func0f095bf4(void); u32 func0f095c04(void); u32 func0f095d64(void); diff --git a/src/include/game/game_097a50.h b/src/include/game/game_097a50.h index 610ca3cec..eb19cd8cf 100644 --- a/src/include/game/game_097a50.h +++ b/src/include/game/game_097a50.h @@ -92,7 +92,7 @@ u32 func0f0a12b0(void); u32 func0f0a1318(void); u32 func0f0a134c(void); u32 func0f0a1528(void); -u32 func0f0a196c(s8 arg0); +u32 currentPlayerEquipWeaponInCutscene(s8 arg0); u32 getCurrentPlayerWeaponId(u32 arg0); u32 getCurrentPlayerWeaponIdWrapper(u32 arg0); u32 func0f0a1a10(void); @@ -102,7 +102,7 @@ u32 func0f0a1b50(void); u32 func0f0a1c2c(void); u32 func0f0a1d14(void); u32 func0f0a1df4(void); -void func0f0a2090(u32 arg0, u32 arg1); +void currentPlayerEquipWeapon(u32 arg0, u32 arg1); u32 func0f0a20fc(void); u32 func0f0a212c(void); u32 func0f0a215c(void); @@ -160,7 +160,7 @@ u32 func0f0a94d0(void); void func0f0a95ec(u32 arg0, u32 arg1); u32 func0f0a9628(void); u32 func0f0a9770(void); -u32 func0f0a9868(s8 arg0); +u32 currentPlayerGetAmmoCount(s8 arg0); u32 func0f0a98f4(void); u32 func0f0a9910(void); u32 func0f0a9980(void); diff --git a/src/include/game/game_0b0420.h b/src/include/game/game_0b0420.h index 29859c2c4..211b8f0e7 100644 --- a/src/include/game/game_0b0420.h +++ b/src/include/game/game_0b0420.h @@ -10,7 +10,7 @@ u32 func0f0b052c(void); u32 func0f0b0544(void); u32 func0f0b055c(void); u32 func0f0b0574(void); -u32 func0f0b058c(void); +u32 getNumKnockedOutChrs(void); u32 func0f0b05a4(void); u32 func0f0b073c(void); u32 func0f0b0764(void); @@ -32,7 +32,7 @@ u32 func0f0b16a4(void); bool weaponHasFlag(s32 itemid, u32 flag); u32 func0f0b1804(void); u32 func0f0b184c(void); -u32 func0f0b18bc(u32 arg0); +u32 currentPlayerHasWeaponEquipped(u32 arg0); u32 func0f0b1948(void); u32 func0f0b1a18(void); u32 func0f0b1ad0(void); diff --git a/src/include/game/game_0b28d0.h b/src/include/game/game_0b28d0.h index eb1a6f540..1b86ceb35 100644 --- a/src/include/game/game_0b28d0.h +++ b/src/include/game/game_0b28d0.h @@ -84,12 +84,12 @@ u32 func0f0b9674(void); u32 func0f0b96e8(void); u32 func0f0b9a20(void); u32 func0f0b9afc(void); -void func0f0b9b68(s16 pad_id); +void warpBondToPad(s16 pad_id); void func0f0b9bac(u32 arg0, u32 arg1, u32 arg3); u32 func0f0b9c1c(void); u32 func0f0b9cbc(void); u32 func0f0ba010(void); -void func0f0ba0d4(s16 anim_id); +void cameraDoAnimation(s16 anim_id); u32 func0f0ba190(u32 arg0); u32 func0f0ba29c(void); u32 func0f0ba838(void); @@ -116,7 +116,7 @@ u32 func0f0bb69c(void); u32 func0f0bb814(void); u32 func0f0bbf14(void); u32 func0f0bbf78(void); -void func0f0bc0f0(u32 arg0); +void currentPlayerSurroundWithExplosions(u32 arg0); u32 func0f0bc120(void); u32 func0f0bc3f0(void); u32 func0f0bc440(void); diff --git a/src/include/game/game_0c79f0.h b/src/include/game/game_0c79f0.h index 63d7fa5da..e49d6ab6e 100644 --- a/src/include/game/game_0c79f0.h +++ b/src/include/game/game_0c79f0.h @@ -16,9 +16,9 @@ u32 func0f0c7bd0(void); u32 func0f0c7c34(void); u32 func0f0c7c98(void); u32 func0f0c7cc4(void); -void func0f0c7cf0(struct position *pos); +void currentPlayerGrabProp(struct position *pos); void func0f0c7d30(u32 arg0); -void func0f0c7dec(u32 arg0); +void releaseObj(u32 arg0); u32 func0f0c7f2c(void); u32 func0f0c7f98(void); u32 func0f0c8004(void); diff --git a/src/include/game/game_0dcdb0.h b/src/include/game/game_0dcdb0.h index b73bb8b43..4378926ff 100644 --- a/src/include/game/game_0dcdb0.h +++ b/src/include/game/game_0dcdb0.h @@ -13,7 +13,7 @@ u32 func0f0ddd44(void); u32 func0f0ddda0(void); u32 func0f0dde60(void); u32 func0f0ddeac(void); -void func0f0ddf1c(char *text, u32 arg1); +void currentPlayerQueueMessage(char *text, u32 arg1); u32 func0f0ddfa4(void); void func0f0de034(char *text, u32 arg1, u32 arg2); u32 func0f0de0d4(void); diff --git a/src/include/game/game_111600.h b/src/include/game/game_111600.h index 2bf965b6b..b884b34e9 100644 --- a/src/include/game/game_111600.h +++ b/src/include/game/game_111600.h @@ -30,7 +30,7 @@ u32 func0f11253c(void); u32 func0f112790(void); u32 func0f112844(void); u32 func0f112884(void); -u32 func0f1128cc(struct position *pos); +u32 currentPlayerHasProp(struct position *pos); u32 func0f112950(void); u32 func0f112a58(void); u32 func0f112bc0(void); diff --git a/src/include/game/game_129900.h b/src/include/game/game_129900.h index e98324fcb..8bb32d0ea 100644 --- a/src/include/game/game_129900.h +++ b/src/include/game/game_129900.h @@ -41,8 +41,8 @@ u32 func0f131678(void); u32 func0f13171c(void); u32 func0f131a30(void); u32 func0f1321d0(void); -void func0f1329bc(u32 arg0); -void func0f1329ec(u32 arg0); +void rainConfigure(u32 arg0); +void snowConfigure(u32 arg0); u32 func0f132a1c(void); u32 func0f132e28(void); u32 func0f1346b0(void); diff --git a/src/include/game/game_1668e0.h b/src/include/game/game_1668e0.h index ab0248236..3bce9f214 100644 --- a/src/include/game/game_1668e0.h +++ b/src/include/game/game_1668e0.h @@ -66,7 +66,7 @@ u32 func0f16cda8(void); u32 func0f16cdc8(void); u32 func0f16cdd4(void); u32 func0f16cde0(void); -f32 func0f16cdec(void); +f32 getUptime(void); u32 func0f16cdf8(void); u32 func0f16ce10(void); u32 func0f16ce3c(void); diff --git a/src/include/game/game_16cfa0.h b/src/include/game/game_16cfa0.h index 1f57fead7..7b3f332af 100644 --- a/src/include/game/game_16cfa0.h +++ b/src/include/game/game_16cfa0.h @@ -30,15 +30,15 @@ u32 func0f16dba4(void); u32 func0f16dc78(void); u32 func0f16dd14(void); u32 func0f16ddb0(void); -u32 func0f16de0c(u32 arg0); -u32 func0f16de80(void); +u32 audioPlayTrack(u32 arg0); +u32 audioRestartTrack(void); u32 func0f16deb8(u32 arg0); -u32 func0f16def8(u32 arg0); -u32 func0f16df84(void); -u32 func0f16dfd0(u32 arg0); -u32 func0f16e02c(void); -void func0f16e058(u32 arg0, u32 arg1, u32 arg2); -u32 func0f16e0b4(u32 arg0); +u32 audioSetTrack(u32 arg0); +u32 audioRestartDefaultTrack(void); +u32 audioSetAuxTrack(u32 arg0); +u32 audioRestartAuxTrack(void); +void audioPlayXTrack(u32 arg0, u32 arg1, u32 arg2); +u32 audioStopTrack(u32 arg0); u32 func0f16e138(void); u32 func0f16e1e0(s32 arg0); u32 func0f16e3fc(void); diff --git a/src/include/gunscript.h b/src/include/gunscript.h index c028c6047..5c63de378 100644 --- a/src/include/gunscript.h +++ b/src/include/gunscript.h @@ -38,8 +38,8 @@ 0x09000000 | unk1, \ 0, -#define gunscript_playanimation(animation, direction, speed) \ - 0x0a000000 | animation, \ +#define gunscript_playanimation(chr_do_animation, direction, speed) \ + 0x0a000000 | chr_do_animation, \ (direction << 16) | speed, #define gunscript_setsoundspeed(keyframe, speed) \ diff --git a/src/setup/ailists.c b/src/setup/ailists.c index e6cb356e0..10c0ec572 100644 --- a/src/setup/ailists.c +++ b/src/setup/ailists.c @@ -11,35 +11,35 @@ u8 func0000_idle[] = { beginloop(0x0d) endloop(0x0d) - endfunction + endlist }; u8 func0005_end_cinema[] = { enter_firstperson - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0001_unalerted_0001[] = { - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; // Never used u8 func0003_stop_unalerted[] = { stop_chr - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0002_unalerted_0002[] = { - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; u8 func0004_unalerted_0004[] = { - set_function(CHR_SELF, GFUNC_UNALERTED_0002) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0002) + endlist }; u8 func0006_unalerted[] = { @@ -57,12 +57,12 @@ u8 func0006_unalerted[] = { goto_next(0x16) label(0x13) - set_return_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) - set_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_returnlist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_ailist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) label(0x16) set_target_chr(CHR_P1P2) - set_onshot_function(GFUNC_UNALERTED) + set_shotlist(GFUNC_UNALERTED) if_chr_dying(CHR_SELF, /*goto*/ 0x15) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x15) if_chr_unloaded(CHR_SELF, /*goto*/ 0x15) @@ -77,8 +77,8 @@ u8 func0006_unalerted[] = { // Dying label(0x15) dprint 'D','I','E',' ','I','N','S','C','A','N','\n',0, - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Injured or has no gun label(0x16) @@ -96,7 +96,7 @@ u8 func0006_unalerted[] = { dprint 'A','N','I','M',' ','O','B','J','E','C','T',' ','N','O','W','\n',0, set_chr_health(CHR_SELF, 40) object_do_animation(0x025a, 0xff, 0x02ff, 0xff) - animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1) set_chr_special_death_animation(CHR_SELF, 0) dprint 'B','4',' ','W','A','T','\n',0, @@ -111,8 +111,8 @@ u8 func0006_unalerted[] = { label(0x14) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_04000000) - // Stop chr, either immediately or by waiting for their animation to end. - // I think the animation is their injured animation. + // Stop chr, either immediately or by waiting for their chr_do_animation to end. + // I think the chr_do_animation is their injured chr_do_animation. label(0x13) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_02000000) if_chr_idle(/*goto*/ 0x13) @@ -136,7 +136,7 @@ u8 func0006_unalerted[] = { set_squadron_alertness(100) label(0x13) dprint 'N','O',' ','W','A','R','N','I','N','G','\n',0, - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) dprint 'S','1',0, // Armed @@ -219,13 +219,13 @@ u8 func0006_unalerted[] = { label(0x16) dprint 'S','E','E','E','Y','E','S','P','Y','\n',0, if_path_started(/*goto*/ 0x15) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_OBSERVE_CAMSPY) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_OBSERVE_CAMSPY) // Patroller seeing camspy label(0x15) - set_return_function(CHR_SELF, GFUNC_DISGUISE_DETECTION) - set_function(CHR_SELF, GFUNC_OBSERVE_CAMSPY) + set_returnlist(CHR_SELF, GFUNC_DISGUISE_DETECTION) + set_ailist(CHR_SELF, GFUNC_OBSERVE_CAMSPY) // Can't see camspy label(0x13) @@ -250,12 +250,12 @@ u8 func0006_unalerted[] = { call_rng if_rand_gt(20, /*goto*/ 0x16) if_path_started(/*goto*/ 0x15) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) label(0x15) - set_return_function(CHR_SELF, GFUNC_DISGUISE_DETECTION) - set_function(CHR_SELF, GFUNC_DO_BORED_ANIMATION) + set_returnlist(CHR_SELF, GFUNC_DISGUISE_DETECTION) + set_ailist(CHR_SELF, GFUNC_DO_BORED_ANIMATION) // Consider looking around label(0x16) @@ -265,12 +265,12 @@ u8 func0006_unalerted[] = { call_rng if_rand_gt(20, /*goto*/ 0x16) if_path_started(/*goto*/ 0x15) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_LOOK_AROUND) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_LOOK_AROUND) label(0x15) - set_return_function(CHR_SELF, GFUNC_DISGUISE_DETECTION) - set_function(CHR_SELF, GFUNC_LOOK_AROUND) + set_returnlist(CHR_SELF, GFUNC_DISGUISE_DETECTION) + set_ailist(CHR_SELF, GFUNC_LOOK_AROUND) label(0x16) goto_first(LABEL_SCAN_START) @@ -279,8 +279,8 @@ u8 func0006_unalerted[] = { label(0x13) dprint 'N','A','T',' ','A','N','I','M','S','\n',0, if_chr_idle(/*goto*/ 0x16) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_BUSY) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_BUSY) label(0x16) dprint 'I','N',' ','A','N','I','M','S','\n',0, @@ -349,11 +349,11 @@ u8 func0006_unalerted[] = { label(0x13) if_path_started(/*goto*/ 0x14) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) label(0x14) - set_return_function(CHR_SELF, GFUNC_DISGUISE_DETECTION) - set_function(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) + set_returnlist(CHR_SELF, GFUNC_DISGUISE_DETECTION) + set_ailist(CHR_SELF, GFUNC_CIVILIAN_SAY_COMMENT) label(0x15) goto_first(LABEL_SCAN_START) @@ -364,7 +364,7 @@ u8 func0006_unalerted[] = { if_self_flag_bankx_eq(CHRFLAG0_UNSURPRISABLE, TRUE, BANK_0, /*goto*/ 0x94) label(0x16) if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_DISGUISED, /*goto*/ 0x14) - if_any_chr_doing_action(MA_GOTOALARM, /*goto*/ 0x16) + if_chr_in_squadron_doing_action(MA_GOTOALARM, /*goto*/ 0x16) if_self_flag_bankx_eq(CHRFLAG0_CAN_RUN_FOR_ALARM, TRUE, BANK_0, /*goto*/ 0x9f) label(0x16) say_quip(CHR_BOND, 0x0b, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "Hey, you!","Intruder alert","We've got a contact!" @@ -403,7 +403,7 @@ u8 func0006_unalerted[] = { goto_next(0x73) label(0x16) - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x73) dprint 'S','4',0, @@ -415,7 +415,7 @@ u8 func0006_unalerted[] = { if_self_flag_bankx_eq(CHRFLAG0_CANT_ALERT_GROUP, TRUE, BANK_0, /*goto*/ 0x13) set_squadron_alertness(100) label(0x13) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) // // HEAR DETECT @@ -428,7 +428,7 @@ u8 func0006_unalerted[] = { if_self_flag_bankx_eq(CHRFLAG0_CAN_HEARSPAWN, TRUE, BANK_0, /*goto*/ LABEL_HEARSPAWN) restart_timer if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x80) - animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x80) dprint 'S','8',0, @@ -438,11 +438,11 @@ u8 func0006_unalerted[] = { label(0x81) if_self_flag_bankx_eq(CHRFLAG0_00000004, TRUE, BANK_0, /*goto*/ 0x13) if_self_flag_bankx_eq(CHRFLAG1_01000000, TRUE, BANK_1, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) label(0x13) set_squadron_alertness(100) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) // // HEAR SPAWN @@ -451,11 +451,11 @@ u8 func0006_unalerted[] = { dprint 'H','E','A','R','S','P','A','W','N','\n',0, if_never_been_onscreen(/*goto*/ 0x0e) dprint 'N','E','V','E','R',' ','V','I','S','F','A','I','L','\n',0, - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) label(0x0e) if_never_been_onscreen(/*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) // Never been on screen label(0x13) @@ -465,17 +465,17 @@ u8 func0006_unalerted[] = { dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x0e) if_chr_unloaded(CHR_CLONE, /*goto*/ 0x0e) - set_function(CHR_SELF, GFUNC_UNALERTED_0001) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) label(0x0e) dprint 'C','R','E','A','T','E',' ','S','P','A','W','N','\n',0, try_spawn_clone2(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER, 0x00000000, /*goto*/ 0x13) dprint 'C','R','E','A','T','E',' ','F','A','I','L','\n',0, if_self_flag_bankx_eq(CHRFLAG0_00100000, TRUE, BANK_0, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) label(0x13) - set_function(CHR_SELF, GFUNC_UNALERTED_0001) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) // // NEAR MISS @@ -524,7 +524,7 @@ u8 func0006_unalerted[] = { say_quip(CHR_BOND, 0x12, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "What the?!","Who the?!" restart_timer if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x76) - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x76) dprint 'S','6',0, @@ -615,10 +615,10 @@ u8 func0006_unalerted[] = { label(0x16) set_target_chr(CHR_P1P2) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) label(0x13) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) // Unreachable - nothing jumps here label(0x22) @@ -637,7 +637,7 @@ u8 func0006_unalerted[] = { if_self_flag_bankx_eq(CHRFLAG0_CAN_HEARSPAWN, TRUE, BANK_0, /*goto*/ LABEL_HEARSPAWN) restart_timer if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x82) - animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x82) dprint 'T','2',0, @@ -647,7 +647,7 @@ u8 func0006_unalerted[] = { label(0x81) set_squadron_alertness(100) set_alertness(255) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) // // HEAR SPAWN 2 @@ -657,11 +657,11 @@ u8 func0006_unalerted[] = { dprint 'H','E','A','R','S','P','A','W','N','\n',0, if_never_been_onscreen(/*goto*/ 0x0e) dprint 'N','E','V','E','R',' ','V','I','S','F','A','I','L','\n',0, - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) label(0x0e) if_never_been_onscreen(/*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) label(0x13) dprint 'C','H','E','C','K',' ','D','U','P','E','\n',0, @@ -688,9 +688,9 @@ u8 func0006_unalerted[] = { goto_first(LABEL_HEARSPAWN) label(0x13) - set_function(CHR_SELF, GFUNC_UNALERTED_0001) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0001) - // Unreachable due to set_function above + // Unreachable due to set_ailist above increase_self_alertness(255) goto_next(0x16) @@ -714,7 +714,7 @@ u8 func0006_unalerted[] = { if_chr_is_skedar(CHR_SELF, /*goto*/ 0x7b) restart_timer if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x7a) - animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0x7a) dprint 'T','3',0, @@ -724,19 +724,19 @@ u8 func0006_unalerted[] = { label(0x7b) dprint 'W','A','R','N','E','D','B','E','N','D','\n',0, dprint 'W','A','R','N','E','D','B','E','N','D','2','\n',0, - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) // Unreachable - nothing jumps here label(0xe4) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_FLEE_FROM_GRENADE) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_FLEE_FROM_GRENADE) // // AIVSAI pass // label(0x12) if_self_flag_bankx_eq(CHRFLAG1_00100000, TRUE, BANK_1, /*goto*/ 0x13) - set_return_function(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) label(0x13) dprint 'W','A','R','N','E','D','B','E','N','D','3','\n',0, @@ -744,7 +744,7 @@ u8 func0006_unalerted[] = { say_quip(CHR_BOND, 0x12, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "What the?!","Who the?!" restart_timer if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, TRUE, BANK_1, /*goto*/ 0x75) - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) beginloop(0x75) dprint 'S','6',0, @@ -752,15 +752,15 @@ u8 func0006_unalerted[] = { endloop(0x75) label(0x77) - if_any_chr_doing_action(MA_GOTOALARM, /*goto*/ 0x16) + if_chr_in_squadron_doing_action(MA_GOTOALARM, /*goto*/ 0x16) if_self_flag_bankx_eq(CHRFLAG0_CAN_RUN_FOR_ALARM, TRUE, BANK_0, /*goto*/ 0x13) label(0x16) - set_function(CHR_SELF, GFUNC_INIT_COMBAT) + set_ailist(CHR_SELF, GFUNC_INIT_COMBAT) label(0x13) - set_function(CHR_SELF, GFUNC_WAKEUP) + set_ailist(CHR_SELF, GFUNC_WAKEUP) - // Wait until chr finished animation, then become alert. + // Wait until chr finished chr_do_animation, then become alert. // Used when standing up from sitting. label(0x0c) dprint 'G','O','T',' ','W','A','T','\n',0, @@ -769,14 +769,14 @@ u8 func0006_unalerted[] = { goto_first(0x0c) label(0x13) - set_function(CHR_SELF, GFUNC_WAKEUP) - endfunction + set_ailist(CHR_SELF, GFUNC_WAKEUP) + endlist }; u8 unregistered_function1[] = { dprint 'I','V','E','I','J','U','R','E','D','\n',0, - set_function(CHR_SELF, GFUNC_WAKEUP) - endfunction + set_ailist(CHR_SELF, GFUNC_WAKEUP) + endlist }; u8 func0008_wakeup[] = { @@ -786,17 +786,17 @@ u8 func0008_wakeup[] = { // Psychosised label(0x13) - set_return_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) - set_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_returnlist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_ailist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) - // Unset special death animation if no longer idle + // Unset special death chr_do_animation if no longer idle label(0x16) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13) set_chr_special_death_animation(CHR_SELF, 0) // If idle, unset it and stand up or whatever is needed label(0x13) - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x06) unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1) if_chr_idle_action_eq(IDLEACTION_SITTING_TYPING, /*goto*/ 0x05) @@ -814,13 +814,13 @@ u8 func0008_wakeup[] = { // Dead label(0x13) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Stand up label(0x15) set_chr_health(CHR_SELF, 40) - animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) object_do_animation(0x025a, 0xff, 0x02ff, 0xff) goto_next(0x0c) @@ -828,7 +828,7 @@ u8 func0008_wakeup[] = { label(0x16) object_do_animation(0x027b, 0xff, 0x02ff, 0xff) - // Wait for stand up animation to finish + // Wait for stand up chr_do_animation to finish label(0x0c) dprint 'G','O','T',' ','W','A','T','\n',0, yield @@ -837,8 +837,8 @@ u8 func0008_wakeup[] = { label(0x13) label(0x06) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0007_alerted[] = { @@ -858,10 +858,10 @@ u8 func0007_alerted[] = { goto_next(0x16) label(0x13) - set_return_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) - set_function(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_returnlist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) + set_ailist(CHR_SELF, GFUNC_INIT_PSYCHOSIS) - // If doing idle animation, turn off special death animation + // If doing idle chr_do_animation, turn off special death chr_do_animation label(0x16) if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13) set_chr_special_death_animation(CHR_SELF, 0) @@ -873,11 +873,11 @@ u8 func0007_alerted[] = { goto_next(0x16) label(0x13) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // is_chr_is_dead_maybe (named wrong) was false label(0x16) - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) set_aishootingatmelist(GFUNC_DODGE) set_darkroom_function(GFUNC_SEARCH_FOR_PLAYER) @@ -891,7 +891,7 @@ u8 func0007_alerted[] = { // Dying label(0x16) set_chr_dodge_rating(2, 0x00) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer @@ -902,8 +902,8 @@ u8 func0007_alerted[] = { label(0x16) say_quip(CHR_BOND, 0x19, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "You bitch!","Oh... my... god","She got me" - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x13) @@ -925,7 +925,7 @@ u8 func0007_alerted[] = { dprint 'C','H','E','C','K','I','N','J','U','R','Y','\n',0, // Say an injury quip if we haven't already, then wait up to 3 seconds for - // the chr to have finished their injury animation + // the chr to have finished their injury chr_do_animation beginloop(0x1d) if_self_flag_bankx_eq(CHRFLAG0_SAID_INJURY_QUIP, TRUE, BANK_0, /*goto*/ 0x16) if_num_times_shot_lt(1, /*goto*/ 0x16) @@ -987,7 +987,7 @@ u8 func0007_alerted[] = { label(0x16) dprint 'A','T',' ','G','U','N','\n',0, restart_timer - animation(ANIM_PICK_UP_GUN, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_PICK_UP_GUN, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0xae) if_timer_gt(60, /*goto*/ 0x16) @@ -1033,15 +1033,15 @@ u8 func0007_alerted[] = { call_rng if_rand_lt(82, /*goto*/ 0x13) if_rand_lt(164, /*goto*/ 0x15) - animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DRAW_PISTOL_0288, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) - animation(ANIM_DRAW_PISTOL_0289, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DRAW_PISTOL_0289, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x15) - animation(ANIM_DRAW_PISTOL_0245, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_DRAW_PISTOL_0245, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0x16) if_stage_is_not(STAGE_AIRFORCEONE, /*goto*/ 0x13) @@ -1075,7 +1075,7 @@ u8 func0007_alerted[] = { // Consider warning others in team dprint 'B','4',' ','T','E','A','M',' ','C','H','E','C','K','\n',0, if_alarm_active(/*goto*/ 0x16) - if_any_chr_doing_action(MA_GOTOALARM, /*goto*/ 0x16) + if_chr_in_squadron_doing_action(MA_GOTOALARM, /*goto*/ 0x16) if_self_flag_bankx_eq(CHRFLAG0_CAN_RUN_FOR_ALARM, TRUE, BANK_0, /*goto*/ LABEL_RUN_FOR_ALARM) // No need to warn @@ -1085,9 +1085,9 @@ u8 func0007_alerted[] = { // Unreachable - nothing jumps here label(0x13) - set_return_function(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) set_alertness(0) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) // This flag appears to control whether the chr can declare that they're // attempting to surround the player. These quips are never said though, so @@ -1222,8 +1222,8 @@ u8 func0007_alerted[] = { label(0xee) if_chr_lost_track_of_target_maybe(/*goto*/ 0x13) - set_return_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x13) dprint 'A','M','B','U','S','H',' ','P','L','A','Y','E','R','\n',0, @@ -1509,8 +1509,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) if_timer_gt(300, /*goto*/ 0x56) @@ -1626,8 +1626,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) if_self_flag_bankx_eq(CHRFLAG1_00002000, FALSE, BANK_1, /*goto*/ 0x13) @@ -1685,7 +1685,7 @@ u8 func0007_alerted[] = { label(0x16) set_self_flag_bankx(CHRFLAG1_00000020, BANK_1) restart_timer - animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) beginloop(0xe8) if_self_flag_bankx_eq(CHRFLAG1_00000020, FALSE, BANK_1, /*goto*/ 0x16) @@ -1784,8 +1784,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) if_chr_stopped(/*goto*/ 0x32) @@ -1846,7 +1846,7 @@ u8 func0007_alerted[] = { if_chr_distance_lt(500, /*goto*/ 0x4c) dprint 'G','R','E','N','A','D','E','\n',0, restart_timer - if_any_chr_doing_action(MA_GRENADE, /*goto*/ 0x4c) + if_chr_in_squadron_doing_action(MA_GRENADE, /*goto*/ 0x4c) dprint 'A','C','T','I','O','N',' ','G','R','E','N','A','D','E','\n',0, set_action(MA_GRENADE, FALSE) unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1) @@ -1976,8 +1976,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) if_self_flag_bankx_eq(CHRFLAG1_00002000, FALSE, BANK_1, /*goto*/ 0x13) @@ -2048,7 +2048,7 @@ u8 func0007_alerted[] = { label(0x16) set_self_flag_bankx(CHRFLAG1_00000020, BANK_1) restart_timer - animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0xe9) yield if_self_flag_bankx_eq(CHRFLAG1_00000020, FALSE, BANK_1, /*goto*/ 0x16) @@ -2097,8 +2097,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) cmd013d_if_grenade_thrown_nearby_maybe(MA_GRENADEWAIT, /*goto*/ LABEL_FLEE_GRENADE) @@ -2106,9 +2106,9 @@ u8 func0007_alerted[] = { goto_next(0x16) label(0x13) - set_return_function(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) set_alertness(0) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) if_self_flag_bankx_eq(CHRFLAG0_04000000, TRUE, BANK_0, /*goto*/ 0x16) call_rng @@ -2174,8 +2174,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) chr_toggle_p1p2(CHR_SELF) @@ -2200,8 +2200,8 @@ u8 func0007_alerted[] = { label(0x16) if_chr_lost_track_of_target_maybe(/*goto*/ 0x13) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x13) if_chr_distance_gt(1300, /*goto*/ 0x3c) @@ -2245,8 +2245,8 @@ u8 func0007_alerted[] = { set_target_chr(CHR_PRESET) dprint 'E','N','D',' ','T','R','A','C','K','\n',0, set_alertness(0) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) goto_first(0x1b) label(0x3b) @@ -2281,8 +2281,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) if_in_disarm_range(/*goto*/ 0x26) @@ -2306,8 +2306,8 @@ u8 func0007_alerted[] = { goto_next(0x13) label(0x16) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) dprint 't','a','r','g','e','t','\n',0, @@ -2393,7 +2393,7 @@ u8 func0007_alerted[] = { label(0x16) set_self_flag_bankx(CHRFLAG1_00000020, BANK_1) restart_timer - animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_RELOAD_0209, 0, -1, 0x10, 0x10, CHR_SELF, 2) label(0xea) yield if_self_flag_bankx_eq(CHRFLAG1_00000020, FALSE, BANK_1, /*goto*/ 0x16) @@ -2555,7 +2555,7 @@ u8 func0007_alerted[] = { goto_first(0x1b) label(0x88) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // // RUN FOR ALARM @@ -2573,7 +2573,7 @@ u8 func0007_alerted[] = { endloop(0x9d) label(0x16) - animation(ANIM_PUSH_BUTTON, 0, 193, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_PUSH_BUTTON, 0, 193, 0x10, 0x10, CHR_SELF, 2) restart_timer beginloop(0xed) @@ -2595,16 +2595,16 @@ u8 func0007_alerted[] = { // FLEE GRENADE // label(LABEL_FLEE_GRENADE) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_FLEE_FROM_GRENADE) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_FLEE_FROM_GRENADE) // // CLOAKED // label(LABEL_CLOAKED) set_alertness(0) - set_return_function(CHR_SELF, GFUNC_ALERTED) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) label(0x01) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00002000) @@ -2615,15 +2615,15 @@ u8 func0007_alerted[] = { if_chr_sees_player(/*goto*/ 0x13) set_alertness(0) set_self_flag_bankx(CHRFLAG1_10000000, BANK_1) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) label(0x13) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x0a) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func000a_do_idle_animation[] = { @@ -2638,7 +2638,7 @@ u8 func000a_do_idle_animation[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_TRIGGER_BUDDY_WARP) label(0x13) - set_onshot_function(GFUNC_UNALERTED) + set_shotlist(GFUNC_UNALERTED) label(0x00) if_chr_idle_action_eq(IDLEACTION_STANDING, /*goto*/ 0x03) if_chr_idle_action_eq(IDLEACTION_SITTING_TYPING, /*goto*/ 0x04) @@ -2647,23 +2647,23 @@ u8 func000a_do_idle_animation[] = { if_chr_idle_action_eq(IDLEACTION_OPERATING_PAD, /*goto*/ 0x07) stop_chr return - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x03) dprint 'S','T','A','N','D','I','N','G','\n',0, - animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x0c) label(0x04) dprint 'S','I','T','T','I','N','G',' ','T','Y','P','I','N','G','\n',0, set_chr_special_death_animation(CHR_SELF, 0x06) - animation(ANIM_SITTING_TYPING, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_TYPING, 0, -1, 0x14, 0x00, CHR_SELF, 2) goto_next(0x0c) label(0x05) dprint 'S','I','T','T','I','N','G','\n',0, set_chr_special_death_animation(CHR_SELF, 0x06) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x00, CHR_SELF, 2) goto_next(0x0c) label(0x07) @@ -2680,15 +2680,15 @@ u8 func000a_do_idle_animation[] = { call_rng if_rand_gt(85, /*goto*/ 0x28) if_rand_gt(170, /*goto*/ 0x29) - animation(ANIM_OPERATE_0221, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0221, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x0c) label(0x28) - animation(ANIM_OPERATE_0222, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0222, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x0c) label(0x29) - animation(ANIM_OPERATE_0223, 0, -1, 0x10, 0x00, CHR_SELF, 2) + chr_do_animation(ANIM_OPERATE_0223, 0, -1, 0x10, 0x00, CHR_SELF, 2) goto_next(0x0c) label(0x0c) @@ -2711,7 +2711,7 @@ u8 func000a_do_idle_animation[] = { // Stand up label(0x13) - animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) object_do_animation(0x025a, 0xff, 0x02ff, 0xff) beginloop(0x06) @@ -2722,9 +2722,9 @@ u8 func000a_do_idle_animation[] = { return label(0x12) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; /** @@ -2745,7 +2745,7 @@ u8 func000a_do_idle_animation[] = { * If both fail, the function yields and continues checking. */ u8 func000b_choose_target_chr[] = { - set_onshot_function(GFUNC_CHOOSE_TARGET) + set_shotlist(GFUNC_CHOOSE_TARGET) if_num_times_shot_lt(1, /*goto*/ 0xd3) // Has been shot @@ -2764,7 +2764,7 @@ u8 func000b_choose_target_chr[] = { goto_next(0xd3) label(0x13) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) // Hasn't been shot, or can't engage target chr label(0xd3) @@ -2790,8 +2790,8 @@ u8 func000b_choose_target_chr[] = { label(0x16) dprint 'F','O','U','N','D','\n',0, set_squadron_alertness(100) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - set_return_function(CHR_SELF, GFUNC_CHOOSE_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_CHOOSE_TARGET) label(0x13) dprint 'F','O','U','N','D','A','L','E','R','T','\n',0, @@ -2802,14 +2802,14 @@ u8 func000b_choose_target_chr[] = { goto_first(0xd3) label(0x13) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func000d_init_combat[] = { - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) + set_shotlist(GFUNC_COMBAT_WITH_TARGET) - // If not idle, turn off special death animation + // If not idle, turn off special death chr_do_animation if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13) set_chr_special_death_animation(CHR_SELF, 0) @@ -2823,7 +2823,7 @@ u8 func000d_init_combat[] = { // Stand up label(0x05) set_chr_health(CHR_SELF, 40) - animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2) object_do_animation(0x025a, 0xff, 0x02ff, 0xff) beginloop(0x0c) @@ -2832,9 +2832,9 @@ u8 func000d_init_combat[] = { label(0x13) label(0x16) - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_shotlist(GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func000c_combat_with_target_chr[] = { @@ -2886,7 +2886,7 @@ u8 func000c_combat_with_target_chr[] = { goto_next(0x16) label(0x13) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) // Co-op with friend or counter-op on any of the above stages // Or follow through if chr still has target @@ -2900,7 +2900,7 @@ u8 func000c_combat_with_target_chr[] = { // Dying label(0x16) - set_onshot_function(GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) restart_timer beginloop(0x1c) @@ -2916,8 +2916,8 @@ u8 func000c_combat_with_target_chr[] = { say_quip(CHR_BOND, 0x02, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) label(0x17) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x13) @@ -3014,7 +3014,7 @@ u8 func000c_combat_with_target_chr[] = { goto_next(0x16) label(0x13) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x16) dprint 'F','O','U','N','D',' ','E','N','E','M','Y','\n',0, @@ -3037,7 +3037,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x13) set_self_flag_bankx(CHRFLAG1_PUNCH_THEN_GENERAL_COMBAT, BANK_1) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x16) try_run_to_target_chr(/*goto*/ 0xb4) @@ -3071,7 +3071,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) dprint 'G','O','U','N','A','R','M','\n',0, set_self_flag_bankx(CHRFLAG1_PUNCH_THEN_GENERAL_COMBAT, BANK_1) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) label(0x13) @@ -3137,7 +3137,7 @@ u8 func000c_combat_with_target_chr[] = { if_something_hypotenuse(0, /*goto*/ 0xc2) dprint 'G','R','E','N','A','D','E','\n',0, restart_timer - if_any_chr_doing_action(MA_GRENADE, /*goto*/ 0xc2) + if_chr_in_squadron_doing_action(MA_GRENADE, /*goto*/ 0xc2) set_action(MA_GRENADE, FALSE) consider_throwing_grenade(0x0200, 0x0000, /*goto*/ 0x16) label(0x16) @@ -3153,7 +3153,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) set_self_flag_bankx(CHRFLAG1_PUNCH_THEN_GENERAL_COMBAT, BANK_1) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) yield @@ -3171,7 +3171,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) set_self_flag_bankx(CHRFLAG1_PUNCH_THEN_GENERAL_COMBAT, BANK_1) - set_function(CHR_SELF, GFUNC_HAND_COMBAT) + set_ailist(CHR_SELF, GFUNC_HAND_COMBAT) label(0x13) label(0x13) @@ -3459,7 +3459,7 @@ u8 func000c_combat_with_target_chr[] = { try_face_entity(0x0200, 0x0000, /*goto*/ 0x16) label(0x16) if_chr_is_skedar(CHR_SELF, /*goto*/ 0xd9) - animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) beginloop(0xd8) if_chr_stopped(/*goto*/ 0xd9) @@ -3467,7 +3467,7 @@ u8 func000c_combat_with_target_chr[] = { label(0xd9) return - endfunction + endlist }; u8 unregistered_function2[] = { @@ -3477,7 +3477,7 @@ u8 unregistered_function2[] = { yield goto_first(0x19) - endfunction + endlist }; u8 unregistered_function3[] = { @@ -3489,7 +3489,7 @@ u8 unregistered_function3[] = { label(0x16) dprint 'f','i','n','y','a','w','n','\n',0, return - endfunction + endlist }; /** @@ -3499,20 +3499,20 @@ u8 unregistered_function3[] = { u8 func0000_idle_0009[] = { dprint 'S','T','A','R','T',' ','L','I','S','T','\n',0, set_action(MA_NORMAL, FALSE) - set_return_function(CHR_SELF, GFUNC_IDLE_0009) + set_returnlist(CHR_SELF, GFUNC_IDLE_0009) stop_chr beginloop(0x0c) endloop(0x0c) - endfunction + endlist }; /** * Not used. */ u8 func000e_see_then_attack[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) beginloop(0x0c) chr_toggle_p1p2(CHR_SELF) @@ -3521,8 +3521,8 @@ u8 func000e_see_then_attack[] = { endloop(0x0c) label(0x16) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -3556,7 +3556,7 @@ u8 func0016_show_objective_failed_msg[] = { if_objective_failed(2, /*goto*/ 0x13) if_objective_failed(3, /*goto*/ 0x13) if_objective_failed(4, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Show message first time label(0x13) @@ -3576,7 +3576,7 @@ u8 func0016_show_objective_failed_msg[] = { if_objective_failed(2, /*goto*/ 0x13) if_objective_failed(3, /*goto*/ 0x13) if_objective_failed(4, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Show message second time label(0x13) @@ -3595,7 +3595,7 @@ u8 func0016_show_objective_failed_msg[] = { if_objective_failed(2, /*goto*/ 0x13) if_objective_failed(3, /*goto*/ 0x13) if_objective_failed(4, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Show message third time label(0x13) @@ -3611,96 +3611,96 @@ u8 func0016_show_objective_failed_msg[] = { label(0x16) goto_first(0x06) - endfunction + endlist }; u8 func0017_rebuild_groups[] = { rebuild_teams rebuild_squadrons - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0018_do_bored_animation[] = { call_rng if_rand_gt(50, /*goto*/ 0x13) - animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_YAWN, 0, 193, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(100, /*goto*/ 0x13) - animation(ANIM_SCRATCH_HEAD, 0, 294, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SCRATCH_HEAD, 0, 294, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(150, /*goto*/ 0x13) - animation(ANIM_ROLL_HEAD, 0, 183, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_ROLL_HEAD, 0, 183, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(200, /*goto*/ 0x13) - animation(ANIM_GRAB_CROTCH, 0, 123, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, 123, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(250, /*goto*/ 0x13) - animation(ANIM_GRAB_BUTT, 0, 56, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_BUTT, 0, 56, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) label(0x16) return - endfunction + endlist }; u8 func001e_look_around[] = { call_rng if_rand_gt(50, /*goto*/ 0x13) - animation(ANIM_LOOK_AROUND_025B, 0, 193, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025B, 0, 193, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(100, /*goto*/ 0x13) - animation(ANIM_LOOK_AROUND_025C, 0, 294, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025C, 0, 294, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(150, /*goto*/ 0x13) - animation(ANIM_LOOK_AROUND_025D, 0, 183, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025D, 0, 183, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) - // @bug: Shows grab crotch animation when wanting to look around instead. + // @bug: Shows grab crotch chr_do_animation when wanting to look around instead. // Probably a copy/paste error from previous function. label(0x13) if_rand_gt(200, /*goto*/ 0x13) - animation(ANIM_GRAB_CROTCH, 0, 123, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_GRAB_CROTCH, 0, 123, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) if_rand_gt(250, /*goto*/ 0x13) - animation(ANIM_LOOK_AROUND_025E, 0, 56, 0x18, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025E, 0, 56, 0x18, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) label(0x16) return - endfunction + endlist }; u8 func0019_do_sitting_animation[] = { call_rng if_rand_gt(128, /*goto*/ 0x13) - animation(ANIM_SITTING_TYPING, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_TYPING, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) - animation(ANIM_SITTING_DORMANT, 0, -1, 0x10, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x10, 0x10, CHR_SELF, 2) goto_next(0x16) label(0x13) label(0x16) return - endfunction + endlist }; /** @@ -3728,7 +3728,7 @@ u8 func001a_maybe_unset_disspee[] = { if_chr_weapon_equipped(CHR_TARGET, WEAPON_COMBATBOOST, /*goto*/ 0x13) if_chr_weapon_equipped(CHR_TARGET, WEAPON_HORIZONSCANNER, /*goto*/ 0x13) if_chr_weapon_equipped(CHR_TARGET, WEAPON_SUITCASE, /*goto*/ 0x13) - set_function(CHR_SELF, GFUNC_UNALERTED_0004) + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) // Not disguised, or // disguised but not 02000000, or @@ -3755,8 +3755,8 @@ u8 func001a_maybe_unset_disspee[] = { // Resume walking a path label(0x16) start_path - set_function(CHR_SELF, GFUNC_UNALERTED_0004) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED_0004) + endlist }; u8 func000f_hand_combat[] = { @@ -3770,8 +3770,8 @@ u8 func000f_hand_combat[] = { // Dying label(0x13) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x16) set_action(MA_UNARMEDATTACK, FALSE) @@ -3947,8 +3947,8 @@ u8 func000f_hand_combat[] = { label(0x13) dprint 'D','E','T',' ','E','N','I','T','\n',0, - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; /** @@ -3961,7 +3961,7 @@ u8 func000f_hand_combat[] = { */ u8 func0010_civilian_say_comment[] = { set_self_chrflag(CHRCFLAG_00040000) - set_onshot_function(GFUNC_SURPRISED) + set_shotlist(GFUNC_SURPRISED) label(0x0c) yield dprint 'L','O','O','K',' ','F','O','R',' ','T','A','R','G','E','T','\n',0, @@ -4087,19 +4087,19 @@ u8 func0010_civilian_say_comment[] = { label(0x83) set_alertness(100) - set_function(CHR_SELF, GFUNC_UNALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_UNALERTED) + endlist }; /** * This function is only used by civilians while they say comments...? */ u8 func001c_surprised[] = { - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) set_squadron_alertness(100) say_quip(CHR_BOND, 0x0c, 0xff, 0x03, 0x00, BANK_0, 0x00, 0x00) // "Holy shh...","What the hell?!" restart_timer - animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) + chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0x00, 0x10, CHR_SELF, 2) // Wait 1 second beginloop(0x03) @@ -4108,9 +4108,9 @@ u8 func001c_surprised[] = { endloop(0x03) label(0x77) - set_function(CHR_SELF, GFUNC_ALERTED) - set_return_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + set_returnlist(CHR_SELF, GFUNC_ALERTED) + endlist }; u8 func0011_flee_from_grenade[] = { @@ -4131,12 +4131,12 @@ u8 func0011_flee_from_grenade[] = { label(0x16) return - endfunction + endlist }; u8 func001b_observe_camspy[] = { stop_chr - set_onshot_function(GFUNC_ALERTED) + set_shotlist(GFUNC_ALERTED) unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1) set_chr_special_death_animation(CHR_SELF, 0) set_follow_chr(CHR_TARGET) @@ -4224,7 +4224,7 @@ u8 func001b_observe_camspy[] = { label(0x16) try_aim_and_shoot_thing2(0x0200, 0x0000, /*goto*/ 0xc3) - // Wait until shooting animation done + // Wait until shooting chr_do_animation done beginloop(0xc3) if_chr_stopped(/*goto*/ 0x16) endloop(0xc3) @@ -4257,8 +4257,8 @@ u8 func001b_observe_camspy[] = { set_target_chr(CHR_BOND) dprint 'E','8','\n',0, set_self_flag_bankx(CHRFLAG1_10000000, BANK_1) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; u8 func001d_search_for_player[] = { @@ -4269,8 +4269,8 @@ u8 func001d_search_for_player[] = { // Dying label(0x13) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x16) @@ -4343,19 +4343,19 @@ u8 func001d_search_for_player[] = { if_rand_lt(128, /*goto*/ 0x29) if_rand_lt(196, /*goto*/ 0x2a) set_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1) - animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025B, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x04) label(0x28) - animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025C, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x04) label(0x29) - animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025D, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x04) label(0x2a) - animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x10, 0x0a, CHR_SELF, 2) + chr_do_animation(ANIM_LOOK_AROUND_025E, 0, -1, 0x10, 0x0a, CHR_SELF, 2) goto_next(0x04) label(0x13) @@ -4419,8 +4419,8 @@ u8 func001d_search_for_player[] = { label(0x13) set_alertness(0) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x16) set_alertness(100) @@ -4428,7 +4428,7 @@ u8 func001d_search_for_player[] = { if_self_flag_bankx_eq(CHRFLAG1_00000400, FALSE, BANK_1, /*goto*/ 0x13) say_quip(CHR_BOND, 0x1b, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) label(0x13) - set_function(CHR_SELF, GFUNC_ALERTED) + set_ailist(CHR_SELF, GFUNC_ALERTED) label(0x0b) say_quip(CHR_BOND, 0x23, 0x32, 0x03, 0xff, BANK_0, 0x00, 0x00) goto_first(0x05) @@ -4439,14 +4439,14 @@ u8 func001d_search_for_player[] = { label(0x13) set_alertness(0) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_function(CHR_SELF, GFUNC_UNALERTED) + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_ailist(CHR_SELF, GFUNC_UNALERTED) label(0x16) - set_return_function(CHR_SELF, GFUNC_UNALERTED) - set_onshot_function(GFUNC_COMBAT_WITH_TARGET) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_UNALERTED) + set_shotlist(GFUNC_COMBAT_WITH_TARGET) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func001f_related_to_spawning[] = { @@ -4458,14 +4458,14 @@ u8 func001f_related_to_spawning[] = { // Dying label(0x13) - set_onshot_function(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_shotlist(GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x16) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) set_target_chr(CHR_P1P2) - set_onshot_function(GFUNC_RELATED_TO_SPAWNING) + set_shotlist(GFUNC_RELATED_TO_SPAWNING) if_num_times_shot_lt(1, /*goto*/ 0x1a) // pointless check label(0x1a) set_action(MA_NORMAL, TRUE) @@ -4510,35 +4510,35 @@ u8 func001f_related_to_spawning[] = { label(0x9f) set_squadron_alertness(100) set_alertness(255) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x1f) yield say_quip(CHR_BOND, 0x09, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) if_self_flag_bankx_eq(CHRFLAG0_CAN_HEARSPAWN, TRUE, BANK_0, /*goto*/ 0xda) set_squadron_alertness(100) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0xda) if_never_been_onscreen(/*goto*/ 0x0e) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x0e) if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x0e) if_chr_unloaded(CHR_CLONE, /*goto*/ 0x0e) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) label(0x0e) try_spawn_clone2(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER, 0x00000000, /*goto*/ 0x13) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x13) - set_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) // Alert label(0x78) @@ -4547,18 +4547,18 @@ u8 func001f_related_to_spawning[] = { goto_first(0xda) label(0x13) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(0x12) if_self_flag_bankx_eq(CHRFLAG1_00100000, TRUE, BANK_1, /*goto*/ 0x13) - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) label(0x13) dprint 'W','A','R','N','E','D','B','E','N','D','3','\n',0, - set_return_function(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_RELATED_TO_SPAWNING) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; /** @@ -4628,8 +4628,8 @@ u8 func0012_init_coop_100[] = { set_stage_flag(0x00000080) label(0x15) - set_function(CHR_SELF, GFUNC_COOP_BUDDY) - endfunction + set_ailist(CHR_SELF, GFUNC_COOP_BUDDY) + endlist }; /** @@ -4688,20 +4688,20 @@ u8 func0013_init_coop_200[] = { set_stage_flag(0x00000080) label(0x15) - set_function(CHR_SELF, GFUNC_COOP_BUDDY) - endfunction + set_ailist(CHR_SELF, GFUNC_COOP_BUDDY) + endlist }; u8 func0014_coop_buddy[] = { #define LABEL_PLACE_BUDDY 0x0a - set_return_function(CHR_SELF, GFUNC_COOP_BUDDY) - set_onshot_function(GFUNC_COOP_BUDDY) + set_returnlist(CHR_SELF, GFUNC_COOP_BUDDY) + set_shotlist(GFUNC_COOP_BUDDY) dprint 'B','A','C','K',' ','T','O',' ','B','U','D','D','Y','\n',0, unset_self_chrflag(CHRCFLAG_00040000) set_self_flag_bankx(CHRFLAG1_00100000, BANK_1) set_morale(0) - set_onshot_function(GFUNC_COOP_BUDDY) + set_shotlist(GFUNC_COOP_BUDDY) set_target_chr(CHR_BOND) if_chr_dying(CHR_SELF, /*goto*/ 0x13) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) @@ -4711,7 +4711,7 @@ u8 func0014_coop_buddy[] = { // Dying label(0x13) dprint 'B','U','D','D','Y',' ','D','I','E','\n',0, - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x16) @@ -4861,12 +4861,12 @@ u8 func0014_coop_buddy[] = { label(0x13) set_self_flag_bankx(CHRFLAG1_00000001, BANK_1) label(0x16) - set_return_function(CHR_SELF, GFUNC_COOP_BUDDY) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + set_returnlist(CHR_SELF, GFUNC_COOP_BUDDY) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) label(LABEL_PLACE_BUDDY) - set_function(CHR_SELF, GFUNC_PLACE_COOP_BUDDY) - endfunction + set_ailist(CHR_SELF, GFUNC_PLACE_COOP_BUDDY) + endlist }; /** @@ -4881,7 +4881,7 @@ u8 func002b_do_something_and_wait[] = { label(0x16) return - endfunction + endlist }; /** @@ -4921,8 +4921,8 @@ u8 func0022_comment_on_player_dead[] = { endloop(0x04) // Unreachable - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -4937,7 +4937,7 @@ u8 func0023_dodge[] = { // Dying label(0x16) set_aishootingatmelist(GFUNC_IDLE) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) label(0x13) dprint 'D','O','D','O','\n',0, @@ -4968,8 +4968,8 @@ u8 func0023_dodge[] = { // Unable to hop sideways, or follow-through from above label(0x2e) set_self_flag_bankx(CHRFLAG1_00020000, BANK_1) - set_function(CHR_SELF, GFUNC_ALERTED) - endfunction + set_ailist(CHR_SELF, GFUNC_ALERTED) + endlist }; /** @@ -5052,10 +5052,10 @@ u8 func0015_test_cutscene_buddy[] = { unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) unset_chr_hiddenflag(CHR_SELF, 0x00100200) set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_return_function(CHR_SELF, GFUNC_COOP_BUDDY) - set_onshot_function(GFUNC_COOP_BUDDY) - set_function(CHR_SELF, GFUNC_COOP_BUDDY) - endfunction + set_returnlist(CHR_SELF, GFUNC_COOP_BUDDY) + set_shotlist(GFUNC_COOP_BUDDY) + set_ailist(CHR_SELF, GFUNC_COOP_BUDDY) + endlist }; /** @@ -5064,8 +5064,8 @@ u8 func0015_test_cutscene_buddy[] = { u8 func002c_init_search_unused[] = { set_self_flag_bankx(CHRFLAG1_00000400, BANK_1) set_self_flag_bankx(CHRFLAG1_10000000, BANK_1) - set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) - endfunction + set_ailist(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER) + endlist }; /** @@ -5102,7 +5102,7 @@ u8 func0024_follow_bond[] = { label(0x16) goto_first(0x03) - endfunction + endlist }; /** @@ -5127,11 +5127,11 @@ u8 func0025_pointless[] = { label(0x13) goto_first(0x03) - endfunction + endlist }; u8 func0026_init_psychosis[] = { - set_onshot_function(GFUNC_INIT_PSYCHOSIS) + set_shotlist(GFUNC_INIT_PSYCHOSIS) set_chr_team(CHR_SELF, TEAM_NONCOMBAT) set_self_flag_bankx(CHRFLAG1_80000000, BANK_1) set_self_chrflag(CHRCFLAG_00040000) @@ -5152,9 +5152,9 @@ u8 func0026_init_psychosis[] = { yield yield yield - animation(ANIM_BIG_SNEEZE, -1, -1, 0x10, 0x14, CHR_SELF, 2) + chr_do_animation(ANIM_BIG_SNEEZE, -1, -1, 0x10, 0x14, CHR_SELF, 2) - // Wait for animation to finish + // Wait for chr_do_animation to finish beginloop(0x03) if_chr_stopped(/*goto*/ 0x16) endloop(0x03) @@ -5167,13 +5167,13 @@ u8 func0026_init_psychosis[] = { label(0x16) set_target_chr(-1) - set_function(CHR_SELF, GFUNC_PSYCHOSISED) - endfunction + set_ailist(CHR_SELF, GFUNC_PSYCHOSISED) + endlist }; u8 func0027_psychosised[] = { set_morale(0) - set_onshot_function(GFUNC_PSYCHOSISED) + set_shotlist(GFUNC_PSYCHOSISED) set_target_chr(CHR_PRESET) if_chr_dying(CHR_SELF, /*goto*/ 0x13) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) @@ -5182,7 +5182,7 @@ u8 func0027_psychosised[] = { // Dying label(0x13) - set_function(CHR_SELF, GFUNC_IDLE) + set_ailist(CHR_SELF, GFUNC_IDLE) // Alive label(0x16) @@ -5267,16 +5267,16 @@ u8 func0027_psychosised[] = { say_quip(CHR_BOND, 0x15, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00) // "Give it up!","Surrender, now!","Take that!" label(0x13) - set_return_function(CHR_SELF, GFUNC_PSYCHOSISED) - set_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) - endfunction + set_returnlist(CHR_SELF, GFUNC_PSYCHOSISED) + set_ailist(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) + endlist }; u8 func002d_invincible_and_idle[] = { set_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) set_self_chrflag(CHRCFLAG_UNEXPLODABLE) - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; u8 func0020_place_coop_buddy[] = { @@ -5337,8 +5337,8 @@ u8 func0020_place_coop_buddy[] = { stop_chr set_chr_cloaked(CHR_SELF, FALSE, TRUE) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_BUDDY_PLACED) - set_return_function(CHR_SELF, GFUNC_COOP_BUDDY) - set_function(CHR_SELF, GFUNC_COOP_BUDDY) + set_returnlist(CHR_SELF, GFUNC_COOP_BUDDY) + set_ailist(CHR_SELF, GFUNC_COOP_BUDDY) // Not Deep Sea nor Air Force One label(0x15) @@ -5388,16 +5388,16 @@ u8 func0020_place_coop_buddy[] = { unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE) stop_chr set_chr_cloaked(CHR_SELF, FALSE, TRUE) - set_return_function(CHR_SELF, GFUNC_COOP_BUDDY) - set_function(CHR_SELF, GFUNC_COOP_BUDDY) - endfunction + set_returnlist(CHR_SELF, GFUNC_COOP_BUDDY) + set_ailist(CHR_SELF, GFUNC_COOP_BUDDY) + endlist }; u8 func0021_stop_and_idle[] = { - set_onshot_function(GFUNC_STOP_AND_IDLE) + set_shotlist(GFUNC_STOP_AND_IDLE) stop_chr - set_function(CHR_SELF, GFUNC_IDLE) - endfunction + set_ailist(CHR_SELF, GFUNC_IDLE) + endlist }; /** @@ -5407,7 +5407,7 @@ u8 func0029_ai_bot_init[] = { dprint 'l','i','s','t',':',' ','a','i','b','o','t','i','n','i','t',0, set_chr_health(CHR_SELF, 80) set_reaction_speed(100) - set_return_function(CHR_SELF, GFUNC_AI_BOT_ALIVE) + set_returnlist(CHR_SELF, GFUNC_AI_BOT_ALIVE) beginloop(0x19) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) @@ -5417,8 +5417,8 @@ u8 func0029_ai_bot_init[] = { endloop(0x19) label(0x16) - set_function(CHR_SELF, GFUNC_AI_BOT_ALIVE) - endfunction + set_ailist(CHR_SELF, GFUNC_AI_BOT_ALIVE) + endlist }; u8 func0028_ai_bot_dead[] = { @@ -5429,8 +5429,8 @@ u8 func0028_ai_bot_dead[] = { endloop(0x0d) label(0x16) - set_function(CHR_SELF, GFUNC_AI_BOT_INIT) - endfunction + set_ailist(CHR_SELF, GFUNC_AI_BOT_INIT) + endlist }; u8 func002a_ai_bot_alive[] = { @@ -5439,8 +5439,8 @@ u8 func002a_ai_bot_alive[] = { endloop(0xf8) label(0xf9) - set_function(CHR_SELF, GFUNC_AI_BOT_DEAD) - endfunction + set_ailist(CHR_SELF, GFUNC_AI_BOT_DEAD) + endlist }; // 20c78 diff --git a/src/setup/inventory.c b/src/setup/inventory.c index 621de7c23..f668db777 100644 --- a/src/setup/inventory.c +++ b/src/setup/inventory.c @@ -135,7 +135,7 @@ struct inventory_function invfunc_00011160 = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -158,7 +158,7 @@ struct inventory_ammo invammo_default = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -166,10 +166,10 @@ struct inventory_ammo invammo_default = { struct weapon invitem_hammer = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function &invammo_default, // pri ammo @@ -193,10 +193,10 @@ struct weapon invitem_hammer = { struct weapon invitem_nothing = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -263,7 +263,7 @@ struct inventory_function invfunc_unarmed_punch = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - invanim_punch, // fire animation + invanim_punch, // fire chr_do_animation 0x0041a200, // flags }; @@ -291,7 +291,7 @@ struct inventory_function invfunc_unarmed_disarm = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - invanim_punch, // fire animation + invanim_punch, // fire chr_do_animation 0x0041a600, // flags }; @@ -314,10 +314,10 @@ u32 var8006b358 = 0x00000000; struct weapon invitem_unarmed = { 0x04e5, // lo model 0x04e5, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_unarmed_punch, // pri function &invfunc_unarmed_disarm, // sec function NULL, // pri ammo @@ -516,7 +516,7 @@ struct inventory_function invfunc_falcon2_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_falcon2_shoot, // fire animation + invanim_falcon2_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -541,7 +541,7 @@ struct inventory_function invfunc_falcon2silenced_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_falcon2_shoot, // fire animation + invanim_falcon2_shoot, // fire chr_do_animation 0x00002000, // flags }; @@ -566,7 +566,7 @@ struct inventory_function invfunc_falcon2_pistolwhip = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - invanim_falcon2_pistolwhip, // fire animation + invanim_falcon2_pistolwhip, // fire chr_do_animation 0x0041a200, // flags }; @@ -592,7 +592,7 @@ struct inventory_ammo invammo_falcon2 = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size - invanim_falcon2_reload, // reload animation + invanim_falcon2_reload, // reload chr_do_animation 0, // style }; @@ -603,7 +603,7 @@ struct inventory_ammo invammo_falcon2scope = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size - invanim_falcon2scope_reload, // reload animation + invanim_falcon2scope_reload, // reload chr_do_animation 0, // style }; @@ -611,10 +611,10 @@ struct inventory_ammo invammo_falcon2scope = { struct weapon invitem_falcon2 = { 0x0377, // lo model 0x039c, // hi model - invanim_falcon2_equip, // equip animation - invanim_falcon2_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_falcon2_equip, // equip chr_do_animation + invanim_falcon2_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_falcon2_singleshot, // pri function &invfunc_falcon2_pistolwhip, // sec function &invammo_falcon2, // pri ammo @@ -638,10 +638,10 @@ struct weapon invitem_falcon2 = { struct weapon invitem_falcon2scope = { 0x0377, // lo model 0x039c, // hi model - invanim_falcon2_equip, // equip animation - invanim_falcon2_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_falcon2_equip, // equip chr_do_animation + invanim_falcon2_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_falcon2_singleshot, // pri function &invfunc_falcon2_pistolwhip, // sec function &invammo_falcon2scope, // pri ammo @@ -665,10 +665,10 @@ struct weapon invitem_falcon2scope = { struct weapon invitem_falcon2silencer = { 0x0377, // lo model 0x039c, // hi model - invanim_falcon2_equip, // equip animation - invanim_falcon2_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_falcon2_equip, // equip chr_do_animation + invanim_falcon2_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_falcon2silenced_singleshot, // pri function &invfunc_falcon2_pistolwhip, // sec function &invammo_falcon2, // pri ammo @@ -777,7 +777,7 @@ struct inventory_function invfunc_magsec_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_magsec_equiporshoot, // fire animation + invanim_magsec_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -802,7 +802,7 @@ struct inventory_function invfunc_magsec_burst = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_magsec_equiporshoot, // fire animation + invanim_magsec_equiporshoot, // fire chr_do_animation 0x00000002, // flags }; @@ -825,7 +825,7 @@ struct inventory_ammo invammo_magsec = { AMMOTYPE_PISTOL, CASING_STANDARD, 9, // clip size - invanim_magsec_reload, // reload animation + invanim_magsec_reload, // reload chr_do_animation 0, // style }; @@ -833,10 +833,10 @@ struct inventory_ammo invammo_magsec = { struct weapon invitem_magsec = { 0x0378, // lo model 0x04c4, // hi model - invanim_magsec_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_magsec_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_magsec_singleshot, // pri function &invfunc_magsec_burst, // sec function &invammo_magsec, // pri ammo @@ -967,7 +967,7 @@ struct inventory_function invfunc_dy357_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_dy357_equiporshoot, // fire animation + invanim_dy357_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -992,7 +992,7 @@ struct inventory_function invfunc_dy357lx_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_dy357_equiporshoot, // fire animation + invanim_dy357_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1017,7 +1017,7 @@ struct inventory_function invfunc_dy357_pistolwhip = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - invanim_dy357_pistolwhip, // fire animation + invanim_dy357_pistolwhip, // fire chr_do_animation 0x0041a200, // flags }; @@ -1043,7 +1043,7 @@ struct inventory_ammo invammo_dy357 = { AMMOTYPE_MAGNUM, CASING_STANDARD, 6, // clip size - invanim_dy357_reload, // reload animation + invanim_dy357_reload, // reload chr_do_animation 0, // style }; @@ -1051,10 +1051,10 @@ struct inventory_ammo invammo_dy357 = { struct weapon invitem_dy357 = { 0x037a, // lo model 0x04bd, // hi model - invanim_dy357_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_dy357_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_dy357_singleshot, // pri function &invfunc_dy357_pistolwhip, // sec function &invammo_dy357, // pri ammo @@ -1078,10 +1078,10 @@ struct weapon invitem_dy357 = { struct weapon invitem_dy357lx = { 0x037b, // lo model 0x04be, // hi model - invanim_dy357_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_dy357_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_dy357lx_singleshot, // pri function &invfunc_dy357_pistolwhip, // sec function &invammo_dy357, // pri ammo @@ -1163,7 +1163,7 @@ struct inventory_function invfunc_phoenix_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_phoenix_shoot, // fire animation + invanim_phoenix_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1188,7 +1188,7 @@ struct inventory_function invfunc_phoenix_explosiveshells = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_phoenix_shoot, // fire animation + invanim_phoenix_shoot, // fire chr_do_animation 0x00004000, // flags }; @@ -1211,7 +1211,7 @@ struct inventory_ammo invammo_phoenix = { AMMOTYPE_PISTOL, CASING_NONE, 8, // clip size - invanim_phoenix_equiporreload, // reload animation + invanim_phoenix_equiporreload, // reload chr_do_animation 0, // style }; @@ -1219,10 +1219,10 @@ struct inventory_ammo invammo_phoenix = { struct weapon invitem_phoenix = { 0x037c, // lo model 0x04c5, // hi model - invanim_phoenix_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_phoenix_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_phoenix_singleshot, // pri function &invfunc_phoenix_explosiveshells, // sec function &invammo_phoenix, // pri ammo @@ -1324,7 +1324,7 @@ struct inventory_function invfunc_mauler_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_mauler_equiporshoot, // fire animation + invanim_mauler_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1349,7 +1349,7 @@ struct inventory_function invfunc_mauler_chargeshot = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_mauler_equiporshoot, // fire animation + invanim_mauler_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1372,7 +1372,7 @@ struct inventory_ammo invammo_mauler = { AMMOTYPE_PISTOL, CASING_NONE, 20, // clip size - invanim_mauler_reload, // reload animation + invanim_mauler_reload, // reload chr_do_animation 0, // style }; @@ -1380,10 +1380,10 @@ struct inventory_ammo invammo_mauler = { struct weapon invitem_mauler = { 0x0379, // lo model 0x04cb, // hi model - invanim_mauler_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_mauler_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_mauler_singleshot, // pri function &invfunc_mauler_chargeshot, // sec function &invammo_mauler, // pri ammo @@ -1493,7 +1493,7 @@ struct inventory_function invfunc_cmp150_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_cmp150_equiporshoot, // fire animation + invanim_cmp150_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1523,7 +1523,7 @@ struct inventory_function invfunc_cmp150_followlockon = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_cmp150_equiporshoot, // fire animation + invanim_cmp150_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1551,7 +1551,7 @@ struct inventory_ammo invammo_cmp150 = { AMMOTYPE_SMG, CASING_STANDARD, 32, // clip size - invanim_cmp150_reload, // reload animation + invanim_cmp150_reload, // reload chr_do_animation 0, // style }; @@ -1559,10 +1559,10 @@ struct inventory_ammo invammo_cmp150 = { struct weapon invitem_cmp150 = { 0x037d, // lo model 0x04b9, // hi model - invanim_cmp150_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_cmp150_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_cmp150_rapidfire, // pri function &invfunc_cmp150_followlockon, // sec function &invammo_cmp150, // pri ammo @@ -1640,7 +1640,7 @@ struct inventory_function invfunc_cyclone_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_cyclone_shoot, // fire animation + invanim_cyclone_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1670,7 +1670,7 @@ struct inventory_function invfunc_cyclone_magazinedischarge = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_cyclone_shoot, // fire animation + invanim_cyclone_shoot, // fire chr_do_animation 0x00000020, // flags }; @@ -1698,7 +1698,7 @@ struct inventory_ammo invammo_cyclone = { AMMOTYPE_SMG, CASING_NONE, 50, // clip size - invanim_cyclone_equiporreload, // reload animation + invanim_cyclone_equiporreload, // reload chr_do_animation 0, // style }; @@ -1706,10 +1706,10 @@ struct inventory_ammo invammo_cyclone = { struct weapon invitem_cyclone = { 0x0382, // lo model 0x04bb, // hi model - invanim_cyclone_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_cyclone_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_cyclone_rapidfire, // pri function &invfunc_cyclone_magazinedischarge, // sec function &invammo_cyclone, // pri ammo @@ -1774,7 +1774,7 @@ struct inventory_function invfunc_rcp120_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_rcp120_equiporshoot, // fire animation + invanim_rcp120_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1804,7 +1804,7 @@ struct inventory_function invfunc_rcp120_cloak = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00102000, // flags }; @@ -1819,7 +1819,7 @@ struct inventory_ammo invammo_rcp120 = { AMMOTYPE_SMG, CASING_STANDARD, 120, // clip size - invanim_rcp120_reload, // reload animation + invanim_rcp120_reload, // reload chr_do_animation 0, // style }; @@ -1827,10 +1827,10 @@ struct inventory_ammo invammo_rcp120 = { struct weapon invitem_rcp120 = { 0x0384, // lo model 0x04c8, // hi model - invanim_rcp120_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_rcp120_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_rcp120_rapidfire, // pri function &invfunc_rcp120_cloak, // sec function &invammo_rcp120, // pri ammo @@ -1890,7 +1890,7 @@ struct inventory_function invfunc_callisto_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_callisto_shoot, // fire animation + invanim_callisto_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1920,7 +1920,7 @@ struct inventory_function invfunc_callisto_highimpactshells = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_callisto_shoot, // fire animation + invanim_callisto_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -1948,7 +1948,7 @@ struct inventory_ammo invammo_callisto = { AMMOTYPE_SMG, CASING_NONE, 32, // clip size - invanim_callisto_equiporreload, // reload animation + invanim_callisto_equiporreload, // reload chr_do_animation 0, // style }; @@ -1956,10 +1956,10 @@ struct inventory_ammo invammo_callisto = { struct weapon invitem_callisto = { 0x0383, // lo model 0x04c6, // hi model - invanim_callisto_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_callisto_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_callisto_rapidfire, // pri function &invfunc_callisto_highimpactshells, // sec function &invammo_callisto, // pri ammo @@ -2021,7 +2021,7 @@ struct inventory_function invfunc_dragon_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_dragon_equiporshoot, // fire animation + invanim_dragon_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -2051,7 +2051,7 @@ struct inventory_function invfunc_dragon_selfdestruct = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00042040, // flags }; @@ -2067,7 +2067,7 @@ struct inventory_ammo invammo_dragon = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - invanim_dragon_reload, // reload animation + invanim_dragon_reload, // reload chr_do_animation 0, // style }; @@ -2075,10 +2075,10 @@ struct inventory_ammo invammo_dragon = { struct weapon invitem_dragon = { 0x037f, // lo model 0x04c0, // hi model - invanim_dragon_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_dragon_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_dragon_rapidfire, // pri function &invfunc_dragon_selfdestruct, // sec function &invammo_dragon, // pri ammo @@ -2176,7 +2176,7 @@ struct inventory_function invfunc_superdragon_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_superdragon_equiporshoot, // fire animation + invanim_superdragon_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -2206,7 +2206,7 @@ struct inventory_function invfunc_superdragon_grenadelauncher = { 0x00, // unk06 1, // unk07 &invmenupos_00011048, // menupos - invanim_superdragon_shootgrenade, // fire animation + invanim_superdragon_shootgrenade, // fire chr_do_animation 0x30000040, // flags }; @@ -2238,7 +2238,7 @@ struct inventory_ammo invammo_superdragon = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - invanim_superdragon_reload, // reload animation + invanim_superdragon_reload, // reload chr_do_animation 0, // style }; @@ -2249,7 +2249,7 @@ struct inventory_ammo invammo_superdragon_grenades = { AMMOTYPE_DEVASTATOR, CASING_NONE, 6, // clip size - invanim_superdragon_grenadereload, // reload animation + invanim_superdragon_grenadereload, // reload chr_do_animation 0, // style }; @@ -2257,10 +2257,10 @@ struct inventory_ammo invammo_superdragon_grenades = { struct weapon invitem_superdragon = { 0x0380, // lo model 0x04c1, // hi model - invanim_superdragon_equiporshoot, // equip animation - NULL, // unequip animation - invanim_superdragon_pritosec, // pritosec animation - invanim_superdragon_sectopri, // sectopri animation + invanim_superdragon_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + invanim_superdragon_pritosec, // pritosec chr_do_animation + invanim_superdragon_sectopri, // sectopri chr_do_animation &invfunc_superdragon_rapidfire, // pri function &invfunc_superdragon_grenadelauncher, // sec function &invammo_superdragon, // pri ammo @@ -2332,7 +2332,7 @@ struct inventory_function invfunc_ar34_burstfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000002, // flags }; @@ -2362,7 +2362,7 @@ struct inventory_function invfunc_ar34_usescope = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000002, // flags }; @@ -2390,7 +2390,7 @@ struct inventory_ammo invammo_ar34 = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - invanim_ar34_equiporreload, // reload animation + invanim_ar34_equiporreload, // reload chr_do_animation 0, // style }; @@ -2398,10 +2398,10 @@ struct inventory_ammo invammo_ar34 = { struct weapon invitem_ar34 = { 0x037e, // lo model 0x04b7, // hi model - invanim_ar34_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_ar34_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_ar34_burstfire, // pri function &invfunc_ar34_usescope, // sec function &invammo_ar34, // pri ammo @@ -2489,7 +2489,7 @@ struct inventory_function invfunc_k7avenger_burstfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000002, // flags }; @@ -2519,7 +2519,7 @@ struct inventory_function invfunc_k7avenger_threatdetector = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00082002, // flags }; @@ -2547,7 +2547,7 @@ struct inventory_ammo invammo_k7avenger = { AMMOTYPE_RIFLE, CASING_RIFLE, 25, // clip size - invanim_k7avenger_reload, // reload animation + invanim_k7avenger_reload, // reload chr_do_animation 0, // style }; @@ -2555,10 +2555,10 @@ struct inventory_ammo invammo_k7avenger = { struct weapon invitem_k7avenger = { 0x0381, // lo model 0x04b8, // hi model - invanim_k7avenger_equip, // equip animation - invanim_k7avenger_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_k7avenger_equip, // equip chr_do_animation + invanim_k7avenger_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_k7avenger_burstfire, // pri function &invfunc_k7avenger_threatdetector, // sec function &invammo_k7avenger, // pri ammo @@ -2654,7 +2654,7 @@ struct inventory_function invfunc_laptopgun_burstfire = { 0x00, // unk06 0, // unk07 &invmenupos_00011020, // menupos - invanim_laptopgun_shoot, // fire animation + invanim_laptopgun_shoot, // fire chr_do_animation 0x00000002, // flags }; @@ -2684,7 +2684,7 @@ struct inventory_function invfunc_laptopgun_deploy = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00842140, // flags }; @@ -2700,7 +2700,7 @@ struct inventory_ammo invammo_laptopgun = { AMMOTYPE_SMG, CASING_NONE, 50, // clip size - invanim_laptopgun_reload, // reload animation + invanim_laptopgun_reload, // reload chr_do_animation 0, // style }; @@ -2708,10 +2708,10 @@ struct inventory_ammo invammo_laptopgun = { struct weapon invitem_laptopgun = { 0x0385, // lo model 0x04c7, // hi model - invanim_laptopgun_equip, // equip animation - invanim_laptopgun_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_laptopgun_equip, // equip chr_do_animation + invanim_laptopgun_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_laptopgun_burstfire, // pri function &invfunc_laptopgun_deploy, // sec function &invammo_laptopgun, // pri ammo @@ -2782,7 +2782,7 @@ struct inventory_function invfunc_shotgun_single = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_shotgun_equiporsingleshot, // fire animation + invanim_shotgun_equiporsingleshot, // fire chr_do_animation 0x00000000, // flags }; @@ -2807,7 +2807,7 @@ struct inventory_function invfunc_shotgun_double = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_shotgun_doubleshot, // fire animation + invanim_shotgun_doubleshot, // fire chr_do_animation 0x00001000, // flags }; @@ -2830,7 +2830,7 @@ struct inventory_ammo invammo_shotgun = { AMMOTYPE_SHOTGUN, CASING_SHOTGUN, 9, // clip size - invanim_shotgun_reload, // reload animation + invanim_shotgun_reload, // reload chr_do_animation 67108864, // style }; @@ -2838,10 +2838,10 @@ struct inventory_ammo invammo_shotgun = { struct weapon invitem_shotgun = { 0x0386, // lo model 0x04ca, // hi model - invanim_shotgun_equiporsingleshot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_shotgun_equiporsingleshot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_shotgun_single, // pri function &invfunc_shotgun_double, // sec function &invammo_shotgun, // pri ammo @@ -2941,7 +2941,7 @@ struct inventory_function invfunc_reaper_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001105c, // menupos - invanim_reaper_shoot, // fire animation + invanim_reaper_shoot, // fire chr_do_animation 0x00000002, // flags }; @@ -2971,7 +2971,7 @@ struct inventory_function invfunc_reaper_grind = { 0x00, // unk06 -1, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -2997,7 +2997,7 @@ struct inventory_ammo invammo_reaper = { AMMOTYPE_REAPER, CASING_REAPER, 200, // clip size - invanim_reaper_reload, // reload animation + invanim_reaper_reload, // reload chr_do_animation 0, // style }; @@ -3005,10 +3005,10 @@ struct inventory_ammo invammo_reaper = { struct weapon invitem_reaper = { 0x0387, // lo model 0x039d, // hi model - invanim_reaper_equip, // equip animation - invanim_reaper_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_reaper_equip, // equip chr_do_animation + invanim_reaper_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_reaper_shoot, // pri function &invfunc_reaper_grind, // sec function &invammo_reaper, // pri ammo @@ -3085,7 +3085,7 @@ struct inventory_function invfunc_rockerlauncher_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_rockerlauncher_equiporshoot, // fire animation + invanim_rockerlauncher_equiporshoot, // fire chr_do_animation 0x08000040, // flags }; @@ -3119,7 +3119,7 @@ struct inventory_function invfunc_rocketlauncher_homing = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_rockerlauncher_equiporshoot, // fire animation + invanim_rockerlauncher_equiporshoot, // fire chr_do_animation 0x48000040, // flags }; @@ -3151,7 +3151,7 @@ struct inventory_ammo invammo_rocketlauncher = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size - invanim_rocketlauncher_reload, // reload animation + invanim_rocketlauncher_reload, // reload chr_do_animation 0, // style }; @@ -3159,10 +3159,10 @@ struct inventory_ammo invammo_rocketlauncher = { struct weapon invitem_rocketlauncher = { 0x0388, // lo model 0x04c9, // hi model - invanim_rockerlauncher_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_rockerlauncher_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_rockerlauncher_shoot, // pri function &invfunc_rocketlauncher_homing, // sec function &invammo_rocketlauncher, // pri ammo @@ -3208,7 +3208,7 @@ struct inventory_function invfunc_slayer_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_slayer_equiporshoot, // fire animation + invanim_slayer_equiporshoot, // fire chr_do_animation 0x08000040, // flags }; @@ -3242,7 +3242,7 @@ struct inventory_function invfunc_slayer_flybywire = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x28000840, // flags }; @@ -3274,7 +3274,7 @@ struct inventory_ammo invammo_slayer = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size - invanim_slayer_reload, // reload animation + invanim_slayer_reload, // reload chr_do_animation 0, // style }; @@ -3282,10 +3282,10 @@ struct inventory_ammo invammo_slayer = { struct weapon invitem_slayer = { 0x038a, // lo model 0x04cc, // hi model - invanim_slayer_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_slayer_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_slayer_shoot, // pri function &invfunc_slayer_flybywire, // sec function &invammo_slayer, // pri ammo @@ -3342,7 +3342,7 @@ struct inventory_function invfunc_devastator_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_devastator_equiporshoot, // fire animation + invanim_devastator_equiporshoot, // fire chr_do_animation 0x30000040, // flags }; @@ -3376,7 +3376,7 @@ struct inventory_function invfunc_devastator_wallhugger = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_devastator_equiporshoot, // fire animation + invanim_devastator_equiporshoot, // fire chr_do_animation 0x30000140, // flags }; @@ -3408,7 +3408,7 @@ struct inventory_ammo invammo_devastator = { AMMOTYPE_DEVASTATOR, CASING_NONE, 8, // clip size - invanim_devastator_reload, // reload animation + invanim_devastator_reload, // reload chr_do_animation 134217728, // style }; @@ -3420,10 +3420,10 @@ s8 invg_00013a10[] = {41, 0, -1}; struct weapon invitem_devastator = { 0x0389, // lo model 0x04bf, // hi model - invanim_devastator_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_devastator_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_devastator_shoot, // pri function &invfunc_devastator_wallhugger, // sec function &invammo_devastator, // pri ammo @@ -3452,7 +3452,7 @@ struct inventory_function invfunc_mine_threatdetector = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00080000, // flags }; @@ -3485,7 +3485,7 @@ struct inventory_function invfunc_timedmine_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_mine_throw, // fire animation + invanim_mine_throw, // fire chr_do_animation 0x00802040, // flags }; @@ -3501,7 +3501,7 @@ struct inventory_ammo invammo_timedmine = { AMMOTYPE_TIMED_MINE, CASING_NONE, 1, // clip size - inanim_mine_equiporreload, // reload animation + inanim_mine_equiporreload, // reload chr_do_animation 33554432, // style }; @@ -3509,10 +3509,10 @@ struct inventory_ammo invammo_timedmine = { struct weapon invitem_timedmine = { 0x0391, // lo model 0x0391, // hi model - inanim_mine_equiporreload, // equip animation - invanim_mine_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + inanim_mine_equiporreload, // equip chr_do_animation + invanim_mine_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_timedmine_throw, // pri function &invfunc_mine_threatdetector, // sec function &invammo_timedmine, // pri ammo @@ -3579,7 +3579,7 @@ struct inventory_function invfunc_remotemine_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_remotemine_throw, // fire animation + invanim_remotemine_throw, // fire chr_do_animation 0x00802040, // flags }; @@ -3597,7 +3597,7 @@ struct inventory_function invfunc_remotemine_detonate = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00102000, // flags }; @@ -3612,7 +3612,7 @@ struct inventory_ammo invammo_remotemine = { AMMOTYPE_REMOTE_MINE, CASING_NONE, 1, // clip size - invanim_remotemine_equiporreload, // reload animation + invanim_remotemine_equiporreload, // reload chr_do_animation 33554432, // style }; @@ -3624,10 +3624,10 @@ s8 invg_00013c0c[] = {41, 0, -1}; struct weapon invitem_remotemine = { 0x0393, // lo model 0x0393, // hi model - invanim_remotemine_equiporreload, // equip animation - invanim_remotemine_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_remotemine_equiporreload, // equip chr_do_animation + invanim_remotemine_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_remotemine_throw, // pri function &invfunc_remotemine_detonate, // sec function &invammo_remotemine, // pri ammo @@ -3656,7 +3656,7 @@ struct inventory_function invfunc_proxymine_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_mine_throw, // fire animation + invanim_mine_throw, // fire chr_do_animation 0x00802040, // flags }; @@ -3672,7 +3672,7 @@ struct inventory_ammo invammo_proximitymine = { AMMOTYPE_PROXY_MINE, CASING_NONE, 1, // clip size - inanim_mine_equiporreload, // reload animation + inanim_mine_equiporreload, // reload chr_do_animation 33554432, // style }; @@ -3680,10 +3680,10 @@ struct inventory_ammo invammo_proximitymine = { struct weapon invitem_proximitymine = { 0x0392, // lo model 0x0392, // hi model - inanim_mine_equiporreload, // equip animation - invanim_mine_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + inanim_mine_equiporreload, // equip chr_do_animation + invanim_mine_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_proxymine_throw, // pri function &invfunc_mine_threatdetector, // sec function &invammo_proximitymine, // pri ammo @@ -3731,7 +3731,7 @@ struct inventory_function invfunc_ecmmine_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_ecmmine_throw, // fire animation + invanim_ecmmine_throw, // fire chr_do_animation 0x00802040, // flags }; @@ -3747,7 +3747,7 @@ struct inventory_ammo invammo_ecmmine = { AMMOTYPE_ECM_MINE, CASING_NONE, 1, // clip size - invanim_ecmmine_equiporreload, // reload animation + invanim_ecmmine_equiporreload, // reload chr_do_animation 33554432, // style }; @@ -3755,10 +3755,10 @@ struct inventory_ammo invammo_ecmmine = { struct weapon invitem_ecmmine = { 0x074d, // lo model 0x074d, // hi model - invanim_ecmmine_equiporreload, // equip animation - invanim_ecmmine_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_ecmmine_equiporreload, // equip chr_do_animation + invanim_ecmmine_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_ecmmine_throw, // pri function NULL, // sec function &invammo_ecmmine, // pri ammo @@ -3833,7 +3833,7 @@ struct inventory_function invfunc_grenade_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_grenade_throw, // fire animation + invanim_grenade_throw, // fire chr_do_animation 0x00002040, // flags }; @@ -3851,7 +3851,7 @@ struct inventory_function invfunc_grenade_pinball = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_grenade_throw, // fire animation + invanim_grenade_throw, // fire chr_do_animation 0x00002040, // flags }; @@ -3867,7 +3867,7 @@ struct inventory_ammo invammo_grenade = { AMMOTYPE_GRENADE, CASING_NONE, 1, // clip size - invanim_grenade_equiporreload, // reload animation + invanim_grenade_equiporreload, // reload chr_do_animation 167772160, // style }; @@ -3875,10 +3875,10 @@ struct inventory_ammo invammo_grenade = { struct weapon invitem_grenade = { 0x0390, // lo model 0x04fe, // hi model - invanim_grenade_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_grenade_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_grenade_throw, // pri function &invfunc_grenade_pinball, // sec function &invammo_grenade, // pri ammo @@ -3907,7 +3907,7 @@ struct inventory_function invfunc_nbomb_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_grenade_throw, // fire animation + invanim_grenade_throw, // fire chr_do_animation 0x00002640, // flags }; @@ -3925,7 +3925,7 @@ struct inventory_function invfunc_nbomb_proxy = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_grenade_throw, // fire animation + invanim_grenade_throw, // fire chr_do_animation 0x00002640, // flags }; @@ -3941,7 +3941,7 @@ struct inventory_ammo invammo_nbomb = { AMMOTYPE_NBOMB, CASING_NONE, 1, // clip size - invanim_grenade_equiporreload, // reload animation + invanim_grenade_equiporreload, // reload chr_do_animation 167772160, // style }; @@ -3949,10 +3949,10 @@ struct inventory_ammo invammo_nbomb = { struct weapon invitem_nbomb = { 0x04fc, // lo model 0x04fd, // hi model - invanim_grenade_equiporreload, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_grenade_equiporreload, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_nbomb_throw, // pri function &invfunc_nbomb_proxy, // sec function &invammo_nbomb, // pri ammo @@ -4018,7 +4018,7 @@ struct inventory_function invfunc_farsight_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_farsight_equiporshoot, // fire animation + invanim_farsight_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -4043,7 +4043,7 @@ struct inventory_function invfunc_farsight_targetlocator = { 0x00, // unk06 0, // unk07 &invmenupos_00011034, // menupos - invanim_farsight_equiporshoot, // fire animation + invanim_farsight_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -4066,7 +4066,7 @@ struct inventory_ammo invammo_farsight = { AMMOTYPE_FARSIGHT, CASING_NONE, 8, // clip size - invanim_farsight_reload, // reload animation + invanim_farsight_reload, // reload chr_do_animation 0, // style }; @@ -4078,10 +4078,10 @@ s8 invg_000140ac[] = {40, 0, -1}; struct weapon invitem_farsight = { 0x038b, // lo model 0x04ce, // hi model - invanim_farsight_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_farsight_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_farsight_shoot, // pri function &invfunc_farsight_targetlocator, // sec function &invammo_farsight, // pri ammo @@ -4163,7 +4163,7 @@ struct inventory_function invfunc_crossbow_lethal = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_crossbow_shoot, // fire animation + invanim_crossbow_shoot, // fire chr_do_animation 0x00802000, // flags }; @@ -4197,7 +4197,7 @@ struct inventory_function invfunc_crossbow_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_crossbow_shoot, // fire animation + invanim_crossbow_shoot, // fire chr_do_animation 0x00802200, // flags }; @@ -4229,7 +4229,7 @@ struct inventory_ammo invammo_crossbow = { AMMOTYPE_CROSSBOW, CASING_NONE, 5, // clip size - invanim_crossbow_reload, // reload animation + invanim_crossbow_reload, // reload chr_do_animation 67108864, // style }; @@ -4241,10 +4241,10 @@ s8 invg_000142bc[] = {40, 0, 41, 0, 42, 0, -1}; struct weapon invitem_crossbow = { 0x038d, // lo model 0x04ba, // hi model - invanim_crosbow_equip, // equip animation - invanim_crossbow_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_crosbow_equip, // equip chr_do_animation + invanim_crossbow_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_crossbow_shoot, // pri function &invfunc_crossbow_lethal, // sec function &invammo_crossbow, // pri ammo @@ -4322,7 +4322,7 @@ struct inventory_function invfunc_tranquilizer_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_tranquilizer_equiporshoot, // fire animation + invanim_tranquilizer_equiporshoot, // fire chr_do_animation 0x00000200, // flags }; @@ -4347,7 +4347,7 @@ struct inventory_function invfunc_tranquilizer_lethal = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_tranquilizer_lethalinject, // fire animation + invanim_tranquilizer_lethalinject, // fire chr_do_animation 0x00002000, // flags }; @@ -4373,7 +4373,7 @@ struct inventory_ammo invammo_tranquilizer = { AMMOTYPE_SEDATIVE, CASING_NONE, 8, // clip size - invanim_tranquilizer_reload, // reload animation + invanim_tranquilizer_reload, // reload chr_do_animation 0, // style }; @@ -4385,10 +4385,10 @@ s8 invg_00014494[] = {40, 0, 41, 0, 42, 0, -1}; struct weapon invitem_tranquilizer = { 0x038e, // lo model 0x04bc, // hi model - invanim_tranquilizer_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_tranquilizer_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_tranquilizer_shoot, // pri function &invfunc_tranquilizer_lethal, // sec function &invammo_tranquilizer, // pri ammo @@ -4415,7 +4415,7 @@ struct inventory_ammo invammo_psychosisgun = { AMMOTYPE_PSYCHOSIS, CASING_NONE, 8, // clip size - invanim_tranquilizer_reload, // reload animation + invanim_tranquilizer_reload, // reload chr_do_animation 0, // style }; @@ -4428,7 +4428,7 @@ struct inventory_function invfunc_psychosisgun_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_00010fe4, // menupos - invanim_tranquilizer_equiporshoot, // fire animation + invanim_tranquilizer_equiporshoot, // fire chr_do_animation 0x00200200, // flags }; @@ -4448,10 +4448,10 @@ u32 var8006e51c = 0x01000000; struct weapon invitem_psychosisgun = { 0x038e, // lo model 0x04bc, // hi model - invanim_tranquilizer_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_tranquilizer_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_psychosisgun_shoot, // pri function NULL, // sec function &invammo_psychosisgun, // pri ammo @@ -4522,7 +4522,7 @@ struct inventory_function invfunc_sniperrifle_singleshot = { 0x00, // unk06 0, // unk07 &invmenupos_00010ff8, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -4547,7 +4547,7 @@ struct inventory_function invfunc_sniperrifle_crouch = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00102000, // flags }; @@ -4562,7 +4562,7 @@ struct inventory_ammo invammo_sniperrifle = { AMMOTYPE_RIFLE, CASING_RIFLE, 8, // clip size - invanim_sniperrifle_reload, // reload animation + invanim_sniperrifle_reload, // reload chr_do_animation 0, // style }; @@ -4574,10 +4574,10 @@ s8 invg_000146a0[] = {41, 0, -1}; struct weapon invitem_sniperrifle = { 0x038c, // lo model 0x04cd, // hi model - invanim_sniperrifle_equip, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_sniperrifle_equip, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_sniperrifle_singleshot, // pri function &invfunc_sniperrifle_crouch, // sec function &invammo_sniperrifle, // pri ammo @@ -4618,7 +4618,7 @@ struct inventory_function invfunc_laser_pulse = { 0x00, // unk06 -1, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -4643,7 +4643,7 @@ struct inventory_function invfunc_laser_stream = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -4668,10 +4668,10 @@ u32 var8006e784 = 0x00000000; struct weapon invitem_laser = { 0x04df, // lo model 0x04c3, // hi model - invanim_laser_equip, // equip animation - invanim_laser_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_laser_equip, // equip chr_do_animation + invanim_laser_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_laser_pulse, // pri function &invfunc_laser_stream, // sec function NULL, // pri ammo @@ -4720,7 +4720,7 @@ struct inventory_function invfunc_pp9i_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_pp9i_equiporshoot, // fire animation + invanim_pp9i_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -4743,7 +4743,7 @@ struct inventory_ammo invammo_pp9i = { AMMOTYPE_PISTOL, CASING_STANDARD, 7, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -4751,10 +4751,10 @@ struct inventory_ammo invammo_pp9i = { struct weapon invitem_pp9i = { 0x0394, // lo model 0x0394, // hi model - invanim_pp9i_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_pp9i_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_pp9i_shoot, // pri function NULL, // sec function &invammo_pp9i, // pri ammo @@ -4790,7 +4790,7 @@ struct inventory_function invfunc_cc13_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_cc13_equiporshoot, // fire animation + invanim_cc13_equiporshoot, // fire chr_do_animation 0x00000000, // flags }; @@ -4813,7 +4813,7 @@ struct inventory_ammo invammo_cc13 = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -4821,10 +4821,10 @@ struct inventory_ammo invammo_cc13 = { struct weapon invitem_cc13 = { 0x0395, // lo model 0x0395, // hi model - invanim_cc13_equiporshoot, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_cc13_equiporshoot, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_cc13_shoot, // pri function NULL, // sec function &invammo_cc13, // pri ammo @@ -4853,7 +4853,7 @@ struct inventory_function invfunc_kl01313_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -4881,7 +4881,7 @@ struct inventory_ammo invammo_kl01313 = { AMMOTYPE_SMG, CASING_STANDARD, 20, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -4889,10 +4889,10 @@ struct inventory_ammo invammo_kl01313 = { struct weapon invitem_kl01313 = { 0x0396, // lo model 0x0396, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_kl01313_shoot, // pri function NULL, // sec function &invammo_kl01313, // pri ammo @@ -4921,7 +4921,7 @@ struct inventory_function invfunc_kf7special_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000002, // flags }; @@ -4949,7 +4949,7 @@ struct inventory_ammo invammo_kf7special = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -4957,10 +4957,10 @@ struct inventory_ammo invammo_kf7special = { struct weapon invitem_kf7special = { 0x0397, // lo model 0x0397, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_kf7special_shoot, // pri function NULL, // sec function &invammo_kf7special, // pri ammo @@ -4989,7 +4989,7 @@ struct inventory_function invfunc_zzt9mm_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5017,7 +5017,7 @@ struct inventory_ammo invammo_zzt9mm = { AMMOTYPE_SMG, CASING_STANDARD, 32, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5025,10 +5025,10 @@ struct inventory_ammo invammo_zzt9mm = { struct weapon invitem_zzt9mm = { 0x0398, // lo model 0x0398, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_zzt9mm_shoot, // pri function NULL, // sec function &invammo_zzt9mm, // pri ammo @@ -5057,7 +5057,7 @@ struct inventory_function invfunc_dmc_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5085,7 +5085,7 @@ struct inventory_ammo invammo_dmc = { AMMOTYPE_SMG, CASING_STANDARD, 30, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5093,10 +5093,10 @@ struct inventory_ammo invammo_dmc = { struct weapon invitem_dmc = { 0x0399, // lo model 0x0399, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_dmc_shoot, // pri function NULL, // sec function &invammo_dmc, // pri ammo @@ -5125,7 +5125,7 @@ struct inventory_function invfunc_ar53_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000002, // flags }; @@ -5153,7 +5153,7 @@ struct inventory_ammo invammo_ar53 = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5161,10 +5161,10 @@ struct inventory_ammo invammo_ar53 = { struct weapon invitem_ar53 = { 0x039a, // lo model 0x039a, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_ar53_shoot, // pri function NULL, // sec function &invammo_ar53, // pri ammo @@ -5193,7 +5193,7 @@ struct inventory_function invfunc_rcp45_shoot = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5221,7 +5221,7 @@ struct inventory_ammo invammo_rcp45 = { AMMOTYPE_SMG, CASING_STANDARD, 80, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5229,10 +5229,10 @@ struct inventory_ammo invammo_rcp45 = { struct weapon invitem_rcp45 = { 0x039b, // lo model 0x039b, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_rcp45_shoot, // pri function NULL, // sec function &invammo_rcp45, // pri ammo @@ -5261,7 +5261,7 @@ struct inventory_function invfunc_briefcase_use = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5275,10 +5275,10 @@ u32 var8006eddc = 0x00000000; struct weapon invitem_briefcase2 = { 0x039c, // lo model 0x039c, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_briefcase_use, // pri function &invfunc_briefcase_use, // sec function NULL, // pri ammo @@ -5307,7 +5307,7 @@ struct inventory_function invfunc_59_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5335,7 +5335,7 @@ struct inventory_ammo invammo_59 = { AMMOTYPE_SMG, CASING_RIFLE, 27, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5343,10 +5343,10 @@ struct inventory_ammo invammo_59 = { struct weapon invitem_59 = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_59_rapidfire, // pri function NULL, // sec function &invammo_59, // pri ammo @@ -5375,7 +5375,7 @@ struct inventory_function invfunc_5a_rapidfire = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5403,7 +5403,7 @@ struct inventory_ammo invammo_5a = { AMMOTYPE_SMG, CASING_RIFLE, 27, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -5411,10 +5411,10 @@ struct inventory_ammo invammo_5a = { struct weapon invitem_5a = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_5a_rapidfire, // pri function NULL, // sec function &invammo_5a, // pri ammo @@ -5511,7 +5511,7 @@ struct inventory_function invfunc_combatknife_slash = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_combatknife_slash, // fire animation + invanim_combatknife_slash, // fire chr_do_animation 0x00002000, // flags }; @@ -5539,7 +5539,7 @@ struct inventory_function invfunc_combatknife_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - invanim_combatknife_throw, // fire animation + invanim_combatknife_throw, // fire chr_do_animation 0x00802000, // flags }; @@ -5555,7 +5555,7 @@ struct inventory_ammo invammo_combatknife = { AMMOTYPE_KNIFE, CASING_NONE, 1, // clip size - invanim_combatknife_reload, // reload animation + invanim_combatknife_reload, // reload chr_do_animation 167772160, // style }; @@ -5563,10 +5563,10 @@ struct inventory_ammo invammo_combatknife = { struct weapon invitem_combatknife = { 0x038f, // lo model 0x04c2, // hi model - invanim_combatknife_equip, // equip animation - NULL, // unequip animation - invanim_combatknife_pritosec, // pritosec animation - invanim_combatknife_sectopri, // sectopri animation + invanim_combatknife_equip, // equip chr_do_animation + NULL, // unequip chr_do_animation + invanim_combatknife_pritosec, // pritosec chr_do_animation + invanim_combatknife_sectopri, // sectopri chr_do_animation &invfunc_combatknife_slash, // pri function &invfunc_combatknife_throw, // sec function &invammo_combatknife, // pri ammo @@ -5595,7 +5595,7 @@ struct inventory_function invfunc_bug_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00802040, // flags }; @@ -5613,7 +5613,7 @@ struct inventory_function invfunc_targetamplifier_throw = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00802040, // flags }; @@ -5629,7 +5629,7 @@ struct inventory_ammo invammo_bug = { AMMOTYPE_BUG, CASING_NONE, 1, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 33554432, // style }; @@ -5637,10 +5637,10 @@ struct inventory_ammo invammo_bug = { struct weapon invitem_commsrider = { 0x0087, // lo model 0x0087, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_bug_throw, // pri function NULL, // sec function &invammo_bug, // pri ammo @@ -5664,10 +5664,10 @@ struct weapon invitem_commsrider = { struct weapon invitem_tracerbug = { 0x0087, // lo model 0x0087, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_bug_throw, // pri function NULL, // sec function &invammo_bug, // pri ammo @@ -5691,10 +5691,10 @@ struct weapon invitem_tracerbug = { struct weapon invitem_targetamplifier = { 0x07b2, // lo model 0x07b2, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_targetamplifier_throw, // pri function NULL, // sec function &invammo_bug, // pri ammo @@ -5723,7 +5723,7 @@ struct inventory_function invfunc_nightvision_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5733,10 +5733,10 @@ u32 var8006f2c0 = 0x00000001; struct weapon invitem_nightvision = { 0x0346, // lo model 0x0346, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_nightvision_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -5765,7 +5765,7 @@ struct inventory_function invfunc_horizonscanner_primary = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -5785,10 +5785,10 @@ struct inventory_typee inve_00015348 = { struct weapon invitem_horizonscanner = { 0x04e6, // lo model 0x04e6, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_horizonscanner_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -5817,7 +5817,7 @@ struct inventory_function invfunc_cloak_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5830,7 +5830,7 @@ struct inventory_ammo invammo_cloakingdevice = { AMMOTYPE_CLOAK, CASING_NONE, 10, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 16777216, // style }; @@ -5838,10 +5838,10 @@ struct inventory_ammo invammo_cloakingdevice = { struct weapon invitem_cloakingdevice = { 0x04cf, // lo model 0x04cf, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_cloak_primary, // pri function NULL, // sec function &invammo_cloakingdevice, // pri ammo @@ -5870,7 +5870,7 @@ struct inventory_function invfunc_combatboost_boost = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5887,7 +5887,7 @@ struct inventory_function invfunc_combatboost_revert = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5902,7 +5902,7 @@ struct inventory_ammo invammo_combatboost = { AMMOTYPE_BOOST, CASING_NONE, 4, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 16777216, // style }; @@ -5910,10 +5910,10 @@ struct inventory_ammo invammo_combatboost = { struct weapon invitem_combatboost = { 0x04d0, // lo model 0x04d0, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_combatboost_boost, // pri function &invfunc_combatboost_revert, // sec function &invammo_combatboost, // pri ammo @@ -5942,7 +5942,7 @@ struct inventory_function invfunc_suicidepill_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5952,10 +5952,10 @@ u32 var8006f4cc = 0x00000020; struct weapon invitem_suicidepill = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_suicidepill_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -5984,7 +5984,7 @@ struct inventory_function invfunc_irscanner_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -5994,10 +5994,10 @@ u32 var8006f534 = 0x00000008; struct weapon invitem_irscanner = { 0x074f, // lo model 0x074f, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_irscanner_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6026,7 +6026,7 @@ struct inventory_function invfunc_disguise_primary = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00000000, // flags }; @@ -6034,10 +6034,10 @@ struct inventory_function invfunc_disguise_primary = { struct weapon invitem_disguise40 = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_disguise_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6061,10 +6061,10 @@ struct weapon invitem_disguise40 = { struct weapon invitem_disguise41 = { 0x0000, // lo model 0x0000, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_disguise_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6093,7 +6093,7 @@ struct inventory_function invfunc_camspy_deploy = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -6103,10 +6103,10 @@ u32 var8006f650 = 0x00000004; struct weapon invitem_camspy = { 0x004b, // lo model 0x004b, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_camspy_deploy, // pri function NULL, // sec function NULL, // pri ammo @@ -6135,7 +6135,7 @@ struct inventory_function invfunc_rtracker_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -6145,10 +6145,10 @@ u32 var8006f6b8 = 0x00000010; struct weapon invitem_rtracker = { 0x076f, // lo model 0x076f, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_rtracker_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6177,7 +6177,7 @@ struct inventory_function invfunc_xray_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -6187,10 +6187,10 @@ u32 var8006f720 = 0x00000002; struct weapon invitem_xrayscanner = { 0x0770, // lo model 0x0770, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_xray_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6236,7 +6236,7 @@ struct inventory_function invfunc_datauplink_primary = { 0x00, // unk06 -1, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00102000, // flags }; @@ -6248,10 +6248,10 @@ u32 var8006f7c0 = 0x00000000; struct weapon invitem_datauplink = { 0x074e, // lo model 0x074e, // hi model - invanim_datauplink_equip, // equip animation - invanim_datauplink_unequip, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + invanim_datauplink_equip, // equip chr_do_animation + invanim_datauplink_unequip, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_datauplink_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6275,10 +6275,10 @@ struct weapon invitem_datauplink = { struct weapon invitem_doordecoder = { 0x0772, // lo model 0x0772, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6302,10 +6302,10 @@ struct weapon invitem_doordecoder = { struct weapon invitem_rocket = { 0x0382, // lo model 0x04bb, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function &invammo_default, // pri ammo @@ -6329,10 +6329,10 @@ struct weapon invitem_rocket = { struct weapon invitem_homingrocket = { 0x0382, // lo model 0x04bb, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function &invammo_default, // pri ammo @@ -6356,10 +6356,10 @@ struct weapon invitem_homingrocket = { struct weapon invitem_grenaderound = { 0x0382, // lo model 0x04bb, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_devastator_shoot, // pri function &invfunc_devastator_wallhugger, // sec function &invammo_default, // pri ammo @@ -6383,10 +6383,10 @@ struct weapon invitem_grenaderound = { struct weapon invitem_bolt = { 0x0382, // lo model 0x04bb, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_crossbow_shoot, // pri function &invfunc_crossbow_lethal, // sec function &invammo_default, // pri ammo @@ -6419,10 +6419,10 @@ u32 var8006f9c0 = 0x00000000; struct weapon invitem_skedarbomb = { 0x075f, // lo model 0x075f, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6446,10 +6446,10 @@ struct weapon invitem_skedarbomb = { struct weapon invitem_explosives = { 0x0760, // lo model 0x0760, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6478,7 +6478,7 @@ struct inventory_function invfunc_presidentscanner_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00010fd0, // menupos - NULL, // fire animation + NULL, // fire chr_do_animation 0x00002000, // flags }; @@ -6488,10 +6488,10 @@ u32 var8006fa78 = 0x00000010; struct weapon invitem_presidentscanner = { 0x076f, // lo model 0x076f, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_presidentscanner_primary, // pri function NULL, // sec function NULL, // pri ammo @@ -6515,10 +6515,10 @@ struct weapon invitem_presidentscanner = { struct weapon invitem_autosurgeon = { 0x049d, // lo model 0x049d, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6542,10 +6542,10 @@ struct weapon invitem_autosurgeon = { struct weapon invitem_flightplans = { 0x0763, // lo model 0x0763, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6569,10 +6569,10 @@ struct weapon invitem_flightplans = { struct weapon invitem_researchtape = { 0x0761, // lo model 0x0761, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6596,10 +6596,10 @@ struct weapon invitem_researchtape = { struct weapon invitem_backupdisk = { 0x0762, // lo model 0x0762, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6623,10 +6623,10 @@ struct weapon invitem_backupdisk = { struct weapon invitem_briefcase = { 0x0563, // lo model 0x0563, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6650,10 +6650,10 @@ struct weapon invitem_briefcase = { struct weapon invitem_suitcase = { 0x0086, // lo model 0x0086, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6677,10 +6677,10 @@ struct weapon invitem_suitcase = { struct weapon invitem_necklace = { 0x01c3, // lo model 0x01c3, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6704,10 +6704,10 @@ struct weapon invitem_necklace = { struct weapon invitem_shield = { 0x0347, // lo model 0x0347, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6731,10 +6731,10 @@ struct weapon invitem_shield = { struct weapon invitem_keycard = { 0x0563, // lo model 0x0563, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation NULL, // pri function NULL, // sec function NULL, // pri ammo @@ -6763,7 +6763,7 @@ struct inventory_function invfunc_rocketlauncher34_primary = { 0x00, // unk06 0, // unk07 &invmenupos_00011048, // menupos - invanim_rockerlauncher_equiporshoot, // fire animation + invanim_rockerlauncher_equiporshoot, // fire chr_do_animation 0x08000040, // flags }; @@ -6795,7 +6795,7 @@ struct inventory_ammo invammo_rocketlauncher34 = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size - invanim_rocketlauncher_reload, // reload animation + invanim_rocketlauncher_reload, // reload chr_do_animation 0, // style }; @@ -6803,10 +6803,10 @@ struct inventory_ammo invammo_rocketlauncher34 = { struct weapon invitem_rocketlauncher_34 = { 0x0388, // lo model 0x04c9, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_rocketlauncher34_primary, // pri function NULL, // sec function &invammo_rocketlauncher34, // pri ammo @@ -6841,7 +6841,7 @@ struct inventory_function invfunc_tester_primary = { 0x00, // unk06 0, // unk07 &invmenupos_0001100c, // menupos - invanim_tester_shoot, // fire animation + invanim_tester_shoot, // fire chr_do_animation 0x00000000, // flags }; @@ -6864,7 +6864,7 @@ struct inventory_ammo invammo_tester = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size - NULL, // reload animation + NULL, // reload chr_do_animation 0, // style }; @@ -6872,10 +6872,10 @@ struct inventory_ammo invammo_tester = { struct weapon invitem_tester = { 0x0193, // lo model 0x0193, // hi model - NULL, // equip animation - NULL, // unequip animation - NULL, // pritosec animation - NULL, // sectopri animation + NULL, // equip chr_do_animation + NULL, // unequip chr_do_animation + NULL, // pritosec chr_do_animation + NULL, // sectopri chr_do_animation &invfunc_tester_primary, // pri function NULL, // sec function &invammo_tester, // pri ammo diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index 137b704be..114ff3f24 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14139,14 +14139,14 @@ bool (*g_CommandPointers[])(void) = { /*0x0004*/ aiEndList, /*0x0005*/ aiSetList, /*0x0006*/ aiSetReturnList, - /*0x0007*/ ai0007, + /*0x0007*/ aiSetShotList, /*0x0008*/ aiReturn, /*0x0009*/ aiStop, /*0x000a*/ aiKneel, - /*0x000b*/ ai000b, + /*0x000b*/ aiChrDoAnimation, /*0x000c*/ aiIfIdle, - /*0x000d*/ ai000d, - /*0x000e*/ ai000e, + /*0x000d*/ aiBeSurprised000d, + /*0x000e*/ aiBeSurprised000e, /*0x000f*/ aiStepSideways, /*0x0010*/ aiHopSideways, /*0x0011*/ aiRunSideways, @@ -14330,8 +14330,8 @@ bool (*g_CommandPointers[])(void) = { /*0x00c3*/ aiIfCountdownTimerStopped, /*0x00c4*/ aiIfCountdownTimerLessThan, /*0x00c5*/ aiIfCountdownTimerGreaterThan, - /*0x00c6*/ aiSpawnChr, - /*0x00c7*/ ai00c7, + /*0x00c6*/ aiSpawnChrAtPad, + /*0x00c7*/ aiSpawnChrAtChr, /*0x00c8*/ ai00c8, /*0x00c9*/ ai00c9, /*0x00ca*/ aiDuplicateChr, @@ -14387,7 +14387,7 @@ bool (*g_CommandPointers[])(void) = { /*0x00fc*/ aiIfKillCountGreaterThan, /*0x00fd*/ ai00fd, /*0x00fe*/ aiKillBond, - /*0x00ff*/ ai00ff, + /*0x00ff*/ aiBeSurprised00ff, /*0x0100*/ aiNoOp0100, /*0x0101*/ aiNoOp0101, /*0x0102*/ aiSetLights, @@ -14440,10 +14440,10 @@ bool (*g_CommandPointers[])(void) = { /*0x0131*/ ai0131, /*0x0132*/ aiSetAction, /*0x0133*/ ai0133, - /*0x0134*/ ai0134, + /*0x0134*/ aiIfOrders, /*0x0135*/ aiIfHasOrders, /*0x0136*/ ai0136, - /*0x0137*/ ai0137, + /*0x0137*/ aiIfChrInSquadronDoingAction, /*0x0138*/ aiIfChannelIdle, /*0x0139*/ ai0139, /*0x013a*/ aiSetChrPresetToUnalertedTeammate,