Merge branch 'mr-origin-96'
This commit is contained in:
@@ -1,9 +1,130 @@
|
||||
#ifndef __CORE_1_H__
|
||||
#define __CORE_1_H__
|
||||
#ifndef BANJO_KAZOOIE_CORE1_CORE1_H
|
||||
#define BANJO_KAZOOIE_CORE1_CORE1_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include "bool.h"
|
||||
#include "enums.h"
|
||||
#include "structs.h"
|
||||
#include "prop.h"
|
||||
|
||||
#include "core1/eeprom.h"
|
||||
#include "core1/framebufferdraw.h"
|
||||
#include "core1/lookup.h"
|
||||
#include "core1/main.h"
|
||||
#include "core1/mem.h"
|
||||
#include "core1/ml.h"
|
||||
#include "core1/mlmtx.h"
|
||||
#include "core1/pfsmanager.h"
|
||||
#include "core1/rarezip.h"
|
||||
#include "core1/sns.h"
|
||||
#include "core1/sprite.h"
|
||||
#include "core1/ucode.h"
|
||||
#include "core1/viewport.h"
|
||||
#include "core1/vimgr.h"
|
||||
|
||||
void mlMtx_apply_vec3f(f32[3], f32[3]);
|
||||
void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]);
|
||||
|
||||
/* need to sort out in individual header files */
|
||||
|
||||
void glcrc_calc_checksum(void *start, void *end, u32 checksum[2]);
|
||||
|
||||
void func_80250530(s32 arg0, u16 chan_mask, f32 arg2);
|
||||
|
||||
void func_8025A104(enum comusic_e arg0, s32 arg1);
|
||||
void func_8025A55C(s32 arg0, s32 arg1, s32 arg2);
|
||||
s32 func_8025A864(enum comusic_e track_id);
|
||||
void func_8025ABB8(enum comusic_e comusic_id, s32 arg1, s32 arg2, s32 arg3);
|
||||
int func_8025AD7C(enum comusic_e arg0);
|
||||
int func_8025ADBC(enum comusic_e arg0);
|
||||
|
||||
|
||||
/* src/core1/code_7090.c */
|
||||
|
||||
void core1_7090_alloc(void);
|
||||
void core1_7090_release(void);
|
||||
void core1_7090_initSfxSource(s32 idx, s32 lookup_idx, s32 sample_rate, f32 volume);
|
||||
void core1_7090_freeSfxSource(int idx);
|
||||
|
||||
|
||||
/* src/core1/code_CE60.c */
|
||||
|
||||
void core1_ce60_setChanMask(s32 chan_mask);
|
||||
void core1_ce60_setChanMaskWithValue(s32 chan_mask, f32 arg1);
|
||||
bool core1_ce60_isPlayerInRange(s32 x, s32 z, s32 distance);
|
||||
f32 core1_ce60_getPlayerDistance(f32 x, f32 z);
|
||||
bool core1_ce60_isPlayerInsideBoundingBox(s32 box_idx);
|
||||
void core1_ce60_func_8024A9EC(s32 arg0);
|
||||
void core1_ce60_func_8024AAB0(void);
|
||||
void core1_ce60_func_8024ADF0(bool arg0);
|
||||
void core1_ce60_func_8024AE74(void);
|
||||
void core1_ce60_resetState(void);
|
||||
void core1_ce60_setChanMaskFromWaterState(s32 chan_mask_underwater, s32 chan_mask_surface);
|
||||
void core1_ce60_func_8024AF48(void);
|
||||
void core1_ce60_incOrDecCounter(bool increment);
|
||||
void core1_ce60_func_8024BD40(s32 arg0, s32 arg1);
|
||||
|
||||
|
||||
|
||||
/* src/core1/depthbuffer.c */
|
||||
|
||||
extern u8 D_8000E800;
|
||||
|
||||
void func_80253190(Gfx **gfx);
|
||||
void func_80253208(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, void *color_buffer);
|
||||
bool func_80253400(void);
|
||||
bool depthBuffer_isPointerSet(void);
|
||||
void depthBuffer_stub(void);
|
||||
void func_80253428(int arg0);
|
||||
void func_802534A8(int arg0);
|
||||
void zBuffer_set(Gfx **gfx);
|
||||
void *zBuffer_get(void);
|
||||
|
||||
|
||||
|
||||
/* src/core1/code_15B30.c */
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
Gfx *unk8;
|
||||
Gfx *unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
}Struct_Core1_15B30;
|
||||
|
||||
#define DEFAULT_FRAMEBUFFER_WIDTH 292
|
||||
#define DEFAULT_FRAMEBUFFER_HEIGHT 216
|
||||
|
||||
extern s32 gFramebufferWidth;
|
||||
extern s32 gFramebufferHeight;
|
||||
extern u16 gFramebuffers[2][DEFAULT_FRAMEBUFFER_WIDTH * DEFAULT_FRAMEBUFFER_HEIGHT];
|
||||
|
||||
void func_80253550(void);
|
||||
void func_8025357C(void);
|
||||
void func_802535A8(Gfx **arg0, Gfx **arg1, UNK_TYPE(s32) arg2, UNK_TYPE(s32) arg3);
|
||||
void func_80253640(Gfx ** gdl, void *arg1);
|
||||
void scissorBox_SetForGameMode(Gfx **gdl, s32 framebuffer_idx);
|
||||
void setupScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_address);
|
||||
void setupDefaultScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_idx);
|
||||
void func_80253DC0(Gfx **gfx);
|
||||
void finishFrame(Gfx **gdl);
|
||||
void func_80253E14(Gfx *arg0, Gfx *arg1, s32 arg2);
|
||||
void func_80253EA4(Gfx *arg0, Gfx *arg1);
|
||||
void func_80253EC4(Gfx *arg0, Gfx *arg1);
|
||||
void func_80253EE4(Gfx **arg0, Gfx **arg1, s32 arg2);
|
||||
void func_80253F74(Gfx **arg0, Gfx **arg1);
|
||||
void func_80253F94(Gfx **arg0, Gfx **arg1);
|
||||
void scissorBox_get(u32 *left, u32 *top, u32 *right, u32 *bottom);
|
||||
void func_80253FE8(void);
|
||||
void func_80254008(void);
|
||||
void func_80254028(void);
|
||||
void drawRectangle2D(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b);
|
||||
void graphicsCache_release(void);
|
||||
void graphicsCache_init(void);
|
||||
void scissorBox_set(s32 left, s32 top, s32 right, s32 bottom);
|
||||
void scissorBox_setDefault(void);
|
||||
void func_80254374(s32 arg0);
|
||||
void toggleTextureFilterPoint(void);
|
||||
void getGraphicsStacks(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void dummy_func_80254464(void);
|
||||
|
||||
#endif
|
||||
|
7
include/core1/eeprom.h
Normal file
7
include/core1/eeprom.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_EEPROM_H
|
||||
#define BANJO_KAZOOIE_CORE1_EEPROM_H
|
||||
|
||||
s32 eeprom_writeBlocks(s32 file, s32 offset, void *buffer, s32 count);
|
||||
s32 eeprom_readBlocks(s32 file, s32 offset, void *buffer, s32 count);
|
||||
|
||||
#endif
|
28
include/core1/framebufferdraw.h
Normal file
28
include/core1/framebufferdraw.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_FRAMEBUFFERDRAW_H
|
||||
#define BANJO_KAZOOIE_CORE1_FRAMEBUFFERDRAW_H
|
||||
|
||||
void framebufferdraw_drawSpriteCI4(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
|
||||
void framebufferdraw_drawSpriteCI8(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
|
||||
void framebufferdraw_drawSpriteRGBA16(s32 x, s32 y, BKSprite *sprite, s32 frame, bool alpha_enabled);
|
||||
void framebufferdraw_drawSpriteI4(s32 x, s32 y, BKSprite *sprite, s32 frame, bool aplha_enabled);
|
||||
void framebufferdraw_drawSpriteIA4(s32 x, s32 y, BKSprite *sprite, s32 frame, bool aplha_enabled);
|
||||
void framebufferdraw_drawSpriteI8(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
|
||||
void framebufferdraw_drawSpriteIA8(s32 x, s32 y, BKSprite *sprite, s32 frame, bool alpha_enabled);
|
||||
void framebufferdraw_drawSpriteRGBA32(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
|
||||
void framebufferdraw_stub1(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
void framebufferdraw_stub2(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
void framebufferdraw_drawTexture_CI4(s32 x, s32 y, void *tmem, s32 w, s32 h, bool alpha_enabled);
|
||||
void framebufferdraw_draw(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
|
||||
void framebufferdraw_func_80249DE0(s32 x, s32 y, s16 *arg2, s32 arg3, s32 arg4);
|
||||
void framebufferdraw_func_80249F34(s32 x, s32 y, Struct84s* maskList, s32 maskIndex, s32 mX, s32 mY, s32 mW, s32 mH, s32 maskColor, s32 mStride, bool dim, s32 replacementColor);
|
||||
void framebufferdraw_drawGrid(s32 x, s32 y, s32 arg2, s32 arg3, s32 horz_spacing, s32 vert_spacing);
|
||||
void framebufferdraw_setPixel(s32 x, s32 y);
|
||||
void framebufferdraw_drawOutline(s32 x, s32 y, s32 w, s32 h);
|
||||
void framebufferdraw_func_8024A564(s32 x, s32 y, u16 *arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6);
|
||||
void framebufferdraw_drawRect(s32 x, s32 y, s32 w, s32 h);
|
||||
void framebufferdraw_resetPrimColorAndBuffer(void);
|
||||
void framebufferdraw_setPrimColor(s32 r, s32 g, s32 b);
|
||||
void framebufferdraw_setBufferIndex(s32 buffer_indx);
|
||||
s32 framebufferdraw_getBufferIndex(void);
|
||||
|
||||
#endif
|
8
include/core1/lookup.h
Normal file
8
include/core1/lookup.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_LOOKUP_H
|
||||
#define BANJO_KAZOOIE_CORE1_LOOKUP_H
|
||||
|
||||
enum comusic_e lookup_getCoMusicId(s32 idx);
|
||||
enum sfx_e lookup_getSfxId(s32 idx);
|
||||
enum asset_e lookup_getAnimAssetId(s32 idx);
|
||||
|
||||
#endif
|
26
include/core1/main.h
Normal file
26
include/core1/main.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_MAIN_H
|
||||
#define BANJO_KAZOOIE_CORE1_MAIN_H
|
||||
|
||||
void func_8023DA20(s32 arg0);
|
||||
void func_8023DA74(void);
|
||||
void func_8023DA9C(s32 arg0);
|
||||
u32 globalTimer_getTimeMasked(u32 mask);
|
||||
//s32 globalTimer_getTime(void);
|
||||
void globalTimer_reset(void);
|
||||
enum map_e getSpecialBootMap(void);
|
||||
enum map_e getDefaultBootMap(void);
|
||||
void func_8023DBAC(void);
|
||||
void func_8023DBDC(void);
|
||||
void core1_init(void);
|
||||
void globalTimer_incTimer(void);
|
||||
void globalTimer_decTimer(void);
|
||||
void mainLoop(void);
|
||||
void mainThread_entry(void *arg);
|
||||
void func_8023DFF0(s32 arg0);
|
||||
s32 func_8023E000(void);
|
||||
void setBootMap(enum map_e map_id);
|
||||
void mainThread_create(void);
|
||||
OSThread *mainThread_get(void);
|
||||
void disableInput_set(void);
|
||||
|
||||
#endif
|
@@ -1,5 +1,5 @@
|
||||
#ifndef __MEM_H__
|
||||
#define __MEM_H__
|
||||
#ifndef BANJO_KAZOOIE_CORE1_MEMORY_H
|
||||
#define BANJO_KAZOOIE_CORE1_MEMORY_H
|
||||
|
||||
/**
|
||||
* copy memory area
|
||||
|
122
include/core1/ml.h
Normal file
122
include/core1/ml.h
Normal file
@@ -0,0 +1,122 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_ML_H
|
||||
#define BANJO_KAZOOIE_CORE1_ML_H
|
||||
|
||||
f32 ml_acosf_deg(f32 x);
|
||||
void ml_vec3f_sub_and_rotate(f32 vec1[3], f32 rotation[3], f32 vec2[3], f32 dst[3]);
|
||||
f32 ml_vec3f_cos_between(f32 vec1[3], f32 vec2[3]);
|
||||
void ml_vec3f_cross_product(f32 dst[3], f32 vec1[3], f32 vec2[3]);
|
||||
void ml_vec3f_interpolate_fast(f32 dst[3], f32 start[3], f32 end[3], f32 t);
|
||||
f32 ml_vec3f_dot_product(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_vec3f_distance(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_func_802560D0(f32 arg0[3], f32 arg1[3], f32 arg2[3]);
|
||||
f32 ml_distanceSquared_vec3f(f32 vec1[3], f32 vec2[3]);
|
||||
void func_802562DC(f32 vec1[3], f32 vec2[3], f32 vec3[3]);
|
||||
f32 ml_vec3f_length_unused(f32 vec[3]);
|
||||
void ml_vec3f_normalize_copy(f32 arg0[3], f32 arg1[3]);
|
||||
void ml_vec3f_normalize(f32 vec[3]);
|
||||
void ml_vec2f_normalize(f32 vec[2]);
|
||||
void ml_3f_normalize(f32 *x, f32 *y, f32 *z);
|
||||
void ml_vec3f_set_length_copy(f32 dst[3], f32 src[3], f32 len);
|
||||
void func_80256664(f32 ptr[3]);
|
||||
void func_80256740(f32 vec[3]);
|
||||
void ml_vec3f_pitch_rotate_copy(f32 dst[3], f32 src[3], f32 pitch);
|
||||
void ml_vec3f_yaw_rotate_copy(f32 dst[3], f32 src[3], f32 yaw);
|
||||
void ml_vec3f_roll_rotate_copy(f32 dst[3], f32 src[3], f32 roll);
|
||||
void ml_vec3f_set_length(f32 vec[3], f32 length);
|
||||
f32 func_80256AB4(f32 x1, f32 y1, f32 x2, f32 y2);
|
||||
f32 func_80256B54(f32 vec1[3], f32 vec2[3]);
|
||||
f32 func_80256C60(f32 vec[3], s32 val);
|
||||
void func_80256D0C(f32 val1, f32 val2, f32 x, f32 y, f32 z, f32 *dstX, f32 *dstY, f32 *dstZ);
|
||||
void func_80256E24(f32 dst[3], f32 theta, f32 phi, f32 x, f32 y, f32 z);
|
||||
void func_80256F44(f32 vec1[3], f32 vec2[3], f32 vec3[3], f32 dst[3]);
|
||||
f32 ml_acosf(f32 x);
|
||||
f32 func_8025715C(f32 val1, f32 val2);
|
||||
f32 func_80257204(f32 val1, f32 val2, f32 val3, f32 val4);
|
||||
f32 func_80257248(f32 vec1[3], f32 vec2[3]);
|
||||
void func_8025727C(f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z2, f32 *o1, f32 *o2);
|
||||
void ml_init(void);
|
||||
void ml_free(void);
|
||||
f32 func_802575BC(f32 val);
|
||||
f32 func_80257618(f32 val);
|
||||
f32 func_80257658(f32 val);
|
||||
f32 func_80257680(f32 val1, f32 val2, f32 val3);
|
||||
void ml_defrag(void);
|
||||
bool ml_timer_update(f32 *timer, f32 delta);
|
||||
void func_8025778C(f32 dst[3], f32 arg1[3], f32 arg2[3][3]);
|
||||
void func_802578A4(f32 dst[3], f32 vec1[3], f32 vec2[3]);
|
||||
void func_80257918(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3[3]);
|
||||
bool func_802579B0(f32 vec[3], f32 x1, f32 z1, f32 x2, f32 z2);
|
||||
f32 func_80257A44(f32 val1, f32 val2);
|
||||
f32 func_80257A6C(f32 val1, f32 val2);
|
||||
f32 func_80257AD4(f32 val1, f32 val2);
|
||||
f32 ml_map_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
|
||||
f32 ml_mapRange_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
|
||||
f32 ml_interpolate_f(f32 arg0, f32 arg1, f32 arg2);
|
||||
f32 ml_mapFunction_f(f32 a, f32 b, f32 c, f32 d, f32 e, f32 (*func)(f32));
|
||||
f32 func_80257CC0(f32 a, f32 b, f32 c, f32 d, f32 e);
|
||||
f32 func_80257CF8(f32 a, f32 b, f32 c, f32 d, f32 e);
|
||||
f32 ml_mapAbsRange_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
|
||||
void func_80257DB0(f32 arg0[3], f32 arg1[3], f32 arg2[3]);
|
||||
void ml_setLength_vec3f(f32 v[3], f32 a);
|
||||
s32 ml_clamp_w(s32 val, s32 min, s32 max);
|
||||
f32 ml_clamp_f(f32 val, f32 min, f32 max);
|
||||
int func_80257F18(f32 src[3], f32 target[3], f32 *yaw);
|
||||
int func_8025801C(f32 target[3], f32 *yaw);
|
||||
int func_80258108(f32 vec[3], f32 *arg1, f32 *arg2);
|
||||
int func_80258210(f32 x, f32 y, f32 *dst);
|
||||
bool ml_isZero_vec3f(f32 vec[3]);
|
||||
bool ml_isNonzero_vec3f(f32 vec[3]);
|
||||
bool ml_vec3f_not_on_vertical_axis(f32 vec[3]);
|
||||
bool ml_vec3f_inside_box_f(f32 vec[3], f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ);
|
||||
bool ml_vec3f_inside_box_vec3f(f32 vec[3], f32 min[3], f32 max[3]);
|
||||
bool ml_vec3w_inside_box_w(s32 vec[3], s32 minX, s32 minY, s32 minZ, s32 maxX, s32 maxY, s32 maxZ);
|
||||
f32 ml_vec3f_horizontal_distance_zero_likely(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_vec3f_horizontal_distance_squared_zero_likely(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_vec3f_length(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_vec3f_length_sq(f32 vec1[3], f32 vec2[3]);
|
||||
f32 ml_sin_deg(f32 angle_deg);
|
||||
f32 ml_cos_deg(f32 angle_deg);
|
||||
f32 mlNormalizeAngle(f32 angle);
|
||||
f32 ml_remainder_f(f32 arg0, f32 arg1);
|
||||
f32 ml_max_f(f32 arg0, f32 arg1);
|
||||
f32 ml_min_f(f32 arg0, f32 arg1);
|
||||
int ml_max_w(int arg0, int arg1);
|
||||
int ml_min_w(int arg0, int arg1);
|
||||
f32 mlAbsF(f32 arg0);
|
||||
f32 func_80258994(f32 arg0[3]);
|
||||
int ml_abs_w(int arg0);
|
||||
void func_802589E4(f32 dst[3], f32 yaw, f32 length);
|
||||
void func_80258A4C(f32 vec1[3], f32 arg1, f32 vec2[3], f32 *arg3, f32 *arg4, f32 *arg5);
|
||||
void ml_vec3f_clear(f32 dst[3]);
|
||||
void ml_vec3f_copy(f32 dst[3], f32 src[3]);
|
||||
void ml_vec3f_diff_copy(f32 dst[3], f32 src1[3], f32 src2[3]);
|
||||
void ml_vec3f_diff(f32 dst[3], f32 src[3]);
|
||||
void ml_vec3f_assign(f32 dst[3], f32 x, f32 y, f32 z);
|
||||
void ml_vec3f_add(f32 dst[3], f32 src1[3], f32 src2[3]);
|
||||
void ml_vec3f_scale(f32 vec[3], f32 scale);
|
||||
void ml_vec3f_scale_copy(f32 dst[3], f32 src[3], f32 scale);
|
||||
void func_80258CDC(f32 vec1[3], f32 vec2[3]);
|
||||
void ml_vec3w_to_vec3f(f32 dst[3], s32 src[3]);
|
||||
void ml_vec3h_to_vec3f(f32 dst[3], s16 src[3]);
|
||||
void ml_vec3f_to_vec3w(s32 dst[3], f32 src[3]);
|
||||
void ml_vec3f_to_vec3h(s16 dst[3], f32 src[3]);
|
||||
void ml_translate_y_local(f32 position[3], f32 rotation[3], f32 dy);
|
||||
void ml_translate_z_local(f32 dst[3], f32 src[3], f32 dz);
|
||||
void ml_translate_x_local(f32 dst[3], f32 src[3], f32 dx);
|
||||
void func_8025901C(f32 arg0, f32 arg1[3], f32 arg2[3], f32 arg3);
|
||||
f32 func_80259198(f32 arg0, f32 arg1);
|
||||
f32 mlDiffDegF(f32 arg0, f32 arg1);
|
||||
bool ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 distance);
|
||||
bool ml_vec3f_within_horizontal_distance(f32 vec1[3], f32 vec2[3], f32 distance);
|
||||
bool ml_vec3w_within_horizontal_distance(s32 vec1[3], s32 vec2[3], s32 distance);
|
||||
bool ml_vec3f_within_distance(f32 vec1[3], f32 vec2[3], f32 distance);
|
||||
bool ml_stub_80259400(f32 x);
|
||||
void ml_sub_delta_time(f32 *x);
|
||||
void func_8025947C(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);
|
||||
f32 func_80259554(f32 dst[3], f32 vec1[3], f32 vec2[3], f32 vec3[3]);
|
||||
void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);
|
||||
s32 ml_getViewportYawWithOffset(f32 x);
|
||||
bool ml_isViewportYawWithOffsetNormalized(f32 x);
|
||||
void ml_vec3f_interpolate(f32 dst[3], f32 start[3], f32 end[3], f32 t);
|
||||
|
||||
#endif
|
45
include/core1/mlmtx.h
Normal file
45
include/core1/mlmtx.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_MLMTX_H
|
||||
#define BANJO_KAZOOIE_CORE1_MLMTX_H
|
||||
|
||||
void mlMtxGet(MtxF *dst);
|
||||
MtxF *mlMtx_get_stack_pointer(void);
|
||||
void mlMtxApply(Mtx *mPtr);
|
||||
void mlMtxPop(void);
|
||||
void mlMtx_push_duplicate(void);
|
||||
void mlMtx_push_identity(void);
|
||||
void mlMtx_push_translation(f32 x, f32 y, f32 z);
|
||||
void mlMtx_push_mtx(f32* mtx);
|
||||
void mlMtx_push_multiplied(f32* l_mtx);
|
||||
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx);
|
||||
void mlMtxIdent(void);
|
||||
void func_80251B5C(f32 x, f32 y, f32 z);
|
||||
void mlMtxSet(MtxF* arg0);
|
||||
void mlMtxRotate(f32 a, f32 x, f32 y, f32 z);
|
||||
void mlMtxRotPitch(f32 arg0);
|
||||
void mlMtxRotYaw(f32 arg0);
|
||||
void mlMtxRotRoll(f32 arg0);
|
||||
void mlMtx_rotate_pitch_deg(f32 arg0);
|
||||
void mlMtx_rotate_yaw_deg(f32 arg0);
|
||||
void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll);
|
||||
void mlMtxScale_xyz(f32 x, f32 y, f32 z);
|
||||
void mlMtxScale(f32 scale);
|
||||
void func_80252330(f32 x, f32 y, f32 z);
|
||||
void mlMtx_apply_vec3f(f32 dst[3], f32 src[3]);
|
||||
void mlMtx_apply_vec3f_restricted(f32 dst[3], f32 src[3]);
|
||||
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z);
|
||||
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]);
|
||||
void func_8025276C(s32 arg0[3], s32 arg1[3], s32 arg2[3], s32 arg3[3]);
|
||||
void mlMtxTranslate(f32 x, f32 y, f32 z);
|
||||
void func_80252A38(f32 x, f32 y, f32 z);
|
||||
void func_80252AF0(f32 arg0[3], f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3]);
|
||||
void func_80252C08(f32 arg0[3], f32 rotation[3], f32 scale, f32 arg3[3]);
|
||||
void func_80252CC4(f32 position[3], f32 rotation[3], f32 scale, f32 arg3[3]);
|
||||
void func_80252D8C(f32 position[3], f32 rotation[3]);
|
||||
void func_80252DDC(f32 position[3], f32 rotation[3]);
|
||||
void func_80252E4C(f32 position[3], f32 rotation[3]);
|
||||
void func_80252EC8(f32 position[3], f32 rotation[3]);
|
||||
void func_80252F50(f32 rotation[3]);
|
||||
void func_80252F8C(f32 rotation[3]);
|
||||
void func_80252FC8(f32 rotation[3]);
|
||||
|
||||
#endif
|
68
include/core1/pfsmanager.h
Normal file
68
include/core1/pfsmanager.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_PFSMANAGER_H
|
||||
#define BANJO_KAZOOIE_CORE1_PFSMANAGER_H
|
||||
|
||||
typedef struct pfs_manager_face_buttons_s {
|
||||
bool button_a;
|
||||
bool button_b;
|
||||
bool button_c_left;
|
||||
bool button_c_up;
|
||||
bool button_c_down;
|
||||
bool button_c_right;
|
||||
} PfsManagerFaceButtons;
|
||||
|
||||
typedef struct pfs_manager_side_buttons_s {
|
||||
bool button_z;
|
||||
bool button_l;
|
||||
bool button_r;
|
||||
} PfsManagerSideButtons;
|
||||
|
||||
typedef struct pfs_manager_controller_data {
|
||||
union { s32 face_button[6]; PfsManagerFaceButtons face_button2; };
|
||||
union { s32 side_button[3]; PfsManagerSideButtons side_button2; };
|
||||
s32 unk24[4];
|
||||
s32 start_button;
|
||||
} PfsManagerControllerData;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
f32 unk8[2];
|
||||
f32 joystick[2];
|
||||
}Struct_core1_10A00_1;
|
||||
|
||||
f32 func_8024E420(s32 arg0, s32 arg1, s32 arg2);
|
||||
void controller_copyFaceButtons(s32 controller_index, s32 dst[6]);
|
||||
void pfsManager_getFirstControllerFaceButtonState(s32 controller_index, s32 dst[6]);
|
||||
s32 func_8024E5E8(s32 arg0, s32 arg1);
|
||||
s32 func_8024E60C(s32 controller_index, s32 dst[3]);
|
||||
s32 func_8024E640(s32 controller_index, s32 dst[3]);
|
||||
f32 func_8024E668(s32 controller_index);
|
||||
s32 controller_getStartButton(s32 controller_index);
|
||||
s32 func_8024E698(s32 controller_index);
|
||||
void func_8024E6E0(s32 controller_index, s32 *dst[4]);
|
||||
void controller_getJoystick(s32 controller_index, f32 dst[2]);
|
||||
void pfsManager_update(void);
|
||||
void pfsManager_readData();
|
||||
void pfsManager_entry(void *arg);
|
||||
void pfsManager_init(void);
|
||||
bool pfsManager_contErr(void);
|
||||
void func_8024F150(void);
|
||||
void func_8024F180(void);
|
||||
void pfsManager_getStartReadData(void);
|
||||
void func_8024F1F0(void);
|
||||
void func_8024F224(void);
|
||||
void func_8024F2E4(s32 arg0, Struct_core1_10A00_1 *arg1);
|
||||
void func_8024F328(s32 controller_index, s32 arg1);
|
||||
OSMesgQueue * pfsManager_getFrameReplyQ(void);
|
||||
OSMesgQueue *pfsManager_getFrameMesgQ(void);
|
||||
void func_8024F35C(s32 arg0);
|
||||
bool pfsManager_isBusy(void);
|
||||
int func_8024F3C4(int arg0);
|
||||
OSContPad *func_8024F3F4(void);
|
||||
void func_8024F400(void);
|
||||
void func_8024F450(void);
|
||||
void func_8024F4AC(void);
|
||||
|
||||
#endif
|
@@ -1,7 +1,5 @@
|
||||
#ifndef RAREZIP_H
|
||||
#define RAREZIP_H
|
||||
#include <ultra64.h>
|
||||
|
||||
#ifndef BANJO_KAZOOIE_CORE1_RAREZIP_H
|
||||
#define BANJO_KAZOOIE_CORE1_RAREZIP_H
|
||||
|
||||
extern u8 D_80275670[];
|
||||
//border[]= { /* Order of the bit length code lengths */
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#ifndef __SNS_H__
|
||||
#define __SNS_H__
|
||||
#include <ultra64.h>
|
||||
#ifndef BANJO_KAZOOIE_CORE1_SNS_H
|
||||
#define BANJO_KAZOOIE_CORE1_SNS_H
|
||||
|
||||
/**
|
||||
* sns sets
|
11
include/core1/sprite.h
Normal file
11
include/core1/sprite.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_SPRITE_H
|
||||
#define BANJO_KAZOOIE_CORE1_SPRITE_H
|
||||
|
||||
u32 sprite_getUnk8(BKSprite *this);
|
||||
u32 sprite_getUnkA(BKSprite *this);
|
||||
u32 sprite_getUnk6(BKSprite *this);
|
||||
u32 sprite_getUnk4(BKSprite *this);
|
||||
s32 sprite_getFrameCount(BKSprite *this);
|
||||
BKSpriteFrame *sprite_getFramePtr(BKSprite *this, u32 frame_id);
|
||||
|
||||
#endif
|
10
include/core1/ucode.h
Normal file
10
include/core1/ucode.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_UCODE_H
|
||||
#define BANJO_KAZOOIE_CORE1_UCODE_H
|
||||
|
||||
void ucode_load(void);
|
||||
void ucode_stub1(void); // does nothing
|
||||
void ucode_stub2(void); // performs dummy read on PI
|
||||
s32 ucode_stub3(void); // returns always 0
|
||||
void ucode_getPtrAndSize(void **ptr, u32 *size);
|
||||
|
||||
#endif
|
@@ -1,10 +1,5 @@
|
||||
#ifndef BANJO_KAZOOIE_VIEWPORT_H
|
||||
#define BANJO_KAZOOIE_VIEWPORT_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <prop.h> // for Cube
|
||||
#include "ml/mtx.h" // for MtxF
|
||||
|
||||
#ifndef BANJO_KAZOOIE_CORE1_VIEWPORT_H
|
||||
#define BANJO_KAZOOIE_CORE1_VIEWPORT_H
|
||||
|
||||
void viewport_moveAlongZAxis(f32 offset);
|
||||
f32 viewport_getDistance(f32 arg0[3]);
|
||||
|
28
include/core1/vimgr.h
Normal file
28
include/core1/vimgr.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef BANJO_KAZOOIE_CORE1_VIMGR_H
|
||||
#define BANJO_KAZOOIE_CORE1_VIMGR_H
|
||||
|
||||
typedef struct struct_1_s{
|
||||
OSMesgQueue *messageQueue;
|
||||
OSMesg message;
|
||||
} struct1;
|
||||
|
||||
u32 getOtherFramebuffer(void);
|
||||
s32 viMgr_func_8024BD94(void);
|
||||
s32 getActiveFramebuffer(void);
|
||||
void viMgr_func_8024BDAC(OSMesgQueue *mq, OSMesg msg);
|
||||
void viMgr_init(void);
|
||||
void viMgr_func_8024BF94(s32 arg0);
|
||||
s32 viMgr_func_8024BFA0(void);
|
||||
void viMgr_func_8024BFAC(void);
|
||||
void viMgr_func_8024BFD8(s32 arg0);
|
||||
void viMgr_func_8024C1B4(void);
|
||||
void viMgr_func_8024C1DC(void);
|
||||
void viMgr_func_8024C1FC(OSMesgQueue *mq, OSMesg msg);
|
||||
void viMgr_setActiveFramebuffer(s32 arg0);
|
||||
void viMgr_entry(void *arg0);
|
||||
void viMgr_setScreenBlack(s32 active);
|
||||
void viMgr_clearFramebuffers(void);
|
||||
s32 viMgr_func_8024C4E8(void);
|
||||
void viMgr_func_8024C4F8(s32 arg0);
|
||||
|
||||
#endif
|
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
#include "generic.h"
|
||||
#include "ml/mtx.h"
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#define animctrl_start(this, file, line) _animctrl_start(this, file, line)
|
||||
|
@@ -12,4 +12,7 @@ void func_8035179C_copyPosition(Struct68s* arg0, f32 arg1[3]);
|
||||
void func_80351814(Struct68s *arg0, f32 arg1[3]);
|
||||
f32 func_80351830(Struct68s *arg0);
|
||||
|
||||
|
||||
extern void sfxsource_setSampleRate(u8, s32);
|
||||
|
||||
#endif
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#include "core2/core2.h"
|
||||
|
||||
#include "math.h" // ToDo: sort out actual dependencies
|
||||
#include "ml.h"
|
||||
#include "ml/mtx.h"
|
||||
#include "bs_funcs.h"
|
||||
|
||||
#include "bsint.h"
|
||||
@@ -45,20 +43,8 @@ void * malloc(s32 size);
|
||||
void free(void*);
|
||||
void *realloc(void* ptr, s32 size);
|
||||
|
||||
f32 ml_map_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
|
||||
float mlNormalizeAngle(float);
|
||||
f32 ml_max_f(f32, f32);
|
||||
f32 ml_min_f(f32, f32);
|
||||
void ml_vec3f_copy(f32 dst[3], f32 src[3]);
|
||||
|
||||
void ml_vec3f_add(f32 dst[3], f32 src1[3], f32 src2[3]);
|
||||
void ml_vec3f_scale(f32 vec[3], f32 scale);
|
||||
void ml_vec3f_scale_copy(f32 dst[3], f32 src[3], f32 scale);
|
||||
|
||||
float gu_sqrtf(float val);
|
||||
|
||||
BKSpriteFrame *spriteGetFramePtr(BKSprite *, u32);
|
||||
|
||||
bool baanim_isAt(f32);
|
||||
void baanim_playForDuration_once(enum asset_e anim_id, f32 duration);
|
||||
void baanim_setEnd(f32);
|
||||
@@ -226,22 +212,7 @@ void particleEmitter_setSpawnInterval(ParticleEmitter *, f32);
|
||||
OSContPad *func_8024F3F4(void);
|
||||
OSMesgQueue *pfsManager_getFrameReplyQ(void);
|
||||
|
||||
void ml_vec3f_clear(f32 dst[3]);
|
||||
void ml_vec3f_roll_rotate_copy(f32[3], f32[3], f32);
|
||||
void rumbleManager_80250D94(f32, f32, f32);
|
||||
void func_80256E24(f32[3], f32, f32, f32, f32, f32);
|
||||
void func_8025727C(f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z2, f32 *o1, f32 *o2);
|
||||
f32 func_80257A44(f32, f32);
|
||||
f32 ml_interpolate_f(f32, f32, f32);
|
||||
f32 ml_mapAbsRange_f(f32, f32, f32, f32, f32);
|
||||
int func_80257F18(f32 src[3], f32 target[3], f32 *yaw);
|
||||
bool func_8025801C(f32[3], f32*);
|
||||
|
||||
f32 mlAbsF(f32);
|
||||
f32 ml_clamp_f(f32, f32, f32);
|
||||
f32 ml_remainder_f(f32, f32);
|
||||
void func_802589E4(f32 dst[3], f32 yaw, f32 length);
|
||||
f32 mlDiffDegF(f32, f32);
|
||||
|
||||
void func_8025A6EC(enum comusic_e, s32);
|
||||
void comusic_playTrack(enum comusic_e);
|
||||
@@ -456,15 +427,12 @@ Actor *actorArray_findClosestActorFromActorId(f32 position[3], enum actor_e acto
|
||||
Actor *subaddie_getLinkedActor(Actor *);
|
||||
|
||||
/* used in RBB */
|
||||
void ml_vec3f_pitch_rotate_copy(f32 dst[3], f32 src[3], f32 pitch);
|
||||
int ml_timer_update(f32 *arg0, f32 arg1);
|
||||
Actor *actor_draw(ActorMarker *, Gfx**, Mtx**, Vtx **);
|
||||
|
||||
Actor *func_80325340(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
void func_8032AA58(Actor *, f32);
|
||||
void func_80324E38(f32, s32);
|
||||
void timed_playSfx(f32, enum sfx_e, f32, s32);
|
||||
f32 ml_distance_vec3f(f32 [3], f32 [3]);
|
||||
void timed_setStaticCameraToNode(f32, s32);
|
||||
void timed_exitStaticCamera(f32);
|
||||
int actor_animationIsAt(Actor*, f32);
|
||||
@@ -479,10 +447,8 @@ void func_802FA060(s32, s32, s32, f32);
|
||||
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 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 *);
|
||||
|
||||
|
||||
void func_802E4078(enum map_e map, s32 exit, s32 transition);
|
||||
@@ -494,7 +460,6 @@ void mapSpecificFlags_set(s32, s32);
|
||||
|
||||
struct0 *func_8031B9D8(void);
|
||||
|
||||
extern int func_80259808(f32);
|
||||
void actor_playAnimationOnce(Actor *);
|
||||
void actor_loopAnimation(Actor *);
|
||||
|
||||
@@ -504,7 +469,6 @@ void actor_update_func_80326224(Actor *this);
|
||||
void func_802F9FD0(s32, f32, f32, f32);
|
||||
void func_80324D54(f32, enum sfx_e, f32, s32, f32 [3], f32, f32);
|
||||
|
||||
void glcrc_calc_checksum(void *start, void *end, u32 *checksum);
|
||||
f32 climbGetBottomY(void);
|
||||
f32 climbGetTopY(void);
|
||||
void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);
|
||||
|
10
include/ml.h
10
include/ml.h
@@ -1,10 +0,0 @@
|
||||
#ifndef __MATH_LIBRARY_H__
|
||||
#define __MATH_LIBRARY_H__
|
||||
|
||||
void ml_vec3f_normalize_copy(f32 arg0[3], f32 arg1[3]);
|
||||
void ml_vec3f_yaw_rotate_copy(f32 arg0[3], f32 arg1[3], f32 arg2);
|
||||
void ml_vec3f_diff_copy(f32 dst[3], f32 src1[3], f32 src2[3]);
|
||||
void ml_vec3f_set_length_copy(f32 dst[3], f32 src[3], f32 len);
|
||||
void ml_vec3f_set_length(f32 arg0[3], f32 arg2);
|
||||
|
||||
#endif
|
@@ -1,35 +0,0 @@
|
||||
#ifndef __ML_MTX__
|
||||
#define __ML_MTX__
|
||||
|
||||
typedef struct {
|
||||
f32 m[4][4];
|
||||
} MtxF;
|
||||
|
||||
void mlMtxGet(MtxF *dst);
|
||||
MtxF *mlMtx_get_stack_pointer(void);
|
||||
void mlMtxApply(Mtx *mPtr);
|
||||
void mlMtxPop(void);
|
||||
void mlMtx_push_duplicate(void);
|
||||
void mlMtx_push_identity(void);
|
||||
void mlMtx_push_translation(f32 x, f32 y, f32 z);
|
||||
void mlMtx_push_mtx(f32* mtx);
|
||||
void mlMtx_push_multiplied(f32* l_mtx);
|
||||
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx);
|
||||
void mlMtxIdent(void);
|
||||
void mlMtxSet(MtxF* arg0);
|
||||
void mlMtxRotPitch(f32 arg0);
|
||||
void mlMtxRotYaw(f32 arg0);
|
||||
void mlMtxRotRoll(f32 arg0);
|
||||
void mlMtx_rotate_pitch_deg(f32 arg0);
|
||||
void mlMtx_rotate_yaw_deg(f32 arg0);
|
||||
void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll);
|
||||
void mlMtxScale_xyz(f32 x, f32 y, f32 z);
|
||||
void mlMtxScale(f32 scale);
|
||||
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z);
|
||||
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]);
|
||||
void mlMtxTranslate(f32 x, f32 y, f32 z);
|
||||
|
||||
MtxF *func_8024DD90(void);
|
||||
MtxF *func_8024DD9C(void);
|
||||
|
||||
#endif
|
@@ -186,7 +186,7 @@ typedef struct actor_s{
|
||||
f32 unk4C;
|
||||
/* 0x50 */ f32 yaw; //0x50
|
||||
f32 unk54; //0x54
|
||||
u32 unk58_31: 15;
|
||||
u32 animctrl_asset_id: 15; // animation asset id (enum asset_id)
|
||||
u32 stored_animctrl_index: 14; //animctrlAnimIndex;
|
||||
u32 unk58_2: 1;
|
||||
u32 unk58_1: 1;
|
||||
|
@@ -47,6 +47,10 @@ typedef struct freelist_s{
|
||||
#define FREE_LIST(T) struct freelist_s
|
||||
//^defined to keep element type with sla
|
||||
|
||||
typedef struct {
|
||||
f32 m[4][4];
|
||||
} MtxF;
|
||||
|
||||
typedef struct bk_sprite_s{
|
||||
s16 frameCnt;
|
||||
s16 type;
|
||||
|
@@ -14,9 +14,6 @@ struct Overlay {
|
||||
|
||||
extern struct Overlay gOverlayTable[];
|
||||
|
||||
extern s32 framebuffer_width;
|
||||
extern s32 framebuffer_height;
|
||||
|
||||
extern f32 climbPoleBottom[3];
|
||||
extern f32 climbPoleTop[3];
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user