Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6825


Ignore:
Timestamp:
May 3, 2010, 12:27:45 AM (14 years ago)
Author:
landauf
Message:

fixed warnings in BZN bsp renderer

Location:
code/branches/fps/src/libraries/tools/bsp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fps/src/libraries/tools/bsp/DemoApp.cpp

    r6820 r6825  
    8181        OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (Default)...");
    8282
    83         char chMessage[1024] ;
     83//      char chMessage[1024] ;
    8484       
    8585        UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
     
    153153        OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodA)...");
    154154
    155         char chMessage[1024] ;
     155//      char chMessage[1024] ;
    156156       
    157157        UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
     
    315315        OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodB)...");
    316316
    317         char chMessage[1024] ;
     317//      char chMessage[1024] ;
    318318       
    319319        UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds();
     
    455455
    456456
    457                         uSleepTime=(uFrameTargetTime-uFrameRenderTime)/1000.0f ;
     457                        uSleepTime=(int)((uFrameTargetTime-uFrameRenderTime)/1000.0f) ;
    458458                        if(uSleepTime>0) Sleep(uSleepTime) ;
    459459
  • code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h

    r6823 r6825  
    4242//Use this define to signify OIS will be used as a DLL
    4343//(so that dll import/export macros are in effect)
    44 #define OIS_DYNAMIC_LIB
     44#ifndef OIS_DYNAMIC_LIB
     45#  define OIS_DYNAMIC_LIB
     46#endif
    4547#include <OIS/OIS.h>
    4648
  • code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp

    r6820 r6825  
    108108        m_nMaxEntity=0 ;
    109109        m_pEntityInfo=NULL ;
    110         m_nMaxVisibleEntity=NULL ;
     110        m_nMaxVisibleEntity=0 ;
    111111        m_pVisibleEntity=NULL ;
    112         m_nMaxFrustumEntity=NULL ;
     112        m_nMaxFrustumEntity=0 ;
    113113        m_pFrustumEntity=NULL ;
    114114
     
    241241void OgreFramework::initOgre(Ogre::String wndTitle, OIS::KeyListener *pKeyListener, OIS::MouseListener *pMouseListener)
    242242{
    243         Ogre::LogManager* logMgr = new Ogre::LogManager();
     243//      Ogre::LogManager* logMgr = new Ogre::LogManager();
    244244       
    245245        m_pLog = Ogre::LogManager::getSingleton().createLog("OgreLogfile.log", true, true, false);
     
    971971        int nVisEnt=0 ;
    972972        int nEntity=0 ;
    973         int nMaxEntity=0 ;
     973//      int nMaxEntity=0 ;
    974974        int nSubMesh=0 ;
    975975        int nMaxSubMesh=0 ;
     
    17981798                // now we do a few rounds of ping-pong bluring of A to B, B to A.
    17991799                int nMaxBlur=4 ;
    1800                 int nLastBlur=nMaxBlur-1 ;
     1800//              int nLastBlur=nMaxBlur-1 ;
    18011801                int nBlurLoop=0 ;
    18021802
     
    22822282        m_TranslateVector = Vector3::ZERO;
    22832283
    2284         char chMessage[1024] ;
     2284//      char chMessage[1024] ;
    22852285        //sprintf(chMessage, "winmessage %u, %u, %u", m_pRenderWnd->m_Test_uMsg, (UINT)m_pRenderWnd->m_Test_wParam, (UINT)m_pRenderWnd->m_Test_lParam) ;
    22862286        //m_pLog->logMessage(chMessage) ;
     
    24172417        Ogre::Vector3 Pos ;
    24182418        Pos=m_pCamera->getPosition() ;
    2419         int nCamX=Pos.x ;
    2420         int nCamY=Pos.y ;
    2421         int nCamZ=Pos.z ;
     2419        Ogre::Real nCamX=Pos.x ;
     2420        Ogre::Real nCamY=Pos.y ;
     2421        Ogre::Real nCamZ=Pos.z ;
    24222422
    24232423
     
    29992999                // reattach all entity scenenodes.
    30003000                int nLoop=0 ;
    3001                 int nSubMesh=0 ;
    3002                 int nMaxSubMesh=0 ;
     3001//              int nSubMesh=0 ;
     3002//              int nMaxSubMesh=0 ;
    30033003                for(nLoop=0 ; nLoop<m_nMaxEntity ; nLoop++)
    30043004                        m_pSceneMgr->getRootSceneNode()->addChild(m_pEntityInfo[nLoop].pMasterNode) ;
     
    34863486
    34873487        int nTriangle=0 ;
    3488         int nStart=0 ;
     3488//      int nStart=0 ;
    34893489        int nEnd=0 ;
    34903490        int nMaterial=0 ;
     
    35533553        float flMaxY=0.0f ;
    35543554        float flMaxZ=0.0f ;
    3555         float flMidX=0.0f ;
    3556         float flMidY=0.0f ;
    3557         float flMidZ=0.0f ;
     3555//      float flMidX=0.0f ;
     3556//      float flMidY=0.0f ;
     3557//      float flMidZ=0.0f ;
    35583558        float flDisX=0.0f ;
    35593559        float flDisY=0.0f ;
     
    56295629       
    56305630        int nZone=0 ;
    5631         int nZoneIndex=0 ;
     5631//      int nZoneIndex=0 ;
    56325632        int nSubZone=0 ;
    5633         int nSubZoneIndex=0 ;
     5633//      int nSubZoneIndex=0 ;
    56345634        int nMaxSubZone=0 ;
    56355635        int nPortal=0 ;
    5636         int nPortalIndex=0 ;
     5636//      int nPortalIndex=0 ;
    56375637        int nMaxPortal=0 ;
    5638         int nMaxPortalZone=0 ;
    5639         int nPortalZone=0 ;
    5640         int nPortalZoneIndex=0 ;
    5641         int nMaxZone=0 ;
     5638//      int nMaxPortalZone=0 ;
     5639//      int nPortalZone=0 ;
     5640//      int nPortalZoneIndex=0 ;
     5641//      int nMaxZone=0 ;
    56425642       
    56435643
     
    56455645        int nLt=0 ;
    56465646
    5647         int nMaxSubLight=m_Q3Map->m_nSubLightMax ;
     5647//      int nMaxSubLight=m_Q3Map->m_nSubLightMax ;
    56485648        int nSubLt=0 ;
    56495649       
     
    58915891        int nSubLight=0 ;
    58925892
    5893         int nLight=0;
     5893//      int nLight=0;
    58945894        int nLightIndex=0 ;
    58955895
     
    60486048        int nZone=0 ;
    60496049        int nZoneIndex=0 ;
    6050         int nVisible=0 ;
     6050//      int nVisible=0 ;
    60516051        Ogre::AxisAlignedBox AABB ;
    60526052
     
    63846384        int nLight=0 ;
    63856385        int nLightIndex=0 ;
    6386         int nLightVal=0 ;
     6386//      int nLightVal=0 ;
    63876387        int nOpenPortals=0 ;
    6388         int nZoneHasOpenPortals=0 ;
     6388//      int nZoneHasOpenPortals=0 ;
    63896389        int nPortal=0 ;
    63906390        int nPortalIndex=0 ;
    63916391        int nMaxPortal=0 ;
    6392         int nZone=0 ;
    6393         int nMaxZone=0 ;
    6394         int nZoneIndex=0 ;
     6392//      int nZone=0 ;
     6393//      int nMaxZone=0 ;
     6394//      int nZoneIndex=0 ;
    63956395
    63966396        int nSubLightMax=0 ;
    6397         int nSubLightIndex=0 ;
     6397//      int nSubLightIndex=0 ;
    63986398        int nSubLight=0 ;
    63996399        int nSubLightStart=0 ;
     
    64016401        int nPortalLightMax=0 ;
    64026402        int nPortalLightIndex=0 ;
    6403         int nPortalLight=0 ;
     6403//      int nPortalLight=0 ;
    64046404
    64056405        int nCentreZone=0 ;
     
    64956495
    64966496        int nSubLightMax=0 ;
    6497         int nSubLightIndex=0 ;
     6497//      int nSubLightIndex=0 ;
    64986498        int nSubLight=0 ;
    64996499        int nSubLightStart=0 ;
     
    65866586        int nLight=0;
    65876587        int nLightVal=0 ;
    6588         int nLightIndex=0 ;
    6589         int nMaxLight=0 ;
     6588//      int nLightIndex=0 ;
     6589//      int nMaxLight=0 ;
    65906590
    65916591        int nSubLight=0 ;
    65926592        int nSubLightIndex=0 ;
    65936593        int nMaxSubLight=0 ;
    6594         int nSubLightVal=0 ;
     6594//      int nSubLightVal=0 ;
    65956595
    65966596       
     
    68726872void OgreFramework::initLight()
    68736873{
    6874         char chMessage[1024] ;
     6874//      char chMessage[1024] ;
    68756875
    68766876                // these lights only have placeholder settings to begin with, since they get moved around and reused thoughout the level.
     
    69086908        // make sure the config is a string
    69096909        int nConfigPos=-1 ;
    6910         int nPos=0 ;
     6910//      int nPos=0 ;
    69116911        int nKeyPos=0 ;
    69126912        int nValuePos=0 ;
     
    69146914        char chKey[KVSIZE] ;
    69156915        char chValue[KVSIZE] ;
    6916         float flValue=0.0f ;
     6916        int nValue=0 ;
    69176917
    69186918       
     
    69676967                               
    69686968                                        // convert value string to a float
    6969                                         flValue=atof(chValue) ;
     6969                                        nValue=atoi(chValue) ;
    69706970
    69716971                                        // assign that value
    6972                                         if(strcmp("r_shadowmapsize", chKey)==0)         { m_nShadowMapSize=flValue ; if(m_nShadowMapSize<2) m_nShadowMapSize=2 ; }
    6973                                         if(strcmp("r_shadowrgbsize", chKey)==0)         { m_nShadowRGBSize=flValue ; if(m_nShadowRGBSize<2) m_nShadowRGBSize=2 ; }
    6974                                         if(strcmp("r_colouredshadow", chKey)==0)        { m_nColouredShadow=flValue ; }
    6975                                         if(strcmp("r_renderhdr", chKey)==0)                             { m_nRenderHDR=flValue ; }
    6976                                         if(strcmp("r_maxgpuquery", chKey)==0)                   { m_nMaxGPUQuery=flValue ; if(m_nMaxGPUQuery<0) m_nMaxGPUQuery=0 ; if(m_nMaxGPUQuery>MAXGPUQUERY) m_nMaxGPUQuery=MAXGPUQUERY ; }
    6977 
    6978                                         //sprintf(m_chBug, "Key: %s, Value: %f", chKey, flValue) ;
     6972                                        if(strcmp("r_shadowmapsize", chKey)==0)         { m_nShadowMapSize=nValue ; if(m_nShadowMapSize<2) m_nShadowMapSize=2 ; }
     6973                                        if(strcmp("r_shadowrgbsize", chKey)==0)         { m_nShadowRGBSize=nValue ; if(m_nShadowRGBSize<2) m_nShadowRGBSize=2 ; }
     6974                                        if(strcmp("r_colouredshadow", chKey)==0)        { m_nColouredShadow=nValue ; }
     6975                                        if(strcmp("r_renderhdr", chKey)==0)                             { m_nRenderHDR=nValue ; }
     6976                                        if(strcmp("r_maxgpuquery", chKey)==0)                   { m_nMaxGPUQuery=nValue ; if(m_nMaxGPUQuery<0) m_nMaxGPUQuery=0 ; if(m_nMaxGPUQuery>MAXGPUQUERY) m_nMaxGPUQuery=MAXGPUQUERY ; }
     6977
     6978                                        //sprintf(m_chBug, "Key: %s, Value: %i", chKey, nValue) ;
    69796979                                        //m_pLog->logMessage(m_chBug);
    69806980                               
  • code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp

    r6820 r6825  
    582582{
    583583       
    584         char chMessage[1024] ;
     584//      char chMessage[1024] ;
    585585        int nError=0 ;
    586586
     
    10461046int Q3Map::ParseEntities(void)
    10471047{
    1048         char chKey[MAX_TOKENSIZE+1] ;   // +1 to leave room for null terminator
    1049         char chValue[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
     1048//      char chKey[MAX_TOKENSIZE+1] ;   // +1 to leave room for null terminator
     1049//      char chValue[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator
    10501050        int nPos=0 ;
    10511051        int nMaxPos=m_BspHeader.Lumps[0].iLength ;
     
    13141314int Q3Map::ParseAndAddLight(int* pPos, int nMaxPos)
    13151315{
    1316         char chMessage[1024] ;
     1316//      char chMessage[1024] ;
    13171317
    13181318
     
    16831683        int nPos=0 ;
    16841684
    1685         float flMinX=0.0f ;
    1686         float flMinY=0.0f ;
    1687         float flMinZ=0.0f ;
    1688         float flMaxX=0.0f ;
    1689         float flMaxY=0.0f ;
    1690         float flMaxZ=0.0f ;
     1685//      float flMinX=0.0f ;
     1686//      float flMinY=0.0f ;
     1687//      float flMinZ=0.0f ;
     1688//      float flMaxX=0.0f ;
     1689//      float flMaxY=0.0f ;
     1690//      float flMaxZ=0.0f ;
    16911691
    16921692        m_nMaxZone=0 ;
     
    17621762{
    17631763        int nCurrentTriangle=0 ;
    1764         int nZone=0 ;
     1764//      int nZone=0 ;
    17651765
    17661766
     
    18201820{
    18211821        int nZone=0 ;
    1822         int nSubZone=0 ;
     1822//      int nSubZone=0 ;
    18231823        int nPos=0 ;
    18241824        bool bVertInSubZone=false ;
    18251825        int nVert=0 ;
    18261826        bool bTriangleInZone=false ;
    1827         int nMaxSubZone=m_iNumSubZones ;
     1827//      int nMaxSubZone=m_iNumSubZones ;
    18281828        float flVert[6][3] ; // verts 0, 1, 2 are the original triangle corners, verts 3, 4, 5 are interpolated edge points.
    18291829        // we need the edge points, since it's possible for all the
     
    23782378        }
    23792379
    2380         int nInitialTrianglePos=m_nTriangleMax ; // debugging
     2380//      int nInitialTrianglePos=m_nTriangleMax ; // debugging
    23812381
    23822382        // default parameters for all new triangles
     
    25032503        float flPercent1=1.0f-flPercent0 ;
    25042504
    2505         pVertexAB->color[0]=flPercent0*pVertA->color[0] + flPercent1*pVertB->color[0] ;
    2506         pVertexAB->color[1]=flPercent0*pVertA->color[1] + flPercent1*pVertB->color[1] ;
    2507         pVertexAB->color[2]=flPercent0*pVertA->color[2] + flPercent1*pVertB->color[2] ;
    2508         pVertexAB->color[3]=flPercent0*pVertA->color[3] + flPercent1*pVertB->color[3] ;
     2505        pVertexAB->color[0]=(unsigned char)(flPercent0*pVertA->color[0] + flPercent1*pVertB->color[0]) ;
     2506        pVertexAB->color[1]=(unsigned char)(flPercent0*pVertA->color[1] + flPercent1*pVertB->color[1]) ;
     2507        pVertexAB->color[2]=(unsigned char)(flPercent0*pVertA->color[2] + flPercent1*pVertB->color[2]) ;
     2508        pVertexAB->color[3]=(unsigned char)(flPercent0*pVertA->color[3] + flPercent1*pVertB->color[3]) ;
    25092509
    25102510        pVertexAB->position[0]=flPercent0*pVertA->position[0] + flPercent1*pVertB->position[0] ;
     
    26062606        int nFaceIndex = 0 ;
    26072607       
    2608         int nVertex=0 ;
    2609         int nVertexMax=0 ;
     2608//      int nVertex=0 ;
     2609//      int nVertexMax=0 ;
    26102610        int nTriangle=0 ;
    26112611        int nTriangleMax=0 ;
    26122612
    2613         float flPosX=0.0f ;
    2614         float flPosY=0.0f ;
    2615         float flPosZ=0.0f ;
    2616         float   flNormX=0.0f ;
    2617         float   flNormY=0.0f ;
    2618         float   flNormZ=0.0f ;
    2619         float flTexU=0.0f ;
    2620         float flTexV=0.0f ;
     2613//      float flPosX=0.0f ;
     2614//      float flPosY=0.0f ;
     2615//      float flPosZ=0.0f ;
     2616//      float   flNormX=0.0f ;
     2617//      float   flNormY=0.0f ;
     2618//      float   flNormZ=0.0f ;
     2619//      float flTexU=0.0f ;
     2620//      float flTexV=0.0f ;
    26212621        int nMeshVert=0 ;
    2622         int nMeshVertA=0 ;
    2623         int nMeshVertB=0 ;
    2624         int nMeshVertC=0 ;
    2625 
    2626         Q3BspVertex *vertices = m_pVertices ;
     2622//      int nMeshVertA=0 ;
     2623//      int nMeshVertB=0 ;
     2624//      int nMeshVertC=0 ;
     2625
     2626//      Q3BspVertex *vertices = m_pVertices ;
    26272627        int *meshverts = m_pMeshVerts ;
    26282628       
     
    26852685{
    26862686
    2687         float flPosX=0.0f ;
    2688         float flPosY=0.0f ;
    2689         float flPosZ=0.0f ;
    2690         float   flNormX=0.0f ;
    2691         float   flNormY=0.0f ;
    2692         float   flNormZ=0.0f ;
    2693         float flTexU=0.0f ;
    2694         float flTexV=0.0f ;
    2695         int nMeshVert=0 ;
     2687//      float flPosX=0.0f ;
     2688//      float flPosY=0.0f ;
     2689//      float flPosZ=0.0f ;
     2690//      float   flNormX=0.0f ;
     2691//      float   flNormY=0.0f ;
     2692//      float   flNormZ=0.0f ;
     2693//      float flTexU=0.0f ;
     2694//      float flTexV=0.0f ;
     2695//      int nMeshVert=0 ;
    26962696        int nMeshVertA=0 ;
    26972697        int nMeshVertB=0 ;
     
    27052705       
    27062706        int nVertCount=nFirstVertex ;
    2707         int nPatchCount=0 ;
     2707//      int nPatchCount=0 ;
    27082708
    27092709        int* pIndexBuffer=NULL ;
     
    28752875        float flCentreZ=0.0f ;
    28762876
    2877         float flMinX=0.0f ;
    2878         float flMinY=0.0f ;
    2879         float flMinZ=0.0f ;
    2880         float flMaxX=0.0f ;
    2881         float flMaxY=0.0f ;
    2882         float flMaxZ=0.0f ;
    2883 
    2884         float   flNormX=0.0f ;
    2885         float   flNormY=0.0f ;
    2886         float   flNormZ=0.0f ;
    2887         float flTexU=0.0f ;
    2888         float flTexV=0.0f ;
     2877//      float flMinX=0.0f ;
     2878//      float flMinY=0.0f ;
     2879//      float flMinZ=0.0f ;
     2880//      float flMaxX=0.0f ;
     2881//      float flMaxY=0.0f ;
     2882//      float flMaxZ=0.0f ;
     2883
     2884//      float   flNormX=0.0f ;
     2885//      float   flNormY=0.0f ;
     2886//      float   flNormZ=0.0f ;
     2887//      float flTexU=0.0f ;
     2888//      float flTexV=0.0f ;
    28892889
    28902890        float flColR=0.0f ;
     
    29002900        int nTexture=0 ;
    29012901        int nZone=0 ;
    2902         int nLampZone=0 ;
    2903         int nMaxLampZone=0 ;
    2904         int nZoneMatch=0 ;
     2902//      int nLampZone=0 ;
     2903//      int nMaxLampZone=0 ;
     2904//      int nZoneMatch=0 ;
    29052905
    29062906
     
    30023002                                m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].texcoord[1][0]=flCentreZ ;
    30033003                                m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].texcoord[1][1]=flBrightness ;
    3004                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[0]=flColR ;
    3005                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[1]=flColG ;
    3006                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[2]=flColB ;
     3004                                m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[0]=(unsigned char)flColR ;
     3005                                m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[1]=(unsigned char)flColG ;
     3006                                m_pVertex[  m_pTriangle[nTriangle].VIndex[0]  ].color[2]=(unsigned char)flColB ;
    30073007
    30083008                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].texcoord[0][0]=flCentreX ;
     
    30103010                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].texcoord[1][0]=flCentreZ ;
    30113011                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].texcoord[1][1]=flBrightness ;
    3012                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[0]=flColR ;
    3013                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[1]=flColG ;
    3014                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[2]=flColB ;
     3012                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[0]=(unsigned char)flColR ;
     3013                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[1]=(unsigned char)flColG ;
     3014                                m_pVertex[  m_pTriangle[nTriangle].VIndex[1]  ].color[2]=(unsigned char)flColB ;
    30153015
    30163016                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].texcoord[0][0]=flCentreX ;
     
    30183018                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].texcoord[1][0]=flCentreZ ;
    30193019                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].texcoord[1][1]=flBrightness ;
    3020                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[0]=flColR ;
    3021                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[1]=flColG ;
    3022                                 m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[2]=flColB ;
     3020                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[0]=(unsigned char)flColR ;
     3021                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[1]=(unsigned char)flColG ;
     3022                                m_pVertex[  m_pTriangle[nTriangle].VIndex[2]  ].color[2]=(unsigned char)flColB ;
    30233023
    30243024                               
     
    30613061        float flMaxZ=0.0f ;
    30623062
    3063         float   flNormX=0.0f ;
    3064         float   flNormY=0.0f ;
    3065         float   flNormZ=0.0f ;
    3066         float flTexU=0.0f ;
    3067         float flTexV=0.0f ;
     3063//      float   flNormX=0.0f ;
     3064//      float   flNormY=0.0f ;
     3065//      float   flNormZ=0.0f ;
     3066//      float flTexU=0.0f ;
     3067//      float flTexV=0.0f ;
    30683068
    30693069        float flColR=0.0f ;
     
    31493149                Vert_xyz.texcoord[1][0]=flCentreZ ;
    31503150                Vert_xyz.texcoord[1][1]=flBrightness ;
    3151                 Vert_xyz.color[0]=flColR ;
    3152                 Vert_xyz.color[1]=flColG ;
    3153                 Vert_xyz.color[2]=flColB ;
     3151                Vert_xyz.color[0]=(unsigned char)flColR ;
     3152                Vert_xyz.color[1]=(unsigned char)flColG ;
     3153                Vert_xyz.color[2]=(unsigned char)flColB ;
    31543154                if(!AddVertex(Vert_xyz)) return 0 ;
    31553155                       
     
    31653165                Vert_Xyz.texcoord[1][0]=flCentreZ ;
    31663166                Vert_Xyz.texcoord[1][1]=flBrightness ;
    3167                 Vert_Xyz.color[0]=flColR ;
    3168                 Vert_Xyz.color[1]=flColG ;
    3169                 Vert_Xyz.color[2]=flColB ;
     3167                Vert_Xyz.color[0]=(unsigned char)flColR ;
     3168                Vert_Xyz.color[1]=(unsigned char)flColG ;
     3169                Vert_Xyz.color[2]=(unsigned char)flColB ;
    31703170                if(!AddVertex(Vert_Xyz)) return 0 ;
    31713171
     
    31803180                Vert_xYz.texcoord[1][0]=flCentreZ ;
    31813181                Vert_xYz.texcoord[1][1]=flBrightness ;
    3182                 Vert_xYz.color[0]=flColR ;
    3183                 Vert_xYz.color[1]=flColG ;
    3184                 Vert_xYz.color[2]=flColB ;
     3182                Vert_xYz.color[0]=(unsigned char)flColR ;
     3183                Vert_xYz.color[1]=(unsigned char)flColG ;
     3184                Vert_xYz.color[2]=(unsigned char)flColB ;
    31853185                if(!AddVertex(Vert_xYz)) return 0 ;
    31863186
     
    31953195                Vert_XYz.texcoord[1][0]=flCentreZ ;
    31963196                Vert_XYz.texcoord[1][1]=flBrightness ;
    3197                 Vert_XYz.color[0]=flColR ;
    3198                 Vert_XYz.color[1]=flColG ;
    3199                 Vert_XYz.color[2]=flColB ;
     3197                Vert_XYz.color[0]=(unsigned char)flColR ;
     3198                Vert_XYz.color[1]=(unsigned char)flColG ;
     3199                Vert_XYz.color[2]=(unsigned char)flColB ;
    32003200                if(!AddVertex(Vert_XYz)) return 0 ;
    32013201
     
    32123212                Vert_xyZ.texcoord[1][0]=flCentreZ ;
    32133213                Vert_xyZ.texcoord[1][1]=flBrightness ;
    3214                 Vert_xyZ.color[0]=flColR ;
    3215                 Vert_xyZ.color[1]=flColG ;
    3216                 Vert_xyZ.color[2]=flColB ;
     3214                Vert_xyZ.color[0]=(unsigned char)flColR ;
     3215                Vert_xyZ.color[1]=(unsigned char)flColG ;
     3216                Vert_xyZ.color[2]=(unsigned char)flColB ;
    32173217                if(!AddVertex(Vert_xyZ)) return 0 ;
    32183218
     
    32273227                Vert_XyZ.texcoord[1][0]=flCentreZ ;
    32283228                Vert_XyZ.texcoord[1][1]=flBrightness ;
    3229                 Vert_XyZ.color[0]=flColR ;
    3230                 Vert_XyZ.color[1]=flColG ;
    3231                 Vert_XyZ.color[2]=flColB ;
     3229                Vert_XyZ.color[0]=(unsigned char)flColR ;
     3230                Vert_XyZ.color[1]=(unsigned char)flColG ;
     3231                Vert_XyZ.color[2]=(unsigned char)flColB ;
    32323232                if(!AddVertex(Vert_XyZ)) return 0 ;
    32333233
     
    32423242                Vert_xYZ.texcoord[1][0]=flCentreZ ;
    32433243                Vert_xYZ.texcoord[1][1]=flBrightness ;
    3244                 Vert_xYZ.color[0]=flColR ;
    3245                 Vert_xYZ.color[1]=flColG ;
    3246                 Vert_xYZ.color[2]=flColB ;
     3244                Vert_xYZ.color[0]=(unsigned char)flColR ;
     3245                Vert_xYZ.color[1]=(unsigned char)flColG ;
     3246                Vert_xYZ.color[2]=(unsigned char)flColB ;
    32473247                if(!AddVertex(Vert_xYZ)) return 0 ;
    32483248
     
    32573257                Vert_XYZ.texcoord[1][0]=flCentreZ ;
    32583258                Vert_XYZ.texcoord[1][1]=flBrightness ;
    3259                 Vert_XYZ.color[0]=flColR ;
    3260                 Vert_XYZ.color[1]=flColG ;
    3261                 Vert_XYZ.color[2]=flColB ;
     3259                Vert_XYZ.color[0]=(unsigned char)flColR ;
     3260                Vert_XYZ.color[1]=(unsigned char)flColG ;
     3261                Vert_XYZ.color[2]=(unsigned char)flColB ;
    32623262                if(!AddVertex(Vert_XYZ)) return 0 ;
    32633263
     
    33623362        float flMaxZ=0.0f ;
    33633363
    3364         float   flNormX=0.0f ;
    3365         float   flNormY=0.0f ;
    3366         float   flNormZ=0.0f ;
    3367         float flTexU=0.0f ;
    3368         float flTexV=0.0f ;
     3364//      float   flNormX=0.0f ;
     3365//      float   flNormY=0.0f ;
     3366//      float   flNormZ=0.0f ;
     3367//      float flTexU=0.0f ;
     3368//      float flTexV=0.0f ;
    33693369
    33703370        float flColR=0.0f ;
     
    34513451                Vert_L.texcoord[1][0]=flCentreZ ;
    34523452                Vert_L.texcoord[1][1]=flBrightness ;
    3453                 Vert_L.color[0]=flColR ;
    3454                 Vert_L.color[1]=flColG ;
    3455                 Vert_L.color[2]=flColB ;
     3453                Vert_L.color[0]=(unsigned char)flColR ;
     3454                Vert_L.color[1]=(unsigned char)flColG ;
     3455                Vert_L.color[2]=(unsigned char)flColB ;
    34563456                if(!AddVertex(Vert_L)) return 0 ;
    34573457
     
    34663466                Vert_R.texcoord[1][0]=flCentreZ ;
    34673467                Vert_R.texcoord[1][1]=flBrightness ;
    3468                 Vert_R.color[0]=flColR ;
    3469                 Vert_R.color[1]=flColG ;
    3470                 Vert_R.color[2]=flColB ;
     3468                Vert_R.color[0]=(unsigned char)flColR ;
     3469                Vert_R.color[1]=(unsigned char)flColG ;
     3470                Vert_R.color[2]=(unsigned char)flColB ;
    34713471                if(!AddVertex(Vert_R)) return 0 ;
    34723472
     
    34813481                Vert_F.texcoord[1][0]=flCentreZ ;
    34823482                Vert_F.texcoord[1][1]=flBrightness ;
    3483                 Vert_F.color[0]=flColR ;
    3484                 Vert_F.color[1]=flColG ;
    3485                 Vert_F.color[2]=flColB ;
     3483                Vert_F.color[0]=(unsigned char)flColR ;
     3484                Vert_F.color[1]=(unsigned char)flColG ;
     3485                Vert_F.color[2]=(unsigned char)flColB ;
    34863486                if(!AddVertex(Vert_F)) return 0 ;
    34873487               
     
    34963496                Vert_B.texcoord[1][0]=flCentreZ ;
    34973497                Vert_B.texcoord[1][1]=flBrightness ;
    3498                 Vert_B.color[0]=flColR ;
    3499                 Vert_B.color[1]=flColG ;
    3500                 Vert_B.color[2]=flColB ;
     3498                Vert_B.color[0]=(unsigned char)flColR ;
     3499                Vert_B.color[1]=(unsigned char)flColG ;
     3500                Vert_B.color[2]=(unsigned char)flColB ;
    35013501                if(!AddVertex(Vert_B)) return 0 ;
    35023502
     
    35113511                Vert_U.texcoord[1][0]=flCentreZ ;
    35123512                Vert_U.texcoord[1][1]=flBrightness ;
    3513                 Vert_U.color[0]=flColR ;
    3514                 Vert_U.color[1]=flColG ;
    3515                 Vert_U.color[2]=flColB ;
     3513                Vert_U.color[0]=(unsigned char)flColR ;
     3514                Vert_U.color[1]=(unsigned char)flColG ;
     3515                Vert_U.color[2]=(unsigned char)flColB ;
    35163516                if(!AddVertex(Vert_U)) return 0 ;
    35173517
     
    35263526                Vert_D.texcoord[1][0]=flCentreZ ;
    35273527                Vert_D.texcoord[1][1]=flBrightness ;
    3528                 Vert_D.color[0]=flColR ;
    3529                 Vert_D.color[1]=flColG ;
    3530                 Vert_D.color[2]=flColB ;
     3528                Vert_D.color[0]=(unsigned char)flColR ;
     3529                Vert_D.color[1]=(unsigned char)flColG ;
     3530                Vert_D.color[2]=(unsigned char)flColB ;
    35313531                if(!AddVertex(Vert_D)) return 0 ;
    35323532
     
    36063606        float flMaxZ=0.0f ;
    36073607
    3608         float   flNormX=0.0f ;
    3609         float   flNormY=0.0f ;
    3610         float   flNormZ=0.0f ;
    3611         float flTexU=0.0f ;
    3612         float flTexV=0.0f ;
     3608//      float   flNormX=0.0f ;
     3609//      float   flNormY=0.0f ;
     3610//      float   flNormZ=0.0f ;
     3611//      float flTexU=0.0f ;
     3612//      float flTexV=0.0f ;
    36133613
    36143614        float flColR=0.0f ;
     
    36383638        float flGlowSize=0.0f ;
    36393639
    3640         char chMessage[1024] ;
     3640//      char chMessage[1024] ;
    36413641
    36423642
     
    37853785        Vert_Or.texcoord[1][0]=flCentreZ ;
    37863786        Vert_Or.texcoord[1][1]=flBrightness ;
    3787         Vert_Or.color[0]=flColR ;
    3788         Vert_Or.color[1]=flColG ;
    3789         Vert_Or.color[2]=flColB ;
     3787        Vert_Or.color[0]=(unsigned char)flColR ;
     3788        Vert_Or.color[1]=(unsigned char)flColG ;
     3789        Vert_Or.color[2]=(unsigned char)flColB ;
    37903790        if(!AddVertex(Vert_Or)) return 0 ;
    37913791
     
    38273827        Vert_A0.texcoord[1][0]=flCentreZ ;
    38283828        Vert_A0.texcoord[1][1]=flBrightness ;
    3829         Vert_A0.color[0]=flColR ;//abs(Vert_A0.normal[0])*255 ;//0.0f ;
    3830         Vert_A0.color[1]=flColG ;//abs(Vert_A0.normal[1])*255 ;//0.0f ;
    3831         Vert_A0.color[2]=flColB ;//abs(Vert_A0.normal[2])*255 ;//0.0f ;
     3829        Vert_A0.color[0]=(unsigned char)flColR ;//abs(Vert_A0.normal[0])*255 ;//0.0f ;
     3830        Vert_A0.color[1]=(unsigned char)flColG ;//abs(Vert_A0.normal[1])*255 ;//0.0f ;
     3831        Vert_A0.color[2]=(unsigned char)flColB ;//abs(Vert_A0.normal[2])*255 ;//0.0f ;
    38323832        if(!AddVertex(Vert_A0)) return 0 ;
    38333833
     
    38563856        Vert_A1.texcoord[1][0]=flCentreZ ;
    38573857        Vert_A1.texcoord[1][1]=flBrightness ;
    3858         Vert_A1.color[0]=flColR ;//abs(Vert_A1.normal[0])*255 ;//0.0f ;
    3859         Vert_A1.color[1]=flColG ;//abs(Vert_A1.normal[1])*255 ;//0.0f ;
    3860         Vert_A1.color[2]=flColB ;//abs(Vert_A1.normal[2])*255 ;//0.0f ;
     3858        Vert_A1.color[0]=(unsigned char)flColR ;//abs(Vert_A1.normal[0])*255 ;//0.0f ;
     3859        Vert_A1.color[1]=(unsigned char)flColG ;//abs(Vert_A1.normal[1])*255 ;//0.0f ;
     3860        Vert_A1.color[2]=(unsigned char)flColB ;//abs(Vert_A1.normal[2])*255 ;//0.0f ;
    38613861        if(!AddVertex(Vert_A1)) return 0 ;
    38623862
     
    38893889        Vert_B0.texcoord[1][0]=flCentreZ ;
    38903890        Vert_B0.texcoord[1][1]=flBrightness ;
    3891         Vert_B0.color[0]=flColR ;//abs(Vert_B0.normal[0])*255 ;//0.0f ;
    3892         Vert_B0.color[1]=flColG ;//abs(Vert_B0.normal[1])*255 ;//0.0f ;
    3893         Vert_B0.color[2]=flColB ;//abs(Vert_B0.normal[2])*255 ;//0.0f ;
     3891        Vert_B0.color[0]=(unsigned char)flColR ;//abs(Vert_B0.normal[0])*255 ;//0.0f ;
     3892        Vert_B0.color[1]=(unsigned char)flColG ;//abs(Vert_B0.normal[1])*255 ;//0.0f ;
     3893        Vert_B0.color[2]=(unsigned char)flColB ;//abs(Vert_B0.normal[2])*255 ;//0.0f ;
    38943894        if(!AddVertex(Vert_B0)) return 0 ;
    38953895
     
    39173917        Vert_B1.texcoord[1][0]=flCentreZ ;
    39183918        Vert_B1.texcoord[1][1]=flBrightness ;
    3919         Vert_B1.color[0]=flColR ;//abs(Vert_B1.normal[0])*255 ;//0.0f ;
    3920         Vert_B1.color[1]=flColG ;//abs(Vert_B1.normal[1])*255 ;//0.0f ;
    3921         Vert_B1.color[2]=flColB ;//abs(Vert_B1.normal[2])*255 ;//0.0f ;
     3919        Vert_B1.color[0]=(unsigned char)flColR ;//abs(Vert_B1.normal[0])*255 ;//0.0f ;
     3920        Vert_B1.color[1]=(unsigned char)flColG ;//abs(Vert_B1.normal[1])*255 ;//0.0f ;
     3921        Vert_B1.color[2]=(unsigned char)flColB ;//abs(Vert_B1.normal[2])*255 ;//0.0f ;
    39223922        if(!AddVertex(Vert_B1)) return 0 ;
    39233923
Note: See TracChangeset for help on using the changeset viewer.