diff --git a/CMakeLists.txt b/CMakeLists.txt index a4ab8df..9579f4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,14 +28,14 @@ set(ASSETS_cg fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA) -add_executable(breakout ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) -target_compile_options(breakout PRIVATE -Wall -Wextra -Os) -target_link_libraries(breakout Gint::Gint) +add_executable(pong ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) +target_compile_options(pong PRIVATE -Wall -Wextra -Os) +target_link_libraries(pong Gint::Gint) if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G) - generate_g1a(TARGET breakout OUTPUT "pong.g1a" + generate_g1a(TARGET pong OUTPUT "pong.g1a" NAME "pong" ICON assets-fx/icon.png) elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) - generate_g3a(TARGET breakout OUTPUT "pong.g3a" + generate_g3a(TARGET pong OUTPUT "pong.g3a" NAME "pong" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png) endif() diff --git a/src/main.c b/src/main.c index d1e7ede..91ec117 100644 --- a/src/main.c +++ b/src/main.c @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include #include #include #include @@ -39,6 +40,8 @@ int h = 16; int w = 2; int main(void) { + gint_setrestart(1); + int tick = 1; bool game = true; while (game) { @@ -55,7 +58,7 @@ int main(void) pollevent(); if (keydown(KEY_EXIT)) - game = false; + gint_osmenu(); if (keydown(KEY_1) && p1 + h < 64) p1 += 1; @@ -113,6 +116,7 @@ int main(void) tick++; sleep_us(20*1000); } - game = true; + + return 0; }