Merge pull request #509 from mid-kid/master

A fix-various-little-things PR
This commit is contained in:
yenatch 2018-05-06 22:27:22 -04:00 committed by GitHub
commit 59c4d824e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 54 additions and 53 deletions

View File

@ -22,7 +22,7 @@ NUM_MEM_BUFFERS EQU const_value
const HAVE_AMOUNT ; 1 const HAVE_AMOUNT ; 1
const HAVE_LESS ; 2 const HAVE_LESS ; 2
; checkpokeitem return values ; checkpokemail return values
const_def const_def
const POKEMAIL_WRONG_MAIL ; 0 const POKEMAIL_WRONG_MAIL ; 0
const POKEMAIL_CORRECT ; 1 const POKEMAIL_CORRECT ; 1

View File

@ -1,5 +1,5 @@
; sprite ids ; sprite ids
; OverworldSprites indexes (see data/sprites.asm) ; OverworldSprites indexes (see data/sprites/sprites.asm)
const_def const_def
const SPRITE_NONE ; 00 const SPRITE_NONE ; 00
const SPRITE_CHRIS ; 01 const SPRITE_CHRIS ; 01

View File

@ -303,7 +303,7 @@ BattleAnim_SweetScent2: ; c929c
anim_ret anim_ret
; c92c1 ; c92c1
BattleAnim_ThrowPokeBall BattleAnim_ThrowPokeBall:
anim_if_param_equal NO_ITEM, .TheTrainerBlockedTheBall anim_if_param_equal NO_ITEM, .TheTrainerBlockedTheBall
anim_if_param_equal MASTER_BALL, .MasterBall anim_if_param_equal MASTER_BALL, .MasterBall
anim_if_param_equal ULTRA_BALL, .UltraBall anim_if_param_equal ULTRA_BALL, .UltraBall

View File

@ -31,6 +31,5 @@ OftenFleeMons: ; 3c5a8
AlwaysFleeMons: ; 3c5b1 AlwaysFleeMons: ; 3c5b1
db RAIKOU db RAIKOU
db ENTEI db ENTEI
; db SUICUNE
db -1 db -1
; 3c5b4 ; 3c5b4

View File

@ -1122,7 +1122,7 @@ The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActi
```asm ```asm
.Cry: ; 40340 .Cry: ; 40340
ld a, [CurPartySpecies] ld a, [wCurPartySpecies]
call PlayMonCry call PlayMonCry
ret ret
``` ```

View File

@ -99,9 +99,9 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
## `$2E`: <code>giveegg <i>mon_id</i>, <i>level</i></code> ## `$2E`: <code>giveegg <i>mon_id</i>, <i>level</i></code>
## `$2F`: <code>givepokeitem <i>pointer</i></code> ## `$2F`: <code>givepokemail <i>pointer</i></code>
## `$30`: <code>checkpokeitem <i>pointer</i></code> ## `$30`: <code>checkpokemail <i>pointer</i></code>
## `$31`: <code>checkevent <i>event_flag</i></code> ## `$31`: <code>checkevent <i>event_flag</i></code>

View File

@ -6451,7 +6451,7 @@ LoadEnemyMon: ; 3e8eb
.InitRoamHP: .InitRoamHP:
; HP only uses the lo byte in the RoamMon struct since ; HP only uses the lo byte in the RoamMon struct since
; Raikou/Entei/Suicune will have < 256 hp at level 40 ; Raikou and Entei will have < 256 hp at level 40
ld a, [wEnemyMonHP + 1] ld a, [wEnemyMonHP + 1]
ld [hl], a ld [hl], a
jr .Moves jr .Moves

View File

@ -240,7 +240,7 @@ SmashRockScript:
PokecenterSignScript: PokecenterSignScript:
farjumptext PokecenterSignText farjumptext PokecenterSignText
MartSignScript MartSignScript:
farjumptext MartSignText farjumptext MartSignText
DayToTextScript: DayToTextScript:
@ -331,30 +331,30 @@ BugContestResultsScript:
verbosegiveitem BERRY verbosegiveitem BERRY
iffalse BugContestResults_NoRoomForBerry iffalse BugContestResults_NoRoomForBerry
BugContestResults_DidNotWin BugContestResults_DidNotWin:
farwritetext ContestResults_DidNotWinText farwritetext ContestResults_DidNotWinText
buttonsound buttonsound
jump BugContestResults_FinishUp jump BugContestResults_FinishUp
; 0xbc2b1 ; 0xbc2b1
BugContestResults_ReturnAfterWinnersPrize ; 0xbc2b1 BugContestResults_ReturnAfterWinnersPrize: ; 0xbc2b1
farwritetext ContestResults_JoinUsNextTimeText farwritetext ContestResults_JoinUsNextTimeText
buttonsound buttonsound
BugContestResults_FinishUp BugContestResults_FinishUp:
checkevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER checkevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
iffalse BugContestResults_DidNotLeaveMons iffalse BugContestResults_DidNotLeaveMons
farwritetext ContestResults_ReturnPartyText farwritetext ContestResults_ReturnPartyText
waitbutton waitbutton
special ContestReturnMons special ContestReturnMons
BugContestResults_DidNotLeaveMons BugContestResults_DidNotLeaveMons:
special CheckPartyFullAfterContest special CheckPartyFullAfterContest
ifequal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp ifequal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp
ifequal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp ifequal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp
; BUGCONTEST_BOXED_MON ; BUGCONTEST_BOXED_MON
farwritetext ContestResults_PartyFullText farwritetext ContestResults_PartyFullText
waitbutton waitbutton
BugContestResults_CleanUp BugContestResults_CleanUp:
closetext closetext
setscene SCENE_ROUTE36NATIONALPARKGATE_NOTHING setscene SCENE_ROUTE36NATIONALPARKGATE_NOTHING
setmapscene ROUTE_35_NATIONAL_PARK_GATE, SCENE_ROUTE35NATIONALPARKGATE_NOTHING setmapscene ROUTE_35_NATIONAL_PARK_GATE, SCENE_ROUTE35NATIONALPARKGATE_NOTHING
@ -383,7 +383,7 @@ BugContestResults_CleanUp
end end
; 0xbc31e ; 0xbc31e
BugContestResults_FirstPlace ; 0xbc31e BugContestResults_FirstPlace: ; 0xbc31e
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
itemtotext SUN_STONE, MEM_BUFFER_1 itemtotext SUN_STONE, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText farwritetext ContestResults_PlayerWonAPrizeText
@ -393,7 +393,7 @@ BugContestResults_FirstPlace ; 0xbc31e
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc332 ; 0xbc332
BugContestResults_SecondPlace ; 0xbc332 BugContestResults_SecondPlace: ; 0xbc332
itemtotext EVERSTONE, MEM_BUFFER_1 itemtotext EVERSTONE, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText farwritetext ContestResults_PlayerWonAPrizeText
waitbutton waitbutton
@ -402,7 +402,7 @@ BugContestResults_SecondPlace ; 0xbc332
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc343 ; 0xbc343
BugContestResults_ThirdPlace ; 0xbc343 BugContestResults_ThirdPlace: ; 0xbc343
itemtotext GOLD_BERRY, MEM_BUFFER_1 itemtotext GOLD_BERRY, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText farwritetext ContestResults_PlayerWonAPrizeText
waitbutton waitbutton
@ -411,35 +411,35 @@ BugContestResults_ThirdPlace ; 0xbc343
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc354 ; 0xbc354
BugContestResults_NoRoomForSunStone ; 0xbc354 BugContestResults_NoRoomForSunStone: ; 0xbc354
farwritetext BugContestPrizeNoRoomText farwritetext BugContestPrizeNoRoomText
buttonsound buttonsound
setevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE setevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc35f ; 0xbc35f
BugContestResults_NoRoomForEverstone ; 0xbc35f BugContestResults_NoRoomForEverstone: ; 0xbc35f
farwritetext BugContestPrizeNoRoomText farwritetext BugContestPrizeNoRoomText
buttonsound buttonsound
setevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE setevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc36a ; 0xbc36a
BugContestResults_NoRoomForGoldBerry ; 0xbc36a BugContestResults_NoRoomForGoldBerry: ; 0xbc36a
farwritetext BugContestPrizeNoRoomText farwritetext BugContestPrizeNoRoomText
buttonsound buttonsound
setevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY setevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
jump BugContestResults_ReturnAfterWinnersPrize jump BugContestResults_ReturnAfterWinnersPrize
; 0xbc375 ; 0xbc375
BugContestResults_NoRoomForBerry ; 0xbc375 BugContestResults_NoRoomForBerry: ; 0xbc375
farwritetext BugContestPrizeNoRoomText farwritetext BugContestPrizeNoRoomText
buttonsound buttonsound
setevent EVENT_CONTEST_OFFICER_HAS_BERRY setevent EVENT_CONTEST_OFFICER_HAS_BERRY
jump BugContestResults_DidNotWin jump BugContestResults_DidNotWin
; 0xbc380 ; 0xbc380
BugContestResults_CopyContestantsToResults ; 0xbc380 BugContestResults_CopyContestantsToResults: ; 0xbc380
checkevent EVENT_BUG_CATCHING_CONTESTANT_1A checkevent EVENT_BUG_CATCHING_CONTESTANT_1A
iftrue .skip1 iftrue .skip1
clearevent EVENT_BUG_CATCHING_CONTESTANT_1B clearevent EVENT_BUG_CATCHING_CONTESTANT_1B

View File

@ -163,12 +163,12 @@ Function4440: ; 4440
add hl, bc add hl, bc
bit INVISIBLE, [hl] bit INVISIBLE, [hl]
jr nz, SetFacingStanding jr nz, SetFacingStanding
asm_4448 asm_4448:
ld de, ObjectActionPairPointers + 2 ; use second column ld de, ObjectActionPairPointers + 2 ; use second column
jr _HandleObjectAction jr _HandleObjectAction
; 444d ; 444d
_HandleObjectAction _HandleObjectAction:
; call [4 * wObjectStructs[ObjInd, OBJECT_ACTION] + de] ; call [4 * wObjectStructs[ObjInd, OBJECT_ACTION] + de]
ld hl, OBJECT_ACTION ld hl, OBJECT_ACTION
add hl, bc add hl, bc

View File

@ -112,8 +112,8 @@ ScriptCommandTable:
dw Script_checkpoke ; 2c dw Script_checkpoke ; 2c
dw Script_givepoke ; 2d dw Script_givepoke ; 2d
dw Script_giveegg ; 2e dw Script_giveegg ; 2e
dw Script_givepokeitem ; 2f dw Script_givepokemail ; 2f
dw Script_checkpokeitem ; 30 dw Script_checkpokemail ; 30
dw Script_checkevent ; 31 dw Script_checkevent ; 31
dw Script_clearevent ; 32 dw Script_clearevent ; 32
dw Script_setevent ; 33 dw Script_setevent ; 33
@ -2019,7 +2019,7 @@ Script_stringtotext:
ld de, wStringBuffer2 ld de, wStringBuffer2
jp ConvertMemToText jp ConvertMemToText
Script_givepokeitem: Script_givepokemail:
; script command 0x2f ; script command 0x2f
; parameters: pointer ; parameters: pointer
@ -2037,10 +2037,10 @@ Script_givepokeitem:
ld a, [wScriptBank] ld a, [wScriptBank]
call FarCopyBytes call FarCopyBytes
pop bc pop bc
farcall GivePokeItem farcall GivePokeMail
ret ret
Script_checkpokeitem: Script_checkpokemail:
; script command 0x30 ; script command 0x30
; parameters: pointer ; parameters: pointer
@ -2050,7 +2050,7 @@ Script_checkpokeitem:
ld d, a ld d, a
ld a, [wScriptBank] ld a, [wScriptBank]
ld b, a ld b, a
farcall CheckPokeItem farcall CheckPokeMail
ret ret
Script_giveitem: Script_giveitem:

View File

@ -417,7 +417,7 @@ _WaterWildmonLookup: ; 2a21d
ld bc, WATER_WILDDATA_LENGTH ld bc, WATER_WILDDATA_LENGTH
jr _NormalWildmonOK jr _NormalWildmonOK
_JohtoWildmonCheck _JohtoWildmonCheck:
call IsInJohto call IsInJohto
and a and a
ret z ret z
@ -425,7 +425,7 @@ _JohtoWildmonCheck
ld l, e ld l, e
ret ret
_SwarmWildmonCheck _SwarmWildmonCheck:
call CopyCurrMapDE call CopyCurrMapDE
push hl push hl
ld hl, wSwarmFlags ld hl, wSwarmFlags
@ -460,11 +460,11 @@ _SwarmWildmonCheck
scf scf
ret ret
_NoSwarmWildmon _NoSwarmWildmon:
and a and a
ret ret
_NormalWildmonOK _NormalWildmonOK:
call CopyCurrMapDE call CopyCurrMapDE
jr LookUpWildmonsForMapDE jr LookUpWildmonsForMapDE
; 2a27f ; 2a27f

View File

@ -604,7 +604,7 @@ Phone_StartRinging: ; 9033f
HangUp_Wait20Frames: ; 90355 HangUp_Wait20Frames: ; 90355
jr Phone_Wait20Frames jr Phone_Wait20Frames
Phone_Wait20Frames Phone_Wait20Frames:
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
farcall PhoneRing_CopyTilemapAtOnce farcall PhoneRing_CopyTilemapAtOnce

View File

@ -24,7 +24,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [wTempMonDVs], a ld [wTempMonDVs], a
ld a, [wBreedMon2DVs + 1] ld a, [wBreedMon2DVs + 1]
ld [wTempMonDVs + 1], a ld [wTempMonDVs + 1], a
ld a, $3 ld a, TEMPMON
ld [wMonType], a ld [wMonType], a
predef GetGender predef GetGender
pop bc pop bc

View File

@ -18,7 +18,7 @@ EvolveAfterBattle: ; 421e6
push hl push hl
EvolveAfterBattle_MasterLoop EvolveAfterBattle_MasterLoop:
ld hl, wCurPartyMon ld hl, wCurPartyMon
inc [hl] inc [hl]

View File

@ -124,7 +124,7 @@ GetMailboxCount: ; 44648
jp CloseSRAM jp CloseSRAM
; 44654 ; 44654
CheckPokeItem:: ; 44654 CheckPokeMail:: ; 44654
push bc push bc
push de push de
farcall SelectMonFromParty farcall SelectMonFromParty
@ -194,7 +194,7 @@ CheckPokeItem:: ; 44654
; 446cc ; 446cc
GivePokeItem:: ; 446cc GivePokeMail:: ; 446cc
ld a, [wPartyCount] ld a, [wPartyCount]
dec a dec a
push af push af

View File

@ -51,6 +51,8 @@ reloadmapmusic EQUS "dontrestartmapmusic"
resetfuncs EQUS "endall" resetfuncs EQUS "endall"
storetext EQUS "battletowertext" storetext EQUS "battletowertext"
displaylocation EQUS "landmarktotext" displaylocation EQUS "landmarktotext"
givepokeitem EQUS "givepokemail"
checkpokeitem EQUS "checkpokemail"
; macros/scripts/maps.asm ; macros/scripts/maps.asm

View File

@ -1,4 +1,4 @@
; ScriptCommandTable indexes (see engine/scripting.asm) ; ScriptCommandTable indexes (see engine/overworld/scripting.asm)
enum_start enum_start
enum scall_command ; $00 enum scall_command ; $00
@ -315,15 +315,15 @@ giveegg: MACRO
db \2 ; level db \2 ; level
ENDM ENDM
enum givepokeitem_command ; $2f enum givepokemail_command ; $2f
givepokeitem: MACRO givepokemail: MACRO
db givepokeitem_command db givepokemail_command
dw \1 ; pointer dw \1 ; pointer
ENDM ENDM
enum checkpokeitem_command ; $30 enum checkpokemail_command ; $30
checkpokeitem: MACRO checkpokemail: MACRO
db checkpokeitem_command db checkpokemail_command
dw \1 ; pointer dw \1 ; pointer
ENDM ENDM

View File

@ -1,4 +1,4 @@
; MovementPointers indexes (see engine/movement.asm) ; MovementPointers indexes (see engine/overworld/movement.asm)
enum_start enum_start
; Directional movements ; Directional movements

View File

@ -223,7 +223,7 @@ OaksLabPoster2Text:
line "manner." line "manner."
done done
OaksLabTrashcanText OaksLabTrashcanText:
text "There's nothing in" text "There's nothing in"
line "here…" line "here…"
done done

View File

@ -195,7 +195,7 @@ Route31MailRecipientScript:
.TryGiveKenya: .TryGiveKenya:
writetext Text_Route31SleepyManGotMail writetext Text_Route31SleepyManGotMail
buttonsound buttonsound
checkpokeitem ReceivedSpearowMailText checkpokemail ReceivedSpearowMailText
ifequal POKEMAIL_WRONG_MAIL, .WrongMail ifequal POKEMAIL_WRONG_MAIL, .WrongMail
ifequal POKEMAIL_REFUSED, .Refused ifequal POKEMAIL_REFUSED, .Refused
ifequal POKEMAIL_NO_MAIL, .NoMail ifequal POKEMAIL_NO_MAIL, .NoMail

View File

@ -29,7 +29,7 @@ RandyScript:
playsound SFX_KEY_ITEM playsound SFX_KEY_ITEM
waitsfx waitsfx
givepoke SPEAROW, 10, NO_ITEM, TRUE, GiftSpearowName, GiftSpearowOTName givepoke SPEAROW, 10, NO_ITEM, TRUE, GiftSpearowName, GiftSpearowOTName
givepokeitem GiftSpearowMail givepokemail GiftSpearowMail
setevent EVENT_GOT_KENYA setevent EVENT_GOT_KENYA
.alreadyhavekenya .alreadyhavekenya
writetext UnknownText_0x69ed6 writetext UnknownText_0x69ed6

View File

@ -2320,7 +2320,7 @@ Function100eb4: ; 100eb4
and a and a
call Function100eca call Function100eca
asm_100eb8 asm_100eb8:
ld hl, wcd68 ld hl, wcd68
inc [hl] inc [hl]
ld a, [hl] ld a, [hl]
@ -2332,7 +2332,7 @@ asm_100eb8
Function100ec4: ; 100ec4 Function100ec4: ; 100ec4
ret ret
Function100ec5 Function100ec5:
ld hl, wcd67 ld hl, wcd67
inc [hl] inc [hl]
ret ret

View File

@ -1293,7 +1293,7 @@ MobileTradeAnim_DisplayReceivedMon:
call MobileTradeAnim_MonDisplay_UpdateBGMap call MobileTradeAnim_MonDisplay_UpdateBGMap
ret ret
MobileTradeAnim_DisplayEggData MobileTradeAnim_DisplayEggData:
call WaitTop call WaitTop
call MobileTradeAnim_ClearTilemap call MobileTradeAnim_ClearTilemap
ld a, HIGH(vBGMap1) ld a, HIGH(vBGMap1)