1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00
Commit Graph

878 Commits

Author SHA1 Message Date
Sergey Lipskiy
3da54c5616 Re-init frame buffer if its new height is larger than its current one. 2015-05-13 10:19:20 +06:00
Sergey Lipskiy
dfabb7d105 Replace FrameBufferList::isFboMode() check by FrameBufferList::getCurrent() != NULL 2015-05-13 10:19:19 +06:00
Sergey Lipskiy
ea4d320809 Remove obsolete validity check for found frame buffer in loadBGImage.
Fixed pause screen in Zelda MM.
2015-05-13 10:19:18 +06:00
Sergey Lipskiy
f4e1afa30c Split hack_noDepthFrameBuffers on two options:
hack_noDepthFrameBuffers and hack_blurPauseScreen.

hack_blurPauseScreen is for games, which copy color buffer into depth buffer area,
blur it and use as background image. Examples: Conker BFD, Mickey USA

hack_noDepthFrameBuffers is for games, which never use depth buffer area as texture
Example: F-1 Pole Position, Mario Golf.
2015-05-13 10:19:18 +06:00
Sergey Lipskiy
e9b406d134 Add special frame buffer flag for Ogre Battle backgrounds.
It should protect such buffers from being overwritten by FrameBufferToRDRAM::CopyToRDRAM.
2015-05-13 10:19:17 +06:00
Sergey Lipskiy
2f83ab8963 Correct code for 'noDepthBuffers' situation.
Enable 'noDepthBuffers' for "MICKEY USA".

Fixed pause screen in "MICKEY USA"
2015-05-13 10:19:16 +06:00
Sergey Lipskiy
f41bd934ef Disable RDRAM clear for depth frame buffers. 2015-05-13 10:19:16 +06:00
Sergey Lipskiy
f9f3dc6ede Fix m_isDepthBuffer flag set. 2015-05-13 10:19:15 +06:00
Sergey Lipskiy
189b594118 Reset buffer's m_RdramCrc and m_validityChecked on buffer change. 2015-05-13 10:19:14 +06:00
Sergey Lipskiy
4a9e7cdc1f New FB validity check based on checksum of RDRAM content. 2015-05-13 10:19:14 +06:00
Sergey Lipskiy
0b0adb2f5e Add Jeremy McGrath Supercross 2000 to setDepthClearColor()
Fixed depth issue in #152
2015-05-13 10:19:13 +06:00
Sergey Lipskiy
4be1a379e4 Load 16bit CI as IA88.
Fixed Clay Fighter Sculptor's Cut: no 3d at boot screen #205
2015-05-13 10:19:12 +06:00
Sergey Lipskiy
43c4a72a46 Fix depth_compare_shader 2015-05-13 10:19:11 +06:00
Sergey Lipskiy
0d8b4e89fa Limit calculated VI.height by maximal value.
Fixed screen size in Lode Runner, #186
2015-05-13 10:19:11 +06:00
Sergey Lipskiy
a63e42a7be Fix (hack!) blending in Paper Mario intro.
Fixed issue #269
2015-05-13 10:19:10 +06:00
Sergey Lipskiy
d9f3785b1d Move Config::resetToDefaults() to Config.cpp
Set default value for textureFilter.txPath as %plugin path%/hires_texture
2015-05-13 10:19:09 +06:00
Sergey Lipskiy
7368949d30 Correct tooltip for Texture Pack Path option. 2015-05-13 10:19:09 +06:00
Sergey Lipskiy
d08ed3d287 Disable texture dumping for now. 2015-05-13 10:19:08 +06:00
Sergey Lipskiy
a0ce2f93a4 Separate plugin path and texture pack path.
Texture pack searched by texture pack path.
Texture cache saved in %plugin path%/cache
2015-05-13 10:19:07 +06:00
Sergey Lipskiy
7ade71eb55 Replace backslash by forward slash in plugin's path. 2015-05-13 10:19:07 +06:00
Sergey Lipskiy
ae8eef93a0 Disable language selection controls for now. 2015-05-13 10:19:06 +06:00
Sergey Lipskiy
91e6d2beb1 Fix texture pack path init:
always set texture pack path no matter is it empty or not.
2015-05-13 10:19:05 +06:00
Sergey Lipskiy
78d8ea6506 Mupen64Plus: Save config file after section removal. 2015-05-13 10:19:05 +06:00
Sergey Lipskiy
4bea76d962 Remove texture.forceBilinear option.
Add texture.bilinearMode option:
- standard hardware bilinear filter
- N64 3 point filter
2015-05-13 10:19:04 +06:00
Sergey Lipskiy
cd3a1b3d4d Fix depth scale uniforms for LLE mode.
Fixed issue #272
2015-05-13 10:19:03 +06:00
Sergey Lipskiy
61b079c53e Rewrite VI width and height calculation.
Fixed NFL Quarterback Club 2000. More testing needed.
2015-05-13 10:19:02 +06:00
Sergey Lipskiy
1e5b7def3d Replace DEPTH_CLEAR_COLOR constant by game dependant variable.
Several games use non-standart value for depth buffer clear.
This value must be known beforehand for correct emulation.

Fixed NFL Quarterback Club 2000: gfx screwed up #148
2015-05-13 10:19:02 +06:00
Sergey Lipskiy
cf11996d0e Implement 3 point filtering.
Code ported from mupen64plus-libretro.
2015-05-13 10:19:01 +06:00
Sergey Lipskiy
b0e86e2cbc Limit frame buffer height by VI.height if buffer width == VI.width
Fixed flicker in Bomberman 2 map screen. The game sets scissor.lry = 250 here,
while VI.height is 240. Actual frame buffer height is 240. Making it 250
causes wrong selection of that buffer on VI update.
2015-05-13 10:19:00 +06:00
Sergey Lipskiy
be0eab5ea7 Add support for Bomberman 2 special blend mode,
which is used to highlight current location on the map.

Fixed issue #122
2015-05-13 10:19:00 +06:00
Sergey Lipskiy
9f7963b770 Correct comments to blend modes. 2015-05-13 10:18:59 +06:00
Sergey Lipskiy
503612b99e Fix tile load when it is out of TMEM.
Fixed texture load in Bomberman 64 - The Second Attack, #122
2015-05-13 10:18:58 +06:00
Sergey Lipskiy
33806e7170 Fix depth calculation.
Problem:
N64 formula for screen z is screenZ = z/w*viewport.vscale[2]+viewport.vtrans[2]
OpenGL uses z/w, vscale and vtrans are set in glViewport and they always equal.
viewport.vscale[2] can be not equal to viewport.vtrans[2] and in that case
standard OpenGL z compare does not work correct.

Solution:
use N64 formula for screenZ in fragment shader.

Fixed Twine: wrong depth for the arm #115
2015-05-13 10:18:58 +06:00
Sergey Lipskiy
c22de119e5 Revert "Correct VI.real_height calculation in interlaced mode."
This change cause crash in Top Gear Overdrive menu, because hEnd == hStart
at some point.

This reverts commit 61f9389656bd26b49c43394b701a3a7e31737b3c.
2015-05-13 10:18:57 +06:00
Sergey Lipskiy
97c9fecd8c Correct VI.width calculation when hEnd is zero.
Corrected commit 42fe2ddf09 since it brokes background in F1 Pole Position, #263
2015-05-13 10:18:56 +06:00
Sergey Lipskiy
686690f919 Remove redundant shader update calls. 2015-05-13 10:18:56 +06:00
Sergey Lipskiy
8a4db59a29 Correct RDRAMtoFrameBuffer::CopyFromRDRAM.
Need to set FBO of found buffer as current draw buffer, otherwise rendering can go
into wrong buffer.
2015-05-13 10:18:55 +06:00
Sergey Lipskiy
88e751b13b Implement FBO height correction. Fixed replays in 1080. 2015-05-13 10:18:54 +06:00
Sergey Lipskiy
1b2b9f9865 Replace gDP.colorImage.changed by FrameBuffer::m_changed 2015-05-13 10:18:53 +06:00
Sergey Lipskiy
ef7ad9a549 Correct force clamp condition in OGLRender::drawTexturedRect
Fixed sun in Perfect Dark, which was broken after commit ba89dce8512:
Remove textures coordinates swap in case of lower coordinate is larger than higher one.
2015-05-13 10:18:53 +06:00
Sergey Lipskiy
d9e9955668 Implement texture packs path selection. 2015-05-13 10:18:52 +06:00
Sergey Lipskiy
7178145462 Fix mipmap when mipmap_lvl == 0.
Fixed AeroFighters Assault: texture issue on the plane (in game and menu) #118
2015-05-13 10:18:51 +06:00
Sergey Lipskiy
eb42f8fe46 Code cleanup: remove unused gDP.texRect struct and related code. 2015-05-13 10:18:50 +06:00
Sergey Lipskiy
fa1ef45101 Fix texture coordinates for texrect flip.
Fixed text in SM64 (E), issue #259
2015-05-13 10:18:50 +06:00
Sergey Lipskiy
f266e91981 Remove textures coordinates swap in case of lower coordinate is larger than higher one.
It is legacy code. Not sure which issue it intended to fix.
2015-05-13 10:18:49 +06:00
Sergey Lipskiy
b7d5819ec6 Implement video restart on settings change. 2015-05-13 10:18:48 +06:00
Sergey Lipskiy
9d422acae3 Enable NoN for Perfect Dark ucode.
That fixed menu screen in Perfect Dark, #260. Otherwise background polygons are z-clipped.
2015-05-13 10:18:48 +06:00
Sergey Lipskiy
12658040f6 Fix int to bool conversion. 2015-05-13 10:18:47 +06:00
Sergey Lipskiy
1e6684014e Add GL_DEPTH_CLAMP state caching. 2015-05-13 10:18:46 +06:00
Sergey Lipskiy
08f4278892 Correct F3D_Tri4. 2015-05-13 10:18:46 +06:00