Main Page | Class Hierarchy | Compound List | File List | Compound Members

DLevel.h

00001 /*
00002   Debris - A 3D-Space-Shooter Game based on OpenGL
00003   Copyright (C) 2002  Daniel Wagner <daniel@kwaxi.org> and
00004   Sebastian Zambal <e9826978@student.tuwien.ac.at>
00005 
00006   file: DLevel.h
00007 */
00008 
00009 #pragma once
00010 
00011 #include "DObject.h"
00012 #include "DObject3D.h"
00013 #include "DShot.h"
00014 #include "DKeyboard.h"
00015 #include "DTextures.h"
00016 #include "DLevelSegment.h"
00017 #include "DSystem.h"
00018 #include "DThings.h"
00019 #include "debris.h"
00020 
00021 #define NO_SHOTS 30
00022 #define NO_EXPLOSIONS 5
00023 #define NO_FIGHTER 5
00024 #define FIRE_LIFETIME 500
00025 
00027 
00031 class DLevel:DObject {
00032 private:
00034         DSpaceShip *spaceShip;
00035 
00037         GLuint      texPlanet;
00038         GLuint      texStars1;
00039         GLuint      texStars2;
00040         GLuint          texLevelOver;
00041         GLuint          texGameOver;
00042         GLuint          texWrongCourse;
00043 
00045         float course;
00046 
00048         float gameOverCounter;
00049 
00051         DShotPtr *shot;
00052 
00054         DFighterPtr *fighter;
00055         int countFighter;
00056 
00058         DExplosionPtr *explosions;
00059         int *explosionOrder;
00060         GLuint currentExplosion;
00061 
00063         int currentShot;
00064 
00066         DLevelSegment *levelSegments;
00067 
00069         DLevelSegment *currentSegment;
00070 
00072         DSystem *system;
00073 
00075         DVaporTrailPtr *vaporTrails;
00076 
00077 public:
00078 
00080         DLevel(DSystem *system);
00082         ~DLevel(void);
00084         void Init(void);
00086         void MoveFighter(void);
00087         // Computes the current level-segment
00088         DLevelSegment *NewLevelSegment(DLevelSegment *currentSegment, float x, float y, float z);
00090         bool LoadLevel(char *levelName);
00092         void GameLoop(void);
00094         void Draw(void);
00096         void DrawBackground(void);
00098         void DrawTransparentObjects(void);
00100         void DrawLevelOver(void);
00102         void DrawWireFrame(void);
00104         void DrawBackgroundWireFrame(void);
00106         void DrawLevelOverWireFrame(void);
00108         void DrawWrongCourse(void);
00110         void DrawGameOver(void);
00112         void CollisionDetection(void);
00113 };

Generated on Thu Jun 19 21:55:39 2003 for Debris by doxygen 1.3.2