|
From: julien r. <jul...@us...> - 2005-12-10 23:58:39
|
Update of /cvsroot/epfl/engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19574 Modified Files: doom3level.cc doom3level.h glrenderer.cc main.cc system_linux.cc Log Message: stepslidemove Index: system_linux.cc =================================================================== RCS file: /cvsroot/epfl/engine/system_linux.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** system_linux.cc 7 Dec 2005 22:23:49 -0000 1.2 --- system_linux.cc 10 Dec 2005 23:58:26 -0000 1.3 *************** *** 167,169 **** } ! #endif \ No newline at end of file --- 167,170 ---- } ! #endif ! Index: main.cc =================================================================== RCS file: /cvsroot/epfl/engine/main.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cc 7 Dec 2005 22:23:49 -0000 1.2 --- main.cc 10 Dec 2005 23:58:26 -0000 1.3 *************** *** 138,144 **** //Ouverture de la fenêtre ! pSystem->OpenWindow("tg", 1024, 768); pGLRenderer->InitGL(); ! pGLRenderer->ResizeWindow(1024,768); pMaterialManager->Initialize(); --- 138,146 ---- //Ouverture de la fenêtre ! #define X_RES 1024 ! #define Y_RES 768 ! pSystem->OpenWindow("tg", X_RES, Y_RES); pGLRenderer->InitGL(); ! pGLRenderer->ResizeWindow(X_RES,Y_RES); pMaterialManager->Initialize(); Index: doom3level.h =================================================================== RCS file: /cvsroot/epfl/engine/doom3level.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** doom3level.h 7 Dec 2005 22:23:49 -0000 1.2 --- doom3level.h 10 Dec 2005 23:58:26 -0000 1.3 *************** *** 21,123 **** ----------------------------------------------------------------------------- */ ! #if 0 ! #ifndef TGDOOM3LEVEL_H ! #define TGDOOM3LEVEL_H ! ! #include "defs.h" ! ! class tgMaterial; ! ! class tgDoom3Level ! { ! friend class tgGLRenderer; ! public: ! tgDoom3Level (const char* procname, const char* mapname); ! ~tgDoom3Level(); ! ! ! void MarkVisibleModels (); ! void RenderAreas(tgRenderView* rView); ! protected: ! bool _LoadProc(int file); ! bool _LoadMap(int file); ! int _FindArea(const tgVector3& pos); ! int _FindArea_r(const tgVector3& box, int index); ! void _FindBoxAreas(tgAABoundingBox* box, tgvector<int>& areas); ! void _FindBoxAreas_r(tgAABoundingBox* box, int index, tgvector<int>& areas); ! ! void _RenderArea (const tgFrustum& frustum, int areaNum, int fromArea); ! void _ClassifyModels (); ! ! struct _Surface ! { ! tgstring shaderName; ! int numVertices; ! int numIndexes; ! tgVertice* pVertices; ! int* pIndexes; ! tgMaterial* pMaterial; ! }; ! ! struct _Entity ! { ! /*tgstring sName; ! tgVector3 vOrigin;*/ ! tgmap<tgstring, tgstring> mProps; ! }; ! ! struct _Portal ! { ! int iNumPoints; ! int iPositiveArea; ! int iNegativeArea; ! tgVector3* pPoints; ! ! bool visible; ! }; ! ! struct _Model ! { ! tgstring sName; ! int numSurfaces; ! _Surface* pSurfaces; ! tgAABoundingBox* pBBox; ! bool visible; //utilise par les areas ! ! }; ! ! struct _StaticModel : public _Model ! { ! tgVector3 vOrigin; ! tgvector<int> areas; ! }; ! ! struct _Area : public _Model ! { ! int iNumPortals; ! _Portal** pPortals; // des pointeurs vers les portals auquelles cette area est connectee ! }; ! ! struct _Node ! { ! tgPlane plane; //un child negatif sera une area d'index (-1-child) ! int iPositiveChild; ! int iNegativeChild; ! }; ! ! int iNumStaticModels; ! int iNumEntities; ! int iNumPortals; ! int iNumAreas; ! int iNumNodes; ! _StaticModel* pStaticModels; ! _Entity* pEntities; ! _Portal* pPortals; ! _Area* pAreas; ! _Node* pNodes; ! }; ! ! #endif ! ! ! #endif \ No newline at end of file --- 21,124 ---- ----------------------------------------------------------------------------- */ ! #if 0 ! #ifndef TGDOOM3LEVEL_H ! #define TGDOOM3LEVEL_H ! ! #include "defs.h" ! ! class tgMaterial; ! ! class tgDoom3Level ! { ! friend class tgGLRenderer; ! public: ! tgDoom3Level (const char* procname, const char* mapname); ! ~tgDoom3Level(); ! ! ! void MarkVisibleModels (); ! void RenderAreas(tgRenderView* rView); ! protected: ! bool _LoadProc(int file); ! bool _LoadMap(int file); ! int _FindArea(const tgVector3& pos); ! int _FindArea_r(const tgVector3& box, int index); ! void _FindBoxAreas(tgAABoundingBox* box, tgvector<int>& areas); ! void _FindBoxAreas_r(tgAABoundingBox* box, int index, tgvector<int>& areas); ! ! void _RenderArea (const tgFrustum& frustum, int areaNum, int fromArea); ! void _ClassifyModels (); ! ! struct _Surface ! { ! tgstring shaderName; ! int numVertices; ! int numIndexes; ! tgVertice* pVertices; ! int* pIndexes; ! tgMaterial* pMaterial; ! }; ! ! struct _Entity ! { ! /*tgstring sName; ! tgVector3 vOrigin;*/ ! tgmap<tgstring, tgstring> mProps; ! }; ! ! struct _Portal ! { ! int iNumPoints; ! int iPositiveArea; ! int iNegativeArea; ! tgVector3* pPoints; ! ! bool visible; ! }; ! ! struct _Model ! { ! tgstring sName; ! int numSurfaces; ! _Surface* pSurfaces; ! tgAABoundingBox* pBBox; ! bool visible; //utilise par les areas ! ! }; ! ! struct _StaticModel : public _Model ! { ! tgVector3 vOrigin; ! tgvector<int> areas; ! }; ! ! struct _Area : public _Model ! { ! int iNumPortals; ! _Portal** pPortals; // des pointeurs vers les portals auquelles cette area est connectee ! }; ! ! struct _Node ! { ! tgPlane plane; //un child negatif sera une area d'index (-1-child) ! int iPositiveChild; ! int iNegativeChild; ! }; ! ! int iNumStaticModels; ! int iNumEntities; ! int iNumPortals; ! int iNumAreas; ! int iNumNodes; ! _StaticModel* pStaticModels; ! _Entity* pEntities; ! _Portal* pPortals; ! _Area* pAreas; ! _Node* pNodes; ! }; ! ! #endif ! ! ! #endif ! Index: glrenderer.cc =================================================================== RCS file: /cvsroot/epfl/engine/glrenderer.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** glrenderer.cc 7 Dec 2005 22:23:49 -0000 1.3 --- glrenderer.cc 10 Dec 2005 23:58:26 -0000 1.4 *************** *** 21,835 **** ----------------------------------------------------------------------------- */ ! #include "glrenderer.h" ! #include "defs.h" ! ! tgGLRenderer::tgGLRenderer () ! { ! pRenderView = NULL; ! } ! [...1601 lines suppressed...] ! } ! ! //Opengl Extensions ! /*bool IsExtensionSupported(const char *extstring) ! { ! char *s = (char*) glGetString(GL_EXTENSIONS); ! char *temp = strstr(s, extstring); ! return temp != NULL; ! } ! ! bool tgSystemWin32::GetProcAdresses() ! { ! tgglMultiTexCoord2f = (PFNGLMULTITEXCOORD2FARBPROC)wglGetProcAddress ("glMultiTexCoord2fARB"); ! tgglClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREARBPROC)wglGetProcAddress ("glClientActiveTextureARB"); ! tgglActiveTexture = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress ("glActiveTextureARB"); ! if(tgglMultiTexCoord2f == NULL || tgglClientActiveTexture == NULL || tgglActiveTexture == NULL) ! return false; ! return true; ! }*/ Index: doom3level.cc =================================================================== RCS file: /cvsroot/epfl/engine/doom3level.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** doom3level.cc 7 Dec 2005 22:23:49 -0000 1.2 --- doom3level.cc 10 Dec 2005 23:58:26 -0000 1.3 *************** *** 21,534 **** ----------------------------------------------------------------------------- */ ! #if 0 ! #include "doom3level.h" ! ! tgDoom3Level::tgDoom3Level(const char* procname, const char* mapname) ! { ! int file = pFileManager->Open(mapname, TGFILE_TEXT); ! _LoadMap(file); ! pFileManager->Close(file); [...1001 lines suppressed...] ! ! int tgDoom3Level::_FindArea_r(const tgVector3& pos, int index) ! { ! const _Node& node = pNodes[index]; ! int side = node.plane.ClassifyPoint(pos); ! if (side == POINT_IN_FRONT_OF_PLANE) ! index = node.iPositiveChild; ! else ! index = node.iNegativeChild; ! ! if (index <= 0) ! return ~index; ! ! return _FindArea_r(pos, index); ! } ! ! ! ! #endif ! |