mirror of
https://github.com/izzy2lost/libultraship.git
synced 2026-06-19 01:16:13 -07:00
Add geometry mode for forcing branch execution (#605)
This commit is contained in:
@@ -368,6 +368,7 @@
|
||||
* G_EXTRAGEOMETRY flags: set extra custom geometry modes
|
||||
*/
|
||||
#define G_EX_INVERT_CULLING 0x00000001
|
||||
#define G_EX_ALWAYS_EXECUTE_BRANCH 0x00000002
|
||||
|
||||
/* Need these defined for Sprite Microcode */
|
||||
#ifdef _LANGUAGE_ASSEMBLY
|
||||
|
||||
@@ -3035,7 +3035,7 @@ bool gfx_branch_z_otr_handler_f3dex2(F3DGfx** cmd0) {
|
||||
|
||||
(*cmd0)++;
|
||||
|
||||
if (g_rsp.loaded_vertices[vbidx].z <= zval) {
|
||||
if (g_rsp.loaded_vertices[vbidx].z <= zval || (g_rsp.extra_geometry_mode & G_EX_ALWAYS_EXECUTE_BRANCH) != 0) {
|
||||
uint64_t hash = ((uint64_t)(*cmd0)->words.w0 << 32) + (*cmd0)->words.w1;
|
||||
|
||||
F3DGfx* gfx = (F3DGfx*)ResourceGetDataByCrc(hash);
|
||||
|
||||
@@ -196,6 +196,7 @@ constexpr int8_t OTR_G_SETINTENSITY = OPCODE(0x40);
|
||||
* G_EXTRAGEOMETRY flags: set extra custom geometry modes
|
||||
*/
|
||||
#define G_EX_INVERT_CULLING 0x00000001
|
||||
#define G_EX_ALWAYS_EXECUTE_BRANCH 0x00000002
|
||||
|
||||
/*
|
||||
* G_SETIMG fmt: set image formats
|
||||
|
||||
Reference in New Issue
Block a user