From adcebbb2c9c19fd52a7cbdb6953ef73a39a6ed5e Mon Sep 17 00:00:00 2001 From: Joao Pasqualini Costa Date: Tue, 14 Nov 2023 21:38:16 -0300 Subject: [PATCH] Fix build error with unity, compile framework first and then client. --- src/CMakeLists.txt | 95 +++++++++++++++++---------------- src/client/attachableobject.cpp | 2 - src/client/attachableobject.h | 7 +-- src/client/thing.h | 1 - 4 files changed, 52 insertions(+), 53 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc8e6a408b..056bb70a1d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -232,53 +232,6 @@ endif() # OTClient source files configuration # ***************************************************************************** set(SOURCE_FILES - client/animatedtext.cpp - client/animator.cpp - client/attachableobject.cpp - client/attachedeffect.cpp - client/attachedeffectmanager.cpp - client/client.cpp - client/container.cpp - client/creature.cpp - client/creatures.cpp - client/effect.cpp - client/game.cpp - client/gameconfig.cpp - client/houses.cpp - client/item.cpp - client/itemtype.cpp - client/lightview.cpp - client/localplayer.cpp - client/luafunctions.cpp - client/luavaluecasts.cpp - client/map.cpp - client/mapio.cpp - client/mapview.cpp - client/minimap.cpp - client/missile.cpp - client/outfit.cpp - client/player.cpp - client/position.cpp - client/protocolcodes.cpp - client/protocolgame.cpp - client/protocolgameparse.cpp - client/protocolgamesend.cpp - client/shadermanager.cpp - client/spriteappearances.cpp - client/spritemanager.cpp - client/statictext.cpp - client/thing.cpp - client/thingtype.cpp - client/thingtypemanager.cpp - client/tile.cpp - client/towns.cpp - client/uicreature.cpp - client/uiitem.cpp - client/uimap.cpp - client/uimapanchorlayout.cpp - client/uiminimap.cpp - client/uiprogressrect.cpp - client/uisprite.cpp framework/core/adaptativeframecounter.cpp framework/core/application.cpp framework/core/asyncdispatcher.cpp @@ -379,6 +332,54 @@ set(SOURCE_FILES framework/util/color.cpp framework/util/crypt.cpp + client/animatedtext.cpp + client/animator.cpp + client/attachableobject.cpp + client/attachedeffect.cpp + client/attachedeffectmanager.cpp + client/client.cpp + client/container.cpp + client/creature.cpp + client/creatures.cpp + client/effect.cpp + client/game.cpp + client/gameconfig.cpp + client/houses.cpp + client/item.cpp + client/itemtype.cpp + client/lightview.cpp + client/localplayer.cpp + client/luafunctions.cpp + client/luavaluecasts.cpp + client/map.cpp + client/mapio.cpp + client/mapview.cpp + client/minimap.cpp + client/missile.cpp + client/outfit.cpp + client/player.cpp + client/position.cpp + client/protocolcodes.cpp + client/protocolgame.cpp + client/protocolgameparse.cpp + client/protocolgamesend.cpp + client/shadermanager.cpp + client/spriteappearances.cpp + client/spritemanager.cpp + client/statictext.cpp + client/thing.cpp + client/thingtype.cpp + client/thingtypemanager.cpp + client/tile.cpp + client/towns.cpp + client/uicreature.cpp + client/uiitem.cpp + client/uimap.cpp + client/uimapanchorlayout.cpp + client/uiminimap.cpp + client/uiprogressrect.cpp + client/uisprite.cpp + protobuf/appearances.pb.cc main.cpp androidmain.cpp diff --git a/src/client/attachableobject.cpp b/src/client/attachableobject.cpp index 9fb4347c93..bad79c309d 100644 --- a/src/client/attachableobject.cpp +++ b/src/client/attachableobject.cpp @@ -21,10 +21,8 @@ */ #include "attachableobject.h" -#include "tile.h" #include -#include void AttachableObject::attachEffect(const AttachedEffectPtr& obj) { if (!obj) diff --git a/src/client/attachableobject.h b/src/client/attachableobject.h index a19ebf942e..9ffb5ccdc9 100644 --- a/src/client/attachableobject.h +++ b/src/client/attachableobject.h @@ -22,12 +22,14 @@ #pragma once #include "attachedeffect.h" +#include - // @bindclass -#pragma pack(push,1) // disable memory alignment class AttachableObject : public LuaObject { public: + AttachableObject() = default; + virtual ~AttachableObject() = default; + void attachEffect(const AttachedEffectPtr& obj); void clearAttachedEffects(); bool detachEffectById(uint16_t id); @@ -49,4 +51,3 @@ class AttachableObject : public LuaObject std::vector m_attachedEffects; uint8_t m_ownerHidden{ 0 }; }; -#pragma pack(pop) diff --git a/src/client/thing.h b/src/client/thing.h index e8a29c1fb6..efccbc1e44 100644 --- a/src/client/thing.h +++ b/src/client/thing.h @@ -25,7 +25,6 @@ #include #include #include -#include "attachedeffect.h" #include "declarations.h" #include "spritemanager.h" #include "thingtype.h"