The first commit

This commit is contained in:
Banjo Kazooie
2022-07-15 17:09:41 -05:00
commit dd13d34074
1087 changed files with 391897 additions and 0 deletions

93
include/core2/animctrl.h Normal file
View File

@@ -0,0 +1,93 @@
#ifndef __ANIM_CTRL_H__
#define __ANIM_CTRL_H__
#include <ultra64.h>
#ifndef NONMATCHING
#define func_802875AC(this, file, line) _func_802875AC(this, file, line)
#else
#define func_802875AC(this, file, line) _func_802875AC(this, __FILE__, __LINE__)
#endif
enum animctrl_playback_e{
ANIMCTRL_ONCE = 1,
ANIMCTRL_LOOP = 2,
ANIMCTRL_STOPPED = 3,
ANIMCTRL_SUBRANGE_LOOP = 4
};
typedef struct animation_s{
void (* matrices)(s32, s32);
s32 unk4;
u8 unk8;
u8 unk9;
s16 unkA[3];
u32 index;
f32 timer;
f32 duration;
u8 unk1C;
u8 unk1D;
u8 unk1E;
u8 unk1F;
} Animation;
typedef struct animctrl_s{
Animation *animation;
f32 timer;
f32 subrange_start;
f32 subrange_end;
f32 animation_duration;
f32 transition_duration;
float unk18;
s32 index;
u8 playback_type;
u8 playback_direction;
u8 smooth_transition;
u8 unk23;
u8 unk24;
u8 unk25;
u8 pad26[2];
} AnimCtrl;
typedef struct actorAnimCtrl_s{
AnimCtrl animctrl;
Animation animation;
} ActorAnimCtrl;
AnimCtrl *animctrl_new(s32 arg0);
void animctrl_free(AnimCtrl * this);
void animctrl_update(AnimCtrl *this);
AnimCtrl *animctrl_defrag(AnimCtrl *this);
void animctrl_setIndex(AnimCtrl *this, enum asset_e index);
Animation *animctrl_getAnimPtr(AnimCtrl *this);
void func_8028746C(AnimCtrl *this, void (* arg1)(s32,s32));
void func_8028748C(AnimCtrl *this, s32 arg1);
void animctrl_reset(AnimCtrl *this);
void func_8028752C(AnimCtrl *this);
void _func_802875AC(AnimCtrl * this, char *file, s32 line);
void animctrl_setAnimTimer(AnimCtrl *this, f32 timer);
void animctrl_setPlaybackType(AnimCtrl *this, enum animctrl_playback_e arg1);
void animctrl_setDirection(AnimCtrl *this, s32 arg1);
void animctrl_setSmoothTransition(AnimCtrl *this, s32 arg1);
void animctrl_setDuration(AnimCtrl *this, f32 arg1);
void animctrl_setTransitionDuration(AnimCtrl *this, f32 arg1);
void animctrl_setSubRange(AnimCtrl *this, f32 start, f32 end);
void animctrl_getSubRange(AnimCtrl *this, f32 *startPtr, f32 *endPtr);
void func_8028774C(AnimCtrl *this, f32 arg1);
void func_80287784(AnimCtrl *this, s32 arg1);
enum asset_e animctrl_getIndex(AnimCtrl *this);
enum animctrl_playback_e animctrl_getPlaybackType(AnimCtrl *this);
s32 animctrl_isPlayedForwards(AnimCtrl *this);
s32 animctrl_isSmoothTransistion(AnimCtrl *this);
f32 animctrl_getDuration(AnimCtrl *this);
f32 animctrl_getTransistionDuration(AnimCtrl *this);
f32 animctrl_getAnimTimer(AnimCtrl *this);
f32 animctrl_getTimer(AnimCtrl *this);
void animctrl_setTimer(AnimCtrl *this, f32 arg1);
s32 animctrl_8028780C(AnimCtrl *this, s32 arg1);
s32 func_8028781C(AnimCtrl *this, f32 *arg1, s32 arg2);
s32 animctrl_isStopped(AnimCtrl *this);
int animctrl_isAt(AnimCtrl *this, f32 arg1);
s32 animctrl_isContiguous(AnimCtrl *this);
#endif

View File

@@ -0,0 +1,10 @@
#ifndef __CORE2_6DA30__
#define __CORE2_6DA30__
void print_bold_overlapping(s32 x, s32 y, f32 arg2, u8* string);
void print_bold_spaced(s32 x, s32 y, u8* string);
void print_dialog(s32 x, s32 y, u8* string);
void print_dialog_w_bg(s32 x, s32 y, u8* string);
void print_dialog_gradient(s32 x, s32 y, u8* string, u8 arg3, u8 arg4);
void func_802F79D0(s32 x, s32 y, u8* string, s32 arg3, s32 arg4);
#endif

View File

@@ -0,0 +1,84 @@
#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

15
include/core2/core2.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef __CORE_2_H__
#define __CORE_2_H__
#include "core2/timedfunc.h"
#include "gc/gc.h"
#include "core2/code_6DA30.h"
#include "core2/animctrl.h"
void func_80351A04(Struct68s *arg0, s32 arg1);
void func_80351A14(Struct68s *arg0, Struct68DrawMethod arg1);
void func_8035179C(Struct68s* arg0, f32 arg1[3]);
void func_80351814(Struct68s *arg0, f32 arg1[3]);
f32 func_80351830(Struct68s *arg0);
#endif

25
include/core2/timedfunc.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef __TIMED_FUNC_H__
#define __TIMED_FUNC_H__
#include <ultra64.h>
typedef void (* TFQM0)(void);
typedef void (* TFQM1)(s32);
typedef void (* TFQM2)(s32, s32);
typedef void (* TFQM3)(s32, s32, s32);
typedef void (* TFQM4)(s32, s32, s32, s32);
typedef void (* TFQM5)(s32, s32, s32, s32, s32);
typedef void (* TFQM6)(void *);
#define reinterpret_cast(type, var) (*((type *)&var))
void timedFunc_set_0(f32 time, TFQM0 funcPtr);
void timedFunc_set_1(f32 time, TFQM1 funcPtr, s32 arg0);
void timedFunc_set_2(f32 time, TFQM2 funcPtr, s32 arg0, s32 arg1);
void timedFunc_set_3(f32 time, TFQM3 funcPtr, s32 arg0, s32 arg1, s32 arg2);
void timedFunc_set_4(f32 time, TFQM4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void timedFunc_set_5(f32 time, TFQM5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void timedFunc_set_6(f32 time, TFQM6 funcPtr, void* argPtr );
void timedJiggySpawn(f32 time, s32 jiggyId, f32 *position);
#endif