summaryrefslogtreecommitdiffstats
path: root/core/resource
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 15:10:18 +0500
committeruntodesu <kirill@untode.su>2025-09-11 15:10:18 +0500
commita6ea7b7bbc66327cc2a957496f65dcfab5361cee (patch)
treea4fda8a1a490bf1d88afe4e8d2f8814afdcc0de1 /core/resource
parent8784cbfebcb8a0220fb947a6070032e20b80fc2f (diff)
downloadvoxelius-a6ea7b7bbc66327cc2a957496f65dcfab5361cee.tar.bz2
voxelius-a6ea7b7bbc66327cc2a957496f65dcfab5361cee.zip
Update ImGui to a newer version with font scaling
Diffstat (limited to 'core/resource')
-rw-r--r--core/resource/CMakeLists.txt2
-rw-r--r--core/resource/binfile.cc51
-rw-r--r--core/resource/binfile.hh12
3 files changed, 0 insertions, 65 deletions
diff --git a/core/resource/CMakeLists.txt b/core/resource/CMakeLists.txt
index 7df4306..840b3c2 100644
--- a/core/resource/CMakeLists.txt
+++ b/core/resource/CMakeLists.txt
@@ -1,6 +1,4 @@
target_sources(core PRIVATE
- "${CMAKE_CURRENT_LIST_DIR}/binfile.cc"
- "${CMAKE_CURRENT_LIST_DIR}/binfile.hh"
"${CMAKE_CURRENT_LIST_DIR}/image.cc"
"${CMAKE_CURRENT_LIST_DIR}/image.hh"
"${CMAKE_CURRENT_LIST_DIR}/resource.cc"
diff --git a/core/resource/binfile.cc b/core/resource/binfile.cc
deleted file mode 100644
index 0e6efa8..0000000
--- a/core/resource/binfile.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "core/pch.hh"
-
-#include "core/resource/binfile.hh"
-
-#include "core/resource/resource.hh"
-
-#include "core/utils/physfs.hh"
-
-static const void* binfile_load_func(const char* name, std::uint32_t flags)
-{
- assert(name);
-
- auto file = PHYSFS_openRead(name);
-
- if(file == nullptr) {
- spdlog::error("binfile: {}: {}", name, utils::physfs_error());
- return nullptr;
- }
-
- PHYSFS_sint64 file_size = PHYSFS_fileLength(file);
-
- if(file_size < 0) {
- spdlog::error("binfile: {}: {}", name, utils::physfs_error());
- PHYSFS_close(file);
- return nullptr;
- }
-
- auto binfile = new BinFile();
- binfile->size = static_cast<std::size_t>(file_size);
- binfile->buffer = new std::byte[binfile->size];
-
- PHYSFS_readBytes(file, binfile->buffer, file_size);
- PHYSFS_close(file);
-
- return binfile;
-}
-
-static void binfile_free_func(const void* resource)
-{
- assert(resource);
-
- auto binfile = reinterpret_cast<const BinFile*>(resource);
- delete[] binfile->buffer;
-
- delete binfile;
-}
-
-void BinFile::register_resource(void)
-{
- resource::register_loader<BinFile>(&binfile_load_func, &binfile_free_func);
-}
diff --git a/core/resource/binfile.hh b/core/resource/binfile.hh
deleted file mode 100644
index 5f24d77..0000000
--- a/core/resource/binfile.hh
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef CORE_RESOURCE_BINFILE_HH
-#define CORE_RESOURCE_BINFILE_HH 1
-#pragma once
-
-struct BinFile final {
- static void register_resource(void);
-
- std::byte* buffer;
- std::size_t size;
-};
-
-#endif // CORE_RESOURCE_BINFILE_HH