From 6ba55bd63422372bf4b9a573f0c75fc0877652c1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Mar 2017 22:53:04 +0300 Subject: Move rwops types into separate file. --- src/CMakeLists.txt | 2 ++ src/Makefile.am | 1 + src/fs/virtfs/rwopstypes.h | 34 ++++++++++++++++++++++++++++++++++ src/fs/virtfs/virtfsrwops.h | 10 ++-------- 4 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 src/fs/virtfs/rwopstypes.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a59a23b0..85ae478d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -891,6 +891,7 @@ SET(SRCS fs/virtfs/virtlist.h fs/virtfs/virtfs.cpp fs/virtfs/virtfs.h + fs/virtfs/rwopstypes.h fs/virtfs/virtdirentry.cpp fs/virtfs/virtdirentry.h fs/virtfs/virtfsdir.cpp @@ -1790,6 +1791,7 @@ SET(DYE_CMD_SRCS fs/virtfs/virtlist.h fs/virtfs/virtfs.cpp fs/virtfs/virtfs.h + fs/virtfs/rwopstypes.h fs/virtfs/virtdirentry.cpp fs/virtfs/virtdirentry.h fs/virtfs/virtfsdir.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 0c6f7f7a9..c6b35a6df 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -836,6 +836,7 @@ BASE_SRC += events/actionevent.h \ winver.h \ enums/fs/fsentrytype.h \ fs/virtfs/fileapi.h \ + fs/virtfs/rwopstypes.h \ fs/virtfs/virtdirentry.cpp \ fs/virtfs/virtdirentry.h \ fs/virtfs/virtfs.cpp \ diff --git a/src/fs/virtfs/rwopstypes.h b/src/fs/virtfs/rwopstypes.h new file mode 100644 index 000000000..36a87e5a4 --- /dev/null +++ b/src/fs/virtfs/rwopstypes.h @@ -0,0 +1,34 @@ +/* + * The ManaPlus Client + * Copyright (C) 2013-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef SRC_FS_VIRTFS_RWOPSTYPES_H +#define SRC_FS_VIRTFS_RWOPSTYPES_H + +#include "localconsts.h" + +#ifdef USE_SDL2 +#define RWOPSINT int64_t +#define RWOPSSIZE size_t +#else // USE_SDL2 +#define RWOPSINT int32_t +#define RWOPSSIZE int +#endif // USE_SDL2 + +#endif // SRC_FS_VIRTFS_RWOPSTYPES_H diff --git a/src/fs/virtfs/virtfsrwops.h b/src/fs/virtfs/virtfsrwops.h index 46d5acca0..ea1259d17 100644 --- a/src/fs/virtfs/virtfsrwops.h +++ b/src/fs/virtfs/virtfsrwops.h @@ -47,17 +47,11 @@ #include "localconsts.h" +#include "fs/virtfs/rwopstypes.h" + #include #include -#ifdef USE_SDL2 -#define RWOPSINT int64_t -#define RWOPSSIZE size_t -#else // USE_SDL2 -#define RWOPSINT int32_t -#define RWOPSSIZE int -#endif // USE_SDL2 - struct VirtFile; namespace VirtFs -- cgit v1.2.3-70-g09d2