mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-25 23:15:08 -04:00
1b0b96665a
Co-authored-by: NWPlayer123 <NWPlayer123@users.noreply.github.com>
38 lines
754 B
C++
38 lines
754 B
C++
#ifndef DEFINE_H
|
|
#define DEFINE_H
|
|
|
|
#include "types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
|
|
class JGadget_outMessage {
|
|
public:
|
|
typedef void (*MessageFunc)(const char*, int, const char*);
|
|
|
|
static void warning(const char*, int, const char*);
|
|
|
|
JGadget_outMessage(MessageFunc fn, const char* file, int line);
|
|
~JGadget_outMessage();
|
|
|
|
JGadget_outMessage& operator<<(const char* str);
|
|
|
|
private:
|
|
MessageFunc mMsgFunc;
|
|
char mBuffer[256];
|
|
char* mWrite_p;
|
|
char* mFile;
|
|
int mLine;
|
|
};
|
|
|
|
#define JGADGET_ASSERTWARN(cond) \
|
|
((cond) || (false))
|
|
|
|
#define JGADGET_EXITWARN(cond) \
|
|
if (!(cond)) { false; return false; }
|
|
|
|
}
|
|
#endif
|
|
|
|
#endif
|