You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Added console detection. LODs will be disabled if emu is detected.
This commit is contained in:
@@ -62,6 +62,7 @@ UNUSED u8 filler80339D30[0x90];
|
||||
|
||||
s32 unused8032C690 = 0;
|
||||
u32 gGlobalTimer = 0;
|
||||
u8 gIsConsole;
|
||||
|
||||
u16 sCurrFBNum = 0;
|
||||
u16 frameBufferIndex = 0;
|
||||
@@ -319,6 +320,11 @@ void draw_reset_bars(void) {
|
||||
}
|
||||
|
||||
void rendering_init(void) {
|
||||
if (IO_READ(DPC_PIPEBUSY_REG) == 0) {
|
||||
gIsConsole = 0;
|
||||
} else {
|
||||
gIsConsole = 1;
|
||||
}
|
||||
gGfxPool = &gGfxPools[0];
|
||||
set_segment_base_addr(1, gGfxPool->buffer);
|
||||
gGfxSPTask = &gGfxPool->spTask;
|
||||
|
||||
@@ -41,6 +41,7 @@ extern Gfx *gDisplayListHead;
|
||||
extern u8 *gGfxPoolEnd;
|
||||
extern struct GfxPool *gGfxPool;
|
||||
extern u8 gControllerBits;
|
||||
extern u8 gIsConsole;
|
||||
#ifdef EEP
|
||||
extern s8 gEepromProbe;
|
||||
#endif
|
||||
|
||||
@@ -267,7 +267,13 @@ static void geo_process_perspective(struct GraphNodePerspective *node) {
|
||||
* range of this node.
|
||||
*/
|
||||
static void geo_process_level_of_detail(struct GraphNodeLevelOfDetail *node) {
|
||||
f32 distanceFromCam = -gMatStack[gMatStackIndex][3][2];
|
||||
f32 distanceFromCam;
|
||||
if (gIsConsole) {
|
||||
distanceFromCam = -gMatStack[gMatStackIndex][3][2];
|
||||
} else {
|
||||
distanceFromCam = 50;
|
||||
}
|
||||
|
||||
if ((f32)node->minDistance <= distanceFromCam && distanceFromCam < (f32)node->maxDistance) {
|
||||
if (node->node.children != 0) {
|
||||
geo_process_node_and_siblings(node->node.children);
|
||||
|
||||
Reference in New Issue
Block a user