Label RCP resets

This commit is contained in:
Fazana
2021-09-16 23:14:53 +01:00
parent 655975d6e8
commit 26005df9d7
5 changed files with 10 additions and 7 deletions

View File

@@ -905,8 +905,6 @@ static BhvCommandProc BehaviorCmdTable[] = {
// Execute the behavior script of the current object, process the object flags, and other miscellaneous code for updating objects.
void cur_obj_update(void) {
UNUSED u32 unused;
u32 objFlags = gCurrentObject->oFlags;
f32 distanceFromMario;
BhvCommandProc bhvCmdProc;

View File

@@ -963,7 +963,7 @@ struct LevelCommand *level_script_execute(struct LevelCommand *cmd) {
}
profiler_log_thread5_time(LEVEL_SCRIPT_EXECUTE);
init_rcp(1);
init_rcp(CLEAR_ZBUFFER);
render_game();
end_master_display_list();
alloc_display_list(0);

View File

@@ -382,7 +382,7 @@ void render_init(void) {
gGfxSPTask = &gGfxPool->spTask;
gDisplayListHead = gGfxPool->buffer;
gGfxPoolEnd = (u8 *)(gGfxPool->buffer + GFX_POOL_SIZE);
init_rcp(1);
init_rcp(CLEAR_ZBUFFER);
clear_frame_buffer(0);
end_master_display_list();
exec_display_list(&gGfxPool->spTask);

View File

@@ -24,6 +24,11 @@ struct DemoInput
u8 buttonMask;
};
enum ZBmodes {
KEEP_ZBUFFER = 0,
CLEAR_ZBUFFER = 1,
};
extern struct Controller gControllers[3];
extern OSContStatus gControllerStatuses[4];
extern OSContPad gControllerPads[4];

View File

@@ -169,14 +169,14 @@ static void geo_process_master_list_sub(struct GraphNodeMasterList *node) {
if (renderPhase == 0 || renderPhase == 2)
{
gSPLoadUcodeL(gDisplayListHead++, gspF3DLX2_Rej_fifo);
init_rcp(0);
init_rcp(KEEP_ZBUFFER);
gSPClipRatio(gDisplayListHead++, FRUSTRATIO_2);
}
else
if (renderPhase == 1)
{
gSPLoadUcodeL(gDisplayListHead++, gspF3DZEX2_PosLight_fifo);
init_rcp(0);
init_rcp(KEEP_ZBUFFER);
gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1);
}
if (enableZBuffer != 0)
@@ -216,7 +216,7 @@ static void geo_process_master_list_sub(struct GraphNodeMasterList *node) {
case 1: renderPhase++; j = 1; i = 5; goto loopBegin;
}
gSPLoadUcodeL(gDisplayListHead++, gspF3DZEX2_PosLight_fifo);
init_rcp(0);
init_rcp(KEEP_ZBUFFER);
gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1);
#endif
if (enableZBuffer != 0)