| 2024 | // |
| 2025 | |
| 2026 | void BaseRenderer::SetProjection(const u32 address, bool bReplace) |
| 2027 | { |
| 2028 | // Projection |
| 2029 | if (bReplace) |
| 2030 | { |
| 2031 | // Load projection matrix |
| 2032 | MatrixFromN64FixedPoint( mProjectionMat, address); |
| 2033 | |
| 2034 | //Hack needed to show heart in OOT & MM |
| 2035 | //it renders at Z cordinate = 0.0f that gets clipped away. |
| 2036 | //so we translate them a bit along Z to make them stick :) //Corn |
| 2037 | // |
| 2038 | if( g_ROM.ZELDA_HACK ) |
| 2039 | mProjectionMat.mRaw[14] += 0.4f; |
| 2040 | if( gGlobalPreferences.ViewportType == VT_FULLSCREEN_HD ) |
| 2041 | mProjectionMat.mRaw[0] *= HD_SCALE; //proper 16:9 scale |
| 2042 | } |
| 2043 | else |
| 2044 | { |
| 2045 | MatrixFromN64FixedPoint( mTempMat, address); |
| 2046 | MatrixMultiplyAligned( &mProjectionMat, &mTempMat, &mProjectionMat ); |
| 2047 | } |
| 2048 | |
| 2049 | mWorldProjectValid = false; |
| 2050 | sceGuSetMatrix( GU_PROJECTION, reinterpret_cast< const ScePspFMatrix4 * >( &mProjectionMat) ); |
| 2051 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 2052 | DL_PF( |
| 2053 | " %#+12.5f %#+12.5f %#+12.7f %#+12.5f\n" |
| 2054 | " %#+12.5f %#+12.5f %#+12.7f %#+12.5f\n" |
| 2055 | " %#+12.5f %#+12.5f %#+12.7f %#+12.5f\n" |
| 2056 | " %#+12.5f %#+12.5f %#+12.7f %#+12.5f\n", |
| 2057 | mProjectionMat.m[0][0], mProjectionMat.m[0][1], mProjectionMat.m[0][2], mProjectionMat.m[0][3], |
| 2058 | mProjectionMat.m[1][0], mProjectionMat.m[1][1], mProjectionMat.m[1][2], mProjectionMat.m[1][3], |
| 2059 | mProjectionMat.m[2][0], mProjectionMat.m[2][1], mProjectionMat.m[2][2], mProjectionMat.m[2][3], |
| 2060 | mProjectionMat.m[3][0], mProjectionMat.m[3][1], mProjectionMat.m[3][2], mProjectionMat.m[3][3]); |
| 2061 | #endif |
| 2062 | } |
| 2063 | |
| 2064 | |
| 2065 | // |
no test coverage detected