prime/include/Kyoto/Basics/CBasics.hpp
Phillip Stephens 4f9bb0ae1c Match and link CBasicsDolphin.cpp
Former-commit-id: 6880c19ae9c3a98e4d6206732af6718bd666ac39
2022-12-05 20:11:13 -08:00

29 lines
443 B
C++

#ifndef _CBASICS
#define _CBASICS
#include "types.h"
namespace CBasics {
bool Init();
char* Stringize(const char* fmt, ...);
inline uint SwapBytes(uint x) {
#if 0
x = ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x >> 24));
#endif
return x;
}
inline float SwapBytes(float x) {
union {
float f;
uint u;
};
f = x;
#if 0
u = SwapBytes(u);
#endif
return f;
}
}; // namespace CBasics
#endif // _CBASICS