More shadow options and documentation
This commit is contained in:
parent
b075163c57
commit
d78afca94f
@ -1,5 +1,8 @@
|
||||
## Day/Night system FAQ
|
||||
|
||||
### Q: How do I disable DNS?
|
||||
A: Set `OW_ENABLE_DNS` to `FALSE` in `include/config/overworld.h`.
|
||||
|
||||
### Q: How do I mark certain colors in a palette as light-blended?
|
||||
A: Create a `.pla` file in the same folder as the `.pal` with the same name.
|
||||
|
||||
@ -14,3 +17,9 @@ on separate lines to mark those colors as being light-blended, i.e:
|
||||
9
|
||||
10
|
||||
```
|
||||
|
||||
### Q: How do I return to using regular shadows?
|
||||
A: Set `OW_OBJECT_VANILLA_SHADOWS` to `TRUE` in `include/config/overworld.h`.
|
||||
|
||||
### Q: How do I disable shadows for certain locations?
|
||||
A: Shadows can be disabled for certain locations by modifying the `CurrentMapHasShadows` function in `src/overworld.c`
|
||||
|
||||
@ -141,7 +141,8 @@ bool32 IsOverworldLinkActive(void);
|
||||
void CB1_Overworld(void);
|
||||
void CB2_OverworldBasic(void);
|
||||
void UpdateTimeOfDay(void);
|
||||
bool8 MapHasNaturalLight(u8 mapType);
|
||||
bool32 MapHasNaturalLight(u8 mapType);
|
||||
bool32 CurrentMapHasShadows(void);
|
||||
void UpdateAltBgPalettes(u16 palettes);
|
||||
void UpdatePalettesWithTime(u32);
|
||||
void CB2_Overworld(void);
|
||||
|
||||
@ -10214,8 +10214,10 @@ static void DoFlaggedGroundEffects(struct ObjectEvent *objEvent, struct Sprite *
|
||||
for (i = 0; i < ARRAY_COUNT(sGroundEffectFuncs); i++, flags >>= 1)
|
||||
if (flags & 1)
|
||||
sGroundEffectFuncs[i](objEvent, sprite);
|
||||
if (!OW_OBJECT_VANILLA_SHADOWS && !(gWeatherPtr->noShadows || objEvent->inHotSprings || objEvent->inSandPile || MetatileBehavior_IsPuddle(objEvent->currentMetatileBehavior)))
|
||||
if (!OW_OBJECT_VANILLA_SHADOWS && CurrentMapHasShadows() && !(gWeatherPtr->noShadows || objEvent->inHotSprings || objEvent->inSandPile || MetatileBehavior_IsPuddle(objEvent->currentMetatileBehavior)))
|
||||
{
|
||||
SetUpShadow(objEvent);
|
||||
}
|
||||
}
|
||||
|
||||
void filters_out_some_ground_effects(struct ObjectEvent *objEvent, u32 *flags)
|
||||
|
||||
@ -1614,10 +1614,12 @@ void UpdateTimeOfDay(void)
|
||||
}
|
||||
}
|
||||
|
||||
#undef MORNING_HOUR_MIDDLE
|
||||
#undef TIME_BLEND_WEIGHT
|
||||
#undef DEFAULT_WEIGHT
|
||||
|
||||
// Whether a map type is naturally lit/outside
|
||||
bool8 MapHasNaturalLight(u8 mapType)
|
||||
bool32 MapHasNaturalLight(u8 mapType)
|
||||
{
|
||||
return (mapType == MAP_TYPE_TOWN
|
||||
|| mapType == MAP_TYPE_CITY
|
||||
@ -1626,6 +1628,15 @@ bool8 MapHasNaturalLight(u8 mapType)
|
||||
);
|
||||
}
|
||||
|
||||
bool32 CurrentMapHasShadows(void)
|
||||
{
|
||||
bool32 shouldHaveShadows = TRUE;
|
||||
u32 currentMapType = gMapHeader.mapType;
|
||||
if (currentMapType == MAP_TYPE_UNDERGROUND)
|
||||
shouldHaveShadows = FALSE;
|
||||
return shouldHaveShadows;
|
||||
}
|
||||
|
||||
// Update & mix day / night bg palettes (into unfaded)
|
||||
void UpdateAltBgPalettes(u16 palettes)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user