coastline 0.0.4
Loading...
Searching...
No Matches
trackskidmarks.h
Go to the documentation of this file.
1#ifndef COASTLINE_TRACKSKIDMARKS_H
2#define COASTLINE_TRACKSKIDMARKS_H
3
4#include "common/vecmath.h"
5#include "common/vehiclefwd.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
12#define SKID_MARK_TRACK_COUNT 32
13
14#if TGR_PLATFORM == TGR_PLATFORM_SDL
20
24#define g_anSkidMarkHead (GetSdlSkidMarkState()->heads)
25#define g_anSkidMarkTail (GetSdlSkidMarkState()->tails)
27#else
34extern int g_anSkidMarkHead[SKID_MARK_TRACK_COUNT];
35
42extern int g_anSkidMarkTail[SKID_MARK_TRACK_COUNT];
43#endif /* TGR_PLATFORM == TGR_PLATFORM_SDL */
44
46void DrawTrackShadows(Vehicle *vehicles);
47
48#if TGR_PLATFORM == TGR_PLATFORM_SDL
50#define SKID_MARK_SEGMENT_COUNT 500
51
59
73void VisitSkidMarkQuads(void (*visit)(unsigned slot,
74 unsigned long long revision,
75 const Vec3f *oldRight,
76 const Vec3f *newRight,
77 const Vec3f *oldLeft,
78 const Vec3f *newLeft,
79 void *context),
80 void *context,
81 const unsigned char *mask,
82 int *vertices);
83#endif /* TGR_PLATFORM == TGR_PLATFORM_SDL */
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
Ring endpoints for each skid trail in one active engine runtime.
Definition trackskidmarks.h:16
int heads[SKID_MARK_TRACK_COUNT]
Definition trackskidmarks.h:17
int tails[SKID_MARK_TRACK_COUNT]
Definition trackskidmarks.h:18
A point or direction in space.
Definition vecmath.h:17
A vehicle.
Definition vehicle.h:143
void VisitSkidMarkQuads(void(*visit)(unsigned slot, unsigned long long revision, const Vec3f *oldRight, const Vec3f *newRight, const Vec3f *oldLeft, const Vec3f *newLeft, void *context), void *context, const unsigned char *mask, int *vertices)
Visit the quads of the skid marks in the order DrawTrackShadows() draws them, each the right and the ...
void RecordFrameSkidMarks(Vehicle *vehicles)
Lay the skid marks of the wheels of the vehicles of a drawn frame, as DrawTrackShadows() lays them wh...
SdlSkidMarkState * GetSdlSkidMarkState(void)
void DrawTrackShadows(Vehicle *vehicles)
Append vehicle shadows and skid trails to the deferred display list.
#define SKID_MARK_TRACK_COUNT
The number of entries of g_anSkidMarkHead and g_anSkidMarkTail.
Definition trackskidmarks.h:12
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...