mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-25 07:02:47 -04:00
04354aadb9
* before __register_global_object * JKRThread::sThreadList, JKRHeap::sSystemHeap, etc. * cleanup and started on JKRDvdArchive * before changing JKRCompression * more JKRDvdArchive, abs, and memset * fixed JKRArchive::setExpandSize split * JKRArchive::sCurrentDirID, JKRDvdFile::sDvdList, and matching JKRDvdFile constructors * problems * merge fixes and formatting * updated clang version in clang-format-all to version 10 * Added OSPhysicalToCached and struct for global memory * remove useless __attribute__ * changed from defines and macros to const variable and function * changed FLAG_HAS to FLAG_ON * JKRAram, linking problems * fix JKRAram * remove nonmatching stuff * renamed static data * more static class members * JKRAramStream OK * formatting Co-authored-by: Julgodis <> Co-authored-by: Pheenoh <pheenoh@gmail.com>
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
#ifndef _global_h_
|
|
#define _global_h_
|
|
|
|
#define ARRAY_SIZE(o) (sizeof((o)) / sizeof(*(o)))
|
|
|
|
// Align X to the previous N bytes (N must be power of two)
|
|
#define ALIGN_PREV(X, N) ((X) & ~((N)-1))
|
|
// Align X to the next N bytes (N must be power of two)
|
|
#define ALIGN_NEXT(X, N) ALIGN_PREV(((X) + (N)-1), N)
|
|
#define IS_ALIGNED(X, N) (((X) & ((N)-1)) == 0)
|
|
#define IS_NOT_ALIGNED(X, N) (((X) & ((N)-1)) != 0)
|
|
|
|
#define JUT_ASSERT(...)
|
|
#define ASSERT(...)
|
|
#define LOGF(FMT, ...)
|
|
#define FLAG_ON(V, F) (((V) & (F)) == 0)
|
|
|
|
extern float __fabsf(float);
|
|
|
|
inline double fabsf(double d) {
|
|
return __fabsf(d);
|
|
}
|
|
|
|
extern float __fsqrte(float);
|
|
|
|
inline double sqrt(double d) {
|
|
return __fsqrte(d);
|
|
}
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
#include "ar/AR.h"
|
|
#include "ar/ARQ.h"
|
|
#include "functions.h"
|
|
#include "mwcc.h"
|
|
#include "os/OS.h"
|
|
#include "variables.h"
|
|
|
|
// hack to make functions that return comparisons as int match
|
|
extern int __cntlzw(unsigned int);
|
|
inline BOOL checkEqual(s32 a, s32 b) {
|
|
return (u32)__cntlzw(a - b) >> 5;
|
|
}
|
|
|
|
#endif
|