This commit is contained in:
KDSKardabox
2018-02-18 17:35:36 +05:30
31 changed files with 6276 additions and 13911 deletions

11
include/credits.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef GUARD_CREDITS_H
#define GUARD_CREDITS_H
// Exported type declarations
// Exported RAM declarations
extern EWRAM_DATA bool8 gHasHallOfFameRecords;
// Exported ROM declarations
#endif //GUARD_CREDITS_H

View File

@@ -28,7 +28,6 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32
void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic);
void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic);
extern u8 gDecompressionBuffer[];
u32 sub_8034974(const u8 *ptr);
#endif // GUARD_DECOMPRESS_H

View File

@@ -624,23 +624,6 @@
#define TIMER_INTR_ENABLE 0x40
#define TIMER_ENABLE 0x80
// BGCNT
#define BGCNT_PRIORITY(n) (n) // Values 0 - 3. Lower priority BGs will be drawn on top of higher priority BGs.
#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for tile pixel data.
#define BGCNT_MOSAIC 0x0040
#define BGCNT_16COLOR 0x0000 // 4 bits per pixel
#define BGCNT_256COLOR 0x0080 // 8 bits per pixel
#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for tile map.
#define BGCNT_WRAP 0x2000 // Only affects affine BGs. Text BGs wrap by default.
#define BGCNT_TXT256x256 0x0000 // Internal screen size size of text mode BG in pixels.
#define BGCNT_TXT512x256 0x4000
#define BGCNT_TXT256x512 0x8000
#define BGCNT_TXT512x512 0xC000
#define BGCNT_AFF128x128 0x0000 // Internal screen size size of affine mode BG in pixels.
#define BGCNT_AFF256x256 0x4000
#define BGCNT_AFF512x512 0x8000
#define BGCNT_AFF1024x1024 0xC000
// serial
#define SIO_ID 0x0030 // Communication ID

View File

@@ -35,6 +35,12 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
// Converts a Q8.8 fixed-point format number to a regular integer
#define Q_8_8_TO_INT(n) ((int)((n) / 256))
// Converts a Q4.12 fixed-point format number to a regular integer
#define Q_4_12_TO_INT(n) ((int)((n) / 4096))
#define PARTY_SIZE 6
#define POKEMON_NAME_LENGTH 10

View File

@@ -2725,4 +2725,49 @@ extern const u16 gBagScreenFemale_Pal[];
extern const u16 gBagScreenMale_Pal[];
extern const u8 gBagMenuHMIcon_Gfx[];
//intro graphics
extern const u8 gIntro1SparkleGfx[];
extern const u8 gIntro1FlygonGfx[];
extern const u16 gIntro3LightningPal[];
extern const u8 gIntroCopyright_Gfx[];
extern const u8 gIntroCopyright_Tilemap[];
extern const u16 gIntroCopyright_Pal[16];
extern const u8 gIntro2VolbeatGfx[];
extern const u8 gIntro2TorchicGfx[];
extern const u8 gIntro2ManectricGfx[];
extern const u16 gIntro2VolbeatPal[];
extern const u16 gIntro2TorchicPal[];
extern const u16 gIntro2ManectricPal[];
extern const u8 gIntro2BubblesGfx[];
extern const u16 gIntro2BubblesPal[];
extern const u8 gIntro3LightningGfx[];
extern const u8 gIntro3GroudonGfx[];
extern const u8 gIntro3GroudonTilemap[];
extern const u8 gIntro3LegendBgGfx[];
extern const u8 gIntro3GroudonBgTilemap[];
extern const u8 gIntro3GroudonBgTilemap[];
extern const u8 gIntro3BgPal[0x200];
extern const u8 gIntro3KyogreGfx[];
extern const u8 gIntro3KyogreTilemap[];
extern const u8 gIntro3KyogreBgTilemap[];
extern const u8 gIntro3CloudsGfx[];
extern const u8 gIntro3Clouds1Tilemap[];
extern const u8 gIntro3Clouds2Tilemap[];
extern const u8 gIntro3Clouds3Tilemap[];
extern const u8 gIntro3Clouds4Tilemap[];
extern const u8 gIntro3RayquazaTilemap[];
extern const u8 gIntro3RayquazaGfx[];
extern const u8 gIntro3Clouds2Gfx[];
extern const u16 gIntro1GameFreakTextFadePal[];
//intro/credits graphics
extern const u8 gIntro2BrendanNoTurnGfx[];
extern const u8 gIntro2MayNoTurnGfx[];
extern const u16 gIntro2BrendanNoTurnPal[];
extern const u16 gIntro2FlygonPal[];
extern const u8 gIntro2FlygonGfx[];
//credits
extern const u8 gCreditsCopyrightEnd_Gfx[];
#endif //GUARD_GRAPHICS_H

View File

@@ -6,7 +6,7 @@
// Exported RAM declarations
// Exported ROM declarations
void c2_copyright_1(void);
void CB2_InitCopyrightScreenAfterBootup(void);
void CB2_InitCopyrightScreenAfterBootup(void);
void CB2_InitCopyrightScreenAfterTitleScreen(void);
void sub_816F2A8(u16, u16, u16, u16);

View File

@@ -0,0 +1,30 @@
#ifndef GUARD_INTRO_CREDITS_GRAPHICS_H
#define GUARD_INTRO_CREDITS_GRAPHICS_H
extern u16 gUnknown_0203BD24;
extern s16 gUnknown_0203BD26;
extern s16 gUnknown_0203BD28;
extern const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2MaySpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[];
extern const struct SpritePalette gUnknown_085F530C[];
extern const struct CompressedSpriteSheet gUnknown_085F5334[];
extern const struct CompressedSpriteSheet gUnknown_085F5344[];
extern const struct CompressedSpriteSheet gUnknown_085F5354[];
extern const struct CompressedSpriteSheet gUnknown_085F53AC[];
extern const struct CompressedSpriteSheet gUnknown_085F53BC[];
extern const struct SpritePalette gUnknown_085F5384[];
void load_intro_part2_graphics(u8 a);
void sub_817B150(u8 a);
void sub_817B1C8(u8);
void sub_817B3A8(u8);
u8 sub_817B3DC(u8 a, u16 b, u16 c, u16 d);
void sub_817B540(u8);
u8 intro_create_brendan_sprite(s16 a, s16 b);
u8 intro_create_may_sprite(s16 a, s16 b);
u8 intro_create_flygon_sprite(s16 a, s16 b);
#endif // GUARD_INTRO_CREDITS_GRAPHICS_H

17
include/libgcnmultiboot.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef GUARD_LIBGCMMULTIBOOT_H
#define GUARD_LIBGCNMULTIBOOT_H
struct GcmbStruct
{
u16 gcmb_field_0;
vu8 gcmb_field_2;
u8 filler3[0x2C - 0x3];
};
void GameCubeMultiBoot_Main(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_ExecuteProgram(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_Init(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_HandleSerialInterrupt(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_Quit(void);
#endif // GUARD_LIBGCNMULTIBOOT_H

View File

@@ -0,0 +1,6 @@
#ifndef GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H
#define GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H
extern const u16 gMultiBootProgram_PokemonColosseum_Start[0x14000];
#endif // GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H

View File

@@ -17,7 +17,6 @@ enum
};
s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
u16 sub_80C0E9C(u16, s16, s16, u16);
#endif // GUARD_POKEDEX_H

View File

@@ -47,19 +47,19 @@ enum
// Do save types
enum
{
NORMAL_SAVE,
LINK_SAVE,
//EREADER_SAVE, // depreciated in Emerald
LINK2_SAVE, // unknown 2nd link save
HOF_SAVE,
DIFFERENT_FILE_SAVE,
HOF_DELETE_SAVE // unused
SAVE_NORMAL,
SAVE_LINK,
//EREADER_SAVE, // deprecated in Emerald
SAVE_LINK2, // unknown 2nd link save
SAVE_HALL_OF_FAME,
SAVE_OVERWRITE_DIFFERENT_FILE,
SAVE_HALL_OF_FAME_ERASE_BEFORE // unused
};
#define SECTION_ID_RECORDED_BATTLE 31
void ClearSaveData(void);
void ResetSaveCounters(void);
void Save_ResetSaveCounters(void);
bool32 SetDamagedSectorBits(u8 op, u8 bit);
u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location);
u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location);
@@ -88,7 +88,7 @@ u8 sub_81533E0(void);
u8 sub_8153408(void);
u8 sub_8153430(void);
bool8 sub_8153474(void);
u8 sub_81534D0(u8 a1);
u8 Save_LoadGameData(u8 a1);
u16 sub_815355C(void);
u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
u32 sub_8153634(u8 sector, u8* src);

View File

@@ -1,6 +1,11 @@
#ifndef GUARD_STARTER_CHOOSE_H
#define GUARD_STARTER_CHOOSE_H
extern const u16 gBirchBagGrassPal[2][16];
extern const u8 gBirchBagTilemap[];
extern const u8 gBirchGrassTilemap[];
extern const u8 gBirchHelpGfx[];
u16 GetStarterPokemon(u16 chosenStarterId);
void CB2_ChooseStarter(void);