Merge branch 'romhack' into lighting

This commit is contained in:
Ariel A 2021-10-02 22:03:43 -04:00
commit 7588eec0ee

View file

@ -457,11 +457,12 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_RotatingGate[] =
sSpriteAffineAnim_RotatingClockwise270to360Faster, sSpriteAffineAnim_RotatingClockwise270to360Faster,
}; };
#define OBJ_EVENT_PAL_TAG_NPC_1 0x1103
static const struct SpriteTemplate sSpriteTemplate_RotatingGateLarge = static const struct SpriteTemplate sSpriteTemplate_RotatingGateLarge =
{ {
.tileTag = ROTATING_GATE_TILE_TAG, .tileTag = ROTATING_GATE_TILE_TAG,
.paletteTag = 0xFFFF, .paletteTag = OBJ_EVENT_PAL_TAG_NPC_1,
.oam = &sOamData_RotatingGateLarge, .oam = &sOamData_RotatingGateLarge,
.anims = sSpriteAnimTable_RotatingGateLarge, .anims = sSpriteAnimTable_RotatingGateLarge,
.images = NULL, .images = NULL,
@ -472,7 +473,7 @@ static const struct SpriteTemplate sSpriteTemplate_RotatingGateLarge =
static const struct SpriteTemplate sSpriteTemplate_RotatingGateRegular = static const struct SpriteTemplate sSpriteTemplate_RotatingGateRegular =
{ {
.tileTag = ROTATING_GATE_TILE_TAG, .tileTag = ROTATING_GATE_TILE_TAG,
.paletteTag = 0xFFFF, .paletteTag = OBJ_EVENT_PAL_TAG_NPC_1,
.oam = &sOamData_RotatingGateRegular, .oam = &sOamData_RotatingGateRegular,
.anims = sSpriteAnimTable_RotatingGateRegular, .anims = sSpriteAnimTable_RotatingGateRegular,
.images = NULL, .images = NULL,
@ -744,7 +745,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY)
template.tileTag = gate->shape + ROTATING_GATE_TILE_TAG; template.tileTag = gate->shape + ROTATING_GATE_TILE_TAG;
spriteId = CreateSprite(&template, 0, 0, 0x94); spriteId = CreateSprite(&template, 0, 0, 0x93);
if (spriteId == MAX_SPRITES) if (spriteId == MAX_SPRITES)
return MAX_SPRITES; return MAX_SPRITES;
@ -752,6 +753,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY)
y = gate->y + 7; y = gate->y + 7;
sprite = &gSprites[spriteId]; sprite = &gSprites[spriteId];
UpdateSpritePaletteByTemplate(&template, sprite);
sprite->data[0] = gateId; sprite->data[0] = gateId;
sprite->coordOffsetEnabled = 1; sprite->coordOffsetEnabled = 1;