diff --git a/assets/scene/minesweeper.lua b/assets/scene/minesweeper.lua index c9f855e..edde3ce 100644 --- a/assets/scene/minesweeper.lua +++ b/assets/scene/minesweeper.lua @@ -199,7 +199,7 @@ function sceneRender() 1, 1 ) - textDraw(10, 10, "A") + textDraw(10, 10, "Hello World") -- centerX = math.floor(screenGetWidth() / 2) -- centerY = math.floor(screenGetHeight() / 2) diff --git a/assets/ui/minogram.dpt b/assets/ui/minogram.dpt index 223156e..688283d 100644 Binary files a/assets/ui/minogram.dpt and b/assets/ui/minogram.dpt differ diff --git a/assets/ui/minogram.dtf b/assets/ui/minogram.dtf index 95245c1..41511ea 100644 Binary files a/assets/ui/minogram.dtf and b/assets/ui/minogram.dtf differ diff --git a/src/asset/type/assettexture.h b/src/asset/type/assettexture.h index 35f42b7..6ff4cff 100644 --- a/src/asset/type/assettexture.h +++ b/src/asset/type/assettexture.h @@ -8,8 +8,8 @@ #pragma once #include "error/error.h" -#define ASSET_TEXTURE_WIDTH_MAX 256 -#define ASSET_TEXTURE_HEIGHT_MAX 256 +#define ASSET_TEXTURE_WIDTH_MAX 2048 +#define ASSET_TEXTURE_HEIGHT_MAX 2048 #define ASSET_TEXTURE_SIZE_MAX ( \ ASSET_TEXTURE_WIDTH_MAX * ASSET_TEXTURE_HEIGHT_MAX \ ) diff --git a/src/display/text.c b/src/display/text.c index 51fdfce..926aee3 100644 --- a/src/display/text.c +++ b/src/display/text.c @@ -21,7 +21,7 @@ errorret_t textInit(void) { } void textDispose(void) { - // textureDispose(&DEFAULT_FONT_TEXTURE); + textureDispose(&DEFAULT_FONT_TEXTURE); } void textDrawChar( diff --git a/tools/tile-joiner.html b/tools/tile-joiner.html index adb303f..b1f8a12 100644 --- a/tools/tile-joiner.html +++ b/tools/tile-joiner.html @@ -94,6 +94,9 @@ return onBadImages('Please select 2 or more image images.'); } + // Sort images by name to ensure consistent output + images = Object.fromEntries(Object.entries(images).sort(([nameA], [nameB]) => nameA.localeCompare(nameB))); + elFileError.style.display = 'none'; let strInfo = `Selected ${Object.keys(images).length} images:\n`; @@ -119,7 +122,16 @@ outputHeight = firstHeight; outputWidth = nextPowerOfTwo(Object.values(images).reduce((sum, img) => sum + img.width, 0)); } else { - onBadImages('All images must share the same width or height, and that dimension must be a power of two.'); + if(allImagesShareWidth) { + outputWidth = nextPowerOfTwo(firstWidth); + outputHeight = nextPowerOfTwo(Object.values(images).reduce((sum, img) => sum + img.height, 0)); + } else if(allImagesShareHeight) { + outputHeight = nextPowerOfTwo(firstHeight); + outputWidth = nextPowerOfTwo(Object.values(images).reduce((sum, img) => sum + img.width, 0)); + } else { + onBadImages('All images must share the same width or height to be joined together.'); + return; + } } // Update preview