1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Make the hack for Conker's shadow and Mario Tennis game specific.

Fixes #2585 Mario Golf: background shifted
This commit is contained in:
s2s 2021-10-03 18:20:27 +02:00 committed by Sergey Lipskiy
parent 4911bd7eb5
commit e6d754a5d1
3 changed files with 12 additions and 7 deletions

View File

@ -271,6 +271,7 @@ struct Config
#define hack_ZeldaMonochrome (1<<20) //Hack for Zeldas monochrome effects.
#define hack_TonyHawk (1<<21) //Hack for Tony Hawk blend mode.
#define hack_WCWNitro (1<<22) //Hack for WCW Nitro backgrounds.
#define hack_fbTextureOffset (1<<23) //Hack to offset Conker's shadow in CBFD and Bob-ombs in Mario Tennis.
extern Config config;

View File

@ -276,12 +276,14 @@ public:
}
}
/* Hack for framebuffer textures. See #519 and #2112 */
for (int t = 0; t < 2; t++) {
const CachedTexture* _pTexture = textureCache().current[t];
if (_pTexture != nullptr) {
if (gDP.otherMode.textureFilter != G_TF_POINT && _pTexture->frameBufferTexture != CachedTexture::fbNone) {
texCoordOffset[t][0] -= 1.0f;
texCoordOffset[t][1] -= 1.0f;
if ((config.generalEmulation.hacks & hack_fbTextureOffset) != 0) {
for (int t = 0; t < 2; t++) {
const CachedTexture* _pTexture = textureCache().current[t];
if (_pTexture != nullptr) {
if (gDP.otherMode.textureFilter != G_TF_POINT && _pTexture->frameBufferTexture != CachedTexture::fbNone) {
texCoordOffset[t][0] -= 1.0f;
texCoordOffset[t][1] -= 1.0f;
}
}
}
}

View File

@ -298,7 +298,7 @@ void RSP_Init()
else if (strstr(RSP.romname, (const char *)"VIGILANTE 8") != nullptr)
config.generalEmulation.hacks |= hack_noDepthFrameBuffers;
else if (strstr(RSP.romname, (const char *)"CONKER BFD") != nullptr)
config.generalEmulation.hacks |= hack_blurPauseScreen | hack_rectDepthBufferCopyCBFD;
config.generalEmulation.hacks |= hack_blurPauseScreen | hack_rectDepthBufferCopyCBFD | hack_fbTextureOffset;
else if (strstr(RSP.romname, (const char *)"MICKEY USA") != nullptr)
config.generalEmulation.hacks |= hack_blurPauseScreen;
else if (strstr(RSP.romname, (const char *)"GOLDENEYE") != nullptr)
@ -345,6 +345,8 @@ void RSP_Init()
config.generalEmulation.hacks |= hack_TonyHawk;
else if (strstr(RSP.romname, (const char *)"NITRO64") != nullptr)
config.generalEmulation.hacks |= hack_WCWNitro;
else if (strstr(RSP.romname, (const char *)"MarioTennis") != nullptr)
config.generalEmulation.hacks |= hack_fbTextureOffset;
api().FindPluginPath(RSP.pluginpath);