summaryrefslogtreecommitdiff
path: root/src/battle/anim
diff options
context:
space:
mode:
authorMarco Willems (M17.1) <progreon@gmail.com>2018-01-19 13:23:17 +0100
committerMarco Willems (M17.1) <progreon@gmail.com>2018-01-19 13:23:17 +0100
commitd4cd912eb85411a4be1ea97441f929a16f455f34 (patch)
tree31f54c8322ac4a7be5f2509b0903248cf993e24b /src/battle/anim
parent05ab3f96218b58001aa2d90cef951f7e4087c4ae (diff)
parent1d8798203e86b61e889ea1c0fba851cbdbdd03d7 (diff)
Merge remote-tracking branch 'upstream/master' into various_data
Diffstat (limited to 'src/battle/anim')
-rw-r--r--src/battle/anim/love_bg.c23
-rw-r--r--src/battle/anim/scary_face.c21
2 files changed, 7 insertions, 37 deletions
diff --git a/src/battle/anim/love_bg.c b/src/battle/anim/love_bg.c
index bd3d22ca6..c3828c681 100644
--- a/src/battle/anim/love_bg.c
+++ b/src/battle/anim/love_bg.c
@@ -25,7 +25,7 @@ static void sub_80D21F0(u8 taskId);
void sub_80D2100(u8 taskId)
{
struct Struct_sub_8078914 subStruct;
- u8* tempvar;
+
REG_BLDCNT = 0x3F42;
REG_BLDALPHA = 0x1000;
REG_BG1CNT_BITFIELD.priority = 3;
@@ -38,9 +38,8 @@ void sub_80D2100(u8 taskId)
REG_BG1HOFS = 0;
REG_BG1VOFS = 0;
sub_8078914(&subStruct);
- tempvar = subStruct.field_4;
- DmaFill32(3, 0x0, tempvar, 0x1000);
- LZDecompressVram(&gAttractTilemap, tempvar);
+ DmaFill32Defvars(3, 0, subStruct.field_4, 0x1000);
+ LZDecompressVram(&gAttractTilemap, subStruct.field_4);
LZDecompressVram(&gAttractGfx, subStruct.field_0);
LoadCompressedPalette(&gAttractPal, subStruct.field_8 << 4, 32);
if (IsContest())
@@ -90,21 +89,7 @@ void sub_80D21F0(u8 taskId)
break;
case 3:
sub_8078914(&subStruct);
- {
- u8 *addr = subStruct.field_0;
- u32 size = 0x2000;
- while (1)
- {
- DmaFill32(3, 0, addr, 0x1000);
- addr += 0x1000;
- size -= 0x1000;
- if (size <= 0x1000)
- {
- DmaFill32(3, 0, addr, size);
- break;
- }
- }
- }
+ DmaFill32Large(3, 0, subStruct.field_0, 0x2000, 0x1000);
DmaClear32(3, subStruct.field_4, 0x800);
if (!IsContest())
REG_BG1CNT_BITFIELD.charBaseBlock = 0;
diff --git a/src/battle/anim/scary_face.c b/src/battle/anim/scary_face.c
index 47776a3cb..8d51521ee 100644
--- a/src/battle/anim/scary_face.c
+++ b/src/battle/anim/scary_face.c
@@ -27,7 +27,7 @@ static void sub_80D24E0(u8 taskId);
void sub_80D23B4(u8 taskId)
{
struct Struct_sub_8078914 subStruct;
- u8* tempvar;
+
REG_BLDCNT = 0x3F42;
REG_BLDALPHA = 0x1000;
REG_BG1CNT_BITFIELD.priority = 1;
@@ -40,8 +40,7 @@ void sub_80D23B4(u8 taskId)
REG_BG1HOFS = 0;
REG_BG1VOFS = 0;
sub_8078914(&subStruct);
- tempvar = subStruct.field_4;
- DmaFill32(3, 0x0, tempvar, 0x1000);
+ DmaFill32Defvars(3, 0, subStruct.field_4, 0x1000);
if (IsContest())
LZDecompressVram(&gBattleAnimBackgroundTilemap_ScaryFaceContest, subStruct.field_4);
else if (GetBankSide(gAnimBankTarget) == 1)
@@ -98,21 +97,7 @@ void sub_80D24E0(u8 taskId)
break;
case 3:
sub_8078914(&subStruct);
- {
- u8 *addr = subStruct.field_0;
- u32 size = 0x2000;
- while (1)
- {
- DmaFill32(3, 0, addr, 0x1000);
- addr += 0x1000;
- size -= 0x1000;
- if (size <= 0x1000)
- {
- DmaFill32(3, 0, addr, size);
- break;
- }
- }
- }
+ DmaFill32Large(3, 0, subStruct.field_0, 0x2000, 0x1000);
DmaClear32(3, subStruct.field_4, 0x800);
if (!IsContest())
REG_BG1CNT_BITFIELD.charBaseBlock = 0;