Skip to content

Commit

Permalink
- Fix fRatio issues caused by CountryCodeToTVSystem in Rice (fixes Pe…
Browse files Browse the repository at this point in the history
…rfect Dark NTSC CI vertex warping)

- Tidy up other minor issues
  • Loading branch information
emukidid committed Aug 13, 2021
1 parent 8332e34 commit 15ca735
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Makefile.Rice
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Makefile for Rice

CXXFLAGS += -DRICE_GFX

OBJ_RICE_GX += \
TextureArchive/ArchiveReader.o \
Rice_GX/OGLGraphicsContext.o \
Expand Down
5 changes: 0 additions & 5 deletions Rice_GX/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,8 @@ struct ROMHeader
uint8 nUnknown4;
uint8 nManufacturer;
uint16 wCartID;
#ifdef _BIG_ENDIAN //Note: nCountryID is actually a short
uint8 nUnknown5;
s8 nCountryID;
#else
s8 nCountryID;
uint8 nUnknown5;
#endif
};

typedef struct
Expand Down
7 changes: 1 addition & 6 deletions Rice_GX/RDP_Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -1460,12 +1460,7 @@ void DLParser_LoadBlock(Gfx *gfx)
info.tl = tile.tl = ult;
info.th = tile.th = dxt;
tile.bSizeIsValid = false;

for( int i=0; i<8; i++ )
{
if( tile.dwTMem == tile.dwTMem )
tile.lastTileCmd = CMD_LOADBLOCK;
}
tile.lastTileCmd = CMD_LOADBLOCK;

info.dwLoadAddress = g_TI.dwAddr;
info.bSetBy = CMD_LOADBLOCK;
Expand Down
1 change: 1 addition & 0 deletions Rice_GX/RenderExt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ void CRender::LoadObjSprite(uObjTxSprite &sprite, bool useTIAddr)
gti.Address += sprite.sprite.imageAdrs<<3;
gti.LeftToLoad = 0;
gti.TopToLoad = 0;
gti.HeightToCreate = 0;
gti.Palette = sprite.sprite.imagePal;
gti.PalAddress = palAddr;

Expand Down
4 changes: 4 additions & 0 deletions libgui/GraphicsGX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ void Graphics::init()
void Graphics::drawInit()
{
// Reset various parameters from gfx plugin
#ifdef RICE_GFX
GX_SetZTexture(GX_ZT_DISABLE,GX_TF_Z16,0);
#else
GX_SetZTexture(GX_ZT_DISABLE,GX_TF_Z8,0);
#endif
GX_SetZCompLoc(GX_TRUE); // Do Z-compare before texturing.
GX_SetFog(GX_FOG_NONE,0,1,0,1,(GXColor){0,0,0,255});
GX_SetViewport(0,0,vmode->fbWidth,vmode->efbHeight,0,1);
Expand Down

0 comments on commit 15ca735

Please sign in to comment.