diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 3464a96b2..3bf13beae 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -529,7 +529,13 @@ void gfx3d_init() gfx3d.state.savedDISP3DCNT.value = 0; gfx3d.state.fogDensityTable = MMU.ARM9_REG+0x0360; gfx3d.state.edgeMarkColorTable = (u16 *)(MMU.ARM9_REG+0x0330); - + + //TODO: these should probably be copied into renderState when it's latched.. + //THIS IS A SUPER BAD HACK + //see TODO TODO TODO TODO + gfx3d.renderState.fogDensityTable = MMU.ARM9_REG+0x0360; + gfx3d.renderState.edgeMarkColorTable = (u16 *)(MMU.ARM9_REG+0x0330); + gfx3d.render3DFrameCount = 0; makeTables(); @@ -2443,6 +2449,7 @@ static void gfx3d_doFlush() //latch the current renderer and geometry engine states //NOTE: the geometry lists are copied elsewhere by another operation. //that's pretty annoying. + //TODO: see TODO TODO TODO TODO gfx3d.renderState = gfx3d.state; gfx3d.state.activeFlushCommand = gfx3d.state.pendingFlushCommand; diff --git a/desmume/src/gfx3d.h b/desmume/src/gfx3d.h index e5fb1ad3f..eb99dea05 100644 --- a/desmume/src/gfx3d.h +++ b/desmume/src/gfx3d.h @@ -589,6 +589,8 @@ struct GFX3D_State bool invalidateToon; CACHE_ALIGN u16 u16ToonTable[32]; u8 shininessTable[128]; + + //TODO: copy these in instead of this sloppy memory mapping u8 *fogDensityTable; // Alias to MMU.ARM9_REG+0x0360 u16 *edgeMarkColorTable; // Alias to MMU.ARM9_REG+0x0330 };