Merge branch 'master' into banjo-kazooie-var_renames

This commit is contained in:
Banjo Kazooie
2024-09-01 15:31:34 -05:00
402 changed files with 8000 additions and 7857 deletions

View File

@@ -51,7 +51,7 @@ void func_8038BADC(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
func_80311480(0xD38, 0xC, this->position, this->marker, func_8038BADC, NULL);
return;
}
func_80328A84(this, 1);
subaddie_set_state(this, 1);
}
void func_8038BBC0(Actor *this) {
@@ -69,7 +69,7 @@ void func_8038BC24(void) {
s32 phi_s1;
if (fileProgressFlag_get(FILEPROG_5C_FF_PATTERN_SET) && !func_803203FC(0x62)) {
func_8034A8BC(fileProgressFlag_getN(FILEPROG_D3_FF_PATTERN, 8));
rand_seed(fileProgressFlag_getN(FILEPROG_D3_FF_PATTERN, 8));
for(phi_s1 = 0; phi_s1 < func_8031A45C(3); phi_s1++){
phi_s0 = 0x26 + 2*phi_s1;
temp_v0 = randi2(0, 3);
@@ -181,14 +181,14 @@ void chBrentilda_update(Actor *this) {
if (!fileProgressFlag_get(FILEPROG_96_MET_BRENTILDA)) {
func_80311480(ASSET_10A1_DIALOG_BRENTILDA_MEET, 0xA, this->position, this->marker, func_8038BADC, NULL);
fileProgressFlag_set(FILEPROG_96_MET_BRENTILDA, TRUE);
func_80328A84(this, 2);
subaddie_set_state(this, 2);
return;
}
if (func_8028EFC8() && (sp78[FACE_BUTTON(BUTTON_B)] == 1)) {
this->unk10_12++;
this->unk10_12 %= 3;
func_80311174(local->unk0 + this->unk10_12, 0xB, this->position, this->marker, func_8038BADC, NULL, func_8038BA30);
func_80328A84(this, 2);
subaddie_set_state(this, 2);
return;
}
} else {
@@ -197,13 +197,13 @@ void chBrentilda_update(Actor *this) {
break;
case 2:
if (actor_animationIsAt(this, 0.999f)) {
func_80328A84(this, 3);
subaddie_set_state(this, 3);
return;
}
break;
case 3:
if (actor_animationIsAt(this, 0.999f)) {
func_80328A84(this, 2);
subaddie_set_state(this, 2);
}
break;
}

View File

@@ -80,7 +80,7 @@ enum file_progress_e chWarpCauldron_getPairedFileProgressFlagIndex(Actor *this){
}
void func_8038A704(Actor *this){
func_80328B8C(this, 3, 0.99f, 1);
subaddie_set_state_with_direction(this, 3, 0.99f, 1);
}
void func_8038A730(Actor *this, f32 *arg1, enum sfx_e arg2, enum sfx_e arg3, u32 arg4) {
@@ -158,7 +158,7 @@ void func_8038AB90(Actor *this, s32 arg1, s32 arg2, enum sfx_e sfx_id, f32 sfx_t
func_80324D2C(7.0f, COMUSIC_8C_JINJONATOR_POWERUP);
}
this->unk10_12 = 0;
func_80328AC8(this, arg1);
subaddie_set_state_forward(this, arg1);
actor_playAnimationOnce(this);
func_8028FCBC();
if (sfx_id != SFX_0_BLOOP) {
@@ -235,7 +235,7 @@ void chWarpCauldron_update(Actor *this) {
this->unk38_31 = randi2(0, phi_v0 - sp4C);
}
this->scale = 1.8f;
func_80328B8C(this, 6, 0.99f, 1);
subaddie_set_state_with_direction(this, 6, 0.99f, 1);
func_802D09B8(this, 2);
}
if (fileProgressFlag_get(chWarpCauldron_getFileProgressFlagIndex(this))) {
@@ -270,7 +270,7 @@ void chWarpCauldron_update(Actor *this) {
case 1: //L8038B0F4
if (func_8038A690(this)) {
func_8028F918(2);
func_80328AC8(this, 2);
subaddie_set_state_forward(this, 2);
this->unk38_0 = FALSE;
func_8038A96C(this, 1);
func_802BAFE4(D_80393620[this->unkF4_8 - 1].unk3);

View File

@@ -13,7 +13,7 @@ extern void func_802D4830(Actor *, s32, f32);
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
extern void func_80324CFC(f32, enum comusic_e, s32);
extern int actor_animationIsAt(Actor *, f32);
extern void func_80328B8C(Actor *, s32, f32, s32);
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
extern void func_8033A45C(s32, s32);
extern void func_8034E0FC(void *, s32);
extern void *func_8034C2C4(ActorMarker *, s32);
@@ -231,7 +231,7 @@ void chFloorCobweb_update(Actor *this)
{
if (actor_animationIsAt(this, 0.95f))
{
func_80328B8C(this, 0xD, 0.98f, 1);
subaddie_set_state_with_direction(this, 0xD, 0.98f, 1);
func_80326310(this);
}
}
@@ -255,7 +255,7 @@ void chWallCobweb_update(Actor *this)
{
if (actor_animationIsAt(this, 0.9f))
{
func_80328B8C(this, 0x10, 0.98f, 1);
subaddie_set_state_with_direction(this, 0x10, 0.98f, 1);
func_80326310(this);
}
}
@@ -284,7 +284,7 @@ void lair_func_80386550(Actor *this)
if (actor_animationIsAt(this, 0.95f))
{
func_80326310(this);
func_80328B8C(this, 10, 0.98f, 1);
subaddie_set_state_with_direction(this, 10, 0.98f, 1);
this->pitch = 270.0f;
}
@@ -820,7 +820,7 @@ void func_80387F1C(void)
if (nodeProp_findPositionFromActorId(400, tmp))
{
jiggySpawn(JIGGY_35_LAIR_CC_WITCH_SWITCH, tmp);
jiggy_spawn(JIGGY_35_LAIR_CC_WITCH_SWITCH, tmp);
// FIXME: macro?
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, *(s32 *)&tmp[0], *(s32 *)&tmp[1], *(s32 *)&tmp[2]);
}
@@ -1083,7 +1083,7 @@ void func_80388524(Actor *this) {
switch(this->modelCacheIndex){
case ACTOR_2E5_DOOR_OF_GRUNTY: //L80388880
if (fileProgressFlag_get(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN) && (this->state == 0x19)) {
func_80328B8C(this, 0x1B, 0.999f, 1);
subaddie_set_state_with_direction(this, 0x1B, 0.999f, 1);
}
break;
@@ -1167,7 +1167,7 @@ void func_80388524(Actor *this) {
case 0x2E5:
switch (this->state) {
case 0x19: //L80388B34
func_80328B8C(this, 0x1A, 0.0f, 1);
subaddie_set_state_with_direction(this, 0x1A, 0.0f, 1);
func_8025A6EC(JINGLE_END_OF_INTRO, -1);
break;
@@ -1179,7 +1179,7 @@ void func_80388524(Actor *this) {
func_8030E6D4(SFX_1B_EXPLOSION_1);
}
if (actor_animationIsAt(this, 0.97f)) {
func_80328B8C(this, 0x1B, 0.999f, 1);
subaddie_set_state_with_direction(this, 0x1B, 0.999f, 1);
fileProgressFlag_set(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN, 1);
func_8030E6D4(SFX_6C_LOCKUP_CLOSING);
}
@@ -1577,7 +1577,7 @@ void func_80389898(Actor *this)
{
if (this->unk10_12)
{
func_80328AC8(this, 0x13);
subaddie_set_state_forward(this, 0x13);
actor_playAnimationOnce(this);
fileProgressFlag_set(FILEPROG_9E_CRYPT_COFFIN_LID_OPEN, TRUE);
}
@@ -1606,7 +1606,7 @@ void func_80389934(Actor *this)
this->unk16C_4 = TRUE;
if (fileProgressFlag_get(FILEPROG_A2_GV_LOBBY_COFFIN_OPEN))
func_80328B8C(this, 0x18, 0.999f, 1);
subaddie_set_state_with_direction(this, 0x18, 0.999f, 1);
}
switch (this->state)
@@ -1617,7 +1617,7 @@ void func_80389934(Actor *this)
{
this->unk1C[0] = 25;
func_80328AC8(this, 0x16);
subaddie_set_state_forward(this, 0x16);
fileProgressFlag_set(FILEPROG_A2_GV_LOBBY_COFFIN_OPEN, TRUE);
}
@@ -1627,7 +1627,7 @@ void func_80389934(Actor *this)
{
if (--this->unk1C[0] == 0)
{
func_80328AC8(this, 0x17);
subaddie_set_state_forward(this, 0x17);
actor_playAnimationOnce(this);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.6f, 32000);
func_8025A6EC(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
@@ -1639,7 +1639,7 @@ void func_80389934(Actor *this)
{
if (actor_animationIsAt(this, 0.95f))
{
func_80328B8C(this, 0x18, 0.999f, 1);
subaddie_set_state_with_direction(this, 0x18, 0.999f, 1);
FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 1.0f, 26000,);
}
@@ -1701,7 +1701,7 @@ f32 func_80389AAC(Actor *this, f32 a1)
}
case 3:
{
func_80328A84(this, 5);
subaddie_set_state(this, 5);
break;
}
@@ -1744,7 +1744,7 @@ void func_80389D08(Actor *this)
{
if (this->unk60)
{
func_80328AC8(this, 4);
subaddie_set_state_forward(this, 4);
this->unk38_31 = 0;
this->unk60 = 0;

View File

@@ -2,7 +2,8 @@
#include "functions.h"
#include "variables.h"
#include "core2/code_C9E70.h"
#include "../core2/gc/zoombox.h"
#include "../core2/code_C9E70.h"
#include "core2/nc/camera.h"
@@ -67,18 +68,11 @@ extern s32 ability_getAllLearned(void); // get unlocked moves bitfield
extern s32 item_getCount(s32); // item count get
extern void func_803463F4(s32, s32); // item count set
extern void func_80318614(gczoombox_t *, s32);
extern bool func_803183A4(gczoombox_t *, u8 *);
extern void gczoombox_minimize(gczoombox_t *);
extern void gczoombox_close(gczoombox_t *);
extern void func_80250530(s32, u16, f32);
extern void func_8025A55C(s32, s32, s32);
extern void func_80324CFC(f32, s16, s16);
extern void gczoombox_open(gczoombox_t *);
extern void gczoombox_maximize(gczoombox_t *);
extern void *mapModel_getModel(s32);
extern void player_setTransformation(s32); // set transformation
@@ -186,7 +180,7 @@ extern Struct_lair_5ED0_0 D_80393760[FF_QNF_CNT - 1] = {
};
extern struct FF_QuestionTypeInfo FF_QuestionTypeInfoArr[5] = {
struct FF_QuestionTypeInfo FF_QuestionTypeInfoArr[5] = {
{ 0x0, 100},
{ 0x64, 118},
{ 0xDA, 51},
@@ -194,7 +188,7 @@ extern struct FF_QuestionTypeInfo FF_QuestionTypeInfoArr[5] = {
{0x12B, 6}
};
extern struct {
struct {
u8 unk0;
s16 unk2;
s16 unk4;
@@ -208,31 +202,31 @@ extern struct {
{1, COMUSIC_9_NOTE_COLLECTED, 32000, 3.0f},
{1, COMUSIC_14_GOLD_FEATHER_COLLECTED, 0x7FFF, 3.0f},
{1, COMUSIC_17_EMPTY_HONEYCOMB_COLLECTED, 0x7FFF, 3.0f},
{2, TALK_PIC_1D_GOBI, 0, 0.0f},
{2, TALK_PIC_15_CLANKER, 0, 0.0f},
{2, TALK_PIC_1B_TRUNKER, 0, 0.0f},
{2, TALK_PIC_17_VILE_4, 0, 0.0f},
{2, TALK_PIC_13_BLUBBER, 0, 0.0f},
{2, TALK_PIC_10_MUMBO_1, 0, 0.0f},
{2, TALK_PIC_12_CONGA, 0, 0.0f},
{2, TALK_PIC_F_BOTTLES, 0, 0.0f},
{2, TALK_PIC_11_CHIMPY, 0, 0.0f},
{2, TALK_PIC_18_TIPTUP, 0, 0.0f},
{2, TALK_PIC_1C_RUBEE, 0, 0.0f},
{2, TALK_PIC_1F_TEEHEE, 0, 0.0f},
{2, TALK_PIC_3E_SNORKEL, 0, 0.0f},
{2, TALK_PIC_41_GRUNTILDA_3, 0, 0.0f},
{2, TALK_PIC_43_BOGGY, 0, 0.0f},
{2, TALK_PIC_44_WOZZA, 0, 0.0f},
{2, TALK_PIC_50_NABNUT, 0, 0.0f},
{2, TALK_PIC_51_POLAR_BEAR_CUBS, 0, 0.0f},
{2, TALK_PIC_55_ADULT_EEYRIE, 0, 0.0f},
{2, TALK_PIC_57_BRENTILDA, 0, 0.0f},
{2, TALK_PIC_58_TOOTY_3, 0, 0.0f},
{2, TALK_PIC_5A_LOGGO, 0, 0.0f},
{2, TALK_PIC_14_NIPPER, 0, 0.0f},
{2, TALK_PIC_19_TANKTUP, 0, 0.0f},
{2, TALK_PIC_20_JINJO_YELLOW, 0, 0.0f},
{2, ZOOMBOX_SPRITE_1D_GOBI, 0, 0.0f},
{2, ZOOMBOX_SPRITE_15_CLANKER, 0, 0.0f},
{2, ZOOMBOX_SPRITE_1B_TRUNKER, 0, 0.0f},
{2, ZOOMBOX_SPRITE_17_VILE_4, 0, 0.0f},
{2, ZOOMBOX_SPRITE_13_BLUBBER, 0, 0.0f},
{2, ZOOMBOX_SPRITE_10_MUMBO_1, 0, 0.0f},
{2, ZOOMBOX_SPRITE_12_CONGA, 0, 0.0f},
{2, ZOOMBOX_SPRITE_F_BOTTLES, 0, 0.0f},
{2, ZOOMBOX_SPRITE_11_CHIMPY, 0, 0.0f},
{2, ZOOMBOX_SPRITE_18_TIPTUP, 0, 0.0f},
{2, ZOOMBOX_SPRITE_1C_RUBEE, 0, 0.0f},
{2, ZOOMBOX_SPRITE_1F_TEEHEE, 0, 0.0f},
{2, ZOOMBOX_SPRITE_3E_SNORKEL, 0, 0.0f},
{2, ZOOMBOX_SPRITE_41_GRUNTILDA_3, 0, 0.0f},
{2, ZOOMBOX_SPRITE_43_BOGGY, 0, 0.0f},
{2, ZOOMBOX_SPRITE_44_WOZZA, 0, 0.0f},
{2, ZOOMBOX_SPRITE_50_NABNUT, 0, 0.0f},
{2, ZOOMBOX_SPRITE_51_POLAR_BEAR_CUBS, 0, 0.0f},
{2, ZOOMBOX_SPRITE_55_ADULT_EEYRIE, 0, 0.0f},
{2, ZOOMBOX_SPRITE_57_BRENTILDA, 0, 0.0f},
{2, ZOOMBOX_SPRITE_58_TOOTY_3, 0, 0.0f},
{2, ZOOMBOX_SPRITE_5A_LOGGO, 0, 0.0f},
{2, ZOOMBOX_SPRITE_14_NIPPER, 0, 0.0f},
{2, ZOOMBOX_SPRITE_19_TANKTUP, 0, 0.0f},
{2, ZOOMBOX_SPRITE_20_JINJO_YELLOW, 0, 0.0f},
{1, COMUSIC_57_TURBO_TRAINERS, 32000, 10.0f},
{1, COMUSIC_58_WADING_BOOTS, 32000, 10.0f},
{1, COMUSIC_25_USING_GOLD_FEATHERS, 32000, 10.0f},

View File

@@ -5,7 +5,7 @@
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
extern void func_8028F3D8(f32[3], f32, void(*)(ActorMarker *), ActorMarker *);
extern void func_80324CFC(f32, enum comusic_e, s32);
extern void func_8034A8BC(s32);
extern void rand_seed(s32);
extern void func_8034DF30(s32, f32[3], f32[3], f32);
extern void func_8034E088(s32, s32, s32,f32);
@@ -225,7 +225,7 @@ s32 func_8038F0EC(Actor *this) {
phi_s0 = 0;
local = (ActorLocal_lair_86F0*)&this->local;
func_8034A8BC(this->unkF4_8);
rand_seed(this->unkF4_8);
if (this->unkF4_8 >= 0xA) {
for(phi_s2 = 0; phi_s2 < local->unk4; phi_s2++){
sp34 = phi_s2;
@@ -369,7 +369,7 @@ void func_8038F350(Actor *this, s32 next_state){
this->unk60 = 3.0f;
break;
}
func_80328A84(this, next_state);
subaddie_set_state(this, next_state);
}

View File

@@ -51,7 +51,7 @@ void func_80390890(ActorMarker *marker, ActorMarker *other_marker) {
this = marker_getActor(marker);
local = (ActorLocal_lair_A4A0 *)&this->local;
func_80328B8C(this, 5, 0.0f, 1);
subaddie_set_state_with_direction(this, 5, 0.0f, 1);
actor_playAnimationOnce(this);
func_8030E878(SFX_C2_GRUBLIN_EGH, local->unkC_27*0.1 + 0.8, 32000, this->position, 1250.0f, 2500.0f);
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));

View File

@@ -58,7 +58,7 @@ void func_80390D3C(Actor *this, s32 val)
ActorLocal_lair_A810 *local;
local = (ActorLocal_lair_A810 *)&this->local;
func_80328A84(this, val);
subaddie_set_state(this, val);
switch (val)
{

View File

@@ -210,7 +210,7 @@ void func_80391810(Actor *this, s32 next_state) {
func_803917DC();
break;
}
func_80328A84(this, next_state);
subaddie_set_state(this, next_state);
}

View File

@@ -81,7 +81,7 @@ void func_8039217C(Actor *this) {
switch(this->state){
case 1: //L803921F4
if (randf() < 0.01) {
func_80328A84(this, 2U);
subaddie_set_state(this, 2U);
}
break;
@@ -96,13 +96,13 @@ void func_8039217C(Actor *this) {
func_80392014(this, SFX_20_METAL_CLANK_1, 0.95f, 1.05f, 15000);
}
if (actor_animationIsAt(this, 0.999f)) {
func_80328A84(this, 1U);
subaddie_set_state(this, 1U);
}
break;
case 3: //L803922FC
if (randf() < 0.01) {
func_80328A84(this, 4U);
subaddie_set_state(this, 4U);
}
break;
@@ -114,29 +114,29 @@ void func_8039217C(Actor *this) {
func_80392014(this, SFX_9_SQUEAKY_TOY, 1.25f, 1.35f, 28000);
}
if (actor_animationIsAt(this, 0.999f)) {
func_80328A84(this, 3U);
subaddie_set_state(this, 3U);
}
break;
case 5: //L803923C0
if (func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE)) {
func_80328A84(this, 8U);
subaddie_set_state(this, 8U);
break;
}
if (mapSpecificFlags_get(9)) {
mapSpecificFlags_set(5, 0);
func_80328A84(this, 8U);
subaddie_set_state(this, 8U);
break;
}
if ((randf() < 0.1) || mapSpecificFlags_get(5)) {
this->unk38_0 = mapSpecificFlags_get(5);
this->unk60 = randf2(2.0f, 4.0f);
func_80328A84(this, 6U);
subaddie_set_state(this, 6U);
func_803920E0(this, SFX_134_FREEZING_SHIVER, 1.1f, 1.2f, 15000, this->unk60);
break;
}
if (randf() < 0.1) {
func_80328A84(this, 7U);
subaddie_set_state(this, 7U);
}
break;
@@ -146,13 +146,13 @@ void func_8039217C(Actor *this) {
break;
}
if (actor_animationIsAt(this, 0.999f) || (mapSpecificFlags_get(5) != this->unk38_0)) {
func_80328A84(this, 5U);
subaddie_set_state(this, 5U);
}
break;
case 7: //L8039255C
if ((actor_animationIsAt(this, 0.999f)) || (mapSpecificFlags_get(5) != this->unk38_0)) {
func_80328A84(this, 5U);
subaddie_set_state(this, 5U);
}
break;

View File

@@ -46,7 +46,7 @@ void func_80392690(ActorMarker *marker, enum asset_e text_id, s32 arg2){
this = marker_getActor(marker);
func_8030E6D4(SFX_EA_GRUNTY_LAUGH_1);
func_80328B8C(this, 5, 0.0f, 1);
subaddie_set_state_with_direction(this, 5, 0.0f, 1);
actor_loopAnimation(this);
this->yaw_ideal = 79.0f;
animctrl_setTransitionDuration(this->animctrl, 0.4f);
@@ -72,17 +72,17 @@ void func_80392700(Actor *this) {
func_8028F94C(2, this->position);
func_80311480(0x103F, 0x2A, this->position, this->marker, func_80392690, func_80392610);
mapSpecificFlags_set(6, 0);
func_80328B8C(this, 3, 0.0f, 1);
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
actor_playAnimationOnce(this);
}
if ((this->state == 3) && (actor_animationIsAt(this, 0.999f) != 0)) {
func_80328B8C(this, 4, 0.0f, 1);
subaddie_set_state_with_direction(this, 4, 0.0f, 1);
actor_loopAnimation(this);
}
if (this->state == 5) {
func_80328FB0(this, 12.0f);
if (func_80329480(this) != 0) {
func_80328B8C(this, 5, 0.0f, 1);
subaddie_set_state_with_direction(this, 5, 0.0f, 1);
this->marker->unk2C_2 = TRUE;
}
}