@@ -179,6 +179,14 @@ ubyte net_unkn_func_32(void)
179179 return ret ;
180180}
181181
182+ ubyte net_unkn_func_31 (struct TbNetworkSession * p_nsession )
183+ {
184+ ubyte ret ;
185+ asm volatile ("call ASM_net_unkn_func_31\n"
186+ : "=r" (ret ) : "a" (p_nsession ));
187+ return ret ;
188+ }
189+
182190ubyte do_net_INITIATE (ubyte click )
183191{
184192#if 0
@@ -232,10 +240,52 @@ ubyte do_net_INITIATE(ubyte click)
232240
233241ubyte do_net_groups_LOGON (ubyte click )
234242{
243+ #if 0
235244 ubyte ret ;
236245 asm volatile ("call ASM_do_net_groups_LOGON\n"
237246 : "=r" (ret ) : "a" (click ));
238247 return ret ;
248+ #endif
249+ const char * text ;
250+ int plyr ;
251+
252+ if (nsvc .I .Type == NetSvc_IPX && !byte_1C4A7C ) {
253+ LOGWARN ("Cannot abort protocol %d - not ready" , (int )nsvc .I .Type );
254+ return 0 ;
255+ }
256+ if (login_control__State == 5 )
257+ {
258+ plyr = LbNetworkPlayerNumber ();
259+ network_players [plyr ].Type = 13 ;
260+ byte_15516D = -1 ;
261+ net_INITIATE_button .Text = gui_strings [385 ];
262+ byte_15516C = -1 ;
263+ net_groups_LOGON_button .Text = gui_strings [386 ];
264+ net_unkn_func_33 ();
265+ }
266+ else if (login_control__State == 6 )
267+ {
268+ if (byte_15516C != -1 || nsvc .I .Type != NetSvc_IPX )
269+ {
270+ if (net_unkn_func_31 (& unkstruct04_arr [byte_15516C ].Session ))
271+ {
272+ net_INITIATE_button .Text = gui_strings [387 ];
273+ if (byte_1C4A6F )
274+ text = gui_strings [520 ];
275+ else
276+ text = gui_strings [388 ];
277+ net_groups_LOGON_button .Text = text ;
278+ init_variables ();
279+ init_agents ();
280+ srm_reset_research ();
281+ login_control__State = 5 ;
282+ for (plyr = 0 ; plyr < 8 ; plyr ++ ) {
283+ players [plyr ].MissionAgents = 15 ;
284+ }
285+ }
286+ }
287+ }
288+ return 1 ;
239289}
240290
241291TbBool mouse_down_over_unkn1 (short x , short y , short width , short height )
0 commit comments