TORCS  1.3.9
The Open Racing Car Simulator
trackitf.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : trackitf.cpp
4  created : Sun Jan 30 22:57:50 CET 2000
5  copyright : (C) 2000 by Eric Espie
6  email : torcs@free.fr
7  version : $Id$
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 
21 #include <stdlib.h>
22 #include <tgf.h>
23 #include <track.h>
24 #include "trackinc.h"
25 
26 #ifdef _WIN32
27 BOOL WINAPI DllEntryPoint (HINSTANCE hDLL, DWORD dwReason, LPVOID Reserved)
28 {
29  return TRUE;
30 }
31 #endif
32 
33 /*
34  * Function
35  * trackInit
36  *
37  * Description
38  * init the menus
39  *
40  * Parameters
41  *
42  *
43  * Return
44  *
45  *
46  * Remarks
47  *
48  */
49 static int
50 trackInit(int /* index */, void *pt)
51 {
52  tTrackItf *ptf = (tTrackItf*)pt;
53 
54  ptf->trkBuild = TrackBuildv1;
55  ptf->trkBuildEx = TrackBuildEx;
56  ptf->trkHeightG = TrackHeightG;
57  ptf->trkHeightL = TrackHeightL;
63 
64  return 0;
65 }
66 
67 
68 /*
69  * Function
70  * trackv1
71  *
72  * Description
73  *
74  *
75  * Parameters
76  *
77  *
78  * Return
79  *
80  *
81  * Remarks
82  *
83  */
84 extern "C" int
85 track(tModInfo *modInfo)
86 {
87  modInfo->name = strdup("trackv1"); /* name of the module (short) */
88  modInfo->desc = strdup("Track V1.0"); /* description of the module (can be long) */
89  modInfo->fctInit = trackInit; /* init function */
90  modInfo->gfId = TRK_IDENT; /* always loaded */
91  modInfo->index = 0;
92 
93  return 0;
94 }
95 
96 
97 
tfTrackBuild trkBuild
build track structure for simu
Definition: track.h:604
unsigned int gfId
supported framework version
Definition: tgf.h:192
void TrackShutdown(void)
Definition: track.cpp:208
void TrackLocal2Global(tTrkLocPos *p, tdble *X, tdble *Y)
Definition: trackutil.cpp:29
tTrack * TrackBuildEx(char *trackfile)
Definition: track.cpp:74
Interface Structure for Track Loader.
Definition: track.h:603
tdble TrackHeightG(tTrackSeg *seg, tdble x, tdble y)
Definition: trackutil.cpp:61
void TrackGlobal2Local(tTrackSeg *segment, tdble X, tdble Y, tTrkLocPos *p, int sides)
Definition: trackutil.cpp:36
#define TRK_IDENT
Definition: track.h:39
tfModPrivInit fctInit
init function
Definition: tgf.h:191
tfTrackGlobal2Local trkGlobal2Local
Definition: track.h:608
tdble TrackHeightL(tTrkLocPos *p)
Definition: trackutil.cpp:55
tfTrackHeightL trkHeightL
Definition: track.h:607
The Gaming Framework API.
tfTrackHeightG trkHeightG
Definition: track.h:606
static int trackInit(int, void *pt)
Definition: trackitf.cpp:50
int track(tModInfo *modInfo)
Definition: trackitf.cpp:85
char * name
name of the module (short) (NULL if no module)
Definition: tgf.h:189
int index
index if multiple interface in one dll
Definition: tgf.h:193
tTrack * TrackBuildv1(char *trackfile)
Definition: track.cpp:44
tfTrackLocal2Global trkLocal2Global
Definition: track.h:609
tfTrackShutdown trkShutdown
Definition: track.h:612
char * desc
description of the module (can be long)
Definition: tgf.h:190
Track Structure and Track Loader Module Definition.
void TrackSideNormal(tTrackSeg *, tdble, tdble, int, t3Dd *)
Definition: trackutil.cpp:67
Module information structure.
Definition: tgf.h:188
tfTrackSideNormal trkSideNormal
Definition: track.h:610
tfTrackBuild trkBuildEx
build with graphic extensions (used by trackgen tool)
Definition: track.h:605
tfTrackSurfaceNormal trkSurfaceNormal
Definition: track.h:611
void TrackSurfaceNormal(tTrkLocPos *p, t3Dd *norm)
Definition: trackutil.cpp:73