fixed multiple issue
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
enum {
|
enum {
|
||||||
FLDPSN_NONE,
|
FLDPSN_NONE,
|
||||||
FLDPSN_PSN,
|
FLDPSN_PSN,
|
||||||
FLDPSN_FNT,
|
FLDPSN_FNT
|
||||||
};
|
};
|
||||||
|
|
||||||
void ExecuteWhiteOut(void);
|
void ExecuteWhiteOut(void);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
#define NUM_TASKS 16
|
#define NUM_TASKS 16
|
||||||
|
#define TASK_NONE 0xFF
|
||||||
|
|
||||||
typedef void (*TaskFunc)(u8 taskId);
|
typedef void (*TaskFunc)(u8 taskId);
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ void DynamicPlaceholderTextUtil_Reset(void)
|
|||||||
{
|
{
|
||||||
*ptr2-- = fillval;
|
*ptr2-- = fillval;
|
||||||
}
|
}
|
||||||
while ((int)ptr2 >= (int)ptr);
|
while ((intptr_t)ptr2 >= (intptr_t)ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynamicPlaceholderTextUtil_SetPlaceholderPtr(u8 idx, const u8 *ptr)
|
void DynamicPlaceholderTextUtil_SetPlaceholderPtr(u8 idx, const u8 *ptr)
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@ s32 DoPoisonFieldEffect(void)
|
|||||||
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN)
|
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && pokemon_ailments_get_primary(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN)
|
||||||
{
|
{
|
||||||
hp = GetMonData(pokemon, MON_DATA_HP);
|
hp = GetMonData(pokemon, MON_DATA_HP);
|
||||||
if (!hp || !--hp)
|
if (hp == 0 || --hp == 0)
|
||||||
numFainted++;
|
numFainted++;
|
||||||
SetMonData(pokemon, MON_DATA_HP, &hp);
|
SetMonData(pokemon, MON_DATA_HP, &hp);
|
||||||
numPoisoned++;
|
numPoisoned++;
|
||||||
|
|||||||
+4
-8
@@ -132,11 +132,11 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sMysteryGiftLinkMenu.currItemId = ListMenu_ProcessInput(sMysteryGiftLinkMenu.listTaskId);
|
sMysteryGiftLinkMenu.currItemId = ListMenu_ProcessInput(sMysteryGiftLinkMenu.listTaskId);
|
||||||
if (gMain.newKeys & A_BUTTON)
|
if (JOY_NEW(A_BUTTON))
|
||||||
{
|
{
|
||||||
sMysteryGiftLinkMenu.state = 2;
|
sMysteryGiftLinkMenu.state = 2;
|
||||||
}
|
}
|
||||||
if (gMain.newKeys & B_BUTTON)
|
if (JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
sMysteryGiftLinkMenu.currItemId = LIST_CANCEL;
|
sMysteryGiftLinkMenu.currItemId = LIST_CANCEL;
|
||||||
sMysteryGiftLinkMenu.state = 2;
|
sMysteryGiftLinkMenu.state = 2;
|
||||||
@@ -195,11 +195,11 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
|
|||||||
{
|
{
|
||||||
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
|
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
|
||||||
|
|
||||||
if (gMain.newKeys & A_BUTTON)
|
if (JOY_NEW(A_BUTTON))
|
||||||
{
|
{
|
||||||
return list->template.items[list->scrollOffset + list->selectedRow].index;
|
return list->template.items[list->scrollOffset + list->selectedRow].index;
|
||||||
}
|
}
|
||||||
else if (gMain.newKeys & B_BUTTON)
|
else if (JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
return LIST_CANCEL;
|
return LIST_CANCEL;
|
||||||
}
|
}
|
||||||
@@ -249,8 +249,6 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TASK_NONE 0xFF
|
|
||||||
|
|
||||||
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
|
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
|
||||||
{
|
{
|
||||||
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
|
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
|
||||||
@@ -434,8 +432,6 @@ static void ListMenuDrawCursor(struct ListMenu *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef TASK_NONE
|
|
||||||
|
|
||||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
||||||
{
|
{
|
||||||
struct CursorStruct cursor;
|
struct CursorStruct cursor;
|
||||||
|
|||||||
Reference in New Issue
Block a user