Skip to content

Commit

Permalink
Forward declaration: removed task.h dependency from task_executor_obj…
Browse files Browse the repository at this point in the history
…ect.h
  • Loading branch information
lb_ii committed Mar 2, 2025
1 parent 8eff3a5 commit c4e904c
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion colobot-base/src/common/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* \enum Error
* \brief Type of error or info message
*/
enum Error
enum Error : unsigned int
{
ERR_OK = 0, //!< ok
ERR_UNKNOWN = 1, //!< any error
Expand Down
1 change: 1 addition & 0 deletions colobot-base/src/object/auto/autojostle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "graphics/engine/engine.h"

#include "math/const.h"

// Object's constructor.

Expand Down
2 changes: 2 additions & 0 deletions colobot-base/src/object/auto/autoportico.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "common/stringutils.h"

#include "math/const.h"

#include "level/robotmain.h"

#include "object/old_object.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <memory>

class CObject;
struct Event;

class CTaskExecutorObjectImpl : public CTaskExecutorObject
{
Expand Down
6 changes: 4 additions & 2 deletions colobot-base/src/object/interface/task_executor_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include "object/object.h"
#include "object/object_interface_type.h"

#include "object/task/task.h"

enum TaskFlagOrder : unsigned char;
enum TaskManipOrder : unsigned char;
enum TaskManipArm : unsigned char;
Expand All @@ -34,6 +32,10 @@ enum TaskGotoCrash : signed char;

enum class TraceColor : signed char;

enum Error : unsigned int;

class CBackgroundTask;
class CForegroundTask;

/**
* \class CTaskExecutorObject
Expand Down
2 changes: 2 additions & 0 deletions colobot-base/src/object/motion/motionlevelcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "graphics/engine/engine.h"

#include "math/const.h"

#include "object/old_object.h"

#include "physics/physics.h"
Expand Down
2 changes: 2 additions & 0 deletions colobot-base/src/object/motion/motionvehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "object/interface/slotted_object.h"
#include "object/interface/transportable_object.h"

#include "object/task/task.h"

#include "physics/physics.h"

#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions colobot-base/src/object/old_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#include "object/motion/motion.h"
#include "object/motion/motionvehicle.h"

#include "object/task/task.h"

#include "object/subclass/base_alien.h"
#include "object/subclass/exchange_post.h"

Expand Down
5 changes: 5 additions & 0 deletions colobot-base/src/object/old_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ struct ObjectPart
glm::mat4 matWorld;
};

class CSoundInterface;

namespace Ui
{
class CObjectInterface;
Expand All @@ -77,6 +79,9 @@ class CObjectInterface;
namespace Gfx
{
enum class EngineShadowType : unsigned char;

class CParticle;
class CLightManager;
}


Expand Down

0 comments on commit c4e904c

Please sign in to comment.