mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-24 06:29:59 +00:00
z64vi*.h
and sys_cfb.h
headers (#1259)
* z64vimode.h * z64viscvg.h * z64vis*.h * VisCvg * sys_cfb.h * a bit of naming * review * Renames * bss * fix * bss * bss * bss * messed up the merge * bss is borken * reordering 2 * remove prevent header from fault.c
This commit is contained in:
parent
17b774effe
commit
d107b6c2a9
@ -1206,18 +1206,6 @@ void SkinMatrix_SetYRotation(MtxF* mf, s16 a);
|
||||
void SkinMatrix_MulYRotation(MtxF* mf, s16 a);
|
||||
void SkinMatrix_SetZRotation(MtxF* mf, s16 a);
|
||||
|
||||
void ViMode_LogPrint(OSViMode* vimode);
|
||||
void ViMode_Configure(OSViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
||||
s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust);
|
||||
void ViMode_Save(ViMode* viMode);
|
||||
void ViMode_Load(ViMode* viMode);
|
||||
void ViMode_Init(ViMode* viMode);
|
||||
void ViMode_Destroy(ViMode* viMode);
|
||||
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
|
||||
void ViMode_Update(ViMode* viMode, Input* input);
|
||||
void VisCvg_Init(struct_801F8010* this);
|
||||
void VisCvg_Destroy(struct_801F8010* this);
|
||||
void VisCvg_Draw(struct_801F8010* this, Gfx** gfxp);
|
||||
void func_80140E80(Struct_80140E80* arg0);
|
||||
void func_80140EA0(Struct_80140E80* arg0);
|
||||
// void func_80140EAC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
@ -1228,16 +1216,6 @@ void func_8014116C(Gfx** gfxP, u16* arg1, u16* workBuffer, s32 width, s32 height
|
||||
// void func_8014151C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
// void func_80141678(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
void func_80141778(Struct_80140E80* arg0, Gfx** gfxp, void* unk_18E60, GraphicsContext* gfxCtx);
|
||||
void VisMono_Init(VisMono* this);
|
||||
void VisMono_Destroy(VisMono* this);
|
||||
// void VisMono_DesaturateTLUT(u16* tlut);
|
||||
// void VisMono_DesaturateDList(Gfx* gfx);
|
||||
void VisMono_Draw(VisMono* this, Gfx** gfxp);
|
||||
// void VisMono_DrawOld(VisMono* this);
|
||||
|
||||
void VisZbuf_Init(VisZbuf* this);
|
||||
void VisZbuf_Destroy(VisZbuf* this);
|
||||
void VisZbuf_Draw(VisZbuf* this, Gfx** gfxP, void* zbuffer);
|
||||
|
||||
// void func_80147520(void);
|
||||
void func_80147564(PlayState* play);
|
||||
@ -1491,14 +1469,6 @@ void Mtx_SetTranslateScaleMtx(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32
|
||||
void Mtx_SetRotationMtx(Mtx* mtx, s32 angle, f32 axisX, f32 axisY, f32 axisZ);
|
||||
void Mtx_SetTranslationRotationScaleMtx(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, s32 angle, f32 axisX, f32 axisY, f32 axisZ,f32 translateX, f32 translateY, f32 translateZ);
|
||||
|
||||
void SysCfb_SetLoResMode(void);
|
||||
void SysCfb_SetHiResMode(void);
|
||||
void SysCfb_Init(void);
|
||||
void* SysCfb_GetFramebuffer(s32 index);
|
||||
void* SysCfb_GetZBuffer(void);
|
||||
void* SysCfb_GetWorkBuffer(void);
|
||||
u16 SysCfb_GetZBufferPixel(s32 x, s32 y);
|
||||
s32 SysCfb_GetZBufferInt(s32 x, s32 y);
|
||||
void CmpDma_LoadFile(uintptr_t segmentVrom, s32 id, void* dst, size_t size);
|
||||
void CmpDma_LoadAllFiles(uintptr_t segmentVrom, void* dst, size_t size);
|
||||
// void Check_WriteRGBA16Pixel(u16* buffer, u32 x, u32 y, u32 value);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "io/controller.h"
|
||||
#include "irqmgr.h"
|
||||
|
||||
typedef struct {
|
||||
typedef struct Input {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
|
44
include/prevent_bss_reordering2.h
Normal file
44
include/prevent_bss_reordering2.h
Normal file
@ -0,0 +1,44 @@
|
||||
#ifndef PREVENT_BSS_REORDERING2_H
|
||||
#define PREVENT_BSS_REORDERING2_H
|
||||
|
||||
/**
|
||||
* See the explanation at prevent_bss_reordering.h
|
||||
*
|
||||
* Instead of producing 64 dummy declarations, this header only produces 32
|
||||
* dummy declarations
|
||||
*/
|
||||
|
||||
struct Dummy100 { int x; };
|
||||
struct Dummy101 { int x; };
|
||||
struct Dummy102 { int x; };
|
||||
struct Dummy103 { int x; };
|
||||
struct Dummy104 { int x; };
|
||||
struct Dummy105 { int x; };
|
||||
struct Dummy106 { int x; };
|
||||
struct Dummy107 { int x; };
|
||||
struct Dummy108 { int x; };
|
||||
struct Dummy109 { int x; };
|
||||
struct Dummy110 { int x; };
|
||||
struct Dummy111 { int x; };
|
||||
struct Dummy112 { int x; };
|
||||
struct Dummy113 { int x; };
|
||||
struct Dummy114 { int x; };
|
||||
struct Dummy115 { int x; };
|
||||
struct Dummy116 { int x; };
|
||||
struct Dummy117 { int x; };
|
||||
struct Dummy118 { int x; };
|
||||
struct Dummy119 { int x; };
|
||||
struct Dummy120 { int x; };
|
||||
struct Dummy121 { int x; };
|
||||
struct Dummy122 { int x; };
|
||||
struct Dummy123 { int x; };
|
||||
struct Dummy124 { int x; };
|
||||
struct Dummy125 { int x; };
|
||||
struct Dummy126 { int x; };
|
||||
struct Dummy127 { int x; };
|
||||
struct Dummy128 { int x; };
|
||||
struct Dummy129 { int x; };
|
||||
struct Dummy130 { int x; };
|
||||
struct Dummy131 { int x; };
|
||||
|
||||
#endif
|
38
include/sys_cfb.h
Normal file
38
include/sys_cfb.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef SYS_CFB_H
|
||||
#define SYS_CFB_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "macros.h"
|
||||
|
||||
void SysCfb_SetLoResMode(void);
|
||||
void SysCfb_SetHiResMode(void);
|
||||
void SysCfb_Init(void);
|
||||
void* SysCfb_GetFramebuffer(s32 index);
|
||||
void* SysCfb_GetZBuffer(void);
|
||||
void* SysCfb_GetWorkBuffer(void);
|
||||
u16 SysCfb_GetZBufferPixel(s32 x, s32 y);
|
||||
s32 SysCfb_GetZBufferInt(s32 x, s32 y);
|
||||
|
||||
extern void* gFramebuffers[2];
|
||||
extern OSViMode* gActiveViMode;
|
||||
extern u16* gZBufferPtr;
|
||||
extern void* gWorkBuffer;
|
||||
extern u64* gGfxSPTaskOutputBufferPtr;
|
||||
extern void* gGfxSPTaskOutputBufferEnd;
|
||||
|
||||
extern u16 (*gZBufferLoRes)[SCREEN_WIDTH * SCREEN_HEIGHT];
|
||||
extern u16 (*gWorkBufferLoRes)[SCREEN_WIDTH * SCREEN_HEIGHT];
|
||||
extern u64 (*gGfxSPTaskOutputBufferLoRes)[0x3000];
|
||||
extern void* gGfxSPTaskOutputBufferEndLoRes;
|
||||
|
||||
extern u16 (*gZBufferHiRes)[HIRES_BUFFER_WIDTH * HIRES_BUFFER_HEIGHT];
|
||||
extern u16 (*gWorkBufferHiRes)[HIRES_BUFFER_WIDTH * HIRES_BUFFER_HEIGHT];
|
||||
extern u64 (*gGfxSPTaskOutputBufferHiRes)[0x3000];
|
||||
extern void* gGfxSPTaskOutputBufferEndHiRes;
|
||||
extern s16 gCfbWidth;
|
||||
extern s16 gCfbHeight;
|
||||
extern s16 gCfbLeftAdjust;
|
||||
extern s16 gCfbUpperAdjust;
|
||||
extern u8 gSysCfbHiResEnabled;
|
||||
|
||||
#endif
|
@ -356,10 +356,6 @@ extern SceneTableEntry gSceneTable[SCENE_MAX];
|
||||
extern UNK_PTR D_801C5C50;
|
||||
// extern UNK_TYPE1 D_801C5C9C;
|
||||
extern UNK_PTR D_801C5CB0;
|
||||
// extern UNK_TYPE1 D_801C5DD0;
|
||||
// extern UNK_TYPE1 D_801C5DE0;
|
||||
// extern UNK_TYPE1 D_801C5DF0;
|
||||
// extern UNK_TYPE1 D_801C5E00;
|
||||
|
||||
// extern UNK_TYPE1 D_801C6A70;
|
||||
// extern UNK_TYPE2 D_801C6A74;
|
||||
@ -2051,23 +2047,8 @@ extern s16 D_801F4E7A;
|
||||
extern void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
extern void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
|
||||
extern s16 sTransitionFillTimer;
|
||||
extern Input D_801F6C18;
|
||||
extern TransitionTile sTransitionTile;
|
||||
extern s32 gTransitionTileState;
|
||||
extern VisMono sVisMono;
|
||||
extern Color_RGBA8_u32 gVisMonoColor;
|
||||
extern Struct_80140E80 D_801F6D38;
|
||||
extern Struct_80140E80* D_801F6D4C;
|
||||
extern BombersNotebook sBombersNotebook;
|
||||
extern u8 sBombersNotebookOpen;
|
||||
extern u8 sMotionBlurStatus;
|
||||
|
||||
extern UNK_TYPE1 D_801F7FF0;
|
||||
extern struct_801F8010 D_801F8010;
|
||||
extern VisZbuf sVisZbuf;
|
||||
extern VisMono sMonoColors;
|
||||
extern ViMode D_801F8048;
|
||||
|
||||
extern GfxMasterList* gGfxMasterDL;
|
||||
|
||||
@ -2085,31 +2066,6 @@ extern volatile OSTime sRSPOtherTotalTime;
|
||||
extern volatile OSTime gRDPTotalTime;
|
||||
// extern UNK_TYPE1 D_801FBB28;
|
||||
|
||||
extern OSViMode sNotebookViMode;
|
||||
extern void* gFramebuffers[2];
|
||||
extern OSViMode* gActiveViMode;
|
||||
extern u16* gZBufferPtr;
|
||||
extern void* gWorkBuffer;
|
||||
extern u64* gGfxSPTaskOutputBufferPtr;
|
||||
extern void* gGfxSPTaskOutputBufferEnd;
|
||||
extern void* sCfbLoRes1;
|
||||
extern void* sCfbLoRes0;
|
||||
extern u16 (*gZBufferLoRes)[SCREEN_WIDTH * SCREEN_HEIGHT];
|
||||
extern u16 (*gWorkBufferLoRes)[SCREEN_WIDTH * SCREEN_HEIGHT];
|
||||
extern u64 (*gGfxSPTaskOutputBufferLoRes)[0x3000];
|
||||
extern void* gGfxSPTaskOutputBufferEndLoRes;
|
||||
extern void* sCfbHiRes1;
|
||||
extern void* sCfbHiRes0;
|
||||
extern u16 (*gZBufferHiRes)[HIRES_BUFFER_WIDTH * HIRES_BUFFER_HEIGHT];
|
||||
extern u16 (*gWorkBufferHiRes)[HIRES_BUFFER_WIDTH * HIRES_BUFFER_HEIGHT];
|
||||
extern u64 (*gGfxSPTaskOutputBufferHiRes)[0x3000];
|
||||
extern void* gGfxSPTaskOutputBufferEndHiRes;
|
||||
extern s16 gCfbWidth;
|
||||
extern s16 gCfbHeight;
|
||||
extern s16 gCfbLeftAdjust;
|
||||
extern s16 gCfbUpperAdjust;
|
||||
extern u8 gSysCfbHiResEnabled;
|
||||
|
||||
extern Vec3f D_801FBBF0;
|
||||
extern LineSegment Math3D_ColSphereTri_line;
|
||||
extern Vec3f Math3D_ColSphereTri_point;
|
||||
|
@ -396,29 +396,6 @@ typedef struct {
|
||||
/* 0x10 */ Color_RGBA8_u32 envColor;
|
||||
} Struct_80140E80; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 type;
|
||||
/* 0x4 */ u32 setScissor;
|
||||
/* 0x8 */ Color_RGBA8_u32 color;
|
||||
/* 0xC */ Color_RGBA8 envColor;
|
||||
} struct_801F8010; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 useRgba;
|
||||
/* 0x4 */ u32 setScissor;
|
||||
/* 0x8 */ Color_RGBA8_u32 primColor;
|
||||
/* 0xC */ Color_RGBA8_u32 envColor;
|
||||
} VisZbuf; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 unk_00;
|
||||
/* 0x04 */ u32 setScissor;
|
||||
/* 0x08 */ Color_RGBA8_u32 primColor;
|
||||
/* 0x0C */ Color_RGBA8_u32 envColor;
|
||||
/* 0x10 */ u16* tlut;
|
||||
/* 0x14 */ Gfx* dList;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
// TODO: Dedicated Header?
|
||||
#define FRAM_BASE_ADDRESS 0x08000000 // FRAM Base Address in Cart Memory
|
||||
#define FRAM_STATUS_REGISTER FRAM_BASE_ADDRESS // FRAM Base Address in Cart Memory
|
||||
@ -471,29 +448,4 @@ typedef enum FramMode {
|
||||
/* 4 */ FRAM_MODE_STATUS
|
||||
} FramMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
|
||||
/* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
|
||||
/* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
|
||||
/* 3 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
|
||||
} ViModeEditState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSViMode customViMode;
|
||||
/* 0x50 */ s32 viHeight;
|
||||
/* 0x54 */ s32 viWidth;
|
||||
/* 0x58 */ s32 rightAdjust;
|
||||
/* 0x5C */ s32 leftAdjust;
|
||||
/* 0x60 */ s32 lowerAdjust;
|
||||
/* 0x64 */ s32 upperAdjust;
|
||||
/* 0x68 */ s32 editState;
|
||||
/* 0x6C */ s32 tvType;
|
||||
/* 0x70 */ u32 loRes;
|
||||
/* 0x74 */ u32 antialiasOff;
|
||||
/* 0x78 */ u32 modeN;
|
||||
/* 0x7C */ u32 fb16Bit;
|
||||
/* 0x80 */ u32 viFeatures;
|
||||
/* 0x84 */ u32 unk_84;
|
||||
} ViMode; // size = 0x88
|
||||
|
||||
#endif
|
||||
|
43
include/z64vimode.h
Normal file
43
include/z64vimode.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef Z64_VIMODE_H
|
||||
#define Z64_VIMODE_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
struct Input;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
|
||||
/* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
|
||||
/* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
|
||||
/* 3 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
|
||||
} ViModeEditState;
|
||||
|
||||
typedef struct ViMode {
|
||||
/* 0x00 */ OSViMode customViMode;
|
||||
/* 0x50 */ s32 viHeight;
|
||||
/* 0x54 */ s32 viWidth;
|
||||
/* 0x58 */ s32 rightAdjust;
|
||||
/* 0x5C */ s32 leftAdjust;
|
||||
/* 0x60 */ s32 lowerAdjust;
|
||||
/* 0x64 */ s32 upperAdjust;
|
||||
/* 0x68 */ s32 editState;
|
||||
/* 0x6C */ s32 tvType;
|
||||
/* 0x70 */ u32 loRes;
|
||||
/* 0x74 */ u32 antialiasOff;
|
||||
/* 0x78 */ u32 modeN;
|
||||
/* 0x7C */ u32 fb16Bit;
|
||||
/* 0x80 */ u32 viFeatures;
|
||||
/* 0x84 */ u32 unk_84;
|
||||
} ViMode; // size = 0x88
|
||||
|
||||
void ViMode_LogPrint(OSViMode* vimode);
|
||||
void ViMode_Configure(OSViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
||||
s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust);
|
||||
void ViMode_Save(ViMode* viMode);
|
||||
void ViMode_Load(ViMode* viMode);
|
||||
void ViMode_Init(ViMode* viMode);
|
||||
void ViMode_Destroy(ViMode* viMode);
|
||||
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
|
||||
void ViMode_Update(ViMode* viMode, struct Input* input);
|
||||
|
||||
#endif
|
18
include/z64viscvg.h
Normal file
18
include/z64viscvg.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef Z64_VISCVG_H
|
||||
#define Z64_VISCVG_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef struct VisCvg {
|
||||
/* 0x0 */ u32 type;
|
||||
/* 0x4 */ u32 setScissor;
|
||||
/* 0x8 */ Color_RGBA8_u32 color;
|
||||
/* 0xC */ Color_RGBA8 envColor;
|
||||
} VisCvg; // size = 0x10
|
||||
|
||||
void VisCvg_Init(VisCvg* this);
|
||||
void VisCvg_Destroy(VisCvg* this);
|
||||
void VisCvg_Draw(VisCvg* this, Gfx** gfxp);
|
||||
|
||||
#endif
|
20
include/z64vismono.h
Normal file
20
include/z64vismono.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef Z64_VISMONO_H
|
||||
#define Z64_VISMONO_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef struct VisMono {
|
||||
/* 0x00 */ u32 unk_00;
|
||||
/* 0x04 */ u32 setScissor;
|
||||
/* 0x08 */ Color_RGBA8_u32 primColor;
|
||||
/* 0x0C */ Color_RGBA8_u32 envColor;
|
||||
/* 0x10 */ u16* tlut;
|
||||
/* 0x14 */ Gfx* dList;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
void VisMono_Init(VisMono* this);
|
||||
void VisMono_Destroy(VisMono* this);
|
||||
void VisMono_Draw(VisMono* this, Gfx** gfxp);
|
||||
|
||||
#endif
|
18
include/z64viszbuf.h
Normal file
18
include/z64viszbuf.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef Z64_VISZBUF_H
|
||||
#define Z64_VISZBUF_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef struct VisZbuf {
|
||||
/* 0x0 */ u32 useRgba;
|
||||
/* 0x4 */ u32 setScissor;
|
||||
/* 0x8 */ Color_RGBA8_u32 primColor;
|
||||
/* 0xC */ Color_RGBA8_u32 envColor;
|
||||
} VisZbuf; // size = 0x10
|
||||
|
||||
void VisZbuf_Init(VisZbuf* this);
|
||||
void VisZbuf_Destroy(VisZbuf* this);
|
||||
void VisZbuf_Draw(VisZbuf* this, Gfx** gfxP, void* zbuffer);
|
||||
|
||||
#endif
|
@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "fault.h"
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#include "fault_internal.h"
|
||||
#include "fault.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "stackcheck.h"
|
||||
|
@ -1,11 +1,22 @@
|
||||
#include "global.h"
|
||||
#include "audiomgr.h"
|
||||
#include "idle.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "system_malloc.h"
|
||||
#include "z64debug_text.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64vimode.h"
|
||||
#include "z64viscvg.h"
|
||||
#include "z64vismono.h"
|
||||
#include "z64viszbuf.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
extern UNK_TYPE1 D_801F7FF0;
|
||||
extern VisCvg sGameVisCvg;
|
||||
extern VisZbuf sGameVisZbuf;
|
||||
extern VisMono sGameVisMono;
|
||||
extern ViMode sGameViMode;
|
||||
|
||||
s32 gFramerateDivisor = 1;
|
||||
f32 gFramerateDivisorF = 1.0f;
|
||||
f32 gFramerateDivisorHalf = 1.0f / 2.0f;
|
||||
@ -28,34 +39,34 @@ void GameState_SetFBFilter(Gfx** gfx, void* zbuffer) {
|
||||
Gfx* dlist = *gfx;
|
||||
|
||||
if ((R_FB_FILTER_TYPE > 0) && (R_FB_FILTER_TYPE < 5)) {
|
||||
D_801F8010.type = R_FB_FILTER_TYPE;
|
||||
D_801F8010.color.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
D_801F8010.color.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
D_801F8010.color.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
D_801F8010.color.a = R_FB_FILTER_A;
|
||||
VisCvg_Draw(&D_801F8010, &dlist);
|
||||
sGameVisCvg.type = R_FB_FILTER_TYPE;
|
||||
sGameVisCvg.color.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
sGameVisCvg.color.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
sGameVisCvg.color.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
sGameVisCvg.color.a = R_FB_FILTER_A;
|
||||
VisCvg_Draw(&sGameVisCvg, &dlist);
|
||||
} else if ((R_FB_FILTER_TYPE == 5) || (R_FB_FILTER_TYPE == 6)) {
|
||||
sVisZbuf.useRgba = (R_FB_FILTER_TYPE == 6);
|
||||
sVisZbuf.primColor.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
sVisZbuf.primColor.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
sVisZbuf.primColor.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
sVisZbuf.primColor.a = R_FB_FILTER_A;
|
||||
sVisZbuf.envColor.r = R_FB_FILTER_ENV_COLOR(0);
|
||||
sVisZbuf.envColor.g = R_FB_FILTER_ENV_COLOR(1);
|
||||
sVisZbuf.envColor.b = R_FB_FILTER_ENV_COLOR(2);
|
||||
sVisZbuf.envColor.a = R_FB_FILTER_A;
|
||||
VisZbuf_Draw(&sVisZbuf, &dlist, zbuffer);
|
||||
sGameVisZbuf.useRgba = (R_FB_FILTER_TYPE == 6);
|
||||
sGameVisZbuf.primColor.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
sGameVisZbuf.primColor.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
sGameVisZbuf.primColor.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
sGameVisZbuf.primColor.a = R_FB_FILTER_A;
|
||||
sGameVisZbuf.envColor.r = R_FB_FILTER_ENV_COLOR(0);
|
||||
sGameVisZbuf.envColor.g = R_FB_FILTER_ENV_COLOR(1);
|
||||
sGameVisZbuf.envColor.b = R_FB_FILTER_ENV_COLOR(2);
|
||||
sGameVisZbuf.envColor.a = R_FB_FILTER_A;
|
||||
VisZbuf_Draw(&sGameVisZbuf, &dlist, zbuffer);
|
||||
} else if (R_FB_FILTER_TYPE == 7) {
|
||||
sMonoColors.unk_00 = 0;
|
||||
sMonoColors.primColor.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
sMonoColors.primColor.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
sMonoColors.primColor.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
sMonoColors.primColor.a = R_FB_FILTER_A;
|
||||
sMonoColors.envColor.r = R_FB_FILTER_ENV_COLOR(0);
|
||||
sMonoColors.envColor.g = R_FB_FILTER_ENV_COLOR(1);
|
||||
sMonoColors.envColor.b = R_FB_FILTER_ENV_COLOR(2);
|
||||
sMonoColors.envColor.a = R_FB_FILTER_A;
|
||||
VisMono_Draw(&sMonoColors, &dlist);
|
||||
sGameVisMono.unk_00 = 0;
|
||||
sGameVisMono.primColor.r = R_FB_FILTER_PRIM_COLOR(0);
|
||||
sGameVisMono.primColor.g = R_FB_FILTER_PRIM_COLOR(1);
|
||||
sGameVisMono.primColor.b = R_FB_FILTER_PRIM_COLOR(2);
|
||||
sGameVisMono.primColor.a = R_FB_FILTER_A;
|
||||
sGameVisMono.envColor.r = R_FB_FILTER_ENV_COLOR(0);
|
||||
sGameVisMono.envColor.g = R_FB_FILTER_ENV_COLOR(1);
|
||||
sGameVisMono.envColor.b = R_FB_FILTER_ENV_COLOR(2);
|
||||
sGameVisMono.envColor.a = R_FB_FILTER_A;
|
||||
VisMono_Draw(&sGameVisMono, &dlist);
|
||||
}
|
||||
|
||||
*gfx = dlist;
|
||||
@ -209,10 +220,10 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
||||
|
||||
init(gameState);
|
||||
|
||||
VisCvg_Init(&D_801F8010);
|
||||
VisZbuf_Init(&sVisZbuf);
|
||||
VisMono_Init(&sMonoColors);
|
||||
ViMode_Init(&D_801F8048);
|
||||
VisCvg_Init(&sGameVisCvg);
|
||||
VisZbuf_Init(&sGameVisZbuf);
|
||||
VisMono_Init(&sGameVisMono);
|
||||
ViMode_Init(&sGameViMode);
|
||||
func_801773A0(&D_801F7FF0);
|
||||
Rumble_Init();
|
||||
|
||||
@ -230,10 +241,10 @@ void GameState_Destroy(GameState* gameState) {
|
||||
|
||||
Rumble_Destroy();
|
||||
func_801773C4(&D_801F7FF0);
|
||||
VisCvg_Destroy(&D_801F8010);
|
||||
VisZbuf_Destroy(&sVisZbuf);
|
||||
VisMono_Destroy(&sMonoColors);
|
||||
ViMode_Destroy(&D_801F8048);
|
||||
VisCvg_Destroy(&sGameVisCvg);
|
||||
VisZbuf_Destroy(&sGameVisZbuf);
|
||||
VisMono_Destroy(&sGameVisMono);
|
||||
ViMode_Destroy(&sGameViMode);
|
||||
THA_Destroy(&gameState->heap);
|
||||
GameAlloc_Cleanup(&gameState->alloc);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ OSTime sGraphTaskStartTime;
|
||||
#include "macros.h"
|
||||
#include "buffers.h"
|
||||
#include "idle.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "system_malloc.h"
|
||||
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
|
||||
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
|
||||
|
@ -1,11 +1,9 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "buffers.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
extern u16 gFramebufferHiRes0[HIRES_BUFFER_WIDTH][HIRES_BUFFER_HEIGHT];
|
||||
extern u16 gFramebufferHiRes1[HIRES_BUFFER_WIDTH][HIRES_BUFFER_HEIGHT];
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
#include "macros.h"
|
||||
|
||||
// Variables are put before most headers as a hacky way to bypass bss reordering
|
||||
OSViMode sNotebookViMode; // placeholder name
|
||||
void* gFramebuffers[2];
|
||||
OSViMode* gActiveViMode;
|
||||
@ -35,6 +33,16 @@ s16 gCfbUpperAdjust;
|
||||
|
||||
u8 gSysCfbHiResEnabled;
|
||||
|
||||
#include "variables.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "buffers.h"
|
||||
#include "system_malloc.h"
|
||||
#include "z64vimode.h"
|
||||
|
||||
extern u16 gFramebufferHiRes0[HIRES_BUFFER_WIDTH][HIRES_BUFFER_HEIGHT];
|
||||
extern u16 gFramebufferHiRes1[HIRES_BUFFER_WIDTH][HIRES_BUFFER_HEIGHT];
|
||||
|
||||
void SysCfb_SetLoResMode(void) {
|
||||
gFramebuffers[1] = sCfbLoRes1;
|
||||
gFramebuffers[0] = sCfbLoRes0;
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "loadfragment.h"
|
||||
#include "z64horse.h"
|
||||
#include "z64quake.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TRANS_CIRCLE_DIR_IN,
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
LightsBuffer sLightsBuffer;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "z64snap.h"
|
||||
#include "z64view.h"
|
||||
#include "archives/icon_item_static/icon_item_static_yar.h"
|
||||
|
@ -1,13 +1,33 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
#include "z64vismono.h"
|
||||
|
||||
// Variables are put before most headers as a hacky way to bypass bss reordering
|
||||
s16 sTransitionFillTimer;
|
||||
Input D_801F6C18;
|
||||
TransitionTile sTransitionTile;
|
||||
s32 gTransitionTileState;
|
||||
VisMono sPlayVisMono;
|
||||
Color_RGBA8_u32 gVisMonoColor;
|
||||
Struct_80140E80 D_801F6D38;
|
||||
Struct_80140E80* D_801F6D4C;
|
||||
BombersNotebook sBombersNotebook;
|
||||
u8 sBombersNotebookOpen;
|
||||
u8 sMotionBlurStatus;
|
||||
|
||||
#include "variables.h"
|
||||
#include "macros.h"
|
||||
#include "buffers.h"
|
||||
#include "idle.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "z64bombers_notebook.h"
|
||||
#include "z64debug_display.h"
|
||||
#include "z64quake.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "z64view.h"
|
||||
|
||||
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
|
||||
#include "overlays/gamestates/ovl_opening/z_opening.h"
|
||||
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
|
||||
@ -16,18 +36,6 @@
|
||||
s32 gDbgCamEnabled = false;
|
||||
u8 D_801D0D54 = false;
|
||||
|
||||
s16 sTransitionFillTimer;
|
||||
Input D_801F6C18;
|
||||
TransitionTile sTransitionTile;
|
||||
s32 gTransitionTileState;
|
||||
VisMono sVisMono;
|
||||
Color_RGBA8_u32 gVisMonoColor;
|
||||
Struct_80140E80 D_801F6D38;
|
||||
Struct_80140E80* D_801F6D4C;
|
||||
BombersNotebook sBombersNotebook;
|
||||
u8 sBombersNotebookOpen;
|
||||
u8 sMotionBlurStatus;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MOTION_BLUR_OFF,
|
||||
/* 1 */ MOTION_BLUR_SETUP,
|
||||
@ -406,7 +414,7 @@ void Play_Destroy(GameState* thisx) {
|
||||
|
||||
ShrinkWindow_Destroy();
|
||||
TransitionFade_Destroy(&this->unk_18E48);
|
||||
VisMono_Destroy(&sVisMono);
|
||||
VisMono_Destroy(&sPlayVisMono);
|
||||
func_80140EA0(D_801F6D4C);
|
||||
D_801F6D4C = NULL;
|
||||
|
||||
@ -1227,8 +1235,8 @@ void Play_DrawMain(PlayState* this) {
|
||||
TransitionFade_Draw(&this->unk_18E48, &sp218);
|
||||
|
||||
if (gVisMonoColor.a != 0) {
|
||||
sVisMono.primColor.rgba = gVisMonoColor.rgba;
|
||||
VisMono_Draw(&sVisMono, &sp218);
|
||||
sPlayVisMono.primColor.rgba = gVisMonoColor.rgba;
|
||||
VisMono_Draw(&sPlayVisMono, &sp218);
|
||||
}
|
||||
|
||||
gSPEndDisplayList(sp218++);
|
||||
@ -2299,7 +2307,7 @@ void Play_Init(GameState* thisx) {
|
||||
TransitionFade_SetType(&this->unk_18E48, 3);
|
||||
TransitionFade_SetColor(&this->unk_18E48, RGBA8(160, 160, 160, 255));
|
||||
TransitionFade_Start(&this->unk_18E48);
|
||||
VisMono_Init(&sVisMono);
|
||||
VisMono_Init(&sPlayVisMono);
|
||||
|
||||
gVisMonoColor.a = 0;
|
||||
D_801F6D4C = &D_801F6D38;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "z64bombers_notebook.h"
|
||||
#include "interface/schedule_static/schedule_static.h"
|
||||
#include "archives/schedule_dma_static/schedule_dma_static_yar.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
#define FLAGS \
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
Gfx gSetupDLs[SETUPDL_MAX][6] = {
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
s32 sMatAnimStep;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64skin.h"
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "z64vimode.h"
|
||||
#include "ultra64/viint.h"
|
||||
|
||||
typedef struct {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "z64viscvg.h"
|
||||
|
||||
Gfx D_801C5DD0[] = {
|
||||
gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||
@ -39,7 +40,7 @@ Gfx D_801C5E00[] = {
|
||||
gsSPBranchList(D_0E000000.fillRect),
|
||||
};
|
||||
|
||||
void VisCvg_Init(struct_801F8010* this) {
|
||||
void VisCvg_Init(VisCvg* this) {
|
||||
this->type = 0;
|
||||
this->setScissor = false;
|
||||
this->color.r = 255;
|
||||
@ -48,10 +49,10 @@ void VisCvg_Init(struct_801F8010* this) {
|
||||
this->color.a = 255;
|
||||
}
|
||||
|
||||
void VisCvg_Destroy(struct_801F8010* this) {
|
||||
void VisCvg_Destroy(VisCvg* this) {
|
||||
}
|
||||
|
||||
void VisCvg_Draw(struct_801F8010* this, Gfx** gfxp) {
|
||||
void VisCvg_Draw(VisCvg* this, Gfx** gfxp) {
|
||||
Gfx* gfx = *gfxp;
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "z64vismono.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
// Height of the fragments the color frame buffer (CFB) is split into.
|
||||
|
@ -1,4 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "z64viszbuf.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "libc/stdbool.h"
|
||||
|
||||
#define VISZBUF_ZBUFFRAG_HEIGHT (TMEM_SIZE / (gCfbWidth * G_IM_SIZ_16b_BYTES))
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Description: Igos du Ikana window - curtains and ray effects
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_boss_06.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "overlays/actors/ovl_En_Knight/z_en_knight.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Description: Keaton grass
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kusa2.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Description: Kafei
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_test3.h"
|
||||
#include "objects/object_test3/object_test3.h"
|
||||
#include "overlays/actors/ovl_En_Door/z_en_door.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "z_fbdemo_wipe5.h"
|
||||
|
||||
#define THIS ((TransitionWipe5*)thisx)
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Description: Pause Menu
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_kaleido_scope.h"
|
||||
#include "z64view.h"
|
||||
#include "overlays/gamestates/ovl_opening/z_opening.h"
|
||||
|
@ -428,7 +428,7 @@
|
||||
0x8013EC10 : "z_rumble",
|
||||
0x8013EE60 : "z_view",
|
||||
0x80140260 : "z_vimode",
|
||||
0x80140CE0 : "code_80140CE0",
|
||||
0x80140CE0 : "z_viscvg",
|
||||
0x80140E80 : "code_80140E80",
|
||||
0x801418B0 : "z_vismono",
|
||||
0x801420C0 : "z_viszbuf",
|
||||
@ -561,7 +561,7 @@
|
||||
0x801C5CB0 : "z_skelanime",
|
||||
0x801C5CD0 : "z_skin_matrix",
|
||||
0x801C5D10 : "z_sub_s",
|
||||
0x801C5DD0 : "code_80140CE0",
|
||||
0x801C5DD0 : "z_viscvg",
|
||||
0x801C5E30 : "z_vr_box",
|
||||
0x801C5FC0 : "z_sram_NES",
|
||||
0x801C6A70 : "z_message",
|
||||
|
@ -4014,7 +4014,7 @@
|
||||
0x801F6C18:("D_801F6C18","Input","",0x18),
|
||||
0x801F6C30:("sTransitionTile","TransitionTile","",0xE0),
|
||||
0x801F6D10:("gTransitionTileState","UNK_TYPE4","",0x4),
|
||||
0x801F6D18:("sVisMono","UNK_TYPE1","",0x1),
|
||||
0x801F6D18:("sPlayVisMono","VisMono","",0x18),
|
||||
0x801F6D30:("gVisMonoColor","Color_RGBA8","",0x4),
|
||||
0x801F6D38:("D_801F6D38","UNK_TYPE1","",0x1),
|
||||
0x801F6D4C:("D_801F6D4C","UNK_TYPE4","",0x4),
|
||||
@ -4025,11 +4025,11 @@
|
||||
0x801F6FC0:("D_801F6FC0","UNK_TYPE1","",0x1),
|
||||
0x801F6FC8:("sSlowlyStackInfo","StackEntry","",0x1c),
|
||||
0x801F6FE8:("sSlowlyStack","u8","[4096]",0x1000),
|
||||
0x801F7FF0:("D_801F7FF0","UNK_TYPE1","",0x1),
|
||||
0x801F8010:("D_801F8010","struct_801F8010","",0x10),
|
||||
0x801F8020:("sVisZbuf","VisZbuf","",0x10),
|
||||
0x801F8030:("sMonoColors","VisMono","",0x18),
|
||||
0x801F8048:("D_801F8048","ViMode","",0x88),
|
||||
0x801F7FF0:("D_801F7FF0","UNK_TYPE1","",0x20),
|
||||
0x801F8010:("sGameVisCvg","VisCvg","",0x10),
|
||||
0x801F8020:("sGameVisZbuf","VisZbuf","",0x10),
|
||||
0x801F8030:("sGameVisMono","VisMono","",0x18),
|
||||
0x801F8048:("sGameViMode","ViMode","",0x88),
|
||||
0x801F80D0:("sGraphFaultAddrConvClient","FaultAddrConvClient","",0xc),
|
||||
0x801F80E0:("sGraphFaultClient","FaultClient","",0x10),
|
||||
0x801F80F0:("gGfxMasterDL","Gfx*","",0x4),
|
||||
|
Loading…
Reference in New Issue
Block a user