Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ui_splevel.c File Reference

#include "ui_local.h"

Include dependency graph for ui_splevel.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  levelMenuInfo_t

Defines

#define ART_ARROW   "menu/art/narrow_0"
#define ART_ARROW_FOCUS   "menu/art/narrow_1"
#define ART_BACK0   "menu/art/back_0"
#define ART_BACK1   "menu/art/back_1"
#define ART_CUSTOM0   "menu/art/skirmish_0"
#define ART_CUSTOM1   "menu/art/skirmish_1"
#define ART_FIGHT0   "menu/art/fight_0"
#define ART_FIGHT1   "menu/art/fight_1"
#define ART_LEVELFRAME_FOCUS   "menu/art/maps_select"
#define ART_LEVELFRAME_SELECTED   "menu/art/maps_selected"
#define ART_MAP_COMPLETE1   "menu/art/level_complete1"
#define ART_MAP_COMPLETE2   "menu/art/level_complete2"
#define ART_MAP_COMPLETE3   "menu/art/level_complete3"
#define ART_MAP_COMPLETE4   "menu/art/level_complete4"
#define ART_MAP_COMPLETE5   "menu/art/level_complete5"
#define ART_MAP_UNKNOWN   "menu/art/unknownmap"
#define ART_RESET0   "menu/art/reset_0"
#define ART_RESET1   "menu/art/reset_1"
#define AWARDS_Y   (PLAYER_Y + 26)
#define ID_AWARD1   17
#define ID_AWARD2   18
#define ID_AWARD3   19
#define ID_AWARD4   20
#define ID_AWARD5   21
#define ID_AWARD6   22
#define ID_BACK   23
#define ID_CUSTOM   25
#define ID_LEFTARROW   10
#define ID_NEXT   26
#define ID_PICTURE0   11
#define ID_PICTURE1   12
#define ID_PICTURE2   13
#define ID_PICTURE3   14
#define ID_PLAYERPIC   16
#define ID_RESET   24
#define ID_RIGHTARROW   15
#define LEVEL_DESC_LEFT_MARGIN   332
#define PLAYER_Y   314

Functions

void PlayerIcon (const char *modelAndSkin, char *iconName, int iconNameMaxSize)
qhandle_t PlayerIconHandle (const char *modelAndSkin)
void UI_SPLevelMenu (void)
void UI_SPLevelMenu_AwardEvent (void *ptr, int notification)
void UI_SPLevelMenu_BackEvent (void *ptr, int notification)
void UI_SPLevelMenu_Cache (void)
void UI_SPLevelMenu_CustomEvent (void *ptr, int notification)
void UI_SPLevelMenu_f (void)
void UI_SPLevelMenu_Init (void)
void UI_SPLevelMenu_LeftArrowEvent (void *ptr, int notification)
void UI_SPLevelMenu_LevelEvent (void *ptr, int notification)
void UI_SPLevelMenu_MenuDraw (void)
void UI_SPLevelMenu_NextEvent (void *ptr, int notification)
void UI_SPLevelMenu_PlayerEvent (void *ptr, int notification)
void UI_SPLevelMenu_ReInit (void)
void UI_SPLevelMenu_ResetAction (qboolean result)
void UI_SPLevelMenu_ResetDraw (void)
void UI_SPLevelMenu_ResetEvent (void *ptr, int event)
void UI_SPLevelMenu_RightArrowEvent (void *ptr, int notification)
void UI_SPLevelMenu_SetBots (void)
void UI_SPLevelMenu_SetMenuArena (int n, int level, const char *arenaInfo)
void UI_SPLevelMenu_SetMenuItems (void)

Variables

int currentGame
int currentSet
int finalTier
levelMenuInfo_t levelMenuInfo
int maxTier
int minTier
int selectedArena
int selectedArenaSet
int trainingTier


Define Documentation

#define ART_ARROW   "menu/art/narrow_0"
 

Definition at line 36 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_ARROW_FOCUS   "menu/art/narrow_1"
 

Definition at line 37 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_BACK0   "menu/art/back_0"
 

Definition at line 44 of file ui_splevel.c.

#define ART_BACK1   "menu/art/back_1"
 

Definition at line 45 of file ui_splevel.c.

#define ART_CUSTOM0   "menu/art/skirmish_0"
 

Definition at line 50 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_CUSTOM1   "menu/art/skirmish_1"
 

Definition at line 51 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_FIGHT0   "menu/art/fight_0"
 

Definition at line 46 of file ui_splevel.c.

#define ART_FIGHT1   "menu/art/fight_1"
 

Definition at line 47 of file ui_splevel.c.

#define ART_LEVELFRAME_FOCUS   "menu/art/maps_select"
 

Definition at line 34 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_LEVELFRAME_SELECTED   "menu/art/maps_selected"
 

Definition at line 35 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_MAP_COMPLETE1   "menu/art/level_complete1"
 

Definition at line 39 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPSkillMenu_Cache().

#define ART_MAP_COMPLETE2   "menu/art/level_complete2"
 

Definition at line 40 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPSkillMenu_Cache().

#define ART_MAP_COMPLETE3   "menu/art/level_complete3"
 

Definition at line 41 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPSkillMenu_Cache().

#define ART_MAP_COMPLETE4   "menu/art/level_complete4"
 

Definition at line 42 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPSkillMenu_Cache().

#define ART_MAP_COMPLETE5   "menu/art/level_complete5"
 

Definition at line 43 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPSkillMenu_Cache().

#define ART_MAP_UNKNOWN   "menu/art/unknownmap"
 

Definition at line 38 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache(), and UI_SPLevelMenu_SetMenuArena().

#define ART_RESET0   "menu/art/reset_0"
 

Definition at line 48 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define ART_RESET1   "menu/art/reset_1"
 

Definition at line 49 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Cache().

#define AWARDS_Y   (PLAYER_Y + 26)
 

Definition at line 72 of file ui_splevel.c.

#define ID_AWARD1   17
 

Definition at line 60 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_Init().

#define ID_AWARD2   18
 

Definition at line 61 of file ui_splevel.c.

#define ID_AWARD3   19
 

Definition at line 62 of file ui_splevel.c.

#define ID_AWARD4   20
 

Definition at line 63 of file ui_splevel.c.

#define ID_AWARD5   21
 

Definition at line 64 of file ui_splevel.c.

#define ID_AWARD6   22
 

Definition at line 65 of file ui_splevel.c.

#define ID_BACK   23
 

Definition at line 66 of file ui_splevel.c.

#define ID_CUSTOM   25
 

Definition at line 68 of file ui_splevel.c.

#define ID_LEFTARROW   10
 

Definition at line 53 of file ui_splevel.c.

#define ID_NEXT   26
 

Definition at line 69 of file ui_splevel.c.

#define ID_PICTURE0   11
 

Definition at line 54 of file ui_splevel.c.

#define ID_PICTURE1   12
 

Definition at line 55 of file ui_splevel.c.

#define ID_PICTURE2   13
 

Definition at line 56 of file ui_splevel.c.

#define ID_PICTURE3   14
 

Definition at line 57 of file ui_splevel.c.

#define ID_PLAYERPIC   16
 

Definition at line 59 of file ui_splevel.c.

#define ID_RESET   24
 

Definition at line 67 of file ui_splevel.c.

#define ID_RIGHTARROW   15
 

Definition at line 58 of file ui_splevel.c.

#define LEVEL_DESC_LEFT_MARGIN   332
 

Definition at line 533 of file ui_splevel.c.

#define PLAYER_Y   314
 

Definition at line 71 of file ui_splevel.c.

Referenced by UI_SPLevelMenu_MenuDraw().


Function Documentation

void PlayerIcon const char *  modelAndSkin,
char *  iconName,
int  iconNameMaxSize
[static]
 

Definition at line 128 of file ui_splevel.c.

References Com_sprintf(), Q_stricmp(), Q_strncpyz(), Q_strrchr(), and trap_R_RegisterShaderNoMip().

Referenced by PlayerIconHandle(), UI_SPLevelMenu_Init(), and UI_SPLevelMenu_MenuDraw().

00128                                                                                         {
00129     char    *skin;
00130     char    model[MAX_QPATH];
00131 
00132     Q_strncpyz( model, modelAndSkin, sizeof(model));
00133     skin = Q_strrchr( model, '/' );
00134     if ( skin ) {
00135         *skin++ = '\0';
00136     }
00137     else {
00138         skin = "default";
00139     }
00140 
00141     Com_sprintf(iconName, iconNameMaxSize, "models/players/%s/icon_%s.tga", model, skin );
00142 
00143     if( !trap_R_RegisterShaderNoMip( iconName ) && Q_stricmp( skin, "default" ) != 0 ) {
00144         Com_sprintf(iconName, iconNameMaxSize, "models/players/%s/icon_default.tga", model );
00145     }
00146 }

Here is the call graph for this function:

qhandle_t PlayerIconHandle const char *  modelAndSkin  )  [static]
 

Definition at line 154 of file ui_splevel.c.

References PlayerIcon(), qhandle_t, and trap_R_RegisterShaderNoMip().

Referenced by UI_SPLevelMenu_SetBots().

00154                                                               {
00155     char    iconName[MAX_QPATH];
00156 
00157     PlayerIcon( modelAndSkin, iconName, sizeof(iconName) );
00158     return trap_R_RegisterShaderNoMip( iconName );
00159 }

Here is the call graph for this function:

void UI_SPLevelMenu void   ) 
 

Definition at line 938 of file ui_splevel.c.

References atoi, currentGame, currentSet, finalTier, Info_ValueForKey(), levelMenuInfo_t::item_next, level, levelMenuInfo, maxTier, levelMenuInfo_t::menu, Menu_SetCursorToItem(), minTier, trainingTier, UI_GetCurrentGame(), UI_GetNumSPArenas(), UI_GetNumSPTiers(), UI_GetSpecialArenaInfo(), UI_PushMenu(), and UI_SPLevelMenu_Init().

00938                             {
00939     int         level;
00940     int         trainingLevel;
00941     const char  *arenaInfo;
00942 
00943     trainingTier = -1;
00944     arenaInfo = UI_GetSpecialArenaInfo( "training" );
00945     if( arenaInfo ) {
00946         minTier = trainingTier;
00947         trainingLevel = atoi( Info_ValueForKey( arenaInfo, "num" ) );
00948     }
00949     else {
00950         minTier = 0;
00951         trainingLevel = -2;
00952     }
00953 
00954     finalTier = UI_GetNumSPTiers();
00955     arenaInfo = UI_GetSpecialArenaInfo( "final" );
00956     if( arenaInfo ) {
00957         maxTier = finalTier;
00958     }
00959     else {
00960         maxTier = finalTier - 1;
00961         if( maxTier < minTier ) {
00962             maxTier = minTier;
00963         }
00964     }
00965 
00966     level = UI_GetCurrentGame();
00967     if ( level == -1 ) {
00968         level = UI_GetNumSPArenas() - 1;
00969         if( maxTier == finalTier ) {
00970             level++;
00971         }
00972     }
00973 
00974     if( level == trainingLevel ) {
00975         currentSet = -1;
00976         currentGame = 0;
00977     }
00978     else {
00979         currentSet = level / ARENAS_PER_TIER;
00980         currentGame = level % ARENAS_PER_TIER;
00981     }
00982 
00983     UI_SPLevelMenu_Init();
00984     UI_PushMenu( &levelMenuInfo.menu );
00985     Menu_SetCursorToItem( &levelMenuInfo.menu, &levelMenuInfo.item_next );
00986 }

Here is the call graph for this function:

void UI_SPLevelMenu_AwardEvent void *  ptr,
int  notification
[static]
 

Definition at line 462 of file ui_splevel.c.

References levelMenuInfo_t::awardSounds, CHAN_ANNOUNCER, levelMenuInfo, n, and trap_S_StartLocalSound().

00462                                                                      {
00463     int     n;
00464 
00465     if (notification != QM_ACTIVATED) {
00466         return;
00467     }
00468 
00469     n = ((menucommon_s*)ptr)->id - ID_AWARD1;
00470     trap_S_StartLocalSound( levelMenuInfo.awardSounds[n], CHAN_ANNOUNCER );
00471 }

Here is the call graph for this function:

void UI_SPLevelMenu_BackEvent void *  ptr,
int  notification
[static]
 

Definition at line 501 of file ui_splevel.c.

References selectedArena, and UI_PopMenu().

00501                                                                     {
00502     if (notification != QM_ACTIVATED) {
00503         return;
00504     }
00505 
00506     if ( selectedArena == -1 ) {
00507         selectedArena = 0;
00508     }
00509 
00510     UI_PopMenu();
00511 }

Here is the call graph for this function:

void UI_SPLevelMenu_Cache void   ) 
 

Definition at line 671 of file ui_splevel.c.

References ART_ARROW, ART_ARROW_FOCUS, ART_BACK0, ART_BACK1, ART_CUSTOM0, ART_CUSTOM1, ART_FIGHT0, ART_FIGHT1, ART_LEVELFRAME_FOCUS, ART_LEVELFRAME_SELECTED, ART_MAP_COMPLETE1, ART_MAP_COMPLETE2, ART_MAP_COMPLETE3, ART_MAP_COMPLETE4, ART_MAP_COMPLETE5, ART_MAP_UNKNOWN, ART_RESET0, ART_RESET1, levelMenuInfo_t::awardSounds, levelMenuInfo_t::levelCompletePic, levelMenuInfo_t::levelFocusPic, levelMenuInfo, levelMenuInfo_t::levelSelectedPic, n, qfalse, trap_R_RegisterShaderNoMip(), trap_S_RegisterSound(), ui_medalPicNames, and ui_medalSounds.

00671                                   {
00672     int             n;
00673 
00674     trap_R_RegisterShaderNoMip( ART_LEVELFRAME_FOCUS );
00675     trap_R_RegisterShaderNoMip( ART_LEVELFRAME_SELECTED );
00676     trap_R_RegisterShaderNoMip( ART_ARROW );
00677     trap_R_RegisterShaderNoMip( ART_ARROW_FOCUS );
00678     trap_R_RegisterShaderNoMip( ART_MAP_UNKNOWN );
00679     trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE1 );
00680     trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE2 );
00681     trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE3 );
00682     trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE4 );
00683     trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE5 );
00684     trap_R_RegisterShaderNoMip( ART_BACK0 );
00685     trap_R_RegisterShaderNoMip( ART_BACK1 );
00686     trap_R_RegisterShaderNoMip( ART_FIGHT0 );
00687     trap_R_RegisterShaderNoMip( ART_FIGHT1 );
00688     trap_R_RegisterShaderNoMip( ART_RESET0 );
00689     trap_R_RegisterShaderNoMip( ART_RESET1 );
00690     trap_R_RegisterShaderNoMip( ART_CUSTOM0 );
00691     trap_R_RegisterShaderNoMip( ART_CUSTOM1 );
00692 
00693     for( n = 0; n < 6; n++ ) {
00694         trap_R_RegisterShaderNoMip( ui_medalPicNames[n] );
00695         levelMenuInfo.awardSounds[n] = trap_S_RegisterSound( ui_medalSounds[n], qfalse );
00696     }
00697 
00698     levelMenuInfo.levelSelectedPic = trap_R_RegisterShaderNoMip( ART_LEVELFRAME_SELECTED );
00699     levelMenuInfo.levelFocusPic = trap_R_RegisterShaderNoMip( ART_LEVELFRAME_FOCUS );
00700     levelMenuInfo.levelCompletePic[0] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE1 );
00701     levelMenuInfo.levelCompletePic[1] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE2 );
00702     levelMenuInfo.levelCompletePic[2] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE3 );
00703     levelMenuInfo.levelCompletePic[3] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE4 );
00704     levelMenuInfo.levelCompletePic[4] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE5 );
00705 }

Here is the call graph for this function:

void UI_SPLevelMenu_CustomEvent void *  ptr,
int  notification
[static]
 

Definition at line 519 of file ui_splevel.c.

References qfalse, and UI_StartServerMenu().

00519                                                                       {
00520     if (notification != QM_ACTIVATED) {
00521         return;
00522     }
00523 
00524     UI_StartServerMenu( qfalse );
00525 }

Here is the call graph for this function:

void UI_SPLevelMenu_f void   ) 
 

Definition at line 994 of file ui_splevel.c.

References KEYCATCH_UI, uiStatic_t::menusp, trap_Key_SetCatcher(), UI_SPLevelMenu(), and uis.

00994                               {
00995     trap_Key_SetCatcher( KEYCATCH_UI );
00996     uis.menusp = 0;
00997     UI_SPLevelMenu();
00998 }

Here is the call graph for this function:

void UI_SPLevelMenu_Init void   )  [static]
 

Definition at line 713 of file ui_splevel.c.

References atoi, levelMenuInfo_t::awardLevels, menucommon_s::bottom, menucommon_s::callback, menutext_s::color, count, _tag_menuframework::draw, menucommon_s::flags, menubitmap_s::focuspic, _tag_menuframework::fullscreen, menubitmap_s::generic, menutext_s::generic, menubitmap_s::height, menucommon_s::id, ID_AWARD1, levelMenuInfo_t::item_awards, levelMenuInfo_t::item_back, levelMenuInfo_t::item_banner, levelMenuInfo_t::item_custom, levelMenuInfo_t::item_leftarrow, levelMenuInfo_t::item_maps, levelMenuInfo_t::item_next, levelMenuInfo_t::item_null, levelMenuInfo_t::item_player, levelMenuInfo_t::item_reset, levelMenuInfo_t::item_rightarrow, levelMenuInfo, levelMenuInfo_t::levelPicNames, memset(), levelMenuInfo_t::menu, Menu_AddItem(), n, menucommon_s::name, PlayerIcon(), levelMenuInfo_t::playerModel, levelMenuInfo_t::playerPicName, QMF_LEFT_JUSTIFY, QMF_MOUSEONLY, QMF_RIGHT_JUSTIFY, QMF_SILENT, selectedArena, selectedArenaSet, menutext_s::string, menutext_s::style, trap_Cvar_Set(), trap_Cvar_VariableStringBuffer(), trap_Cvar_VariableValue(), menucommon_s::type, UI_GetAwardLevel(), ui_medalPicNames, UI_SPLevelMenu_Cache(), UI_SPLevelMenu_SetMenuItems(), menubitmap_s::width, _tag_menuframework::wrapAround, x, menucommon_s::x, y, and menucommon_s::y.

Referenced by UI_SPLevelMenu().

00713                                         {
00714     int     skill;
00715     int     n;
00716     int     x, y;
00717     int     count;
00718     char    buf[MAX_QPATH];
00719 
00720     skill = (int)trap_Cvar_VariableValue( "g_spSkill" );
00721     if( skill < 1 || skill > 5 ) {
00722         trap_Cvar_Set( "g_spSkill", "2" );
00723         skill = 2;
00724     }
00725 
00726     memset( &levelMenuInfo, 0, sizeof(levelMenuInfo) );
00727     levelMenuInfo.menu.fullscreen = qtrue;
00728     levelMenuInfo.menu.wrapAround = qtrue;
00729     levelMenuInfo.menu.draw = UI_SPLevelMenu_MenuDraw;
00730 
00731     UI_SPLevelMenu_Cache();
00732 
00733     levelMenuInfo.item_banner.generic.type          = MTYPE_BTEXT;
00734     levelMenuInfo.item_banner.generic.x             = 320;
00735     levelMenuInfo.item_banner.generic.y             = 16;
00736     levelMenuInfo.item_banner.string                = "CHOOSE LEVEL";
00737     levelMenuInfo.item_banner.color                 = color_red;
00738     levelMenuInfo.item_banner.style                 = UI_CENTER;
00739 
00740     levelMenuInfo.item_leftarrow.generic.type       = MTYPE_BITMAP;
00741     levelMenuInfo.item_leftarrow.generic.name       = ART_ARROW;
00742     levelMenuInfo.item_leftarrow.generic.flags      = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
00743     levelMenuInfo.item_leftarrow.generic.x          = 18;
00744     levelMenuInfo.item_leftarrow.generic.y          = 64;
00745     levelMenuInfo.item_leftarrow.generic.callback   = UI_SPLevelMenu_LeftArrowEvent;
00746     levelMenuInfo.item_leftarrow.generic.id         = ID_LEFTARROW;
00747     levelMenuInfo.item_leftarrow.width              = 16;
00748     levelMenuInfo.item_leftarrow.height             = 114;
00749     levelMenuInfo.item_leftarrow.focuspic           = ART_ARROW_FOCUS;
00750 
00751     levelMenuInfo.item_maps[0].generic.type         = MTYPE_BITMAP;
00752     levelMenuInfo.item_maps[0].generic.name         = levelMenuInfo.levelPicNames[0];
00753     levelMenuInfo.item_maps[0].generic.flags        = QMF_LEFT_JUSTIFY;
00754     levelMenuInfo.item_maps[0].generic.x            = 46;
00755     levelMenuInfo.item_maps[0].generic.y            = 64;
00756     levelMenuInfo.item_maps[0].generic.id           = ID_PICTURE0;
00757     levelMenuInfo.item_maps[0].generic.callback     = UI_SPLevelMenu_LevelEvent;
00758     levelMenuInfo.item_maps[0].width                = 128;
00759     levelMenuInfo.item_maps[0].height               = 96;
00760 
00761     levelMenuInfo.item_maps[1].generic.type         = MTYPE_BITMAP;
00762     levelMenuInfo.item_maps[1].generic.name         = levelMenuInfo.levelPicNames[1];
00763     levelMenuInfo.item_maps[1].generic.flags        = QMF_LEFT_JUSTIFY;
00764     levelMenuInfo.item_maps[1].generic.x            = 186;
00765     levelMenuInfo.item_maps[1].generic.y            = 64;
00766     levelMenuInfo.item_maps[1].generic.id           = ID_PICTURE1;
00767     levelMenuInfo.item_maps[1].generic.callback     = UI_SPLevelMenu_LevelEvent;
00768     levelMenuInfo.item_maps[1].width                = 128;
00769     levelMenuInfo.item_maps[1].height               = 96;
00770 
00771     levelMenuInfo.item_maps[2].generic.type         = MTYPE_BITMAP;
00772     levelMenuInfo.item_maps[2].generic.name         = levelMenuInfo.levelPicNames[2];
00773     levelMenuInfo.item_maps[2].generic.flags        = QMF_LEFT_JUSTIFY;
00774     levelMenuInfo.item_maps[2].generic.x            = 326;
00775     levelMenuInfo.item_maps[2].generic.y            = 64;
00776     levelMenuInfo.item_maps[2].generic.id           = ID_PICTURE2;
00777     levelMenuInfo.item_maps[2].generic.callback     = UI_SPLevelMenu_LevelEvent;
00778     levelMenuInfo.item_maps[2].width                = 128;
00779     levelMenuInfo.item_maps[2].height               = 96;
00780 
00781     levelMenuInfo.item_maps[3].generic.type         = MTYPE_BITMAP;
00782     levelMenuInfo.item_maps[3].generic.name         = levelMenuInfo.levelPicNames[3];
00783     levelMenuInfo.item_maps[3].generic.flags        = QMF_LEFT_JUSTIFY;
00784     levelMenuInfo.item_maps[3].generic.x            = 466;
00785     levelMenuInfo.item_maps[3].generic.y            = 64;
00786     levelMenuInfo.item_maps[3].generic.id           = ID_PICTURE3;
00787     levelMenuInfo.item_maps[3].generic.callback     = UI_SPLevelMenu_LevelEvent;
00788     levelMenuInfo.item_maps[3].width                = 128;
00789     levelMenuInfo.item_maps[3].height               = 96;
00790 
00791     levelMenuInfo.item_rightarrow.generic.type      = MTYPE_BITMAP;
00792     levelMenuInfo.item_rightarrow.generic.name      = ART_ARROW;
00793     levelMenuInfo.item_rightarrow.generic.flags     = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
00794     levelMenuInfo.item_rightarrow.generic.x         = 606;
00795     levelMenuInfo.item_rightarrow.generic.y         = 64;
00796     levelMenuInfo.item_rightarrow.generic.callback  = UI_SPLevelMenu_RightArrowEvent;
00797     levelMenuInfo.item_rightarrow.generic.id        = ID_RIGHTARROW;
00798     levelMenuInfo.item_rightarrow.width             = -16;
00799     levelMenuInfo.item_rightarrow.height            = 114;
00800     levelMenuInfo.item_rightarrow.focuspic          = ART_ARROW_FOCUS;
00801 
00802     trap_Cvar_VariableStringBuffer( "model", levelMenuInfo.playerModel, sizeof(levelMenuInfo.playerModel) );
00803     PlayerIcon( levelMenuInfo.playerModel, levelMenuInfo.playerPicName, sizeof(levelMenuInfo.playerPicName) );
00804     levelMenuInfo.item_player.generic.type          = MTYPE_BITMAP;
00805     levelMenuInfo.item_player.generic.name          = levelMenuInfo.playerPicName;
00806     levelMenuInfo.item_player.generic.flags         = QMF_LEFT_JUSTIFY|QMF_MOUSEONLY;
00807     levelMenuInfo.item_player.generic.x             = 288;
00808     levelMenuInfo.item_player.generic.y             = AWARDS_Y;
00809     levelMenuInfo.item_player.generic.id            = ID_PLAYERPIC;
00810     levelMenuInfo.item_player.generic.callback      = UI_SPLevelMenu_PlayerEvent;
00811     levelMenuInfo.item_player.width                 = 64;
00812     levelMenuInfo.item_player.height                = 64;
00813 
00814     for( n = 0; n < 6; n++ ) {
00815         levelMenuInfo.awardLevels[n] = UI_GetAwardLevel( n );
00816     }
00817     levelMenuInfo.awardLevels[AWARD_FRAGS] = 100 * (levelMenuInfo.awardLevels[AWARD_FRAGS] / 100);
00818 
00819     y = AWARDS_Y;
00820     count = 0;
00821     for( n = 0; n < 6; n++ ) {
00822         if( levelMenuInfo.awardLevels[n] ) {
00823             if( count & 1 ) {
00824                 x = 224 - (count - 1 ) / 2 * (48 + 16);
00825             }
00826             else {
00827                 x = 368 + count / 2 * (48 + 16);
00828             }
00829 
00830             levelMenuInfo.item_awards[count].generic.type       = MTYPE_BITMAP;
00831             levelMenuInfo.item_awards[count].generic.name       = ui_medalPicNames[n];
00832             levelMenuInfo.item_awards[count].generic.flags      = QMF_LEFT_JUSTIFY|QMF_SILENT|QMF_MOUSEONLY;
00833             levelMenuInfo.item_awards[count].generic.x          = x;
00834             levelMenuInfo.item_awards[count].generic.y          = y;
00835             levelMenuInfo.item_awards[count].generic.id         = ID_AWARD1 + n;
00836             levelMenuInfo.item_awards[count].generic.callback   = UI_SPLevelMenu_AwardEvent;
00837             levelMenuInfo.item_awards[count].width              = 48;
00838             levelMenuInfo.item_awards[count].height             = 48;
00839             count++;
00840         }
00841     }
00842 
00843     levelMenuInfo.item_back.generic.type            = MTYPE_BITMAP;
00844     levelMenuInfo.item_back.generic.name            = ART_BACK0;
00845     levelMenuInfo.item_back.generic.flags           = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
00846     levelMenuInfo.item_back.generic.x               = 0;
00847     levelMenuInfo.item_back.generic.y               = 480-64;
00848     levelMenuInfo.item_back.generic.callback        = UI_SPLevelMenu_BackEvent;
00849     levelMenuInfo.item_back.generic.id              = ID_BACK;
00850     levelMenuInfo.item_back.width                   = 128;
00851     levelMenuInfo.item_back.height                  = 64;
00852     levelMenuInfo.item_back.focuspic                = ART_BACK1;
00853 
00854     levelMenuInfo.item_reset.generic.type           = MTYPE_BITMAP;
00855     levelMenuInfo.item_reset.generic.name           = ART_RESET0;
00856     levelMenuInfo.item_reset.generic.flags          = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
00857     levelMenuInfo.item_reset.generic.x              = 170;
00858     levelMenuInfo.item_reset.generic.y              = 480-64;
00859     levelMenuInfo.item_reset.generic.callback       = UI_SPLevelMenu_ResetEvent;
00860     levelMenuInfo.item_reset.generic.id             = ID_RESET;
00861     levelMenuInfo.item_reset.width                  = 128;
00862     levelMenuInfo.item_reset.height                 = 64;
00863     levelMenuInfo.item_reset.focuspic               = ART_RESET1;
00864 
00865     levelMenuInfo.item_custom.generic.type          = MTYPE_BITMAP;
00866     levelMenuInfo.item_custom.generic.name          = ART_CUSTOM0;
00867     levelMenuInfo.item_custom.generic.flags         = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
00868     levelMenuInfo.item_custom.generic.x             = 342;
00869     levelMenuInfo.item_custom.generic.y             = 480-64;
00870     levelMenuInfo.item_custom.generic.callback      = UI_SPLevelMenu_CustomEvent;
00871     levelMenuInfo.item_custom.generic.id            = ID_CUSTOM;
00872     levelMenuInfo.item_custom.width                 = 128;
00873     levelMenuInfo.item_custom.height                = 64;
00874     levelMenuInfo.item_custom.focuspic              = ART_CUSTOM1;
00875 
00876     levelMenuInfo.item_next.generic.type            = MTYPE_BITMAP;
00877     levelMenuInfo.item_next.generic.name            = ART_FIGHT0;
00878     levelMenuInfo.item_next.generic.flags           = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
00879     levelMenuInfo.