Tuned circuits + some polishing - Ready for 0.95+

master V0.95
Sylvain PILLOT 6 months ago
parent 28b4d462f2
commit 1a315efc1d
  1. 94
      CppOutRun.layout
  2. BIN
      fxlink-image-2022.02.28-23h13-6.png
  3. BIN
      fxlink-image-2022.02.28-23h14-21.png
  4. 2
      src/include/menus.h
  5. 4
      src/include/saves.h
  6. 41
      src/main.cc
  7. 2
      src/parameters.h
  8. 222
      src/src/circuit.cc
  9. 35
      src/src/menus.cc
  10. 1
      src/src/saves.cc

@ -2,34 +2,34 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="src/include/cars.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/src/utils.cc" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="412" topLine="1" />
<Cursor1 position="30" topLine="0" />
</Cursor>
</File>
<File name="TODO.txt" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/saves.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="251" topLine="0" />
<Cursor1 position="256" topLine="0" />
</Cursor>
</File>
<File name="src/include/utils.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/segment.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="107" topLine="0" />
<Cursor1 position="783" topLine="3" />
</Cursor>
</File>
<File name="src/colors.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/src/saves.cc" open="1" top="1" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="35" topLine="0" />
<Cursor1 position="306" topLine="0" />
</Cursor>
</File>
<File name="src/main.cc" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="-2" zoom_2="0">
<File name="src/src/segment.cc" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="39899" topLine="1082" />
<Cursor1 position="410" topLine="29" />
</Cursor>
</File>
<File name="src/src/clouds.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/circuit.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="203" topLine="0" />
<Cursor1 position="1686" topLine="0" />
</Cursor>
</File>
<File name="src/src/menus.cc" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -56,29 +56,29 @@
<Collapse line="1119" />
</Folding>
</File>
<File name="src/include/saves.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/menus.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="256" topLine="0" />
<Cursor1 position="615" topLine="0" />
</Cursor>
</File>
<File name="src/parameters.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="CMakeLists.txt" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="355" topLine="0" />
<Cursor1 position="448" topLine="0" />
</Cursor>
</File>
<File name="src/include/circuit.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/clouds.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1686" topLine="0" />
<Cursor1 position="306" topLine="0" />
</Cursor>
</File>
<File name="src/src/utils.cc" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/colors.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="30" topLine="0" />
<Cursor1 position="35" topLine="0" />
</Cursor>
</File>
<File name="src/src/segment.cc" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<File name="src/include/cars.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="410" topLine="29" />
<Cursor1 position="412" topLine="1" />
</Cursor>
</File>
<File name="src/src/drawstuff.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -94,14 +94,14 @@
<Collapse line="131" />
</Folding>
</File>
<File name="CMakeLists.txt" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="TODO.txt" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="448" topLine="0" />
<Cursor1 position="251" topLine="0" />
</Cursor>
</File>
<File name="src/include/camera.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/src/cars.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="221" topLine="0" />
<Cursor1 position="1019" topLine="8" />
</Cursor>
</File>
<File name="src/fixed.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -109,14 +109,29 @@
<Cursor1 position="5" topLine="0" />
</Cursor>
</File>
<File name="src/parameters.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="355" topLine="0" />
</Cursor>
</File>
<File name="src/include/drawstuff.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="655" topLine="0" />
</Cursor>
</File>
<File name="src/main.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="-2" zoom_2="0">
<Cursor>
<Cursor1 position="39899" topLine="1082" />
</Cursor>
</File>
<File name="src/src/camera.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="370" topLine="0" />
</Cursor>
</File>
<File name="src/include/clouds.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/camera.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="306" topLine="0" />
<Cursor1 position="221" topLine="0" />
</Cursor>
</File>
<File name="src/src/circuit.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -144,29 +159,14 @@
<Collapse line="1281" />
</Folding>
</File>
<File name="src/include/menus.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="615" topLine="0" />
</Cursor>
</File>
<File name="src/src/saves.cc" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="504" topLine="15" />
</Cursor>
</File>
<File name="src/src/cars.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1019" topLine="8" />
</Cursor>
</File>
<File name="src/include/segment.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/utils.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="783" topLine="3" />
<Cursor1 position="107" topLine="0" />
</Cursor>
</File>
<File name="src/include/drawstuff.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/src/clouds.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="655" topLine="0" />
<Cursor1 position="203" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

@ -24,7 +24,7 @@ void drawPauseQuit( void );
void getInputPauseQuit( void );
int drawMenuCircuitDetails( int circuit, int mode );
int drawMenuCircuitDetails( int circuit );
void getInputCircuitDetails( void );
int drawMenuBestTime( int circuit );

@ -5,8 +5,8 @@ struct BestRanking
{
char playerName[3] = { '.', '.', '.' }; // name of the player
char padding = 'Z'; // toi tu m'auras fait me gratter la tête !! Mon cochon.
uint32_t bestScore = 9999;
uint32_t bestTime = 9999;
uint32_t bestScore = 0x0FFFFFFF;
uint32_t bestTime = 0x0FFFFFFF;
};

@ -31,7 +31,7 @@
#include <stdio.h>
#define DEBUGXXX 1
#define DEBUGXXX 0
extern bopti_image_t player;
@ -471,14 +471,14 @@ int main(void)
{
selectedCircuit = drawMenuCircuitSelect();
if (selectedCircuit != -1) secondvalidation = drawMenuCircuitDetails( selectedCircuit, 0 );
if (selectedCircuit != -1) secondvalidation = drawMenuCircuitDetails( selectedCircuit );
if (selectedCircuit != -1 && secondvalidation != -1) exitflag=true;
}
else if (mode==1)
{
selectedCircuit = drawMenuCircuitSelect();
if (selectedCircuit != -1) secondvalidation = drawMenuCircuitDetails( selectedCircuit, 1 );
if (selectedCircuit != -1) secondvalidation = drawMenuCircuitDetails( selectedCircuit );
if (selectedCircuit != -1 && secondvalidation != -1) secondvalidation = drawMenuBestTime( selectedCircuit );
if (selectedCircuit != -1 && secondvalidation != -1) exitflag=true;
}
@ -534,7 +534,9 @@ int main(void)
createCircuit( selectedCircuit ); // Creates the circuit
MAX_SEGMENT = circuit.size();
uint32_t maxDistance = (MAX_SEGMENT-nbInterestingSegments-5)*SEGMENT_LENGTH;
//uint32_t maxDistance = (MAX_SEGMENT-nbInterestingSegments-5)*SEGMENT_LENGTH;
double maxDistance = (double) ((MAX_SEGMENT-1)*SEGMENT_LENGTH);
putBillBoards();
@ -559,12 +561,13 @@ int main(void)
else if (CarsNumb==3) NB_CARS_TRAFFIC=150;
else NB_CARS_TRAFFIC=75;
}
*/ else // while circular needs much less
*/
else // while circular needs much less
{
if (CarsNumb==0) NB_CARS_TRAFFIC=5;
else if (CarsNumb==1) NB_CARS_TRAFFIC=10;
else if (CarsNumb==2) NB_CARS_TRAFFIC=20;
else if (CarsNumb==3) NB_CARS_TRAFFIC=30;
if (CarsNumb==0) NB_CARS_TRAFFIC=25;
else if (CarsNumb==1) NB_CARS_TRAFFIC=50;
else if (CarsNumb==2) NB_CARS_TRAFFIC=100;
else if (CarsNumb==3) NB_CARS_TRAFFIC=150;
else NB_CARS_TRAFFIC=10;
}
@ -607,7 +610,7 @@ int main(void)
bool finishSequence = false; // Did we reached the end of the race ?
bool failSequence = false; // Did we run out of time ?
bool stopcounting = false;
while (!stop)
{
@ -640,8 +643,8 @@ int main(void)
startRemaining = ((float) (startCount) / 100000.0);
}
start_time -= dt*1000;
elapsed_time += dt*1000;
if (!stopcounting) start_time -= dt*1000;
if (!stopcounting) elapsed_time += dt*1000;
if (start_time<0) start_time=0;
remaining_time = ((float) (start_time) / 1000000.0);
@ -914,7 +917,8 @@ int main(void)
circuit[indexstart]->CheckValidated = true;
score+=20000;
finishSequence=true;
FinalTime = elapsed_time/1000000;
stopcounting = true;
FinalTime = elapsed_time;
}
#if DEBUGXXX==1
if (usb_is_open())
@ -937,7 +941,7 @@ int main(void)
else
{
circuit[indexstart]->CheckLap = currentLap;
start_time += circuit[indexstart]->Extratime - handicap;
//start_time += circuit[indexstart]->Extratime - handicap;
circuit[indexstart]->CheckValidated = true;
}
#if DEBUGXXX==1
@ -955,6 +959,7 @@ int main(void)
if (start_time<=0 && mode == 0)
{
failSequence=true;
stopcounting = true;
}
@ -1021,13 +1026,13 @@ int main(void)
if (mode==0)
{
dprint_opt(233,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time );
dprint_opt(231,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time ); // the ';' char corresponds to "s"
dprint_opt(238,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time );
dprint_opt(237,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time ); // the ';' char corresponds to "s"
}
else if (mode==1)
{
dprint_opt(233,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", elapsed_time/1000000 );
dprint_opt(231,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", elapsed_time/1000000 ); // the ';' char corresponds to "s"
dprint_opt(238,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", elapsed_time/1000000 );
dprint_opt(237,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", elapsed_time/1000000 ); // the ';' char corresponds to "s"
}

@ -28,7 +28,7 @@
#define std ustl
#define IS_FXLIB 1
#define IS_FXLIB 0
#endif // PARAMETERS_H

@ -75,40 +75,26 @@ void createCircuit( int circuitNumber )
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addCurve( L_LONG, C_EASY, LEFT_CURVE, PLAINS );
addStraightLine( L_MEDIUM, PLAINS );
addCheckPoint( PLAINS, 60 ); // time around 66s
addCheckPoint( PLAINS, 55 ); // time around 66s
addStraightLine( L_MEDIUM, PLAINS );
addHill( L_MEDIUM, H_SMALL, UP_HILL, PLAINS );
addHill( L_MEDIUM, H_SMALL, DOWN_HILL, PLAINS );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCheckPoint( PLAINS, 70 ); // time around 121s = Delta: 55s
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_LONG, C_EASY, LEFT_CURVE, PLAINS );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addCurve( L_LONG, C_EASY, LEFT_CURVE, PLAINS );
addStraightLine( L_MEDIUM, PLAINS );
addCheckPoint( PLAINS, 20 ); // time around 188s = Delta: 67s
addStraightLine( L_VERYSHORT, PLAINS );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, PLAINS );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addCheckPoint( PLAINS, 60 ); // time around 204s = Delta: 16s
addCheckPoint( PLAINS, 55 ); // time around 204s = Delta: 16s
addStraightLine( L_MEDIUM, PLAINS );
addHill( L_MEDIUM, H_SMALL, UP_HILL, PLAINS );
addHill( L_MEDIUM, H_SMALL, DOWN_HILL, PLAINS );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCheckPoint( PLAINS, 70 ); // time around 259s = Delta: 55s
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_LONG, C_EASY, LEFT_CURVE, PLAINS );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addCurve( L_LONG, C_EASY, LEFT_CURVE, PLAINS );
addStraightLine( L_MEDIUM, PLAINS );
addFinishLine( PLAINS, 0 ); // time around 326s = Delta: 67s
addStraightLine( L_VERYSHORT, PLAINS );
@ -144,7 +130,7 @@ void createCircuit( int circuitNumber )
addStraightLine( L_VERYSHORT, DESERT );
addHill( L_MEDIUM, H_BIG, UP_HILL, DESERT );
addStraightLine( L_LONG, DESERT );
addCheckPoint( DESERT, 30 );
addCheckPoint( DESERT, 28 );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
@ -152,16 +138,7 @@ void createCircuit( int circuitNumber )
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_EASY, RIGHT_CURVE, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCheckPoint( DESERT, 75 );
addStraightLine( L_VERYSHORT, DESERT );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, DESERT );
addStraightLine( L_VERYLONG, DESERT );
addStraightLine( L_LONG, DESERT );
addStraightLine( L_VERYLONG, DESERT );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCheckPoint( DESERT, 35 );
addCheckPoint( DESERT, 29 );
addStraightLine( L_VERYSHORT, DESERT );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, DESERT );
@ -200,18 +177,7 @@ void createCircuit( int circuitNumber )
addStraightLine( L_VERYSHORT, USA );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, USA );
addStraightLine( L_VERYSHORT, USA );
addCheckPoint( USA, 80 );
addStraightLine( L_VERYLONG, USA );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, USA );
addStraightLine( L_VERYLONG, USA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, USA );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_MEDIUM, UP_HILL, C_HARD, LEFT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, USA );
addStraightLine( L_MEDIUM, USA );
addCheckPoint( USA, 70 );
addCheckPoint( USA, 62 );
addStraightLine( L_VERYLONG, USA );
@ -236,17 +202,6 @@ void createCircuit( int circuitNumber )
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND, 90 );
addStraightLine( L_VERYSHORT, FINLAND );
addHill( L_MEDIUM, H_BIG, UP_HILL, FINLAND );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_LONG, C_HARD, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND, 90 );
addStraightLine( L_VERYSHORT, FINLAND );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, FINLAND );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, FINLAND );
@ -257,19 +212,8 @@ void createCircuit( int circuitNumber )
addCurve( L_SHORT, C_HARD, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, FINLAND );
addCheckPoint( FINLAND, 90 );
addStraightLine( L_VERYSHORT, FINLAND );
addHill( L_MEDIUM, H_BIG, UP_HILL, FINLAND );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_LONG, C_HARD, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND, 95 );
addStraightLine( L_LONG, FINLAND );
addHill( L_MEDIUM, H_BIG, UP_HILL, FINLAND );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, FINLAND );
@ -295,14 +239,7 @@ void createCircuit( int circuitNumber )
addCurve( L_MEDIUM, C_MEDIUM, RIGHT_CURVE, AFRICA );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA, 70 );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_LONG, C_EASY, LEFT_CURVE, AFRICA );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, AFRICA );
addCurve( L_LONG, C_EASY, LEFT_CURVE, AFRICA );
addStraightLine( L_MEDIUM, AFRICA );
addCheckPoint( AFRICA, 40 );
addCheckPoint( AFRICA, 38 );
addStraightLine( L_VERYSHORT, AFRICA );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, AFRICA );
@ -312,7 +249,7 @@ void createCircuit( int circuitNumber )
addStraightLine( L_VERYSHORT, AFRICA );
addHill( L_MEDIUM, H_BIG, UP_HILL, AFRICA );
addStraightLine( L_LONG, AFRICA );
addCheckPoint( AFRICA, 30 );
addCheckPoint( AFRICA, 25 );
addStraightLine( L_VERYSHORT, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, AFRICA );
@ -320,7 +257,7 @@ void createCircuit( int circuitNumber )
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_EASY, RIGHT_CURVE, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA, 85 );
addCheckPoint( AFRICA, 80 );
addStraightLine( L_VERYSHORT, AFRICA );
addHill( L_MEDIUM, H_BIG, UP_HILL, AFRICA );
@ -330,140 +267,113 @@ void createCircuit( int circuitNumber )
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA, 95 );
addStraightLine( L_LONG, AFRICA );
addHill( L_MEDIUM, H_BIG, UP_HILL, AFRICA );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, AFRICA );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, AFRICA );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, AFRICA );
addStraightLine( L_LONG, AFRICA );
addFinishLine( AFRICA, 0 );
addStraightLine( L_VERYSHORT, AFRICA );
}
if (circuitNumber==5)
else if (circuitNumber==5)
{
addStraightLine( L_VERYSHORT, PLAINS );
addStartLine( PLAINS, 30 );
addStartLine( PLAINS, 43 );
addStraightLine( L_VERYSHORT, PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, PLAINS );
addFinishLine( PLAINS, 30 );
addHill( L_MEDIUM, H_SMALL, UP_HILL, PLAINS );
addStraightLine( L_SHORT, PLAINS );
addHill( L_MEDIUM, H_SMALL, DOWN_HILL, PLAINS );
addCurve( L_LONG, C_EASY, RIGHT_CURVE, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addFinishLine( PLAINS, 43 );
addStraightLine( L_VERYSHORT, PLAINS );
}
else if (circuitNumber==6)
{
addStartLine( DESERT, 30 );
addStraightLine( L_VERYSHORT, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
addStartLine( DESERT, 60 );
addStraightLine( L_LONG, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, DESERT );
addCheckPoint( DESERT, 30 );
addStraightLine( L_VERYSHORT, DESERT );
addCheckPoint( DESERT, 30 );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, DESERT );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, DESERT );
addStraightLine( L_LONG, DESERT );
addHill( L_MEDIUM, H_BIG, UP_HILL, DESERT );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, DESERT );
addStraightLine( L_VERYLONG, DESERT );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, DESERT );
addStraightLine( L_VERYLONG, DESERT );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, DESERT );
addCheckPoint( DESERT, 30 );
addFinishLine( DESERT, 30 );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, DESERT );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addFinishLine( DESERT, 60 );
addStraightLine( L_VERYSHORT, DESERT );
}
else if (circuitNumber==7)
{
addStartLine( USA, 30 );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStartLine( USA, 53 );
addStraightLine( L_VERYSHORT, USA );
addCurvyHill( L_MEDIUM, H_MEDIUM, UP_HILL, C_HARD, RIGHT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, USA );
addStraightLine( L_SHORT, USA );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, USA );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, USA );
addStraightLine( L_VERYSHORT, USA );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, USA );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, USA );
addStraightLine( L_SHORT, USA );
addCurvyHill( L_MEDIUM, H_MEDIUM, DOWN_HILL, C_HARD, LEFT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, USA );
addCheckPoint( USA, 30 );
addStraightLine( L_VERYSHORT, USA );
addCheckPoint( USA, 30 );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, USA );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, USA );
addStraightLine( L_LONG, USA );
addHill( L_MEDIUM, H_BIG, UP_HILL, USA );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, USA );
addStraightLine( L_VERYLONG, USA );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, USA );
addStraightLine( L_VERYLONG, USA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, USA );
addCheckPoint( USA, 30 );
addFinishLine( USA, 30 );
addStraightLine( L_SHORT, USA );
addFinishLine( USA, 53 );
addStraightLine( L_VERYSHORT, USA );
}
else if (circuitNumber==8)
{
addStartLine( FINLAND, 30 );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStartLine( FINLAND, 68 );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_EASY, LEFT_CURVE, FINLAND );
addCurvyHill( L_MEDIUM, H_SMALL, UP_HILL, C_MEDIUM, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, FINLAND );
addCurvyHill( L_MEDIUM, H_SMALL, DOWN_HILL, C_MEDIUM, LEFT_CURVE, FINLAND );
addCurve( L_SHORT, C_MEDIUM, LEFT_CURVE, FINLAND );
addCurve( L_SHORT, C_MEDIUM, RIGHT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_EASY, LEFT_CURVE, FINLAND );
addCurvyHill( L_MEDIUM, H_SMALL, UP_HILL, C_MEDIUM, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, FINLAND );
addCheckPoint( FINLAND, 30 );
addCurvyHill( L_MEDIUM, H_SMALL, DOWN_HILL, C_MEDIUM, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND, 30 );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, FINLAND );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, FINLAND );
addStraightLine( L_LONG, FINLAND );
addHill( L_MEDIUM, H_BIG, UP_HILL, FINLAND );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, FINLAND );
addStraightLine( L_VERYLONG, FINLAND );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, FINLAND );
addCheckPoint( FINLAND, 30 );
addFinishLine( FINLAND, 30 );
addFinishLine( FINLAND, 68 );
addStraightLine( L_VERYSHORT, FINLAND );
}
else if (circuitNumber==9)
{
addStartLine( AFRICA, 30 );
addStraightLine( L_VERYSHORT, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addStartLine( AFRICA, 84 );
addStraightLine( L_VERYSHORT, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, AFRICA );
addCheckPoint( AFRICA, 30 );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA, 30 );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, AFRICA );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, AFRICA );
addStraightLine( L_LONG, AFRICA );
addHill( L_MEDIUM, H_BIG, UP_HILL, AFRICA );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, AFRICA );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, AFRICA );
addCurve( L_LONG, C_HARD, LEFT_CURVE, AFRICA );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, AFRICA );
addCheckPoint( AFRICA, 30 );
addFinishLine( AFRICA, 30 );
addStraightLine( L_VERYSHORT, AFRICA );
addFinishLine( AFRICA, 84 );
addStraightLine( L_VERYSHORT, AFRICA );
}
};

@ -712,28 +712,28 @@ void drawGameOptions( void )
if (CarsNumb==0)
{
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" );
}
else if (CarsNumb==1)
{
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" );
}
else if (CarsNumb==1)
else if (CarsNumb==2)
{
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" );
}
else if (CarsNumb==2)
{
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <500>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <500>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <500>" );
}
else if (CarsNumb==3)
{
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <1000>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <1000>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <1000>" );
dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" );
if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" );
else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" );
}
dprint_opt(94, 82, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "PLAYER" );
@ -998,7 +998,7 @@ void getInputPauseQuit( void )
int drawMenuCircuitDetails( int circuit, int mode )
int drawMenuCircuitDetails( int circuit )
{
uint16_t pulse=0;
doneMenuDetailsCircuit = false;
@ -1185,15 +1185,18 @@ int drawMenuBestTime( int circuit )
for( int k=0; k<5; k++)
{
if (HallOfFame[circuit][k].bestTime != 9999)
if (HallOfFame[circuit][k].bestTime != 0x0FFFFFFF)
{
dprint_opt(12, 40+k*30, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - %D sec", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], HallOfFame[circuit][k].bestTime );
dprint_opt(12, 38+k*30, C_RGB(255, 255, 255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - %D sec", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], HallOfFame[circuit][k].bestTime );
uint32_t temp1 = HallOfFame[circuit][k].bestTime/1000000/60;
uint32_t temp2 = HallOfFame[circuit][k].bestTime/1000000 - temp1*60;
uint32_t temp3 = (HallOfFame[circuit][k].bestTime - temp1*60*1000000 - temp2*1000000)/1000;
dprint_opt(12, 40+k*30, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - %D:%D,%D", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], temp1, temp2, temp3 );
dprint_opt(12, 38+k*30, C_RGB(255, 255, 255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - %D:%D,%D", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], temp1, temp2, temp3 );
}
else
{
dprint_opt(12, 40+k*30, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - ... sec", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], HallOfFame[circuit][k].bestTime );
dprint_opt(12, 38+k*30, C_RGB(255, 255, 255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d %c%c%c - ... sec", k+1, HallOfFame[circuit][k].playerName[0],HallOfFame[circuit][k].playerName[1],HallOfFame[circuit][k].playerName[2], HallOfFame[circuit][k].bestTime );
dprint_opt(12, 40+k*30, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d ... - ...", k+1 );
dprint_opt(12, 38+k*30, C_RGB(255, 255, 255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%d ... - ...", k+1 );
}
}

@ -17,7 +17,6 @@ void is_save_existing( void )
if (file==NULL)
{
fclose( file );
saveexist = false;
}
else

Loading…
Cancel
Save