src/engine/eDisplay.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 *************************************************************************
00004 
00005 ArmageTron -- Just another Tron Lightcycle Game in 3D.
00006 Copyright (C) 2000  Manuel Moos (manuel@moosnet.de)
00007 
00008 **************************************************************************
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00023  
00024 ***************************************************************************
00025 
00026 */
00027 
00028 //void se_FetchAndStoreSDLInput();
00029 
00030 #include "rSDL.h"
00031 
00032 #include "tConfiguration.h"
00033 
00034 // floor mirror
00035 #ifndef DEDICATED
00036 static REAL sr_floorMirror_strength=.1;
00037 static tSettingItem<REAL> f_m("FLOOR_MIRROR_INT",sr_floorMirror_strength);
00038 
00039 #include "tEventQueue.h"
00040 #include "uInputQueue.h"
00041 #include "eTess2.h"
00042 #include "rTexture.h"
00043 #include "eGameObject.h"
00044 #include "rFont.h"
00045 #include "eTimer.h"
00046 #include "eCamera.h"
00047 #include "rScreen.h"
00048 #include "rRender.h"
00049 #include "eWall.h"
00050 #include "eAdvWall.h"
00051 #include "eFloor.h"
00052 #include "ePath.h"
00053 #include "eGrid.h"
00054 #include "eDebugLine.h"
00055 #include "tDirectories.h"
00056 #include "eRectangle.h"
00057 
00058 #define eWall_h 4
00059 #define view_h 2.7
00060 
00061 #ifdef DEBUG
00062 bool debug_grid=0;
00063 #endif
00064 
00065 REAL upper_height=100;
00066 REAL lower_height=50;
00067 
00068 
00069 #ifndef DEDICATED
00070 
00071 static rFileTexture sky(rTextureGroups::TEX_FLOOR,"textures/sky.png",1,1,true);
00072 static rFileTexture sky_moviepack(rTextureGroups::TEX_FLOOR,"moviepack/sky.png",1,1,true);
00073 
00074 extern bool sg_MoviePack();
00075 
00076 static void sky_select(){
00077     if (sg_MoviePack()){
00078         // Since old movie packs usually don't include sky.png we need to
00079         // be nice and fall back to the default sky tecture. -k
00080         tString s = tDirectories::Data().GetReadPath( "moviepack/sky.png" );
00081         if(strlen(s) > 0)
00082             sky_moviepack.Select();
00083         else
00084             sky.Select();
00085     }
00086     else {
00087         sky.Select();
00088     }
00089 }
00090 
00091 // if the rip bug is activated, don't use the rim to draw the floor
00092 extern short se_bugRip;
00093 
00094 // passes a vertex with z-projected texture coordinates to OpenGL
00095 static inline void TexVertex( REAL x, REAL y, REAL h)
00096 {
00097     glTexCoord2f(x, y);
00098     glVertex3f  (x, y, h);
00099 }
00100 
00101 // renders a finite rectangle
00102 static void finite_xy_plane( const eCoord &pos,const eCoord &dir,REAL h, eRectangle rect )
00103 {
00104     // expand plane to camera position to avoid embarrasing reflection bug
00105     if ( sr_floorMirror )
00106         rect.Include( pos );
00107 
00108     // fetch rectangle coordinates
00109     REAL lx = rect.GetLow().x;
00110     REAL ly = rect.GetLow().y;
00111     REAL hx = rect.GetHigh().x;
00112     REAL hy = rect.GetHigh().y;
00113 
00114     // draw rectangle as triangle fan (good for avoiding artefacts near pos)
00115     BeginTriangleFan();
00116     TexVertex( pos.x-dir.x, pos.y-dir.y, h );
00117     TexVertex(lx, ly, h);
00118     TexVertex(lx, hy, h);
00119     TexVertex(hx, hy, h);
00120     TexVertex(hx, ly, h);
00121     TexVertex(lx, ly, h);
00122     RenderEnd();
00123 }
00124 
00125 static void infinity_xy_plane(eCoord const & pos, const eCoord &dir,REAL h=0){
00126     bool use_rim=false;
00127     REAL zero=0;
00128 
00129     if (sr_highRim)
00130         use_rim=true;
00131 
00132     if ( se_bugRip )
00133         use_rim=false;
00134 
00135     // always use the rim if infinity rendering is turned off
00136     use_rim |= !sr_infinityPlane;
00137 
00138     if (use_rim){
00139         /*
00140           // the rim wall based rendering does not work properly for shaped arenas, so
00141           // it's been replaced.
00142 
00143                 BeginTriangles();
00144                 for(int i=se_rimWalls.Len()-1;i>=0;i--){
00145                     eCoord p1=se_rimWalls(i)->EndPoint(0);
00146                     eCoord p2=se_rimWalls(i)->EndPoint(1);
00147 
00148                     glTexCoord2f(pos.x, pos.y);
00149                     glVertex3f  (pos.x, pos.y, h);
00150 
00151                     glTexCoord2f(p1.x, p1.y);
00152                     glVertex3f  (p1.x, p1.y, h);
00153 
00154                     glTexCoord2f(p2.x, p2.y);
00155                     glVertex3f  (p2.x, p2.y, h);
00156                 }
00157                 RenderEnd();
00158         */
00159         finite_xy_plane( pos, dir, h, eWallRim::GetBounds() );
00160     }
00161     else
00162     {
00163         if (!sr_infinityPlane)
00164             zero=.001;
00165 
00166         BeginTriangleFan();
00167 
00168         glTexCoord4f(pos.x-dir.x, pos.y-dir.y, h, 1);
00169         glVertex4f  (pos.x-dir.x, pos.y-dir.y, h, 1);
00170 
00171         glTexCoord4f(1,0.1,zero*h,zero);
00172         glVertex4f  (1,0.1,zero*h,zero);
00173 
00174         glTexCoord4f(0.1,1.1,zero*h,zero);
00175         glVertex4f  (0.1,1.1,zero*h,zero);
00176 
00177         glTexCoord4f(-1,0.1,zero*h,zero);
00178         glVertex4f  (-1,0.1,zero*h,zero);
00179 
00180         glTexCoord4f(0.1,-1.1,zero*h,zero);
00181         glVertex4f  (0.1,-1.1,zero*h,zero);
00182 
00183         glTexCoord4f(1,0.1,zero*h,zero);
00184         glVertex4f  (1,0.1,zero*h,zero);
00185 
00186         RenderEnd();
00187     }
00188 }
00189 
00190 static REAL z=0;
00191 
00192 
00193 int           eGrid::NumberOfCameras(){return cameras.Len();}
00194 const eCoord& eGrid::CameraPos(int i){return cameras(i)->CameraPos();}
00195 eCoord eGrid::CameraGlancePos(int i){return cameras(i)->CameraGlancePos();}
00196 const eCoord& eGrid::CameraDir(int i){return cameras(i)->CameraDir();}
00197 REAL          eGrid::CameraHeight(int i){return cameras(i)->CameraZ();}
00198 
00199 
00200 
00201 
00202 eWall *displayed_eWall=0;
00203 
00204 void draw_eWall(eGrid* grid, int v,int i, REAL& zNear, eCamera const * cam)
00205 {
00206     if (i<se_wallsVisible[v].Len())
00207     {
00208         eWallView *view=se_wallsVisible[v](i);
00209 #ifdef DEBUG
00210         if (view->Value()<=z)
00211         {
00212 #endif
00213             displayed_eWall = view->Belongs();
00214             REAL len = displayed_eWall->Len();
00215             if ( len > .01)
00216             {
00217                 REAL zDist = z - displayed_eWall->Height();
00218                 if ( zDist < zNear )
00219                 {
00220                     const eCoord& camPos = grid->CameraPos( v );
00221                     const eCoord& camDir = grid->CameraDir( v );
00222                     eCoord base = displayed_eWall->EndPoint(0);
00223                     eCoord end = displayed_eWall->EndPoint(1);
00224 
00225                     if ( eCoord::F( base-camPos, camDir ) > 0.01f || eCoord::F( end-camPos, camDir ) > 0.01f )
00226                     {
00227                         eCoord dirNorm = end - base;
00228                         dirNorm.Normalize();
00229                         eCoord camRelative = ( camPos - base ).Turn( dirNorm.Conj() );
00230                         REAL dist = fabs( camRelative.y );
00231                         if ( camRelative.x < 0 )
00232                         {
00233                             dist -= camRelative.x;
00234                         }
00235                         if ( camRelative.x > len )
00236                         {
00237                             dist += camRelative.x - len;
00238                         }
00239                         if ( dist < zDist )
00240                         {
00241                             dist = zDist;
00242                         }
00243                         // TODO: better criterion for ingoring of walls
00244                         if ( dist < zNear && dist > 0.001f )
00245                         {
00246                             zNear = dist;
00247                         }
00248                     }
00249                 }
00250 
00251                 displayed_eWall->Render(cam);
00252             }
00253             displayed_eWall=0;
00254 
00255             draw_eWall(grid,v,tHeapBase::UpperL(i),zNear,cam);
00256             draw_eWall(grid,v,tHeapBase::UpperR(i),zNear,cam);
00257 
00258 #ifdef DEBUG
00259         }
00260 #endif 
00261     }
00262 }
00263 
00264 
00265 void paint_sr_lowerSky(eGrid *grid, int viewer,bool sr_upperSky, eCoord const & camPos){
00266     TexMatrix();
00267     glLoadIdentity();
00268     glScalef(.005,.005,.005);
00269     glEnable(GL_TEXTURE_2D);
00270     glDisable(GL_CULL_FACE);
00271 
00272     if (sr_skyWobble){
00273         glTranslatef(se_GameTime()*.1,se_GameTime()*.07145,0);
00274         glScalef(1+.2*sin(se_GameTime()),1+.1*cos(se_GameTime()),1);
00275         glTranslatef(-300,-200,0);
00276     }
00277 
00278     sky_select();
00279 
00280     REAL sa=(lower_height-z)*.1;
00281     if (sa>1) sa=1;
00282     if (!sr_upperSky){
00283         sa=1;
00284         glBlendFunc(GL_SRC_ALPHA,GL_ZERO);
00285     }
00286     if (sa>0){
00287         glColor4f(1,1,1,sa);
00288         infinity_xy_plane(camPos,grid->CameraDir(viewer),lower_height);
00289     }
00290     if (!sr_upperSky && sr_alphaBlend)
00291         glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00292 }
00293 
00294 void eGrid::display_simple( int viewer,bool floor,
00295                             bool sr_upperSky,bool sr_lowerSky,
00296                             REAL flooralpha,
00297                             bool eWalls,bool gameObjects,
00298                             REAL& zNear){
00299     sr_CheckGLError();
00300 
00301     /*
00302     static GLfloat S[]={1,0,0,0};
00303     static GLfloat T[]={0,1,0,0};
00304     static GLfloat R[]={0,0,1,0};
00305     static GLfloat Q[]={0,0,0,1};
00306 
00307     glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR);
00308     glTexGenfv(GL_S,GL_OBJECT_PLANE,S);
00309 
00310     glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR);
00311     glTexGenfv(GL_T,GL_OBJECT_PLANE,T);
00312 
00313     glTexGeni(GL_R,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR);
00314     glTexGenfv(GL_R,GL_OBJECT_PLANE,R);
00315 
00316     glTexGeni(GL_Q,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR);
00317     glTexGenfv(GL_Q,GL_OBJECT_PLANE,Q);
00318 
00319     glDisable(GL_TEXTURE_GEN_T);
00320     glDisable(GL_TEXTURE_GEN_S);
00321     glDisable(GL_TEXTURE_GEN_R);
00322     glDisable(GL_TEXTURE_GEN_Q);
00323     */
00324 
00325 
00326     glDisable(GL_DEPTH_TEST);
00327     glDepthMask(GL_FALSE);
00328 
00329     glDisable(GL_CULL_FACE);
00330 
00331     eCoord camPos = CameraGlancePos( viewer );
00332     // eWallRim::Bound( camPos, 10 );
00333 
00334     if (sr_upperSky || se_BlackSky()){
00335         if (se_BlackSky()){
00336             //glDisable(GL_TEXTURE);
00337             glDisable(GL_TEXTURE_2D);
00338 
00339             glColor3f(0,0,0);
00340 
00341             if ( z < lower_height )
00342                 infinity_xy_plane(camPos, this->CameraDir(viewer),lower_height);
00343 
00344             glEnable(GL_TEXTURE_2D);
00345         }
00346         else {
00347             TexMatrix();
00348             glLoadIdentity();
00349             //      glScalef(.25,.25,.25);
00350 
00351             se_glFloorTexture();
00352 
00353             glColor3f(.5,.5,1);
00354 
00355             if ( z < upper_height )
00356                 infinity_xy_plane(camPos, this->CameraDir(viewer),upper_height);
00357         }
00358     }
00359 
00360     if (sr_lowerSky && !sr_highRim){
00361         paint_sr_lowerSky(this, viewer,sr_upperSky, camPos);
00362     }
00363 
00364     if (floor){
00365         sr_DepthOffset(false);
00366 
00367         su_FetchAndStoreSDLInput();
00368         int floorDetail = sr_floorDetail;
00369 
00370         // no multitexturing without alpha blending
00371         if ( !sr_alphaBlend && floorDetail > rFLOOR_TEXTURE )
00372             floorDetail = rFLOOR_TEXTURE;
00373 
00374         switch(floorDetail){
00375         case rFLOOR_OFF:
00376             break;
00377         case rFLOOR_GRID:
00378             {
00379         #define SIDELEN   (se_GridSize())
00380         #define EXTENSION 10
00381 
00382                 eCoord center = CameraPos(viewer) + CameraDir(viewer) * (SIDELEN * EXTENSION * .8);
00383 
00384                 REAL x=center.x;
00385                 REAL y=center.y;
00386                 int xn=static_cast<int>(x/SIDELEN);
00387                 int yn=static_cast<int>(y/SIDELEN);
00388 
00389 
00390                 //glDisable(GL_TEXTURE);
00391                 glDisable(GL_TEXTURE_2D);
00392 
00393         #define INTENSITY(x,xx) (1-(((x)-(xx))*((x)-(xx))/(EXTENSION*SIDELEN*EXTENSION*SIDELEN)))
00394 
00395 
00396                 BeginLines();
00397                 for(int i=xn-EXTENSION;i<=xn+EXTENSION;i++){
00398                     REAL intens=INTENSITY(i*SIDELEN,x);
00399                     if (intens<0) intens=0;
00400                     se_glFloorColor(intens,intens);
00401                     glVertex2f(i*SIDELEN,y-SIDELEN*(EXTENSION+1));
00402                     glVertex2f(i*SIDELEN,y+SIDELEN*(EXTENSION+1));
00403                 }
00404                 for(int j=yn-EXTENSION;j<=yn+EXTENSION;j++){
00405                     REAL intens=INTENSITY(j*SIDELEN,y);
00406                     if (intens<0) intens=0;
00407                     se_glFloorColor(intens,intens);
00408                     glVertex2f(x-(EXTENSION+1)*SIDELEN,j*SIDELEN);
00409                     glVertex2f(x+(EXTENSION+1)*SIDELEN,j*SIDELEN);
00410                 }
00411                 RenderEnd();
00412             }
00413             break;
00414 
00415         case rFLOOR_TEXTURE:
00416             TexMatrix();
00417             glLoadIdentity();
00418             glScalef(1/se_GridSize(),1/se_GridSize(),1.);
00419 
00420             se_glFloorTexture();
00421             se_glFloorColor(flooralpha);
00422 
00423             infinity_xy_plane( camPos, CameraDir(viewer) );
00424 
00425             /* old way: draw every triangle
00426             for(int i=eFace::faces.Len()-1;i>=0;i--){
00427             eFace *f=eFace::faces(i);
00428 
00429             if (f->visHeight[viewer]<z){
00430             glBegin(GL_TRIANGLES);
00431             for(int j=0;j<=2;j++){
00432             glVertex3f(f->p[j]->x,f->p[j]->y,0);
00433             }
00434             glEnd();
00435             }
00436             }
00437             */
00438 
00439             break;
00440 
00441         case rFLOOR_TWOTEXTURE:
00442             se_glFloorColor(flooralpha);
00443 
00444             TexMatrix();
00445             glLoadIdentity();
00446             REAL gs = 1/se_GridSize();
00447             glScalef(0.01*gs,gs,1.);
00448 
00449             se_glFloorTexture_a();
00450             infinity_xy_plane( camPos, CameraDir(viewer) );
00451 
00452             se_glFloorColor(flooralpha);
00453 
00454             TexMatrix();
00455             glLoadIdentity();
00456             glScalef(gs,.01*gs,1.);
00457 
00458             se_glFloorTexture_b();
00459 
00460             glDepthFunc(GL_LEQUAL);
00461             glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00462             infinity_xy_plane( camPos, CameraDir(viewer) );
00463             glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00464 
00465             break;
00466         }
00467     }
00468 
00469     glEnable(GL_DEPTH_TEST);
00470     glDepthMask(GL_TRUE);
00471 
00472     TexMatrix();
00473     glLoadIdentity();
00474     ModelMatrix();
00475 
00476     //  glDisable(GL_TEXTURE_GEN_S);
00477     //  glDisable(GL_TEXTURE_GEN_T);
00478     //  glDisable(GL_TEXTURE_GEN_Q);
00479     //  glDisable(GL_TEXTURE_GEN_R);
00480 
00481     if(eWalls){
00482         {
00483             su_FetchAndStoreSDLInput();
00484     
00485             eWallRim::RenderAll( cameras(viewer) );
00486         }
00487 
00488         if (sr_lowerSky && sr_highRim){
00489             //      glEnable(GL_TEXTURE_GEN_S);
00490             //      glEnable(GL_TEXTURE_GEN_T);
00491             //      glEnable(GL_TEXTURE_GEN_Q);
00492             //      glEnable(GL_TEXTURE_GEN_R);
00493 
00494             paint_sr_lowerSky(this, viewer,sr_upperSky, camPos);
00495 
00496             //      glDisable(GL_TEXTURE_GEN_S);
00497             //      glDisable(GL_TEXTURE_GEN_T);
00498             //      glDisable(GL_TEXTURE_GEN_Q);
00499             //      glDisable(GL_TEXTURE_GEN_R);
00500 
00501             TexMatrix();
00502             glLoadIdentity();
00503             ModelMatrix();
00504         }
00505     }
00506 
00507     sr_CheckGLError();
00508 
00509     if (eWalls){
00510         // glDisable(GL_CULL_FACE);
00511         // draw_eWall(this,viewer,0,zNear,cameras(viewer));
00512 
00513         /*
00514         #ifdef DEBUG
00515         for(int i=sg_netPlayerWalls.Len()-1;i>=0;i--){
00516           glMatrixMode(GL_MODELVIEW);
00517           glPushMatrix();
00518           if (sg_netPlayerWalls(i)->Preliminary())
00519         glTranslatef(0,0,4);
00520           else
00521         glTranslatef(0,0,8);
00522           if (sg_netPlayerWalls(i)->Wall())
00523         sg_netPlayerWalls(i)->Wall()->RenderList(false);
00524           glPopMatrix();
00525           }
00526         #endif
00527         */
00528 
00529         /*
00530         static int oldlen=0;
00531         int newlen=sg_netPlayerWalls.Len();
00532         if (newlen!=oldlen){
00533           con << "Number of player eWalls now " << newlen << '\n';
00534           oldlen=newlen;
00535         }
00536         */
00537 
00538     }
00539 
00540     sr_CheckGLError();
00541 
00542     if (gameObjects)
00543         eGameObject::RenderAll(this, cameras(viewer));
00544 
00545     eDebugLine::Render();
00546 #ifdef DEBUG
00547 
00548     ePath::RenderLast();
00549 
00550     if (debug_grid){
00551         //glDisable(GL_TEXTURE);
00552         glDisable(GL_TEXTURE_2D);
00553         glDisable(GL_LIGHTING);
00554         BeginLines();
00555 
00556         int i;
00557         for(i=edges.Len()-1;i>=0;i--){
00558             eHalfEdge *e=edges[i];
00559             if (e->Face())
00560                 glColor4f(1,1,1,1);
00561             else
00562                 glColor4f(0,0,1,1);
00563 
00564             glVertex3f(e->Point()->x,e->Point()->y,10);
00565             glVertex3f(e->Point()->x,e->Point()->y,15);
00566             glVertex3f(e->Point()->x,e->Point()->y,.1);
00567             glVertex3f(e->other->Point()->x,e->other->Point()->y,.1);
00568             glVertex3f(e->other->Point()->x,e->other->Point()->y,10);
00569             glVertex3f(e->other->Point()->x,e->other->Point()->y,15);
00570 
00571         }
00572 
00573         for(i=points.Len()-1;i>=0;i--){
00574             ePoint *p=points[i];
00575             glColor4f(1,0,0,1);
00576             glVertex3f(p->x,p->y,0);
00577             glVertex3f(p->x,p->y,(p->GetRefcount()+1)*5);
00578         }
00579         /*
00580         for(int i=sg_netPlayerWalls.Len()-1;i>=0;i--){
00581           eEdge *e=sg_netPlayerWalls[i]->Edge();
00582         glColor4f(0,1,0,1);
00583 
00584           glVertex3f(e->Point()->x,e->Point()->y,5);
00585           glVertex3f(e->Point()->x,e->Point()->y,10);
00586           glVertex3f(e->Point()->x,e->Point()->y,10);
00587           glVertex3f(e->other->Point()->x,e->other->Point()->y,10);
00588           glVertex3f(e->other->Point()->x,e->other->Point()->y,10);
00589           glVertex3f(e->other->Point()->x,e->other->Point()->y,5);
00590         }
00591         */
00592         RenderEnd();
00593     }
00594 #endif
00595 
00596 }
00597 #endif
00598 
00599 void eGrid::Render( eCamera* cam, int viewer, REAL& zNear ){
00600     if (!sr_glOut)
00601         return;
00602 #ifndef DEDICATED
00603     ProjMatrix();
00604 
00605     z=CameraHeight(viewer);
00606     if ( zNear > z )
00607     {
00608         zNear = z;
00609     }
00610 
00611     if (sr_floorMirror){
00612         ModelMatrix();
00613         glScalef(1,1,-1);
00614 
00615         if (z>10) z=10;
00616         glFrontFace(GL_CW);
00617 
00618         bool us=false;
00619         bool ls=false;
00620 
00621         if (sr_floorMirror>=rMIRROR_ALL){
00622             us=sr_upperSky;
00623             ls=sr_lowerSky;
00624         }
00625         else if (sr_floorMirror>=rMIRROR_WALLS){
00626             if (sr_lowerSky)
00627                 ls=true;
00628             else if (sr_upperSky)
00629                 us=true;
00630         }
00631 
00632         cam->SetRenderingMain(false);
00633         display_simple(viewer,false,
00634                        us,ls,
00635                        0,
00636                        sr_floorMirror>=rMIRROR_WALLS,
00637                        sr_floorMirror>=rMIRROR_OBJECTS,
00638                        zNear);
00639         z=CameraHeight(viewer);
00640         glFrontFace(GL_CCW);
00641         ModelMatrix();
00642         glScalef(1,1,-1);
00643 
00644 
00645         cam->SetRenderingMain(true);
00646         display_simple(viewer,true,
00647                        sr_upperSky,sr_lowerSky,
00648                        1-sr_floorMirror_strength,
00649                        true,true,zNear);
00650 
00651     }
00652     else
00653     {
00654         cam->SetRenderingMain(true);
00655         display_simple(viewer,true,
00656                        sr_upperSky,sr_lowerSky,
00657                        1,
00658                        true,true,zNear);
00659     }
00660 
00661 
00662 #ifdef EVENT_DEB
00663     //  for(int i=eEdge_crossing.Len()-1;i>=0;i--){
00664     //    eEdge_crossing(i)->Render();
00665     //  }
00666 #endif
00667 #endif
00668 }
00669 
00670 
00671 //void eEdgeViewer::Render(){}
00672 
00673 /*
00674 void eViewerCrossesEdge::Render(){
00675 #ifndef DEDICATED
00676   ePoint *p1=e->Point();
00677   ePoint *p2=e->other->Point();
00678 
00679   REAL timeLeft=value-se_GameTime();
00680 
00681   REAL h;
00682 
00683   if (viewer==1){
00684     if (timeLeft>0){
00685       h=timeLeft+4;
00686       glColor4f(0,0,1,.5);
00687     }
00688     else{
00689       h=-timeLeft+4;
00690       glColor4f(1,0,0,.5);
00691     }
00692 
00693     //  else
00694     //glColor4f(1,0,0,.5);
00695 
00696     static rTexture ArmageTron_invis_eWall(rTEX_WALL,"textures/eWall2.png",1,0);
00697     
00698     ArmageTron_invis_eWall.Select();
00699     
00700     eWall::Render_helper(e,(p1->x+p1->y)/4,(p2->x+p2->y)/4,h,1,4);
00701   }
00702 #endif
00703 }
00704 */
00705 
00706 #endif
00707 
00708 

Generated on Sat Mar 15 22:55:44 2008 for Armagetron Advanced by  doxygen 1.5.4