core2/modelRender.c documentation

This commit is contained in:
Banjo Kazooie
2022-12-01 13:27:28 -06:00
parent b74c76a430
commit aa33833595
43 changed files with 385 additions and 356 deletions

View File

@@ -3,6 +3,7 @@
#include <ultra64.h>
#include "model.h"
#include "generic.h"
enum model_render_depth_mode_e{
MODEL_RENDER_DEPTH_NONE = 0,
@@ -16,9 +17,21 @@ BKTextureList *model_getTextureList(BKModelBin *arg0);
void modelRender_reset(void);
BKModelBin *modelRender_draw(Gfx **gfx, Mtx **mtx, f32 position[3], f32 arg3[3], f32 scale, f32*arg5, BKModelBin* model_bin);
void modelRender_preDraw(GenMethod_1 func, s32 arg);
void modelRender_postDraw(GenMethod_1 func, s32 arg);
void modelRender_setDisplayList(BKGfxList *gfx_list);
void func_8033A308(f32 arg0[3]);
void modelRender_setPrimAndEnvColors(s32 env[4], s32 prim[4]);
void modelRender_setEnvColor(s32 r, s32 g, s32 b, s32 a);
void modelRender_setAlpha(s32 a);
void func_8033A444(struct58s *arg0);
void func_8033A450(s32 arg0);
void func_8033A45C(s32 arg0, s32 arg1);
void func_8033A470(s32 arg0, s32 arg1);
void modelRender_setTextureList(BKTextureList *textureList);
void func_8033A494(s32 arg0);
void func_8033A4A0(enum asset_e modelId, f32 arg1, f32 arg2);
void modelRender_setVertexList(BKVertexList *vertex_list);
void modelRender_setDepthMode(enum model_render_depth_mode_e renderMode);
void modelRender_defrag(void);
#endif

View File

@@ -18,15 +18,12 @@
#include "bs_funcs.h"
#include "bsint.h"
#include "generic.h"
extern f32 fabsf(f32);
#pragma intrinsic (fabsf)
typedef void (* GenMethod_0)(void);
typedef void (* GenMethod_1)(s32);
typedef void (* GenMethod_2)(s32, s32);
typedef void (* GenMethod_4)(s32, s32, s32, s32);
typedef void (* GenMethod_5)(s32, s32, s32, s32, s32);
#define NOT(boolean) ((boolean) ^ 1)
#define TUPLE_ASSIGN(out, a, b, c) {\

View File

@@ -120,7 +120,7 @@ typedef struct {
u8 unk60[0x30];
u8 unk90[0x20];
u8 unkB0[0x40];
BKModelBin *unkF0;
BKModelBin *model;
AnimCtrl *anim_ctrl;
BKSprite *unkF8;
BKSpriteDisplayData *unkFC;

11
include/generic.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef _GENERIC_METHODS_H_
#define _GENERIC_METHODS_H_
typedef void (* GenMethod_0)(void);
typedef void (* GenMethod_1)(s32);
typedef void (* GenMethod_2)(s32, s32);
typedef void (* GenMethod_3)(s32, s32, s32);
typedef void (* GenMethod_4)(s32, s32, s32, s32);
typedef void (* GenMethod_5)(s32, s32, s32, s32, s32);
#endif