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

33
include/actor.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef ACTOR_H
#define ACTOR_H
#define ACTOR_FLAG_NONE (0)
#define ACTOR_FLAG_UNKNOWN_0 (1 << 0) // 0x1
#define ACTOR_FLAG_UNKNOWN_1 (1 << 1) // 0x2
#define ACTOR_FLAG_UNKNOWN_2 (1 << 2) // 0x4
#define ACTOR_FLAG_UNKNOWN_3 (1 << 3) // 0x8
#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10
#define ACTOR_FLAG_UNKNOWN_5 (1 << 5) // 0x20
#define ACTOR_FLAG_UNKNOWN_6 (1 << 6) // 0x40
#define ACTOR_FLAG_UNKNOWN_7 (1 << 7) // 0x80
#define ACTOR_FLAG_UNKNOWN_8 (1 << 8) // 0x100
#define ACTOR_FLAG_UNKNOWN_9 (1 << 9) // 0x200
#define ACTOR_FLAG_UNKNOWN_10 (1 << 10) // 0x400
#define ACTOR_FLAG_UNKNOWN_11 (1 << 11) // 0x800
#define ACTOR_FLAG_UNKNOWN_12 (1 << 12) // 0x1000
#define ACTOR_FLAG_UNKNOWN_13 (1 << 13) // 0x2000
#define ACTOR_FLAG_UNKNOWN_14 (1 << 14) // 0x4000
#define ACTOR_FLAG_UNKNOWN_15 (1 << 15) // 0x8000
#define ACTOR_FLAG_UNKNOWN_16 (1 << 16) // 0x10000
#define ACTOR_FLAG_UNKNOWN_17 (1 << 17) // 0x20000
#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000
#define ACTOR_FLAG_UNKNOWN_19 (1 << 19) // 0x80000
#define ACTOR_FLAG_UNKNOWN_20 (1 << 20) // 0x100000
#define ACTOR_FLAG_UNKNOWN_21 (1 << 21) // 0x200000
#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000
#define ACTOR_FLAG_UNKNOWN_23 (1 << 23) // 0x800000
#define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000
#define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000
#define ACTOR_FLAG_UNKNOWN_26 (1 << 26) // 0x4000000
#endif // ACTOR_H

View File

@@ -40,11 +40,6 @@ typedef struct animation_file_s{
u8 pad6[2];
} AnimationFile;
typedef struct animation_file_cache_s{
AnimationFile *unk0;
u16 unk4_15:15;
u16 unk4_0:1;
u8 pad6[2];
}AnimationFileCache;
#endif

View File

@@ -16,6 +16,6 @@ typedef struct asset_file_meta_s{
} AssetFileMeta;
extern u8 D_5E90; //rom file asset bin;
extern u8 assets_ROM_START[]; //rom file asset bin;
#endif

View File

@@ -696,9 +696,9 @@ void func_802AADBC(void);
void func_802AAE08(void);
void func_802AAE4C(void);
void func_802AEDE8(void);
void func_802AEE48(void);
void func_802AEE9C(void);
void bsDroneGoTo_init(void);
void bsDroneGoTo_update(void);
void bsDroneGoTo_end(void);
void bsDroneLook_init(void);
void bsDroneLook_update(void);
void bsDroneLook_end(void);

View File

@@ -4,8 +4,6 @@
#include "core1/mem.h"
void func_8025235C(f32[3], f32[3]);
void func_80252C08(f32[3], f32[3], f32, f32[3]);
void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]);
#endif

View File

@@ -1,6 +1,19 @@
#ifndef __MEM_H__
#define __MEM_H__
/**
* copy memory area
*/
void memcpy(void * dst, void *src, int size);
void func_80254630(void * dst, void *src, int size); //memcopy_fast
/**
* copy an array of wide_characters
*/
void wmemcpy(void * dst, void *src, int size);
/**
* copy memory area
*/
void memmove(u8* dst, u8* src, s32 n);
#endif

View File

@@ -0,0 +1,51 @@
#ifndef __CORE2_ANIM_SPRITE_H__
#define __CORE2_ANIM_SPRITE_H__
#include <ultra64.h>
typedef struct{
u8 index;
u8 duration;
} AnimSpriteStep;
typedef enum {
ANIM_SPRITE_STATE_NONE,
ANIM_SPRITE_STATE_ONCE,
ANIM_SPRITE_STATE_LOOP,
ANIM_SPRITE_STATE_STOPPED
} AnimSpriteState;
typedef struct{
AnimSpriteStep *steps;
f32 remaining_time;
f32 speed_multiplier;
u32 step_count:7; //This is the index in the AnimSpriteStep list
u32 current_step:7; //current frame
u32 start_step:7;
u32 current_frame:7; //This is the actual sprite frame
u32 state:2;
u32 unknown:1;
u32 active:1; //active
} AnimSprite;
void animsprite_init(void);
AnimSprite * animsprite_new(void);
void animsprite_free(AnimSprite *this);
void animsprite_terminate(void);
void animsprite_update(AnimSprite *this);
void animsprite_default(AnimSprite *this);
void animsprite_loop(AnimSprite *this);
void animsprite_set_steps(AnimSprite *this, AnimSpriteStep *step_list, s32 size);
void animsprite_set_state(AnimSprite *this, AnimSpriteState step);
void animsprite_set_unknown(AnimSprite *this, s32 value);
void animsprite_set_frame(AnimSprite *this, s32 frame_index);
void animsprite_set_speed(AnimSprite *this, f32 speed);
void animsprite_set_start_step(AnimSprite *this, s32 step);
s32 animsprite_get_frame(AnimSprite *this);
AnimSpriteState animsprite_get_current_state(AnimSprite *this);
s32 animsprite_get_unknown(AnimSprite *this);
f32 animsprite_get_speed(AnimSprite *this);
int animsprite_is_stopped(AnimSprite *this);
int animsprite_is_at_step(AnimSprite *this, s32 frame);
#endif

17
include/core2/ba/carry.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef __BA_CARRY_H__
#define __BA_CARRY_H__
#include <ultra64.h>
#include "prop.h"
void bacarry_init(void);
void bacarry_end(void);
void bacarry_update(void);
void bacarry_reset_marker(void);
ActorMarker *bacarry_get_marker(void);
void bacarry_set_marker(ActorMarker *arg0);
void bacarry_set_offsets(f32 height, f32 rotation);
#endif

24
include/core2/ba/drone.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef __BA_DRONE_H__
#define __BA_DRONE_H__
#include <ultra64.h>
#include "prop.h"
typedef enum ba_drone_type_e{
BA_DRONE_NONE,
BA_DRONE_GOTO,
BA_DRONE_LOOK,
BA_DRONE_UNKNOWN_3,
BA_DRONE_TRANSFORM,
BA_DRONE_ENTER,
BA_DRONE_VANISH
} BaDroneType;
void badrone_set_type(BaDroneType type);
BaDroneType badrone_get_type(void);
void badrone_get_position_and_duration(f32 position[3], f32 *duration);
enum bs_e badrone_enter(void);
enum bs_e badrone_goto(f32 position[3], f32 duration, void (*arg2)(ActorMarker *), ActorMarker *arg3);
#endif

View File

@@ -0,0 +1,53 @@
#ifndef __BA_PHYSICS_H__
#define __BA_PHYSICS_H__
#include <ultra64.h>
typedef enum ba_physics_type_e{
BA_PHYSICS_NONE,
BA_PHYSICS_UNK1,
BA_PHYSICS_NORMAL,
BA_PHYSICS_LOCKED_ROTATION,
BA_PHYSICS_UNK4,
BA_PHYSICS_INVERTED_YAW,
BA_PHYSICS_AIRBORN,
BA_PHYSICS_FREEZE,
BA_PHYSICS_UNK8,
BA_PHYSICS_NO_GRAVITY,
BA_PHYSICS_CLIMB,
BA_PHYSICS_TRANSFORM,
BA_PHYSICS_GOTO,
BA_PHYSICS_END
}BaPhysicsType;
void baphysics_get_position_change(f32 dst[3]);
void baphysics_init(void);
void baphysics_update(void);
void baphysics_reset_horizontal_velocity(void);
void baphysics_set_type(BaPhysicsType);
void baphysics_set_target_velocity(f32 src[3]);
void baphysics_set_target_horizontal_velocity(f32);
void baphysics_set_target_yaw(f32);
void baphysics_set_vertical_velocity(f32);
void baphysics_set_horizontal_velocity(f32, f32);
void baphysics_set_velocity(f32 src[3]);
f32 baphysics_get_gravity(void);
BaPhysicsType baphysics_get_type(void);
f32 baphysics_get_target_horizontal_velocity(void);
f32 baphysics_get_target_vertical_velocity(void);
f32 baphysics_get_target_yaw(void);
void baphysics_get_velocity(f32 dst[3]);
f32 baphysics_get_vertical_velocity(void);
f32 baphysics_get_horizontal_velocity(void);
f32 baphysics_get_horizontal_velocity_percentage(void);
void baphysics_reset(void);
void baphysics_set_acceleration(f32);
void baphysics_reset_gravity(void);
void baphysics_reset_terminal_velocity(void);
void baphysics_set_goto_duration(f32);
void baphysics_set_goto_position(f32 src[3]);
void baphysics_set_gravity(f32);
void baphysics_set_terminal_velocity(f32);
int baphysics_is_slower_than(f32);
int baphysics_goto_done(void);
#endif

View File

@@ -1,84 +0,0 @@
#ifndef __CORE2_C9E70_H__
#define __CORE2_C9E70_H__
#include <ultra64.h>
#include "structs.h"
typedef struct {
s16 unk0[4];
u8 unk8; //FF_TileType
u8 unk9;
s16 unkA;
u8 unkC[3];
// u8 padF[0x1];
f32 unk10;
u8 pad14[0xC];
}Struct_lair_5ED0_0;
struct FF_StorageStruct_48_sub {
f32 unk0[3];
f32 unkC;
f32 UNK_10;
u32 unk14[3];
u8 unk20;
u8 UNK_21;
u8 UNK_22;
u8 UNK_23;
}; // 0x24
// FF: pointer at 0x48 in the generic storage struct
struct FF_StorageStruct_48 {
/**
* Judging by how this var is referenced throughout the
* code, I thought may instead be four standalone vars
* of the same type, instead of in an array.
*
* But near the end of the file (e.g. in func_8038E968),
* they're indexed by $a0, so it must be an array...
*/
struct FF_StorageStruct_48_sub data[4];
}; // 0x90
// FF: generic storage struct
struct FF_StorageStruct {
/* 00 */ BKModel *unk0;
/* 04 */ Struct_lair_5ED0_0 *unk4;
/* 08 */ s16 unk8;
/* 0A */ u8 currFfMode;
/* 0B */ u8 ffQuestionType;
/* 0C */ u8 unkC;
/* 0D */ u8 unkD; //question_indx
/* 0E */ s8 unkE;
/* 0F */ s8 unkF;
/* 10 */ u8 unk10;
/* 11 */ u8 unk11;
/* 12 */ u8 unk12;
// u8 pad13[1];
/* 14 */ f32 unk14;
/* 18 */ u8 UNK_18;
/* 19 */ u8 UNK_19;
/* 1A */ u8 UNK_1A;
/* 1B */ u8 UNK_1B;
// holds moves involved with the FFM glitch
/* 1C */ u32 unlockedMoves;
/* 20 */ gczoombox_t *unk20;
/* 24 */ f32 playerPosition[3];
/* 30 */ f32 playerRotation[3];
/* 3C */ s16 unk3C[5];
/* 46 */ u8 UNK_46;
/* 47 */ u8 UNK_47;
/* 48 */ struct FF_StorageStruct_48 *unk48;
}; // 0x4C
#endif

View File

@@ -8,4 +8,4 @@ enum camera_type_e{
CAMERA_TYPE_4_RANDOM = 4
};
#endif
#endif

View File

@@ -5,7 +5,7 @@ enum yaw_state_e{
YAW_STATE_0_NONE,
YAW_STATE_1_DEFAULT,
YAW_STATE_2_UNBOUNDED,
YAW_STATE_3_BOUNDED,
YAW_STATE_3_BOUNDED
};
void yaw_init(void);

View File

@@ -235,6 +235,8 @@ enum unkflags_1{
UNKFLAGS1_A_HAS_SEEN_TIPTUP_FF_MINIGAME,
UNKFLAGS1_B_HAS_SEEN_SANDCASTLE_FF_MINIGAME,
UNKFLAGS1_13_HAS_TRIGGERED_MUMBO_VACATION_TEXT = 0x13,
UNKFLAGS1_1F_IN_CHARACTER_PARADE = 0x1F,
UNKFLAGS1_20_BEGIN_CHARACTER_PARADE,
@@ -1654,8 +1656,8 @@ enum actor_e
ACTOR_65_WADING_BOOTS = 0x65,
ACTOR_67_SNIPPET = 0x67,
ACTOR_69_CLAM = 0x69,
ACTOR_68_SNACKER,
ACTOR_69_CLAM,
ACTOR_6D_GV_BANJO_DOOR = 0x6D,
@@ -1966,7 +1968,8 @@ enum actor_e
ACTOR_TOPPER_B = 0x36F,
ACTOR_370_GOLD_FEATHER = 0x370,
ACTOR_375_GRUBLIN_HOOD = 0x375,
ACTOR_374_VACATION_TEXT_TRIGGER = 0x374,
ACTOR_375_GRUBLIN_HOOD,
ACTOR_376_FF_MINIGAME,
ACTOR_379_UNKNOWN = 0x379,
@@ -2378,7 +2381,7 @@ enum asset_e
/* [0x74, 0x75] empty */
ASSET_76_ANIM_JIGSAWDANCE_HOLD = 0x76,
ASSET_77_ANIM_BSTIMEOUT,
//ASSET_78 // snacker_swimming
ASSET_78_ANIM_SNACKER_SWIMMING,
//ASSET_79 // Mumbo Concert Playing Instrument
//ASSET_7A // Banjo Concert Angry
//ASSET_7B // Banjo Concert Play
@@ -2556,8 +2559,8 @@ enum asset_e
ASSET_14A_ANIM_BSREST_LISTEN,
ASSET_153_ANIM_BURIED_TREASURE_APPEAR = 0x153,
ASSET_155_ANIM_CRAB_FLIP_UPRIGHT = 0x155,
ASSET_154_ANIM_SNACKER_EATING,
ASSET_155_ANIM_CRAB_FLIP_UPRIGHT,
ASSET_156_ANIM_MUTANT_CRAB_WALK,
ASSET_157_ANIM_MUTANT_CRAB_FLIP_UPSIDEDOWN,
ASSET_158_ANIM_MUTANT_CRAB_UPSIDEDOWN,
@@ -2660,7 +2663,10 @@ enum asset_e
ASSET_256_ANIM_TERMITE_OW,
ASSET_25B_ANIM_ACORN_IDLE = 0x25B,
ASSET_273_ANIM_SNACKER_HURT = 0x273,
ASSET_274_ANIM_SNACKER_DIE,
ASSET_281_ANIM_WISHYWASHY_DOOOH = 0x281,
ASSET_282_ANIM_BSJIG_NOTEDOOR,
@@ -2894,7 +2900,7 @@ enum asset_e
ASSET_3AD_FIRE_SPARKLE = 0x3AD,
ASSET_3AE_MODEL_GRAVE_FLOWER_POT,
// 3af (Green Plank?)
// 3b0 Snacker
ASSET_3B0_SNACKER = 0x3B0,
// 3b1 Concert Mumbo
// 3b2 (Two Poles?)
// 3b3 Mumbo's Hut
@@ -4197,8 +4203,8 @@ enum marker_e{
MARKER_11_WADING_BOOTS = 0x11,
MARKER_13_SNIPPET = 0x13,
MARKER_15_CLAM = 0x15,
MARKER_14_SNACKER,
MARKER_15_CLAM,
MARKER_28_CLANKER_SAWBLADE = 0x28,
@@ -4420,6 +4426,8 @@ enum marker_e{
MARKER_1E1_FF_MINIGAME = 0x1E1,
MARKER_1E2_GRUBLIN_HOOD,
MARKER_1E3_VACATION_TEXT_TRIGGER,
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5,
MARKER_1E6_TOPPER_B,

View File

@@ -15,7 +15,7 @@ extern void func_8033F000(const char *, const char *, int);
#else
#define FILE(file_name) "file_name"
#endif
#define matching_assert(EX, F, L) assert(EX)
#ifdef __ANSI_CPP__
#define matching_assert(EX, F, L) ((EX)?((void)0):func_8033F000( # EX , # F, L))
#else

View File

@@ -108,10 +108,6 @@ void pitch_setIdeal(f32);
f32 pitch_get(void);
f32 player_getYPosition(void);
void func_80297970(f32);
f32 _get_vertVelocity(void);
void climbGetBottom(f32 dst[3]);
void yaw_setIdeal(f32);
@@ -155,7 +151,7 @@ void actor_collisionOff(Actor *);
void *assetcache_get(enum asset_e assetId);
Actor *actor_new(s32 (*position)[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
Actor *actor_new(s32 position[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
Actor *func_802C8A54(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AA8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AF8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
@@ -166,7 +162,7 @@ Actor *func_802C8C04(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *marker_getActor(ActorMarker *);
f32 time_getDelta(void);
void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]);
void jiggy_spawn(enum jiggy_e jiggy_id, f32 pos[3]);
struct3s *func_802F8264(s32 arg0);
struct6s *func_802F8BE0(s32 arg0);
@@ -209,7 +205,7 @@ void fxhealthscore_free(enum item_e, struct8s *);
struct7s *fxairscore_new(s32);
void fxairscore_update(enum item_e, struct7s *);
void fxairscore_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
void fxairscore_free(s32, struct8s *);
void fxairscore_free(s32, struct7s *);
@@ -252,9 +248,9 @@ void particleEmitter_setParticleVelocityRange(ParticleEmitter *, f32, f32, f32,
void func_802EFF50(ParticleEmitter *, f32);
void particleEmitter_setRGB(ParticleEmitter *this, s32 arg1[3]);
void particleEmitter_setSpawnInterval(ParticleEmitter *, f32);
int func_8024DC04(f32, f32, f32);
void func_8024E3A8(f32 [3], f32);
OSContPad *func_8024F3F4(void);
OSMesgQueue *pfsManager_getFrameReplyQ(void);
void ml_vec3f_clear(f32 dst[3]);
@@ -280,13 +276,6 @@ void comusic_8025AB44(enum comusic_e comusic_id, s32 arg1, s32 arg2);
f32 cosf(f32);
struct54s * func_80287CA8(void);
void func_80287F50(struct54s *, struct53s *, s32);
void func_80287FD0(struct54s *, f32);
void func_80287F7C(struct54s *arg0, s32 arg1);
void func_80287F98(struct54s *arg0, s32 arg1);
void func_80287FDC(struct54s *arg0, s32 arg1);
void baanim_setDurationRange(f32, f32);
@@ -313,7 +302,7 @@ void func_80292974(f32, f32, f32);
void func_80292900(f32, f32);
void func_80292E80(s32, f32);
void func_80293350(void);
void bafalldamage_start(void);
void func_80293D48(f32, f32);
f32 func_80294438(void);
f32 func_80294500(void);
@@ -322,20 +311,6 @@ void func_80294980(f32 arg0[3]);
f32 get_slope_timer(void);
f32 get_turbo_duration(void);
void func_80295C08(void (* arg0)(void));
void func_802978DC(int);
void func_80297970(f32);
void func_8029797C(f32);
void player_setYVelocity(f32);
void func_802979AC(f32, f32);
f32 func_80297A64(void);
f32 func_80297A70(void);
f32 func_80297A7C(void);
f32 _get_horzVelocity(void);
f32 func_80297AF0(void);
void gravity_set(f32);
void func_80297B64(f32);
void func_80297BF8(f32);
int func_80297C04(f32);
void func_80297CCC(f32);
f32 pitch_getIdeal(void);
void pitch_setAngVel(f32, f32);
@@ -406,14 +381,14 @@ extern s32 func_802F9AA8(enum sfx_e);
Actor * func_803055E0(enum actor_e id, s32 pos[3], s32 arg2, s32 arg3, s32 arg4);
Actor * func_803056FC(enum actor_e id, s32 pos[3], s32 yaw);
Actor * spawn_actor(enum actor_e id, s32 pos[3], s32 yaw);
f32 func_80309724(f32[3]);
BKModelBin *func_8030A428(s32);
u8 func_8030D90C(void);
void sfxsource_setSfxId(u8 indx, enum sfx_e uid);
void func_8030DBB4(u8, f32);
void func_8030DD14(u8, int);
void func_8030DF68(u8, f32[3]);
void sfxsource_set_position(u8, f32[3]);
void func_8030DFF0(u8, s32);
void func_8030E04C(u8, f32, f32, f32);
void func_8030E0FC(u8, f32, f32, f32);
@@ -455,11 +430,11 @@ void func_8032728C(f32[3], f32, s32, int(*)(Actor *));
Actor *func_8032813C(enum actor_e actor_id, f32 position[3], s32 yaw);
int func_8032863C(AnimCtrl *, f32, f32);
int func_80328A2C(Actor *, f32, s32, f32);
void func_80328A84(Actor *, u32);
void subaddie_set_state(Actor *, u32);
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
int func_80328B38(Actor *, s32, f32);
void func_80328B8C(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
int func_80328BD4(Actor *, s32, f32, s32, f32 );
int subaddie_maybe_set_state(Actor *, s32, f32);
void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
int subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
void func_80328CEC(Actor *, s32, s32, s32);
void func_80328FB0(Actor *, f32);
int func_80329030(Actor *, s32);
@@ -501,7 +476,6 @@ void func_80352CF4(f32 *, f32 *, f32, f32);
AnimCtrl *baanim_getAnimCtrlPtr(void);
void _get_velocity(f32 dst[3]);
void player_setYPosition(f32);
NodeProp *func_80304C38(enum actor_e arg0, Actor *arg1);
@@ -534,7 +508,7 @@ Actor *actorArray_findActorFromActorId(enum actor_e);
f32 func_8038A6B8(ActorMarker *);
void *defrag_asset(void *);
void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32);
void func_8030DEB4(u8, f32, f32);
void sfxsource_set_fade_distances(u8, f32, f32);
void func_8030DB04(u8, s32, f32 position[3], f32, f32);
void func_80258A4C(f32 [3], f32, f32 [3], f32 *, f32 *, f32 *);
@@ -576,6 +550,6 @@ void ability_unlock(enum ability_e);
extern void func_802EE278(Actor *, s32, s32, s32, f32, f32);
extern void fxSparkle_chTreasure(s16[3]);
extern void actor_collisionOn(Actor *);
extern void func_80328AC8(Actor *, s32);
extern void subaddie_set_state_forward(Actor *, s32);
#endif

View File

@@ -3,6 +3,5 @@
#include "gc/gcbound.h"
#include "gc/gctransition.h"
#include "gc/gczoombox.h"
#endif

View File

@@ -1,12 +1,12 @@
#ifndef __GC_TRANSITION__
#define __GC_TRANSITION__
void gctransition_8030B740(void);
void gctransition_defrag(void);
void gctransition_draw(Gfx **arg0, Mtx **arg1, Vtx **arg2);
void gctransition_8030BD4C(void);
f32 gctransition_8030BD88(void);
int gctransition_8030BD98(void);
int gctransition_8030BDAC(void);
int gctransition_done(void);
int gctransition_active(void);
int gctransition_8030BDC0(void);
void gctransition_8030BE3C(void);
void gctransition_8030BE60(void);

View File

@@ -1,212 +0,0 @@
#ifndef GCZOOMBOX_H
#define GCZOOMBOX_H
#include <ultra64.h>
#include "structs.h"
enum talk_pic_e {
TALK_PIC_0_GRUNTILDA_1,
TALK_PIC_1_VILE_1,
TALK_PIC_2_VILE_2,
TALK_PIC_3_VILE_3,
TALK_PIC_4_BANJO_1,
TALK_PIC_5_GRUNTILDA_2,
TALK_PIC_6_JIGGY_1,
TALK_PIC_7_TOOTY_1,
TALK_PIC_8_MUSIC_NOTE_1,
TALK_PIC_9_JIGGY_2,
TALK_PIC_A_EXTRA_HEALTH_MAX,
TALK_PIC_B_CLOCK,
TALK_PIC_C_BANJO_2,
TALK_PIC_D_KAZOOIE_1,
TALK_PIC_E_KAZOOIE_2,
TALK_PIC_F_BOTTLES,
TALK_PIC_10_MUMBO_1,
TALK_PIC_11_CHIMPY,
TALK_PIC_12_CONGA,
TALK_PIC_13_BLUBBER,
TALK_PIC_14_NIPPER,
TALK_PIC_15_CLANKER,
TALK_PIC_16_SNIPPET,
TALK_PIC_17_VILE_4,
TALK_PIC_18_TIPTUP,
TALK_PIC_19_TANKTUP,
TALK_PIC_1A_FLIBBIT,
TALK_PIC_1B_TRUNKER,
TALK_PIC_1C_RUBEE,
TALK_PIC_1D_GOBI,
TALK_PIC_1E_GRABBA,
TALK_PIC_1F_TEEHEE,
TALK_PIC_20_JINJO_YELLOW,
TALK_PIC_21_JINJO_GREEN,
TALK_PIC_22_JINJO_BLUE,
TALK_PIC_23_JINJO_PINK,
TALK_PIC_24_JINJO_ORANGE,
TALK_PIC_25_MUSIC_NOTE_2,
TALK_PIC_26_MUMBO_TOKEN,
TALK_PIC_27_BLUE_EGG,
TALK_PIC_28_RED_FEATHER,
TALK_PIC_29_GOLD_FEATHER,
TALK_PIC_2A_ORANGE,
TALK_PIC_2B_GOLD_BULLION,
TALK_PIC_2C_HONEYCOMB,
TALK_PIC_2D_EXTRA_HEALTH_MAX,
TALK_PIC_2E_EXTRA_LIFE,
TALK_PIC_2F_JIGGY_3,
TALK_PIC_30_EXTRA_HONEYCOMB,
TALK_PIC_31_CATERPILLAR,
TALK_PIC_32_WADING_BOOTS,
TALK_PIC_33_PIRANHA,
TALK_PIC_34_TERMITE,
TALK_PIC_35_JUJU,
TALK_PIC_36_YUMYUM,
TALK_PIC_37_LITTLE_LOCKUP,
TALK_PIC_38_LEAKY,
TALK_PIC_39_GLOOP,
TALK_PIC_3A_TIPTUP_CHOIR_MEMBER,
TALK_PIC_3B_SNACKER,
TALK_PIC_3C_ANCIENT_ONE,
TALK_PIC_3D_SAND_EEL,
TALK_PIC_3E_SNORKEL,
TALK_PIC_3F_JINXY,
TALK_PIC_40_CROCTUS,
TALK_PIC_41_GRUNTILDA_3,
TALK_PIC_42_TOOTY_2,
TALK_PIC_43_BOGGY,
TALK_PIC_44_WOZZA,
TALK_PIC_45_MOTZHAND,
TALK_PIC_46_TUMBLAR,
TALK_PIC_47_MUMMUM,
TALK_PIC_48_XMAS_GIFT_BLUE,
TALK_PIC_49_WORM,
TALK_PIC_4A_FREEZING_WATER,
TALK_PIC_4B_TWINKLY,
TALK_PIC_4C_TWINKLY_CHOMPER,
TALK_PIC_4D_GNAWTY,
TALK_PIC_4E_BOSS_BOOM_BOX,
TALK_PIC_4F_ZUBBA,
TALK_PIC_50_NABNUT,
TALK_PIC_51_POLAR_BEAR_CUBS,
TALK_PIC_52_YOUNG_EEYRIE_1,
TALK_PIC_53_YOUNG_EEYRIE_2,
TALK_PIC_54_YOUNG_EEYRIE_3,
TALK_PIC_55_ADULT_EEYRIE,
TALK_PIC_56_WARP_CAULDRON,
TALK_PIC_57_BRENTILDA,
TALK_PIC_58_TOOTY_3,
TALK_PIC_59_BLACK_SNIPPET,
TALK_PIC_5A_LOGGO,
TALK_PIC_5B_CHEATO,
TALK_PIC_5C_XMAS_GIFT_GREEN,
TALK_PIC_5D_KLUNGO,
TALK_PIC_5E_SEXY_GRUNTY,
TALK_PIC_5F_TOOTY_4,
TALK_PIC_60_BANJO_3,
TALK_PIC_61_KAZOOIE_3,
TALK_PIC_62_TOOTY_5,
TALK_PIC_63_DINGPOT,
TALK_PIC_64_CROC_BANJO,
TALK_PIC_65_GRUNTILDA_4,
TALK_PIC_66_LOCKUP,
TALK_PIC_67_VILE_5,
TALK_PIC_68_VILE_6,
TALK_PIC_69_VILE_7
};
typedef struct {
u8 unk0[0x30]; //string1
u8 unk30[0x30]; //string2
u8 unk60[0x30];
u8 unk90[0x20];
u8 unkB0[0x40];
BKModelBin *model;
AnimCtrl *anim_ctrl;
BKSprite *unkF8;
BKSpriteDisplayData *unkFC;
BKSprite *unk100;
BKSpriteDisplayData *unk104;
u8 unk108[5]; //sfx_ids
u8 pad10D[3];
f32 unk110[5]; //sfx_???
s16 unk124[5]; //sfx_???
s16 unk12E;
void (*unk130)(s32, s32);
u8 unk134;
u8 state;
u8 portrait_id; //0x136
u8 unk137; //string_cnt
u8 unk138; //current_string
u8 unk139;
u8 unk13A;
u8 sfx_count;
char *raw_str[8]; //string_ptrs
u8 unk15C;
u8 unk15D;
u8 unk15E;
u8 pad15F[0x1];
u8 *unk160;
s16 unk164;
s16 unk166; //top_transparency???
s16 unk168; //rgb???
s16 unk16A; //x_pos
s16 unk16C; //y1_pos
s16 unk16E; //y2_pos
s16 unk170;
s16 unk172;
s16 unk174;
s8 unk176;
s8 unk177;
s8 unk178;
s8 unk179;
u8 pad17A[0x2];
f32 unk17C;
s8 unk180;
s8 unk181;
u8 unk182;
u8 unk183;
u8 unk184;
u8 unk185;
s8 unk186;
u8 unk187;
u8 frame_count; //sprite frame count
u8 unk189;
u8 unk18A;
u8 prev_sfx; //next_sfx
f32 unk18C;
f32 unk190;
f32 unk194;
f32 unk198;
f32 unk19C;
f32 unk1A0;
u32 unk1A4_31:1;
u32 unk1A4_30:1;
u32 unk1A4_29:1;
u32 unk1A4_28:1;
u32 unk1A4_27:1;
u32 unk1A4_26:1;
u32 unk1A4_25:1;
u32 unk1A4_24:1;
u32 unk1A4_23:1;
u32 unk1A4_22:1;
u32 unk1A4_21:1;
u32 unk1A4_20:1;
u32 unk1A4_19:1;
u32 unk1A4_18:1; //highlighted
u32 unk1A4_17:1;
u32 unk1A4_16:1;
u32 unk1A4_15:1;
u32 unk1A4_14:1;
u32 unk1A4_13:1;
u32 unk1A4_12:1;
u32 unk1A4_11:1;
u32 unk1A4_10:1;
u32 pad1A4_9:10;
}gczoombox_t; //size 0x1A8
void gczoombox_draw(gczoombox_t *this, Gfx **gdl, Mtx ** mptr, void *vptr);
void gczoombox_free(gczoombox_t* this);
gczoombox_t *gczoombox_new(s32 arg0, enum talk_pic_e arg1, s32 arg2, s32 arg3, void (*arg4)(s32, s32));
#endif

View File

@@ -16,6 +16,10 @@
\label:
.endm
.macro jlabel label
\label:
.endm
.macro endlabel label
.end \label
.endm

6
include/math.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef __BANJO_KAZOOIE_MATH_H__
#define __BANJO_KAZOOIE_MATH_H__
#define SQ(x) ((x)*(x))
#endif // __BANJO_KAZOOIE_MATH_H__

View File

@@ -11,5 +11,9 @@
\label:
.endm
.macro jlabel label
\label:
.endm
.macro endlabel label
.endm

View File

@@ -48,18 +48,23 @@ typedef struct model_prop_s{
typedef struct actor_prop_s{
struct actorMarker_s* marker;
s16 x;
s16 y;
s16 z;
u16 unk8_15:5;
u16 unk8_10:5;
u16 unk8_5:1;
u16 unk8_4:1;
u16 unk8_3:1;
u16 unk8_2:1;
u16 unk8_1:1;
u16 unk8_0:1;
union {
struct {
struct actorMarker_s* marker;
s16 x;
s16 y;
s16 z;
u16 unk8_15:5;
u16 unk8_10:5;
u16 unk8_5:1;
u16 unk8_4:1;
u16 unk8_3:1;
u16 unk8_2:1;
u16 unk8_1:1;
u16 unk8_0:1;
};
s32 words[3];
};
} ActorProp;
typedef void(*MarkerCollisionFunc)(struct actorMarker_s *this, struct actorMarker_s *other);
@@ -337,7 +342,7 @@ typedef struct {
s16 y;
s16 z;
struct {
u16 bit15: 9; //selector_value //volume??? diameter
u16 radius: 9; //selector_value //volume??? diameter
u16 bit6: 6; //category
u16 bit0: 1;
}unk6;
@@ -393,4 +398,9 @@ typedef struct actor_array{
Actor data[]; //variable size array
}ActorArray;
typedef struct {
u32 cnt;
Actor *actor_save_state[];
}ActorListSaveState;
#endif

View File

@@ -246,29 +246,12 @@ typedef struct struct_8_s{
f32 unk60;
}struct8s;
typedef struct struct_9_s{
u8 uid;
u8 unk1;
u8 unk2;
// u8 pad3[1];
f32 unk4; //duration
s32 unk8; //asset_indx
s32 unkC; //animation_indx
f32 unk10;
}struct9s;
typedef struct struct_10_s{
u8 map_indx;
u8 unk1;
u8 unk2;
}struct10s;
typedef struct struct_11_s{
f32 unk0;
f32 unk4;
s32 unk8;
s32 unkC;
s16 unk10; //trackId
s16 track_id; //trackId
s16 unk12;
u8 unk14;
u8 unk15;
@@ -504,23 +487,7 @@ typedef struct{
u8 pad4[8];
}struct52s;
typedef struct{
u8 unk0;
u8 unk1;
} struct53s;
typedef struct{
struct53s *unk0;
f32 unk4;
f32 unk8;
u32 unkC_31:7;
u32 unkC_24:7;
u32 unkC_17:7;
u32 unkC_10:7;
u32 unkC_3:2;
u32 unkC_1:1;
u32 unkC_0:1;
} struct54s;
typedef struct{
s32 unk0;