mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
Fix camera jitter in Egg Spider boss
This commit is contained in:
1 parent
728441ef6b
commit
5ae73f4564
3 files changed
+15
-13
No files matched your search
@@ -18,7 +18,7 @@ void CreateBossCapsule(s16, s16);
|
||||
void CreatePostBossEggMobile(CamCoord worldX, CamCoord worldY);
|
||||
|
||||
struct Task *sub_80168F0(CamCoord worldX, CamCoord worldY, u16 numTiles, AnimId anim, u8 variant); // -> Strc_sub_80168F0
|
||||
struct Task *Bosses_SetCamBounds(s16 minY, s16 maxY, s16 minX, s16 maxX);
|
||||
struct Task *Bosses_SetCamBounds(CamCoord minY, CamCoord maxY, CamCoord minX, CamCoord maxX);
|
||||
struct Task *CreatePreBossCameraPan(s16 yMin, s16 yMax);
|
||||
struct Task *sub_8017540(s32 param0, s32 param1); // -> NutsAndBolts
|
||||
struct Task *sub_8016D80(CamCoord worldX, CamCoord worldY, AnimId anim, u8 variant);
|
||||
|
||||
@@ -233,7 +233,7 @@ void CreateEntity_EggSpider(MapEntity *me, u16 regionX, u16 regionY, u8 id)
|
||||
s2->graphics.dest = VramMalloc(8U);
|
||||
s2->oamFlags = SPRITE_OAM_ORDER(21);
|
||||
s2->graphics.size = 0;
|
||||
s2->graphics.anim = 0x275;
|
||||
s2->graphics.anim = SA1_ANIM_BOSS_4_EGGMAN;
|
||||
s2->variant = 0;
|
||||
s2->animCursor = 0;
|
||||
s2->qAnimDelay = 0;
|
||||
@@ -242,7 +242,11 @@ void CreateEntity_EggSpider(MapEntity *me, u16 regionX, u16 regionY, u8 id)
|
||||
s2->palId = 0;
|
||||
s2->hitboxes[0].index = -1;
|
||||
s2->frameFlags = 0x2000;
|
||||
Bosses_SetCamBounds(s->y, s->y + 192, s->x - 320, s->x);
|
||||
#if PORTABLE && WIDESCREEN_HACK
|
||||
Bosses_SetCamBounds(s->y, s->y + DISPLAY_HEIGHT, s->x - DISPLAY_WIDTH, s->x);
|
||||
#else
|
||||
Bosses_SetCamBounds(s->y, s->y + (DISPLAY_HEIGHT + 32), s->x - (DISPLAY_WIDTH + 80), s->x);
|
||||
#endif
|
||||
|
||||
gPlayer.qSpeedGround = 0;
|
||||
gPlayer.moveState |= 0x200000;
|
||||
|
||||
@@ -67,10 +67,10 @@ typedef struct Strc_sub_8016F44 {
|
||||
} Strc_sub_8016F44; /* 0x54 */
|
||||
|
||||
typedef struct CameraPanning {
|
||||
/* 0x00 */ s16 unk0;
|
||||
/* 0x02 */ s16 unk2;
|
||||
/* 0x04 */ s16 unk4;
|
||||
/* 0x06 */ s16 unk6;
|
||||
/* 0x00 */ CamCoord unk0;
|
||||
/* 0x02 */ CamCoord unk2;
|
||||
/* 0x04 */ CamCoord unk4;
|
||||
/* 0x06 */ CamCoord unk6;
|
||||
} CameraPanning;
|
||||
|
||||
typedef struct Strc_sub_801766C {
|
||||
@@ -767,24 +767,22 @@ void sub_8017054()
|
||||
DisplaySprite(s);
|
||||
}
|
||||
|
||||
struct Task *Bosses_SetCamBounds(s16 minY, s16 maxY, s16 param2, s16 someX)
|
||||
struct Task *Bosses_SetCamBounds(CamCoord minY, CamCoord maxY, CamCoord minX, CamCoord maxX)
|
||||
{
|
||||
s16 temp_r1;
|
||||
struct Task *t;
|
||||
CameraPanning *temp_r2;
|
||||
u16 temp_r0_2;
|
||||
|
||||
temp_r0_2 = someX;
|
||||
t = TaskCreate(Task_8017244, 8U, 0x2000U, 0U, NULL);
|
||||
temp_r2 = TASK_DATA(t);
|
||||
temp_r2->unk0 = minY;
|
||||
temp_r2->unk2 = maxY;
|
||||
temp_r2->unk4 = param2;
|
||||
temp_r2->unk6 = temp_r0_2;
|
||||
temp_r2->unk4 = minX;
|
||||
temp_r2->unk6 = maxX;
|
||||
gCamera.minY = gCamera.y;
|
||||
gCamera.maxY = gCamera.y + DISPLAY_HEIGHT;
|
||||
gCamera.minX = gCamera.x;
|
||||
gCamera.maxX = temp_r0_2;
|
||||
gCamera.maxX = maxX;
|
||||
if (temp_r2->unk2 > gCamera.maxY) {
|
||||
gCamera.maxY = gCamera.y + 320;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user