Collaboration diagram for Team Selection Menu Item:
|
Files | |
| file | teamsel.c |
| Implementation of the team selection menu item. | |
| file | teamsel.h |
| Defines an interface to the team selection menu item. | |
Defines | |
| #define | MIDDLE_MARGIN 64 |
| The space, in pixels, between the two team columns. | |
Functions | |
| void | TeamSelInit (MenuItem *item) |
| Sets up the team selection menu item for use. | |
| int | TeamSelInput (MenuItem *item, Uint8 *ec, rtsa_char keyval) |
| Allows the player to chose a team using left, right, and fire inputs. | |
| void | TeamSelUninit (MenuItem *item) |
| Cleans up what the team selection menu setup. | |
| int | TeamSelUpdate (MenuItem *item) |
| Updates the team selection item with new information and places its render items in the appropriate spots. | |
The code expects only one team selction item to exist at any given time.
| #define MIDDLE_MARGIN 64 |
The space, in pixels, between the two team columns.
Definition at line 38 of file teamsel.c.
Referenced by TeamSelUpdate().
| void TeamSelInit | ( | MenuItem * | item | ) |
Sets up the team selection menu item for use.
Configures player data for the display of two tanks.
Definition at line 40 of file teamsel.c.
References MenuItem_t::active, AddRenderItem(), COLOR_BLUE, COLOR_RED, COLOR_REGBACK, ColorBlend(), colorFmtInd, colorVals, MenuSettings_t::deselColor, dInfo, DrawTank(), MenuItem_t::expandHeight, MenuItem_t::input, LAYER_TANKS, DisplayInfo_t::lh, RenderItem_t::loc, DisplayInfo_t::luh, DisplayInfo_t::luw, DisplayInfo_t::lw, menuSettings, MenuItem_t::minHeight, MenuItem_t::minWidth, DisplayInfo_t::ph, DisplayInfo_t::pw, RenderItem_t::renderer, Player_t::rot, MenuSettings_t::selColor, Player_t::tank, MenuSettings_t::team, Player_t::team, TEAM_BLUE, TEAM_RED, MenuSettings_t::teams, TeamSelInput(), TeamSelUpdate(), TRUE, and MenuItem_t::update.
Referenced by MenuRootInit().
Here is the call graph for this function:

Allows the player to chose a team using left, right, and fire inputs.
The selected team is stored in players[0].team.
Definition at line 167 of file teamsel.c.
References COLOR_BLUE, COLOR_RED, colorVals, MenuSettings_t::deselColor, EC_FIRE, EC_ROTLEFT, EC_ROTRIGHT, menuSettings, NETSTATE_CLIENT, NETSTATE_SERVER, networkState, PlaceRenderItem(), MenuSettings_t::selColor, STATE_PLAY, Player_t::tank, MenuSettings_t::team, TEAM_BLUE, TEAM_RED, and MenuSettings_t::teams.
Referenced by TeamSelInit().
Here is the call graph for this function:

| void TeamSelUninit | ( | MenuItem * | item | ) |
Cleans up what the team selection menu setup.
Definition at line 77 of file teamsel.c.
References ClearRenderItem(), COLOR_BLUE, COLOR_RED, colorVals, RenderItem_t::enableDraw, Player_t::flags, Player_t::labelName, MAX_PLAYERS, menuSettings, PLAYER_ACTIVE, players, RemoveRenderItem(), MenuSettings_t::selColor, Player_t::tank, TEAM_BLUE, TEAM_RED, and MenuSettings_t::teams.
Referenced by MenuRootUninit().
Here is the call graph for this function:

| int TeamSelUpdate | ( | MenuItem * | item | ) |
Updates the team selection item with new information and places its render items in the appropriate spots.
Definition at line 94 of file teamsel.c.
References ClearRenderItem(), RenderItem_t::enableDraw, Player_t::flags, MenuItem_t::isPlaced, Player_t::labelName, RenderItem_t::loc, MAX_PLAYERS, menuSettings, MIDDLE_MARGIN, PlaceRenderItem(), PLAYER_ACTIVE, players, MenuItem_t::region, Player_t::tank, Player_t::team, TEAM_MAX, TEAM_RED, MenuSettings_t::teams, TEXTITEM_CHOSETEAM, textItems, and TRUE.
Referenced by TeamSelInit().
Here is the call graph for this function:

1.5.2