BitPatty / gct-generator

A gecko code practice file generator for everyone's favorite game: Super Mario Sunshine

Home Page:https://gct.zint.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Offset QFT background with Speed display or P/A/S display

QbeRoot opened this issue · comments

Describe the bug

If Speed display or Position/angle/speed display is enabled, Quarterframe Timer's background box appears above and slightly left of the timer. If Customized display is enabled instead, the background box is in the right place.

Originally found on PAL Wii Nintendont with Speed display, replicated on PAL Dolphin 5.0-6022 with both displays

Since Customized display is functionally equivalent to both other display codes, and shorter than them, we might just want to simplify its options and delete the old display codes

Enabled Codes

  • Quarterframe Timer
  • Speed display or Position/angle/speed display

To Reproduce

Enter any level to make QFT appear, and the background will be offset.

Loader

None

Loader Version

No response

Game Version

PAL (Europe)

Wii Region

None

Game Source

None

Nintendont Source

None

It is a bug of the current version of drawText since I forgot to restore the transform matrix. The bug will be fixed after migrating to the new version of drawText (#135).

I'm not sure if it is necessary but it might be safer to call J2DGrafContext::setup2D() before/after drawing shapes or text to reset the configuration of rendering. In addition, we may want to put the hook at TGCConsole2::drawWater - (0x30~0x1C) (inclusive) since it is executed after all components in TGCConsole2::perform are drawn so the shape/text drawn by the code will be on the top. Also, the instructions there do essentially nothing so we don't need to restore them.