#include "defs.h"
Go to the source code of this file.
Classes | |
class | eFloor |
Functions | |
void | se_glFloorColor (REAL alpha=1, REAL intens=1) |
void | se_glFloorTexture () |
void | se_glFloorTexture_a () |
void | se_glFloorTexture_b () |
REAL | se_GridSize () |
bool | se_BlackSky () |
void | se_FloorColor (REAL &r, REAL &g, REAL &b) |
void | se_MakeColorValid (REAL &r, REAL &g, REAL &b, REAL f) |
bool se_BlackSky | ( | ) |
Definition at line 67 of file eFloor.cpp.
References eFloor::BlackSky(), and eFloor::Floor.
Referenced by eGrid::display_simple().
00068 { 00069 if (eFloor::Floor) 00070 return eFloor::Floor->BlackSky(); 00071 else 00072 return false; 00073 }
Definition at line 75 of file eFloor.cpp.
References eFloor::Floor, eFloor::FloorColor(), and sr_floorDetail.
Referenced by gAIPlayer::gAIPlayer(), and se_MakeColorValid().
00076 { 00077 if (eFloor::Floor && sr_floorDetail > 1) 00078 eFloor::Floor->FloorColor(r,g,b); 00079 else 00080 { 00081 r = g = b = 0; 00082 } 00083 }
Definition at line 47 of file eFloor.cpp.
References eFloor::Floor, and eFloor::glFloorColor().
Referenced by eGrid::display_simple(), and MenuBackground().
00047 { 00048 if (eFloor::Floor) 00049 eFloor::Floor->glFloorColor(alpha, intens); 00050 }
void se_glFloorTexture | ( | ) |
Definition at line 52 of file eFloor.cpp.
References eFloor::Floor, and eFloor::glFloorTexture().
Referenced by eGrid::display_simple(), and MenuBackground().
00052 { 00053 if (eFloor::Floor) 00054 eFloor::Floor->glFloorTexture(); 00055 }
void se_glFloorTexture_a | ( | ) |
Definition at line 57 of file eFloor.cpp.
References eFloor::Floor, and eFloor::glFloorTexture_a().
Referenced by eGrid::display_simple().
00057 { 00058 if (eFloor::Floor) 00059 eFloor::Floor->glFloorTexture_a(); 00060 }
void se_glFloorTexture_b | ( | ) |
Definition at line 62 of file eFloor.cpp.
References eFloor::Floor, and eFloor::glFloorTexture_b().
Referenced by eGrid::display_simple().
00062 { 00063 if (eFloor::Floor) 00064 eFloor::Floor->glFloorTexture_b(); 00065 }
REAL se_GridSize | ( | ) |
Definition at line 40 of file eFloor.cpp.
References eFloor::Floor, and eFloor::GridSize().
Referenced by eGrid::display_simple().
00040 { 00041 if (eFloor::Floor) 00042 return eFloor::Floor->GridSize(); 00043 else 00044 return 4; 00045 }
Definition at line 85 of file eFloor.cpp.
References G, REAL, and se_FloorColor().
Referenced by gCycle::gCycle(), gCycle::MyInitAfterCreation(), zZone::ReadSync(), gZone::ReadSync(), and ArmageTron_color_menuitem::RenderBackground().
00086 { 00087 REAL R, G, B; // the floor color 00088 se_FloorColor(R, G, B); 00089 00090 /* 00091 REAL wallInt = 2.0f; 00092 if ( TextureMode[rTEX_WALL] <= 0 ) 00093 { 00094 wallInt = 1.0f; 00095 } 00096 00097 R *= wallInt; 00098 G *= wallInt; 00099 B *= wallInt; 00100 */ 00101 00102 // if we are too close to the floor color, just change to white. 00103 while ((r < .95 && g < .95 && b < .95) && 00104 ( 00105 (fabs(R - r*f) + fabs(G - g*f) + fabs(B - b*f) < .5 ) || 00106 // (fabs(R*.5 - r*f) + fabs(G*.5 - g*f) + fabs(B*.5 - b*f) < .5) || 00107 (fabs(r*f) + fabs(g*f) + fabs(b*f) < .5 ) 00108 ) 00109 ) 00110 00111 { 00112 REAL step = 1/(15.0 * 3); 00113 REAL step_r, step_g, step_b; 00114 REAL rgb_sum = 0; 00115 if ( r < .99 ) 00116 rgb_sum += r; 00117 if ( g < .99 ) 00118 rgb_sum += g; 00119 if ( b < .99 ) 00120 rgb_sum += b; 00121 00122 if ( rgb_sum < .02 ) 00123 { 00124 step_r = step; 00125 step_g = step; 00126 step_b = step; 00127 } 00128 else 00129 { 00130 step_r = step * r / rgb_sum; 00131 step_g = step * g / rgb_sum; 00132 step_b = step * b / rgb_sum; 00133 } 00134 00135 r += step_r; 00136 g += step_g; 00137 b += step_b; 00138 if (r > 1) 00139 r = 1; 00140 if (g > 1) 00141 g = 1; 00142 if (b > 1) 00143 b = 1; 00144 } 00145 }