| 1747 | |
| 1748 | #ifdef DAEDALUS_PSP |
| 1749 | static void T1Hack(const TextureInfo & ti0, CNativeTexture * texture0, |
| 1750 | const TextureInfo & ti1, CNativeTexture * texture1) |
| 1751 | { |
| 1752 | if((ti0.GetFormat() == G_IM_FMT_RGBA) && |
| 1753 | (ti1.GetFormat() == G_IM_FMT_I) && |
| 1754 | (ti1.GetWidth() == ti0.GetWidth()) && |
| 1755 | (ti1.GetHeight() == ti0.GetHeight())) |
| 1756 | { |
| 1757 | if( g_ROM.T1_HACK ) |
| 1758 | { |
| 1759 | const u32 * src = static_cast<const u32*>(texture0->GetData()); |
| 1760 | u32 * dst = static_cast< u32*>(texture1->GetData()); |
| 1761 | |
| 1762 | //Merge RGB + I -> RGBA in texture 1 |
| 1763 | //We do two pixels in one go since its 16bit (RGBA_4444) //Corn |
| 1764 | u32 size {texture1->GetWidth() * texture1->GetHeight() >> 1}; |
| 1765 | for(u32 i {}; i < size ; i++) |
| 1766 | { |
| 1767 | *dst = (*dst & 0xF000F000) | (*src & 0x0FFF0FFF); |
| 1768 | dst++; |
| 1769 | src++; |
| 1770 | } |
| 1771 | } |
| 1772 | else |
| 1773 | { |
| 1774 | const u32* src {static_cast<const u32*>(texture1->GetData())}; |
| 1775 | u32* dst {static_cast< u32*>(texture0->GetData())}; |
| 1776 | |
| 1777 | //Merge RGB + I -> RGBA in texture 0 |
| 1778 | //We do two pixels in one go since its 16bit (RGBA_4444) //Corn |
| 1779 | u32 size {texture1->GetWidth() * texture1->GetHeight() >> 1}; |
| 1780 | for(u32 i {}; i < size ; i++) |
| 1781 | { |
| 1782 | *dst = (*dst & 0x0FFF0FFF) | (*src & 0xF000F000); |
| 1783 | dst++; |
| 1784 | src++; |
| 1785 | } |
| 1786 | } |
| 1787 | } |
| 1788 | } |
| 1789 | #endif // DAEDALUS_PSP |
| 1790 | |
| 1791 |
no test coverage detected