fix error in initialization of clear depth register - fixes #57 (cod3r colorz top screen)
This commit is contained in:
parent
abe2e61997
commit
e332e3df26
|
@ -599,8 +599,6 @@ void gfx3d_reset()
|
|||
last_t = 0;
|
||||
last_s = 0;
|
||||
viewport = 0xBFFF0000;
|
||||
|
||||
gfx3d.state.clearDepth = DS_DEPTH15TO24(0x7FFF);
|
||||
|
||||
clInd2 = 0;
|
||||
isSwapBuffers = FALSE;
|
||||
|
|
|
@ -73,6 +73,7 @@ class EMUFILE;
|
|||
#define GFX3D_5TO6_LOOKUP(x) (material_5bit_to_6bit[(x)])
|
||||
|
||||
// 15-bit to 24-bit depth formula from http://nocash.emubase.de/gbatek.htm#ds3drearplane
|
||||
extern CACHE_ALIGN u32 dsDepthExtend_15bit_to_24bit[32768];
|
||||
#define DS_DEPTH15TO24(depth) ( dsDepthExtend_15bit_to_24bit[(depth) & 0x7FFF] )
|
||||
|
||||
// MATRIX MODES
|
||||
|
@ -611,7 +612,7 @@ struct GFX3D_State
|
|||
, alphaTestRef(0)
|
||||
, activeFlushCommand(0)
|
||||
, pendingFlushCommand(0)
|
||||
, clearDepth(1)
|
||||
, clearDepth(DS_DEPTH15TO24(0x7FFF))
|
||||
, clearColor(0)
|
||||
, fogColor(0)
|
||||
, fogOffset(0)
|
||||
|
|
Loading…
Reference in New Issue