Introduce checkmorn/checkday/checknite to replace checktime.

This commit is contained in:
IIMarckus 2015-06-23 12:28:48 -06:00
parent 4d532beee6
commit 0ba261a3fd
14 changed files with 61 additions and 57 deletions

View File

@ -13,9 +13,9 @@ UnknownScript_0xa0b26:
jump UnknownScript_0xa0b77 jump UnknownScript_0xa0b77
UnknownScript_0xa0b32: UnknownScript_0xa0b32:
checktime $1 checkmorn
iftrue UnknownScript_0xa0b41 iftrue UnknownScript_0xa0b41
checktime $2 checkday
iftrue UnknownScript_0xa0b46 iftrue UnknownScript_0xa0b46
writetext UnknownText_0xa0d42 writetext UnknownText_0xa0d42
keeptextopen keeptextopen
@ -38,9 +38,9 @@ UnknownScript_0xa0b4b:
UnknownScript_0xa0b4f: UnknownScript_0xa0b4f:
checkcode $a checkcode $a
if_greater_than $11, UnknownScript_0xa0b6e if_greater_than $11, UnknownScript_0xa0b6e
checktime $1 checkmorn
iftrue UnknownScript_0xa0b64 iftrue UnknownScript_0xa0b64
checktime $2 checkday
iftrue UnknownScript_0xa0b69 iftrue UnknownScript_0xa0b69
writetext UnknownText_0xa0e29 writetext UnknownText_0xa0e29
keeptextopen keeptextopen

View File

@ -1472,9 +1472,9 @@ UnknownScript_0xa0a00:
jump UnknownScript_0xa0484 jump UnknownScript_0xa0484
UnknownScript_0xa0a08: UnknownScript_0xa0a08:
checktime $1 checkmorn
iftrue UnknownScript_0xa0a1d iftrue UnknownScript_0xa0a1d
checktime $4 checknite
iftrue UnknownScript_0xa0a25 iftrue UnknownScript_0xa0a25
setevent $026a setevent $026a
farwritetext UnknownText_0x66f11 farwritetext UnknownText_0x66f11

View File

@ -146,9 +146,9 @@ MomPhoneLectureScript: ; 0xbcfb1
jump MomPhoneWontSaveMoneyScript jump MomPhoneWontSaveMoneyScript
BillPhoneScript1: ; 0xbcfc5 BillPhoneScript1: ; 0xbcfc5
checktime $2 checkday
iftrue .daygreet iftrue .daygreet
checktime $4 checknite
iftrue .nitegreet iftrue .nitegreet
farwritetext BillPhoneMornGreetingText farwritetext BillPhoneMornGreetingText
keeptextopen keeptextopen
@ -300,7 +300,7 @@ UnknownScript_0xbd0d0:
iftrue UnknownScript_0xbd0ef iftrue UnknownScript_0xbd0ef
checkcode $b checkcode $b
if_not_equal $1, UnknownScript_0xbd0ef if_not_equal $1, UnknownScript_0xbd0ef
checktime $1 checkmorn
iftrue UnknownScript_0xbd12a iftrue UnknownScript_0xbd12a
UnknownScript_0xbd0ef: UnknownScript_0xbd0ef:
@ -377,7 +377,7 @@ UnknownScript_0xbd17c:
iftrue UnknownScript_0xbd19b iftrue UnknownScript_0xbd19b
checkcode $b checkcode $b
if_not_equal $3, UnknownScript_0xbd19b if_not_equal $3, UnknownScript_0xbd19b
checktime $4 checknite
iftrue UnknownScript_0xbd1cd iftrue UnknownScript_0xbd1cd
UnknownScript_0xbd19b: UnknownScript_0xbd19b:
@ -419,7 +419,7 @@ UnknownScript_0xbd1da:
iftrue UnknownScript_0xbd1f9 iftrue UnknownScript_0xbd1f9
checkcode $b checkcode $b
if_not_equal $4, UnknownScript_0xbd1f9 if_not_equal $4, UnknownScript_0xbd1f9
checktime $1 checkmorn
iftrue UnknownScript_0xbd22c iftrue UnknownScript_0xbd22c
UnknownScript_0xbd1f9: UnknownScript_0xbd1f9:
@ -464,7 +464,7 @@ UnknownScript_0xbd23d:
iftrue UnknownScript_0xbd25c iftrue UnknownScript_0xbd25c
checkcode $b checkcode $b
if_not_equal $5, UnknownScript_0xbd25c if_not_equal $5, UnknownScript_0xbd25c
checktime $2 checkday
iftrue UnknownScript_0xbd287 iftrue UnknownScript_0xbd287
UnknownScript_0xbd25c: UnknownScript_0xbd25c:
@ -506,7 +506,7 @@ UnknownScript_0xbd294:
iftrue UnknownScript_0xbd2c4 iftrue UnknownScript_0xbd2c4
checkcode $b checkcode $b
if_not_equal $6, UnknownScript_0xbd2b9 if_not_equal $6, UnknownScript_0xbd2b9
checktime $4 checknite
iftrue UnknownScript_0xbd301 iftrue UnknownScript_0xbd301
UnknownScript_0xbd2b9: UnknownScript_0xbd2b9:
@ -564,7 +564,7 @@ UnknownScript_0xbd31c:
iftrue UnknownScript_0xbd33b iftrue UnknownScript_0xbd33b
checkcode $b checkcode $b
if_not_equal $0, UnknownScript_0xbd33b if_not_equal $0, UnknownScript_0xbd33b
checktime $1 checkmorn
iftrue UnknownScript_0xbd366 iftrue UnknownScript_0xbd366
UnknownScript_0xbd33b: UnknownScript_0xbd33b:
@ -604,7 +604,7 @@ UnknownScript_0xbd373:
iftrue UnknownScript_0xbd392 iftrue UnknownScript_0xbd392
checkcode $b checkcode $b
if_not_equal $1, UnknownScript_0xbd392 if_not_equal $1, UnknownScript_0xbd392
checktime $2 checkday
iftrue UnknownScript_0xbd3c4 iftrue UnknownScript_0xbd3c4
UnknownScript_0xbd392: UnknownScript_0xbd392:
@ -648,7 +648,7 @@ UnknownScript_0xbd3d1:
iftrue UnknownScript_0xbd421 iftrue UnknownScript_0xbd421
checkcode $b checkcode $b
if_not_equal $2, UnknownScript_0xbd3f6 if_not_equal $2, UnknownScript_0xbd3f6
checktime $4 checknite
iftrue UnknownScript_0xbd484 iftrue UnknownScript_0xbd484
UnknownScript_0xbd3f6: UnknownScript_0xbd3f6:
@ -760,7 +760,7 @@ UnknownScript_0xbd4d2:
iftrue UnknownScript_0xbd4f1 iftrue UnknownScript_0xbd4f1
checkcode $b checkcode $b
if_not_equal $3, UnknownScript_0xbd4f1 if_not_equal $3, UnknownScript_0xbd4f1
checktime $1 checkmorn
iftrue UnknownScript_0xbd537 iftrue UnknownScript_0xbd537
UnknownScript_0xbd4f1: UnknownScript_0xbd4f1:
@ -823,7 +823,7 @@ UnknownScript_0xbd560:
iftrue UnknownScript_0xbd57f iftrue UnknownScript_0xbd57f
checkcode $b checkcode $b
if_not_equal $4, UnknownScript_0xbd57f if_not_equal $4, UnknownScript_0xbd57f
checktime $2 checkday
iftrue UnknownScript_0xbd5c3 iftrue UnknownScript_0xbd5c3
UnknownScript_0xbd57f: UnknownScript_0xbd57f:
@ -926,7 +926,7 @@ UnknownScript_0xbd634:
iftrue UnknownScript_0xbd653 iftrue UnknownScript_0xbd653
checkcode $b checkcode $b
if_not_equal $5, UnknownScript_0xbd653 if_not_equal $5, UnknownScript_0xbd653
checktime $4 checknite
iftrue UnknownScript_0xbd699 iftrue UnknownScript_0xbd699
UnknownScript_0xbd653: UnknownScript_0xbd653:
@ -988,7 +988,7 @@ UnknownScript_0xbd6c1:
iftrue UnknownScript_0xbd6e0 iftrue UnknownScript_0xbd6e0
checkcode $b checkcode $b
if_not_equal $6, UnknownScript_0xbd6e0 if_not_equal $6, UnknownScript_0xbd6e0
checktime $1 checkmorn
iftrue UnknownScript_0xbd72b iftrue UnknownScript_0xbd72b
UnknownScript_0xbd6e0: UnknownScript_0xbd6e0:
@ -1050,7 +1050,7 @@ UnknownScript_0xbd743:
iftrue UnknownScript_0xbd77d iftrue UnknownScript_0xbd77d
checkcode $b checkcode $b
if_not_equal $0, UnknownScript_0xbd768 if_not_equal $0, UnknownScript_0xbd768
checktime $2 checkday
iftrue UnknownScript_0xbd7cc iftrue UnknownScript_0xbd7cc
UnknownScript_0xbd768: UnknownScript_0xbd768:
@ -1141,7 +1141,7 @@ UnknownScript_0xbd813:
iftrue UnknownScript_0xbd832 iftrue UnknownScript_0xbd832
checkcode $b checkcode $b
if_not_equal $2, UnknownScript_0xbd832 if_not_equal $2, UnknownScript_0xbd832
checktime $1 checkmorn
iftrue UnknownScript_0xbd87a iftrue UnknownScript_0xbd87a
UnknownScript_0xbd832: UnknownScript_0xbd832:
@ -1208,7 +1208,7 @@ UnknownScript_0xbd8a6:
iftrue UnknownScript_0xbd8d6 iftrue UnknownScript_0xbd8d6
checkcode $b checkcode $b
if_not_equal $3, UnknownScript_0xbd8cb if_not_equal $3, UnknownScript_0xbd8cb
checktime $2 checkday
iftrue UnknownScript_0xbd919 iftrue UnknownScript_0xbd919
UnknownScript_0xbd8cb: UnknownScript_0xbd8cb:
@ -1269,7 +1269,7 @@ UnknownScript_0xbd930:
iftrue UnknownScript_0xbd960 iftrue UnknownScript_0xbd960
checkcode $b checkcode $b
if_not_equal $4, UnknownScript_0xbd955 if_not_equal $4, UnknownScript_0xbd955
checktime $4 checknite
iftrue UnknownScript_0xbd9ab iftrue UnknownScript_0xbd9ab
UnknownScript_0xbd955: UnknownScript_0xbd955:
@ -1333,7 +1333,7 @@ UnknownScript_0xbd9c6:
iftrue UnknownScript_0xbd9e5 iftrue UnknownScript_0xbd9e5
checkcode $b checkcode $b
if_not_equal $5, UnknownScript_0xbd9e5 if_not_equal $5, UnknownScript_0xbd9e5
checktime $1 checkmorn
iftrue UnknownScript_0xbda20 iftrue UnknownScript_0xbda20
UnknownScript_0xbd9e5: UnknownScript_0xbd9e5:
@ -1434,7 +1434,7 @@ UnknownScript_0xbdaac:
iftrue UnknownScript_0xbdadc iftrue UnknownScript_0xbdadc
checkcode $b checkcode $b
if_not_equal $0, UnknownScript_0xbdad1 if_not_equal $0, UnknownScript_0xbdad1
checktime $4 checknite
iftrue UnknownScript_0xbdb1f iftrue UnknownScript_0xbdb1f
UnknownScript_0xbdad1: UnknownScript_0xbdad1:
@ -1493,7 +1493,7 @@ UnknownScript_0xbdb36:
iftrue UnknownScript_0xbdb55 iftrue UnknownScript_0xbdb55
checkcode $b checkcode $b
if_not_equal $1, UnknownScript_0xbdb55 if_not_equal $1, UnknownScript_0xbdb55
checktime $1 checkmorn
iftrue UnknownScript_0xbdb88 iftrue UnknownScript_0xbdb88
UnknownScript_0xbdb55: UnknownScript_0xbdb55:
@ -1540,7 +1540,7 @@ UnknownScript_0xbdb99:
iftrue UnknownScript_0xbdbc9 iftrue UnknownScript_0xbdbc9
checkcode $b checkcode $b
if_not_equal $2, UnknownScript_0xbdbbe if_not_equal $2, UnknownScript_0xbdbbe
checktime $2 checkday
iftrue UnknownScript_0xbdc14 iftrue UnknownScript_0xbdc14
UnknownScript_0xbdbbe: UnknownScript_0xbdbbe:
@ -1637,7 +1637,7 @@ UnknownScript_0xbdc73:
iftrue UnknownScript_0xbdc92 iftrue UnknownScript_0xbdc92
checkcode $b checkcode $b
if_not_equal $3, UnknownScript_0xbdc92 if_not_equal $3, UnknownScript_0xbdc92
checktime $4 checknite
iftrue UnknownScript_0xbdcc1 iftrue UnknownScript_0xbdcc1
UnknownScript_0xbdc92: UnknownScript_0xbdc92:
@ -1680,7 +1680,7 @@ UnknownScript_0xbdcce:
iftrue UnknownScript_0xbdcfe iftrue UnknownScript_0xbdcfe
checkcode $b checkcode $b
if_not_equal $4, UnknownScript_0xbdcf3 if_not_equal $4, UnknownScript_0xbdcf3
checktime $1 checkmorn
iftrue UnknownScript_0xbdd33 iftrue UnknownScript_0xbdd33
UnknownScript_0xbdcf3: UnknownScript_0xbdcf3:
@ -1764,7 +1764,7 @@ UnknownScript_0xbdd89:
iftrue UnknownScript_0xbdda8 iftrue UnknownScript_0xbdda8
checkcode $b checkcode $b
if_not_equal $5, UnknownScript_0xbdda8 if_not_equal $5, UnknownScript_0xbdda8
checktime $2 checkday
iftrue UnknownScript_0xbddd7 iftrue UnknownScript_0xbddd7
UnknownScript_0xbdda8: UnknownScript_0xbdda8:
@ -1805,7 +1805,7 @@ UnknownScript_0xbdde4:
iftrue UnknownScript_0xbde03 iftrue UnknownScript_0xbde03
checkcode $b checkcode $b
if_not_equal $6, UnknownScript_0xbde03 if_not_equal $6, UnknownScript_0xbde03
checktime $4 checknite
iftrue UnknownScript_0xbde32 iftrue UnknownScript_0xbde32
UnknownScript_0xbde03: UnknownScript_0xbde03:
@ -1858,9 +1858,9 @@ UnknownScript_0xbde4b:
end end
UnknownScript_0xbde4e: UnknownScript_0xbde4e:
checktime $2 checkday
iftrue UnknownScript_0xbdf22 iftrue UnknownScript_0xbdf22
checktime $4 checknite
iftrue UnknownScript_0xbdfec iftrue UnknownScript_0xbdfec
checkcode $17 checkcode $17
if_equal $5, UnknownScript_0xbdeaa if_equal $5, UnknownScript_0xbdeaa
@ -2231,9 +2231,9 @@ UnknownScript_0xbe0b0:
end end
UnknownScript_0xbe0b6: UnknownScript_0xbe0b6:
checktime $2 checkday
iftrue UnknownScript_0xbe112 iftrue UnknownScript_0xbe112
checktime $4 checknite
iftrue UnknownScript_0xbe164 iftrue UnknownScript_0xbe164
checkcode $17 checkcode $17
if_equal $6, UnknownScript_0xbe0e2 if_equal $6, UnknownScript_0xbe0e2
@ -2388,9 +2388,9 @@ UnknownScript_0xbe1b0:
end end
UnknownScript_0xbe1b6: UnknownScript_0xbe1b6:
checktime $2 checkday
iftrue UnknownScript_0xbe28a iftrue UnknownScript_0xbe28a
checktime $4 checknite
iftrue UnknownScript_0xbe354 iftrue UnknownScript_0xbe354
checkcode $17 checkcode $17
if_equal $5, UnknownScript_0xbe212 if_equal $5, UnknownScript_0xbe212
@ -2761,9 +2761,9 @@ UnknownScript_0xbe418:
end end
UnknownScript_0xbe41e: UnknownScript_0xbe41e:
checktime $2 checkday
iftrue UnknownScript_0xbe47a iftrue UnknownScript_0xbe47a
checktime $4 checknite
iftrue UnknownScript_0xbe4cc iftrue UnknownScript_0xbe4cc
checkcode $17 checkcode $17
if_equal $6, UnknownScript_0xbe44a if_equal $6, UnknownScript_0xbe44a

View File

@ -59,13 +59,13 @@ PokeCenterNurseScript: ; bc09c
loadfont loadfont
; The nurse has different text for: ; The nurse has different text for:
; Morn ; Morn
checktime $1 checkmorn
iftrue .morn iftrue .morn
; Day ; Day
checktime $2 checkday
iftrue .day iftrue .day
; Nite ; Nite
checktime $4 checknite
iftrue .nite iftrue .nite
; If somehow it's not a time of day at all, we skip the introduction ; If somehow it's not a time of day at all, we skip the introduction
jump .heal jump .heal

View File

@ -287,6 +287,10 @@ checktime: macro
db \1 ; time db \1 ; time
endm endm
checkmorn EQUS "checktime 1"
checkday EQUS "checktime 2"
checknite EQUS "checktime 4"
enum checkpoke_command enum checkpoke_command
checkpoke: macro checkpoke: macro
db checkpoke_command db checkpoke_command

View File

@ -13,7 +13,7 @@ PharmacistScript_0x71afd: ; 0x71afd
iftrue UnknownScript_0x71b21 iftrue UnknownScript_0x71b21
writetext UnknownText_0x71b27 writetext UnknownText_0x71b27
keeptextopen keeptextopen
checktime $4 checknite
iftrue UnknownScript_0x71b14 iftrue UnknownScript_0x71b14
writetext UnknownText_0x71b4a writetext UnknownText_0x71b4a
closetext closetext

View File

@ -170,11 +170,11 @@ UnknownScript_0x7a5b8: ; 0x7a5b8
NeighborScript: NeighborScript:
faceplayer faceplayer
loadfont loadfont
checktime $1 checkmorn
iftrue .MornScript iftrue .MornScript
checktime $2 checkday
iftrue .DayScript iftrue .DayScript
checktime $4 checknite
iftrue .NiteScript iftrue .NiteScript
.MornScript .MornScript

View File

@ -34,7 +34,7 @@ UnknownScript_0x7709a: ; 0x7709a
iftrue UnknownScript_0x77117 iftrue UnknownScript_0x77117
checkcode $b checkcode $b
if_not_equal MONDAY, UnknownScript_0x77117 if_not_equal MONDAY, UnknownScript_0x77117
checktime $4 checknite
iffalse UnknownScript_0x77117 iffalse UnknownScript_0x77117
appear $2 appear $2
appear $3 appear $3

View File

@ -157,9 +157,9 @@ FisherScript_0x1a102e: ; 0x1a102e
CooltrainerMScript_0x1a1031: ; 0x1a1031 CooltrainerMScript_0x1a1031: ; 0x1a1031
faceplayer faceplayer
loadfont loadfont
checktime $2 checkday
iftrue UnknownScript_0x1a103d iftrue UnknownScript_0x1a103d
checktime $4 checknite
iftrue UnknownScript_0x1a1043 iftrue UnknownScript_0x1a1043
UnknownScript_0x1a103d: ; 0x1a103d UnknownScript_0x1a103d: ; 0x1a103d
writetext UnknownText_0x1a134c writetext UnknownText_0x1a134c

View File

@ -419,7 +419,7 @@ UnknownScript_0x78248: ; 0x78248
OfficerScript_0x7824c: ; 0x7824c OfficerScript_0x7824c: ; 0x7824c
faceplayer faceplayer
loadfont loadfont
checktime $4 checknite
iffalse UnknownScript_0x78276 iffalse UnknownScript_0x78276
checkevent $0546 checkevent $0546
iftrue UnknownScript_0x78270 iftrue UnknownScript_0x78270

View File

@ -386,7 +386,7 @@ FirebreatherWaltScript: ; 0x19ca41
OfficerScript_0x19ca49: ; 0x19ca49 OfficerScript_0x19ca49: ; 0x19ca49
faceplayer faceplayer
loadfont loadfont
checktime $4 checknite
iffalse UnknownScript_0x19ca73 iffalse UnknownScript_0x19ca73
checkevent $0547 checkevent $0547
iftrue UnknownScript_0x19ca6d iftrue UnknownScript_0x19ca6d

View File

@ -214,7 +214,7 @@ PsychicNormanScript: ; 0x1a5bb6
PokefanFScript_0x1a5bbe: ; 0x1a5bbe PokefanFScript_0x1a5bbe: ; 0x1a5bbe
faceplayer faceplayer
loadfont loadfont
checktime $4 checknite
iffalse UnknownScript_0x1a5be5 iffalse UnknownScript_0x1a5be5
checkevent $05c2 checkevent $05c2
iftrue UnknownScript_0x1a5bdf iftrue UnknownScript_0x1a5bdf

View File

@ -56,9 +56,9 @@ UnknownScript_0x19e0d0: ; 0x19e0d0
UnknownScript_0x19e0e4: ; 0x19e0e4 UnknownScript_0x19e0e4: ; 0x19e0e4
checkcode $1a checkcode $1a
if_not_equal $1, UnknownScript_0x19e127 if_not_equal $1, UnknownScript_0x19e127
checktime $1 checkmorn
iftrue UnknownScript_0x19e10c iftrue UnknownScript_0x19e10c
checktime $4 checknite
iftrue UnknownScript_0x19e112 iftrue UnknownScript_0x19e112
checkevent $026a checkevent $026a
iffalse UnknownScript_0x19e127 iffalse UnknownScript_0x19e127

View File

@ -63,7 +63,7 @@ UnknownScript_0x7c082: ; 0x7c082
UnknownScript_0x7c0a5: ; 0x7c0a5 UnknownScript_0x7c0a5: ; 0x7c0a5
disappear $7 disappear $7
checktime $1 checkmorn
iffalse UnknownScript_0x7c0ae iffalse UnknownScript_0x7c0ae
appear $7 appear $7
UnknownScript_0x7c0ae: ; 0x7c0ae UnknownScript_0x7c0ae: ; 0x7c0ae
@ -253,7 +253,7 @@ GrampsScript_0x7c146: ; 0x7c146
; 0x7c156 ; 0x7c156
UnknownScript_0x7c156: ; 0x7c156 UnknownScript_0x7c156: ; 0x7c156
checktime $1 checkmorn
iffalse UnknownScript_0x7c300 iffalse UnknownScript_0x7c300
pokemart $2, $0000 pokemart $2, $0000
loadmovesprites loadmovesprites