Skip to content

Commit 50b9b63

Browse files
committed
Fix build
1 parent 33bb8c5 commit 50b9b63

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
4545
build-linux:
4646
runs-on: ubuntu-latest
47-
env:
48-
CC: gcc-13
49-
CXX: g++-13
5047
steps:
5148
- name: Checkout
5249
uses: actions/checkout@v3

src/GLTF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ GLTFExporter::GLTFExporter(const Model& mmd, const AbstractTIM& tim, std::option
573573
buildTexture();
574574
}
575575

576-
bool GLTFExporter::save(const std::string& filename)
576+
bool GLTFExporter::save(const std::filesystem::path& filename)
577577
{
578578
tinygltf::TinyGLTF gltf;
579579
return gltf.WriteGltfSceneToFile(&model,
580-
filename,
580+
filename.string(),
581581
true, // embedImages
582582
true, // embedBuffers
583583
true, // pretty print

src/GLTF.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ class GLTFExporter
7474
public:
7575
GLTFExporter(const Model& model, const AbstractTIM& tim, std::optional<TIMPalette> forcedPalette = {});
7676

77-
bool save(const std::string& filename);
77+
bool save(const std::filesystem::path& filename);
7878
};

src/MAP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ void MAPExporter::saveObject(MapObject& obj, TIMPalette& pal, std::filesystem::p
398398
if (image.has_value() && obj.width > 0 && obj.height > 0)
399399
{
400400
auto png = image.value()->getImage(pal, obj.uvX, obj.uvY, obj.width, obj.height, obj.transparency != 4);
401-
png.save_png(path.c_str());
401+
png.save_png(path.string().c_str());
402402
}
403403
else
404404
{
405405
std::cout << "Object with invalid image data detected.\n";
406406
cimg_library::CImg<uint8_t> png(std::max<uint16_t>(obj.width, 1), std::max<uint16_t>(obj.height, 1), 1, 4, 0);
407-
png.save_png(path.c_str());
407+
png.save_png(path.string().c_str());
408408
}
409409
}
410410

@@ -425,7 +425,7 @@ bool MAPExporter::save(std::filesystem::path outputDir)
425425
// write background images
426426
auto images = tfs.getImages(map);
427427
for (auto i = 0; i < images.size(); i++)
428-
images[i].save_png((outputDir / std::format("background_{}.png", i)).c_str());
428+
images[i].save_png((outputDir / std::format("background_{}.png", i)).string().c_str());
429429

430430
// write object images
431431
std::map<uint32_t, TIMPalette> clutMapping = getCLUTMap();

0 commit comments

Comments
 (0)