X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fmenu%2Fmenu.qh;h=a4cdbc5f512bea1eba011c2dd64f30ea00b11c6f;hb=21c17a318d073ca766e8661643c8176aecf7bd14;hp=020a65a20c318ac1cf8f1bbf5e1625759aa30cc2;hpb=fc2be4c1e7547ae97301f7966333e4dc858baf92;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index 020a65a20..a4cdbc5f5 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -4,25 +4,16 @@ #include "draw.qh" #include "skin.qh" -#include "oo/base.qh" - #include "xonotic/util.qh" #include "../common/constants.qh" -#include "../common/test.qh" #include "../common/util.qh" -#define localcmd cmd - -// constants - -const int GAME_ISSERVER = 1; -const int GAME_CONNECTED = 2; -const int GAME_DEVELOPER = 4; +const int GAME_ISSERVER = BIT(0); +const int GAME_CONNECTED = BIT(1); +const int GAME_DEVELOPER = BIT(2); -// prototypes - -float Menu_Active; +bool Menu_Active; int gamestatus; const int S_SHIFT = 1; @@ -40,20 +31,22 @@ void m_goto(string name); .string name; entity keyGrabber; -.void(entity me, float key, float ascii) keyGrabbed; +.void(entity this, float key, float ascii) keyGrabbed; -float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling +// "virtual" conwidth/height values for other stuff to assume for scaling +float conwidth, conheight; -float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded. -void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame. -void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else. +/** you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded. */ +float preMenuInit(); +/** this is run before the menu is drawn. You may put some stuff there that has to be done every frame. */ +void preMenuDraw(); +/** this is run just after the menu is drawn (or not). Useful to draw something over everything else. */ +void postMenuDraw(); void m_sync(); void draw_reset_cropped(); -// sounds - const string MENU_SOUND_CLEAR = "sound/menu/clear.wav"; const string MENU_SOUND_CLOSE = "sound/menu/close.wav"; const string MENU_SOUND_EXECUTE = "sound/menu/execute.wav";