Skip to content

Commit

Permalink
EntityClockHands (#1613)
Browse files Browse the repository at this point in the history
Thanks to sonicdcer
  • Loading branch information
sozud committed Sep 16, 2024
1 parent ee22761 commit 15e3cb5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/symbols.us.bomar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ EntityEnemyBlood = 0x80197720;
EntityRoomForeground = 0x80197BD0;
BottomCornerText = 0x80197CBC;
EntityClockRoomController = 0x80197FEC;
EntityClockHands = 0x80198574;
UnkPolyFunc2 = 0x80199868;
PrimDecreaseBrightness = 0x801998E8;
EntityLifeUpSpawn = 0x8019994C;
Expand Down
32 changes: 31 additions & 1 deletion src/boss/mar/17FEC.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,37 @@ void EntityClockRoomController(Entity* self) {
}
}

INCLUDE_ASM("boss/mar/nonmatchings/17FEC", func_us_80198574);
// Entity ID 0x17
void EntityClockHands(Entity* self) {
Entity* handShadow = &self[5];
u16 params = self->params;

if (self->step == 0) {
InitializeEntity(g_eInitGeneric2);
self->animSet = ANIMSET_OVL(1);
self->animCurFrame = params + 25;
self->zPriority = 0x3F - params;
self->drawFlags = FLAG_DRAW_ROTZ;

// Create hand shadows
CreateEntityFromCurrentEntity(E_DUMMY_1D, handShadow);
handShadow->drawFlags = FLAG_DRAW_UNK8 | FLAG_DRAW_ROTZ;
handShadow->blendMode = 0x10;
handShadow->animSet = ANIMSET_OVL(1);
handShadow->animCurFrame = params + 25;
handShadow->zPriority = 0x3F - params;
handShadow->flags = FLAG_DESTROY_IF_OUT_OF_CAMERA |
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA;
handShadow->posY.i.hi += 4;
}

self->rotZ = (self->ext.clockRoom.hand * 0x1000) / 3600;
if (params != 0) {
self->rotZ += 0x400;
}

handShadow->rotZ = self->rotZ &= 0xFFF;
}

INCLUDE_ASM("boss/mar/nonmatchings/17FEC", func_us_80198688);

Expand Down

0 comments on commit 15e3cb5

Please sign in to comment.