diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bg.h | 10 | ||||
-rw-r--r-- | include/blit.h | 8 | ||||
-rw-r--r-- | include/constants/maps.h | 1 | ||||
-rw-r--r-- | include/decompress.h | 12 | ||||
-rw-r--r-- | include/dma3.h | 45 | ||||
-rw-r--r-- | include/global.h | 6 | ||||
-rw-r--r-- | include/graphics.h | 14 | ||||
-rw-r--r-- | include/menu.h | 11 | ||||
-rw-r--r-- | include/mon_markings.h | 9 | ||||
-rw-r--r-- | include/pokemon.h | 15 | ||||
-rw-r--r-- | include/pokemon_icon.h | 5 | ||||
-rw-r--r-- | include/pokemon_storage_system.h | 137 | ||||
-rwxr-xr-x | include/pokemon_summary_screen.h | 3 | ||||
-rw-r--r-- | include/strings.h | 74 | ||||
-rw-r--r-- | include/text.h | 2 | ||||
-rw-r--r-- | include/window.h | 6 |
16 files changed, 242 insertions, 116 deletions
diff --git a/include/bg.h b/include/bg.h index a10abaa8d..ffcaf43ed 100644 --- a/include/bg.h +++ b/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); diff --git a/include/blit.h b/include/blit.h index 2fe99d7bd..78f67766e 100644 --- a/include/blit.h +++ b/include/blit.h @@ -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 diff --git a/include/constants/maps.h b/include/constants/maps.h index bcb778422..c65f373af 100644 --- a/include/constants/maps.h +++ b/include/constants/maps.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)) diff --git a/include/decompress.h b/include/decompress.h index 853230aea..02412defb 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -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); diff --git a/include/dma3.h b/include/dma3.h index 19a69ea80..8eff34f55 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -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); diff --git a/include/global.h b/include/global.h index e3792ac56..090ba7ce4 100644 --- a/include/global.h +++ b/include/global.h @@ -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]; }; diff --git a/include/graphics.h b/include/graphics.h index cab639f0e..cc829b5a9 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -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[]; diff --git a/include/menu.h b/include/menu.h index 2606b1f58..04677ae40 100644 --- a/include/menu.h +++ b/include/menu.h @@ -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); diff --git a/include/mon_markings.h b/include/mon_markings.h index 22c3f14a4..8e4ec58bd 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -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 diff --git a/include/pokemon.h b/include/pokemon.h index 94dae089f..cfa5cc350 100644 --- a/include/pokemon.h +++ b/include/pokemon.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[]; diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 17c7d5573..4f27ef281 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -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); diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 7f618498b..a85ee5ff4 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -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; -}; - -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); -}; +extern struct PokemonStorage *gPokemonStoragePtr; -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 diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 63d740949..34f7934e1 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.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, }; diff --git a/include/strings.h b/include/strings.h index a6f61f603..eff40d8f2 100644 --- a/include/strings.h +++ b/include/strings.h @@ -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 diff --git a/include/text.h b/include/text.h index 69cbb87ed..d9c7a9a2e 100644 --- a/include/text.h +++ b/include/text.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); diff --git a/include/window.h b/include/window.h index 692ca1d81..25573ac3e 100644 --- a/include/window.h +++ b/include/window.h @@ -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[]; |