From fc52afdb0032e0dd7e120e05dd62fffd2b8fc5e1 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 6 Oct 2025 19:14:52 -0500 Subject: [PATCH] Refator pass 1 --- {src/game => archive}/rpg/CMakeLists.txt | 0 .../rpg/entity/CMakeLists.txt | 0 {src/game => archive}/rpg/entity/direction.c | 0 {src/game => archive}/rpg/entity/direction.h | 0 {src/game => archive}/rpg/entity/entity.c | 0 {src/game => archive}/rpg/entity/entity.h | 0 {src/game => archive}/rpg/entity/npc.c | 0 {src/game => archive}/rpg/entity/npc.h | 0 {src/game => archive}/rpg/entity/player.c | 0 {src/game => archive}/rpg/entity/player.h | 0 archive/rpg/game.c | 21 +++++ .../rpg/overworld/CMakeLists.txt | 0 .../rpg/overworld/sceneoverworld.c | 4 +- .../rpg/overworld/sceneoverworld.h | 0 {src/game => archive}/rpg/rpg.c | 0 {src/game => archive}/rpg/rpg.h | 0 {src/game => archive}/rpg/screen.c | 2 +- {src/game => archive}/rpg/screen.h | 2 +- {src/game => archive}/rpg/test/CMakeLists.txt | 0 {src/game => archive}/rpg/test/scenetest.c | 2 +- {src/game => archive}/rpg/test/scenetest.h | 0 .../game => archive}/rpg/world/CMakeLists.txt | 0 {src/game => archive}/rpg/world/map.c | 0 {src/game => archive}/rpg/world/map.h | 0 {src/game => archive}/rpg/world/tile.h | 0 assets/CMakeLists.txt | 15 ++-- .../{minesweeper => }/config/CMakeLists.txt | 3 +- assets/config/init-base.dcf | 2 + .../init_psp.dcf => config/init-psp.dcf} | 9 +- assets/{rpg => }/config/init.dcf | 8 +- assets/{rpg => }/entity/CMakeLists.txt | 0 assets/{rpg => }/entity/entities.png | Bin assets/{rpg => }/entity/entities.tsx | 0 assets/{rpg => }/map/CMakeLists.txt | 0 assets/{rpg => }/map/untitled.tmx | 0 assets/minesweeper/CMakeLists.txt | 11 --- assets/minesweeper/config/init.dcf | 19 ----- assets/minesweeper/config/init_psp.dcf | 19 ----- assets/minesweeper/palette/palette0.png | Bin 145 -> 0 bytes assets/minesweeper/palette/palette0.pxo | Bin 1463 -> 0 bytes assets/minesweeper/sweep/CMakeLists.txt | 4 - assets/minesweeper/sweep/backgrounds.png | Bin 6773 -> 0 bytes assets/minesweeper/sweep/borders.png | Bin 3888 -> 0 bytes assets/minesweeper/sweep/cells.png | Bin 3673 -> 0 bytes assets/minesweeper/sweep/grids.png | Bin 4313 -> 0 bytes assets/minesweeper/ui/CMakeLists.txt | 9 -- assets/minesweeper/ui/background.png | Bin 268 -> 0 bytes assets/minesweeper/ui/background.pxo | Bin 917 -> 0 bytes assets/minesweeper/ui/frame_large.png | Bin 421 -> 0 bytes assets/minesweeper/ui/frame_large.pxo | Bin 987 -> 0 bytes assets/minesweeper/ui/ui.png | Bin 1715 -> 0 bytes assets/minesweeper/ui/ui.pxo | Bin 1841 -> 0 bytes assets/minesweeper/ui/ui_frame | Bin 913 -> 0 bytes assets/minesweeper/ui/ui_frame.png | Bin 293 -> 0 bytes .../{minesweeper => }/palette/CMakeLists.txt | 0 assets/{rpg => }/palette/palette0.png | Bin assets/{rpg => }/palette/palette0.pxo | Bin assets/rpg/CMakeLists.txt | 13 --- assets/rpg/config/CMakeLists.txt | 7 -- assets/rpg/palette/CMakeLists.txt | 6 -- assets/rpg/ui/minogram.png | Bin 1260 -> 0 bytes assets/{rpg => }/tileset/prarie.png | Bin assets/{rpg => }/tileset/prarie.pxo | Bin assets/{rpg => }/tileset/prarie.tsx | 0 assets/{rpg => }/ui/CMakeLists.txt | 0 assets/{minesweeper => }/ui/minogram.png | Bin assets/{rpg => }/untitled.tiled-project | 0 assets/{rpg => }/untitled.tiled-session | 0 src/CMakeLists.txt | 1 - src/asset/type/assetalphaimage.h | 2 +- src/asset/type/assetpaletteimage.h | 2 +- src/console/cmd/cmdscreen.h | 22 +++++ src/console/console.c | 2 + src/display/CMakeLists.txt | 8 +- src/display/camera.c | 2 +- src/display/display.c | 5 +- src/display/display.h | 2 +- src/display/{framebuffer => }/framebuffer.c | 0 src/display/{framebuffer => }/framebuffer.h | 2 +- src/display/framebuffer/CMakeLists.txt | 10 --- src/display/screen.h | 2 +- src/display/{spritebatch => }/spritebatch.c | 0 src/display/{spritebatch => }/spritebatch.h | 2 +- src/display/{texture => }/texture.c | 0 src/display/{texture => }/texture.h | 0 src/display/texture/CMakeLists.txt | 13 --- .../{spritebatch => tileset}/CMakeLists.txt | 2 +- src/display/{ => tileset}/tileset.c | 0 src/display/{ => tileset}/tileset.h | 0 src/engine/engine.c | 7 +- src/game/CMakeLists.txt | 18 ---- src/game/game.h | 26 ------ src/game/minesweeper/CMakeLists.txt | 15 ---- src/game/minesweeper/display/CMakeLists.txt | 12 --- src/game/minesweeper/display/sweepboard.c | 30 ------- src/game/minesweeper/display/sweepboard.h | 25 ------ src/game/minesweeper/game.c | 33 -------- src/game/minesweeper/scene/CMakeLists.txt | 12 --- src/game/minesweeper/scene/scenesweep.c | 76 ----------------- src/game/minesweeper/scene/scenesweep.h | 37 -------- src/game/minesweeper/sweeper.c | 80 ------------------ src/game/minesweeper/sweeper.h | 57 ------------- src/game/minesweeper/ui/CMakeLists.txt | 12 --- src/game/minesweeper/ui/ui.c | 76 ----------------- src/game/minesweeper/ui/ui.h | 51 ----------- src/scene/scenemanager.c | 2 +- src/ui/uiconsole.h | 4 +- src/ui/uifps.c | 2 +- src/ui/uifps.h | 4 +- src/ui/uiframe.c | 2 +- src/ui/uiframe.h | 4 +- src/ui/uitext.c | 2 +- tools/assetstool/processtileset.py | 2 +- 113 files changed, 96 insertions(+), 726 deletions(-) rename {src/game => archive}/rpg/CMakeLists.txt (100%) rename {src/game => archive}/rpg/entity/CMakeLists.txt (100%) rename {src/game => archive}/rpg/entity/direction.c (100%) rename {src/game => archive}/rpg/entity/direction.h (100%) rename {src/game => archive}/rpg/entity/entity.c (100%) rename {src/game => archive}/rpg/entity/entity.h (100%) rename {src/game => archive}/rpg/entity/npc.c (100%) rename {src/game => archive}/rpg/entity/npc.h (100%) rename {src/game => archive}/rpg/entity/player.c (100%) rename {src/game => archive}/rpg/entity/player.h (100%) create mode 100644 archive/rpg/game.c rename {src/game => archive}/rpg/overworld/CMakeLists.txt (100%) rename {src/game => archive}/rpg/overworld/sceneoverworld.c (97%) rename {src/game => archive}/rpg/overworld/sceneoverworld.h (100%) rename {src/game => archive}/rpg/rpg.c (100%) rename {src/game => archive}/rpg/rpg.h (100%) rename {src/game => archive}/rpg/screen.c (98%) rename {src/game => archive}/rpg/screen.h (93%) rename {src/game => archive}/rpg/test/CMakeLists.txt (100%) rename {src/game => archive}/rpg/test/scenetest.c (96%) rename {src/game => archive}/rpg/test/scenetest.h (100%) rename {src/game => archive}/rpg/world/CMakeLists.txt (100%) rename {src/game => archive}/rpg/world/map.c (100%) rename {src/game => archive}/rpg/world/map.h (100%) rename {src/game => archive}/rpg/world/tile.h (100%) rename assets/{minesweeper => }/config/CMakeLists.txt (71%) create mode 100644 assets/config/init-base.dcf rename assets/{rpg/config/init_psp.dcf => config/init-psp.dcf} (76%) rename assets/{rpg => }/config/init.dcf (76%) rename assets/{rpg => }/entity/CMakeLists.txt (100%) rename assets/{rpg => }/entity/entities.png (100%) rename assets/{rpg => }/entity/entities.tsx (100%) rename assets/{rpg => }/map/CMakeLists.txt (100%) rename assets/{rpg => }/map/untitled.tmx (100%) delete mode 100644 assets/minesweeper/CMakeLists.txt delete mode 100644 assets/minesweeper/config/init.dcf delete mode 100644 assets/minesweeper/config/init_psp.dcf delete mode 100644 assets/minesweeper/palette/palette0.png delete mode 100644 assets/minesweeper/palette/palette0.pxo delete mode 100644 assets/minesweeper/sweep/CMakeLists.txt delete mode 100644 assets/minesweeper/sweep/backgrounds.png delete mode 100644 assets/minesweeper/sweep/borders.png delete mode 100644 assets/minesweeper/sweep/cells.png delete mode 100644 assets/minesweeper/sweep/grids.png delete mode 100644 assets/minesweeper/ui/CMakeLists.txt delete mode 100644 assets/minesweeper/ui/background.png delete mode 100644 assets/minesweeper/ui/background.pxo delete mode 100644 assets/minesweeper/ui/frame_large.png delete mode 100644 assets/minesweeper/ui/frame_large.pxo delete mode 100644 assets/minesweeper/ui/ui.png delete mode 100644 assets/minesweeper/ui/ui.pxo delete mode 100644 assets/minesweeper/ui/ui_frame delete mode 100644 assets/minesweeper/ui/ui_frame.png rename assets/{minesweeper => }/palette/CMakeLists.txt (100%) rename assets/{rpg => }/palette/palette0.png (100%) rename assets/{rpg => }/palette/palette0.pxo (100%) delete mode 100644 assets/rpg/CMakeLists.txt delete mode 100644 assets/rpg/config/CMakeLists.txt delete mode 100644 assets/rpg/palette/CMakeLists.txt delete mode 100644 assets/rpg/ui/minogram.png rename assets/{rpg => }/tileset/prarie.png (100%) rename assets/{rpg => }/tileset/prarie.pxo (100%) rename assets/{rpg => }/tileset/prarie.tsx (100%) rename assets/{rpg => }/ui/CMakeLists.txt (100%) rename assets/{minesweeper => }/ui/minogram.png (100%) rename assets/{rpg => }/untitled.tiled-project (100%) rename assets/{rpg => }/untitled.tiled-session (100%) create mode 100644 src/console/cmd/cmdscreen.h rename src/display/{framebuffer => }/framebuffer.c (100%) rename src/display/{framebuffer => }/framebuffer.h (98%) delete mode 100644 src/display/framebuffer/CMakeLists.txt rename src/display/{spritebatch => }/spritebatch.c (100%) rename src/display/{spritebatch => }/spritebatch.h (98%) rename src/display/{texture => }/texture.c (100%) rename src/display/{texture => }/texture.h (100%) delete mode 100644 src/display/texture/CMakeLists.txt rename src/display/{spritebatch => tileset}/CMakeLists.txt (91%) rename src/display/{ => tileset}/tileset.c (100%) rename src/display/{ => tileset}/tileset.h (100%) delete mode 100644 src/game/CMakeLists.txt delete mode 100644 src/game/game.h delete mode 100644 src/game/minesweeper/CMakeLists.txt delete mode 100644 src/game/minesweeper/display/CMakeLists.txt delete mode 100644 src/game/minesweeper/display/sweepboard.c delete mode 100644 src/game/minesweeper/display/sweepboard.h delete mode 100644 src/game/minesweeper/game.c delete mode 100644 src/game/minesweeper/scene/CMakeLists.txt delete mode 100644 src/game/minesweeper/scene/scenesweep.c delete mode 100644 src/game/minesweeper/scene/scenesweep.h delete mode 100644 src/game/minesweeper/sweeper.c delete mode 100644 src/game/minesweeper/sweeper.h delete mode 100644 src/game/minesweeper/ui/CMakeLists.txt delete mode 100644 src/game/minesweeper/ui/ui.c delete mode 100644 src/game/minesweeper/ui/ui.h diff --git a/src/game/rpg/CMakeLists.txt b/archive/rpg/CMakeLists.txt similarity index 100% rename from src/game/rpg/CMakeLists.txt rename to archive/rpg/CMakeLists.txt diff --git a/src/game/rpg/entity/CMakeLists.txt b/archive/rpg/entity/CMakeLists.txt similarity index 100% rename from src/game/rpg/entity/CMakeLists.txt rename to archive/rpg/entity/CMakeLists.txt diff --git a/src/game/rpg/entity/direction.c b/archive/rpg/entity/direction.c similarity index 100% rename from src/game/rpg/entity/direction.c rename to archive/rpg/entity/direction.c diff --git a/src/game/rpg/entity/direction.h b/archive/rpg/entity/direction.h similarity index 100% rename from src/game/rpg/entity/direction.h rename to archive/rpg/entity/direction.h diff --git a/src/game/rpg/entity/entity.c b/archive/rpg/entity/entity.c similarity index 100% rename from src/game/rpg/entity/entity.c rename to archive/rpg/entity/entity.c diff --git a/src/game/rpg/entity/entity.h b/archive/rpg/entity/entity.h similarity index 100% rename from src/game/rpg/entity/entity.h rename to archive/rpg/entity/entity.h diff --git a/src/game/rpg/entity/npc.c b/archive/rpg/entity/npc.c similarity index 100% rename from src/game/rpg/entity/npc.c rename to archive/rpg/entity/npc.c diff --git a/src/game/rpg/entity/npc.h b/archive/rpg/entity/npc.h similarity index 100% rename from src/game/rpg/entity/npc.h rename to archive/rpg/entity/npc.h diff --git a/src/game/rpg/entity/player.c b/archive/rpg/entity/player.c similarity index 100% rename from src/game/rpg/entity/player.c rename to archive/rpg/entity/player.c diff --git a/src/game/rpg/entity/player.h b/archive/rpg/entity/player.h similarity index 100% rename from src/game/rpg/entity/player.h rename to archive/rpg/entity/player.h diff --git a/archive/rpg/game.c b/archive/rpg/game.c new file mode 100644 index 0000000..40298d0 --- /dev/null +++ b/archive/rpg/game.c @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2025 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ + +#include "game/game.h" + +errorret_t gameInit(void) { + printf("Init RPG\n"); + errorOk(); +} + +void gameUpdate(void) { + +} + +void gameDispose(void) { + +} \ No newline at end of file diff --git a/src/game/rpg/overworld/CMakeLists.txt b/archive/rpg/overworld/CMakeLists.txt similarity index 100% rename from src/game/rpg/overworld/CMakeLists.txt rename to archive/rpg/overworld/CMakeLists.txt diff --git a/src/game/rpg/overworld/sceneoverworld.c b/archive/rpg/overworld/sceneoverworld.c similarity index 97% rename from src/game/rpg/overworld/sceneoverworld.c rename to archive/rpg/overworld/sceneoverworld.c index 27a3a53..3c49511 100644 --- a/src/game/rpg/overworld/sceneoverworld.c +++ b/archive/rpg/overworld/sceneoverworld.c @@ -7,8 +7,8 @@ #include "sceneoverworld.h" #include "rpg/entity/entity.h" -#include "display/spritebatch/spritebatch.h" -#include "display/framebuffer/framebuffer.h" +#include "display/spritebatch.h" +#include "display/framebuffer.h" #include "display/scene/scenemanager.h" #include "display/mesh/quad.h" #include "asset/assetmanager.h" diff --git a/src/game/rpg/overworld/sceneoverworld.h b/archive/rpg/overworld/sceneoverworld.h similarity index 100% rename from src/game/rpg/overworld/sceneoverworld.h rename to archive/rpg/overworld/sceneoverworld.h diff --git a/src/game/rpg/rpg.c b/archive/rpg/rpg.c similarity index 100% rename from src/game/rpg/rpg.c rename to archive/rpg/rpg.c diff --git a/src/game/rpg/rpg.h b/archive/rpg/rpg.h similarity index 100% rename from src/game/rpg/rpg.h rename to archive/rpg/rpg.h diff --git a/src/game/rpg/screen.c b/archive/rpg/screen.c similarity index 98% rename from src/game/rpg/screen.c rename to archive/rpg/screen.c index f85b8fd..a570a01 100644 --- a/src/game/rpg/screen.c +++ b/archive/rpg/screen.c @@ -7,7 +7,7 @@ #include "screen.h" #include "assert/assert.h" -#include "display/spritebatch/spritebatch.h" +#include "display/spritebatch.h" screen_t SCREEN; diff --git a/src/game/rpg/screen.h b/archive/rpg/screen.h similarity index 93% rename from src/game/rpg/screen.h rename to archive/rpg/screen.h index cdc0faf..41b58a5 100644 --- a/src/game/rpg/screen.h +++ b/archive/rpg/screen.h @@ -7,7 +7,7 @@ #pragma once #include "display/camera.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" typedef struct { #if DISPLAY_SIZE_DYNAMIC == 1 diff --git a/src/game/rpg/test/CMakeLists.txt b/archive/rpg/test/CMakeLists.txt similarity index 100% rename from src/game/rpg/test/CMakeLists.txt rename to archive/rpg/test/CMakeLists.txt diff --git a/src/game/rpg/test/scenetest.c b/archive/rpg/test/scenetest.c similarity index 96% rename from src/game/rpg/test/scenetest.c rename to archive/rpg/test/scenetest.c index e1d1354..8ccc3c2 100644 --- a/src/game/rpg/test/scenetest.c +++ b/archive/rpg/test/scenetest.c @@ -7,7 +7,7 @@ #include "scenetest.h" #include "display/scene/scenemanager.h" -#include "display/spritebatch/spritebatch.h" +#include "display/spritebatch.h" scenetest_t SCENE_TEST; diff --git a/src/game/rpg/test/scenetest.h b/archive/rpg/test/scenetest.h similarity index 100% rename from src/game/rpg/test/scenetest.h rename to archive/rpg/test/scenetest.h diff --git a/src/game/rpg/world/CMakeLists.txt b/archive/rpg/world/CMakeLists.txt similarity index 100% rename from src/game/rpg/world/CMakeLists.txt rename to archive/rpg/world/CMakeLists.txt diff --git a/src/game/rpg/world/map.c b/archive/rpg/world/map.c similarity index 100% rename from src/game/rpg/world/map.c rename to archive/rpg/world/map.c diff --git a/src/game/rpg/world/map.h b/archive/rpg/world/map.h similarity index 100% rename from src/game/rpg/world/map.h rename to archive/rpg/world/map.h diff --git a/src/game/rpg/world/tile.h b/archive/rpg/world/tile.h similarity index 100% rename from src/game/rpg/world/tile.h rename to archive/rpg/world/tile.h diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index f4eb068..280a291 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -3,10 +3,11 @@ # This software is released under the MIT License. # https://opensource.org/licenses/MIT -if(DUSK_TARGET_GAME STREQUAL "rpg") - add_subdirectory(rpg) -elseif(DUSK_TARGET_GAME STREQUAL "minesweeper") - add_subdirectory(minesweeper) -else() - message(FATAL_ERROR "Unknown game specified: ${DUSK_TARGET_GAME}") -endif() \ No newline at end of file +set(DUSK_GAME_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL ${DUSK_CACHE_TARGET}) + +add_subdirectory(palette)# Palette asset needs to be added before any images. + +add_subdirectory(config) +add_subdirectory(entity) +add_subdirectory(map) +add_subdirectory(ui) \ No newline at end of file diff --git a/assets/minesweeper/config/CMakeLists.txt b/assets/config/CMakeLists.txt similarity index 71% rename from assets/minesweeper/config/CMakeLists.txt rename to assets/config/CMakeLists.txt index bd115c1..07960fa 100644 --- a/assets/minesweeper/config/CMakeLists.txt +++ b/assets/config/CMakeLists.txt @@ -4,4 +4,5 @@ # https://opensource.org/licenses/MIT add_asset(CONFIG init.dcf) -add_asset(CONFIG init_psp.dcf) \ No newline at end of file +add_asset(CONFIG init-base.dcf) +add_asset(CONFIG init-psp.dcf) \ No newline at end of file diff --git a/assets/config/init-base.dcf b/assets/config/init-base.dcf new file mode 100644 index 0000000..cffccea --- /dev/null +++ b/assets/config/init-base.dcf @@ -0,0 +1,2 @@ +echo " = Dawn Init = "; +fps 1; \ No newline at end of file diff --git a/assets/rpg/config/init_psp.dcf b/assets/config/init-psp.dcf similarity index 76% rename from assets/rpg/config/init_psp.dcf rename to assets/config/init-psp.dcf index 18162c5..5a47663 100644 --- a/assets/rpg/config/init_psp.dcf +++ b/assets/config/init-psp.dcf @@ -1,4 +1,6 @@ -echo " = Dawn PSP = "; +exec "config/init-base"; + +screen backbuffer; bind up up; bind down down; @@ -8,10 +10,7 @@ bind cross accept; bind circle cancel; bind select toggleconsole; bind start toggleconsole; - bind lstick_negative_y up; bind lstick_positive_y down; bind lstick_negative_x left; -bind lstick_positive_x right; - -fps 1; \ No newline at end of file +bind lstick_positive_x right; \ No newline at end of file diff --git a/assets/rpg/config/init.dcf b/assets/config/init.dcf similarity index 76% rename from assets/rpg/config/init.dcf rename to assets/config/init.dcf index 714d2c7..f1022b3 100644 --- a/assets/rpg/config/init.dcf +++ b/assets/config/init.dcf @@ -1,4 +1,6 @@ -echo " = Dawn Init = "; +exec "config/init-base"; + +screen height 270; bind ` toggleconsole; bind w up; @@ -12,6 +14,4 @@ bind right right; bind e accept; bind enter accept; bind q cancel; -bind esc quit; - -fps 1; \ No newline at end of file +bind esc quit; \ No newline at end of file diff --git a/assets/rpg/entity/CMakeLists.txt b/assets/entity/CMakeLists.txt similarity index 100% rename from assets/rpg/entity/CMakeLists.txt rename to assets/entity/CMakeLists.txt diff --git a/assets/rpg/entity/entities.png b/assets/entity/entities.png similarity index 100% rename from assets/rpg/entity/entities.png rename to assets/entity/entities.png diff --git a/assets/rpg/entity/entities.tsx b/assets/entity/entities.tsx similarity index 100% rename from assets/rpg/entity/entities.tsx rename to assets/entity/entities.tsx diff --git a/assets/rpg/map/CMakeLists.txt b/assets/map/CMakeLists.txt similarity index 100% rename from assets/rpg/map/CMakeLists.txt rename to assets/map/CMakeLists.txt diff --git a/assets/rpg/map/untitled.tmx b/assets/map/untitled.tmx similarity index 100% rename from assets/rpg/map/untitled.tmx rename to assets/map/untitled.tmx diff --git a/assets/minesweeper/CMakeLists.txt b/assets/minesweeper/CMakeLists.txt deleted file mode 100644 index 4dc5bc9..0000000 --- a/assets/minesweeper/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -set(DUSK_GAME_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL ${DUSK_CACHE_TARGET}) - -# Palette asset needs to be added before any images. -add_subdirectory(palette) -add_subdirectory(config) -add_subdirectory(ui) \ No newline at end of file diff --git a/assets/minesweeper/config/init.dcf b/assets/minesweeper/config/init.dcf deleted file mode 100644 index 30edff1..0000000 --- a/assets/minesweeper/config/init.dcf +++ /dev/null @@ -1,19 +0,0 @@ -echo " = Dawn Init = "; - -bind ` toggleconsole; -bind w up; -bind s down; -bind a left; -bind d right; -bind up up; -bind down down; -bind left left; -bind right right; -bind e accept; -bind enter accept; -bind q cancel; -bind esc quit; - -fps 1; - -scene sweep; \ No newline at end of file diff --git a/assets/minesweeper/config/init_psp.dcf b/assets/minesweeper/config/init_psp.dcf deleted file mode 100644 index 802b20a..0000000 --- a/assets/minesweeper/config/init_psp.dcf +++ /dev/null @@ -1,19 +0,0 @@ -echo " = Dawn PSP = "; - -bind up up; -bind down down; -bind left left; -bind right right; -bind cross accept; -bind circle cancel; -bind select toggleconsole; -bind start toggleconsole; - -bind lstick_negative_y up; -bind lstick_positive_y down; -bind lstick_negative_x left; -bind lstick_positive_x right; - -fps 1; - -scene sweep; \ No newline at end of file diff --git a/assets/minesweeper/palette/palette0.png b/assets/minesweeper/palette/palette0.png deleted file mode 100644 index 51dbd9feb0bdc8e332a90f84a6e1b653d3358045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~d!3HGTx9oodq!^2X+?^QKos)S9omi;t~Jz|Ns9hD}$d{&To8Z&tTvoU$b0c7uZvb02po?; zdUE+?$=iw(3aZ;avu!=RM9Ose9k!&^r8VCta|dqZJuN=bq3%uIxBV@)i@(3S@V>JD z)AjADQRbtuI@m$Y`~Bjo zZ-rgiy(sA~`>E|~-s~(Y-2F8BrJDI`{(U>+q<0&zJXl|MfJs|A`(J2Ad3Vs2@0XA5 z+vamz>goB4&L=CkZacvELu79N--4Jj_H}b*q>Xi&OGD{gq(s;bMy={4>RbKbS z^Z645j9!Xe)bVxJSD$rM(NjP=L?}qV%VCAVqQx4%Qf`V-K1ypeGu;e4x}Uda7rmVn zIj19lr%k&xK*b}-cVQq)yEb#M$&ob9yM>p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X$QW!_SJ#)lOocE7+{W%@UoFCG4laE~T$rb!!Ef-y zm^alu!j^yei2-i8HY~E_RDpI!H|rH}QeDG7sb(w-*1#)?*$(g*C#=k~Wl^pTfNAq4 zPTJ&)ePA>5sjqQic(kh>4B-T)%t|EDuE)534}moPncfns-s z>FF^vN^}f_>!6!o?-H}<9UG6!ORETRuu6`UHB#siSgEszA8zpNrI4X9Wfn;*b=zS{ zK|$yn@Mcy3V;!heP8tReXHvWG*3zq8*4wR$tAg)!9>-CTF<&d6eyz4e7_R3>zD*fF;4Z zzCqSDm_FNsc?<;w+`a;679Eh}vqZjQR+EwO9x!xozTpQ^4a#ut7!*%ixJ88^=^F)G zq4`0oMSeQTP<b1_BMK_^Nom3@4p<3*+$DY1JG+wHI0T#MB0}RjBn17NT#1G5C36`D8+T zz28I#q}E4MNg0N3=Jwo6suz0r_Y*pYpbtjdM$6)fv_**(sPz%-Kb7s}RqWP(*B!qB z`xnKSb;0EnZPSTZqX4x8VaMdMVj8H`=H=gS{9&y_s`TT`|4m9-sIMurRK8RoH5oE1 mFHL__H}-IK{8?Wc12QP_l;KAINn-vL0r)i|{Zd`Wr~d`i?*+O5 diff --git a/assets/minesweeper/sweep/grids.png b/assets/minesweeper/sweep/grids.png deleted file mode 100644 index 6c62ec603b1ac10b1952e4a284a72d48c42eae95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4313 zcmeHKeM}Q)9KOPUDKlkT!jfs)=``Yk!;cY+dbU#*s6=Q85DA9PxJp8nG#lfi7JJmW zIFn^eU=Wy42yRqxxIs1&C|u^|h!kkImJuZFNj8)srGUkQEAPF#>$MvRV)*>W*nism za((Z8ejm^C{4Pu5V>WGkeItS(nozRJ{yW2yISyTNce@2+vXkj_9TAC{{YdrcI|&@tNqJU{Me1Z zoIb!iv^C|rKRhy1b(=ig(`aiOp2|9vf4jq2#bXX%@PQG=1jvKHh~uK)VMwFBAD?yn zp_p)yq)|qnD-yYZmj2k%hPOi|)KELfucQ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4mLwK|k$rfm}nMe8snaFlYJL?`eNp<~um&EoWDrRG&~W zJC(fL>uK1y&)G05Q>mA(FFv~Q==&G`1*z|~0{{R3 diff --git a/assets/minesweeper/ui/CMakeLists.txt b/assets/minesweeper/ui/CMakeLists.txt deleted file mode 100644 index 2877a88..0000000 --- a/assets/minesweeper/ui/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -add_asset(TILESET minogram.png type=ALPHA tileWidth=6 tileHeight=10 columns=16 rows=6) -add_asset(TILESET ui.png type=PALETTIZED tileWidth=16 tileHeight=16) -add_asset(TILESET ui_frame.png type=PALETTIZED tileWidth=16 tileHeight=16) -add_asset(TILESET background.png type=PALETTIZED tileWidth=16 tileHeight=16) diff --git a/assets/minesweeper/ui/background.png b/assets/minesweeper/ui/background.png deleted file mode 100644 index 077cca25a04633dbfdf14c790b99ad01fefdd10a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}$2?seLoyoQ zPBr8@Y#_jLU5URa+heg_|4Hso&3n9-M*Tgp@*GE^$8Kixsr|tZk0!tU_IHoJXI5>- zQn}w>-|W&aZ`Uk-?RMFmJI7 zSrMM`t%3Un!%b$r1W~RFjGNeH9JEy$nN#?8G=yq6u%D1CU|2hWg>QoG1E#Qr46+K< z2N<_F30XJ*bw#u?l{CCzWWT`W`GBFY+Ae8^>8{;Tvfsn`*ZgP5{Ksh5J?Z(wz3Z!i PK4S26^>bP0l+XkKF&|}R diff --git a/assets/minesweeper/ui/background.pxo b/assets/minesweeper/ui/background.pxo deleted file mode 100644 index 49a75fd5da04d1e6b1f8c281cc9f2cf72cb6b62e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmWIWW@Zs#VBp|jV4vv}z5Fesa62Odg9|eQ11AFmLrP*vqFz>UeqL+P#k@lXJby%| zEcaz{QN6LO?(n|^r-_+&A5ByXoV1DU$o})1x~zto`k}9WoGX7m=jgeub^UQq;&1QN z=rQs$Tjnw`|Ht-HzS0R(o7=QkuUw?C=(YBZ$j3WcMNXaC!FDJ(@_WX{=0^e6mtO^) zaZRm!a(j|>^(T}6I$R;wotqiGI21m8PSxvaZE_N+oc1ev(q5mmn#jV$ZyzdC-%VDD zO*(F+_hw~|EQ?W9!~NjpuXimi+H!yQF0C7ySDsFA`Ly;#)TOOC2jpGi8b6&-Tg}yN z(BxZq;8WT6jKq!y#=J99*91Q9_bFSdRLfueB};Ls?k86>am8D!r~PNPn51r|@aaL6 zkDC0^hyaO08MlJk&#>{HP~QE1ve5CInY!lO@(LddCL7<+3GMqWuW{_^vc7XZ6?N8p z+E1=AshS4#AGVnr@G0$@{9#MJ=QlREi7z!>^4sP5`y7p03DE^|9~Ad4-y(YRq-@0} z<(r>f-yELxs*veVWWVsla>F*CfiLEF}6^CYEEHS7s zFh~Qb%-qEE)Ob*w>8BMX=B5_w8|vpIR;Cuk8@|1z$k*V&<8rY(u|TFxxS-kAR3V_% z!Nc|UWc_)wx;(e7ytQ%dZwuYeCC2M|CLEtRqx8)EwB5g}y5GHt@4pj!O6k4*-+wpu z%kA7f#r0nOufH4XZHvk^yZ8M6@;mu|)suHYVwL}2en0;2>xsKdbw2&O{J#J1YumrA zFFu(+_LsY_bgtwaKdRe%-!okTCNc(KVq;Lo;r7hDl+5JR;&`YZk{K8RycwAo7;vXo zpg~|0K{Qh8Mc0NNa3IAXhcGa#15$W`5#1nkUx3X36InoaVlxQMPXXSnY#{Z_KzI>I KuLEjhU;qGQQ)FNO diff --git a/assets/minesweeper/ui/frame_large.png b/assets/minesweeper/ui/frame_large.png deleted file mode 100644 index 3d3d3add8b3fd758fcdd0105be8d3e78306f1e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 421 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%z<2_v*Ln`LH zy=9o!Y#_n<;QA`|B-f;m#|$l4Wd*(2pY=)ZaNQ)RIdM_WoesU+BMd<~|Grp${9UGf z-v5TeQ+5{+P;t#y>|Xc#Zi?&?r^{a%8V(oitB$|N8uNYk%9m9;Y(B^S3OJnV5*>a| zwWj6IjMK(7b+wC2Tu*#z&v?ys{PK&vdMg+hG-4YM7x2aAEh};T@T`%S^$g2hHu$n`VBWBjp^U*y z^Z?(1WlT31Z-g*dGt9=WXq#_+-#@<&7fbz;^}eiIN>fFWXD@sGKi}n9g;YMX=fY&o zYcccgdP(Tj&D?W5+AG}0Ft;vm-_O>cOONhllWp7|xF!6-U$GC8PAMN}#%;di^CrLf x=w7w|vJ<=*SNre!TG{te!lgdFvxDO_zW|?K(#_28(!g+M@O1TaS?83{1OQbuuR{O; diff --git a/assets/minesweeper/ui/frame_large.pxo b/assets/minesweeper/ui/frame_large.pxo deleted file mode 100644 index 51c8460bca1252a4332ae3612ead6e0f49191a51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 987 zcmWIWW@Zs#VBp|jh?waVJ$b2oU@Id7gA+3Y11AFmLrP*vqFz>UeqL+P#k@lXJby%| zEcaz{*?Q1#RhD7sz{}`Tx$|7>#(=<%MLI$C?nMG8YxK4C&dAxVKT|txN%ot_ zqf=$C&TV#Z>;F*ws$}o`73ZF@`0PBC{lPuZY=OSYxb2Nx|3s9dfY!Ow>Qcovb!kojBCfYWl#Sz_&w?5?J(NGH~FNy zp_oY91mEaa6K^hHtxWpv9P}ter~7HuLuM7ZyrO5_YftU@J5fpBtn^FTq0graZzyaJ z(^%PBEBEYW&m{BBmGb8cZH`Yf-KDWs(N<+wWwP_j!z&nm3(8;0_KKdk_fDhw{FC$a z9|>Fw=@))*zG_Z~&9kLta&z~nPWPGTFxh@d`G?iT)qfcSP~wX5)xwI?z&K)XU|^62 zQkl7l>8bIc7}HNHO3Y0y);HA8NvupQiZ^_F>mcVL2LXqRBF~P_J{r*|d!xBFqB(S> zw%fD`F)8Ysx!)gl@H@9p;mM}UDxQ;6Ja5~++n(NEY$azWoU3oWZhCQe@VPC=tu?Gq z?fd>XKb+rqezyMqa`#_XzNyq_{rU4}^}niFrYrW}wEPJM(f{7<|M(dJ{DDfqpf~E? z<`;>Z{@naN_f@sO_V;+FKU-}d$z9%WJYVzH{l&FE@ArS}HwgSEc<*3WZU6f#*Y3rs z?aGm_pI57QduHZz72Ye{sA16ip6L=WsWJeQEQ2zRFv!eH$xKcyj)#UtG6O?^HzN}R z1MXB0Gze@Wh(^i-=-SXD0HPd3t^v9SPjsLggzgK3K^uVX#AXnhp8~vD*+80@f$$=b K{sPp-zyJUn#*QEW diff --git a/assets/minesweeper/ui/ui.png b/assets/minesweeper/ui/ui.png deleted file mode 100644 index 74832f9ad95676728976db18e1d2462544074450..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1715 zcmV;k22A;hP)Px*ZAnByRCt{2oUv;hM-+#D>l^`bkZaYdOPoeQAV^LYRwu(&L14JjM2%2o6%zUb zgjL9mMVd1z4+6&3fn3Ew@yT!?q(+iEwbx#81k8y^aXYKo*_oZ$ncdSWc^@3Uot-x` zx9`n+Z)ZjZ2!iKvqIsJa0ab-u>5U)-0)5K^1vhso010+zncDBCGWaUS7a}3dr zFNA|ignHro-z+JxN`n6-=t{MQ&H!cB8W-gz-yiBgED?8t~#Oa$aIDPXaA*+**#+DeL92TgCHGErYH)5&X;ouVr4A5ag19bN6@Qa+ax6)h!vS@)Fe?`|d@ri}prV9|TJ7M=2n zke3#I;xM4Ou7m-o)&T+souF#* zA1KEP`OH<$u$=wMF4a{oZyUbys&*G{g7V|-&oEp=xBCtN zFzihhL5`<6I5L9Li9^7%gPVXW|LmljsC0JHMScD?hP@V^9o$THfD{hOMVSOHEQgub z(}s+oJW>WA&i)S{KOqd)5Qb|hub?7mw-d*`{Nx}m(nw?QaNi&}y2!bH&Q6@{` z-{*_e>a*6#mE4A{tgdg{HhkqxZJFB0>fd$@KF>dI|EZP0tOiVt8|rx{XtwS~``MVEMYf5?>`n7Mf@yPyfF1QT(j zXi#1YRO8Wr6_Lk?Sp6SC)5MU(712eWL^iiEW+}*_E!A&!&SO;1uPhHx2pWZ3DNu}s z+?7V>0gO3-FLE5tn}bL=d7upCC;G0m0YvyHi_7NDVZ<`Wd`2Aiy)IGfln)pTK#pNH z=-eD{E9Y85s(;`2a7zkFB7Jdr{uwBrTPg?0dcXz6;8NeCv$*dQK{owQ;rS=XnoYU~ z?fd7|Hf@wC?;29_{Hb>l{rfzBl{{^c69hpJ1VIoJN;wZu#CZZ@I;0fhd!V6+0};gZ z$lMI_-Hh;+C(6fWH_&&+(u}V#nM=X)cIbUCr4q&CvK#2NnL|{I%tN7a47X7zC3z2v z!p{T(#sd*Vg(&o^8l1YR*$mI0~8@o5ClP#%D;Xp5Ia!O*aH9n002ov JPDHLkV1lG}J5~Sy diff --git a/assets/minesweeper/ui/ui.pxo b/assets/minesweeper/ui/ui.pxo deleted file mode 100644 index 1ff4fcfaaa11f1df1527d0e996139915ed642802..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1841 zcmZ`)3s93+7XA@rd5RQSK`5Z2o_}VMOQQ4+Y`66t zjt*y$Q$M@a-RN6TjQ?Kx`+4Dn@Sp&DX7v~An>X$0^c=r#1JJU|A z-g*wKH`+L?E-{JOS|j*wXMx(Yr_ae9gY^0(1EiAW-+w}gZd*mZ3=?fwXOAhB9_^A5 zj(6mZ_Nz8LGRs6Ab6IqIz*GgD9JAWyevlgb_(A)D{EqF|=yTi_e>(v-Ca0zpb4FKe z9pNTyrhpB99xpxod7zCoek5B>1N;};fod(+#77jTW|c9r36}hmdbSh&@ zA4dFv7*5s`h3l!eBcuFfjRQ;wTL%D@!BR=Gc+ZIZ-pVliy5R3}qK1GypYgE5H)C3Kaj`nine$YYci+4`6)5Xl{)N5X6rmg$SEwUV&J5slFQ~`W zQ_{D=>EnYtp=_1djyAdP=5*7bHh-MwR;EiGxb^wTBR`22rS;f{aQUzV?4%1M1Z8Ix z6uxT4K$rh>j-?{LSt(Y*JrHLkTj=@b!l>-o{J!AMr?uJW>iHrf9yI4M@|z2H z(Oya753I6!6Dy?n#jCS0_3k(rIs+B&)kaJZW$N1dXhv--(+a@3us9)$vwv?|=VhPK z>KC8Pz3|8nXJK(OQhB4ORokzS`Lvp;S(GX}7kGzNI}Ted)m5~8WG*fbmN{P0vK;ky z?r))L1HFW;Wy^=doDi$Qm8cL6!)`Vwn?FN_M)we6aJ?~&a2>+<41_S&xG0q6<{;~m zxfBEKZi8d<4SHzp^p7Rr3y3F#WAnaY!g&S`!=yQxD6Y|!Kj;Z_z#pZwFagYNr%z)~ z<7(z%%I=lmQa%AH)UdXoq8FS|g1Z&)j#D!M*1nuAaPj#g#tO^2D?r_JX4d_kLB_3tD@@G;tAJte}}nSj_Hbsl{}r{{6f7P0YWn z^lv>d0}6b6%I6KL5R!uNRDz|8k9-p9a0m#>*Kzt>R+m9 z(b>yc-kPAjkfkO;9WLWc)xFC~;JsTtvO_CSqzXKgQaqHWv9j|=C^_uR0$$D%aoK~` z=%mk3|JB_jT<}v&WY?V1;U7#fH3!tS-T6~e9o1Gv>n-=W-c_rV8o|K*nh5mZC^B+Z}K(S7!KL_-U06^&HheRbY zB{ngJl1}PVWKrTg#@nG8v=l#e)Q|{=x@7U0m=DvIsgCw diff --git a/assets/minesweeper/ui/ui_frame b/assets/minesweeper/ui/ui_frame deleted file mode 100644 index 3f3c281a92f2d2564f208852037dc373241bcfb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 913 zcmWIWW@Zs#VBp|jD4*sOEy!1!)WpcZ;Ka_4xm%W9aZA6m8XeEIV^N6(r5YlwRie|x7! zkCETCWiAu*e{3)0E1fX4dDg_MEgBs!s#vVEWu{MXij)j@u4pQ~uPY_h@odp1n-94s zOKm4DoA28As%nLy11FU1n0Y>$OSuPD}j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;?DdnThJ`(KIlMo{E!9M4-io~*(1 z{(yB}scvn*l?iy-BDKeBzYJ+Dpb=RMkm}LwshzZzV6~@}YY{}+?@a^g_4TfmNcKy~ zSPt&Zqch*ji}JDQE+@kQJe|1PjoxkLav4Yoq(l~jqqWK<_Bkp2aJG=U=S@?D|Sr#zYc1euYX`IbVZ>92sFkl|wGz0J z$eiHy?*v}#Q`nYYe8e6ddsjJX=Ye1;fpnjwbTwuRJCYiw**7vWf|bJ6G`#;ZhJJ51 zV)m%YQV)@RPe^}V=ajZo~z$+<7&iTqt%fwOw5!$L2%DuJv(TJ8pJyPtn z`q3OgI*-L`9SQx%5KB(&(fze!G<)<2LVriv?`>C)-Q(C*35;?Szr*2hI2;a#0RI5C W$o0rJ!cj&50000argc < 1) { + consolePrint("Expected 1 argument: [value]"); + return; + } + + if(strcmp(exec->argv[0], "backbuffer") == 0) { + SCREEN.mode = SCREEN_MODE_BACKBUFFER; + return; + } +} \ No newline at end of file diff --git a/src/console/console.c b/src/console/console.c index 18fd874..9c75030 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -20,6 +20,7 @@ #include "console/cmd/cmdtoggleconsole.h" #include "console/cmd/cmdalias.h" #include "console/cmd/cmdscene.h" +#include "console/cmd/cmdscreen.h" console_t CONSOLE; @@ -36,6 +37,7 @@ void consoleInit() { consoleRegCmd("toggleconsole", cmdToggleConsole); consoleRegCmd("alias", cmdAlias); consoleRegCmd("scene", cmdScene); + consoleRegCmd("screen", cmdScreen); #if CONSOLE_POSIX threadInit(&CONSOLE.thread, consoleInputThread); diff --git a/src/display/CMakeLists.txt b/src/display/CMakeLists.txt index 1f982c7..3c88a0e 100644 --- a/src/display/CMakeLists.txt +++ b/src/display/CMakeLists.txt @@ -7,17 +7,17 @@ target_sources(${DUSK_TARGET_NAME} PRIVATE display.c + framebuffer.c camera.c - tileset.c screen.c + texture.c + spritebatch.c ) # Subdirectories -add_subdirectory(framebuffer) add_subdirectory(mesh) add_subdirectory(palette) -add_subdirectory(texture) -add_subdirectory(spritebatch) +add_subdirectory(tileset) if(DUSK_TARGET_SYSTEM STREQUAL "linux") target_compile_definitions(${DUSK_TARGET_NAME} diff --git a/src/display/camera.c b/src/display/camera.c index 9582815..d60507e 100644 --- a/src/display/camera.c +++ b/src/display/camera.c @@ -8,7 +8,7 @@ #include "camera.h" #include "display/display.h" #include "assert/assert.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" void cameraInit(camera_t *camera) { cameraInitPerspective(camera); diff --git a/src/display/display.c b/src/display/display.c index 238aa79..bb7dd2f 100644 --- a/src/display/display.c +++ b/src/display/display.c @@ -7,11 +7,10 @@ #include "display/display.h" #include "console/console.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" #include "scene/scenemanager.h" -#include "display/spritebatch/spritebatch.h" +#include "display/spritebatch.h" #include "display/mesh/quad.h" -#include "game/game.h" #include "display/screen.h" display_t DISPLAY; diff --git a/src/display/display.h b/src/display/display.h index 63e007a..34d1397 100644 --- a/src/display/display.h +++ b/src/display/display.h @@ -9,7 +9,7 @@ #include "displaydefs.h" #include "error/error.h" #include "display/camera.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" typedef struct { #if DISPLAY_SDL2 diff --git a/src/display/framebuffer/framebuffer.c b/src/display/framebuffer.c similarity index 100% rename from src/display/framebuffer/framebuffer.c rename to src/display/framebuffer.c diff --git a/src/display/framebuffer/framebuffer.h b/src/display/framebuffer.h similarity index 98% rename from src/display/framebuffer/framebuffer.h rename to src/display/framebuffer.h index dd8b4c4..b33b19c 100644 --- a/src/display/framebuffer/framebuffer.h +++ b/src/display/framebuffer.h @@ -6,7 +6,7 @@ */ #pragma once -#include "display/texture/texture.h" +#include "display/texture.h" #define FRAMEBUFFER_CLEAR_COLOR (1 << 0) #define FRAMEBUFFER_CLEAR_DEPTH (1 << 1) diff --git a/src/display/framebuffer/CMakeLists.txt b/src/display/framebuffer/CMakeLists.txt deleted file mode 100644 index 9f0656b..0000000 --- a/src/display/framebuffer/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - framebuffer.c -) \ No newline at end of file diff --git a/src/display/screen.h b/src/display/screen.h index 41437fc..397aee8 100644 --- a/src/display/screen.h +++ b/src/display/screen.h @@ -7,7 +7,7 @@ #pragma once #include "dusk.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" #include "display/camera.h" #include "display/mesh/quad.h" diff --git a/src/display/spritebatch/spritebatch.c b/src/display/spritebatch.c similarity index 100% rename from src/display/spritebatch/spritebatch.c rename to src/display/spritebatch.c diff --git a/src/display/spritebatch/spritebatch.h b/src/display/spritebatch.h similarity index 98% rename from src/display/spritebatch/spritebatch.h rename to src/display/spritebatch.h index 54fe051..d89af54 100644 --- a/src/display/spritebatch/spritebatch.h +++ b/src/display/spritebatch.h @@ -7,7 +7,7 @@ #pragma once #include "display/mesh/quad.h" -#include "display/texture/texture.h" +#include "display/texture.h" #define SPRITEBATCH_SPRITES_MAX 1 #define SPRITEBATCH_VERTEX_COUNT (SPRITEBATCH_SPRITES_MAX * QUAD_VERTEX_COUNT) diff --git a/src/display/texture/texture.c b/src/display/texture.c similarity index 100% rename from src/display/texture/texture.c rename to src/display/texture.c diff --git a/src/display/texture/texture.h b/src/display/texture.h similarity index 100% rename from src/display/texture/texture.h rename to src/display/texture.h diff --git a/src/display/texture/CMakeLists.txt b/src/display/texture/CMakeLists.txt deleted file mode 100644 index 369aaac..0000000 --- a/src/display/texture/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - texture.c -) - -# Subdirs -# add_subdirectory(draw) \ No newline at end of file diff --git a/src/display/spritebatch/CMakeLists.txt b/src/display/tileset/CMakeLists.txt similarity index 91% rename from src/display/spritebatch/CMakeLists.txt rename to src/display/tileset/CMakeLists.txt index 7c64a15..2be6457 100644 --- a/src/display/spritebatch/CMakeLists.txt +++ b/src/display/tileset/CMakeLists.txt @@ -6,5 +6,5 @@ # Sources target_sources(${DUSK_TARGET_NAME} PRIVATE - spritebatch.c + tileset.c ) \ No newline at end of file diff --git a/src/display/tileset.c b/src/display/tileset/tileset.c similarity index 100% rename from src/display/tileset.c rename to src/display/tileset/tileset.c diff --git a/src/display/tileset.h b/src/display/tileset/tileset.h similarity index 100% rename from src/display/tileset.h rename to src/display/tileset/tileset.h diff --git a/src/engine/engine.c b/src/engine/engine.c index ee9814a..4b1e552 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -13,7 +13,6 @@ #include "display/display.h" #include "scene/scenemanager.h" #include "asset/assetmanager.h" -#include "game/game.h" engine_t ENGINE; @@ -31,11 +30,10 @@ errorret_t engineInit(void) { errorChain(assetManagerInit()); errorChain(displayInit()); errorChain(sceneManagerInit()); - errorChain(gameInit()); // Init scripts #if PSP - consoleExec("exec config/init_psp.dcf"); + consoleExec("exec config/init-psp.dcf"); #else consoleExec("exec config/init.dcf"); #endif @@ -49,7 +47,6 @@ errorret_t engineUpdate(void) { consoleUpdate(); assetManagerUpdate(); - gameUpdate(); sceneManagerUpdate(); errorChain(displayUpdate()); @@ -57,11 +54,9 @@ errorret_t engineUpdate(void) { } errorret_t engineDispose(void) { - gameDispose(); sceneManagerDispose(); errorChain(displayDispose()); assetManagerDispose(); consoleDispose(); - errorOk(); } \ No newline at end of file diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt deleted file mode 100644 index 7dcf24b..0000000 --- a/src/game/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -if(NOT DEFINED DUSK_TARGET_GAME) - message(FATAL_ERROR "DUSK_TARGET_GAME is not defined.") -endif() - -string(TOUPPER "${DUSK_TARGET_GAME}" DUSK_TARGET_GAME_UPPER) - -target_compile_definitions(${DUSK_TARGET_NAME} - PRIVATE - DUSK_TARGET_GAME=${DUSK_TARGET_GAME} - DUSK_GAME_${DUSK_TARGET_GAME_UPPER}=1 -) - -add_subdirectory(${DUSK_TARGET_GAME}) \ No newline at end of file diff --git a/src/game/game.h b/src/game/game.h deleted file mode 100644 index 513877d..0000000 --- a/src/game/game.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include "error/error.h" - -/** - * Initialize the game. - * - * @return Error code. - */ -errorret_t gameInit(void); - -/** - * Update the game state. - */ -void gameUpdate(void); - -/** - * Dispose of the game. - */ -void gameDispose(void); \ No newline at end of file diff --git a/src/game/minesweeper/CMakeLists.txt b/src/game/minesweeper/CMakeLists.txt deleted file mode 100644 index fb9665a..0000000 --- a/src/game/minesweeper/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - game.c -) - -# Subdirs -add_subdirectory(display) -add_subdirectory(scene) -add_subdirectory(ui) \ No newline at end of file diff --git a/src/game/minesweeper/display/CMakeLists.txt b/src/game/minesweeper/display/CMakeLists.txt deleted file mode 100644 index ba4feac..0000000 --- a/src/game/minesweeper/display/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - sweepboard.c -) - -# Subdirs \ No newline at end of file diff --git a/src/game/minesweeper/display/sweepboard.c b/src/game/minesweeper/display/sweepboard.c deleted file mode 100644 index 2fb13b2..0000000 --- a/src/game/minesweeper/display/sweepboard.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "sweepboard.h" - -sweepboard_t SWEEPBOARD; - -void sweepBoardInit() { - // Initialize the sweep board -} - -void sweepBoardRender(const float_t x, const float_t y) { - // Frame - // uiFrameDrawTiled( - // 32, 32, - // w - 64, h - 64, - // UI.frameTileset, - // 0, 0, - // true, - // &UI.frameAsset->paletteImage.texture - // ); -} - -void sweepBoardDispose() { - // Dispose of the sweep board resources -} \ No newline at end of file diff --git a/src/game/minesweeper/display/sweepboard.h b/src/game/minesweeper/display/sweepboard.h deleted file mode 100644 index 69144da..0000000 --- a/src/game/minesweeper/display/sweepboard.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include "dusk.h" - -typedef struct { - int32_t nothing; -} sweepboard_t; - -extern sweepboard_t SWEEPBOARD; - -/** - * Initializes the sweep board. - */ -void sweepBoardInit(); - -/** - * Disposes of the sweep board resources. - */ -void sweepBoardDispose(); \ No newline at end of file diff --git a/src/game/minesweeper/game.c b/src/game/minesweeper/game.c deleted file mode 100644 index b1c8139..0000000 --- a/src/game/minesweeper/game.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "game/game.h" -#include "game/minesweeper/ui/ui.h" -#include "game/minesweeper/scene/scenesweep.h" -#include "scene/scenemanager.h" -#include "console/console.h" -#include "display/screen.h" - -errorret_t gameInit(void) { - // Setup screen - SCREEN.mode = SCREEN_MODE_FIXED_HEIGHT; - SCREEN.fixedHeight.height = 270; - - errorChain(uiInit()); - - sceneManagerRegisterScene(&SCENE_SWEEP); - - errorOk(); -} - -void gameUpdate(void) { - -} - -void gameDispose(void) { - uiDispose(); -} \ No newline at end of file diff --git a/src/game/minesweeper/scene/CMakeLists.txt b/src/game/minesweeper/scene/CMakeLists.txt deleted file mode 100644 index cb19f3a..0000000 --- a/src/game/minesweeper/scene/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - scenesweep.c -) - -# Subdirs \ No newline at end of file diff --git a/src/game/minesweeper/scene/scenesweep.c b/src/game/minesweeper/scene/scenesweep.c deleted file mode 100644 index 435778f..0000000 --- a/src/game/minesweeper/scene/scenesweep.c +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "scenesweep.h" -#include "game/minesweeper/ui/ui.h" -#include "ui/uiframe.h" -#include "display/spritebatch/spritebatch.h" -#include "game/minesweeper/display/sweepboard.h" -#include "display/screen.h" - -scene_t SCENE_SWEEP = { - .name = "sweep", - .init = sceneSweepInit, - .update = sceneSweepUpdate, - .render = sceneSweepRender, - .dispose = sceneSweepDispose, - .background = color_hex(0x48413cff) -}; - -scenesweep_t SCENE_SWEEP_DATA; - -errorret_t sceneSweepInit(void) { - cameraInitOrthographic(&SCENE_SWEEP_DATA.camera); - - // Initialize scene data here - errorOk(); -} - -void sceneSweepUpdate(void) { - // Update scene logic here -} - -void sceneSweepRender(void) { - int32_t w = SCREEN.width; - int32_t h = SCREEN.height; - - SCENE_SWEEP_DATA.camera.orthographic.left = 0; - SCENE_SWEEP_DATA.camera.orthographic.right = w; - SCENE_SWEEP_DATA.camera.orthographic.bottom = h; - SCENE_SWEEP_DATA.camera.orthographic.top = 0; - cameraPushMatrix(&SCENE_SWEEP_DATA.camera); - - // Background - uiFrameDrawTiled( - 8, 8, - w - 16, h - 16, - UI.backgroundTileset, - 0, 0, - true, - &UI.backgroundAsset->paletteImage.texture - ); - - // Frame - uiFrameDrawTiled( - 32, 32, - w - 64, h - 64, - UI.frameTileset, - 0, 0, - true, - &UI.frameAsset->paletteImage.texture - ); - - spriteBatchFlush(); - cameraPopMatrix(); - - uiRender(); -} - -void sceneSweepDispose(void) { - // Clean up scene resources here - printf("Disposing sweep scene\n"); -} \ No newline at end of file diff --git a/src/game/minesweeper/scene/scenesweep.h b/src/game/minesweeper/scene/scenesweep.h deleted file mode 100644 index 4da8de8..0000000 --- a/src/game/minesweeper/scene/scenesweep.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include "scene/scene.h" -#include "display/camera.h" - -typedef struct { - camera_t camera; -} scenesweep_t; - -extern scene_t SCENE_SWEEP; -extern scenesweep_t SCENE_SWEEP_DATA; - -/** - * Initializes the scene. - */ -errorret_t sceneSweepInit(void); - -/** - * Updates the state of the scene. - */ -void sceneSweepUpdate(void); - -/** - * Renders the current state of the scene. - */ -void sceneSweepRender(void); - -/** - * Cleans up resources used by the scene. - */ -void sceneSweepDispose(void); \ No newline at end of file diff --git a/src/game/minesweeper/sweeper.c b/src/game/minesweeper/sweeper.c deleted file mode 100644 index 6472ab6..0000000 --- a/src/game/minesweeper/sweeper.c +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "sweeper.h" -#include "assert/assert.h" -#include "util/memory.h" - -extern sweeper_t SWEEPER; - -void sweeperInit(void) { - memoryZero(&SWEEPER, sizeof(sweeper_t)); -} - -void sweeperReveal(const uint16_t x, const uint16_t y) { - assertTrue(x < SWEEPER_GRID_WIDTH, "X coordinate out of bounds"); - assertTrue(y < SWEEPER_GRID_HEIGHT, "Y coordinate out of bounds"); - - sweepercell_t *cell = &SWEEPER.grid[y * SWEEPER_GRID_WIDTH + x]; - - // Dont reveal twice. - if(*cell != SWEEPER_CELL_HIDDEN) { - return; - } - - // Can't reveal flag. - if(*cell == SWEEPER_CELL_FLAGGED) { - return; - } - - // Game over - if(cell == SWEEPER_CELL_HIDDEN_MINE) { - *cell = SWEEPER_CELL_MINE; - SWEEPER.gameOver = true; - return; - } - - // Adjacent mines - uint8_t surrounding = 0; - for(int16_t dy = -1; dy <= 1; ++dy) { - for(int16_t dx = -1; dx <= 1; ++dx) { - if(dx == 0 && dy == 0) continue; - - int16_t nx = x + dx; - int16_t ny = y + dy; - if( - nx < 0 || nx >= SWEEPER_GRID_WIDTH || - ny < 0 || ny >= SWEEPER_GRID_HEIGHT - ) continue; - - sweepercell_t neighbor = SWEEPER.grid[ny * SWEEPER_GRID_WIDTH + nx]; - if(neighbor == SWEEPER_CELL_HIDDEN_MINE) surrounding++; - } - } - - if(surrounding > 0) { - *cell = SWEEPER_CELL_0 + surrounding; - return; - } - - // Cascade reveal - printf("Cascading reveal at %d, %d\n", x, y); - *cell = SWEEPER_CELL_0; -} - -void sweeperFlag(const uint16_t x, const uint16_t y) { - assertTrue(x < SWEEPER_GRID_WIDTH, "X coordinate out of bounds"); - assertTrue(y < SWEEPER_GRID_HEIGHT, "Y coordinate out of bounds"); - - sweepercell_t *cell = &SWEEPER.grid[y * SWEEPER_GRID_WIDTH + x]; - - if(*cell == SWEEPER_CELL_HIDDEN) { - *cell = SWEEPER_CELL_FLAGGED; - } else if(*cell == SWEEPER_CELL_FLAGGED) { - *cell = SWEEPER_CELL_HIDDEN; - } -} \ No newline at end of file diff --git a/src/game/minesweeper/sweeper.h b/src/game/minesweeper/sweeper.h deleted file mode 100644 index 993d9fd..0000000 --- a/src/game/minesweeper/sweeper.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include "dusk.h" - -typedef enum { - SWEEPER_CELL_HIDDEN = 0x00, - SWEEPER_CELL_HIDDEN_MINE = 0x01, - SWEEPER_CELL_0 = 0x02, - SWEEPER_CELL_1 = 0x03, - SWEEPER_CELL_2 = 0x04, - SWEEPER_CELL_3 = 0x05, - SWEEPER_CELL_4 = 0x06, - SWEEPER_CELL_5 = 0x07, - SWEEPER_CELL_6 = 0x08, - SWEEPER_CELL_7 = 0x09, - SWEEPER_CELL_8 = 0x0A, - SWEEPER_CELL_9 = 0x0B, - SWEEPER_CELL_FLAGGED = 0x0C, - SWEEPER_CELL_MINE = 0x0D, -} sweepercell_t; - -#define SWEEPER_GRID_WIDTH 16 -#define SWEEPER_GRID_HEIGHT 16 - -typedef struct { - sweepercell_t grid[SWEEPER_GRID_WIDTH * SWEEPER_GRID_HEIGHT]; - bool_t gameOver; -} sweeper_t; - -extern sweeper_t SWEEPER; - -/** - * Initializes the Minesweeper game state. - */ -void sweeperInit(void); - -/** - * Reveals the cell at the specified coordinates. - * - * @param x The x-coordinate of the cell to reveal. - * @param y The y-coordinate of the cell to reveal. - */ -void sweeperReveal(const uint16_t x, const uint16_t y); - -/** - * Flags or unflags the cell at the specified coordinates. - * - * @param x The x-coordinate of the cell to flag or unflag. - * @param y The y-coordinate of the cell to flag or unflag. - */ -void sweeperFlag(const uint16_t x, const uint16_t y); \ No newline at end of file diff --git a/src/game/minesweeper/ui/CMakeLists.txt b/src/game/minesweeper/ui/CMakeLists.txt deleted file mode 100644 index 8684c52..0000000 --- a/src/game/minesweeper/ui/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2025 Dominic Masters -# -# This software is released under the MIT License. -# https://opensource.org/licenses/MIT - -# Sources -target_sources(${DUSK_TARGET_NAME} - PRIVATE - ui.c -) - -# Subdirs \ No newline at end of file diff --git a/src/game/minesweeper/ui/ui.c b/src/game/minesweeper/ui/ui.c deleted file mode 100644 index 8dedac6..0000000 --- a/src/game/minesweeper/ui/ui.c +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#include "ui.h" -#include "ui/uifps.h" -#include "ui/uiconsole.h" -#include "ui/uiframe.h" -#include "display/screen.h" -#include "display/spritebatch/spritebatch.h" - -#include "display/tileset/tileset_minogram.h" -#include "display/tileset/tileset_ui.h" -#include "display/tileset/tileset_ui_frame.h" -#include "display/tileset/tileset_background.h" - -ui_t UI; - -errorret_t uiInit(void) { - cameraInitOrthographic(&UI.camera); - - UI.minogramTileset = (tileset_t*)&TILESET_MINOGRAM; - errorChain(assetManagerLoadAsset( - UI.minogramTileset->image, - &UI.minogramAsset, - &UI.minogramRef - )); - - UI.uiTileset = (tileset_t*)&TILESET_UI; - errorChain(assetManagerLoadAsset( - UI.uiTileset->image, - &UI.uiAsset, - &UI.uiRef - )); - - UI.frameTileset = (tileset_t*)&TILESET_UI_FRAME; - errorChain(assetManagerLoadAsset( - UI.frameTileset->image, - &UI.frameAsset, - &UI.frameRef - )); - - UI.backgroundTileset = (tileset_t*)&TILESET_BACKGROUND; - errorChain(assetManagerLoadAsset( - UI.backgroundTileset->image, - &UI.backgroundAsset, - &UI.backgroundRef - )); - - errorOk(); -} - -void uiRender(void) { - UI.camera.orthographic.left = 0; - UI.camera.orthographic.right = SCREEN.width; - UI.camera.orthographic.bottom = SCREEN.height; - UI.camera.orthographic.top = 0; - - cameraPushMatrix(&UI.camera); - - uiFPSRender(UI.minogramTileset, &UI.minogramAsset->alphaImage.texture); - uiConsoleRender( - 0, 0, - UI.minogramTileset, &UI.minogramAsset->alphaImage.texture - ); - spriteBatchFlush(); - - cameraPopMatrix(); -} - -void uiDispose(void) { - -} \ No newline at end of file diff --git a/src/game/minesweeper/ui/ui.h b/src/game/minesweeper/ui/ui.h deleted file mode 100644 index 3155032..0000000 --- a/src/game/minesweeper/ui/ui.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2025 Dominic Masters - * - * This software is released under the MIT License. - * https://opensource.org/licenses/MIT - */ - -#pragma once -#include "dusk.h" -#include "display/camera.h" -#include "asset/assetmanager.h" -#include "display/tileset.h" - -typedef struct { - camera_t camera; - - tileset_t *minogramTileset; - asset_t *minogramAsset; - ref_t minogramRef; - - tileset_t *uiTileset; - asset_t *uiAsset; - ref_t uiRef; - - tileset_t *frameTileset; - asset_t *frameAsset; - ref_t frameRef; - - tileset_t *backgroundTileset; - asset_t *backgroundAsset; - ref_t backgroundRef; -} ui_t; - -extern ui_t UI; - -/** - * Initializes the Minesweeper UI. - * - * @return Error code indicating success or failure. - */ -errorret_t uiInit(void); - -/** - * Renders the Minesweeper UI. - */ -void uiRender(void); - -/** - * Disposes of the Minesweeper UI. - */ -void uiDispose(void); \ No newline at end of file diff --git a/src/scene/scenemanager.c b/src/scene/scenemanager.c index e0c0e7d..b13deb1 100644 --- a/src/scene/scenemanager.c +++ b/src/scene/scenemanager.c @@ -9,7 +9,7 @@ #include "util/memory.h" #include "assert/assert.h" #include "console/console.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" #include "util/string.h" scenemanager_t SCENE_MANAGER; diff --git a/src/ui/uiconsole.h b/src/ui/uiconsole.h index a1a1260..6232a4d 100644 --- a/src/ui/uiconsole.h +++ b/src/ui/uiconsole.h @@ -6,8 +6,8 @@ */ #pragma once -#include "display/tileset.h" -#include "display/texture/texture.h" +#include "display/tileset/tileset.h" +#include "display/texture.h" /** * Renders the console UI. diff --git a/src/ui/uifps.c b/src/ui/uifps.c index 4978fc5..2f6bb12 100644 --- a/src/ui/uifps.c +++ b/src/ui/uifps.c @@ -10,7 +10,7 @@ #include "console/console.h" #include "util/string.h" #include "ui/uitext.h" -#include "display/framebuffer/framebuffer.h" +#include "display/framebuffer.h" void uiFPSRender(const tileset_t *tileset, texture_t *texture) { if(stringCompare(consoleVarGet("fps")->value, "0") == 0) { diff --git a/src/ui/uifps.h b/src/ui/uifps.h index b2b4654..24823f0 100644 --- a/src/ui/uifps.h +++ b/src/ui/uifps.h @@ -6,8 +6,8 @@ */ #pragma once -#include "display/tileset.h" -#include "display/texture/texture.h" +#include "display/tileset/tileset.h" +#include "display/texture.h" /** * Renders the FPS counter UI. diff --git a/src/ui/uiframe.c b/src/ui/uiframe.c index 80b15dc..d47509d 100644 --- a/src/ui/uiframe.c +++ b/src/ui/uiframe.c @@ -6,7 +6,7 @@ */ #include "uiframe.h" -#include "display/spritebatch/spritebatch.h" +#include "display/spritebatch.h" #include "assert/assert.h" #include diff --git a/src/ui/uiframe.h b/src/ui/uiframe.h index 1a4b82d..2a9e9d0 100644 --- a/src/ui/uiframe.h +++ b/src/ui/uiframe.h @@ -6,8 +6,8 @@ */ #pragma once -#include "display/tileset.h" -#include "display/texture/texture.h" +#include "display/tileset/tileset.h" +#include "display/texture.h" /** * Draw a UI Frame (using the 9-slice technique). diff --git a/src/ui/uitext.c b/src/ui/uitext.c index 3e41067..de062a4 100644 --- a/src/ui/uitext.c +++ b/src/ui/uitext.c @@ -9,7 +9,7 @@ #include "asset/assetmanager.h" #include "assert/assert.h" #include "util/memory.h" -#include "display/spritebatch/spritebatch.h" +#include "display/spritebatch.h" void uiTextDrawChar( const float_t x, diff --git a/tools/assetstool/processtileset.py b/tools/assetstool/processtileset.py index 1e159e8..15570c1 100644 --- a/tools/assetstool/processtileset.py +++ b/tools/assetstool/processtileset.py @@ -124,7 +124,7 @@ def processTileset(asset): # Create header data = f"// Tileset Generated for {asset['path']} at {now}\n" data += f"#pragma once\n" - data += f"#include \"display/tileset.h\"\n\n" + data += f"#include \"display/tileset/tileset.h\"\n\n" data += f"static const tileset_t TILESET_{tilesetNameUpper} = {{\n" data += f" .tileWidth = {tilesetData['tileWidth']},\n" data += f" .tileHeight = {tilesetData['tileHeight']},\n"