acabat amb resource.pack

This commit is contained in:
2026-04-16 16:21:44 +02:00
parent b2d5f5af61
commit 4244bcaea3
11 changed files with 55 additions and 167 deletions

View File

@@ -2,7 +2,7 @@
#include <fstream>
#include "core/jail/jfile.hpp"
#include "core/resources/resource_helper.hpp"
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
@@ -44,10 +44,10 @@ JD8_Surface JD8_NewSurface() {
}
JD8_Surface JD8_LoadSurface(const char* file) {
auto buffer = file_readfile(file);
auto buffer = ResourceHelper::loadFile(file);
unsigned short w, h;
Uint8* pixels = LoadGif(reinterpret_cast<unsigned char*>(buffer.data()), &w, &h);
Uint8* pixels = LoadGif(buffer.data(), &w, &h);
if (pixels == NULL) {
printf("Unable to load bitmap: %s\n", SDL_GetError());
@@ -62,8 +62,8 @@ JD8_Surface JD8_LoadSurface(const char* file) {
}
JD8_Palette JD8_LoadPalette(const char* file) {
auto buffer = file_readfile(file);
return (JD8_Palette)LoadPalette(reinterpret_cast<unsigned char*>(buffer.data()));
auto buffer = ResourceHelper::loadFile(file);
return (JD8_Palette)LoadPalette(buffer.data());
}
void JD8_SetScreenPalette(JD8_Palette palette) {