shithub: pokecrystal

Download patch

ref: aa8db1632c8826ead8c8d246c8be265839374f7b
parent: 2a53d758079e461e5cd45c2d9a81f9b70b603815
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Feb 2 16:20:13 EST 2018

Remove checkmorn/checkday/checknite macros

--- a/docs/event_commands.md
+++ b/docs/event_commands.md
@@ -93,10 +93,6 @@
 
 ## `$2B`: <code>checktime <i>time</i></code>
 
-- **`checkmorn`:** `checktime MORN`
-- **`checkday`:** `checktime DAY`
-- **`checknite`:** `checktime NITE`
-
 ## `$2C`: <code>checkpoke <i>mon_id</i></code>
 
 ## `$2D`: <code>givepoke <i>mon_id</i>, <i>level</i>[, <i>item</i>=0[, <i>trainer</i>=0, <i>ot_name</i>, <i>nickname</i>]]</code>
--- a/engine/events/std_scripts.asm
+++ b/engine/events/std_scripts.asm
@@ -57,11 +57,11 @@
 ; EVENT_WELCOMED_TO_POKECOM_CENTER is never set
 
 	opentext
-	checkmorn
+	checktime MORN
 	iftrue .morn
-	checkday
+	checktime DAY
 	iftrue .day
-	checknite
+	checktime NITE
 	iftrue .nite
 	jump .ok
 
--- a/engine/phone/buenas_password.asm
+++ b/engine/phone/buenas_password.asm
@@ -13,9 +13,9 @@
 	jump BuenaPhoneScript_Random2
 
 BuenaPhoneScript_CheckTimeOfDay1:
-	checkmorn
+	checktime MORN
 	iftrue .morn
-	checkday
+	checktime DAY
 	iftrue .day
 	writetext UnknownText_0xa0d42
 	buttonsound
@@ -38,9 +38,9 @@
 BuenaPhoneScript_CheckTimeOfDay2:
 	checkcode VAR_HOUR
 	ifgreater 17, BuenaPhoneScript_AfterMidnight2
-	checkmorn
+	checktime MORN
 	iftrue .morn
-	checkday
+	checktime DAY
 	iftrue .day
 	writetext UnknownText_0xa0e29
 	buttonsound
--- a/engine/phone/generic_calls.asm
+++ b/engine/phone/generic_calls.asm
@@ -19,9 +19,9 @@
 	end
 
 PhoneScript_AnswerPhone_Male:
-	checkday
+	checktime DAY
 	iftrue PhoneScript_AnswerPhone_Male_Day
-	checknite
+	checktime NITE
 	iftrue PhoneScript_AnswerPhone_Male_Nite
 	checkcode VAR_CALLERID
 	ifequal PHONE_SCHOOLBOY_JACK, .Jack
@@ -392,9 +392,9 @@
 	end
 
 PhoneScript_AnswerPhone_Female:
-	checkday
+	checktime DAY
 	iftrue PhoneScript_AnswerPhone_Female_Day
-	checknite
+	checktime NITE
 	iftrue PhoneScript_AnswerPhone_Female_Nite
 	checkcode VAR_CALLERID
 	ifequal PHONE_POKEFAN_BEVERLY, .Beverly
@@ -549,9 +549,9 @@
 	end
 
 PhoneScript_GreetPhone_Male:
-	checkday
+	checktime DAY
 	iftrue PhoneScript_GreetPhone_Male_Day
-	checknite
+	checktime NITE
 	iftrue PhoneScript_GreetPhone_Male_Nite
 	checkcode VAR_CALLERID
 	ifequal PHONE_SCHOOLBOY_JACK, .Jack
@@ -922,9 +922,9 @@
 	end
 
 PhoneScript_GreetPhone_Female:
-	checkday
+	checktime DAY
 	iftrue PhoneScript_GreetPhone_Female_Day
-	checknite
+	checktime NITE
 	iftrue PhoneScript_GreetPhone_Female_Nite
 	checkcode VAR_CALLERID
 	ifequal PHONE_POKEFAN_BEVERLY, .Beverly
--- a/engine/phone/phone_gossip.asm
+++ b/engine/phone/phone_gossip.asm
@@ -510,9 +510,9 @@
 	jump PhoneScript_HangupText_Male
 
 .OnBreak:
-	checkmorn
+	checktime MORN
 	iftrue .Morning
-	checknite
+	checktime NITE
 	iftrue .Night
 	setevent EVENT_KENJI_ON_BREAK
 	farwritetext KenjiBreakText
--- a/engine/phone/phone_scripts.asm
+++ b/engine/phone/phone_scripts.asm
@@ -150,9 +150,9 @@
 ; Bill
 
 BillPhoneScript1: ; 0xbcfc5
-	checkday
+	checktime DAY
 	iftrue .daygreet
-	checknite
+	checktime NITE
 	iftrue .nitegreet
 	farwritetext BillPhoneMornGreetingText
 	buttonsound
@@ -307,7 +307,7 @@
 	iftrue .NotMonday
 	checkcode VAR_WEEKDAY
 	ifnotequal MONDAY, .NotMonday
-	checkmorn
+	checktime MORN
 	iftrue JackMondayMorning
 
 .NotMonday:
@@ -388,7 +388,7 @@
 	iftrue .NotWednesday
 	checkcode VAR_WEEKDAY
 	ifnotequal WEDNESDAY, .NotWednesday
-	checknite
+	checktime NITE
 	iftrue HueyWednesdayNight
 
 .NotWednesday:
@@ -432,7 +432,7 @@
 	iftrue .NotThursday
 	checkcode VAR_WEEKDAY
 	ifnotequal THURSDAY, .NotThursday
-	checkmorn
+	checktime MORN
 	iftrue GavenThursdayMorning
 
 .NotThursday:
@@ -479,7 +479,7 @@
 	iftrue .NotFriday
 	checkcode VAR_WEEKDAY
 	ifnotequal FRIDAY, .NotFriday
-	checkday
+	checktime DAY
 	iftrue BethFridayAfternoon
 
 .NotFriday:
@@ -523,7 +523,7 @@
 	iftrue .HasItem
 	checkcode VAR_WEEKDAY
 	ifnotequal SATURDAY, .NotSaturday
-	checknite
+	checktime NITE
 	iftrue JoseSaturdayNight
 
 .NotSaturday:
@@ -583,7 +583,7 @@
 	iftrue .NotSunday
 	checkcode VAR_WEEKDAY
 	ifnotequal SUNDAY, .NotSunday
-	checkmorn
+	checktime MORN
 	iftrue ReenaSundayMorning
 
 .NotSunday:
@@ -625,7 +625,7 @@
 	iftrue .NotMonday
 	checkcode VAR_WEEKDAY
 	ifnotequal MONDAY, .NotMonday
-	checkday
+	checktime DAY
 	iftrue JoeyMondayAfternoon
 
 .NotMonday:
@@ -671,7 +671,7 @@
 	iftrue WadeHasItem
 	checkcode VAR_WEEKDAY
 	ifnotequal TUESDAY, .NotTuesday
-	checknite
+	checktime NITE
 	iftrue WadeTuesdayNight
 
 .NotTuesday:
@@ -785,7 +785,7 @@
 	iftrue Ralph_CheckSwarm
 	checkcode VAR_WEEKDAY
 	ifnotequal WEDNESDAY, Ralph_CheckSwarm
-	checkmorn
+	checktime MORN
 	iftrue Ralph_WednesdayMorning
 Ralph_CheckSwarm:
 	checkflag ENGINE_FISH_SWARM
@@ -847,7 +847,7 @@
 	iftrue .NotThursday
 	checkcode VAR_WEEKDAY
 	ifnotequal THURSDAY, .NotThursday
-	checkday
+	checktime DAY
 	iftrue LizThursdayAfternoon
 
 .NotThursday:
@@ -952,7 +952,7 @@
 	iftrue .NotFriday
 	checkcode VAR_WEEKDAY
 	ifnotequal FRIDAY, .NotFriday
-	checknite
+	checktime NITE
 	iftrue AnthonyFridayNight
 
 .NotFriday:
@@ -1016,7 +1016,7 @@
 	iftrue .NotSaturday
 	checkcode VAR_WEEKDAY
 	ifnotequal SATURDAY, .NotSaturday
-	checkmorn
+	checktime MORN
 	iftrue ToddSaturdayMorning
 
 .NotSaturday:
@@ -1080,7 +1080,7 @@
 	iftrue .HasLeafStone
 	checkcode VAR_WEEKDAY
 	ifnotequal SUNDAY, .NotSunday
-	checkday
+	checktime DAY
 	iftrue GinaSundayDay
 
 .NotSunday:
@@ -1175,7 +1175,7 @@
 	iftrue .NotTuesday
 	checkcode VAR_WEEKDAY
 	ifnotequal TUESDAY, .NotTuesday
-	checkmorn
+	checktime MORN
 	iftrue ArnieTuesdayMorning
 
 .NotTuesday:
@@ -1244,7 +1244,7 @@
 	iftrue .FireStone
 	checkcode VAR_WEEKDAY
 	ifnotequal WEDNESDAY, .NotWednesday
-	checkday
+	checktime DAY
 	iftrue AlanWednesdayDay
 
 .NotWednesday:
@@ -1307,7 +1307,7 @@
 	iftrue .HasThunderstone
 	checkcode VAR_WEEKDAY
 	ifnotequal THURSDAY, .NotThursday
-	checknite
+	checktime NITE
 	iftrue DanaThursdayNight
 
 .NotThursday:
@@ -1373,7 +1373,7 @@
 	iftrue .NotFriday
 	checkcode VAR_WEEKDAY
 	ifnotequal FRIDAY, .NotFriday
-	checkmorn
+	checktime MORN
 	iftrue ChadFridayMorning
 
 .NotFriday:
@@ -1474,7 +1474,7 @@
 	iftrue TullyHasWaterStone
 	checkcode VAR_WEEKDAY
 	ifnotequal SUNDAY, .NotSunday
-	checknite
+	checktime NITE
 	iftrue TullySundayNight
 
 .NotSunday:
@@ -1533,7 +1533,7 @@
 	iftrue .NotMonday
 	checkcode VAR_WEEKDAY
 	ifnotequal MONDAY, .NotMonday
-	checkmorn
+	checktime MORN
 	iftrue BrentMondayMorning
 
 .NotMonday:
@@ -1580,7 +1580,7 @@
 	iftrue .HasItem
 	checkcode VAR_WEEKDAY
 	ifnotequal TUESDAY, .NotTuesday
-	checkday
+	checktime DAY
 	iftrue TiffanyTuesdayAfternoon
 
 .NotTuesday:
@@ -1679,7 +1679,7 @@
 	iftrue .NotWednesday
 	checkcode VAR_WEEKDAY
 	ifnotequal WEDNESDAY, .NotWednesday
-	checknite
+	checktime NITE
 	iftrue VanceWednesdayNight
 
 .NotWednesday:
@@ -1722,7 +1722,7 @@
 	iftrue .HasItem
 	checkcode VAR_WEEKDAY
 	ifnotequal THURSDAY, .NotThursday
-	checkmorn
+	checktime MORN
 	iftrue WiltonThursdayMorning
 
 .NotThursday:
@@ -1810,7 +1810,7 @@
 	iftrue .WantsRematch
 	checkcode VAR_WEEKDAY
 	ifnotequal FRIDAY, .WantsRematch
-	checkday
+	checktime DAY
 	iftrue ParryFridayDay
 
 .WantsRematch:
@@ -1853,7 +1853,7 @@
 	iftrue .NotSaturday
 	checkcode VAR_WEEKDAY
 	ifnotequal SATURDAY, .NotSaturday
-	checknite
+	checktime NITE
 	iftrue ErinSaturdayNight
 
 .NotSaturday:
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -283,10 +283,6 @@
 	db \1 ; time
 ENDM
 
-checkmorn EQUS "checktime MORN"
-checkday  EQUS "checktime DAY"
-checknite EQUS "checktime NITE"
-
 	enum checkpoke_command ; $2c
 checkpoke: MACRO
 	db checkpoke_command
--- a/maps/CeladonMansionRoofHouse.asm
+++ b/maps/CeladonMansionRoofHouse.asm
@@ -13,7 +13,7 @@
 	iftrue UnknownScript_0x71b21
 	writetext UnknownText_0x71b27
 	buttonsound
-	checknite
+	checktime NITE
 	iftrue UnknownScript_0x71b14
 	writetext UnknownText_0x71b4a
 	waitbutton
--- a/maps/GoldenrodUnderground.asm
+++ b/maps/GoldenrodUnderground.asm
@@ -64,7 +64,7 @@
 
 .Monday:
 	disappear GOLDENRODUNDERGROUND_GRAMPS
-	checkmorn
+	checktime MORN
 	iffalse .NotMondayMorning
 	appear GOLDENRODUNDERGROUND_GRAMPS
 .NotMondayMorning:
@@ -173,7 +173,7 @@
 	jump GoldenrodUndergroundScript_ShopClosed
 
 .CheckMorn:
-	checkmorn
+	checktime MORN
 	iffalse GoldenrodUndergroundScript_ShopClosed
 	pokemart MARTTYPE_BARGAIN, 0
 	closetext
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -27,7 +27,7 @@
 	iftrue .NoDancing
 	checkcode VAR_WEEKDAY
 	ifnotequal MONDAY, .NoDancing
-	checknite
+	checktime NITE
 	iffalse .NoDancing
 	appear MOUNTMOONSQUARE_FAIRY1
 	appear MOUNTMOONSQUARE_FAIRY2
--- a/maps/PlayersHouse1F.asm
+++ b/maps/PlayersHouse1F.asm
@@ -153,11 +153,11 @@
 NeighborScript:
 	faceplayer
 	opentext
-	checkmorn
+	checktime MORN
 	iftrue .MornScript
-	checkday
+	checktime DAY
 	iftrue .DayScript
-	checknite
+	checktime NITE
 	iftrue .NiteScript
 
 .MornScript:
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -148,9 +148,9 @@
 CooltrainerMScript_0x1a1031:
 	faceplayer
 	opentext
-	checkday
+	checktime DAY
 	iftrue .day_morn
-	checknite
+	checktime NITE
 	iftrue .nite
 .day_morn
 	writetext Text_WaitingForNight
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -351,7 +351,7 @@
 OfficerKeithScript:
 	faceplayer
 	opentext
-	checknite
+	checktime NITE
 	iffalse .NoFight
 	checkevent EVENT_BEAT_OFFICER_KEITH
 	iftrue .AfterScript
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -237,7 +237,7 @@
 TrainerOfficerDirk:
 	faceplayer
 	opentext
-	checknite
+	checktime NITE
 	iffalse .NotNight
 	checkevent EVENT_BEAT_OFFICER_DIRK
 	iftrue .AfterBattle
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -138,7 +138,7 @@
 TrainerPokefanfJaime:
 	faceplayer
 	opentext
-	checknite
+	checktime NITE
 	iffalse .NotNight
 	checkevent EVENT_BEAT_POKEFANF_JAIME
 	iftrue .Beaten
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -49,9 +49,9 @@
 .Registered:
 	checkcode VAR_KENJI_BREAK
 	ifnotequal 1, Route45NumberAcceptedM
-	checkmorn
+	checktime MORN
 	iftrue .Morning
-	checknite
+	checktime NITE
 	iftrue .Night
 	checkevent EVENT_KENJI_ON_BREAK
 	iffalse Route45NumberAcceptedM