A simple OutRun on Casio Graph 90+E
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
OutRun/src/include/circuit.h

98 lines
2.0 KiB

#include <vector>
#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
{
PALMTREE = 0,
DEADTREE = 1,
OAKTREE = 2,
CACTUS = 3,
BIGLEAF = 4,
SMALLLEAF = 5,
LEFTTURN = 6,
RIGHTTURN = 7,
UPHILL = 8,
DOWNHILL = 9,
CHECK = 10,
STARTLIGHT = 11,
STOPLIGHT = 12,
WAITLIGHT = 13
};
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( void );
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 );