summaryrefslogtreecommitdiff
path: root/src/pokemon_storage_system.c
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2018-12-26 13:05:02 +0100
committerDizzyEggg <jajkodizzy@wp.pl>2018-12-26 13:05:02 +0100
commit7f6f6c33ab9a9a5ab97aff8976ea2cb153106624 (patch)
treec9c9d860dc1526a0efeb328699218e4cd4f294d5 /src/pokemon_storage_system.c
parent2dd706ca5410d98ad214ceff7026d6db276f4d5a (diff)
Fix BgAttributes
Diffstat (limited to 'src/pokemon_storage_system.c')
-rw-r--r--src/pokemon_storage_system.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index 7b1d8da7c..91a1a5fd0 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -8826,7 +8826,7 @@ static bool8 sub_80D024C(void)
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
FillWindowPixelBuffer8Bit(sPSSData->field_2200, 0);
sub_80D07B0(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn);
- SetBgAttribute(0, 4, 1);
+ SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1);
PutWindowTilemap(sPSSData->field_2200);
CopyWindowToVram8Bit(sPSSData->field_2200, 3);
BlendPalettes(0x3F00, 8, RGB_WHITE);
@@ -9246,7 +9246,7 @@ static void sub_80D0B5C(void)
{
ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0);
- SetBgAttribute(0, 4, 0);
+ SetBgAttribute(0, BG_ATTR_PALETTEMODE, 0);
ClearGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR);
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
CopyBgTilemapBufferToVram(0);
@@ -9865,7 +9865,7 @@ static bool8 sub_80D184C(void)
var = 0x15 - sPSSData->field_2236;
for (i = 0; i < var; i++)
{
- WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, 10) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21);
+ WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21);
}
sub_80D19B4(var);
@@ -9886,7 +9886,7 @@ static bool8 sub_80D18E4(void)
var = 0x15 - sPSSData->field_2236;
for (i = 0; i < var; i++)
{
- WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, 10) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21);
+ WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21);
}
if (var >= 0)
@@ -10423,7 +10423,7 @@ static const sUnkVars[][4] =
static void sub_80D2644(u8 id, u8 bg, const void *arg2, u16 arg3, u16 arg4)
{
- u16 attribute1, attribute2;
+ u16 bgScreenSize, bgType;
if (id >= gUnknown_02039D88)
return;
@@ -10434,11 +10434,11 @@ static void sub_80D2644(u8 id, u8 bg, const void *arg2, u16 arg3, u16 arg4)
gUnknown_02039D84[id].field_24 = arg3;
gUnknown_02039D84[id].field_26 = arg4;
- attribute1 = GetBgAttribute(bg, 3);
- attribute2 = GetBgAttribute(bg, 9);
- gUnknown_02039D84[id].field_20 = sUnkVars[attribute2][attribute1].a;
- gUnknown_02039D84[id].field_22 = sUnkVars[attribute2][attribute1].b;
- if (attribute2 != 0)
+ bgScreenSize = GetBgAttribute(bg, BG_ATTR_SCREENSIZE);
+ bgType = GetBgAttribute(bg, BG_ATTR_TYPE);
+ gUnknown_02039D84[id].field_20 = sUnkVars[bgType][bgScreenSize].a;
+ gUnknown_02039D84[id].field_22 = sUnkVars[bgType][bgScreenSize].b;
+ if (bgType != 0)
gUnknown_02039D84[id].field_2A = 1;
else
gUnknown_02039D84[id].field_2A = 2;