42 lines
1013 B
C++
42 lines
1013 B
C++
#ifndef IPL_UTILITY_MISC_H
|
|
#define IPL_UTILITY_MISC_H
|
|
|
|
#include <decomp.h>
|
|
|
|
#include <revolution.h>
|
|
#include <revolution/wpad.h>
|
|
|
|
#include "iplMath.h"
|
|
|
|
namespace ipl {
|
|
namespace utility {
|
|
/**
|
|
* @brief Converts IR position to Cursor position.
|
|
* @param basePos The IR position.
|
|
* @return The Cursor Position as `ipl::math::VEC2`
|
|
*/
|
|
math::VEC2 get_cursor_pos(const math::VEC2& basePos);
|
|
|
|
class Language {
|
|
public:
|
|
static const char* getPath();
|
|
static const char* mLangPath[10];
|
|
};
|
|
|
|
template <typename T>
|
|
inline void setBit(T* b, int pos) {
|
|
const T mask = (T)(1 << pos);
|
|
*b |= mask;
|
|
}
|
|
|
|
template <typename T>
|
|
inline void clearBit(T* b, int pos) {
|
|
*b &= ~(T)(1 << pos);
|
|
}
|
|
|
|
void* memcpy_s(void* dest, u32 destSize, const void* src, u32 srcSize);
|
|
} // namespace utility
|
|
} // namespace ipl
|
|
|
|
#endif // IPL_UTILITY_MISC_H
|