@@ -79,8 +79,10 @@ extern ubyte byte_1C47EA;
7979extern ubyte byte_1C4805 ;
8080extern ubyte byte_1C4806 ;
8181extern ubyte byte_1C4994 ;
82+ extern ubyte byte_1C4995 ;
8283extern ubyte byte_155170 [4 ];
8384extern char net_unkn1_text [25 ];
85+ extern char byte_1811E2 [16 ];
8486
8587ubyte ac_do_net_protocol_option (ubyte click );
8688ubyte ac_do_net_unkn40 (ubyte click );
@@ -1431,20 +1433,22 @@ ubyte show_net_protocol_box(struct ScreenBox *p_box)
14311433 byte_1C4806 = 0 ;
14321434 addr = 0 ;
14331435 sscanf (net_proto_param_text , "%04x" , & addr );
1436+ nsvc .I .Param = addr ;
14341437 LbNetworkSetupIPXAddress (addr );
14351438 net_service_unkstruct04_clear ();
14361439
1437- if (LbNetworkServiceStart (& nsvc .I ) == Lb_SUCCESS )
1438- {
1439- byte_1C4A7C = 1 ;
1440- }
1441- else
1440+ if (LbNetworkServiceStart (& nsvc .I ) != Lb_SUCCESS )
14421441 {
1442+ LOGERR ("Failed on LbNetworkServiceStart" );
14431443 alert_box_text_fmt ("%s" , gui_strings [568 ]);
14441444 net_protocol_option_button .Text = net_baudrate_text ;
14451445 net_protocol_option_button .CallBackFn = ac_do_serial_speed_switch ;
14461446 net_protocol_select_button .Text = gui_strings [499 ];
1447- nsvc .I .Type = 2 ;
1447+ nsvc .I .Type = NetSvc_COM1 ;
1448+ }
1449+ else
1450+ {
1451+ byte_1C4A7C = 1 ;
14481452 }
14491453 }
14501454 }
@@ -1806,6 +1810,37 @@ ubyte show_net_groups_box(struct ScreenBox *p_box)
18061810 return 0 ;
18071811}
18081812
1813+ int refresh_users_in_net_game (void )
1814+ {
1815+ char locstr [16 ];
1816+ int n ;
1817+ short plyr ;
1818+
1819+ n = 0 ;
1820+ ingame .InNetGame_UNSURE = (1 << 8 ) - 1 ;
1821+ for (plyr = 0 ; plyr < 8 ; plyr ++ )
1822+ {
1823+ TbResult ret ;
1824+ ret = LbNetworkPlayerName (locstr , plyr );
1825+ if (ret != Lb_SUCCESS )
1826+ {
1827+ unkn2_names [plyr ][0 ] = '\0' ;
1828+ ingame .InNetGame_UNSURE &= ~(1 << plyr );
1829+ continue ;
1830+ }
1831+ if (locstr [0 ] == '\0' )
1832+ {
1833+ unkn2_names [plyr ][0 ] = '\0' ;
1834+ ingame .InNetGame_UNSURE &= ~(1 << plyr );
1835+ continue ;
1836+ }
1837+ strncpy (unkn2_names [plyr ], locstr , sizeof (unkn2_names [0 ]));
1838+ n ++ ;
1839+ }
1840+ LOGSYNC ("Net players %d" , n );
1841+ return n ;
1842+ }
1843+
18091844ubyte show_net_users_box (struct ScreenBox * p_box )
18101845{
18111846#if 0
@@ -1816,7 +1851,6 @@ ubyte show_net_users_box(struct ScreenBox *p_box)
18161851#endif
18171852 const char * text ;
18181853 struct TbNetworkPlayer * p_netplyr ;
1819- char locstr [16 ];
18201854 short plyr ;
18211855 short scr_x , scr_y ;
18221856 short tx_width , tx_height ;
@@ -1853,21 +1887,13 @@ ubyte show_net_users_box(struct ScreenBox *p_box)
18531887 scr_y = 18 ;
18541888 if (login_control__State == 5 )
18551889 {
1856- ingame .InNetGame_UNSURE = -1 ;
1890+ refresh_users_in_net_game ();
1891+
18571892 for (plyr = 0 ; plyr < 8 ; plyr ++ )
18581893 {
1859- TbResult ret ;
1860- ret = LbNetworkPlayerName (locstr , plyr );
1861- if (ret != Lb_SUCCESS )
1894+ text = unkn2_names [plyr ];
1895+ if (text [0 ] == '\0' )
18621896 {
1863- ingame .InNetGame_UNSURE &= ~(1 << plyr );
1864- unkn2_names [plyr ][0 ] = '\0' ;
1865- continue ;
1866- }
1867- if (strlen (locstr ) == 0 )
1868- {
1869- unkn2_names [plyr ][0 ] = '\0' ;
1870- ingame .InNetGame_UNSURE &= ~(1 << plyr );
18711897 continue ;
18721898 }
18731899 if (byte_15516D == plyr )
@@ -1879,12 +1905,11 @@ ubyte show_net_users_box(struct ScreenBox *p_box)
18791905 {
18801906 lbDisplay .DrawFlags = 0 ;
18811907 }
1882- strncpy (unkn2_names [plyr ], locstr , sizeof (unkn2_names [0 ]));
1883- tx_width = my_string_width (locstr );
1908+ tx_width = my_string_width (text );
18841909 scr_x = (110 - tx_width ) >> 1 ;
18851910 if (is_unkn_current_player ())
18861911 lbDisplay .DrawFlags |= 0x8000 ;
1887- text = loctext_to_gtext (locstr );
1912+ text = loctext_to_gtext (text );
18881913 draw_text_purple_list2 (scr_x , scr_y + 3 , text , 0 );
18891914 lbDisplay .DrawFlags &= ~0x8000 ;
18901915
@@ -1924,12 +1949,11 @@ ubyte show_net_users_box(struct ScreenBox *p_box)
19241949 {
19251950 const char * name ;
19261951 name = p_netplyr [plyr ].Name ;
1927- if (strlen ( name ) )
1952+ if (name [ 0 ] != '\0' )
19281953 {
1929- snprintf (locstr , sizeof (locstr ), "%s" , name );
1930- tx_width = my_string_width (locstr );
1954+ tx_width = my_string_width (name );
19311955 scr_x = (110 - tx_width ) >> 1 ;
1932- text = loctext_to_gtext (locstr );
1956+ text = loctext_to_gtext (name );
19331957 draw_text_purple_list2 (scr_x , scr_y + 3 , text , 0 );
19341958 scr_y += tx_height + 9 ;
19351959 }
@@ -1938,6 +1962,14 @@ ubyte show_net_users_box(struct ScreenBox *p_box)
19381962 return 0 ;
19391963}
19401964
1965+ int net_unkn_func_30 (void )
1966+ {
1967+ int ret ;
1968+ asm volatile ("call ASM_net_unkn_func_30\n"
1969+ : "=r" (ret ) : );
1970+ return ret ;
1971+ }
1972+
19411973ubyte do_unkn8_EJECT (ubyte click )
19421974{
19431975#if 0
0 commit comments