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:
Lily Tsuru 2025-01-19 02:08:43 -05:00
parent 8bd1207ccf
commit 7fa3d8a14d
7 changed files with 9 additions and 53 deletions

View file

@ -11,14 +11,13 @@
#include <europa/io/pak/File.hpp>
#include <europa/structs/Pak.hpp>
#include <europa/util/DllExport.hpp>
#include <iosfwd>
#include <string>
namespace europa::io::pak {
/// Reader for Europa package files (.pak).
struct LIBEUROPA_EXPORT Reader {
struct Reader {
using FlatType = std::pair<std::string, File>;
using MapType = std::vector<FlatType>;

View file

@ -11,17 +11,15 @@
#include <europa/io/pak/File.hpp>
#include <europa/io/pak/WriterProgressReportSink.hpp>
#include <europa/structs/Pak.hpp>
#include <iosfwd>
#include <string>
#include <utility>
#include <europa/structs/Pak.hpp>
#include <europa/util/DllExport.hpp>
namespace europa::io::pak {
/// 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.
enum class SectorAlignment {
DoNotAlign, /// Do not align to a sector boundary
@ -52,6 +50,6 @@ namespace europa::io::pak {
structs::PakVersion version {};
};
} // namespace europa::io
} // namespace europa::io::pak
#endif // EUROPA_IO_PAKWRITER_H

View file

@ -10,7 +10,6 @@
#define EUROPA_IO_YATFREADER_H
#include <europa/structs/Yatf.hpp>
#include <europa/util/DllExport.hpp>
#include <iosfwd>
namespace europa::util {
@ -20,7 +19,7 @@ namespace europa::util {
namespace europa::io::yatf {
/// Reader for PS2 Europa .tex (YATF - Yet Another Texture Format) files.
struct LIBEUROPA_EXPORT Reader {
struct Reader {
explicit Reader(std::istream& is);
/// Read image. The image output to [surface] is converted to RGBA8888 implicitly.

View file

@ -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

View file

@ -11,7 +11,6 @@
#include <cstddef>
#include <cstdint>
#include <europa/util/UniqueArray.hpp>
#include <europa/util/DllExport.hpp>
namespace europa::util {
@ -67,7 +66,7 @@ namespace europa::util {
#endif
/// A RGBA8888 image surface.
struct LIBEUROPA_EXPORT ImageSurface {
struct ImageSurface {
ImageSurface();
explicit ImageSurface(Size size);

View file

@ -10,7 +10,6 @@
#include <cstddef>
#include <memory>
#include <europa/util/DllExport.hpp>
namespace europa::util {
@ -18,7 +17,7 @@ namespace europa::util {
/// std::unique_ptr<T[]> for buffers
/// that need to track their size as well.
template <class T>
struct LIBEUROPA_EXPORT UniqueArray final {
struct UniqueArray final {
UniqueArray() = default;
explicit UniqueArray(std::size_t size) {
Resize(size);

View file

@ -6,14 +6,8 @@
# 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
util/ImageSurface.cpp
@ -30,13 +24,4 @@ add_library(europa SHARED
target_include_directories(europa PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_compile_features(europa PUBLIC cxx_std_20)
# 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}
)
europa_target(europa)