00001 #include "white_interface.h"
00002
00036 int strcmp(const char *str1, const char *str2);
00037
00045 char * strcpy (char *to, const char *from);
00046
00052 char player_name_array[20][20];
00053
00060 char player_count = 0;
00061
00062
00067
00068 void poin_entry_Init()
00069 {
00070 }
00071
00072
00077
00078 void poin_entry_Run()
00079 {
00080 int other_player;
00081 lobby_message request_play;
00082 lobby_message message_in;
00083
00084
00085
00086
00087
00088 if (players_in_Enabled())
00089 {
00090 player_count++;
00091 strcpy(player_name_array[player_count], players_in_Value());
00092 }
00093
00094
00095
00096
00097
00098 if (line_in_Enabled())
00099 {
00100 other_player = line_in_Value();
00101 if (other_player <= player_count)
00102 {
00103
00104
00105 request_play.player_name = MyName_Value();
00106 request_play.message = player_name_array[other_player];
00107 net_out_Post(&request_play);
00108
00109
00110
00111
00112 player_no_out_Post(0);
00113
00114
00115
00116
00117 trigger_out_Post(1);
00118
00119
00120
00121 clear_out_Post(1);
00122 }
00123 }
00124
00125
00126
00127
00128
00129 if (net_in_Enabled())
00130 {
00131 message_in = *net_in_Value();
00132
00133 if (strcmp(message_in.message, "name") != 0)
00134 {
00135 if (strcmp(message_in.message, MyName_Value()) == 0)
00136 {
00137
00138
00139
00140
00141
00142 player_no_out_Post(1);
00143 }
00144 else
00145 {
00146
00147
00148
00149
00150
00151
00152 player_no_out_Post(2);
00153 }
00154
00155
00156
00157
00158 trigger_out_Post(1);
00159
00160
00161
00162 clear_out_Post(1);
00163 }
00164 }
00165 }