mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
commit
ebbe826133
@ -1657,7 +1657,7 @@ _080DC506:
|
||||
lsls r0, r5, 3
|
||||
ldr r1, =gUnknown_08587AE8
|
||||
adds r0, r1
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gSpriteTemplate_8587B18
|
||||
adds r0, r6, r0
|
||||
ldr r2, =gUnknown_08587A70
|
||||
@ -1713,7 +1713,7 @@ _080DC506:
|
||||
sub_80DC594: @ 80DC594
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_08587BB0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08587BB8
|
||||
bl LoadSpritePalette
|
||||
ldr r0, =gSpriteTemplate_8587BC8
|
||||
@ -2286,7 +2286,7 @@ sub_80DC9EC: @ 80DC9EC
|
||||
lsls r4, r1, 3
|
||||
ldr r0, =gUnknown_08589904
|
||||
adds r0, r4, r0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08589924
|
||||
adds r4, r0
|
||||
adds r0, r4, 0
|
||||
|
@ -1417,7 +1417,7 @@ _080F64F2:
|
||||
adds r2, r4, 0
|
||||
bl GetMonSpritePalStructFromOtIdPersonality
|
||||
adds r4, r0, 0
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x1
|
||||
bl SetMultiuseSpriteTemplateToPokemon
|
||||
@ -1451,9 +1451,9 @@ _080F64F2:
|
||||
ldr r1, [r1]
|
||||
strb r0, [r1, 0x8]
|
||||
ldr r0, =gUnknown_0858D878
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_0858D880
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
ldr r0, =sub_80F7670
|
||||
movs r1, 0xA
|
||||
bl CreateTask
|
||||
@ -2093,7 +2093,7 @@ _080F6AA6:
|
||||
adds r0, r1
|
||||
ldrh r0, [r0]
|
||||
movs r1, 0
|
||||
bl mon_icon_convert_unown_species_id
|
||||
bl GetIconSpecies
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
adds r0, r6
|
||||
|
@ -6455,7 +6455,7 @@ sub_811DE90: @ 811DE90
|
||||
ldr r4, =gUnknown_08597CE8
|
||||
_0811DEA2:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -409,14 +409,14 @@ _081C73C2:
|
||||
_081C73C6:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80D2270
|
||||
bl CheckBoxMonSanityAt
|
||||
cmp r0, 0
|
||||
beq _081C73EC
|
||||
lsls r1, r5, 24
|
||||
lsrs r1, 24
|
||||
lsrs r0, r6, 24
|
||||
movs r2, 0x52
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
cmp r0, 0
|
||||
beq _081C73EC
|
||||
_081C73E2:
|
||||
@ -1524,7 +1524,7 @@ sub_81C7C28: @ 81C7C28
|
||||
ldr r4, =gUnknown_0861FA4C
|
||||
_081C7C36:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0
|
||||
@ -1648,7 +1648,7 @@ sub_81C7D28: @ 81C7D28
|
||||
bl sub_81C763C
|
||||
adds r6, r0, 0
|
||||
ldr r0, =gUnknown_0861FA64
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
movs r0, 0x1
|
||||
bl AllocSpritePalette
|
||||
movs r0, 0x2
|
||||
@ -3924,7 +3924,7 @@ sub_81C8ED0: @ 81C8ED0
|
||||
ldr r4, =gUnknown_0861FBFC
|
||||
_081C8ED6:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0
|
||||
@ -6086,7 +6086,7 @@ sub_81C9FC4: @ 81C9FC4
|
||||
ldr r4, =gUnknown_086201C4
|
||||
_081C9FCA:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x1
|
||||
@ -10537,7 +10537,7 @@ sub_81CC214: @ 81CC214
|
||||
ldr r4, =gUnknown_08622810
|
||||
_081CC224:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0
|
||||
@ -11509,7 +11509,7 @@ sub_81CC9C0: @ 81CC9C0
|
||||
ldr r4, =gUnknown_086230F8
|
||||
_081CC9C6:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0
|
||||
@ -12444,7 +12444,7 @@ _081CD174:
|
||||
adds r1, r3, 0
|
||||
movs r2, 0x8
|
||||
mov r3, sp
|
||||
bl SetBoxMonDataFromAnyBox
|
||||
bl SetBoxMonDataAt
|
||||
_081CD180:
|
||||
ldr r0, =0x00006304
|
||||
adds r1, r6, r0
|
||||
@ -16376,7 +16376,7 @@ _081CF1F4:
|
||||
_081CF1FC:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_80D2270
|
||||
bl CheckBoxMonSanityAt
|
||||
cmp r0, 0
|
||||
beq _081CF23A
|
||||
ldr r1, =0xffffff00
|
||||
@ -16392,7 +16392,7 @@ _081CF1FC:
|
||||
str r0, [sp]
|
||||
ldr r2, [r6, 0x14]
|
||||
adds r0, r7, 0
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
lsls r0, 16
|
||||
ldr r2, =0x0000ffff
|
||||
ldr r1, [sp]
|
||||
@ -17735,7 +17735,7 @@ sub_81CFC40: @ 81CFC40
|
||||
_081CFC60:
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_80D2270
|
||||
bl CheckBoxMonSanityAt
|
||||
cmp r0, 0
|
||||
beq _081CFCA6
|
||||
lsls r0, r7, 24
|
||||
@ -17745,7 +17745,7 @@ _081CFC60:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x52
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
adds r3, r0, 0
|
||||
cmp r3, 0
|
||||
beq _081CFCA6
|
||||
@ -17900,14 +17900,14 @@ _081CFD92:
|
||||
_081CFD96:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_80D2270
|
||||
bl CheckBoxMonSanityAt
|
||||
cmp r0, 0
|
||||
beq _081CFDBC
|
||||
lsls r1, r4, 24
|
||||
lsrs r1, 24
|
||||
lsrs r0, r6, 24
|
||||
movs r2, 0x53
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
cmp r0, 0
|
||||
beq _081CFDBC
|
||||
_081CFDB2:
|
||||
@ -19257,7 +19257,7 @@ sub_81D07D8: @ 81D07D8
|
||||
beq _081D07FA
|
||||
ldrb r1, [r1, 0x1]
|
||||
movs r2, 0x52
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
b _081D080A
|
||||
_081D07FA:
|
||||
ldrb r1, [r1, 0x1]
|
||||
@ -19302,7 +19302,7 @@ _081D0848:
|
||||
ldrb r0, [r1]
|
||||
ldrb r1, [r1, 0x1]
|
||||
movs r2, 0x53
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
_081D0852:
|
||||
mov r12, r0
|
||||
movs r0, 0
|
||||
@ -20756,7 +20756,7 @@ sub_81D13FC: @ 81D13FC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r0, =gUnknown_08624C78
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08624C80
|
||||
bl sub_81C795C
|
||||
ldr r0, =gUnknown_08624D04
|
||||
@ -23046,14 +23046,14 @@ _081D2CB0:
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
bl GetAndCopyBoxMonDataFromAnyBox
|
||||
bl GetAndCopyBoxMonDataAt
|
||||
b _081D2CCA
|
||||
_081D2CBE:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
bl GetBoxMonDataFromAnyBox
|
||||
bl GetBoxMonDataAt
|
||||
_081D2CCA:
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
@ -11006,7 +11006,7 @@ _0801C52C:
|
||||
cmp r0, 0x1
|
||||
bne _0801C5EE
|
||||
ldr r0, =gUnknown_082F1D00
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
bl LoadCompressedSpriteSheetUsingHeap
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xB8
|
||||
lsls r2, 1
|
||||
@ -14596,7 +14596,7 @@ _0801E1B4:
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
movs r0, 0x1
|
||||
bl MoveMenuCursor
|
||||
bl Menu_MoveCursor
|
||||
b _0801E23A
|
||||
.pool
|
||||
_0801E1D4:
|
||||
@ -19425,7 +19425,7 @@ sub_8020890: @ 8020890
|
||||
ldr r4, =gUnknown_082F3134
|
||||
_08020896:
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x4
|
||||
@ -23100,7 +23100,7 @@ sub_8022730: @ 8022730
|
||||
_08022746:
|
||||
lsls r0, r5, 3
|
||||
adds r0, r4
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
@ -43324,7 +43324,7 @@ sub_802C974: @ 802C974
|
||||
ldr r5, =gUnknown_082FBE08
|
||||
_0802C97C:
|
||||
adds r0, r5, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r5, 0x8
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x4
|
||||
@ -43447,7 +43447,7 @@ _0802CA32:
|
||||
ands r1, r5
|
||||
orrs r1, r4
|
||||
str r1, [r0, 0x4]
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
mov r0, r8
|
||||
bl Free
|
||||
mov r0, r10
|
||||
@ -47113,7 +47113,7 @@ sub_802E75C: @ 802E75C
|
||||
lsls r0, 3
|
||||
ldr r1, =gUnknown_082FE6C8
|
||||
adds r0, r1
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
movs r2, 0x8
|
||||
ldrsh r0, [r4, r2]
|
||||
lsls r0, 3
|
||||
@ -48126,7 +48126,7 @@ sub_802EF50: @ 802EF50
|
||||
orrs r0, r1
|
||||
str r0, [r4, 0x4]
|
||||
mov r0, sp
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r0, r4, 0
|
||||
bl LoadSpritePalette
|
||||
add sp, 0x10
|
||||
|
@ -4865,11 +4865,11 @@ sub_8142C0C: @ 8142C0C
|
||||
ldr r0, =gUnknown_085B7384
|
||||
bl LoadSpritePalettes
|
||||
ldr r0, =gUnknown_085B7864
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_085B7978
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_085B7A40
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
b _08142C5A
|
||||
.pool
|
||||
_08142C44:
|
||||
|
@ -7156,7 +7156,7 @@ _0807AD94:
|
||||
_0807ADB2:
|
||||
mov r0, r8
|
||||
bl GetMonSpritePalStruct
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
ldr r0, =gUnknown_020322A0
|
||||
ldr r1, [r0]
|
||||
adds r0, r1, 0
|
||||
|
@ -6952,10 +6952,10 @@ sub_80C62DC: @ 80C62DC
|
||||
bl LoadSpritePalettes
|
||||
ldr r4, =gUnknown_085714BC
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r4, 0x10
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_085715B4
|
||||
ldr r1, =gUnknown_02039CEC
|
||||
ldr r2, [r1]
|
||||
@ -7706,7 +7706,7 @@ sub_80C6974: @ 80C6974
|
||||
bl LoadSpritePalettes
|
||||
ldr r6, =gUnknown_085714BC
|
||||
adds r0, r6, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_085715B4
|
||||
mov r8, r0
|
||||
ldr r4, =gUnknown_02039CF4
|
||||
@ -7747,7 +7747,7 @@ sub_80C6974: @ 80C6974
|
||||
bl StartSpriteAnim
|
||||
adds r6, 0x8
|
||||
adds r0, r6, 0
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
movs r3, 0x18
|
||||
add r8, r3
|
||||
ldr r6, =gUnknown_08571650
|
||||
@ -7875,7 +7875,7 @@ _080C6AEE:
|
||||
lsrs r4, r0, 16
|
||||
_080C6AF2:
|
||||
ldr r0, =gUnknown_085714D4
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
mov r1, sp
|
||||
ldr r0, =gUnknown_085715FC
|
||||
ldm r0!, {r2,r3,r6}
|
||||
|
@ -3273,7 +3273,7 @@ sub_8168248: @ 8168248
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
mov r0, sp
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
add r0, sp, 0x8
|
||||
bl LoadSpritePalette
|
||||
add sp, 0x10
|
||||
|
@ -1674,7 +1674,7 @@ EventScript_271E0E:: @ 8271E0E
|
||||
checkflag FLAG_SYS_PC_LANETTE
|
||||
call_if 1, EventScript_271E3E
|
||||
msgbox gUnknown_082726A3, MSGBOX_DEFAULT
|
||||
special ShowPokemonStorageSystem
|
||||
special ShowPokemonStorageSystemPC
|
||||
waitstate
|
||||
goto EventScript_271DAC
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -71,7 +71,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special ShouldTryRematchBattle
|
||||
def_special IsTrainerReadyForRematch
|
||||
def_special BattleSetup_StartRematchBattle
|
||||
def_special ShowPokemonStorageSystem
|
||||
def_special ShowPokemonStorageSystemPC
|
||||
def_special HasEnoughMonsForDoubleBattle
|
||||
def_special TurnOffTVScreen
|
||||
def_special DoTVShow
|
||||
|
10
include/bg.h
10
include/bg.h
@ -56,11 +56,11 @@ void ShowBg(u8 bg);
|
||||
void HideBg(u8 bg);
|
||||
void SetBgAttribute(u8 bg, u8 attributeId, u8 value);
|
||||
u16 GetBgAttribute(u8 bg, u8 attributeId);
|
||||
u32 ChangeBgX(u8 bg, u32 value, u8 op);
|
||||
u32 GetBgX(u8 bg);
|
||||
u32 ChangeBgY(u8 bg, u32 value, u8 op);
|
||||
u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
|
||||
u32 GetBgY(u8 bg);
|
||||
s32 ChangeBgX(u8 bg, s32 value, u8 op);
|
||||
s32 GetBgX(u8 bg);
|
||||
s32 ChangeBgY(u8 bg, s32 value, u8 op);
|
||||
s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
|
||||
s32 GetBgY(u8 bg);
|
||||
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
|
||||
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2);
|
||||
void SetBgTilemapBuffer(u8 bg, void *tilemap);
|
||||
|
@ -3,15 +3,15 @@
|
||||
|
||||
struct Bitmap
|
||||
{
|
||||
u8* pixels;
|
||||
u8 *pixels;
|
||||
u32 width:16;
|
||||
u32 height:16;
|
||||
};
|
||||
|
||||
void BlitBitmapRect4BitWithoutColorKey(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height);
|
||||
void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey);
|
||||
void BlitBitmapRect4BitWithoutColorKey(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height);
|
||||
void BlitBitmapRect4Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey);
|
||||
void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
|
||||
void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset);
|
||||
void BlitBitmapRect4BitTo8Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset);
|
||||
void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
|
||||
|
||||
#endif // GUARD_BLIT_H
|
||||
|
@ -587,6 +587,7 @@
|
||||
// Map Group 33
|
||||
#define MAP_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE (0 | (33 << 8))
|
||||
|
||||
#define MAP_GROUPS_COUNT 34
|
||||
|
||||
#define MAP_NONE (0x7F | (0x7F << 8))
|
||||
#define MAP_UNDEFINED (0xFF | (0xFF << 8))
|
||||
|
@ -8,13 +8,13 @@ extern u8 gDecompressionBuffer[0x4000];
|
||||
void LZDecompressWram(const u32 *src, void *dest);
|
||||
void LZDecompressVram(const u32 *src, void *dest);
|
||||
|
||||
u16 LoadCompressedObjectPic(const struct CompressedSpriteSheet *src);
|
||||
void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
||||
bool8 LoadCompressedObjectPicUsingHeap(const struct CompressedSpriteSheet* src);
|
||||
u16 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
||||
void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src);
|
||||
|
||||
void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src);
|
||||
void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer);
|
||||
bool8 LoadCompressedObjectPaletteUsingHeap(const struct CompressedSpritePalette *src);
|
||||
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
|
||||
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer);
|
||||
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src);
|
||||
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
|
@ -1,6 +1,51 @@
|
||||
#ifndef GUARD_DMA3_H
|
||||
#define GUARD_DMA3_H
|
||||
|
||||
// Maximum amount of data we will transfer in one operation
|
||||
#define MAX_DMA_BLOCK_SIZE 0x1000
|
||||
|
||||
#define Dma3CopyLarge_(src, dest, size, bit) \
|
||||
{ \
|
||||
const void *_src = src; \
|
||||
void *_dest = dest; \
|
||||
u32 _size = size; \
|
||||
while (1) \
|
||||
{ \
|
||||
if (_size <= MAX_DMA_BLOCK_SIZE) \
|
||||
{ \
|
||||
DmaCopy##bit(3, _src, _dest, _size); \
|
||||
break; \
|
||||
} \
|
||||
DmaCopy##bit(3, _src, _dest, MAX_DMA_BLOCK_SIZE); \
|
||||
_src += MAX_DMA_BLOCK_SIZE; \
|
||||
_dest += MAX_DMA_BLOCK_SIZE; \
|
||||
_size -= MAX_DMA_BLOCK_SIZE; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define Dma3CopyLarge16_(src, dest, size) Dma3CopyLarge_(src, dest, size, 16)
|
||||
#define Dma3CopyLarge32_(src, dest, size) Dma3CopyLarge_(src, dest, size, 32)
|
||||
|
||||
#define Dma3FillLarge_(value, dest, size, bit) \
|
||||
{ \
|
||||
void *_dest = dest; \
|
||||
u32 _size = size; \
|
||||
while (1) \
|
||||
{ \
|
||||
if (_size <= MAX_DMA_BLOCK_SIZE) \
|
||||
{ \
|
||||
DmaFill##bit(3, value, _dest, _size); \
|
||||
break; \
|
||||
} \
|
||||
DmaFill##bit(3, value, _dest, MAX_DMA_BLOCK_SIZE); \
|
||||
_dest += MAX_DMA_BLOCK_SIZE; \
|
||||
_size -= MAX_DMA_BLOCK_SIZE; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16)
|
||||
#define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32)
|
||||
|
||||
void ClearDma3Requests(void);
|
||||
void ProcessDma3Requests(void);
|
||||
s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
|
||||
|
@ -872,15 +872,15 @@ typedef union // 3b58
|
||||
|
||||
struct WaldaPhrase
|
||||
{
|
||||
u16 field_0;
|
||||
u16 field_2;
|
||||
u16 colors[2]; // Background, foreground.
|
||||
u8 text[16];
|
||||
u8 iconId;
|
||||
u8 patternId;
|
||||
bool8 patternUnlocked;
|
||||
};
|
||||
|
||||
struct UnkSaveSubstruct_3b98 {
|
||||
struct UnkSaveSubstruct_3b98
|
||||
{
|
||||
u32 trainerId;
|
||||
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
||||
};
|
||||
|
@ -4771,6 +4771,20 @@ extern const u32 gUnknown_08D8D58C[];
|
||||
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
||||
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
||||
|
||||
// Pokemon Storage System
|
||||
extern const u32 gPSSMenu_Gfx[];
|
||||
extern const u16 gPSSMenu_Pal[];
|
||||
extern const u32 gWallpaperIcon_Plusle[];
|
||||
extern const u32 gWallpaperIcon_Cross[];
|
||||
extern const u32 gWallpaperIcon_Bolt[];
|
||||
extern const u32 gUnknown_08DD36C8[];
|
||||
extern const u32 gWallpaperTiles_Ribbon[];
|
||||
extern const u32 gWallpaperTilemap_Ribbon[];
|
||||
extern const u16 gWallpaperPalettes_Ribbon[][16];
|
||||
extern const u32 gWallpaperTiles_Horizontal[];
|
||||
extern const u32 gWallpaperTilemap_Horizontal[];
|
||||
extern const u16 gWallpaperPalettes_Horizontal[][16];
|
||||
|
||||
// Cable Car
|
||||
extern const u32 gUnknown_08DBA5B8[];
|
||||
extern const u16 gUnknown_08DBA518[];
|
||||
|
@ -44,16 +44,16 @@ void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palet
|
||||
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
|
||||
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
||||
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
||||
u8 GetMenuCursorPos(void);
|
||||
u8 Menu_GetCursorPos(void);
|
||||
s8 Menu_ProcessInput(void);
|
||||
s8 Menu_ProcessInputNoWrap(void);
|
||||
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
||||
void reset_temp_tile_data_buffers(void);
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, u16 offset, u8 mode);
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
||||
bool8 free_temp_tile_data_buffers_if_possible(void);
|
||||
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
|
||||
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
||||
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, int size, u16 offset, u8 mode);
|
||||
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
||||
s8 Menu_ProcessInputNoWrapClearOnChoose(void);
|
||||
s8 ProcessMenuInput_other(void);
|
||||
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
||||
@ -63,7 +63,7 @@ void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
|
||||
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
||||
void sub_8197DF8(u8 windowId, bool8 copyToVram);
|
||||
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
||||
void *malloc_and_decompress(const void *src, int *sizeOut);
|
||||
void *malloc_and_decompress(const void *src, u32 *sizeOut);
|
||||
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
|
||||
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
||||
void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8);
|
||||
@ -72,7 +72,8 @@ u8 sub_8199944(u8 windowId, u8 optionWidth, u8 horizontalCount, u8 verticalCount
|
||||
u8 sub_8199134(s8, s8);
|
||||
u8 GetStartMenuWindowId(void);
|
||||
void sub_819A2BC(u8, u8);
|
||||
u8 MoveMenuCursor(s8 cursorDelta);
|
||||
u8 Menu_MoveCursor(s8 cursorDelta);
|
||||
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
||||
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
|
||||
u8 sub_81979C4(u8 a1);
|
||||
u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos);
|
||||
|
@ -21,6 +21,15 @@ struct PokemonMarkMenu
|
||||
/*0x10B4*/ u8 tileLoadState;
|
||||
}; // 10b8
|
||||
|
||||
void sub_811F90C(struct PokemonMarkMenu *ptr);
|
||||
void sub_811F918(void);
|
||||
bool8 sub_811F960(void);
|
||||
void sub_811FA90(void);
|
||||
void sub_811FAA4(u8 markings, s16 x, s16 y);
|
||||
void sub_811FAF8(void);
|
||||
bool8 sub_811FBA4(void);
|
||||
struct Sprite *sub_811FF94(u16 tileTag, u16 paletteTag, const u16 *palette);
|
||||
struct Sprite *sub_811FFB4(u16 tileTag, u16 paletteTag, const u16 *palette);
|
||||
void sub_8120084(u8 markings, void *dest);
|
||||
|
||||
#endif //POKEEMERALD_MON_MARKINGS_H
|
||||
|
@ -8,9 +8,9 @@
|
||||
#define MON_DATA_OT_ID 1
|
||||
#define MON_DATA_NICKNAME 2
|
||||
#define MON_DATA_LANGUAGE 3
|
||||
#define MON_DATA_SANITY_BIT1 4
|
||||
#define MON_DATA_SANITY_BIT2 5
|
||||
#define MON_DATA_SANITY_BIT3 6
|
||||
#define MON_DATA_SANITY_IS_BAD_EGG 4
|
||||
#define MON_DATA_SANITY_HAS_SPECIES 5
|
||||
#define MON_DATA_SANITY_IS_EGG 6
|
||||
#define MON_DATA_OT_NAME 7
|
||||
#define MON_DATA_MARKINGS 8
|
||||
#define MON_DATA_CHECKSUM 9
|
||||
@ -251,14 +251,6 @@ struct Pokemon
|
||||
u16 spDefense;
|
||||
};
|
||||
|
||||
struct PokemonStorage
|
||||
{
|
||||
/*0x0000*/ u8 currentBox;
|
||||
/*0x0001*/ struct BoxPokemon boxes[14][30];
|
||||
/*0x8344*/ u8 boxNames[14][9];
|
||||
/*0x83C2*/ u8 boxWallpapers[14];
|
||||
};
|
||||
|
||||
struct Unknown_806F160_Struct
|
||||
{
|
||||
u8 field_0_0:4;
|
||||
@ -430,7 +422,6 @@ extern struct Pokemon gPlayerParty[PARTY_SIZE];
|
||||
extern u8 gEnemyPartyCount;
|
||||
extern struct Pokemon gEnemyParty[PARTY_SIZE];
|
||||
extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
||||
extern struct PokemonStorage* gPokemonStoragePtr;
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
|
@ -1,9 +1,14 @@
|
||||
#ifndef GUARD_POKEMON_ICON_H
|
||||
#define GUARD_POKEMON_ICON_H
|
||||
|
||||
extern const u8 gMonIconPaletteIndices[];
|
||||
|
||||
const u8 *GetMonIconTiles(u16 species, bool32);
|
||||
void sub_80D304C(u16 offset);
|
||||
u8 GetValidMonIconPalIndex(u16 species);
|
||||
const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
|
||||
const u16 *GetValidMonIconPalettePtr(u16 speciesId);
|
||||
u16 GetIconSpecies(u16 species, u32 personality);
|
||||
u16 GetUnownLetterByPersonality(u32 personality);
|
||||
u16 sub_80D2E84(u16 speciesId);
|
||||
void LoadMonIconPalettes(void);
|
||||
|
@ -2,88 +2,73 @@
|
||||
#define GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
#define TOTAL_BOXES_COUNT 14
|
||||
#define IN_BOX_COUNT 30
|
||||
#define IN_BOX_ROWS 6
|
||||
#define IN_BOX_COLUMNS 5
|
||||
#define IN_BOX_COUNT (IN_BOX_ROWS * IN_BOX_COLUMNS)
|
||||
|
||||
#include "pc_screen_effect.h"
|
||||
#include "mon_markings.h"
|
||||
/*
|
||||
ROWS
|
||||
COLUMNS 0 1 2 3 4 5
|
||||
6 7 8 9 10 11
|
||||
12 13 14 15 16 17
|
||||
18 19 20 21 22 23
|
||||
24 25 26 27 28 29
|
||||
*/
|
||||
|
||||
struct PokemonStorageSystemFunc
|
||||
struct PokemonStorage
|
||||
{
|
||||
u8 (*func)(void);
|
||||
s8 unk4;
|
||||
/*0x0000*/ u8 currentBox;
|
||||
/*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT];
|
||||
/*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][9];
|
||||
/*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT];
|
||||
};
|
||||
|
||||
struct StorageAction
|
||||
{
|
||||
const u8 *text;
|
||||
u8 format;
|
||||
};
|
||||
extern struct PokemonStorage *gPokemonStoragePtr;
|
||||
|
||||
struct StorageText
|
||||
{
|
||||
const u8 *text;
|
||||
int textId;
|
||||
};
|
||||
|
||||
struct PSS_MenuStringPtrs
|
||||
{
|
||||
const u8 *text;
|
||||
const u8 *desc;
|
||||
};
|
||||
|
||||
struct UnkStruct_2000028
|
||||
{
|
||||
const u8 *unk_00;
|
||||
u8 *unk_04;
|
||||
u16 unk_08;
|
||||
u16 unk_0a;
|
||||
void (*unk_0c)(struct UnkStruct_2000028 *data);
|
||||
};
|
||||
|
||||
struct UnkStruct_2000020
|
||||
{
|
||||
struct UnkStruct_2000028 *unk_00;
|
||||
u8 unk_04;
|
||||
u8 unk_05;
|
||||
};
|
||||
|
||||
struct UnkPSSStruct_2002370
|
||||
{
|
||||
struct Sprite *unk_0000;
|
||||
struct Sprite *unk_0004[4];
|
||||
u32 unk_0014[3];
|
||||
struct Sprite *unk_0020[2];
|
||||
u8 filler_0028[0x214];
|
||||
u32 unk_023c;
|
||||
u16 unk_0240;
|
||||
u16 unk_0242;
|
||||
u8 curBox;
|
||||
u8 unk_0245;
|
||||
u8 unk_0246;
|
||||
};
|
||||
|
||||
struct PokemonStorageSystemData
|
||||
{
|
||||
u8 state;
|
||||
u8 boxOption;
|
||||
u8 unk_0002;
|
||||
u8 unk_0003;
|
||||
u8 taskId;
|
||||
u8 unk_0005[710];
|
||||
u16 bg2_X;
|
||||
};
|
||||
|
||||
extern struct UnkPSSStruct_2002370 *gUnknown_02039D04;
|
||||
extern struct PokemonStorageSystemData *gUnknown_02039D08;
|
||||
|
||||
u8* GetBoxNamePtr(u8 boxNumber);
|
||||
struct BoxPokemon *GetBoxedMonPtr(u8, u8);
|
||||
void SetBoxMonNickFromAnyBox(u8, u8, u8 *);
|
||||
void CompactPartySlots(void);
|
||||
u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request);
|
||||
bool8 CheckFreePokemonStorageSpace(void);
|
||||
u8 CountMonsInBox(u8 boxId);
|
||||
s16 GetFirstFreeBoxSpot(u8 boxId);
|
||||
u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore);
|
||||
u16 CountPartyAliveNonEggMons_IgnoreVar0x8004Slot(void);
|
||||
u8 CountPartyMons(void);
|
||||
u8 *StringCopyAndFillWithSpaces(u8 *dst, const u8 *src, u16 n);
|
||||
void ShowPokemonStorageSystemPC(void);
|
||||
void ResetPokemonStorageSystem(void);
|
||||
s16 CompactPartySlots(void);
|
||||
u8 StorageGetCurrentBox(void);
|
||||
u8 sub_80D214C(struct BoxPokemon *a, u8 b, u8 c, u8 d);
|
||||
bool32 sub_80D23A8(u16 move);
|
||||
u32 GetBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request);
|
||||
void SetBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, const void *value);
|
||||
u32 GetCurrentBoxMonData(u8 boxPosition, s32 request);
|
||||
void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value);
|
||||
void GetBoxMonNickAt(u8 boxId, u8 boxPosition, u8 *dst);
|
||||
u32 GetBoxMonLevelAt(u8 boxId, u8 boxPosition);
|
||||
void SetBoxMonNickAt(u8 boxId, u8 boxPosition, const u8 *nick);
|
||||
u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst);
|
||||
void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon *src);
|
||||
void CopyBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon *dst);
|
||||
void CreateBoxMonAt(u8 boxId, u8 boxPosition, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 personality, u8 otIDType, u32 otID);
|
||||
void ZeroBoxMonAt(u8 boxId, u8 boxPosition);
|
||||
void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon *dst);
|
||||
struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 boxPosition);
|
||||
u8 *GetBoxNamePtr(u8 boxId);
|
||||
u8 GetBoxWallpaper(u8 boxId);
|
||||
void SetBoxWallpaper(u8 boxId, u8 wallpaperId);
|
||||
s16 sub_80D214C(struct BoxPokemon *boxMons, u8 currIndex, u8 maxIndex, u8 arg3);
|
||||
bool8 CheckFreePokemonStorageSpace(void);
|
||||
bool32 CheckBoxMonSanityAt(u32 boxId, u32 boxPosition);
|
||||
u32 CountStorageNonEggMons(void);
|
||||
u32 CountAllStorageMons(void);
|
||||
bool32 AnyStorageMonWithMove(u16 moveId);
|
||||
void ResetWaldaWallpaper(void);
|
||||
void SetWaldaWallpaperLockedOrUnlocked(bool32 unlocked);
|
||||
bool32 IsWaldaWallpaperUnlocked(void);
|
||||
u32 GetWaldaWallpaperPatternId(void);
|
||||
void SetWaldaWallpaperPatternId(u8 id);
|
||||
u32 GetWaldaWallpaperIconId(void);
|
||||
void SetWaldaWallpaperIconId(u8 id);
|
||||
u16 *GetWaldaWallpaperColorsPtr(void);
|
||||
void SetWaldaWallpaperColors(u16 color1, u16 color2);
|
||||
u8 *GetWaldaPhrasePtr(void);
|
||||
void SetWaldaPhrase(const u8 *src);
|
||||
bool32 IsWaldaPhraseEmpty(void);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
@ -6,6 +6,7 @@ extern u8 gUnknown_0203CF20;
|
||||
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||
void sub_81C4F98(u8, void(*)(void));
|
||||
void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16);
|
||||
void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void));
|
||||
u8 sub_81C1B94(void);
|
||||
|
||||
// The Pokemon Summary Screen can operate in different modes. Certain features,
|
||||
@ -14,7 +15,7 @@ enum PokemonSummaryScreenMode
|
||||
{
|
||||
PSS_MODE_NORMAL,
|
||||
PSS_MODE_UNK1,
|
||||
PSS_MODE_UNK2,
|
||||
PSS_MODE_BOX,
|
||||
PSS_MODE_SELECT_MOVE,
|
||||
};
|
||||
|
||||
|
@ -1801,4 +1801,78 @@ extern const u8 BattleFrontier_BattlePyramidEmptySquare_Text_254F47[];
|
||||
extern const u8 BattleFrontier_BattlePyramidEmptySquare_Text_254F0E[];
|
||||
extern const u8 BattleFrontier_BattlePyramidEmptySquare_Text_254ED3[];
|
||||
|
||||
// PC strings
|
||||
extern const u8 gText_ExitFromBox[];
|
||||
extern const u8 gText_WhatDoYouWantToDo[];
|
||||
extern const u8 gText_PleasePickATheme[];
|
||||
extern const u8 gText_PickTheWallpaper[];
|
||||
extern const u8 gText_PkmnIsSelected[];
|
||||
extern const u8 gText_JumpToWhichBox[];
|
||||
extern const u8 gText_DepositInWhichBox[];
|
||||
extern const u8 gText_PkmnWasDeposited[];
|
||||
extern const u8 gText_BoxIsFull2[];
|
||||
extern const u8 gText_ReleaseThisPokemon[];
|
||||
extern const u8 gText_PkmnWasReleased[];
|
||||
extern const u8 gText_ByeByePkmn[];
|
||||
extern const u8 gText_MarkYourPkmn[];
|
||||
extern const u8 gText_ThatsYourLastPkmn[];
|
||||
extern const u8 gText_YourPartysFull[];
|
||||
extern const u8 gText_YoureHoldingAPkmn[];
|
||||
extern const u8 gText_WhichOneWillYouTake[];
|
||||
extern const u8 gText_YouCantReleaseAnEgg[];
|
||||
extern const u8 gText_ContinueBoxOperations[];
|
||||
extern const u8 gText_PkmnCameBack[];
|
||||
extern const u8 gText_WasItWorriedAboutYou[];
|
||||
extern const u8 gText_FourEllipsesExclamation[];
|
||||
extern const u8 gText_PleaseRemoveTheMail[];
|
||||
extern const u8 gText_GiveToAPkmn[];
|
||||
extern const u8 gText_PlacedItemInBag[];
|
||||
extern const u8 gText_BagIsFull2[];
|
||||
extern const u8 gText_PutItemInBag[];
|
||||
extern const u8 gText_ItemIsNowHeld[];
|
||||
extern const u8 gText_ChangedToNewItem[];
|
||||
extern const u8 gText_MailCantBeStored[];
|
||||
extern const u8 gPCText_Cancel[];
|
||||
extern const u8 gPCText_Store[];
|
||||
extern const u8 gPCText_Withdraw[];
|
||||
extern const u8 gPCText_Move[];
|
||||
extern const u8 gPCText_Shift[];
|
||||
extern const u8 gPCText_Place[];
|
||||
extern const u8 gPCText_Summary[];
|
||||
extern const u8 gPCText_Release[];
|
||||
extern const u8 gPCText_Mark[];
|
||||
extern const u8 gPCText_Jump[];
|
||||
extern const u8 gPCText_Wallpaper[];
|
||||
extern const u8 gPCText_Name[];
|
||||
extern const u8 gPCText_Take[];
|
||||
extern const u8 gPCText_Give[];
|
||||
extern const u8 gPCText_Give[];
|
||||
extern const u8 gPCText_Switch[];
|
||||
extern const u8 gPCText_Bag[];
|
||||
extern const u8 gPCText_Info[];
|
||||
extern const u8 gPCText_Scenery1[];
|
||||
extern const u8 gPCText_Scenery2[];
|
||||
extern const u8 gPCText_Scenery3[];
|
||||
extern const u8 gPCText_Etcetera[];
|
||||
extern const u8 gPCText_Friends[];
|
||||
extern const u8 gPCText_Forest[];
|
||||
extern const u8 gPCText_City[];
|
||||
extern const u8 gPCText_Desert[];
|
||||
extern const u8 gPCText_Savanna[];
|
||||
extern const u8 gPCText_Crag[];
|
||||
extern const u8 gPCText_Volcano[];
|
||||
extern const u8 gPCText_Snow[];
|
||||
extern const u8 gPCText_Cave[];
|
||||
extern const u8 gPCText_Beach[];
|
||||
extern const u8 gPCText_Seafloor[];
|
||||
extern const u8 gPCText_River[];
|
||||
extern const u8 gPCText_Sky[];
|
||||
extern const u8 gPCText_PolkaDot[];
|
||||
extern const u8 gPCText_Pokecenter[];
|
||||
extern const u8 gPCText_Machine[];
|
||||
extern const u8 gPCText_Simple[];
|
||||
extern const u8 gText_PartyFull[];
|
||||
extern const u8 gText_Box[];
|
||||
extern const u8 gText_JustOnePkmn[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
@ -258,7 +258,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
|
||||
u16 RenderText(struct TextPrinter *textPrinter);
|
||||
u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
|
||||
u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
|
||||
u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
|
||||
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
|
||||
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
|
||||
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
|
||||
u8 GetKeypadIconTileOffset(u8 keypadIconId);
|
||||
|
@ -61,10 +61,10 @@ void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue);
|
||||
void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8));
|
||||
bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value);
|
||||
u32 GetWindowAttribute(u8 windowId, u8 attributeId);
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template);
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template);
|
||||
u16 AddWindow8Bit(const struct WindowTemplate *template);
|
||||
void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue);
|
||||
void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum);
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum);
|
||||
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
|
||||
|
||||
extern struct Window gWindows[];
|
||||
|
@ -126,7 +126,6 @@ SECTIONS {
|
||||
src/pokedex.o(.text);
|
||||
asm/trainer_card.o(.text);
|
||||
src/pokemon_storage_system.o(.text);
|
||||
asm/pokemon_storage_system.o(.text);
|
||||
src/pokemon_icon.o(.text);
|
||||
src/script_movement.o(.text);
|
||||
src/fldeff_cut.o(.text);
|
||||
@ -459,7 +458,6 @@ SECTIONS {
|
||||
src/pokedex.o(.rodata);
|
||||
data/trainer_card.o(.rodata);
|
||||
src/pokemon_storage_system.o(.rodata);
|
||||
data/pokemon_storage_system.o(.rodata);
|
||||
src/pokemon_icon.o(.rodata);
|
||||
src/fldeff_cut.o(.rodata);
|
||||
src/map_name_popup.o(.rodata);
|
||||
|
@ -1605,8 +1605,8 @@ static void ScriptCmd_loadspritegfx(void)
|
||||
|
||||
sBattleAnimScriptPtr++;
|
||||
index = T1_READ_16(sBattleAnimScriptPtr);
|
||||
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(index)]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(index)]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(index)]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(index)]);
|
||||
sBattleAnimScriptPtr += 2;
|
||||
AddSpriteIndex(GET_TRUE_SPRITE_INDEX(index));
|
||||
gAnimFramesToWait = 1;
|
||||
|
@ -71,8 +71,8 @@ u8 sub_80A9C70(u8 battlerId, bool8 b)
|
||||
u8 spriteId2;
|
||||
u8 i;
|
||||
|
||||
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_CIRCLE_IMPACT)]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_CIRCLE_IMPACT)]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_CIRCLE_IMPACT)]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_CIRCLE_IMPACT)]);
|
||||
gTasks[taskId].data[0] = battlerId;
|
||||
if (b)
|
||||
{
|
||||
|
@ -1376,8 +1376,8 @@ static void sub_8171D60(u8 ballId)
|
||||
|
||||
if (GetSpriteTileStartByTag(gBallOpenParticleSpritesheets[ballId].tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&gBallOpenParticleSpritesheets[ballId]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBallOpenParticlePalettes[ballId]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBallOpenParticleSpritesheets[ballId]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBallOpenParticlePalettes[ballId]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2032,8 +2032,8 @@ void sub_8172EF0(u8 battler, struct Pokemon *mon)
|
||||
{
|
||||
if (GetSpriteTileStartByTag(0x27F9) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[233]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[233]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[233]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[233]);
|
||||
}
|
||||
|
||||
taskId1 = CreateTask(sub_8172FEC, 10);
|
||||
@ -2173,8 +2173,8 @@ void sub_81732B0(u8 taskId)
|
||||
{
|
||||
u8 paletteIndex;
|
||||
|
||||
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[269]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[269]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[269]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[269]);
|
||||
paletteIndex = IndexOfSpritePaletteTag(0x281D); // unused
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0x7FFFFF1C, 4, 0, 8, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3 | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR);
|
||||
LoadCompressedObjectPic(gUnknown_08611F74);
|
||||
LoadCompressedSpriteSheet(gUnknown_08611F74);
|
||||
LoadCompressedPalette(gUnknown_08D855E8, 0x1F0, 0x20);
|
||||
gBattle_WIN0H = 0xFF;
|
||||
gBattle_WIN0V = 0x70;
|
||||
|
@ -1103,7 +1103,7 @@ void DrawBattleEntryBackground(void)
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0x36);
|
||||
gBattle_BG1_Y = 0xFF5C;
|
||||
gBattle_BG2_Y = 0xFF5C;
|
||||
LoadCompressedObjectPicUsingHeap(&gUnknown_0831AA00);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gUnknown_0831AA00);
|
||||
}
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
|
@ -3536,7 +3536,7 @@ static void sub_8190400(u8 taskId)
|
||||
DecompressAndLoadBgGfxUsingHeap(2, gUnknown_08D83D50, 0x2000, 0, 0);
|
||||
DecompressAndLoadBgGfxUsingHeap(2, gUnknown_08D84970, 0x2000, 0, 1);
|
||||
DecompressAndLoadBgGfxUsingHeap(3, gUnknown_08D84F00, 0x800, 0, 1);
|
||||
LoadCompressedObjectPic(gUnknown_0860CF50);
|
||||
LoadCompressedSpriteSheet(gUnknown_0860CF50);
|
||||
LoadCompressedPalette(gUnknown_08D85358, 0, 0x200);
|
||||
LoadCompressedPalette(gUnknown_08D85444, 0x100, 0x200);
|
||||
LoadCompressedPalette(gUnknown_08D85600, 0xF0, 0x20);
|
||||
@ -5707,7 +5707,7 @@ static void sub_8194220(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 3:
|
||||
LoadCompressedObjectPic(gUnknown_0860CF50);
|
||||
LoadCompressedSpriteSheet(gUnknown_0860CF50);
|
||||
if (r10 == 0)
|
||||
{
|
||||
for (i = 0; i < (unsigned) 31; i++)
|
||||
|
@ -131,8 +131,6 @@ struct FactorySwapMonsStruct
|
||||
bool8 unk30;
|
||||
};
|
||||
|
||||
extern u8 gUnknown_0203CF20;
|
||||
|
||||
extern const u16 gBattleFrontierHeldItems[];
|
||||
extern const struct FacilityMon gBattleFrontierMons[];
|
||||
extern const struct FacilityMon gSlateportBattleTentMons[];
|
||||
@ -1167,7 +1165,7 @@ static void CB2_InitSelectScreen(void)
|
||||
case 4:
|
||||
LoadSpritePalettes(gUnknown_086103F4);
|
||||
LoadSpriteSheets(gUnknown_086103BC);
|
||||
LoadCompressedObjectPic(gUnknown_086103E4);
|
||||
LoadCompressedSpriteSheet(gUnknown_086103E4);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
SetVBlankCallback(Select_VblankCb);
|
||||
@ -3171,7 +3169,7 @@ static void CB2_InitSwapScreen(void)
|
||||
case 4:
|
||||
LoadSpritePalettes(gUnknown_086106B0);
|
||||
LoadSpriteSheets(gUnknown_08610650);
|
||||
LoadCompressedObjectPic(gUnknown_086106A0);
|
||||
LoadCompressedSpriteSheet(gUnknown_086106A0);
|
||||
SetVBlankCallback(Swap_VblankCb);
|
||||
gMain.state++;
|
||||
break;
|
||||
|
@ -643,7 +643,7 @@ void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId)
|
||||
DecompressPicFromTable_2(&gTrainerFrontPicTable[frontPicId],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
SPECIES_NONE);
|
||||
LoadCompressedObjectPalette(&gTrainerFrontPicPaletteTable[frontPicId]);
|
||||
LoadCompressedSpritePalette(&gTrainerFrontPicPaletteTable[frontPicId]);
|
||||
}
|
||||
|
||||
void DecompressTrainerBackPic(u16 backPicId, u8 battlerId)
|
||||
@ -675,20 +675,20 @@ void BattleLoadAllHealthBoxesGfxAtOnce(void)
|
||||
LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[1]);
|
||||
if (!IsDoubleBattle())
|
||||
{
|
||||
LoadCompressedObjectPic(&sSpriteSheet_SinglesPlayerHealthbox);
|
||||
LoadCompressedObjectPic(&sSpriteSheet_SinglesOpponentHealthbox);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_SinglesPlayerHealthbox);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_SinglesOpponentHealthbox);
|
||||
numberOfBattlers = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesPlayerHealthbox[0]);
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesPlayerHealthbox[1]);
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesOpponentHealthbox[0]);
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesOpponentHealthbox[1]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[1]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[1]);
|
||||
numberOfBattlers = 4;
|
||||
}
|
||||
for (i = 0; i < numberOfBattlers; i++)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[i]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[i]]);
|
||||
}
|
||||
|
||||
bool8 BattleLoadAllHealthBoxesGfx(u8 state)
|
||||
@ -707,37 +707,37 @@ bool8 BattleLoadAllHealthBoxesGfx(u8 state)
|
||||
if (state == 2)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
|
||||
LoadCompressedObjectPic(&sSpriteSheet_SafariHealthbox);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_SafariHealthbox);
|
||||
else
|
||||
LoadCompressedObjectPic(&sSpriteSheet_SinglesPlayerHealthbox);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_SinglesPlayerHealthbox);
|
||||
}
|
||||
else if (state == 3)
|
||||
LoadCompressedObjectPic(&sSpriteSheet_SinglesOpponentHealthbox);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_SinglesOpponentHealthbox);
|
||||
else if (state == 4)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[0]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[0]]);
|
||||
else if (state == 5)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[1]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[1]]);
|
||||
else
|
||||
retVal = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state == 2)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesPlayerHealthbox[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]);
|
||||
else if (state == 3)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesPlayerHealthbox[1]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[1]);
|
||||
else if (state == 4)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesOpponentHealthbox[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[0]);
|
||||
else if (state == 5)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_DoublesOpponentHealthbox[1]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[1]);
|
||||
else if (state == 6)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[0]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[0]]);
|
||||
else if (state == 7)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[1]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[1]]);
|
||||
else if (state == 8)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[2]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[2]]);
|
||||
else if (state == 9)
|
||||
LoadCompressedObjectPic(&sSpriteSheets_HealthBar[gBattlerPositions[3]]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[3]]);
|
||||
else
|
||||
retVal = TRUE;
|
||||
}
|
||||
@ -1116,7 +1116,7 @@ void LoadAndCreateEnemyShadowSprites(void)
|
||||
{
|
||||
u8 battlerId;
|
||||
|
||||
LoadCompressedObjectPic(&gSpriteSheet_EnemyShadow);
|
||||
LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow);
|
||||
|
||||
battlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBattlerSpriteCoord(battlerId, 0), GetBattlerSpriteCoord(battlerId, 1) + 29, 0xC8);
|
||||
|
@ -1523,7 +1523,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo,
|
||||
bar_data0 = 5;
|
||||
}
|
||||
|
||||
LoadCompressedObjectPicUsingHeap(&sStatusSummaryBarSpriteSheet);
|
||||
LoadCompressedSpriteSheetUsingHeap(&sStatusSummaryBarSpriteSheet);
|
||||
LoadSpriteSheet(&sStatusSummaryBallsSpriteSheet);
|
||||
LoadSpritePalette(&sStatusSummaryBarSpritePal);
|
||||
LoadSpritePalette(&sStatusSummaryBallsSpritePal);
|
||||
|
@ -1611,7 +1611,7 @@ static void sub_81A8830(void)
|
||||
|
||||
static bool8 CanEncounterWildMon(u8 enemyMonLevel)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_BIT3))
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG))
|
||||
{
|
||||
u8 monAbility = GetMonAbility(&gPlayerParty[0]);
|
||||
if (monAbility == ABILITY_KEEN_EYE || monAbility == ABILITY_INTIMIDATE)
|
||||
|
@ -547,7 +547,7 @@ static bool8 sub_81C5238(void)
|
||||
gPyramidBagResources->state++;
|
||||
break;
|
||||
case 3:
|
||||
LoadCompressedObjectPic(&gUnknown_0861F3CC);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0861F3CC);
|
||||
gPyramidBagResources->state++;
|
||||
break;
|
||||
case 4:
|
||||
@ -964,7 +964,7 @@ static void HandleMenuActionInput(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE)
|
||||
{
|
||||
s8 id = GetMenuCursorPos();
|
||||
s8 id = Menu_GetCursorPos();
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (id > 0 && IsValidMenuAction(id - 2))
|
||||
|
@ -2147,7 +2147,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
void FrontierSpeechToString(const u16 *words)
|
||||
{
|
||||
ConvertEasyChatWordsToString(gStringVar4, words, 3, 2);
|
||||
if (GetStringWidth(1, gStringVar4, -1) > 204)
|
||||
if (GetStringWidth(1, gStringVar4, -1) > 204u)
|
||||
{
|
||||
s32 i = 0;
|
||||
|
||||
|
@ -349,11 +349,11 @@ static bool8 LoadBerryTagGfx(void)
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 5:
|
||||
LoadCompressedObjectPic(&gUnknown_0857FDEC);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0857FDEC);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
default:
|
||||
LoadCompressedObjectPalette(&gUnknown_0857FDF4);
|
||||
LoadCompressedSpritePalette(&gUnknown_0857FDF4);
|
||||
return TRUE; // done
|
||||
}
|
||||
|
||||
|
84
src/bg.c
84
src/bg.c
@ -33,8 +33,8 @@ struct BgConfig2
|
||||
u32 unk_3:18;
|
||||
|
||||
void* tilemap;
|
||||
u32 bg_x;
|
||||
u32 bg_y;
|
||||
s32 bg_x;
|
||||
s32 bg_y;
|
||||
};
|
||||
|
||||
static IWRAM_DATA struct BgControl sGpuBgConfigs;
|
||||
@ -524,12 +524,12 @@ u16 GetBgAttribute(u8 bg, u8 attributeId)
|
||||
case 8:
|
||||
switch (GetBgType(bg))
|
||||
{
|
||||
case 0:
|
||||
return GetBgMetricTextMode(bg, 0) * 0x800;
|
||||
case 1:
|
||||
return GetBgMetricAffineMode(bg, 0) * 0x100;
|
||||
default:
|
||||
return 0;
|
||||
case 0:
|
||||
return GetBgMetricTextMode(bg, 0) * 0x800;
|
||||
case 1:
|
||||
return GetBgMetricAffineMode(bg, 0) * 0x100;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
case 9:
|
||||
return GetBgType(bg);
|
||||
@ -540,7 +540,7 @@ u16 GetBgAttribute(u8 bg, u8 attributeId)
|
||||
}
|
||||
}
|
||||
|
||||
u32 ChangeBgX(u8 bg, u32 value, u8 op)
|
||||
s32 ChangeBgX(u8 bg, s32 value, u8 op)
|
||||
{
|
||||
u8 mode;
|
||||
u16 temp1;
|
||||
@ -610,7 +610,7 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op)
|
||||
return sGpuBgConfigs2[bg].bg_x;
|
||||
}
|
||||
|
||||
u32 GetBgX(u8 bg)
|
||||
s32 GetBgX(u8 bg)
|
||||
{
|
||||
if (IsInvalidBg32(bg) != FALSE)
|
||||
return -1;
|
||||
@ -620,7 +620,7 @@ u32 GetBgX(u8 bg)
|
||||
return sGpuBgConfigs2[bg].bg_x;
|
||||
}
|
||||
|
||||
u32 ChangeBgY(u8 bg, u32 value, u8 op)
|
||||
s32 ChangeBgY(u8 bg, s32 value, u8 op)
|
||||
{
|
||||
u8 mode;
|
||||
u16 temp1;
|
||||
@ -690,7 +690,7 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op)
|
||||
return sGpuBgConfigs2[bg].bg_y;
|
||||
}
|
||||
|
||||
u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
|
||||
s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
|
||||
{
|
||||
u8 mode;
|
||||
u16 temp1;
|
||||
@ -761,7 +761,7 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
|
||||
return sGpuBgConfigs2[bg].bg_y;
|
||||
}
|
||||
|
||||
u32 GetBgY(u8 bg)
|
||||
s32 GetBgY(u8 bg)
|
||||
{
|
||||
if (IsInvalidBg32(bg) != FALSE)
|
||||
return -1;
|
||||
@ -778,14 +778,10 @@ void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dis
|
||||
|
||||
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2)
|
||||
{
|
||||
u16 result;
|
||||
s16 test1;
|
||||
s16 test2;
|
||||
u16 result = GetGpuReg(REG_OFFSET_MOSAIC);
|
||||
s16 test1 = result & 0xF;
|
||||
s16 test2 = (result >> 4) & 0xF;
|
||||
|
||||
result = GetGpuReg(REG_OFFSET_MOSAIC);
|
||||
|
||||
test1 = result & 0xF;
|
||||
test2 = (result >> 4) & 0xF;
|
||||
result &= 0xFF00;
|
||||
|
||||
switch (a2)
|
||||
@ -1039,47 +1035,43 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
u16 mode2;
|
||||
u16 attribute;
|
||||
u16 mode3;
|
||||
u16 x16, y16;
|
||||
|
||||
u16 x16;
|
||||
u16 y16;
|
||||
|
||||
if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE)
|
||||
if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg))
|
||||
{
|
||||
attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
mode = GetBgMetricTextMode(bg, 0x1) * 0x20;
|
||||
mode2 = GetBgMetricTextMode(bg, 0x2) * 0x20;
|
||||
switch (GetBgType(bg))
|
||||
{
|
||||
case 0:
|
||||
for (y16 = y; y16 < (y + height); y16++)
|
||||
case 0:
|
||||
for (y16 = y; y16 < (y + height); y16++)
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
mode3 = GetBgMetricAffineMode(bg, 0x1);
|
||||
for (y16 = y; y16 < (y + height); y16++)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
mode3 = GetBgMetricAffineMode(bg, 0x1);
|
||||
for (y16 = y; y16 < (y + height); y16++)
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u16 GetBgMetricTextMode(u8 bg, u8 whichMetric)
|
||||
{
|
||||
u8 attribute;
|
||||
|
||||
attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
u8 attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
|
||||
switch (whichMetric)
|
||||
{
|
||||
@ -1125,9 +1117,7 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric)
|
||||
|
||||
u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric)
|
||||
{
|
||||
u8 attribute;
|
||||
|
||||
attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
u8 attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
|
||||
switch (whichMetric)
|
||||
{
|
||||
|
10
src/blit.c
10
src/blit.c
@ -1,12 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "blit.h"
|
||||
|
||||
void BlitBitmapRect4BitWithoutColorKey(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
void BlitBitmapRect4BitWithoutColorKey(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
{
|
||||
BlitBitmapRect4Bit(src, dst, srcX, srcY, dstX, dstY, width, height, 0xFF);
|
||||
}
|
||||
|
||||
void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey)
|
||||
void BlitBitmapRect4Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey)
|
||||
{
|
||||
s32 xEnd;
|
||||
s32 yEnd;
|
||||
@ -14,7 +14,7 @@ void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 sr
|
||||
s32 multiplierDstY;
|
||||
s32 loopSrcY, loopDstY;
|
||||
s32 loopSrcX, loopDstX;
|
||||
u8 *pixelsSrc;
|
||||
const u8 *pixelsSrc;
|
||||
u8 *pixelsDst;
|
||||
s32 toOrr;
|
||||
s32 toAnd;
|
||||
@ -103,7 +103,7 @@ void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 hei
|
||||
}
|
||||
}
|
||||
|
||||
void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset)
|
||||
void BlitBitmapRect4BitTo8Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset)
|
||||
{
|
||||
s32 palOffsetBits;
|
||||
s32 xEnd;
|
||||
@ -112,7 +112,7 @@ void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX,
|
||||
s32 multiplierDstY;
|
||||
s32 loopSrcY, loopDstY;
|
||||
s32 loopSrcX, loopDstX;
|
||||
u8 *pixelsSrc;
|
||||
const u8 *pixelsSrc;
|
||||
u8 *pixelsDst;
|
||||
s32 colorKeyBits;
|
||||
|
||||
|
@ -259,7 +259,7 @@ static void CableCarMainCallback_Setup(void)
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 3; i++)
|
||||
LoadCompressedObjectPic(&gUnknown_085CDB54[i]);
|
||||
LoadCompressedSpriteSheet(&gUnknown_085CDB54[i]);
|
||||
|
||||
LoadSpritePalettes(gUnknown_085CDB74);
|
||||
sCableCar->mtChimneyTilemap = malloc_and_decompress(gCableCarMtChimneyTilemap, &sizeOut);
|
||||
@ -351,7 +351,7 @@ static void CableCarMainCallback_Run(void)
|
||||
static void CleanupCableCar(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
|
||||
|
||||
HideBg(0);
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
@ -361,7 +361,7 @@ static void CleanupCableCar(void)
|
||||
sub_80AB130(WEATHER_NONE);
|
||||
for (i = 0; i < 20; i++)
|
||||
gWeatherPtr->sprites.s2.ashSprites[i] = NULL;
|
||||
|
||||
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
ResetPaletteFade();
|
||||
|
@ -2484,7 +2484,7 @@ u8 sub_80DB0C4(void)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
LoadCompressedObjectPic(&gUnknown_08587C00);
|
||||
LoadCompressedSpriteSheet(&gUnknown_08587C00);
|
||||
LoadCompressedPalette(gContest2Pal, 0x110, 32);
|
||||
spriteId = CreateSprite(&gSpriteTemplate_8587BE8, 112, 36, 30);
|
||||
gSprites[spriteId].oam.paletteNum = 1;
|
||||
@ -2496,8 +2496,8 @@ u8 sub_80DB120(void)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
LoadCompressedObjectPic(&gUnknown_08587C08);
|
||||
LoadCompressedObjectPalette(&gUnknown_08587C10);
|
||||
LoadCompressedSpriteSheet(&gUnknown_08587C08);
|
||||
LoadCompressedSpritePalette(&gUnknown_08587C10);
|
||||
spriteId = CreateSprite(&gSpriteTemplate_8587C18, 96, 10, 29);
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
gSprites[spriteId].data[0] = gSprites[spriteId].oam.tileNum;
|
||||
|
@ -1964,9 +1964,9 @@ static bool8 sub_8176AB0(u8 data, u8 taskIdA)
|
||||
case 2:
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
{
|
||||
LoadCompressedObjectPic(gUnknown_085F5334);
|
||||
LoadCompressedObjectPic(gUnknown_085F53BC);
|
||||
LoadCompressedObjectPic(gUnknown_085F5354);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5334);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F53BC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5354);
|
||||
LoadSpritePalettes(gUnknown_085F5384);
|
||||
|
||||
spriteId = intro_create_brendan_sprite(120, 46);
|
||||
@ -1981,9 +1981,9 @@ static bool8 sub_8176AB0(u8 data, u8 taskIdA)
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedObjectPic(gUnknown_085F5344);
|
||||
LoadCompressedObjectPic(gUnknown_085F53AC);
|
||||
LoadCompressedObjectPic(gUnknown_085F5354);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5344);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F53AC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5354);
|
||||
LoadSpritePalettes(gUnknown_085F5384);
|
||||
|
||||
spriteId = intro_create_may_sprite(120, 46);
|
||||
|
@ -901,7 +901,7 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
|
||||
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
if (GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SANITY_BIT2))
|
||||
if (GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SANITY_HAS_SPECIES))
|
||||
daycare->mons[i].steps++, validEggs++;
|
||||
}
|
||||
|
||||
@ -922,7 +922,7 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||
continue;
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT1))
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG))
|
||||
continue;
|
||||
|
||||
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
|
||||
|
@ -22,7 +22,7 @@ void LZDecompressVram(const u32 *src, void *dest)
|
||||
LZ77UnCompVram(src, dest);
|
||||
}
|
||||
|
||||
u16 LoadCompressedObjectPic(const struct CompressedSpriteSheet *src)
|
||||
u16 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src)
|
||||
{
|
||||
struct SpriteSheet dest;
|
||||
|
||||
@ -33,7 +33,7 @@ u16 LoadCompressedObjectPic(const struct CompressedSpriteSheet *src)
|
||||
return LoadSpriteSheet(&dest);
|
||||
}
|
||||
|
||||
void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer)
|
||||
void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer)
|
||||
{
|
||||
struct SpriteSheet dest;
|
||||
|
||||
@ -44,7 +44,7 @@ void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *s
|
||||
LoadSpriteSheet(&dest);
|
||||
}
|
||||
|
||||
void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src)
|
||||
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src)
|
||||
{
|
||||
struct SpritePalette dest;
|
||||
|
||||
@ -54,7 +54,7 @@ void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src)
|
||||
LoadSpritePalette(&dest);
|
||||
}
|
||||
|
||||
void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer)
|
||||
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer)
|
||||
{
|
||||
struct SpritePalette dest;
|
||||
|
||||
@ -465,7 +465,7 @@ u32 GetDecompressedDataSize(const u32 *ptr)
|
||||
return (ptr8[3] << 16) | (ptr8[2] << 8) | (ptr8[1]);
|
||||
}
|
||||
|
||||
bool8 LoadCompressedObjectPicUsingHeap(const struct CompressedSpriteSheet* src)
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src)
|
||||
{
|
||||
struct SpriteSheet dest;
|
||||
void* buffer;
|
||||
@ -482,7 +482,7 @@ bool8 LoadCompressedObjectPicUsingHeap(const struct CompressedSpriteSheet* src)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 LoadCompressedObjectPaletteUsingHeap(const struct CompressedSpritePalette *src)
|
||||
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src)
|
||||
{
|
||||
struct SpritePalette dest;
|
||||
void* buffer;
|
||||
|
@ -519,7 +519,7 @@ void sub_8126B80(u8 taskId)
|
||||
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
menuPos = GetMenuCursorPos();
|
||||
menuPos = Menu_GetCursorPos();
|
||||
switch (Menu_ProcessInput())
|
||||
{
|
||||
default:
|
||||
@ -527,7 +527,7 @@ void sub_8126B80(u8 taskId)
|
||||
sSecretBasePCMenuActions[sSecretBasePCMenuCursorPos].func.void_u8(taskId);
|
||||
break;
|
||||
case -2:
|
||||
sSecretBasePCMenuCursorPos = GetMenuCursorPos();
|
||||
sSecretBasePCMenuCursorPos = Menu_GetCursorPos();
|
||||
if ((s8)menuPos != sSecretBasePCMenuCursorPos)
|
||||
{
|
||||
sub_8126C08();
|
||||
@ -2065,7 +2065,7 @@ u8 AddDecorationIconObjectFromIconTable(u16 tilesTag, u16 paletteTag, u8 decor)
|
||||
LoadSpriteSheet(&sheet);
|
||||
palette.data = GetDecorationIconPicOrPalette(decor, 1);
|
||||
palette.tag = paletteTag;
|
||||
LoadCompressedObjectPalette(&palette);
|
||||
LoadCompressedSpritePalette(&palette);
|
||||
template = malloc(sizeof(struct SpriteTemplate));
|
||||
*template = gItemIconSpriteTemplate;
|
||||
template->tileTag = tilesTag;
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "dma3.h"
|
||||
|
||||
// Maximum amount of data we will transfer in one operation
|
||||
#define MAX_DMA_BLOCK_SIZE 0x1000
|
||||
|
||||
#define MAX_DMA_REQUESTS 128
|
||||
|
||||
#define DMA_REQUEST_COPY32 1
|
||||
@ -40,49 +37,6 @@ void ClearDma3Requests(void)
|
||||
gDma3ManagerLocked = FALSE;
|
||||
}
|
||||
|
||||
#define Dma3CopyLarge_(src, dest, size, bit) \
|
||||
{ \
|
||||
const void *_src = src; \
|
||||
void *_dest = dest; \
|
||||
u32 _size = size; \
|
||||
while (1) \
|
||||
{ \
|
||||
if (_size <= MAX_DMA_BLOCK_SIZE) \
|
||||
{ \
|
||||
DmaCopy##bit(3, _src, _dest, _size); \
|
||||
break; \
|
||||
} \
|
||||
DmaCopy##bit(3, _src, _dest, MAX_DMA_BLOCK_SIZE); \
|
||||
_src += MAX_DMA_BLOCK_SIZE; \
|
||||
_dest += MAX_DMA_BLOCK_SIZE; \
|
||||
_size -= MAX_DMA_BLOCK_SIZE; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define Dma3CopyLarge16_(src, dest, size) Dma3CopyLarge_(src, dest, size, 16)
|
||||
#define Dma3CopyLarge32_(src, dest, size) Dma3CopyLarge_(src, dest, size, 32)
|
||||
|
||||
#define Dma3FillLarge_(value, dest, size, bit) \
|
||||
{ \
|
||||
void *_dest = dest; \
|
||||
u32 _size = size; \
|
||||
while (1) \
|
||||
{ \
|
||||
if (_size <= MAX_DMA_BLOCK_SIZE) \
|
||||
{ \
|
||||
DmaFill##bit(3, value, _dest, _size); \
|
||||
break; \
|
||||
} \
|
||||
DmaFill##bit(3, value, _dest, MAX_DMA_BLOCK_SIZE); \
|
||||
_dest += MAX_DMA_BLOCK_SIZE; \
|
||||
_size -= MAX_DMA_BLOCK_SIZE; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16)
|
||||
#define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32)
|
||||
|
||||
|
||||
void ProcessDma3Requests(void)
|
||||
{
|
||||
u16 bytesTransferred;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "field_weather.h"
|
||||
#include "international_string_util.h"
|
||||
#include "naming_screen.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "field_screen_effect.h"
|
||||
#include "battle.h" // to get rid of later
|
||||
|
||||
@ -60,10 +61,6 @@ extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle
|
||||
extern const u8 gText_HatchedFromEgg[];
|
||||
extern const u8 gText_NickHatchPrompt[];
|
||||
|
||||
extern void PlayRainSoundEffect(void);
|
||||
extern u16 sub_80D22D0(void);
|
||||
extern u8 CountPartyAliveNonEggMonsExcept(u8);
|
||||
|
||||
static void Task_EggHatch(u8 taskID);
|
||||
static void CB2_EggHatch_0(void);
|
||||
static void CB2_EggHatch_1(void);
|
||||
@ -442,7 +439,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[(a0 * 2) + 1],
|
||||
species, pid);
|
||||
LoadCompressedObjectPalette(GetMonSpritePalStruct(mon));
|
||||
LoadCompressedSpritePalette(GetMonSpritePalStruct(mon));
|
||||
*speciesLoc = species;
|
||||
}
|
||||
break;
|
||||
@ -876,7 +873,7 @@ u8 GetEggStepsToSubtract(void)
|
||||
u8 count, i;
|
||||
for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT3))
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_EGG))
|
||||
{
|
||||
u8 ability = GetMonAbility(&gPlayerParty[i]);
|
||||
if (ability == ABILITY_MAGMA_ARMOR || ability == ABILITY_FLAME_BODY)
|
||||
@ -888,7 +885,7 @@ u8 GetEggStepsToSubtract(void)
|
||||
|
||||
u16 sub_80722E0(void)
|
||||
{
|
||||
u16 value = sub_80D22D0();
|
||||
value += CountPartyAliveNonEggMonsExcept(6);
|
||||
return value;
|
||||
u16 aliveNonEggMonsCount = CountStorageNonEggMons();
|
||||
aliveNonEggMonsCount += CountPartyAliveNonEggMonsExcept(6);
|
||||
return aliveNonEggMonsCount;
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ static void CreatePostEvoSparkleSet2(u8 arg0)
|
||||
|
||||
void LoadEvoSparkleSpriteAndPal(void)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&sEvoSparkleSpriteSheets[0]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&sEvoSparkleSpriteSheets[0]);
|
||||
LoadSpritePalettes(sEvoSparkleSpritePals);
|
||||
}
|
||||
|
||||
|
@ -733,8 +733,8 @@ bool8 FieldEffectActiveListContains(u8 id)
|
||||
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer)
|
||||
{
|
||||
struct SpriteTemplate spriteTemplate;
|
||||
LoadCompressedObjectPaletteOverrideBuffer(&gTrainerFrontPicPaletteTable[trainerSpriteID], buffer);
|
||||
LoadCompressedObjectPicOverrideBuffer(&gTrainerFrontPicTable[trainerSpriteID], buffer);
|
||||
LoadCompressedSpritePaletteOverrideBuffer(&gTrainerFrontPicPaletteTable[trainerSpriteID], buffer);
|
||||
LoadCompressedSpriteSheetOverrideBuffer(&gTrainerFrontPicTable[trainerSpriteID], buffer);
|
||||
spriteTemplate.tileTag = gTrainerFrontPicTable[trainerSpriteID].tag;
|
||||
spriteTemplate.paletteTag = gTrainerFrontPicPaletteTable[trainerSpriteID].tag;
|
||||
spriteTemplate.oam = &gNewGameBirchOamAttributes;
|
||||
|
@ -1845,7 +1845,7 @@ static bool8 Fishing6(struct Task *task)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_BIT3))
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG))
|
||||
{
|
||||
u8 ability = GetMonAbility(&gPlayerParty[0]);
|
||||
if (ability == ABILITY_SUCTION_CUPS || ability == ABILITY_STICKY_HOLD)
|
||||
|
@ -122,7 +122,7 @@ s32 DoPoisonFieldEffect(void)
|
||||
u32 numFainted = 0;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(pokemon, MON_DATA_SANITY_BIT2) && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN)
|
||||
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN)
|
||||
{
|
||||
hp = GetMonData(pokemon, MON_DATA_HP);
|
||||
if (hp == 0 || --hp == 0)
|
||||
|
@ -1266,7 +1266,7 @@ void IsGrassTypeInParty(void)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
pokemon = &gPlayerParty[i];
|
||||
if (GetMonData(pokemon, MON_DATA_SANITY_BIT2) && !GetMonData(pokemon, MON_DATA_IS_EGG))
|
||||
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && !GetMonData(pokemon, MON_DATA_IS_EGG))
|
||||
{
|
||||
species = GetMonData(pokemon, MON_DATA_SPECIES);
|
||||
if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS)
|
||||
@ -1658,7 +1658,7 @@ bool8 sub_813990C(void)
|
||||
|
||||
for (i = 0; i < partyCount; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT1) == 1)
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG) == 1)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1283,8 +1283,8 @@ static void sub_8174F70(void)
|
||||
ResetAllPicSprites();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
LoadCompressedObjectPic(sHallOfFame_ConfettiSpriteSheet);
|
||||
LoadCompressedObjectPalette(sHallOfFame_ConfettiSpritePalette);
|
||||
LoadCompressedSpriteSheet(sHallOfFame_ConfettiSpriteSheet);
|
||||
LoadCompressedSpritePalette(sHallOfFame_ConfettiSpritePalette);
|
||||
}
|
||||
|
||||
static void sub_8174FAC(void)
|
||||
@ -1475,8 +1475,8 @@ static void sub_8175364(u8 taskId)
|
||||
gSpecialVar_0x8004 = var;
|
||||
gSpecialVar_0x8005 = 0xFFFF;
|
||||
}
|
||||
LoadCompressedObjectPic(sHallOfFame_ConfettiSpriteSheet);
|
||||
LoadCompressedObjectPalette(sHallOfFame_ConfettiSpritePalette);
|
||||
LoadCompressedSpriteSheet(sHallOfFame_ConfettiSpriteSheet);
|
||||
LoadCompressedSpritePalette(sHallOfFame_ConfettiSpritePalette);
|
||||
data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
|
26
src/intro.c
26
src/intro.c
@ -1044,10 +1044,10 @@ static void Task_IntroLoadPart1Graphics(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(2) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(20) | BGCNT_16COLOR | BGCNT_TXT256x512);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(1) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(18) | BGCNT_16COLOR | BGCNT_TXT256x512);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(16) | BGCNT_16COLOR | BGCNT_TXT256x512);
|
||||
LoadCompressedObjectPic(gUnknown_085E4FDC);
|
||||
LoadCompressedObjectPic(gUnknown_085E4FEC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085E4FDC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085E4FEC);
|
||||
LoadSpritePalettes(gUnknown_085E4FFC);
|
||||
LoadCompressedObjectPic(gUnknown_085E4A74);
|
||||
LoadCompressedSpriteSheet(gUnknown_085E4A74);
|
||||
LoadSpritePalettes(gUnknown_085E4A84);
|
||||
CpuCopy16(gPlttBufferUnfaded + 0x100, gPlttBufferUnfaded + 0x1F0, 0x20);
|
||||
CpuCopy16(gPlttBufferUnfaded + 0x100, gPlttBufferUnfaded + 0x1E1, 0x1E);
|
||||
@ -1204,16 +1204,16 @@ static void Task_IntroStartBikeRide(u8 taskId)
|
||||
u8 spriteId;
|
||||
|
||||
if (gUnknown_0203BCC8 == 0)
|
||||
LoadCompressedObjectPic(gIntro2BrendanSpriteSheet);
|
||||
LoadCompressedSpriteSheet(gIntro2BrendanSpriteSheet);
|
||||
else
|
||||
LoadCompressedObjectPic(gIntro2MaySpriteSheet);
|
||||
LoadCompressedSpriteSheet(gIntro2MaySpriteSheet);
|
||||
|
||||
LoadCompressedObjectPic(gIntro2BicycleSpriteSheet);
|
||||
LoadCompressedObjectPic(gIntro2FlygonSpriteSheet);
|
||||
LoadCompressedSpriteSheet(gIntro2BicycleSpriteSheet);
|
||||
LoadCompressedSpriteSheet(gIntro2FlygonSpriteSheet);
|
||||
|
||||
for (spriteId = 0; spriteId < 3; spriteId++)
|
||||
{
|
||||
LoadCompressedObjectPic(&gUnknown_085E4AE8[spriteId]);
|
||||
LoadCompressedSpriteSheet(&gUnknown_085E4AE8[spriteId]);
|
||||
}
|
||||
|
||||
LoadSpritePalettes(gUnknown_085F530C);
|
||||
@ -1542,8 +1542,8 @@ static void Task_IntroLoadPart1Graphics3(u8 taskId)
|
||||
LZDecompressVram(gIntro3GroudonTilemap, (void *)(VRAM + 0xC000));
|
||||
LZDecompressVram(gIntro3LegendBgGfx, (void *)(VRAM + 0x4000));
|
||||
LZDecompressVram(gIntro3GroudonBgTilemap, (void *)(VRAM + 0xE000));
|
||||
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
|
||||
CpuCopy16(gIntro3BgPal, gPlttBufferUnfaded, sizeof(gIntro3BgPal));
|
||||
gTasks[taskId].func = Task_IntroLoadPart1Graphics4;
|
||||
}
|
||||
@ -1764,7 +1764,7 @@ static void Task_IntroLoadPart1Graphics9(u8 taskId)
|
||||
LZDecompressVram(gIntro3KyogreGfx, (void *)VRAM);
|
||||
LZDecompressVram(gIntro3KyogreTilemap, (void *)(VRAM + 0xC000));
|
||||
LZDecompressVram(gIntro3KyogreBgTilemap, (void *)(VRAM + 0xE000));
|
||||
LoadCompressedObjectPic(gUnknown_085E4C88);
|
||||
LoadCompressedSpriteSheet(gUnknown_085E4C88);
|
||||
LoadSpritePalette(gUnknown_085E4C98);
|
||||
BeginNormalPaletteFade(0xFFFFFFFE, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
gTasks[taskId].func = Task_IntroFadeIn0;
|
||||
@ -2092,7 +2092,7 @@ static void Task_IntroFadeIn5(u8 taskId)
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[6] = 1;
|
||||
gTasks[taskId].data[7] = 0;
|
||||
LoadCompressedObjectPicUsingHeap(gUnknown_085E4BF4);
|
||||
LoadCompressedSpriteSheetUsingHeap(gUnknown_085E4BF4);
|
||||
LoadSpritePalettes(gUnknown_085E4C04);
|
||||
}
|
||||
|
||||
@ -2169,7 +2169,7 @@ static void Task_IntroFadeIn7(u8 taskId)
|
||||
{
|
||||
u8 newTaskId;
|
||||
|
||||
LoadCompressedObjectPic(gUnknown_085E5048);
|
||||
LoadCompressedSpriteSheet(gUnknown_085E5048);
|
||||
LoadSpritePalettes(gUnknown_085E5058);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0
|
||||
| DISPCNT_OBJ_1D_MAP
|
||||
|
@ -341,7 +341,7 @@ void load_intro_part2_graphics(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F0DBC, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F1398, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F0CFC, 0, 96);
|
||||
LoadCompressedObjectPic(gUnknown_085F5064);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5064);
|
||||
LoadPalette(&gUnknown_085F1668, 256, 32);
|
||||
sub_817B76C();
|
||||
break;
|
||||
@ -349,7 +349,7 @@ void load_intro_part2_graphics(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F1824, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F1EAC, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F17E4, 0, 32);
|
||||
LoadCompressedObjectPic(gUnknown_085F50EC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F50EC);
|
||||
LoadPalette(&gUnknown_085F21B0, 256, 32);
|
||||
sub_817B788();
|
||||
break;
|
||||
@ -447,7 +447,7 @@ void sub_817B1C8(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F0DBC, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F1398, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F0CFC, 0, 96);
|
||||
LoadCompressedObjectPic(gUnknown_085F5064);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5064);
|
||||
LZ77UnCompVram(gUnknown_085F16A8, (void *)(VRAM + 0x10000));
|
||||
LoadPalette(&gUnknown_085F1668, 256, 32);
|
||||
sub_817B76C();
|
||||
@ -457,7 +457,7 @@ void sub_817B1C8(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F0DBC, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F1398, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F0D5C, 0, 96);
|
||||
LoadCompressedObjectPic(gUnknown_085F5064);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5064);
|
||||
LZ77UnCompVram(gUnknown_085F16A8, (void *)(VRAM + 0x10000));
|
||||
LoadPalette(&gUnknown_085F1688, 256, 32);
|
||||
sub_817B76C();
|
||||
@ -468,7 +468,7 @@ void sub_817B1C8(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F1824, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F1EAC, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F1804, 0, 32);
|
||||
LoadCompressedObjectPic(gUnknown_085F50EC);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F50EC);
|
||||
LoadPalette(&gUnknown_085F1804, 256, 32);
|
||||
sub_817B788();
|
||||
break;
|
||||
@ -477,7 +477,7 @@ void sub_817B1C8(u8 a)
|
||||
LZ77UnCompVram(gUnknown_085F235C, (void *)(VRAM));
|
||||
LZ77UnCompVram(gUnknown_085F2568, (void *)(VRAM + 0x3000));
|
||||
LoadPalette(&gUnknown_085F231C, 0, 64);
|
||||
LoadCompressedObjectPic(gUnknown_085F5180);
|
||||
LoadCompressedSpriteSheet(gUnknown_085F5180);
|
||||
LoadPalette(&gUnknown_085F2548, 256, 32);
|
||||
sub_817B7A4();
|
||||
break;
|
||||
|
@ -107,7 +107,7 @@ u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId)
|
||||
|
||||
spritePalette.data = GetItemIconPicOrPalette(itemId, 1);
|
||||
spritePalette.tag = paletteTag;
|
||||
LoadCompressedObjectPalette(&spritePalette);
|
||||
LoadCompressedSpritePalette(&spritePalette);
|
||||
|
||||
spriteTemplate = Alloc(sizeof(*spriteTemplate));
|
||||
CpuCopy16(&gItemIconSpriteTemplate, spriteTemplate, sizeof(*spriteTemplate));
|
||||
@ -144,7 +144,7 @@ u8 AddCustomItemIconSprite(struct SpriteTemplate *customSpriteTemplate, u16 tile
|
||||
|
||||
spritePalette.data = GetItemIconPicOrPalette(itemId, 1);
|
||||
spritePalette.tag = paletteTag;
|
||||
LoadCompressedObjectPalette(&spritePalette);
|
||||
LoadCompressedSpritePalette(&spritePalette);
|
||||
|
||||
spriteTemplate = Alloc(sizeof(*spriteTemplate));
|
||||
CpuCopy16(customSpriteTemplate, spriteTemplate, sizeof(*spriteTemplate));
|
||||
|
@ -713,13 +713,13 @@ bool8 load_bag_menu_graphics(void)
|
||||
break;
|
||||
case 3:
|
||||
if (IsWallysBag() == TRUE || gSaveBlock2Ptr->playerGender == MALE)
|
||||
LoadCompressedObjectPic(&gUnknown_0857FB34);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0857FB34);
|
||||
else
|
||||
LoadCompressedObjectPic(&gUnknown_0857FB3C);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0857FB3C);
|
||||
gUnknown_0203CE54->unk834++;
|
||||
break;
|
||||
case 4:
|
||||
LoadCompressedObjectPalette(&gUnknown_0857FB44);
|
||||
LoadCompressedSpritePalette(&gUnknown_0857FB44);
|
||||
gUnknown_0203CE54->unk834++;
|
||||
break;
|
||||
default:
|
||||
@ -1564,7 +1564,7 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE)
|
||||
{
|
||||
s8 cursorPos = GetMenuCursorPos();
|
||||
s8 cursorPos = Menu_GetCursorPos();
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (cursorPos > 0 && sub_81ACDFC(cursorPos - 2))
|
||||
|
@ -583,7 +583,7 @@ static void sub_80D5070(u8 berryId)
|
||||
|
||||
pal.data = gBerryPicTable[berryId].pal;
|
||||
pal.tag = 0x7544;
|
||||
LoadCompressedObjectPalette(&pal);
|
||||
LoadCompressedSpritePalette(&pal);
|
||||
LZDecompressWram(gBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]);
|
||||
sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]);
|
||||
}
|
||||
|
@ -2244,7 +2244,7 @@ void sub_800E0E8(void)
|
||||
{
|
||||
if (GetSpriteTileStartByTag(sWirelessStatusIndicatorSpriteSheet.tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPic(&sWirelessStatusIndicatorSpriteSheet);
|
||||
LoadCompressedSpriteSheet(&sWirelessStatusIndicatorSpriteSheet);
|
||||
}
|
||||
LoadSpritePalette(&sWirelessStatusIndicatorSpritePalette);
|
||||
gWirelessStatusIndicatorSpriteId = 0xFF;
|
||||
|
@ -1074,7 +1074,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16
|
||||
spriteSheet.data = sRedArrowOtherGfx;
|
||||
spriteSheet.size = 0x100;
|
||||
spriteSheet.tag = arrowInfo->tileTag;
|
||||
LoadCompressedObjectPic(&spriteSheet);
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (arrowInfo->palTag == SPRITE_INVALID_TAG)
|
||||
{
|
||||
@ -1320,7 +1320,7 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor)
|
||||
spriteSheet.data = sSelectorOutlineGfx;
|
||||
spriteSheet.size = 0x100;
|
||||
spriteSheet.tag = cursor->tileTag;
|
||||
LoadCompressedObjectPic(&spriteSheet);
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (cursor->palTag == SPRITE_INVALID_TAG)
|
||||
{
|
||||
@ -1405,7 +1405,7 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor)
|
||||
spriteSheet.data = sRedArrowGfx;
|
||||
spriteSheet.size = 0x80;
|
||||
spriteSheet.tag = cursor->tileTag;
|
||||
LoadCompressedObjectPic(&spriteSheet);
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (cursor->palTag == SPRITE_INVALID_TAG)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "load_save.h"
|
||||
#include "main.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "random.h"
|
||||
#include "alloc.h"
|
||||
#include "item.h"
|
||||
|
@ -1394,7 +1394,7 @@ static void Task_NewGameBirchSpeech_ChooseGender(u8 taskId)
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_WhatsYourName;
|
||||
break;
|
||||
}
|
||||
gender2 = GetMenuCursorPos();
|
||||
gender2 = Menu_GetCursorPos();
|
||||
if (gender2 != gTasks[taskId].tPlayerGender)
|
||||
{
|
||||
gTasks[taskId].tPlayerGender = gender2;
|
||||
|
38
src/menu.c
38
src/menu.c
@ -132,7 +132,7 @@ extern void sub_8197BB4(u8, u8, u8, u8, u8, u8);
|
||||
extern void sub_8197E30(u8, u8, u8, u8, u8, u8);
|
||||
extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
|
||||
extern void sub_81980A8(u8, u8, u8, u8, u8, u8);
|
||||
extern u8 MoveMenuCursor(s8);
|
||||
extern u8 Menu_MoveCursor(s8);
|
||||
extern u8 sub_8199134(s8, s8);
|
||||
extern void sub_8198C78(void);
|
||||
extern void task_free_buf_after_copying_tile_data_to_vram(u8 taskId);
|
||||
@ -910,7 +910,7 @@ u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numC
|
||||
else
|
||||
gUnknown_0203CD90.cursorPos = pos;
|
||||
|
||||
MoveMenuCursor(0);
|
||||
Menu_MoveCursor(0);
|
||||
return gUnknown_0203CD90.cursorPos;
|
||||
}
|
||||
|
||||
@ -935,7 +935,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos)
|
||||
AddTextPrinterParameterized(gUnknown_0203CD90.windowId, gUnknown_0203CD90.fontId, gText_SelectorArrow3, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * newPos + gUnknown_0203CD90.top, 0, 0);
|
||||
}
|
||||
|
||||
u8 MoveMenuCursor(s8 cursorDelta)
|
||||
u8 Menu_MoveCursor(s8 cursorDelta)
|
||||
{
|
||||
u8 oldPos = gUnknown_0203CD90.cursorPos;
|
||||
int newPos = gUnknown_0203CD90.cursorPos + cursorDelta;
|
||||
@ -951,7 +951,7 @@ u8 MoveMenuCursor(s8 cursorDelta)
|
||||
return gUnknown_0203CD90.cursorPos;
|
||||
}
|
||||
|
||||
u8 MoveMenuCursorNoWrapAround(s8 cursorDelta)
|
||||
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta)
|
||||
{
|
||||
u8 oldPos = gUnknown_0203CD90.cursorPos;
|
||||
int newPos = gUnknown_0203CD90.cursorPos + cursorDelta;
|
||||
@ -967,7 +967,7 @@ u8 MoveMenuCursorNoWrapAround(s8 cursorDelta)
|
||||
return gUnknown_0203CD90.cursorPos;
|
||||
}
|
||||
|
||||
u8 GetMenuCursorPos(void)
|
||||
u8 Menu_GetCursorPos(void)
|
||||
{
|
||||
return gUnknown_0203CD90.cursorPos;
|
||||
}
|
||||
@ -987,13 +987,13 @@ s8 Menu_ProcessInput(void)
|
||||
else if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
MoveMenuCursor(-1);
|
||||
Menu_MoveCursor(-1);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
MoveMenuCursor(1);
|
||||
Menu_MoveCursor(1);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
@ -1016,13 +1016,13 @@ s8 Menu_ProcessInputNoWrap(void)
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (oldPos != MoveMenuCursorNoWrapAround(-1))
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(-1))
|
||||
PlaySE(SE_SELECT);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
if (oldPos != MoveMenuCursorNoWrapAround(1))
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(1))
|
||||
PlaySE(SE_SELECT);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
@ -1045,13 +1045,13 @@ s8 ProcessMenuInput_other(void)
|
||||
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
MoveMenuCursor(-1);
|
||||
Menu_MoveCursor(-1);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
MoveMenuCursor(1);
|
||||
Menu_MoveCursor(1);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
@ -1074,13 +1074,13 @@ s8 Menu_ProcessInputNoWrapAround_other(void)
|
||||
}
|
||||
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP)
|
||||
{
|
||||
if (oldPos != MoveMenuCursorNoWrapAround(-1))
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(-1))
|
||||
PlaySE(SE_SELECT);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN)
|
||||
{
|
||||
if (oldPos != MoveMenuCursorNoWrapAround(1))
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(1))
|
||||
PlaySE(SE_SELECT);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
@ -1588,7 +1588,7 @@ u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, boo
|
||||
else
|
||||
gUnknown_0203CD90.cursorPos = pos;
|
||||
|
||||
return MoveMenuCursor(0);
|
||||
return Menu_MoveCursor(0);
|
||||
}
|
||||
|
||||
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 itemCount, u8 initialCursorPos)
|
||||
@ -1797,9 +1797,9 @@ bool8 free_temp_tile_data_buffers_if_possible(void)
|
||||
}
|
||||
}
|
||||
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, u16 offset, u8 mode)
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode)
|
||||
{
|
||||
int sizeOut;
|
||||
u32 sizeOut;
|
||||
if (gUnknown_0203CDA8 < ARRAY_COUNT(gUnknown_0203CDAC))
|
||||
{
|
||||
void *ptr = malloc_and_decompress(src, &sizeOut);
|
||||
@ -1815,9 +1815,9 @@ void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, int size, u16 offset, u8 mode)
|
||||
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode)
|
||||
{
|
||||
int sizeOut;
|
||||
u32 sizeOut;
|
||||
void *ptr = malloc_and_decompress(src, &sizeOut);
|
||||
if (!size)
|
||||
size = sizeOut;
|
||||
@ -1838,7 +1838,7 @@ void task_free_buf_after_copying_tile_data_to_vram(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void *malloc_and_decompress(const void *src, int *size)
|
||||
void *malloc_and_decompress(const void *src, u32 *size)
|
||||
{
|
||||
void *ptr;
|
||||
u8 *sizeAsBytes = (u8 *)size;
|
||||
|
@ -394,8 +394,8 @@ void sub_8122298(u16 *arg0, u16 *arg1, u8 arg2, u8 arg3, u8 arg4)
|
||||
|
||||
void LoadListMenuArrowsGfx(void)
|
||||
{
|
||||
LoadCompressedObjectPic(&gUnknown_0859F514);
|
||||
LoadCompressedObjectPalette(&gUnknown_0859F51C);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0859F514);
|
||||
LoadCompressedSpritePalette(&gUnknown_0859F51C);
|
||||
}
|
||||
|
||||
void sub_8122344(u8 *spriteIds, u8 count)
|
||||
|
@ -390,7 +390,6 @@ void sub_811FAF8(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool8 sub_811FBA4(void)
|
||||
{
|
||||
u16 i;
|
||||
|
@ -186,8 +186,8 @@ void HideMoneyBox(void)
|
||||
|
||||
void AddMoneyLabelObject(u16 x, u16 y)
|
||||
{
|
||||
LoadCompressedObjectPic(&sSpriteSheet_MoneyLabel);
|
||||
LoadCompressedObjectPalette(&sSpritePalette_MoneyLabel);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_MoneyLabel);
|
||||
LoadCompressedSpritePalette(&sSpritePalette_MoneyLabel);
|
||||
sMoneyLabelSpriteId = CreateSprite(&sSpriteTemplate_MoneyLabel, x, y, 0);
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter)
|
||||
monsCount = CalculatePlayerPartyCount();
|
||||
for (i = 0; i < monsCount; i++)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT3)
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_EGG)
|
||||
&& GetMonAbility(&gPlayerParty[0]) == ABILITY_SWARM)
|
||||
{
|
||||
divBy = 2;
|
||||
|
354
src/party_menu.c
354
src/party_menu.c
File diff suppressed because it is too large
Load Diff
@ -461,9 +461,9 @@ static void ItemStorageMenuProcessInput(u8 taskId)
|
||||
s8 r2;
|
||||
s8 inputOptionId;
|
||||
|
||||
r5 = GetMenuCursorPos();
|
||||
r5 = Menu_GetCursorPos();
|
||||
inputOptionId = Menu_ProcessInput();
|
||||
r2 = GetMenuCursorPos();
|
||||
r2 = Menu_GetCursorPos();
|
||||
switch(inputOptionId)
|
||||
{
|
||||
case -2:
|
||||
|
@ -999,8 +999,8 @@ void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 battlerId, u8 x, u8 y,
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[0]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[0]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[0]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[0]);
|
||||
spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subpriortiy);
|
||||
|
||||
gSprites[spriteId].data[0] = monSpriteId;
|
||||
@ -1101,8 +1101,8 @@ u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[0]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[0]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[0]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[0]);
|
||||
spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subPriority);
|
||||
gSprites[spriteId].data[0] = a;
|
||||
gSprites[spriteId].data[1] = g;
|
||||
@ -1245,8 +1245,8 @@ void LoadBallGfx(u8 ballId)
|
||||
|
||||
if (GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&gBallSpriteSheets[ballId]);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gBallSpritePalettes[ballId]);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[ballId]);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[ballId]);
|
||||
}
|
||||
switch (ballId)
|
||||
{
|
||||
|
@ -640,11 +640,11 @@ static bool8 LoadPokeblockMenuGfx(void)
|
||||
sPokeblockMenu->gfxState++;
|
||||
break;
|
||||
case 3:
|
||||
LoadCompressedObjectPic(&gPokeblockCase_SpriteSheet);
|
||||
LoadCompressedSpriteSheet(&gPokeblockCase_SpriteSheet);
|
||||
sPokeblockMenu->gfxState++;
|
||||
break;
|
||||
case 4:
|
||||
LoadCompressedObjectPalette(&gPokeblockCase_SpritePal);
|
||||
LoadCompressedSpritePalette(&gPokeblockCase_SpritePal);
|
||||
sPokeblockMenu->gfxState++;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -656,25 +656,25 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon)
|
||||
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
palette = GetMonSpritePalStructFromOtIdPersonality(species, trainerId, personality);
|
||||
|
||||
LoadCompressedObjectPalette(palette);
|
||||
LoadCompressedSpritePalette(palette);
|
||||
SetMultiuseSpriteTemplateToPokemon(palette->tag, 1);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 2:
|
||||
LoadCompressedObjectPic(&gPokeblockCase_SpriteSheet);
|
||||
LoadCompressedSpriteSheet(&gPokeblockCase_SpriteSheet);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 3:
|
||||
LoadCompressedObjectPalette(&gPokeblockCase_SpritePal);
|
||||
LoadCompressedSpritePalette(&gPokeblockCase_SpritePal);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 4:
|
||||
LoadCompressedObjectPic(&sPokeblock_SpriteSheet);
|
||||
LoadCompressedSpriteSheet(&sPokeblock_SpriteSheet);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 5:
|
||||
SetPokeblockSpritePal(gSpecialVar_ItemId);
|
||||
LoadCompressedObjectPalette(&sPokeblockSpritePal);
|
||||
LoadCompressedSpritePalette(&sPokeblockSpritePal);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 6:
|
||||
|
@ -1803,7 +1803,7 @@ bool8 sub_80BC514(u8 a)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
LoadCompressedObjectPic(&sInterfaceSpriteSheet[0]);
|
||||
LoadCompressedSpriteSheet(&sInterfaceSpriteSheet[0]);
|
||||
LoadSpritePalettes(sInterfaceSpritePalette);
|
||||
CreateInterfaceSprites(a);
|
||||
gMain.state++;
|
||||
@ -4815,7 +4815,7 @@ void sub_80C12E0(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
LoadCompressedObjectPic(sInterfaceSpriteSheet);
|
||||
LoadCompressedSpriteSheet(sInterfaceSpriteSheet);
|
||||
LoadSpritePalettes(sInterfaceSpritePalette);
|
||||
sub_80C2594(taskId);
|
||||
for (i = 0; i < 16; i++)
|
||||
|
@ -4091,13 +4091,13 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
case MON_DATA_LANGUAGE:
|
||||
retVal = boxMon->language;
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT1:
|
||||
case MON_DATA_SANITY_IS_BAD_EGG:
|
||||
retVal = boxMon->isBadEgg;
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT2:
|
||||
case MON_DATA_SANITY_HAS_SPECIES:
|
||||
retVal = boxMon->hasSpecies;
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT3:
|
||||
case MON_DATA_SANITY_IS_EGG:
|
||||
retVal = boxMon->isEgg;
|
||||
break;
|
||||
case MON_DATA_OT_NAME:
|
||||
@ -4298,7 +4298,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
u16 *moves = (u16 *)data;
|
||||
s32 i = 0;
|
||||
|
||||
while (moves[i] != 355)
|
||||
while (moves[i] != MOVES_COUNT)
|
||||
{
|
||||
u16 move = moves[i];
|
||||
if (substruct1->moves[0] == move
|
||||
@ -4460,13 +4460,13 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
case MON_DATA_LANGUAGE:
|
||||
SET8(boxMon->language);
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT1:
|
||||
case MON_DATA_SANITY_IS_BAD_EGG:
|
||||
SET8(boxMon->isBadEgg);
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT2:
|
||||
case MON_DATA_SANITY_HAS_SPECIES:
|
||||
SET8(boxMon->hasSpecies);
|
||||
break;
|
||||
case MON_DATA_SANITY_BIT3:
|
||||
case MON_DATA_SANITY_IS_EGG:
|
||||
SET8(boxMon->isEgg);
|
||||
break;
|
||||
case MON_DATA_OT_NAME:
|
||||
@ -4722,7 +4722,7 @@ u8 SendMonToPC(struct Pokemon* mon)
|
||||
|
||||
do
|
||||
{
|
||||
for (boxPos = 0; boxPos < 30; boxPos++)
|
||||
for (boxPos = 0; boxPos < IN_BOX_COUNT; boxPos++)
|
||||
{
|
||||
struct BoxPokemon* checkingMon = GetBoxedMonPtr(boxNo, boxPos);
|
||||
if (GetBoxMonData(checkingMon, MON_DATA_SPECIES, NULL) == SPECIES_NONE)
|
||||
@ -4739,7 +4739,7 @@ u8 SendMonToPC(struct Pokemon* mon)
|
||||
}
|
||||
|
||||
boxNo++;
|
||||
if (boxNo == 14)
|
||||
if (boxNo == TOTAL_BOXES_COUNT)
|
||||
boxNo = 0;
|
||||
} while (boxNo != StorageGetCurrentBox());
|
||||
|
||||
@ -4889,9 +4889,9 @@ bool8 IsPokemonStorageFull(void)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
for (i = 0; i < 14; i++)
|
||||
for (j = 0; j < 30; j++)
|
||||
if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
for (i = 0; i < TOTAL_BOXES_COUNT; i++)
|
||||
for (j = 0; j < IN_BOX_COUNT; j++)
|
||||
if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -6847,7 +6847,7 @@ void SetWildMonHeldItem(void)
|
||||
u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, 0);
|
||||
u16 var1 = 45;
|
||||
u16 var2 = 95;
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_BIT3, 0)
|
||||
if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG, 0)
|
||||
&& GetMonAbility(&gPlayerParty[0]) == ABILITY_COMPOUND_EYES)
|
||||
{
|
||||
var1 = 20;
|
||||
|
@ -1076,7 +1076,7 @@ u8 sub_80D2D78(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
u16 mon_icon_convert_unown_species_id(u16 species, u32 personality)
|
||||
u16 GetIconSpecies(u16 species, u32 personality)
|
||||
{
|
||||
u16 result;
|
||||
|
||||
@ -1104,7 +1104,8 @@ u16 GetUnownLetterByPersonality(u32 personality)
|
||||
{
|
||||
if (!personality)
|
||||
return 0;
|
||||
return (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 0x1C;
|
||||
else
|
||||
return (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 0x1C;
|
||||
}
|
||||
|
||||
u16 sub_80D2E84(u16 species)
|
||||
@ -1121,19 +1122,17 @@ u16 sub_80D2E84(u16 species)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(species > (SPECIES_UNOWN_B - 1))
|
||||
species = 260;
|
||||
return mon_icon_convert_unown_species_id(species, 0);
|
||||
if (species > (SPECIES_UNOWN_B - 1))
|
||||
species = SPECIES_OLD_UNOWN_J; // That's an oddly specific species.
|
||||
return GetIconSpecies(species, 0);
|
||||
}
|
||||
}
|
||||
|
||||
const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 extra)
|
||||
{
|
||||
return GetMonIconTiles(mon_icon_convert_unown_species_id(species, personality), extra);
|
||||
return GetMonIconTiles(GetIconSpecies(species, personality), extra);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sub_80D2EF8(struct Sprite *sprite)
|
||||
{
|
||||
sub_80D328C(sprite);
|
||||
@ -1220,7 +1219,7 @@ void sub_80D304C(u16 offset)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80D3080(u16 species)
|
||||
u8 GetValidMonIconPalIndex(u16 species)
|
||||
{
|
||||
if (species > SPECIES_EGG)
|
||||
species = 260;
|
||||
|
@ -210,7 +210,7 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
||||
{
|
||||
struct Pokemon *mon = &gPlayerParty[i];
|
||||
|
||||
if (GetMonData(mon, MON_DATA_SPECIES) != 0 && GetMonData(mon, MON_DATA_SANITY_BIT3) == 0)
|
||||
if (GetMonData(mon, MON_DATA_SPECIES) != 0 && GetMonData(mon, MON_DATA_SANITY_IS_EGG) == 0)
|
||||
{
|
||||
SetMonData(mon, array[index], &data);
|
||||
gotRibbon = TRUE;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1005,7 +1005,7 @@ void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex,
|
||||
pssData->maxMonIndex = maxMonIndex;
|
||||
pssData->callback = callback;
|
||||
|
||||
if (mode == PSS_MODE_UNK2)
|
||||
if (mode == PSS_MODE_BOX)
|
||||
pssData->isBoxMon = TRUE;
|
||||
else
|
||||
pssData->isBoxMon = FALSE;
|
||||
@ -1013,7 +1013,7 @@ void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex,
|
||||
switch (mode)
|
||||
{
|
||||
case PSS_MODE_NORMAL:
|
||||
case PSS_MODE_UNK2:
|
||||
case PSS_MODE_BOX:
|
||||
pssData->minPageIndex = 0;
|
||||
pssData->maxPageIndex = 3;
|
||||
break;
|
||||
@ -1255,23 +1255,23 @@ static bool8 SummaryScreen_DecompressGraphics(void)
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 7:
|
||||
LoadCompressedObjectPic(&sSpriteSheet_MoveTypes);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_MoveTypes);
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 8:
|
||||
LoadCompressedObjectPic(&gUnknown_0861D074);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0861D074);
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 9:
|
||||
LoadCompressedObjectPic(&gUnknown_0861D0F8);
|
||||
LoadCompressedSpriteSheet(&gUnknown_0861D0F8);
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 10:
|
||||
LoadCompressedObjectPalette(&gUnknown_0861D100);
|
||||
LoadCompressedSpritePalette(&gUnknown_0861D100);
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 11:
|
||||
LoadCompressedObjectPalette(&gUnknown_0861D07C);
|
||||
LoadCompressedSpritePalette(&gUnknown_0861D07C);
|
||||
pssData->unk40F0++;
|
||||
break;
|
||||
case 12:
|
||||
@ -1310,7 +1310,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a)
|
||||
sum->altAbility = GetMonData(a, MON_DATA_ALT_ABILITY);
|
||||
sum->item = GetMonData(a, MON_DATA_HELD_ITEM);
|
||||
sum->pid = GetMonData(a, MON_DATA_PERSONALITY);
|
||||
sum->sanity = GetMonData(a, MON_DATA_SANITY_BIT1);
|
||||
sum->sanity = GetMonData(a, MON_DATA_SANITY_IS_BAD_EGG);
|
||||
|
||||
if (sum->sanity)
|
||||
sum->isEgg = TRUE;
|
||||
@ -1327,7 +1327,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a)
|
||||
sum->ppBonuses = GetMonData(a, MON_DATA_PP_BONUSES);
|
||||
break;
|
||||
case 2:
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_UNK2 || pssData->unk40EF == TRUE)
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_BOX || pssData->unk40EF == TRUE)
|
||||
{
|
||||
sum->nature = GetNature(a);
|
||||
sum->currentHP = GetMonData(a, MON_DATA_HP);
|
||||
@ -3829,7 +3829,7 @@ static u8 sub_81C45F4(struct Pokemon *mon, s16 *a1)
|
||||
{
|
||||
if (gMonSpritesGfxPtr != NULL)
|
||||
{
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_UNK2 || pssData->unk40EF == TRUE)
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_BOX || pssData->unk40EF == TRUE)
|
||||
{
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites[1], summary->species2, summary->pid);
|
||||
}
|
||||
@ -3840,7 +3840,7 @@ static u8 sub_81C45F4(struct Pokemon *mon, s16 *a1)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_UNK2 || pssData->unk40EF == TRUE)
|
||||
if (pssData->monList.mons == gPlayerParty || pssData->mode == PSS_MODE_BOX || pssData->unk40EF == TRUE)
|
||||
{
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], sub_806F4F8(0, 1), summary->species2, summary->pid);
|
||||
}
|
||||
@ -3854,7 +3854,7 @@ static u8 sub_81C45F4(struct Pokemon *mon, s16 *a1)
|
||||
return -1;
|
||||
case 1:
|
||||
pal = GetMonSpritePalStructFromOtIdPersonality(summary->species2, summary->OTID, summary->pid);
|
||||
LoadCompressedObjectPalette(pal);
|
||||
LoadCompressedSpritePalette(pal);
|
||||
SetMultiuseSpriteTemplateToPokemon(pal->tag, 1);
|
||||
(*a1)++;
|
||||
return -1;
|
||||
|
@ -50,8 +50,8 @@ int GameClear(void)
|
||||
ribbonCounts[i].partyIndex = i;
|
||||
ribbonCounts[i].count = 0;
|
||||
|
||||
if (GetMonData(mon, MON_DATA_SANITY_BIT2)
|
||||
&& !GetMonData(mon, MON_DATA_SANITY_BIT3)
|
||||
if (GetMonData(mon, MON_DATA_SANITY_HAS_SPECIES)
|
||||
&& !GetMonData(mon, MON_DATA_SANITY_IS_EGG)
|
||||
&& !GetMonData(mon, MON_DATA_CHAMPION_RIBBON))
|
||||
{
|
||||
u8 val[1] = {TRUE};
|
||||
|
@ -1528,14 +1528,14 @@ static void sub_81D706C(void)
|
||||
LZDecompressWram(gRaySceneClouds1_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
LZDecompressWram(gRaySceneClouds3_Tilemap, sRayScene->tilemapBuffers[2]);
|
||||
LoadCompressedPalette(gRaySceneClouds_Pal, 0, 0x40);
|
||||
LoadCompressedObjectPic(&sUnknown_0862A8C4);
|
||||
LoadCompressedObjectPic(&sUnknown_0862A8F8);
|
||||
LoadCompressedObjectPic(&sUnknown_0862A924);
|
||||
LoadCompressedObjectPic(&sUnknown_0862A9D4);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AA14);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AA34);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862A8CC);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862A9DC);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862A8C4);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862A8F8);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862A924);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862A9D4);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AA14);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AA34);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862A8CC);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862A9DC);
|
||||
}
|
||||
|
||||
static void Task_DuoFightAnim(u8 taskId)
|
||||
@ -1943,8 +1943,8 @@ static void sub_81D7E9C(void)
|
||||
LZDecompressWram(gRaySceneOvercast_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
LZDecompressWram(gRaySceneRayquaza_Tilemap, sRayScene->tilemapBuffers[2]);
|
||||
LoadCompressedPalette(gRaySceneRayquaza_Pal, 0, 0x40);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AA90);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AA98);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AA90);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AA98);
|
||||
}
|
||||
|
||||
static void Task_RayTakesFlightAnim(u8 taskId)
|
||||
@ -2118,9 +2118,9 @@ static void sub_81D8358(void)
|
||||
LoadCompressedPalette(gRaySceneOvercast2_Pal, 0, 0x40);
|
||||
gPlttBufferUnfaded[0] = RGB_WHITE;
|
||||
gPlttBufferFaded[0] = RGB_WHITE;
|
||||
LoadCompressedObjectPic(&sUnknown_0862AAFC);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AB04);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AB0C);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AAFC);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AB04);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AB0C);
|
||||
}
|
||||
|
||||
static void sub_81D844C(void)
|
||||
@ -2489,16 +2489,16 @@ static void sub_81D8CC4(void)
|
||||
LZDecompressWram(gRaySceneHushBg_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
LZDecompressWram(gRaySceneHushRing_Map, sRayScene->tilemapBuffers[2]);
|
||||
LoadCompressedPalette(gRaySceneHushBg_Pal, 0, 0x60);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC28);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC30);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC38);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC40);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC48);
|
||||
LoadCompressedObjectPic(&sUnknown_0862AC50);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AC58);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AC60);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AC68);
|
||||
LoadCompressedObjectPalette(&sUnknown_0862AC70);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC28);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC30);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC38);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC40);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC48);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862AC50);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AC58);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AC60);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AC68);
|
||||
LoadCompressedSpritePalette(&sUnknown_0862AC70);
|
||||
}
|
||||
|
||||
static void Task_RayChasesAwayAnim(u8 taskId)
|
||||
|
@ -133,7 +133,7 @@ bool32 sub_8034D14(u32 id, s32 arg1, const struct UnkStruct3 *arg2)
|
||||
|
||||
compSpriteSheet = *(struct CompressedSpriteSheet*)(arg2->spriteSheet);
|
||||
compSpriteSheet.size = GetDecompressedDataSize(arg2->spriteSheet->data);
|
||||
gUnknown_02022E10->array[id].tileStart = LoadCompressedObjectPic(&compSpriteSheet);
|
||||
gUnknown_02022E10->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet);
|
||||
}
|
||||
|
||||
if (gUnknown_02022E10->array[id].tileStart == 0xFFFF)
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "decompress.h"
|
||||
#include "load_save.h"
|
||||
#include "overworld.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "main.h"
|
||||
#include "constants/game_stat.h"
|
||||
|
||||
|
@ -1485,7 +1485,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, ptr + 6);
|
||||
|
||||
width = GetStringWidth(6, gStringVar4, -1) / 8;
|
||||
width = GetStringWidth(6, gStringVar4, -1) / 8u;
|
||||
|
||||
if (width > 0x1C)
|
||||
width = 0x1C;
|
||||
|
@ -1640,27 +1640,27 @@ static void sub_80E2A94(u8 multichoiceId)
|
||||
{
|
||||
case 77:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 76:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 78:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 79:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 75:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 74:
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ void ShowContestEntryMonPic(void)
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
|
||||
palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
|
||||
LoadCompressedObjectPalette(palette);
|
||||
LoadCompressedSpritePalette(palette);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, 1);
|
||||
gMultiuseSpriteTemplate.paletteTag = palette->tag;
|
||||
spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0);
|
||||
|
@ -14,8 +14,8 @@ u8 sub_807521C(s16 x, s16 y, u8 a3)
|
||||
|
||||
if (GetSpriteTileStartByTag(gUnknown_0831C620.tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&gUnknown_0831C620);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gUnknown_0831C628);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gUnknown_0831C620);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gUnknown_0831C628);
|
||||
}
|
||||
|
||||
mainSpriteId = CreateInvisibleSpriteWithCallback(sub_8075370);
|
||||
|
@ -574,13 +574,13 @@ static bool8 HandleStartMenuInput(void)
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sStartMenuCursorPos = MoveMenuCursor(-1);
|
||||
sStartMenuCursorPos = Menu_MoveCursor(-1);
|
||||
}
|
||||
|
||||
if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sStartMenuCursorPos = MoveMenuCursor(1);
|
||||
sStartMenuCursorPos = Menu_MoveCursor(1);
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
|
@ -412,8 +412,8 @@ void CB2_ChooseStarter(void)
|
||||
|
||||
LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20);
|
||||
LoadPalette(gBirchBagGrassPal, 0, 0x40);
|
||||
LoadCompressedObjectPic(&gUnknown_085B1ED8[0]);
|
||||
LoadCompressedObjectPic(&gUnknown_085B1EE8[0]);
|
||||
LoadCompressedSpriteSheet(&gUnknown_085B1ED8[0]);
|
||||
LoadCompressedSpriteSheet(&gUnknown_085B1EE8[0]);
|
||||
LoadSpritePalettes(gUnknown_085B1EF8);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
||||
|
||||
|
@ -1858,7 +1858,7 @@ u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
{
|
||||
bool8 isJapanese;
|
||||
int minGlyphWidth;
|
||||
@ -1868,7 +1868,7 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
u32 lineWidth;
|
||||
const u8 *bufferPointer;
|
||||
int glyphWidth;
|
||||
u32 width;
|
||||
s32 width;
|
||||
|
||||
isJapanese = 0;
|
||||
minGlyphWidth = 0;
|
||||
@ -2028,7 +2028,8 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
|
||||
if (lineWidth > width)
|
||||
return lineWidth;
|
||||
return width;
|
||||
else
|
||||
return width;
|
||||
}
|
||||
|
||||
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
||||
|
@ -518,9 +518,9 @@ void CB2_InitTitleScreen(void)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 9;
|
||||
LoadCompressedObjectPic(&sSpriteSheet_EmeraldVersion[0]);
|
||||
LoadCompressedObjectPic(&sSpriteSheet_PressStart[0]);
|
||||
LoadCompressedObjectPic(&sPokemonLogoShineSpriteSheet[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_EmeraldVersion[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_PressStart[0]);
|
||||
LoadCompressedSpriteSheet(&sPokemonLogoShineSpriteSheet[0]);
|
||||
LoadPalette(gTitleScreenEmeraldVersionPal, 0x100, 0x20);
|
||||
LoadSpritePalette(&sSpritePalette_PressStart[0]);
|
||||
gMain.state = 2;
|
||||
|
@ -115,7 +115,7 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8
|
||||
else
|
||||
{
|
||||
sCreatingSpriteTemplate.paletteTag = paletteTag;
|
||||
LoadCompressedObjectPalette(GetMonSpritePalStructFromOtIdPersonality(species, otId, personality));
|
||||
LoadCompressedSpritePalette(GetMonSpritePalStructFromOtIdPersonality(species, otId, personality));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -128,7 +128,7 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8
|
||||
else
|
||||
{
|
||||
sCreatingSpriteTemplate.paletteTag = paletteTag;
|
||||
LoadCompressedObjectPalette(&gTrainerFrontPicPaletteTable[species]);
|
||||
LoadCompressedSpritePalette(&gTrainerFrontPicPaletteTable[species]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
src/tv.c
2
src/tv.c
@ -3469,7 +3469,7 @@ void ChangeBoxPokemonNickname(void)
|
||||
|
||||
void ChangeBoxPokemonNickname_CB(void)
|
||||
{
|
||||
SetBoxMonNickFromAnyBox(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2);
|
||||
SetBoxMonNickAt(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2);
|
||||
CB2_ReturnToFieldContinueScriptPlayMapMusic();
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ static void sub_81DA700(void)
|
||||
LZ77UnCompVram(gUnknown_0862AD54, dst2);
|
||||
LZ77UnCompVram(gUnknown_0862AF30, dst1);
|
||||
LoadPalette(gUnknown_0862B53C, 0xF0, 0x20);
|
||||
LoadCompressedObjectPic(&sUnknown_0862B724);
|
||||
LoadCompressedSpriteSheet(&sUnknown_0862B724);
|
||||
LoadSpritePalette(&sUnknown_0862B72C);
|
||||
}
|
||||
|
||||
|
@ -7,18 +7,11 @@
|
||||
#include "text.h"
|
||||
#include "new_game.h"
|
||||
#include "overworld.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "field_screen_effect.h"
|
||||
|
||||
extern const u8 gText_Peekaboo[];
|
||||
|
||||
extern u8 *GetWaldaPhrasePtr(void);
|
||||
extern bool32 IsWaldaPhraseEmpty(void);
|
||||
extern void sub_80AF168(void);
|
||||
extern void SetWaldaPhrase(const u8 *src);
|
||||
extern void SetWaldaWallpaperPatternId(u8 patternId);
|
||||
extern void SetWaldaWallpaperIconId(u8 iconId);
|
||||
extern void SetWaldaWallpaperColors(u16 backgroundColor, u16 foregroundColor);
|
||||
extern void SetWaldaWallpaperLockedOrUnlocked(bool32 unlocked);
|
||||
|
||||
// this file's functions
|
||||
static void CB2_HandleGivenWaldaPhrase(void);
|
||||
static u32 GetWaldaPhraseInputCase(u8 *inputPtr);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user