on the road to V0.70

This commit is contained in:
Sylvain PILLOT 2022-03-17 21:59:52 +01:00
parent 14d1eb0e33
commit 1e205b188f
17 changed files with 686 additions and 500 deletions

View File

@ -53,6 +53,7 @@ set(ASSETS_cg
assets-cg/decos/common/cc_bigleaf.png
assets-cg/decos/common/cc_smallleaf.png
assets-cg/decos/common/cc_rocks.png
assets-cg/decos/common/cc_void.png
assets-cg/player/player.png
assets-cg/clouds/sky1.png
@ -61,6 +62,9 @@ set(ASSETS_cg
assets-cg/backgrnd/mountain.png
assets-cg/backgrnd/treeline.png
assets-cg/backgrnd/canyon.png
assets-cg/backgrnd/rockline.png
assets-cg/backgrnd/snowmount.png
assets-cg/billboard/leftturn.png
assets-cg/billboard/rightturn.png

View File

@ -2,23 +2,81 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="src/src/cars.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/drawstuff.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="622" topLine="0" />
</Cursor>
</File>
<File name="src/src/segment.cc" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="230" topLine="30" />
</Cursor>
</File>
<File name="src/include/segment.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="210" topLine="0" />
</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/menus.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="CMakeLists.txt" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1414" topLine="47" />
</Cursor>
</File>
<File name="src/src/menus.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6008" topLine="75" />
</Cursor>
<Folding>
<Collapse line="315" />
</Folding>
</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">
<Cursor>
<Cursor1 position="221" topLine="0" />
</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/src/circuit.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="799" topLine="0" />
</Cursor>
<Folding>
<Collapse line="433" />
<Collapse line="501" />
<Collapse line="517" />
<Collapse line="543" />
<Collapse line="588" />
<Collapse line="634" />
</Folding>
</File>
<File name="src/include/cars.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="332" 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">
<Cursor>
<Cursor1 position="251" topLine="0" />
</Cursor>
</File>
<File name="src/src/menus.cc" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/fixed.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7903" topLine="146" />
<Cursor1 position="778" topLine="0" />
</Cursor>
</File>
<File name="src/parameters.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="399" topLine="0" />
</Cursor>
<Folding>
<Collapse line="309" />
</Folding>
</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">
<Cursor>
@ -30,14 +88,33 @@
<Collapse line="76" />
</Folding>
</File>
<File name="TODO.txt" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/include/circuit.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="865" topLine="48" />
</Cursor>
</File>
<File name="src/fixed.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src/main.cc" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="778" topLine="0" />
<Cursor1 position="19568" topLine="253" />
</Cursor>
<Folding>
<Collapse line="276" />
<Collapse line="304" />
</Folding>
</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">
<Cursor>
<Cursor1 position="203" topLine="0" />
</Cursor>
</File>
<File name="src/colors.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="607" topLine="0" />
</Cursor>
</File>
<File name="src/include/menus.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="251" 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">
@ -45,93 +122,4 @@
<Cursor1 position="306" topLine="0" />
</Cursor>
</File>
<File name="src/src/circuit.cc" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="30741" topLine="513" />
</Cursor>
<Folding>
<Collapse line="178" />
<Collapse line="246" />
<Collapse line="262" />
<Collapse line="288" />
<Collapse line="333" />
<Collapse line="379" />
</Folding>
</File>
<File name="src/include/segment.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="210" topLine="0" />
</Cursor>
</File>
<File name="src/include/drawstuff.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="622" topLine="0" />
</Cursor>
</File>
<File name="src/include/cars.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="332" topLine="0" />
</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/src/segment.cc" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="230" topLine="30" />
</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">
<Cursor>
<Cursor1 position="221" topLine="0" />
</Cursor>
</File>
<File name="src/colors.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="607" topLine="0" />
</Cursor>
</File>
<File name="src/parameters.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="399" topLine="0" />
</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">
<Cursor>
<Cursor1 position="203" topLine="0" />
</Cursor>
</File>
<File name="src/main.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5823" topLine="162" />
</Cursor>
<Folding>
<Collapse line="99" />
<Collapse line="104" />
<Collapse line="110" />
<Collapse line="118" />
<Collapse line="126" />
<Collapse line="146" />
<Collapse line="169" />
<Collapse line="175" />
<Collapse line="181" />
<Collapse line="187" />
<Collapse line="204" />
<Collapse line="217" />
<Collapse line="228" />
<Collapse line="233" />
</Folding>
</File>
<File name="src/include/circuit.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1423" topLine="48" />
</Cursor>
</File>
<File name="CMakeLists.txt" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1215" topLine="18" />
</Cursor>
</File>
</CodeBlocks_layout_file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -24,6 +24,9 @@
#define LIGHT_EARTH 0xFDC6
#define DARK_EARTH 0xCC40
#define LIGHT_ORANGE 0xFD4D
#define DARK_ORANGE 0xFBEB
#define DAY_BLUE_SKY 0x017F
#endif // PARAMETERS_H

View File

@ -60,7 +60,7 @@ enum Decoration
};
void initData( void );
void createCircuit( void );
void createCircuit( int circuitNumber );
void putBillBoards( void );
void createClouds( void );
void createTraffic( void );
@ -77,8 +77,8 @@ void drawCircuitSegment( uint16_t index );
void drawDecoration( uint16_t index );
void drawTraffic( uint16_t index );
void drawClouds( int offset );
void drawFarBackground( int offset );
void drawNearBackground( int offset );
void drawFarBackground( int offset, int currentbiome );
void drawNearBackground( int offset, int currentbiome );
void freeDecoration( void );
void prepareDecoration( int biometoload );

View File

@ -41,11 +41,10 @@ int CurrentCircuitBiome = PLAINS;
std::vector<Segment*> circuit;
int MAX_SEGMENT=0;
camera *cam;
std::vector<Clouds*> nuages;
std::vector<Cars*> traffic;
int MAX_SEGMENT=0;
camera *cam;
bool stop = false;
@ -248,12 +247,7 @@ int main(void)
usb_open(interfaces, GINT_CALL_NULL);
#endif
prof_t perf_update, perf_create, perf_project, perf_render;
int32_t start_time = 99000000;
uint32_t score=99999;
uint8_t stage=0;
uint8_t selectedCircuit=0;
uint32_t time_update=0, time_create=0, time_project=0, time_render=0;
prof_init();
@ -261,420 +255,348 @@ int main(void)
drawStartTitle();
bool exitflag = false;
bool exitToOS = false;
do
{
exitflag = false;
stage = drawMainMenu();
if (stage==0 || stage==1)
prof_t perf_update, perf_create, perf_project, perf_render;
int32_t start_time = 99000000;
uint32_t score=99999;
uint8_t stage=0;
uint8_t selectedCircuit=0;
uint32_t time_update=0, time_create=0, time_project=0, time_render=0;
exitToOS = false;
stop = false;
bool exitflag = false;
do
{
selectedCircuit = drawMenuCircuitSelect();
if (selectedCircuit != -1) exitflag=true;
exitflag = false;
stage = drawMainMenu();
if (stage==0 || stage==1)
{
selectedCircuit = drawMenuCircuitSelect();
if (selectedCircuit != -1) exitflag=true;
}
else if (stage==2)
{
// Option Menu TO BE DONE
}
else if (stage==3)
{
drawCredit();
}
else if (stage==4)
{
// Exit Menu TO BE DONE
// quick and dirty
exitToOS = true;
exitflag=true;
}
}
else if (stage==3)
while (!exitflag);
if (exitToOS==false)
{
drawCredit();
}
stage = selectedCircuit;
}
while (!exitflag);
stage = selectedCircuit;
if (selectedCircuit==0) CurrentCircuitBiome = PLAINS;
else if (selectedCircuit==1) CurrentCircuitBiome = DESERT;
else if (selectedCircuit==2) CurrentCircuitBiome = USA;
else if (selectedCircuit==3) CurrentCircuitBiome = FINLAND;
else if (selectedCircuit==4) CurrentCircuitBiome = AFRICA;
else if (selectedCircuit==5) CurrentCircuitBiome = PLAINS;
else if (selectedCircuit==6) CurrentCircuitBiome = DESERT;
else if (selectedCircuit==7) CurrentCircuitBiome = USA;
else if (selectedCircuit==8) CurrentCircuitBiome = FINLAND;
else if (selectedCircuit==9) CurrentCircuitBiome = AFRICA;
else CurrentCircuitBiome = PLAINS;
if (selectedCircuit==0) CurrentCircuitBiome = PLAINS;
else if (selectedCircuit==1) CurrentCircuitBiome = DESERT;
else if (selectedCircuit==2) CurrentCircuitBiome = USA;
else if (selectedCircuit==3) CurrentCircuitBiome = FINLAND;
else if (selectedCircuit==4) CurrentCircuitBiome = AFRICA;
else if (selectedCircuit==5) CurrentCircuitBiome = PLAINS;
else if (selectedCircuit==6) CurrentCircuitBiome = DESERT;
else if (selectedCircuit==7) CurrentCircuitBiome = USA;
else if (selectedCircuit==8) CurrentCircuitBiome = FINLAND;
else if (selectedCircuit==9) CurrentCircuitBiome = AFRICA;
else CurrentCircuitBiome = PLAINS;
int nbInterestingSegments = (MAX_RENDER_DISTANCE / SEGMENT_LENGTH); // the number of segments to be projected considering the rendering distance
int nbInterestingSegments = (MAX_RENDER_DISTANCE / SEGMENT_LENGTH); // the number of segments to be projected considering the rendering distance
perf_create = prof_make();
prof_enter(perf_create);
perf_create = prof_make();
prof_enter(perf_create);
initData( ); // Positioning of the Camera
createCircuit(); // Creates the circuit
initData( ); // Positioning of the Camera
createCircuit( selectedCircuit ); // Creates the circuit
putBillBoards();
putBillBoards();
createClouds(); // Creates the Sky and Clouds
createTraffic(); // Creates the cas
prepareDecoration( CurrentCircuitBiome ); // Prepares the multiple variations of Decoration (image scaling)
prepareTraffic(); // Prepares the multiple variations of Cars (image scaling)
createClouds(); // Creates the Sky and Clouds
createTraffic(); // Creates the cars
prepareDecoration( CurrentCircuitBiome ); // Prepares the multiple variations of Decoration (image scaling)
prepareTraffic(); // Prepares the multiple variations of Cars (image scaling)
prof_leave(perf_create);
time_create = prof_time(perf_create);
prof_leave(perf_create);
time_create = prof_time(perf_create);
//--------------
MAX_SEGMENT = circuit.size();
//--------------
MAX_SEGMENT = circuit.size();
int indexstart = 0;
int indexend = 0;
int indexstart = 0;
int indexend = 0;
uint32_t maxDistance = (MAX_SEGMENT-nbInterestingSegments-5)*SEGMENT_LENGTH;
uint32_t maxDistance = (MAX_SEGMENT-nbInterestingSegments-5)*SEGMENT_LENGTH;
uint32_t dt=0;
uint16_t l=0;
uint32_t remaining_time;
uint32_t dt=0;
uint16_t l=0;
uint32_t remaining_time;
while (!stop)
{
while (!stop)
{
perf_update = prof_make();
prof_enter(perf_update);
perf_update = prof_make();
prof_enter(perf_update);
get_inputs( dt, indexstart );
get_inputs( dt, indexstart );
dt = ((float) (time_update+time_render+time_project) / 1000.0);
dt = ((float) (time_update+time_render+time_project) / 1000.0);
start_time -= (time_update+time_render+time_project);
if (start_time<0) start_time=0;
remaining_time = ((float) (start_time) / 1000000.0);
start_time -= (time_update+time_render+time_project);
if (start_time<0) start_time=0;
remaining_time = ((float) (start_time) / 1000000.0);
//--------------
if (fround(cam->cZ)<=0) cam->cZ=fixdouble(0.0);
if (fround(cam->cZ)>=maxDistance) cam->cZ=fixdouble(maxDistance);
//--------------
if (fround(cam->cZ)<=0) cam->cZ=fixdouble(0.0);
if (fround(cam->cZ)>=maxDistance) cam->cZ=fixdouble(maxDistance);
indexstart = fround(cam->cZ) / SEGMENT_LENGTH;
if (indexstart<0) indexstart=0;
indexstart = fround(cam->cZ) / SEGMENT_LENGTH;
if (indexstart<0) indexstart=0;
indexend = indexstart+nbInterestingSegments+1;
if (indexstart>MAX_SEGMENT-nbInterestingSegments-2) indexstart=MAX_SEGMENT-nbInterestingSegments-2;
indexend = indexstart+nbInterestingSegments+1;
if (indexstart>MAX_SEGMENT-nbInterestingSegments-2) indexstart=MAX_SEGMENT-nbInterestingSegments-2;
prof_leave(perf_update);
time_update = prof_time(perf_update);
prof_leave(perf_update);
time_update = prof_time(perf_update);
//--------------
//--------------
perf_project = prof_make();
prof_enter(perf_project);
perf_project = prof_make();
prof_enter(perf_project);
if (BDrawCars)
if (BDrawCars)
{
updateTraffic( dt, maxDistance );
for (int k=0; k<traffic.size(); k++) // Need to project 1 more segment than actual drawing
{
updateTraffic( dt, maxDistance );
for (int k=0; k<traffic.size(); k++) // Need to project 1 more segment than actual drawing
uint16_t CarSegment = traffic[k]->wZ / SEGMENT_LENGTH;
if (CarSegment>=indexstart && CarSegment<indexend)
{
uint16_t CarSegment = traffic[k]->wZ / SEGMENT_LENGTH;
if (CarSegment>=indexstart && CarSegment<indexend)
{
//traffic[k]->visible = true;
circuit[CarSegment]->CarList.push_back(k);
}
//else
//traffic[k]->visible = false;
//traffic[k]->visible = true;
circuit[CarSegment]->CarList.push_back(k);
}
//else
//traffic[k]->visible = false;
}
}
minYRoad = SCREEN_HEIGHT;
float roadpart = f2float(cam->cX)/(float) ROAD_WIDTH;
// Update car positions : car with higher speed change line not to collide with player
if (BDrawCars)
for( int l=0; l<circuit[indexstart]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[indexstart]->CarList[l];
if (traffic[indexCar]->wX>(roadpart-0.25f) && traffic[indexCar]->wX<(roadpart+0.25f) && traffic[indexCar]->Speed>speed)
{
if (traffic[indexCar]->wX>-0.25) traffic[indexCar]->wX-=0.5; // if we are on one of the most right lanes, we overtake by the left
else traffic[indexCar]->wX=-0.25; // else we change to the lane on the right
}
}
minYRoad = SCREEN_HEIGHT;
float roadpart = f2float(cam->cX)/(float) ROAD_WIDTH;
if (BDrawCars)
for( int l=0; l<circuit[indexstart+1]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[indexstart+1]->CarList[l];
// Update car positions : car with higher speed change line not to collide with player
if (BDrawCars)
for( int l=0; l<circuit[indexstart]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[indexstart]->CarList[l];
if (traffic[indexCar]->wX>(roadpart-0.15f) && traffic[indexCar]->wX<(roadpart+0.15f) && traffic[indexCar]->Speed<speed)
{
speed = 2.0;
}
}
if (traffic[indexCar]->wX>(roadpart-0.25f) && traffic[indexCar]->wX<(roadpart+0.25f) && traffic[indexCar]->Speed>speed)
{
if (traffic[indexCar]->wX>-0.25) traffic[indexCar]->wX-=0.5; // if we are on one of the most right lanes, we overtake by the left
else traffic[indexCar]->wX=-0.25; // else we change to the lane on the right
}
}
uint16_t cumulCurve=0;
for (int k=indexstart; k<=indexend; k++) // Need to project 1 more segment than actual drawing
{
projectCircuitFP( k ); // We project the current segment
if (circuit[k]->Y < minYRoad) // This is a trick to save precious time while drawing the Sky
minYRoad = circuit[k]->Y;
circuit[k]->CumulatedCurve = cumulCurve; // This is the curve accumulated when we are drawing curves
cumulCurve += circuit[k]->Curve;
if (BDrawCars)
for( int l=0; l<circuit[indexstart+1]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[indexstart+1]->CarList[l];
for( int l=0; l<circuit[k]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[k]->CarList[l];
traffic[indexCar]->Project3DFP( cam, k );
}
}
if (traffic[indexCar]->wX>(roadpart-0.15f) && traffic[indexCar]->wX<(roadpart+0.15f) && traffic[indexCar]->Speed<speed)
{
speed = 2.0;
}
}
prof_leave(perf_project);
time_project = prof_time(perf_project);
uint16_t cumulCurve=0;
for (int k=indexstart; k<=indexend; k++) // Need to project 1 more segment than actual drawing
{
projectCircuitFP( k ); // We project the current segment
//--------------
if (circuit[k]->Y < minYRoad) // This is a trick to save precious time while drawing the Sky
minYRoad = circuit[k]->Y;
perf_render = prof_make();
prof_enter(perf_render);
circuit[k]->CumulatedCurve = cumulCurve; // This is the curve accumulated when we are drawing curves
cumulCurve += circuit[k]->Curve;
if (BDrawCars)
for( int l=0; l<circuit[k]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[k]->CarList[l];
traffic[indexCar]->Project3DFP( cam, k );
}
}
drawSky( DAY_BLUE_SKY );
if (BDrawClds)
drawClouds( l % 396 );
drawFarBackground( deltaFarbackground, CurrentCircuitBiome );
drawNearBackground( deltaNearbackground, CurrentCircuitBiome );
cam->cY = fix( 300+2*CS ) + interpolatePositionY(fround(cam->cZ) );
for( int k=indexend-1; k>=indexstart; k--)
{
currentcurve = circuit[k]->CumulatedCurve;
prof_leave(perf_project);
time_project = prof_time(perf_project);
if (BDrawRoad)
drawCircuitSegment( k );
//--------------
if (BDrawDeco)
drawDecoration( k );
perf_render = prof_make();
prof_enter(perf_render);
if (BDrawCars)
for( int l=0; l<circuit[k]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[k]->CarList[l];
drawTraffic( indexCar );
}
circuit[k]->CarList.clear();
}
drawSky( DAY_BLUE_SKY );
if (BDrawClds)
drawClouds( l % 396 );
int mod_base=20;
int mod_comp=10;
drawFarBackground( deltaFarbackground );
drawNearBackground( deltaNearbackground );
cam->cY = fix( 300+2*CS ) + interpolatePositionY(fround(cam->cZ) );
if (abs(speed)<1.0) mod_base = 30, mod_comp = 15;
else if (abs(speed)<2.0) mod_base = 20, mod_comp = 10;
else if (abs(speed)<3.0) mod_base = 16, mod_comp = 8;
else if (abs(speed)<4.0) mod_base = 12, mod_comp = 6;
else if (abs(speed)<5.0) mod_base = 8, mod_comp = 4;
else mod_base = 4, mod_comp = 2;
for( int k=indexend-1; k>=indexstart; k--)
{
currentcurve = circuit[k]->CumulatedCurve;
if (BDrawRoad)
drawCircuitSegment( k );
if ((speed==0) || (l%mod_base<=mod_comp)) // the small rick to have the speed impression on wheels and to have the correct view of the car during turns
{
if (viewside==-2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 99,1,80,46, DIMAGE_NONE);
else if (viewside==-1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 181,1,74,46, DIMAGE_NONE);
else if (viewside==0) dsubimage( SCREEN_CX-36, SCREEN_HEIGHT-46, &player, 257,1,72,46, DIMAGE_NONE);
else if (viewside==1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 331,1,74,46, DIMAGE_NONE);
else if (viewside==2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 407,1,80,46, DIMAGE_NONE);
}
else
{
if (viewside==-2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 99,49,80,46, DIMAGE_NONE);
else if (viewside==-1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 181,49,74,46, DIMAGE_NONE);
else if (viewside==0) dsubimage( SCREEN_CX-36, SCREEN_HEIGHT-46, &player, 257,49,72,46, DIMAGE_NONE);
else if (viewside==1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 331,49,74,46, DIMAGE_NONE);
else if (viewside==2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 407,49,80,46, DIMAGE_NONE);
}
if (BDrawDeco)
drawDecoration( k );
if (BDrawCars)
for( int l=0; l<circuit[k]->CarList.size(); l++ ) // For all cars inside that road segment
{
uint8_t indexCar = circuit[k]->CarList[l];
drawTraffic( indexCar );
}
score = fround(cam->cZ)/100;
circuit[k]->CarList.clear();
}
float drawspeed = (float) (speed*5.0f);
int mod_base=20;
int mod_comp=10;
dsubimage( 5, 5, &speedhud, 0, 117, 37, 13, DIMAGE_NONE); // speed logo
dsubimage( 135, 5, &speedhud, 0, 130, 37, 13, DIMAGE_NONE); // timer logo
if (abs(speed)<1.0) mod_base = 30, mod_comp = 15;
else if (abs(speed)<2.0) mod_base = 20, mod_comp = 10;
else if (abs(speed)<3.0) mod_base = 16, mod_comp = 8;
else if (abs(speed)<4.0) mod_base = 12, mod_comp = 6;
else if (abs(speed)<5.0) mod_base = 8, mod_comp = 4;
else mod_base = 4, mod_comp = 2;
dsubimage( 245, 5, &speedhud, 37, 117, 38, 13, DIMAGE_NONE); // speed logo
dsubimage( 245, 25, &speedhud, 37, 130, 38, 13, DIMAGE_NONE); // timer logo
if ((speed==0) || (l%mod_base<=mod_comp)) // the small rick to have the speed impression on wheels and to have the correct view of the car during turns
{
if (viewside==-2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 99,1,80,46, DIMAGE_NONE);
else if (viewside==-1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 181,1,74,46, DIMAGE_NONE);
else if (viewside==0) dsubimage( SCREEN_CX-36, SCREEN_HEIGHT-46, &player, 257,1,72,46, DIMAGE_NONE);
else if (viewside==1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 331,1,74,46, DIMAGE_NONE);
else if (viewside==2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 407,1,80,46, DIMAGE_NONE);
}
else
{
if (viewside==-2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 99,49,80,46, DIMAGE_NONE);
else if (viewside==-1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 181,49,74,46, DIMAGE_NONE);
else if (viewside==0) dsubimage( SCREEN_CX-36, SCREEN_HEIGHT-46, &player, 257,49,72,46, DIMAGE_NONE);
else if (viewside==1) dsubimage( SCREEN_CX-37, SCREEN_HEIGHT-46, &player, 331,49,74,46, DIMAGE_NONE);
else if (viewside==2) dsubimage( SCREEN_CX-40, SCREEN_HEIGHT-46, &player, 407,49,80,46, DIMAGE_NONE);
}
dfont(&speedfont);
if (drawspeed==0.0)
{
dprint_opt(122,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "0 :", drawspeed );
dprint_opt(120,1, C_RGB(255,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "0 :", drawspeed );
}
else
{
dprint_opt(122,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.1f :", drawspeed );
dprint_opt(120,1, C_RGB(255,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.1f :", drawspeed ); //the ':' char corresponds to "Km/h"
}
dprint_opt(233,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time );
dprint_opt(230,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time ); // the ';' char corresponds to "s"
score = fround(cam->cZ)/100;
dprint_opt(390,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", score );
dprint_opt(388,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", score ); // the ';' char corresponds to "s"
dprint_opt(390,23, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", stage );
dprint_opt(388,21, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", stage ); // the ';' char corresponds to "s"
//dprint( 1, 1, C_BLACK, "Crt=%.3D ms", time_create );
//dprint( 1, 15, C_RED, "Prj=%.3D ms", time_project );
//dprint( 1, 30, C_RED, "Rdr=%.3D ms", time_render );
//dprint( 1, 45, C_RED, "Upd=%.3D ms", time_update );
if (drawspeed==0.0) dsubimage( 48, 25, &speedhud, 0, 0, 76, 13, DIMAGE_NONE);
else if (drawspeed<3.30) dsubimage( 48, 25, &speedhud, 0, 13, 76, 13, DIMAGE_NONE);
else if (drawspeed<6.70) dsubimage( 48, 25, &speedhud, 0, 26, 76, 13, DIMAGE_NONE);
else if (drawspeed<10.0) dsubimage( 48, 25, &speedhud, 0, 39, 76, 13, DIMAGE_NONE);
else if (drawspeed<13.3) dsubimage( 48, 25, &speedhud, 0, 52, 76, 13, DIMAGE_NONE);
else if (drawspeed<16.7) dsubimage( 48, 25, &speedhud, 0, 65, 76, 13, DIMAGE_NONE);
else if (drawspeed<20.0) dsubimage( 48, 25, &speedhud, 0, 78, 76, 13, DIMAGE_NONE);
else if (drawspeed<23.3) dsubimage( 48, 25, &speedhud, 0, 91, 76, 13, DIMAGE_NONE);
else dsubimage( 48, 25, &speedhud, 0, 104, 76, 13, DIMAGE_NONE);
//dprint( 1, 1, C_BLACK, "Dt=%.3D ms", dt );
//dupdate();
r61524_display(gint_vram, 0, DHEIGHT, R61524_DMA_WAIT);
float drawspeed = (float) (speed*5.0f);
dsubimage( 5, 5, &speedhud, 0, 117, 37, 13, DIMAGE_NONE); // speed logo
dsubimage( 135, 5, &speedhud, 0, 130, 37, 13, DIMAGE_NONE); // timer logo
dsubimage( 245, 5, &speedhud, 37, 117, 38, 13, DIMAGE_NONE); // speed logo
dsubimage( 245, 25, &speedhud, 37, 130, 38, 13, DIMAGE_NONE); // timer logo
dfont(&speedfont);
if (drawspeed==0.0)
{
dprint_opt(122,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "0 :", drawspeed );
dprint_opt(120,1, C_RGB(255,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "0 :", drawspeed );
}
else
{
dprint_opt(122,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.1f :", drawspeed );
dprint_opt(120,1, C_RGB(255,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.1f :", drawspeed ); //the ':' char corresponds to "Km/h"
}
dprint_opt(233,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time );
dprint_opt(230,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D ;", remaining_time ); // the ';' char corresponds to "s"
dprint_opt(390,3, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", score );
dprint_opt(388,1, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", score ); // the ';' char corresponds to "s"
dprint_opt(390,23, C_RGB(0,0,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", stage );
dprint_opt(388,21, C_RGB(255,255,0), C_NONE, DTEXT_RIGHT, DTEXT_TOP, "%.3D", stage ); // the ';' char corresponds to "s"
if (drawspeed==0.0) dsubimage( 48, 25, &speedhud, 0, 0, 76, 13, DIMAGE_NONE);
else if (drawspeed<3.30) dsubimage( 48, 25, &speedhud, 0, 13, 76, 13, DIMAGE_NONE);
else if (drawspeed<6.70) dsubimage( 48, 25, &speedhud, 0, 26, 76, 13, DIMAGE_NONE);
else if (drawspeed<10.0) dsubimage( 48, 25, &speedhud, 0, 39, 76, 13, DIMAGE_NONE);
else if (drawspeed<13.3) dsubimage( 48, 25, &speedhud, 0, 52, 76, 13, DIMAGE_NONE);
else if (drawspeed<16.7) dsubimage( 48, 25, &speedhud, 0, 65, 76, 13, DIMAGE_NONE);
else if (drawspeed<20.0) dsubimage( 48, 25, &speedhud, 0, 78, 76, 13, DIMAGE_NONE);
else if (drawspeed<23.3) dsubimage( 48, 25, &speedhud, 0, 91, 76, 13, DIMAGE_NONE);
else dsubimage( 48, 25, &speedhud, 0, 104, 76, 13, DIMAGE_NONE);
//dprint( 1, 1, C_BLACK, "FPS=%.3D ms", 1000/dt );
/*
#if 0
dprint( 1, 210, C_WHITE, "Decs: %c", BDrawDeco==true?'Y':'N' ); // Key F1
dprint( 67, 210, C_WHITE, "Clds: %c", BDrawClds==true?'Y':'N' ); // Key F2
dprint( 133, 210, C_WHITE, "Cars: %c", BDrawCars==true?'Y':'N' ); // Key F3
dprint( 199, 210, C_WHITE, "DtR: %.1f", ((float) (time_render) / 1000.0) ); // Key F4
dprint( 265, 210, C_WHITE, "ScrSht" ); // Key F5
dprint( 331, 210, C_WHITE, "RecVid" ); // Key F6
#endif // 1
#if 0
if (ShowDebug1)
{
Segment* currentSeg = circuit[indexstart];
dprint( 1, 1, C_RED, "Crt=%.3D ms", time_create );
dprint( 1, 15, C_RED, "Prj=%.3D ms", time_project );
dprint( 1, 29, C_RED, "Rdr=%.3D ms", time_render );
dprint( 1, 55, C_WHITE, "It=%d", l);
dprint( 1, 69, C_GREEN, "St=%d ", indexstart );
dprint( 1, 83, C_GREEN, "En=%d", indexend );
dprint( 1, 97, C_RED, "Sz= %d", circuit.size() );
dprint( 100, 55, C_WHITE, "SzSgmt=%d bytes", sizeof(Segment) );
dprint( 100, 69, C_WHITE, ">XYZc=(%d,%d,%.0lf,%d)", circuit[indexstart]->wX, circuit[indexstart]->wY, circuit[indexstart]->wZ, circuit[indexstart]->Curve );
dprint( 100, 83, C_WHITE, ">XYZc=(%d,%d,%.0lf,%d)", circuit[indexend]->wX, circuit[indexend]->wY, circuit[indexend]->wZ, circuit[indexstart]->Curve );
dprint( 100, 97, C_WHITE, "C[i]Adr= %p", &currentSeg),
dprint( 320, 1, C_WHITE, "CamX=%d", fround( cam->cX ) );
dprint( 320, 15, C_WHITE, "CamY=%d", fround( cam->cY ) );
dprint( 320, 29, C_WHITE, "CamZ=%d", fround( cam->cZ ) );
dprint( 320, 55, C_WHITE, "Dir=%d", direction );
dprint( 320, 69, C_WHITE, "Spd=%.1f", speed );
dprint( 320, 83, C_WHITE, "Dz =%.1f", speed*dt );
dprint( 320, 97, C_WHITE, "dt =%.3D ms", dt );
}
if (ShowDebug2)
{
#if 0
dprint( 1, 1, C_RED, "Crt=%.3D ms", time_create );
dprint( 1, 15, C_RED, "Prj=%.3D ms", time_project );
dprint( 1, 29, C_RED, "Rdr=%.3D ms", time_render );
dprint( 1, 50, C_BLACK, "ISt_Z=%.1lf", circuit[indexstart]->wZ);
dprint( 1, 65, C_BLACK, "IEd_Z=%.1lf", circuit[indexend]->wZ);
for( int k=indexend-1; k>=indexstart; k--)
{
dprint( 100, 1+10*k-indexstart, C_WHITE, "S[%d]=%d", k, circuit[k]->DScale );
}
for( int k=0; k<nuages.size(); k++)
{
dprint( 250, 1+10*k, C_WHITE, "Cl[%d]=(%d,%d,%d)", k, nuages[k]->X, nuages[k]->Y, nuages[k]->type );
}
#endif // 0
for( int k=0; k<traffic.size(); k++)
{
if (traffic[k]->visible == true) dprint( 1, 1+10*k, C_GREEN, "Car %d Sc=%d wZ=%.0lf / Seg=%d X=%d Y=%d", k, traffic[k]->DScale, traffic[k]->wZ, traffic[k]->segnum, traffic[k]->X, traffic[k]->Y, traffic[k]->S );
else dprint( 1, 1+10*k, C_RED, "Car %d Sc=%d wZ=%.0lf / Seg=%d X=%d Y=%d", k, traffic[k]->DScale, traffic[k]->wZ, traffic[k]->segnum, traffic[k]->X, traffic[k]->Y, traffic[k]->S );
}
}
if (ShowDebug3)
{
dprint( 1, 1, C_BLACK, "S");
for( int k=0; k<=indexend-indexstart; k++)
{
int nbCars=circuit[indexstart+k]->CarList.size();
dprint( 25+k*25, 1, C_BLACK, "%d", indexstart+k );
dprint( 25+k*25, 11, C_RED, "%d", nbCars );
for( int l=0; l<nbCars; l++ ) // For all cars inside that road segment
{
dprint( 1, 33+10*l, C_BLACK, "C" );
dprint( 25+k*25, 33+10*l, C_BLACK, "%d", circuit[indexstart+k]->CarList[l]);
}
}
}
#endif
*/
/*
for( int k=indexend-1; k>=indexstart; k--)
{
circuit[k]->CarList.clear();
}
*/
//dupdate();
r61524_display(gint_vram, 0, DHEIGHT, R61524_DMA_WAIT);
prof_leave(perf_render);
time_render = prof_time(perf_render);
prof_leave(perf_render);
time_render = prof_time(perf_render);
#if IS_FXLIB==1
if (screenshot && usb_is_open())
{
usb_fxlink_screenshot(false);
screenshot = false;
}
if (screenshot && usb_is_open())
{
usb_fxlink_screenshot(false);
screenshot = false;
}
if(record && usb_is_open())
{
usb_fxlink_videocapture(false);
}
if(record && usb_is_open())
{
usb_fxlink_videocapture(false);
}
#endif
l++;
l++;
}
circuit.clear();
nuages.clear();
traffic.clear();
freeDecoration();
freeTraffic();
}
}
while (exitToOS==false);
prof_quit();
@ -682,12 +604,8 @@ int main(void)
usb_close();
#endif
circuit.clear();
nuages.clear();
delete cam;
freeDecoration();
freeTraffic();
return 1;
}

View File

@ -28,11 +28,11 @@ extern bool ShowDebug1;
extern bopti_image_t car1, car2, car3, car4, car5, car6, car7, car8;
extern bopti_image_t pl_tree1, pl_tree2, pl_tree3, pl_tree4, dt_tree1, dt_tree2, dt_tree3, dt_tree4, us_tree4, fi_tree1, fi_tree2, fi_tree4;
extern bopti_image_t cc_bigleaf, cc_smallleaf, cc_rocks, af_bigleaf, dt_smallleaf, fi_rocks;
extern bopti_image_t cc_void, cc_bigleaf, cc_smallleaf, cc_rocks, af_bigleaf, dt_smallleaf, fi_rocks;
extern bopti_image_t sky1, sky2, sky3;
extern bopti_image_t mountain;
extern bopti_image_t treeline;
extern bopti_image_t mountain, canyon, snowmount;
extern bopti_image_t treeline, rockline;
extern bopti_image_t leftturn, rightturn, uphill, downhill;
extern bopti_image_t checkpoint, startlights, stoplights, waitlights;
@ -146,33 +146,288 @@ void initData( void )
}
void createCircuit( void )
void createCircuit( int circuitNumber )
{
addStartLine( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, DESERT );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, AFRICA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, USA );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, DESERT );
addCheckPoint( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addCheckPoint( DESERT );
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, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addStraightLine( L_VERYLONG, DESERT );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, DESERT );
addCheckPoint( PLAINS );
addFinishLine( DESERT );
addStraightLine( L_VERYSHORT, PLAINS );
if (circuitNumber==0)
{
addStartLine( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
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 );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, PLAINS );
addCheckPoint( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addCheckPoint( PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, PLAINS );
addStraightLine( L_LONG, PLAINS );
addHill( L_MEDIUM, H_BIG, UP_HILL, PLAINS );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, PLAINS );
addCheckPoint( PLAINS );
addFinishLine( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
}
else if (circuitNumber==1)
{
addStartLine( DESERT );
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 );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, DESERT );
addCheckPoint( DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCheckPoint( DESERT );
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 );
addFinishLine( DESERT );
addStraightLine( L_VERYSHORT, DESERT );
}
else if (circuitNumber==2)
{
addStartLine( USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, 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_VERYSHORT, USA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, USA );
addCheckPoint( USA );
addStraightLine( L_VERYSHORT, USA );
addCheckPoint( USA );
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 );
addFinishLine( USA );
addStraightLine( L_VERYSHORT, USA );
}
else if (circuitNumber==3)
{
addStartLine( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, 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 );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, FINLAND );
addCheckPoint( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND );
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 );
addFinishLine( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
}
else if (circuitNumber==4)
{
addStartLine( AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
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 );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA );
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 );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, AFRICA );
addCheckPoint( AFRICA );
addFinishLine( AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
}
if (circuitNumber==5)
{
addStartLine( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
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 );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, PLAINS );
addCheckPoint( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
addCheckPoint( PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addCurve( L_SHORT, C_HARD, RIGHT_CURVE, PLAINS );
addStraightLine( L_LONG, PLAINS );
addHill( L_MEDIUM, H_BIG, UP_HILL, PLAINS );
addHill( L_MEDIUM, H_BIG, DOWN_HILL, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_SHORT, C_HARD, LEFT_CURVE, PLAINS );
addStraightLine( L_VERYLONG, PLAINS );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, PLAINS );
addCheckPoint( PLAINS );
addFinishLine( PLAINS );
addStraightLine( L_VERYSHORT, PLAINS );
}
else if (circuitNumber==6)
{
addStartLine( DESERT );
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 );
addCurvyHill( L_MEDIUM, H_BIG, UP_HILL, C_HARD, LEFT_CURVE, DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, DESERT );
addCheckPoint( DESERT );
addStraightLine( L_VERYSHORT, DESERT );
addCheckPoint( DESERT );
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 );
addFinishLine( DESERT );
addStraightLine( L_VERYSHORT, DESERT );
}
else if (circuitNumber==7)
{
addStartLine( USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, USA );
addStraightLine( L_VERYSHORT, 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_VERYSHORT, USA );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, USA );
addCheckPoint( USA );
addStraightLine( L_VERYSHORT, USA );
addCheckPoint( USA );
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 );
addFinishLine( USA );
addStraightLine( L_VERYSHORT, USA );
}
else if (circuitNumber==8)
{
addStartLine( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addStraightLine( L_VERYSHORT, 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 );
addStraightLine( L_VERYSHORT, FINLAND );
addCurvyHill( L_MEDIUM, H_BIG, DOWN_HILL, C_HARD, RIGHT_CURVE, FINLAND );
addCheckPoint( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
addCheckPoint( FINLAND );
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 );
addFinishLine( FINLAND );
addStraightLine( L_VERYSHORT, FINLAND );
}
else if (circuitNumber==9)
{
addStartLine( AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
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 );
addStraightLine( L_VERYSHORT, AFRICA );
addCheckPoint( AFRICA );
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 );
addStraightLine( L_VERYLONG, AFRICA );
addCurve( L_SHORT, C_EASY, LEFT_CURVE, AFRICA );
addCheckPoint( AFRICA );
addFinishLine( AFRICA );
addStraightLine( L_VERYSHORT, AFRICA );
}
};
void putBillBoards( void )
@ -668,7 +923,7 @@ void drawCircuitSegment( uint16_t index )
{
if (index%2==0)
{
drawPolygon( 0, X2-W2/16-W2+currentcurve, Y2, 0, X1-W1/16-W1+currentcurve, Y1, DARK_GREEN_GRASS );
drawPolygon( 0, X2-W2/16-W2+currentcurve, Y2, 0, X1-W1/16-W1+currentcurve, Y1, DARK_ORANGE );
drawPolygon( X2-W2+currentcurve, X2+W2+currentcurve, Y2, X1-W1+currentcurve, X1+W1+currentcurve, Y1, BLACK_ROAD );
drawPolygon( X2-W2/16-W2+currentcurve, X2-W2+currentcurve, Y2, X1-W1/16-W1+currentcurve, X1-W1+currentcurve, Y1, WHITE_STRIPE );
drawPolygon( X2-W2/50-W2/2+currentcurve, X2+W2/50-W2/2+currentcurve, Y2, X1-W1/50-W1/2+currentcurve, X1+W1/50-W1/2+currentcurve, Y1, WHITE_STRIPE );
@ -676,17 +931,17 @@ void drawCircuitSegment( uint16_t index )
drawPolygon( X2+W2/50+currentcurve, X2+W2/25+currentcurve, Y2, X1+W1/50+currentcurve, X1+W1/25+currentcurve, Y1, YELLOW_STRIPE );
drawPolygon( X2-W2/50+W2/2+currentcurve, X2+W2/50+W2/2+currentcurve, Y2, X1-W1/50+W1/2+currentcurve, X1+W1/50+W1/2+currentcurve, Y1, WHITE_STRIPE );
drawPolygon( X2+W2+currentcurve, X2+W2+W2/16+currentcurve, Y2, X1+W1+currentcurve, X1+W1+W1/16+currentcurve, Y1, WHITE_STRIPE );
drawPolygon( X2+W2/16+W2+currentcurve, 396, Y2, X1+W1/16+W1+currentcurve, 396, Y1, DARK_GREEN_GRASS );
drawPolygon( X2+W2/16+W2+currentcurve, 396, Y2, X1+W1/16+W1+currentcurve, 396, Y1, DARK_ORANGE );
}
else
{
drawPolygon( 0, X2-W2/16-W2+currentcurve, Y2, 0, X1-W1/16-W1+currentcurve, Y1, LIGHT_GREEN_GRASS );
drawPolygon( 0, X2-W2/16-W2+currentcurve, Y2, 0, X1-W1/16-W1+currentcurve, Y1, LIGHT_ORANGE );
drawPolygon( X2-W2+currentcurve, X2+W2+currentcurve, Y2, X1-W1+currentcurve, X1+W1+currentcurve, Y1, BLACK_ROAD );
drawPolygon( X2-W2/16-W2+currentcurve, X2-W2+currentcurve, Y2, X1-W1/16-W1+currentcurve, X1-W1+currentcurve, Y1, WHITE_STRIPE );
drawPolygon( X2-W2/25+currentcurve, X2-W2/50+currentcurve, Y2, X1-W1/25+currentcurve, X1-W1/50+currentcurve, Y1, YELLOW_STRIPE );
drawPolygon( X2+W2/50+currentcurve, X2+W2/25+currentcurve, Y2, X1+W1/50+currentcurve, X1+W1/25+currentcurve, Y1, YELLOW_STRIPE );
drawPolygon( X2+W2+currentcurve, X2+W2+W2/16+currentcurve, Y2, X1+W1+currentcurve, X1+W1+W1/16+currentcurve, Y1, WHITE_STRIPE );
drawPolygon( X2+W2/16+W2+currentcurve, 396, Y2, X1+W1/16+W1+currentcurve, 396, Y1, LIGHT_GREEN_GRASS );
drawPolygon( X2+W2/16+W2+currentcurve, 396, Y2, X1+W1/16+W1+currentcurve, 396, Y1, LIGHT_ORANGE );
}
}
else if (circuit[index]->Environment == FINLAND)
@ -855,38 +1110,38 @@ void prepareDecoration( int biometoload )
else if (k==1) src = &dt_tree2;
else if (k==2) src = &dt_tree3;
else if (k==3) src = &dt_tree4;
else if (k==4) src = &cc_bigleaf;
else if (k==4) src = &cc_void; //&cc_bigleaf;
else if (k==5) src = &dt_smallleaf;
else if (k==6) src = &cc_rocks;
}
else if (biometoload==USA)
{
if(k==0) src = &pl_tree1;
else if (k==1) src = &pl_tree2;
else if (k==2) src = &pl_tree3;
if(k==0) src = &cc_void; //&pl_tree1;
else if (k==1) src = &cc_smallleaf; //&pl_tree2;
else if (k==2) src = &cc_void; //&pl_tree3;
else if (k==3) src = &us_tree4;
else if (k==4) src = &cc_bigleaf;
else if (k==5) src = &cc_smallleaf;
else if (k==4) src = &af_bigleaf;
else if (k==5) src = &dt_smallleaf;
else if (k==6) src = &cc_rocks;
}
else if (biometoload==FINLAND)
{
if(k==0) src = &fi_tree1;
else if (k==1) src = &fi_tree2;
else if (k==2) src = &pl_tree3; // to be added
else if (k==2) src = &cc_void; //&pl_tree3; // to be added
else if (k==3) src = &fi_tree4;
else if (k==4) src = &cc_bigleaf; // to be added
else if (k==5) src = &cc_smallleaf; // to be added
else if (k==4) src = &cc_void; //&cc_bigleaf; // to be added
else if (k==5) src = &cc_void; //&cc_smallleaf; // to be added
else if (k==6) src = &fi_rocks; // to be added
}
else if (biometoload==AFRICA)
{
if(k==0) src = &pl_tree1;
else if (k==1) src = &pl_tree2;
else if (k==2) src = &pl_tree3;
else if (k==3) src = &pl_tree4;
if(k==0) src = &cc_void; //&pl_tree1;
else if (k==1) src = &cc_void; //&pl_tree2;
else if (k==2) src = &cc_void; //&pl_tree3;
else if (k==3) src = &cc_void; //&pl_tree4;
else if (k==4) src = &af_bigleaf;
else if (k==5) src = &cc_smallleaf;
else if (k==5) src = &cc_void; //&cc_smallleaf;
else if (k==6) src = &cc_rocks;
}
@ -1040,10 +1295,18 @@ void drawClouds( int offset )
}
void drawFarBackground( int offset )
void drawFarBackground( int offset, int currentbiome )
{
bopti_image_t *image;
if (currentbiome==PLAINS) image=&mountain;
else if (currentbiome==DESERT) image=&cc_void;
else if (currentbiome==USA) image=&canyon;
else if (currentbiome==FINLAND) image=&snowmount;
else if (currentbiome==AFRICA) image=&cc_void;
int X = offset;
int DX = mountain.width;
int DX = image->width;
while (X>0)
{
@ -1052,17 +1315,26 @@ void drawFarBackground( int offset )
do
{
if (X>-1*DX) dimage(X, 60, &mountain);
if (X>-1*DX) dimage(X, 60, image);
X+=DX;
}
while(X<SCREEN_WIDTH+DX);
}
void drawNearBackground( int offset )
void drawNearBackground( int offset, int currentbiome )
{
bopti_image_t *image;
if (currentbiome==PLAINS) image=&treeline;
else if (currentbiome==DESERT) image=&rockline;
else if (currentbiome==USA) image=&rockline;
else if (currentbiome==FINLAND) image=&cc_void;
else if (currentbiome==AFRICA) image=&rockline;
int X = offset;
int DX = treeline.width;
int DX = image->width;
while (X>0)
{
@ -1071,7 +1343,7 @@ void drawNearBackground( int offset )
do
{
if (X>-1*DX) dimage(X, 90, &treeline);
if (X>-1*DX) dimage(X, 100, image);
X+=DX;
}
while(X<SCREEN_WIDTH+DX);

View File

@ -108,7 +108,7 @@ void drawSky( void )
void drawSky( uint16_t color )
{
dma_memset(gint_vram, (color << 16) | color, 396 * 80 * 2);
dma_memset(gint_vram, (color << 16) | color, 396 * 110 * 2);
};
void drawSkyOptimised( uint16_t color )

View File

@ -77,6 +77,7 @@ int drawMainMenu( void )
while (!doneMainMenu)
{
dclear(0x0000);
dimage( 0, 0, &mainscreen);
dfont(&autofont);
@ -180,7 +181,7 @@ int drawMenuCircuitSelect( void )
else
{
drawRectangle( 16, 45, 60, 60, C_RGB(pulse%256,0,pulse%256), 3 );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">> CIRCUIT #1" );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">EUROPEAN PLAINS" );
}
dimage( 92, 45, &desert1 );
@ -188,7 +189,7 @@ int drawMenuCircuitSelect( void )
else
{
drawRectangle( 92, 45, 60, 60, C_RGB(pulse%256,0,pulse%256), 3 );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">> CIRCUIT #2" );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">ATACAMA DESERT" );
}
dimage( 168, 45, &usa1 );
@ -196,7 +197,7 @@ int drawMenuCircuitSelect( void )
else
{
drawRectangle( 168, 45, 60, 60, C_RGB(pulse%256,0,pulse%256), 3 );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">> CIRCUIT #3" );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">US ROAD 66" );
}
dimage( 244, 45, &finland1 );
@ -204,7 +205,7 @@ int drawMenuCircuitSelect( void )
else
{
drawRectangle( 244, 45, 60, 60, C_RGB(pulse%256,0,pulse%256), 3 );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">> CIRCUIT #4" );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">FINLAND" );
}
dimage( 320, 45, &africa1 );
@ -212,7 +213,7 @@ int drawMenuCircuitSelect( void )
else
{
drawRectangle( 320, 45, 60, 60, C_RGB(pulse%256,0,pulse%256), 3 );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">> CIRCUIT #5" );
dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, ">KENYAN SAVANAH" );
}