Merge branch 'master' into tilemap-docs

This commit is contained in:
octorock
2023-12-31 02:12:41 +01:00
549 changed files with 15821 additions and 15437 deletions
+16 -16
View File
@@ -200,8 +200,8 @@ void Scroll2Sub2(RoomControls* controls) {
case 0:
controls->scroll_y -= 4;
target = controls->camera_target;
if (target == &gPlayerEntity) {
target->y.WORD = gPlayerEntity.y.WORD - Q_16_16(0.375);
if (target == &gPlayerEntity.base) {
target->y.WORD = gPlayerEntity.base.y.WORD - Q_16_16(0.375);
}
if (controls->unk_18 == 0x28) {
sub_0807FEC8(controls);
@@ -209,8 +209,8 @@ void Scroll2Sub2(RoomControls* controls) {
break;
case 1:
controls->scroll_x = controls->scroll_x + 4;
if (controls->camera_target == &gPlayerEntity) {
gPlayerEntity.x.WORD += Q_16_16(0.25);
if (controls->camera_target == &gPlayerEntity.base) {
gPlayerEntity.base.x.WORD += Q_16_16(0.25);
}
if (controls->unk_18 == 0x3c) {
sub_0807FEC8(controls);
@@ -219,8 +219,8 @@ void Scroll2Sub2(RoomControls* controls) {
case 2:
controls->scroll_y = controls->scroll_y + 4;
target = controls->camera_target;
if (target == &gPlayerEntity) {
target->y.WORD = gPlayerEntity.y.WORD + Q_16_16(0.375);
if (target == &gPlayerEntity.base) {
target->y.WORD = gPlayerEntity.base.y.WORD + Q_16_16(0.375);
}
if (controls->unk_18 == 0x28) {
sub_0807FEC8(controls);
@@ -228,8 +228,8 @@ void Scroll2Sub2(RoomControls* controls) {
break;
case 3:
controls->scroll_x -= 4;
if (controls->camera_target == &gPlayerEntity) {
gPlayerEntity.x.WORD -= Q_16_16(0.25);
if (controls->camera_target == &gPlayerEntity.base) {
gPlayerEntity.base.x.WORD -= Q_16_16(0.25);
}
if (controls->unk_18 == 0x3c) {
sub_0807FEC8(controls);
@@ -267,7 +267,7 @@ void Scroll4Sub1(RoomControls* controls) {
gUpdateVisibleTiles = 3;
if (++controls->unk_18 > 0x13) {
controls->scrollAction = 0;
ResetSystemPriority();
ClearEventPriority();
}
}
}
@@ -290,9 +290,9 @@ void Scroll5Sub0(RoomControls* controls) {
ResetActiveItems();
ResetPlayerAnimationAndAction();
if (gDiggingCaveEntranceTransition.isDiggingCave) {
gPlayerEntity.animationState = 4;
gPlayerEntity.base.animationState = 4;
} else {
gPlayerEntity.animationState = 0;
gPlayerEntity.base.animationState = 0;
}
sub_080809D4();
}
@@ -408,7 +408,7 @@ void Scroll5Sub5(RoomControls* controls) {
if (controls->unk_1c == 0) {
controls->scrollAction = 0;
controls->reload_flags = 0;
ResetSystemPriority();
ClearEventPriority();
gScreen.lcd.displayControl &= ~DISPCNT_WIN1_ON;
gScreen.controls.windowInsideControl &= 0xff;
gScreen.controls.windowOutsideControl &= 0xff00;
@@ -847,7 +847,7 @@ void UpdateDoorTransition() {
u32 x;
u32 y;
RoomControls* controls = &gRoomControls;
if (gRoomControls.camera_target != &gPlayerEntity) {
if (gRoomControls.camera_target != &gPlayerEntity.base) {
return;
}
if (gPlayerState.jump_status != 0) {
@@ -955,10 +955,10 @@ void sub_08080CB4(Entity* this) {
if (this->spriteSettings.draw != 0) {
switch (this->type) {
case 0x60:
if (this->field_0x6a.HALF.LO != 0) {
this->field_0x6a.HALF.LO--;
if (((GenericEntity*)this)->field_0x6a.HALF.LO != 0) {
((GenericEntity*)this)->field_0x6a.HALF.LO--;
} else {
this->field_0x6a.HALF.LO = (Random() & 0x1f) + 10;
((GenericEntity*)this)->field_0x6a.HALF.LO = (Random() & 0x1f) + 10;
effect = CreateFx(this, FX_SPARKLE, 0);
if (effect != NULL) {
effect->spriteOffsetX = this->spriteOffsetX;