[Orxonox-commit 2109] r6825 - code/branches/fps/src/libraries/tools/bsp
landauf at orxonox.net
landauf at orxonox.net
Mon May 3 00:27:45 CEST 2010
Author: landauf
Date: 2010-05-03 00:27:45 +0200 (Mon, 03 May 2010)
New Revision: 6825
Modified:
code/branches/fps/src/libraries/tools/bsp/DemoApp.cpp
code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h
code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp
code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp
Log:
fixed warnings in BZN bsp renderer
Modified: code/branches/fps/src/libraries/tools/bsp/DemoApp.cpp
===================================================================
--- code/branches/fps/src/libraries/tools/bsp/DemoApp.cpp 2010-05-02 21:51:49 UTC (rev 6824)
+++ code/branches/fps/src/libraries/tools/bsp/DemoApp.cpp 2010-05-02 22:27:45 UTC (rev 6825)
@@ -80,7 +80,7 @@
OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (Default)...");
- char chMessage[1024] ;
+// char chMessage[1024] ;
UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
UINT uFrameTotalTime=0 ;
@@ -152,7 +152,7 @@
OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodA)...");
- char chMessage[1024] ;
+// char chMessage[1024] ;
UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
UINT uFrameTotalTime=0 ;
@@ -314,7 +314,7 @@
OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodB)...");
- char chMessage[1024] ;
+// char chMessage[1024] ;
UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
UINT uFrameTotalTime=0 ;
@@ -454,7 +454,7 @@
- uSleepTime=(uFrameTargetTime-uFrameRenderTime)/1000.0f ;
+ uSleepTime=(int)((uFrameTargetTime-uFrameRenderTime)/1000.0f) ;
if(uSleepTime>0) Sleep(uSleepTime) ;
sprintf(chMessage, "render %i, target %i, sleep %i", uFrameRenderTime, uFrameTargetTime, uSleepTime) ;
Modified: code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h
===================================================================
--- code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h 2010-05-02 21:51:49 UTC (rev 6824)
+++ code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h 2010-05-02 22:27:45 UTC (rev 6825)
@@ -41,7 +41,9 @@
//Use this define to signify OIS will be used as a DLL
//(so that dll import/export macros are in effect)
-#define OIS_DYNAMIC_LIB
+#ifndef OIS_DYNAMIC_LIB
+# define OIS_DYNAMIC_LIB
+#endif
#include <OIS/OIS.h>
using namespace Ogre;
Modified: code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp
===================================================================
--- code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp 2010-05-02 21:51:49 UTC (rev 6824)
+++ code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp 2010-05-02 22:27:45 UTC (rev 6825)
@@ -107,9 +107,9 @@
m_nMaxEntity=0 ;
m_pEntityInfo=NULL ;
- m_nMaxVisibleEntity=NULL ;
+ m_nMaxVisibleEntity=0 ;
m_pVisibleEntity=NULL ;
- m_nMaxFrustumEntity=NULL ;
+ m_nMaxFrustumEntity=0 ;
m_pFrustumEntity=NULL ;
@@ -240,7 +240,7 @@
void OgreFramework::initOgre(Ogre::String wndTitle, OIS::KeyListener *pKeyListener, OIS::MouseListener *pMouseListener)
{
- Ogre::LogManager* logMgr = new Ogre::LogManager();
+// Ogre::LogManager* logMgr = new Ogre::LogManager();
m_pLog = Ogre::LogManager::getSingleton().createLog("OgreLogfile.log", true, true, false);
m_pLog->setDebugOutputEnabled(true);
@@ -970,7 +970,7 @@
int nVisEnt=0 ;
int nEntity=0 ;
- int nMaxEntity=0 ;
+// int nMaxEntity=0 ;
int nSubMesh=0 ;
int nMaxSubMesh=0 ;
@@ -1797,7 +1797,7 @@
//////////////////////////////////////////////////////////////
// now we do a few rounds of ping-pong bluring of A to B, B to A.
int nMaxBlur=4 ;
- int nLastBlur=nMaxBlur-1 ;
+// int nLastBlur=nMaxBlur-1 ;
int nBlurLoop=0 ;
@@ -2281,7 +2281,7 @@
m_TranslateVector = Vector3::ZERO;
- char chMessage[1024] ;
+// char chMessage[1024] ;
//sprintf(chMessage, "winmessage %u, %u, %u", m_pRenderWnd->m_Test_uMsg, (UINT)m_pRenderWnd->m_Test_wParam, (UINT)m_pRenderWnd->m_Test_lParam) ;
//m_pLog->logMessage(chMessage) ;
@@ -2416,9 +2416,9 @@
Ogre::Vector3 Pos ;
Pos=m_pCamera->getPosition() ;
- int nCamX=Pos.x ;
- int nCamY=Pos.y ;
- int nCamZ=Pos.z ;
+ Ogre::Real nCamX=Pos.x ;
+ Ogre::Real nCamY=Pos.y ;
+ Ogre::Real nCamZ=Pos.z ;
static String currFps = "FPS: ";
@@ -2998,8 +2998,8 @@
// reattach all entity scenenodes.
int nLoop=0 ;
- int nSubMesh=0 ;
- int nMaxSubMesh=0 ;
+// int nSubMesh=0 ;
+// int nMaxSubMesh=0 ;
for(nLoop=0 ; nLoop<m_nMaxEntity ; nLoop++)
m_pSceneMgr->getRootSceneNode()->addChild(m_pEntityInfo[nLoop].pMasterNode) ;
@@ -3485,7 +3485,7 @@
char chMeshName[1024] ;
int nTriangle=0 ;
- int nStart=0 ;
+// int nStart=0 ;
int nEnd=0 ;
int nMaterial=0 ;
int nGroup=0 ;
@@ -3552,9 +3552,9 @@
float flMaxX=0.0f ;
float flMaxY=0.0f ;
float flMaxZ=0.0f ;
- float flMidX=0.0f ;
- float flMidY=0.0f ;
- float flMidZ=0.0f ;
+// float flMidX=0.0f ;
+// float flMidY=0.0f ;
+// float flMidZ=0.0f ;
float flDisX=0.0f ;
float flDisY=0.0f ;
float flDisZ=0.0f ;
@@ -5628,23 +5628,23 @@
int nZone=0 ;
- int nZoneIndex=0 ;
+// int nZoneIndex=0 ;
int nSubZone=0 ;
- int nSubZoneIndex=0 ;
+// int nSubZoneIndex=0 ;
int nMaxSubZone=0 ;
int nPortal=0 ;
- int nPortalIndex=0 ;
+// int nPortalIndex=0 ;
int nMaxPortal=0 ;
- int nMaxPortalZone=0 ;
- int nPortalZone=0 ;
- int nPortalZoneIndex=0 ;
- int nMaxZone=0 ;
+// int nMaxPortalZone=0 ;
+// int nPortalZone=0 ;
+// int nPortalZoneIndex=0 ;
+// int nMaxZone=0 ;
int nMaxLight=m_Q3Map->m_nLightMax ;
int nLt=0 ;
- int nMaxSubLight=m_Q3Map->m_nSubLightMax ;
+// int nMaxSubLight=m_Q3Map->m_nSubLightMax ;
int nSubLt=0 ;
m_nMaxVisibleLight=0 ;
@@ -5890,7 +5890,7 @@
int nSubLightIndex=0 ;
int nSubLight=0 ;
- int nLight=0;
+// int nLight=0;
int nLightIndex=0 ;
@@ -6047,7 +6047,7 @@
int nMaxZone=0 ;
int nZone=0 ;
int nZoneIndex=0 ;
- int nVisible=0 ;
+// int nVisible=0 ;
Ogre::AxisAlignedBox AABB ;
@@ -6383,24 +6383,24 @@
int nLightMax=m_Q3Map->m_nMaxMultiZoneLight ;
int nLight=0 ;
int nLightIndex=0 ;
- int nLightVal=0 ;
+// int nLightVal=0 ;
int nOpenPortals=0 ;
- int nZoneHasOpenPortals=0 ;
+// int nZoneHasOpenPortals=0 ;
int nPortal=0 ;
int nPortalIndex=0 ;
int nMaxPortal=0 ;
- int nZone=0 ;
- int nMaxZone=0 ;
- int nZoneIndex=0 ;
+// int nZone=0 ;
+// int nMaxZone=0 ;
+// int nZoneIndex=0 ;
int nSubLightMax=0 ;
- int nSubLightIndex=0 ;
+// int nSubLightIndex=0 ;
int nSubLight=0 ;
int nSubLightStart=0 ;
int nPortalLightMax=0 ;
int nPortalLightIndex=0 ;
- int nPortalLight=0 ;
+// int nPortalLight=0 ;
int nCentreZone=0 ;
@@ -6494,7 +6494,7 @@
float flMaxZ=0.0f ;
int nSubLightMax=0 ;
- int nSubLightIndex=0 ;
+// int nSubLightIndex=0 ;
int nSubLight=0 ;
int nSubLightStart=0 ;
int nSubLightFirst=0 ;
@@ -6585,13 +6585,13 @@
int nLight=0;
int nLightVal=0 ;
- int nLightIndex=0 ;
- int nMaxLight=0 ;
+// int nLightIndex=0 ;
+// int nMaxLight=0 ;
int nSubLight=0 ;
int nSubLightIndex=0 ;
int nMaxSubLight=0 ;
- int nSubLightVal=0 ;
+// int nSubLightVal=0 ;
// check all lights completely contained in this zone to see if they're visible
@@ -6871,7 +6871,7 @@
void OgreFramework::initLight()
{
- char chMessage[1024] ;
+// char chMessage[1024] ;
// these lights only have placeholder settings to begin with, since they get moved around and reused thoughout the level.
@@ -6907,13 +6907,13 @@
const int KVSIZE=1024 ;
// make sure the config is a string
int nConfigPos=-1 ;
- int nPos=0 ;
+// int nPos=0 ;
int nKeyPos=0 ;
int nValuePos=0 ;
char chKey[KVSIZE] ;
char chValue[KVSIZE] ;
- float flValue=0.0f ;
+ int nValue=0 ;
@@ -6966,16 +6966,16 @@
chValue[nValuePos]='\0' ; // null terminate the value
// convert value string to a float
- flValue=atof(chValue) ;
+ nValue=atoi(chValue) ;
// assign that value
- if(strcmp("r_shadowmapsize", chKey)==0) { m_nShadowMapSize=flValue ; if(m_nShadowMapSize<2) m_nShadowMapSize=2 ; }
- if(strcmp("r_shadowrgbsize", chKey)==0) { m_nShadowRGBSize=flValue ; if(m_nShadowRGBSize<2) m_nShadowRGBSize=2 ; }
- if(strcmp("r_colouredshadow", chKey)==0) { m_nColouredShadow=flValue ; }
- if(strcmp("r_renderhdr", chKey)==0) { m_nRenderHDR=flValue ; }
- if(strcmp("r_maxgpuquery", chKey)==0) { m_nMaxGPUQuery=flValue ; if(m_nMaxGPUQuery<0) m_nMaxGPUQuery=0 ; if(m_nMaxGPUQuery>MAXGPUQUERY) m_nMaxGPUQuery=MAXGPUQUERY ; }
+ if(strcmp("r_shadowmapsize", chKey)==0) { m_nShadowMapSize=nValue ; if(m_nShadowMapSize<2) m_nShadowMapSize=2 ; }
+ if(strcmp("r_shadowrgbsize", chKey)==0) { m_nShadowRGBSize=nValue ; if(m_nShadowRGBSize<2) m_nShadowRGBSize=2 ; }
+ if(strcmp("r_colouredshadow", chKey)==0) { m_nColouredShadow=nValue ; }
+ if(strcmp("r_renderhdr", chKey)==0) { m_nRenderHDR=nValue ; }
+ if(strcmp("r_maxgpuquery", chKey)==0) { m_nMaxGPUQuery=nValue ; if(m_nMaxGPUQuery<0) m_nMaxGPUQuery=0 ; if(m_nMaxGPUQuery>MAXGPUQUERY) m_nMaxGPUQuery=MAXGPUQUERY ; }
- //sprintf(m_chBug, "Key: %s, Value: %f", chKey, flValue) ;
+ //sprintf(m_chBug, "Key: %s, Value: %i", chKey, nValue) ;
//m_pLog->logMessage(m_chBug);
}// end found end of value
Modified: code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp
===================================================================
--- code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp 2010-05-02 21:51:49 UTC (rev 6824)
+++ code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp 2010-05-02 22:27:45 UTC (rev 6825)
@@ -581,7 +581,7 @@
int Q3Map::ParseAndTriangulateMap(const char* pData, size_t Size)
{
- char chMessage[1024] ;
+// char chMessage[1024] ;
int nError=0 ;
// setup pointers to the various lumps and get their quantities
@@ -1045,8 +1045,8 @@
// extract entities from bsp entities lump
int Q3Map::ParseEntities(void)
{
- char chKey[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
- char chValue[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
+// char chKey[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
+// char chValue[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
int nPos=0 ;
int nMaxPos=m_BspHeader.Lumps[0].iLength ;
int nEntityType=0 ;
@@ -1313,7 +1313,7 @@
// the point lights ("lamps") will later be changed into map triangles.
int Q3Map::ParseAndAddLight(int* pPos, int nMaxPos)
{
- char chMessage[1024] ;
+// char chMessage[1024] ;
char chKey[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
@@ -1682,12 +1682,12 @@
int nZone=0 ;
int nPos=0 ;
- float flMinX=0.0f ;
- float flMinY=0.0f ;
- float flMinZ=0.0f ;
- float flMaxX=0.0f ;
- float flMaxY=0.0f ;
- float flMaxZ=0.0f ;
+// float flMinX=0.0f ;
+// float flMinY=0.0f ;
+// float flMinZ=0.0f ;
+// float flMaxX=0.0f ;
+// float flMaxY=0.0f ;
+// float flMaxZ=0.0f ;
m_nMaxZone=0 ;
@@ -1761,7 +1761,7 @@
int Q3Map::AssignTrianglesToZones(void)
{
int nCurrentTriangle=0 ;
- int nZone=0 ;
+// int nZone=0 ;
/*
@@ -1819,12 +1819,12 @@
int Q3Map::FindTriangleZone(int nTriangle)
{
int nZone=0 ;
- int nSubZone=0 ;
+// int nSubZone=0 ;
int nPos=0 ;
bool bVertInSubZone=false ;
int nVert=0 ;
bool bTriangleInZone=false ;
- int nMaxSubZone=m_iNumSubZones ;
+// int nMaxSubZone=m_iNumSubZones ;
float flVert[6][3] ; // verts 0, 1, 2 are the original triangle corners, verts 3, 4, 5 are interpolated edge points.
// we need the edge points, since it's possible for all the
// triangle verts to be in one L shaped zone but the triangle they form not be in that zone.
@@ -2377,7 +2377,7 @@
}
- int nInitialTrianglePos=m_nTriangleMax ; // debugging
+// int nInitialTrianglePos=m_nTriangleMax ; // debugging
// default parameters for all new triangles
NewTri.Texture = m_pTriangle[ nTriangle ].Texture ;
@@ -2502,10 +2502,10 @@
{
float flPercent1=1.0f-flPercent0 ;
- pVertexAB->color[0]=flPercent0*pVertA->color[0] + flPercent1*pVertB->color[0] ;
- pVertexAB->color[1]=flPercent0*pVertA->color[1] + flPercent1*pVertB->color[1] ;
- pVertexAB->color[2]=flPercent0*pVertA->color[2] + flPercent1*pVertB->color[2] ;
- pVertexAB->color[3]=flPercent0*pVertA->color[3] + flPercent1*pVertB->color[3] ;
+ pVertexAB->color[0]=(unsigned char)(flPercent0*pVertA->color[0] + flPercent1*pVertB->color[0]) ;
+ pVertexAB->color[1]=(unsigned char)(flPercent0*pVertA->color[1] + flPercent1*pVertB->color[1]) ;
+ pVertexAB->color[2]=(unsigned char)(flPercent0*pVertA->color[2] + flPercent1*pVertB->color[2]) ;
+ pVertexAB->color[3]=(unsigned char)(flPercent0*pVertA->color[3] + flPercent1*pVertB->color[3]) ;
pVertexAB->position[0]=flPercent0*pVertA->position[0] + flPercent1*pVertB->position[0] ;
pVertexAB->position[1]=flPercent0*pVertA->position[1] + flPercent1*pVertB->position[1] ;
@@ -2605,25 +2605,25 @@
{
int nFaceIndex = 0 ;
- int nVertex=0 ;
- int nVertexMax=0 ;
+// int nVertex=0 ;
+// int nVertexMax=0 ;
int nTriangle=0 ;
int nTriangleMax=0 ;
- float flPosX=0.0f ;
- float flPosY=0.0f ;
- float flPosZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
+// float flPosX=0.0f ;
+// float flPosY=0.0f ;
+// float flPosZ=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
int nMeshVert=0 ;
- int nMeshVertA=0 ;
- int nMeshVertB=0 ;
- int nMeshVertC=0 ;
+// int nMeshVertA=0 ;
+// int nMeshVertB=0 ;
+// int nMeshVertC=0 ;
- Q3BspVertex *vertices = m_pVertices ;
+// Q3BspVertex *vertices = m_pVertices ;
int *meshverts = m_pMeshVerts ;
QVECTOR junk ;
@@ -2684,15 +2684,15 @@
int Q3Map::ConvertPatchesToTriangles(void)
{
- float flPosX=0.0f ;
- float flPosY=0.0f ;
- float flPosZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
- int nMeshVert=0 ;
+// float flPosX=0.0f ;
+// float flPosY=0.0f ;
+// float flPosZ=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
+// int nMeshVert=0 ;
int nMeshVertA=0 ;
int nMeshVertB=0 ;
int nMeshVertC=0 ;
@@ -2704,7 +2704,7 @@
int nFirstVertex=m_nVertexMax ;
int nVertCount=nFirstVertex ;
- int nPatchCount=0 ;
+// int nPatchCount=0 ;
int* pIndexBuffer=NULL ;
@@ -2874,18 +2874,18 @@
float flCentreY=0.0f ;
float flCentreZ=0.0f ;
- float flMinX=0.0f ;
- float flMinY=0.0f ;
- float flMinZ=0.0f ;
- float flMaxX=0.0f ;
- float flMaxY=0.0f ;
- float flMaxZ=0.0f ;
+// float flMinX=0.0f ;
+// float flMinY=0.0f ;
+// float flMinZ=0.0f ;
+// float flMaxX=0.0f ;
+// float flMaxY=0.0f ;
+// float flMaxZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
float flColR=0.0f ;
float flColG=0.0f ;
@@ -2899,9 +2899,9 @@
int nLightNode=0 ;
int nTexture=0 ;
int nZone=0 ;
- int nLampZone=0 ;
- int nMaxLampZone=0 ;
- int nZoneMatch=0 ;
+// int nLampZone=0 ;
+// int nMaxLampZone=0 ;
+// int nZoneMatch=0 ;
for(nTexLampListPos=0 ; nTexLampListPos<m_nTexLampMax ; nTexLampListPos++)
@@ -3001,25 +3001,25 @@
m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].texcoord[0][1]=flCentreY ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].texcoord[1][0]=flCentreZ ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].texcoord[1][1]=flBrightness ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[0]=flColR ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[1]=flColG ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[2]=flColB ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[0]=(unsigned char)flColR ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[1]=(unsigned char)flColG ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].color[2]=(unsigned char)flColB ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[0][0]=flCentreX ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[0][1]=flCentreY ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[1][0]=flCentreZ ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[1][1]=flBrightness ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[0]=flColR ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[1]=flColG ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[2]=flColB ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[0]=(unsigned char)flColR ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[1]=(unsigned char)flColG ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].color[2]=(unsigned char)flColB ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[0][0]=flCentreX ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[0][1]=flCentreY ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[1][0]=flCentreZ ;
m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[1][1]=flBrightness ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[0]=flColR ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[1]=flColG ;
- m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[2]=flColB ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[0]=(unsigned char)flColR ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[1]=(unsigned char)flColG ;
+ m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].color[2]=(unsigned char)flColB ;
m_pTriangle[ m_nTriangleMax ].Group=m_nGroup ;
@@ -3060,11 +3060,11 @@
float flMaxY=0.0f ;
float flMaxZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
float flColR=0.0f ;
float flColG=0.0f ;
@@ -3148,9 +3148,9 @@
Vert_xyz.texcoord[0][1]=flCentreY ;
Vert_xyz.texcoord[1][0]=flCentreZ ;
Vert_xyz.texcoord[1][1]=flBrightness ;
- Vert_xyz.color[0]=flColR ;
- Vert_xyz.color[1]=flColG ;
- Vert_xyz.color[2]=flColB ;
+ Vert_xyz.color[0]=(unsigned char)flColR ;
+ Vert_xyz.color[1]=(unsigned char)flColG ;
+ Vert_xyz.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_xyz)) return 0 ;
@@ -3164,9 +3164,9 @@
Vert_Xyz.texcoord[0][1]=flCentreY ;
Vert_Xyz.texcoord[1][0]=flCentreZ ;
Vert_Xyz.texcoord[1][1]=flBrightness ;
- Vert_Xyz.color[0]=flColR ;
- Vert_Xyz.color[1]=flColG ;
- Vert_Xyz.color[2]=flColB ;
+ Vert_Xyz.color[0]=(unsigned char)flColR ;
+ Vert_Xyz.color[1]=(unsigned char)flColG ;
+ Vert_Xyz.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_Xyz)) return 0 ;
Vert_xYz.position[0]=flMinX ;
@@ -3179,9 +3179,9 @@
Vert_xYz.texcoord[0][1]=flCentreY ;
Vert_xYz.texcoord[1][0]=flCentreZ ;
Vert_xYz.texcoord[1][1]=flBrightness ;
- Vert_xYz.color[0]=flColR ;
- Vert_xYz.color[1]=flColG ;
- Vert_xYz.color[2]=flColB ;
+ Vert_xYz.color[0]=(unsigned char)flColR ;
+ Vert_xYz.color[1]=(unsigned char)flColG ;
+ Vert_xYz.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_xYz)) return 0 ;
Vert_XYz.position[0]=flMaxX ;
@@ -3194,9 +3194,9 @@
Vert_XYz.texcoord[0][1]=flCentreY ;
Vert_XYz.texcoord[1][0]=flCentreZ ;
Vert_XYz.texcoord[1][1]=flBrightness ;
- Vert_XYz.color[0]=flColR ;
- Vert_XYz.color[1]=flColG ;
- Vert_XYz.color[2]=flColB ;
+ Vert_XYz.color[0]=(unsigned char)flColR ;
+ Vert_XYz.color[1]=(unsigned char)flColG ;
+ Vert_XYz.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_XYz)) return 0 ;
//////////////////////////////////////
@@ -3211,9 +3211,9 @@
Vert_xyZ.texcoord[0][1]=flCentreY ;
Vert_xyZ.texcoord[1][0]=flCentreZ ;
Vert_xyZ.texcoord[1][1]=flBrightness ;
- Vert_xyZ.color[0]=flColR ;
- Vert_xyZ.color[1]=flColG ;
- Vert_xyZ.color[2]=flColB ;
+ Vert_xyZ.color[0]=(unsigned char)flColR ;
+ Vert_xyZ.color[1]=(unsigned char)flColG ;
+ Vert_xyZ.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_xyZ)) return 0 ;
Vert_XyZ.position[0]=flMaxX ;
@@ -3226,9 +3226,9 @@
Vert_XyZ.texcoord[0][1]=flCentreY ;
Vert_XyZ.texcoord[1][0]=flCentreZ ;
Vert_XyZ.texcoord[1][1]=flBrightness ;
- Vert_XyZ.color[0]=flColR ;
- Vert_XyZ.color[1]=flColG ;
- Vert_XyZ.color[2]=flColB ;
+ Vert_XyZ.color[0]=(unsigned char)flColR ;
+ Vert_XyZ.color[1]=(unsigned char)flColG ;
+ Vert_XyZ.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_XyZ)) return 0 ;
Vert_xYZ.position[0]=flMinX ;
@@ -3241,9 +3241,9 @@
Vert_xYZ.texcoord[0][1]=flCentreY ;
Vert_xYZ.texcoord[1][0]=flCentreZ ;
Vert_xYZ.texcoord[1][1]=flBrightness ;
- Vert_xYZ.color[0]=flColR ;
- Vert_xYZ.color[1]=flColG ;
- Vert_xYZ.color[2]=flColB ;
+ Vert_xYZ.color[0]=(unsigned char)flColR ;
+ Vert_xYZ.color[1]=(unsigned char)flColG ;
+ Vert_xYZ.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_xYZ)) return 0 ;
Vert_XYZ.position[0]=flMaxX ;
@@ -3256,9 +3256,9 @@
Vert_XYZ.texcoord[0][1]=flCentreY ;
Vert_XYZ.texcoord[1][0]=flCentreZ ;
Vert_XYZ.texcoord[1][1]=flBrightness ;
- Vert_XYZ.color[0]=flColR ;
- Vert_XYZ.color[1]=flColG ;
- Vert_XYZ.color[2]=flColB ;
+ Vert_XYZ.color[0]=(unsigned char)flColR ;
+ Vert_XYZ.color[1]=(unsigned char)flColG ;
+ Vert_XYZ.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_XYZ)) return 0 ;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -3361,11 +3361,11 @@
float flMaxY=0.0f ;
float flMaxZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
float flColR=0.0f ;
float flColG=0.0f ;
@@ -3450,9 +3450,9 @@
Vert_L.texcoord[0][1]=flCentreY ;
Vert_L.texcoord[1][0]=flCentreZ ;
Vert_L.texcoord[1][1]=flBrightness ;
- Vert_L.color[0]=flColR ;
- Vert_L.color[1]=flColG ;
- Vert_L.color[2]=flColB ;
+ Vert_L.color[0]=(unsigned char)flColR ;
+ Vert_L.color[1]=(unsigned char)flColG ;
+ Vert_L.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_L)) return 0 ;
Vert_R.position[0]=flMaxX ;
@@ -3465,9 +3465,9 @@
Vert_R.texcoord[0][1]=flCentreY ;
Vert_R.texcoord[1][0]=flCentreZ ;
Vert_R.texcoord[1][1]=flBrightness ;
- Vert_R.color[0]=flColR ;
- Vert_R.color[1]=flColG ;
- Vert_R.color[2]=flColB ;
+ Vert_R.color[0]=(unsigned char)flColR ;
+ Vert_R.color[1]=(unsigned char)flColG ;
+ Vert_R.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_R)) return 0 ;
Vert_F.position[0]=flCentreX ;
@@ -3480,9 +3480,9 @@
Vert_F.texcoord[0][1]=flCentreY ;
Vert_F.texcoord[1][0]=flCentreZ ;
Vert_F.texcoord[1][1]=flBrightness ;
- Vert_F.color[0]=flColR ;
- Vert_F.color[1]=flColG ;
- Vert_F.color[2]=flColB ;
+ Vert_F.color[0]=(unsigned char)flColR ;
+ Vert_F.color[1]=(unsigned char)flColG ;
+ Vert_F.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_F)) return 0 ;
Vert_B.position[0]=flCentreX ;
@@ -3495,9 +3495,9 @@
Vert_B.texcoord[0][1]=flCentreY ;
Vert_B.texcoord[1][0]=flCentreZ ;
Vert_B.texcoord[1][1]=flBrightness ;
- Vert_B.color[0]=flColR ;
- Vert_B.color[1]=flColG ;
- Vert_B.color[2]=flColB ;
+ Vert_B.color[0]=(unsigned char)flColR ;
+ Vert_B.color[1]=(unsigned char)flColG ;
+ Vert_B.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_B)) return 0 ;
Vert_U.position[0]=flCentreX ;
@@ -3510,9 +3510,9 @@
Vert_U.texcoord[0][1]=flCentreY ;
Vert_U.texcoord[1][0]=flCentreZ ;
Vert_U.texcoord[1][1]=flBrightness ;
- Vert_U.color[0]=flColR ;
- Vert_U.color[1]=flColG ;
- Vert_U.color[2]=flColB ;
+ Vert_U.color[0]=(unsigned char)flColR ;
+ Vert_U.color[1]=(unsigned char)flColG ;
+ Vert_U.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_U)) return 0 ;
Vert_D.position[0]=flCentreX ;
@@ -3525,9 +3525,9 @@
Vert_D.texcoord[0][1]=flCentreY ;
Vert_D.texcoord[1][0]=flCentreZ ;
Vert_D.texcoord[1][1]=flBrightness ;
- Vert_D.color[0]=flColR ;
- Vert_D.color[1]=flColG ;
- Vert_D.color[2]=flColB ;
+ Vert_D.color[0]=(unsigned char)flColR ;
+ Vert_D.color[1]=(unsigned char)flColG ;
+ Vert_D.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_D)) return 0 ;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -3605,11 +3605,11 @@
float flMaxY=0.0f ;
float flMaxZ=0.0f ;
- float flNormX=0.0f ;
- float flNormY=0.0f ;
- float flNormZ=0.0f ;
- float flTexU=0.0f ;
- float flTexV=0.0f ;
+// float flNormX=0.0f ;
+// float flNormY=0.0f ;
+// float flNormZ=0.0f ;
+// float flTexU=0.0f ;
+// float flTexV=0.0f ;
float flColR=0.0f ;
float flColG=0.0f ;
@@ -3637,7 +3637,7 @@
float flBaseGlowSize=0.2f ;//0.001f ;
float flGlowSize=0.0f ;
- char chMessage[1024] ;
+// char chMessage[1024] ;
@@ -3784,9 +3784,9 @@
Vert_Or.texcoord[0][1]=flCentreY ;
Vert_Or.texcoord[1][0]=flCentreZ ;
Vert_Or.texcoord[1][1]=flBrightness ;
- Vert_Or.color[0]=flColR ;
- Vert_Or.color[1]=flColG ;
- Vert_Or.color[2]=flColB ;
+ Vert_Or.color[0]=(unsigned char)flColR ;
+ Vert_Or.color[1]=(unsigned char)flColG ;
+ Vert_Or.color[2]=(unsigned char)flColB ;
if(!AddVertex(Vert_Or)) return 0 ;
@@ -3826,9 +3826,9 @@
Vert_A0.texcoord[0][1]=flCentreY ;
Vert_A0.texcoord[1][0]=flCentreZ ;
Vert_A0.texcoord[1][1]=flBrightness ;
- Vert_A0.color[0]=flColR ;//abs(Vert_A0.normal[0])*255 ;//0.0f ;
- Vert_A0.color[1]=flColG ;//abs(Vert_A0.normal[1])*255 ;//0.0f ;
- Vert_A0.color[2]=flColB ;//abs(Vert_A0.normal[2])*255 ;//0.0f ;
+ Vert_A0.color[0]=(unsigned char)flColR ;//abs(Vert_A0.normal[0])*255 ;//0.0f ;
+ Vert_A0.color[1]=(unsigned char)flColG ;//abs(Vert_A0.normal[1])*255 ;//0.0f ;
+ Vert_A0.color[2]=(unsigned char)flColB ;//abs(Vert_A0.normal[2])*255 ;//0.0f ;
if(!AddVertex(Vert_A0)) return 0 ;
@@ -3855,9 +3855,9 @@
Vert_A1.texcoord[0][1]=flCentreY ;
Vert_A1.texcoord[1][0]=flCentreZ ;
Vert_A1.texcoord[1][1]=flBrightness ;
- Vert_A1.color[0]=flColR ;//abs(Vert_A1.normal[0])*255 ;//0.0f ;
- Vert_A1.color[1]=flColG ;//abs(Vert_A1.normal[1])*255 ;//0.0f ;
- Vert_A1.color[2]=flColB ;//abs(Vert_A1.normal[2])*255 ;//0.0f ;
+ Vert_A1.color[0]=(unsigned char)flColR ;//abs(Vert_A1.normal[0])*255 ;//0.0f ;
+ Vert_A1.color[1]=(unsigned char)flColG ;//abs(Vert_A1.normal[1])*255 ;//0.0f ;
+ Vert_A1.color[2]=(unsigned char)flColB ;//abs(Vert_A1.normal[2])*255 ;//0.0f ;
if(!AddVertex(Vert_A1)) return 0 ;
//////////////////////////////////////////////////////////////////////
@@ -3888,9 +3888,9 @@
Vert_B0.texcoord[0][1]=flCentreY ;
Vert_B0.texcoord[1][0]=flCentreZ ;
Vert_B0.texcoord[1][1]=flBrightness ;
- Vert_B0.color[0]=flColR ;//abs(Vert_B0.normal[0])*255 ;//0.0f ;
- Vert_B0.color[1]=flColG ;//abs(Vert_B0.normal[1])*255 ;//0.0f ;
- Vert_B0.color[2]=flColB ;//abs(Vert_B0.normal[2])*255 ;//0.0f ;
+ Vert_B0.color[0]=(unsigned char)flColR ;//abs(Vert_B0.normal[0])*255 ;//0.0f ;
+ Vert_B0.color[1]=(unsigned char)flColG ;//abs(Vert_B0.normal[1])*255 ;//0.0f ;
+ Vert_B0.color[2]=(unsigned char)flColB ;//abs(Vert_B0.normal[2])*255 ;//0.0f ;
if(!AddVertex(Vert_B0)) return 0 ;
tangentStart=start ;
@@ -3916,9 +3916,9 @@
Vert_B1.texcoord[0][1]=flCentreY ;
Vert_B1.texcoord[1][0]=flCentreZ ;
Vert_B1.texcoord[1][1]=flBrightness ;
- Vert_B1.color[0]=flColR ;//abs(Vert_B1.normal[0])*255 ;//0.0f ;
- Vert_B1.color[1]=flColG ;//abs(Vert_B1.normal[1])*255 ;//0.0f ;
- Vert_B1.color[2]=flColB ;//abs(Vert_B1.normal[2])*255 ;//0.0f ;
+ Vert_B1.color[0]=(unsigned char)flColR ;//abs(Vert_B1.normal[0])*255 ;//0.0f ;
+ Vert_B1.color[1]=(unsigned char)flColG ;//abs(Vert_B1.normal[1])*255 ;//0.0f ;
+ Vert_B1.color[2]=(unsigned char)flColB ;//abs(Vert_B1.normal[2])*255 ;//0.0f ;
if(!AddVertex(Vert_B1)) return 0 ;
/////////////////////////////////////////////////////////////////////
More information about the Orxonox-commit
mailing list