From 9848f84b9ec2d5950cb5dc4600b7651486ff986a Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Mar 2019 03:12:15 -0400 Subject: Use constants for Oam .shape and .size fields Also some general formatting fixes for constants. --- src/pokemon_storage_system.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'src/pokemon_storage_system.c') diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index c5d40877b..30f5af14c 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -969,10 +969,10 @@ static const struct OamData sOamData_857286C = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -986,10 +986,10 @@ static const struct OamData sOamData_8572874 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 1, + .shape = SPRITE_SHAPE(16x8), .x = 0, .matrixNum = 0, - .size = 0, + .size = SPRITE_SIZE(16x8), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1062,10 +1062,10 @@ static const struct OamData sOamData_85728EC = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -1467,8 +1467,8 @@ static const struct SpriteSheet gUnknown_0857B080 = {gPCGfx_Arrow, 0x80, 6}; static const struct OamData gOamData_83BB298 = { - .shape = ST_OAM_H_RECTANGLE, - .size = 2, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), .priority = 2 }; @@ -1503,7 +1503,8 @@ static const struct SpriteTemplate gSpriteTemplate_857B0A8 = static const struct OamData gOamData_83BB2D0 = { - .shape = ST_OAM_V_RECTANGLE, + .shape = SPRITE_SHAPE(8x16), + .size = SPRITE_SIZE(8x16), .priority = 2 }; @@ -2004,7 +2005,7 @@ static void sub_80C7958(u8 curBox) u8 spriteId; struct SpriteTemplate template; struct OamData oamData = {}; - oamData.size = 3; + oamData.size = SPRITE_SIZE(64x64); oamData.paletteNum = 1; template = (struct SpriteTemplate){ 0, 0, &oamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy @@ -2017,8 +2018,8 @@ static void sub_80C7958(u8 curBox) spriteId = CreateSprite(&template, 160, 96, 0); gUnknown_02039D04->unk_0000 = gSprites + spriteId; - oamData.shape = ST_OAM_V_RECTANGLE; - oamData.size = 1; + oamData.shape = SPRITE_SHAPE(8x32); + oamData.size = SPRITE_SIZE(8x32); template.tileTag = gUnknown_02039D04->unk_0240 + 1; template.anims = sSpriteAnimTable_8571710; for (i = 0; i < 4; i++) @@ -8490,12 +8491,14 @@ static void sub_80CFC14(void) static const struct OamData sOamData_857BA0C = { - .size = 2, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), .priority = 1, }; static const struct OamData sOamData_857BA14 = { - .size = 1, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), .priority = 1, }; @@ -9358,10 +9361,10 @@ static const struct OamData sOamData_857BBA4 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 1, .paletteNum = 0, -- cgit v1.2.3 From ade01833781ee8a8057f2b2945095bababb2e639 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 18:59:52 -0400 Subject: Document mystery_gift --- src/pokemon_storage_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pokemon_storage_system.c') diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 30f5af14c..fb1be0698 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -4419,7 +4419,7 @@ static void PrintStorageActionText(u8 id) DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text); FillWindowPixelBuffer(1, PIXEL_FILL(1)); AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL); - sub_8098858(1, 2, 14); + DrawTextBorderOuter(1, 2, 14); PutWindowTilemap(1); CopyWindowToVram(1, 2); schedule_bg_copy_tilemap_to_vram(0); -- cgit v1.2.3 From b0223f691fcc83c18b6ba8df5140d907939b04cf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 4 Apr 2019 23:53:06 +0200 Subject: Clean up data headers --- src/pokemon_storage_system.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/pokemon_storage_system.c') diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index fb1be0698..148be7c5c 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1,7 +1,7 @@ #include "global.h" #include "alloc.h" #include "bg.h" -#include "data2.h" +#include "data.h" #include "decompress.h" #include "dma3.h" #include "dynamic_placeholder_text_util.h" @@ -463,8 +463,6 @@ EWRAM_DATA static u8 sMovingMonOrigBoxId = 0; EWRAM_DATA static u8 sMovingMonOrigBoxPos = 0; EWRAM_DATA static bool8 sCanOnlyMove = 0; -extern const struct CompressedSpriteSheet gMonFrontPicTable[]; - // This file's functions. static void CreatePCMenu(u8 whichMenu, s16 *windowIdPtr); static void Cb2_EnterPSS(u8 boxOption); -- cgit v1.2.3