X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2F_all.inc;h=0bef0b6e0e944feebfe54c14fea8728a9bc6d295;hb=HEAD;hp=d44c5e89cdda2acacbd1b615bfbc55dc8bb93b9f;hpb=7ff985ed6aa644a01d2520ec06603f32f9dd4074;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/_all.inc b/qcsrc/lib/_all.inc index d44c5e89c..d33bda1d1 100644 --- a/qcsrc/lib/_all.inc +++ b/qcsrc/lib/_all.inc @@ -24,12 +24,26 @@ #define bool float #endif +#ifndef QCC_SUPPORT_ACCUMULATE + #warning "QCC does not support accumulate, may not compile correctly" + #define ACCUMULATE +#else + #define ACCUMULATE [[accumulate]] +#endif + #ifndef QCC_SUPPORT_ERASEABLE #define ERASEABLE #else #define ERASEABLE [[eraseable]] #endif +#ifndef QCC_SUPPORT_ALIAS + #warning "QCC does not support alias, may not compile correctly" + #define ALIAS(var) +#else + #define ALIAS(var) [[alias(var)]] +#endif + #include #if defined(CSQC) @@ -47,6 +61,12 @@ #include +#ifndef QCC_SUPPORT_POW + #define pow(a, b) pow(a, b) +#else + #define pow(a, b) ((a) ** (b)) +#endif + #include "self.qh" #define USING(name, T) typedef T name @@ -84,6 +104,9 @@ #include "warpzone/mathlib.qc" +// needs to be included before any of the functions which use globals are called +#include "deglobalization.qh" + #include "accumulate.qh" #include "angle.qc" #include "arraylist.qh" @@ -95,6 +118,7 @@ #include "draw.qh" #include "enumclass.qh" #include "file.qh" +#include "float.qh" #include "functional.qh" #include "i18n.qh" #include "intrusivelist.qh" @@ -113,6 +137,7 @@ #include "oo.qh" #include "p2mathlib.qc" #include "progname.qh" +#include "promise.qc" #include "random.qc" #include "registry.qh" #include "registry_net.qh" @@ -141,14 +166,14 @@ void make_safe_for_remove(entity this); #define objerror_safe(e) make_safe_for_remove(e) #endif -#define objerror(this, msg) MACRO_BEGIN { \ +#define objerror(this, msg) MACRO_BEGIN \ LOG_WARN("======OBJECT ERROR======"); \ entity _e = (this); \ eprint(_e); \ objerror_safe(_e); \ delete(_e); \ LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \ -} MACRO_END +MACRO_END #ifdef MENUQC void _m_init(); @@ -260,16 +285,16 @@ void make_safe_for_remove(entity this); #endif #ifdef CSQC - void _CSQC_Init(); - void CSQC_Init() { if (_CSQC_Init) _CSQC_Init(); } + void _CSQC_Init(float apilevel, string enginename, float engineversion); + void CSQC_Init(float apilevel, string enginename, float engineversion) { if (_CSQC_Init) _CSQC_Init(apilevel, enginename, engineversion); } #define CSQC_Init _CSQC_Init void _CSQC_Shutdown(); void CSQC_Shutdown() { if (_CSQC_Shutdown) _CSQC_Shutdown(); } #define CSQC_Shutdown _CSQC_Shutdown - void _CSQC_UpdateView(entity this, float w, float h); - void CSQC_UpdateView(float w, float h) { ENGINE_EVENT(); if (_CSQC_UpdateView) _CSQC_UpdateView(this, w, h); } + void _CSQC_UpdateView(entity this, float w, float h, bool notmenu); + void CSQC_UpdateView(float w, float h, bool notmenu) { ENGINE_EVENT(); if (_CSQC_UpdateView) _CSQC_UpdateView(this, w, h, notmenu); } #define CSQC_UpdateView _CSQC_UpdateView bool _CSQC_InputEvent(int inputType, float nPrimary, float nSecondary);