Fixed shadow palette tag. Fully removed permanent shadows.

This commit is contained in:
Ariel A 2022-02-21 15:54:49 -05:00
parent 7daa78311b
commit ea5e081f74
7 changed files with 6 additions and 38 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -10,7 +10,7 @@ JASC-PAL
213 213 213
222 222 222
164 164 164
255 0 255
0 0 0
255 0 255
255 0 255
180 180 180

View file

@ -28,45 +28,13 @@ static const struct SpriteFrameImage sPicTable_ShadowExtraLarge[] = {
obj_frame_tiles(gFieldEffectObjectPic_ShadowExtraLarge),
};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = {
.tileTag = TAG_NONE,
.paletteTag = OBJ_EVENT_PAL_TAG_MAY,
.oam = &gObjectEventBaseOam_8x8,
.anims = sAnimTable_Shadow,
.images = sPicTable_ShadowSmall,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = UpdateShadowFieldEffect,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = {0xFFFF, TAG_WEATHER_START, &gObjectEventBaseOam_8x8, sAnimTable_Shadow, sPicTable_ShadowSmall, gDummySpriteAffineAnimTable, UpdateShadowFieldEffect};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = {
.tileTag = TAG_NONE,
.paletteTag = OBJ_EVENT_PAL_TAG_MAY,
.oam = &gObjectEventBaseOam_16x8,
.anims = sAnimTable_Shadow,
.images = sPicTable_ShadowMedium,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = UpdateShadowFieldEffect,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = {0xFFFF, TAG_WEATHER_START, &gObjectEventBaseOam_16x8, sAnimTable_Shadow, sPicTable_ShadowMedium, gDummySpriteAffineAnimTable, UpdateShadowFieldEffect};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = {
.tileTag = TAG_NONE,
.paletteTag = OBJ_EVENT_PAL_TAG_MAY,
.oam = &gObjectEventBaseOam_32x8,
.anims = sAnimTable_Shadow,
.images = sPicTable_ShadowLarge,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = UpdateShadowFieldEffect,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = {0xFFFF, TAG_WEATHER_START, &gObjectEventBaseOam_32x8, sAnimTable_Shadow, sPicTable_ShadowLarge, gDummySpriteAffineAnimTable, UpdateShadowFieldEffect};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge = {
.tileTag = TAG_NONE,
.paletteTag = OBJ_EVENT_PAL_TAG_MAY,
.oam = &gObjectEventBaseOam_64x32,
.anims = sAnimTable_Shadow,
.images = sPicTable_ShadowExtraLarge,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = UpdateShadowFieldEffect,
};
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge = {0xFFFF, TAG_WEATHER_START, &gObjectEventBaseOam_64x32, sAnimTable_Shadow, sPicTable_ShadowExtraLarge, gDummySpriteAffineAnimTable, UpdateShadowFieldEffect};
static const struct SpriteFrameImage sPicTable_TallGrass[] = {
overworld_frame(gFieldEffectObjectPic_TallGrass, 2, 2, 0),

View file

@ -352,7 +352,7 @@ void UpdateShadowFieldEffect(struct Sprite *sprite)
sprite->x = linkedSprite->x;
sprite->y = linkedSprite->y + sprite->data[3];
sprite->invisible = linkedSprite->invisible;
if (!objectEvent->active
if (!objectEvent->active || !objectEvent->hasShadow
|| MetatileBehavior_IsPokeGrass(objectEvent->currentMetatileBehavior)
|| MetatileBehavior_IsSurfableWaterOrUnderwater(objectEvent->currentMetatileBehavior)
|| MetatileBehavior_IsSurfableWaterOrUnderwater(objectEvent->previousMetatileBehavior))