From 01258f1432e8e37d6cc7f6c645113c3681ea29de Mon Sep 17 00:00:00 2001 From: kdx Date: Sun, 24 Sep 2023 12:15:34 +0200 Subject: [PATCH] tweaks --- buildwin.sh | 7 +++++++ src/lzy.h | 2 +- src/main.c | 14 +++++++++++++- src/map.c | 2 +- src/player.c | 4 ++-- 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100755 buildwin.sh diff --git a/buildwin.sh b/buildwin.sh new file mode 100755 index 0000000..0c89e8f --- /dev/null +++ b/buildwin.sh @@ -0,0 +1,7 @@ +#!/bin/sh +x86_64-w64-mingw32-gcc \ + -O3 -s \ + -o hyperultra.exe -Dmain=SDL_main \ + -Imap src/*.c \ + -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -mwindows \ + || exit 1 diff --git a/src/lzy.h b/src/lzy.h index ea748d0..fe37c33 100644 --- a/src/lzy.h +++ b/src/lzy.h @@ -470,7 +470,7 @@ const char *LZY_GetError(void) { static const SDL_Scancode sc[LZYK_COUNT * 2] = { SDL_SCANCODE_LEFT, SDL_SCANCODE_A, SDL_SCANCODE_RIGHT, SDL_SCANCODE_D, SDL_SCANCODE_UP, SDL_SCANCODE_W, SDL_SCANCODE_DOWN, SDL_SCANCODE_S, - SDL_SCANCODE_Z, SDL_SCANCODE_J, SDL_SCANCODE_X, SDL_SCANCODE_K, + SDL_SCANCODE_SPACE,SDL_SCANCODE_J, SDL_SCANCODE_X, SDL_SCANCODE_K, }; static const SDL_Scancode fullscreen_sc = SDL_SCANCODE_F11; static const char *error = NULL; diff --git a/src/main.c b/src/main.c index 8a4f8a7..fb6af00 100644 --- a/src/main.c +++ b/src/main.c @@ -64,15 +64,27 @@ main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) int y = -16; if (stage == 1) { (void)LZY_DrawText(48, y += 32, "WALKING is AUTOMATIC"); +#ifdef FXCG50 (void)LZY_DrawText(48, y += 32, "press SHIFT to jump"); +#else + (void)LZY_DrawText(48, y += 32, "press SPACE to jump"); +#endif (void)LZY_DrawText(48, y += 32, "hold UP to jump HIGHER"); (void)LZY_DrawText(48, y += 32, "hold DOWN to jump LOWER"); } else { (void)LZY_DrawText(48, y += 32, "HYPERULTRA"); (void)LZY_DrawText(48, y += 32, "a game made by KDX.re"); - (void)LZY_DrawText(48, y += 32, "powered by GINT and SDL"); +#ifdef FXCG50 + (void)LZY_DrawText(48, y += 32, "powered by GINT"); +#else + (void)LZY_DrawText(48, y += 32, "powered by SDL"); +#endif } +#ifdef FXCG50 (void)LZY_DrawText(48, y += 48, "hold SHIFT to continue"); +#else + (void)LZY_DrawText(48, y += 48, "hold SPACE to continue"); +#endif if (hold) (void)LZY_FillRect(0, DISPLAY_HEIGHT - 24, hold * 8, 24); background_draw(); diff --git a/src/map.c b/src/map.c index 3c894fe..4cbdd96 100644 --- a/src/map.c +++ b/src/map.c @@ -11,7 +11,7 @@ struct { } maps[] = { { &map_nuancierdesaut_tmj, "nuancier de saut" }, { &map_trailblazer_tmj, "trailblazer" }, - { &map_weallstartsomewhere_tmj, "we all start kekpart" }, + { &map_weallstartsomewhere_tmj, "deceptive routing" }, { &map_wakywakysnakysnake_tmj, "waky waky snaky snek" }, { &map_fillerepisode_tmj, "filler episode" }, { &map_idkwymmdr_tmj, "idk wym mdr" }, diff --git a/src/player.c b/src/player.c index 9434b3c..c147f72 100644 --- a/src/player.c +++ b/src/player.c @@ -57,12 +57,12 @@ IMPL(update) { this->player.rot_speed = 0.5 * this->player.dirx; break; } - } else if (on_ground && input_down(K_X)) { + }/* else if (on_ground && input_down(K_X)) { extern double tick; this->vel[0] *= 3; tick += 2.0; this->player.scale_x *= 1.05; - } + }*/ entity_move(this, g); if (this->vel[0] == 0.0 && this->vel[1] >= -0.0)