diff options
| author | Tim Angus <tim@ngus.net> | 2001-12-21 03:20:26 +0000 | 
|---|---|---|
| committer | Tim Angus <tim@ngus.net> | 2001-12-21 03:20:26 +0000 | 
| commit | a7a3acb74b2a6ade77e8aac1aa779b1563dea47f (patch) | |
| tree | ba9dec5482aaf97c963291dddd27ca8bcc6bc3b5 /src | |
| parent | 4ea86bf171392a3731425efa8630429d1711c9c6 (diff) | |
New menus (including dynamic ones)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cgame/cg_event.c | 27 | ||||
| -rw-r--r-- | src/cgame/cg_local.h | 4 | ||||
| -rw-r--r-- | src/cgame/cg_main.c | 7 | ||||
| -rw-r--r-- | src/ui/ui_local.h | 41 | ||||
| -rw-r--r-- | src/ui/ui_main.c | 368 | 
5 files changed, 444 insertions, 3 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 1896f013..24a9e988 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -410,6 +410,11 @@ CG_Menu  */  void CG_Menu( int eventParm )  { +  int   i; +  char  carriageCvar[ MAX_TOKEN_CHARS ]; + +  *carriageCvar = 0; +      switch( eventParm )    {      case MN_TEAM:       trap_SendConsoleCommand( "menu tremulous_teamselect\n" );               break; @@ -417,7 +422,22 @@ void CG_Menu( int eventParm )      case MN_H_SPAWN:    trap_SendConsoleCommand( "menu tremulous_humanitem\n" );                break;      case MN_D_BUILD:    trap_SendConsoleCommand( "menu tremulous_alienbuild\n" );               break;      case MN_H_BUILD:    trap_SendConsoleCommand( "menu tremulous_humanbuild\n" );               break; -    case MN_H_MCU:      trap_SendConsoleCommand( "menu tremulous_humanmcu\n" );                 break; +    case MN_H_MCU: +      for( i = WP_NONE +1; i < WP_NUM_WEAPONS; i++ ) +      { +        if( BG_gotWeapon( i, cg.snap->ps.stats ) ) +          strcat( carriageCvar, va( "W%d ", i ) ); +      } +      for( i = UP_NONE +1; i < UP_NUM_UPGRADES; i++ ) +      { +        if( BG_gotItem( i, cg.snap->ps.stats ) ) +          strcat( carriageCvar, va( "U%d ", i ) ); +      } +      strcat( carriageCvar, "$" ); +           +      trap_Cvar_Set( "ui_carriage", carriageCvar ); +      trap_SendConsoleCommand( "menu tremulous_humanmcu\n" ); +      break;      case MN_H_BANK:     trap_SendConsoleCommand( "menu tremulous_humanbank\n" );                break;      case MN_H_NOROOM:   trap_SendConsoleCommand( "menu tremulous_human_no_room\n" );            break;      case MN_H_NOPOWER:  trap_SendConsoleCommand( "menu tremulous_human_no_power\n" );           break; @@ -435,7 +455,10 @@ void CG_Menu( int eventParm )      case MN_H_NOSLOTS:  trap_SendConsoleCommand( "menu tremulous_human_no_slots\n" );           break;      case MN_H_NOFUNDS:  trap_SendConsoleCommand( "menu tremulous_human_no_funds\n" );           break;      case MN_H_ITEMHELD: trap_SendConsoleCommand( "menu tremulous_human_item_held\n" );          break; -    case MN_D_INFEST:   trap_SendConsoleCommand( "menu dinfest\n" );                            break; +    case MN_D_INFEST: +      trap_Cvar_Set( "ui_currentClass", va( "%d", cg.snap->ps.stats[ STAT_PCLASS ] ) ); +      trap_SendConsoleCommand( "menu tremulous_alienupgrade\n" ); +      break;      default:        Com_Printf( "cgame: debug: no such menu %d\n", eventParm ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 726622c2..44b4f9d4 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1224,6 +1224,10 @@ extern  vmCvar_t    cg_drawSurfNormal;  extern  vmCvar_t    cg_debugAlloc;  extern  vmCvar_t    cg_smoothTime; +//TA: hack to get class an carriage through to UI module +extern  vmCvar_t    ui_currentClass; +extern  vmCvar_t    ui_carriage; +  //  // cg_main.c  // diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 32cc9bf5..3a384845 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -179,6 +179,10 @@ vmCvar_t  cg_drawSurfNormal;  vmCvar_t  cg_debugAlloc;  vmCvar_t  cg_smoothTime; +//TA: hack to get class an carriage through to UI module +vmCvar_t  ui_currentClass; +vmCvar_t  ui_carriage; +  typedef struct {    vmCvar_t  *vmCvar; @@ -260,6 +264,9 @@ static cvarTable_t   cvarTable[] = {    { &cg_drawSurfNormal, "cg_drawSurfNormal", "0", CVAR_CHEAT },    { &cg_debugAlloc, "cg_debugAlloc", "0", 0 },    { &cg_smoothTime, "cg_smoothTime", "300", 0 }, +   +  { &ui_currentClass, "ui_currentClass", "0", 0 }, +  { &ui_carriage, "ui_carriage", "", 0 },    // the following variables are created in other parts of the system,    // but we also reference them here diff --git a/src/ui/ui_local.h b/src/ui/ui_local.h index c146ddb2..ee8c2b54 100644 --- a/src/ui/ui_local.h +++ b/src/ui/ui_local.h @@ -748,6 +748,13 @@ typedef struct {  	const char *modDescr;  } modInfo_t; +//TA: tremulous menus +typedef struct +{ +	const char *text; +	const char *cmd; +} tremMenuItem_t; +//TA: tremulous menus  typedef struct {  	displayContextDef_t uiDC; @@ -808,6 +815,40 @@ typedef struct {  	int movieIndex;  	int previewMovie; +//TA: tremulous menus +	tremMenuItem_t  tremTeamList[ 3 ]; +	int             tremTeamCount; +	int             tremTeamIndex; +   +	tremMenuItem_t  tremAlienClassList[ 3 ]; +	int             tremAlienClassCount; +	int             tremAlienClassIndex; +   +	tremMenuItem_t  tremHumanItemList[ 2 ]; +	int             tremHumanItemCount; +	int             tremHumanItemIndex; +   +	tremMenuItem_t  tremHumanMCUBuyList[ 11 ]; +	int             tremHumanMCUBuyCount; +	int             tremHumanMCUBuyIndex; + +	tremMenuItem_t  tremHumanMCUSellList[ 11 ]; +	int             tremHumanMCUSellCount; +	int             tremHumanMCUSellIndex; + +	tremMenuItem_t  tremAlienUpgradeList[ 2 ]; +	int             tremAlienUpgradeCount; +	int             tremAlienUpgradeIndex; + +	tremMenuItem_t  tremAlienBuildList[ 6 ]; +	int             tremAlienBuildCount; +	int             tremAlienBuildIndex; + +	tremMenuItem_t  tremHumanBuildList[ 11 ]; +	int             tremHumanBuildCount; +	int             tremHumanBuildIndex; +//TA: tremulous menus +    	serverStatus_t serverStatus;  	// for the showing the status of a server diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index f2ee5ea0..cab77c78 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -2813,6 +2813,252 @@ static void UI_StartSinglePlayer() {  /*  =============== +UI_LoadTremTeams +=============== +*/ +static void UI_LoadTremTeams( ) +{ +  uiInfo.tremTeamCount = 3; +  uiInfo.tremTeamList[ 0 ].text = String_Alloc( "Aliens" ); +  uiInfo.tremTeamList[ 0 ].cmd = String_Alloc( "cmd team aliens" ); +   +  uiInfo.tremTeamList[ 1 ].text = String_Alloc( "Humans" ); +  uiInfo.tremTeamList[ 1 ].cmd = String_Alloc( "cmd team humans" ); +   +  uiInfo.tremTeamList[ 2 ].text = String_Alloc( "Spectate" ); +  uiInfo.tremTeamList[ 2 ].cmd = String_Alloc( "cmd team spectate" ); +} + +/* +=============== +UI_LoadTremAlienClasses +=============== +*/ +static void UI_LoadTremAlienClasses( ) +{ +  uiInfo.tremAlienClassCount = 3; +  uiInfo.tremAlienClassList[ 0 ].text = String_Alloc( "Builder" ); +  uiInfo.tremAlienClassList[ 0 ].cmd = String_Alloc( "cmd class builder" ); +   +  uiInfo.tremAlienClassList[ 1 ].text = String_Alloc( "Advanced Builder" ); +  uiInfo.tremAlienClassList[ 1 ].cmd = String_Alloc( "cmd class builderlevel1" ); +   +  uiInfo.tremAlienClassList[ 2 ].text = String_Alloc( "Offensive" ); +  uiInfo.tremAlienClassList[ 2 ].cmd = String_Alloc( "cmd class offensive" ); +} + +/* +=============== +UI_LoadTremHumanItems +=============== +*/ +static void UI_LoadTremHumanItems( ) +{ +  uiInfo.tremHumanItemCount = 2; +  uiInfo.tremHumanItemList[ 0 ].text = String_Alloc( "Rifle" ); +  uiInfo.tremHumanItemList[ 0 ].cmd = String_Alloc( "cmd class rifle" ); +   +  uiInfo.tremHumanItemList[ 1 ].text = String_Alloc( "Construction Kit" ); +  uiInfo.tremHumanItemList[ 1 ].cmd = String_Alloc( "cmd class ckit" ); +} + +/* +=============== +UI_LoadTremHumanMCUBuys +=============== +*/ +static void UI_LoadTremHumanMCUBuys( ) +{ +  uiInfo.tremHumanMCUBuyCount = 11; +  uiInfo.tremHumanMCUBuyList[ 0 ].text = String_Alloc( "Rifle" ); +  uiInfo.tremHumanMCUBuyList[ 0 ].cmd = String_Alloc( "cmd buy rifle" ); +   +  uiInfo.tremHumanMCUBuyList[ 1 ].text = String_Alloc( "Chaingun" ); +  uiInfo.tremHumanMCUBuyList[ 1 ].cmd = String_Alloc( "cmd buy chaingun" ); +   +  uiInfo.tremHumanMCUBuyList[ 2 ].text = String_Alloc( "Flamer" ); +  uiInfo.tremHumanMCUBuyList[ 2 ].cmd = String_Alloc( "cmd buy flamer" ); +   +  uiInfo.tremHumanMCUBuyList[ 3 ].text = String_Alloc( "Mass Driver" ); +  uiInfo.tremHumanMCUBuyList[ 3 ].cmd = String_Alloc( "cmd buy mdriver" ); +   +  uiInfo.tremHumanMCUBuyList[ 4 ].text = String_Alloc( "Pulse Rifle" ); +  uiInfo.tremHumanMCUBuyList[ 4 ].cmd = String_Alloc( "cmd buy prifle" ); +   +  uiInfo.tremHumanMCUBuyList[ 5 ].text = String_Alloc( "NVG" ); +  uiInfo.tremHumanMCUBuyList[ 5 ].cmd = String_Alloc( "cmd buy nvg" ); +   +  uiInfo.tremHumanMCUBuyList[ 6 ].text = String_Alloc( "Torch" ); +  uiInfo.tremHumanMCUBuyList[ 6 ].cmd = String_Alloc( "cmd buy torch" ); +   +  uiInfo.tremHumanMCUBuyList[ 7 ].text = String_Alloc( "Chest Armour" ); +  uiInfo.tremHumanMCUBuyList[ 7 ].cmd = String_Alloc( "cmd buy carmour" ); +   +  uiInfo.tremHumanMCUBuyList[ 8 ].text = String_Alloc( "Limb Armour" ); +  uiInfo.tremHumanMCUBuyList[ 8 ].cmd = String_Alloc( "cmd buy larmour" ); +   +  uiInfo.tremHumanMCUBuyList[ 9 ].text = String_Alloc( "Helmet" ); +  uiInfo.tremHumanMCUBuyList[ 9 ].cmd = String_Alloc( "cmd buy helmet" ); +   +  uiInfo.tremHumanMCUBuyList[ 10 ].text = String_Alloc( "Battlesuit" ); +  uiInfo.tremHumanMCUBuyList[ 10 ].cmd = String_Alloc( "cmd buy bsuit" ); +} + +/* +=============== +UI_LoadTremHumanMCUSells +=============== +*/ +static void UI_LoadTremHumanMCUSells( ) +{ +  int i, j = 0; +  char carriageCvar[ MAX_TOKEN_CHARS ]; +  char *iterator; +  char buffer[ MAX_TOKEN_CHARS ]; +  char *bufPointer; +   +  uiInfo.tremHumanMCUSellCount = 0; +  trap_Cvar_VariableStringBuffer( "ui_carriage", carriageCvar, sizeof( carriageCvar ) ); +  iterator = carriageCvar; + +  //simple parser to give rise to weapon/upgrade list +  while( iterator && iterator[ 0 ] != '$' ) +  { +    bufPointer = buffer; +     +    if( iterator[ 0 ] == 'W' ) +    { +      iterator++; + +      while( iterator[ 0 ] != ' ' ) +        *bufPointer++ = *iterator++; + +      *bufPointer++ = '\n'; + +      i = atoi( buffer ); +      uiInfo.tremHumanMCUSellList[ j ].text = String_Alloc( BG_FindHumanNameForWeapon( i ) ); +      uiInfo.tremHumanMCUSellList[ j++ ].cmd = +        String_Alloc( va( "cmd sell %s", BG_FindNameForWeapon( i ) ) ); + +      uiInfo.tremHumanMCUSellCount++; +    } +    else if( iterator[ 0 ] == 'U' ) +    { +      iterator++; + +      while( iterator[ 0 ] != ' ' ) +        *bufPointer++ = *iterator++; + +      *bufPointer++ = '\n'; + +      i = atoi( buffer ); +      uiInfo.tremHumanMCUSellList[ j ].text = String_Alloc( BG_FindHumanNameForUpgrade( i ) ); +      uiInfo.tremHumanMCUSellList[ j++ ].cmd = +        String_Alloc( va( "cmd sell %s", BG_FindNameForUpgrade( i ) ) ); + +      uiInfo.tremHumanMCUSellCount++; +    } + +    iterator++; +  } +} + +/* +=============== +UI_LoadTremAlienUpgrades( ) +=============== +*/ +static void UI_LoadTremAlienUpgrades( ) +{ +  int i, j = 0; +  int class = trap_Cvar_VariableValue( "ui_currentClass" ); +   +  uiInfo.tremAlienUpgradeCount = 0; +   +  for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) +  { +    if( BG_ClassCanEvolveFromTo( class, i ) ) +    { +      uiInfo.tremAlienUpgradeList[ j ].text = String_Alloc( BG_FindNameForClassNum( i ) ); +      uiInfo.tremAlienUpgradeList[ j++ ].cmd = +        String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( i ) ) ); + +      uiInfo.tremAlienUpgradeCount++; +    } +  } +} + +/* +=============== +UI_LoadTremAlienBuilds +=============== +*/ +static void UI_LoadTremAlienBuilds( ) +{ +  uiInfo.tremAlienBuildCount = 6; +  uiInfo.tremAlienBuildList[ 0 ].text = String_Alloc( "Egg" ); +  uiInfo.tremAlienBuildList[ 0 ].cmd = String_Alloc( "cmd build bioegg" ); +   +  uiInfo.tremAlienBuildList[ 1 ].text = String_Alloc( "Barricade" ); +  uiInfo.tremAlienBuildList[ 1 ].cmd = String_Alloc( "cmd build barricade" ); +   +  uiInfo.tremAlienBuildList[ 2 ].text = String_Alloc( "Acid Tube" ); +  uiInfo.tremAlienBuildList[ 2 ].cmd = String_Alloc( "cmd build acid_tube" ); +   +  uiInfo.tremAlienBuildList[ 3 ].text = String_Alloc( "Trapper" ); +  uiInfo.tremAlienBuildList[ 3 ].cmd = String_Alloc( "cmd build trapper" ); +   +  uiInfo.tremAlienBuildList[ 4 ].text = String_Alloc( "Hivemind" ); +  uiInfo.tremAlienBuildList[ 4 ].cmd = String_Alloc( "cmd build hivemind" ); +   +  uiInfo.tremAlienBuildList[ 5 ].text = String_Alloc( "Booster" ); +  uiInfo.tremAlienBuildList[ 5 ].cmd = String_Alloc( "cmd build booster" ); +} + +/* +=============== +UI_LoadTremHumanBuilds +=============== +*/ +static void UI_LoadTremHumanBuilds( ) +{ +  uiInfo.tremHumanBuildCount = 11; +  uiInfo.tremHumanBuildList[ 0 ].text = String_Alloc( "Replicator" ); +  uiInfo.tremHumanBuildList[ 0 ].cmd = String_Alloc( "cmd build replicator" ); +   +  uiInfo.tremHumanBuildList[ 1 ].text = String_Alloc( "M.C.U." ); +  uiInfo.tremHumanBuildList[ 1 ].cmd = String_Alloc( "cmd build mcu" ); +   +  uiInfo.tremHumanBuildList[ 2 ].text = String_Alloc( "Computer" ); +  uiInfo.tremHumanBuildList[ 2 ].cmd = String_Alloc( "cmd build computer" ); +   +  uiInfo.tremHumanBuildList[ 3 ].text = String_Alloc( "Medistation" ); +  uiInfo.tremHumanBuildList[ 3 ].cmd = String_Alloc( "cmd build medistat" ); +   +  uiInfo.tremHumanBuildList[ 4 ].text = String_Alloc( "Bank" ); +  uiInfo.tremHumanBuildList[ 4 ].cmd = String_Alloc( "cmd build bank" ); +   +  uiInfo.tremHumanBuildList[ 5 ].text = String_Alloc( "Machinegun Turret" ); +  uiInfo.tremHumanBuildList[ 5 ].cmd = String_Alloc( "cmd build mgturret" ); +   +  uiInfo.tremHumanBuildList[ 6 ].text = String_Alloc( "Plasma Turret" ); +  uiInfo.tremHumanBuildList[ 6 ].cmd = String_Alloc( "cmd build plasmaturret" ); +   +  uiInfo.tremHumanBuildList[ 7 ].text = String_Alloc( "Tesla Generator" ); +  uiInfo.tremHumanBuildList[ 7 ].cmd = String_Alloc( "cmd build tesla" ); +   +  uiInfo.tremHumanBuildList[ 8 ].text = String_Alloc( "Floatmine" ); +  uiInfo.tremHumanBuildList[ 8 ].cmd = String_Alloc( "cmd build floatmine" ); +   +  uiInfo.tremHumanBuildList[ 9 ].text = String_Alloc( "Reactor" ); +  uiInfo.tremHumanBuildList[ 9 ].cmd = String_Alloc( "cmd build reactor" ); +   +  uiInfo.tremHumanBuildList[ 10 ].text = String_Alloc( "Repeater" ); +  uiInfo.tremHumanBuildList[ 10 ].cmd = String_Alloc( "cmd build repeater" ); +} + +/* +===============  UI_LoadMods  ===============  */ @@ -3297,7 +3543,44 @@ static void UI_RunMenuScript(char **args) {  			UI_LoadMovies();  		} else if (Q_stricmp(name, "LoadMods") == 0) {  			UI_LoadMods(); -		} else if (Q_stricmp(name, "playMovie") == 0) { +		} +     +//TA: tremulous menus +    else if( Q_stricmp( name, "LoadTeams" ) == 0 ) +			UI_LoadTremTeams( ); +    else if( Q_stricmp( name, "JoinTeam" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremTeamList[ uiInfo.tremTeamIndex ].cmd ); +    else if( Q_stricmp( name, "LoadHumanItems" ) == 0 ) +			UI_LoadTremHumanItems( ); +    else if( Q_stricmp( name, "SpawnWithHumanItem" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremHumanItemList[ uiInfo.tremHumanItemIndex ].cmd ); +    else if( Q_stricmp( name, "LoadAlienClasses" ) == 0 ) +			UI_LoadTremAlienClasses( ); +    else if( Q_stricmp( name, "SpawnAsAlienClass" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremAlienClassList[ uiInfo.tremAlienClassIndex ].cmd ); +    else if( Q_stricmp( name, "LoadHumanMCUBuys" ) == 0 ) +			UI_LoadTremHumanMCUBuys( ); +    else if( Q_stricmp( name, "BuyFromMCU" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremHumanMCUBuyList[ uiInfo.tremHumanMCUBuyIndex ].cmd ); +    else if( Q_stricmp( name, "LoadHumanMCUSells" ) == 0 ) +			UI_LoadTremHumanMCUSells( ); +    else if( Q_stricmp( name, "SellToMCU" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremHumanMCUSellList[ uiInfo.tremHumanMCUSellIndex ].cmd ); +    else if( Q_stricmp( name, "LoadAlienUpgrades" ) == 0 ) +			UI_LoadTremAlienUpgrades( ); +    else if( Q_stricmp( name, "UpgradeToNewClass" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].cmd ); +    else if( Q_stricmp( name, "LoadAlienBuilds" ) == 0 ) +			UI_LoadTremAlienBuilds( ); +    else if( Q_stricmp( name, "BuildAlienBuildable" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremAlienBuildList[ uiInfo.tremAlienBuildIndex ].cmd ); +    else if( Q_stricmp( name, "LoadHumanBuilds" ) == 0 ) +			UI_LoadTremHumanBuilds( ); +    else if( Q_stricmp( name, "BuildHumanBuildable" ) == 0 ) +			trap_Cmd_ExecuteText( EXEC_APPEND, uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].cmd ); +//TA: tremulous menus +     +    else if (Q_stricmp(name, "playMovie") == 0) {  			if (uiInfo.previewMovie >= 0) {  			  trap_CIN_StopCinematic(uiInfo.previewMovie);  			} @@ -4218,6 +4501,26 @@ static int UI_FeederCount(float feederID) {  	} else if (feederID == FEEDER_DEMOS) {  		return uiInfo.demoCount;  	} + +//TA: tremulous menus +	else if( feederID == FEEDER_TREMTEAMS ) +		return uiInfo.tremTeamCount; +	else if( feederID == FEEDER_TREMHUMANITEMS ) +		return uiInfo.tremHumanItemCount; +	else if( feederID == FEEDER_TREMALIENCLASSES ) +		return uiInfo.tremAlienClassCount; +	else if( feederID == FEEDER_TREMHUMANMCUBUY ) +		return uiInfo.tremHumanMCUBuyCount; +	else if( feederID == FEEDER_TREMHUMANMCUSELL ) +		return uiInfo.tremHumanMCUSellCount; +	else if( feederID == FEEDER_TREMALIENUPGRADE ) +		return uiInfo.tremAlienUpgradeCount; +	else if( feederID == FEEDER_TREMALIENBUILD ) +		return uiInfo.tremAlienBuildCount; +	else if( feederID == FEEDER_TREMHUMANBUILD ) +		return uiInfo.tremHumanBuildCount; +//TA: tremulous menus +    	return 0;  } @@ -4383,6 +4686,50 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan  			return uiInfo.demoList[index];  		}  	} + +//TA: tremulous menus +  else if( feederID == FEEDER_TREMTEAMS ) +  { +    if( index >= 0 && index < uiInfo.tremTeamCount ) +      return uiInfo.tremTeamList[ index ].text; +  } +  else if( feederID == FEEDER_TREMHUMANITEMS ) +  { +    if( index >= 0 && index < uiInfo.tremHumanItemCount ) +      return uiInfo.tremHumanItemList[ index ].text; +  } +  else if( feederID == FEEDER_TREMALIENCLASSES ) +  { +    if( index >= 0 && index < uiInfo.tremAlienClassCount ) +      return uiInfo.tremAlienClassList[ index ].text; +  } +  else if( feederID == FEEDER_TREMHUMANMCUBUY ) +  { +    if( index >= 0 && index < uiInfo.tremHumanMCUBuyCount ) +      return uiInfo.tremHumanMCUBuyList[ index ].text; +  } +  else if( feederID == FEEDER_TREMHUMANMCUSELL ) +  { +    if( index >= 0 && index < uiInfo.tremHumanMCUSellCount ) +      return uiInfo.tremHumanMCUSellList[ index ].text; +  } +  else if( feederID == FEEDER_TREMALIENUPGRADE ) +  { +    if( index >= 0 && index < uiInfo.tremAlienUpgradeCount ) +      return uiInfo.tremAlienUpgradeList[ index ].text; +  } +  else if( feederID == FEEDER_TREMALIENBUILD ) +  { +    if( index >= 0 && index < uiInfo.tremAlienBuildCount ) +      return uiInfo.tremAlienBuildList[ index ].text; +  } +  else if( feederID == FEEDER_TREMHUMANBUILD ) +  { +    if( index >= 0 && index < uiInfo.tremHumanBuildCount ) +      return uiInfo.tremHumanBuildList[ index ].text; +  } +//TA: tremulous menus +    	return "";  } @@ -4496,6 +4843,25 @@ static void UI_FeederSelection(float feederID, int index) {    } else if (feederID == FEEDER_DEMOS) {  		uiInfo.demoIndex = index;  	} + +//TA: tremulous menus +  else if( feederID == FEEDER_TREMTEAMS ) +		uiInfo.tremTeamIndex = index; +  else if( feederID == FEEDER_TREMHUMANITEMS ) +		uiInfo.tremHumanItemIndex = index; +  else if( feederID == FEEDER_TREMALIENCLASSES ) +		uiInfo.tremAlienClassIndex = index; +  else if( feederID == FEEDER_TREMHUMANMCUBUY ) +		uiInfo.tremHumanMCUBuyIndex = index; +  else if( feederID == FEEDER_TREMHUMANMCUSELL ) +		uiInfo.tremHumanMCUSellIndex = index; +  else if( feederID == FEEDER_TREMALIENUPGRADE ) +		uiInfo.tremAlienUpgradeIndex = index; +  else if( feederID == FEEDER_TREMALIENBUILD ) +		uiInfo.tremAlienBuildIndex = index; +  else if( feederID == FEEDER_TREMHUMANBUILD ) +		uiInfo.tremHumanBuildIndex = index; +//TA: tremulous menus  }  static qboolean Team_Parse(char **p) {  | 
