|
Main Page Data Structures File List Globals
get_other_players.c File ReferenceFinds the other players on the wireless network.
More...
#include "white_interface.h"
Go to the source code of this file.
Detailed Description
Finds the other players on the wireless network.
get_other_players sends the name of the local user to the other game machines so that they can build up a list of opponents to display in their lobby.
It then receives the names of the other players (sent from the other lobby modules) and sends them to the start_game block. Also, the names are sent to the graphics module as PrintString messages so that they are listed on the lobby screen.
Definition in file get_other_players.c.
Function Documentation
|
VCC Init function.
This function runs when the VCC simulation is first started.
Definition at line 85 of file get_other_players.c.
00086 {
00087 lobby_message my_name;
00088 PrintString title;
00089
00090
00091
00092 title.text = "Stratego Lobby";
00093 title.x = 1;
00094 title.y = 9;
00095 print_out_Post(&title);
00096
00097
00098
00099
00100 my_name.player_name = PlayerName_Value();
00101 my_name.message = "name";
00102
00103
00104
00105
00106 net_out_Post(&my_name);
00107 }
|
int strcmp |
( |
const char * |
str1, |
|
|
const char * |
str2 |
|
) |
|
|
|
C standard library function.
Compares two strings. -
Parameters:
-
str1 |
A pointer to the first string. |
str2 |
A pointer to the second string. |
-
Returns:
-
An integer (0 if the string are equal).
|
char* strcpy |
( |
char * |
to, |
|
|
const char * |
from |
|
) |
|
|
|
C standard library function.
Copies one string to another. -
Parameters:
-
to |
A pointer to the destination string. |
from |
A pointer to the source string. |
-
Returns:
-
A pointer to the string.
|
Variable Documentation
|
The number of other players on the network.
This stores the number of player name messages that have been received and should be equal to the number of other players on the wireless network.
Definition at line 48 of file get_other_players.c.
Referenced by poin_entry_Run. |
char player_name_array[20][20]
|
|
|
An array of player names.
This stores the names of the other players on the network as an array of strings.
Definition at line 40 of file get_other_players.c.
Referenced by poin_entry_Run. |
|
|