X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fmenu.qh;h=2df331950848c1dcdab9c53b63d9ebd553a3cb9a;hp=00f6017aa06b3bdf4b2143fbd132cd4dac4885e3;hb=3ac61b98c83be079c61cf525491d2028b2a889dc;hpb=37903827937b44f174275a75d2dab5301b8ab53e diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index 00f6017aa0..2df3319508 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -1,31 +1,18 @@ -#ifndef MENU_H -#define MENU_H +#pragma once #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 - -#define NULL (null_entity) -#define world NULL - -// constants - -const int GAME_ISSERVER = 1; -const int GAME_CONNECTED = 2; -const int GAME_DEVELOPER = 4; +#include +#include -// prototypes +const int GAME_ISSERVER = BIT(0); +const int GAME_CONNECTED = BIT(1); +const int GAME_DEVELOPER = BIT(2); -float Menu_Active; +bool Menu_Active; int gamestatus; const int S_SHIFT = 1; @@ -43,17 +30,21 @@ 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(); -// sounds +void draw_reset_cropped(); const string MENU_SOUND_CLEAR = "sound/menu/clear.wav"; const string MENU_SOUND_CLOSE = "sound/menu/close.wav"; @@ -66,4 +57,3 @@ const string MENU_SOUND_WINNER = "sound/menu/winner.wav"; void m_play_focus_sound(); void m_play_click_sound(string soundfile); -#endif