ref: 0ba261a3fdc221cc6df82e479598830e54444034
parent: 4d532beee6310c8cfd1d8f7d26d623d176fb0027
author: IIMarckus <iimarckus@gmail.com>
date: Tue Jun 23 08:28:48 EDT 2015
Introduce checkmorn/checkday/checknite to replace checktime.
--- a/engine/buena_phone_scripts.asm
+++ b/engine/buena_phone_scripts.asm
@@ -13,9 +13,9 @@
jump UnknownScript_0xa0b77
UnknownScript_0xa0b32:
- checktime $1
+ checkmorn
iftrue UnknownScript_0xa0b41
- checktime $2
+ checkday
iftrue UnknownScript_0xa0b46
writetext UnknownText_0xa0d42
keeptextopen
@@ -38,9 +38,9 @@
UnknownScript_0xa0b4f:
checkcode $a
if_greater_than $11, UnknownScript_0xa0b6e
- checktime $1
+ checkmorn
iftrue UnknownScript_0xa0b64
- checktime $2
+ checkday
iftrue UnknownScript_0xa0b69
writetext UnknownText_0xa0e29
keeptextopen
--- a/engine/more_phone_scripts.asm
+++ b/engine/more_phone_scripts.asm
@@ -1472,9 +1472,9 @@
jump UnknownScript_0xa0484
UnknownScript_0xa0a08:
- checktime $1
+ checkmorn
iftrue UnknownScript_0xa0a1d
- checktime $4
+ checknite
iftrue UnknownScript_0xa0a25
setevent $026a
farwritetext UnknownText_0x66f11
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -146,9 +146,9 @@
jump MomPhoneWontSaveMoneyScript
BillPhoneScript1: ; 0xbcfc5
- checktime $2
+ checkday
iftrue .daygreet
- checktime $4
+ checknite
iftrue .nitegreet
farwritetext BillPhoneMornGreetingText
keeptextopen
@@ -300,7 +300,7 @@
iftrue UnknownScript_0xbd0ef
checkcode $b
if_not_equal $1, UnknownScript_0xbd0ef
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd12a
UnknownScript_0xbd0ef:
@@ -377,7 +377,7 @@
iftrue UnknownScript_0xbd19b
checkcode $b
if_not_equal $3, UnknownScript_0xbd19b
- checktime $4
+ checknite
iftrue UnknownScript_0xbd1cd
UnknownScript_0xbd19b:
@@ -419,7 +419,7 @@
iftrue UnknownScript_0xbd1f9
checkcode $b
if_not_equal $4, UnknownScript_0xbd1f9
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd22c
UnknownScript_0xbd1f9:
@@ -464,7 +464,7 @@
iftrue UnknownScript_0xbd25c
checkcode $b
if_not_equal $5, UnknownScript_0xbd25c
- checktime $2
+ checkday
iftrue UnknownScript_0xbd287
UnknownScript_0xbd25c:
@@ -506,7 +506,7 @@
iftrue UnknownScript_0xbd2c4
checkcode $b
if_not_equal $6, UnknownScript_0xbd2b9
- checktime $4
+ checknite
iftrue UnknownScript_0xbd301
UnknownScript_0xbd2b9:
@@ -564,7 +564,7 @@
iftrue UnknownScript_0xbd33b
checkcode $b
if_not_equal $0, UnknownScript_0xbd33b
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd366
UnknownScript_0xbd33b:
@@ -604,7 +604,7 @@
iftrue UnknownScript_0xbd392
checkcode $b
if_not_equal $1, UnknownScript_0xbd392
- checktime $2
+ checkday
iftrue UnknownScript_0xbd3c4
UnknownScript_0xbd392:
@@ -648,7 +648,7 @@
iftrue UnknownScript_0xbd421
checkcode $b
if_not_equal $2, UnknownScript_0xbd3f6
- checktime $4
+ checknite
iftrue UnknownScript_0xbd484
UnknownScript_0xbd3f6:
@@ -760,7 +760,7 @@
iftrue UnknownScript_0xbd4f1
checkcode $b
if_not_equal $3, UnknownScript_0xbd4f1
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd537
UnknownScript_0xbd4f1:
@@ -823,7 +823,7 @@
iftrue UnknownScript_0xbd57f
checkcode $b
if_not_equal $4, UnknownScript_0xbd57f
- checktime $2
+ checkday
iftrue UnknownScript_0xbd5c3
UnknownScript_0xbd57f:
@@ -926,7 +926,7 @@
iftrue UnknownScript_0xbd653
checkcode $b
if_not_equal $5, UnknownScript_0xbd653
- checktime $4
+ checknite
iftrue UnknownScript_0xbd699
UnknownScript_0xbd653:
@@ -988,7 +988,7 @@
iftrue UnknownScript_0xbd6e0
checkcode $b
if_not_equal $6, UnknownScript_0xbd6e0
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd72b
UnknownScript_0xbd6e0:
@@ -1050,7 +1050,7 @@
iftrue UnknownScript_0xbd77d
checkcode $b
if_not_equal $0, UnknownScript_0xbd768
- checktime $2
+ checkday
iftrue UnknownScript_0xbd7cc
UnknownScript_0xbd768:
@@ -1141,7 +1141,7 @@
iftrue UnknownScript_0xbd832
checkcode $b
if_not_equal $2, UnknownScript_0xbd832
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbd87a
UnknownScript_0xbd832:
@@ -1208,7 +1208,7 @@
iftrue UnknownScript_0xbd8d6
checkcode $b
if_not_equal $3, UnknownScript_0xbd8cb
- checktime $2
+ checkday
iftrue UnknownScript_0xbd919
UnknownScript_0xbd8cb:
@@ -1269,7 +1269,7 @@
iftrue UnknownScript_0xbd960
checkcode $b
if_not_equal $4, UnknownScript_0xbd955
- checktime $4
+ checknite
iftrue UnknownScript_0xbd9ab
UnknownScript_0xbd955:
@@ -1333,7 +1333,7 @@
iftrue UnknownScript_0xbd9e5
checkcode $b
if_not_equal $5, UnknownScript_0xbd9e5
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbda20
UnknownScript_0xbd9e5:
@@ -1434,7 +1434,7 @@
iftrue UnknownScript_0xbdadc
checkcode $b
if_not_equal $0, UnknownScript_0xbdad1
- checktime $4
+ checknite
iftrue UnknownScript_0xbdb1f
UnknownScript_0xbdad1:
@@ -1493,7 +1493,7 @@
iftrue UnknownScript_0xbdb55
checkcode $b
if_not_equal $1, UnknownScript_0xbdb55
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbdb88
UnknownScript_0xbdb55:
@@ -1540,7 +1540,7 @@
iftrue UnknownScript_0xbdbc9
checkcode $b
if_not_equal $2, UnknownScript_0xbdbbe
- checktime $2
+ checkday
iftrue UnknownScript_0xbdc14
UnknownScript_0xbdbbe:
@@ -1637,7 +1637,7 @@
iftrue UnknownScript_0xbdc92
checkcode $b
if_not_equal $3, UnknownScript_0xbdc92
- checktime $4
+ checknite
iftrue UnknownScript_0xbdcc1
UnknownScript_0xbdc92:
@@ -1680,7 +1680,7 @@
iftrue UnknownScript_0xbdcfe
checkcode $b
if_not_equal $4, UnknownScript_0xbdcf3
- checktime $1
+ checkmorn
iftrue UnknownScript_0xbdd33
UnknownScript_0xbdcf3:
@@ -1764,7 +1764,7 @@
iftrue UnknownScript_0xbdda8
checkcode $b
if_not_equal $5, UnknownScript_0xbdda8
- checktime $2
+ checkday
iftrue UnknownScript_0xbddd7
UnknownScript_0xbdda8:
@@ -1805,7 +1805,7 @@
iftrue UnknownScript_0xbde03
checkcode $b
if_not_equal $6, UnknownScript_0xbde03
- checktime $4
+ checknite
iftrue UnknownScript_0xbde32
UnknownScript_0xbde03:
@@ -1858,9 +1858,9 @@
end
UnknownScript_0xbde4e:
- checktime $2
+ checkday
iftrue UnknownScript_0xbdf22
- checktime $4
+ checknite
iftrue UnknownScript_0xbdfec
checkcode $17
if_equal $5, UnknownScript_0xbdeaa
@@ -2231,9 +2231,9 @@
end
UnknownScript_0xbe0b6:
- checktime $2
+ checkday
iftrue UnknownScript_0xbe112
- checktime $4
+ checknite
iftrue UnknownScript_0xbe164
checkcode $17
if_equal $6, UnknownScript_0xbe0e2
@@ -2388,9 +2388,9 @@
end
UnknownScript_0xbe1b6:
- checktime $2
+ checkday
iftrue UnknownScript_0xbe28a
- checktime $4
+ checknite
iftrue UnknownScript_0xbe354
checkcode $17
if_equal $5, UnknownScript_0xbe212
@@ -2761,9 +2761,9 @@
end
UnknownScript_0xbe41e:
- checktime $2
+ checkday
iftrue UnknownScript_0xbe47a
- checktime $4
+ checknite
iftrue UnknownScript_0xbe4cc
checkcode $17
if_equal $6, UnknownScript_0xbe44a
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -59,13 +59,13 @@
loadfont
; The nurse has different text for:
; Morn
- checktime $1
+ checkmorn
iftrue .morn
; Day
- checktime $2
+ checkday
iftrue .day
; Nite
- checktime $4
+ checknite
iftrue .nite
; If somehow it's not a time of day at all, we skip the introduction
jump .heal
--- a/macros/event.asm
+++ b/macros/event.asm
@@ -287,6 +287,10 @@
db \1 ; time
endm
+checkmorn EQUS "checktime 1"
+checkday EQUS "checktime 2"
+checknite EQUS "checktime 4"
+
enum checkpoke_command
checkpoke: macro
db checkpoke_command
--- a/maps/CeladonMansionRoofHouse.asm
+++ b/maps/CeladonMansionRoofHouse.asm
@@ -13,7 +13,7 @@
iftrue UnknownScript_0x71b21
writetext UnknownText_0x71b27
keeptextopen
- checktime $4
+ checknite
iftrue UnknownScript_0x71b14
writetext UnknownText_0x71b4a
closetext
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -170,11 +170,11 @@
NeighborScript:
faceplayer
loadfont
- checktime $1
+ checkmorn
iftrue .MornScript
- checktime $2
+ checkday
iftrue .DayScript
- checktime $4
+ checknite
iftrue .NiteScript
.MornScript
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -34,7 +34,7 @@
iftrue UnknownScript_0x77117
checkcode $b
if_not_equal MONDAY, UnknownScript_0x77117
- checktime $4
+ checknite
iffalse UnknownScript_0x77117
appear $2
appear $3
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -157,9 +157,9 @@
CooltrainerMScript_0x1a1031: ; 0x1a1031
faceplayer
loadfont
- checktime $2
+ checkday
iftrue UnknownScript_0x1a103d
- checktime $4
+ checknite
iftrue UnknownScript_0x1a1043
UnknownScript_0x1a103d: ; 0x1a103d
writetext UnknownText_0x1a134c
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -419,7 +419,7 @@
OfficerScript_0x7824c: ; 0x7824c
faceplayer
loadfont
- checktime $4
+ checknite
iffalse UnknownScript_0x78276
checkevent $0546
iftrue UnknownScript_0x78270
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -386,7 +386,7 @@
OfficerScript_0x19ca49: ; 0x19ca49
faceplayer
loadfont
- checktime $4
+ checknite
iffalse UnknownScript_0x19ca73
checkevent $0547
iftrue UnknownScript_0x19ca6d
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -214,7 +214,7 @@
PokefanFScript_0x1a5bbe: ; 0x1a5bbe
faceplayer
loadfont
- checktime $4
+ checknite
iffalse UnknownScript_0x1a5be5
checkevent $05c2
iftrue UnknownScript_0x1a5bdf
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -56,9 +56,9 @@
UnknownScript_0x19e0e4: ; 0x19e0e4
checkcode $1a
if_not_equal $1, UnknownScript_0x19e127
- checktime $1
+ checkmorn
iftrue UnknownScript_0x19e10c
- checktime $4
+ checknite
iftrue UnknownScript_0x19e112
checkevent $026a
iffalse UnknownScript_0x19e127
--- a/maps/WarehouseEntrance.asm
+++ b/maps/WarehouseEntrance.asm
@@ -63,7 +63,7 @@
UnknownScript_0x7c0a5: ; 0x7c0a5
disappear $7
- checktime $1
+ checkmorn
iffalse UnknownScript_0x7c0ae
appear $7
UnknownScript_0x7c0ae: ; 0x7c0ae
@@ -253,7 +253,7 @@
; 0x7c156
UnknownScript_0x7c156: ; 0x7c156
- checktime $1
+ checkmorn
iffalse UnknownScript_0x7c300
pokemart $2, $0000
loadmovesprites