summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-03-23 21:19:59 +0100
committerkdx <kikoodx@paranoici.org>2023-03-23 21:19:59 +0100
commit65a36b0fc457c9c755cf54237e58f10167afa0cb (patch)
tree247475720a80dbbdb680a291db103c194e1d7518
parentfdaf9a40770f6021352c4dc80905936be60872cd (diff)
downloadhyperultra-65a36b0fc457c9c755cf54237e58f10167afa0cb.tar.gz
title screen and instructions
-rw-r--r--res/font.pngbin2359 -> 2762 bytes
-rw-r--r--src/lzy.h2
-rw-r--r--src/main.c41
3 files changed, 42 insertions, 1 deletions
diff --git a/res/font.png b/res/font.png
index dd796e3..e543dee 100644
--- a/res/font.png
+++ b/res/font.png
Binary files differ
diff --git a/src/lzy.h b/src/lzy.h
index 22c7723..fabc11d 100644
--- a/src/lzy.h
+++ b/src/lzy.h
@@ -473,7 +473,7 @@ static const SDL_Scancode sc[LZYK_COUNT * 2] = {
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_LSHIFT,SDL_SCANCODE_J,
SDL_SCANCODE_X, SDL_SCANCODE_K,
};
static const SDL_Scancode fullscreen_sc = SDL_SCANCODE_F11;
diff --git a/src/main.c b/src/main.c
index 1392e83..2ae18d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,6 +23,47 @@ int main(void)
}
game_init(game);
+ int hold = 0;
+ int stage = 0;
+ while (!LZY_ShouldQuit()) {
+ LZY_CycleEvents();
+ input_update();
+ if (input_down(K_O))
+ hold += 1;
+ else
+ hold -= 3;
+ if (hold < 0)
+ hold = 0;
+ if (hold > 50) {
+ if (stage == 1)
+ break;
+ stage += 1;
+ hold = 0;
+ }
+
+ LZY_DrawBegin();
+ LZY_DrawSetColor(WHITE);
+ LZY_DrawClear();
+ LZY_DrawSetColor(BLACK);
+ int y = -16;
+ if (stage == 1) {
+ LZY_DrawText(48, y += 32, "WALKING is AUTOMATIC");
+ LZY_DrawText(48, y += 32, "press SHIFT to jump");
+ LZY_DrawText(48, y += 32, "hold UP to jump HIGHER");
+ LZY_DrawText(48, y += 32, "hold DOWN to jump LOWER");
+ }
+ else {
+ LZY_DrawText(48, y += 32, "HYPERULTRA");
+ LZY_DrawText(48, y += 32, "a game made by KDX.re");
+ LZY_DrawText(48, y += 32, "powered by GINT and SDL");
+ y += 32;
+ }
+ LZY_DrawText(48, y += 48, "hold SHIFT to continue");
+ if (hold)
+ LZY_DrawFillRect(0, DISPLAY_HEIGHT - 24, hold * 8, 24);
+ LZY_DrawEnd();
+ }
+
while (!LZY_ShouldQuit()) {
LZY_CycleEvents();
input_update();