feat: add Brighter Nights option#145
Open
aloven wants to merge 1 commit into
Open
Conversation
Contributor
Author
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).
c80ea3a to
d53ecd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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:
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
DrawOptionMenuTextsbuffer 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
optionsBattleSpeedplaceholder for merge compatibility with anim speed PR)GetTimeOfDayBlend()helper function selects between original and brighter blend arraysDrawMainBattleBackgroundMerge note: Includes
optionsBattleSpeed:1field declaration in SaveBlock2 (unused on this branch) to avoid bitfield layout conflicts when merged with the double battle speed PR.