31 #include "object/implementation/power_container_impl.h" 32 #include "object/implementation/program_storage_impl.h" 33 #include "object/implementation/programmable_impl.h" 34 #include "object/implementation/task_executor_impl.h" 36 #include "object/interface/carrier_object.h" 37 #include "object/interface/controllable_object.h" 38 #include "object/interface/flying_object.h" 39 #include "object/interface/interactive_object.h" 40 #include "object/interface/jet_flying_object.h" 41 #include "object/interface/jostleable_object.h" 42 #include "object/interface/movable_object.h" 43 #include "object/interface/power_container_object.h" 44 #include "object/interface/powered_object.h" 45 #include "object/interface/programmable_object.h" 46 #include "object/interface/ranged_object.h" 47 #include "object/interface/shielded_auto_regen_object.h" 48 #include "object/interface/task_executor_object.h" 49 #include "object/interface/trace_drawing_object.h" 50 #include "object/interface/transportable_object.h" 53 const int OBJECTMAXPART = 40;
64 bool bTranslate =
false;
75 class CObjectInterface;
100 void SetProgrammable();
101 void SetMovable(std::unique_ptr<CMotion> motion, std::unique_ptr<CPhysics> physics);
102 void SetAuto(std::unique_ptr<CAuto> automat);
103 void SetOption(
int option);
104 void SetJostlingSphere(
const Math::Sphere& jostlingSphere);
111 void Simplify()
override;
113 bool DamageObject(DamageType type,
float force = std::numeric_limits<float>::infinity())
override;
114 void DestroyObject(DestructionType type)
override;
116 bool EventProcess(
const Event& event)
override;
117 void UpdateMapping();
119 void DeletePart(
int part)
override;
120 void SetObjectRank(
int part,
int objRank);
121 int GetObjectRank(
int part)
override;
122 void SetObjectParent(
int part,
int parent);
124 const char* GetName();
125 int GetOption()
override;
130 void SetDrawFront(
bool bDraw)
override;
132 int GetShadowLight();
134 void SetFloorHeight(
float height);
135 void FloorAdjust()
override;
144 void SetPartPosition(
int part,
const Math::Vector &pos);
147 void SetPartRotation(
int part,
const Math::Vector &angle);
149 void SetPartRotationY(
int part,
float angle);
150 void SetPartRotationX(
int part,
float angle);
151 void SetPartRotationZ(
int part,
float angle);
152 float GetPartRotationY(
int part);
153 float GetPartRotationX(
int part);
154 float GetPartRotationZ(
int part);
156 void SetPartScale(
int part,
float zoom);
159 void SetPartScaleX(
int part,
float zoom);
160 float GetPartScaleX(
int part);
161 void SetPartScaleY(
int part,
float zoom);
162 float GetPartScaleY(
int part);
163 void SetPartScaleZ(
int part,
float zoom);
164 float GetPartScaleZ(
int part);
166 void SetTrainer(
bool bEnable)
override;
167 bool GetTrainer()
override;
169 void SetToy(
bool bEnable);
172 void SetManual(
bool bManual);
175 void SetMasterParticle(
int part,
int parti)
override;
177 void SetPower(
CObject* power)
override;
180 void SetPowerPosition(
const Math::Vector& powerPosition)
override;
181 void SetCargo(
CObject* cargo)
override;
183 void SetTransporter(
CObject* transporter)
override;
184 CObject* GetTransporter()
override;
185 void SetTransporterPart(
int part)
override;
190 void AdjustCamera(
Math::Vector &eye,
float &dirH,
float &dirV,
198 float GetCapacity()
override;
200 bool IsRechargeable()
override;
202 void SetShield(
float level)
override;
203 float GetShield()
override;
205 void SetRange(
float delay)
override;
206 float GetRange()
override;
208 void SetReactorRange(
float reactorRange)
override;
209 float GetReactorRange()
override;
211 void SetTransparency(
float value)
override;
214 bool JostleObject(
float force)
override;
216 void SetVirusMode(
bool bEnable)
override;
217 bool GetVirusMode()
override;
221 void SetCameraLock(
bool lock)
override;
222 bool GetCameraLock()
override;
224 void SetHighlight(
bool highlight)
override;
226 void SetSelect(
bool select,
bool bDisplayError =
true)
override;
227 bool GetSelect()
override;
229 void SetSelectable(
bool bMode);
230 bool GetSelectable()
override;
232 void SetUnderground(
bool underground);
234 void SetCheckToken(
bool bMode);
235 bool GetCheckToken();
237 void SetMagnifyDamage(
float factor)
override;
238 float GetMagnifyDamage()
override;
240 void SetDying(DeathType deathType)
override;
241 DeathType GetDying()
override;
242 bool IsDying()
override;
244 bool GetActive()
override;
245 bool GetDetectable()
override;
247 void SetGunGoalV(
float gunGoal);
248 void SetGunGoalH(
float gunGoal);
252 float GetShowLimitRadius()
override;
254 void CreateSelectParticle();
258 CAuto* GetAuto()
override;
261 bool CreateShadowLight(
float height,
Gfx::Color color);
263 void FlatParent()
override;
268 void SetRotation(
const Math::Vector& rotation)
override;
275 void UpdateInterface()
override;
277 void StopProgram()
override;
279 bool GetTraceDown()
override;
280 void SetTraceDown(
bool down)
override;
281 TraceColor GetTraceColor()
override;
282 void SetTraceColor(TraceColor color)
override;
283 float GetTraceWidth()
override;
284 void SetTraceWidth(
float width)
override;
286 bool IsRepairable()
override;
287 float GetShieldFullRegenTime()
override;
289 float GetLightningHitProbability()
override;
292 bool EventFrame(
const Event &event);
293 void VirusFrame(
float rTime);
294 void PartiFrame(
float rTime);
295 void InitPart(
int part);
296 void UpdateTotalPart();
297 int SearchDescendant(
int parent,
int n);
298 void UpdateEnergyMapping();
299 bool UpdateTransformObject(
int part,
bool bForceUpdate);
300 bool UpdateTransformObject();
301 void UpdateSelectParticle();
302 void TransformCrashSphere(
Math::Sphere &crashSphere)
override;
303 void TransformCameraCollisionSphere(
Math::Sphere& collisionSphere)
override;
314 std::unique_ptr<CPhysics> m_physics;
315 std::unique_ptr<CMotion> m_motion;
316 std::unique_ptr<CAuto> m_auto;
317 std::unique_ptr<Ui::CObjectInterface> m_objectInterface;
323 float m_shadowHeight;
331 int m_transporterLink;
339 float m_lastVirusParticle;
353 float m_magnifyDamage;
356 float m_shieldRadius;
368 float m_reactorRange;
371 TraceColor m_traceColor;
Interface for transportable objects.
Definition: transportable_object.h:29
Normal shadow.
Definition: engine.h:301
CameraType
Type of camera.
Definition: camera.h:44
Definition: old_object_interface.h:39
bool DeleteObject(CObject *instance)
Deletes the object.
Definition: object_manager.cpp:63
Definition: robotmain.h:108
Definition: programmable_impl.h:48
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:79
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:207
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:159
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:55
int masterParti
particle channel this part is connected to after explosion
Definition: old_object.h:60
Interface for objects that can be jostled.
Definition: jostleable_object.h:30
Camera moving in 3D scene.
Definition: camera.h:128
Terrain loader/generator and manager.
Definition: terrain.h:147
CObject - base class for all game objects.
The graphics engine.
Definition: engine.h:585
Event types, structs and event queue.
ObjectType
Type of game object.
Definition: object_type.h:33
Definition: power_container_impl.h:25
3D (3x1) vector
Definition: vector.h:53
Definition: program_storage_impl.h:30
EngineShadowType
Definition: engine.h:298
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:735
Base class for all 3D in-game objects.
Definition: object.h:63
Sound plugin interface.
Definition: sound.h:60
int parentPart
identifier of parent part
Definition: old_object.h:59