Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary screen #978

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

emilyploszaj
Copy link
Contributor

@emilyploszaj emilyploszaj commented Aug 9, 2024

Replaces the old stats screen with the new and improved summary screen. Ready to go!

summary.mp4

Outstanding TODOs in the summary screen file, copied for posterity All complete! Ready to go.

  • use/make proper vblank routine to remove flicker due to music (other existing ones cause freezes, maybe because of GFX decompression requests?) (SafeCopyTilemapAtOnce would be great, but it causes hblanks to be missed, a dedicated routine would be required)
  • entire egg page
  • status indication (including palette allocation)
  • nature indicators (red/blue stats)
  • allow swapping move order
  • remove party moves screen (by replacing it properly)
  • fix artifacts in battle summary
  • fix artifacts when exiting PC

Some things I'd like to further do or seen done for the summary screen code wise that aren't necessarily functional

  • replace move learning page
  • Further remove all references to the "stats screen" in symbols, files, and documentation and otherwise and replace it with the "summary screen" to better reflect the change in game (reflecting modern games' usage of the term summary rather than stats)
  • Adjust hblank routines to be usable elsewhere without major pain.
  • Adjust summary window buffer to be usable elsewhere without major pain.

@Rangi42 Rangi42 marked this pull request as draft August 9, 2024 02:40
@Rangi42
Copy link
Owner

Rangi42 commented Aug 9, 2024

Emi, this already looks great. Thank you for putting all your work into it! ^^

@Rangi42
Copy link
Owner

Rangi42 commented Aug 9, 2024

Also, I'd be happy to merge this as just a summary screen replacement. Meaning that the Moves screen and the move-learning page could stay, no need to implement move swapping in this for the initial merge. (Same goes for the "A/Info" functionality. ...Oh, you already did that! :D )

A couple of graphic observations:

  • The Pokerus icon should have its magenta palette.
  • The "Met" tab content should be shifted vertically a little.

The original mockups for comparison:

image

image

image

Copy link
Owner

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

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

I haven't looked at the engine/pokemon/summary* files yet.

engine/gfx/cgb_layouts.asm Outdated Show resolved Hide resolved
engine/gfx/cgb_layouts.asm Outdated Show resolved Hide resolved
engine/pokedex/pokedex.asm Outdated Show resolved Hide resolved
engine/pokemon/mon_stats.asm Outdated Show resolved Hide resolved
gfx/stats/stats.png Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
home/lcd.asm Outdated Show resolved Hide resolved
Copy link
Collaborator

@vulcandth vulcandth left a comment

Choose a reason for hiding this comment

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

I know this is still a work-in-progress, and looks great!

My only comment is there are a lot of magic numbers.. particularly related to tile IDs and tile palettes, ect.

I know the other codebase is similar; but when we have the opportunity to rewrite systems; personally i'd like to define constants for things like the tile ID's that way if we need to reorder graphics we can update the tile ID defined in the constant.

Thoughts @Rangi42 ? I'm talking about like what I did at the top of engine/overworld/weather.asm

@Rangi42
Copy link
Owner

Rangi42 commented Aug 12, 2024

I definitely agree about using named constants in general. I haven't reviewed the "meat" of this PR yet so can't comment on how many magic numbers there are. But yeah, you can see how other engine files define constants for meaningful tile IDs.

@emilyploszaj
Copy link
Contributor Author

Finally got around to resolving these issues and adding graphics constants.

@Rangi42 re the met tab contents, as a restriction of seamless page switching, the bottom of the screen's vertical aligns can't be adjusted iirc. The pokerus change would require some further palette adjustments that I'll look into.

@emilyploszaj
Copy link
Contributor Author

I've updated the PR to include a fix for the hblank jittering, and feature inclusions for status, shiny and pokerus palettes, red/blue nature indicators on stats, and some other small things. The main blocking issue at this point is the graphical issues in the pc/in battle. Adding move swapping would also allow the moves screen to be removed.
I've significantly reworked a lot of the code to use a lot of structured constants to be more legible.

@vulcandth vulcandth added this to the 3.2.0 milestone Jan 24, 2025
Copy link
Collaborator

@vulcandth vulcandth left a comment

Choose a reason for hiding this comment

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

Did a quick cursory review of the code. Overall, it looks really clean. Will still need to do in-game reviews too.

constants/summary_constants.asm Outdated Show resolved Hide resolved
engine/gfx/cgb_layouts.asm Outdated Show resolved Hide resolved
engine/gfx/color.asm Outdated Show resolved Hide resolved
engine/gfx/item_icons.asm Outdated Show resolved Hide resolved
engine/gfx/load_font.asm Outdated Show resolved Hide resolved
engine/pokemon/summary_screen.asm Outdated Show resolved Hide resolved
engine/pokemon/summary_screen.asm Outdated Show resolved Hide resolved
engine/pokemon/summary_screen.asm Outdated Show resolved Hide resolved
ld e, a
ld b, 0
.loop
ld c, $10
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is $10?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ByteFill amount, b is cleared before the loop and remains cleared

engine/pokemon/summary_screen.asm Outdated Show resolved Hide resolved
@vulcandth vulcandth added cosmetic patch-version These can be applied anytime as a "bugfix" release labels Jan 29, 2025
@vulcandth vulcandth deleted the branch Rangi42:master February 1, 2025 06:23
@vulcandth vulcandth closed this Feb 1, 2025
@vulcandth vulcandth reopened this Feb 1, 2025
@vulcandth vulcandth changed the base branch from 9bit to master February 1, 2025 06:49
@emilyploszaj
Copy link
Contributor Author

Very close to ready to go, all that's left is removing the move swap screen in the party menu, adding move swapping checks for battle etc, and removing an artifact I just can't figure out when exiting the PC.

@emilyploszaj emilyploszaj marked this pull request as ready for review February 8, 2025 22:44
@emilyploszaj
Copy link
Contributor Author

Alright, all ready to go! There's nothing outstanding that I know of that would prevent this from going live in a release version right now. All optimized, documented, and shiny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmetic patch-version These can be applied anytime as a "bugfix" release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants