1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-24 13:38:29 +02: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:
Misa 2020-08-22 11:17:35 -07:00 committed by Ethan Lee
parent 90150a9fad
commit 68a54d2594
2 changed files with 0 additions and 19 deletions

View File

@ -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

View File

@ -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 );