00001 /* 00002 00003 ************************************************************************* 00004 00005 ArmageTron -- Just another Tron Lightcycle Game in 3D. 00006 Copyright (C) 2000 Manuel Moos (manuel@moosnet.de) 00007 #include <stdio> 00008 #include <stdlib.h> 00009 ************************************************************************** 00010 00011 This program is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License 00013 as published by the Free Software Foundation; either version 2 00014 of the License, or (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00024 00025 *************************************************************************** 00026 00027 */ 00028 00029 #ifndef ArmageTron_ADV_WALL_H 00030 #define ArmageTron_ADV_WALL_H 00031 00032 #include "eWall.h" 00033 #include "nNetObject.h" 00034 00035 class eRectangle; 00036 00037 class eWallRim:public eWall{ 00038 protected: 00039 int rim_id; 00040 bool bf_cull; 00041 REAL height; 00042 public: 00043 eWallRim(eGrid *grid, bool backface_cull=true,REAL h=10000000); 00044 virtual ~eWallRim(); 00045 00046 virtual bool Splittable() const; 00047 00048 // virtual void Split(eWall *& w1,eWall *& w2,REAL a); 00049 00050 #ifndef DEDICATED 00051 virtual void RenderReal(const eCamera *cam)=0; 00052 00053 virtual void Render(const eCamera *cam){ 00054 if (rim_id<0 && Edge() ) 00055 RenderReal(cam); 00056 } 00057 #endif 00058 00059 virtual REAL Height() const{return height;} 00060 00061 virtual REAL SeeHeight() const{return height*40;} 00062 00063 virtual REAL BlockHeight() const{ 00064 if (bf_cull) 00065 return 0; 00066 else 00067 return SeeHeight(); 00068 } 00069 00071 static bool IsBound(const eCoord &x,REAL offset=0); 00072 00074 static void RenderAll( eCamera * camera ); 00076 static void DestroyDisplayList(); 00078 static REAL Bound(eCoord &x,REAL offset=0); 00080 static REAL Clip(const eCoord& in, eCoord &out,REAL offset=0); 00081 00083 static eRectangle const & GetBounds(); 00085 static void UpdateBounds(); 00086 }; 00087 00088 extern tList<eWallRim> se_rimWalls; 00089 00090 00091 00092 00093 #endif