Rev 1 | Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 11 | ||
---|---|---|---|
Line 493... | Line 493... | ||
493 | LOG_TRACE("(%d, %d)", pStr_index, pX); |
493 | LOG_TRACE("(%d, %d)", pStr_index, pX); |
494 | 494 | ||
495 | TransDRPixelmapText(gBack_screen, |
495 | TransDRPixelmapText(gBack_screen, |
496 | pX, |
496 | pX, |
497 | gCurrent_graf_data->joinable_games_y - gCurrent_graf_data->joinable_games_y_pitch, |
497 | gCurrent_graf_data->joinable_games_y - gCurrent_graf_data->joinable_games_y_pitch, |
498 | &gFonts[ |
498 | &gFonts[kFont_GRYLIT], |
499 | GetMiscString(pStr_index), |
499 | GetMiscString(pStr_index), |
500 | pX + DRTextWidth(&gFonts[ |
500 | pX + DRTextWidth(&gFonts[kFont_GRYLIT], GetMiscString(pStr_index))); |
501 | } |
501 | } |
502 | 502 | ||
503 | // IDA: void __usercall DrawGames(int pCurrent_choice@<EAX>, int pCurrent_mode@<EDX>) |
503 | // IDA: void __usercall DrawGames(int pCurrent_choice@<EAX>, int pCurrent_mode@<EDX>) |
504 | void DrawGames(int pCurrent_choice, int pCurrent_mode) { |
504 | void DrawGames(int pCurrent_choice, int pCurrent_mode) { |
505 | int i; |
505 | int i; |
Line 527... | Line 527... | ||
527 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_GAME_TYPE, gCurrent_graf_data->joinable_games_x_2); |
527 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_GAME_TYPE, gCurrent_graf_data->joinable_games_x_2); |
528 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_PLAYERS, gCurrent_graf_data->joinable_games_x_3); |
528 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_PLAYERS, gCurrent_graf_data->joinable_games_x_3); |
529 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_STATUS, gCurrent_graf_data->joinable_games_x_4); |
529 | DrawColumnHeading__newgame(kMiscString_NetworkGamesTableHeading_STATUS, gCurrent_graf_data->joinable_games_x_4); |
530 | BrPixelmapLine(gBack_screen, |
530 | BrPixelmapLine(gBack_screen, |
531 | gCurrent_graf_data->joinable_games_sel_left, |
531 | gCurrent_graf_data->joinable_games_sel_left, |
532 | gCurrent_graf_data->joinable_games_y + gFonts[ |
532 | gCurrent_graf_data->joinable_games_y + gFonts[kFont_GRYLIT].height + 1 - (TranslationMode() ? 2 : 0) - gCurrent_graf_data->joinable_games_y_pitch, |
533 | gCurrent_graf_data->joinable_games_sel_right - 1, |
533 | gCurrent_graf_data->joinable_games_sel_right - 1, |
534 | gCurrent_graf_data->joinable_games_y + gFonts[ |
534 | gCurrent_graf_data->joinable_games_y + gFonts[kFont_GRYLIT].height + 1 - (TranslationMode() ? 2 : 0) - gCurrent_graf_data->joinable_games_y_pitch, |
535 | 6); |
535 | 6); |
536 | for (i = 0; i < COUNT_OF(gGames_to_join); i++) { |
536 | for (i = 0; i < COUNT_OF(gGames_to_join); i++) { |
537 | if (gGames_to_join[i].game == NULL) { |
537 | if (gGames_to_join[i].game == NULL) { |
538 | continue; |
538 | continue; |
539 | } |
539 | } |
Line 786... | Line 786... | ||
786 | }; |
786 | }; |
787 | int result; |
787 | int result; |
788 | LOG_TRACE("(%p)", pGame_to_join); |
788 | LOG_TRACE("(%p)", pGame_to_join); |
789 | 789 | ||
790 | gCurrent_game_selection = 0; |
790 | gCurrent_game_selection = 0; |
791 | LoadFont( |
791 | LoadFont(kFont_GRNDK); |
792 | LoadFont( |
792 | LoadFont(kFont_GRNLIT); |
793 | LoadFont( |
793 | LoadFont(kFont_GREENHED); |
794 | LoadFont( |
794 | LoadFont(kFont_GRYLIT); |
795 | SetAlwaysTyping(); |
795 | SetAlwaysTyping(); |
796 | InitGamesToJoin(); |
796 | InitGamesToJoin(); |
797 | NetStartProducingJoinList(AddToJoinList); |
797 | NetStartProducingJoinList(AddToJoinList); |
798 | result = DoInterfaceScreen(&interface_spec, 0, 0); |
798 | result = DoInterfaceScreen(&interface_spec, 0, 0); |
799 | ClearAlwaysTyping(); |
799 | ClearAlwaysTyping(); |
800 | NetEndJoinList(); |
800 | NetEndJoinList(); |
801 | DisposeJoinList(gLast_graph_sel__newgame); |
801 | DisposeJoinList(gLast_graph_sel__newgame); |
802 | DisposeFont( |
802 | DisposeFont(kFont_GRNDK); // Pierre-Marie Baty -- replaced font number with symbol |
803 | DisposeFont( |
803 | DisposeFont(kFont_GRNLIT); // Pierre-Marie Baty -- replaced font number with symbol |
804 | DisposeFont( |
804 | DisposeFont(kFont_GREENHED); // Pierre-Marie Baty -- replaced font number with symbol |
805 | DisposeFont( |
805 | DisposeFont(kFont_GRYLIT); // Pierre-Marie Baty -- replaced font number with symbol |
806 | strcpy(gProgram_state.player_name[0], gNet_player_name); |
806 | strcpy(gProgram_state.player_name[0], gNet_player_name); |
807 | SaveOptions(); |
807 | SaveOptions(); |
808 | switch (result) { |
808 | switch (result) { |
809 | case 0: |
809 | case 0: |
810 | return eJoin_or_host_host; |
810 | return eJoin_or_host_host; |
Line 1256... | Line 1256... | ||
1256 | }; |
1256 | }; |
1257 | LOG_TRACE("(%p)", pGame_options); |
1257 | LOG_TRACE("(%p)", pGame_options); |
1258 | 1258 | ||
1259 | gThe_interface_spec__newgame = &interface_spec; |
1259 | gThe_interface_spec__newgame = &interface_spec; |
1260 | gRadio_selected = -1; |
1260 | gRadio_selected = -1; |
1261 | LoadFont( |
1261 | LoadFont(kFont_GRYLIT); |
1262 | SetNetOptions(pGame_options); |
1262 | SetNetOptions(pGame_options); |
1263 | if (DoInterfaceScreen(&interface_spec, 0, 0) == 0) { |
1263 | if (DoInterfaceScreen(&interface_spec, 0, 0) == 0) { |
1264 | GetNetOptions(pGame_options); |
1264 | GetNetOptions(pGame_options); |
1265 | } |
1265 | } |
1266 | DisposeFont( |
1266 | DisposeFont(kFont_GRYLIT); // Pierre-Marie Baty -- replaced font number with symbol |
1267 | } |
1267 | } |
1268 | 1268 | ||
1269 | // IDA: void __usercall PlayRadioOn(int pIndex@<EAX>) |
1269 | // IDA: void __usercall PlayRadioOn(int pIndex@<EAX>) |
1270 | // Suffix added to avoid duplicate symbol |
1270 | // Suffix added to avoid duplicate symbol |
1271 | void PlayRadioOn__newgame(int pIndex) { |
1271 | void PlayRadioOn__newgame(int pIndex) { |
Line 1389... | Line 1389... | ||
1389 | } |
1389 | } |
1390 | BrPixelmapRectangleFill(gBack_screen, |
1390 | BrPixelmapRectangleFill(gBack_screen, |
1391 | gCurrent_graf_data->net_descr_race_l, |
1391 | gCurrent_graf_data->net_descr_race_l, |
1392 | gCurrent_graf_data->net_choose_race_y, |
1392 | gCurrent_graf_data->net_choose_race_y, |
1393 | gCurrent_graf_data->net_descr_race_r - gCurrent_graf_data->net_descr_race_l, |
1393 | gCurrent_graf_data->net_descr_race_r - gCurrent_graf_data->net_descr_race_l, |
1394 | gFonts[ |
1394 | gFonts[kFont_GRNLIT].height + 1 - (TranslationMode() ? 2 : 0), 0); |
1395 | sprintf(s, "%s %s", GetMiscString(kMiscString_FIRST_RACE), gRace_list[gRace_index].name); |
1395 | sprintf(s, "%s %s", GetMiscString(kMiscString_FIRST_RACE), gRace_list[gRace_index].name); |
1396 | DRPixelmapCentredText(gBack_screen, |
1396 | DRPixelmapCentredText(gBack_screen, |
1397 | gCurrent_graf_data->net_choose_race_x, |
1397 | gCurrent_graf_data->net_choose_race_x, |
1398 | gCurrent_graf_data->net_choose_race_y, |
1398 | gCurrent_graf_data->net_choose_race_y, |
1399 | &gFonts[ |
1399 | &gFonts[kFont_GRNLIT], s); |
1400 | BrPixelmapRectangleFill(gBack_screen, |
1400 | BrPixelmapRectangleFill(gBack_screen, |
1401 | gCurrent_graf_data->net_descr_race_l, |
1401 | gCurrent_graf_data->net_descr_race_l, |
1402 | gCurrent_graf_data->net_descr_race_top - (TranslationMode() ? 2 : 0), |
1402 | gCurrent_graf_data->net_descr_race_top - (TranslationMode() ? 2 : 0), |
1403 | gCurrent_graf_data->net_descr_race_r - gCurrent_graf_data->net_descr_race_l, |
1403 | gCurrent_graf_data->net_descr_race_r - gCurrent_graf_data->net_descr_race_l, |
1404 | gCurrent_graf_data->net_descr_race_bot - gCurrent_graf_data->net_descr_race_top, |
1404 | gCurrent_graf_data->net_descr_race_bot - gCurrent_graf_data->net_descr_race_top, |
Line 1524... | Line 1524... | ||
1524 | LOG_TRACE("(%p, %p, %p)", pGame_type, pGame_options, pRace_index); |
1524 | LOG_TRACE("(%p, %p, %p)", pGame_type, pGame_options, pRace_index); |
1525 | 1525 | ||
1526 | gRace_index = *pRace_index; |
1526 | gRace_index = *pRace_index; |
1527 | gLast_game_type = *pGame_type; |
1527 | gLast_game_type = *pGame_type; |
1528 | do { |
1528 | do { |
1529 | LoadFont( |
1529 | LoadFont(kFont_GRNLIT); |
1530 | LoadFont( |
1530 | LoadFont(kFont_GRNDK); |
1531 | gThe_interface_spec__newgame = &interface_spec; |
1531 | gThe_interface_spec__newgame = &interface_spec; |
1532 | gLast_net_choose_box = -1; |
1532 | gLast_net_choose_box = -1; |
1533 | gOptions = pGame_options; |
1533 | gOptions = pGame_options; |
1534 | gNet_race_sequence__newgame = pGame_options->race_sequence_type; |
1534 | gNet_race_sequence__newgame = pGame_options->race_sequence_type; |
1535 | result = DoInterfaceScreen(&interface_spec, 0, 0); |
1535 | result = DoInterfaceScreen(&interface_spec, 0, 0); |
1536 | if (result || !pGame_options->random_car_choice) { |
1536 | if (result || !pGame_options->random_car_choice) { |
1537 | RunFlic(123); |
1537 | RunFlic(123); |
1538 | } else { |
1538 | } else { |
1539 | FadePaletteDown(); |
1539 | FadePaletteDown(); |
1540 | } |
1540 | } |
1541 | DisposeFont( |
1541 | DisposeFont(kFont_GRNDK); // Pierre-Marie Baty -- replaced font number with symbol |
1542 | DisposeFont( |
1542 | DisposeFont(kFont_GRNLIT); // Pierre-Marie Baty -- replaced font number with symbol |
1543 | switch (result) { |
1543 | switch (result) { |
1544 | case 0: |
1544 | case 0: |
1545 | *pGame_type = gLast_game_type; |
1545 | *pGame_type = gLast_game_type; |
1546 | *pRace_index = gRace_index; |
1546 | *pRace_index = gRace_index; |
1547 | break; |
1547 | break; |