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