23 #ifndef BAGEL_BOFLIB_MISC_H 24 #define BAGEL_BOFLIB_MISC_H 26 #include "bagel/boflib/stdinc.h" 30 extern int mapWindowsPointSize(
int pointSize);
35 extern void timerStart();
41 extern uint32 timerStop();
46 extern uint32 getTimer();
52 extern void bofSleep(uint32 milli);
54 extern Fixed fixedDivide(Fixed Dividend, Fixed Divisor);
55 extern Fixed fixedMultiply(Fixed Multiplicand, Fixed Multiplier);
57 #define intToFixed(i) (Fixed)(((long)(i)) << 16) 58 #define fixedToInt(f) (int)(((long)(f)) >> 16) 75 extern void *bofMemAlloc(uint32 nSize,
const char *pFile,
int nLine,
bool bClear);
81 extern void bofMemFree(
void *pBuf);
83 #define bofAlloc(n) bofMemAlloc((n), __FILE__, __LINE__, false) 84 #define bofCleanAlloc(n) bofMemAlloc((n), __FILE__, __LINE__, true) 85 #define bofFree(p) bofMemFree((p)) 87 inline uint32 getFreePhysMem() {
97 void encrypt(
void *pBuf, int32 lSize,
const char *pszPassword =
nullptr);
98 #define decrypt encrypt 100 extern void encryptPartial(
void *, int32, int32,
const char *pPassword =
nullptr);
101 #define decryptPartial encryptPartial