-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
575 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
extern u16 gSpecialVar_ItemId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#pragma once | ||
|
||
extern u8 gPartyMenuUseExitCallback; | ||
|
||
#define pmStatGrowths data | ||
#define pmSetupState data[0] | ||
#define pmMonIndex data[1] | ||
#define pmUnk268 data[2] | ||
#define pmUnk272 data[7] | ||
#define pmUnk27E data[13] | ||
#define pmUnk280 data[14] | ||
#define pmUnk282 data[15] | ||
|
||
struct Unk201B000 | ||
{ | ||
struct Pokemon unk0[6]; | ||
u8 menuType; | ||
u8 promptTextId; | ||
TaskFunc menuHandler; | ||
u8 menuHandlerTaskId; | ||
u8 unk261; | ||
u8 unk262; // Never read | ||
u8 unk263; | ||
s16 data[16]; | ||
}; | ||
|
||
struct PartyMenu | ||
{ | ||
/*0x00*/ struct Pokemon *pokemon; | ||
/*0x04*/ u8 unk4; | ||
/*0x05*/ u8 primarySelectedMonIndex; | ||
/*0x06*/ u16 secondarySelectedIndex; | ||
/*0x08*/ u16 unk8; | ||
/*0x0A*/ u8 pad_0A[2]; | ||
/*0x0C*/ s32 unkC; | ||
/*0x10*/ TaskFunc unk10; | ||
/*0x14*/ TaskFunc unk14; | ||
}; | ||
|
||
extern struct Unk201B000 gPartyMenu2; | ||
extern struct PartyMenu gPartyMenu; | ||
|
||
u8 *GetMonNickname(struct Pokemon *pokemon, u8 *stringBuffer); | ||
bool8 IsBlueYellowRedFlute(u16); | ||
u8 GetMonStatusAndPokerus(struct Pokemon *mon); | ||
void sub_806F8AC(u8 taskId); | ||
void sub_806E8D0(u8 taskId, u16 b, TaskFunc c); | ||
bool8 IsMedicineIneffective(struct Pokemon *pkmn, u16 item); | ||
bool8 IsHPRecoveryItem(u16 item); | ||
bool8 ExecuteTableBasedItemEffect__(u8, u16, u8); | ||
void GetMedicineItemEffectMessage(u16); | ||
void TryPrintPartyMenuMonNickname(u8 monIndex, struct Pokemon *pokemon); | ||
void PartyMenuUpdateLevelOrStatus(struct Pokemon *, u8); | ||
void Task_ClosePartyMenuAfterText(u8 taskId); | ||
u8 DisplayPartyMenuMessage(const u8 *message, u8 noClearAfter); | ||
void PrintPartyMenuPromptText(u8 textId, u8 b); | ||
void ReturnToBagFromPartyMenu(u8 taskId); | ||
|
||
void HandleItemUsePartyMenu(u8 taskID); | ||
u8 GetItemEffectType(u16 item); | ||
void PartyMenuEraseMsgBoxAndFrame(void); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void PlaySE(u16 songNum); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.if COLORED_STATS | ||
.org 0x809ffbc | ||
ldr r0, =(@Hook | 1) | ||
bx r0 | ||
.pool | ||
|
||
.autoregion | ||
.align 2 | ||
@Hook: | ||
mov r0, r5 | ||
bl SummaryScreen_PrintPokemonStats | ||
ldr r0, =(0x80A0048 | 1) | ||
bx r0 | ||
.pool | ||
.endautoregion | ||
.endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.if REPEATED_ITEM | ||
.org 0x808b178 | ||
.word (Task_ItemUseCallback | 1) | ||
.endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "types.h" | ||
#include "pokemon.h" | ||
#include "task.h" | ||
#include "item.h" | ||
#include "party_menu.h" | ||
#include "item_menu.h" | ||
#include "menu.h" | ||
#include "item_use.h" | ||
#include "sound.h" | ||
#include "text.h" | ||
#include "constants/songs.h" | ||
#include "constants/pokemon.h" | ||
#include "palette.h" | ||
|
||
void Task_ItemUseCallback(u8 taskId) | ||
{ | ||
if (GetItemEffectType(gSpecialVar_ItemId) && CheckBagHasItem(gSpecialVar_ItemId, 1)) | ||
{ | ||
Menu_EraseWindowRect(3, 14, 26, 19); | ||
PrintPartyMenuPromptText(gPartyMenu2.promptTextId, 0); | ||
gTasks[taskId].func = HandleItemUsePartyMenu; | ||
} | ||
else | ||
ReturnToBagFromPartyMenu(taskId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters