summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
31af7f4)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@48
8a3a26a2-13c4-0310-b231-
cf6edde360e5
#include "iscenegraph.h"
#include "iglrender.h"
#include "iplugin.h"
#include "iscenegraph.h"
#include "iglrender.h"
#include "iplugin.h"
+#include "stream/stringstream.h"
#include "portals.h"
#include "AboutDialog.h"
#include "portals.h"
#include "AboutDialog.h"
#define Q3R_CMD_SHOW_2D "Toggle portals (2D)"
#define Q3R_CMD_OPTIONS "Configure Portal Viewer"
#define Q3R_CMD_SHOW_2D "Toggle portals (2D)"
#define Q3R_CMD_OPTIONS "Configure Portal Viewer"
-static char INIfn[PATH_MAX];
/////////////////////////////////////////////////////////////////////////////
// CPrtViewApp construction
/////////////////////////////////////////////////////////////////////////////
// CPrtViewApp construction
void PrtView_construct()
{
void PrtView_construct()
{
- strcpy(INIfn, GlobalRadiant().getSettingsPath());
- strcat(INIfn, "prtview.ini");
+ StringOutputStream tmp(64);
+ tmp << GlobalRadiant().getSettingsPath() << "prtview.ini";
+ INIfn = tmp.c_str();
portals.show_2d = INIGetInt(RENDER_2D, FALSE) ? true : false;
portals.aa_2d = INIGetInt(AA_2D, FALSE) ? true : false;
portals.show_2d = INIGetInt(RENDER_2D, FALSE) ? true : false;
portals.aa_2d = INIGetInt(AA_2D, FALSE) ? true : false;
- if (read_var (INIfn, CONFIG_SECTION, key, value))
+ if (read_var (INIfn.c_str(), CONFIG_SECTION, key, value))
return atoi (value);
else
return def;
return atoi (value);
else
return def;
sprintf(s, "%d ; %s", val, comment);
else
sprintf(s, "%d", val);
sprintf(s, "%d ; %s", val, comment);
else
sprintf(s, "%d", val);
- save_var (INIfn, CONFIG_SECTION, key, s);
+ save_var (INIfn.c_str(), CONFIG_SECTION, key, s);
-template<typename typename Thunk_>
+template<typename Thunk_>
class CallbackBase
{
void* m_environment;
class CallbackBase
{
void* m_environment;
-template<typename typename Thunk>
+template<typename Thunk>
inline bool operator==(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return self.getEnvironment() == other.getEnvironment() && self.getThunk() == other.getThunk();
}
inline bool operator==(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return self.getEnvironment() == other.getEnvironment() && self.getThunk() == other.getThunk();
}
-template<typename typename Thunk>
+template<typename Thunk>
inline bool operator!=(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return !(self == other);
}
inline bool operator!=(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return !(self == other);
}
-template<typename typename Thunk>
+template<typename Thunk>
inline bool operator<(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return self.getEnvironment() < other.getEnvironment() ||
inline bool operator<(const CallbackBase<Thunk>& self, const CallbackBase<Thunk>& other)
{
return self.getEnvironment() < other.getEnvironment() ||