mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
battle dome cards sensibly renamed
This commit is contained in:
parent
e4649245ba
commit
fb19a8fc59
@ -121,7 +121,7 @@ _081925B6:
|
||||
ldr r1, =0x0000ffff
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
bl sub_818D8AC
|
||||
bl CreateTrainerPicSprite
|
||||
ldr r1, =gUnknown_0203CD78
|
||||
ldr r1, [r1]
|
||||
adds r1, r5
|
||||
@ -1701,7 +1701,7 @@ _081932F8:
|
||||
ldr r1, =0x0000ffff
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
bl sub_818D8AC
|
||||
bl CreateTrainerPicSprite
|
||||
ldr r1, =gUnknown_0203CD78
|
||||
ldr r1, [r1]
|
||||
ldr r2, [sp, 0x3C]
|
||||
@ -1789,7 +1789,7 @@ _081933B8:
|
||||
ldr r1, =0x0000ffff
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
bl sub_818D8AC
|
||||
bl CreateTrainerPicSprite
|
||||
ldr r1, =gUnknown_0203CD78
|
||||
ldr r1, [r1]
|
||||
add r1, r9
|
||||
|
@ -2935,7 +2935,7 @@ sub_819BD70: @ 819BD70
|
||||
adds r0, r5, 0
|
||||
mov r2, r8
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
ldr r1, [r6]
|
||||
movs r2, 0xA6
|
||||
lsls r2, 2
|
||||
@ -3053,7 +3053,7 @@ sub_819BE34: @ 819BE34
|
||||
adds r0, r5, 0
|
||||
mov r2, r9
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
ldr r1, [r6]
|
||||
movs r2, 0xA6
|
||||
lsls r2, 2
|
||||
@ -3166,7 +3166,7 @@ _0819BF48:
|
||||
adds r0, r5, 0
|
||||
adds r2, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
mov r2, r9
|
||||
ldr r1, [r2]
|
||||
add r1, r8
|
||||
@ -3846,19 +3846,19 @@ sub_819C568: @ 819C568
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xA6
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xA7
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
ldr r0, =sub_819C2D4
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
@ -6709,7 +6709,7 @@ _0819DDA8:
|
||||
bl ResetSpriteData
|
||||
bl ResetTasks
|
||||
bl FreeAllSpritePalettes
|
||||
bl dp13_810BB8C
|
||||
bl ResetAllPicSprites
|
||||
ldr r0, =gFrontierFactorySelectMenu_Gfx
|
||||
ldr r5, =gUnknown_0203CE40
|
||||
ldr r1, [r5]
|
||||
@ -9315,7 +9315,7 @@ sub_819F304: @ 819F304
|
||||
adds r0, r5, 0
|
||||
mov r1, r9
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
ldr r1, [r6]
|
||||
adds r1, 0x2C
|
||||
strb r0, [r1]
|
||||
@ -9370,7 +9370,7 @@ sub_819F3F8: @ 819F3F8
|
||||
lsrs r5, 24
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
ldr r0, =sub_819F7B4
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
@ -9403,7 +9403,7 @@ sub_819F444: @ 819F444
|
||||
adds r6, r1, 0
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
ldr r5, =gSprites
|
||||
lsls r4, 16
|
||||
lsrs r1, r4, 24
|
||||
@ -9996,7 +9996,7 @@ _0819F908:
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
ldr r2, =gUnknown_03001284
|
||||
ldr r1, [r2]
|
||||
adds r1, 0x2C
|
||||
|
@ -20169,7 +20169,7 @@ sub_81D1148: @ 81D1148
|
||||
add r2, sp, 0x8
|
||||
mov r0, sp
|
||||
bl sub_81D0760
|
||||
bl dp13_810BB8C
|
||||
bl ResetAllPicSprites
|
||||
movs r0, 0x28
|
||||
movs r1, 0x68
|
||||
bl sub_81D1184
|
||||
@ -20187,7 +20187,7 @@ sub_81D1148: @ 81D1148
|
||||
sub_81D1178: @ 81D1178
|
||||
push {lr}
|
||||
ldrh r0, [r0, 0x10]
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D1178
|
||||
@ -20213,7 +20213,7 @@ sub_81D1184: @ 81D1184
|
||||
ldr r3, =0x0000ffff
|
||||
str r3, [sp, 0xC]
|
||||
movs r3, 0x1
|
||||
bl sub_818D7D8
|
||||
bl CreateMonPicSprite_HandleDeoxys
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r1, =gSprites
|
||||
@ -20256,7 +20256,7 @@ sub_81D11FC: @ 81D11FC
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
ldrh r0, [r4, 0x10]
|
||||
bl sub_818D820
|
||||
bl FreeAndDestroyMonPicSprite
|
||||
movs r5, 0x20
|
||||
negs r5, r5
|
||||
adds r0, r5, 0
|
||||
|
@ -1,13 +0,0 @@
|
||||
#ifndef GUARD_BATTLE_DOME_CARDS_H
|
||||
#define GUARD_BATTLE_DOME_CARDS_H
|
||||
|
||||
bool16 dp13_810BB8C(void);
|
||||
u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 sub_818D820(u16 spriteId);
|
||||
u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 sub_818D8F0(u16 spriteId);
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u8 sub_818D97C(u8 a0, u8 a1);
|
||||
|
||||
#endif //GUARD_BATTLE_DOME_CARDS_H
|
@ -174,10 +174,10 @@
|
||||
#define FACILITY_CLASS_TWINS 0x39
|
||||
#define FACILITY_CLASS_SAILOR 0x3a
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_1 0x3b
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_MAY 0x3c
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_BRENDAN 0x3c
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_3 0x3d
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_4 0x3e
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_BRENDAN 0x3f
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_MAY 0x3f
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_6 0x40
|
||||
#define FACILITY_CLASS_PKMN_TRAINER_7 0x41
|
||||
#define FACILITY_CLASS_PKMN_BREEDER_2 0x42
|
||||
|
13
include/trainer_pokemon_sprites.h
Normal file
13
include/trainer_pokemon_sprites.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
#define GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
|
||||
bool16 ResetAllPicSprites(void);
|
||||
u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyMonPicSprite(u16 spriteId);
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16 spriteId);
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass);
|
||||
|
||||
#endif // GUARD_TRAINER_POKEMON_SPRITES_H
|
@ -240,7 +240,7 @@ SECTIONS {
|
||||
src/recorded_battle.o(.text);
|
||||
src/battle_controller_recorded_opponent.o(.text);
|
||||
src/battle_controller_recorded_player.o(.text);
|
||||
src/battle_dome_cards.o(.text);
|
||||
src/trainer_pokemon_sprites.o(.text);
|
||||
src/lilycove_lady.o(.text);
|
||||
src/battle_frontier_1.o(.text);
|
||||
asm/battle_frontier_1.o(.text);
|
||||
@ -520,7 +520,7 @@ SECTIONS {
|
||||
src/pokemon_animation.o(.rodata);
|
||||
src/battle_controller_recorded_opponent.o(.rodata);
|
||||
src/battle_controller_recorded_player.o(.rodata);
|
||||
src/battle_dome_cards.o(.rodata);
|
||||
src/trainer_pokemon_sprites.o(.rodata);
|
||||
src/lilycove_lady.o(.rodata);
|
||||
src/battle_frontier_1.o(.rodata);
|
||||
data/battle_frontier_1.o(.rodata);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "menu.h"
|
||||
#include "sound.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/trainers.h"
|
||||
@ -57,7 +58,6 @@ extern void sub_8195898(u8 *dst, u16 trainerId);
|
||||
extern u16 sub_81A5060(u8, u8);
|
||||
extern void sub_8162614(u16, u8);
|
||||
extern void sub_81A4C30(void);
|
||||
extern u16 sub_818D8F0(u16);
|
||||
extern bool8 sub_81A3610(void);
|
||||
extern u16 sub_81A4FF0(u8);
|
||||
|
||||
@ -1361,7 +1361,7 @@ void sub_8190790(struct Sprite *sprite)
|
||||
if (sprite->pos1.y >= 192)
|
||||
{
|
||||
gUnknown_0203CD78->arr[sprite->data[2]] = 0xFF;
|
||||
sub_818D8F0(sprite->data[3]);
|
||||
FreeAndDestroyTrainerPicSprite(sprite->data[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ void sub_81907F8(struct Sprite *sprite)
|
||||
if (sprite->pos1.y <= -32)
|
||||
{
|
||||
gUnknown_0203CD78->arr[sprite->data[2]] = 0xFF;
|
||||
sub_818D8F0(sprite->data[3]);
|
||||
FreeAndDestroyTrainerPicSprite(sprite->data[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1401,7 +1401,7 @@ void sub_8190860(struct Sprite *sprite)
|
||||
if (sprite->pos1.x >= 272)
|
||||
{
|
||||
gUnknown_0203CD78->arr[sprite->data[2]] = 0xFF;
|
||||
sub_818D8F0(sprite->data[3]);
|
||||
FreeAndDestroyTrainerPicSprite(sprite->data[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1421,7 +1421,7 @@ void sub_81908CC(struct Sprite *sprite)
|
||||
if (sprite->pos1.x <= -32)
|
||||
{
|
||||
gUnknown_0203CD78->arr[sprite->data[2]] = 0xFF;
|
||||
sub_818D8F0(sprite->data[3]);
|
||||
FreeAndDestroyTrainerPicSprite(sprite->data[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2290,7 +2290,7 @@ void sub_8190CD4(u8 taskId)
|
||||
if (i < 2)
|
||||
{
|
||||
if (gUnknown_0203CD78->arr[i] != 0xFF)
|
||||
sub_818D8F0(gUnknown_0203CD78->arr[i]);
|
||||
FreeAndDestroyTrainerPicSprite(gUnknown_0203CD78->arr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2303,7 +2303,7 @@ void sub_8190CD4(u8 taskId)
|
||||
if (i < 10)
|
||||
{
|
||||
if (gUnknown_0203CD78->arr[i] != 0xFF)
|
||||
sub_818D8F0(gUnknown_0203CD78->arr[i]);
|
||||
FreeAndDestroyTrainerPicSprite(gUnknown_0203CD78->arr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2345,100 +2345,108 @@ u8 sub_819221C(u8 taskId)
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
retVal = 9;
|
||||
|
||||
if (gTasks[taskId].data[3] != 0)
|
||||
if (gTasks[taskId].data[3] == 0)
|
||||
return retVal;
|
||||
|
||||
if (gTasks[taskId].data[3] == 1)
|
||||
{
|
||||
if (gTasks[taskId].data[3] == 1)
|
||||
if (gMain.newKeys & DPAD_UP && gUnknown_0203CD78->unk_10 == 0)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP && gUnknown_0203CD78->unk_10 == 0)
|
||||
{
|
||||
if (r5 == 0)
|
||||
r5 = 15;
|
||||
else
|
||||
r5--;
|
||||
retVal = 1;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN && gUnknown_0203CD78->unk_10 != 0)
|
||||
{
|
||||
if (r5 == 15)
|
||||
r5 = 0;
|
||||
else
|
||||
r5++;
|
||||
retVal = 2;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_LEFT && gUnknown_0203CD78->unk_10 != 0)
|
||||
{
|
||||
gUnknown_0203CD78->unk_10--;
|
||||
retVal = 3;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_RIGHT)
|
||||
{
|
||||
if (gSaveBlock2Ptr->frontier.domeTrainers[r10].unk1 && gUnknown_0203CD78->unk_10 - 1 < gSaveBlock2Ptr->frontier.domeTrainers[r10].unk2)
|
||||
{
|
||||
gUnknown_0203CD78->unk_10++;
|
||||
retVal = 4;
|
||||
}
|
||||
if (!gSaveBlock2Ptr->frontier.domeTrainers[r10].unk1 && gUnknown_0203CD78->unk_10 - 1 < roundId)
|
||||
{
|
||||
gUnknown_0203CD78->unk_10++;
|
||||
retVal = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (retVal == 9)
|
||||
{
|
||||
if (gUnknown_0203CD78->unk_10 != 0)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1A0[(r5 / 2) * 4 + (gUnknown_0203CD78->unk_10 - 1)];
|
||||
else
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
}
|
||||
if (r5 == 0)
|
||||
r5 = 15;
|
||||
else
|
||||
r5--;
|
||||
retVal = 1;
|
||||
}
|
||||
else
|
||||
else if (gMain.newKeys & DPAD_DOWN && gUnknown_0203CD78->unk_10 == 0)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP && gUnknown_0203CD78->unk_10 == 1)
|
||||
if (r5 == 15)
|
||||
r5 = 0;
|
||||
else
|
||||
r5++;
|
||||
retVal = 2;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_LEFT && gUnknown_0203CD78->unk_10 != 0)
|
||||
{
|
||||
gUnknown_0203CD78->unk_10--;
|
||||
retVal = 3;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_RIGHT)
|
||||
{
|
||||
if (gSaveBlock2Ptr->frontier.domeTrainers[r10].unk1 && gUnknown_0203CD78->unk_10 - 1 < gSaveBlock2Ptr->frontier.domeTrainers[r10].unk2)
|
||||
{
|
||||
if (r5 == 16)
|
||||
r5 = gUnknown_0860D19C[roundId];
|
||||
else
|
||||
r5--;
|
||||
retVal = 5;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN && gUnknown_0203CD78->unk_10 == 1)
|
||||
{
|
||||
if (r5 == gUnknown_0860D19C[roundId])
|
||||
r5 = 16;
|
||||
else
|
||||
r5++;
|
||||
retVal = 6;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_LEFT && gUnknown_0203CD78->unk_10 != 0)
|
||||
{
|
||||
retVal = 7;
|
||||
gUnknown_0203CD78->unk_10--;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_RIGHT && (gUnknown_0203CD78->unk_10 == 0 || gUnknown_0203CD78->unk_10 == 1))
|
||||
{
|
||||
retVal = 8;
|
||||
gUnknown_0203CD78->unk_10++;
|
||||
retVal = 4;
|
||||
}
|
||||
|
||||
if (retVal == 9)
|
||||
if (!gSaveBlock2Ptr->frontier.domeTrainers[r10].unk1 && gUnknown_0203CD78->unk_10 - 1 < roundId)
|
||||
{
|
||||
if (gUnknown_0203CD78->unk_10 == 0)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1C0[gUnknown_0203CD78->unk_11[0]];
|
||||
else if (gUnknown_0203CD78->unk_10 == 2)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1C0[gUnknown_0203CD78->unk_11[1]];
|
||||
else
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
gUnknown_0203CD78->unk_10++;
|
||||
retVal = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (retVal != 0 && retVal != 9)
|
||||
if (retVal == 9)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
gTasks[taskId].data[2] ^= 1;
|
||||
if (gUnknown_0203CD78->unk_10 != 0)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1A0[(r5 / 2) * 4 + (gUnknown_0203CD78->unk_10 - 1)];
|
||||
else
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP && gUnknown_0203CD78->unk_10 == 1)
|
||||
{
|
||||
if (r5 == 16)
|
||||
r5 = gUnknown_0860D19C[roundId];
|
||||
else
|
||||
r5--;
|
||||
retVal = 5;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN && gUnknown_0203CD78->unk_10 == 1)
|
||||
{
|
||||
if (r5 == gUnknown_0860D19C[roundId])
|
||||
r5 = 16;
|
||||
else
|
||||
r5++;
|
||||
retVal = 6;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_LEFT && gUnknown_0203CD78->unk_10 != 0)
|
||||
{
|
||||
retVal = 7;
|
||||
gUnknown_0203CD78->unk_10--;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_RIGHT && (gUnknown_0203CD78->unk_10 == 0 || gUnknown_0203CD78->unk_10 == 1))
|
||||
{
|
||||
retVal = 8;
|
||||
gUnknown_0203CD78->unk_10++;
|
||||
}
|
||||
|
||||
if (retVal == 9)
|
||||
{
|
||||
if (gUnknown_0203CD78->unk_10 == 0)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1C0[gUnknown_0203CD78->unk_11[0]];
|
||||
else if (gUnknown_0203CD78->unk_10 == 2)
|
||||
gTasks[taskId2].data[1] = gUnknown_0860D1C0[gUnknown_0203CD78->unk_11[1]];
|
||||
else
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
}
|
||||
}
|
||||
|
||||
if (retVal != 0 && retVal != 9)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gTasks[taskId2].data[1] = r5;
|
||||
gTasks[taskId].data[2] ^= 1;
|
||||
}
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
void sub_81924E0(u8 arg0, u8 arg1)
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "gpu_regs.h"
|
||||
#include "m4a.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "battle_dome_cards.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "starter_choose.h"
|
||||
#include "decompress.h"
|
||||
#include "intro_credits_graphics.h"
|
||||
@ -1197,7 +1197,6 @@ void sub_8175620(void)
|
||||
u8 taskIdA;
|
||||
s16 taskIdC;
|
||||
u8 taskIdB;
|
||||
u16 savedIme;
|
||||
|
||||
sub_8175CE4();
|
||||
SetVBlankCallback(NULL);
|
||||
@ -1333,7 +1332,7 @@ static void sub_81758E4(u8 taskIdA)
|
||||
u16 *temp;
|
||||
|
||||
ResetSpriteData();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
LZ77UnCompVram(&gBirchHelpGfx, (void *)VRAM);
|
||||
@ -2164,7 +2163,7 @@ static void sub_8177050(struct Sprite *sprite)
|
||||
{
|
||||
if (gUnknown_0203BD28)
|
||||
{
|
||||
sub_818D820(sprite->data[6]);
|
||||
FreeAndDestroyMonPicSprite(sprite->data[6]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2242,7 +2241,7 @@ static void sub_8177050(struct Sprite *sprite)
|
||||
case 10:
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
sub_818D820(sprite->data[6]);
|
||||
FreeAndDestroyMonPicSprite(sprite->data[6]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "field_effect.h"
|
||||
#include "battle_dome_cards.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "decompress.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_effect_helpers.h"
|
||||
@ -557,7 +555,7 @@ u8 AddNewGameBirchObject(s16 x, s16 y, u8 subpriority)
|
||||
#ifdef NONMATCHING
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y)
|
||||
{
|
||||
u16 spriteId = sub_818D7D8(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
|
||||
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return 0x40;
|
||||
@ -590,7 +588,7 @@ u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y)
|
||||
movs r1, 0\n\
|
||||
adds r2, r3, 0\n\
|
||||
movs r3, 0x1\n\
|
||||
bl sub_818D7D8\n\
|
||||
bl CreateMonPicSprite_HandleDeoxys\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
ldrh r0, [r4, 0x4]\n\
|
||||
@ -619,7 +617,7 @@ _080B5FDE:\n\
|
||||
u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
const struct CompressedSpritePalette *spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, d, g);
|
||||
u16 spriteId = sub_818D7D8(species, d, g, 1, x, y, 0, spritePalette->tag);
|
||||
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, d, g, 1, x, y, 0, spritePalette->tag);
|
||||
PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10);
|
||||
if (spriteId == 0xFFFF)
|
||||
return 0x40;
|
||||
@ -634,7 +632,7 @@ void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId)
|
||||
{
|
||||
FreeOamMatrix(sprite->oam.matrixNum);
|
||||
}
|
||||
sub_818D820(spriteId);
|
||||
FreeAndDestroyMonPicSprite(spriteId);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
@ -1645,7 +1645,7 @@ bool8 sub_81398C0(void)
|
||||
StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(gSpecialVar_0x8004)]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1799,7 +1799,7 @@ void ShakeScreenInElevator(void)
|
||||
|
||||
if (floorDelta > 8)
|
||||
floorDelta = 8;
|
||||
|
||||
|
||||
data[5] = gUnknown_085B2C18[floorDelta];
|
||||
|
||||
SetCameraPanningCallback(NULL);
|
||||
@ -1830,16 +1830,16 @@ static void sub_8139AF4(u8 taskId)
|
||||
void sub_8139B60(void)
|
||||
{
|
||||
int xPos;
|
||||
|
||||
|
||||
gUnknown_0203AB5E = AddWindow(&gUnknown_085B2BAC);
|
||||
SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
|
||||
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gElevatorFloorsTable[gSpecialVar_0x8005], 64);
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
||||
|
||||
|
||||
PutWindowTilemap(gUnknown_0203AB5E);
|
||||
CopyWindowToVram(gUnknown_0203AB5E, 3);
|
||||
}
|
||||
@ -2167,13 +2167,13 @@ void sub_8139F20(void)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (gSaveBlock2Ptr->frontier.field_D0C[0] >= gSaveBlock2Ptr->frontier.field_D0C[1])
|
||||
if (gSaveBlock2Ptr->frontier.field_D0C[0][0] >= gSaveBlock2Ptr->frontier.field_D0C[0][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[0];
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[0][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[1];
|
||||
unk = gSaveBlock2Ptr->frontier.field_D0C[0][1];
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
@ -2662,8 +2662,8 @@ static void sub_813A2DC(u8 taskId)
|
||||
}
|
||||
|
||||
task->data[4] = convert_pixel_width_to_tile_width(unk1);
|
||||
|
||||
if (task->data[2] + task->data[4] > 0x1D)
|
||||
|
||||
if (task->data[2] + task->data[4] > 0x1D)
|
||||
{
|
||||
int unk2 = 0x1D - task->data[4];
|
||||
if (unk2 < 0)
|
||||
@ -3363,7 +3363,7 @@ void sub_813ADD4(void)
|
||||
struct Task *task = &gTasks[taskId];
|
||||
ListMenuGetScrollAndRow(task->data[14], &scrollOffset, &selectedRow);
|
||||
SetStandardWindowBorderStyle(task->data[13], 0);
|
||||
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
sub_8199F74(task->data[13], 1, gUnknown_085B2CF0[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
|
||||
@ -3381,7 +3381,7 @@ void sub_813AEB4(void)
|
||||
u16 temp1 = 0;
|
||||
u16 temp2 = 0;
|
||||
gSpecialVar_0x8005 = 0;
|
||||
|
||||
|
||||
temp1 = VarGet(VAR_TEMP_E);
|
||||
temp2 = VarGet(VAR_TEMP_D);
|
||||
|
||||
@ -3509,7 +3509,7 @@ static void sub_813B0B4(u8 a0)
|
||||
u8 eventObjectId;
|
||||
LoadPalette(&gUnknown_085B3280[a0], 0x1A0, 8);
|
||||
TryGetEventObjectIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectId);
|
||||
|
||||
|
||||
if (a0 == 0)
|
||||
{
|
||||
PlaySE(SE_W109);
|
||||
@ -3656,7 +3656,7 @@ bool32 sub_813B374(void)
|
||||
u16 var = VarGet(VAR_0x4037);
|
||||
|
||||
GetMapName(gStringVar1, gUnknown_085B3400[var - 1], 0);
|
||||
|
||||
|
||||
if (var < 9)
|
||||
{
|
||||
return FALSE;
|
||||
@ -3697,7 +3697,7 @@ bool32 sub_813B3B0(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(UNDERWATER3))
|
||||
{
|
||||
switch (gSaveBlock1Ptr->location.mapNum)
|
||||
@ -4159,7 +4159,7 @@ static u16 sub_813BC00(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (((gSaveBlock1Ptr->vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> gUnknown_085B347C[retVal]) & 1))
|
||||
{
|
||||
gSaveBlock1Ptr->vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] ^= 1 << gUnknown_085B347C[retVal];
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "sprite.h"
|
||||
#include "pokemon.h"
|
||||
#include "text.h"
|
||||
#include "text_window.h"
|
||||
#include "malloc.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "main.h"
|
||||
@ -26,6 +27,7 @@
|
||||
#include "event_data.h"
|
||||
#include "overworld.h"
|
||||
#include "menu.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
|
||||
struct HallofFameMon
|
||||
{
|
||||
@ -81,18 +83,10 @@ extern const u8 gText_MainMenuTime[];
|
||||
extern const u8 gContestConfetti_Gfx[];
|
||||
extern const u8 gContestConfetti_Pal[];
|
||||
|
||||
extern void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
||||
extern void sub_8175620(void);
|
||||
extern u8 TrySavingData(u8);
|
||||
extern u8 sub_818D3E4(u16 species, u32 trainerId, u32 personality, u8 flags, s16 x, s16 y, u8, u16);
|
||||
extern void sub_8197434(u8, u8);
|
||||
extern u16 sub_818D97C(u8 playerGender, u8);
|
||||
extern u16 sub_818D8AC(u16, u8, s16, s16, u8, u16);
|
||||
extern const void* stdpal_get(u8);
|
||||
extern void LoadWindowGfx(u8, u8, u16, u8);
|
||||
extern u16 sub_818D820(u16);
|
||||
extern u16 sub_818D8F0(u16);
|
||||
extern u16 sub_818D7D8(u16 species, u32 trainerId, u32 personality, u8 arg3, s16 sp0, s16 sp1, u8 sp2, u16 sp3);
|
||||
extern void sub_8198204(u8 *dst, const u8 *src, u8, u8, u8);
|
||||
extern bool8 sub_80F9C30(void);
|
||||
extern void sub_8198314(void);
|
||||
@ -102,8 +96,6 @@ extern void sub_80F9BF4(u16, u16, u8);
|
||||
extern void sub_81980F0(u8, u8, u8, u8, u16);
|
||||
extern void sub_80F9BCC(u16, u16, u8);
|
||||
extern bool8 sub_80F9C1C(void);
|
||||
extern u16 SpeciesToPokedexNum(u16 species);
|
||||
extern void dp13_810BB8C(void);
|
||||
extern void sub_81971D0(void);
|
||||
extern void sub_8197200(void);
|
||||
extern void sub_8152254(void);
|
||||
@ -611,7 +603,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
|
||||
if (currMon->species == SPECIES_EGG)
|
||||
field6 += 10;
|
||||
|
||||
spriteId = sub_818D3E4(currMon->species, currMon->tid, currMon->personality, 1, xPos, yPos, currMonId, 0xFFFF);
|
||||
spriteId = CreatePicSprite2(currMon->species, currMon->tid, currMon->personality, 1, xPos, yPos, currMonId, 0xFFFF);
|
||||
gSprites[spriteId].tDestinationX = field4;
|
||||
gSprites[spriteId].tDestinationY = field6;
|
||||
gSprites[spriteId].data[0] = 0;
|
||||
@ -723,7 +715,7 @@ static void sub_8173EE4(u8 taskId)
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
ShowBg(3);
|
||||
gTasks[taskId].tPlayerSpriteID = sub_818D8AC(sub_818D97C(gSaveBlock2Ptr->playerGender, 1), 1, 120, 72, 6, 0xFFFF);
|
||||
gTasks[taskId].tPlayerSpriteID = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), 1, 120, 72, 6, 0xFFFF);
|
||||
AddWindow(&sHof_WindowTemplate);
|
||||
LoadWindowGfx(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0);
|
||||
LoadPalette(stdpal_get(1), 0xE0, 0x20);
|
||||
@ -780,11 +772,11 @@ static void Task_Hof_HandleExit(u8 taskId)
|
||||
if (spriteId != 0xFF)
|
||||
{
|
||||
FreeOamMatrix(gSprites[spriteId].oam.matrixNum);
|
||||
sub_818D820(spriteId);
|
||||
FreeAndDestroyMonPicSprite(spriteId);
|
||||
}
|
||||
}
|
||||
|
||||
sub_818D8F0(gTasks[taskId].tPlayerSpriteID);
|
||||
FreeAndDestroyTrainerPicSprite(gTasks[taskId].tPlayerSpriteID);
|
||||
HideBg(0);
|
||||
HideBg(1);
|
||||
HideBg(3);
|
||||
@ -956,7 +948,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
if (currMon->species == SPECIES_EGG)
|
||||
posY += 10;
|
||||
|
||||
spriteId = sub_818D7D8(currMon->species, currMon->tid, currMon->personality, 1, posX, posY, i, 0xFFFF);
|
||||
spriteId = CreateMonPicSprite_HandleDeoxys(currMon->species, currMon->tid, currMon->personality, 1, posX, posY, i, 0xFFFF);
|
||||
gSprites[spriteId].oam.priority = 1;
|
||||
gTasks[taskId].tMonSpriteId(i) = spriteId;
|
||||
}
|
||||
@ -1026,7 +1018,7 @@ static void Task_HofPC_HandleInput(u8 taskId)
|
||||
u8 spriteId = gTasks[taskId].tMonSpriteId(i);
|
||||
if (spriteId != 0xFF)
|
||||
{
|
||||
sub_818D820(spriteId);
|
||||
FreeAndDestroyMonPicSprite(spriteId);
|
||||
gTasks[taskId].tMonSpriteId(i) = 0xFF;
|
||||
}
|
||||
}
|
||||
@ -1087,7 +1079,7 @@ static void Task_HofPC_HandleExit(u8 taskId)
|
||||
u16 spriteId = gTasks[taskId].tMonSpriteId(i);
|
||||
if (spriteId != 0xFF)
|
||||
{
|
||||
sub_818D820(spriteId);
|
||||
FreeAndDestroyMonPicSprite(spriteId);
|
||||
gTasks[taskId].tMonSpriteId(i) = 0xFF;
|
||||
}
|
||||
}
|
||||
@ -1305,7 +1297,7 @@ static void sub_8174F70(void)
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
reset_temp_tile_data_buffers();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
LoadCompressedObjectPic(&sHallOfFame_ConfettiSpriteSheet);
|
||||
|
@ -1,7 +1,5 @@
|
||||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "battle_dome_cards.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "bg.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/rgb.h"
|
||||
@ -1018,7 +1016,7 @@ void task_new_game_prof_birch_speech_1(u8 taskId)
|
||||
ScanlineEffect_Stop();
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
AddBirchSpeechObjects(taskId);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
gTasks[taskId].data[4] = 0;
|
||||
@ -1336,7 +1334,7 @@ void task_new_game_prof_birch_speech_17(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
sub_818D820(gTasks[taskId].data[9]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[9]);
|
||||
set_default_player_name(Random() % 20);
|
||||
DestroyTask(taskId);
|
||||
DoNamingScreen(0, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, new_game_prof_birch_speech_part2_start);
|
||||
@ -1515,8 +1513,8 @@ void task_new_game_prof_birch_speech_part2_12(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
sub_818D820(gTasks[taskId].data[9]);
|
||||
dp13_810BB8C();
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[9]);
|
||||
ResetAllPicSprites();
|
||||
SetMainCallback2(CB2_NewGame);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@ -1558,7 +1556,7 @@ void new_game_prof_birch_speech_part2_start(void)
|
||||
ScanlineEffect_Stop();
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
AddBirchSpeechObjects(taskId);
|
||||
if (gSaveBlock2Ptr->playerGender != MALE)
|
||||
{
|
||||
@ -1613,7 +1611,7 @@ void sub_80318D8(struct Sprite *sprite)
|
||||
|
||||
u8 sub_80318F4(u8 a, u8 b)
|
||||
{
|
||||
return sub_818D3E4(SPECIES_LOTAD, 8, 0, 1, a, b, 14, -1);
|
||||
return CreatePicSprite2(SPECIES_LOTAD, 8, 0, 1, a, b, 14, -1);
|
||||
}
|
||||
|
||||
void AddBirchSpeechObjects(u8 taskId)
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "overworld.h"
|
||||
#include "mail.h"
|
||||
#include "battle_records.h"
|
||||
#include "item.h"
|
||||
#include "pokedex.h"
|
||||
|
||||
extern u8 gDifferentSaveFile;
|
||||
extern u16 gSaveFileStatus;
|
||||
@ -33,13 +35,11 @@ extern u16 GetGeneratedTrainerIdLower(void);
|
||||
extern void ClearContestWinnerPicsInContestHall(void);
|
||||
extern void sub_80BB358(void);
|
||||
extern void ResetBagScrollPositions(void);
|
||||
extern void ResetPokedex(void);
|
||||
extern void ResetGabbyAndTy(void);
|
||||
extern void ResetSecretBases(void);
|
||||
extern void ResetLinkContestBoolean(void);
|
||||
extern void sub_8052DA8(void);
|
||||
extern void ResetPokemonStorageSystem(void);
|
||||
extern void ClearBag(void);
|
||||
extern void NewGameInitPCItems(void);
|
||||
extern void ClearDecorationInventories(void);
|
||||
extern void ResetFanClub(void);
|
||||
|
@ -151,7 +151,7 @@ extern void TransferTilesetAnimsBuffer(void);
|
||||
extern bool32 sub_81D5F48(void);
|
||||
extern u8 GetCurrentTrainerHillMapId(void);
|
||||
extern bool8 warp0_in_pokecenter(void);
|
||||
extern void dp13_810BB8C(void);
|
||||
extern void ResetAllPicSprites(void);
|
||||
extern void FieldEffectActiveListClear(void);
|
||||
extern void SetUpFieldTasks(void);
|
||||
extern void sub_81BE6B8(void);
|
||||
@ -2149,7 +2149,7 @@ static void sub_8086988(u32 a1)
|
||||
ResetSpriteData();
|
||||
ResetPaletteFade();
|
||||
ScanlineEffect_Clear();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
ResetCameraUpdateInfo();
|
||||
InstallCameraPanAheadCallback();
|
||||
if (!a1)
|
||||
|
116
src/pokedex.c
116
src/pokedex.c
@ -11,7 +11,7 @@
|
||||
#include "main.h"
|
||||
#include "sound.h"
|
||||
#include "task.h"
|
||||
#include "battle_dome_cards.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "malloc.h"
|
||||
#include "gpu_regs.h"
|
||||
@ -821,7 +821,7 @@ const u8 sText_TenDashes[] = _("----------");
|
||||
void ResetPokedex(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
|
||||
gUnknown_02039B50 = 0;
|
||||
gUnknown_02039B52 = 64;
|
||||
gUnknown_030060B0 = 0;
|
||||
@ -910,7 +910,7 @@ void sub_80BB534(void)
|
||||
{
|
||||
u8 *addr;
|
||||
u32 size;
|
||||
|
||||
|
||||
switch (gMain.state)
|
||||
{
|
||||
case 0:
|
||||
@ -929,7 +929,7 @@ void sub_80BB534(void)
|
||||
ResetPaletteFade();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 2:
|
||||
@ -984,7 +984,7 @@ void sub_80BB78C(u8 taskId)
|
||||
void sub_80BB7D4(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, gUnknown_02039B4C->menuY);
|
||||
|
||||
|
||||
if (gUnknown_02039B4C->menuY)
|
||||
{
|
||||
gUnknown_02039B4C->menuY -= 8;
|
||||
@ -1467,7 +1467,7 @@ void sub_80BC844(u8 a)
|
||||
void sub_80BC890(void)
|
||||
{
|
||||
void* tilemapBuffer;
|
||||
|
||||
|
||||
FreeAllWindowBuffers();
|
||||
tilemapBuffer = GetBgTilemapBuffer(0);
|
||||
if (tilemapBuffer)
|
||||
@ -1487,7 +1487,7 @@ void sub_80BC8D4(u8 dexMode, u8 sortMode)
|
||||
{
|
||||
u16 vars[3]; //I have no idea why three regular variables are stored in an array, but whatever.
|
||||
s16 i;
|
||||
|
||||
|
||||
gUnknown_02039B4C->pokemonListCount = 0;
|
||||
|
||||
switch (dexMode)
|
||||
@ -1633,7 +1633,7 @@ void sub_80BC8D4(u8 dexMode, u8 sortMode)
|
||||
void sub_80BCE2C(u8 windowId, u8 fontId, const u8* str, u8 left, u8 top)
|
||||
{
|
||||
u8 color[3];
|
||||
|
||||
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
@ -1731,7 +1731,7 @@ void sub_80BD154(u16 a, u8 left, u8 top, u16 unused)
|
||||
{
|
||||
u8 text[6];
|
||||
u16 r6;
|
||||
|
||||
|
||||
memcpy(text, gUnknown_0855D2B8, 6);
|
||||
r6 = gUnknown_02039B4C->unk0[a].dexNum;
|
||||
if (gUnknown_02039B4C->dexMode == DEX_MODE_HOENN)
|
||||
@ -1753,7 +1753,7 @@ void sub_80BD1F4(u16 a, u8 x, u8 y, u16 unused)
|
||||
u8 sub_80BD23C(u16 num, u8 left, u8 top)
|
||||
{
|
||||
const u8* str;
|
||||
|
||||
|
||||
num = NationalPokedexNumToSpecies(num);
|
||||
if (num)
|
||||
str = gSpeciesNames[num];
|
||||
@ -1773,7 +1773,7 @@ void sub_80BD2B4(u16 a, u16 b)
|
||||
u8 i;
|
||||
u16 unk;
|
||||
u8 spriteId;
|
||||
|
||||
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
@ -1803,13 +1803,13 @@ void sub_80BD2B4(u16 a, u16 b)
|
||||
gSprites[spriteId].callback = sub_80BE4E0;
|
||||
gSprites[spriteId].data[5] = 32;
|
||||
}
|
||||
|
||||
|
||||
sub_80BCE84(0, a, b);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, gUnknown_02039B4C->unk62D);
|
||||
|
||||
gUnknown_02039B4C->unk630 = 0;
|
||||
gUnknown_02039B4C->unk632 = 0;
|
||||
|
||||
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
}
|
||||
|
||||
@ -1897,7 +1897,7 @@ u16 sub_80BD69C(u16 a, u16 b)
|
||||
u8 i;
|
||||
u16 r6;
|
||||
u8 r10 = 0;
|
||||
|
||||
|
||||
if ((gMain.heldKeys & DPAD_UP) && (a > 0))
|
||||
{
|
||||
r10 = 1;
|
||||
@ -1917,7 +1917,7 @@ u16 sub_80BD69C(u16 a, u16 b)
|
||||
else if ((gMain.newKeys & DPAD_LEFT) && (a > 0))
|
||||
{
|
||||
r6 = a;
|
||||
|
||||
|
||||
for (i = 0; i < 7; i++)
|
||||
a = sub_80C0E0C(1, a, 0, gUnknown_02039B4C->pokemonListCount - 1);
|
||||
gUnknown_02039B4C->unk62C += 16 * (a - r6);
|
||||
@ -1935,13 +1935,13 @@ u16 sub_80BD69C(u16 a, u16 b)
|
||||
sub_80BD2B4(a, 0xE);
|
||||
PlaySE(SE_Z_PAGE);
|
||||
}
|
||||
|
||||
|
||||
if (r10 == 0)
|
||||
{
|
||||
gUnknown_02039B4C->unk638 = 0;
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
r5 = gUnknown_0855D28C[gUnknown_02039B4C->unk638 / 4];
|
||||
r3 = gUnknown_0855D291[gUnknown_02039B4C->unk638 / 4];
|
||||
gUnknown_02039B4C->unk62E = r3;
|
||||
@ -2030,7 +2030,7 @@ u8 sub_80BDA40(void)
|
||||
{
|
||||
if (gUnknown_02039B4C->unk61E[i] != 0xFFFF)
|
||||
{
|
||||
sub_818D820(gUnknown_02039B4C->unk61E[i]);
|
||||
FreeAndDestroyMonPicSprite(gUnknown_02039B4C->unk61E[i]);
|
||||
gUnknown_02039B4C->unk61E[i] |= 0xFFFF;
|
||||
}
|
||||
}
|
||||
@ -2109,7 +2109,7 @@ void sub_80BDB7C(u8 a)
|
||||
if (a == 0)
|
||||
{
|
||||
u32 _a;
|
||||
|
||||
|
||||
if (!IsNationalPokedexEnabled())
|
||||
{
|
||||
CreateSprite(&gUnknown_0855D1F4, 32, 40, 1);
|
||||
@ -2160,22 +2160,22 @@ void sub_80BDB7C(u8 a)
|
||||
else
|
||||
{
|
||||
u16 r6;
|
||||
|
||||
|
||||
CreateSprite(&gUnknown_0855D1F4, 32, 40, 1);
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D1F4, 32, 76, 1);
|
||||
StartSpriteAnim(&gSprites[spriteId], 1);
|
||||
|
||||
CreateSprite(&gUnknown_0855D20C, 17, 45, 1);
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D20C, 17, 55, 1);
|
||||
StartSpriteAnim(&gSprites[spriteId], 1);
|
||||
|
||||
CreateSprite(&gUnknown_0855D20C, 17, 81, 1);
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D20C, 17, 91, 1);
|
||||
StartSpriteAnim(&gSprites[spriteId], 1);
|
||||
|
||||
|
||||
r6 = GetHoennPokedexCount(0);
|
||||
_a = 0;
|
||||
|
||||
@ -2197,9 +2197,9 @@ void sub_80BDB7C(u8 a)
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 56, 45, 1);
|
||||
r5 = (r6 % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
|
||||
|
||||
_a = 0;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 40, 55, 1);
|
||||
r5 = gUnknown_02039B4C->unk61A / 100;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
@ -2207,21 +2207,21 @@ void sub_80BDB7C(u8 a)
|
||||
_a = 1;
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 48, 55, 1);
|
||||
r5 = (gUnknown_02039B4C->unk61A % 100) / 10;
|
||||
if (r5 != 0 || _a != 0)
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 56, 55, 1);
|
||||
r5 = (gUnknown_02039B4C->unk61A % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
|
||||
|
||||
r6 = GetHoennPokedexCount(1);
|
||||
_a = 0;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 40, 81, 1);
|
||||
r5 = r6 / 100;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
@ -2229,20 +2229,20 @@ void sub_80BDB7C(u8 a)
|
||||
_a = 1;
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 48, 81, 1);
|
||||
r5 = (r6 % 100) / 10;
|
||||
if (r5 != 0 || _a != 0)
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 56, 81, 1);
|
||||
r5 = (r6 % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
|
||||
|
||||
_a = 0;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 40, 91, 1);
|
||||
r5 = gUnknown_02039B4C->unk61C / 100;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
@ -2250,14 +2250,14 @@ void sub_80BDB7C(u8 a)
|
||||
_a = 1;
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 48, 91, 1);
|
||||
r5 = (gUnknown_02039B4C->unk61C % 100) / 10;
|
||||
if (r5 != 0 || _a != 0)
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
else
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_0855D23C, 56, 91, 1);
|
||||
r5 = (gUnknown_02039B4C->unk61C % 100) % 10;
|
||||
StartSpriteAnim(&gSprites[spriteId], r5);
|
||||
@ -2313,7 +2313,7 @@ void sub_80BE4E0(struct Sprite *sprite)
|
||||
|
||||
if (gUnknown_02039B4C->unk64A != 0 && gUnknown_02039B4C->unk64A != 3)
|
||||
{
|
||||
sub_818D820(gUnknown_02039B4C->unk61E[data1]);
|
||||
FreeAndDestroyMonPicSprite(gUnknown_02039B4C->unk61E[data1]);
|
||||
gUnknown_02039B4C->unk61E[data1] = 0xFFFF;
|
||||
}
|
||||
else
|
||||
@ -2339,7 +2339,7 @@ void sub_80BE4E0(struct Sprite *sprite)
|
||||
|
||||
if ((sprite->data[5] <= -64 || sprite->data[5] >= 64) && sprite->data[0] != 0)
|
||||
{
|
||||
sub_818D820(gUnknown_02039B4C->unk61E[data1]);
|
||||
FreeAndDestroyMonPicSprite(gUnknown_02039B4C->unk61E[data1]);
|
||||
gUnknown_02039B4C->unk61E[data1] = 0xFFFF;
|
||||
}
|
||||
}
|
||||
@ -2449,14 +2449,14 @@ void sub_80BE8DC(const u8* str, u8 left, u8 top)
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
|
||||
|
||||
AddTextPrinterParameterized2(0, 1, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
u8 sub_80BE91C(struct PokedexListItem* item, u8 b)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
|
||||
gUnknown_02039B54 = item;
|
||||
taskId = CreateTask(sub_80BEA24, 0);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
@ -2473,7 +2473,7 @@ u8 sub_80BE91C(struct PokedexListItem* item, u8 b)
|
||||
SetBgTilemapBuffer(0, AllocZeroed(0x800));
|
||||
InitWindows(gUnknown_0856E640);
|
||||
DeactivateAllTextPrinters();
|
||||
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
@ -2703,7 +2703,7 @@ void sub_80BEFD0(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_818D820(gTasks[taskId].data[4]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[4]);
|
||||
switch (gUnknown_02039B4C->unk64E)
|
||||
{
|
||||
case 1:
|
||||
@ -2724,7 +2724,7 @@ void sub_80BF038(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_818D820(gTasks[taskId].data[4]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[4]);
|
||||
gTasks[taskId].func = sub_80BEA24;
|
||||
}
|
||||
}
|
||||
@ -2733,7 +2733,7 @@ void sub_80BF070(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_818D820(gTasks[taskId].data[4]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[4]);
|
||||
sub_80BEDB0();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@ -2960,7 +2960,7 @@ void sub_80BF790(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_8145914();
|
||||
sub_818D820(gTasks[taskId].data[4]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[4]);
|
||||
switch (gUnknown_02039B4C->unk64E)
|
||||
{
|
||||
default:
|
||||
@ -3109,8 +3109,8 @@ void sub_80BFC78(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_818D820(gTasks[taskId].data[4]);
|
||||
sub_818D8F0(gTasks[taskId].data[5]);
|
||||
FreeAndDestroyMonPicSprite(gTasks[taskId].data[4]);
|
||||
FreeAndDestroyTrainerPicSprite(gTasks[taskId].data[5]);
|
||||
switch (gUnknown_02039B4C->unk64E)
|
||||
{
|
||||
default:
|
||||
@ -3334,7 +3334,7 @@ void sub_80BFE38(u8 taskId)
|
||||
{
|
||||
u8 spriteId;
|
||||
u16 dexNum = gTasks[taskId].data[1];
|
||||
|
||||
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
@ -3440,7 +3440,7 @@ void blockset_load_palette_to_gpu(u8 taskId)
|
||||
buffer = GetBgTilemapBuffer(3);
|
||||
if (buffer)
|
||||
Free(buffer);
|
||||
|
||||
|
||||
species = NationalPokedexNumToSpecies(gTasks[taskId].data[1]);
|
||||
otId = ((u16)gTasks[taskId].data[13] << 16) | (u16)gTasks[taskId].data[12];
|
||||
personality = ((u16)gTasks[taskId].data[15] << 16) | (u16)gTasks[taskId].data[14];
|
||||
@ -3472,7 +3472,7 @@ void sub_80C020C(u32 num, u32 value, u32 c, u32 d)
|
||||
const u8 *text;
|
||||
const u8 *text2;
|
||||
const u8 *text3;
|
||||
|
||||
|
||||
if (d)
|
||||
sub_80BE8DC(gText_PokedexRegistration, GetStringCenterAlignXOffset(1, gText_PokedexRegistration, 0xF0), 0);
|
||||
if (value == 0)
|
||||
@ -4064,7 +4064,7 @@ void sub_80C0A88(u8 windowId, const u8 *str, u8 left, u8 top)
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
|
||||
|
||||
AddTextPrinterParameterized2(windowId, 1, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
@ -4107,7 +4107,7 @@ void sub_80C0BF0(u8 windowId, const u8* str, u8 left, u8 top)
|
||||
u8 str2[11];
|
||||
u8 i;
|
||||
u8 count;
|
||||
|
||||
|
||||
for (i = 0; i < 11; i++)
|
||||
str2[i] = CHAR_SPACE;
|
||||
for (count = 0; str[count] != CHAR_SPACE && count < 11; count++)
|
||||
@ -4232,12 +4232,12 @@ u32 sub_80C0E68(u16 a)
|
||||
u16 sub_80C0E9C(u16 num, s16 x, s16 y, u16 paletteSlot)
|
||||
{
|
||||
num = NationalPokedexNumToSpecies(num);
|
||||
return sub_818D7D8(num, 8, sub_80C0E68(num), TRUE, x, y, paletteSlot, 0xFFFF);
|
||||
return CreateMonPicSprite_HandleDeoxys(num, 8, sub_80C0E68(num), TRUE, x, y, paletteSlot, 0xFFFF);
|
||||
}
|
||||
|
||||
u16 sub_80C0EF8(u16 species, s16 x, s16 y, s8 paletteSlot)
|
||||
{
|
||||
return sub_818D8AC(species, TRUE, x, y, paletteSlot, 0xFFFF);
|
||||
return CreateTrainerPicSprite(species, TRUE, x, y, paletteSlot, 0xFFFF);
|
||||
}
|
||||
|
||||
int sub_80C0F30(u8 dexMode, u8 sortMode, u8 abcGroup, u8 bodyColor, u8 type1, u8 type2)
|
||||
@ -4364,7 +4364,7 @@ u8 sub_80C1258(void)
|
||||
void sub_80C1270(const u8 *str, u32 left, u32 top)
|
||||
{
|
||||
u8 color[3];
|
||||
|
||||
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 2;
|
||||
@ -4398,7 +4398,7 @@ void sub_80C12E0(u8 taskId)
|
||||
DeactivateAllTextPrinters();
|
||||
PutWindowTilemap(0);
|
||||
DecompressAndLoadBgGfxUsingHeap(3, gPokedexSearchMenu_Gfx, 0x2000, 0, 0);
|
||||
|
||||
|
||||
if (!IsNationalPokedexEnabled())
|
||||
CopyToBgTilemapBuffer(3, gPokedexSearch2_Tilemap, 0, 0);
|
||||
else
|
||||
@ -4450,7 +4450,7 @@ void sub_80C12E0(u8 taskId)
|
||||
void sub_80C152C(void)
|
||||
{
|
||||
void* tilemapBuffer;
|
||||
|
||||
|
||||
FreeAllWindowBuffers();
|
||||
tilemapBuffer = GetBgTilemapBuffer(0);
|
||||
if (tilemapBuffer)
|
||||
@ -4992,12 +4992,12 @@ void sub_80C2064(u8 a, u8 b)
|
||||
void sub_80C20F8(u8 taskId)
|
||||
{
|
||||
u16 var;
|
||||
|
||||
|
||||
sub_80C12B0(0x28, 0x10, 0x60, 0x50);
|
||||
|
||||
var = gTasks[taskId].data[6] + gTasks[taskId].data[7];
|
||||
sub_80C1270(gUnknown_0856EE5C[var].text2, 0x2D, 0x11);
|
||||
|
||||
|
||||
var = gTasks[taskId].data[8] + gTasks[taskId].data[9];
|
||||
sub_80C1270(gUnknown_0856EEB4[var].text2, 0x2D, 0x21);
|
||||
|
||||
|
@ -5874,9 +5874,9 @@ u16 FacilityClassToPicIndex(u16 facilityClass)
|
||||
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender)
|
||||
{
|
||||
if (playerGender != MALE)
|
||||
return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_BRENDAN);
|
||||
else
|
||||
return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_MAY);
|
||||
else
|
||||
return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_BRENDAN);
|
||||
}
|
||||
|
||||
void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)
|
||||
|
@ -1635,7 +1635,7 @@ void sub_80E8260(struct UnkRecordMixingStruct2 *dst)
|
||||
dst->field_0[0][i].field_4 = gSaveBlock2Ptr->frontier.field_CF0[i];
|
||||
dst->field_0[1][i].field_4 = gSaveBlock2Ptr->frontier.field_CF4[i];
|
||||
dst->field_0[2][i].field_4 = gSaveBlock2Ptr->frontier.field_CF8[i];
|
||||
dst->field_0[3][i].field_4 = gSaveBlock2Ptr->frontier.field_D14[i];
|
||||
dst->field_0[3][i].field_4 = gSaveBlock2Ptr->frontier.field_D14[0][i];
|
||||
dst->field_0[4][i].field_4 = gSaveBlock2Ptr->frontier.field_DD0[i];
|
||||
dst->field_0[5][i].field_4 = gSaveBlock2Ptr->frontier.field_DDE[i];
|
||||
dst->field_0[6][i].field_4 = gSaveBlock2Ptr->frontier.field_DEA[i];
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "international_string_util.h"
|
||||
#include "trig.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
|
||||
#define STARTER_MON_COUNT 3
|
||||
|
||||
@ -48,12 +49,6 @@ extern const u8 gStarterChoose_LabelCoords[][2];
|
||||
extern const u8 gUnknown_085B1E0C[];
|
||||
extern const u8 gUnknown_085B1E28[][2];
|
||||
|
||||
extern void clear_scheduled_bg_copies_to_vram(void);
|
||||
extern void dp13_810BB8C(void);
|
||||
extern void do_scheduled_bg_tilemap_copies_to_vram(void);
|
||||
extern u16 sub_818D820(u16);
|
||||
extern u8 sub_818D3E4(u16 species, u32 trainerId, u32 personality, u8 flags, s16 x, s16 y, u8, u16);
|
||||
|
||||
// this file's functions
|
||||
static void MainCallback2_StarterChoose(void);
|
||||
static void sub_8134604(void);
|
||||
@ -132,7 +127,7 @@ void CB2_ChooseStarter(void)
|
||||
ResetSpriteData();
|
||||
ResetPaletteFade();
|
||||
FreeAllSpritePalettes();
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
|
||||
LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20);
|
||||
LoadPalette(gBirchBagGrassPal, 0, 0x40);
|
||||
@ -263,7 +258,7 @@ static void Task_StarterChoose5(u8 taskId)
|
||||
case 0: // YES
|
||||
// Return the starter choice and exit.
|
||||
gSpecialVar_Result = gTasks[taskId].tStarterSelection;
|
||||
dp13_810BB8C();
|
||||
ResetAllPicSprites();
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
break;
|
||||
case 1: // NO
|
||||
@ -271,7 +266,7 @@ static void Task_StarterChoose5(u8 taskId)
|
||||
PlaySE(SE_SELECT);
|
||||
spriteId = gTasks[taskId].tPkmnSpriteId;
|
||||
FreeOamMatrix(gSprites[spriteId].oam.matrixNum);
|
||||
sub_818D820(spriteId);
|
||||
FreeAndDestroyMonPicSprite(spriteId);
|
||||
|
||||
spriteId = gTasks[taskId].tCircleSpriteId;
|
||||
FreeOamMatrix(gSprites[spriteId].oam.matrixNum);
|
||||
@ -349,7 +344,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
spriteId = sub_818D3E4(species, 8, 0, 1, x, y, 0xE, 0xFFFF);
|
||||
spriteId = CreatePicSprite2(species, 8, 0, 1, x, y, 0xE, 0xFFFF);
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
return spriteId;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "sprite.h"
|
||||
#include "window.h"
|
||||
@ -7,7 +5,10 @@
|
||||
#include "constants/species.h"
|
||||
#include "palette.h"
|
||||
#include "decompress.h"
|
||||
#include "battle_dome_cards.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
#include "data2.h"
|
||||
#include "pokemon.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES];
|
||||
extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES];
|
||||
@ -19,11 +20,10 @@ extern const union AffineAnimCmd *const gUnknown_082FF694[];
|
||||
extern const union AnimCmd *const gPlayerMonSpriteAnimsTable[];
|
||||
extern const union AnimCmd *const *const gMonAnimationsSpriteAnimsPtrTable[NUM_SPECIES];
|
||||
extern const union AnimCmd *const *const gUnknown_0830536C[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
|
||||
// Static type declarations
|
||||
|
||||
struct BattleDomeCard
|
||||
struct PicData
|
||||
{
|
||||
u8 *frames;
|
||||
struct SpriteFrameImage *images;
|
||||
@ -33,15 +33,16 @@ struct BattleDomeCard
|
||||
};
|
||||
|
||||
// Static RAM declarations
|
||||
#define PICS_COUNT 8
|
||||
|
||||
static EWRAM_DATA struct SpriteTemplate gUnknown_0203CCEC = {};
|
||||
static EWRAM_DATA struct BattleDomeCard gUnknown_0203CD04[8] = {};
|
||||
static EWRAM_DATA struct SpriteTemplate sCreatingSpriteTemplate = {};
|
||||
static EWRAM_DATA struct PicData sSpritePics[PICS_COUNT] = {};
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
// .rodata
|
||||
|
||||
static const struct BattleDomeCard gUnknown_0860B058 = {};
|
||||
static const struct PicData sDummyPicData = {};
|
||||
static const struct OamData gUnknown_0860B064 =
|
||||
{
|
||||
.size = 3
|
||||
@ -53,80 +54,67 @@ static const struct OamData gUnknown_0860B06C =
|
||||
|
||||
// .text
|
||||
|
||||
static void nullsub_122(struct Sprite *sprite)
|
||||
static void DummyPicSpriteCallback(struct Sprite *sprite)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool16 dp13_810BB8C(void)
|
||||
bool16 ResetAllPicSprites(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i ++)
|
||||
{
|
||||
gUnknown_0203CD04[i] = gUnknown_0860B058;
|
||||
}
|
||||
for (i = 0; i < PICS_COUNT; i ++)
|
||||
sSpritePics[i] = sDummyPicData;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys)
|
||||
static bool16 DecompressPic(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys)
|
||||
{
|
||||
if (!isTrainer)
|
||||
{
|
||||
if (isFrontPic)
|
||||
{
|
||||
if (!ignoreDeoxys)
|
||||
{
|
||||
LoadSpecialPokePic(&gMonFrontPicTable[species], dest, species, personality, isFrontPic);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], dest, species, personality, isFrontPic);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ignoreDeoxys)
|
||||
{
|
||||
LoadSpecialPokePic(&gMonBackPicTable[species], dest, species, personality, isFrontPic);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], dest, species, personality, isFrontPic);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isFrontPic)
|
||||
{
|
||||
DecompressPicFromTable(&gTrainerFrontPicTable[species], dest, species);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressPicFromTable(&gTrainerBackPicTable[species], dest, species);
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer)
|
||||
static bool16 DecompressPic_HandleDeoxys(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer)
|
||||
{
|
||||
return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE);
|
||||
return DecompressPic(species, personality, isFrontPic, dest, isTrainer, FALSE);
|
||||
}
|
||||
|
||||
static void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 paletteTag, bool8 isTrainer)
|
||||
static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 paletteTag, bool8 isTrainer)
|
||||
{
|
||||
if (!isTrainer)
|
||||
{
|
||||
if (paletteTag == 0xFFFF)
|
||||
{
|
||||
gUnknown_0203CCEC.paletteTag |= 0xFFFF;
|
||||
sCreatingSpriteTemplate.paletteTag |= 0xFFFF;
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x100 + paletteSlot * 0x10, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_0203CCEC.paletteTag = paletteTag;
|
||||
sCreatingSpriteTemplate.paletteTag = paletteTag;
|
||||
LoadCompressedObjectPalette(GetMonSpritePalStructFromOtIdPersonality(species, otId, personality));
|
||||
}
|
||||
}
|
||||
@ -134,42 +122,34 @@ static void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot,
|
||||
{
|
||||
if (paletteTag == 0xFFFF)
|
||||
{
|
||||
gUnknown_0203CCEC.paletteTag |= 0xFFFF;
|
||||
sCreatingSpriteTemplate.paletteTag |= 0xFFFF;
|
||||
LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, 0x100 + paletteSlot * 0x10, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_0203CCEC.paletteTag = paletteTag;
|
||||
sCreatingSpriteTemplate.paletteTag = paletteTag;
|
||||
LoadCompressedObjectPalette(&gTrainerFrontPicPaletteTable[species]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer)
|
||||
static void LoadPicPaletteBySlot(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer)
|
||||
{
|
||||
if (!isTrainer)
|
||||
{
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), paletteSlot * 0x10, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, paletteSlot * 0x10, 0x20);
|
||||
}
|
||||
}
|
||||
|
||||
static void uns_builder_assign_animtable1(bool8 isTrainer)
|
||||
static void AssignSpriteAnimsTable(bool8 isTrainer)
|
||||
{
|
||||
if (!isTrainer)
|
||||
{
|
||||
gUnknown_0203CCEC.anims = gPlayerMonSpriteAnimsTable;
|
||||
}
|
||||
sCreatingSpriteTemplate.anims = gPlayerMonSpriteAnimsTable;
|
||||
else
|
||||
{
|
||||
gUnknown_0203CCEC.anims = gUnknown_0830536C[0];
|
||||
}
|
||||
sCreatingSpriteTemplate.anims = gUnknown_0830536C[0];
|
||||
}
|
||||
|
||||
static u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer, bool8 ignoreDeoxys)
|
||||
static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer, bool8 ignoreDeoxys)
|
||||
{
|
||||
u8 i;
|
||||
u8 *framePics;
|
||||
@ -177,14 +157,14 @@ static u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 persona
|
||||
int j;
|
||||
u8 spriteId;
|
||||
|
||||
for (i = 0; i < 8; i ++)
|
||||
for (i = 0; i < PICS_COUNT; i ++)
|
||||
{
|
||||
if (!gUnknown_0203CD04[i].active)
|
||||
if (!sSpritePics[i].active)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 8)
|
||||
if (i == PICS_COUNT)
|
||||
{
|
||||
return 0xFFFF;
|
||||
}
|
||||
@ -199,7 +179,7 @@ static u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 persona
|
||||
Free(framePics);
|
||||
return 0xFFFF;
|
||||
}
|
||||
if (load_pokemon_image_TODO(species, personality, isFrontPic, framePics, isTrainer, ignoreDeoxys))
|
||||
if (DecompressPic(species, personality, isFrontPic, framePics, isTrainer, ignoreDeoxys))
|
||||
{
|
||||
// debug trap?
|
||||
return 0xFFFF;
|
||||
@ -209,32 +189,32 @@ static u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 persona
|
||||
images[j].data = framePics + 0x800 * j;
|
||||
images[j].size = 0x800;
|
||||
}
|
||||
gUnknown_0203CCEC.tileTag = 0xFFFF;
|
||||
gUnknown_0203CCEC.oam = &gUnknown_0860B064;
|
||||
uns_builder_assign_animtable1(isTrainer);
|
||||
gUnknown_0203CCEC.images = images;
|
||||
gUnknown_0203CCEC.affineAnims = gDummySpriteAffineAnimTable;
|
||||
gUnknown_0203CCEC.callback = nullsub_122;
|
||||
sub_818D0C4(species, otId, personality, paletteSlot, paletteTag, isTrainer);
|
||||
spriteId = CreateSprite(&gUnknown_0203CCEC, x, y, 0);
|
||||
sCreatingSpriteTemplate.tileTag = 0xFFFF;
|
||||
sCreatingSpriteTemplate.oam = &gUnknown_0860B064;
|
||||
AssignSpriteAnimsTable(isTrainer);
|
||||
sCreatingSpriteTemplate.images = images;
|
||||
sCreatingSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable;
|
||||
sCreatingSpriteTemplate.callback = DummyPicSpriteCallback;
|
||||
LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, isTrainer);
|
||||
spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0);
|
||||
if (paletteTag == 0xFFFF)
|
||||
{
|
||||
gSprites[spriteId].oam.paletteNum = paletteSlot;
|
||||
}
|
||||
gUnknown_0203CD04[i].frames = framePics;
|
||||
gUnknown_0203CD04[i].images = images;
|
||||
gUnknown_0203CD04[i].paletteTag = paletteTag;
|
||||
gUnknown_0203CD04[i].spriteId = spriteId;
|
||||
gUnknown_0203CD04[i].active = TRUE;
|
||||
sSpritePics[i].frames = framePics;
|
||||
sSpritePics[i].images = images;
|
||||
sSpritePics[i].paletteTag = paletteTag;
|
||||
sSpritePics[i].spriteId = spriteId;
|
||||
sSpritePics[i].active = TRUE;
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
static u16 sub_818D384(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer)
|
||||
static u16 CreatePicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer)
|
||||
{
|
||||
return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, isTrainer, FALSE);
|
||||
return CreatePicSprite(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, isTrainer, FALSE);
|
||||
}
|
||||
|
||||
u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
{
|
||||
u8 *framePics;
|
||||
struct SpriteFrameImage *images;
|
||||
@ -243,14 +223,14 @@ u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y,
|
||||
u8 spriteId;
|
||||
u8 flags2;
|
||||
|
||||
for (i = 0; i < 8; i ++)
|
||||
for (i = 0; i < PICS_COUNT; i ++)
|
||||
{
|
||||
if (!gUnknown_0203CD04[i].active)
|
||||
if (!sSpritePics[i].active)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 8)
|
||||
if (i == PICS_COUNT)
|
||||
{
|
||||
return 0xFFFF;
|
||||
}
|
||||
@ -274,7 +254,7 @@ u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y,
|
||||
Free(framePics);
|
||||
return 0xFFFF;
|
||||
}
|
||||
if (load_pokemon_image_TODO(species, personality, flags, framePics, FALSE, FALSE))
|
||||
if (DecompressPic(species, personality, flags, framePics, FALSE, FALSE))
|
||||
{
|
||||
// debug trap?
|
||||
return 0xFFFF;
|
||||
@ -284,76 +264,76 @@ u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y,
|
||||
images[j].data = framePics + 0x800 * j;
|
||||
images[j].size = 0x800;
|
||||
}
|
||||
gUnknown_0203CCEC.tileTag = 0xFFFF;
|
||||
gUnknown_0203CCEC.anims = gMonAnimationsSpriteAnimsPtrTable[species];
|
||||
gUnknown_0203CCEC.images = images;
|
||||
sCreatingSpriteTemplate.tileTag = 0xFFFF;
|
||||
sCreatingSpriteTemplate.anims = gMonAnimationsSpriteAnimsPtrTable[species];
|
||||
sCreatingSpriteTemplate.images = images;
|
||||
if (flags2 == 0x01)
|
||||
{
|
||||
gUnknown_0203CCEC.affineAnims = gUnknown_082FF694;
|
||||
gUnknown_0203CCEC.oam = &gUnknown_0860B06C;
|
||||
sCreatingSpriteTemplate.affineAnims = gUnknown_082FF694;
|
||||
sCreatingSpriteTemplate.oam = &gUnknown_0860B06C;
|
||||
}
|
||||
else if (flags2 == 0x00)
|
||||
{
|
||||
gUnknown_0203CCEC.affineAnims = gUnknown_082FF618;
|
||||
gUnknown_0203CCEC.oam = &gUnknown_0860B06C;
|
||||
sCreatingSpriteTemplate.affineAnims = gUnknown_082FF618;
|
||||
sCreatingSpriteTemplate.oam = &gUnknown_0860B06C;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_0203CCEC.oam = &gUnknown_0860B064;
|
||||
gUnknown_0203CCEC.affineAnims = gDummySpriteAffineAnimTable;
|
||||
sCreatingSpriteTemplate.oam = &gUnknown_0860B064;
|
||||
sCreatingSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable;
|
||||
}
|
||||
gUnknown_0203CCEC.callback = nullsub_122;
|
||||
sub_818D0C4(species, otId, personality, paletteSlot, paletteTag, FALSE);
|
||||
spriteId = CreateSprite(&gUnknown_0203CCEC, x, y, 0);
|
||||
sCreatingSpriteTemplate.callback = DummyPicSpriteCallback;
|
||||
LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, FALSE);
|
||||
spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0);
|
||||
if (paletteTag == 0xFFFF)
|
||||
{
|
||||
gSprites[spriteId].oam.paletteNum = paletteSlot;
|
||||
}
|
||||
gUnknown_0203CD04[i].frames = framePics;
|
||||
gUnknown_0203CD04[i].images = images;
|
||||
gUnknown_0203CD04[i].paletteTag = paletteTag;
|
||||
gUnknown_0203CD04[i].spriteId = spriteId;
|
||||
gUnknown_0203CD04[i].active = TRUE;
|
||||
sSpritePics[i].frames = framePics;
|
||||
sSpritePics[i].images = images;
|
||||
sSpritePics[i].paletteTag = paletteTag;
|
||||
sSpritePics[i].spriteId = spriteId;
|
||||
sSpritePics[i].active = TRUE;
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
static u16 sub_818D5B0(u16 spriteId)
|
||||
static u16 FreeAndDestroyPicSpriteInternal(u16 spriteId)
|
||||
{
|
||||
u8 i;
|
||||
u8 *framePics;
|
||||
struct SpriteFrameImage *images;
|
||||
|
||||
for (i = 0; i < 8; i ++)
|
||||
for (i = 0; i < PICS_COUNT; i ++)
|
||||
{
|
||||
if (gUnknown_0203CD04[i].spriteId == spriteId)
|
||||
if (sSpritePics[i].spriteId == spriteId)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 8)
|
||||
if (i == PICS_COUNT)
|
||||
{
|
||||
return 0xFFFF;
|
||||
}
|
||||
framePics = gUnknown_0203CD04[i].frames;
|
||||
images = gUnknown_0203CD04[i].images;
|
||||
if (gUnknown_0203CD04[i].paletteTag != 0xFFFF)
|
||||
framePics = sSpritePics[i].frames;
|
||||
images = sSpritePics[i].images;
|
||||
if (sSpritePics[i].paletteTag != 0xFFFF)
|
||||
{
|
||||
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[spriteId].oam.paletteNum));
|
||||
}
|
||||
DestroySprite(&gSprites[spriteId]);
|
||||
Free(framePics);
|
||||
Free(images);
|
||||
gUnknown_0203CD04[i] = gUnknown_0860B058;
|
||||
sSpritePics[i] = sDummyPicData;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||
{
|
||||
if (sub_818D09C(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE))
|
||||
if (DecompressPic_HandleDeoxys(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE))
|
||||
{
|
||||
return 0xFFFF;
|
||||
}
|
||||
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
||||
LoadPicPaletteBySlot(species, otId, personality, paletteSlot, isTrainer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -362,29 +342,29 @@ static u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic,
|
||||
u8 *framePics;
|
||||
|
||||
framePics = Alloc(4 * 0x800);
|
||||
if (framePics && !sub_818D09C(species, personality, isFrontPic, framePics, isTrainer))
|
||||
if (framePics && !DecompressPic_HandleDeoxys(species, personality, isFrontPic, framePics, isTrainer))
|
||||
{
|
||||
BlitBitmapRectToWindow(windowId, framePics, 0, 0, 0x40, 0x40, destX, destY, 0x40, 0x40);
|
||||
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
||||
LoadPicPaletteBySlot(species, otId, personality, paletteSlot, isTrainer);
|
||||
Free(framePics);
|
||||
return 0;
|
||||
}
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
static u16 sub_818D778(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 ignoreDeoxys)
|
||||
static u16 CreateMonPicSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 ignoreDeoxys)
|
||||
{
|
||||
return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE, ignoreDeoxys);
|
||||
return CreatePicSprite(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE, ignoreDeoxys);
|
||||
}
|
||||
|
||||
u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
{
|
||||
return sub_818D778(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE);
|
||||
return CreateMonPicSprite(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE);
|
||||
}
|
||||
|
||||
u16 sub_818D820(u16 spriteId)
|
||||
u16 FreeAndDestroyMonPicSprite(u16 spriteId)
|
||||
{
|
||||
return sub_818D5B0(spriteId);
|
||||
return FreeAndDestroyPicSpriteInternal(spriteId);
|
||||
}
|
||||
|
||||
u16 sub_818D834(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId)
|
||||
@ -397,14 +377,14 @@ u16 sub_818D864(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 de
|
||||
return sub_818D6CC(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE);
|
||||
}
|
||||
|
||||
u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
{
|
||||
return sub_818D384(species, 0, 0, isFrontPic, x, y, paletteSlot, paletteTag, TRUE);
|
||||
return CreatePicSprite_HandleDeoxys(species, 0, 0, isFrontPic, x, y, paletteSlot, paletteTag, TRUE);
|
||||
}
|
||||
|
||||
u16 sub_818D8F0(u16 spriteId)
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16 spriteId)
|
||||
{
|
||||
return sub_818D5B0(spriteId);
|
||||
return FreeAndDestroyPicSpriteInternal(spriteId);
|
||||
}
|
||||
|
||||
u16 sub_818D904(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId)
|
||||
@ -417,17 +397,17 @@ u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteS
|
||||
return sub_818D6CC(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u8 sub_818D97C(u8 a0, u8 a1)
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass)
|
||||
{
|
||||
if (a1 == 1)
|
||||
if (getClass == TRUE)
|
||||
{
|
||||
switch (a0)
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
return gFacilityClassToPicIndex[0x3F];
|
||||
case 0:
|
||||
return gFacilityClassToPicIndex[0x3C];
|
||||
default:
|
||||
return gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_MAY];
|
||||
case MALE:
|
||||
return gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_BRENDAN];
|
||||
}
|
||||
}
|
||||
return a0;
|
||||
return gender;
|
||||
}
|
@ -633,7 +633,7 @@ gFacilityTrainerMons: @ 203BC8C
|
||||
.include "src/pokeblock_feed.o"
|
||||
.include "src/intro_credits_graphics.o"
|
||||
.include "src/recorded_battle.o"
|
||||
.include "src/battle_dome_cards.o"
|
||||
.include "src/trainer_pokemon_sprites.o"
|
||||
.include "src/lilycove_lady.o"
|
||||
|
||||
gUnknown_0203CD70: @ 203CD70
|
||||
|
Loading…
Reference in New Issue
Block a user