msvc build fix
This commit is contained in:
parent
1627e21c1d
commit
b3a1cad0e1
@ -93,7 +93,7 @@ assetload::postfunc assetload::atlas(
|
|||||||
) {
|
) {
|
||||||
AtlasBuilder builder;
|
AtlasBuilder builder;
|
||||||
for (const auto& file : paths->listdir(directory)) {
|
for (const auto& file : paths->listdir(directory)) {
|
||||||
if (!imageio::is_read_supported(file.extension()))
|
if (!imageio::is_read_supported(file.extension().u8string()))
|
||||||
continue;
|
continue;
|
||||||
if (!append_atlas(builder, file))
|
if (!append_atlas(builder, file))
|
||||||
continue;
|
continue;
|
||||||
@ -289,7 +289,7 @@ static bool animation(
|
|||||||
read_anim_file(animFile, frameList);
|
read_anim_file(animFile, frameList);
|
||||||
}
|
}
|
||||||
for (const auto& file : paths->listdir(animsDir + "/" + name)) {
|
for (const auto& file : paths->listdir(animsDir + "/" + name)) {
|
||||||
if (!frameList.empty() && !contains(frameList, file.stem())) {
|
if (!frameList.empty() && !contains(frameList, file.stem().u8string())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!append_atlas(builder, file))
|
if (!append_atlas(builder, file))
|
||||||
|
|||||||
@ -84,7 +84,7 @@ void LevelScreen::saveWorldPreview() {
|
|||||||
worldRenderer->draw(ctx, &camera, false, postProcessing.get());
|
worldRenderer->draw(ctx, &camera, false, postProcessing.get());
|
||||||
auto image = postProcessing->toImage();
|
auto image = postProcessing->toImage();
|
||||||
image->flipY();
|
image->flipY();
|
||||||
imageio::write(paths->resolve("world:preview.png"), image.get());
|
imageio::write(paths->resolve("world:preview.png").u8string(), image.get());
|
||||||
} catch (const std::exception& err) {
|
} catch (const std::exception& err) {
|
||||||
logger.error() << err.what();
|
logger.error() << err.what();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
#include "../../core/DrawContext.hpp"
|
#include "../../core/DrawContext.hpp"
|
||||||
#include "../../core/Batch2D.hpp"
|
#include "../../core/Batch2D.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
||||||
Container::Container(glm::vec2 size) : UINode(size) {
|
Container::Container(glm::vec2 size) : UINode(size) {
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "Panel.hpp"
|
#include "Panel.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
||||||
Panel::Panel(glm::vec2 size, glm::vec4 padding, float interval)
|
Panel::Panel(glm::vec2 size, glm::vec4 padding, float interval)
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Level::~Level(){
|
|||||||
void Level::loadMatrix(int32_t x, int32_t z, uint32_t radius) {
|
void Level::loadMatrix(int32_t x, int32_t z, uint32_t radius) {
|
||||||
chunks->setCenter(x, z);
|
chunks->setCenter(x, z);
|
||||||
uint32_t diameter = std::min(
|
uint32_t diameter = std::min(
|
||||||
radius*2L,
|
radius*2LL,
|
||||||
(settings.chunks.loadDistance.get() + settings.chunks.padding.get()) * 2
|
(settings.chunks.loadDistance.get() + settings.chunks.padding.get()) * 2LL
|
||||||
);
|
);
|
||||||
if (chunks->w != diameter) {
|
if (chunks->w != diameter) {
|
||||||
chunks->resize(diameter, diameter);
|
chunks->resize(diameter, diameter);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user