-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathraces.sc
4220 lines (3540 loc) · 94.6 KB
/
races.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
MISSION_START
// *****************************************************************************************
// *********************************** Road Races ******************************************
// *****************************************************************************************
// *** A selection of 6 races would be selectable from a notice board that the player1 ***
// *** can start at any time. ***
// *****************************************************************************************
// Mission start stuff
GOSUB mission_races_start
IF HAS_DEATHARREST_BEEN_EXECUTED
GOSUB mission_races_failed
ENDIF
GOSUB mission_races_cleanup
MISSION_END
// ******************************** Variables for mission **********************************
//CARS PEDS OBJECTS ETC
VAR_INT race_car1 race_car2 race_car3 gosub_race_car
VAR_INT driver_car1 driver_car2 driver_car3
VAR_INT race_route_1 race_route_2 race_route_3 race_route_4 race_route_5 race_route_6
//BLIPS
VAR_INT blip_chase second_blip blip_car1 blip_car2 blip_car3
//FLAGS TIMERS COUNTERS ETC
VAR_INT player_cpcounter car1_cpcounter car2_cpcounter car3_cpcounter gosub_cpcounter
VAR_INT position race_timer car1_stuck_timer car2_stuck_timer car3_stuck_timer
VAR_INT timer_started stuck_timer position_to_store
VAR_INT total_checkpoints total_checkpoints_minus1 temp_int
VAR_INT triangle_pressed_flag cross_pressed_flag race_choice dpadleft_pressed_flag
VAR_INT dpadright_pressed_flag mins seconds
VAR_INT car1_cpcounter_minus4 car2_cpcounter_minus4 car3_cpcounter_minus4
//COORD MATHS
VAR_FLOAT car_stuck_x car_stuck_y car_stuck_z
VAR_FLOAT car_x car_y car_z car_headings
VAR_FLOAT difference_x_float_d difference_y_float_d sum_difference_d_xy
VAR_FLOAT car1_locate_size car2_locate_size car3_locate_size
VAR_FLOAT car_distance_from_cp player1_distance_from_cp
VAR_FLOAT road1_x road1_y road1_z road2_x road2_y road2_z
VAR_FLOAT player1_cp_x player1_cp_y player1_cp_z
VAR_FLOAT blip_2nd_x blip_2nd_y blip_2nd_z
VAR_FLOAT car1_cp_x car1_cp_y car1_cp_z
VAR_FLOAT car2_cp_x car2_cp_y car2_cp_z
VAR_FLOAT car3_cp_x car3_cp_y car3_cp_z
VAR_FLOAT gosub_cp_x gosub_cp_y gosub_cp_z gosub_cp_2nd_x gosub_cp_2nd_y gosub_cp_2nd_z
VAR_FLOAT cp0_x cp0_y cp0_z
VAR_FLOAT cp1_x cp1_y cp1_z
VAR_FLOAT cp2_x cp2_y cp2_z
VAR_FLOAT cp3_x cp3_y cp3_z
VAR_FLOAT cp4_x cp4_y cp4_z
VAR_FLOAT cp5_x cp5_y cp5_z
VAR_FLOAT cp6_x cp6_y cp6_z
VAR_FLOAT cp7_x cp7_y cp7_z
VAR_FLOAT cp8_x cp8_y cp8_z
VAR_FLOAT cp9_x cp9_y cp9_z
VAR_FLOAT cp10_x cp10_y cp10_z
VAR_FLOAT cp11_x cp11_y cp11_z
VAR_FLOAT cp12_x cp12_y cp12_z
VAR_FLOAT cp13_x cp13_y cp13_z
VAR_FLOAT cp14_x cp14_y cp14_z
VAR_FLOAT cp15_x cp15_y cp15_z
VAR_FLOAT cp16_x cp16_y cp16_z
VAR_FLOAT cp17_x cp17_y cp17_z
VAR_FLOAT cp18_x cp18_y cp18_z
VAR_FLOAT cp19_x cp19_y cp19_z
VAR_FLOAT cp20_x cp20_y cp20_z
VAR_FLOAT cp21_x cp21_y cp21_z
VAR_FLOAT cp22_x cp22_y cp22_z
VAR_FLOAT cp23_x cp23_y cp23_z
VAR_FLOAT cp24_x cp24_y cp24_z
VAR_FLOAT cp25_x cp25_y cp25_z
VAR_FLOAT cp26_x cp26_y cp26_z
VAR_FLOAT cp27_x cp27_y cp27_z
VAR_FLOAT cp28_x cp28_y cp28_z
VAR_FLOAT cp29_x cp29_y cp29_z
VAR_FLOAT cp30_x cp30_y cp30_z
VAR_FLOAT cp31_x cp31_y cp31_z
VAR_FLOAT cp32_x cp32_y cp32_z
VAR_FLOAT cp33_x cp33_y cp33_z
VAR_FLOAT cp34_x cp34_y cp34_z
VAR_FLOAT cp35_x cp35_y cp35_z
VAR_FLOAT cp36_x cp36_y cp36_z
VAR_FLOAT cp37_x cp37_y cp37_z
VAR_FLOAT cp38_x cp38_y cp38_z
VAR_FLOAT cp39_x cp39_y cp39_z
VAR_FLOAT cp40_x cp40_y cp40_z
VAR_FLOAT cp41_x cp41_y cp41_z
VAR_FLOAT cp42_x cp42_y cp42_z
VAR_FLOAT cp43_x cp43_y cp43_z
VAR_FLOAT cp44_x cp44_y cp44_z
VAR_FLOAT cp45_x cp45_y cp45_z
VAR_FLOAT cp46_x cp46_y cp46_z
VAR_FLOAT cp47_x cp47_y cp47_z
VAR_FLOAT cp48_x cp48_y cp48_z
VAR_FLOAT cp49_x cp49_y cp49_z
VAR_FLOAT cp50_x cp50_y cp50_z
VAR_FLOAT cp51_x cp51_y cp51_z
VAR_FLOAT cp52_x cp52_y cp52_z
VAR_FLOAT cp53_x cp53_y cp53_z
VAR_FLOAT cp54_x cp54_y cp54_z
VAR_FLOAT cp55_x cp55_y cp55_z
VAR_FLOAT cp56_x cp56_y cp56_z
VAR_FLOAT cp57_x cp57_y cp57_z
VAR_FLOAT cp58_x cp58_y cp58_z
VAR_FLOAT cp59_x cp59_y cp59_z
VAR_FLOAT cp60_x cp60_y cp60_z
VAR_FLOAT cp61_x cp61_y cp61_z
VAR_FLOAT cp62_x cp62_y cp62_z
VAR_FLOAT cp63_x cp63_y cp63_z
VAR_FLOAT cp64_x cp64_y cp64_z
VAR_FLOAT cp65_x cp65_y cp65_z
VAR_FLOAT cp66_x cp66_y cp66_z
VAR_FLOAT cp67_x cp67_y cp67_z
VAR_FLOAT cp68_x cp68_y cp68_z
VAR_FLOAT cp69_x cp69_y cp69_z
VAR_FLOAT cp70_x cp70_y cp70_z
VAR_FLOAT cp71_x cp71_y cp71_z
VAR_FLOAT cp72_x cp72_y cp72_z
VAR_FLOAT cp73_x cp73_y cp73_z
VAR_FLOAT cp74_x cp74_y cp74_z
VAR_FLOAT cp75_x cp75_y cp75_z
VAR_FLOAT cp76_x cp76_y cp76_z
VAR_FLOAT cp77_x cp77_y cp77_z
VAR_FLOAT cp78_x cp78_y cp78_z
VAR_FLOAT cp79_x cp79_y cp79_z
VAR_FLOAT cp80_x cp80_y cp80_z
VAR_FLOAT cp81_x cp81_y cp81_z
VAR_FLOAT cp82_x cp82_y cp82_z
VAR_FLOAT cp83_x cp83_y cp83_z
VAR_FLOAT cp84_x cp84_y cp84_z
VAR_FLOAT cp85_x cp85_y cp85_z
VAR_FLOAT cp86_x cp86_y cp86_z
VAR_FLOAT cp87_x cp87_y cp87_z
VAR_FLOAT cp88_x cp88_y cp88_z
VAR_FLOAT cp89_x cp89_y cp89_z
VAR_FLOAT cp90_x cp90_y cp90_z
VAR_FLOAT cp91_x cp91_y cp91_z
VAR_FLOAT cp92_x cp92_y cp92_z
VAR_FLOAT cp93_x cp93_y cp93_z
VAR_FLOAT cp94_x cp94_y cp94_z
VAR_FLOAT cp95_x cp95_y cp95_z
VAR_FLOAT cp96_x cp96_y cp96_z
VAR_FLOAT cp97_x cp97_y cp97_z
VAR_FLOAT cp98_x cp98_y cp98_z
VAR_FLOAT cp99_x cp99_y cp99_z
VAR_FLOAT cp100_x cp100_y cp100_z
VAR_FLOAT cp101_x cp101_y cp101_z
VAR_FLOAT cp102_x cp102_y cp102_z
VAR_FLOAT cp103_x cp103_y cp103_z
VAR_FLOAT cp104_x cp104_y cp104_z
VAR_FLOAT cp105_x cp105_y cp105_z
VAR_FLOAT cp106_x cp106_y cp106_z
VAR_FLOAT cp107_x cp107_y cp107_z
VAR_FLOAT cp108_x cp108_y cp108_z
//LOAD_AND_LAUNCH_MISSION_EXCLUSIVE var_ints
//VAR_INT car_health game_timer
//VAR_FLOAT car1_stuck_x car1_stuck_y car1_stuck_z
//VAR_FLOAT car2_stuck_x car2_stuck_y car2_stuck_z
//VAR_FLOAT car3_stuck_x car3_stuck_y car3_stuck_z
// ************************************ Mission Start **************************************
//GET_POSITION_OF_ANALOGUE_STICKS PadNumber LeftStickX LeftStickY RightStickX RightStickY
mission_races_start:
flag_player_on_mission = 1
SCRIPT_NAME race
WAIT 0
{
LVAR_FLOAT cp109_x cp109_y cp109_z
LVAR_FLOAT cp110_x cp110_y cp110_z
LVAR_FLOAT cp111_x cp111_y cp111_z
LVAR_FLOAT cp112_x cp112_y cp112_z
LVAR_FLOAT cp113_x cp113_y cp113_z
LOAD_MISSION_TEXT RACES
gosub_cpcounter = 0
player_cpcounter = 0
car1_cpcounter = 0
car2_cpcounter = 0
car3_cpcounter = 0
car1_locate_size = 7.0
car2_locate_size = 7.0
car3_locate_size = 7.0
race_choice = 1
position = 0
race_timer = 0
car1_stuck_timer = 0
car2_stuck_timer = 0
car3_stuck_timer = 0
timer_started = 0
stuck_timer = 0
total_checkpoints = 0
total_checkpoints_minus1 = 0
position_to_store = 0
triangle_pressed_flag = 0
cross_pressed_flag = 0
dpadleft_pressed_flag = 0
dpadright_pressed_flag = 0
car1_cpcounter_minus4 = 0
car2_cpcounter_minus4 = 0
car3_cpcounter_minus4 = 0
gosub_cp_x = 0.0
gosub_cp_y = 0.0
gosub_cp_z = 0.0
gosub_cp_2nd_x = 0.0
gosub_cp_2nd_y = 0.0
gosub_cp_2nd_z = 0.0
// **************** Race Selection Message Board *****************
REQUEST_MODEL lh_race01
REQUEST_MODEL lh_race02
REQUEST_MODEL lh_race03
REQUEST_MODEL lh_race04
REQUEST_MODEL lh_race05
REQUEST_MODEL lh_race06
LOAD_ALL_MODELS_NOW
USE_TEXT_COMMANDS TRUE
WHILE NOT HAS_MODEL_LOADED lh_race01
OR NOT HAS_MODEL_LOADED lh_race02
OR NOT HAS_MODEL_LOADED lh_race03
OR NOT HAS_MODEL_LOADED lh_race04
OR NOT HAS_MODEL_LOADED lh_race05
OR NOT HAS_MODEL_LOADED lh_race06
WAIT 0
ENDWHILE
SET_PLAYER_CONTROL player1 OFF
SET_EVERYONE_IGNORE_PLAYER player1 ON
SET_ALL_CARS_CAN_BE_DAMAGED FALSE
SWITCH_WIDESCREEN ON
CLEAR_AREA -967.7050 -827.3005 2.0 2.0 FALSE
CLEAR_AREA -970.2131 -828.7170 1.0 1.0 FALSE
SET_PLAYER_COORDINATES player1 -970.2131 -828.7170 5.7702
SET_PLAYER_HEADING player1 90.0
SET_CAMERA_BEHIND_PLAYER
SET_FIXED_CAMERA_POSITION -971.9697 -825.7239 8.5712 0.0 0.0 0.0
POINT_CAMERA_AT_POINT -970.9708 -825.7308 8.6162 JUMP_CUT
PRINT_HELP_FOREVER RACEHLP
GOTO races_fool_compiler // SCFIX: remove flag_player_on_mission = 0 check
CREATE_OBJECT_NO_OFFSET lh_race02 -965.584 -827.217 8.631 race_route_2
CREATE_OBJECT_NO_OFFSET lh_race03 -965.584 -827.217 8.631 race_route_3
CREATE_OBJECT_NO_OFFSET lh_race04 -965.584 -827.217 8.631 race_route_4
CREATE_OBJECT_NO_OFFSET lh_race05 -965.584 -827.217 8.631 race_route_5
CREATE_OBJECT_NO_OFFSET lh_race06 -965.584 -827.217 8.631 race_route_6
races_fool_compiler: // SCFIX: remove flag_player_on_mission = 0 check
CREATE_OBJECT_NO_OFFSET lh_race01 -965.584 -827.217 8.631 race_route_1
race_selection_loop:
WAIT 0
GET_POSITION_OF_ANALOGUE_STICKS PAD1 LStickX LStickY RStickX RStickY
IF IS_BUTTON_PRESSED PAD1 PAD_BTN_CANCEL // SCFIX: use button variables instead of copypasted code for JP version
IF triangle_pressed_flag = 1
triangle_pressed_flag = 0
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO mission_races_failed
ENDIF
ELSE
IF triangle_pressed_flag = 0
triangle_pressed_flag = 1
ENDIF
ENDIF
IF IS_BUTTON_PRESSED PAD1 DPADLEFT
OR LStickX < -100
IF dpadleft_pressed_flag = 1
dpadleft_pressed_flag = 0
CLEAR_THIS_PRINT RACES19
IF race_choice = 1
DELETE_OBJECT race_route_1
CREATE_OBJECT_NO_OFFSET lh_race06 -965.584 -827.217 8.631 race_route_6
race_choice = 6
ELSE
IF race_choice = 2
DELETE_OBJECT race_route_2
CREATE_OBJECT_NO_OFFSET lh_race01 -965.584 -827.217 8.631 race_route_1
race_choice = 1
ELSE
IF race_choice = 3
DELETE_OBJECT race_route_3
CREATE_OBJECT_NO_OFFSET lh_race02 -965.584 -827.217 8.631 race_route_2
race_choice = 2
ELSE
IF race_choice = 4
DELETE_OBJECT race_route_4
CREATE_OBJECT_NO_OFFSET lh_race03 -965.584 -827.217 8.631 race_route_3
race_choice = 3
ELSE
IF race_choice = 5
DELETE_OBJECT race_route_5
CREATE_OBJECT_NO_OFFSET lh_race04 -965.584 -827.217 8.631 race_route_4
race_choice = 4
ELSE
DELETE_OBJECT race_route_6
CREATE_OBJECT_NO_OFFSET lh_race05 -965.584 -827.217 8.631 race_route_5
race_choice = 5
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ELSE
IF dpadleft_pressed_flag = 0
dpadleft_pressed_flag = 1
ENDIF
ENDIF
IF IS_BUTTON_PRESSED PAD1 DPADRIGHT
OR LStickX > 100
IF dpadright_pressed_flag = 1
dpadright_pressed_flag = 0
CLEAR_THIS_PRINT RACES19
IF race_choice = 1
DELETE_OBJECT race_route_1
CREATE_OBJECT_NO_OFFSET lh_race02 -965.584 -827.217 8.631 race_route_2
race_choice = 2
ELSE
IF race_choice = 2
DELETE_OBJECT race_route_2
CREATE_OBJECT_NO_OFFSET lh_race03 -965.584 -827.217 8.631 race_route_3
race_choice = 3
ELSE
IF race_choice = 3
DELETE_OBJECT race_route_3
CREATE_OBJECT_NO_OFFSET lh_race04 -965.584 -827.217 8.631 race_route_4
race_choice = 4
ELSE
IF race_choice = 4
DELETE_OBJECT race_route_4
CREATE_OBJECT_NO_OFFSET lh_race05 -965.584 -827.217 8.631 race_route_5
race_choice = 5
ELSE
IF race_choice = 5
DELETE_OBJECT race_route_5
CREATE_OBJECT_NO_OFFSET lh_race06 -965.584 -827.217 8.631 race_route_6
race_choice = 6
ELSE
DELETE_OBJECT race_route_6
CREATE_OBJECT_NO_OFFSET lh_race01 -965.584 -827.217 8.631 race_route_1
race_choice = 1
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ELSE
IF dpadright_pressed_flag = 0
dpadright_pressed_flag = 1
ENDIF
ENDIF
IF race_choice = 1
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES01//Terminal Velocity
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 1 748//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 1 1//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 100//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race1_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race1_best_time / 60
temp_int = mins * 60
seconds = race1_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race1_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race1_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race1_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race1_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race1_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF race_choice = 2
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES02//OCEAN DRIVE
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 2 659//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 1 652//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 500//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race2_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race2_best_time / 60
temp_int = mins * 60
seconds = race2_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race2_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race2_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race2_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race2_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race2_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF race_choice = 3
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES03//BORDER RUN
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 3 1//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 1 926//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 1000//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race3_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race3_best_time / 60
temp_int = mins * 60
seconds = race3_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race3_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race3_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race3_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race3_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race3_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF race_choice = 4
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES04//CAPITAL CRUISE
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 3 924//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 2 438//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 2000//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race4_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race4_best_time / 60
temp_int = mins * 60
seconds = race4_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race4_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race4_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race4_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race4_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race4_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF race_choice = 5
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES05//TOUR!
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 4 603//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 2 86//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 5000//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race5_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race5_best_time / 60
temp_int = mins * 60
seconds = race5_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race5_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race5_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race5_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race5_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race5_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF race_choice = 6
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT_WITH_NUMBER 30.0 145.0 RACES00 race_choice//Race ~1~:
GOSUB setup_text_shite
SET_TEXT_SCALE 0.8 2.0
DISPLAY_TEXT 30.0 165.0 RACES06//ENDURANCE
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF ARE_MEASUREMENTS_IN_METRES
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES13 9 721//Track Length: ~1~.~1~ km
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 190.0 RACES23 6 1//Track Length: ~1~.~1~ miles
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.65 1.7
DISPLAY_TEXT_WITH_NUMBER 30.0 220.0 RACES07 10000//Entrance Fee: $~1~
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race6_best_time = 99999999
DISPLAY_TEXT 30.0 310.0 RACES15 //Best Time: N/A
ELSE
mins = race6_best_time / 60
temp_int = mins * 60
seconds = race6_best_time - temp_int
IF seconds > 9
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES08 mins seconds //Best Time: ~1~:~1~
ELSE
DISPLAY_TEXT_WITH_2_NUMBERS 30.0 310.0 RACES22 mins seconds //Best Time: ~1~:0~1~
ENDIF
ENDIF
GOSUB setup_text_shite
SET_TEXT_SCALE 0.6 1.6
IF race6_best_position = 99999999
DISPLAY_TEXT 30.0 325.0 RACES16//Best Result: N/A
ENDIF
IF race6_best_position = 0
DISPLAY_TEXT 30.0 325.0 RACES09//Best Result: 1ST
ENDIF
IF race6_best_position = 1
DISPLAY_TEXT 30.0 325.0 RACES10//Best Result: 2ND
ENDIF
IF race6_best_position = 2
DISPLAY_TEXT 30.0 325.0 RACES11//Best Result: 3RD
ENDIF
IF race6_best_position = 3
DISPLAY_TEXT 30.0 325.0 RACES12//Best Result: 4TH
ENDIF
ENDIF
IF IS_BUTTON_PRESSED PAD1 PAD_BTN_ACCEPT // SCFIX: use button variables instead of copypasted code for JP version
IF cross_pressed_flag = 1
cross_pressed_flag = 0
IF race_choice = 1
IF IS_SCORE_GREATER player1 99
ADD_SCORE player1 -100
DELETE_OBJECT race_route_1
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race1_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You cannot afford to enter this race.
ENDIF
ENDIF
IF race_choice = 2
IF IS_SCORE_GREATER player1 499
ADD_SCORE player1 -500
DELETE_OBJECT race_route_2
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race2_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You do noy have enough money to enter this race.
ENDIF
ENDIF
IF race_choice = 3
IF IS_SCORE_GREATER player1 999
ADD_SCORE player1 -1000
DELETE_OBJECT race_route_3
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race3_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You do noy have enough money to enter this race.
ENDIF
ENDIF
IF race_choice = 4
IF IS_SCORE_GREATER player1 1999
ADD_SCORE player1 -2000
DELETE_OBJECT race_route_4
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race4_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You do noy have enough money to enter this race.
ENDIF
ENDIF
IF race_choice = 5
IF IS_SCORE_GREATER player1 4999
ADD_SCORE player1 -5000
DELETE_OBJECT race_route_5
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race5_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You do noy have enough money to enter this race.
ENDIF
ENDIF
IF race_choice = 6
IF IS_SCORE_GREATER player1 9999
ADD_SCORE player1 -10000
DELETE_OBJECT race_route_6
CLEAR_HELP
USE_TEXT_COMMANDS FALSE
GOTO race6_route_checkpoints
ELSE
PRINT_NOW RACES19 3000 1//You do noy have enough money to enter this race.
ENDIF
ENDIF
ENDIF
ELSE
IF cross_pressed_flag = 0
cross_pressed_flag = 1
ENDIF
ENDIF
GOTO race_selection_loop
setup_text_shite:
SET_TEXT_COLOUR 180 180 180 255
SET_TEXT_JUSTIFY ON
SET_TEXT_RIGHT_JUSTIFY OFF
SET_TEXT_WRAPX 500.0
SET_TEXT_PROPORTIONAL ON
SET_TEXT_CENTRE OFF
SET_TEXT_BACKGROUND OFF
RETURN
// ***************** Individual Race Coordinates *****************
//////////////////////////////////////////////////////////////////
race1_route_checkpoints://////////////////////////////////////////
//////////////////////////////////////////////////////////////////
IF done_race1_progress = 0
REGISTER_MISSION_GIVEN
ENDIF
total_checkpoints = 23
cp0_x = -1381.9180
cp0_y = -781.2508
cp0_z = 13.6582
cp1_x = -1336.5432
cp1_y = -783.2210
cp1_z = 13.6582
cp2_x = -1278.3846
cp2_y = -783.2156
cp2_z = 13.6582
cp3_x = -1258.0490
cp3_y = -762.8456
cp3_z = 13.6582
cp4_x = -1258.1036
cp4_y = -695.6240
cp4_z = 13.6582
cp5_x = -1261.0485
cp5_y = -569.8616
cp5_z = 9.6582
cp6_x = -1320.2828
cp6_y = -558.8130
cp6_z = 7.4568
cp7_x = -1425.4246
cp7_y = -558.7655
cp7_z = 6.7282
cp8_x = -1514.0758
cp8_y = -558.7275
cp8_z = 6.7207
cp9_x = -1657.3508
cp9_y = -558.9381
cp9_z = 6.7207
cp10_x = -1779.2383
cp10_y = -561.8121
cp10_z = 6.7207
cp11_x = -1791.5503
cp11_y = -638.3821
cp11_z = 10.4712
cp12_x = -1771.5676
cp12_y = -690.8166
cp12_z = 13.6582
cp13_x = -1748.3260
cp13_y = -664.5505
cp13_z = 13.6509
cp14_x = -1743.8920
cp14_y = -557.9755
cp14_z = 13.6510
cp15_x = -1650.8215
cp15_y = -548.6134
cp15_z = 13.6510
cp16_x = -1553.4575
cp16_y = -548.5882
cp16_z = 13.6510
cp17_x = -1530.3307
cp17_y = -620.5998
cp17_z = 13.6510
cp18_x = -1530.3943
cp18_y = -690.6783
cp18_z = 13.6582
cp19_x = -1527.1394
cp19_y = -772.0657
cp19_z = 13.6582
cp20_x = -1480.2424
cp20_y = -782.8588
cp20_z = 13.6591
cp21_x = -1437.3495
cp21_y = -830.7875
cp21_z = 13.6000
cp22_x = -1402.1941
cp22_y = -783.8462
cp22_z = 13.6583
cp23_x = -1363.5989
cp23_y = -783.2463
cp23_z = 13.6728
car1_stuck_x = -1376.6685
car1_stuck_y = -785.4619
car1_stuck_z = 13.6583
car2_stuck_x = -1381.9180
car2_stuck_y = -785.4619
car2_stuck_z = 13.6583
car3_stuck_x = -1376.6685
car3_stuck_y = -781.2508
car3_stuck_z = 13.6582
car_headings = 270.0
road1_x = -1400.4227
road1_y = -788.7123
road1_z = 12.2184
road2_x = -1284.4299
road2_y = -778.7008
road2_z = 27.3309
GOTO start_the_race
//////////////////////////////////////////////////////////////////
race2_route_checkpoints://////////////////////////////////////////
//////////////////////////////////////////////////////////////////
IF done_race2_progress = 0
REGISTER_MISSION_GIVEN
ENDIF
total_checkpoints = 25
cp0_x = 467.1591
cp0_y = -364.1488
cp0_z = 9.3083
cp1_x = 501.4334
cp1_y = -376.6612
cp1_z = 9.8585
cp2_x = 499.6485
cp2_y = -453.1830
cp2_z = 9.8615
cp3_x = 476.2756
cp3_y = -575.4393
cp3_z = 9.8615
cp4_x = 427.9059
cp4_y = -681.8521
cp4_z = 9.8615
cp5_x = 362.8138
cp5_y = -824.1959
cp5_z = 9.8616
cp6_x = 307.6837
cp6_y = -946.3491
cp6_z = 9.8615
cp7_x = 278.2833
cp7_y = -1126.9789
cp7_z = 9.8615
cp8_x = 241.8716
cp8_y = -1314.5076
cp8_z = 9.8616
cp9_x = 219.7843
cp9_y = -1418.3220
cp9_z = 9.8615
cp10_x = 189.6915
cp10_y = -1494.7349
cp10_z = 9.8616
cp11_x = 147.4525
cp11_y = -1571.2441