7 #define minigame_hud_fitsqare(pos, mySize) \ 8 if ( mySize##_x > mySize##_y ) \ 10 pos##_x += (mySize##_x-mySize##_y)/2; \ 11 mySize##_x = mySize##_y; \ 15 pos##_y += (mySize##_y-mySize##_x)/2; \ 16 mySize##_x = mySize##_x; \ 18 if(panel_bg_padding) \ 20 pos += '1 1 0' * panel_bg_padding; \ 21 mySize -= '2 2 0' * panel_bg_padding; \ 26 #define minigame_hud_panelarea(pos, mySize, panelID) \ 27 pos = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_pos"))); \ 28 mySize = stov(cvar_string(strcat("hud_panel_", HUD_PANEL(panelID).panel_name, "_size"))); \ 29 pos##_x *= vid_conwidth; pos##_y *= vid_conheight; \ 30 mySize##_x *= vid_conwidth; mySize##_y *= vid_conheight; 57 string text,
vector fontsize,
float theAlpha,
int drawflags,
float align );
65 vector fontsize,
float theAlpha,
int drawflags );
90 #define minigame_cmd(...) minigame_cmd_workaround(0,__VA_ARGS__) 98 #define FOREACH_MINIGAME_ENTITY(entityvar) \ 100 while( (entityvar = findentity(entityvar,owner,active_minigame)) ) 108 #define REGISTER_MINIGAME(name,nicename) \ 109 REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); \ 110 void name##_hud_board(vector, vector); \ 111 void name##_hud_status(vector, vector); \ 112 int name##_client_event(entity, string, ...); \ 113 REGISTER_INIT(MINIGAME_##name) { \ 114 this.netname = strzone(strtolower(#name)); \ 115 this.message = nicename; \ 116 this.minigame_hud_board = name##_hud_board; \ 117 this.minigame_hud_status = name##_hud_status; \ 118 this.minigame_event = name##_client_event; \ 120 REGISTER_INIT(MINIGAME_##name)
float minigame_playerslot
void minigame_cmd_workaround(float dummy, string...cmdargc)
#define REGISTRY_CHECK(id)
vector minigame_hud_normalize(vector v, vector pos, vector mySize)
#define REGISTER_REGISTRY(id)
#define REGISTRY_DEFINE_GET(id, null)
vector minigame_hud_denormalize_size(vector v, vector pos, vector mySize)
#define REGISTRY(id, max)
Declare a new registry.
vector minigame_drawcolorcodedstring_wrapped(float maxwidth, vector pos, string text, vector fontsize, float theAlpha, int drawflags, float align)
void minigame_drawpic_centered(vector pos, string texture, vector sz, vector color, float thealpha, int drawflags)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector minigame_hud_denormalize(vector v, vector pos, vector mySize)
bool minigame_hud_mouse_in(vector pos, vector sz)
void minigame_hud_simpleboard(vector pos, vector mySize, string board_texture)
void deactivate_minigame()
void minigame_drawcolorcodedstring_trunc(float maxwidth, vector pos, string text, vector fontsize, float theAlpha, int drawflags)
string minigame_texture(string name)
void minigame_drawstring_trunc(float maxwidth, vector pos, string text, vector fontsize, vector color, float theAlpha, int drawflags)
vector minigame_drawstring_wrapped(float maxwidth, vector pos, string text, vector fontsize, vector color, float theAlpha, int drawflags, float align)