#include #include "../fixed.h" enum Length { L_VERYSHORT = 25, L_SHORT = 50, L_MEDIUM = 100, L_LONG = 200, L_VERYLONG = 400 }; enum HillSize { H_VERYSMALL = 20, H_SMALL = 40, H_MEDIUM = 60, H_BIG = 80, H_VERYBIG = 100 }; enum HillType { UP_HILL = +1, DOWN_HILL = -1 }; enum CurveStrength { C_VERYEASY = 2, C_EASY = 4, C_MEDIUM = 6, C_HARD = 8, C_VERYHARD = 10 }; enum CurveType { LEFT_CURVE = -1, RIGHT_CURVE = +1 }; enum Decoration { TREE1 = 0, TREE2 = 1, TREE3 = 2, TREE4 = 3, LEAF1 = 4, LEAF2 = 5, ROCKS = 6, LEFTTURN = 7, RIGHTTURN = 8, UPHILL = 9, DOWNHILL = 10, CHECK = 11, STARTLIGHT = 12, STOPLIGHT = 13, WAITLIGHT = 14 }; void initData( void ); void createCircuit( void ); void putBillBoards( void ); void createClouds( void ); void createTraffic( void ); void projectCircuitFP( void ); void projectCircuitFP( uint16_t index ); void updateTraffic( float dt, uint32_t maxdistance ); void printCircuit( void ); void printCircuit( int i ); 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 freeDecoration( void ); void prepareDecoration( int biometoload ); void freeTraffic( void ); void prepareTraffic( void ); void addCheckPoint( int8_t biome ); void addStartLine( int8_t biome ); void addFinishLine( int8_t biome ); void addStraightLine( Length l, int8_t biome ); void addCurve( Length l, CurveStrength s, CurveType t, int8_t biome ); void addHill( Length l, HillSize s, HillType t, int8_t biome ); void addCurvyHill( Length l, HillSize s, HillType t, CurveStrength cs, CurveType ct, int8_t biome ); fixed_t interpolatePositionX( double currentZ ); fixed_t interpolatePositionY( double currentZ ); uint16_t findIndex( double currentZ );