This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 378 for ps


Ignore:
Timestamp:
06/03/04 03:43:33 (21 years ago)
Author:
janwas
Message:

stripped some headers from deprecated prometheus.h => huge rearrange

Location:
ps/trunk/source
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/graphics/Model.h

    r322 r378  
    99#ifndef _MODEL_H
    1010#define _MODEL_H
     11
     12#include <vector>
    1113
    1214#include "Texture.h"
  • ps/trunk/source/graphics/ObjectManager.cpp

    r375 r378  
    11#include "ObjectManager.h"
    22#include <algorithm>
     3#include "CLogger.h"
    34
    45CObjectManager::CObjectManager() : m_SelectedObject(0)
  • ps/trunk/source/graphics/SkeletonAnimManager.cpp

    r343 r378  
    99#include "res/res.h"
    1010#include "Model.h"
     11#include "CLogger.h"
    1112#include "SkeletonAnimManager.h"
    1213#include <algorithm>
  • ps/trunk/source/graphics/TextureManager.cpp

    r375 r378  
     1#include <algorithm>
    12
    23#include "TextureManager.h"
     
    45#include "ogl.h"
    56#include "res/tex.h"
    6 #ifdef _WIN32
    7 #include <io.h>
    8 #endif
    9 #include <algorithm>
     7#include "CLogger.h"
     8
    109
    1110const char* SupportedTextureFormats[] = { ".png", ".dds", ".tga", ".bmp" };
  • ps/trunk/source/gui/CGUI.cpp

    r375 r378  
    3838#pragma comment(lib, "xerces-c_2.lib")
    3939#endif
     40
     41extern int g_xres, g_yres;
    4042
    4143// TODO Gee: how to draw overlays?
  • ps/trunk/source/gui/IGUIObject.cpp

    r352 r378  
    1212#include <assert.h>
    1313/////
     14
     15extern int g_xres, g_yres;
    1416
    1517using namespace std;
  • ps/trunk/source/lib/sysdep/sysdep.cpp

    r349 r378  
    4646
    4747#endif
     48
     49
     50#ifndef HAVE_C99
     51
     52float fminf(float a, float b)
     53{
     54    return (a < b)? a : b;
     55}
     56
     57float 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  
    55#include "win/win.h"
    66#endif
     7
     8#include "config.h"
    79
    810#ifdef __cplusplus
     
    2022#endif
    2123
     24#ifndef HAVE_C99
     25extern float fminf(float a, float b);
     26extern float fmaxf(float a, float b);
     27#endif
     28
     29
    2230#ifdef __cplusplus
    2331}
  • ps/trunk/source/lib/sysdep/win/win.cpp

    r277 r378  
    189189    // force malloc et al to check the heap every call.
    190190    // slower, but reports errors closer to where they occur.
    191     int flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
     191    uint flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
    192192    flags |= _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_DELAY_FREE_MEM_DF;
    193193    _CrtSetDbgFlag(flags);
  • ps/trunk/source/lib/sysdep/win/wposix.cpp

    r334 r378  
    370370
    371371
    372 void* mmap(void* start, unsigned int len, int prot, int flags, int fd, long offset)
     372void* mmap(void* start, size_t len, int prot, int flags, int fd, off_t offset)
    373373{
    374374    if(!(flags & MAP_FIXED))
     
    414414
    415415
    416 int munmap(void* start, unsigned int /* len */)
     416int munmap(void* start, size_t /* len */)
    417417{
    418418    return UnmapViewOfFile(start) - 1;  /* 0: success; -1: fail */
  • ps/trunk/source/lib/sysdep/win/wposix.h

    r334 r378  
    193193#define MAP_FAILED 0
    194194
    195 extern void* mmap(void* start, unsigned int len, int prot, int flags, int fd, long offset);
    196 extern int munmap(void* start, unsigned int len);
     195extern void* mmap(void* start, size_t len, int prot, int flags, int fd, off_t offset);
     196extern int munmap(void* start, size_t len);
    197197
    198198
  • ps/trunk/source/main.cpp

    r374 r378  
    22#include <cstring>
    33#include <cstdlib>
     4#include <cmath>
     5
    46
    57// Alan: For some reason if this gets included after anything else some
     
    5153bool mouseButtons[5];
    5254
    53 #include <cmath>
     55// Globals
     56int g_xres, g_yres;
     57int g_bpp;
     58int g_freq;
     59
    5460
    5561// flag to disable extended GL extensions until fix found - specifically, crashes
     
    527533
    528534
    529     new CConfig;
     535/// new CConfig;
    530536
    531537//  vfs_mount("gui", "gui", 0);
     
    562568    new CUnitManager;
    563569
    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
    566573    terr_init();
    567574
     
    618625    double time0 = get_time();
    619626
    620     g_Config.Update();
     627//  g_Config.Update();
    621628    while(!quit)
    622629    {
     
    665672#ifndef NO_GUI
    666673    g_GUI.Destroy();
    667     delete CGUI::GetSingletonPtr(); // again, we should have all singleton deletes somewhere
     674    delete CGUI::GetSingletonPtr();
    668675#endif
    669676
    670677    delete &g_ScriptingHost;
    671     delete &g_Config;
     678/// delete &g_Config;
    672679    delete &g_Pathfinder;
    673680    delete &g_EntityManager;
  • ps/trunk/source/maths/MathUtil.h

    r332 r378  
    171171    //
    172172    template <typename T>
    173     PS_RESULT Wrap(T *num,const T &lowerBound, const T &upperBound)
     173    int Wrap(T *num,const T &lowerBound, const T &upperBound)
    174174    {
    175175        if(lowerBound >= upperBound)
    176             return ERRONEOUS_BOUND_ERROR;
     176            return -1;
    177177        else
    178178        {
     
    183183            num += lowerBound;
    184184        }
    185         return PS_OK;
     185        return 0;
    186186    }
    187187
  • ps/trunk/source/ps/CStr.cpp

    r353 r378  
    11#include "CStr.h"
    22#include "Network/Serialization.h"
     3#include <cassert>
    34
    45CStr::CStr()
  • ps/trunk/source/ps/Config.cpp

    r332 r378  
    33// TODO: A few changes from VFS -> CFile usage if required.
    44// TODO: Optimizations, when we've decided what needs to be done.
     5
     6#if 0
    57
    68#include "Config.h"
     
    312314    m_LogFile = LogFile;
    313315}
     316
     317#endif
  • ps/trunk/source/ps/Error.h

    r5 r378  
    2626// Used to specify Null pointers.
    2727const 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
    2842
    2943
  • ps/trunk/source/ps/LogFile.cpp

    r332 r378  
    11// last modified Thursday, May 08, 2003
     2
     3#if 0
    24
    35#include "LogFile.h"
     
    361363    return dateText;   
    362364}
     365
     366#endif
  • ps/trunk/source/ps/NPFont.h

    r301 r378  
    55#include "CStr.h"
    66#include "Texture.h"
     7#include <cassert>
    78
    89/////////////////////////////////////////////////////////////////////////////////////////
  • ps/trunk/source/ps/NPFontManager.cpp

    r246 r378  
    33
    44#include <algorithm>
     5#include <cassert>
    56
    67// the sole instance of the NPFontManager
  • ps/trunk/source/ps/Prometheus.cpp

    r332 r378  
    11#include "Prometheus.h"
    22
    3 // Globals
    4 int g_xres = 800, g_yres = 600;
    5 int g_bpp  = 32;
    6 int g_freq = 60;
    73
    84DEFINE_ERROR(PS_OK, "OK");
  • ps/trunk/source/ps/Prometheus.h

    r353 r378  
    1111
    1212
    13 #include <stdio.h>
    14 #include <math.h>
    15 #include <assert.h>
    16 #include "CLogger.h"
    17 
    18 // Globals
    19 extern int g_xres, g_yres;
    20 extern int g_bpp;
    21 extern int g_freq;
    22 
    23 
    24 // Error handling
    25 
    2613typedef const char * PS_RESULT;
    2714
     
    3320
    3421
    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 interface
    51 #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 
    6022#endif
  • ps/trunk/source/ps/Sound.h

    r5 r378  
    1212*/
    1313
     14#if 0
    1415
    1516-----support pan, volume, and crossfading
     
    162163
    163164#endif
     165
     166
     167#endif
  • ps/trunk/source/ps/XercesErrorHandler.cpp

    r355 r378  
    1414#include <string.h>
    1515#include "Prometheus.h"
     16#include "CLogger.h"
    1617
    1718// Use namespace
  • ps/trunk/source/simulation/BaseEntityCollection.cpp

    r363 r378  
    44#include "ObjectManager.h"
    55#include "Model.h"
     6#include "CLogger.h"
    67
    78void CBaseEntityCollection::loadTemplates()
  • ps/trunk/source/simulation/EntityProperties.cpp

    r357 r378  
    11#include "EntityProperties.h"
     2
     3#include <cassert>
    24
    35CGenericProperty::CGenericProperty()
  • ps/trunk/source/terrain/terrainMain.cpp

    r360 r378  
    4040int mouse_x=50, mouse_y=50;
    4141
     42extern int g_xres, g_yres;
     43
    4244void terr_init()
    4345{
    44     g_Renderer.Open(g_xres,g_yres,g_bpp);
    45 
    4646    SViewPort vp;
    4747    vp.m_X=0;
Note: See TracChangeset for help on using the changeset viewer.