29 #include "object/interface/carrier_object.h" 30 #include "object/interface/controllable_object.h" 31 #include "object/interface/flying_object.h" 32 #include "object/interface/interactive_object.h" 33 #include "object/interface/jet_flying_object.h" 34 #include "object/interface/jostleable_object.h" 35 #include "object/interface/movable_object.h" 36 #include "object/interface/power_container_object.h" 37 #include "object/interface/powered_object.h" 38 #include "object/interface/programmable_object.h" 39 #include "object/interface/ranged_object.h" 40 #include "object/interface/shielded_auto_regen_object.h" 41 #include "object/interface/task_executor_object.h" 42 #include "object/interface/trace_drawing_object.h" 43 #include "object/interface/transportable_object.h" 45 #include "object/implementation/power_container_impl.h" 46 #include "object/implementation/program_storage_impl.h" 47 #include "object/implementation/programmable_impl.h" 48 #include "object/implementation/task_executor_impl.h" 51 const int OBJECTMAXPART = 40;
62 bool bTranslate =
false;
73 class CObjectInterface;
98 void SetProgrammable();
99 void SetMovable(std::unique_ptr<CMotion> motion, std::unique_ptr<CPhysics> physics);
100 void SetAuto(std::unique_ptr<CAuto> automat);
101 void SetOption(
int option);
109 void Simplify()
override;
111 bool DamageObject(DamageType type,
float force = std::numeric_limits<float>::infinity())
override;
112 void DestroyObject(DestructionType type)
override;
114 bool EventProcess(
const Event& event)
override;
115 void UpdateMapping();
117 void DeletePart(
int part)
override;
118 void SetObjectRank(
int part,
int objRank);
119 int GetObjectRank(
int part)
override;
120 void SetObjectParent(
int part,
int parent);
122 const char* GetName();
123 int GetOption()
override;
128 void SetDrawFront(
bool bDraw)
override;
130 int GetShadowLight();
131 int GetEffectLight();
133 void SetFloorHeight(
float height);
134 void FloorAdjust()
override;
143 void SetPartPosition(
int part,
const Math::Vector &pos);
146 void SetPartRotation(
int part,
const Math::Vector &angle);
148 void SetPartRotationY(
int part,
float angle);
149 void SetPartRotationX(
int part,
float angle);
150 void SetPartRotationZ(
int part,
float angle);
151 float GetPartRotationY(
int part);
152 float GetPartRotationX(
int part);
153 float GetPartRotationZ(
int part);
155 void SetPartScale(
int part,
float zoom);
158 void SetPartScaleX(
int part,
float zoom);
159 float GetPartScaleX(
int part);
160 void SetPartScaleY(
int part,
float zoom);
161 float GetPartScaleY(
int part);
162 void SetPartScaleZ(
int part,
float zoom);
163 float GetPartScaleZ(
int part);
165 void SetTrainer(
bool bEnable)
override;
166 bool GetTrainer()
override;
168 void SetToy(
bool bEnable);
171 void SetManual(
bool bManual);
174 void SetMasterParticle(
int part,
int parti)
override;
176 void SetPower(
CObject* power)
override;
179 void SetPowerPosition(
const Math::Vector& powerPosition)
override;
180 void SetCargo(
CObject* cargo)
override;
182 void SetTransporter(
CObject* transporter)
override;
183 CObject* GetTransporter()
override;
184 void SetTransporterPart(
int part)
override;
189 void AdjustCamera(
Math::Vector &eye,
float &dirH,
float &dirV,
197 float GetCapacity()
override;
199 bool IsRechargeable()
override;
201 void SetShield(
float level)
override;
202 float GetShield()
override;
204 void SetRange(
float delay)
override;
205 float GetRange()
override;
207 void SetReactorRange(
float reactorRange)
override;
208 float GetReactorRange()
override;
210 void SetTransparency(
float value)
override;
213 bool JostleObject(
float force)
override;
215 void SetVirusMode(
bool bEnable)
override;
216 bool GetVirusMode()
override;
220 void SetCameraDist(
float dist)
override;
221 float GetCameraDist()
override;
222 void SetCameraLock(
bool lock)
override;
223 bool GetCameraLock()
override;
225 void SetHighlight(
bool highlight)
override;
227 void SetSelect(
bool select,
bool bDisplayError =
true)
override;
228 bool GetSelect()
override;
230 void SetSelectable(
bool bMode);
231 bool GetSelectable()
override;
233 void SetUnderground(
bool underground);
235 void SetCheckToken(
bool bMode);
236 bool GetCheckToken();
238 void SetMagnifyDamage(
float factor)
override;
239 float GetMagnifyDamage()
override;
241 void SetDying(DeathType deathType)
override;
242 DeathType GetDying()
override;
243 bool IsDying()
override;
245 bool GetActive()
override;
246 bool GetDetectable()
override;
248 void SetGunGoalV(
float gunGoal);
249 void SetGunGoalH(
float gunGoal);
253 float GetShowLimitRadius()
override;
255 void CreateSelectParticle();
259 CAuto* GetAuto()
override;
262 bool CreateShadowLight(
float height,
Gfx::Color color);
263 bool CreateEffectLight(
float height,
Gfx::Color color);
265 void FlatParent()
override;
270 void SetRotation(
const Math::Vector& rotation)
override;
277 void UpdateInterface()
override;
279 void StopProgram()
override;
281 bool GetTraceDown()
override;
282 void SetTraceDown(
bool down)
override;
283 TraceColor GetTraceColor()
override;
284 void SetTraceColor(TraceColor color)
override;
285 float GetTraceWidth()
override;
286 void SetTraceWidth(
float width)
override;
288 bool IsRepairable()
override;
289 float GetShieldFullRegenTime()
override;
291 float GetLightningHitProbability()
override;
294 bool EventFrame(
const Event &event);
295 void VirusFrame(
float rTime);
296 void PartiFrame(
float rTime);
297 void InitPart(
int part);
298 void UpdateTotalPart();
299 int SearchDescendant(
int parent,
int n);
300 void UpdateEnergyMapping();
301 bool UpdateTransformObject(
int part,
bool bForceUpdate);
302 bool UpdateTransformObject();
303 void UpdateSelectParticle();
304 void TransformCrashSphere(
Math::Sphere &crashSphere)
override;
305 void TransformCameraCollisionSphere(
Math::Sphere& collisionSphere)
override;
316 std::unique_ptr<CPhysics> m_physics;
317 std::unique_ptr<CMotion> m_motion;
318 std::unique_ptr<CAuto> m_auto;
319 std::unique_ptr<Ui::CObjectInterface> m_objectInterface;
325 float m_shadowHeight;
327 float m_effectHeight;
335 int m_transporterLink;
339 float m_transparency;
344 float m_lastVirusParticle;
360 float m_magnifyDamage;
364 float m_shieldRadius;
376 float m_reactorRange;
379 TraceColor m_traceColor;
Interface for transportable objects.
Definition: transportable_object.h:29
Normal shadow.
Definition: engine.h:302
CameraType
Type of camera.
Definition: camera.h:46
Definition: old_object_interface.h:36
bool DeleteObject(CObject *instance)
Deletes the object.
Definition: object_manager.cpp:63
Definition: robotmain.h:107
Definition: programmable_impl.h:47
4x4 matrix
Definition: matrix.h:65
Interface for objects that have a button in UI for showing range.
Definition: ranged_object.h:28
Definition: task_executor_impl.h:28
Definition: old_object.h:77
Interface for interactive objects (objects able to process events from event loop) ...
Definition: interactive_object.h:30
virtual void SetScale(const Math::Vector &scale)
Sets objects's scale.
Definition: object.cpp:206
Manager for dynamic lights in 3D scene.
Definition: lightman.h:146
Interface for shielded objects with auto regeneration.
Definition: shielded_auto_regen_object.h:28
Definition: parserline.h:37
Interface for carrier objects.
Definition: carrier_object.h:29
Interface for objects powered using power cells.
Definition: powered_object.h:37
Definition: robotmain.h:151
Particle engine.
Definition: particle.h:223
Interface for objects that can draw wheel trace (at the moment, all movable objects) ...
Definition: trace_drawing_object.h:64
Interface for objects that can be selected and controlled by the player.
Definition: controllable_object.h:30
Interface for objects that can fly using a jet engine.
Definition: jet_flying_object.h:30
Definition: old_object.h:53
Interface for objects that can be jostled.
Definition: jostleable_object.h:30
Camera moving in 3D scene.
Definition: camera.h:134
Terrain loader/generator and manager.
Definition: terrain.h:145
CObject - base class for all game objects.
The graphics engine.
Definition: engine.h:620
ObjectType
Type of game object.
Definition: object_type.h:33
Definition: power_container_impl.h:26
3D (3x1) vector
Definition: vector.h:53
Definition: program_storage_impl.h:30
EngineShadowType
Definition: engine.h:299
RGBA color.
Definition: color.h:39
Definition: object_factory.h:48
Manages CObject instances.
Definition: object_manager.h:148
EventType
Type of event message.
Definition: event.h:41
Event sent by system, interface or game.
Definition: event.h:709
Base class for all 3D in-game objects.
Definition: object.h:59
Sound plugin interface.
Definition: sound.h:57