00001 #include "white_interface.h"
00002
00024 char * strcpy (char *to, const char *from);
00025
00033 int strcmp(const char *str1, const char *str2);
00034
00040 char player_name_array[20][20];
00041
00048 char player_count = 0;
00049
00050
00084
00085 void poin_entry_Init()
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 }
00108
00109
00114
00115 void poin_entry_Run()
00116 {
00117 PrintString graphics_out;
00118 lobby_message other_player;
00119
00120 if (net_in_Enabled())
00121 {
00122
00123
00124
00125
00126 other_player = *net_in_Value();
00127 if (strcmp(other_player.message, "name") == 0)
00128 {
00129 player_count++;
00130 strcpy(player_name_array[player_count], other_player.player_name);
00131
00132
00133
00134 players_out_Post(player_name_array[player_count]);
00135
00136
00137
00138
00139 graphics_out.text = player_name_array[player_count];
00140 graphics_out.x = 1;
00141 graphics_out.y = 8 - (player_count);
00142
00143 print_out_Post(&graphics_out);
00144 }
00145 }
00146 }