- Timestamp:
- 06/03/04 03:43:33 (21 years ago)
- Location:
- ps/trunk/source
- Files:
-
- 26 edited
-
graphics/Model.h (modified) (1 diff)
-
graphics/ObjectManager.cpp (modified) (1 diff)
-
graphics/SkeletonAnimManager.cpp (modified) (1 diff)
-
graphics/TextureManager.cpp (modified) (2 diffs)
-
gui/CGUI.cpp (modified) (1 diff)
-
gui/IGUIObject.cpp (modified) (1 diff)
-
lib/sysdep/sysdep.cpp (modified) (1 diff)
-
lib/sysdep/sysdep.h (modified) (2 diffs)
-
lib/sysdep/win/win.cpp (modified) (1 diff)
-
lib/sysdep/win/wposix.cpp (modified) (2 diffs)
-
lib/sysdep/win/wposix.h (modified) (1 diff)
-
main.cpp (modified) (6 diffs)
-
maths/MathUtil.h (modified) (2 diffs)
-
ps/CStr.cpp (modified) (1 diff)
-
ps/Config.cpp (modified) (2 diffs)
-
ps/Error.h (modified) (1 diff)
-
ps/LogFile.cpp (modified) (2 diffs)
-
ps/NPFont.h (modified) (1 diff)
-
ps/NPFontManager.cpp (modified) (1 diff)
-
ps/Prometheus.cpp (modified) (1 diff)
-
ps/Prometheus.h (modified) (2 diffs)
-
ps/Sound.h (modified) (2 diffs)
-
ps/XercesErrorHandler.cpp (modified) (1 diff)
-
simulation/BaseEntityCollection.cpp (modified) (1 diff)
-
simulation/EntityProperties.cpp (modified) (1 diff)
-
terrain/terrainMain.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/graphics/Model.h
r322 r378 9 9 #ifndef _MODEL_H 10 10 #define _MODEL_H 11 12 #include <vector> 11 13 12 14 #include "Texture.h" -
ps/trunk/source/graphics/ObjectManager.cpp
r375 r378 1 1 #include "ObjectManager.h" 2 2 #include <algorithm> 3 #include "CLogger.h" 3 4 4 5 CObjectManager::CObjectManager() : m_SelectedObject(0) -
ps/trunk/source/graphics/SkeletonAnimManager.cpp
r343 r378 9 9 #include "res/res.h" 10 10 #include "Model.h" 11 #include "CLogger.h" 11 12 #include "SkeletonAnimManager.h" 12 13 #include <algorithm> -
ps/trunk/source/graphics/TextureManager.cpp
r375 r378 1 #include <algorithm> 1 2 2 3 #include "TextureManager.h" … … 4 5 #include "ogl.h" 5 6 #include "res/tex.h" 6 #ifdef _WIN32 7 #include <io.h> 8 #endif 9 #include <algorithm> 7 #include "CLogger.h" 8 10 9 11 10 const char* SupportedTextureFormats[] = { ".png", ".dds", ".tga", ".bmp" }; -
ps/trunk/source/gui/CGUI.cpp
r375 r378 38 38 #pragma comment(lib, "xerces-c_2.lib") 39 39 #endif 40 41 extern int g_xres, g_yres; 40 42 41 43 // TODO Gee: how to draw overlays? -
ps/trunk/source/gui/IGUIObject.cpp
r352 r378 12 12 #include <assert.h> 13 13 ///// 14 15 extern int g_xres, g_yres; 14 16 15 17 using namespace std; -
ps/trunk/source/lib/sysdep/sysdep.cpp
r349 r378 46 46 47 47 #endif 48 49 50 #ifndef HAVE_C99 51 52 float fminf(float a, float b) 53 { 54 return (a < b)? a : b; 55 } 56 57 float fmaxf(float a, float b) 58 { 59 return (a > b)? a : b; 60 } 61 62 #endif -
ps/trunk/source/lib/sysdep/sysdep.h
r349 r378 5 5 #include "win/win.h" 6 6 #endif 7 8 #include "config.h" 7 9 8 10 #ifdef __cplusplus … … 20 22 #endif 21 23 24 #ifndef HAVE_C99 25 extern float fminf(float a, float b); 26 extern float fmaxf(float a, float b); 27 #endif 28 29 22 30 #ifdef __cplusplus 23 31 } -
ps/trunk/source/lib/sysdep/win/win.cpp
r277 r378 189 189 // force malloc et al to check the heap every call. 190 190 // slower, but reports errors closer to where they occur. 191 int flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);191 uint flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); 192 192 flags |= _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_DELAY_FREE_MEM_DF; 193 193 _CrtSetDbgFlag(flags); -
ps/trunk/source/lib/sysdep/win/wposix.cpp
r334 r378 370 370 371 371 372 void* mmap(void* start, unsigned int len, int prot, int flags, int fd, longoffset)372 void* mmap(void* start, size_t len, int prot, int flags, int fd, off_t offset) 373 373 { 374 374 if(!(flags & MAP_FIXED)) … … 414 414 415 415 416 int munmap(void* start, unsigned int /* len */)416 int munmap(void* start, size_t /* len */) 417 417 { 418 418 return UnmapViewOfFile(start) - 1; /* 0: success; -1: fail */ -
ps/trunk/source/lib/sysdep/win/wposix.h
r334 r378 193 193 #define MAP_FAILED 0 194 194 195 extern void* mmap(void* start, unsigned int len, int prot, int flags, int fd, longoffset);196 extern int munmap(void* start, unsigned int len);195 extern void* mmap(void* start, size_t len, int prot, int flags, int fd, off_t offset); 196 extern int munmap(void* start, size_t len); 197 197 198 198 -
ps/trunk/source/main.cpp
r374 r378 2 2 #include <cstring> 3 3 #include <cstdlib> 4 #include <cmath> 5 4 6 5 7 // Alan: For some reason if this gets included after anything else some … … 51 53 bool mouseButtons[5]; 52 54 53 #include <cmath> 55 // Globals 56 int g_xres, g_yres; 57 int g_bpp; 58 int g_freq; 59 54 60 55 61 // flag to disable extended GL extensions until fix found - specifically, crashes … … 527 533 528 534 529 new CConfig;535 /// new CConfig; 530 536 531 537 // vfs_mount("gui", "gui", 0); … … 562 568 new CUnitManager; 563 569 564 // terr_init actually opens the renderer and loads a bunch of resources as well as setting up 565 // the terrain 570 g_Renderer.Open(g_xres,g_yres,g_bpp); 571 572 // terr_init loads a bunch of resources as well as setting up the terrain 566 573 terr_init(); 567 574 … … 618 625 double time0 = get_time(); 619 626 620 g_Config.Update();627 // g_Config.Update(); 621 628 while(!quit) 622 629 { … … 665 672 #ifndef NO_GUI 666 673 g_GUI.Destroy(); 667 delete CGUI::GetSingletonPtr(); // again, we should have all singleton deletes somewhere674 delete CGUI::GetSingletonPtr(); 668 675 #endif 669 676 670 677 delete &g_ScriptingHost; 671 delete &g_Config;678 /// delete &g_Config; 672 679 delete &g_Pathfinder; 673 680 delete &g_EntityManager; -
ps/trunk/source/maths/MathUtil.h
r332 r378 171 171 // 172 172 template <typename T> 173 PS_RESULTWrap(T *num,const T &lowerBound, const T &upperBound)173 int Wrap(T *num,const T &lowerBound, const T &upperBound) 174 174 { 175 175 if(lowerBound >= upperBound) 176 return ERRONEOUS_BOUND_ERROR;176 return -1; 177 177 else 178 178 { … … 183 183 num += lowerBound; 184 184 } 185 return PS_OK;185 return 0; 186 186 } 187 187 -
ps/trunk/source/ps/CStr.cpp
r353 r378 1 1 #include "CStr.h" 2 2 #include "Network/Serialization.h" 3 #include <cassert> 3 4 4 5 CStr::CStr() -
ps/trunk/source/ps/Config.cpp
r332 r378 3 3 // TODO: A few changes from VFS -> CFile usage if required. 4 4 // TODO: Optimizations, when we've decided what needs to be done. 5 6 #if 0 5 7 6 8 #include "Config.h" … … 312 314 m_LogFile = LogFile; 313 315 } 316 317 #endif -
ps/trunk/source/ps/Error.h
r5 r378 26 26 // Used to specify Null pointers. 27 27 const int NullPtr = 0; 28 29 30 31 // Setup error interface 32 #define IsError() GError.ErrorMechanism_Error() 33 #define ClearError() GError.ErrorMechanism_ClearError() 34 #define TestError(TError) GError.ErrorMechanism_TestError(TError) 35 36 #define SetError_Short(w,x) GError.ErrorMechanism_SetError(w,x,__FILE__,__LINE__) 37 #define SetError_Long(w,x,y,z) GError.ErrorMechanism_SetError(w,x,y,z) 38 39 #define GetError() GError.ErrorMechanism_GetError() 40 41 28 42 29 43 -
ps/trunk/source/ps/LogFile.cpp
r332 r378 1 1 // last modified Thursday, May 08, 2003 2 3 #if 0 2 4 3 5 #include "LogFile.h" … … 361 363 return dateText; 362 364 } 365 366 #endif -
ps/trunk/source/ps/NPFont.h
r301 r378 5 5 #include "CStr.h" 6 6 #include "Texture.h" 7 #include <cassert> 7 8 8 9 ///////////////////////////////////////////////////////////////////////////////////////// -
ps/trunk/source/ps/NPFontManager.cpp
r246 r378 3 3 4 4 #include <algorithm> 5 #include <cassert> 5 6 6 7 // the sole instance of the NPFontManager -
ps/trunk/source/ps/Prometheus.cpp
r332 r378 1 1 #include "Prometheus.h" 2 2 3 // Globals4 int g_xres = 800, g_yres = 600;5 int g_bpp = 32;6 int g_freq = 60;7 3 8 4 DEFINE_ERROR(PS_OK, "OK"); -
ps/trunk/source/ps/Prometheus.h
r353 r378 11 11 12 12 13 #include <stdio.h>14 #include <math.h>15 #include <assert.h>16 #include "CLogger.h"17 18 // Globals19 extern int g_xres, g_yres;20 extern int g_bpp;21 extern int g_freq;22 23 24 // Error handling25 26 13 typedef const char * PS_RESULT; 27 14 … … 33 20 34 21 35 /*36 inline bool ErrorMechanism_Error();37 inline void ErrorMechanism_ClearError();38 inline bool ErrorMechanism_TestError( PS_RESULT);39 40 inline void ErrorMechanism_SetError(41 PS_RESULT,42 std::string,43 std::string,44 unsigned int);45 46 inline CError ErrorMechanism_GetError();47 */48 49 50 // Setup error interface51 #define IsError() GError.ErrorMechanism_Error()52 #define ClearError() GError.ErrorMechanism_ClearError()53 #define TestError(TError) GError.ErrorMechanism_TestError(TError)54 55 #define SetError_Short(w,x) GError.ErrorMechanism_SetError(w,x,__FILE__,__LINE__)56 #define SetError_Long(w,x,y,z) GError.ErrorMechanism_SetError(w,x,y,z)57 58 #define GetError() GError.ErrorMechanism_GetError()59 60 22 #endif -
ps/trunk/source/ps/Sound.h
r5 r378 12 12 */ 13 13 14 #if 0 14 15 15 16 -----support pan, volume, and crossfading … … 162 163 163 164 #endif 165 166 167 #endif -
ps/trunk/source/ps/XercesErrorHandler.cpp
r355 r378 14 14 #include <string.h> 15 15 #include "Prometheus.h" 16 #include "CLogger.h" 16 17 17 18 // Use namespace -
ps/trunk/source/simulation/BaseEntityCollection.cpp
r363 r378 4 4 #include "ObjectManager.h" 5 5 #include "Model.h" 6 #include "CLogger.h" 6 7 7 8 void CBaseEntityCollection::loadTemplates() -
ps/trunk/source/simulation/EntityProperties.cpp
r357 r378 1 1 #include "EntityProperties.h" 2 3 #include <cassert> 2 4 3 5 CGenericProperty::CGenericProperty() -
ps/trunk/source/terrain/terrainMain.cpp
r360 r378 40 40 int mouse_x=50, mouse_y=50; 41 41 42 extern int g_xres, g_yres; 43 42 44 void terr_init() 43 45 { 44 g_Renderer.Open(g_xres,g_yres,g_bpp);45 46 46 SViewPort vp; 47 47 vp.m_X=0;
Note:
See TracChangeset
for help on using the changeset viewer.
