CApplication and Gfx::CEngine interfaces & other
- added CApplication and Gfx::CEngine interfaces - added Gfx::Material struct - added Math::IntPoint struct - added template for Gfx::CDevice class - added templates for Gfx::CGLDevice and Gfx::CGLEngine classesdev-ui
parent
11c947f212
commit
3478978c21
src
app
graphics
math
|
@ -43,6 +43,8 @@ graphics/common/pyro.cpp
|
|||
graphics/common/terrain.cpp
|
||||
graphics/common/text.cpp
|
||||
graphics/common/water.cpp
|
||||
graphics/opengl/gldevice.cpp
|
||||
graphics/opengl/glengine.cpp
|
||||
object/auto/auto.cpp
|
||||
object/auto/autobase.cpp
|
||||
object/auto/autoconvert.cpp
|
||||
|
|
131
src/app/app.h
131
src/app/app.h
|
@ -20,8 +20,137 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include "common/misc.h"
|
||||
#include "graphics/common/engine.h"
|
||||
|
||||
|
||||
class CInstanceManager;
|
||||
class CEvent;
|
||||
class CRobotMain;
|
||||
class CSound;
|
||||
|
||||
|
||||
class CApplication
|
||||
{
|
||||
// TODO
|
||||
public:
|
||||
CApplication();
|
||||
~CApplication();
|
||||
|
||||
protected:
|
||||
//LRESULT OnQuerySuspend( DWORD dwFlags );
|
||||
//LRESULT OnResumeSuspend( DWORD dwData );
|
||||
|
||||
public:
|
||||
Error RegQuery();
|
||||
Error AudioQuery();
|
||||
Error CheckMistery(char *strCmdLine);
|
||||
int GetVidMemTotal();
|
||||
bool IsVideo8MB();
|
||||
bool IsVideo32MB();
|
||||
//HRESULT Create( HINSTANCE, TCHAR* );
|
||||
int Run();
|
||||
//LRESULT MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
void Pause(bool pause);
|
||||
//Math::Point ConvPosToInterface(HWND hWnd, LPARAM lParam);
|
||||
void SetMousePos(Math::Point pos);
|
||||
void StepSimul(float rTime);
|
||||
char* RetCDpath();
|
||||
|
||||
void SetShowStat(bool show);
|
||||
bool RetShowStat();
|
||||
void SetDebugMode(bool mode);
|
||||
bool RetDebugMode();
|
||||
bool RetSetupMode();
|
||||
|
||||
bool EnumDevices(char *bufDevices, int lenDevices, char *bufModes, int lenModes, int &totalDevices, int &selectDevices, int &totalModes, int &selectModes);
|
||||
bool RetFullScreen();
|
||||
bool ChangeDevice(char *device, char *mode, bool bFull);
|
||||
|
||||
void FlushPressKey();
|
||||
void ResetKey();
|
||||
void SetKey(int keyRank, int option, int key);
|
||||
int RetKey(int keyRank, int option);
|
||||
|
||||
void SetJoystick(bool bEnable);
|
||||
bool RetJoystick();
|
||||
|
||||
void SetMouseType(Gfx::MouseType type);
|
||||
void SetNiceMouse(bool bNice);
|
||||
bool RetNiceMouse();
|
||||
bool RetNiceMouseCap();
|
||||
|
||||
bool WriteScreenShot(char *filename, int width, int height);
|
||||
|
||||
//bool GetRenderDC(HDC &hDC);
|
||||
//bool ReleaseRenderDC(HDC &hDC);
|
||||
//PBITMAPINFO CreateBitmapInfoStruct(HBITMAP hBmp);
|
||||
//bool CreateBMPFile(LPTSTR pszFile, PBITMAPINFO pbi, HBITMAP hBMP, HDC hDC);
|
||||
|
||||
protected:
|
||||
//HRESULT ConfirmDevice( DDCAPS* pddDriverCaps, D3DDEVICEDESC7* pd3dDeviceDesc );
|
||||
//HRESULT Initialize3DEnvironment();
|
||||
//HRESULT Change3DEnvironment();
|
||||
//HRESULT CreateZBuffer(GUID* pDeviceGUID);
|
||||
//HRESULT Render3DEnvironment();
|
||||
//VOID Cleanup3DEnvironment();
|
||||
//VOID DeleteDeviceObjects();
|
||||
//VOID DisplayFrameworkError( HRESULT, DWORD );
|
||||
|
||||
void InitText();
|
||||
void DrawSuppl();
|
||||
void ShowStats();
|
||||
void OutputText(long x, long y, char* str);
|
||||
|
||||
protected:
|
||||
CInstanceManager* m_iMan;
|
||||
CEvent* m_event;
|
||||
|
||||
//HINSTANCE m_instance;
|
||||
//HWND m_hWnd;
|
||||
//D3DEnum_DeviceInfo* m_pDeviceInfo;
|
||||
//LPDIRECTDRAW7 m_pDD;
|
||||
//LPDIRECT3D7 m_pD3D;
|
||||
//LPDIRECT3DDEVICE7 m_pD3DDevice;
|
||||
//LPDIRECTDRAWSURFACE7 m_pddsRenderTarget;
|
||||
//DDSURFACEDESC2 m_ddsdRenderTarget;
|
||||
//LPDIRECTDRAWSURFACE7 m_pddsDepthBuffer;
|
||||
|
||||
//HANDLE m_thread;
|
||||
//DWORD m_threadId;
|
||||
|
||||
char m_CDpath[100];
|
||||
|
||||
//CD3DFramework7* m_pFramework;
|
||||
bool m_active;
|
||||
bool m_activateApp;
|
||||
bool m_ready;
|
||||
bool m_joystick;
|
||||
|
||||
long m_vidMemTotal;
|
||||
char* m_strWindowTitle;
|
||||
bool m_bAppUseZBuffer;
|
||||
bool m_bAppUseStereo;
|
||||
bool m_bShowStats;
|
||||
bool m_bDebugMode;
|
||||
bool m_bAudioState;
|
||||
bool m_bAudioTrack;
|
||||
bool m_bNiceMouse;
|
||||
bool m_bSetupMode;
|
||||
//HRESULT (*m_fnConfirmDevice)(DDCAPS*, D3DDEVICEDESC7*);
|
||||
|
||||
public:
|
||||
Gfx::CEngine* m_pD3DEngine;
|
||||
CRobotMain* m_pRobotMain;
|
||||
CSound* m_pSound;
|
||||
|
||||
int m_keyState;
|
||||
Math::Vector m_axeKey;
|
||||
Math::Vector m_axeJoy;
|
||||
bool m_joyButton[32];
|
||||
Math::Point m_mousePos;
|
||||
long m_mshMouseWheel;
|
||||
|
||||
float m_aTime;
|
||||
long m_key[50][2];
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// * This file is part of the COLOBOT source code
|
||||
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
|
||||
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// device.h
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
class CDevice
|
||||
{
|
||||
// TODO
|
||||
};
|
||||
|
||||
}; // namespace Gfx
|
|
@ -20,28 +20,31 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include "graphics/common/color.h"
|
||||
#include "graphics/common/material.h"
|
||||
#include "graphics/common/vertex.h"
|
||||
#include "math/intpoint.h"
|
||||
#include "math/matrix.h"
|
||||
#include "math/point.h"
|
||||
#include "math/vector.h"
|
||||
#include "math/matrix.h"
|
||||
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
/*
|
||||
|
||||
TODO
|
||||
|
||||
class CApplication;
|
||||
class CInstanceManager;
|
||||
class CObject;
|
||||
class CSound;
|
||||
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
class CDevice;
|
||||
class CLight;
|
||||
class CText;
|
||||
class CParticule;
|
||||
class CParticle;
|
||||
class CWater;
|
||||
class CCloud;
|
||||
class CBlitz;
|
||||
class CLightning;
|
||||
class CPlanet;
|
||||
class CSound;
|
||||
class CTerrain;
|
||||
|
||||
|
||||
|
@ -174,7 +177,7 @@ struct ObjLevel6
|
|||
Gfx::Material material;
|
||||
int state;
|
||||
Gfx::TriangleType type;
|
||||
Math::VertexTex2 vertex[1];
|
||||
Gfx::VertexTex2 vertex[1];
|
||||
};
|
||||
|
||||
struct ObjLevel5
|
||||
|
@ -280,29 +283,29 @@ struct GroundMark
|
|||
|
||||
|
||||
|
||||
class CGfxEngine
|
||||
class CEngine
|
||||
{
|
||||
public:
|
||||
CGfxEngine(CInstanceManager *iMan, CApplication *app);
|
||||
~CGfxEngine();
|
||||
CEngine(CInstanceManager *iMan, CApplication *app);
|
||||
~CEngine();
|
||||
|
||||
void SetDevice(Gfx::Device *device);
|
||||
Gfx::Device* RetDevice();
|
||||
void SetDevice(Gfx::CDevice *device);
|
||||
Gfx::CDevice* RetDevice();
|
||||
|
||||
void SetTerrain(Gfx::CTerrain* terrain);
|
||||
|
||||
bool WriteProfile();
|
||||
|
||||
void SetPause(bool bPause);
|
||||
void SetPause(bool pause);
|
||||
bool RetPause();
|
||||
|
||||
void SetMovieLock(bool bLock);
|
||||
void SetMovieLock(bool lock);
|
||||
bool RetMovieLock();
|
||||
|
||||
void SetShowStat(bool bShow);
|
||||
void SetShowStat(bool show);
|
||||
bool RetShowStat();
|
||||
|
||||
void SetRenderEnable(bool bEnable);
|
||||
void SetRenderEnable(bool enable);
|
||||
|
||||
int OneTimeSceneInit();
|
||||
int InitDeviceObjects();
|
||||
|
@ -320,14 +323,14 @@ public:
|
|||
void SetInfoText(int line, char* text);
|
||||
char * RetInfoText(int line);
|
||||
//LRESULT MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void FirstExecuteAdapt(bool bFirst);
|
||||
void FirstExecuteAdapt(bool first);
|
||||
//int GetVidMemTotal();
|
||||
//bool IsVideo8MB();
|
||||
//bool IsVideo32MB();
|
||||
|
||||
bool EnumDevices(char *bufDevices, int lenDevices, char *bufModes, int lenModes, int &totalDevices, int &selectDevices, int &totalModes, int &selectModes);
|
||||
bool RetFullScreen();
|
||||
bool ChangeDevice(char *device, char *mode, bool bFull);
|
||||
bool ChangeDevice(char *device, char *mode, bool full);
|
||||
|
||||
Math::Matrix* RetMatView();
|
||||
Math::Matrix* RetMatLeftView();
|
||||
|
@ -342,19 +345,19 @@ public:
|
|||
int CreateObject();
|
||||
void FlushObject();
|
||||
bool DeleteObject(int objRank);
|
||||
bool SetDrawWorld(int objRank, bool bDraw);
|
||||
bool SetDrawFront(int objRank, bool bDraw);
|
||||
bool AddTriangle(int objRank, Math::VertexTex2* vertex, int nb, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, bool bGlobalUpdate);
|
||||
bool AddSurface(int objRank, Math::VertexTex2* vertex, int nb, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, bool bGlobalUpdate);
|
||||
bool AddQuick(int objRank, Gfx::ObjLevel6* buffer, char* texName1, char* texName2, float min, float max, bool bGlobalUpdate);
|
||||
bool SetDrawWorld(int objRank, bool draw);
|
||||
bool SetDrawFront(int objRank, bool draw);
|
||||
bool AddTriangle(int objRank, Gfx::VertexTex2* vertex, int nb, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, bool globalUpdate);
|
||||
bool AddSurface(int objRank, Gfx::VertexTex2* vertex, int nb, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, bool globalUpdate);
|
||||
bool AddQuick(int objRank, Gfx::ObjLevel6* buffer, char* texName1, char* texName2, float min, float max, bool globalUpdate);
|
||||
Gfx::ObjLevel6* SearchTriangle(int objRank, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max);
|
||||
void ChangeLOD();
|
||||
bool ChangeSecondTexture(int objRank, char* texName2);
|
||||
int RetTotalTriangles(int objRank);
|
||||
int GetTriangles(int objRank, float min, float max, Gfx::Triangle* buffer, int size, float percent);
|
||||
bool GetBBox(int objRank, Math::Vector &min, Math::Vector &max);
|
||||
bool ChangeTextureMapping(int objRank, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, Gfx::Maping mode, float au, float bu, float av, float bv);
|
||||
bool TrackTextureMapping(int objRank, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, Gfx::Maping mode, float pos, float factor, float tl, float ts, float tt);
|
||||
bool ChangeTextureMapping(int objRank, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, Gfx::Mapping mode, float au, float bu, float av, float bv);
|
||||
bool TrackTextureMapping(int objRank, const Gfx::Material &mat, int state, char* texName1, char* texName2, float min, float max, Gfx::Mapping mode, float pos, float factor, float tl, float ts, float tt);
|
||||
bool SetObjectTransform(int objRank, const Math::Matrix &transform);
|
||||
bool GetObjectTransform(int objRank, Math::Matrix &transform);
|
||||
bool SetObjectType(int objRank, Gfx::ObjectType type);
|
||||
|
@ -363,7 +366,7 @@ public:
|
|||
|
||||
bool ShadowCreate(int objRank);
|
||||
void ShadowDelete(int objRank);
|
||||
bool SetObjectShadowHide(int objRank, bool bHide);
|
||||
bool SetObjectShadowHide(int objRank, bool hide);
|
||||
bool SetObjectShadowType(int objRank, Gfx::ShadowType type);
|
||||
bool SetObjectShadowPos(int objRank, const Math::Vector &pos);
|
||||
bool SetObjectShadowNormal(int objRank, const Math::Vector &n);
|
||||
|
@ -394,17 +397,17 @@ public:
|
|||
bool LoadAllTexture();
|
||||
|
||||
void SetLimitLOD(int rank, float limit);
|
||||
float RetLimitLOD(int rank, bool bLast=false);
|
||||
float RetLimitLOD(int rank, bool last=false);
|
||||
|
||||
void SetTerrainVision(float vision);
|
||||
|
||||
void SetGroundSpot(bool bMode);
|
||||
void SetGroundSpot(bool mode);
|
||||
bool RetGroundSpot();
|
||||
void SetShadow(bool bMode);
|
||||
void SetShadow(bool mode);
|
||||
bool RetShadow();
|
||||
void SetDirty(bool bMode);
|
||||
void SetDirty(bool mode);
|
||||
bool RetDirty();
|
||||
void SetFog(bool bMode);
|
||||
void SetFog(bool mode);
|
||||
bool RetFog();
|
||||
bool RetStateColor();
|
||||
|
||||
|
@ -414,8 +417,8 @@ public:
|
|||
void SetRankView(int rank);
|
||||
int RetRankView();
|
||||
|
||||
void SetDrawWorld(bool bDraw);
|
||||
void SetDrawFront(bool bDraw);
|
||||
void SetDrawWorld(bool draw);
|
||||
void SetDrawFront(bool draw);
|
||||
|
||||
void SetAmbiantColor(const Gfx::Color &color, int rank=0);
|
||||
Gfx::Color RetAmbiantColor(int rank=0);
|
||||
|
@ -426,17 +429,17 @@ public:
|
|||
void SetFogColor(const Gfx::Color &color, int rank=0);
|
||||
Gfx::Color RetFogColor(int rank=0);
|
||||
|
||||
void SetDeepView(float length, int rank=0, bool bRef=false);
|
||||
void SetDeepView(float length, int rank=0, bool ref=false);
|
||||
float RetDeepView(int rank=0);
|
||||
|
||||
void SetFogStart(float start, int rank=0);
|
||||
float RetFogStart(int rank=0);
|
||||
|
||||
void SetBackground(char *name, Gfx::Color up=0, Gfx::Color down=0, Gfx::Color cloudUp=0, Gfx::Color cloudDown=0, bool bFull=false, bool bQuarter=false);
|
||||
void RetBackground(char *name, Gfx::Color &up, Gfx::Color &down, Gfx::Color &cloudUp, Gfx::Color &cloudDown, bool &bFull, bool &bQuarter);
|
||||
void SetBackground(char *name, Gfx::Color up=Gfx::Color(), Gfx::Color down=Gfx::Color(), Gfx::Color cloudUp=Gfx::Color(), Gfx::Color cloudDown=Gfx::Color(), bool full=false, bool quarter=false);
|
||||
void RetBackground(char *name, Gfx::Color &up, Gfx::Color &down, Gfx::Color &cloudUp, Gfx::Color &cloudDown, bool &full, bool &quarter);
|
||||
void SetFrontsizeName(char *name);
|
||||
void SetOverFront(bool bFront);
|
||||
void SetOverColor(const Gfx::Color &color=0, int mode=RSTATE_TCOLOR_BLACK);
|
||||
void SetOverFront(bool front);
|
||||
void SetOverColor(const Gfx::Color &color=Gfx::Color(), int mode=RSTATE_TCOLOR_BLACK);
|
||||
|
||||
void SetParticuleDensity(float value);
|
||||
float RetParticuleDensity();
|
||||
|
@ -454,31 +457,31 @@ public:
|
|||
void SetTextureQuality(int value);
|
||||
int RetTextureQuality();
|
||||
|
||||
void SetTotoMode(bool bPresent);
|
||||
void SetTotoMode(bool present);
|
||||
bool RetTotoMode();
|
||||
|
||||
void SetLensMode(bool bPresent);
|
||||
void SetLensMode(bool present);
|
||||
bool RetLensMode();
|
||||
|
||||
void SetWaterMode(bool bPresent);
|
||||
void SetWaterMode(bool present);
|
||||
bool RetWaterMode();
|
||||
|
||||
void SetBlitzMode(bool bPresent);
|
||||
void SetBlitzMode(bool present);
|
||||
bool RetBlitzMode();
|
||||
|
||||
void SetSkyMode(bool bPresent);
|
||||
void SetSkyMode(bool present);
|
||||
bool RetSkyMode();
|
||||
|
||||
void SetBackForce(bool bPresent);
|
||||
void SetBackForce(bool present);
|
||||
bool RetBackForce();
|
||||
|
||||
void SetPlanetMode(bool bPresent);
|
||||
void SetPlanetMode(bool present);
|
||||
bool RetPlanetMode();
|
||||
|
||||
void SetLightMode(bool bPresent);
|
||||
void SetLightMode(bool present);
|
||||
bool RetLightMode();
|
||||
|
||||
void SetEditIndentMode(bool bAuto);
|
||||
void SetEditIndentMode(bool auto);
|
||||
bool RetEditIndentMode();
|
||||
|
||||
void SetEditIndentValue(int value);
|
||||
|
@ -506,17 +509,17 @@ public:
|
|||
void SetKey(int keyRank, int option, int key);
|
||||
int RetKey(int keyRank, int option);
|
||||
|
||||
void SetJoystick(bool bEnable);
|
||||
void SetJoystick(bool enable);
|
||||
bool RetJoystick();
|
||||
|
||||
void SetDebugMode(bool bMode);
|
||||
void SetDebugMode(bool mode);
|
||||
bool RetDebugMode();
|
||||
bool RetSetupMode();
|
||||
|
||||
bool IsVisiblePoint(const Math::Vector &pos);
|
||||
|
||||
int DetectObject(Math::Point mouse);
|
||||
void SetState(int state, Gfx::Color color=0xffffffff);
|
||||
void SetState(int state, Gfx::Color color=Gfx::Color(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
void SetTexture(char *name, int stage=0);
|
||||
void SetMaterial(const Gfx::Material &mat);
|
||||
|
||||
|
@ -525,15 +528,15 @@ public:
|
|||
Math::Point RetMousePos();
|
||||
void SetMouseType(Gfx::MouseType type);
|
||||
Gfx::MouseType RetMouseType();
|
||||
void SetMouseHide(bool bHide);
|
||||
void SetMouseHide(bool hide);
|
||||
bool RetMouseHide();
|
||||
void SetNiceMouse(bool bNice);
|
||||
void SetNiceMouse(bool nice);
|
||||
bool RetNiceMouse();
|
||||
bool RetNiceMouseCap();
|
||||
|
||||
CText* RetText();
|
||||
|
||||
bool ChangeColor(char *name, Gfx::Color colorRef1, Gfx::Color colorNew1, Gfx::Color colorRef2, Gfx::Color colorNew2, float tolerance1, float tolerance2, Math::Point ts, Math::Point ti, Math::Point *pExclu=0, float shift=0.0f, bool bHSV=false);
|
||||
bool ChangeColor(char *name, Gfx::Color colorRef1, Gfx::Color colorNew1, Gfx::Color colorRef2, Gfx::Color colorNew2, float tolerance1, float tolerance2, Math::Point ts, Math::Point ti, Math::Point *pExclu=0, float shift=0.0f, bool hSV=false);
|
||||
bool OpenImage(char *name);
|
||||
bool CopyImage();
|
||||
bool LoadImage();
|
||||
|
@ -562,7 +565,7 @@ protected:
|
|||
|
||||
bool IsVisible(int objRank);
|
||||
bool DetectBBox(int objRank, Math::Point mouse);
|
||||
bool DetectTriangle(Math::Point mouse, Math::VertexTex2 *triangle, int objRank, float &dist);
|
||||
bool DetectTriangle(Math::Point mouse, Gfx::VertexTex2 *triangle, int objRank, float &dist);
|
||||
bool TransformPoint(Math::Vector &p2D, int objRank, Math::Vector p3D);
|
||||
void ComputeDistance();
|
||||
void UpdateGeometry();
|
||||
|
@ -583,16 +586,16 @@ protected:
|
|||
protected:
|
||||
CInstanceManager* m_iMan;
|
||||
CApplication* m_app;
|
||||
Gfx::Device* m_device;
|
||||
CText* m_text;
|
||||
CLight* m_light;
|
||||
CParticule* m_particule;
|
||||
CWater* m_water;
|
||||
CCloud* m_cloud;
|
||||
CBlitz* m_blitz;
|
||||
CPlanet* m_planet;
|
||||
Gfx::CDevice* m_device;
|
||||
Gfx::CText* m_text;
|
||||
Gfx::CLight* m_light;
|
||||
Gfx::CParticle* m_particule;
|
||||
Gfx::CWater* m_water;
|
||||
Gfx::CCloud* m_cloud;
|
||||
Gfx::CLightning* m_blitz;
|
||||
Gfx::CPlanet* m_planet;
|
||||
Gfx::CTerrain* m_terrain;
|
||||
CSound* m_sound;
|
||||
CTerrain* m_terrain;
|
||||
|
||||
int m_blackSrcBlend[2];
|
||||
int m_blackDestBlend[2];
|
||||
|
@ -618,12 +621,12 @@ protected:
|
|||
float m_absTime;
|
||||
float m_lastTime;
|
||||
float m_speed;
|
||||
bool m_bPause;
|
||||
bool m_bRender;
|
||||
bool m_bMovieLock;
|
||||
bool m_pause;
|
||||
bool m_render;
|
||||
bool m_movieLock;
|
||||
|
||||
POINT m_dim;
|
||||
POINT m_lastDim;
|
||||
Math::IntPoint m_dim;
|
||||
Math::IntPoint m_lastDim;
|
||||
Gfx::ObjLevel1* m_objectPointer;
|
||||
int m_objectParamTotal;
|
||||
Gfx::Object* m_objectParam;
|
||||
|
@ -643,30 +646,30 @@ protected:
|
|||
float m_fogStart[2];
|
||||
Gfx::Color m_waterAddColor;
|
||||
int m_statisticTriangle;
|
||||
bool m_bUpdateGeometry;
|
||||
bool m_updateGeometry;
|
||||
char m_infoText[10][200];
|
||||
int m_alphaMode;
|
||||
bool m_bStateColor;
|
||||
bool m_bForceStateColor;
|
||||
bool m_bGroundSpot;
|
||||
bool m_bShadow;
|
||||
bool m_bDirty;
|
||||
bool m_bFog;
|
||||
bool m_bFirstGroundSpot;
|
||||
bool m_stateColor;
|
||||
bool m_forceStateColor;
|
||||
bool m_groundSpotVisible;
|
||||
bool m_shadowVisible;
|
||||
bool m_dirty;
|
||||
bool m_fog;
|
||||
bool m_firstGroundSpot;
|
||||
int m_secondTexNum;
|
||||
char m_backgroundName[50];
|
||||
Gfx::Color m_backgroundColorUp;
|
||||
Gfx::Color m_backgroundColorDown;
|
||||
Gfx::Color m_backgroundCloudUp;
|
||||
Gfx::Color m_backgroundCloudDown;
|
||||
bool m_bBackgroundFull;
|
||||
bool m_bBackgroundQuarter;
|
||||
bool m_bOverFront;
|
||||
bool m_backgroundFull;
|
||||
bool m_backgroundQuarter;
|
||||
bool m_overFront;
|
||||
Gfx::Color m_overColor;
|
||||
int m_overMode;
|
||||
char m_frontsizeName[50];
|
||||
bool m_bDrawWorld;
|
||||
bool m_bDrawFront;
|
||||
bool m_drawWorld;
|
||||
bool m_drawFront;
|
||||
float m_limitLOD[2];
|
||||
float m_particuleDensity;
|
||||
float m_clippingDistance;
|
||||
|
@ -676,19 +679,19 @@ protected:
|
|||
float m_terrainVision;
|
||||
float m_gadgetQuantity;
|
||||
int m_textureQuality;
|
||||
bool m_bTotoMode;
|
||||
bool m_bLensMode;
|
||||
bool m_bWaterMode;
|
||||
bool m_bSkyMode;
|
||||
bool m_bBackForce;
|
||||
bool m_bPlanetMode;
|
||||
bool m_bLightMode;
|
||||
bool m_bEditIndentMode;
|
||||
bool m_totoMode;
|
||||
bool m_lensMode;
|
||||
bool m_waterMode;
|
||||
bool m_skyMode;
|
||||
bool m_backForce;
|
||||
bool m_planetMode;
|
||||
bool m_lightMode;
|
||||
bool m_editIndentMode;
|
||||
int m_editIndentValue;
|
||||
float m_tracePrecision;
|
||||
|
||||
int m_hiliteRank[100];
|
||||
bool m_bHilite;
|
||||
bool m_hilite;
|
||||
Math::Point m_hiliteP1;
|
||||
Math::Point m_hiliteP2;
|
||||
|
||||
|
@ -699,14 +702,14 @@ protected:
|
|||
|
||||
Math::Point m_mousePos;
|
||||
Gfx::MouseType m_mouseType;
|
||||
bool m_bMouseHide;
|
||||
bool m_bNiceMouse;
|
||||
bool m_mouseHide;
|
||||
bool m_niceMouse;
|
||||
|
||||
//LPDIRECTDRAWSURFACE7 m_imageSurface;
|
||||
//DDSURFACEDESC2 m_imageDDSD;
|
||||
//WORD* m_imageCopy;
|
||||
//int m_imageDX;
|
||||
//int m_imageDY;
|
||||
};*/
|
||||
};
|
||||
|
||||
}; // namespace Gfx
|
||||
|
|
|
@ -21,6 +21,23 @@
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
// TODO struct Material
|
||||
/**
|
||||
* \struct Material Material of a surface
|
||||
*
|
||||
* This structure was created as analog to DirectX's D3DMATERIAL.
|
||||
*
|
||||
* It contains values of 3 material colors: diffuse, ambient and specular.
|
||||
* In D3DMATERIAL there are other fields, but they are not used
|
||||
* by the graphics engine.
|
||||
*/
|
||||
struct Material
|
||||
{
|
||||
//! Diffuse color
|
||||
Gfx::Color diffuse;
|
||||
//! Ambient color
|
||||
Gfx::Color ambient;
|
||||
//! Specular color
|
||||
Gfx::Color specular;
|
||||
};
|
||||
|
||||
}; // namespace Gfx
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
// * This file is part of the COLOBOT source code
|
||||
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// gldevice.cpp
|
||||
|
||||
#include "graphics/opengl/gldevice.h"
|
||||
|
||||
// TODO
|
|
@ -0,0 +1,31 @@
|
|||
// * This file is part of the COLOBOT source code
|
||||
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// gldevice.h
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "graphics/common/device.h"
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
class CGLDevice : public Gfx::CDevice
|
||||
{
|
||||
// TODO
|
||||
};
|
||||
|
||||
}; // namespace Gfx
|
|
@ -0,0 +1,21 @@
|
|||
// * This file is part of the COLOBOT source code
|
||||
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// glengine.h
|
||||
|
||||
#include "graphics/opengl/glengine.h"
|
||||
|
||||
// TODO
|
|
@ -0,0 +1,44 @@
|
|||
// * This file is part of the COLOBOT source code
|
||||
// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathIntPointModule math/intpoint.h
|
||||
Contains the IntPoint struct.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Math {
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
/**
|
||||
* \struct IntPoint 2D Point with integer coords
|
||||
*
|
||||
* Analog of WinAPI's POINT struct.
|
||||
*/
|
||||
struct IntPoint
|
||||
{
|
||||
//! X coord
|
||||
long x;
|
||||
//! Y coord
|
||||
long y;
|
||||
|
||||
IntPoint(long aX = 0, long aY = 0) : x(aX), y(aY) {}
|
||||
};
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
Loading…
Reference in New Issue