Play music when starting the game with `-nocutscenes` (#398)
* Use BrIntToFixed in DoHeadups * Add and use enum for headup slot * Play music when starting with -nocutscenes --------- Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
This commit is contained in:
parent
22369744bb
commit
a826a16d75
|
@ -1491,19 +1491,19 @@ void ToggleControls(void) {
|
|||
}
|
||||
switch (gControl__car) {
|
||||
case 0:
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "Original Controls");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Original Controls");
|
||||
break;
|
||||
case 1:
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "Accelerated steering");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Accelerated steering");
|
||||
break;
|
||||
case 2:
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "0.75 Accelerated");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.75 Accelerated");
|
||||
break;
|
||||
case 3:
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "0.5 Accelerated");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.5 Accelerated");
|
||||
break;
|
||||
default:
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "New controls");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "New controls");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3498,7 +3498,7 @@ int ExpandBoundingBox(tCar_spec* c) {
|
|||
c->bounds[1].min.v[2] = min_z;
|
||||
c->bounds[1].max.v[2] = max_z;
|
||||
if (c->driver == eDriver_local_human) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_RepairObstructed));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_RepairObstructed));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -4626,7 +4626,7 @@ void AmIGettingBoredWatchingCameraSpin(void) {
|
|||
strcat(s, GetMiscString(kMiscString_RACE_LEADER));
|
||||
}
|
||||
headup_timer = GetRaceTime();
|
||||
NewTextHeadupSlot(6, 0, 500, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_fancies, 0, 500, -4, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4666,13 +4666,13 @@ void ViewOpponent(void) {
|
|||
n = 0;
|
||||
}
|
||||
gCar_to_view = gNet_players[n].car;
|
||||
NewTextHeadupSlot(4, 0, 2000, -3, gNet_players[n].player_name);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -3, gNet_players[n].player_name);
|
||||
} else {
|
||||
if (n >= gNum_viewable_cars) {
|
||||
n = 0;
|
||||
}
|
||||
gCar_to_view = gViewable_car_list[n];
|
||||
NewTextHeadupSlot(4, 0, 2000, -3, gViewable_car_list[n]->driver_name);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -3, gViewable_car_list[n]->driver_name);
|
||||
}
|
||||
gCamera_yaw = 0;
|
||||
InitialiseExternalCamera();
|
||||
|
@ -4685,9 +4685,9 @@ void ToggleCarToCarCollisions(void) {
|
|||
|
||||
gCar_car_collisions = !gCar_car_collisions;
|
||||
if (gCar_car_collisions) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Car Car Collisions");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Car Car Collisions");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Ghost Cars");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Ghost Cars");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4711,7 +4711,7 @@ void AdjustDownForce(void) {
|
|||
c->down_force_speed = 2000.0;
|
||||
}
|
||||
sprintf(s, "DownForceSpeed %f", c->down_force_speed);
|
||||
NewTextHeadupSlot(4, 0, 1500, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
|
||||
}
|
||||
|
||||
// IDA: void __cdecl FreezeMechanics()
|
||||
|
@ -4720,9 +4720,9 @@ void FreezeMechanics(void) {
|
|||
|
||||
gFreeze_mechanics = !gFreeze_mechanics;
|
||||
if (gFreeze_mechanics) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Mechanics Frozen");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Mechanics Frozen");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Thawed Mechanics");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Thawed Mechanics");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4732,9 +4732,9 @@ void PutOpponentsInNeutral(void) {
|
|||
|
||||
gStop_opponents_moving = !gStop_opponents_moving;
|
||||
if (gStop_opponents_moving == 0) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Opponents in neutral");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Opponents in neutral");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "Back in gear");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Back in gear");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ void F4Key(void) {
|
|||
}
|
||||
}
|
||||
sprintf(s, "Edit mode: %s", gEdit_mode_names[gWhich_edit_mode]);
|
||||
NewTextHeadupSlot2(4, 0, 2000, -4, s, 0);
|
||||
NewTextHeadupSlot2(eHeadupSlot_misc, 0, 2000, -4, s, 0);
|
||||
if (gWhich_edit_mode == eEdit_mode_spec_vol && old_edit_mode != eEdit_mode_spec_vol) {
|
||||
ShowSpecialVolumes();
|
||||
} else if (gWhich_edit_mode != eEdit_mode_spec_vol && old_edit_mode == eEdit_mode_spec_vol) {
|
||||
|
@ -587,7 +587,7 @@ void SetFlag(int i) {
|
|||
LOG_TRACE("(%d)", i);
|
||||
|
||||
if (gNet_mode == eNet_mode_none) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, "You Cheat!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "You Cheat!");
|
||||
}
|
||||
gI_am_cheating = i;
|
||||
F4Key();
|
||||
|
@ -766,7 +766,7 @@ void LookLeft(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gAusterity_mode) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
} else {
|
||||
PratcamEvent(27);
|
||||
gProgram_state.old_view = gProgram_state.which_view;
|
||||
|
@ -807,7 +807,7 @@ void LookRight(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gAusterity_mode) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
} else {
|
||||
PratcamEvent(28);
|
||||
gProgram_state.old_view = gProgram_state.which_view;
|
||||
|
@ -1074,7 +1074,7 @@ void ToggleCockpit(void) {
|
|||
AdjustHeadups();
|
||||
MungeForwardSky();
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1086,9 +1086,9 @@ void ToggleMirror(void) {
|
|||
gProgram_state.mirror_on = !gProgram_state.mirror_on;
|
||||
ReinitialiseRearviewCamera();
|
||||
if (gProgram_state.mirror_on) {
|
||||
NewTextHeadupSlot(4, 0, 500, -4, GetMiscString(kMiscString_MirrorOn));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, GetMiscString(kMiscString_MirrorOn));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 500, -4, GetMiscString(kMiscString_MirrorOff));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, GetMiscString(kMiscString_MirrorOff));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1338,11 +1338,11 @@ void SetRecovery(void) {
|
|||
}
|
||||
if (gProgram_state.current_car.time_to_recover) {
|
||||
if (GetRaceTime() + 600 >= gProgram_state.current_car.time_to_recover) {
|
||||
NewTextHeadupSlot2(4, 0, 2000, -4, GetMiscString(kMiscString_TOO_LATE_TO_CANCEL), 1);
|
||||
NewTextHeadupSlot2(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TOO_LATE_TO_CANCEL), 1);
|
||||
gToo_late = 1;
|
||||
} else {
|
||||
gProgram_state.current_car.time_to_recover = 0;
|
||||
NewTextHeadupSlot2(4, 0, 2000, -4, GetMiscString(kMiscString_RECOVERY_CANCELLED), 0);
|
||||
NewTextHeadupSlot2(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_RECOVERY_CANCELLED), 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1477,7 +1477,7 @@ void CheckRecoveryOfCars(tU32 pEndFrameTime) {
|
|||
time = (gProgram_state.current_car.time_to_recover - pEndFrameTime + 1000) / 1000;
|
||||
sprintf(s, "%s %d %s", GetMiscString(kMiscString_RECOVERY_IN), time, time > 1 ? GetMiscString(kMiscString_SECONDS) : GetMiscString(kMiscString_SECOND));
|
||||
if (!gToo_late) {
|
||||
NewTextHeadupSlot2(4, 0, 2000, -4, s, 0);
|
||||
NewTextHeadupSlot2(eHeadupSlot_misc, 0, 2000, -4, s, 0);
|
||||
}
|
||||
if (gProgram_state.current_car.time_to_recover <= pEndFrameTime) {
|
||||
RecoverCar();
|
||||
|
@ -1602,15 +1602,15 @@ void CheckOtherRacingKeys(void) {
|
|||
total_repair_cost += cost;
|
||||
if (total_repair_cost) {
|
||||
if (gFree_repairs) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_RepairingForFree));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_RepairingForFree));
|
||||
} else {
|
||||
sprintf(s, "%s %d", GetMiscString(kMiscString_RepairCostColon), total_repair_cost);
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, s);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!stopped_repairing) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_CANNOT_AFFORD_TO_REPAIR));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_CANNOT_AFFORD_TO_REPAIR));
|
||||
}
|
||||
gAuto_repair = 0;
|
||||
stopped_repairing = 1;
|
||||
|
@ -1638,12 +1638,12 @@ void CheckOtherRacingKeys(void) {
|
|||
gRecover_timer = 0;
|
||||
SetFlipUpCar(car);
|
||||
if (gNet_mode != eNet_mode_none) {
|
||||
NewTextHeadupSlot(4, 0, 1500, -4, " ");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, " ");
|
||||
}
|
||||
if (gRecovery_voucher_count != 0) {
|
||||
gRecovery_voucher_count--;
|
||||
sprintf(s, "%s", GetMiscString(kMiscString_RecoveringForFree));
|
||||
NewTextHeadupSlot(4, 0, 1500, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
|
||||
} else {
|
||||
if (gNet_mode) {
|
||||
cost = gNet_recovery_cost[gCurrent_net_game->type];
|
||||
|
@ -1657,7 +1657,7 @@ void CheckOtherRacingKeys(void) {
|
|||
cost = gRecovery_cost[gProgram_state.skill_level];
|
||||
}
|
||||
sprintf(s, "%s %d", GetMiscString(kMiscString_RecoveryCostColon), cost);
|
||||
NewTextHeadupSlot(4, 0, 1500, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
|
||||
LoseSomePSPowerups(2);
|
||||
}
|
||||
CancelPendingCunningStunt();
|
||||
|
@ -1678,7 +1678,7 @@ int CheckRecoverCost(void) {
|
|||
}
|
||||
gProgram_state.credits_earned = 0;
|
||||
gProgram_state.credits_lost = 0;
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_CANNOT_AFFORD_TO_RECOVER));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_CANNOT_AFFORD_TO_RECOVER));
|
||||
DoFancyHeadup(kFancyHeadupNetworkRaceNoMoreMoney);
|
||||
KnackerThisCar(&gProgram_state.current_car);
|
||||
SendGameplayToHost(eNet_gameplay_suicide, 0, 0, 0, 0);
|
||||
|
@ -2106,9 +2106,9 @@ void ToggleFlying(void) {
|
|||
if (gAllow_car_flying && gNet_mode == eNet_mode_none) {
|
||||
gCar_flying = !gCar_flying;
|
||||
if (gCar_flying) {
|
||||
NewTextHeadupSlot(4, 0, 500, -4, "We have lift off!!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, "We have lift off!!");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 500, -4, "Back down to Earth");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, "Back down to Earth");
|
||||
}
|
||||
} else {
|
||||
gCar_flying = 0;
|
||||
|
@ -2121,9 +2121,9 @@ void ToggleInvulnerability(void) {
|
|||
|
||||
gProgram_state.current_car.invulnerable = !gProgram_state.current_car.invulnerable;
|
||||
if (gProgram_state.current_car.invulnerable) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_Invulnerable));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_Invulnerable));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, "Vulnerability returns!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, "Vulnerability returns!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2147,9 +2147,9 @@ void ToggleTimerFreeze(void) {
|
|||
|
||||
gFreeze_timer = !gFreeze_timer;
|
||||
if (gFreeze_timer) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_TimerFrozen));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_TimerFrozen));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, "Timer thawed out");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, "Timer thawed out");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2176,9 +2176,9 @@ void ToggleMap(void) {
|
|||
if (gMap_mode == 0) {
|
||||
if (!gAction_replay_mode) {
|
||||
if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_foxy && gThis_net_player_index == gIt_or_fox) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_THE_FOX_CANNOT_DO_THAT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_THE_FOX_CANNOT_DO_THAT));
|
||||
} else if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_tag && gThis_net_player_index != gIt_or_fox) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_ONLY_IT_CAN_DO_THAT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_ONLY_IT_CAN_DO_THAT));
|
||||
} else {
|
||||
old_indent = gRender_indent;
|
||||
gRender_indent = 0;
|
||||
|
@ -2263,13 +2263,13 @@ void CycleCarTexturingLevel(void) {
|
|||
SetCarTexturingLevel(new_level);
|
||||
switch (new_level) {
|
||||
case eCTL_none:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoCarTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoCarTextures));
|
||||
break;
|
||||
case eCTL_transparent:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TransparentCarTexturesOnly));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TransparentCarTexturesOnly));
|
||||
break;
|
||||
case eCTL_full:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_FullCarTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_FullCarTextures));
|
||||
break;
|
||||
case eCTL_count:
|
||||
break;
|
||||
|
@ -2286,13 +2286,13 @@ void CycleWallTexturingLevel(void) {
|
|||
SetWallTexturingLevel(new_level);
|
||||
switch (new_level) {
|
||||
case eWTL_none:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoWallTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoWallTextures));
|
||||
break;
|
||||
case eWTL_linear:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_LinearWallTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_LinearWallTextures));
|
||||
break;
|
||||
case eWTL_full:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_BestWallTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_BestWallTextures));
|
||||
break;
|
||||
case eWTL_count:
|
||||
break;
|
||||
|
@ -2308,9 +2308,9 @@ void CycleRoadTexturingLevel(void) {
|
|||
ReallySetRoadTexturingLevel(new_level);
|
||||
SetRoadTexturingLevel(new_level);
|
||||
if (new_level == eRTL_none) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoRoadTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoRoadTextures));
|
||||
} else if (new_level == eRTL_full) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_RoadTextures));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_RoadTextures));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2326,13 +2326,13 @@ void CycleYonFactor(void) {
|
|||
}
|
||||
SetYonFactor(new_factor);
|
||||
if (new_factor > .75f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsVeryQuickly));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsVeryQuickly));
|
||||
} else if (new_factor > .375f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsQuiteQuickly));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsQuiteQuickly));
|
||||
} else if (new_factor > .187f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TrackQppearsQuiteLate));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TrackQppearsQuiteLate));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsVeryLate));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TrackAppearsVeryLate));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2371,13 +2371,13 @@ void CycleSoundDetailLevel(void) {
|
|||
SetSoundDetailLevel(new_level);
|
||||
switch (new_level) {
|
||||
case 0:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_FewestSounds));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_FewestSounds));
|
||||
break;
|
||||
case 1:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_PartialSound));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_PartialSound));
|
||||
break;
|
||||
case 2:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AllSounds));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AllSounds));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2392,7 +2392,7 @@ void CycleCarSimplificationLevel(void) {
|
|||
src = GetMiscString(kMiscString_CarSimplificationLevel_D);
|
||||
dst = BrMemAllocate(strlen(src), kMem_simp_level);
|
||||
sprintf(dst, src, gCar_simplification_level);
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, dst);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, dst);
|
||||
BrMemFree(dst);
|
||||
}
|
||||
|
||||
|
@ -2405,12 +2405,12 @@ void ToggleAccessoryRendering(void) {
|
|||
on = !GetAccessoryRendering();
|
||||
SetAccessoryRendering(on);
|
||||
if (on) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOn));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOn));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOff));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOff));
|
||||
}
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NetGamesAlwaysAccessorized));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NetGamesAlwaysAccessorized));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2423,9 +2423,9 @@ void ToggleSmoke(void) {
|
|||
ReallySetSmokeOn(on);
|
||||
SetSmokeOn(on);
|
||||
if (on) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SmokeOn));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SmokeOn));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SmokeOff));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SmokeOff));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2563,7 +2563,7 @@ void EnterUserMessage(void) {
|
|||
gString[COUNT_OF(gString) - 1] = '\0';
|
||||
NetSendHeadupToAllPlayers(the_message);
|
||||
gString[20] = '\0';
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_MESSAGE_SENT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_MESSAGE_SENT));
|
||||
about_to_die = 1;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -510,7 +510,7 @@ void CheckLastCar(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gNet_mode == eNet_mode_none && GetCarCount(eVehicle_opponent) != 0 && NumberOfOpponentsLeft() == 0) {
|
||||
NewTextHeadupSlot(4, 0, 5000, -4, GetMiscString(kMiscString_EveryOpponentWasted));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 5000, -4, GetMiscString(kMiscString_EveryOpponentWasted));
|
||||
RaceCompleted(eRace_over_opponents);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -690,7 +690,7 @@ void LessDepthFactor(void) {
|
|||
gProgram_state.current_depth_effect.start--;
|
||||
}
|
||||
sprintf(s, "Depth start reduced to %d", gProgram_state.current_depth_effect.start);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ void MoreDepthFactor(void) {
|
|||
gProgram_state.current_depth_effect.start++;
|
||||
}
|
||||
sprintf(s, "Depth start increased to %d", gProgram_state.current_depth_effect.start);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
gProgram_state.default_depth_effect.start = gProgram_state.current_depth_effect.start;
|
||||
}
|
||||
|
||||
|
@ -716,7 +716,7 @@ void LessDepthFactor2(void) {
|
|||
gProgram_state.current_depth_effect.end++;
|
||||
}
|
||||
sprintf(s, "Depth end reduced to %d", gProgram_state.current_depth_effect.end);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
|
||||
}
|
||||
|
||||
|
@ -729,7 +729,7 @@ void MoreDepthFactor2(void) {
|
|||
gProgram_state.current_depth_effect.end--;
|
||||
}
|
||||
sprintf(s, "Depth end increased to %d", gProgram_state.current_depth_effect.end);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
gProgram_state.default_depth_effect.end = gProgram_state.current_depth_effect.end;
|
||||
}
|
||||
|
||||
|
@ -757,7 +757,7 @@ void IncreaseYon(void) {
|
|||
camera_ptr = gCamera_list[1]->type_data;
|
||||
i = (int)camera_ptr->yon_z;
|
||||
sprintf(s, GetMiscString(kMiscString_YonIncreasedTo_D), i);
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
|
||||
}
|
||||
|
||||
// IDA: void __cdecl DecreaseYon()
|
||||
|
@ -775,7 +775,7 @@ void DecreaseYon(void) {
|
|||
camera_ptr = gCamera_list[1]->type_data;
|
||||
i = (int)camera_ptr->yon_z;
|
||||
sprintf(s, GetMiscString(kMiscString_YonDecreasedTo_D), i);
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
|
||||
}
|
||||
|
||||
// IDA: void __cdecl SetYon(br_scalar pYon)
|
||||
|
@ -822,7 +822,7 @@ void IncreaseAngle(void) {
|
|||
#else
|
||||
sprintf(s, "Camera angle increased to %d", gProgram_state.current_depth_effect.end);
|
||||
#endif
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -844,7 +844,7 @@ void DecreaseAngle(void) {
|
|||
#else
|
||||
sprintf(s, "Camera angle decreased to %d", gProgram_state.current_depth_effect.end);
|
||||
#endif
|
||||
NewTextHeadupSlot(4, 0, 500, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -855,16 +855,16 @@ void ToggleDepthMode(void) {
|
|||
switch (gProgram_state.current_depth_effect.type) {
|
||||
case eDepth_effect_none:
|
||||
InstantDepthChange(eDepth_effect_darkness, gProgram_state.current_depth_effect.sky_texture, 8, 0);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "Darkness mode");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Darkness mode");
|
||||
break;
|
||||
case eDepth_effect_darkness:
|
||||
InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
|
||||
InstantDepthChange(eDepth_effect_fog, gProgram_state.current_depth_effect.sky_texture, 10, 0);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "Fog mode");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Fog mode");
|
||||
break;
|
||||
case eDepth_effect_fog:
|
||||
InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, "Depth effects disabled");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Depth effects disabled");
|
||||
break;
|
||||
}
|
||||
gProgram_state.default_depth_effect.type = gProgram_state.current_depth_effect.type;
|
||||
|
@ -921,11 +921,11 @@ void ToggleSky(void) {
|
|||
|
||||
SetSkyTextureOn(!GetSkyTextureOn());
|
||||
if (gProgram_state.current_depth_effect.sky_texture != NULL) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOn));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOn));
|
||||
} else if (gSwap_sky_texture != NULL) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOff));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOff));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoSkyTextureForThisRace));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoSkyTextureForThisRace));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -973,11 +973,11 @@ void ToggleDepthCueing(void) {
|
|||
|
||||
SetDepthCueingOn(!GetDepthCueingOn());
|
||||
if (gProgram_state.current_depth_effect.type != eDepth_effect_none) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_DepthCueingOn));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_DepthCueingOn));
|
||||
} else if (gSwap_depth_effect_type != eDepth_effect_none) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_DepthCueingOff));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_DepthCueingOff));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoDepthCueingForThisRace));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoDepthCueingForThisRace));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ void DoHeadups(tU32 pThe_time) {
|
|||
DoNetScores();
|
||||
}
|
||||
if (gQueued_headup_count && PDGetTotalTime() - gLast_centre_headup >= 1000) {
|
||||
NewTextHeadupSlot(4, gQueued_headups[0].flash_rate,
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, gQueued_headups[0].flash_rate,
|
||||
gQueued_headups[0].lifetime,
|
||||
gQueued_headups[0].font_index,
|
||||
gQueued_headups[0].text);
|
||||
|
@ -476,7 +476,7 @@ void DoHeadups(tU32 pThe_time) {
|
|||
0,
|
||||
the_headup->data.fancy_info.image->width,
|
||||
the_headup->data.fancy_info.image->height,
|
||||
-65536);
|
||||
-BrIntToFixed(1));
|
||||
break;
|
||||
case eFancy_stage_halting:
|
||||
time_factor = 1000 * (pThe_time - the_headup->data.fancy_info.start_time) / 100;
|
||||
|
@ -495,7 +495,7 @@ void DoHeadups(tU32 pThe_time) {
|
|||
0,
|
||||
the_headup->data.image_info.image->width,
|
||||
the_headup->data.image_info.image->height,
|
||||
(((1500 - time_factor) * the_headup->data.fancy_info.shear_amount / 500) << 16)
|
||||
BrIntToFixed((1500 - time_factor) * the_headup->data.fancy_info.shear_amount / 500)
|
||||
/ the_headup->data.image_info.image->height);
|
||||
} else {
|
||||
#if DETHRACE_FIX_BUGS
|
||||
|
@ -510,7 +510,7 @@ void DoHeadups(tU32 pThe_time) {
|
|||
0,
|
||||
the_headup->data.image_info.image->width,
|
||||
the_headup->data.image_info.image->height,
|
||||
((the_headup->data.fancy_info.shear_amount * (time_factor - 500) / 500) << 16)
|
||||
BrIntToFixed(the_headup->data.fancy_info.shear_amount * (time_factor - 500) / 500)
|
||||
/ the_headup->data.image_info.image->height);
|
||||
}
|
||||
break;
|
||||
|
@ -546,8 +546,8 @@ void DoHeadups(tU32 pThe_time) {
|
|||
0,
|
||||
the_headup->data.image_info.image->width,
|
||||
the_headup->data.image_info.image->height,
|
||||
-(((time_factor * the_headup->data.fancy_info.shear_amount / 1000) << 16)
|
||||
/ the_headup->data.image_info.image->height));
|
||||
-BrIntToFixed(time_factor * the_headup->data.fancy_info.shear_amount / 1000)
|
||||
/ the_headup->data.image_info.image->height);
|
||||
break;
|
||||
case eFancy_stage_leaving:
|
||||
the_headup->data.fancy_info.offset -= 500 * gFrame_period / 1000;
|
||||
|
@ -563,7 +563,7 @@ void DoHeadups(tU32 pThe_time) {
|
|||
0,
|
||||
the_headup->data.image_info.image->width,
|
||||
the_headup->data.image_info.image->height,
|
||||
-65536);
|
||||
-BrIntToFixed(1));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -878,7 +878,7 @@ void DoFancyHeadup(int pIndex) {
|
|||
|
||||
the_time = GetTotalTime();
|
||||
if (!gMap_mode && (gLast_fancy_index < 0 || the_time - gLast_fancy_time > 2000 || gLast_fancy_index <= pIndex)) {
|
||||
temp_ref = NewImageHeadupSlot(6, 0, 2000, pIndex + 10);
|
||||
temp_ref = NewImageHeadupSlot(eHeadupSlot_fancies, 0, 2000, pIndex + 10);
|
||||
if (temp_ref >= 0) {
|
||||
gLast_fancy_headup = temp_ref;
|
||||
gLast_fancy_index = pIndex;
|
||||
|
@ -1418,7 +1418,7 @@ void EarnCredits2(int pAmount, char* pPrefix_text) {
|
|||
sprintf(s, "%s%s %d %s", GetMiscString(kMiscString_Lost), pPrefix_text, -pAmount, GetMiscString(kMiscString_Credits));
|
||||
gProgram_state.credits_lost -= original_amount;
|
||||
}
|
||||
gLast_credit_headup__displays = NewTextHeadupSlot(4, 0, 2000, -4, s);
|
||||
gLast_credit_headup__displays = NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
|
||||
gLast_earn_time = the_time;
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1471,7 @@ void AwardTime(tU32 pTime) {
|
|||
gTimer += original_amount * 1000;
|
||||
s[0] = '+';
|
||||
TimerString(1000 * pTime, &s[1], 0, 0);
|
||||
gLast_time_credit_headup = NewTextHeadupSlot(11, 0, 2000, -2, s);
|
||||
gLast_time_credit_headup = NewTextHeadupSlot(eHeadupSlot_time_award, 0, 2000, -2, s);
|
||||
gLast_time_earn_time = the_time;
|
||||
}
|
||||
|
||||
|
|
|
@ -3009,16 +3009,16 @@ void ToggleShadow(void) {
|
|||
}
|
||||
switch (gShadow_level) {
|
||||
case eShadow_none:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoShadows));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoShadows));
|
||||
break;
|
||||
case eShadow_us_only:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderOwnCar));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderOwnCar));
|
||||
break;
|
||||
case eShadow_us_and_opponents:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderMainCars));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderMainCars));
|
||||
break;
|
||||
case eShadow_everyone:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderAllCars));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderAllCars));
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -3089,9 +3089,9 @@ void ShadowMode(void) {
|
|||
|
||||
gFancy_shadow = !gFancy_shadow;
|
||||
if (gFancy_shadow) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, "Translucent shadow");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, "Translucent shadow");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, "Solid shadow");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, "Solid shadow");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -534,7 +534,7 @@ void InitRace(void) {
|
|||
PossibleService();
|
||||
// TODO: dword_55142C = 0;
|
||||
gStart_race_sent = 0;
|
||||
gProgram_state.frame_rate_headup = NewTextHeadupSlot(0, 0, 0, -1, "");
|
||||
gProgram_state.frame_rate_headup = NewTextHeadupSlot(eHeadupSlot_development, 0, 0, -1, "");
|
||||
if (TranslationMode()) {
|
||||
if (gAusterity_mode) {
|
||||
FlushInterfaceFonts();
|
||||
|
@ -555,15 +555,15 @@ void InitRace(void) {
|
|||
gMap_mode = 0;
|
||||
gProgram_state.cockpit_image_index = 0;
|
||||
if (gNet_mode != eNet_mode_none) {
|
||||
gNet_cash_headup = NewTextHeadupSlot(13, 0, 0, -6, "");
|
||||
gNet_ped_headup = NewTextHeadupSlot(14, 0, 0, -6, "");
|
||||
gNet_cash_headup = NewTextHeadupSlot(eHeadupSlot_cash_network, 0, 0, -6, "");
|
||||
gNet_ped_headup = NewTextHeadupSlot(eHeadupSlot_ped_network, 0, 0, -6, "");
|
||||
} else {
|
||||
gCredits_won_headup = NewTextHeadupSlot(1, 0, 0, -6, "");
|
||||
gPed_kill_count_headup = NewTextHeadupSlot(2, 0, 0, -6, "");
|
||||
gCar_kill_count_headup = NewTextHeadupSlot(12, 0, 0, -6, "");
|
||||
gTimer_headup = NewTextHeadupSlot(7, 0, 0, -5, "");
|
||||
gTime_awarded_headup = NewTextHeadupSlot(11, 0, 0, -2, "");
|
||||
gLaps_headup = NewTextHeadupSlot(8, 0, 0, -6, "");
|
||||
gCredits_won_headup = NewTextHeadupSlot(eHeadupSlot_credits, 0, 0, -6, "");
|
||||
gPed_kill_count_headup = NewTextHeadupSlot(eHeadupSlot_ped_kills, 0, 0, -6, "");
|
||||
gCar_kill_count_headup = NewTextHeadupSlot(eHeadupSlot_cars_out_count, 0, 0, -6, "");
|
||||
gTimer_headup = NewTextHeadupSlot(eHeadupSlot_timer, 0, 0, -5, "");
|
||||
gTime_awarded_headup = NewTextHeadupSlot(eHeadupSlot_time_award, 0, 0, -2, "");
|
||||
gLaps_headup = NewTextHeadupSlot(eHeadupSlot_lap_count, 0, 0, -6, "");
|
||||
}
|
||||
PossibleService();
|
||||
gProgram_state.which_view = eView_forward;
|
||||
|
|
|
@ -194,7 +194,7 @@ void MungeHeadups(void) {
|
|||
}
|
||||
if (gCountdown != new_countdown && new_countdown <= 5) {
|
||||
gCountdown = new_countdown;
|
||||
NewImageHeadupSlot(5, 0, 800, new_countdown + 4);
|
||||
NewImageHeadupSlot(eHeadupSlot_countdown, 0, 800, new_countdown + 4);
|
||||
DRS3StartSound(gPedestrians_outlet, gCountdown + 8000);
|
||||
if (!new_countdown) {
|
||||
MakeFlagWavingBastardWaveHisFlagWhichIsTheProbablyTheLastThingHeWillEverDo();
|
||||
|
@ -468,8 +468,8 @@ int MungeRaceFinished(void) {
|
|||
return 1;
|
||||
}
|
||||
gRace_finished = 15 * gTimer + 4500;
|
||||
gRace_bonus_headup = NewTextHeadupSlot(9, 0, 0, -4, "");
|
||||
gTime_bonus_headup = NewTextHeadupSlot(10, 0, 0, -4, "");
|
||||
gRace_bonus_headup = NewTextHeadupSlot(eHeadupSlot_race_bonus, 0, 0, -4, "");
|
||||
gTime_bonus_headup = NewTextHeadupSlot(eHeadupSlot_time_bonus, 0, 0, -4, "");
|
||||
gTime_bonus = 0;
|
||||
gTime_bonus_start = GetTotalTime();
|
||||
gTime_bonus_state = eTime_bonus_initial_pause;
|
||||
|
|
|
@ -649,22 +649,22 @@ void DoNetworkHeadups(int pCredits) {
|
|||
|
||||
if (gNot_shown_race_type_headup) {
|
||||
gNot_shown_race_type_headup = 0;
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NetworkGameTypeNames_START + gCurrent_net_game->type));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NetworkGameTypeNames_START + gCurrent_net_game->type));
|
||||
}
|
||||
if (gTime_for_punishment && gTime_for_punishment <= PDGetTotalTime()) {
|
||||
gTime_for_punishment = 0;
|
||||
switch (gCurrent_net_game->type) {
|
||||
case eNet_game_type_carnage:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_KILL_COUNT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_KILL_COUNT));
|
||||
break;
|
||||
case eNet_game_type_checkpoint:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_THAT_LOST_YOU_A_CHECKPOINT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_LOST_YOU_A_CHECKPOINT));
|
||||
break;
|
||||
case eNet_game_type_sudden_death:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_BACK_TO_THE_START));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_BACK_TO_THE_START));
|
||||
break;
|
||||
case eNet_game_type_foxy:
|
||||
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_TIME));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_THAT_HALVED_YOUR_TIME));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1410,7 +1410,7 @@ void BuyPSPowerup(int pIndex) {
|
|||
LOG_TRACE("(%d)", pIndex);
|
||||
|
||||
if (gNet_mode == eNet_mode_none) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, GetMiscString(kMiscString_ONLY_AVAILABLE_IN_NET_GAMES));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_ONLY_AVAILABLE_IN_NET_GAMES));
|
||||
} else if (gProgram_state.current_car.power_up_levels[pIndex] < 4) {
|
||||
if (gNet_mode == eNet_mode_none || gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]] <= (gProgram_state.credits_earned - gProgram_state.credits_lost)) {
|
||||
SpendCredits(gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]);
|
||||
|
@ -1419,10 +1419,10 @@ void BuyPSPowerup(int pIndex) {
|
|||
strcpy(s, GetMiscString(kMiscString_CANNOT_AFFORD_IT));
|
||||
sprintf(s2, "%d", gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]);
|
||||
SubsStringJob(s, s2);
|
||||
NewTextHeadupSlot(4, 0, 3008, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3008, -4, s);
|
||||
}
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1438,9 +1438,9 @@ void BuyPower(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_foxy && gThis_net_player_index == gIt_or_fox) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_THE_FOX_CANNOT_DO_THAT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_THE_FOX_CANNOT_DO_THAT));
|
||||
} else if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_tag && gThis_net_player_index != gIt_or_fox) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_ONLY_IT_CAN_DO_THAT));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_ONLY_IT_CAN_DO_THAT));
|
||||
} else {
|
||||
BuyPSPowerup(1);
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ void NetSendHeadupToEverybody(char* pMessage) {
|
|||
return;
|
||||
}
|
||||
if (gProgram_state.racing) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, pMessage);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pMessage);
|
||||
}
|
||||
the_contents = NetGetBroadcastContents(NETMSGID_HEADUP, 0);
|
||||
strcpy(the_contents->data.headup.text, pMessage);
|
||||
|
@ -201,7 +201,7 @@ void NetSendHeadupToPlayer(char* pMessage, tPlayer_ID pPlayer) {
|
|||
}
|
||||
if (gLocal_net_ID == pPlayer) {
|
||||
if (gProgram_state.racing) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, pMessage);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pMessage);
|
||||
}
|
||||
} else {
|
||||
message = NetBuildMessage(NETMSGID_HEADUP, 0);
|
||||
|
@ -1487,7 +1487,7 @@ void ReceivedHeadup(tNet_contents* pContents) {
|
|||
LOG_TRACE("(%p)", pContents);
|
||||
|
||||
if (gProgram_state.racing) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, pContents->data.headup.text);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pContents->data.headup.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1651,7 +1651,7 @@ void ReceivedWasted(tNet_contents* pContents) {
|
|||
} else {
|
||||
sprintf(s, "%s %s %s", victim->player_name, GetMiscString(kMiscString_WastedBy), culprit ? culprit->player_name : GetMiscString(kMiscString_COP));
|
||||
}
|
||||
NewTextHeadupSlot2(4, 0, 3000, -4, s, 0);
|
||||
NewTextHeadupSlot2(eHeadupSlot_misc, 0, 3000, -4, s, 0);
|
||||
last_wasty_message_time = PDGetTotalTime();
|
||||
last_culprit = culprit;
|
||||
last_victim = victim;
|
||||
|
@ -1891,7 +1891,7 @@ void CheckForDisappearees(void) {
|
|||
NetSendHeadupToAllPlayers(s);
|
||||
KickPlayerOut(gNet_players[i].ID);
|
||||
if (gProgram_state.racing) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2062,7 +2062,7 @@ int NetGuaranteedSendMessageToAddress(tNet_game_details* pDetails, tNet_message*
|
|||
pMessage->senders_time_stamp = PDGetTotalTime();
|
||||
if (gNext_guarantee >= COUNT_OF(gGuarantee_list)) {
|
||||
sprintf(buffer, "Guarantee list full %d", pMessage->contents.header.type);
|
||||
NewTextHeadupSlot(4, 0, 500, -1, buffer);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, buffer);
|
||||
pMessage->guarantee_number = 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1236,7 +1236,7 @@ void ProcessLevitate(tOpponent_spec* pOpponent_spec, tProcess_objective_command
|
|||
pOpponent_spec->levitate_data.time_started = gTime_stamp_for_this_munging;
|
||||
pOpponent_spec->levitate_data.initial_y = pOpponent_spec->car_spec->car_master_actor->t.t.translate.t.v[1];
|
||||
if (pOpponent_spec->car_spec->has_been_stolen) {
|
||||
NewTextHeadupSlot(4, 250, 2500, -4, GetMiscString(kMiscString_CarAddedToChangeCarList));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 250, 2500, -4, GetMiscString(kMiscString_CarAddedToChangeCarList));
|
||||
}
|
||||
} else {
|
||||
pOpponent_spec->car_spec->brake_force = 15.f * pOpponent_spec->car_spec->M;
|
||||
|
@ -3058,7 +3058,7 @@ void ToggleOpponentProcessing(void) {
|
|||
for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) {
|
||||
ObjectiveComplete(&gProgram_state.AI_vehicles.cops[i]);
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "OPPONENTS SWITCHED ON");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "OPPONENTS SWITCHED ON");
|
||||
} else {
|
||||
for (i = 0; i < gProgram_state.AI_vehicles.number_of_opponents; i++) {
|
||||
gProgram_state.AI_vehicles.opponents[i].physics_me = 0;
|
||||
|
@ -3068,7 +3068,7 @@ void ToggleOpponentProcessing(void) {
|
|||
}
|
||||
gActive_car_list_rebuild_required = 1;
|
||||
RebuildActiveCarList();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "OPPONENTS SWITCHED OFF");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "OPPONENTS SWITCHED OFF");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3079,12 +3079,12 @@ void ToggleMellowOpponents(void) {
|
|||
|
||||
gMellow_opponents = !gMellow_opponents;
|
||||
if (gMellow_opponents) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -1, "Opponents all nice and fluffy");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -1, "Opponents all nice and fluffy");
|
||||
for (i = 0; i < gProgram_state.AI_vehicles.number_of_opponents; i++) {
|
||||
ObjectiveComplete(&gProgram_state.AI_vehicles.opponents[i]);
|
||||
}
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Opponents hostile again");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Opponents hostile again");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3100,7 +3100,7 @@ void RepairOpponentsSystems(void) {
|
|||
gProgram_state.AI_vehicles.opponents[i].knackeredness_detected = 0;
|
||||
}
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 3000, -1, "Opponents systems repaired (but not bodywork)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -1, "Opponents systems repaired (but not bodywork)");
|
||||
}
|
||||
|
||||
// IDA: void __usercall CopyVertex(br_vertex *pDest_vertex@<EAX>, br_vertex *pSrc_vertex@<EDX>)
|
||||
|
@ -3308,7 +3308,7 @@ void RecalcNearestPathSectionSpeed(int pMax_not_min, int pAdjustment) {
|
|||
if (gOppo_paths_shown) {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (!gAlready_elasticating && distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any paths close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any paths close enough");
|
||||
} else {
|
||||
BrVector3Sub(&wank, &gSelf->t.t.translate.t, &gProgram_state.AI_vehicles.path_nodes[gProgram_state.AI_vehicles.path_sections[section_no].node_indices[0]].p);
|
||||
dist_to_start = BrVector3Length(&wank);
|
||||
|
@ -3346,7 +3346,7 @@ void RecalcNearestPathSectionSpeed(int pMax_not_min, int pAdjustment) {
|
|||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].max_speed[0]));
|
||||
}
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3364,7 +3364,7 @@ void RecalcNearestPathSectionWidth(br_scalar pAdjustment) {
|
|||
if (!gAlready_elasticating) {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any paths close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any paths close enough");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
@ -3376,7 +3376,7 @@ void RecalcNearestPathSectionWidth(br_scalar pAdjustment) {
|
|||
}
|
||||
ShowOppoPaths();
|
||||
sprintf(str, "Width %2.1f BRU", 2.f * gProgram_state.AI_vehicles.path_sections[section_no].width);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3834,13 +3834,13 @@ void ShowOppoPaths(void) {
|
|||
if (gOppo_path_actor != NULL) {
|
||||
gOppo_path_actor->render_style = BR_RSTYLE_NONE;
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 1000, -1, "Not displaying any paths");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -1, "Not displaying any paths");
|
||||
} else {
|
||||
RebuildOppoPathModel();
|
||||
sprintf(str, "Total %d nodes, %d sections",
|
||||
gProgram_state.AI_vehicles.number_of_path_nodes,
|
||||
gProgram_state.AI_vehicles.number_of_path_sections);
|
||||
NewTextHeadupSlot(4, 0, 1000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -1, str);
|
||||
}
|
||||
if (ConsistencyCheck()) {
|
||||
WriteOutOppoPaths();
|
||||
|
@ -3976,16 +3976,16 @@ void DropElasticateyNode(void) {
|
|||
gMobile_section = ReallocExtraPathSections(1);
|
||||
} else {
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "You must show paths before adding to them (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "You must show paths before adding to them (F5)");
|
||||
return;
|
||||
}
|
||||
if (gProgram_state.AI_vehicles.number_of_path_nodes == 0) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not implemented yet. Go away.");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not implemented yet. Go away.");
|
||||
return;
|
||||
}
|
||||
old_node = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
return;
|
||||
}
|
||||
original_type = 0;
|
||||
|
@ -4024,7 +4024,7 @@ void DropElasticateyNode(void) {
|
|||
gProgram_state.AI_vehicles.path_nodes[old_node].number_of_sections += 1;
|
||||
ShowOppoPaths();
|
||||
sprintf(str, "New section #%d, new node #%d", gMobile_section, new_node);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
|
||||
// IDA: void __cdecl InsertAndElasticate()
|
||||
|
@ -4059,7 +4059,7 @@ void InsertAndElasticate(void) {
|
|||
not_perp = 1;
|
||||
}
|
||||
if (not_perp || distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Get nearer to the section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Get nearer to the section");
|
||||
} else {
|
||||
new_section = ReallocExtraPathSections(1);
|
||||
if (gAlready_elasticating) {
|
||||
|
@ -4096,7 +4096,7 @@ void InsertAndElasticate(void) {
|
|||
ShowOppoPaths();
|
||||
sprintf(str, "New section %d, new node #%d inserted into section #%d",
|
||||
gMobile_section, inserted_node, section_no);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4125,7 +4125,7 @@ void InsertAndDontElasticate(void) {
|
|||
not_perp = 1;
|
||||
}
|
||||
if (not_perp || distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Get nearer to the section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Get nearer to the section");
|
||||
} else {
|
||||
if (gAlready_elasticating) {
|
||||
gAlready_elasticating = 0;
|
||||
|
@ -4137,7 +4137,7 @@ void InsertAndDontElasticate(void) {
|
|||
InsertThisNodeInThisSectionHere(inserted_node, section_no, &gSelf->t.t.translate.t);
|
||||
ShowOppoPaths();
|
||||
sprintf(str, "New node #%d inserted into section #%d", inserted_node, section_no);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4156,7 +4156,7 @@ void DropDeadEndNode(void) {
|
|||
sprintf(str, "New section #%d, finish node #%d",
|
||||
gMobile_section,
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]);
|
||||
NewTextHeadupSlot(4, 0, 4000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 4000, -1, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4170,10 +4170,10 @@ void DropNodeOnNodeAndStopElasticating(void) {
|
|||
if (gAlready_elasticating) {
|
||||
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0] == node_no || distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
} else if (gProgram_state.AI_vehicles.path_nodes[node_no].number_of_sections >= COUNT_OF(gProgram_state.AI_vehicles.path_nodes[node_no].sections)) {
|
||||
sprintf(str, "Sorry, node #%d already has %d sections attached", node_no, (int)COUNT_OF(gProgram_state.AI_vehicles.path_nodes[node_no].sections));
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
} else {
|
||||
gAlready_elasticating = 0;
|
||||
gProgram_state.AI_vehicles.number_of_path_nodes -= 1;
|
||||
|
@ -4184,7 +4184,7 @@ void DropNodeOnNodeAndStopElasticating(void) {
|
|||
sprintf(str, "New section #%d, attached to existing node #%d",
|
||||
gMobile_section,
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]);
|
||||
NewTextHeadupSlot(4, 0, 4000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 4000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4251,15 +4251,15 @@ void PullOppoPoint(void) {
|
|||
|
||||
if (gOppo_paths_shown) {
|
||||
if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're elasticating");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're elasticating");
|
||||
} else {
|
||||
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any paths close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any paths close enough");
|
||||
} else {
|
||||
BrVector3Copy(&gProgram_state.AI_vehicles.path_nodes[node_no].p, &gSelf->t.t.translate.t);
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Bing!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Bing!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4273,20 +4273,20 @@ void ShowNodeInfo(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
sprintf(str, "Next point will be #%d",
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
} else {
|
||||
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
} else {
|
||||
sprintf(str, "Nearest node #%d has %d attached sections",
|
||||
node_no,
|
||||
gProgram_state.AI_vehicles.path_nodes[node_no].number_of_sections);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4301,23 +4301,23 @@ void ShowSectionInfo1(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
sprintf(str, "This section will be #%d attached to nodes #%d and #%d",
|
||||
gMobile_section,
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0],
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
sprintf(str, "Nearest section #%d, start node #%d, finish node #%d",
|
||||
section_no,
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0],
|
||||
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4332,25 +4332,25 @@ void ShowSectionInfo2(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
sprintf(str, "Towards start - min %d max %d, finish - min %d, max %d mph",
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[gMobile_section].min_speed[0]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[gMobile_section].max_speed[0]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[gMobile_section].min_speed[1]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[gMobile_section].max_speed[1]));
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
sprintf(str, "Towards start - min %d max %d, finish - min %d, max %d mph",
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].min_speed[0]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].max_speed[0]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].min_speed[1]),
|
||||
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].max_speed[1]));
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4364,18 +4364,18 @@ void DeleteOppoPathSection(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gOppo_paths_shown == 0) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
DeleteSection(section_no);
|
||||
DeleteOrphanNodes();
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Pop!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Pop!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4387,18 +4387,18 @@ void DeleteOppoPathNodeAndSections(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
} else {
|
||||
DeleteNode(node_no, 1);
|
||||
DeleteOrphanNodes();
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Blam!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Blam!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4410,15 +4410,15 @@ void DeleteOppoPathNodeAndJoin(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any nodes close enough");
|
||||
} else if (gProgram_state.AI_vehicles.path_nodes[node_no].number_of_sections != 2) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Node must have exactly 2 sections attached");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Node must have exactly 2 sections attached");
|
||||
} else if ((gProgram_state.AI_vehicles.path_sections[gProgram_state.AI_vehicles.path_nodes[node_no].sections[0]].node_indices[0] == node_no
|
||||
&& gProgram_state.AI_vehicles.path_sections[gProgram_state.AI_vehicles.path_nodes[node_no].sections[1]].node_indices[1] == node_no)
|
||||
|| (gProgram_state.AI_vehicles.path_sections[gProgram_state.AI_vehicles.path_nodes[node_no].sections[1]].node_indices[0] == node_no
|
||||
|
@ -4429,9 +4429,9 @@ void DeleteOppoPathNodeAndJoin(void) {
|
|||
DeleteOrphanNodes();
|
||||
ConsistencyCheck();
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Blam!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Blam!");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Sections must point in same direction");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Sections must point in same direction");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4447,13 +4447,13 @@ void ReverseSectionDirection(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
temp = gProgram_state.AI_vehicles.path_sections[section_no].node_indices[0];
|
||||
gProgram_state.AI_vehicles.path_sections[section_no].node_indices[0] = gProgram_state.AI_vehicles.path_sections[section_no].node_indices[1];
|
||||
|
@ -4482,18 +4482,18 @@ void CycleSectionType(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
gProgram_state.AI_vehicles.path_sections[section_no].type = (gProgram_state.AI_vehicles.path_sections[section_no].type + 1) % 3;
|
||||
sprintf(str, "%s section", gPath_section_type_names[gProgram_state.AI_vehicles.path_sections[section_no].type]);
|
||||
ShowOppoPaths();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4507,13 +4507,13 @@ void ToggleOneWayNess(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
|
||||
if (distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Can't find any sections close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Can't find any sections close enough");
|
||||
} else {
|
||||
if (gProgram_state.AI_vehicles.path_sections[section_no].one_way) {
|
||||
gProgram_state.AI_vehicles.path_sections[section_no].one_way = 0;
|
||||
|
@ -4522,9 +4522,9 @@ void ToggleOneWayNess(void) {
|
|||
}
|
||||
ShowOppoPaths();
|
||||
if (gProgram_state.AI_vehicles.path_sections[section_no].one_way) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "ONE-WAY");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "ONE-WAY");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "TWO-WAY");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "TWO-WAY");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4543,7 +4543,7 @@ void CopStartPointInfo(void) {
|
|||
closest = -1;
|
||||
closest_distance = FLT_MAX;
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else {
|
||||
for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) {
|
||||
BrVector3Sub(&car_to_point, &gSelf->t.t.translate.t, &gProgram_state.AI_vehicles.cop_start_points[i]);
|
||||
|
@ -4554,10 +4554,10 @@ void CopStartPointInfo(void) {
|
|||
}
|
||||
}
|
||||
if (closest < 0 || closest_distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "No cop start points close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "No cop start points close enough");
|
||||
} else {
|
||||
sprintf(str, "Nearest cop start point #%d", closest);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4568,19 +4568,19 @@ void DropCopStartPoint(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
if (gProgram_state.AI_vehicles.number_of_cops < COUNT_OF(gProgram_state.AI_vehicles.cop_start_points)) {
|
||||
BrVector3Copy(&gProgram_state.AI_vehicles.cop_start_points[gProgram_state.AI_vehicles.number_of_cops], &gSelf->t.t.translate.t);
|
||||
gProgram_state.AI_vehicles.number_of_cops += 1;
|
||||
ShowOppoPaths();
|
||||
sprintf(str, "New cop start point dropped (%d of %d)", gProgram_state.AI_vehicles.number_of_cops, (int)COUNT_OF(gProgram_state.AI_vehicles.cop_start_points));
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
} else {
|
||||
sprintf(str, "Sorry, no more than %d cop start points", (int)COUNT_OF(gProgram_state.AI_vehicles.cop_start_points));
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4598,9 +4598,9 @@ void DeleteCopStartPoint(void) {
|
|||
closest = -1;
|
||||
closest_distance = FLT_MAX;
|
||||
if (!gOppo_paths_shown) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
|
||||
} else if (gAlready_elasticating) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Not while you're creating a new section");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Not while you're creating a new section");
|
||||
} else {
|
||||
for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) {
|
||||
BrVector3Sub(&car_to_point, &gSelf->t.t.translate.t, &gProgram_state.AI_vehicles.cop_start_points[i]);
|
||||
|
@ -4611,7 +4611,7 @@ void DeleteCopStartPoint(void) {
|
|||
}
|
||||
}
|
||||
if (closest < 0 || closest_distance > 10.f) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "No cop start points close enough");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "No cop start points close enough");
|
||||
} else {
|
||||
for (i = closest; i < gProgram_state.AI_vehicles.number_of_cops - 1; i++) {
|
||||
BrVector3Copy(&gProgram_state.AI_vehicles.cop_start_points[i],
|
||||
|
@ -4620,7 +4620,7 @@ void DeleteCopStartPoint(void) {
|
|||
gProgram_state.AI_vehicles.number_of_cops -= 1;
|
||||
ShowOppoPaths();
|
||||
sprintf(str, "Deleted cop start point #%d", closest);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, str);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,9 +203,9 @@ void TogglePedestrians(void) {
|
|||
if (!gProgram_state.sausage_eater_mode) {
|
||||
gPedestrians_on = !gPedestrians_on;
|
||||
if (gPedestrians_on) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_LetTheCarnageContinue));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_LetTheCarnageContinue));
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_NiceAndFluffyMode));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_NiceAndFluffyMode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1526,7 +1526,7 @@ void CheckLastPed(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gNet_mode == eNet_mode_none && gProgram_state.peds_killed >= gTotal_peds) {
|
||||
NewTextHeadupSlot(4, 0, 5000, -4, GetMiscString(kMiscString_EveryPedestrianWasted));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 5000, -4, GetMiscString(kMiscString_EveryPedestrianWasted));
|
||||
RaceCompleted(eRace_over_peds);
|
||||
}
|
||||
}
|
||||
|
@ -3180,7 +3180,7 @@ void NewPed(int pRef_num) {
|
|||
gNumber_of_pedestrians++;
|
||||
gTotal_peds++;
|
||||
sprintf(s, "New pedestrian, refnum = %d", pRef_num);
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, s);
|
||||
if (pRef_num >= 100) {
|
||||
DropInitPedPoint();
|
||||
NewPed(-1);
|
||||
|
@ -3208,7 +3208,7 @@ void ScrubPedestrian(void) {
|
|||
gPed_instruc_count = 0;
|
||||
gNumber_of_pedestrians--;
|
||||
gTotal_peds--;
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Scrubbed pedestrian");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Scrubbed pedestrian");
|
||||
RemoveCurrentPedPath();
|
||||
}
|
||||
|
||||
|
@ -3218,9 +3218,9 @@ void TogglePedDetect(void) {
|
|||
|
||||
gDetect_peds = !gDetect_peds;
|
||||
if (gDetect_peds) {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Pedestrian are meat again");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Pedestrian are meat again");
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Pedestrians are invulnerable");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Pedestrians are invulnerable");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3394,7 +3394,7 @@ void DropPedPoint(void) {
|
|||
}
|
||||
#endif
|
||||
DropPedPoint2();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped pedestrian point");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped pedestrian point");
|
||||
}
|
||||
|
||||
// IDA: void __cdecl DropInitPedPoint()
|
||||
|
@ -3408,7 +3408,7 @@ void DropInitPedPoint(void) {
|
|||
#endif
|
||||
gInit_ped_instruc = gPed_instruc_count;
|
||||
DropPedPoint2();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped initial pedestrian point");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped initial pedestrian point");
|
||||
}
|
||||
|
||||
// IDA: void __cdecl DropPedPointAir2()
|
||||
|
@ -3433,7 +3433,7 @@ void DropPedPointAir(void) {
|
|||
}
|
||||
#endif
|
||||
DropPedPointAir2();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped auto-y pedestrian point");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped auto-y pedestrian point");
|
||||
}
|
||||
|
||||
// IDA: void __cdecl DropInitPedPointAir()
|
||||
|
@ -3447,7 +3447,7 @@ void DropInitPedPointAir(void) {
|
|||
#endif
|
||||
gInit_ped_instruc = gPed_instruc_count;
|
||||
DropPedPointAir2();
|
||||
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped initial auto-y pedestrian point");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped initial auto-y pedestrian point");
|
||||
}
|
||||
|
||||
// IDA: br_uint_32 __cdecl KillActorsModel(br_actor *pActor, void *pArg)
|
||||
|
@ -3522,7 +3522,7 @@ void ShowPedPos(void) {
|
|||
|
||||
GetPedPos(&min_ped, &min_point);
|
||||
sprintf(s, "Nearest pedestrian is #%d, point #%d", min_ped + 1, min_point + 1);
|
||||
NewTextHeadupSlot(4, 0, 3000, -1, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -1, s);
|
||||
}
|
||||
|
||||
// IDA: void __cdecl ShowPedPaths()
|
||||
|
|
|
@ -213,7 +213,7 @@ int GotPowerupX(tCar_spec* pCar, int pIndex, int pTell_net_players, int pDisplay
|
|||
return -1;
|
||||
}
|
||||
if (the_powerup->got_proc == NULL) {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, GetMiscString(kMiscString_UNAVAILABLE_IN_DEMO));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_UNAVAILABLE_IN_DEMO));
|
||||
return -1;
|
||||
}
|
||||
original_index = pIndex;
|
||||
|
@ -237,7 +237,7 @@ int GotPowerupX(tCar_spec* pCar, int pIndex, int pTell_net_players, int pDisplay
|
|||
s2 = strtok(NULL, "/");
|
||||
}
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, s2);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, s2);
|
||||
}
|
||||
the_powerup->car = pCar;
|
||||
if (the_powerup->got_proc != NULL) {
|
||||
|
@ -589,7 +589,7 @@ void ImprovePSPowerup(tCar_spec* pCar, int pIndex) {
|
|||
LOG_TRACE("(%p, %d)", pCar, pIndex);
|
||||
|
||||
pCar->power_up_levels[pIndex]++;
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, GetMiscString(kMiscString_APOGained_START + pIndex));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_APOGained_START + pIndex));
|
||||
}
|
||||
|
||||
// IDA: int __usercall GotTimeOrPower@<EAX>(tPowerup *pPowerup@<EAX>, tCar_spec *pCar@<EDX>)
|
||||
|
@ -622,7 +622,7 @@ int GotTimeOrPower(tPowerup* pPowerup, tCar_spec* pCar) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
NewTextHeadupSlot(4, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX));
|
||||
}
|
||||
}
|
||||
return GET_POWERUP_INDEX(pPowerup);
|
||||
|
|
|
@ -58,7 +58,7 @@ void TogglePratcam(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (gAusterity_mode) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_NOT_ENOUGH_MEMORY));
|
||||
} else {
|
||||
if (gWhirr_noise == 0 || !DRS3SoundStillPlaying(gWhirr_noise)) {
|
||||
DRS3StopSound(gWhirr_noise);
|
||||
|
|
|
@ -308,7 +308,7 @@ void ToggleReplay(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
if (!IsActionReplayAvailable()) {
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_ACTION_REPLAY_UNAVAILABLE));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_ACTION_REPLAY_UNAVAILABLE));
|
||||
return;
|
||||
}
|
||||
if (!gAction_replay_mode) {
|
||||
|
|
|
@ -1214,7 +1214,7 @@ void DustRotate(void) {
|
|||
if (gDust_rotate >= gNum_dust_tables) {
|
||||
gDust_rotate = 0;
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, "Dust colour rotated");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, "Dust colour rotated");
|
||||
}
|
||||
|
||||
// IDA: void __usercall RenderSmoke(br_pixelmap *pRender_screen@<EAX>, br_pixelmap *pDepth_buffer@<EDX>, br_actor *pCamera@<EBX>, br_matrix34 *pCamera_to_world@<ECX>, tU32 pTime)
|
||||
|
|
|
@ -155,7 +155,7 @@ void IncrementCheckpoint(void) {
|
|||
gLap++;
|
||||
if (gLap == gTotal_laps) {
|
||||
PratcamEvent(33); // FIXME: or PratcamEventNow
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_FinalLap));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_FinalLap));
|
||||
DRS3StartSound(gPedestrians_outlet, 8014);
|
||||
done_voice = 1;
|
||||
} else if (gLap > gTotal_laps) {
|
||||
|
@ -207,7 +207,7 @@ void WrongCheckpoint(int pCheckpoint_index) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_WrongCheckpoint));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_WrongCheckpoint));
|
||||
DRS3StartSound(gPedestrians_outlet, 8013);
|
||||
gLast_checkpoint_time = GetTotalTime();
|
||||
gLast_wrong_checkpoint = pCheckpoint_index;
|
||||
|
@ -299,7 +299,7 @@ void TotalRepair(void) {
|
|||
LOG_TRACE("()");
|
||||
|
||||
TotallyRepairCar();
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_InstantRepair));
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_InstantRepair));
|
||||
}
|
||||
|
||||
// IDA: void __cdecl DoLogos()
|
||||
|
@ -308,6 +308,14 @@ void DoLogos(void) {
|
|||
DoSCILogo();
|
||||
DoOpeningAnimation();
|
||||
DoStainlessLogo();
|
||||
#ifdef DETHRACE_FIX_BUGS
|
||||
/* StartMusic is only called in PlaySmackerFile when sound and cutscenes are enabled */
|
||||
if (!gSound_override && gCut_scene_override) {
|
||||
if (!harness_game_config.no_music) {
|
||||
StartMusic();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
gProgram_state.prog_status = eProg_opening;
|
||||
}
|
||||
|
||||
|
@ -700,7 +708,7 @@ void JumpTheStart(void) {
|
|||
DRS3StartSound(gPedestrians_outlet, 8016);
|
||||
SpendCredits(gJump_start_fine[gProgram_state.skill_level]);
|
||||
sprintf(s, "%s %d %s", GetMiscString(gProgram_state.frank_or_anniness == eFrankie ? kMiscString_BadBoy : kMiscString_BadGirl), gJump_start_fine[gProgram_state.skill_level], GetMiscString(kMiscString_CreditFine));
|
||||
NewTextHeadupSlot(4, 0, 1000, -4, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4272,7 +4272,7 @@ void AccessoryHeadup(br_actor* pActor, char* pPrefix) {
|
|||
if (pActor->identifier != NULL) {
|
||||
strcat(s, pActor->identifier);
|
||||
}
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
|
||||
}
|
||||
|
||||
// IDA: br_uint_32 __cdecl CalcHighestNonAmID(br_actor *pActor, int *pHighest)
|
||||
|
@ -4785,13 +4785,13 @@ void CycleAccRotate(void) {
|
|||
gCurrent_rotate_mode = (gCurrent_rotate_mode == eRotate_mode_z) ? eRotate_mode_x : (gCurrent_rotate_mode + 1);
|
||||
switch (gCurrent_rotate_mode) {
|
||||
case eRotate_mode_x:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: X");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: X");
|
||||
break;
|
||||
case eRotate_mode_y:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Y");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Y");
|
||||
break;
|
||||
case eRotate_mode_z:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Z");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Z");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4803,16 +4803,16 @@ void CycleAccScale(void) {
|
|||
gCurrent_scale_mode = (gCurrent_scale_mode == eScale_mode_z) ? eScale_mode_all : (gCurrent_scale_mode + 1);
|
||||
switch (gCurrent_scale_mode) {
|
||||
case eScale_mode_all:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: ALL");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: ALL");
|
||||
break;
|
||||
case eScale_mode_x:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: X");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: X");
|
||||
break;
|
||||
case eScale_mode_y:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Y");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Y");
|
||||
break;
|
||||
case eScale_mode_z:
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Z");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Z");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5159,7 +5159,7 @@ void DropSpecVol(int pIndex) {
|
|||
gLast_actor = gSpec_vol_actors[gProgram_state.special_volume_count - 1];
|
||||
UpdateSpecVol();
|
||||
sprintf(s, "Shat out special volume #%d (type %d)", gProgram_state.special_volume_count - 1, pIndex);
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
|
||||
SaveSpecialVolumes();
|
||||
fclose(f);
|
||||
}
|
||||
|
@ -5256,10 +5256,10 @@ void IdentifySpecVol(void) {
|
|||
}
|
||||
if (min_index < 0) {
|
||||
gLast_actor = NULL;
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "No special volumes to lock onto");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "No special volumes to lock onto");
|
||||
} else {
|
||||
sprintf(s, "Locked onto Special Volume #%d", min_index);
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, s);
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, s);
|
||||
gLast_actor = gSpec_vol_actors[min_index];
|
||||
}
|
||||
}
|
||||
|
@ -5304,7 +5304,7 @@ void DeleteSpecVol(void) {
|
|||
memmove(&gProgram_state.special_volumes[index], &gProgram_state.special_volumes[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(tSpecial_volume));
|
||||
memmove(&gSpec_vol_actors[index], &gSpec_vol_actors[index + 1], (gProgram_state.special_volume_count - index - 1) * sizeof(br_actor*));
|
||||
gProgram_state.special_volume_count--;
|
||||
NewTextHeadupSlot(4, 0, 2000, -2, "There's been a special volumes MURDER!!");
|
||||
NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "There's been a special volumes MURDER!!");
|
||||
gLast_actor = NULL;
|
||||
if (&gProgram_state.special_volumes[index] < gDefault_water_spec_vol) {
|
||||
gDefault_water_spec_vol--;
|
||||
|
|
|
@ -3,6 +3,25 @@
|
|||
|
||||
// These names are not part of the symbol dump, so the names in this file are not original, except as noted.
|
||||
|
||||
// Names derived from DATA/64X48X8/HEADUP.TXT (and context)
|
||||
typedef enum dr_headup_slot {
|
||||
eHeadupSlot_development = 0,
|
||||
eHeadupSlot_credits = 1,
|
||||
eHeadupSlot_ped_kills = 2,
|
||||
eHeadupSlot_ped_warning = 3,
|
||||
eHeadupSlot_misc = 4,
|
||||
eHeadupSlot_countdown = 5,
|
||||
eHeadupSlot_fancies = 6,
|
||||
eHeadupSlot_timer = 7,
|
||||
eHeadupSlot_lap_count = 8,
|
||||
eHeadupSlot_race_bonus = 9,
|
||||
eHeadupSlot_time_bonus = 10,
|
||||
eHeadupSlot_time_award = 11,
|
||||
eHeadupSlot_cars_out_count = 12,
|
||||
eHeadupSlot_cash_network = 13,
|
||||
eHeadupSlot_ped_network = 14,
|
||||
} dr_headup_slot;
|
||||
|
||||
// Names from `gMem_names`. See also: `CreateStainlessClasses`
|
||||
typedef enum dr_memory_classes {
|
||||
kMem_intf_pix_copy = 129, // 0x81
|
||||
|
|
|
@ -263,6 +263,9 @@ int Harness_ProcessCommandLine(int* argc, char* argv[]) {
|
|||
} else if (strcasecmp(argv[i], "--no-bind") == 0) {
|
||||
harness_game_config.no_bind = 1;
|
||||
handled = 1;
|
||||
} else if (strcasecmp(argv[i], "--no-music") == 0) {
|
||||
harness_game_config.no_music = 1;
|
||||
handled = 1;
|
||||
}
|
||||
|
||||
if (handled) {
|
||||
|
|
|
@ -44,6 +44,7 @@ typedef struct tHarness_game_config {
|
|||
int gore_check;
|
||||
int sound_options;
|
||||
int no_bind;
|
||||
int no_music;
|
||||
int verbose;
|
||||
|
||||
int install_signalhandler;
|
||||
|
|
Loading…
Reference in New Issue