Changeset 6825 for code/branches/fps/src/libraries/tools
- Timestamp:
- May 3, 2010, 12:27:45 AM (15 years ago)
- 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 81 81 OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (Default)..."); 82 82 83 char chMessage[1024] ;83 // char chMessage[1024] ; 84 84 85 85 UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds(); … … 153 153 OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodA)..."); 154 154 155 char chMessage[1024] ;155 // char chMessage[1024] ; 156 156 157 157 UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds(); … … 315 315 OgreFramework::getSingletonPtr()->m_pLog->logMessage("Start main loop (MethodB)..."); 316 316 317 char chMessage[1024] ;317 // char chMessage[1024] ; 318 318 319 319 UINT uFrameStartTime=OgreFramework::getSingletonPtr()->m_pTimer->getMilliseconds(); … … 455 455 456 456 457 uSleepTime=( uFrameTargetTime-uFrameRenderTime)/1000.0f;457 uSleepTime=(int)((uFrameTargetTime-uFrameRenderTime)/1000.0f) ; 458 458 if(uSleepTime>0) Sleep(uSleepTime) ; 459 459 -
code/branches/fps/src/libraries/tools/bsp/ExampleFrameListener.h
r6823 r6825 42 42 //Use this define to signify OIS will be used as a DLL 43 43 //(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 45 47 #include <OIS/OIS.h> 46 48 -
code/branches/fps/src/libraries/tools/bsp/OgreFramework.cpp
r6820 r6825 108 108 m_nMaxEntity=0 ; 109 109 m_pEntityInfo=NULL ; 110 m_nMaxVisibleEntity= NULL;110 m_nMaxVisibleEntity=0 ; 111 111 m_pVisibleEntity=NULL ; 112 m_nMaxFrustumEntity= NULL;112 m_nMaxFrustumEntity=0 ; 113 113 m_pFrustumEntity=NULL ; 114 114 … … 241 241 void OgreFramework::initOgre(Ogre::String wndTitle, OIS::KeyListener *pKeyListener, OIS::MouseListener *pMouseListener) 242 242 { 243 Ogre::LogManager* logMgr = new Ogre::LogManager();243 // Ogre::LogManager* logMgr = new Ogre::LogManager(); 244 244 245 245 m_pLog = Ogre::LogManager::getSingleton().createLog("OgreLogfile.log", true, true, false); … … 971 971 int nVisEnt=0 ; 972 972 int nEntity=0 ; 973 int nMaxEntity=0 ;973 // int nMaxEntity=0 ; 974 974 int nSubMesh=0 ; 975 975 int nMaxSubMesh=0 ; … … 1798 1798 // now we do a few rounds of ping-pong bluring of A to B, B to A. 1799 1799 int nMaxBlur=4 ; 1800 int nLastBlur=nMaxBlur-1 ;1800 // int nLastBlur=nMaxBlur-1 ; 1801 1801 int nBlurLoop=0 ; 1802 1802 … … 2282 2282 m_TranslateVector = Vector3::ZERO; 2283 2283 2284 char chMessage[1024] ;2284 // char chMessage[1024] ; 2285 2285 //sprintf(chMessage, "winmessage %u, %u, %u", m_pRenderWnd->m_Test_uMsg, (UINT)m_pRenderWnd->m_Test_wParam, (UINT)m_pRenderWnd->m_Test_lParam) ; 2286 2286 //m_pLog->logMessage(chMessage) ; … … 2417 2417 Ogre::Vector3 Pos ; 2418 2418 Pos=m_pCamera->getPosition() ; 2419 intnCamX=Pos.x ;2420 intnCamY=Pos.y ;2421 intnCamZ=Pos.z ;2419 Ogre::Real nCamX=Pos.x ; 2420 Ogre::Real nCamY=Pos.y ; 2421 Ogre::Real nCamZ=Pos.z ; 2422 2422 2423 2423 … … 2999 2999 // reattach all entity scenenodes. 3000 3000 int nLoop=0 ; 3001 int nSubMesh=0 ;3002 int nMaxSubMesh=0 ;3001 // int nSubMesh=0 ; 3002 // int nMaxSubMesh=0 ; 3003 3003 for(nLoop=0 ; nLoop<m_nMaxEntity ; nLoop++) 3004 3004 m_pSceneMgr->getRootSceneNode()->addChild(m_pEntityInfo[nLoop].pMasterNode) ; … … 3486 3486 3487 3487 int nTriangle=0 ; 3488 int nStart=0 ;3488 // int nStart=0 ; 3489 3489 int nEnd=0 ; 3490 3490 int nMaterial=0 ; … … 3553 3553 float flMaxY=0.0f ; 3554 3554 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 ; 3558 3558 float flDisX=0.0f ; 3559 3559 float flDisY=0.0f ; … … 5629 5629 5630 5630 int nZone=0 ; 5631 int nZoneIndex=0 ;5631 // int nZoneIndex=0 ; 5632 5632 int nSubZone=0 ; 5633 int nSubZoneIndex=0 ;5633 // int nSubZoneIndex=0 ; 5634 5634 int nMaxSubZone=0 ; 5635 5635 int nPortal=0 ; 5636 int nPortalIndex=0 ;5636 // int nPortalIndex=0 ; 5637 5637 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 ; 5642 5642 5643 5643 … … 5645 5645 int nLt=0 ; 5646 5646 5647 int nMaxSubLight=m_Q3Map->m_nSubLightMax ;5647 // int nMaxSubLight=m_Q3Map->m_nSubLightMax ; 5648 5648 int nSubLt=0 ; 5649 5649 … … 5891 5891 int nSubLight=0 ; 5892 5892 5893 int nLight=0;5893 // int nLight=0; 5894 5894 int nLightIndex=0 ; 5895 5895 … … 6048 6048 int nZone=0 ; 6049 6049 int nZoneIndex=0 ; 6050 int nVisible=0 ;6050 // int nVisible=0 ; 6051 6051 Ogre::AxisAlignedBox AABB ; 6052 6052 … … 6384 6384 int nLight=0 ; 6385 6385 int nLightIndex=0 ; 6386 int nLightVal=0 ;6386 // int nLightVal=0 ; 6387 6387 int nOpenPortals=0 ; 6388 int nZoneHasOpenPortals=0 ;6388 // int nZoneHasOpenPortals=0 ; 6389 6389 int nPortal=0 ; 6390 6390 int nPortalIndex=0 ; 6391 6391 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 ; 6395 6395 6396 6396 int nSubLightMax=0 ; 6397 int nSubLightIndex=0 ;6397 // int nSubLightIndex=0 ; 6398 6398 int nSubLight=0 ; 6399 6399 int nSubLightStart=0 ; … … 6401 6401 int nPortalLightMax=0 ; 6402 6402 int nPortalLightIndex=0 ; 6403 int nPortalLight=0 ;6403 // int nPortalLight=0 ; 6404 6404 6405 6405 int nCentreZone=0 ; … … 6495 6495 6496 6496 int nSubLightMax=0 ; 6497 int nSubLightIndex=0 ;6497 // int nSubLightIndex=0 ; 6498 6498 int nSubLight=0 ; 6499 6499 int nSubLightStart=0 ; … … 6586 6586 int nLight=0; 6587 6587 int nLightVal=0 ; 6588 int nLightIndex=0 ;6589 int nMaxLight=0 ;6588 // int nLightIndex=0 ; 6589 // int nMaxLight=0 ; 6590 6590 6591 6591 int nSubLight=0 ; 6592 6592 int nSubLightIndex=0 ; 6593 6593 int nMaxSubLight=0 ; 6594 int nSubLightVal=0 ;6594 // int nSubLightVal=0 ; 6595 6595 6596 6596 … … 6872 6872 void OgreFramework::initLight() 6873 6873 { 6874 char chMessage[1024] ;6874 // char chMessage[1024] ; 6875 6875 6876 6876 // these lights only have placeholder settings to begin with, since they get moved around and reused thoughout the level. … … 6908 6908 // make sure the config is a string 6909 6909 int nConfigPos=-1 ; 6910 int nPos=0 ;6910 // int nPos=0 ; 6911 6911 int nKeyPos=0 ; 6912 6912 int nValuePos=0 ; … … 6914 6914 char chKey[KVSIZE] ; 6915 6915 char chValue[KVSIZE] ; 6916 float flValue=0.0f;6916 int nValue=0 ; 6917 6917 6918 6918 … … 6967 6967 6968 6968 // convert value string to a float 6969 flValue=atof(chValue) ;6969 nValue=atoi(chValue) ; 6970 6970 6971 6971 // 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) ; 6979 6979 //m_pLog->logMessage(m_chBug); 6980 6980 -
code/branches/fps/src/libraries/tools/bsp/Q3Map.cpp
r6820 r6825 582 582 { 583 583 584 char chMessage[1024] ;584 // char chMessage[1024] ; 585 585 int nError=0 ; 586 586 … … 1046 1046 int Q3Map::ParseEntities(void) 1047 1047 { 1048 char chKey[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator1049 char chValue[MAX_TOKENSIZE+1] ; // +1 to leave room for null terminator1048 // 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 1050 1050 int nPos=0 ; 1051 1051 int nMaxPos=m_BspHeader.Lumps[0].iLength ; … … 1314 1314 int Q3Map::ParseAndAddLight(int* pPos, int nMaxPos) 1315 1315 { 1316 char chMessage[1024] ;1316 // char chMessage[1024] ; 1317 1317 1318 1318 … … 1683 1683 int nPos=0 ; 1684 1684 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 ; 1691 1691 1692 1692 m_nMaxZone=0 ; … … 1762 1762 { 1763 1763 int nCurrentTriangle=0 ; 1764 int nZone=0 ;1764 // int nZone=0 ; 1765 1765 1766 1766 … … 1820 1820 { 1821 1821 int nZone=0 ; 1822 int nSubZone=0 ;1822 // int nSubZone=0 ; 1823 1823 int nPos=0 ; 1824 1824 bool bVertInSubZone=false ; 1825 1825 int nVert=0 ; 1826 1826 bool bTriangleInZone=false ; 1827 int nMaxSubZone=m_iNumSubZones ;1827 // int nMaxSubZone=m_iNumSubZones ; 1828 1828 float flVert[6][3] ; // verts 0, 1, 2 are the original triangle corners, verts 3, 4, 5 are interpolated edge points. 1829 1829 // we need the edge points, since it's possible for all the … … 2378 2378 } 2379 2379 2380 int nInitialTrianglePos=m_nTriangleMax ; // debugging2380 // int nInitialTrianglePos=m_nTriangleMax ; // debugging 2381 2381 2382 2382 // default parameters for all new triangles … … 2503 2503 float flPercent1=1.0f-flPercent0 ; 2504 2504 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]) ; 2509 2509 2510 2510 pVertexAB->position[0]=flPercent0*pVertA->position[0] + flPercent1*pVertB->position[0] ; … … 2606 2606 int nFaceIndex = 0 ; 2607 2607 2608 int nVertex=0 ;2609 int nVertexMax=0 ;2608 // int nVertex=0 ; 2609 // int nVertexMax=0 ; 2610 2610 int nTriangle=0 ; 2611 2611 int nTriangleMax=0 ; 2612 2612 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 ; 2621 2621 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 ; 2627 2627 int *meshverts = m_pMeshVerts ; 2628 2628 … … 2685 2685 { 2686 2686 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 ; 2696 2696 int nMeshVertA=0 ; 2697 2697 int nMeshVertB=0 ; … … 2705 2705 2706 2706 int nVertCount=nFirstVertex ; 2707 int nPatchCount=0 ;2707 // int nPatchCount=0 ; 2708 2708 2709 2709 int* pIndexBuffer=NULL ; … … 2875 2875 float flCentreZ=0.0f ; 2876 2876 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 ; 2889 2889 2890 2890 float flColR=0.0f ; … … 2900 2900 int nTexture=0 ; 2901 2901 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 ; 2905 2905 2906 2906 … … 3002 3002 m_pVertex[ m_pTriangle[nTriangle].VIndex[0] ].texcoord[1][0]=flCentreZ ; 3003 3003 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 ; 3007 3007 3008 3008 m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[0][0]=flCentreX ; … … 3010 3010 m_pVertex[ m_pTriangle[nTriangle].VIndex[1] ].texcoord[1][0]=flCentreZ ; 3011 3011 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 ; 3015 3015 3016 3016 m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[0][0]=flCentreX ; … … 3018 3018 m_pVertex[ m_pTriangle[nTriangle].VIndex[2] ].texcoord[1][0]=flCentreZ ; 3019 3019 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 ; 3023 3023 3024 3024 … … 3061 3061 float flMaxZ=0.0f ; 3062 3062 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 ; 3068 3068 3069 3069 float flColR=0.0f ; … … 3149 3149 Vert_xyz.texcoord[1][0]=flCentreZ ; 3150 3150 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 ; 3154 3154 if(!AddVertex(Vert_xyz)) return 0 ; 3155 3155 … … 3165 3165 Vert_Xyz.texcoord[1][0]=flCentreZ ; 3166 3166 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 ; 3170 3170 if(!AddVertex(Vert_Xyz)) return 0 ; 3171 3171 … … 3180 3180 Vert_xYz.texcoord[1][0]=flCentreZ ; 3181 3181 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 ; 3185 3185 if(!AddVertex(Vert_xYz)) return 0 ; 3186 3186 … … 3195 3195 Vert_XYz.texcoord[1][0]=flCentreZ ; 3196 3196 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 ; 3200 3200 if(!AddVertex(Vert_XYz)) return 0 ; 3201 3201 … … 3212 3212 Vert_xyZ.texcoord[1][0]=flCentreZ ; 3213 3213 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 ; 3217 3217 if(!AddVertex(Vert_xyZ)) return 0 ; 3218 3218 … … 3227 3227 Vert_XyZ.texcoord[1][0]=flCentreZ ; 3228 3228 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 ; 3232 3232 if(!AddVertex(Vert_XyZ)) return 0 ; 3233 3233 … … 3242 3242 Vert_xYZ.texcoord[1][0]=flCentreZ ; 3243 3243 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 ; 3247 3247 if(!AddVertex(Vert_xYZ)) return 0 ; 3248 3248 … … 3257 3257 Vert_XYZ.texcoord[1][0]=flCentreZ ; 3258 3258 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 ; 3262 3262 if(!AddVertex(Vert_XYZ)) return 0 ; 3263 3263 … … 3362 3362 float flMaxZ=0.0f ; 3363 3363 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 ; 3369 3369 3370 3370 float flColR=0.0f ; … … 3451 3451 Vert_L.texcoord[1][0]=flCentreZ ; 3452 3452 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 ; 3456 3456 if(!AddVertex(Vert_L)) return 0 ; 3457 3457 … … 3466 3466 Vert_R.texcoord[1][0]=flCentreZ ; 3467 3467 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 ; 3471 3471 if(!AddVertex(Vert_R)) return 0 ; 3472 3472 … … 3481 3481 Vert_F.texcoord[1][0]=flCentreZ ; 3482 3482 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 ; 3486 3486 if(!AddVertex(Vert_F)) return 0 ; 3487 3487 … … 3496 3496 Vert_B.texcoord[1][0]=flCentreZ ; 3497 3497 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 ; 3501 3501 if(!AddVertex(Vert_B)) return 0 ; 3502 3502 … … 3511 3511 Vert_U.texcoord[1][0]=flCentreZ ; 3512 3512 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 ; 3516 3516 if(!AddVertex(Vert_U)) return 0 ; 3517 3517 … … 3526 3526 Vert_D.texcoord[1][0]=flCentreZ ; 3527 3527 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 ; 3531 3531 if(!AddVertex(Vert_D)) return 0 ; 3532 3532 … … 3606 3606 float flMaxZ=0.0f ; 3607 3607 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 ; 3613 3613 3614 3614 float flColR=0.0f ; … … 3638 3638 float flGlowSize=0.0f ; 3639 3639 3640 char chMessage[1024] ;3640 // char chMessage[1024] ; 3641 3641 3642 3642 … … 3785 3785 Vert_Or.texcoord[1][0]=flCentreZ ; 3786 3786 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 ; 3790 3790 if(!AddVertex(Vert_Or)) return 0 ; 3791 3791 … … 3827 3827 Vert_A0.texcoord[1][0]=flCentreZ ; 3828 3828 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 ; 3832 3832 if(!AddVertex(Vert_A0)) return 0 ; 3833 3833 … … 3856 3856 Vert_A1.texcoord[1][0]=flCentreZ ; 3857 3857 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 ; 3861 3861 if(!AddVertex(Vert_A1)) return 0 ; 3862 3862 … … 3889 3889 Vert_B0.texcoord[1][0]=flCentreZ ; 3890 3890 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 ; 3894 3894 if(!AddVertex(Vert_B0)) return 0 ; 3895 3895 … … 3917 3917 Vert_B1.texcoord[1][0]=flCentreZ ; 3918 3918 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 ; 3922 3922 if(!AddVertex(Vert_B1)) return 0 ; 3923 3923
Note: See TracChangeset
for help on using the changeset viewer.