athena/include/utility.hpp

40 lines
1.1 KiB
C++
Raw Normal View History

// This file is part of libZelda.
//
// libZelda is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// libZelda is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
2013-01-26 20:19:24 +00:00
#ifndef __UTILITY_H__
#define __UTILITY_H__
#include <string>
#include "Types.hpp"
bool isEmpty(Int8*, size_t);
unsigned short swapU16(unsigned short val );
2013-07-21 03:57:20 +00:00
short swap16 (short val );
2013-01-26 20:19:24 +00:00
unsigned int swapU32(unsigned int val);
2013-07-21 03:57:20 +00:00
int swap32 (int val );
long long swap64 (long long val);
2013-01-26 20:19:24 +00:00
2013-07-21 03:57:20 +00:00
float swapFloat(float val);
double swapDouble(double val);
2013-01-26 20:19:24 +00:00
bool isSystemBigEndian();
void fillRandom(Uint8 * rndArea, Uint8 count);
2013-01-26 20:19:24 +00:00
2013-07-21 03:57:20 +00:00
void yaz0Decode(Uint8* src, Uint8* dst, Uint32 uncompressedSize);
2013-01-26 20:19:24 +00:00
#endif