Skip to content

feat: adds final screen#2

Merged
hali-coding merged 1 commit into
mainfrom
feat/final-screen
Jul 5, 2026
Merged

feat: adds final screen#2
hali-coding merged 1 commit into
mainfrom
feat/final-screen

Conversation

@hali-coding

Copy link
Copy Markdown
Owner

Changes

  • feat: adds game completed final screen

Copilot AI review requested due to automatic review settings July 5, 2026 11:26
@hali-coding
hali-coding merged commit f4bec64 into main Jul 5, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “game completed” flow to the SNES game, including a CONGRATULATIONS banner, a scrolling credits crawl, and new completion music generated from a MIDI source and packed into the SNESMod soundbank.

Changes:

  • Introduces win-state logic (freeze → banner → credits crawl) and restart handling in src/main.c.
  • Adds a MIDI→IT conversion tool and Makefile rule to generate res/summergames.it for smconv.
  • Extends the soundbank/module definitions and Git LFS tracking to include the new music asset.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/make_music_it.py New Python tool that converts music/summergames.mid into an Impulse Tracker module for smconv.
src/main.c Implements win-state state machine, credits crawl rendering/scrolling, and reset logic reuse.
res/soundbank.h Adds module IDs/sizes for the new music module.
res/soundbank.asm Updates generated soundbank size comment.
music/summergames.mid Adds the completion MIDI asset (stored via Git LFS).
Makefile Adds res/summergames.it generation rule and includes it in AUDIOFILES; updates smconv flags.
.gitattributes Tracks .mid/.midi via Git LFS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.c
"You completed the game.",
"Thanks to:",
"Hampus (coder)",
"Claude (actuall coder)",
Comment thread src/main.c
Comment on lines +678 to +682
// Skip straight to a fresh round. Both erases are safe no-ops
// if that particular screen was never drawn in the first place.
consoleDrawText(8, 12, " "); // erase "CONGRATULATIONS"
eraseCredits();
creditsScroll = 0;
Comment thread src/main.c
Comment on lines +439 to +447
unsigned char k, len;
char blank[26];
for (k = 0; k < NUM_CREDIT_LINES; k++)
{
len = strlen(creditText[k]);
memset(blank, ' ', len);
blank[len] = '\0';
consoleDrawText(creditCol[k], creditRow[k], blank);
}
Comment thread tools/make_music_it.py
Comment on lines +58 to +61
with open(path, "rb") as f:
data = f.read()
chunks = read_chunks(data)
fmt, ntrks, division = struct.unpack(">HHH", chunks[0][1][:6])
Comment thread tools/make_music_it.py
Comment on lines +291 to +293
division, tracks = parse_midi(MIDI_PATH)
assert division == 1024, f"expected division 1024, got {division}"

Comment thread tools/make_music_it.py
Comment on lines +210 to +212
def write_it(path, num_channels, channel_events, samples, total_rows):
num_patterns = (total_rows + ROWS_PER_PATTERN - 1) // ROWS_PER_PATTERN

@hali-coding
hali-coding deleted the feat/final-screen branch July 21, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants