Skip to content

feat: add Brighter Nights option#145

Open
aloven wants to merge 1 commit into
resetes12:masterfrom
aloven:feature/brighter-nights
Open

feat: add Brighter Nights option#145
aloven wants to merge 1 commit into
resetes12:masterfrom
aloven:feature/brighter-nights

Conversation

@aloven

@aloven aloven commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This is a feature for folks like me who emulate with OG hardware color corrections, and anyone on actual original hardware flashcarts/etc. it basically reduces the endpoint of "nighttime" to about 70% of where it is, quite subtle but significant for contrast.

default will be Off, legacy saves wont see any change unless they toggle to On in Options.

Description:

Adds a BRIGHT NIGHTS toggle to the Main Options page. Reduces nighttime darkness for players on hardware/screens where the original is too dark to make out terrain, trainers, and items.

Overworld

Night palette tint reduced to 70% of original darkness:

  • OFF (original): R×0.456, G×0.456, B×0.615
  • ON (brighter): R×0.619, G×0.619, B×0.731

Still distinctly nighttime with blue shift. Lit elements (windows, pokecenter signs) unaffected — they use the transparency high-bit blend path. Twilight and day palettes unchanged. Transition timing unchanged.

Battle Backgrounds

Night terrain palettes (loaded at hours 0-6 and 21-24) receive a warm lift: blend toward RGB(10,10,14) at 3/16 strength. Lifts deep blacks without washing out or hazing. Works with both Emerald and modernized (FR/LG) background sets. Daytime/twilight/indoor battles unaffected.

Also Fixes

DrawOptionMenuTexts buffer wrap bug — with 17+ Main menu items, text at y≥256 wraps and overwrites the first item. Now only draws visible items (matches scroll redraw behavior).

Technical

  • SaveBlock2 field at end of struct (includes optionsBattleSpeed placeholder for merge compatibility with anim speed PR)
  • GetTimeOfDayBlend() helper function selects between original and brighter blend arrays
  • Battle BG brightening hooks into end of DrawMainBattleBackground
  • Defaults to OFF for existing saves

Merge note: Includes optionsBattleSpeed:1 field declaration in SaveBlock2 (unused on this branch) to avoid bitfield layout conflicts when merged with the double battle speed PR.

@aloven

aloven commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

ON -
pokeemerald_modern-4 pokeemerald_modern-5

OFF -
pokeemerald_modern-7 pokeemerald_modern-6

Adds a BRIGHT NIGHTS toggle to the Main Options page. When ON:

Overworld: nighttime palette tint is 70% of original darkness.
- OFF (original): R×0.456, G×0.456, B×0.615
- ON (brighter): R×0.619, G×0.619, B×0.731
Still distinctly nighttime with blue shift, but terrain/trainers/items visible.
Lit elements (windows, signs) unaffected (transparency high-bit path).

Battle backgrounds: night terrain palettes blended toward warm dark tone
(RGB 10,10,14 at 3/16 strength) to lift deep blacks without hazing.
Triggers whenever the battle BG system loads night palettes (hours 0-6, 21-24).
Works with both Emerald and modernized (FR/LG) background sets.

Unchanged: twilight/day palettes, time transitions, weather overlay.
Also fixes DrawOptionMenuTexts buffer wrap with 17+ menu items.
SaveBlock2 field at end of struct (includes optionsBattleSpeed placeholder).
@aloven aloven force-pushed the feature/brighter-nights branch from c80ea3a to d53ecd1 Compare July 10, 2026 18:07
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.

1 participant