Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 20 | Rev 21 | ||
|---|---|---|---|
| Line 312... | Line 312... | ||
| 312 | static int flash_state; |
312 | static int flash_state; |
| 313 | LOG_TRACE("(%d)", pCredits); |
313 | LOG_TRACE("(%d)", pCredits); |
| 314 | 314 | ||
| 315 | if (gNot_shown_race_type_headup) { |
315 | if (gNot_shown_race_type_headup) { |
| 316 | gNot_shown_race_type_headup = 0; |
316 | gNot_shown_race_type_headup = 0; |
| 317 | NewTextHeadupSlot( |
317 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NetworkGameTypeNames_START + gCurrent_net_game->type)); |
| 318 | } |
318 | } |
| 319 | if (gTime_for_punishment && gTime_for_punishment <= (tU32) PDGetTotalTime()) { // Pierre-Marie Baty -- added type cast |
319 | if (gTime_for_punishment && gTime_for_punishment <= (tU32) PDGetTotalTime()) { // Pierre-Marie Baty -- added type cast |
| 320 | gTime_for_punishment = 0; |
320 | gTime_for_punishment = 0; |
| 321 | switch (gCurrent_net_game->type) { |
321 | switch (gCurrent_net_game->type) { |
| 322 | case eNet_game_type_carnage: |
322 | case eNet_game_type_carnage: |
| 323 | NewTextHeadupSlot( |
323 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_KILL_COUNT)); |
| 324 | break; |
324 | break; |
| 325 | case eNet_game_type_checkpoint: |
325 | case eNet_game_type_checkpoint: |
| 326 | NewTextHeadupSlot( |
326 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_LOST_YOU_A_CHECKPOINT)); |
| 327 | break; |
327 | break; |
| 328 | case eNet_game_type_sudden_death: |
328 | case eNet_game_type_sudden_death: |
| 329 | NewTextHeadupSlot( |
329 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_BACK_TO_THE_START)); |
| 330 | break; |
330 | break; |
| 331 | case eNet_game_type_foxy: |
331 | case eNet_game_type_foxy: |
| 332 | NewTextHeadupSlot( |
332 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_TIME)); |
| 333 | break; |
333 | break; |
| 334 | default: |
334 | default: |
| 335 | break; |
335 | break; |
| 336 | } |
336 | } |
| 337 | } |
337 | } |
| Line 604... | Line 604... | ||
| 604 | char s[256]; |
604 | char s[256]; |
| 605 | char s2[256]; |
605 | char s2[256]; |
| 606 | LOG_TRACE("(%d)", pIndex); |
606 | LOG_TRACE("(%d)", pIndex); |
| 607 | 607 | ||
| 608 | if (gNet_mode == eNet_mode_none) { |
608 | if (gNet_mode == eNet_mode_none) { |
| 609 | NewTextHeadupSlot( |
609 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_ONLY_AVAILABLE_IN_NET_GAMES)); |
| 610 | } else if (gProgram_state.current_car.power_up_levels[pIndex] < 4) { |
610 | } else if (gProgram_state.current_car.power_up_levels[pIndex] < 4) { |
| 611 | if (gNet_mode == eNet_mode_none || gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]] <= (gProgram_state.credits_earned - gProgram_state.credits_lost)) { |
611 | if (gNet_mode == eNet_mode_none || gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]] <= (gProgram_state.credits_earned - gProgram_state.credits_lost)) { |
| 612 | SpendCredits(gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]); |
612 | SpendCredits(gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]); |
| 613 | ImprovePSPowerup(&gProgram_state.current_car, pIndex); |
613 | ImprovePSPowerup(&gProgram_state.current_car, pIndex); |
| 614 | } else { |
614 | } else { |
| 615 | strcpy(s, GetMiscString(kMiscString_CANNOT_AFFORD_IT)); |
615 | strcpy(s, GetMiscString(kMiscString_CANNOT_AFFORD_IT)); |
| 616 | sprintf(s2, "%d", gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]); |
616 | sprintf(s2, "%d", gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]); |
| 617 | SubsStringJob(s, s2); |
617 | SubsStringJob(s, s2); |
| 618 | NewTextHeadupSlot( |
618 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3008, -4, s); |
| 619 | } |
619 | } |
| 620 | } else { |
620 | } else { |
| 621 | NewTextHeadupSlot( |
621 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX)); |
| 622 | } |
622 | } |
| 623 | } |
623 | } |
| 624 | 624 | ||
| 625 | // IDA: void __cdecl BuyArmour() |
625 | // IDA: void __cdecl BuyArmour() |
| 626 | void BuyArmour(void) { |
626 | void BuyArmour(void) { |
| Line 632... | Line 632... | ||
| 632 | // IDA: void __cdecl BuyPower() |
632 | // IDA: void __cdecl BuyPower() |
| 633 | void BuyPower(void) { |
633 | void BuyPower(void) { |
| 634 | LOG_TRACE("()"); |
634 | LOG_TRACE("()"); |
| 635 | 635 | ||
| 636 | if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_foxy && gThis_net_player_index == gIt_or_fox) { |
636 | if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_foxy && gThis_net_player_index == gIt_or_fox) { |
| 637 | NewTextHeadupSlot( |
637 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_THE_FOX_CANNOT_DO_THAT)); |
| 638 | } else if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_tag && gThis_net_player_index != gIt_or_fox) { |
638 | } else if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_tag && gThis_net_player_index != gIt_or_fox) { |
| 639 | NewTextHeadupSlot( |
639 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_ONLY_IT_CAN_DO_THAT)); |
| 640 | } else { |
640 | } else { |
| 641 | BuyPSPowerup(1); |
641 | BuyPSPowerup(1); |
| 642 | } |
642 | } |
| 643 | } |
643 | } |
| 644 | 644 | ||