#include #include "../fixed.h" enum Length { L_VERYSHORT = 50, L_SHORT = 100, L_MEDIUM = 200, L_LONG = 400, L_VERYLONG = 1000 }; 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 { PALMTREE = 0, DEADTREE = 1, OAKTREE = 2, CACTUS = 3, BIGLEAF = 4, SMALLLEAF = 5, LEFTTURN = 6, RIGHTTURN = 7, UPHILL = 8, DOWNHILL = 9 }; 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 ); 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( void ); void freeTraffic( void ); void prepareTraffic( void ); 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 );