mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
3.5 asm left
This commit is contained in:
parent
aae36b5653
commit
9ffd0c7382
@ -2996,10 +2996,10 @@ sub_8171D60: @ 8171D60
|
||||
cmp r0, r1
|
||||
bne _08171D86
|
||||
adds r0, r4, 0
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
bl LoadCompressedSpriteSheetUsingHeap
|
||||
ldr r0, =gUnknown_085E50F4
|
||||
adds r0, r5, r0
|
||||
bl LoadCompressedObjectPaletteUsingHeap
|
||||
bl LoadCompressedSpritePaletteUsingHeap
|
||||
_08171D86:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
@ -5135,9 +5135,9 @@ _08172F4E:
|
||||
cmp r0, r7
|
||||
bne _08172F6E
|
||||
ldr r0, =gBattleAnimPicTable + 0x748
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
bl LoadCompressedSpriteSheetUsingHeap
|
||||
ldr r0, =gBattleAnimPaletteTable + 0x748
|
||||
bl LoadCompressedObjectPaletteUsingHeap
|
||||
bl LoadCompressedSpritePaletteUsingHeap
|
||||
_08172F6E:
|
||||
ldr r5, =sub_8172FEC
|
||||
adds r0, r5, 0
|
||||
@ -5534,9 +5534,9 @@ sub_81732B0: @ 81732B0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gBattleAnimPicTable + 0x868
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
bl LoadCompressedSpriteSheetUsingHeap
|
||||
ldr r0, =gBattleAnimPaletteTable + 0x868
|
||||
bl LoadCompressedObjectPaletteUsingHeap
|
||||
bl LoadCompressedSpritePaletteUsingHeap
|
||||
ldr r0, =0x0000281d
|
||||
bl IndexOfSpritePaletteTag
|
||||
adds r0, r4, 0
|
||||
|
@ -234,7 +234,7 @@ _0814FE90:
|
||||
_0814FE96:
|
||||
lsls r0, r4, 3
|
||||
adds r0, r6
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -11361,11 +11361,11 @@ _081B602C:
|
||||
sub_81B6040: @ 81B6040
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_08615EF8
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08615F70
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08615F00
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
@ -11506,9 +11506,9 @@ _081B6152:
|
||||
sub_81B6160: @ 81B6160
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_08615FF8
|
||||
bl LoadCompressedObjectPic
|
||||
bl LoadCompressedSpriteSheet
|
||||
ldr r0, =gUnknown_08616000
|
||||
bl LoadCompressedObjectPalette
|
||||
bl LoadCompressedSpritePalette
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
@ -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
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
@ -4,62 +4,6 @@
|
||||
.section .rodata
|
||||
|
||||
|
||||
|
||||
|
||||
.align 2
|
||||
gUnknown_0857BB1C:: @ 857BB1C
|
||||
window_template 0x00, 0x0a, 0x03, 0x14, 0x12, 0x09, 0x000a
|
||||
|
||||
.align 2
|
||||
gUnknown_0857BB24:: @ 857BB24
|
||||
.incbin "graphics/pokemon_storage/unknown_frame.4bpp"
|
||||
|
||||
.align 2
|
||||
gOamData_857BBA4:: @ 857BBA4
|
||||
.2byte 0x0100, 0x8000, 0x0400, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BBAC:: @ 857BBAC
|
||||
.2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BBBC:: @ 857BBBC
|
||||
.2byte 0x0058, 0x0058, 0x0000, 0x0000, 0x0005, 0x0005, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BBD4:: @ 857BBD4
|
||||
.2byte 0x0080, 0x0080, 0x0000, 0x0000, 0xfffb, 0xfffb, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BBEC:: @ 857BBEC
|
||||
.2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x000a, 0x000a, 0x0c00, 0x0000, 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BC0C:: @ 857BC0C
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfff6, 0xfff6, 0x0c00, 0x0000, 0x0080, 0x0080, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BC2C:: @ 857BC2C
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfffb, 0xfffb, 0x1000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_857BC44:: @ 857BC44
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_857BC54:: @ 857BC54
|
||||
.4byte gSpriteAffineAnim_857BBAC
|
||||
.4byte gSpriteAffineAnim_857BBBC
|
||||
.4byte gSpriteAffineAnim_857BBD4
|
||||
.4byte gSpriteAffineAnim_857BBEC
|
||||
.4byte gSpriteAffineAnim_857BC0C
|
||||
.4byte gSpriteAffineAnim_857BC2C
|
||||
.4byte gSpriteAffineAnim_857BC44
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_857BC70:: @ 857BC70
|
||||
spr_template 0x0007, 0xdacb, gOamData_857BBA4, gDummySpriteAnimTable, NULL, gSpriteAffineAnimTable_857BC54, SpriteCallbackDummy
|
||||
|
||||
gSpriteTemplate_857BC88:: @ 857BC88
|
||||
.2byte 0x0100, 0x0100, 0x0200, 0x0100, 0x0100, 0x0200, 0x0200, 0x0200, 0x0080, 0x0080, 0x0100, 0x0100, 0x0200, 0x0200, 0x0400, 0x0400
|
||||
|
||||
|
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,7 +3,7 @@
|
||||
|
||||
struct Bitmap
|
||||
{
|
||||
u8* pixels;
|
||||
const u8 *pixels;
|
||||
u32 width:16;
|
||||
u32 height:16;
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -4,6 +4,7 @@
|
||||
extern const u8 gMonIconPaletteIndices[];
|
||||
|
||||
const u8 *GetMonIconTiles(u16 species, bool32);
|
||||
u8 GetValidMonIconPalIndex(u16 species);
|
||||
const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
|
||||
const u16 *GetValidMonIconPalettePtr(u16 speciesId);
|
||||
u16 GetIconSpecies(u16 species, u32 personality);
|
||||
|
@ -64,6 +64,16 @@ struct UnkPSSStruct_2002370
|
||||
u8 unk_0246;
|
||||
};
|
||||
|
||||
struct UnkStorageStruct
|
||||
{
|
||||
struct Sprite *sprite;
|
||||
u8 *tiles;
|
||||
u16 palIndex;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
u8 unk10;
|
||||
};
|
||||
|
||||
struct PokemonStorageSystemData
|
||||
{
|
||||
u8 state;
|
||||
@ -229,8 +239,8 @@ struct PokemonStorageSystemData
|
||||
u8 field_21FD;
|
||||
u8 field_21FE;
|
||||
u8 inBoxMovingMode;
|
||||
u8 field_2200;
|
||||
u8 field_2201[51];
|
||||
u16 field_2200;
|
||||
struct UnkStorageStruct field_2204[3];
|
||||
u16 movingItem;
|
||||
u8 field_2236;
|
||||
u8 field_2237;
|
||||
|
@ -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[];
|
||||
|
@ -1607,8 +1607,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)
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -3545,7 +3545,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);
|
||||
@ -5716,7 +5716,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++)
|
||||
|
@ -1165,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);
|
||||
@ -3169,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);
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
38
src/bg.c
38
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;
|
||||
@ -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,11 +1035,9 @@ 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;
|
||||
@ -1077,9 +1071,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -442,7 +442,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;
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -715,13 +715,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:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -1812,7 +1812,7 @@ bool8 sub_80BC514(u8 a)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
LoadCompressedObjectPic(&sInterfaceSpriteSheet[0]);
|
||||
LoadCompressedSpriteSheet(&sInterfaceSpriteSheet[0]);
|
||||
LoadSpritePalettes(sInterfaceSpritePalette);
|
||||
CreateInterfaceSprites(a);
|
||||
gMain.state++;
|
||||
@ -4821,7 +4821,7 @@ void sub_80C12E0(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
LoadCompressedObjectPic(sInterfaceSpriteSheet);
|
||||
LoadCompressedSpriteSheet(sInterfaceSpriteSheet);
|
||||
LoadSpritePalettes(sInterfaceSpritePalette);
|
||||
sub_80C2594(taskId);
|
||||
for (i = 0; i < 16; i++)
|
||||
|
@ -1219,7 +1219,7 @@ void sub_80D304C(u16 offset)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80D3080(u16 species)
|
||||
u8 GetValidMonIconPalIndex(u16 species)
|
||||
{
|
||||
if (species > SPECIES_EGG)
|
||||
species = 260;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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:
|
||||
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ static void LoadWallClockGraphics(void)
|
||||
ResetSpriteData();
|
||||
ResetPaletteFade();
|
||||
FreeAllSpritePalettes();
|
||||
LoadCompressedObjectPic(&gUnknown_085B2208);
|
||||
LoadCompressedSpriteSheet(&gUnknown_085B2208);
|
||||
LoadSpritePalettes(gUnknown_085B2218);
|
||||
}
|
||||
|
||||
|
@ -601,7 +601,7 @@ static void nullsub_9(void)
|
||||
|
||||
}
|
||||
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template)
|
||||
u16 AddWindow8Bit(const struct WindowTemplate *template)
|
||||
{
|
||||
u16 windowId;
|
||||
u8* memAddress;
|
||||
@ -669,12 +669,12 @@ void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width,
|
||||
FillBitmapRect8Bit(&pixelRect, x, y, width, height, fillValue);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
struct Bitmap sourceRect;
|
||||
struct Bitmap destRect;
|
||||
|
||||
sourceRect.pixels = (u8*)pixels;
|
||||
sourceRect.pixels = pixels;
|
||||
sourceRect.width = srcWidth;
|
||||
sourceRect.height = srcHeight;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user