Skip to content

Commit

Permalink
Remove checkmorn/checkday/checknite macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Feb 3, 2018
1 parent 2a53d75 commit aa8db16
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 65 deletions.
4 changes: 0 additions & 4 deletions docs/event_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii

## `$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>
Expand Down
6 changes: 3 additions & 3 deletions engine/events/std_scripts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ PokecenterNurseScript:
; 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

Expand Down
8 changes: 4 additions & 4 deletions engine/phone/buenas_password.asm
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ BuenaPhoneScript2:
jump BuenaPhoneScript_Random2

BuenaPhoneScript_CheckTimeOfDay1:
checkmorn
checktime MORN
iftrue .morn
checkday
checktime DAY
iftrue .day
writetext UnknownText_0xa0d42
buttonsound
Expand All @@ -38,9 +38,9 @@ BuenaPhoneScript_AfterMidnight1:
BuenaPhoneScript_CheckTimeOfDay2:
checkcode VAR_HOUR
ifgreater 17, BuenaPhoneScript_AfterMidnight2
checkmorn
checktime MORN
iftrue .morn
checkday
checktime DAY
iftrue .day
writetext UnknownText_0xa0e29
buttonsound
Expand Down
16 changes: 8 additions & 8 deletions engine/phone/generic_calls.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ PhoneScript_Random11:
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
Expand Down Expand Up @@ -392,9 +392,9 @@ PhoneScript_AnswerPhone_Male_Nite:
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
Expand Down Expand Up @@ -549,9 +549,9 @@ PhoneScript_AnswerPhone_Female_Nite:
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
Expand Down Expand Up @@ -922,9 +922,9 @@ PhoneScript_GreetPhone_Male_Nite:
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
Expand Down
4 changes: 2 additions & 2 deletions engine/phone/phone_gossip.asm
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ KenjiAnswerPhoneScript:
jump PhoneScript_HangupText_Male

.OnBreak:
checkmorn
checktime MORN
iftrue .Morning
checknite
checktime NITE
iftrue .Night
setevent EVENT_KENJI_ON_BREAK
farwritetext KenjiBreakText
Expand Down
52 changes: 26 additions & 26 deletions engine/phone/phone_scripts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ MomPhoneLectureScript: ; 0xbcfb1
; Bill

BillPhoneScript1: ; 0xbcfc5
checkday
checktime DAY
iftrue .daygreet
checknite
checktime NITE
iftrue .nitegreet
farwritetext BillPhoneMornGreetingText
buttonsound
Expand Down Expand Up @@ -307,7 +307,7 @@ JackPhoneScript1:
iftrue .NotMonday
checkcode VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checkmorn
checktime MORN
iftrue JackMondayMorning

.NotMonday:
Expand Down Expand Up @@ -388,7 +388,7 @@ HueyPhoneScript1:
iftrue .NotWednesday
checkcode VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checknite
checktime NITE
iftrue HueyWednesdayNight

.NotWednesday:
Expand Down Expand Up @@ -432,7 +432,7 @@ GavenPhoneScript1:
iftrue .NotThursday
checkcode VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checkmorn
checktime MORN
iftrue GavenThursdayMorning

.NotThursday:
Expand Down Expand Up @@ -479,7 +479,7 @@ BethPhoneScript1:
iftrue .NotFriday
checkcode VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checkday
checktime DAY
iftrue BethFridayAfternoon

.NotFriday:
Expand Down Expand Up @@ -523,7 +523,7 @@ JosePhoneScript1:
iftrue .HasItem
checkcode VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checknite
checktime NITE
iftrue JoseSaturdayNight

.NotSaturday:
Expand Down Expand Up @@ -583,7 +583,7 @@ ReenaPhoneScript1:
iftrue .NotSunday
checkcode VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checkmorn
checktime MORN
iftrue ReenaSundayMorning

.NotSunday:
Expand Down Expand Up @@ -625,7 +625,7 @@ JoeyPhoneScript1:
iftrue .NotMonday
checkcode VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checkday
checktime DAY
iftrue JoeyMondayAfternoon

.NotMonday:
Expand Down Expand Up @@ -671,7 +671,7 @@ WadePhoneScript1:
iftrue WadeHasItem
checkcode VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checknite
checktime NITE
iftrue WadeTuesdayNight

.NotTuesday:
Expand Down Expand Up @@ -785,7 +785,7 @@ RalphPhoneScript1:
iftrue Ralph_CheckSwarm
checkcode VAR_WEEKDAY
ifnotequal WEDNESDAY, Ralph_CheckSwarm
checkmorn
checktime MORN
iftrue Ralph_WednesdayMorning
Ralph_CheckSwarm:
checkflag ENGINE_FISH_SWARM
Expand Down Expand Up @@ -847,7 +847,7 @@ LizPhoneScript1:
iftrue .NotThursday
checkcode VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checkday
checktime DAY
iftrue LizThursdayAfternoon

.NotThursday:
Expand Down Expand Up @@ -952,7 +952,7 @@ AnthonyPhoneScript1:
iftrue .NotFriday
checkcode VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checknite
checktime NITE
iftrue AnthonyFridayNight

.NotFriday:
Expand Down Expand Up @@ -1016,7 +1016,7 @@ ToddPhoneScript1:
iftrue .NotSaturday
checkcode VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checkmorn
checktime MORN
iftrue ToddSaturdayMorning

.NotSaturday:
Expand Down Expand Up @@ -1080,7 +1080,7 @@ GinaPhoneScript1:
iftrue .HasLeafStone
checkcode VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checkday
checktime DAY
iftrue GinaSundayDay

.NotSunday:
Expand Down Expand Up @@ -1175,7 +1175,7 @@ ArniePhoneScript1:
iftrue .NotTuesday
checkcode VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checkmorn
checktime MORN
iftrue ArnieTuesdayMorning

.NotTuesday:
Expand Down Expand Up @@ -1244,7 +1244,7 @@ AlanPhoneScript1:
iftrue .FireStone
checkcode VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checkday
checktime DAY
iftrue AlanWednesdayDay

.NotWednesday:
Expand Down Expand Up @@ -1307,7 +1307,7 @@ DanaPhoneScript1:
iftrue .HasThunderstone
checkcode VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checknite
checktime NITE
iftrue DanaThursdayNight

.NotThursday:
Expand Down Expand Up @@ -1373,7 +1373,7 @@ ChadPhoneScript1:
iftrue .NotFriday
checkcode VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checkmorn
checktime MORN
iftrue ChadFridayMorning

.NotFriday:
Expand Down Expand Up @@ -1474,7 +1474,7 @@ TullyPhoneScript1:
iftrue TullyHasWaterStone
checkcode VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checknite
checktime NITE
iftrue TullySundayNight

.NotSunday:
Expand Down Expand Up @@ -1533,7 +1533,7 @@ BrentPhoneScript1:
iftrue .NotMonday
checkcode VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checkmorn
checktime MORN
iftrue BrentMondayMorning

.NotMonday:
Expand Down Expand Up @@ -1580,7 +1580,7 @@ TiffanyPhoneScript1:
iftrue .HasItem
checkcode VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checkday
checktime DAY
iftrue TiffanyTuesdayAfternoon

.NotTuesday:
Expand Down Expand Up @@ -1679,7 +1679,7 @@ VancePhoneScript1:
iftrue .NotWednesday
checkcode VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checknite
checktime NITE
iftrue VanceWednesdayNight

.NotWednesday:
Expand Down Expand Up @@ -1722,7 +1722,7 @@ WiltonPhoneScript1:
iftrue .HasItem
checkcode VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checkmorn
checktime MORN
iftrue WiltonThursdayMorning

.NotThursday:
Expand Down Expand Up @@ -1810,7 +1810,7 @@ ParryPhoneScript1:
iftrue .WantsRematch
checkcode VAR_WEEKDAY
ifnotequal FRIDAY, .WantsRematch
checkday
checktime DAY
iftrue ParryFridayDay

.WantsRematch:
Expand Down Expand Up @@ -1853,7 +1853,7 @@ ErinPhoneScript1:
iftrue .NotSaturday
checkcode VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checknite
checktime NITE
iftrue ErinSaturdayNight

.NotSaturday:
Expand Down
4 changes: 0 additions & 4 deletions macros/scripts/events.asm
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,6 @@ checktime: MACRO
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
Expand Down
2 changes: 1 addition & 1 deletion maps/CeladonMansionRoofHouse.asm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PharmacistScript_0x71afd:
iftrue UnknownScript_0x71b21
writetext UnknownText_0x71b27
buttonsound
checknite
checktime NITE
iftrue UnknownScript_0x71b14
writetext UnknownText_0x71b4a
waitbutton
Expand Down
4 changes: 2 additions & 2 deletions maps/GoldenrodUnderground.asm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ GoldenrodUnderground_MapScripts:

.Monday:
disappear GOLDENRODUNDERGROUND_GRAMPS
checkmorn
checktime MORN
iffalse .NotMondayMorning
appear GOLDENRODUNDERGROUND_GRAMPS
.NotMondayMorning:
Expand Down Expand Up @@ -173,7 +173,7 @@ GrampsScript_0x7c146:
jump GoldenrodUndergroundScript_ShopClosed

.CheckMorn:
checkmorn
checktime MORN
iffalse GoldenrodUndergroundScript_ShopClosed
pokemart MARTTYPE_BARGAIN, 0
closetext
Expand Down
2 changes: 1 addition & 1 deletion maps/MountMoonSquare.asm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ClefairyDance:
iftrue .NoDancing
checkcode VAR_WEEKDAY
ifnotequal MONDAY, .NoDancing
checknite
checktime NITE
iffalse .NoDancing
appear MOUNTMOONSQUARE_FAIRY1
appear MOUNTMOONSQUARE_FAIRY2
Expand Down
6 changes: 3 additions & 3 deletions maps/PlayersHouse1F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ UnknownScript_0x7a5b8:
NeighborScript:
faceplayer
opentext
checkmorn
checktime MORN
iftrue .MornScript
checkday
checktime DAY
iftrue .DayScript
checknite
checktime NITE
iftrue .NiteScript

.MornScript:
Expand Down
Loading

0 comments on commit aa8db16

Please sign in to comment.