Graphics stubs
- added stubs for functions in CLightning, CParticle and CPyro - cleaned object.h and physics.h headers - created temporary stubs to compile CCamera - other necessary changes to compile successfullydev-ui
parent
acff306cc1
commit
c3ab23ac9d
|
@ -67,7 +67,7 @@ common/iman.cpp
|
||||||
# common/restext.cpp
|
# common/restext.cpp
|
||||||
common/stringutils.cpp
|
common/stringutils.cpp
|
||||||
graphics/core/color.cpp
|
graphics/core/color.cpp
|
||||||
# graphics/engine/camera.cpp # new code but depends on other modules
|
graphics/engine/camera.cpp
|
||||||
graphics/engine/cloud.cpp
|
graphics/engine/cloud.cpp
|
||||||
graphics/engine/engine.cpp
|
graphics/engine/engine.cpp
|
||||||
graphics/engine/lightman.cpp
|
graphics/engine/lightman.cpp
|
||||||
|
|
|
@ -42,7 +42,8 @@ enum EventType
|
||||||
//! Event sent on user or system quit request
|
//! Event sent on user or system quit request
|
||||||
EVENT_QUIT = 1,
|
EVENT_QUIT = 1,
|
||||||
|
|
||||||
//? EVENT_FRAME = 2,
|
//! Frame update event
|
||||||
|
EVENT_FRAME = 2,
|
||||||
|
|
||||||
//! Event sent after pressing a mouse button
|
//! Event sent after pressing a mouse button
|
||||||
EVENT_MOUSE_BUTTON_DOWN = 3,
|
EVENT_MOUSE_BUTTON_DOWN = 3,
|
||||||
|
@ -669,6 +670,8 @@ struct Event
|
||||||
//! If true, the event was produced by system (SDL); else, it has come from user interface
|
//! If true, the event was produced by system (SDL); else, it has come from user interface
|
||||||
bool systemEvent;
|
bool systemEvent;
|
||||||
|
|
||||||
|
union
|
||||||
|
{
|
||||||
//! Additional data for EVENT_KEY_DOWN and EVENT_KEY_UP
|
//! Additional data for EVENT_KEY_DOWN and EVENT_KEY_UP
|
||||||
KeyEventData key;
|
KeyEventData key;
|
||||||
//! Additional data for EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP
|
//! Additional data for EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP
|
||||||
|
@ -681,17 +684,27 @@ struct Event
|
||||||
JoyButtonEventData joyButton;
|
JoyButtonEventData joyButton;
|
||||||
//! Additional data for EVENT_ACTIVE
|
//! Additional data for EVENT_ACTIVE
|
||||||
ActiveEventData active;
|
ActiveEventData active;
|
||||||
|
};
|
||||||
|
|
||||||
//? long param; // parameter
|
// TODO: refactor/rewrite
|
||||||
//? Math::Point pos; // mouse position (0 .. 1)
|
long param; // parameter
|
||||||
//? float axeX; // control the X axis (-1 .. 1)
|
Math::Point pos; // mouse position (0 .. 1)
|
||||||
//? float axeY; // control of the Y axis (-1 .. 1)
|
float axeX; // control the X axis (-1 .. 1)
|
||||||
//? float axeZ; // control the Z axis (-1 .. 1)
|
float axeY; // control of the Y axis (-1 .. 1)
|
||||||
//? short keyState; // state of the keyboard (KS_ *)
|
float axeZ; // control the Z axis (-1 .. 1)
|
||||||
//? float rTime; // relative time
|
short keyState; // state of the keyboard (KS_ *)
|
||||||
|
float rTime; // relative time
|
||||||
|
|
||||||
Event(EventType aType = EVENT_NULL)
|
Event(EventType aType = EVENT_NULL)
|
||||||
: type(aType), systemEvent(false) {}
|
{
|
||||||
|
type = aType;
|
||||||
|
systemEvent = false;
|
||||||
|
|
||||||
|
param = 0;
|
||||||
|
axeX = axeY = axeZ = 0.0f;
|
||||||
|
keyState = 0;
|
||||||
|
rTime = 0.0f;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,66 @@
|
||||||
#include "physics/physics.h"
|
#include "physics/physics.h"
|
||||||
|
|
||||||
|
|
||||||
|
// TODO temporary stubs for CObject and CPhysics
|
||||||
|
|
||||||
|
void CObject::SetTransparency(float)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* CObject::GetFret()
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* CObject::GetPower()
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* CObject::GetTruck()
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectType CObject::GetType()
|
||||||
|
{
|
||||||
|
return OBJECT_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CObject::SetGunGoalH(float)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CObject::GetGlobalSphere(Math::Vector &pos, float &radius)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
float CObject::GetAngleY(int)
|
||||||
|
{
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Math::Vector CObject::GetPosition(int)
|
||||||
|
{
|
||||||
|
return Math::Vector();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CObject::SetViewFromHere(Math::Vector &eye, float &dirH, float &dirV,
|
||||||
|
Math::Vector &lookat, Math::Vector &upVec,
|
||||||
|
Gfx::CameraType type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CPhysics* CObject::GetPhysics()
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CPhysics::GetLand()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//! 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)
|
||||||
void SetTransparency(CObject* obj, float value)
|
void SetTransparency(CObject* obj, float value)
|
||||||
{
|
{
|
||||||
|
@ -332,7 +392,7 @@ void Gfx::CCamera::SetType(CameraType type)
|
||||||
SetSmooth(Gfx::CAM_SMOOTH_NORM);
|
SetSmooth(Gfx::CAM_SMOOTH_NORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraType Gfx::CCamera::GetType()
|
Gfx::CameraType Gfx::CCamera::GetType()
|
||||||
{
|
{
|
||||||
return m_type;
|
return m_type;
|
||||||
}
|
}
|
||||||
|
@ -342,7 +402,7 @@ void Gfx::CCamera::SetSmooth(CameraSmooth type)
|
||||||
m_smooth = type;
|
m_smooth = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraSmooth Gfx::CCamera::GetSmoth()
|
Gfx::CameraSmooth Gfx::CCamera::GetSmoth()
|
||||||
{
|
{
|
||||||
return m_smooth;
|
return m_smooth;
|
||||||
}
|
}
|
||||||
|
@ -692,7 +752,7 @@ void Gfx::CCamera::OverFrame(const Event &event)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
color = Gfx::Color(0.0f. 0.0f, 0.0f);
|
color = Gfx::Color(0.0f, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
color.a = 0.0f;
|
color.a = 0.0f;
|
||||||
m_engine->SetOverColor(color, m_overMode);
|
m_engine->SetOverColor(color, m_overMode);
|
||||||
|
@ -873,7 +933,7 @@ bool Gfx::CCamera::IsCollisionBack(Math::Vector &eye, Math::Vector lookat)
|
||||||
|
|
||||||
for (int i = 0 ;i < 1000000; i++)
|
for (int i = 0 ;i < 1000000; i++)
|
||||||
{
|
{
|
||||||
CObject *obj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
|
CObject *obj = static_cast<CObject*>( m_iMan->SearchInstance(CLASS_OBJECT, i) );
|
||||||
if (obj == NULL) break;
|
if (obj == NULL) break;
|
||||||
|
|
||||||
if (obj->GetTruck()) continue; // battery or cargo?
|
if (obj->GetTruck()) continue; // battery or cargo?
|
||||||
|
@ -899,7 +959,7 @@ bool Gfx::CCamera::IsCollisionBack(Math::Vector &eye, Math::Vector lookat)
|
||||||
iType == OBJECT_SAFE ||
|
iType == OBJECT_SAFE ||
|
||||||
iType == OBJECT_HUSTON ) continue;
|
iType == OBJECT_HUSTON ) continue;
|
||||||
|
|
||||||
ObjType oType = obj->GetType();
|
ObjectType oType = obj->GetType();
|
||||||
if ( oType == OBJECT_HUMAN ||
|
if ( oType == OBJECT_HUMAN ||
|
||||||
oType == OBJECT_TECH ||
|
oType == OBJECT_TECH ||
|
||||||
oType == OBJECT_TOTO ||
|
oType == OBJECT_TOTO ||
|
||||||
|
@ -995,7 +1055,6 @@ bool Gfx::CCamera::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
// TODO: frame update event
|
|
||||||
case EVENT_FRAME:
|
case EVENT_FRAME:
|
||||||
EventFrame(event);
|
EventFrame(event);
|
||||||
break;
|
break;
|
||||||
|
@ -1004,11 +1063,11 @@ bool Gfx::CCamera::EventProcess(const Event &event)
|
||||||
EventMouseMove(event);
|
EventMouseMove(event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_KEY_DOWN:
|
|
||||||
// TODO: mouse wheel event
|
// TODO: mouse wheel event
|
||||||
|
/*case EVENT_KEY_DOWN:
|
||||||
if ( event.param == VK_WHEELUP ) EventMouseWheel(+1);
|
if ( event.param == VK_WHEELUP ) EventMouseWheel(+1);
|
||||||
if ( event.param == VK_WHEELDOWN ) EventMouseWheel(-1);
|
if ( event.param == VK_WHEELDOWN ) EventMouseWheel(-1);
|
||||||
break;
|
break;*/
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1489,8 +1548,6 @@ bool Gfx::CCamera::EventFrameFix(const Event &event)
|
||||||
|
|
||||||
bool Gfx::CCamera::EventFrameExplo(const Event &event)
|
bool Gfx::CCamera::EventFrameExplo(const Event &event)
|
||||||
{
|
{
|
||||||
float factor = m_heightEye * 0.5f + 30.0f;
|
|
||||||
|
|
||||||
if (m_mouseDirH != 0.0f)
|
if (m_mouseDirH != 0.0f)
|
||||||
m_directionH -= m_mouseDirH * event.rTime * 0.7f * m_speed;
|
m_directionH -= m_mouseDirH * event.rTime * 0.7f * m_speed;
|
||||||
|
|
||||||
|
@ -1526,7 +1583,7 @@ bool Gfx::CCamera::EventFrameOnBoard(const Event &event)
|
||||||
{
|
{
|
||||||
Math::Vector lookatPt, upVec;
|
Math::Vector lookatPt, upVec;
|
||||||
m_cameraObj->SetViewFromHere(m_eyePt, m_directionH, m_directionV,
|
m_cameraObj->SetViewFromHere(m_eyePt, m_directionH, m_directionV,
|
||||||
lookatPt, vUpVec, m_type);
|
lookatPt, upVec, m_type);
|
||||||
Math::Vector eye = m_effectOffset * 0.3f + m_eyePt;
|
Math::Vector eye = m_effectOffset * 0.3f + m_eyePt;
|
||||||
Math::Vector lookat = m_effectOffset * 0.3f + lookatPt;
|
Math::Vector lookat = m_effectOffset * 0.3f + lookatPt;
|
||||||
|
|
||||||
|
|
|
@ -353,13 +353,13 @@ protected:
|
||||||
float m_centeringTime;
|
float m_centeringTime;
|
||||||
float m_centeringProgress;
|
float m_centeringProgress;
|
||||||
|
|
||||||
CameraEffect m_effectType;
|
Gfx::CameraEffect m_effectType;
|
||||||
Math::Vector m_effectPos;
|
Math::Vector m_effectPos;
|
||||||
float m_effectForce;
|
float m_effectForce;
|
||||||
float m_effectProgress;
|
float m_effectProgress;
|
||||||
Math::Vector m_effectOffset;
|
Math::Vector m_effectOffset;
|
||||||
|
|
||||||
OverEffect m_overType;
|
Gfx::CameraOverEffect m_overType;
|
||||||
float m_overForce;
|
float m_overForce;
|
||||||
float m_overTime;
|
float m_overTime;
|
||||||
Gfx::Color m_overColorBase;
|
Gfx::Color m_overColorBase;
|
||||||
|
|
|
@ -55,16 +55,14 @@ Gfx::CCloud::~CCloud()
|
||||||
|
|
||||||
bool Gfx::CCloud::EventProcess(const Event &event)
|
bool Gfx::CCloud::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
/* TODO!
|
if ( event.type == EVENT_FRAME )
|
||||||
if ( event.event == EVENT_FRAME )
|
return EventFrame(event);
|
||||||
return EventFrame(event); */
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Gfx::CCloud::EventFrame(const Event &event)
|
bool Gfx::CCloud::EventFrame(const Event &event)
|
||||||
{
|
{
|
||||||
/* TODO!
|
|
||||||
if (m_engine->GetPause()) return true;
|
if (m_engine->GetPause()) return true;
|
||||||
|
|
||||||
m_time += event.rTime;
|
m_time += event.rTime;
|
||||||
|
@ -73,7 +71,7 @@ bool Gfx::CCloud::EventFrame(const Event &event)
|
||||||
|
|
||||||
if (m_time - m_lastTest < 0.2f) return true;
|
if (m_time - m_lastTest < 0.2f) return true;
|
||||||
|
|
||||||
m_lastTest = m_time; */
|
m_lastTest = m_time;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,16 @@
|
||||||
#include "common/key.h"
|
#include "common/key.h"
|
||||||
#include "common/logger.h"
|
#include "common/logger.h"
|
||||||
#include "graphics/core/device.h"
|
#include "graphics/core/device.h"
|
||||||
|
#include "graphics/engine/camera.h"
|
||||||
|
#include "graphics/engine/cloud.h"
|
||||||
#include "graphics/engine/lightman.h"
|
#include "graphics/engine/lightman.h"
|
||||||
|
#include "graphics/engine/lightning.h"
|
||||||
|
#include "graphics/engine/particle.h"
|
||||||
|
#include "graphics/engine/planet.h"
|
||||||
|
#include "graphics/engine/pyro.h"
|
||||||
|
#include "graphics/engine/terrain.h"
|
||||||
#include "graphics/engine/text.h"
|
#include "graphics/engine/text.h"
|
||||||
|
#include "graphics/engine/water.h"
|
||||||
#include "math/geometry.h"
|
#include "math/geometry.h"
|
||||||
|
|
||||||
// Initial size of various vectors
|
// Initial size of various vectors
|
||||||
|
@ -207,12 +215,11 @@ bool Gfx::CEngine::Create()
|
||||||
|
|
||||||
m_lightMan = new Gfx::CLightManager(m_iMan, this);
|
m_lightMan = new Gfx::CLightManager(m_iMan, this);
|
||||||
m_text = new Gfx::CText(m_iMan, this);
|
m_text = new Gfx::CText(m_iMan, this);
|
||||||
/* TODO:
|
|
||||||
m_particle = new Gfx::CParticle(m_iMan, this);
|
m_particle = new Gfx::CParticle(m_iMan, this);
|
||||||
m_water = new Gfx::CWater(m_iMan, this);
|
m_water = new Gfx::CWater(m_iMan, this);
|
||||||
m_cloud = new Gfx::CCloud(m_iMan, this);
|
m_cloud = new Gfx::CCloud(m_iMan, this);
|
||||||
m_lightning = new Gfx::CLightning(m_iMan, this);
|
m_lightning = new Gfx::CLightning(m_iMan, this);
|
||||||
m_planet = new Gfx::CPlanet(m_iMan, this);*/
|
m_planet = new Gfx::CPlanet(m_iMan, this);
|
||||||
|
|
||||||
m_text->SetDevice(m_device);
|
m_text->SetDevice(m_device);
|
||||||
if (! m_text->Create())
|
if (! m_text->Create())
|
||||||
|
@ -250,7 +257,6 @@ void Gfx::CEngine::Destroy()
|
||||||
delete m_text;
|
delete m_text;
|
||||||
m_text = nullptr;
|
m_text = nullptr;
|
||||||
|
|
||||||
/* TODO:
|
|
||||||
delete m_particle;
|
delete m_particle;
|
||||||
m_particle = nullptr;
|
m_particle = nullptr;
|
||||||
|
|
||||||
|
@ -264,7 +270,7 @@ void Gfx::CEngine::Destroy()
|
||||||
m_lightning = nullptr;
|
m_lightning = nullptr;
|
||||||
|
|
||||||
delete m_planet;
|
delete m_planet;
|
||||||
m_planet = nullptr;*/
|
m_planet = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gfx::CEngine::ResetAfterDeviceChanged()
|
void Gfx::CEngine::ResetAfterDeviceChanged()
|
||||||
|
@ -807,3 +813,118 @@ bool Gfx::CEngine::GetShowStat()
|
||||||
return m_showStats;
|
return m_showStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetFocus(float focus)
|
||||||
|
{
|
||||||
|
m_focus = focus;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetOverColor(const Gfx::Color& color, int mode)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetFogColor(const Gfx::Color& color, int rank)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
Gfx::Color Gfx::CEngine::GetFogColor(int rank)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return Gfx::Color();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetViewParams(const Math::Vector& eyePt, const Math::Vector& lookatPt,
|
||||||
|
const Math::Vector& upVec, float eyeDistance)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetRankView(int rank)
|
||||||
|
{
|
||||||
|
m_rankView = rank;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Gfx::CEngine::GetEyeDirH()
|
||||||
|
{
|
||||||
|
return m_eyeDirH;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Gfx::CEngine::GetEyeDirV()
|
||||||
|
{
|
||||||
|
return m_eyeDirV;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Gfx::CEngine::GetClippingDistance()
|
||||||
|
{
|
||||||
|
return m_clippingDistance;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::GetGroundSpot()
|
||||||
|
{
|
||||||
|
return m_groundSpotVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetTerrain(Gfx::CTerrain* terrain)
|
||||||
|
{
|
||||||
|
m_terrain = terrain;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::SetTerrainVision(float vision)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::LoadTexture(const std::string& name, int stage)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Gfx::CEngine::ParticleAdapt(float factor)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::SetObjectType(int objRank, Gfx::EngineObjectType type)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::SetObjectTransform(int objRank, const Math::Matrix& transform)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CEngine::CreateObject()
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::DeleteObject(int objRank)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CEngine::GroundMarkCreate(Math::Vector pos, float radius, float delay1, float delay2, float delay3, int dx, int dy, char* table)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CEngine::AddQuick(int objRank, const Gfx::EngineObjLevel5& buffer, std::string texName1, std::string texName2, float min, float max, bool globalUpdate)
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CEngine::Update()
|
||||||
|
{
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
|
@ -170,7 +170,10 @@ struct EngineObjLevel5
|
||||||
Gfx::EngineTriangleType type;
|
Gfx::EngineTriangleType type;
|
||||||
std::vector<Gfx::VertexTex2> vertices;
|
std::vector<Gfx::VertexTex2> vertices;
|
||||||
|
|
||||||
EngineObjLevel5();
|
EngineObjLevel5()
|
||||||
|
{
|
||||||
|
state = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -182,7 +185,10 @@ struct EngineObjLevel4
|
||||||
std::vector<Gfx::EngineObjLevel5> up;
|
std::vector<Gfx::EngineObjLevel5> up;
|
||||||
Gfx::EngineObjLevel3* down;
|
Gfx::EngineObjLevel3* down;
|
||||||
|
|
||||||
EngineObjLevel4();
|
EngineObjLevel4()
|
||||||
|
{
|
||||||
|
reserved = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -195,7 +201,10 @@ struct EngineObjLevel3
|
||||||
std::vector<Gfx::EngineObjLevel4> up;
|
std::vector<Gfx::EngineObjLevel4> up;
|
||||||
Gfx::EngineObjLevel2* down;
|
Gfx::EngineObjLevel2* down;
|
||||||
|
|
||||||
EngineObjLevel3();
|
EngineObjLevel3()
|
||||||
|
{
|
||||||
|
min = max = 0.0f;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,7 +216,10 @@ struct EngineObjLevel2
|
||||||
std::vector<Gfx::EngineObjLevel3> up;
|
std::vector<Gfx::EngineObjLevel3> up;
|
||||||
Gfx::EngineObjLevel1* down;
|
Gfx::EngineObjLevel1* down;
|
||||||
|
|
||||||
EngineObjLevel2();
|
EngineObjLevel2()
|
||||||
|
{
|
||||||
|
objRank = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -219,7 +231,7 @@ struct EngineObjLevel1
|
||||||
Gfx::Texture tex2;
|
Gfx::Texture tex2;
|
||||||
std::vector<Gfx::EngineObjLevel2> up;
|
std::vector<Gfx::EngineObjLevel2> up;
|
||||||
|
|
||||||
EngineObjLevel1();
|
EngineObjLevel1() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,5 +19,71 @@
|
||||||
|
|
||||||
#include "graphics/engine/lightning.h"
|
#include "graphics/engine/lightning.h"
|
||||||
|
|
||||||
|
#include "common/logger.h"
|
||||||
|
|
||||||
// TODO implementation
|
|
||||||
|
Gfx::CLightning::CLightning(CInstanceManager* iMan, Gfx::CEngine* engine)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::CLightning() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
Gfx::CLightning::~CLightning()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::~CLightning() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CLightning::Flush()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::Flush() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CLightning::EventProcess(const Event &event)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::EventProcess() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CLightning::Create(float sleep, float delay, float magnetic)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::Create() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CLightning::GetStatus(float &sleep, float &delay, float &magnetic, float &progress)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::GetStatus() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CLightning::SetStatus(float sleep, float delay, float magnetic, float progress)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::SetStatus() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CLightning::Draw()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::Draw() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CLightning::EventFrame(const Event &event)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::EventFrame() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* Gfx::CLightning::SearchObject(Math::Vector pos)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CLightning::SearchObject() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ protected:
|
||||||
float m_sleep;
|
float m_sleep;
|
||||||
float m_delay;
|
float m_delay;
|
||||||
float m_magnetic;
|
float m_magnetic;
|
||||||
BlitzPhase m_phase;
|
Gfx::BlitzPhase m_phase;
|
||||||
float m_time;
|
float m_time;
|
||||||
float m_speed;
|
float m_speed;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
|
|
|
@ -19,5 +19,284 @@
|
||||||
|
|
||||||
#include "graphics/engine/particle.h"
|
#include "graphics/engine/particle.h"
|
||||||
|
|
||||||
|
#include "common/logger.h"
|
||||||
|
|
||||||
// TODO implementation
|
|
||||||
|
Gfx::CParticle::CParticle(CInstanceManager* iMan, Gfx::CEngine* engine)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
Gfx::CParticle::~CParticle()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::~CParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetDevice(Gfx::CDevice* device)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetDevice() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::FlushParticle()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::FlushParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::FlushParticle(int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::FlushParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CParticle::CreateParticle(Math::Vector pos, Math::Vector speed, Math::Point dim,
|
||||||
|
Gfx::ParticleType type, float duration, float mass,
|
||||||
|
float windSensitivity, int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreateParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CParticle::CreateFrag(Math::Vector pos, Math::Vector speed, Gfx::EngineTriangle *triangle,
|
||||||
|
Gfx::ParticleType type, float duration, float mass,
|
||||||
|
float windSensitivity, int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreateFrag() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CParticle::CreatePart(Math::Vector pos, Math::Vector speed, Gfx::ParticleType type,
|
||||||
|
float duration, float mass, float weight,
|
||||||
|
float windSensitivity, int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreatePart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CParticle::CreateRay(Math::Vector pos, Math::Vector goal, Gfx::ParticleType type, Math::Point dim,
|
||||||
|
float duration, int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreateRay() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Gfx::CParticle::CreateTrack(Math::Vector pos, Math::Vector speed, Math::Point dim, Gfx::ParticleType type,
|
||||||
|
float duration, float mass, float length, float width)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreateTrack() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::CreateWheelTrace(const Math::Vector &p1, const Math::Vector &p2, const Math::Vector &p3,
|
||||||
|
const Math::Vector &p4, Gfx::ParticleType type)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CreateWheelTrace() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DeleteParticle(Gfx::ParticleType type)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DeleteParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DeleteParticle(int channel)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DeleteParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetObjectLink(int channel, CObject *object)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetObjectLink() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetObjectFather(int channel, CObject *object)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetObjectFather() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetPosition(int channel, Math::Vector pos)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetPosition() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetDimension(int channel, Math::Point dim)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetDimension() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetZoom(int channel, float zoom)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetZoom() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetAngle(int channel, float angle)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetAngle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetIntensity(int channel, float intensity)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetIntensity() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetParam(int channel, Math::Vector pos, Math::Point dim, float zoom, float angle, float intensity)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetParam() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetPhase(int channel, Gfx::ParticlePhase phase, float duration)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetPhase() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CParticle::GetPosition(int channel, Math::Vector &pos)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::GetPosition() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Gfx::Color Gfx::CParticle::GetFogColor(Math::Vector pos)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::GetFogColor() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return Gfx::Color();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::SetFrameUpdate(int sheet, bool update)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SetFrameUpdate() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::FrameParticle(float rTime)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::FrameParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticle(int sheet)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CParticle::WriteWheelTrace(char *filename, int width, int height, Math::Vector dl, Math::Vector ur)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::WriteWheelTrace() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DeleteRank(int rank)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DeleteRank() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CParticle::CheckChannel(int &channel)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CheckChannel() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleTriangle(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleTriangle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleNorm(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleNorm() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleFlat(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleFlat() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleFog(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleFog() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleRay(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleRay() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleSphere(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleSphere() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleCylinder(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleCylinder() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::DrawParticleWheel(int i)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::DrawParticleWheel() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* Gfx::CParticle::SearchObjectGun(Math::Vector old, Math::Vector pos, Gfx::ParticleType type, CObject *father)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SearchObjectGun() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* Gfx::CParticle::SearchObjectRay(Math::Vector pos, Math::Vector goal, Gfx::ParticleType type, CObject *father)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::SearchObjectRay() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::Play(Sound sound, Math::Vector pos, float amplitude)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::Play() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CParticle::TrackMove(int i, Math::Vector pos, float progress)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::TrackMove() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CParticle::TrackDraw(int i, Gfx::ParticleType type)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::TrackDraw() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
|
@ -202,8 +202,8 @@ enum ParticlePhase
|
||||||
|
|
||||||
struct Particle
|
struct Particle
|
||||||
{
|
{
|
||||||
char bUsed; // TRUE -> particle used
|
char used; // TRUE -> particle used
|
||||||
char bRay; // TRUE -> ray with goal
|
char ray; // TRUE -> ray with goal
|
||||||
unsigned short uniqueStamp; // unique mark
|
unsigned short uniqueStamp; // unique mark
|
||||||
short sheet; // sheet (0..n)
|
short sheet; // sheet (0..n)
|
||||||
ParticleType type; // type PARTI*
|
ParticleType type; // type PARTI*
|
||||||
|
@ -212,7 +212,7 @@ struct Particle
|
||||||
float weight; // weight of the particle (for noise)
|
float weight; // weight of the particle (for noise)
|
||||||
float duration; // length of life
|
float duration; // length of life
|
||||||
Math::Vector pos; // absolute position (relative if object links)
|
Math::Vector pos; // absolute position (relative if object links)
|
||||||
Math::Vector goal; // goal position (if bRay)
|
Math::Vector goal; // goal position (if ray)
|
||||||
Math::Vector speed; // speed of displacement
|
Math::Vector speed; // speed of displacement
|
||||||
float windSensitivity;
|
float windSensitivity;
|
||||||
short bounce; // number of rebounds
|
short bounce; // number of rebounds
|
||||||
|
@ -233,13 +233,13 @@ struct Particle
|
||||||
|
|
||||||
struct Track
|
struct Track
|
||||||
{
|
{
|
||||||
char bUsed; // TRUE -> drag used
|
char used; // TRUE -> drag used
|
||||||
char bDrawParticle;
|
char drawParticle;
|
||||||
float step; // duration of not
|
float step; // duration of not
|
||||||
float last; // increase last not memorized
|
float last; // increase last not memorized
|
||||||
float intensity; // intensity at starting (0..1)
|
float intensity; // intensity at starting (0..1)
|
||||||
float width; // tail width
|
float width; // tail width
|
||||||
int used; // number of positions in "pos"
|
int posUsed; // number of positions in "pos"
|
||||||
int head; // head to write index
|
int head; // head to write index
|
||||||
Math::Vector pos[MAXTRACKLEN];
|
Math::Vector pos[MAXTRACKLEN];
|
||||||
float len[MAXTRACKLEN];
|
float len[MAXTRACKLEN];
|
||||||
|
@ -257,20 +257,29 @@ struct WheelTrace
|
||||||
class CParticle
|
class CParticle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CParticle(CInstanceManager* iMan, CEngine* engine);
|
CParticle(CInstanceManager* iMan, Gfx::CEngine* engine);
|
||||||
~CParticle();
|
~CParticle();
|
||||||
|
|
||||||
void SetDevice(CDevice* device);
|
void SetDevice(Gfx::CDevice* device);
|
||||||
|
|
||||||
void FlushParticle();
|
void FlushParticle();
|
||||||
void FlushParticle(int sheet);
|
void FlushParticle(int sheet);
|
||||||
int CreateParticle(Math::Vector pos, Math::Vector speed, Math::Point dim, ParticleType type, float duration=1.0f, float mass=0.0f, float windSensitivity=1.0f, int sheet=0);
|
int CreateParticle(Math::Vector pos, Math::Vector speed, Math::Point dim,
|
||||||
int CreateFrag(Math::Vector pos, Math::Vector speed, Gfx::EngineTriangle *triangle, ParticleType type, float duration=1.0f, float mass=0.0f, float windSensitivity=1.0f, int sheet=0);
|
Gfx::ParticleType type, float duration=1.0f, float mass=0.0f,
|
||||||
int CreatePart(Math::Vector pos, Math::Vector speed, ParticleType type, float duration=1.0f, float mass=0.0f, float weight=0.0f, float windSensitivity=1.0f, int sheet=0);
|
float windSensitivity=1.0f, int sheet=0);
|
||||||
int CreateRay(Math::Vector pos, Math::Vector goal, ParticleType type, Math::Point dim, float duration=1.0f, int sheet=0);
|
int CreateFrag(Math::Vector pos, Math::Vector speed, Gfx::EngineTriangle *triangle,
|
||||||
int CreateTrack(Math::Vector pos, Math::Vector speed, Math::Point dim, ParticleType type, float duration=1.0f, float mass=0.0f, float length=10.0f, float width=1.0f);
|
Gfx::ParticleType type, float duration=1.0f, float mass=0.0f,
|
||||||
void CreateWheelTrace(const Math::Vector &p1, const Math::Vector &p2, const Math::Vector &p3, const Math::Vector &p4, ParticleType type);
|
float windSensitivity=1.0f, int sheet=0);
|
||||||
void DeleteParticle(ParticleType type);
|
int CreatePart(Math::Vector pos, Math::Vector speed, Gfx::ParticleType type,
|
||||||
|
float duration=1.0f, float mass=0.0f, float weight=0.0f,
|
||||||
|
float windSensitivity=1.0f, int sheet=0);
|
||||||
|
int CreateRay(Math::Vector pos, Math::Vector goal, Gfx::ParticleType type, Math::Point dim,
|
||||||
|
float duration=1.0f, int sheet=0);
|
||||||
|
int CreateTrack(Math::Vector pos, Math::Vector speed, Math::Point dim, Gfx::ParticleType type,
|
||||||
|
float duration=1.0f, float mass=0.0f, float length=10.0f, float width=1.0f);
|
||||||
|
void CreateWheelTrace(const Math::Vector &p1, const Math::Vector &p2, const Math::Vector &p3,
|
||||||
|
const Math::Vector &p4, Gfx::ParticleType type);
|
||||||
|
void DeleteParticle(Gfx::ParticleType type);
|
||||||
void DeleteParticle(int channel);
|
void DeleteParticle(int channel);
|
||||||
void SetObjectLink(int channel, CObject *object);
|
void SetObjectLink(int channel, CObject *object);
|
||||||
void SetObjectFather(int channel, CObject *object);
|
void SetObjectFather(int channel, CObject *object);
|
||||||
|
@ -280,12 +289,12 @@ public:
|
||||||
void SetAngle(int channel, float angle);
|
void SetAngle(int channel, float angle);
|
||||||
void SetIntensity(int channel, float intensity);
|
void SetIntensity(int channel, float intensity);
|
||||||
void SetParam(int channel, Math::Vector pos, Math::Point dim, float zoom, float angle, float intensity);
|
void SetParam(int channel, Math::Vector pos, Math::Point dim, float zoom, float angle, float intensity);
|
||||||
void SetPhase(int channel, ParticlePhase phase, float duration);
|
void SetPhase(int channel, Gfx::ParticlePhase phase, float duration);
|
||||||
bool GetPosition(int channel, Math::Vector &pos);
|
bool GetPosition(int channel, Math::Vector &pos);
|
||||||
|
|
||||||
Gfx::Color GetFogColor(Math::Vector pos);
|
Gfx::Color GetFogColor(Math::Vector pos);
|
||||||
|
|
||||||
void SetFrameUpdate(int sheet, bool bUpdate);
|
void SetFrameUpdate(int sheet, bool update);
|
||||||
void FrameParticle(float rTime);
|
void FrameParticle(float rTime);
|
||||||
void DrawParticle(int sheet);
|
void DrawParticle(int sheet);
|
||||||
|
|
||||||
|
@ -302,29 +311,29 @@ protected:
|
||||||
void DrawParticleSphere(int i);
|
void DrawParticleSphere(int i);
|
||||||
void DrawParticleCylinder(int i);
|
void DrawParticleCylinder(int i);
|
||||||
void DrawParticleWheel(int i);
|
void DrawParticleWheel(int i);
|
||||||
CObject* SearchObjectGun(Math::Vector old, Math::Vector pos, ParticleType type, CObject *father);
|
CObject* SearchObjectGun(Math::Vector old, Math::Vector pos, Gfx::ParticleType type, CObject *father);
|
||||||
CObject* SearchObjectRay(Math::Vector pos, Math::Vector goal, ParticleType type, CObject *father);
|
CObject* SearchObjectRay(Math::Vector pos, Math::Vector goal, Gfx::ParticleType type, CObject *father);
|
||||||
void Play(Sound sound, Math::Vector pos, float amplitude);
|
void Play(Sound sound, Math::Vector pos, float amplitude);
|
||||||
bool TrackMove(int i, Math::Vector pos, float progress);
|
bool TrackMove(int i, Math::Vector pos, float progress);
|
||||||
void TrackDraw(int i, ParticleType type);
|
void TrackDraw(int i, Gfx::ParticleType type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CInstanceManager* m_iMan;
|
CInstanceManager* m_iMan;
|
||||||
CEngine* m_engine;
|
Gfx::CEngine* m_engine;
|
||||||
CDevice* m_device;
|
Gfx::CDevice* m_device;
|
||||||
|
Gfx::CTerrain* m_terrain;
|
||||||
|
Gfx::CWater* m_water;
|
||||||
CRobotMain* m_main;
|
CRobotMain* m_main;
|
||||||
CTerrain* m_terrain;
|
|
||||||
CWater* m_water;
|
|
||||||
CSound* m_sound;
|
CSound* m_sound;
|
||||||
|
|
||||||
Gfx::Particle m_particule[MAXPARTICULE*MAXPARTITYPE];
|
Gfx::Particle m_particule[MAXPARTICULE*MAXPARTITYPE];
|
||||||
Gfx::EngineTriangle m_triangle[MAXPARTICULE]; // triangle if PartiType == 0
|
Gfx::EngineTriangle m_triangle[MAXPARTICULE]; // triangle if PartiType == 0
|
||||||
Track m_track[MAXTRACK];
|
Gfx::Track m_track[MAXTRACK];
|
||||||
int m_wheelTraceTotal;
|
int m_wheelTraceTotal;
|
||||||
int m_wheelTraceIndex;
|
int m_wheelTraceIndex;
|
||||||
WheelTrace m_wheelTrace[MAXWHEELTRACE];
|
Gfx::WheelTrace m_wheelTrace[MAXWHEELTRACE];
|
||||||
int m_totalInterface[MAXPARTITYPE][SH_MAX];
|
int m_totalInterface[MAXPARTITYPE][SH_MAX];
|
||||||
bool m_bFrameUpdate[SH_MAX];
|
bool m_frameUpdate[SH_MAX];
|
||||||
int m_fogTotal;
|
int m_fogTotal;
|
||||||
int m_fog[MAXPARTIFOG];
|
int m_fog[MAXPARTIFOG];
|
||||||
int m_uniqueStamp;
|
int m_uniqueStamp;
|
||||||
|
|
|
@ -19,5 +19,161 @@
|
||||||
|
|
||||||
#include "graphics/engine/pyro.h"
|
#include "graphics/engine/pyro.h"
|
||||||
|
|
||||||
|
#include "common/logger.h"
|
||||||
|
|
||||||
// TODO implementation
|
|
||||||
|
Gfx::CPyro::CPyro(CInstanceManager* iMan)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CParticle::CPyro() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
Gfx::CPyro::~CPyro()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::~CPyro() stub!");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::DeleteObject(bool all)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::DeleteObject() stub!");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CPyro::Create(Gfx::PyroType type, CObject* pObj, float force)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::Create() stub!");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CPyro::EventProcess(const Event &event)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::EventProcess() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Error Gfx::CPyro::IsEnded()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::IsEnded() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return ERR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::CutObjectLink(CObject* pObj)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::CutObjectLink() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::DisplayError(PyroType type, CObject* pObj)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::DisplayError() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CPyro::CreateLight(Math::Vector pos, float height)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::CreateLight() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::DeleteObject(bool primary, bool secondary)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::DeleteObject() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::CreateTriangle(CObject* pObj, ObjectType oType, int part)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::CreateTriangle() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::ExploStart()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::ExploStart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
void Gfx::CPyro::ExploTerminate()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::ExploTerminate() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::BurnStart()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::BurnStart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::BurnAddPart(int part, Math::Vector pos, Math::Vector angle)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::BurnAddPart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::BurnProgress()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::BurnProgress() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Gfx::CPyro::BurnIsKeepPart(int part)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::BurnIsKeepPart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::BurnTerminate()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::BurnTerminate() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::FallStart()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::FallStart() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
CObject* Gfx::CPyro::FallSearchBeeExplo()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::FallSearchBeeExplo() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::FallProgress(float rTime)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::FallProgress() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
Error Gfx::CPyro::FallIsEnded()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::FallIsEnded() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
return ERR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::LightOperFlush()
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::LightOperFlush() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::LightOperAdd(float progress, float intensity, float r, float g, float b)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::LightOperAdd() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
void Gfx::CPyro::LightOperFrame(float rTime)
|
||||||
|
{
|
||||||
|
GetLogger()->Info("CPyro::LightOperFrame() stub!\n");
|
||||||
|
// TODO!
|
||||||
|
}
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
|
|
||||||
#include "common/misc.h"
|
#include "common/misc.h"
|
||||||
#include "graphics/engine/engine.h"
|
#include "graphics/engine/engine.h"
|
||||||
//#include "object/object.h"
|
#include "object/object.h"
|
||||||
// TEMPORARILY!
|
|
||||||
enum ObjectType {};
|
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
|
@ -90,13 +88,14 @@ struct PyroLightOper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CPyro {
|
class CPyro
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
CPyro(CInstanceManager* iMan);
|
CPyro(CInstanceManager* iMan);
|
||||||
~CPyro();
|
~CPyro();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool all=false);
|
||||||
bool Create(PyroType type, CObject* pObj, float force=1.0f);
|
bool Create(Gfx::PyroType type, CObject* pObj, float force=1.0f);
|
||||||
bool EventProcess(const Event &event);
|
bool EventProcess(const Event &event);
|
||||||
Error IsEnded();
|
Error IsEnded();
|
||||||
void CutObjectLink(CObject* pObj);
|
void CutObjectLink(CObject* pObj);
|
||||||
|
@ -104,7 +103,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void DisplayError(PyroType type, CObject* pObj);
|
void DisplayError(PyroType type, CObject* pObj);
|
||||||
bool CreateLight(Math::Vector pos, float height);
|
bool CreateLight(Math::Vector pos, float height);
|
||||||
void DeleteObject(bool bPrimary, bool bSecondary);
|
void DeleteObject(bool primary, bool secondary);
|
||||||
|
|
||||||
void CreateTriangle(CObject* pObj, ObjectType oType, int part);
|
void CreateTriangle(CObject* pObj, ObjectType oType, int part);
|
||||||
|
|
||||||
|
@ -128,11 +127,11 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CInstanceManager* m_iMan;
|
CInstanceManager* m_iMan;
|
||||||
CEngine* m_engine;
|
Gfx::CEngine* m_engine;
|
||||||
CTerrain* m_terrain;
|
Gfx::CTerrain* m_terrain;
|
||||||
CCamera* m_camera;
|
Gfx::CCamera* m_camera;
|
||||||
CParticle* m_particule;
|
Gfx::CParticle* m_particule;
|
||||||
CLight* m_light;
|
Gfx::CLightManager* m_lightMan;
|
||||||
CObject* m_object;
|
CObject* m_object;
|
||||||
CDisplayText* m_displayText;
|
CDisplayText* m_displayText;
|
||||||
CRobotMain* m_main;
|
CRobotMain* m_main;
|
||||||
|
@ -140,8 +139,8 @@ protected:
|
||||||
|
|
||||||
Math::Vector m_pos; // center of the effect
|
Math::Vector m_pos; // center of the effect
|
||||||
Math::Vector m_posPower; // center of the battery
|
Math::Vector m_posPower; // center of the battery
|
||||||
bool m_bPower; // battery exists?
|
bool m_power; // battery exists?
|
||||||
PyroType m_type;
|
Gfx::PyroType m_type;
|
||||||
float m_force;
|
float m_force;
|
||||||
float m_size;
|
float m_size;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
|
@ -153,19 +152,19 @@ protected:
|
||||||
|
|
||||||
int m_lightRank;
|
int m_lightRank;
|
||||||
int m_lightOperTotal;
|
int m_lightOperTotal;
|
||||||
PyroLightOper m_lightOper[10];
|
Gfx::PyroLightOper m_lightOper[10];
|
||||||
float m_lightHeight;
|
float m_lightHeight;
|
||||||
|
|
||||||
ObjectType m_burnType;
|
ObjectType m_burnType;
|
||||||
int m_burnPartTotal;
|
int m_burnPartTotal;
|
||||||
PyroBurnPart m_burnPart[10];
|
Gfx::PyroBurnPart m_burnPart[10];
|
||||||
int m_burnKeepPart[10];
|
int m_burnKeepPart[10];
|
||||||
float m_burnFall;
|
float m_burnFall;
|
||||||
|
|
||||||
float m_fallFloor;
|
float m_fallFloor;
|
||||||
float m_fallSpeed;
|
float m_fallSpeed;
|
||||||
float m_fallBulletTime;
|
float m_fallBulletTime;
|
||||||
bool m_bFallEnding;
|
bool m_fallEnding;
|
||||||
|
|
||||||
int m_crashSphereUsed; // number of spheres used
|
int m_crashSphereUsed; // number of spheres used
|
||||||
Math::Vector m_crashSpherePos[50];
|
Math::Vector m_crashSpherePos[50];
|
||||||
|
|
|
@ -66,16 +66,14 @@ Gfx::CWater::~CWater()
|
||||||
|
|
||||||
bool Gfx::CWater::EventProcess(const Event &event)
|
bool Gfx::CWater::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
/* TODO!
|
|
||||||
if (event.type == EVENT_FRAME)
|
if (event.type == EVENT_FRAME)
|
||||||
return EventFrame(event);
|
return EventFrame(event);
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Gfx::CWater::EventFrame(const Event &event)
|
bool Gfx::CWater::EventFrame(const Event &event)
|
||||||
{
|
{
|
||||||
/* TODO!
|
|
||||||
if (m_engine->GetPause()) return true;
|
if (m_engine->GetPause()) return true;
|
||||||
|
|
||||||
m_time += event.rTime;
|
m_time += event.rTime;
|
||||||
|
@ -83,7 +81,7 @@ bool Gfx::CWater::EventFrame(const Event &event)
|
||||||
if (m_type[0] == WATER_NULL) return true;
|
if (m_type[0] == WATER_NULL) return true;
|
||||||
|
|
||||||
if (m_lava)
|
if (m_lava)
|
||||||
LavaFrame(event.rTime);*/
|
LavaFrame(event.rTime);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "old/d3dengine.h"
|
#include "graphics/engine/engine.h"
|
||||||
#include "old/camera.h"
|
#include "graphics/engine/camera.h"
|
||||||
#include "old/sound.h"
|
#include "sound/sound.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
|
@ -377,16 +377,16 @@ public:
|
||||||
int CreatePart();
|
int CreatePart();
|
||||||
void DeletePart(int part);
|
void DeletePart(int part);
|
||||||
void SetObjectRank(int part, int objRank);
|
void SetObjectRank(int part, int objRank);
|
||||||
int RetObjectRank(int part);
|
int GetObjectRank(int part);
|
||||||
void SetObjectParent(int part, int parent);
|
void SetObjectParent(int part, int parent);
|
||||||
void SetType(ObjectType type);
|
void SetType(ObjectType type);
|
||||||
ObjectType RetType();
|
ObjectType GetType();
|
||||||
char* RetName();
|
char* GetName();
|
||||||
void SetOption(int option);
|
void SetOption(int option);
|
||||||
int RetOption();
|
int GetOption();
|
||||||
|
|
||||||
void SetID(int id);
|
void SetID(int id);
|
||||||
int RetID();
|
int GetID();
|
||||||
|
|
||||||
bool Write(char *line);
|
bool Write(char *line);
|
||||||
bool Read(char *line);
|
bool Read(char *line);
|
||||||
|
@ -413,203 +413,205 @@ public:
|
||||||
bool WriteProgram(int rank, char* filename);
|
bool WriteProgram(int rank, char* filename);
|
||||||
bool RunProgram(int rank);
|
bool RunProgram(int rank);
|
||||||
|
|
||||||
int RetShadowLight();
|
int GetShadowLight();
|
||||||
int RetEffectLight();
|
int GetEffectLight();
|
||||||
|
|
||||||
void FlushCrashShere();
|
void FlushCrashShere();
|
||||||
int CreateCrashSphere(Math::Vector pos, float radius, Sound sound, float hardness=0.45f);
|
int CreateCrashSphere(Math::Vector pos, float radius, Sound sound, float hardness=0.45f);
|
||||||
int RetCrashSphereTotal();
|
int GetCrashSphereTotal();
|
||||||
bool GetCrashSphere(int rank, Math::Vector &pos, float &radius);
|
bool GetCrashSphere(int rank, Math::Vector &pos, float &radius);
|
||||||
float RetCrashSphereHardness(int rank);
|
float GetCrashSphereHardness(int rank);
|
||||||
Sound RetCrashSphereSound(int rank);
|
Sound GetCrashSphereSound(int rank);
|
||||||
void DeleteCrashSphere(int rank);
|
void DeleteCrashSphere(int rank);
|
||||||
void SetGlobalSphere(Math::Vector pos, float radius);
|
void SetGlobalSphere(Math::Vector pos, float radius);
|
||||||
void GetGlobalSphere(Math::Vector &pos, float &radius);
|
void GetGlobalSphere(Math::Vector &pos, float &radius);
|
||||||
void SetJotlerSphere(Math::Vector pos, float radius);
|
void SetJotlerSphere(Math::Vector pos, float radius);
|
||||||
void GetJotlerSphere(Math::Vector &pos, float &radius);
|
void GetJotlerSphere(Math::Vector &pos, float &radius);
|
||||||
void SetShieldRadius(float radius);
|
void SetShieldRadius(float radius);
|
||||||
float RetShieldRadius();
|
float GetShieldRadius();
|
||||||
|
|
||||||
void SetFloorHeight(float height);
|
void SetFloorHeight(float height);
|
||||||
void FloorAdjust();
|
void FloorAdjust();
|
||||||
|
|
||||||
void SetLinVibration(Math::Vector dir);
|
void SetLinVibration(Math::Vector dir);
|
||||||
Math::Vector RetLinVibration();
|
Math::Vector GetLinVibration();
|
||||||
void SetCirVibration(Math::Vector dir);
|
void SetCirVibration(Math::Vector dir);
|
||||||
Math::Vector RetCirVibration();
|
Math::Vector GetCirVibration();
|
||||||
void SetInclinaison(Math::Vector dir);
|
void SetInclinaison(Math::Vector dir);
|
||||||
Math::Vector RetInclinaison();
|
Math::Vector GetInclinaison();
|
||||||
|
|
||||||
void SetPosition(int part, const Math::Vector &pos);
|
void SetPosition(int part, const Math::Vector &pos);
|
||||||
Math::Vector RetPosition(int part);
|
Math::Vector GetPosition(int part);
|
||||||
void SetAngle(int part, const Math::Vector &angle);
|
void SetAngle(int part, const Math::Vector &angle);
|
||||||
Math::Vector RetAngle(int part);
|
Math::Vector GetAngle(int part);
|
||||||
void SetAngleY(int part, float angle);
|
void SetAngleY(int part, float angle);
|
||||||
void SetAngleX(int part, float angle);
|
void SetAngleX(int part, float angle);
|
||||||
void SetAngleZ(int part, float angle);
|
void SetAngleZ(int part, float angle);
|
||||||
float RetAngleY(int part);
|
float GetAngleY(int part);
|
||||||
float RetAngleX(int part);
|
float GetAngleX(int part);
|
||||||
float RetAngleZ(int part);
|
float GetAngleZ(int part);
|
||||||
void SetZoom(int part, float zoom);
|
void SetZoom(int part, float zoom);
|
||||||
void SetZoom(int part, Math::Vector zoom);
|
void SetZoom(int part, Math::Vector zoom);
|
||||||
Math::Vector RetZoom(int part);
|
Math::Vector GetZoom(int part);
|
||||||
void SetZoomX(int part, float zoom);
|
void SetZoomX(int part, float zoom);
|
||||||
float RetZoomX(int part);
|
float GetZoomX(int part);
|
||||||
void SetZoomY(int part, float zoom);
|
void SetZoomY(int part, float zoom);
|
||||||
float RetZoomY(int part);
|
float GetZoomY(int part);
|
||||||
void SetZoomZ(int part, float zoom);
|
void SetZoomZ(int part, float zoom);
|
||||||
float RetZoomZ(int part);
|
float GetZoomZ(int part);
|
||||||
|
|
||||||
float RetWaterLevel();
|
float GetWaterLevel();
|
||||||
|
|
||||||
void SetTrainer(bool bEnable);
|
void SetTrainer(bool bEnable);
|
||||||
bool RetTrainer();
|
bool GetTrainer();
|
||||||
|
|
||||||
void SetToy(bool bEnable);
|
void SetToy(bool bEnable);
|
||||||
bool RetToy();
|
bool GetToy();
|
||||||
|
|
||||||
void SetManual(bool bManual);
|
void SetManual(bool bManual);
|
||||||
bool RetManual();
|
bool GetManual();
|
||||||
|
|
||||||
void SetResetCap(ResetCap cap);
|
void SetResetCap(ResetCap cap);
|
||||||
ResetCap RetResetCap();
|
ResetCap GetResetCap();
|
||||||
void SetResetBusy(bool bBusy);
|
void SetResetBusy(bool bBusy);
|
||||||
bool RetResetBusy();
|
bool GetResetBusy();
|
||||||
void SetResetPosition(const Math::Vector &pos);
|
void SetResetPosition(const Math::Vector &pos);
|
||||||
Math::Vector RetResetPosition();
|
Math::Vector GetResetPosition();
|
||||||
void SetResetAngle(const Math::Vector &angle);
|
void SetResetAngle(const Math::Vector &angle);
|
||||||
Math::Vector RetResetAngle();
|
Math::Vector GetResetAngle();
|
||||||
void SetResetRun(int run);
|
void SetResetRun(int run);
|
||||||
int RetResetRun();
|
int GetResetRun();
|
||||||
|
|
||||||
void SetMasterParticule(int part, int parti);
|
void SetMasterParticule(int part, int parti);
|
||||||
int RetMasterParticule(int part);
|
int GetMasterParticule(int part);
|
||||||
|
|
||||||
void SetPower(CObject* power);
|
void SetPower(CObject* power);
|
||||||
CObject* RetPower();
|
CObject* GetPower();
|
||||||
void SetFret(CObject* fret);
|
void SetFret(CObject* fret);
|
||||||
CObject* RetFret();
|
CObject* GetFret();
|
||||||
void SetTruck(CObject* truck);
|
void SetTruck(CObject* truck);
|
||||||
CObject* RetTruck();
|
CObject* GetTruck();
|
||||||
void SetTruckPart(int part);
|
void SetTruckPart(int part);
|
||||||
int RetTruckPart();
|
int GetTruckPart();
|
||||||
|
|
||||||
void InfoFlush();
|
void InfoFlush();
|
||||||
void DeleteInfo(int rank);
|
void DeleteInfo(int rank);
|
||||||
void SetInfo(int rank, Info info);
|
void SetInfo(int rank, Info info);
|
||||||
Info RetInfo(int rank);
|
Info GetInfo(int rank);
|
||||||
int RetInfoTotal();
|
int GetInfoTotal();
|
||||||
void SetInfoReturn(float value);
|
void SetInfoGeturn(float value);
|
||||||
float RetInfoReturn();
|
float GetInfoGeturn();
|
||||||
void SetInfoUpdate(bool bUpdate);
|
void SetInfoUpdate(bool bUpdate);
|
||||||
bool RetInfoUpdate();
|
bool GetInfoUpdate();
|
||||||
|
|
||||||
bool SetCmdLine(int rank, float value);
|
bool SetCmdLine(int rank, float value);
|
||||||
float RetCmdLine(int rank);
|
float GetCmdLine(int rank);
|
||||||
|
|
||||||
Math::Matrix* RetRotateMatrix(int part);
|
Math::Matrix* GetRotateMatrix(int part);
|
||||||
Math::Matrix* RetTranslateMatrix(int part);
|
Math::Matrix* GetTranslateMatrix(int part);
|
||||||
Math::Matrix* RetTransformMatrix(int part);
|
Math::Matrix* GetTransformMatrix(int part);
|
||||||
Math::Matrix* RetWorldMatrix(int part);
|
Math::Matrix* GetWorldMatrix(int part);
|
||||||
|
|
||||||
void SetViewFromHere(Math::Vector &eye, float &dirH, float &dirV, Math::Vector &lookat, Math::Vector &upVec, CameraType type);
|
void SetViewFromHere(Math::Vector &eye, float &dirH, float &dirV,
|
||||||
|
Math::Vector &lookat, Math::Vector &upVec,
|
||||||
|
Gfx::CameraType type);
|
||||||
|
|
||||||
void SetCharacter(Character* character);
|
void SetCharacter(Character* character);
|
||||||
void GetCharacter(Character* character);
|
void GetCharacter(Character* character);
|
||||||
Character* RetCharacter();
|
Character* GetCharacter();
|
||||||
|
|
||||||
float RetAbsTime();
|
float GetAbsTime();
|
||||||
|
|
||||||
void SetEnergy(float level);
|
void SetEnergy(float level);
|
||||||
float RetEnergy();
|
float GetEnergy();
|
||||||
|
|
||||||
void SetCapacity(float capacity);
|
void SetCapacity(float capacity);
|
||||||
float RetCapacity();
|
float GetCapacity();
|
||||||
|
|
||||||
void SetShield(float level);
|
void SetShield(float level);
|
||||||
float RetShield();
|
float GetShield();
|
||||||
|
|
||||||
void SetRange(float delay);
|
void SetRange(float delay);
|
||||||
float RetRange();
|
float GetRange();
|
||||||
|
|
||||||
void SetTransparency(float value);
|
void SetTransparency(float value);
|
||||||
float RetTransparency();
|
float GetTransparency();
|
||||||
|
|
||||||
ObjectMaterial RetMaterial();
|
ObjectMaterial GetMaterial();
|
||||||
|
|
||||||
void SetGadget(bool bMode);
|
void SetGadget(bool bMode);
|
||||||
bool RetGadget();
|
bool GetGadget();
|
||||||
|
|
||||||
void SetFixed(bool bFixed);
|
void SetFixed(bool bFixed);
|
||||||
bool RetFixed();
|
bool GetFixed();
|
||||||
|
|
||||||
void SetClip(bool bClip);
|
void SetClip(bool bClip);
|
||||||
bool RetClip();
|
bool GetClip();
|
||||||
|
|
||||||
bool JostleObject(float force);
|
bool JostleObject(float force);
|
||||||
|
|
||||||
void StartDetectEffect(CObject *target, bool bFound);
|
void StartDetectEffect(CObject *target, bool bFound);
|
||||||
|
|
||||||
void SetVirusMode(bool bEnable);
|
void SetVirusMode(bool bEnable);
|
||||||
bool RetVirusMode();
|
bool GetVirusMode();
|
||||||
float RetVirusTime();
|
float GetVirusTime();
|
||||||
|
|
||||||
void SetCameraType(CameraType type);
|
void SetCameraType(Gfx::CameraType type);
|
||||||
CameraType RetCameraType();
|
Gfx::CameraType GetCameraType();
|
||||||
void SetCameraDist(float dist);
|
void SetCameraDist(float dist);
|
||||||
float RetCameraDist();
|
float GetCameraDist();
|
||||||
void SetCameraLock(bool bLock);
|
void SetCameraLock(bool bLock);
|
||||||
bool RetCameraLock();
|
bool GetCameraLock();
|
||||||
|
|
||||||
void SetHilite(bool bMode);
|
void SetHilite(bool bMode);
|
||||||
bool RetHilite();
|
bool GetHilite();
|
||||||
|
|
||||||
void SetSelect(bool bMode, bool bDisplayError=true);
|
void SetSelect(bool bMode, bool bDisplayError=true);
|
||||||
bool RetSelect(bool bReal=false);
|
bool GetSelect(bool bReal=false);
|
||||||
|
|
||||||
void SetSelectable(bool bMode);
|
void SetSelectable(bool bMode);
|
||||||
bool RetSelectable();
|
bool GetSelectable();
|
||||||
|
|
||||||
void SetActivity(bool bMode);
|
void SetActivity(bool bMode);
|
||||||
bool RetActivity();
|
bool GetActivity();
|
||||||
|
|
||||||
void SetVisible(bool bVisible);
|
void SetVisible(bool bVisible);
|
||||||
bool RetVisible();
|
bool GetVisible();
|
||||||
|
|
||||||
void SetEnable(bool bEnable);
|
void SetEnable(bool bEnable);
|
||||||
bool RetEnable();
|
bool GetEnable();
|
||||||
|
|
||||||
void SetCheckToken(bool bMode);
|
void SetCheckToken(bool bMode);
|
||||||
bool RetCheckToken();
|
bool GetCheckToken();
|
||||||
|
|
||||||
void SetProxyActivate(bool bActivate);
|
void SetProxyActivate(bool bActivate);
|
||||||
bool RetProxyActivate();
|
bool GetProxyActivate();
|
||||||
void SetProxyDistance(float distance);
|
void SetProxyDistance(float distance);
|
||||||
float RetProxyDistance();
|
float GetProxyDistance();
|
||||||
|
|
||||||
void SetMagnifyDamage(float factor);
|
void SetMagnifyDamage(float factor);
|
||||||
float RetMagnifyDamage();
|
float GetMagnifyDamage();
|
||||||
|
|
||||||
void SetParam(float value);
|
void SetParam(float value);
|
||||||
float RetParam();
|
float GetParam();
|
||||||
|
|
||||||
void SetExplo(bool bExplo);
|
void SetExplo(bool bExplo);
|
||||||
bool RetExplo();
|
bool GetExplo();
|
||||||
void SetLock(bool bLock);
|
void SetLock(bool bLock);
|
||||||
bool RetLock();
|
bool GetLock();
|
||||||
void SetCargo(bool bCargo);
|
void SetCargo(bool bCargo);
|
||||||
bool RetCargo();
|
bool GetCargo();
|
||||||
void SetBurn(bool bBurn);
|
void SetBurn(bool bBurn);
|
||||||
bool RetBurn();
|
bool GetBurn();
|
||||||
void SetDead(bool bDead);
|
void SetDead(bool bDead);
|
||||||
bool RetDead();
|
bool GetDead();
|
||||||
bool RetRuin();
|
bool GetRuin();
|
||||||
bool RetActif();
|
bool GetActif();
|
||||||
|
|
||||||
void SetGunGoalV(float gunGoal);
|
void SetGunGoalV(float gunGoal);
|
||||||
void SetGunGoalH(float gunGoal);
|
void SetGunGoalH(float gunGoal);
|
||||||
float RetGunGoalV();
|
float GetGunGoalV();
|
||||||
float RetGunGoalH();
|
float GetGunGoalH();
|
||||||
|
|
||||||
bool StartShowLimit();
|
bool StartShowLimit();
|
||||||
void StopShowLimit();
|
void StopShowLimit();
|
||||||
|
@ -618,16 +620,16 @@ public:
|
||||||
void CreateSelectParticule();
|
void CreateSelectParticule();
|
||||||
|
|
||||||
void SetRunScript(CScript* script);
|
void SetRunScript(CScript* script);
|
||||||
CScript* RetRunScript();
|
CScript* GetRunScript();
|
||||||
CBotVar* RetBotVar();
|
CBotVar* GetBotVar();
|
||||||
CPhysics* RetPhysics();
|
CPhysics* GetPhysics();
|
||||||
CBrain* RetBrain();
|
CBrain* GetBrain();
|
||||||
CMotion* RetMotion();
|
CMotion* GetMotion();
|
||||||
CAuto* RetAuto();
|
CAuto* GetAuto();
|
||||||
void SetAuto(CAuto* automat);
|
void SetAuto(CAuto* automat);
|
||||||
|
|
||||||
void SetDefRank(int rank);
|
void SetDefRank(int rank);
|
||||||
int RetDefRank();
|
int GetDefRank();
|
||||||
|
|
||||||
bool GetTooltipName(char* name);
|
bool GetTooltipName(char* name);
|
||||||
|
|
||||||
|
@ -635,17 +637,17 @@ public:
|
||||||
CObject* SubDeselList();
|
CObject* SubDeselList();
|
||||||
void DeleteDeselList(CObject* pObj);
|
void DeleteDeselList(CObject* pObj);
|
||||||
|
|
||||||
bool CreateShadowCircle(float radius, float intensity, D3DShadowType type=D3DSHADOWNORM);
|
bool CreateShadowCircle(float radius, float intensity, Gfx::EngineShadowType type = Gfx::ENG_SHADOW_NORM);
|
||||||
bool CreateShadowLight(float height, D3DCOLORVALUE color);
|
bool CreateShadowLight(float height, Gfx::Color color);
|
||||||
bool CreateEffectLight(float height, D3DCOLORVALUE color);
|
bool CreateEffectLight(float height, Gfx::Color color);
|
||||||
|
|
||||||
void FlatParent();
|
void FlatParent();
|
||||||
|
|
||||||
bool RetTraceDown();
|
bool GetTraceDown();
|
||||||
void SetTraceDown(bool bDown);
|
void SetTraceDown(bool bDown);
|
||||||
int RetTraceColor();
|
int GetTraceColor();
|
||||||
void SetTraceColor(int color);
|
void SetTraceColor(int color);
|
||||||
float RetTraceWidth();
|
float GetTraceWidth();
|
||||||
void SetTraceWidth(float width);
|
void SetTraceWidth(float width);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -663,12 +665,12 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CInstanceManager* m_iMan;
|
CInstanceManager* m_iMan;
|
||||||
CD3DEngine* m_engine;
|
Gfx::CEngine* m_engine;
|
||||||
CLight* m_light;
|
Gfx::CLightManager* m_lightMan;
|
||||||
CTerrain* m_terrain;
|
Gfx::CTerrain* m_terrain;
|
||||||
CWater* m_water;
|
Gfx::CWater* m_water;
|
||||||
CCamera* m_camera;
|
Gfx::CCamera* m_camera;
|
||||||
CParticule* m_particule;
|
Gfx::CParticle* m_particle;
|
||||||
CPhysics* m_physics;
|
CPhysics* m_physics;
|
||||||
CBrain* m_brain;
|
CBrain* m_brain;
|
||||||
CMotion* m_motion;
|
CMotion* m_motion;
|
||||||
|
@ -732,7 +734,7 @@ protected:
|
||||||
float m_showLimitRadius;
|
float m_showLimitRadius;
|
||||||
float m_gunGoalV;
|
float m_gunGoalV;
|
||||||
float m_gunGoalH;
|
float m_gunGoalH;
|
||||||
CameraType m_cameraType;
|
Gfx::CameraType m_cameraType;
|
||||||
float m_cameraDist;
|
float m_cameraDist;
|
||||||
bool m_bCameraLock;
|
bool m_bCameraLock;
|
||||||
int m_defRank;
|
int m_defRank;
|
||||||
|
@ -767,7 +769,7 @@ protected:
|
||||||
|
|
||||||
int m_infoTotal;
|
int m_infoTotal;
|
||||||
Info m_info[OBJECTMAXINFO];
|
Info m_info[OBJECTMAXINFO];
|
||||||
float m_infoReturn;
|
float m_infoGeturn;
|
||||||
bool m_bInfoUpdate;
|
bool m_bInfoUpdate;
|
||||||
|
|
||||||
float m_cmdLine[OBJECTMAXCMDLINE];
|
float m_cmdLine[OBJECTMAXCMDLINE];
|
||||||
|
|
|
@ -19,23 +19,27 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "old/d3dengine.h"
|
|
||||||
#include "common/misc.h"
|
#include "common/misc.h"
|
||||||
#include "object/object.h"
|
#include "object/object.h"
|
||||||
|
#include "math/vector.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
|
||||||
class CLight;
|
|
||||||
class CParticule;
|
|
||||||
class CTerrain;
|
|
||||||
class CWater;
|
|
||||||
class CCamera;
|
class CCamera;
|
||||||
class CObject;
|
class CObject;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
class CMotion;
|
class CMotion;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
|
namespace Gfx
|
||||||
|
{
|
||||||
|
class CEngine;
|
||||||
|
class CLight;
|
||||||
|
class CParticule;
|
||||||
|
class CTerrain;
|
||||||
|
class CWater;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
enum PhysicsType
|
enum PhysicsType
|
||||||
{
|
{
|
||||||
|
@ -98,64 +102,64 @@ public:
|
||||||
void SetMotion(CMotion* motion);
|
void SetMotion(CMotion* motion);
|
||||||
|
|
||||||
void SetType(PhysicsType type);
|
void SetType(PhysicsType type);
|
||||||
PhysicsType RetType();
|
PhysicsType GetType();
|
||||||
|
|
||||||
bool Write(char *line);
|
bool Write(char *line);
|
||||||
bool Read(char *line);
|
bool Read(char *line);
|
||||||
|
|
||||||
void SetGravity(float value);
|
void SetGravity(float value);
|
||||||
float RetGravity();
|
float GetGravity();
|
||||||
|
|
||||||
float RetFloorHeight();
|
float GetFloorHeight();
|
||||||
|
|
||||||
void SetLinMotion(PhysicsMode mode, Math::Vector value);
|
void SetLinMotion(PhysicsMode mode, Math::Vector value);
|
||||||
Math::Vector RetLinMotion(PhysicsMode mode);
|
Math::Vector GetLinMotion(PhysicsMode mode);
|
||||||
void SetLinMotionX(PhysicsMode mode, float value);
|
void SetLinMotionX(PhysicsMode mode, float value);
|
||||||
void SetLinMotionY(PhysicsMode mode, float value);
|
void SetLinMotionY(PhysicsMode mode, float value);
|
||||||
void SetLinMotionZ(PhysicsMode mode, float value);
|
void SetLinMotionZ(PhysicsMode mode, float value);
|
||||||
float RetLinMotionX(PhysicsMode mode);
|
float GetLinMotionX(PhysicsMode mode);
|
||||||
float RetLinMotionY(PhysicsMode mode);
|
float GetLinMotionY(PhysicsMode mode);
|
||||||
float RetLinMotionZ(PhysicsMode mode);
|
float GetLinMotionZ(PhysicsMode mode);
|
||||||
|
|
||||||
void SetCirMotion(PhysicsMode mode, Math::Vector value);
|
void SetCirMotion(PhysicsMode mode, Math::Vector value);
|
||||||
Math::Vector RetCirMotion(PhysicsMode mode);
|
Math::Vector GetCirMotion(PhysicsMode mode);
|
||||||
void SetCirMotionX(PhysicsMode mode, float value);
|
void SetCirMotionX(PhysicsMode mode, float value);
|
||||||
void SetCirMotionY(PhysicsMode mode, float value);
|
void SetCirMotionY(PhysicsMode mode, float value);
|
||||||
void SetCirMotionZ(PhysicsMode mode, float value);
|
void SetCirMotionZ(PhysicsMode mode, float value);
|
||||||
float RetCirMotionX(PhysicsMode mode);
|
float GetCirMotionX(PhysicsMode mode);
|
||||||
float RetCirMotionY(PhysicsMode mode);
|
float GetCirMotionY(PhysicsMode mode);
|
||||||
float RetCirMotionZ(PhysicsMode mode);
|
float GetCirMotionZ(PhysicsMode mode);
|
||||||
|
|
||||||
float RetLinStopLength(PhysicsMode sMode=MO_ADVSPEED, PhysicsMode aMode=MO_STOACCEL);
|
float GetLinStopLength(PhysicsMode sMode=MO_ADVSPEED, PhysicsMode aMode=MO_STOACCEL);
|
||||||
float RetCirStopLength();
|
float GetCirStopLength();
|
||||||
float RetLinMaxLength(float dir);
|
float GetLinMaxLength(float dir);
|
||||||
float RetLinTimeLength(float dist, float dir=1.0f);
|
float GetLinTimeLength(float dist, float dir=1.0f);
|
||||||
float RetLinLength(float dist);
|
float GetLinLength(float dist);
|
||||||
|
|
||||||
void SetMotor(bool bState);
|
void SetMotor(bool bState);
|
||||||
bool RetMotor();
|
bool GetMotor();
|
||||||
void SetLand(bool bState);
|
void SetLand(bool bState);
|
||||||
bool RetLand();
|
bool GetLand();
|
||||||
void SetSwim(bool bState);
|
void SetSwim(bool bState);
|
||||||
bool RetSwim();
|
bool GetSwim();
|
||||||
void SetCollision(bool bCollision);
|
void SetCollision(bool bCollision);
|
||||||
bool RetCollision();
|
bool GetCollision();
|
||||||
void SetFreeze(bool bFreeze);
|
void SetFreeze(bool bFreeze);
|
||||||
bool RetFreeze();
|
bool GetFreeze();
|
||||||
void SetReactorRange(float range);
|
void SetReactorRange(float range);
|
||||||
float RetReactorRange();
|
float GetReactorRange();
|
||||||
|
|
||||||
void SetMotorSpeed(Math::Vector speed);
|
void SetMotorSpeed(Math::Vector speed);
|
||||||
void SetMotorSpeedX(float speed);
|
void SetMotorSpeedX(float speed);
|
||||||
void SetMotorSpeedY(float speed);
|
void SetMotorSpeedY(float speed);
|
||||||
void SetMotorSpeedZ(float speed);
|
void SetMotorSpeedZ(float speed);
|
||||||
Math::Vector RetMotorSpeed();
|
Math::Vector GetMotorSpeed();
|
||||||
float RetMotorSpeedX();
|
float GetMotorSpeedX();
|
||||||
float RetMotorSpeedY();
|
float GetMotorSpeedY();
|
||||||
float RetMotorSpeedZ();
|
float GetMotorSpeedZ();
|
||||||
|
|
||||||
void CreateInterface(bool bSelect);
|
void CreateInterface(bool bSelect);
|
||||||
Error RetError();
|
Error GetError();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool EventFrame(const Event &event);
|
bool EventFrame(const Event &event);
|
||||||
|
@ -186,12 +190,12 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CInstanceManager* m_iMan;
|
CInstanceManager* m_iMan;
|
||||||
CD3DEngine* m_engine;
|
Gfx::CEngine* m_engine;
|
||||||
CLight* m_light;
|
Gfx::CLightManager* m_lightMan;
|
||||||
CParticule* m_particule;
|
Gfx::CParticle* m_particle;
|
||||||
CTerrain* m_terrain;
|
Gfx::CTerrain* m_terrain;
|
||||||
CWater* m_water;
|
Gfx::CWater* m_water;
|
||||||
CCamera* m_camera;
|
Gfx::CCamera* m_camera;
|
||||||
CObject* m_object;
|
CObject* m_object;
|
||||||
CBrain* m_brain;
|
CBrain* m_brain;
|
||||||
CMotion* m_motion;
|
CMotion* m_motion;
|
||||||
|
|
Loading…
Reference in New Issue