summaryrefslogtreecommitdiff
path: root/src/pokemon_storage_system.c
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-12-31 02:30:30 -0600
committerDiegoisawesome <diego@domoreaweso.me>2018-12-31 02:30:30 -0600
commitd004ce065c9cc6425df6f567dff39eb831f84875 (patch)
tree2c20338324f10a553e78e731d999dd58669266c3 /src/pokemon_storage_system.c
parentec780bb2098be75e591b212e85947f88c91d4e37 (diff)
parent58f130d007b97623dd5c7a3b373800c138f75c5e (diff)
Merge branch 'master' of github.com:pret/pokeemerald into trade
Diffstat (limited to 'src/pokemon_storage_system.c')
-rw-r--r--src/pokemon_storage_system.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index 7b1d8da7c..36ed78a54 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -1759,7 +1759,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
case 4:
if (!gPaletteFade.active)
{
- overworld_free_bg_tilemaps();
+ CleanupOverworldWindowsAndTilemaps();
Cb2_EnterPSS(task->data[2]);
RemoveWindow(task->data[15]);
DestroyTask(taskId);
@@ -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;