aarant / pokeemerald Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pret/pokeemerald
disassembly of Pokémon Emerald
This project forked from pret/pokeemerald
disassembly of Pokémon Emerald
By default, the time between 4 and 7 am will return time of day day when its super dark outside
See: https://github.com/aarant/pokeemerald/blob/lighting/src/overworld.c#L1497
I suggest this as an alternative
u8 UpdateTimeOfDay(void) {
s32 hours, minutes;
RtcCalcLocalTime();
hours = gLocalTime.hours;
minutes = gLocalTime.minutes;
if (hours < 6)
{
currentTimeBlend.time0 = TIME_OF_DAY_NIGHT;
currentTimeBlend.time1 = TIME_OF_DAY_NIGHT;
currentTimeBlend.weight = 256;
currentTimeBlend.altWeight = 0;
gTimeOfDay = TIME_OF_DAY_NIGHT;
return gTimeOfDay;
}
else if (hours < 7)
{
currentTimeBlend.time0 = TIME_OF_DAY_NIGHT;
currentTimeBlend.time1 = TIME_OF_DAY_TWILIGHT;
currentTimeBlend.weight = 256 - 256 * ((hours - 6) * 60 + minutes) / ((7 - 6) * 60);
currentTimeBlend.altWeight = (256 - currentTimeBlend.weight) / 2;
gTimeOfDay = TIME_OF_DAY_TWILIGHT;
return gTimeOfDay;
}
else if (hours < 11)
{
currentTimeBlend.time0 = TIME_OF_DAY_TWILIGHT;
currentTimeBlend.time1 = TIME_OF_DAY_DAY;
currentTimeBlend.weight = 256 - 256 * ((hours - 7) * 60 + minutes) / ((11 - 7) * 60);
currentTimeBlend.altWeight = (256 - currentTimeBlend.weight) / 2 + 128;
gTimeOfDay = TIME_OF_DAY_TWILIGHT;
return gTimeOfDay;
}
else if (hours < 17)
{
currentTimeBlend.time0 = TIME_OF_DAY_DAY;
currentTimeBlend.time1 = TIME_OF_DAY_TWILIGHT;
currentTimeBlend.weight = 256 - 256 * ((hours - 11) * 60 + minutes) / ((18 - 11) * 60);
currentTimeBlend.altWeight = currentTimeBlend.weight / 2 + 128;
gTimeOfDay = TIME_OF_DAY_DAY;
return gTimeOfDay;
}
else if (hours < 21)
{
currentTimeBlend.time0 = TIME_OF_DAY_TWILIGHT;
currentTimeBlend.time1 = TIME_OF_DAY_NIGHT;
currentTimeBlend.weight = 256 - 256 * ((hours - 18) * 60 + minutes) / ((22 - 18) * 60);
currentTimeBlend.altWeight = currentTimeBlend.weight / 2;
gTimeOfDay = TIME_OF_DAY_TWILIGHT;
return gTimeOfDay;
}
else
{
currentTimeBlend.time0 = TIME_OF_DAY_NIGHT;
currentTimeBlend.time1 = TIME_OF_DAY_NIGHT;
currentTimeBlend.weight = 256;
currentTimeBlend.altWeight = 0;
gTimeOfDay = TIME_OF_DAY_NIGHT;
return gTimeOfDay;
}
}
Would work like this:
It works like this:
0 - 6 = Night
6 - 7 = Twilight
7 - 11 = Twilight
11 - 17 = Day
17 - 21 = Twilight
12 - 0 = Night
Unaligned stuff!
Fixed with:
static const u16 ALIGNED(4) sHandCursor_Pal[] = INCBIN_U16("graphics/pokemon_storage/hand_cursor.gbapal");
and
u16 ALIGNED(4) chooseBoxSwapPal[16]; // Holds dynamic palette to swap into choose box gfx
This only happens when LARGE_OW_SUPPORT is set to TRUE
https://i.imgur.com/T50a6se.gif
You should have access to my repo to see this links
https://github.com/Jaizu/recharged-yellow/commit/3a2d85a84baac6b7639fe7f67288af2a1c1ad08c
https://github.com/Jaizu/recharged-yellow/commit/59054407200663179011564262706575e0d8414f
I'm sure those are missing in followers and every branch
No idea how to properly report this, I'm sure there is something that just doesnt stay like the overworld was before using the key wheel, not sure if the text windows, blocks loaded in the bg or whatever, I will try to investigate more
I think this is the good thing to do?
Can be checked with InUnionRoom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.