From 8e953c223e19864e9f7dc16ca31e95a8b5d5ac66 Mon Sep 17 00:00:00 2001 From: nordsoft Date: Sun, 4 Sep 2022 18:52:24 +0400 Subject: [PATCH] Fix compilation problems --- mapeditor/Animation.h | 1 - mapeditor/BitmapHandler.cpp | 1 - mapeditor/BitmapHandler.h | 3 +++ mapeditor/CGameInfo.cpp | 6 ------ mapeditor/CGameInfo.h | 1 - mapeditor/graphics.cpp | 1 - 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/mapeditor/Animation.h b/mapeditor/Animation.h index 133a8d26a..cc5c84a3f 100644 --- a/mapeditor/Animation.h +++ b/mapeditor/Animation.h @@ -1,7 +1,6 @@ #ifndef ANIMATION_H #define ANIMATION_H -#include "../lib/vcmi_endian.h" #include "../lib/JsonNode.h" #include "../lib/GameConstants.h" #include diff --git a/mapeditor/BitmapHandler.cpp b/mapeditor/BitmapHandler.cpp index 5c33526f2..77d7c58e5 100644 --- a/mapeditor/BitmapHandler.cpp +++ b/mapeditor/BitmapHandler.cpp @@ -11,7 +11,6 @@ #include "../lib/filesystem/Filesystem.h" #include "BitmapHandler.h" -#include "../lib/vcmi_endian.h" #include #include diff --git a/mapeditor/BitmapHandler.h b/mapeditor/BitmapHandler.h index 9b68789c1..762544aed 100644 --- a/mapeditor/BitmapHandler.h +++ b/mapeditor/BitmapHandler.h @@ -7,6 +7,9 @@ #pragma once +#define read_le_u16(p) (* reinterpret_cast(p)) +#define read_le_u32(p) (* reinterpret_cast(p)) + namespace BitmapHandler { //Load file from /DATA or /SPRITES diff --git a/mapeditor/CGameInfo.cpp b/mapeditor/CGameInfo.cpp index d8c58296a..3c8eb86fb 100644 --- a/mapeditor/CGameInfo.cpp +++ b/mapeditor/CGameInfo.cpp @@ -38,7 +38,6 @@ void CGameInfo::setFromLib() skillh = VLC->skillh; objtypeh = VLC->objtypeh; battleFieldHandler = VLC->battlefieldsHandler; - obstacleHandler = VLC->obstacleHandler; } const ArtifactService * CGameInfo::artifacts() const @@ -86,11 +85,6 @@ const SkillService * CGameInfo::skills() const return globalServices->skills(); } -const ObstacleService * CGameInfo::obstacles() const -{ - return globalServices->obstacles(); -} - void CGameInfo::updateEntity(Metatype metatype, int32_t index, const JsonNode & data) { logGlobal->error("CGameInfo::updateEntity call is not expected."); diff --git a/mapeditor/CGameInfo.h b/mapeditor/CGameInfo.h index 70b56905c..bd01dc323 100644 --- a/mapeditor/CGameInfo.h +++ b/mapeditor/CGameInfo.h @@ -63,7 +63,6 @@ public: const spells::Service * spells() const override; const SkillService * skills() const override; const BattleFieldService * battlefields() const override; - const ObstacleService * obstacles() const override; void updateEntity(Metatype metatype, int32_t index, const JsonNode & data) override; diff --git a/mapeditor/graphics.cpp b/mapeditor/graphics.cpp index 43baed092..794982a2c 100644 --- a/mapeditor/graphics.cpp +++ b/mapeditor/graphics.cpp @@ -29,7 +29,6 @@ #include "BitmapHandler.h" #include "../lib/CGameState.h" #include "../lib/JsonNode.h" -#include "../lib/vcmi_endian.h" #include "../lib/CStopWatch.h" #include "../lib/mapObjects/CObjectClassesHandler.h" #include "../lib/mapObjects/CObjectHandler.h"