libeuropa: Manual revert of 69a7b0e45e
While it's definitely something that should be explored later on when libeuropa is a larger library, and has C ABI wrappers to better foster bindings between other languages like Rust and such, for now, libeuropa is both pretty entertwined with both the C++ standard library and STL, and still in heavy development, so I think doing this isn't a good move.
This commit is contained in:
parent
8bd1207ccf
commit
7fa3d8a14d
7 changed files with 9 additions and 53 deletions
|
@ -11,14 +11,13 @@
|
||||||
|
|
||||||
#include <europa/io/pak/File.hpp>
|
#include <europa/io/pak/File.hpp>
|
||||||
#include <europa/structs/Pak.hpp>
|
#include <europa/structs/Pak.hpp>
|
||||||
#include <europa/util/DllExport.hpp>
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace europa::io::pak {
|
namespace europa::io::pak {
|
||||||
|
|
||||||
/// Reader for Europa package files (.pak).
|
/// Reader for Europa package files (.pak).
|
||||||
struct LIBEUROPA_EXPORT Reader {
|
struct Reader {
|
||||||
using FlatType = std::pair<std::string, File>;
|
using FlatType = std::pair<std::string, File>;
|
||||||
using MapType = std::vector<FlatType>;
|
using MapType = std::vector<FlatType>;
|
||||||
|
|
||||||
|
|
|
@ -11,17 +11,15 @@
|
||||||
|
|
||||||
#include <europa/io/pak/File.hpp>
|
#include <europa/io/pak/File.hpp>
|
||||||
#include <europa/io/pak/WriterProgressReportSink.hpp>
|
#include <europa/io/pak/WriterProgressReportSink.hpp>
|
||||||
|
#include <europa/structs/Pak.hpp>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <europa/structs/Pak.hpp>
|
|
||||||
#include <europa/util/DllExport.hpp>
|
|
||||||
|
|
||||||
namespace europa::io::pak {
|
namespace europa::io::pak {
|
||||||
|
|
||||||
/// A efficient writer for Europa package (.pak) files.
|
/// A efficient writer for Europa package (.pak) files.
|
||||||
struct LIBEUROPA_EXPORT Writer {
|
struct Writer {
|
||||||
/// Vocabulary type for making sector alignment stuff a bit easier to see.
|
/// Vocabulary type for making sector alignment stuff a bit easier to see.
|
||||||
enum class SectorAlignment {
|
enum class SectorAlignment {
|
||||||
DoNotAlign, /// Do not align to a sector boundary
|
DoNotAlign, /// Do not align to a sector boundary
|
||||||
|
@ -52,6 +50,6 @@ namespace europa::io::pak {
|
||||||
structs::PakVersion version {};
|
structs::PakVersion version {};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace europa::io
|
} // namespace europa::io::pak
|
||||||
|
|
||||||
#endif // EUROPA_IO_PAKWRITER_H
|
#endif // EUROPA_IO_PAKWRITER_H
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#define EUROPA_IO_YATFREADER_H
|
#define EUROPA_IO_YATFREADER_H
|
||||||
|
|
||||||
#include <europa/structs/Yatf.hpp>
|
#include <europa/structs/Yatf.hpp>
|
||||||
#include <europa/util/DllExport.hpp>
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
|
||||||
namespace europa::util {
|
namespace europa::util {
|
||||||
|
@ -20,7 +19,7 @@ namespace europa::util {
|
||||||
namespace europa::io::yatf {
|
namespace europa::io::yatf {
|
||||||
|
|
||||||
/// Reader for PS2 Europa .tex (YATF - Yet Another Texture Format) files.
|
/// Reader for PS2 Europa .tex (YATF - Yet Another Texture Format) files.
|
||||||
struct LIBEUROPA_EXPORT Reader {
|
struct Reader {
|
||||||
explicit Reader(std::istream& is);
|
explicit Reader(std::istream& is);
|
||||||
|
|
||||||
/// Read image. The image output to [surface] is converted to RGBA8888 implicitly.
|
/// Read image. The image output to [surface] is converted to RGBA8888 implicitly.
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
//
|
|
||||||
// EuropaTools
|
|
||||||
//
|
|
||||||
// (C) 2021-2025 modeco80 <lily.modeco80@protonmail.ch>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef europa_EXPORTS
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define LIBEUROPA_EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define LIBEUROPA_EXPORT __attribute__((visibility("default")))
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define LIBEUROPA_EXPORT __declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define LIBEUROPA_EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <europa/util/UniqueArray.hpp>
|
#include <europa/util/UniqueArray.hpp>
|
||||||
#include <europa/util/DllExport.hpp>
|
|
||||||
|
|
||||||
namespace europa::util {
|
namespace europa::util {
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ namespace europa::util {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// A RGBA8888 image surface.
|
/// A RGBA8888 image surface.
|
||||||
struct LIBEUROPA_EXPORT ImageSurface {
|
struct ImageSurface {
|
||||||
ImageSurface();
|
ImageSurface();
|
||||||
explicit ImageSurface(Size size);
|
explicit ImageSurface(Size size);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <europa/util/DllExport.hpp>
|
|
||||||
|
|
||||||
namespace europa::util {
|
namespace europa::util {
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ namespace europa::util {
|
||||||
/// std::unique_ptr<T[]> for buffers
|
/// std::unique_ptr<T[]> for buffers
|
||||||
/// that need to track their size as well.
|
/// that need to track their size as well.
|
||||||
template <class T>
|
template <class T>
|
||||||
struct LIBEUROPA_EXPORT UniqueArray final {
|
struct UniqueArray final {
|
||||||
UniqueArray() = default;
|
UniqueArray() = default;
|
||||||
explicit UniqueArray(std::size_t size) {
|
explicit UniqueArray(std::size_t size) {
|
||||||
Resize(size);
|
Resize(size);
|
||||||
|
|
|
@ -6,14 +6,8 @@
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
|
|
||||||
# NOTICE: libeuropa in shared form does not have a stable ABI yet,
|
|
||||||
# and more than likely, until a defined semver release
|
|
||||||
# never will.
|
|
||||||
#
|
|
||||||
# There will probably be an option or additional target always
|
|
||||||
# to build static libeuropa.
|
|
||||||
|
|
||||||
add_library(europa SHARED
|
add_library(europa
|
||||||
# Utility
|
# Utility
|
||||||
util/ImageSurface.cpp
|
util/ImageSurface.cpp
|
||||||
|
|
||||||
|
@ -30,13 +24,4 @@ add_library(europa SHARED
|
||||||
|
|
||||||
target_include_directories(europa PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
target_include_directories(europa PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
target_compile_features(europa PUBLIC cxx_std_20)
|
europa_target(europa)
|
||||||
|
|
||||||
# SOversion for *ix.
|
|
||||||
set_target_properties(europa PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0)
|
|
||||||
|
|
||||||
install(TARGETS europa
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
)
|
|
Loading…
Reference in a new issue