mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
color vertexloader: make read24 safer, speedup direct 8888 a tiny bit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2253 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -54,6 +54,40 @@ inline u32 DataReadU32()
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline u32 DataReadU32Unswapped()
|
||||
{
|
||||
u32 tmp = *(u32*)g_pVideoData;
|
||||
g_pVideoData += 4;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
// These are not used yet. If they don't build under Linux, delete them and let me know. -ector
|
||||
template<class T>
|
||||
inline T DataRead()
|
||||
{
|
||||
T tmp = *(T*)g_pVideoData;
|
||||
g_pVideoData += sizeof(T);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline u16 DataRead()
|
||||
{
|
||||
u16 tmp = Common::swap16(*(u16*)g_pVideoData);
|
||||
g_pVideoData += 2;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline u32 DataRead()
|
||||
{
|
||||
u32 tmp = Common::swap32(*(u32*)g_pVideoData);
|
||||
g_pVideoData += 4;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
inline float DataReadF32()
|
||||
{
|
||||
union {u32 i; float f;} temp;
|
||||
|
Reference in New Issue
Block a user