mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-31 22:19:44 +01:00
Axe endian_swap() function and template
Neither of these were used anywhere, so to simplify the code and prevent having potentially broken code that's never shown to be broken because it's never tested, I'm removing these.
This commit is contained in:
parent
90150a9fad
commit
68a54d2594
2 changed files with 0 additions and 19 deletions
|
@ -11,23 +11,6 @@ void setRect( SDL_Rect& _r, int x, int y, int w, int h )
|
|||
_r.h = h;
|
||||
}
|
||||
|
||||
unsigned int endian_swap( unsigned int x )
|
||||
{
|
||||
return (x>>24) |
|
||||
((x<<8) & 0x00FF0000) |
|
||||
((x>>8) & 0x0000FF00) |
|
||||
(x<<24);
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void endian_swap(T *objp)
|
||||
{
|
||||
unsigned char *memp = reinterpret_cast<unsigned char*>(objp);
|
||||
std::reverse(memp, memp + sizeof(T));
|
||||
}
|
||||
|
||||
|
||||
SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, int height )
|
||||
{
|
||||
// Create an SDL_Rect with the area of the _surface
|
||||
|
|
|
@ -11,8 +11,6 @@ struct colourTransform
|
|||
|
||||
void setRect(SDL_Rect& _r, int x, int y, int w, int h);
|
||||
|
||||
unsigned int endian_swap(unsigned int x);
|
||||
|
||||
SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, int height );
|
||||
|
||||
void DrawPixel( SDL_Surface *surface, int x, int y, Uint32 pixel );
|
||||
|
|
Loading…
Reference in a new issue