From 7cc36d4f544df68e171c6ad26b8b3322d4e435ff Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sun, 8 Oct 2023 21:38:55 +0700 Subject: [PATCH] Add TODOs and make texture size squared --- game/ennix.todo | 17 +++++++++++++++++ game/tools/texturepacker.c | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 game/ennix.todo diff --git a/game/ennix.todo b/game/ennix.todo new file mode 100644 index 0000000..96d570f --- /dev/null +++ b/game/ennix.todo @@ -0,0 +1,17 @@ +#-*- mode: org -*- +#+TODO: BUG TODO | DONE +#+STARTUP: show2levels + +* DONE Load images with stb_image +* DONE Check if images exist +* DONE Determine minimum size of output image +* DONE Write images to correct regions in output buffer +* TODO Generate a Rect data structure that determines where an image goes +* TODO Write to the rect rather than global values +* TODO Research simple texture packing algorithms +* TODO Implement one? +* TODO Take an =-o= flag for the name of the output file +* TODO Write a description on how to use the application +* TODO Figure out how to better structure/organize this project +* TODO Write unit tests +* TODO Figure out how to profile performance diff --git a/game/tools/texturepacker.c b/game/tools/texturepacker.c index bc18c36..4d970bf 100644 --- a/game/tools/texturepacker.c +++ b/game/tools/texturepacker.c @@ -111,7 +111,7 @@ int main(int argc, char* argv[]) { } } - stbi_write_png("test.png", maxw, totalh, 4, buf, maxw * 4); + stbi_write_png("test.png", max, max, 4, buf, maxw * 4); //------------------------------------- // Free them all, but eventually we would free after we finished 1