mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-18 12:37:38 +01:00
58 lines
1.2 KiB
C
58 lines
1.2 KiB
C
|
//
|
||
|
// Created by Scott Norton on 9/19/17.
|
||
|
//
|
||
|
|
||
|
#include "global.h"
|
||
|
#include "event_data.h"
|
||
|
#include "lilycove_lady.h"
|
||
|
|
||
|
void SetLilycoveQuizLady(void);
|
||
|
void SetLilycoveFavourLady(void);
|
||
|
void SetLilycoveContestLady(void);
|
||
|
|
||
|
extern const u16 gUnknown_0860B074[];
|
||
|
extern const u16 gUnknown_0860B07E[];
|
||
|
|
||
|
u8 GetLilycoveLadyId(void)
|
||
|
{
|
||
|
return gSaveBlock1Ptr->lilycoveLady.common.id;
|
||
|
}
|
||
|
|
||
|
void sub_818D9C0(void)
|
||
|
{
|
||
|
LilycoveLady *lilycoveLady;
|
||
|
|
||
|
VarSet(VAR_0x4010, gUnknown_0860B07E[GetLilycoveLadyId()]);
|
||
|
if (GetLilycoveLadyId() == LILYCOVE_LADY_CONTEST)
|
||
|
{
|
||
|
lilycoveLady = &gSaveBlock1Ptr->lilycoveLady;
|
||
|
VarSet(VAR_0x4011, gUnknown_0860B074[lilycoveLady->contest.category]);
|
||
|
gScriptResult = TRUE;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
gScriptResult = FALSE;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void SetLilycoveLady(void)
|
||
|
{
|
||
|
u16 id;
|
||
|
|
||
|
id = ((gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0]);
|
||
|
id %= 6;
|
||
|
id >>= 1;
|
||
|
switch (id)
|
||
|
{
|
||
|
case LILYCOVE_LADY_QUIZ:
|
||
|
SetLilycoveQuizLady();
|
||
|
break;
|
||
|
case LILYCOVE_LADY_FAVOUR:
|
||
|
SetLilycoveFavourLady();
|
||
|
break;
|
||
|
case LILYCOVE_LADY_CONTEST:
|
||
|
SetLilycoveContestLady();
|
||
|
break;
|
||
|
}
|
||
|
}
|