![]() |
torcs - 1.2.2 | ![]() |
00001 /*************************************************************************** 00002 00003 file : grscene.h 00004 created : Mon Aug 21 20:09:40 CEST 2000 00005 copyright : (C) 2000 by Eric Espie 00006 email : torcs@free.fr 00007 version : $Id: grscene.h,v 1.10 2003/10/19 18:59:38 torcs Exp $ 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 00020 00021 #ifndef _GRSCENE_H_ 00022 #define _GRSCENE_H_ 00023 #ifdef GUIONS 00024 #include <glib.h> 00025 #endif /* GUIONS */ 00026 #include <track.h> 00027 00028 00029 extern int grWrldX; 00030 extern int grWrldY; 00031 extern int grWrldZ; 00032 extern int grWrldMaxSize; 00033 extern tTrack *grTrack; 00034 00035 extern ssgRoot *TheScene; 00036 extern ssgBranch *SunAnchor; 00037 extern ssgBranch *LandAnchor; 00038 extern ssgBranch *CarsAnchor; 00039 extern ssgBranch *ShadowAnchor; 00040 extern ssgBranch *PitsAnchor; 00041 extern ssgBranch *SmokeAnchor; 00042 extern ssgBranch *SkidAnchor; 00043 extern ssgBranch *CarlightAnchor; 00044 00045 extern ssgBranch *ThePits; 00046 00047 extern int grInitScene(void); 00048 extern int grLoadScene(tTrack *track); 00049 extern void grDrawScene(void); 00050 extern void grShutdownScene(void); 00051 extern void grCustomizePits(void); 00052 00053 struct Camera; 00054 extern void grDrawBackground(class cGrCamera *, class cGrBackgroundCam *bgCam); 00055 00056 extern ssgStateSelector *grEnvSelector; 00057 #include "grmultitexstate.h" 00058 extern grMultiTexState *grEnvState; 00059 extern grMultiTexState *grEnvShadowState; 00060 extern grMultiTexState *grEnvShadowStateOnCars; 00061 00062 #ifdef GUIONS 00063 typedef struct DoV 00064 { 00065 tdble FrontLevelGroupGlobal; /* the distance for the end of the front scene */ 00066 tdble FrontLevelGroup1; /* the distance for the end of the front scene for group type 1*/ 00067 tdble FrontLevelGroup2; /* the distance for the end of the front scene for group type 2*/ 00068 tdble FrontLevelGroup3; /* the distance for the end of the front scene for group type 3*/ 00069 00070 tdble RearLevelGroupGlobal; /* the distance for the end of the front scene */ 00071 tdble RearLevelGroup1; 00072 tdble RearLevelGroup2; 00073 tdble RearLevelGroup3; 00074 00075 tdble FrontLevelMap1; /* the distance for the end of the front scene with only one mapping*/ 00076 tdble FrontLevelMap2; /* the distance for the end of the front scene with two mapping*/ 00077 tdble FrontLevelMap3; /* the distance for the end of the front scene with three mapping*/ 00078 tdble RearLevelMap1; 00079 tdble RearLevelMap2; 00080 tdble RearLevelMap3; 00081 } DoV_t; 00082 00083 typedef struct hashMapElement 00084 { 00085 char * name; 00086 int numberOfMapToApply; 00087 } hashMapElement_t; 00088 00089 typedef struct DistanceOfViewHashing 00090 { 00091 char * name; /* segment name */ 00092 GHashTable * ViewGroup; /* all object to display group1+group2+group3 for this segment */ 00093 int ViewGroup_num; /* number of object */ 00094 int ViewGroupMap1_num; 00095 int ViewGroupMap2_num; 00096 int ViewGroupMap3_num; 00097 } DistanceOfViewHashing_t; 00098 00099 extern DistanceOfViewHashing_t * SceneHashing; 00100 extern DoV_t * currentDistanceOfView; 00101 extern DoV_t PlayableDistanceOfView; 00102 extern DoV_t UnPlayableDistanceOfView; 00103 #endif /* GUIONS */ 00104 00105 00106 00107 #endif /* _GRSCENE_H_ */ 00108 00109 00110