mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge branch 'master' into continue_union_room
This commit is contained in:
commit
ccac4694cd
@ -404,6 +404,38 @@
|
||||
.byte \param1
|
||||
.endm
|
||||
|
||||
@ Help macros for 5 uses of moveend command
|
||||
|
||||
@ All cases
|
||||
.macro moveendall
|
||||
setbyte sMOVEEND_STATE, 0
|
||||
moveend 0, 0
|
||||
.endm
|
||||
|
||||
@ Chosen case
|
||||
.macro moveendcase case:req
|
||||
setbyte sMOVEEND_STATE, \case
|
||||
moveend 1, 0
|
||||
.endm
|
||||
|
||||
@ All cases from (inclusive)
|
||||
.macro moveendfrom from:req
|
||||
setbyte sMOVEEND_STATE, \from
|
||||
moveend 0, 0
|
||||
.endm
|
||||
|
||||
@ All cases from 0 to (not inclusive)
|
||||
.macro moveendto to:req
|
||||
setbyte sMOVEEND_STATE, 0
|
||||
moveend 2, \to
|
||||
.endm
|
||||
|
||||
@ Cases from (inclusive) to (not inclusive)
|
||||
.macro moveendfromto from:req, to:req
|
||||
setbyte sMOVEEND_STATE, \from
|
||||
moveend 2, \to
|
||||
.endm
|
||||
|
||||
.macro typecalc2
|
||||
.byte 0x4a
|
||||
.endm
|
||||
|
2622
asm/mevent_801BAAC.s
2622
asm/mevent_801BAAC.s
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
@ file boundary?
|
||||
|
||||
thumb_func_start sub_8018424
|
||||
sub_8018424: @ 8018424
|
||||
push {lr}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -424,7 +424,7 @@ PLAY_SE = FC 10
|
||||
CLEAR = FC 11
|
||||
SKIP = FC 12
|
||||
CLEAR_TO = FC 13
|
||||
UNKNOWN_14 = FC 14
|
||||
MIN_LETTER_SPACING = FC 14
|
||||
JPN = FC 15
|
||||
ENG = FC 16
|
||||
PAUSE_MUSIC = FC 17
|
||||
|
@ -284,8 +284,7 @@ BattleScript_HitFromAtkAnimation::
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
BattleScript_MoveEnd::
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x0, 0x0
|
||||
moveendall
|
||||
end
|
||||
|
||||
BattleScript_MakeMoveMissed::
|
||||
@ -423,8 +422,7 @@ BattleScript_ExplosionLoop:
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
end
|
||||
@ -432,8 +430,7 @@ BattleScript_ExplosionMissed:
|
||||
effectivenesssound
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
end
|
||||
@ -657,8 +654,7 @@ BattleScript_DoMultiHit::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 0x1
|
||||
addbyte sMULTIHIT_STRING + 4, 0x1
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
|
||||
decrementmultihit BattleScript_MultiHitLoop
|
||||
goto BattleScript_MultiHitPrintStrings
|
||||
@ -674,10 +670,8 @@ BattleScript_MultiHitPrintStrings::
|
||||
BattleScript_MultiHitEnd::
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0x2
|
||||
moveend 0x1, 0x0
|
||||
setbyte sMOVEEND_STATE, 0x4
|
||||
moveend 0x0, 0x0
|
||||
moveendcase ATK49_SYNCHRONIZE_TARGET
|
||||
moveendfrom ATK49_STATUS_IMMUNITY_ABILITIES
|
||||
end
|
||||
|
||||
BattleScript_EffectConversion::
|
||||
@ -1441,8 +1435,7 @@ BattleScript_DoTripleKickAttack::
|
||||
waitmessage 0x40
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 0x1
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings
|
||||
decrementmultihit BattleScript_TripleKickLoop
|
||||
goto BattleScript_TripleKickPrintStrings
|
||||
@ -1461,8 +1454,7 @@ BattleScript_TripleKickPrintStrings::
|
||||
BattleScript_TripleKickEnd::
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0xE
|
||||
moveend 0x0, 0x0
|
||||
moveendfrom ATK49_UPDATE_LAST_MOVES
|
||||
end
|
||||
|
||||
BattleScript_EffectThief::
|
||||
@ -1893,8 +1885,7 @@ BattleScript_DoHitAllWithUndergroundBonus::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 0x1
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
|
||||
end
|
||||
BattleScript_HitAllWithUndergroundBonusMissed::
|
||||
@ -1903,8 +1894,7 @@ BattleScript_HitAllWithUndergroundBonusMissed::
|
||||
effectivenesssound
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
|
||||
end
|
||||
|
||||
@ -1995,8 +1985,7 @@ BattleScript_BeatUpAttack::
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
goto BattleScript_BeatUpLoop
|
||||
BattleScript_BeatUpEnd::
|
||||
end
|
||||
@ -2617,8 +2606,7 @@ BattleScript_TeeterDanceLoop::
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
BattleScript_TeeterDanceDoMoveEndIncrement::
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
BattleScript_TeeterDanceLoopIncrement::
|
||||
addbyte gBattlerTarget, 0x1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop
|
||||
@ -3140,10 +3128,8 @@ BattleScript_DoSwitchOut::
|
||||
switchinanim BS_ATTACKER, FALSE
|
||||
waitstate
|
||||
switchineffects BS_ATTACKER
|
||||
setbyte sMOVEEND_STATE, 0x4
|
||||
moveend 0x1, 0x0
|
||||
setbyte sMOVEEND_STATE, 0xF
|
||||
moveend 0x1, 0x0
|
||||
moveendcase ATK49_STATUS_IMMUNITY_ABILITIES
|
||||
moveendcase ATK49_MIRROR_MOVE
|
||||
end2
|
||||
|
||||
BattleScript_PursuitDmgOnSwitchOut::
|
||||
@ -3166,8 +3152,7 @@ BattleScript_PursuitDmgOnSwitchOut::
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
setbyte sMOVEEND_STATE, 0x3
|
||||
moveend 0x2, 0x6
|
||||
moveendfromto ATK49_MOVE_END_ABILITIES, ATK49_CHOICE_MOVE
|
||||
various4 BS_TARGET
|
||||
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x0, BattleScript_PursuitDmgOnSwitchOutRet
|
||||
setbyte sGIVEEXP_STATE, 0x0
|
||||
@ -3395,8 +3380,7 @@ BattleScript_DisabledNoMore::
|
||||
BattleScript_SelectingDisabledMoveInPalace::
|
||||
printstring STRINGID_PKMNMOVEISDISABLED
|
||||
BattleScript_SelectingUnusableMoveInPalace::
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
end
|
||||
|
||||
BattleScript_EncoredNoMore::
|
||||
@ -3425,8 +3409,7 @@ BattleScript_SpikesOnAttacker::
|
||||
BattleScript_SpikesOnAttackerFainted::
|
||||
setbyte sGIVEEXP_STATE, 0x0
|
||||
getexp BS_ATTACKER
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x0, 0x0
|
||||
moveendall
|
||||
goto BattleScript_HandleFaintedMon
|
||||
|
||||
BattleScript_SpikesOnTarget::
|
||||
@ -3441,8 +3424,7 @@ BattleScript_SpikesOnTarget::
|
||||
BattleScript_SpikesOnTargetFainted::
|
||||
setbyte sGIVEEXP_STATE, 0x0
|
||||
getexp BS_TARGET
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x0, 0x0
|
||||
moveendall
|
||||
goto BattleScript_HandleFaintedMon
|
||||
|
||||
BattleScript_SpikesOnFaintedBattler::
|
||||
@ -3457,8 +3439,7 @@ BattleScript_SpikesOnFaintedBattler::
|
||||
BattleScript_SpikesOnFaintedBattlerFainted::
|
||||
setbyte sGIVEEXP_STATE, 0x0
|
||||
getexp BS_FAINTED
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x0, 0x0
|
||||
moveendall
|
||||
goto BattleScript_HandleFaintedMon
|
||||
|
||||
BattleScript_PrintHurtBySpikes::
|
||||
@ -3562,10 +3543,8 @@ BattleScript_DoFutureAttackHit::
|
||||
tryfaintmon BS_TARGET, FALSE, NULL
|
||||
atk24 BattleScript_FutureAttackEnd
|
||||
BattleScript_FutureAttackEnd::
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x1, 0x0
|
||||
setbyte sMOVEEND_STATE, 0xB
|
||||
moveend 0x2, 0xE
|
||||
moveendcase ATK49_RAGE
|
||||
moveendfromto ATK49_ITEM_EFFECTS_ALL, ATK49_UPDATE_LAST_MOVES
|
||||
setbyte gMoveResultFlags, 0
|
||||
end2
|
||||
|
||||
@ -4254,8 +4233,7 @@ BattleScript_AbilityCuredStatus::
|
||||
BattleScript_IgnoresWhileAsleep::
|
||||
printstring STRINGID_PKMNIGNORESASLEEP
|
||||
waitmessage 0x40
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
end
|
||||
|
||||
BattleScript_IgnoresAndUsesRandomMove::
|
||||
@ -4271,8 +4249,7 @@ BattleScript_MoveUsedLoafingAround::
|
||||
BattleScript_82DB6C7::
|
||||
printfromtable gInobedientStringIds
|
||||
waitmessage 0x40
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
end
|
||||
|
||||
BattleScript_IgnoresAndFallsAsleep::
|
||||
@ -4280,8 +4257,7 @@ BattleScript_IgnoresAndFallsAsleep::
|
||||
waitmessage 0x40
|
||||
setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER
|
||||
seteffectprimary
|
||||
setbyte sMOVEEND_STATE, 0x0
|
||||
moveend 0x2, 0x10
|
||||
moveendto ATK49_NEXT_TARGET
|
||||
end
|
||||
|
||||
BattleScript_IgnoresAndHitsItself::
|
||||
|
@ -1,254 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_082F0E10:: @ 82F0E10
|
||||
.byte 0x00, 0x02, 0x03
|
||||
.byte 0x00, 0x01, 0x02
|
||||
|
||||
.align 2
|
||||
gUnknown_082F0E18:: @ 82F0E18
|
||||
.byte 0x07, 0x04, 0x07, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082F0E1C:: @ 82F0E1C
|
||||
window_template 0x01, 0x01, 0x01, 0x19, 0x04, 0x02, 0x029C
|
||||
window_template 0x01, 0x01, 0x06, 0x1C, 0x08, 0x02, 0x01BC
|
||||
window_template 0x01, 0x01, 0x0E, 0x1C, 0x05, 0x02, 0x0130
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal1:: @ 82F0E34
|
||||
.incbin "graphics/wonder_transfers/wonder_card_1.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal2:: @ 82F0E54
|
||||
.incbin "graphics/wonder_transfers/wonder_card_2.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal3:: @ 82F0E74
|
||||
.incbin "graphics/wonder_transfers/wonder_card_3.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal4:: @ 82F0E94
|
||||
.incbin "graphics/wonder_transfers/wonder_card_4.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal5:: @ 82F0EB4
|
||||
.incbin "graphics/wonder_transfers/wonder_card_5.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal6:: @ 82F0ED4
|
||||
.incbin "graphics/wonder_transfers/wonder_card_6.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal7:: @ 82F0EF4
|
||||
.incbin "graphics/wonder_transfers/wonder_card_7.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgPal8:: @ 82F0F14
|
||||
.incbin "graphics/wonder_transfers/wonder_card_8.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgGfx1:: @ 82F0F34
|
||||
.incbin "graphics/wonder_transfers/wonder_card_1.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgTilemap1:: @ 82F1030
|
||||
.incbin "graphics/wonder_transfers/wonder_card_1.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgGfx2:: @ 82F1124
|
||||
.incbin "graphics/wonder_transfers/wonder_card_2.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgTilemap2:: @ 82F1218
|
||||
.incbin "graphics/wonder_transfers/wonder_card_2.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgGfx3:: @ 82F1300
|
||||
.incbin "graphics/wonder_transfers/wonder_card_3.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgTilemap3:: @ 82F13D4
|
||||
.incbin "graphics/wonder_transfers/wonder_card_3.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgGfx7:: @ 82F14A8
|
||||
.incbin "graphics/wonder_transfers/wonder_card_7.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgTilemap7:: @ 82F16DC
|
||||
.incbin "graphics/wonder_transfers/wonder_card_7.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgGfx8:: @ 82F1824
|
||||
.incbin "graphics/wonder_transfers/wonder_card_8.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardBgTilemap8:: @ 82F1A54
|
||||
.incbin "graphics/wonder_transfers/wonder_card_8.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal1:: @ 82F1B9C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_1.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal2:: @ 82F1BBC
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_2.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal3:: @ 82F1BDC
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_3.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal4:: @ 82F1BFC
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_4.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal5:: @ 82F1C1C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_5.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal6:: @ 82F1C3C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_6.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal7:: @ 82F1C5C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_7.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowPal8:: @ 82F1C7C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow_8.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderCardShadowGfx:: @ 82F1C9C
|
||||
.incbin "graphics/wonder_transfers/wonder_card_shadow.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_082F1D00:: @ 82F1D00 struct CompressedSpriteSheet
|
||||
.4byte gWonderCardShadowGfx
|
||||
.2byte 0x0100
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F1D08:: @ 82F1D08 struct SpritePalette
|
||||
.4byte gWonderCardShadowPal1
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal2
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal3
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal4
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal5
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal6
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal7
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
.4byte gWonderCardShadowPal8
|
||||
.2byte 0x8000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F1D48:: @ 82F1D48
|
||||
spr_template 0x8000, 0x8000, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_082F1D60:: @ 82F1D60
|
||||
.4byte 0x00000001, gWonderCardBgGfx1, gWonderCardBgTilemap1, gWonderCardBgPal1
|
||||
.4byte 0x00001001, gWonderCardBgGfx2, gWonderCardBgTilemap2, gWonderCardBgPal2
|
||||
.4byte 0x00002001, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal3
|
||||
.4byte 0x00003001, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal4
|
||||
.4byte 0x00004001, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal5
|
||||
.4byte 0x00005001, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal6
|
||||
.4byte 0x00006001, gWonderCardBgGfx7, gWonderCardBgTilemap7, gWonderCardBgPal7
|
||||
.4byte 0x00007001, gWonderCardBgGfx8, gWonderCardBgTilemap8, gWonderCardBgPal8
|
||||
|
||||
gUnknown_082F1DE0:: @ 82F1DE0
|
||||
.byte 0x00, 0x02, 0x03, 0x00, 0x01, 0x02, 0x00, 0x00
|
||||
|
||||
gUnknown_082F1DE8:: @ 82F1DE8
|
||||
window_template 0x00, 0x01, 0x00, 0x1C, 0x03, 0x02, 0x02AC
|
||||
window_template 0x02, 0x01, 0x03, 0x1C, 0x14, 0x02, 0x007C
|
||||
|
||||
gUnknown_082F1DF8:: @ 82F1DF8
|
||||
.4byte 0x0318e802, 0x000098e8, 0x10000002, 0x00001000
|
||||
|
||||
.align 2
|
||||
gWonderNewsPal1:: @ 82F1E08
|
||||
.incbin "graphics/wonder_transfers/wonder_news_1.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderNewsPal7:: @ 82F1E28
|
||||
.incbin "graphics/wonder_transfers/wonder_news_7.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderNewsPal8:: @ 82F1E48
|
||||
.incbin "graphics/wonder_transfers/wonder_news_8.gbapal"
|
||||
|
||||
.align 2
|
||||
gWonderNewsGfx1:: @ 82F1E68
|
||||
.incbin "graphics/wonder_transfers/wonder_news_1.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsTilemap1:: @ 82F1EE8
|
||||
.incbin "graphics/wonder_transfers/wonder_news_1.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsGfx2:: @ 82F1FC4
|
||||
.incbin "graphics/wonder_transfers/wonder_news_2.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsTilemap2:: @ 82F1FF4
|
||||
.incbin "graphics/wonder_transfers/wonder_news_2.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsGfx3:: @ 82F20B4
|
||||
.incbin "graphics/wonder_transfers/wonder_news_3.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsTilemap3:: @ 82F2124
|
||||
.incbin "graphics/wonder_transfers/wonder_news_3.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsGfx7:: @ 82F21F0
|
||||
.incbin "graphics/wonder_transfers/wonder_news_7.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsTilemap7:: @ 82F2280
|
||||
.incbin "graphics/wonder_transfers/wonder_news_7.bin.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsGfx8:: @ 82F235C
|
||||
.incbin "graphics/wonder_transfers/wonder_news_8.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gWonderNewsTilemap8:: @ 82F23EC
|
||||
.incbin "graphics/wonder_transfers/wonder_news_8.bin.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_082F24C8:: @ 82F24C8
|
||||
.4byte 0x00000001, gWonderNewsGfx1, gWonderNewsTilemap1, gWonderNewsPal1
|
||||
.4byte 0x00000001, gWonderNewsGfx2, gWonderNewsTilemap2, gWonderCardBgPal2
|
||||
.4byte 0x00000001, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal3
|
||||
.4byte 0x00000001, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal4
|
||||
.4byte 0x00000001, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal5
|
||||
.4byte 0x00000001, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal6
|
||||
.4byte 0x00000001, gWonderNewsGfx7, gWonderNewsTilemap7, gWonderNewsPal7
|
||||
.4byte 0x00000001, gWonderNewsGfx8, gWonderNewsTilemap8, gWonderNewsPal8
|
@ -3,23 +3,6 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_082F2A7C:: @ 82F2A7C
|
||||
.4byte sub_801DFAC
|
||||
.4byte sub_801E030
|
||||
.4byte sub_801E120
|
||||
.4byte sub_801E240
|
||||
.4byte sub_801E764
|
||||
.4byte sub_801E838
|
||||
.4byte sub_801E460
|
||||
.4byte sub_801E5C4
|
||||
.4byte sub_801E668
|
||||
.4byte sub_801E978
|
||||
|
||||
.align 2
|
||||
gUnknown_082F2AA4:: @ 82F2AA4
|
||||
.byte 0x09, 0x09, 0x09, 0x09
|
||||
|
||||
.align 2
|
||||
gUnknown_082F2AA8:: @ 82F2AA8
|
||||
.byte 0x00, 0x16, 0x17, 0x68, 0x19, 0x1a, 0x1b, 0x1c
|
||||
@ -57,36 +40,9 @@ gUnknown_082F2AA8:: @ 82F2AA8
|
||||
|
||||
.align 2
|
||||
gUnknown_082F2BA8:: @ 82F2BA8
|
||||
.4byte gUnknown_0862B9F9
|
||||
.4byte gUnknown_0862B9FF
|
||||
.4byte gUnknown_0862BA05
|
||||
.4byte gUnknown_0862BA0B
|
||||
.4byte gUnknown_0862BA11
|
||||
.4byte gUnknown_0862BA17
|
||||
.4byte gUnknown_0862BA1D
|
||||
.4byte gUnknown_0862BA23
|
||||
.4byte gUnknown_0862BA29
|
||||
.4byte gUnknown_0862BA2F
|
||||
.4byte gUnknown_0862BA35
|
||||
.4byte gUnknown_0862BA3B
|
||||
.4byte gUnknown_0862BA41
|
||||
.4byte gUnknown_0862BA47
|
||||
.4byte gUnknown_0862BA4D
|
||||
.4byte gUnknown_0862BA53
|
||||
.4byte gUnknown_0862BA59
|
||||
.4byte gUnknown_0862BA5F
|
||||
.4byte gUnknown_0862BA65
|
||||
.4byte gUnknown_0862BA6B
|
||||
.4byte gUnknown_0862BA79
|
||||
.4byte gUnknown_0862BA84
|
||||
.4byte gUnknown_0862BA8F
|
||||
.4byte gUnknown_0862BA9A
|
||||
.4byte gUnknown_0862BAA3
|
||||
.4byte gUnknown_0862BAAE
|
||||
.4byte gUnknown_0862BAB9
|
||||
.4byte gUnknown_0862BAC4
|
||||
.4byte gUnknown_0862BACF
|
||||
.4byte gUnknown_0862BADA
|
||||
.4byte gUnknown_0862B9F9, gUnknown_0862B9FF, gUnknown_0862BA05, gUnknown_0862BA0B, gUnknown_0862BA11, gUnknown_0862BA17, gUnknown_0862BA1D, gUnknown_0862BA23, gUnknown_0862BA29, gUnknown_0862BA2F
|
||||
.4byte gUnknown_0862BA35, gUnknown_0862BA3B, gUnknown_0862BA41, gUnknown_0862BA47, gUnknown_0862BA4D, gUnknown_0862BA53, gUnknown_0862BA59, gUnknown_0862BA5F, gUnknown_0862BA65, gUnknown_0862BA6B
|
||||
.4byte gUnknown_0862BA79, gUnknown_0862BA84, gUnknown_0862BA8F, gUnknown_0862BA9A, gUnknown_0862BAA3, gUnknown_0862BAAE, gUnknown_0862BAB9, gUnknown_0862BAC4, gUnknown_0862BACF, gUnknown_0862BADA
|
||||
|
||||
.align 2
|
||||
gUnknown_082F2C20:: @ 82F2C20
|
||||
|
@ -95,8 +95,6 @@
|
||||
// statchange defines
|
||||
#define STAT_CHANGE_BS_PTR 0x1
|
||||
#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20
|
||||
#define STAT_CHANGE_WORKED 0
|
||||
#define STAT_CHANGE_DIDNT_WORK 1
|
||||
|
||||
// atk48
|
||||
#define ATK48_STAT_NEGATIVE 0x1
|
||||
@ -104,6 +102,26 @@
|
||||
#define ATK48_ONLY_MULTIPLE 0x4
|
||||
#define ATK48_DONT_CHECK_LOWER 0x8
|
||||
|
||||
// atk49, moveend cases
|
||||
#define ATK49_RAGE 0
|
||||
#define ATK49_DEFROST 1
|
||||
#define ATK49_SYNCHRONIZE_TARGET 2
|
||||
#define ATK49_MOVE_END_ABILITIES 3
|
||||
#define ATK49_STATUS_IMMUNITY_ABILITIES 4
|
||||
#define ATK49_SYNCHRONIZE_ATTACKER 5
|
||||
#define ATK49_CHOICE_MOVE 6
|
||||
#define ATK49_CHANGED_ITEMS 7
|
||||
#define ATK49_ATTACKER_INVISIBLE 8
|
||||
#define ATK49_ATTACKER_VISIBLE 9
|
||||
#define ATK49_TARGET_VISIBLE 10
|
||||
#define ATK49_ITEM_EFFECTS_ALL 11
|
||||
#define ATK49_KINGSROCK_SHELLBELL 12
|
||||
#define ATK49_SUBSTITUTE 13
|
||||
#define ATK49_UPDATE_LAST_MOVES 14
|
||||
#define ATK49_MIRROR_MOVE 15
|
||||
#define ATK49_NEXT_TARGET 16
|
||||
#define ATK49_COUNT 17
|
||||
|
||||
#define BIT_HP 0x1
|
||||
#define BIT_ATK 0x2
|
||||
#define BIT_DEF 0x4
|
||||
|
@ -962,7 +962,8 @@ struct SaveBlock1
|
||||
/*0x3B24*/ u8 seen2[DEX_FLAGS_NO];
|
||||
/*0x3B58*/ LilycoveLady lilycoveLady;
|
||||
/*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20];
|
||||
/*0x3C88*/ u8 unk3C88[11][20];
|
||||
/*0x3C88*/ u8 unk3C88[10][21];
|
||||
/*0x3D5A*/ u8 filler3D5A[0xA];
|
||||
/*0x3D64*/ struct SaveTrainerHill trainerHill;
|
||||
/*0x3D70*/ struct WaldaPhrase waldaPhrase;
|
||||
// sizeof: 0x3D88
|
||||
|
@ -4908,4 +4908,13 @@ extern const u16 gEasyChatRightWindow_Pal[];
|
||||
// Use Pokeblock
|
||||
extern const u32 gUsePokeblockCondition_Gfx[];
|
||||
|
||||
// Union Room Chat
|
||||
extern const u16 gUnknown_08DD4BB0[];
|
||||
extern const u16 gUnknown_08DD4BD0[];
|
||||
extern const u32 gUnknown_08DD4BF0[];
|
||||
extern const u32 gUnknown_08DD4C4C[];
|
||||
extern const u16 gLinkMiscMenu_Pal[];
|
||||
extern const u32 gLinkMiscMenu_Gfx[];
|
||||
extern const u32 gLinkMiscMenu_Tilemap[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
@ -236,7 +236,6 @@ u32 LinkMain1(u8 *shouldAdvanceLinkState, u16 *sendCmd, u16 (*recvCmds)[CMD_LENG
|
||||
void LinkVSync(void);
|
||||
void Timer3Intr(void);
|
||||
void SerialCB(void);
|
||||
u8 GetLinkPlayerCount(void);
|
||||
bool32 InUnionRoom(void);
|
||||
void sub_800E0E8(void);
|
||||
bool8 IsLinkTaskFinished(void);
|
||||
|
@ -285,5 +285,9 @@ bool8 sub_800DF34(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx);
|
||||
s32 sub_800E87C(u8 idx);
|
||||
void sub_8011BA4(void);
|
||||
void sub_8010198(void);
|
||||
bool32 sub_8011A9C(void);
|
||||
void sub_80104B0(void);
|
||||
void sub_8011A50(void);
|
||||
void sub_80110B8(u32 a0);
|
||||
|
||||
#endif //GUARD_LINK_RFU_H
|
||||
|
@ -101,5 +101,6 @@ void sub_8198314(void);
|
||||
void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram);
|
||||
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed);
|
||||
void sub_8198C78(void);
|
||||
void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs);
|
||||
|
||||
#endif // GUARD_MENU_H
|
||||
|
@ -2592,4 +2592,18 @@ extern const u8 gUnknown_085EE154[];
|
||||
// Berry Powder Menu
|
||||
extern const u8 gText_Powder[];
|
||||
|
||||
// Union Room Chat
|
||||
extern const u8 gText_F700JoinedChat[];
|
||||
extern const u8 gText_F700LeftChat[];
|
||||
extern const u8 gText_Hello[];
|
||||
extern const u8 gText_Pokemon2[];
|
||||
extern const u8 gText_Trade[];
|
||||
extern const u8 gText_Battle[];
|
||||
extern const u8 gText_Lets[];
|
||||
extern const u8 gText_Ok[];
|
||||
extern const u8 gText_Sorry[];
|
||||
extern const u8 gText_YayUnkF9F9[];
|
||||
extern const u8 gText_ThankYou[];
|
||||
extern const u8 gText_ByeBye[];
|
||||
|
||||
#endif // GUARD_STRINGS_H
|
||||
|
@ -99,6 +99,8 @@
|
||||
//
|
||||
#define EXT_CTRL_CODE_CLEAR 0x11
|
||||
//
|
||||
#define EXT_CTRL_CODE_CLEAR_TO 0x13
|
||||
#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14
|
||||
#define EXT_CTRL_CODE_JPN 0x15
|
||||
#define EXT_CTRL_CODE_ENG 0x16
|
||||
|
||||
|
9
include/union_room.h
Normal file
9
include/union_room.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef GUARD_UNION_ROOM_H
|
||||
#define GUARD_UNION_ROOM_H
|
||||
|
||||
extern bool8 gUnknown_02022C60;
|
||||
|
||||
void sub_8018798(u8);
|
||||
void sub_80186EC(bool8, bool32);
|
||||
|
||||
#endif //GUARD_UNION_ROOM_H
|
7
include/union_room_chat.h
Executable file
7
include/union_room_chat.h
Executable file
@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_UNION_ROOM_CHAT_H
|
||||
#define GUARD_UNION_ROOM_CHAT_H
|
||||
|
||||
void sub_801DD98(void);
|
||||
void copy_strings_to_sav1(void);
|
||||
|
||||
#endif // GUARD_UNION_ROOM_CHAT_H
|
@ -57,12 +57,12 @@ SECTIONS {
|
||||
src/union_room.o(.text);
|
||||
asm/union_room.o(.text);
|
||||
src/mevent2.o(.text);
|
||||
asm/mevent_801BAAC.o(.text);
|
||||
src/mevent_801BAAC.o(.text);
|
||||
asm/mevent_server.o(.text);
|
||||
asm/mevent_server_ish.o(.text);
|
||||
asm/mevent_server_helpers.o(.text);
|
||||
src/mevent_news.o(.text);
|
||||
asm/union_room_chat.o(.text);
|
||||
src/union_room_chat.o(.text);
|
||||
asm/berry_crush.o(.text);
|
||||
src/berry_powder.o(.text);
|
||||
asm/dodrio_berry_picking.o(.text);
|
||||
@ -410,8 +410,9 @@ SECTIONS {
|
||||
src/union_room.o(.rodata);
|
||||
data/union_room.o(.rodata);
|
||||
src/mevent2.o(.rodata);
|
||||
data/mevent_801BAAC.o(.rodata);
|
||||
src/mevent_801BAAC.o(.rodata);
|
||||
data/mevent_server.o(.rodata);
|
||||
src/union_room_chat.o(.rodata);
|
||||
data/union_room_chat.o(.rodata);
|
||||
data/berry_crush.o(.rodata);
|
||||
data/berry_powder.o(.rodata);
|
||||
|
@ -4480,28 +4480,6 @@ static void atk48_playstatchangeanimation(void)
|
||||
}
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
ATK49_RAGE,
|
||||
ATK49_DEFROST,
|
||||
ATK49_SYNCHRONIZE_TARGET,
|
||||
ATK49_MOVE_END_ABILITIES,
|
||||
ATK49_STATUS_IMMUNITY_ABILITIES,
|
||||
ATK49_SYNCHRONIZE_ATTACKER,
|
||||
ATK49_CHOICE_MOVE,
|
||||
ATK49_CHANGED_ITEMS,
|
||||
ATK49_ATTACKER_INVISIBLE,
|
||||
ATK49_ATTACKER_VISIBLE,
|
||||
ATK49_TARGET_VISIBLE,
|
||||
ATK49_ITEM_EFFECTS_ALL,
|
||||
ATK49_KINGSROCK_SHELLBELL,
|
||||
ATK49_SUBSTITUTE,
|
||||
ATK49_UPDATE_LAST_MOVES,
|
||||
ATK49_MIRROR_MOVE,
|
||||
ATK49_NEXT_TARGET,
|
||||
ATK49_COUNT,
|
||||
};
|
||||
|
||||
static void atk49_moveend(void)
|
||||
{
|
||||
s32 i;
|
||||
@ -7210,6 +7188,9 @@ static void atk88_negativedamage(void)
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
#define STAT_CHANGE_WORKED 0
|
||||
#define STAT_CHANGE_DIDNT_WORK 1
|
||||
|
||||
static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
||||
{
|
||||
bool8 certain = FALSE;
|
||||
|
@ -4741,7 +4741,7 @@ bool32 sub_8011A80(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 sub_8011A9C(void)
|
||||
bool32 sub_8011A9C(void)
|
||||
{
|
||||
return gUnknown_03005000.unk_ce8;
|
||||
}
|
||||
|
825
src/mevent_801BAAC.c
Normal file
825
src/mevent_801BAAC.c
Normal file
@ -0,0 +1,825 @@
|
||||
#include "global.h"
|
||||
#include "constants/species.h"
|
||||
#include "bg.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "palette.h"
|
||||
#include "decompress.h"
|
||||
#include "alloc.h"
|
||||
#include "menu.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "union_room.h"
|
||||
#include "list_menu.h"
|
||||
#include "text_window.h"
|
||||
#include "string_util.h"
|
||||
#include "link_rfu.h"
|
||||
#include "mevent.h"
|
||||
|
||||
struct UnkStruct_8467FB8
|
||||
{
|
||||
u8 textPal1:4;
|
||||
u8 textPal2:4;
|
||||
u8 textPal3:4;
|
||||
u8 textPal4:4;
|
||||
const u32 * tiles;
|
||||
const u32 * map;
|
||||
const u16 * pal;
|
||||
};
|
||||
|
||||
struct UnkStruct_203F3C8_02DC
|
||||
{
|
||||
u8 unk_00;
|
||||
u8 unk_01[41];
|
||||
u8 unk_42[4];
|
||||
};
|
||||
|
||||
struct UnkStruct_203F3C8
|
||||
{
|
||||
/*0000*/ struct MEventBuffer_32E0_Sub unk_0000;
|
||||
/*014c*/ struct MEventBuffer_3430_Sub unk_014C;
|
||||
/*0170*/ const struct UnkStruct_8467FB8 * unk_0170;
|
||||
/*0174*/ u8 unk_0174;
|
||||
/*0175*/ u8 unk_0175;
|
||||
/*0176*/ u16 unk_0176[3];
|
||||
/*017C*/ u8 unk_017C;
|
||||
/*017D*/ u8 unk_017D[7][2];
|
||||
/*018B*/ u8 unk_018B[41];
|
||||
/*01B4*/ u8 unk_01B4[41];
|
||||
/*01DD*/ u8 unk_01DD[7];
|
||||
/*01E4*/ u8 unk_01E4[4][41];
|
||||
/*0288*/ u8 unk_0288[41];
|
||||
/*02B1*/ u8 unk_02B1[41];
|
||||
/*02DC*/ struct UnkStruct_203F3C8_02DC unk_02DC[8];
|
||||
/*045C*/ u8 buffer_045C[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA struct UnkStruct_203F3C8 * gUnknown_02022C74 = NULL;
|
||||
|
||||
void sub_801BEF8(void);
|
||||
void sub_801C178(u8 whichWindow);
|
||||
void sub_801C4C0(void);
|
||||
void sub_801C61C(void);
|
||||
|
||||
extern const struct OamData gUnknown_08524934;
|
||||
|
||||
const u8 gUnknown_082F0E10[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
const u8 ALIGNED(4) gUnknown_082F0E18[3] = {7, 4, 7};
|
||||
const struct WindowTemplate gUnknown_082F0E1C[] = {
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 25,
|
||||
.height = 4,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x029c
|
||||
}, {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 6,
|
||||
.width = 28,
|
||||
.height = 8,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x01bc
|
||||
}, {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 14,
|
||||
.width = 28,
|
||||
.height = 5,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x0130
|
||||
}
|
||||
};
|
||||
|
||||
const u16 gWonderCardBgPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_1.gbapal");
|
||||
const u16 gWonderCardBgPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_2.gbapal");
|
||||
const u16 gWonderCardBgPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_3.gbapal");
|
||||
const u16 gWonderCardBgPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_4.gbapal");
|
||||
const u16 gWonderCardBgPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_5.gbapal");
|
||||
const u16 gWonderCardBgPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_6.gbapal");
|
||||
const u16 gWonderCardBgPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_7.gbapal");
|
||||
const u16 gWonderCardBgPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_8.gbapal");
|
||||
const u32 gWonderCardBgGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.4bpp.lz");
|
||||
const u32 gWonderCardBgTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.bin.lz");
|
||||
const u32 gWonderCardBgGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.4bpp.lz");
|
||||
const u32 gWonderCardBgTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.bin.lz");
|
||||
const u32 gWonderCardBgGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.4bpp.lz");
|
||||
const u32 gWonderCardBgTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.bin.lz");
|
||||
const u32 gWonderCardBgGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.4bpp.lz");
|
||||
const u32 gWonderCardBgTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.bin.lz");
|
||||
const u32 gWonderCardBgGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.4bpp.lz");
|
||||
const u32 gWonderCardBgTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.bin.lz");
|
||||
const u16 gWonderCardShadowPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_1.gbapal");
|
||||
const u16 gWonderCardShadowPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_2.gbapal");
|
||||
const u16 gWonderCardShadowPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_3.gbapal");
|
||||
const u16 gWonderCardShadowPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_4.gbapal");
|
||||
const u16 gWonderCardShadowPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_5.gbapal");
|
||||
const u16 gWonderCardShadowPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_6.gbapal");
|
||||
const u16 gWonderCardShadowPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_7.gbapal");
|
||||
const u16 gWonderCardShadowPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_8.gbapal");
|
||||
const u32 gWonderCardShadowGfx[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_shadow.4bpp.lz");
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_082F1D00 = {
|
||||
gWonderCardShadowGfx, 0x100, 0x8000
|
||||
};
|
||||
const struct SpritePalette gUnknown_082F1D08[] = {
|
||||
{gWonderCardShadowPal1, 0x8000},
|
||||
{gWonderCardShadowPal2, 0x8000},
|
||||
{gWonderCardShadowPal3, 0x8000},
|
||||
{gWonderCardShadowPal4, 0x8000},
|
||||
{gWonderCardShadowPal5, 0x8000},
|
||||
{gWonderCardShadowPal6, 0x8000},
|
||||
{gWonderCardShadowPal7, 0x8000},
|
||||
{gWonderCardShadowPal8, 0x8000}
|
||||
};
|
||||
const struct SpriteTemplate gUnknown_082F1D48 = {
|
||||
0x8000, 0x8000, &gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
const struct UnkStruct_8467FB8 gUnknown_082F1D60[8] = {
|
||||
{1, 0, 0, 0, gWonderCardBgGfx1, gWonderCardBgTilemap1, gWonderCardBgPal1},
|
||||
{1, 0, 0, 1, gWonderCardBgGfx2, gWonderCardBgTilemap2, gWonderCardBgPal2},
|
||||
{1, 0, 0, 2, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal3},
|
||||
{1, 0, 0, 3, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal4},
|
||||
{1, 0, 0, 4, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal5},
|
||||
{1, 0, 0, 5, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal6},
|
||||
{1, 0, 0, 6, gWonderCardBgGfx7, gWonderCardBgTilemap7, gWonderCardBgPal7},
|
||||
{1, 0, 0, 7, gWonderCardBgGfx8, gWonderCardBgTilemap8, gWonderCardBgPal8}
|
||||
};
|
||||
|
||||
bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6)
|
||||
{
|
||||
if (r5 == NULL || r6 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C74 = AllocZeroed(sizeof(struct UnkStruct_203F3C8));
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C74->unk_0000 = *r5;
|
||||
gUnknown_02022C74->unk_014C = *r6;
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_2 >= ARRAY_COUNT(gUnknown_082F1D60))
|
||||
gUnknown_02022C74->unk_0000.unk_08_2 = 0;
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_0 >= ARRAY_COUNT(gUnknown_082F0E18))
|
||||
gUnknown_02022C74->unk_0000.unk_08_0 = 0;
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 > ARRAY_COUNT(gUnknown_02022C74->unk_017D))
|
||||
gUnknown_02022C74->unk_0000.unk_09 = 0;
|
||||
gUnknown_02022C74->unk_0170 = &gUnknown_082F1D60[gUnknown_02022C74->unk_0000.unk_08_2];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_801BB48(void)
|
||||
{
|
||||
if (gUnknown_02022C74 != NULL)
|
||||
{
|
||||
*gUnknown_02022C74 = (struct UnkStruct_203F3C8){};
|
||||
Free(gUnknown_02022C74);
|
||||
gUnknown_02022C74 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 sub_801BB74(void)
|
||||
{
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
return -1;
|
||||
switch(gUnknown_02022C74->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_02022C74->unk_0170->tiles, 0, 0x008, 0);
|
||||
gUnknown_02022C74->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]);
|
||||
gUnknown_02022C74->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]);
|
||||
gUnknown_02022C74->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(gUnknown_02022C74->unk_0170->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(gUnknown_02022C74->unk_0170->map, gUnknown_02022C74->buffer_045C);
|
||||
CopyRectToBgTilemapBufferRect(2, gUnknown_02022C74->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 4:
|
||||
sub_801BEF8();
|
||||
break;
|
||||
case 5:
|
||||
sub_801C178(0);
|
||||
sub_801C178(1);
|
||||
sub_801C178(2);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
break;
|
||||
case 6:
|
||||
LoadMonIconPalettes();
|
||||
break;
|
||||
case 7:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sub_801C4C0();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C74->unk_0174 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C74->unk_0174;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 sub_801BDA4(bool32 flag)
|
||||
{
|
||||
if (gUnknown_02022C74 == NULL)
|
||||
return -1;
|
||||
switch (gUnknown_02022C74->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[2]);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[1]);
|
||||
RemoveWindow(gUnknown_02022C74->unk_0176[0]);
|
||||
break;
|
||||
case 4:
|
||||
sub_801C61C();
|
||||
FreeMonIconPalettes();
|
||||
break;
|
||||
case 5:
|
||||
sub_80186EC(gUnknown_02022C60, flag);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C74->unk_0174 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C74->unk_0174;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_801BEF8(void)
|
||||
{
|
||||
u16 i = 0;
|
||||
u16 r6;
|
||||
u16 sp0[3] = {0, 0, 0};
|
||||
|
||||
memcpy(gUnknown_02022C74->unk_018B, gUnknown_02022C74->unk_0000.unk_0A, 40);
|
||||
gUnknown_02022C74->unk_018B[40] = EOS;
|
||||
memcpy(gUnknown_02022C74->unk_01B4, gUnknown_02022C74->unk_0000.unk_32, 40);
|
||||
gUnknown_02022C74->unk_01B4[40] = EOS;
|
||||
if (gUnknown_02022C74->unk_0000.unk_04 > 999999)
|
||||
gUnknown_02022C74->unk_0000.unk_04 = 999999;
|
||||
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_01DD, gUnknown_02022C74->unk_0000.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
memcpy(gUnknown_02022C74->unk_01E4[i], gUnknown_02022C74->unk_0000.unk_5A[i], 40);
|
||||
gUnknown_02022C74->unk_01E4[i][40] = EOS;
|
||||
}
|
||||
memcpy(gUnknown_02022C74->unk_0288, gUnknown_02022C74->unk_0000.unk_FA, 40);
|
||||
gUnknown_02022C74->unk_0288[40] = EOS;
|
||||
switch (gUnknown_02022C74->unk_0000.unk_08_0)
|
||||
{
|
||||
case 0:
|
||||
memcpy(gUnknown_02022C74->unk_02B1, gUnknown_02022C74->unk_0000.unk_122, 40);
|
||||
gUnknown_02022C74->unk_02B1[40] = EOS;
|
||||
break;
|
||||
case 1:
|
||||
gUnknown_02022C74->unk_02B1[00] = EOS;
|
||||
break;
|
||||
case 2:
|
||||
gUnknown_02022C74->unk_02B1[00] = EOS;
|
||||
sp0[0] = gUnknown_02022C74->unk_014C.unk_00 < 999 ? gUnknown_02022C74->unk_014C.unk_00 : 999;
|
||||
sp0[1] = gUnknown_02022C74->unk_014C.unk_02 < 999 ? gUnknown_02022C74->unk_014C.unk_02 : 999;
|
||||
sp0[2] = gUnknown_02022C74->unk_014C.unk_04 < 999 ? gUnknown_02022C74->unk_014C.unk_04 : 999;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
memset(gUnknown_02022C74->unk_02DC[i].unk_42, EOS, 4);
|
||||
memset(gUnknown_02022C74->unk_02DC[i].unk_01, EOS, 41);
|
||||
}
|
||||
for (i = 0, r6 = 0; i < 40; i++)
|
||||
{
|
||||
if (gUnknown_02022C74->unk_0000.unk_122[i] != 0xF7)
|
||||
{
|
||||
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_01[r6] = gUnknown_02022C74->unk_0000.unk_122[i];
|
||||
r6++;
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 r3 = gUnknown_02022C74->unk_0000.unk_122[i + 1];
|
||||
if (r3 > 2)
|
||||
{
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_00 = gUnknown_02022C74->unk_0000.unk_122[i + 2];
|
||||
gUnknown_02022C74->unk_0175++;
|
||||
if (gUnknown_02022C74->unk_0175 > 7)
|
||||
break;
|
||||
r6 = 0;
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_801C178(u8 whichWindow)
|
||||
{
|
||||
s8 sp0C = 0;
|
||||
s32 windowId = gUnknown_02022C74->unk_0176[whichWindow];
|
||||
PutWindowTilemap(windowId);
|
||||
FillWindowPixelBuffer(windowId, 0);
|
||||
switch (whichWindow)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
s32 x;
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_018B);
|
||||
x = 160 - GetStringWidth(3, gUnknown_02022C74->unk_01B4, GetFontAttribute(3, 2));
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01B4);
|
||||
if (gUnknown_02022C74->unk_0000.unk_04 != 0)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 1, 166, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01DD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
for (; sp0C < 4; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal2], 0, gUnknown_02022C74->unk_01E4[sp0C]);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_0288);
|
||||
if (gUnknown_02022C74->unk_0000.unk_08_0 != 2)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02B1);
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 x = 0;
|
||||
s32 y = gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0] + 16;
|
||||
s32 spacing = GetFontAttribute(3, 2);
|
||||
for (; sp0C < gUnknown_02022C74->unk_0175; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_01);
|
||||
if (gUnknown_02022C74->unk_02DC[sp0C].unk_42[0] != EOS)
|
||||
{
|
||||
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_01, spacing);
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_42);
|
||||
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_42, spacing) + gUnknown_02022C74->unk_02DC[sp0C].unk_00;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
CopyWindowToVram(windowId, 3);
|
||||
}
|
||||
|
||||
void sub_801C4C0(void)
|
||||
{
|
||||
u8 r7 = 0;
|
||||
gUnknown_02022C74->unk_017C = 0xFF;
|
||||
if (gUnknown_02022C74->unk_014C.unk_06 != SPECIES_NONE)
|
||||
{
|
||||
gUnknown_02022C74->unk_017C = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE);
|
||||
gSprites[gUnknown_02022C74->unk_017C].oam.priority = 2;
|
||||
}
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&gUnknown_082F1D00);
|
||||
LoadSpritePalette(&gUnknown_082F1D08[gUnknown_02022C74->unk_0170->textPal4]);
|
||||
for (; r7 < gUnknown_02022C74->unk_0000.unk_09; r7++)
|
||||
{
|
||||
gUnknown_02022C74->unk_017D[r7][0] = 0xFF;
|
||||
gUnknown_02022C74->unk_017D[r7][1] = 0xFF;
|
||||
gUnknown_02022C74->unk_017D[r7][0] = CreateSprite(&gUnknown_082F1D48, 0xd8 - 32 * r7, 0x90, 8);
|
||||
if (gUnknown_02022C74->unk_014C.unk_08[0][r7] != 0)
|
||||
{
|
||||
gUnknown_02022C74->unk_017D[r7][1] = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_801C61C(void)
|
||||
{
|
||||
u8 r6 = 0;
|
||||
if (gUnknown_02022C74->unk_017C != 0xFF)
|
||||
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017C]);
|
||||
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
|
||||
{
|
||||
for (; r6 < gUnknown_02022C74->unk_0000.unk_09; r6++)
|
||||
{
|
||||
if (gUnknown_02022C74->unk_017D[r6][0] != 0xFF)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_02022C74->unk_017D[r6][0]]);
|
||||
}
|
||||
if (gUnknown_02022C74->unk_017D[r6][1] != 0xFF)
|
||||
{
|
||||
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017D[r6][1]]);
|
||||
}
|
||||
}
|
||||
FreeSpriteTilesByTag(0x8000);
|
||||
FreeSpritePaletteByTag(0x8000);
|
||||
}
|
||||
}
|
||||
|
||||
struct UnkStruct_203F3CC
|
||||
{
|
||||
/*0000*/ struct MEventBuffer_3120_Sub unk_0000;
|
||||
/*01bc*/ const struct UnkStruct_8467FB8 * unk_01BC;
|
||||
/*01c0*/ u8 unk_01C0_0:1;
|
||||
u8 unk_01C0_1:7;
|
||||
/*01c1*/ u8 unk_01C1;
|
||||
/*01c2*/ u8 unk_01C2_0:1;
|
||||
u8 unk_01C2_1:7;
|
||||
/*01c3*/ u8 unk_01C3_0:1;
|
||||
u8 unk_01C3_1:7;
|
||||
/*01c4*/ u16 unk_01C4;
|
||||
/*01c6*/ u16 unk_01C6;
|
||||
/*01c8*/ u16 unk_01C8[2];
|
||||
/*01cc*/ u8 filler_01CC[2];
|
||||
/*01ce*/ u8 unk_01CE[41];
|
||||
/*01f7*/ u8 unk_01F7[10][41];
|
||||
/*0394*/ struct ScrollArrowsTemplate unk_0394;
|
||||
/*03a4*/ u8 buffer_03A4[0x1000];
|
||||
};
|
||||
|
||||
EWRAM_DATA struct UnkStruct_203F3CC * gUnknown_02022C78 = NULL;
|
||||
|
||||
void sub_801CDCC(void);
|
||||
void sub_801CE7C(void);
|
||||
void sub_801CFA4(void);
|
||||
|
||||
const u8 gUnknown_082F1DE0[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
const struct WindowTemplate gUnknown_082F1DE8[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 0,
|
||||
.width = 28,
|
||||
.height = 3,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x2AC
|
||||
}, {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 3,
|
||||
.width = 28,
|
||||
.height = 20,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x07C
|
||||
}
|
||||
};
|
||||
const struct ScrollArrowsTemplate gUnknown_082F1DF8 = {
|
||||
0x02, 0xe8, 0x18, 0x03, 0xe8, 0x98,
|
||||
0x0000, 0x0002, 0x1000, 0x1000, 0x0
|
||||
};
|
||||
const u16 gWonderNewsPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_1.gbapal");
|
||||
const u16 gWonderNewsPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_7.gbapal");
|
||||
const u16 gWonderNewsPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_8.gbapal");
|
||||
const u32 gWonderNewsGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.4bpp.lz");
|
||||
const u32 gWonderNewsTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.bin.lz");
|
||||
const u32 gWonderNewsGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.4bpp.lz");
|
||||
const u32 gWonderNewsTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.bin.lz");
|
||||
const u32 gWonderNewsGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.4bpp.lz");
|
||||
const u32 gWonderNewsTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.bin.lz");
|
||||
const u32 gWonderNewsGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.4bpp.lz");
|
||||
const u32 gWonderNewsTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.bin.lz");
|
||||
const u32 gWonderNewsGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.4bpp.lz");
|
||||
const u32 gWonderNewsTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.bin.lz");
|
||||
|
||||
const struct UnkStruct_8467FB8 gUnknown_082F24C8[] = {
|
||||
{1, 0, 0, 0, gWonderNewsGfx1, gWonderNewsTilemap1, gWonderNewsPal1},
|
||||
{1, 0, 0, 0, gWonderNewsGfx2, gWonderNewsTilemap2, gWonderCardBgPal2},
|
||||
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal3},
|
||||
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal4},
|
||||
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal5},
|
||||
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal6},
|
||||
{1, 0, 0, 0, gWonderNewsGfx7, gWonderNewsTilemap7, gWonderNewsPal7},
|
||||
{1, 0, 0, 0, gWonderNewsGfx8, gWonderNewsTilemap8, gWonderNewsPal8}
|
||||
};
|
||||
|
||||
bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0)
|
||||
{
|
||||
if (a0 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C78 = AllocZeroed(sizeof(struct UnkStruct_203F3CC));
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
return FALSE;
|
||||
gUnknown_02022C78->unk_0000 = *a0;
|
||||
if (gUnknown_02022C78->unk_0000.unk_03 >= ARRAY_COUNT(gUnknown_082F24C8))
|
||||
gUnknown_02022C78->unk_0000.unk_03 = 0;
|
||||
gUnknown_02022C78->unk_01BC = &gUnknown_082F24C8[gUnknown_02022C78->unk_0000.unk_03];
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_801C72C(void)
|
||||
{
|
||||
if (gUnknown_02022C78 != NULL)
|
||||
{
|
||||
*gUnknown_02022C78 = (struct UnkStruct_203F3CC){};
|
||||
Free(gUnknown_02022C78);
|
||||
gUnknown_02022C78 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 sub_801C758(void)
|
||||
{
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
return -1;
|
||||
|
||||
switch (gUnknown_02022C78->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0x1A98);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0x1F);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0x1B);
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_02022C78->unk_01BC->tiles, 0, 8, 0);
|
||||
gUnknown_02022C78->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]);
|
||||
gUnknown_02022C78->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(gUnknown_02022C78->unk_01BC->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(gUnknown_02022C78->unk_01BC->map, gUnknown_02022C78->buffer_03A4);
|
||||
CopyRectToBgTilemapBufferRect(1, gUnknown_02022C78->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
|
||||
CopyRectToBgTilemapBufferRect(3, gUnknown_02022C78->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 4:
|
||||
sub_801CDCC();
|
||||
break;
|
||||
case 5:
|
||||
sub_801CE7C();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 6:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C78->unk_01C0_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
++gUnknown_02022C78->unk_01C0_1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 sub_801CA50(bool32 flag)
|
||||
{
|
||||
if (gUnknown_02022C78 == NULL)
|
||||
return -1;
|
||||
switch (gUnknown_02022C78->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(2, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(gUnknown_02022C78->unk_01C8[1]);
|
||||
RemoveWindow(gUnknown_02022C78->unk_01C8[0]);
|
||||
break;
|
||||
case 4:
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
if (gUnknown_02022C78->unk_01C1 != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
sub_80186EC(gUnknown_02022C60, flag);
|
||||
sub_8018798(3);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
gUnknown_02022C78->unk_01C0_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
++gUnknown_02022C78->unk_01C0_1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_801CC38(void)
|
||||
{
|
||||
if (!gUnknown_02022C78->unk_01C0_0 && gUnknown_02022C78->unk_01C1 != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
|
||||
gUnknown_02022C78->unk_01C1 = 0xFF;
|
||||
gUnknown_02022C78->unk_01C0_0 = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sub_801CC80(void)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
{
|
||||
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
|
||||
gUnknown_02022C78->unk_01C0_0 = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_801CCD0(u16 input)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C2_0)
|
||||
{
|
||||
sub_801CFA4();
|
||||
return 0xFF;
|
||||
}
|
||||
switch (input)
|
||||
{
|
||||
case A_BUTTON:
|
||||
return 0;
|
||||
case B_BUTTON:
|
||||
return 1;
|
||||
case DPAD_UP:
|
||||
if (gUnknown_02022C78->unk_01C6 == 0)
|
||||
return 0xFF;
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
return 0xFF;
|
||||
gUnknown_02022C78->unk_01C3_0 = FALSE;
|
||||
break;
|
||||
case DPAD_DOWN:
|
||||
if (gUnknown_02022C78->unk_01C6 == gUnknown_02022C78->unk_01C4)
|
||||
return 0xFF;
|
||||
if (gUnknown_02022C78->unk_01C0_0)
|
||||
return 0xFF;
|
||||
gUnknown_02022C78->unk_01C3_0 = TRUE;
|
||||
break;
|
||||
default:
|
||||
return 0xFF;
|
||||
}
|
||||
gUnknown_02022C78->unk_01C2_0 = TRUE;
|
||||
gUnknown_02022C78->unk_01C2_1 = 2;
|
||||
gUnknown_02022C78->unk_01C3_1 = 0;
|
||||
if (gUnknown_02022C78->unk_01C3_0 == FALSE)
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
}
|
||||
|
||||
void sub_801CDCC(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
memcpy(gUnknown_02022C78->unk_01CE, gUnknown_02022C78->unk_0000.unk_04, 40);
|
||||
gUnknown_02022C78->unk_01CE[40] = EOS;
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
memcpy(gUnknown_02022C78->unk_01F7[i], gUnknown_02022C78->unk_0000.unk_2C[i], 40);
|
||||
gUnknown_02022C78->unk_01F7[i][40] = EOS;
|
||||
if (i > 7 && gUnknown_02022C78->unk_01F7[i][0] != EOS)
|
||||
++gUnknown_02022C78->unk_01C4;
|
||||
}
|
||||
gUnknown_02022C78->unk_0394 = gUnknown_082F1DF8;
|
||||
gUnknown_02022C78->unk_0394.fullyDownThreshold = gUnknown_02022C78->unk_01C4;
|
||||
}
|
||||
|
||||
void sub_801CE7C(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
s32 x;
|
||||
PutWindowTilemap(gUnknown_02022C78->unk_01C8[0]);
|
||||
PutWindowTilemap(gUnknown_02022C78->unk_01C8[1]);
|
||||
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[0], 0);
|
||||
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[1], 0);
|
||||
x = (0xe0 - GetStringWidth(3, gUnknown_02022C78->unk_01CE, GetFontAttribute(3, 2))) / 2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[0], 3, x, 6, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal1], 0, gUnknown_02022C78->unk_01CE);
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal2], 0, gUnknown_02022C78->unk_01F7[i]);
|
||||
}
|
||||
CopyWindowToVram(gUnknown_02022C78->unk_01C8[0], 3);
|
||||
CopyWindowToVram(gUnknown_02022C78->unk_01C8[1], 3);
|
||||
}
|
||||
|
||||
void sub_801CFA4(void)
|
||||
{
|
||||
u16 r4 = gUnknown_02022C78->unk_01C2_1;
|
||||
r4 <<= 8;
|
||||
if (gUnknown_02022C78->unk_01C3_0)
|
||||
{
|
||||
ChangeBgY(2, r4, 1);
|
||||
ChangeBgY(3, r4, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeBgY(2, r4, 2);
|
||||
ChangeBgY(3, r4, 2);
|
||||
}
|
||||
gUnknown_02022C78->unk_01C3_1 += gUnknown_02022C78->unk_01C2_1;
|
||||
if (gUnknown_02022C78->unk_01C3_1 > 15)
|
||||
{
|
||||
if (gUnknown_02022C78->unk_01C3_0)
|
||||
++gUnknown_02022C78->unk_01C6;
|
||||
else
|
||||
--gUnknown_02022C78->unk_01C6;
|
||||
gUnknown_02022C78->unk_01C2_0 = FALSE;
|
||||
gUnknown_02022C78->unk_01C3_1 = 0;
|
||||
}
|
||||
}
|
@ -43,9 +43,8 @@
|
||||
#include "field_specials.h"
|
||||
#include "berry_powder.h"
|
||||
#include "mevent.h"
|
||||
#include "union_room_chat.h"
|
||||
|
||||
|
||||
extern void copy_strings_to_sav1(void);
|
||||
extern void ResetPokeJumpResults(void);
|
||||
|
||||
extern const u8 EventScript_ResetAllMapFlags[];
|
||||
|
@ -1601,7 +1601,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentX = *textPrinter->printerTemplate.currentChar + textPrinter->printerTemplate.x;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case 19:
|
||||
case EXT_CTRL_CODE_CLEAR_TO:
|
||||
{
|
||||
widthHelper = *textPrinter->printerTemplate.currentChar;
|
||||
widthHelper += textPrinter->printerTemplate.x;
|
||||
@ -1615,7 +1615,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
}
|
||||
}
|
||||
return 2;
|
||||
case 20:
|
||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_JPN:
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "rom_8011DC0.h"
|
||||
#include "easy_chat.h"
|
||||
#include "event_obj_lock.h"
|
||||
#include "union_room_chat.h"
|
||||
|
||||
EWRAM_DATA u8 gUnknown_02022C20[12] = {};
|
||||
EWRAM_DATA u8 gUnknown_02022C2C = 0;
|
||||
@ -95,7 +96,6 @@ bool32 sub_8017678(struct UnkStruct_Shared *arg0, struct UnkStruct_Shared *arg1)
|
||||
u32 sub_8018120(struct TradeUnkStruct *arg0, u8 multiplayerId);
|
||||
void sub_801807C(struct TradeUnkStruct *arg0);
|
||||
void sub_801AC54(void);
|
||||
void sub_801DD98(void);
|
||||
void sub_802A9A8(u8 monId, MainCallback callback);
|
||||
void sub_802493C(u8 monId, MainCallback callback);
|
||||
void sub_8020C70(MainCallback callback);
|
||||
|
2630
src/union_room_chat.c
Executable file
2630
src/union_room_chat.c
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user