mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 03:04:15 +01:00
Clear up misnamed time-based flags and functions
This commit is contained in:
parent
bc4cc9f78a
commit
449fb25f23
@ -313,7 +313,7 @@
|
||||
.endm
|
||||
|
||||
@ Runs time based events. In FireRed, this command is a nop.
|
||||
.macro dodailyevents
|
||||
.macro dotimebasedevents
|
||||
.byte 0x2d
|
||||
.endm
|
||||
|
||||
|
@ -1748,7 +1748,7 @@ RustboroCity_Gym_EventScript_271E84:: @ 8271E84
|
||||
|
||||
DewfordTown_EventScript_271E8B:: @ 8271E8B
|
||||
DewfordTown_Hall_EventScript_271E8B:: @ 8271E8B
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
setvar VAR_0x8004, 0
|
||||
special BufferTrendyPhraseString
|
||||
return
|
||||
|
@ -33,7 +33,7 @@ LilycoveCity_EventScript_1E2B6B:: @ 81E2B6B
|
||||
LilycoveCity_EventScript_1E2BD8:: @ 81E2BD8
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_LILYCOVE_RECEIVED_BERRY, LilycoveCity_EventScript_1E2C18
|
||||
msgbox LilycoveCity_Text_2A7244, MSGBOX_DEFAULT
|
||||
random 10
|
||||
|
@ -8,7 +8,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F693:: @ 821F693
|
||||
LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
compare VAR_POKELOT_PRIZE, 0
|
||||
goto_if_ne LilycoveCity_DepartmentStore_1F_EventScript_21F7F7
|
||||
goto_if_set FLAG_DAILY_PICKED_LOTO_TICKET, LilycoveCity_DepartmentStore_1F_EventScript_21F78D
|
||||
|
@ -52,7 +52,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_222FD8:: @ 8222FD8
|
||||
faceplayer
|
||||
compare VAR_0x405D, 2
|
||||
goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_223024
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
specialvar VAR_RESULT, GetWeekCount
|
||||
buffernumberstring 0, VAR_RESULT
|
||||
compare VAR_RESULT, 0
|
||||
@ -74,7 +74,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_22301B:: @ 822301B
|
||||
return
|
||||
|
||||
MossdeepCity_SpaceCenter_1F_EventScript_223024:: @ 8223024
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
specialvar VAR_RESULT, GetWeekCount
|
||||
buffernumberstring 0, VAR_RESULT
|
||||
compare VAR_RESULT, 0
|
||||
|
@ -4,7 +4,7 @@ PacifidlogTown_House2_MapScripts:: @ 8203791
|
||||
PacifidlogTown_House2_EventScript_203792:: @ 8203792
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
call PacifidlogTown_House2_EventScript_2037DE
|
||||
goto_if_set FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_20387E
|
||||
call_if_set FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_2037F8
|
||||
|
@ -84,7 +84,7 @@ Route104_PrettyPetalFlowerShop_EventScript_22A421:: @ 822A421
|
||||
Route104_PrettyPetalFlowerShop_EventScript_22A442:: @ 822A442
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY, Route104_PrettyPetalFlowerShop_EventScript_22A482
|
||||
msgbox Route104_PrettyPetalFlowerShop_Text_2A7A98, MSGBOX_DEFAULT
|
||||
random 8
|
||||
|
@ -159,7 +159,7 @@ Route111_Movement_1F0EB1:: @ 81F0EB1
|
||||
Route111_EventScript_1F0EB9:: @ 81F0EB9
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_ROUTE_111_RECEIVED_BERRY, Route111_EventScript_1F0EF4
|
||||
msgbox Route111_Text_2A6EBD, MSGBOX_DEFAULT
|
||||
giveitem_std ITEM_RAZZ_BERRY
|
||||
|
@ -27,7 +27,7 @@ Route114_MapScript2_1F2578: @ 81F2578
|
||||
Route114_EventScript_1F2582:: @ 81F2582
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_ROUTE_114_RECEIVED_BERRY, Route114_EventScript_1F25C7
|
||||
msgbox Route114_Text_2A6FCB, MSGBOX_DEFAULT
|
||||
random 5
|
||||
|
@ -98,7 +98,7 @@ Route120_EventScript_1F5523:: @ 81F5523
|
||||
Route120_EventScript_1F5527:: @ 81F5527
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_ROUTE_120_RECEIVED_BERRY, Route120_EventScript_1F5625
|
||||
msgbox Route120_Text_2A70C7, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 1
|
||||
|
@ -9,7 +9,7 @@ Route123_BerryMastersHouse_MapScript1_26F841: @ 826F841
|
||||
Route123_BerryMastersHouse_EventScript_26F845:: @ 826F845
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY, Route123_BerryMastersHouse_EventScript_26F8B6
|
||||
msgbox Route123_BerryMastersHouse_Text_2A7386, MSGBOX_DEFAULT
|
||||
random 10
|
||||
@ -38,7 +38,7 @@ Route123_BerryMastersHouse_EventScript_26F8B6:: @ 826F8B6
|
||||
Route123_BerryMastersHouse_EventScript_26F8C0:: @ 826F8C0
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_BERRY_MASTERS_WIFE, Route123_BerryMastersHouse_EventScript_26FA6F
|
||||
msgbox Route123_BerryMastersHouse_Text_2A74E6, MSGBOX_DEFAULT
|
||||
setvar VAR_0x8004, 13
|
||||
|
@ -18,7 +18,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_236DD5:: @ 8236DD5
|
||||
ShoalCave_LowTideEntranceRoom_EventScript_236DD9:: @ 8236DD9
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_236ED9
|
||||
checkitem ITEM_SHOAL_SALT, 4
|
||||
compare VAR_RESULT, 0
|
||||
|
@ -742,7 +742,7 @@ SootopolisCity_EventScript_1E5F10:: @ 81E5F10
|
||||
end
|
||||
|
||||
SootopolisCity_EventScript_1E5F1B:: @ 81E5F1B
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
special GetPlayerBigGuyGirlString
|
||||
goto_if_set FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY, SootopolisCity_EventScript_1E5FBB
|
||||
msgbox SootopolisCity_Text_2A7BB0, MSGBOX_DEFAULT
|
||||
|
@ -45,7 +45,7 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_clearflag
|
||||
.4byte ScrCmd_checkflag
|
||||
.4byte ScrCmd_initclock
|
||||
.4byte ScrCmd_dodailyevents
|
||||
.4byte ScrCmd_dotimebasedevents
|
||||
.4byte ScrCmd_gettime
|
||||
.4byte ScrCmd_playse
|
||||
.4byte ScrCmd_waitse
|
||||
|
@ -264,7 +264,7 @@ EventScript_Pblock1_No: @ 8293C70
|
||||
|
||||
EventScript_Pblock1_NoBerries: @ 8293C7A
|
||||
msgbox Text_Pblock1_NoBerries, MSGBOX_DEFAULT
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY, LilycoveCity_ContestLobby_EventScript_293C92
|
||||
goto LilycoveCity_ContestLobby_EventScript_293C9C
|
||||
end
|
||||
@ -551,7 +551,7 @@ LilycoveCity_ContestLobby_EventScript_293FF8: @ 8293FF8
|
||||
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
|
||||
compare VAR_RESULT, 65535
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_294028
|
||||
dodailyevents
|
||||
dotimebasedevents
|
||||
goto_if_set FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY, LilycoveCity_ContestLobby_EventScript_294028
|
||||
goto LilycoveCity_ContestLobby_EventScript_294032
|
||||
end
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
void InitEventData(void);
|
||||
void ClearTempFieldEventData(void);
|
||||
void ClearUpperFlags(void);
|
||||
void ClearDailyFlags(void);
|
||||
void DisableNationalPokedex(void);
|
||||
void EnableNationalPokedex(void);
|
||||
bool32 IsNationalPokedexEnabled(void);
|
||||
|
@ -41,7 +41,7 @@ static void UpdatePerDay(struct Time *localTime)
|
||||
if (*days != localTime->days && *days <= localTime->days)
|
||||
{
|
||||
daysSince = localTime->days - *days;
|
||||
ClearUpperFlags();
|
||||
ClearDailyFlags();
|
||||
UpdateDewfordTrendPerDay(daysSince);
|
||||
UpdateTVShowsPerDay(daysSince);
|
||||
UpdateWeatherPerDay(daysSince);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "pokedex.h"
|
||||
|
||||
#define TEMP_FLAGS_SIZE 0x4
|
||||
#define TEMP_UPPER_FLAGS_SIZE 0x8
|
||||
#define DAILY_FLAGS_SIZE 0x8
|
||||
#define TEMP_VARS_SIZE 0x20
|
||||
|
||||
EWRAM_DATA u16 gSpecialVar_0x8000 = 0;
|
||||
@ -48,10 +48,9 @@ void ClearTempFieldEventData(void)
|
||||
FlagClear(FLAG_NURSE_UNION_ROOM_REMINDER);
|
||||
}
|
||||
|
||||
// Probably had different flag splits at one point.
|
||||
void ClearUpperFlags(void)
|
||||
void ClearDailyFlags(void)
|
||||
{
|
||||
memset(gSaveBlock1Ptr->flags + 0x124, 0, TEMP_UPPER_FLAGS_SIZE);
|
||||
memset(gSaveBlock1Ptr->flags + 0x124, 0, DAILY_FLAGS_SIZE);
|
||||
}
|
||||
|
||||
void DisableNationalPokedex(void)
|
||||
|
@ -690,7 +690,7 @@ bool8 ScrCmd_initclock(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_dodailyevents(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_dotimebasedevents(struct ScriptContext *ctx)
|
||||
{
|
||||
DoTimeBasedEvents();
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user