TORCS  1.3.9
The Open Racing Car Simulator
grscene.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : grscene.h
4  created : Mon Aug 21 20:09:40 CEST 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 #ifndef _GRSCENE_H_
22 #define _GRSCENE_H_
23 #ifdef GUIONS
24 #include <glib.h>
25 #endif /* GUIONS */
26 #include <track.h>
27 
28 
29 extern int grWrldX;
30 extern int grWrldY;
31 extern int grWrldZ;
32 extern int grWrldMaxSize;
33 extern tTrack *grTrack;
34 
35 extern ssgRoot *TheScene;
36 extern ssgBranch *SunAnchor;
37 extern ssgBranch *LandAnchor;
38 extern ssgBranch *CarsAnchor;
39 extern ssgBranch *ShadowAnchor;
40 extern ssgBranch *PitsAnchor;
41 extern ssgBranch *SmokeAnchor;
42 extern ssgBranch *SkidAnchor;
43 extern ssgBranch *CarlightAnchor;
44 
45 extern ssgBranch *ThePits;
46 
47 extern int grInitScene(void);
48 extern int grLoadScene(tTrack *track);
49 extern void grDrawScene(void);
50 extern void grShutdownScene(void);
51 extern void grCustomizePits(void);
52 
53 struct Camera;
54 extern void grDrawBackground(class cGrCamera *, class cGrBackgroundCam *bgCam);
55 
56 extern ssgStateSelector *grEnvSelector;
57 #include "grmultitexstate.h"
61 
62 #ifdef GUIONS
63 typedef struct DoV
64 {
65  tdble FrontLevelGroupGlobal; /* the distance for the end of the front scene */
66  tdble FrontLevelGroup1; /* the distance for the end of the front scene for group type 1*/
67  tdble FrontLevelGroup2; /* the distance for the end of the front scene for group type 2*/
68  tdble FrontLevelGroup3; /* the distance for the end of the front scene for group type 3*/
69 
70  tdble RearLevelGroupGlobal; /* the distance for the end of the front scene */
71  tdble RearLevelGroup1;
72  tdble RearLevelGroup2;
73  tdble RearLevelGroup3;
74 
75  tdble FrontLevelMap1; /* the distance for the end of the front scene with only one mapping*/
76  tdble FrontLevelMap2; /* the distance for the end of the front scene with two mapping*/
77  tdble FrontLevelMap3; /* the distance for the end of the front scene with three mapping*/
78  tdble RearLevelMap1;
79  tdble RearLevelMap2;
80  tdble RearLevelMap3;
81 } DoV_t;
82 
83 typedef struct hashMapElement
84 {
85  char * name;
86  int numberOfMapToApply;
87 } hashMapElement_t;
88 
89 typedef struct DistanceOfViewHashing
90 {
91  char * name; /* segment name */
92  GHashTable * ViewGroup; /* all object to display group1+group2+group3 for this segment */
93  int ViewGroup_num; /* number of object */
94  int ViewGroupMap1_num;
95  int ViewGroupMap2_num;
96  int ViewGroupMap3_num;
97 } DistanceOfViewHashing_t;
98 
99 extern DistanceOfViewHashing_t * SceneHashing;
100 extern DoV_t * currentDistanceOfView;
101 extern DoV_t PlayableDistanceOfView;
102 extern DoV_t UnPlayableDistanceOfView;
103 #endif /* GUIONS */
104 
105 
106 
107 #endif /* _GRSCENE_H_ */
108 
109 
110 
ssgBranch * ShadowAnchor
Definition: grscene.cpp:73
ssgBranch * ThePits
Definition: grscene.cpp:79
tTrack * grTrack
Definition: grscene.cpp:57
void grShutdownScene(void)
Definition: grscene.cpp:252
void grCustomizePits(void)
Definition: grscene.cpp:618
ssgBranch * CarlightAnchor
Definition: grscene.cpp:77
int grLoadScene(tTrack *track)
Definition: grscene.cpp:168
Track structure.
Definition: track.h:502
int grWrldZ
Definition: grscene.cpp:55
ssgBranch * LandAnchor
Definition: grscene.cpp:71
int grWrldX
Definition: grscene.cpp:53
void grDrawBackground(class cGrCamera *, class cGrBackgroundCam *bgCam)
Definition: grscene.cpp:605
float tdble
Floating point type used in TORCS.
Definition: tgf.h:48
ssgBranch * PitsAnchor
Definition: grscene.cpp:74
grMultiTexState * grEnvState
Definition: grscene.cpp:60
ssgStateSelector * grEnvSelector
Definition: grscene.cpp:59
ssgBranch * SunAnchor
Definition: grscene.cpp:70
ssgBranch * CarsAnchor
Definition: grscene.cpp:72
grMultiTexState * grEnvShadowStateOnCars
Definition: grscene.cpp:62
ssgBranch * SmokeAnchor
Definition: grscene.cpp:75
int track(tModInfo *modInfo)
Definition: trackitf.cpp:85
int grInitScene(void)
Definition: grscene.cpp:93
int grWrldMaxSize
Definition: grscene.cpp:56
void grDrawScene(void)
Definition: grscene.cpp:244
int grWrldY
Definition: grscene.cpp:54
ssgBranch * SkidAnchor
Definition: grscene.cpp:76
ssgRoot * TheScene
Definition: grscene.cpp:66
Track Structure and Track Loader Module Definition.
grMultiTexState * grEnvShadowState
Definition: grscene.cpp:61