More style fixes
parent
3b585d9f51
commit
7d8b56d9ab
|
@ -403,12 +403,16 @@ bool CApplication::Create()
|
||||||
defaultValues = true;
|
defaultValues = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetConfigFile().GetStringProperty("Language", "Lang", path)) {
|
if (GetConfigFile().GetStringProperty("Language", "Lang", path))
|
||||||
|
{
|
||||||
Language language;
|
Language language;
|
||||||
if (ParseLanguage(path, language)) {
|
if (ParseLanguage(path, language))
|
||||||
|
{
|
||||||
m_language = language;
|
m_language = language;
|
||||||
GetLogger()->Info("Setting language '%s' from ini file\n", path.c_str());
|
GetLogger()->Info("Setting language '%s' from ini file\n", path.c_str());
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
GetLogger()->Error("Invalid language '%s' in ini file\n", path.c_str());
|
GetLogger()->Error("Invalid language '%s' in ini file\n", path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,14 +491,17 @@ bool CApplication::Create()
|
||||||
std::getline(resolution, ws, 'x');
|
std::getline(resolution, ws, 'x');
|
||||||
std::getline(resolution, hs, 'x');
|
std::getline(resolution, hs, 'x');
|
||||||
int w = 800, h = 600;
|
int w = 800, h = 600;
|
||||||
if (!ws.empty() && !hs.empty()) {
|
if (!ws.empty() && !hs.empty())
|
||||||
|
{
|
||||||
w = atoi(ws.c_str());
|
w = atoi(ws.c_str());
|
||||||
h = atoi(hs.c_str());
|
h = atoi(hs.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why not just set m_deviceConfig.size to w,h? Because this way if the resolution is no longer supported (e.g. changimg monitor) defaults will be used instead
|
// Why not just set m_deviceConfig.size to w,h? Because this way if the resolution is no longer supported (e.g. changimg monitor) defaults will be used instead
|
||||||
for(auto it = modes.begin(); it != modes.end(); ++it) {
|
for (auto it = modes.begin(); it != modes.end(); ++it)
|
||||||
if (it->x == w && it->y == h) {
|
{
|
||||||
|
if (it->x == w && it->y == h)
|
||||||
|
{
|
||||||
m_deviceConfig.size = *it;
|
m_deviceConfig.size = *it;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,8 @@ class CInput;
|
||||||
class CObjectManager;
|
class CObjectManager;
|
||||||
class CPathManager;
|
class CPathManager;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CModelManager;
|
class CModelManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
class CApplication;
|
class CApplication;
|
||||||
class CRobotMain;
|
class CRobotMain;
|
||||||
struct Event;
|
struct Event;
|
||||||
namespace Ui {
|
namespace Ui
|
||||||
|
{
|
||||||
class CMainDialog;
|
class CMainDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,8 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
|
||||||
logger.Info("%s starting\n", COLOBOT_FULLNAME);
|
logger.Info("%s starting\n", COLOBOT_FULLNAME);
|
||||||
|
|
||||||
int code = 0;
|
int code = 0;
|
||||||
while(true) {
|
while (true)
|
||||||
|
{
|
||||||
CSystemUtils* systemUtils = CSystemUtils::Create(); // platform-specific utils
|
CSystemUtils* systemUtils = CSystemUtils::Create(); // platform-specific utils
|
||||||
systemUtils->Init();
|
systemUtils->Init();
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
enum PauseType {
|
enum PauseType
|
||||||
|
{
|
||||||
PAUSE_NONE = 0,
|
PAUSE_NONE = 0,
|
||||||
PAUSE_USER,
|
PAUSE_USER,
|
||||||
PAUSE_SATCOM,
|
PAUSE_SATCOM,
|
||||||
|
|
|
@ -435,14 +435,15 @@ bool CImage::SavePNG(const std::string& fileName)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CImage::SetDataPixels(void *pixels){
|
void CImage::SetDataPixels(void *pixels)
|
||||||
|
{
|
||||||
Uint8* srcPixels = static_cast<Uint8*> (pixels);
|
Uint8* srcPixels = static_cast<Uint8*> (pixels);
|
||||||
Uint8* resultPixels = static_cast<Uint8*> (m_data->surface->pixels);
|
Uint8* resultPixels = static_cast<Uint8*> (m_data->surface->pixels);
|
||||||
|
|
||||||
Uint32 pitch = m_data->surface->pitch;
|
Uint32 pitch = m_data->surface->pitch;
|
||||||
|
|
||||||
for(int line = 0; line < m_data->surface->h; ++line) {
|
for (int line = 0; line < m_data->surface->h; ++line)
|
||||||
|
{
|
||||||
Uint32 pos = line * pitch;
|
Uint32 pos = line * pitch;
|
||||||
memcpy(&resultPixels[pos], &srcPixels[pos], pitch);
|
memcpy(&resultPixels[pos], &srcPixels[pos], pitch);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace IOUtils {
|
namespace IOUtils
|
||||||
|
{
|
||||||
|
|
||||||
//! Writes a binary number to output stream
|
//! Writes a binary number to output stream
|
||||||
/**
|
/**
|
||||||
|
@ -148,5 +149,5 @@ std::string ReadBinaryString(std::istream &istr)
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace IOUtils
|
} // namespace IOUtils
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,8 @@ void CPathManager::InitPaths()
|
||||||
|
|
||||||
void CPathManager::LoadModsFromDir(const std::string &dir)
|
void CPathManager::LoadModsFromDir(const std::string &dir)
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
boost::filesystem::directory_iterator iterator(CSystemUtilsWindows::UTF8_Decode(dir));
|
boost::filesystem::directory_iterator iterator(CSystemUtilsWindows::UTF8_Decode(dir));
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
#include <boost/regex.hpp>
|
#include <boost/regex.hpp>
|
||||||
|
|
||||||
namespace RegexUtils {
|
namespace RegexUtils
|
||||||
|
{
|
||||||
|
|
||||||
class AssertRegexMatchError : public std::runtime_error
|
class AssertRegexMatchError : public std::runtime_error
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,8 @@ std::streambuf::int_type COutputStreamBuffer::overflow(std::streambuf::int_type
|
||||||
|
|
||||||
pbump(-bytes_written);
|
pbump(-bytes_written);
|
||||||
// write final char
|
// write final char
|
||||||
if (ch != traits_type::eof()) {
|
if (ch != traits_type::eof())
|
||||||
|
{
|
||||||
bytes_written = PHYSFS_write(m_file, &ch, 1, 1);
|
bytes_written = PHYSFS_write(m_file, &ch, 1, 1);
|
||||||
if (bytes_written <= 0)
|
if (bytes_written <= 0)
|
||||||
return traits_type::eof();
|
return traits_type::eof();
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
namespace StrUtils {
|
namespace StrUtils
|
||||||
|
{
|
||||||
|
|
||||||
//! Converts a value to string
|
//! Converts a value to string
|
||||||
/** If given, \a ok is set to true/false on success/failure.
|
/** If given, \a ok is set to true/false on success/failure.
|
||||||
|
@ -83,5 +84,5 @@ int Utf8CharSizeAt(const std::string &str, unsigned int pos);
|
||||||
//! Returns the length in characters of UTF-8 string \a str
|
//! Returns the length in characters of UTF-8 string \a str
|
||||||
size_t Utf8StringLength(const std::string &str);
|
size_t Utf8StringLength(const std::string &str);
|
||||||
|
|
||||||
}; // namespace StrUtil
|
} // namespace StrUtil
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
ColorHSV RGB2HSV(Color color)
|
ColorHSV RGB2HSV(Color color)
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct Color
|
* \struct Color
|
||||||
|
|
|
@ -43,7 +43,8 @@ struct ImageData;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct DeviceConfig
|
* \struct DeviceConfig
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#include "graphics/core/framebuffer.h"
|
#include "graphics/core/framebuffer.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CDefaultFramebuffer::CDefaultFramebuffer(const FramebufferParams& params)
|
CDefaultFramebuffer::CDefaultFramebuffer(const FramebufferParams& params)
|
||||||
: m_width(params.width), m_height(params.height), m_depth(params.depth)
|
: m_width(params.width), m_height(params.height), m_depth(params.depth)
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct FramebufferParams
|
* \struct FramebufferParams
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \enum LightType
|
* \enum LightType
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct Material
|
* \struct Material
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CNullDevice::CNullDevice()
|
CNullDevice::CNullDevice()
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
#include "graphics/core/device.h"
|
#include "graphics/core/device.h"
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CNullDevice
|
* \class CNullDevice
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -252,11 +253,12 @@ enum TexGenMode
|
||||||
*/
|
*/
|
||||||
struct TextureGenerationParams
|
struct TextureGenerationParams
|
||||||
{
|
{
|
||||||
struct
|
struct Coord
|
||||||
{
|
{
|
||||||
TexGenMode mode;
|
TexGenMode mode;
|
||||||
float plane[4];
|
float plane[4];
|
||||||
} coords[4];
|
};
|
||||||
|
Coord coords[4];
|
||||||
|
|
||||||
TextureGenerationParams()
|
TextureGenerationParams()
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
//! Changes the level of transparency of an object and objects transported (battery & cargo)
|
//! Changes the level of transparency of an object and objects transported (battery & cargo)
|
||||||
|
@ -170,7 +171,8 @@ void CCamera::SetBlood(bool enable)
|
||||||
m_blood = enable;
|
m_blood = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCamera::GetBlood() {
|
bool CCamera::GetBlood()
|
||||||
|
{
|
||||||
return m_blood;
|
return m_blood;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ class CInput;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,7 +131,8 @@ enum CameraOverEffect
|
||||||
\brief Camera moving in 3D scene
|
\brief Camera moving in 3D scene
|
||||||
|
|
||||||
... */
|
... */
|
||||||
class CCamera {
|
class CCamera
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
CCamera();
|
CCamera();
|
||||||
~CCamera();
|
~CCamera();
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
const int CLOUD_LINE_PREALLOCATE_COUNT = 100;
|
const int CLOUD_LINE_PREALLOCATE_COUNT = 100;
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
|
|
@ -55,7 +55,8 @@
|
||||||
template<> Gfx::CEngine* CSingleton<Gfx::CEngine>::m_instance = nullptr;
|
template<> Gfx::CEngine* CSingleton<Gfx::CEngine>::m_instance = nullptr;
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CEngine::CEngine(CApplication *app)
|
CEngine::CEngine(CApplication *app)
|
||||||
{
|
{
|
||||||
|
@ -4514,7 +4515,8 @@ void CEngine::DrawBackgroundImage()
|
||||||
Math::Point scale;
|
Math::Point scale;
|
||||||
scale.x = static_cast<float>(m_size.x) / static_cast<float>(m_backgroundTex.originalSize.x);
|
scale.x = static_cast<float>(m_size.x) / static_cast<float>(m_backgroundTex.originalSize.x);
|
||||||
scale.y = static_cast<float>(m_size.y) / static_cast<float>(m_backgroundTex.originalSize.y);
|
scale.y = static_cast<float>(m_size.y) / static_cast<float>(m_backgroundTex.originalSize.y);
|
||||||
if (scale.x > scale.y) {
|
if (scale.x > scale.y)
|
||||||
|
{
|
||||||
scale.y /= scale.x;
|
scale.y /= scale.x;
|
||||||
scale.x = 1;
|
scale.x = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,8 @@ struct Event;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
class CDevice;
|
class CDevice;
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
void LightProgression::Init(float value)
|
void LightProgression::Init(float value)
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct LightProgression
|
* \struct LightProgression
|
||||||
|
@ -236,5 +237,5 @@ protected:
|
||||||
std::vector<int> m_lightMap;
|
std::vector<int> m_lightMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
CLightning::CLightning(CEngine* engine)
|
CLightning::CLightning(CEngine* engine)
|
||||||
|
|
|
@ -35,7 +35,8 @@ class CSoundInterface;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
COldModelManager::COldModelManager(CEngine* engine)
|
COldModelManager::COldModelManager(CEngine* engine)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CModelFile;
|
class CModelFile;
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
const float FOG_HSUP = 10.0f;
|
const float FOG_HSUP = 10.0f;
|
||||||
|
|
|
@ -36,7 +36,8 @@ class CSoundInterface;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
const short MAXPARTICULE = 500;
|
const short MAXPARTICULE = 500;
|
||||||
const short MAXPARTITYPE = 5;
|
const short MAXPARTITYPE = 5;
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
const int PLANET_PREALLOCATE_COUNT = 10;
|
const int PLANET_PREALLOCATE_COUNT = 10;
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
CPyro::CPyro()
|
CPyro::CPyro()
|
||||||
|
|
|
@ -43,7 +43,8 @@ class CSoundInterface;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
#include "graphics/engine/pyro.h"
|
#include "graphics/engine/pyro.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
Gfx::CPyroManager::CPyroManager()
|
Gfx::CPyroManager::CPyroManager()
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
struct Event;
|
struct Event;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CPyro;
|
class CPyro;
|
||||||
using CPyroUPtr = std::unique_ptr<CPyro>;
|
using CPyroUPtr = std::unique_ptr<CPyro>;
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \enum PyroType
|
* \enum PyroType
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
CTerrain::CTerrain()
|
CTerrain::CTerrain()
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CWater;
|
class CWater;
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CDevice;
|
class CDevice;
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
const int WATERLINE_PREALLOCATE_COUNT = 500;
|
const int WATERLINE_PREALLOCATE_COUNT = 500;
|
||||||
|
|
|
@ -34,7 +34,8 @@ class CSoundInterface;
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
#include "common/logger.h"
|
#include "common/logger.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
int CModel::GetMeshCount() const
|
int CModel::GetMeshCount() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CModel
|
* \class CModel
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
|
|
||||||
#include "math/vector.h"
|
#include "math/vector.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct ModelCrashSphere
|
* \struct ModelCrashSphere
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \enum ModelFormat
|
* \enum ModelFormat
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
// Private functions
|
// Private functions
|
||||||
namespace ModelInput
|
namespace ModelInput
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \namespace ModelInput
|
* \namespace ModelInput
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CModelIOException : public std::runtime_error
|
class CModelIOException : public std::runtime_error
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
Deprecated enums/magic values
|
Deprecated enums/magic values
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
#include "graphics/model/model_input.h"
|
#include "graphics/model/model_input.h"
|
||||||
#include "graphics/model/model_io_exception.h"
|
#include "graphics/model/model_io_exception.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CModel& CModelManager::GetModel(const std::string& modelName)
|
CModel& CModelManager::GetModel(const std::string& modelName)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CModelManager
|
* \class CModelManager
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
|
|
||||||
#include "graphics/model/model_mesh.h"
|
#include "graphics/model/model_mesh.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
void CModelMesh::AddTriangle(const ModelTriangle& triangle)
|
void CModelMesh::AddTriangle(const ModelTriangle& triangle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
struct ModelTriangle;
|
struct ModelTriangle;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
// Private functions
|
// Private functions
|
||||||
namespace ModelOutput
|
namespace ModelOutput
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CModel;
|
class CModel;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct ModelShadowSpot
|
* \struct ModelShadowSpot
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
#include "graphics/core/color.h"
|
#include "graphics/core/color.h"
|
||||||
#include "graphics/core/vertex.h"
|
#include "graphics/core/vertex.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \enum ModelSpecialMark
|
* \enum ModelSpecialMark
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CGL21Device::CGL21Device(const DeviceConfig &config)
|
CGL21Device::CGL21Device(const DeviceConfig &config)
|
||||||
{
|
{
|
||||||
|
@ -710,7 +711,8 @@ Texture CGL21Device::CreateTexture(ImageData *data, const TextureCreateParams &p
|
||||||
convert = true;
|
convert = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
GetLogger()->Error("Unknown data surface format");
|
GetLogger()->Error("Unknown data surface format");
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
@ -1710,8 +1712,8 @@ void CGL21Device::CopyFramebufferToTexture(Texture& texture, int xOffset, int yO
|
||||||
glBindTexture(GL_TEXTURE_2D, m_currentTextures[0].id);
|
glBindTexture(GL_TEXTURE_2D, m_currentTextures[0].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CGL21Device::GetFrameBufferPixels()const{
|
void* CGL21Device::GetFrameBufferPixels()const
|
||||||
|
{
|
||||||
GLubyte* pixels = new GLubyte[4 * m_config.size.x * m_config.size.y];
|
GLubyte* pixels = new GLubyte[4 * m_config.size.x * m_config.size.y];
|
||||||
|
|
||||||
glReadPixels(0, 0, m_config.size.x, m_config.size.y, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
glReadPixels(0, 0, m_config.size.x, m_config.size.y, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
struct GLDevicePrivate;
|
struct GLDevicePrivate;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CGL33Device::CGL33Device(const DeviceConfig &config)
|
CGL33Device::CGL33Device(const DeviceConfig &config)
|
||||||
{
|
{
|
||||||
|
@ -736,7 +737,8 @@ Texture CGL33Device::CreateTexture(ImageData *data, const TextureCreateParams &p
|
||||||
convert = true;
|
convert = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
GetLogger()->Error("Unknown data surface format");
|
GetLogger()->Error("Unknown data surface format");
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class CGL33Device
|
\class CGL33Device
|
||||||
|
@ -304,7 +305,7 @@ private:
|
||||||
//! Specular color
|
//! Specular color
|
||||||
GLint uni_SpecularColor;
|
GLint uni_SpecularColor;
|
||||||
|
|
||||||
struct
|
struct LightUniforms
|
||||||
{
|
{
|
||||||
//! true enables light
|
//! true enables light
|
||||||
GLint Enabled;
|
GLint Enabled;
|
||||||
|
@ -320,7 +321,9 @@ private:
|
||||||
GLint Specular;
|
GLint Specular;
|
||||||
//! Attenuation
|
//! Attenuation
|
||||||
GLint Attenuation;
|
GLint Attenuation;
|
||||||
} uni_Light[8];
|
};
|
||||||
|
|
||||||
|
LightUniforms uni_Light[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
CGLDevice::CGLDevice(const DeviceConfig &config)
|
CGLDevice::CGLDevice(const DeviceConfig &config)
|
||||||
{
|
{
|
||||||
|
@ -683,7 +684,8 @@ Texture CGLDevice::CreateTexture(ImageData *data, const TextureCreateParams &par
|
||||||
convert = true;
|
convert = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
GetLogger()->Error("Unknown data surface format");
|
GetLogger()->Error("Unknown data surface format");
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
@ -1842,8 +1844,8 @@ void CGLDevice::CopyFramebufferToTexture(Texture& texture, int xOffset, int yOff
|
||||||
glBindTexture(GL_TEXTURE_2D, m_currentTextures[0].id);
|
glBindTexture(GL_TEXTURE_2D, m_currentTextures[0].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CGLDevice::GetFrameBufferPixels()const{
|
void* CGLDevice::GetFrameBufferPixels()const
|
||||||
|
{
|
||||||
GLubyte* pixels = new GLubyte[4 * m_config.size.x * m_config.size.y];
|
GLubyte* pixels = new GLubyte[4 * m_config.size.x * m_config.size.y];
|
||||||
|
|
||||||
glReadPixels(0, 0, m_config.size.x, m_config.size.y, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
glReadPixels(0, 0, m_config.size.x, m_config.size.y, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\enum VertexBufferType
|
\enum VertexBufferType
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
|
|
||||||
#include "common/logger.h"
|
#include "common/logger.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
// CGLFramebuffer
|
// CGLFramebuffer
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
#include "graphics/core/framebuffer.h"
|
#include "graphics/core/framebuffer.h"
|
||||||
#include "graphics/opengl/glutil.h"
|
#include "graphics/opengl/glutil.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CGLFramebuffer
|
* \class CGLFramebuffer
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
GLuint textureCoordinates[] = { GL_S, GL_T, GL_R, GL_Q };
|
GLuint textureCoordinates[] = { GL_S, GL_T, GL_R, GL_Q };
|
||||||
GLuint textureCoordGen[] = { GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q };
|
GLuint textureCoordGen[] = { GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q };
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
//! Tolerance level -- minimum accepted float value
|
//! Tolerance level -- minimum accepted float value
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
//! Compares \a a and \a b within \a tolerance
|
//! Compares \a a and \a b within \a tolerance
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
//! Returns py up on the line \a a - \a b
|
//! Returns py up on the line \a a - \a b
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct IntPoint
|
* \struct IntPoint
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \struct Matrix math/matrix.h
|
* \struct Matrix math/matrix.h
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
#include "math/vector.h"
|
#include "math/vector.h"
|
||||||
|
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
struct Sphere
|
struct Sphere
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
|
|
||||||
// Math module namespace
|
// Math module namespace
|
||||||
namespace Math {
|
namespace Math
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,12 +33,14 @@ class CSoundInterface;
|
||||||
class CLevelParserLine;
|
class CLevelParserLine;
|
||||||
class COldObject;
|
class COldObject;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui
|
||||||
|
{
|
||||||
class CInterface;
|
class CInterface;
|
||||||
class CWindow;
|
class CWindow;
|
||||||
} /* Ui */
|
} /* Ui */
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
|
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CParticle;
|
class CParticle;
|
||||||
|
|
|
@ -159,7 +159,8 @@ bool CAutoDestroyer::EventProcess(const Event &event)
|
||||||
if ( pw != 0 ) EnableInterface(pw, EVENT_OBJECT_BDESTROY, (scrap != 0));
|
if ( pw != 0 ) EnableInterface(pw, EVENT_OBJECT_BDESTROY, (scrap != 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ( pw != 0 ) EnableInterface(pw, EVENT_OBJECT_BDESTROY, false);
|
}
|
||||||
|
else if ( pw != 0 ) EnableInterface(pw, EVENT_OBJECT_BDESTROY, false);
|
||||||
|
|
||||||
if ( m_phase == ADEP_DOWN )
|
if ( m_phase == ADEP_DOWN )
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,13 +46,15 @@ class CRobotMain;
|
||||||
class CSoundInterface;
|
class CSoundInterface;
|
||||||
class CLevelParserLine;
|
class CLevelParserLine;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui
|
||||||
|
{
|
||||||
class CStudio;
|
class CStudio;
|
||||||
class CInterface;
|
class CInterface;
|
||||||
class CWindow;
|
class CWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CWater;
|
class CWater;
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
class CRobotMain;
|
class CRobotMain;
|
||||||
class CSoundInterface;
|
class CSoundInterface;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CCamera;
|
class CCamera;
|
||||||
class CEngine;
|
class CEngine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
#include "object/object_type.h"
|
#include "object/object_type.h"
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CParticle;
|
class CParticle;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
struct ModelCrashSphere;
|
struct ModelCrashSphere;
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class COldModelManager;
|
class COldModelManager;
|
||||||
class CModelManager;
|
class CModelManager;
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CModelManager;
|
class CModelManager;
|
||||||
class COldModelManager;
|
class COldModelManager;
|
||||||
|
@ -75,7 +76,8 @@ public:
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
++m_currentIt;
|
++m_currentIt;
|
||||||
} while (m_currentIt != m_endIt && m_currentIt->second == nullptr);
|
}
|
||||||
|
while (m_currentIt != m_endIt && m_currentIt->second == nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator!=(const CObjectIteratorProxy& other)
|
inline bool operator!=(const CObjectIteratorProxy& other)
|
||||||
|
|
|
@ -3127,7 +3127,8 @@ int COldObject::GetDefRank()
|
||||||
bool COldObject::GetTooltipName(std::string& name)
|
bool COldObject::GetTooltipName(std::string& name)
|
||||||
{
|
{
|
||||||
GetResource(RES_OBJECT, m_type, name);
|
GetResource(RES_OBJECT, m_type, name);
|
||||||
if(GetTeam() != 0) {
|
if (GetTeam() != 0)
|
||||||
|
{
|
||||||
name += " ["+CRobotMain::GetInstancePointer()->GetTeamName(GetTeam())+" ("+boost::lexical_cast<std::string>(GetTeam())+")]";
|
name += " ["+CRobotMain::GetInstancePointer()->GetTeamName(GetTeam())+" ("+boost::lexical_cast<std::string>(GetTeam())+")]";
|
||||||
}
|
}
|
||||||
return !name.empty();
|
return !name.empty();
|
||||||
|
|
|
@ -2556,7 +2556,8 @@ void CRobotMain::InitEye()
|
||||||
bool CRobotMain::EventFrame(const Event &event)
|
bool CRobotMain::EventFrame(const Event &event)
|
||||||
{
|
{
|
||||||
m_time += event.rTime;
|
m_time += event.rTime;
|
||||||
if (!m_movieLock && m_pause->GetPause() == PAUSE_NONE) {
|
if (!m_movieLock && m_pause->GetPause() == PAUSE_NONE)
|
||||||
|
{
|
||||||
m_gameTime += event.rTime;
|
m_gameTime += event.rTime;
|
||||||
m_gameTimeAbsolute += m_app->GetRealRelTime() / 1e9f;
|
m_gameTimeAbsolute += m_app->GetRealRelTime() / 1e9f;
|
||||||
}
|
}
|
||||||
|
@ -5499,7 +5500,8 @@ Error CRobotMain::CheckEndMission(bool frame)
|
||||||
// Special handling for teams
|
// Special handling for teams
|
||||||
m_missionResult = ERR_MISSION_NOTERM;
|
m_missionResult = ERR_MISSION_NOTERM;
|
||||||
|
|
||||||
if (teamCount == 0) {
|
if (teamCount == 0)
|
||||||
|
{
|
||||||
GetLogger()->Info("All teams died, mission ended with failure\n");
|
GetLogger()->Info("All teams died, mission ended with failure\n");
|
||||||
m_missionResult = INFO_LOST;
|
m_missionResult = INFO_LOST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,8 @@ class CSceneEndCondition;
|
||||||
class CAudioChangeCondition;
|
class CAudioChangeCondition;
|
||||||
class CPlayerProfile;
|
class CPlayerProfile;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CLightManager;
|
class CLightManager;
|
||||||
class CWater;
|
class CWater;
|
||||||
|
@ -93,7 +94,8 @@ class CTerrain;
|
||||||
class CModelManager;
|
class CModelManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui
|
||||||
|
{
|
||||||
class CMainDialog;
|
class CMainDialog;
|
||||||
class CMainShort;
|
class CMainShort;
|
||||||
class CMainMap;
|
class CMainMap;
|
||||||
|
|
|
@ -36,7 +36,8 @@ struct ExchangePostInfo
|
||||||
|
|
||||||
struct ObjectCreateParams;
|
struct ObjectCreateParams;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class COldModelManager;
|
class COldModelManager;
|
||||||
class CEngine;
|
class CEngine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CModelManager;
|
class CModelManager;
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CModel;
|
class CModel;
|
||||||
|
|
|
@ -36,7 +36,8 @@ class CRobotMain;
|
||||||
class CSoundInterface;
|
class CSoundInterface;
|
||||||
|
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CLightManager;
|
class CLightManager;
|
||||||
class CParticle;
|
class CParticle;
|
||||||
|
|
|
@ -141,7 +141,9 @@ CObject* CTaskFlag::SearchNearest(Math::Vector pos, ObjectType type)
|
||||||
if(type == OBJECT_NULL)
|
if(type == OBJECT_NULL)
|
||||||
{
|
{
|
||||||
types = {OBJECT_FLAGb, OBJECT_FLAGr, OBJECT_FLAGg, OBJECT_FLAGy, OBJECT_FLAGv};
|
types = {OBJECT_FLAGb, OBJECT_FLAGr, OBJECT_FLAGg, OBJECT_FLAGy, OBJECT_FLAGv};
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
types = {type};
|
types = {type};
|
||||||
}
|
}
|
||||||
return CObjectManager::GetInstancePointer()->FindNearest(nullptr, pos, types);
|
return CObjectManager::GetInstancePointer()->FindNearest(nullptr, pos, types);
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
|
|
||||||
std::string TraceColorName(TraceColor color)
|
std::string TraceColorName(TraceColor color)
|
||||||
{
|
{
|
||||||
switch(color) {
|
switch(color)
|
||||||
|
{
|
||||||
case TraceColor::White: return "White"; break;
|
case TraceColor::White: return "White"; break;
|
||||||
case TraceColor::Black: return "Black"; break;
|
case TraceColor::Black: return "Black"; break;
|
||||||
case TraceColor::Gray: return "Gray"; break;
|
case TraceColor::Gray: return "Gray"; break;
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
enum class TraceColor : int {
|
enum class TraceColor : int
|
||||||
|
{
|
||||||
Default = -1,
|
Default = -1,
|
||||||
|
|
||||||
White = 0,
|
White = 0,
|
||||||
|
|
|
@ -42,7 +42,8 @@ class CLevelParserLine;
|
||||||
class CJostleableObject;
|
class CJostleableObject;
|
||||||
struct Event;
|
struct Event;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx
|
||||||
|
{
|
||||||
class CCamera;
|
class CCamera;
|
||||||
class CEngine;
|
class CEngine;
|
||||||
class CLight;
|
class CLight;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue