-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Community PR] Integrate merrp's lighting branch #5288
base: upcoming
Are you sure you want to change the base?
[Community PR] Integrate merrp's lighting branch #5288
Conversation
Fixed light palette header offsets. Changed blending function names.
… lighting-expansion-v2
Hey Edu I have a suggestion for you that I've just remembered about. A while back a user in the Discord was asking about removing / controlling the shadows from merrp's branch, I know at least removing is in scope, here. I've actually tried to isolate these before and the solution I gave them worked for their purposes, so it might work for ours. All of the
so the lines ended up as
and then you can control how intense they are or disable them altogether with just the one value. I'm not sure if this has a place in our version but I wanted to share in case it's useful :) |
Ah, thank you very much, this will indeed be very useful :D |
Yeah absolutely I also did that when I was isolating it, fully in favour :D |
All items in the description have been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a code review, and I'd like to do a full one again once all changes here are addressed. This doesn't test in-game behaviour. I also missed a few magic numbers I think that still need clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason we should be changing bin files.
TimeMixPalettes(1, | ||
&gPlttBufferUnfaded[OBJ_PLTT_ID(paletteNum)], | ||
&gPlttBufferFaded[OBJ_PLTT_ID(paletteNum)], | ||
(struct BlendSettings *)&gTimeOfDayBlend[currentTimeBlend.time0], | ||
(struct BlendSettings *)&gTimeOfDayBlend[currentTimeBlend.time1], | ||
currentTimeBlend.weight | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style
UpdateAltBgPalettes(PALETTES_BG); | ||
UpdatePalettesWithTime(PALETTES_ALL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
@@ -740,7 +740,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY) | |||
|
|||
template.tileTag = gate->shape + ROTATING_GATE_TILE_TAG; | |||
|
|||
spriteId = CreateSprite(&template, 0, 0, 0x93); | |||
spriteId = CreateSprite(&template, 0, 0, 0x93); // 0x93 is above shadows (0x94) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be tempted to write this as 0x94 - 1
(similar to the 0x94 + 1
above)... Except I agree with your comment elsewhere about magic numbers. If we had #define OW_SHADOW_SUBPRIORITY 0x94
or whatever, then it's OW_SHADOW_SUBPRIORITY - 1
which maybe doesn't need the comment? Lower (sub)priority = above is consistent across the codebase.
EDIT: Actually I think 0x94
might be the priority of object events based on a comment earlier in the PR (I've added a comment there too).
// TODO: Move these declarations into even_object_movement.h | ||
#define OBJ_EVENT_PAL_TAG_MAY 0x1110 | ||
#define OBJ_EVENT_PAL_TAG_EMOTES 0x8003 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A TODO that needs to be addressed
} | ||
else if (show->threeCheers.sheen > 22) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, for pret or another PR
Description
This PR integrates ntegrating #aarant's
lighting-expanded-id
branch.Do NOT squash, as preserving history will help minimize merge conflicts for users that already merged the feature
Changes from the base branch:
TIME_NIGHT
instead ofTIME_OF_DAY_NIGHT
).OW_TIMES_OF_DAY
config (which allows users to set their own times by generation).Option to enable lamp light "wobbling" (disabled by default), as it can be nausiating for some players.Fix Blinking Lights in Rustboro aarant/pokeemerald#41 will handle it instead.Images
People who collaborated with me in this PR
Discord contact info
AsparagusEduardo