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:
Anonymous Maarten 2024-10-14 21:30:02 +02:00 committed by GitHub
parent 22369744bb
commit a826a16d75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 267 additions and 236 deletions

View File

@ -1491,19 +1491,19 @@ void ToggleControls(void) {
} }
switch (gControl__car) { switch (gControl__car) {
case 0: case 0:
NewTextHeadupSlot(4, 0, 500, -1, "Original Controls"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Original Controls");
break; break;
case 1: case 1:
NewTextHeadupSlot(4, 0, 500, -1, "Accelerated steering"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Accelerated steering");
break; break;
case 2: case 2:
NewTextHeadupSlot(4, 0, 500, -1, "0.75 Accelerated"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.75 Accelerated");
break; break;
case 3: case 3:
NewTextHeadupSlot(4, 0, 500, -1, "0.5 Accelerated"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.5 Accelerated");
break; break;
default: default:
NewTextHeadupSlot(4, 0, 500, -1, "New controls"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "New controls");
break; break;
} }
} }
@ -3498,7 +3498,7 @@ int ExpandBoundingBox(tCar_spec* c) {
c->bounds[1].min.v[2] = min_z; c->bounds[1].min.v[2] = min_z;
c->bounds[1].max.v[2] = max_z; c->bounds[1].max.v[2] = max_z;
if (c->driver == eDriver_local_human) { 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; return 0;
} }
@ -4626,7 +4626,7 @@ void AmIGettingBoredWatchingCameraSpin(void) {
strcat(s, GetMiscString(kMiscString_RACE_LEADER)); strcat(s, GetMiscString(kMiscString_RACE_LEADER));
} }
headup_timer = GetRaceTime(); 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; n = 0;
} }
gCar_to_view = gNet_players[n].car; 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 { } else {
if (n >= gNum_viewable_cars) { if (n >= gNum_viewable_cars) {
n = 0; n = 0;
} }
gCar_to_view = gViewable_car_list[n]; 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; gCamera_yaw = 0;
InitialiseExternalCamera(); InitialiseExternalCamera();
@ -4685,9 +4685,9 @@ void ToggleCarToCarCollisions(void) {
gCar_car_collisions = !gCar_car_collisions; gCar_car_collisions = !gCar_car_collisions;
if (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 { } 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; c->down_force_speed = 2000.0;
} }
sprintf(s, "DownForceSpeed %f", c->down_force_speed); 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() // IDA: void __cdecl FreezeMechanics()
@ -4720,9 +4720,9 @@ void FreezeMechanics(void) {
gFreeze_mechanics = !gFreeze_mechanics; gFreeze_mechanics = !gFreeze_mechanics;
if (gFreeze_mechanics) { if (gFreeze_mechanics) {
NewTextHeadupSlot(4, 0, 3000, -4, "Mechanics Frozen"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Mechanics Frozen");
} else { } 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; gStop_opponents_moving = !gStop_opponents_moving;
if (gStop_opponents_moving == 0) { if (gStop_opponents_moving == 0) {
NewTextHeadupSlot(4, 0, 3000, -4, "Opponents in neutral"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Opponents in neutral");
} else { } else {
NewTextHeadupSlot(4, 0, 3000, -4, "Back in gear"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Back in gear");
} }
} }

View File

@ -571,7 +571,7 @@ void F4Key(void) {
} }
} }
sprintf(s, "Edit mode: %s", gEdit_mode_names[gWhich_edit_mode]); 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) { if (gWhich_edit_mode == eEdit_mode_spec_vol && old_edit_mode != eEdit_mode_spec_vol) {
ShowSpecialVolumes(); ShowSpecialVolumes();
} else if (gWhich_edit_mode != eEdit_mode_spec_vol && old_edit_mode == eEdit_mode_spec_vol) { } 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); LOG_TRACE("(%d)", i);
if (gNet_mode == eNet_mode_none) { 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; gI_am_cheating = i;
F4Key(); F4Key();
@ -766,7 +766,7 @@ void LookLeft(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (gAusterity_mode) { 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 { } else {
PratcamEvent(27); PratcamEvent(27);
gProgram_state.old_view = gProgram_state.which_view; gProgram_state.old_view = gProgram_state.which_view;
@ -807,7 +807,7 @@ void LookRight(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (gAusterity_mode) { 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 { } else {
PratcamEvent(28); PratcamEvent(28);
gProgram_state.old_view = gProgram_state.which_view; gProgram_state.old_view = gProgram_state.which_view;
@ -1074,7 +1074,7 @@ void ToggleCockpit(void) {
AdjustHeadups(); AdjustHeadups();
MungeForwardSky(); MungeForwardSky();
} else { } 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; gProgram_state.mirror_on = !gProgram_state.mirror_on;
ReinitialiseRearviewCamera(); ReinitialiseRearviewCamera();
if (gProgram_state.mirror_on) { if (gProgram_state.mirror_on) {
NewTextHeadupSlot(4, 0, 500, -4, GetMiscString(kMiscString_MirrorOn)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, GetMiscString(kMiscString_MirrorOn));
} else { } 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 (gProgram_state.current_car.time_to_recover) {
if (GetRaceTime() + 600 >= 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; gToo_late = 1;
} else { } else {
gProgram_state.current_car.time_to_recover = 0; 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; return;
} }
@ -1477,7 +1477,7 @@ void CheckRecoveryOfCars(tU32 pEndFrameTime) {
time = (gProgram_state.current_car.time_to_recover - pEndFrameTime + 1000) / 1000; 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)); sprintf(s, "%s %d %s", GetMiscString(kMiscString_RECOVERY_IN), time, time > 1 ? GetMiscString(kMiscString_SECONDS) : GetMiscString(kMiscString_SECOND));
if (!gToo_late) { 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) { if (gProgram_state.current_car.time_to_recover <= pEndFrameTime) {
RecoverCar(); RecoverCar();
@ -1602,15 +1602,15 @@ void CheckOtherRacingKeys(void) {
total_repair_cost += cost; total_repair_cost += cost;
if (total_repair_cost) { if (total_repair_cost) {
if (gFree_repairs) { if (gFree_repairs) {
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_RepairingForFree)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_RepairingForFree));
} else { } else {
sprintf(s, "%s %d", GetMiscString(kMiscString_RepairCostColon), total_repair_cost); sprintf(s, "%s %d", GetMiscString(kMiscString_RepairCostColon), total_repair_cost);
NewTextHeadupSlot(4, 0, 1000, -4, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, s);
} }
} }
} else { } else {
if (!stopped_repairing) { 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; gAuto_repair = 0;
stopped_repairing = 1; stopped_repairing = 1;
@ -1638,12 +1638,12 @@ void CheckOtherRacingKeys(void) {
gRecover_timer = 0; gRecover_timer = 0;
SetFlipUpCar(car); SetFlipUpCar(car);
if (gNet_mode != eNet_mode_none) { if (gNet_mode != eNet_mode_none) {
NewTextHeadupSlot(4, 0, 1500, -4, " "); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, " ");
} }
if (gRecovery_voucher_count != 0) { if (gRecovery_voucher_count != 0) {
gRecovery_voucher_count--; gRecovery_voucher_count--;
sprintf(s, "%s", GetMiscString(kMiscString_RecoveringForFree)); sprintf(s, "%s", GetMiscString(kMiscString_RecoveringForFree));
NewTextHeadupSlot(4, 0, 1500, -4, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
} else { } else {
if (gNet_mode) { if (gNet_mode) {
cost = gNet_recovery_cost[gCurrent_net_game->type]; cost = gNet_recovery_cost[gCurrent_net_game->type];
@ -1657,7 +1657,7 @@ void CheckOtherRacingKeys(void) {
cost = gRecovery_cost[gProgram_state.skill_level]; cost = gRecovery_cost[gProgram_state.skill_level];
} }
sprintf(s, "%s %d", GetMiscString(kMiscString_RecoveryCostColon), cost); sprintf(s, "%s %d", GetMiscString(kMiscString_RecoveryCostColon), cost);
NewTextHeadupSlot(4, 0, 1500, -4, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
LoseSomePSPowerups(2); LoseSomePSPowerups(2);
} }
CancelPendingCunningStunt(); CancelPendingCunningStunt();
@ -1678,7 +1678,7 @@ int CheckRecoverCost(void) {
} }
gProgram_state.credits_earned = 0; gProgram_state.credits_earned = 0;
gProgram_state.credits_lost = 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); DoFancyHeadup(kFancyHeadupNetworkRaceNoMoreMoney);
KnackerThisCar(&gProgram_state.current_car); KnackerThisCar(&gProgram_state.current_car);
SendGameplayToHost(eNet_gameplay_suicide, 0, 0, 0, 0); SendGameplayToHost(eNet_gameplay_suicide, 0, 0, 0, 0);
@ -2106,9 +2106,9 @@ void ToggleFlying(void) {
if (gAllow_car_flying && gNet_mode == eNet_mode_none) { if (gAllow_car_flying && gNet_mode == eNet_mode_none) {
gCar_flying = !gCar_flying; gCar_flying = !gCar_flying;
if (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 { } else {
NewTextHeadupSlot(4, 0, 500, -4, "Back down to Earth"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -4, "Back down to Earth");
} }
} else { } else {
gCar_flying = 0; gCar_flying = 0;
@ -2121,9 +2121,9 @@ void ToggleInvulnerability(void) {
gProgram_state.current_car.invulnerable = !gProgram_state.current_car.invulnerable; gProgram_state.current_car.invulnerable = !gProgram_state.current_car.invulnerable;
if (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 { } 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; gFreeze_timer = !gFreeze_timer;
if (gFreeze_timer) { if (gFreeze_timer) {
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_TimerFrozen)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_TimerFrozen));
} else { } 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 (gMap_mode == 0) {
if (!gAction_replay_mode) { 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) { 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) { } 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 { } else {
old_indent = gRender_indent; old_indent = gRender_indent;
gRender_indent = 0; gRender_indent = 0;
@ -2263,13 +2263,13 @@ void CycleCarTexturingLevel(void) {
SetCarTexturingLevel(new_level); SetCarTexturingLevel(new_level);
switch (new_level) { switch (new_level) {
case eCTL_none: case eCTL_none:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoCarTextures)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoCarTextures));
break; break;
case eCTL_transparent: case eCTL_transparent:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TransparentCarTexturesOnly)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TransparentCarTexturesOnly));
break; break;
case eCTL_full: case eCTL_full:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_FullCarTextures)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_FullCarTextures));
break; break;
case eCTL_count: case eCTL_count:
break; break;
@ -2286,13 +2286,13 @@ void CycleWallTexturingLevel(void) {
SetWallTexturingLevel(new_level); SetWallTexturingLevel(new_level);
switch (new_level) { switch (new_level) {
case eWTL_none: case eWTL_none:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoWallTextures)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoWallTextures));
break; break;
case eWTL_linear: case eWTL_linear:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_LinearWallTextures)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_LinearWallTextures));
break; break;
case eWTL_full: case eWTL_full:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_BestWallTextures)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_BestWallTextures));
break; break;
case eWTL_count: case eWTL_count:
break; break;
@ -2308,9 +2308,9 @@ void CycleRoadTexturingLevel(void) {
ReallySetRoadTexturingLevel(new_level); ReallySetRoadTexturingLevel(new_level);
SetRoadTexturingLevel(new_level); SetRoadTexturingLevel(new_level);
if (new_level == eRTL_none) { 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) { } 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); SetYonFactor(new_factor);
if (new_factor > .75f) { 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) { } 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) { } else if (new_factor > .187f) {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_TrackQppearsQuiteLate)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_TrackQppearsQuiteLate));
} else { } 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); SetSoundDetailLevel(new_level);
switch (new_level) { switch (new_level) {
case 0: case 0:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_FewestSounds)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_FewestSounds));
break; break;
case 1: case 1:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_PartialSound)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_PartialSound));
break; break;
case 2: case 2:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AllSounds)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AllSounds));
break; break;
} }
} }
@ -2392,7 +2392,7 @@ void CycleCarSimplificationLevel(void) {
src = GetMiscString(kMiscString_CarSimplificationLevel_D); src = GetMiscString(kMiscString_CarSimplificationLevel_D);
dst = BrMemAllocate(strlen(src), kMem_simp_level); dst = BrMemAllocate(strlen(src), kMem_simp_level);
sprintf(dst, src, gCar_simplification_level); sprintf(dst, src, gCar_simplification_level);
NewTextHeadupSlot(4, 0, 2000, -4, dst); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, dst);
BrMemFree(dst); BrMemFree(dst);
} }
@ -2405,12 +2405,12 @@ void ToggleAccessoryRendering(void) {
on = !GetAccessoryRendering(); on = !GetAccessoryRendering();
SetAccessoryRendering(on); SetAccessoryRendering(on);
if (on) { if (on) {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOn)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOn));
} else { } else {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOff)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_AccessoriesOff));
} }
} else { } 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); ReallySetSmokeOn(on);
SetSmokeOn(on); SetSmokeOn(on);
if (on) { if (on) {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SmokeOn)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SmokeOn));
} else { } 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'; gString[COUNT_OF(gString) - 1] = '\0';
NetSendHeadupToAllPlayers(the_message); NetSendHeadupToAllPlayers(the_message);
gString[20] = '\0'; 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; about_to_die = 1;
} }
break; break;

View File

@ -510,7 +510,7 @@ void CheckLastCar(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (gNet_mode == eNet_mode_none && GetCarCount(eVehicle_opponent) != 0 && NumberOfOpponentsLeft() == 0) { 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); RaceCompleted(eRace_over_opponents);
} }
} }

View File

@ -690,7 +690,7 @@ void LessDepthFactor(void) {
gProgram_state.current_depth_effect.start--; gProgram_state.current_depth_effect.start--;
} }
sprintf(s, "Depth start reduced to %d", 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; 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++; gProgram_state.current_depth_effect.start++;
} }
sprintf(s, "Depth start increased to %d", 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; 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++; gProgram_state.current_depth_effect.end++;
} }
sprintf(s, "Depth end reduced to %d", 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; 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--; gProgram_state.current_depth_effect.end--;
} }
sprintf(s, "Depth end increased to %d", 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; 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; camera_ptr = gCamera_list[1]->type_data;
i = (int)camera_ptr->yon_z; i = (int)camera_ptr->yon_z;
sprintf(s, GetMiscString(kMiscString_YonIncreasedTo_D), i); sprintf(s, GetMiscString(kMiscString_YonIncreasedTo_D), i);
NewTextHeadupSlot(4, 0, 2000, -4, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, s);
} }
// IDA: void __cdecl DecreaseYon() // IDA: void __cdecl DecreaseYon()
@ -775,7 +775,7 @@ void DecreaseYon(void) {
camera_ptr = gCamera_list[1]->type_data; camera_ptr = gCamera_list[1]->type_data;
i = (int)camera_ptr->yon_z; i = (int)camera_ptr->yon_z;
sprintf(s, GetMiscString(kMiscString_YonDecreasedTo_D), i); 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) // IDA: void __cdecl SetYon(br_scalar pYon)
@ -822,7 +822,7 @@ void IncreaseAngle(void) {
#else #else
sprintf(s, "Camera angle increased to %d", gProgram_state.current_depth_effect.end); sprintf(s, "Camera angle increased to %d", gProgram_state.current_depth_effect.end);
#endif #endif
NewTextHeadupSlot(4, 0, 500, -1, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, s);
} }
} }
@ -844,7 +844,7 @@ void DecreaseAngle(void) {
#else #else
sprintf(s, "Camera angle decreased to %d", gProgram_state.current_depth_effect.end); sprintf(s, "Camera angle decreased to %d", gProgram_state.current_depth_effect.end);
#endif #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) { switch (gProgram_state.current_depth_effect.type) {
case eDepth_effect_none: case eDepth_effect_none:
InstantDepthChange(eDepth_effect_darkness, gProgram_state.current_depth_effect.sky_texture, 8, 0); 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; break;
case eDepth_effect_darkness: case eDepth_effect_darkness:
InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0); 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); 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; break;
case eDepth_effect_fog: case eDepth_effect_fog:
InstantDepthChange(eDepth_effect_none, gProgram_state.current_depth_effect.sky_texture, 0, 0); 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; break;
} }
gProgram_state.default_depth_effect.type = gProgram_state.current_depth_effect.type; gProgram_state.default_depth_effect.type = gProgram_state.current_depth_effect.type;
@ -921,11 +921,11 @@ void ToggleSky(void) {
SetSkyTextureOn(!GetSkyTextureOn()); SetSkyTextureOn(!GetSkyTextureOn());
if (gProgram_state.current_depth_effect.sky_texture != NULL) { 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) { } else if (gSwap_sky_texture != NULL) {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOff)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_SkyTextureOff));
} else { } 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()); SetDepthCueingOn(!GetDepthCueingOn());
if (gProgram_state.current_depth_effect.type != eDepth_effect_none) { 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) { } 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 { } else {
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoDepthCueingForThisRace)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ThereIsNoDepthCueingForThisRace));
} }
} }

View File

@ -349,7 +349,7 @@ void DoHeadups(tU32 pThe_time) {
DoNetScores(); DoNetScores();
} }
if (gQueued_headup_count && PDGetTotalTime() - gLast_centre_headup >= 1000) { 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].lifetime,
gQueued_headups[0].font_index, gQueued_headups[0].font_index,
gQueued_headups[0].text); gQueued_headups[0].text);
@ -476,7 +476,7 @@ void DoHeadups(tU32 pThe_time) {
0, 0,
the_headup->data.fancy_info.image->width, the_headup->data.fancy_info.image->width,
the_headup->data.fancy_info.image->height, the_headup->data.fancy_info.image->height,
-65536); -BrIntToFixed(1));
break; break;
case eFancy_stage_halting: case eFancy_stage_halting:
time_factor = 1000 * (pThe_time - the_headup->data.fancy_info.start_time) / 100; time_factor = 1000 * (pThe_time - the_headup->data.fancy_info.start_time) / 100;
@ -495,7 +495,7 @@ void DoHeadups(tU32 pThe_time) {
0, 0,
the_headup->data.image_info.image->width, the_headup->data.image_info.image->width,
the_headup->data.image_info.image->height, 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); / the_headup->data.image_info.image->height);
} else { } else {
#if DETHRACE_FIX_BUGS #if DETHRACE_FIX_BUGS
@ -510,7 +510,7 @@ void DoHeadups(tU32 pThe_time) {
0, 0,
the_headup->data.image_info.image->width, the_headup->data.image_info.image->width,
the_headup->data.image_info.image->height, 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); / the_headup->data.image_info.image->height);
} }
break; break;
@ -546,8 +546,8 @@ void DoHeadups(tU32 pThe_time) {
0, 0,
the_headup->data.image_info.image->width, the_headup->data.image_info.image->width,
the_headup->data.image_info.image->height, the_headup->data.image_info.image->height,
-(((time_factor * the_headup->data.fancy_info.shear_amount / 1000) << 16) -BrIntToFixed(time_factor * the_headup->data.fancy_info.shear_amount / 1000)
/ the_headup->data.image_info.image->height)); / the_headup->data.image_info.image->height);
break; break;
case eFancy_stage_leaving: case eFancy_stage_leaving:
the_headup->data.fancy_info.offset -= 500 * gFrame_period / 1000; the_headup->data.fancy_info.offset -= 500 * gFrame_period / 1000;
@ -563,7 +563,7 @@ void DoHeadups(tU32 pThe_time) {
0, 0,
the_headup->data.image_info.image->width, the_headup->data.image_info.image->width,
the_headup->data.image_info.image->height, the_headup->data.image_info.image->height,
-65536); -BrIntToFixed(1));
} }
break; break;
default: default:
@ -878,7 +878,7 @@ void DoFancyHeadup(int pIndex) {
the_time = GetTotalTime(); the_time = GetTotalTime();
if (!gMap_mode && (gLast_fancy_index < 0 || the_time - gLast_fancy_time > 2000 || gLast_fancy_index <= pIndex)) { 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) { if (temp_ref >= 0) {
gLast_fancy_headup = temp_ref; gLast_fancy_headup = temp_ref;
gLast_fancy_index = pIndex; 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)); sprintf(s, "%s%s %d %s", GetMiscString(kMiscString_Lost), pPrefix_text, -pAmount, GetMiscString(kMiscString_Credits));
gProgram_state.credits_lost -= original_amount; 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; gLast_earn_time = the_time;
} }
@ -1471,7 +1471,7 @@ void AwardTime(tU32 pTime) {
gTimer += original_amount * 1000; gTimer += original_amount * 1000;
s[0] = '+'; s[0] = '+';
TimerString(1000 * pTime, &s[1], 0, 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; gLast_time_earn_time = the_time;
} }

View File

@ -3009,16 +3009,16 @@ void ToggleShadow(void) {
} }
switch (gShadow_level) { switch (gShadow_level) {
case eShadow_none: case eShadow_none:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_NoShadows)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_NoShadows));
break; break;
case eShadow_us_only: case eShadow_us_only:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderOwnCar)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderOwnCar));
break; break;
case eShadow_us_and_opponents: case eShadow_us_and_opponents:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderMainCars)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderMainCars));
break; break;
case eShadow_everyone: case eShadow_everyone:
NewTextHeadupSlot(4, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderAllCars)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, GetMiscString(kMiscString_ShadowUnderAllCars));
break; break;
default: default:
return; return;
@ -3089,9 +3089,9 @@ void ShadowMode(void) {
gFancy_shadow = !gFancy_shadow; gFancy_shadow = !gFancy_shadow;
if (gFancy_shadow) { if (gFancy_shadow) {
NewTextHeadupSlot(4, 0, 2000, -4, "Translucent shadow"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, "Translucent shadow");
} else { } else {
NewTextHeadupSlot(4, 0, 2000, -4, "Solid shadow"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -4, "Solid shadow");
} }
} }

View File

@ -534,7 +534,7 @@ void InitRace(void) {
PossibleService(); PossibleService();
// TODO: dword_55142C = 0; // TODO: dword_55142C = 0;
gStart_race_sent = 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 (TranslationMode()) {
if (gAusterity_mode) { if (gAusterity_mode) {
FlushInterfaceFonts(); FlushInterfaceFonts();
@ -555,15 +555,15 @@ void InitRace(void) {
gMap_mode = 0; gMap_mode = 0;
gProgram_state.cockpit_image_index = 0; gProgram_state.cockpit_image_index = 0;
if (gNet_mode != eNet_mode_none) { if (gNet_mode != eNet_mode_none) {
gNet_cash_headup = NewTextHeadupSlot(13, 0, 0, -6, ""); gNet_cash_headup = NewTextHeadupSlot(eHeadupSlot_cash_network, 0, 0, -6, "");
gNet_ped_headup = NewTextHeadupSlot(14, 0, 0, -6, ""); gNet_ped_headup = NewTextHeadupSlot(eHeadupSlot_ped_network, 0, 0, -6, "");
} else { } else {
gCredits_won_headup = NewTextHeadupSlot(1, 0, 0, -6, ""); gCredits_won_headup = NewTextHeadupSlot(eHeadupSlot_credits, 0, 0, -6, "");
gPed_kill_count_headup = NewTextHeadupSlot(2, 0, 0, -6, ""); gPed_kill_count_headup = NewTextHeadupSlot(eHeadupSlot_ped_kills, 0, 0, -6, "");
gCar_kill_count_headup = NewTextHeadupSlot(12, 0, 0, -6, ""); gCar_kill_count_headup = NewTextHeadupSlot(eHeadupSlot_cars_out_count, 0, 0, -6, "");
gTimer_headup = NewTextHeadupSlot(7, 0, 0, -5, ""); gTimer_headup = NewTextHeadupSlot(eHeadupSlot_timer, 0, 0, -5, "");
gTime_awarded_headup = NewTextHeadupSlot(11, 0, 0, -2, ""); gTime_awarded_headup = NewTextHeadupSlot(eHeadupSlot_time_award, 0, 0, -2, "");
gLaps_headup = NewTextHeadupSlot(8, 0, 0, -6, ""); gLaps_headup = NewTextHeadupSlot(eHeadupSlot_lap_count, 0, 0, -6, "");
} }
PossibleService(); PossibleService();
gProgram_state.which_view = eView_forward; gProgram_state.which_view = eView_forward;

View File

@ -194,7 +194,7 @@ void MungeHeadups(void) {
} }
if (gCountdown != new_countdown && new_countdown <= 5) { if (gCountdown != new_countdown && new_countdown <= 5) {
gCountdown = new_countdown; gCountdown = new_countdown;
NewImageHeadupSlot(5, 0, 800, new_countdown + 4); NewImageHeadupSlot(eHeadupSlot_countdown, 0, 800, new_countdown + 4);
DRS3StartSound(gPedestrians_outlet, gCountdown + 8000); DRS3StartSound(gPedestrians_outlet, gCountdown + 8000);
if (!new_countdown) { if (!new_countdown) {
MakeFlagWavingBastardWaveHisFlagWhichIsTheProbablyTheLastThingHeWillEverDo(); MakeFlagWavingBastardWaveHisFlagWhichIsTheProbablyTheLastThingHeWillEverDo();
@ -468,8 +468,8 @@ int MungeRaceFinished(void) {
return 1; return 1;
} }
gRace_finished = 15 * gTimer + 4500; gRace_finished = 15 * gTimer + 4500;
gRace_bonus_headup = NewTextHeadupSlot(9, 0, 0, -4, ""); gRace_bonus_headup = NewTextHeadupSlot(eHeadupSlot_race_bonus, 0, 0, -4, "");
gTime_bonus_headup = NewTextHeadupSlot(10, 0, 0, -4, ""); gTime_bonus_headup = NewTextHeadupSlot(eHeadupSlot_time_bonus, 0, 0, -4, "");
gTime_bonus = 0; gTime_bonus = 0;
gTime_bonus_start = GetTotalTime(); gTime_bonus_start = GetTotalTime();
gTime_bonus_state = eTime_bonus_initial_pause; gTime_bonus_state = eTime_bonus_initial_pause;

View File

@ -649,22 +649,22 @@ void DoNetworkHeadups(int pCredits) {
if (gNot_shown_race_type_headup) { if (gNot_shown_race_type_headup) {
gNot_shown_race_type_headup = 0; 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()) { if (gTime_for_punishment && gTime_for_punishment <= PDGetTotalTime()) {
gTime_for_punishment = 0; gTime_for_punishment = 0;
switch (gCurrent_net_game->type) { switch (gCurrent_net_game->type) {
case eNet_game_type_carnage: 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; break;
case eNet_game_type_checkpoint: 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; break;
case eNet_game_type_sudden_death: 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; break;
case eNet_game_type_foxy: 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; break;
default: default:
break; break;
@ -1410,7 +1410,7 @@ void BuyPSPowerup(int pIndex) {
LOG_TRACE("(%d)", pIndex); LOG_TRACE("(%d)", pIndex);
if (gNet_mode == eNet_mode_none) { 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) { } 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)) { 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]]); 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)); strcpy(s, GetMiscString(kMiscString_CANNOT_AFFORD_IT));
sprintf(s2, "%d", gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]); sprintf(s2, "%d", gPowerup_cost[gProgram_state.current_car.power_up_levels[pIndex]]);
SubsStringJob(s, s2); SubsStringJob(s, s2);
NewTextHeadupSlot(4, 0, 3008, -4, s); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3008, -4, s);
} }
} else { } 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("()"); LOG_TRACE("()");
if (gNet_mode != eNet_mode_none && gCurrent_net_game->type == eNet_game_type_foxy && gThis_net_player_index == gIt_or_fox) { 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) { } 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 { } else {
BuyPSPowerup(1); BuyPSPowerup(1);
} }

View File

@ -185,7 +185,7 @@ void NetSendHeadupToEverybody(char* pMessage) {
return; return;
} }
if (gProgram_state.racing) { if (gProgram_state.racing) {
NewTextHeadupSlot(4, 0, 3000, -4, pMessage); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pMessage);
} }
the_contents = NetGetBroadcastContents(NETMSGID_HEADUP, 0); the_contents = NetGetBroadcastContents(NETMSGID_HEADUP, 0);
strcpy(the_contents->data.headup.text, pMessage); strcpy(the_contents->data.headup.text, pMessage);
@ -201,7 +201,7 @@ void NetSendHeadupToPlayer(char* pMessage, tPlayer_ID pPlayer) {
} }
if (gLocal_net_ID == pPlayer) { if (gLocal_net_ID == pPlayer) {
if (gProgram_state.racing) { if (gProgram_state.racing) {
NewTextHeadupSlot(4, 0, 3000, -4, pMessage); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pMessage);
} }
} else { } else {
message = NetBuildMessage(NETMSGID_HEADUP, 0); message = NetBuildMessage(NETMSGID_HEADUP, 0);
@ -1487,7 +1487,7 @@ void ReceivedHeadup(tNet_contents* pContents) {
LOG_TRACE("(%p)", pContents); LOG_TRACE("(%p)", pContents);
if (gProgram_state.racing) { 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 { } else {
sprintf(s, "%s %s %s", victim->player_name, GetMiscString(kMiscString_WastedBy), culprit ? culprit->player_name : GetMiscString(kMiscString_COP)); 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_wasty_message_time = PDGetTotalTime();
last_culprit = culprit; last_culprit = culprit;
last_victim = victim; last_victim = victim;
@ -1891,7 +1891,7 @@ void CheckForDisappearees(void) {
NetSendHeadupToAllPlayers(s); NetSendHeadupToAllPlayers(s);
KickPlayerOut(gNet_players[i].ID); KickPlayerOut(gNet_players[i].ID);
if (gProgram_state.racing) { 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(); pMessage->senders_time_stamp = PDGetTotalTime();
if (gNext_guarantee >= COUNT_OF(gGuarantee_list)) { if (gNext_guarantee >= COUNT_OF(gGuarantee_list)) {
sprintf(buffer, "Guarantee list full %d", pMessage->contents.header.type); 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; pMessage->guarantee_number = 0;
return 0; return 0;
} }

View File

@ -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.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]; 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) { 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 { } else {
pOpponent_spec->car_spec->brake_force = 15.f * pOpponent_spec->car_spec->M; 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++) { for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) {
ObjectiveComplete(&gProgram_state.AI_vehicles.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 { } else {
for (i = 0; i < gProgram_state.AI_vehicles.number_of_opponents; i++) { for (i = 0; i < gProgram_state.AI_vehicles.number_of_opponents; i++) {
gProgram_state.AI_vehicles.opponents[i].physics_me = 0; gProgram_state.AI_vehicles.opponents[i].physics_me = 0;
@ -3068,7 +3068,7 @@ void ToggleOpponentProcessing(void) {
} }
gActive_car_list_rebuild_required = 1; gActive_car_list_rebuild_required = 1;
RebuildActiveCarList(); 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; gMellow_opponents = !gMellow_opponents;
if (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++) { for (i = 0; i < gProgram_state.AI_vehicles.number_of_opponents; i++) {
ObjectiveComplete(&gProgram_state.AI_vehicles.opponents[i]); ObjectiveComplete(&gProgram_state.AI_vehicles.opponents[i]);
} }
} else { } 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; 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>) // 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) { if (gOppo_paths_shown) {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (!gAlready_elasticating && distance > 10.f) { 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 { } 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); 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); 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])); (int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].max_speed[0]));
} }
ShowOppoPaths(); 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) { if (!gAlready_elasticating) {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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; return;
} }
} else { } else {
@ -3376,7 +3376,7 @@ void RecalcNearestPathSectionWidth(br_scalar pAdjustment) {
} }
ShowOppoPaths(); ShowOppoPaths();
sprintf(str, "Width %2.1f BRU", 2.f * gProgram_state.AI_vehicles.path_sections[section_no].width); 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) { if (gOppo_path_actor != NULL) {
gOppo_path_actor->render_style = BR_RSTYLE_NONE; 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 { } else {
RebuildOppoPathModel(); RebuildOppoPathModel();
sprintf(str, "Total %d nodes, %d sections", sprintf(str, "Total %d nodes, %d sections",
gProgram_state.AI_vehicles.number_of_path_nodes, gProgram_state.AI_vehicles.number_of_path_nodes,
gProgram_state.AI_vehicles.number_of_path_sections); gProgram_state.AI_vehicles.number_of_path_sections);
NewTextHeadupSlot(4, 0, 1000, -1, str); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -1, str);
} }
if (ConsistencyCheck()) { if (ConsistencyCheck()) {
WriteOutOppoPaths(); WriteOutOppoPaths();
@ -3976,16 +3976,16 @@ void DropElasticateyNode(void) {
gMobile_section = ReallocExtraPathSections(1); gMobile_section = ReallocExtraPathSections(1);
} else { } else {
if (!gOppo_paths_shown) { 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; return;
} }
if (gProgram_state.AI_vehicles.number_of_path_nodes == 0) { 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; return;
} }
old_node = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); old_node = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
if (distance > 10.f) { 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; return;
} }
original_type = 0; original_type = 0;
@ -4024,7 +4024,7 @@ void DropElasticateyNode(void) {
gProgram_state.AI_vehicles.path_nodes[old_node].number_of_sections += 1; gProgram_state.AI_vehicles.path_nodes[old_node].number_of_sections += 1;
ShowOppoPaths(); ShowOppoPaths();
sprintf(str, "New section #%d, new node #%d", gMobile_section, new_node); 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() // IDA: void __cdecl InsertAndElasticate()
@ -4059,7 +4059,7 @@ void InsertAndElasticate(void) {
not_perp = 1; not_perp = 1;
} }
if (not_perp || distance > 10.f) { 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 { } else {
new_section = ReallocExtraPathSections(1); new_section = ReallocExtraPathSections(1);
if (gAlready_elasticating) { if (gAlready_elasticating) {
@ -4096,7 +4096,7 @@ void InsertAndElasticate(void) {
ShowOppoPaths(); ShowOppoPaths();
sprintf(str, "New section %d, new node #%d inserted into section #%d", sprintf(str, "New section %d, new node #%d inserted into section #%d",
gMobile_section, inserted_node, section_no); 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; not_perp = 1;
} }
if (not_perp || distance > 10.f) { 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 { } else {
if (gAlready_elasticating) { if (gAlready_elasticating) {
gAlready_elasticating = 0; gAlready_elasticating = 0;
@ -4137,7 +4137,7 @@ void InsertAndDontElasticate(void) {
InsertThisNodeInThisSectionHere(inserted_node, section_no, &gSelf->t.t.translate.t); InsertThisNodeInThisSectionHere(inserted_node, section_no, &gSelf->t.t.translate.t);
ShowOppoPaths(); ShowOppoPaths();
sprintf(str, "New node #%d inserted into section #%d", inserted_node, section_no); 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", sprintf(str, "New section #%d, finish node #%d",
gMobile_section, gMobile_section,
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]); 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) { if (gAlready_elasticating) {
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); 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) { 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)) { } 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)); 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 { } else {
gAlready_elasticating = 0; gAlready_elasticating = 0;
gProgram_state.AI_vehicles.number_of_path_nodes -= 1; 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", sprintf(str, "New section #%d, attached to existing node #%d",
gMobile_section, gMobile_section,
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]); 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 (gOppo_paths_shown) {
if (gAlready_elasticating) { 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 { } else {
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
if (distance > 10.f) { 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 { } else {
BrVector3Copy(&gProgram_state.AI_vehicles.path_nodes[node_no].p, &gSelf->t.t.translate.t); BrVector3Copy(&gProgram_state.AI_vehicles.path_nodes[node_no].p, &gSelf->t.t.translate.t);
ShowOppoPaths(); ShowOppoPaths();
NewTextHeadupSlot(4, 0, 2000, -1, "Bing!"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Bing!");
} }
} }
} }
@ -4273,20 +4273,20 @@ void ShowNodeInfo(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } else if (gAlready_elasticating) {
sprintf(str, "Next point will be #%d", sprintf(str, "Next point will be #%d",
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]); 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 { } else {
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
if (distance > 10.f) { 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 { } else {
sprintf(str, "Nearest node #%d has %d attached sections", sprintf(str, "Nearest node #%d has %d attached sections",
node_no, node_no,
gProgram_state.AI_vehicles.path_nodes[node_no].number_of_sections); 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("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } else if (gAlready_elasticating) {
sprintf(str, "This section will be #%d attached to nodes #%d and #%d", sprintf(str, "This section will be #%d attached to nodes #%d and #%d",
gMobile_section, gMobile_section,
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0], gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0],
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]); 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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
sprintf(str, "Nearest section #%d, start node #%d, finish node #%d", sprintf(str, "Nearest section #%d, start node #%d, finish node #%d",
section_no, section_no,
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0], gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[0],
gProgram_state.AI_vehicles.path_sections[gMobile_section].node_indices[1]); 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("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } else if (gAlready_elasticating) {
sprintf(str, "Towards start - min %d max %d, finish - min %d, max %d mph", 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].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].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].min_speed[1]),
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[gMobile_section].max_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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
sprintf(str, "Towards start - min %d max %d, finish - min %d, max %d mph", 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].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].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].min_speed[1]),
(int)(2.2f * gProgram_state.AI_vehicles.path_sections[section_no].max_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("()"); LOG_TRACE("()");
if (gOppo_paths_shown == 0) { 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) { } 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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
DeleteSection(section_no); DeleteSection(section_no);
DeleteOrphanNodes(); DeleteOrphanNodes();
ShowOppoPaths(); ShowOppoPaths();
NewTextHeadupSlot(4, 0, 2000, -1, "Pop!"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Pop!");
} }
} }
} }
@ -4387,18 +4387,18 @@ void DeleteOppoPathNodeAndSections(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
if (distance > 10.f) { 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 { } else {
DeleteNode(node_no, 1); DeleteNode(node_no, 1);
DeleteOrphanNodes(); DeleteOrphanNodes();
ShowOppoPaths(); ShowOppoPaths();
NewTextHeadupSlot(4, 0, 2000, -1, "Blam!"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Blam!");
} }
} }
} }
@ -4410,15 +4410,15 @@ void DeleteOppoPathNodeAndJoin(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance); node_no = FindNearestPathNode(&gSelf->t.t.translate.t, &distance);
if (distance > 10.f) { 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) { } 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 } 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[1] == node_no)
|| (gProgram_state.AI_vehicles.path_sections[gProgram_state.AI_vehicles.path_nodes[node_no].sections[1]].node_indices[0] == 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(); DeleteOrphanNodes();
ConsistencyCheck(); ConsistencyCheck();
ShowOppoPaths(); ShowOppoPaths();
NewTextHeadupSlot(4, 0, 2000, -1, "Blam!"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Blam!");
} else { } 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("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
temp = gProgram_state.AI_vehicles.path_sections[section_no].node_indices[0]; 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]; 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("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
gProgram_state.AI_vehicles.path_sections[section_no].type = (gProgram_state.AI_vehicles.path_sections[section_no].type + 1) % 3; 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]); sprintf(str, "%s section", gPath_section_type_names[gProgram_state.AI_vehicles.path_sections[section_no].type]);
ShowOppoPaths(); ShowOppoPaths();
NewTextHeadupSlot(4, 0, 2000, -1, str); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
} }
} }
} }
@ -4507,13 +4507,13 @@ void ToggleOneWayNess(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance); section_no = FindNearestPathSection(&gSelf->t.t.translate.t, &direction_v, &intersect, &distance);
if (distance > 10.f) { 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 { } else {
if (gProgram_state.AI_vehicles.path_sections[section_no].one_way) { if (gProgram_state.AI_vehicles.path_sections[section_no].one_way) {
gProgram_state.AI_vehicles.path_sections[section_no].one_way = 0; gProgram_state.AI_vehicles.path_sections[section_no].one_way = 0;
@ -4522,9 +4522,9 @@ void ToggleOneWayNess(void) {
} }
ShowOppoPaths(); ShowOppoPaths();
if (gProgram_state.AI_vehicles.path_sections[section_no].one_way) { 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 { } 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 = -1;
closest_distance = FLT_MAX; closest_distance = FLT_MAX;
if (!gOppo_paths_shown) { if (!gOppo_paths_shown) {
NewTextHeadupSlot(4, 0, 2000, -1, "Show paths first (F5)"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Show paths first (F5)");
} else { } else {
for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) { 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]); 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) { 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 { } else {
sprintf(str, "Nearest cop start point #%d", closest); 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("()"); LOG_TRACE("()");
if (!gOppo_paths_shown) { 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) { } 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 { } else {
if (gProgram_state.AI_vehicles.number_of_cops < COUNT_OF(gProgram_state.AI_vehicles.cop_start_points)) { 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); 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; gProgram_state.AI_vehicles.number_of_cops += 1;
ShowOppoPaths(); 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)); 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 { } else {
sprintf(str, "Sorry, no more than %d cop start points", (int)COUNT_OF(gProgram_state.AI_vehicles.cop_start_points)); 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 = -1;
closest_distance = FLT_MAX; closest_distance = FLT_MAX;
if (!gOppo_paths_shown) { 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) { } 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 { } else {
for (i = 0; i < gProgram_state.AI_vehicles.number_of_cops; i++) { 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]); 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) { 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 { } else {
for (i = closest; i < gProgram_state.AI_vehicles.number_of_cops - 1; i++) { for (i = closest; i < gProgram_state.AI_vehicles.number_of_cops - 1; i++) {
BrVector3Copy(&gProgram_state.AI_vehicles.cop_start_points[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; gProgram_state.AI_vehicles.number_of_cops -= 1;
ShowOppoPaths(); ShowOppoPaths();
sprintf(str, "Deleted cop start point #%d", closest); sprintf(str, "Deleted cop start point #%d", closest);
NewTextHeadupSlot(4, 0, 2000, -1, str); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, str);
} }
} }
} }

View File

@ -203,9 +203,9 @@ void TogglePedestrians(void) {
if (!gProgram_state.sausage_eater_mode) { if (!gProgram_state.sausage_eater_mode) {
gPedestrians_on = !gPedestrians_on; gPedestrians_on = !gPedestrians_on;
if (gPedestrians_on) { if (gPedestrians_on) {
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_LetTheCarnageContinue)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_LetTheCarnageContinue));
} else { } 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("()"); LOG_TRACE("()");
if (gNet_mode == eNet_mode_none && gProgram_state.peds_killed >= gTotal_peds) { 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); RaceCompleted(eRace_over_peds);
} }
} }
@ -3180,7 +3180,7 @@ void NewPed(int pRef_num) {
gNumber_of_pedestrians++; gNumber_of_pedestrians++;
gTotal_peds++; gTotal_peds++;
sprintf(s, "New pedestrian, refnum = %d", pRef_num); 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) { if (pRef_num >= 100) {
DropInitPedPoint(); DropInitPedPoint();
NewPed(-1); NewPed(-1);
@ -3208,7 +3208,7 @@ void ScrubPedestrian(void) {
gPed_instruc_count = 0; gPed_instruc_count = 0;
gNumber_of_pedestrians--; gNumber_of_pedestrians--;
gTotal_peds--; gTotal_peds--;
NewTextHeadupSlot(4, 0, 2000, -1, "Scrubbed pedestrian"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Scrubbed pedestrian");
RemoveCurrentPedPath(); RemoveCurrentPedPath();
} }
@ -3218,9 +3218,9 @@ void TogglePedDetect(void) {
gDetect_peds = !gDetect_peds; gDetect_peds = !gDetect_peds;
if (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 { } 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 #endif
DropPedPoint2(); DropPedPoint2();
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped pedestrian point"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped pedestrian point");
} }
// IDA: void __cdecl DropInitPedPoint() // IDA: void __cdecl DropInitPedPoint()
@ -3408,7 +3408,7 @@ void DropInitPedPoint(void) {
#endif #endif
gInit_ped_instruc = gPed_instruc_count; gInit_ped_instruc = gPed_instruc_count;
DropPedPoint2(); DropPedPoint2();
NewTextHeadupSlot(4, 0, 2000, -1, "Dropped initial pedestrian point"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -1, "Dropped initial pedestrian point");
} }
// IDA: void __cdecl DropPedPointAir2() // IDA: void __cdecl DropPedPointAir2()
@ -3433,7 +3433,7 @@ void DropPedPointAir(void) {
} }
#endif #endif
DropPedPointAir2(); 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() // IDA: void __cdecl DropInitPedPointAir()
@ -3447,7 +3447,7 @@ void DropInitPedPointAir(void) {
#endif #endif
gInit_ped_instruc = gPed_instruc_count; gInit_ped_instruc = gPed_instruc_count;
DropPedPointAir2(); 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) // IDA: br_uint_32 __cdecl KillActorsModel(br_actor *pActor, void *pArg)
@ -3522,7 +3522,7 @@ void ShowPedPos(void) {
GetPedPos(&min_ped, &min_point); GetPedPos(&min_ped, &min_point);
sprintf(s, "Nearest pedestrian is #%d, point #%d", min_ped + 1, min_point + 1); 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() // IDA: void __cdecl ShowPedPaths()

View File

@ -213,7 +213,7 @@ int GotPowerupX(tCar_spec* pCar, int pIndex, int pTell_net_players, int pDisplay
return -1; return -1;
} }
if (the_powerup->got_proc == NULL) { 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; return -1;
} }
original_index = pIndex; original_index = pIndex;
@ -237,7 +237,7 @@ int GotPowerupX(tCar_spec* pCar, int pIndex, int pTell_net_players, int pDisplay
s2 = strtok(NULL, "/"); s2 = strtok(NULL, "/");
} }
} }
NewTextHeadupSlot(4, 0, 3000, -4, s2); NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, s2);
} }
the_powerup->car = pCar; the_powerup->car = pCar;
if (the_powerup->got_proc != NULL) { if (the_powerup->got_proc != NULL) {
@ -589,7 +589,7 @@ void ImprovePSPowerup(tCar_spec* pCar, int pIndex) {
LOG_TRACE("(%p, %d)", pCar, pIndex); LOG_TRACE("(%p, %d)", pCar, pIndex);
pCar->power_up_levels[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>) // IDA: int __usercall GotTimeOrPower@<EAX>(tPowerup *pPowerup@<EAX>, tCar_spec *pCar@<EDX>)
@ -622,7 +622,7 @@ int GotTimeOrPower(tPowerup* pPowerup, tCar_spec* pCar) {
} }
} }
} else { } 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); return GET_POWERUP_INDEX(pPowerup);

View File

@ -58,7 +58,7 @@ void TogglePratcam(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (gAusterity_mode) { 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 { } else {
if (gWhirr_noise == 0 || !DRS3SoundStillPlaying(gWhirr_noise)) { if (gWhirr_noise == 0 || !DRS3SoundStillPlaying(gWhirr_noise)) {
DRS3StopSound(gWhirr_noise); DRS3StopSound(gWhirr_noise);

View File

@ -308,7 +308,7 @@ void ToggleReplay(void) {
LOG_TRACE("()"); LOG_TRACE("()");
if (!IsActionReplayAvailable()) { if (!IsActionReplayAvailable()) {
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_ACTION_REPLAY_UNAVAILABLE)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_ACTION_REPLAY_UNAVAILABLE));
return; return;
} }
if (!gAction_replay_mode) { if (!gAction_replay_mode) {

View File

@ -1214,7 +1214,7 @@ void DustRotate(void) {
if (gDust_rotate >= gNum_dust_tables) { if (gDust_rotate >= gNum_dust_tables) {
gDust_rotate = 0; 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) // 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)

View File

@ -155,7 +155,7 @@ void IncrementCheckpoint(void) {
gLap++; gLap++;
if (gLap == gTotal_laps) { if (gLap == gTotal_laps) {
PratcamEvent(33); // FIXME: or PratcamEventNow 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); DRS3StartSound(gPedestrians_outlet, 8014);
done_voice = 1; done_voice = 1;
} else if (gLap > gTotal_laps) { } else if (gLap > gTotal_laps) {
@ -207,7 +207,7 @@ void WrongCheckpoint(int pCheckpoint_index) {
return; return;
} }
} }
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_WrongCheckpoint)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_WrongCheckpoint));
DRS3StartSound(gPedestrians_outlet, 8013); DRS3StartSound(gPedestrians_outlet, 8013);
gLast_checkpoint_time = GetTotalTime(); gLast_checkpoint_time = GetTotalTime();
gLast_wrong_checkpoint = pCheckpoint_index; gLast_wrong_checkpoint = pCheckpoint_index;
@ -299,7 +299,7 @@ void TotalRepair(void) {
LOG_TRACE("()"); LOG_TRACE("()");
TotallyRepairCar(); TotallyRepairCar();
NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_InstantRepair)); NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_InstantRepair));
} }
// IDA: void __cdecl DoLogos() // IDA: void __cdecl DoLogos()
@ -308,6 +308,14 @@ void DoLogos(void) {
DoSCILogo(); DoSCILogo();
DoOpeningAnimation(); DoOpeningAnimation();
DoStainlessLogo(); 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; gProgram_state.prog_status = eProg_opening;
} }
@ -700,7 +708,7 @@ void JumpTheStart(void) {
DRS3StartSound(gPedestrians_outlet, 8016); DRS3StartSound(gPedestrians_outlet, 8016);
SpendCredits(gJump_start_fine[gProgram_state.skill_level]); 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)); 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);
} }
} }

View File

@ -4272,7 +4272,7 @@ void AccessoryHeadup(br_actor* pActor, char* pPrefix) {
if (pActor->identifier != NULL) { if (pActor->identifier != NULL) {
strcat(s, pActor->identifier); 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) // 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); gCurrent_rotate_mode = (gCurrent_rotate_mode == eRotate_mode_z) ? eRotate_mode_x : (gCurrent_rotate_mode + 1);
switch (gCurrent_rotate_mode) { switch (gCurrent_rotate_mode) {
case eRotate_mode_x: case eRotate_mode_x:
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: X"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: X");
break; break;
case eRotate_mode_y: case eRotate_mode_y:
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Y"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Y");
break; break;
case eRotate_mode_z: case eRotate_mode_z:
NewTextHeadupSlot(4, 0, 2000, -2, "Rotate mode: Z"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Rotate mode: Z");
break; break;
} }
} }
@ -4803,16 +4803,16 @@ void CycleAccScale(void) {
gCurrent_scale_mode = (gCurrent_scale_mode == eScale_mode_z) ? eScale_mode_all : (gCurrent_scale_mode + 1); gCurrent_scale_mode = (gCurrent_scale_mode == eScale_mode_z) ? eScale_mode_all : (gCurrent_scale_mode + 1);
switch (gCurrent_scale_mode) { switch (gCurrent_scale_mode) {
case eScale_mode_all: case eScale_mode_all:
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: ALL"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: ALL");
break; break;
case eScale_mode_x: case eScale_mode_x:
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: X"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: X");
break; break;
case eScale_mode_y: case eScale_mode_y:
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Y"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Y");
break; break;
case eScale_mode_z: case eScale_mode_z:
NewTextHeadupSlot(4, 0, 2000, -2, "Scale mode: Z"); NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -2, "Scale mode: Z");
break; break;
} }
} }
@ -5159,7 +5159,7 @@ void DropSpecVol(int pIndex) {
gLast_actor = gSpec_vol_actors[gProgram_state.special_volume_count - 1]; gLast_actor = gSpec_vol_actors[gProgram_state.special_volume_count - 1];
UpdateSpecVol(); UpdateSpecVol();
sprintf(s, "Shat out special volume #%d (type %d)", gProgram_state.special_volume_count - 1, pIndex); 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(); SaveSpecialVolumes();
fclose(f); fclose(f);
} }
@ -5256,10 +5256,10 @@ void IdentifySpecVol(void) {
} }
if (min_index < 0) { if (min_index < 0) {
gLast_actor = NULL; 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 { } else {
sprintf(s, "Locked onto Special Volume #%d", min_index); 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]; 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(&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*)); 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--; 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; gLast_actor = NULL;
if (&gProgram_state.special_volumes[index] < gDefault_water_spec_vol) { if (&gProgram_state.special_volumes[index] < gDefault_water_spec_vol) {
gDefault_water_spec_vol--; gDefault_water_spec_vol--;

View File

@ -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. // 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` // Names from `gMem_names`. See also: `CreateStainlessClasses`
typedef enum dr_memory_classes { typedef enum dr_memory_classes {
kMem_intf_pix_copy = 129, // 0x81 kMem_intf_pix_copy = 129, // 0x81

View File

@ -263,6 +263,9 @@ int Harness_ProcessCommandLine(int* argc, char* argv[]) {
} else if (strcasecmp(argv[i], "--no-bind") == 0) { } else if (strcasecmp(argv[i], "--no-bind") == 0) {
harness_game_config.no_bind = 1; harness_game_config.no_bind = 1;
handled = 1; handled = 1;
} else if (strcasecmp(argv[i], "--no-music") == 0) {
harness_game_config.no_music = 1;
handled = 1;
} }
if (handled) { if (handled) {

View File

@ -44,6 +44,7 @@ typedef struct tHarness_game_config {
int gore_check; int gore_check;
int sound_options; int sound_options;
int no_bind; int no_bind;
int no_music;
int verbose; int verbose;
int install_signalhandler; int install_signalhandler;