Seen/Owned 4 digits in HGSS dex
This commit is contained in:
parent
6d128a71b2
commit
659bff4c0b
3 changed files with 49 additions and 22 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -2891,7 +2891,7 @@ static void CreateInterfaceSprites(u8 page)
|
|||
{
|
||||
u16 seenOwnedCount;
|
||||
// Changes sprite distance based on the seen count (owned count can't ever be bigger than it)
|
||||
u8 counterXDist = sPokedexView->seenCount > 999 ? 7 : 8;
|
||||
u8 counterXDist = 7;
|
||||
u8 counterX1s = sPokedexView->seenCount > 999 ? 57 : 56;
|
||||
u8 counterX10s = counterX1s - counterXDist;
|
||||
u8 counterX100s = counterX10s - counterXDist;
|
||||
|
|
|
@ -3227,6 +3227,11 @@ static void CreateInterfaceSprites(u8 page)
|
|||
else if (page == PAGE_MAIN)
|
||||
{
|
||||
u16 seenOwnedCount;
|
||||
u8 counterXDist = 6;
|
||||
u8 counterX1s = LIST_RIGHT_SIDE_TEXT_X + 28 - (sPokedexView->seenCount > 999 ? 0 : 1);
|
||||
u8 counterX10s = counterX1s - counterXDist;
|
||||
u8 counterX100s = counterX10s - counterXDist;
|
||||
u8 counterX1000s = counterX100s - counterXDist;
|
||||
|
||||
// Hoenn text
|
||||
CreateSprite(&sHoennNationalTextSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X, 40 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET - 6, 1);
|
||||
|
@ -3248,7 +3253,7 @@ static void CreateInterfaceSprites(u8 page)
|
|||
// Hoenn seen value - 100s
|
||||
seenOwnedCount = GetHoennPokedexCount(FLAG_GET_SEEN);
|
||||
drawNextDigit = FALSE;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX100s, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = seenOwnedCount / 100;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
if (digitNum != 0)
|
||||
|
@ -3257,7 +3262,7 @@ static void CreateInterfaceSprites(u8 page)
|
|||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// Hoenn seen value - 10s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 8, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX10s, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (seenOwnedCount % 100) / 10;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
|
@ -3265,14 +3270,14 @@ static void CreateInterfaceSprites(u8 page)
|
|||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// Hoenn seen value - 1s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 16, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1s, 45 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (seenOwnedCount % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
|
||||
seenOwnedCount = GetHoennPokedexCount(FLAG_GET_CAUGHT);
|
||||
// Hoenn owned value - 100s
|
||||
drawNextDigit = FALSE;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX100s, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = seenOwnedCount / 100;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
if (digitNum != 0)
|
||||
|
@ -3281,7 +3286,7 @@ static void CreateInterfaceSprites(u8 page)
|
|||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// Hoenn owned value - 10s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 8, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX10s, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (seenOwnedCount % 100) / 10;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
|
@ -3289,55 +3294,77 @@ static void CreateInterfaceSprites(u8 page)
|
|||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// Hoenn owned value - 1s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 16, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1s, 55 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (seenOwnedCount % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
|
||||
//****************************
|
||||
// National seen value - 100s
|
||||
// National seen value - 1000s
|
||||
drawNextDigit = FALSE;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = sPokedexView->seenCount / 100;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1000s, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = sPokedexView->seenCount / 1000;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
if (digitNum != 0)
|
||||
drawNextDigit = TRUE;
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National seen value - 100s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX100s, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->seenCount % 1000) / 100;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
{
|
||||
drawNextDigit = TRUE;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
}
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National seen value - 10s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 8, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->seenCount % 100) / 10;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX10s, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = ((sPokedexView->seenCount % 1000) % 100) / 10;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National seen value - 1s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 16, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->seenCount % 100) % 10;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1s, 78 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = ((sPokedexView->seenCount % 1000) % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
|
||||
// National owned value - 100s
|
||||
// National owned value - 1000s
|
||||
drawNextDigit = FALSE;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = sPokedexView->ownCount / 100;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1000s, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = sPokedexView->ownCount / 1000;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
if (digitNum != 0)
|
||||
drawNextDigit = TRUE;
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National owned value - 100s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX100s, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->ownCount % 1000) / 100;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
{
|
||||
drawNextDigit = TRUE;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
}
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National owned value - 10s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 8, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->ownCount % 100) / 10;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX10s, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = ((sPokedexView->ownCount % 1000) % 100) / 10;
|
||||
if (digitNum != 0 || drawNextDigit)
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
// National owned value - 1s
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, LIST_RIGHT_SIDE_TEXT_X + LIST_RIGHT_SIDE_TEXT_X_OFFSET + 16, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = (sPokedexView->ownCount % 100) % 10;
|
||||
spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, counterX1s, 88 - LIST_RIGHT_SIDE_TEXT_Y_OFFSET, 1);
|
||||
digitNum = ((sPokedexView->ownCount % 1000) % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], digitNum);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue