80 lines
1.5 KiB
C++
80 lines
1.5 KiB
C++
#ifndef SEGMENT_H
|
|
#define SEGMENT_H
|
|
|
|
#include "../fixed.h"
|
|
#include <stdint.h>
|
|
#include "camera.h"
|
|
|
|
#include <vector>
|
|
|
|
enum BiomeType
|
|
{
|
|
PLAINS = 0,
|
|
DESERT = 1,
|
|
USA = 2,
|
|
FINLAND = 3,
|
|
AFRICA = 4
|
|
};
|
|
|
|
enum Specialty
|
|
{
|
|
START = 0,
|
|
CHECKPOINT = 1,
|
|
FINISH = 2
|
|
};
|
|
|
|
class MileStone
|
|
{
|
|
public:
|
|
MileStone( ) {type = -1; wZ = 0.0; lap = 0; };
|
|
MileStone( uint8_t t, double Z, uint8_t l ) {type = t; wZ = Z; lap = l; };
|
|
~MileStone( ) { };
|
|
|
|
uint8_t type;
|
|
double wZ;
|
|
uint8_t lap;
|
|
} ;
|
|
|
|
|
|
class Segment
|
|
{
|
|
public:
|
|
Segment();
|
|
Segment( uint16_t n_seg );
|
|
Segment( int16_t x, int16_t y, double z, int8_t c, int8_t s );
|
|
Segment( int16_t x, int16_t y, double z, int8_t c, int8_t s, int8_t left, int8_t right );
|
|
~Segment();
|
|
|
|
void Project3DFP( camera* c );
|
|
|
|
int8_t Environment = PLAINS;
|
|
int8_t Special = -1;
|
|
bool CheckValidated = false;
|
|
|
|
uint32_t Extratime = 0;
|
|
uint8_t CheckLap = 0;
|
|
|
|
int8_t Curve=0;
|
|
int8_t Slope=0;
|
|
int16_t CumulatedCurve=0;
|
|
|
|
// World Coordinates (X,Y,Z)
|
|
int16_t wX=0;
|
|
int16_t wY=0;
|
|
double wZ=0.0;
|
|
|
|
// Screen Coordinates (X, Y) + width of the projected Road
|
|
int16_t X=0;
|
|
int16_t Y=0;
|
|
int16_t W=0;
|
|
|
|
// Decorations on the Road (Left and Right)
|
|
int8_t LDeco=-1;
|
|
int8_t RDeco=-1;
|
|
//int8_t DScale=0;
|
|
|
|
std::vector <uint8_t> CarList;
|
|
};
|
|
|
|
#endif // SEGMENT_H
|