F3DLX2.Rej integration

The master displaylist has been split into two, one for things to render in F3DZEX, and one that renders in F3DLX2.Rej, with the aim to save performance when rendering smaller things.
This commit is contained in:
Fazana committed 2021-09-14 21:43:55 +01:00
1 parent 6e07c3c724
commit 9d1329f245
12 files changed
+118 -57

No files matched your search

+7 -4
View File
@@ -907,7 +907,7 @@ static BhvCommandProc BehaviorCmdTable[] = {
void cur_obj_update(void) {
UNUSED u32 unused;
s16 objFlags = gCurrentObject->oFlags;
u32 objFlags = gCurrentObject->oFlags;
f32 distanceFromMario;
BhvCommandProc bhvCmdProc;
s32 bhvProcResult;
@@ -952,9 +952,6 @@ void cur_obj_update(void) {
gCurrentObject->oPrevAction = gCurrentObject->oAction);
}
// Execute various code based on object flags.
objFlags = (s16) gCurrentObject->oFlags;
if (objFlags & OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE) {
obj_set_face_angle_to_move_angle(gCurrentObject);
}
@@ -983,6 +980,12 @@ void cur_obj_update(void) {
obj_update_gfx_pos_and_angle(gCurrentObject);
}
if (objFlags & OBJ_FLAG_UCODE_LARGE)
gCurrentObject->header.gfx.uCode = UCODE_DEFAULT;
else
gCurrentObject->header.gfx.uCode = UCODE_REJ;
#ifdef PUPPYLIGHTS
puppylights_object_emit(gCurrentObject);
#endif
+5 -2
View File
@@ -7,6 +7,9 @@
#include "types.h"
#include "game/memory.h"
#define UCODE_DEFAULT 0
#define UCODE_REJ 1
#define GRAPH_RENDER_ACTIVE (1 << 0)
#define GRAPH_RENDER_CHILDREN_FIRST (1 << 1)
#define GRAPH_RENDER_BILLBOARD (1 << 2)
@@ -126,8 +129,8 @@ struct DisplayListNode
struct GraphNodeMasterList
{
/*0x00*/ struct GraphNode node;
/*0x14*/ struct DisplayListNode *listHeads[GFX_NUM_MASTER_LISTS];
/*0x34*/ struct DisplayListNode *listTails[GFX_NUM_MASTER_LISTS];
/*0x14*/ struct DisplayListNode *listHeads[2][GFX_NUM_MASTER_LISTS];
/*0x34*/ struct DisplayListNode *listTails[2][GFX_NUM_MASTER_LISTS];
};
/** Simply used as a parent to group multiple children.
+1 -1
View File
@@ -963,7 +963,7 @@ struct LevelCommand *level_script_execute(struct LevelCommand *cmd) {
}
profiler_log_thread5_time(LEVEL_SCRIPT_EXECUTE);
init_rcp();
init_rcp(1);
render_game();
end_master_display_list();
alloc_display_list(0);