Events and some WRAM cleanup

This commit is contained in:
PikalaxALT
2015-12-18 20:07:09 -05:00
parent d644406f61
commit 3d36f1a837
60 changed files with 752 additions and 724 deletions

View File

@@ -866,7 +866,7 @@ PrintText_UsedItemOn: ; 38571
ld [wd265], a
call GetItemName
ld hl, StringBuffer1
ld de, wd050
ld de, wMonOrItemNameBuffer
ld bc, ITEM_NAME_LENGTH
call CopyBytes
ld hl, TextJump_EnemyUsedOn

View File

@@ -8809,7 +8809,7 @@ endr
ld hl, wPayDayMoney + 2
ld de, Money + 2
call AddBattleMoneyToAccount
ld hl, BattleText_PlayerPickuedUpPayDayMoney
ld hl, BattleText_PlayerPickedUpPayDayMoney
call StdBattleTextBox
ld a, [InBattleTowerBattle]
bit 0, a

View File

@@ -377,14 +377,14 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_FRAMESET_07
const SPRITE_ANIM_FRAMESET_08
const SPRITE_ANIM_FRAMESET_09
const SPRITE_ANIM_FRAMESET_0A
const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO
const SPRITE_ANIM_FRAMESET_0B
const SPRITE_ANIM_FRAMESET_0C
const SPRITE_ANIM_FRAMESET_SLOT_GOLEM
const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY
const SPRITE_ANIM_FRAMESET_0F
const SPRITE_ANIM_FRAMESET_SLOTS_EGG
const SPRITE_ANIM_FRAMESET_11
const SPRITE_ANIM_FRAMESET_WALK_CYCLE
const SPRITE_ANIM_FRAMESET_12
const SPRITE_ANIM_FRAMESET_13
const SPRITE_ANIM_FRAMESET_14
@@ -396,7 +396,7 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_FRAMESET_1A
const SPRITE_ANIM_FRAMESET_1B
const SPRITE_ANIM_FRAMESET_1C
const SPRITE_ANIM_FRAMESET_1D
const SPRITE_ANIM_FRAMESET_LEAF
const SPRITE_ANIM_FRAMESET_1E
const SPRITE_ANIM_FRAMESET_1F
const SPRITE_ANIM_FRAMESET_20
@@ -435,13 +435,13 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_FRAMESET_41
const_def
const SPRITE_ANIM_SEQ_00
const SPRITE_ANIM_SEQ_NULL
const SPRITE_ANIM_SEQ_01
const SPRITE_ANIM_SEQ_02
const SPRITE_ANIM_SEQ_03
const SPRITE_ANIM_SEQ_04
const SPRITE_ANIM_SEQ_05
const SPRITE_ANIM_SEQ_06
const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO
const SPRITE_ANIM_SEQ_07
const SPRITE_ANIM_SEQ_08
const SPRITE_ANIM_SEQ_SLOT_GOLEM
@@ -457,9 +457,9 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_SEQ_13
const SPRITE_ANIM_SEQ_14
const SPRITE_ANIM_SEQ_15
const SPRITE_ANIM_SEQ_16
const SPRITE_ANIM_SEQ_17
const SPRITE_ANIM_SEQ_18
const SPRITE_ANIM_SEQ_FLY_FROM
const SPRITE_ANIM_SEQ_FLY_LEAF
const SPRITE_ANIM_SEQ_FLY_TO
const SPRITE_ANIM_SEQ_19
const SPRITE_ANIM_SEQ_1A
const SPRITE_ANIM_SEQ_1B
@@ -475,14 +475,14 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_INDEX_00
const SPRITE_ANIM_INDEX_01
const SPRITE_ANIM_INDEX_02
const SPRITE_ANIM_INDEX_03
const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
const SPRITE_ANIM_INDEX_04
const SPRITE_ANIM_INDEX_05
const SPRITE_ANIM_INDEX_SLOT_GOLEM
const SPRITE_ANIM_INDEX_SLOTS_CHANSEY
const SPRITE_ANIM_INDEX_SLOTS_EGG
const SPRITE_ANIM_INDEX_09
const SPRITE_ANIM_INDEX_0A
const SPRITE_ANIM_INDEX_WALK_CYCLE
const SPRITE_ANIM_INDEX_0B
const SPRITE_ANIM_INDEX_0C
const SPRITE_ANIM_INDEX_0D
@@ -496,7 +496,7 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITE_ANIM_INDEX_15
const SPRITE_ANIM_INDEX_LEAF
const SPRITE_ANIM_INDEX_CUT_TREE
const SPRITE_ANIM_INDEX_18
const SPRITE_ANIM_INDEX_FLY_LEAF
const SPRITE_ANIM_INDEX_19
const SPRITE_ANIM_INDEX_1A
const SPRITE_ANIM_INDEX_1B

View File

@@ -575,7 +575,7 @@ GetHeritableMoves: ; 17197
ld a, [wBreedMon2Species]
cp DITTO
jr z, .ditto2
ld a, [wDittoInDaycare]
ld a, [wBreedMotherOrNonDitto]
and a
ret z
ld hl, wBreedMon1Moves
@@ -633,7 +633,7 @@ GetBreedmonMovePointer: ; 1720b
ld a, [wBreedMon2Species]
cp DITTO
jr z, .ditto
ld a, [wDittoInDaycare]
ld a, [wBreedMotherOrNonDitto]
and a
ret z

View File

@@ -95,7 +95,7 @@ RestartClock: ; 20021 (8:4021)
ld [StringBuffer2 + 2], a
xor a
ld [StringBuffer2 + 3], a
call Function677
call InitTime
call .PrintTime
ld hl, .Text_ClockReset
call PrintText

View File

@@ -80,7 +80,7 @@ Copyright_GFPresents: ; e4579
callba ClearSpriteAnims
depixel 10, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_03
ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
call _InitSpriteAnimStruct
ld hl, $7
add hl, bc

View File

@@ -6,7 +6,7 @@ InitDecorations: ; 26751 (9:6751)
ret
_KrisDecorationMenu: ; 0x2675c
ld a, [wcf76]
ld a, [wWhichIndexSet]
push af
ld hl, .MenuDataHeader
call LoadMenuDataHeader
@@ -30,7 +30,7 @@ _KrisDecorationMenu: ; 0x2675c
.exit_menu
call ExitMenu
pop af
ld [wcf76], a
ld [wWhichIndexSet], a
ld a, [Buffer5]
ld c, a
ret
@@ -74,7 +74,7 @@ _KrisDecorationMenu: ; 0x2675c
.FindCategoriesWithOwnedDecos: ; 26806
xor a
ld [wcf76], a
ld [wWhichIndexSet], a
call .ClearStringBuffer2
call .FindOwndDecos
ld a, 7
@@ -374,7 +374,7 @@ PopulateDecoCategoryMenu: ; 2695b
cp 8
jr nc, .beyond_eight
xor a
ld [wcf76], a
ld [wWhichIndexSet], a
ld hl, .NonscrollingMenuDataHeader
call LoadMenuDataHeader
call DoNthMenu

View File

@@ -4,7 +4,7 @@ LearnMove: ; 6508
ld hl, PartyMonNicknames
call GetNick
ld hl, StringBuffer1
ld de, wd050_MonNick
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
call CopyBytes

View File

@@ -12,7 +12,7 @@ MainMenu: ; 49cdc
ld hl, GameTimerPause
res 0, [hl]
call Function49da4
ld [wcf76], a
ld [wWhichIndexSet], a
call Function49e09
ld hl, MenuDataHeader_0x49d14
call LoadMenuDataHeader

View File

@@ -70,10 +70,10 @@ BargainShop: ; 15a84
Pharmacist: ; 15aae
call FarReadMart
call LoadStandardMenuDataHeader
ld hl, UnknownText_0x15e90
ld hl, Text_Pharmacist_Intro
call MartTextBox
call BuyMenu
ld hl, UnknownText_0x15eae
ld hl, Text_Pharmacist_ComeAgain
call MartTextBox
ret
; 15ac4
@@ -493,7 +493,7 @@ BuyMenuLoop: ; 15cef
.useless_pointer
call MartAskPurchaseQuantity
jr c, .cancel
call Function15d97
call MartConfirmPurchase
jr c, .cancel
ld de, Money
ld bc, hMoneyTemp
@@ -551,7 +551,7 @@ StandardMartAskPurchaseQuantity:
ret
; 15d97
Function15d97: ; 15d97
MartConfirmPurchase: ; 15d97
predef PartyMonItemName
ld a, MARTTEXT_COSTS_THIS_MUCH
call LoadBuyMenuText
@@ -764,7 +764,7 @@ Text_BargainShop_ComeAgain: ; 0x15e8b
db "@"
; 0x15e90
UnknownText_0x15e90: ; 0x15e90
Text_Pharmacist_Intro: ; 0x15e90
; What's up? Need some medicine?
text_jump UnknownText_0x1c4e5f
db "@"
@@ -800,7 +800,7 @@ Text_Pharmacy_InsufficientFunds: ; 0x15ea9
db "@"
; 0x15eae
UnknownText_0x15eae: ; 0x15eae
Text_Pharmacist_ComeAgain: ; 0x15eae
; All right. See you around.
text_jump UnknownText_0x1c4ef6
db "@"
@@ -810,36 +810,35 @@ UnknownText_0x15eae: ; 0x15eae
SellMenu: ; 15eb3
call DisableSpriteUpdates
callba DepositSellInitPackBuffers
.asm_15ebc
.loop
callba DepositSellPack
ld a, [wcf66]
and a
jp z, Function15ece
call Function15ee0
jr .asm_15ebc
; 15ece
jp z, .quit
call .TryToSellItem
jr .loop
Function15ece: ; 15ece
call Function2b74
.quit
call ReturnToMapWithSpeechTextbox
and a
ret
; 15ed3
Function15ed3: ; unreferenced
ld hl, UnknownText_0x15edb
.NothingToSell: ; unreferenced
ld hl, .NothingToSellText
call MenuTextBoxBackup
and a
ret
; 15edb
UnknownText_0x15edb: ; 0x15edb
.NothingToSellText: ; 0x15edb
; You don't have anything to sell.
text_jump UnknownText_0x1c4f12
db "@"
; 0x15ee0
Function15ee0: ; 15ee0
.TryToSellItem: ; 15ee0
callba CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .jumptable

View File

@@ -243,7 +243,7 @@ Function8e97d: ; 8e97d (23:697d)
call InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_00
ld [hl], SPRITE_ANIM_SEQ_NULL
ret
Function8e99a: ; 8e99a (23:699a)
@@ -371,7 +371,7 @@ FreezeMonIcons: ; 8ea4a
jr z, .next
cp d
jr z, .loadwithtwo
ld a, SPRITE_ANIM_SEQ_00
ld a, SPRITE_ANIM_SEQ_NULL
jr .ok
.loadwithtwo

View File

@@ -1,7 +1,7 @@
_NamingScreen: ; 0x116b7
call DisableSpriteUpdates
call NamingScreen
call Function2b74
call ReturnToMapWithSpeechTextbox
ret
; 0x116c1
@@ -174,7 +174,7 @@ Function117f5: ; 117f5 (4:57f5)
ld [hli], a
ld [hl], a
depixel 4, 4, 4, 0
ld a, SPRITE_ANIM_INDEX_0A
ld a, SPRITE_ANIM_INDEX_WALK_CYCLE
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
@@ -220,7 +220,7 @@ Function11847: ; 11847 (4:5847)
ld [hli], a
ld [hl], a
pop de
ld b, SPRITE_ANIM_INDEX_0A
ld b, SPRITE_ANIM_INDEX_WALK_CYCLE
ld a, d
cp $7a
jr nz, .asm_11873

View File

@@ -88,7 +88,7 @@ NPCTrade:: ; fcba8
ld [wcf64], a
pop af
ld [wJumptableIndex], a
call Function2b74
call ReturnToMapWithSpeechTextbox
ret
; fcc23
@@ -399,7 +399,7 @@ GetTradeMonNames: ; fce1b
ld a, [hl]
call GetTradeMonName
ld de, wd050
ld de, wMonOrItemNameBuffer
call CopyTradeName
ld hl, StringBuffer1

View File

@@ -633,7 +633,7 @@ GiveItem: ; 103fd
push af
call GetCurNick
ld hl, StringBuffer1
ld de, wd050_MonNick
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
call CopyBytes
call TryGiveItemToPartymon

View File

@@ -8,7 +8,7 @@ SelectMonFromParty: ; 50000
call SetPalettes
call DelayFrame
call PartyMenuSelect
call Function2b74
call ReturnToMapWithSpeechTextbox
ret
; 5001d
@@ -25,7 +25,7 @@ SelectTradeOrDaycareMon: ; 5001d
call SetPalettes
call DelayFrame
call PartyMenuSelect
call Function2b74
call ReturnToMapWithSpeechTextbox
ret
; 5003f

View File

@@ -274,7 +274,7 @@ endr
push hl
call LoadCallerScript
pop hl
ld de, wd048
ld de, wPhoneScriptPointer
ld a, [hli]
ld [de], a
inc de
@@ -442,7 +442,7 @@ WrongNumber: ; 90233
Script_ReceivePhoneCall: ; 0x90241
refreshscreen $0
callasm RingTwice_StartCall
ptcall wd048
ptcall wPhoneScriptPointer
waitbutton
callasm HangUp
closetext

View File

@@ -12,7 +12,7 @@ PokemonCenterPC: ; 1559a
xor a
ld [hBGMapMode], a
call .ChooseWhichPCListToUse
ld [wcf76], a
ld [wWhichIndexSet], a
call DoNthMenu
jr c, .shutdown
ld a, [MenuSelection]
@@ -208,7 +208,7 @@ UnknownText_0x156ff: ; 0x156ff
_PlayersPC: ; 15704
ld a, b
ld [wcf76], a
ld [wWhichIndexSet], a
ld hl, UnknownText_0x157cc
call PC_DisplayTextWaitMenu
call Function15715

View File

@@ -673,7 +673,7 @@ Function9102f: ; 9102f (24:502f)
Function9106a: ; 9106a
push af
depixel 0, 0
ld b, SPRITE_ANIM_INDEX_0A
ld b, SPRITE_ANIM_INDEX_WALK_CYCLE
ld a, [PlayerGender]
bit 0, a
jr z, .asm_91079
@@ -709,7 +709,7 @@ Function91098: ; 91098
ld [hl], $4
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_00
ld [hl], SPRITE_ANIM_SEQ_NULL
pop af
push bc
call Function910d4
@@ -2781,7 +2781,7 @@ TownMapMon: ; 91f7b
ld [hl], $8
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_00
ld [hl], SPRITE_ANIM_SEQ_NULL
ret
; 91fa6
@@ -2808,7 +2808,7 @@ TownMapPlayerIcon: ; 91fa6
; Animation/palette
depixel 0, 0
ld b, SPRITE_ANIM_INDEX_0A ; Male
ld b, SPRITE_ANIM_INDEX_WALK_CYCLE ; Male
ld a, [PlayerGender]
bit 0, a
jr z, .got_gender

View File

@@ -274,7 +274,7 @@ endr
ld [CurPartySpecies], a
call GetPokemonName
ld hl, StringBuffer1
ld de, wOaksPkmnTalkPkmnNameBuffer
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
call CopyBytes
; Now that we've chosen our wild Pokemon,

View File

@@ -163,7 +163,7 @@ Function140ae: ; 140ae
ret
; 140ed
Function140ed:: ; 140ed
_InitTime:: ; 140ed
call GetClock
call FixDays
ld hl, hRTCSeconds

Some files were not shown because too many files have changed in this diff Show More