2015-07-02 21:48:30 +00:00
|
|
|
|
/*
|
|
|
|
|
* This file is part of the Colobot: Gold Edition source code
|
|
|
|
|
* Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
|
|
|
|
|
* http://epsiteс.ch; http://colobot.info; http://github.com/colobot
|
|
|
|
|
*
|
|
|
|
|
* 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://gnu.org/licenses
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \file object/old_object_interface.h
|
|
|
|
|
* \brief Legacy CObject interface
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "graphics/engine/camera.h"
|
2015-08-02 11:09:48 +00:00
|
|
|
|
#include "graphics/engine/engine.h"
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
|
|
|
|
#include "object/object_type.h"
|
|
|
|
|
|
2015-07-05 11:00:48 +00:00
|
|
|
|
#include "sound/sound_type.h"
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
class CApplication;
|
|
|
|
|
class CPhysics;
|
|
|
|
|
class CBrain;
|
|
|
|
|
class CMotion;
|
|
|
|
|
class CAuto;
|
|
|
|
|
class CDisplayText;
|
|
|
|
|
class CRobotMain;
|
|
|
|
|
class CBotVar;
|
|
|
|
|
class CScript;
|
|
|
|
|
class CLevelParserLine;
|
|
|
|
|
struct Program;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Character
|
|
|
|
|
{
|
|
|
|
|
float wheelFront; // position X of the front wheels
|
|
|
|
|
float wheelBack; // position X of the back wheels
|
|
|
|
|
float wheelLeft; // position Z of the left wheels
|
|
|
|
|
float wheelRight; // position Z of the right wheels
|
|
|
|
|
float height; // normal height on top of ground
|
|
|
|
|
Math::Vector posPower; // position of the battery
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum class ExplosionType
|
|
|
|
|
{
|
|
|
|
|
Bang = 1,
|
|
|
|
|
Burn = 2,
|
|
|
|
|
Water = 3,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class COldObjectInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual ~COldObjectInterface() {}
|
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void Simplify();
|
|
|
|
|
virtual bool ExplodeObject(ExplosionType type, float force, float decay=1.0f);
|
|
|
|
|
virtual void DeletePart(int part);
|
|
|
|
|
virtual void SetType(ObjectType type);
|
|
|
|
|
|
2015-07-12 13:09:32 +00:00
|
|
|
|
virtual int GetObjectRank(int part);
|
2015-07-11 17:48:37 +00:00
|
|
|
|
|
2015-07-12 13:09:32 +00:00
|
|
|
|
virtual int GetOption();
|
2015-07-11 17:48:37 +00:00
|
|
|
|
|
2015-07-12 13:09:32 +00:00
|
|
|
|
virtual void SetDrawFront(bool bDraw);
|
2015-07-11 17:48:37 +00:00
|
|
|
|
|
|
|
|
|
virtual float GetShieldRadius();
|
|
|
|
|
|
|
|
|
|
virtual void FloorAdjust();
|
|
|
|
|
|
|
|
|
|
virtual void SetLinVibration(Math::Vector dir);
|
|
|
|
|
virtual void SetCirVibration(Math::Vector dir);
|
2015-07-12 13:09:32 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual Math::Vector GetTilt();
|
|
|
|
|
|
|
|
|
|
virtual void SetTrainer(bool bEnable);
|
|
|
|
|
virtual bool GetTrainer();
|
|
|
|
|
|
|
|
|
|
virtual void SetMasterParticle(int part, int parti);
|
|
|
|
|
|
|
|
|
|
virtual float GetCmdLine(unsigned int rank);
|
|
|
|
|
|
|
|
|
|
virtual Math::Matrix* GetWorldMatrix(int part);
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
|
|
|
|
virtual void SetViewFromHere(Math::Vector &eye, float &dirH, float &dirV,
|
|
|
|
|
Math::Vector &lookat, Math::Vector &upVec,
|
2015-07-11 17:48:37 +00:00
|
|
|
|
Gfx::CameraType type);
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual Character* GetCharacter();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetEnergy(float level);
|
|
|
|
|
virtual float GetEnergy();
|
|
|
|
|
virtual float GetCapacity();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetShield(float level);
|
|
|
|
|
virtual float GetShield();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetRange(float delay);
|
|
|
|
|
virtual float GetRange();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetFixed(bool bFixed);
|
|
|
|
|
virtual bool GetFixed();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetClip(bool bClip);
|
|
|
|
|
virtual bool GetClip();
|
|
|
|
|
virtual void SetTeam(int team);
|
|
|
|
|
virtual int GetTeam();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void StartDetectEffect(CObject *target, bool bFound);
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetVirusMode(bool bEnable);
|
|
|
|
|
virtual bool GetVirusMode();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetCameraType(Gfx::CameraType type);
|
|
|
|
|
virtual Gfx::CameraType GetCameraType();
|
|
|
|
|
virtual void SetCameraDist(float dist);
|
|
|
|
|
virtual float GetCameraDist();
|
|
|
|
|
virtual void SetCameraLock(bool bLock);
|
|
|
|
|
virtual bool GetCameraLock();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetHighlight(bool mode);
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetSelect(bool bMode, bool bDisplayError=true);
|
|
|
|
|
virtual bool GetSelect(bool bReal=false);
|
|
|
|
|
virtual bool GetSelectable();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetActivity(bool bMode);
|
|
|
|
|
virtual bool GetActivity();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetEnable(bool bEnable);
|
|
|
|
|
virtual bool GetEnable();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetProxyActivate(bool bActivate);
|
|
|
|
|
virtual bool GetProxyActivate();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetMagnifyDamage(float factor);
|
|
|
|
|
virtual float GetMagnifyDamage();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetParam(float value);
|
|
|
|
|
virtual float GetParam();
|
|
|
|
|
virtual void SetIgnoreBuildCheck(bool bIgnoreBuildCheck);
|
|
|
|
|
virtual bool GetIgnoreBuildCheck();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetExploding(bool bExplo);
|
|
|
|
|
virtual bool IsExploding();
|
2015-07-12 13:09:32 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetLock(bool bLock);
|
|
|
|
|
virtual bool GetLock();
|
2015-07-12 13:09:32 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetBurn(bool bBurn);
|
|
|
|
|
virtual bool GetBurn();
|
2015-07-12 13:09:32 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetDead(bool bDead);
|
|
|
|
|
virtual bool GetDead();
|
2015-07-12 13:09:32 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual bool GetRuin();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-12 13:09:32 +00:00
|
|
|
|
virtual bool GetActive();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual bool StartShowLimit();
|
|
|
|
|
virtual void StopShowLimit();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual bool IsProgram();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual CScript* GetRunScript();
|
|
|
|
|
virtual CBotVar* GetBotVar();
|
|
|
|
|
virtual CPhysics* GetPhysics();
|
|
|
|
|
virtual CMotion* GetMotion();
|
|
|
|
|
virtual CAuto* GetAuto();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void SetDefRank(int rank);
|
|
|
|
|
virtual int GetDefRank();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual bool GetTooltipName(std::string& name);
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual void FlatParent();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
|
2015-07-11 17:48:37 +00:00
|
|
|
|
virtual float GetInfoReturn();
|
2015-07-02 21:48:30 +00:00
|
|
|
|
};
|
|
|
|
|
|