From fe3bcd62eec9c4ac8515d0bfb762fee363f35059 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 19 Apr 2014 03:08:26 -0400 Subject: [PATCH 01/18] Trainer card graphics and misc incbins in banks 21 and 22. --- gfx/misc/chris.5x7.2bpp | Bin 0 -> 560 bytes gfx/misc/chris.7x7.2bpp | Bin 0 -> 784 bytes gfx/misc/kris.5x7.2bpp | Bin 0 -> 560 bytes gfx/misc/kris.7x7.2bpp | Bin 0 -> 784 bytes gfx/misc/kris_back.6x6.2bpp | Bin 0 -> 576 bytes gfx/misc/trainer_card.2bpp | Bin 0 -> 96 bytes main.asm | 529 +++++++++++++++++++++++++++++------- 7 files changed, 432 insertions(+), 97 deletions(-) create mode 100644 gfx/misc/chris.5x7.2bpp create mode 100644 gfx/misc/chris.7x7.2bpp create mode 100644 gfx/misc/kris.5x7.2bpp create mode 100644 gfx/misc/kris.7x7.2bpp create mode 100644 gfx/misc/kris_back.6x6.2bpp create mode 100644 gfx/misc/trainer_card.2bpp diff --git a/gfx/misc/chris.5x7.2bpp b/gfx/misc/chris.5x7.2bpp new file mode 100644 index 0000000000000000000000000000000000000000..747bd0da5a57e29c8973c59c5c68a5973e606f02 GIT binary patch literal 560 zcmbV|KTCo^9LMi@?(8(B=R&AK=^mVejDi}h=MmpPdrL#m5(!NW(Q}WIG&lr7G?}y0 zLvNrHEE^hp2VD)(AbFD*sMkHUM77js_)XtGKfVC`7eiy3CNv;M7(vr8{+{%a0RfC) z2*3JuGBn`?j#-2fYCCz)SLTtqj?$5}*xTJeF6NuQuiX%8UHApi2cZZ;I2w<~CosfO z4a5Loi)3AwXh-!C3V7H80GF$SbS^PBrLioFQs-LL_G*pu zMt`!K?qppa1l4MiW}KEn>c#7?JSMl!Bo!*>6usR;gu27!Dr%J~rAoMuprtkIZ#sht?u*cfMTAGz$gohEVH*D}a6w3L%8U(P(r6 zLmbvX3;?!B%JZ1!wdbn58jO1C;rX(&xsmm<+Y3txJC|$UWZTK7iy<49M&;r0sB~Ls zGS-j{378lt#WjpGraN`3t}0&b-_Hw&J01tMTFnatJZJ%c%T?b_$L6LqmSs`uUaRU} zwSHdjPj>B2%Hxejr4pw}x22GJ$@f@xwlmL^^`=pLK!uGevtmM|31P MB}9mE^b%m@UPmF@2x>Knc%)Jw>-vs+lixb#ll)^}q~#m|p_H*R(C zajaBRlaK(p6{H#!Ffbzg0Fq&1W@YE#8uvQM zEwo>_ePMe;-^s{l+jjEHtE(S9&+X5*MMhCV-%WfPn-D2MZ4n z^!)x^{re~956&Mge_Hmm?C99h!BD}%lJexoj}s>f3K$x|?r3mG5D++VLg9%>iNGhN zUypV@va%1?3)TsLBmc$zLj1k^yH_TbnHdVl$WP?sCkF>RJ4l?J-@u^8;rkE8|H=Qq&-~w5*SOb7 zZlV3c?F-u*`c6hZ+qRQmUS0j@d2WB+^{dv|+11t6)&KurUmsWBFaZP|1PmlNI9Paq zpy&7R>fb*(e{lY2`O~teWk<)34u%RAmXs$yew;W_P{7atc1MFlf`Gt@6ADj6N(4SB z{d%l3DQ^t2y$IN*=~ z0tyBK1_A;G1s^_qxbTAm2s?JP$h5?`#JITBFg5MkenvF)S5 z)pQjz9Aat^MaKi%u4f3LmSyc-N~uK;G`s$Z{$7{Rrt1V=6hX)SVtu$L}a3rrBVQ`R`+nwaoY#occaaj&6zK2i|3QGwfBDOKr(^YE|2AjmQrh_ Ygs8Pb3_=-7*;n3UUqAi!{q4eq-%L@_cK`qY literal 0 HcmV?d00001 diff --git a/gfx/misc/trainer_card.2bpp b/gfx/misc/trainer_card.2bpp new file mode 100644 index 0000000000000000000000000000000000000000..09de7a2dfb45885a58546327d69a78ad4de5a6d2 GIT binary patch literal 96 zcmZSh&-W1o3;IEj;XgwI!vTf|3?B+Q3VI6qfP66c4+Id_fdd~t{P~06Gcd%&1ce2G XKv+x+L=6MOr0G|$ZrwU*Is*d$uF@sA literal 0 HcmV?d00001 diff --git a/main.asm b/main.asm index 6265e91dd..dc2541e88 100644 --- a/main.asm +++ b/main.asm @@ -64852,7 +64852,7 @@ Function84071: ; 84071 (21:4071) ; no known jump sources Function84077: ; 84077 (21:4077) call Function841fb - ld hl, $42b7 + ld hl, Unknown_842b7 call Function841e2 xor a ld [$ca8e], a @@ -64872,7 +64872,7 @@ Function84099: ; 84099 (21:4099) ld a, [hl] and a jr z, Function840c5 - ld hl, $42c3 + ld hl, Unknown_842c3 call Function841e2 call Function84260 ld a, $80 @@ -64890,7 +64890,7 @@ Function84099: ; 84099 (21:4099) Function840c5: ; 840c5 (21:40c5) ld a, $6 ld [$cf63], a - ld hl, $42c9 + ld hl, Unknown_842c9 call Function841e2 xor a ld [$ca8e], a @@ -64902,7 +64902,7 @@ Function840c5: ; 840c5 (21:40c5) ; no known jump sources Function840de: ; 840de (21:40de) call Function841fb - ld hl, $42bd + ld hl, Unknown_842bd call Function841e2 call Function84249 ld a, $4 @@ -64919,7 +64919,7 @@ Function840de: ; 840de (21:40de) ; no known jump sources Function84103: ; 84103 (21:4103) call Function841fb - ld hl, $42b7 + ld hl, Unknown_842b7 call Function841e2 xor a ld [$ca8e], a @@ -65178,7 +65178,7 @@ Function84260: ; 84260 (21:4260) or $80 .asm_84299 ld d, a - ld bc, $2101 + lb bc, $21, 1 call Request2bpp pop hl ld de, $10 @@ -65204,7 +65204,13 @@ Function842ab: ; 842ab ret ; 842b7 -INCBIN "baserom.gbc",$842b7,$842db - $842b7 +Unknown_842b7: db 1, 0, $00, 0, 1, 0 +Unknown_842bd: db 2, 0, $04, 0, 0, 0 +Unknown_842c3: db 4, 0, $80, 2, 0, 0 +Unknown_842c9: db 4, 0, $00, 0, 4, 0 +Unknown_842cf: db 8, 0, $00, 0, 8, 0 ; unused +Unknown_842d5: db 15, 0, $00, 0, 15, 0 ; unused +; 842db Function842db:: ; 842db @@ -65456,8 +65462,8 @@ Function8442c: ; 8442c ld a, [$cf65] push af ld hl, VTiles1 - ld de, Function84000 - ld bc, $3680 + ld de, FontInversed + lb bc, BANK(FontInversed), $80 call Request1bpp xor a ld [$ffac], a @@ -66784,8 +66790,8 @@ Function86748: ; 86748 Function86810: ; 86810 call WhiteBGMap ld hl, $9630 - ld de, $40d0 - ld bc, $3e01 + ld de, FontExtra + $d0 + lb bc, BANK(FontExtra), 1 call Request2bpp ld hl, TileMap ld bc, $0168 @@ -66876,20 +66882,28 @@ Function86810: ; 86810 SECTION "bank22", ROMX, BANK[$22] Function88000: ; 88000 - ld hl, $4007 + ld hl, UnknownText_0x88007 call PrintText ret ; 88007 -INCBIN "baserom.gbc",$88007,$8800c - $88007 +UnknownText_0x88007: ; 0x88007 + ; Which APRICORN should I use? + text_jump UnknownText_0x1bc06b + db "@" +; 0x8800c Function8800c: ; 8800c - ld hl, $4013 + ld hl, UnknownText_0x88013 call PrintText ret ; 88013 -INCBIN "baserom.gbc",$88013,$88018 - $88013 +UnknownText_0x88013: ; 0x88013 + ; How many should I make? + text_jump UnknownText_0x1bc089 + db "@" +; 0x88018 Function88018: ; 88018 call Function1d6e @@ -66928,7 +66942,7 @@ Function88018: ; 88018 Function88055: ; 88055 callba Function24c64 jr c, .asm_88083 - ld hl, $4086 + ld hl, MenuDataHeader_0x88086 call Function1d3c ld a, [MenuSelection] ld [$cf88], a @@ -66952,7 +66966,43 @@ Function88055: ; 88055 ret ; 88086 -INCBIN "baserom.gbc",$88086,$880c2 - $88086 +MenuDataHeader_0x88086: ; 0x88086 + db $40 ; flags + db 01, 01 ; start coords + db 10, 13 ; end coords + dw MenuData2_0x8808f + db 1 ; default option +; 0x8808e + + db 0 + +MenuData2_0x8808f: ; 0x8808f + db $10 ; flags + db 4, 7 + db 1 + dbw 0, $d1ea + dbw BANK(Function8809f), Function8809f + dbw BANK(Function880ab), Function880ab + dbw BANK(NULL), NULL + +Function8809f: ; 8809f + ld a, [MenuSelection] + and a + ret z + callba Function24ab4 + ret +; 880ab + +Function880ab: ; 880ab + ld a, [MenuSelection] + ld [CurItem], a + call Function88139 + ret z + ld a, [$d10c] + ld [$cf75], a + callba Function24ac3 + ret +; 880c2 Function880c2: ; 880c2 ld a, [CurItem] @@ -66963,7 +67013,7 @@ Function880c2: ; 880c2 ld [$d10d], a ld a, $1 ld [$d10c], a - ld hl, $410d + ld hl, MenuDataHeader_0x8810d call LoadMenuDataHeader .asm_880de xor a @@ -66990,7 +67040,12 @@ Function880c2: ; 880c2 ret ; 8810d -INCBIN "baserom.gbc",$8810d,$88116 - $8810d +MenuDataHeader_0x8810d: ; 0x8810d + db $40 ; flags + db 09, 06 ; start coords + db 12, 19 ; end coords + +INCBIN "baserom.gbc",$88112,$88116 - $88112 Function88116: ; 88116 call Function1cfd @@ -67226,7 +67281,19 @@ Function88211: ; 88211 ret ; 88248 -INCBIN "baserom.gbc",$88248,$88258 - $88248 + +Function88248: ; 88248 + ld c, $c + ld a, [PlayerGender] + bit 0, a + jr z, .asm_88253 + ld c, $e + +.asm_88253 + ld a, c + ld [TrainerClass], a + ret +; 88258 MovePlayerPicRight: ; 88258 hlcoord 6, 4 @@ -67304,6 +67371,7 @@ MenuData2_0x882be: ; 882be db $91 ; flags db 5 ; items db "NEW NAME@" +Unknown_882c9: ; 882c9 db "CHRIS@" db "MAT@" db "ALLAN@" @@ -67325,6 +67393,7 @@ MenuData2_0x882ee: ; 882ee db $91 ; flags db 5 ; items db "NEW NAME@" +Unknown_882f9: ; 882f9 db "KRIS@" db "AMANDA@" db "JUANA@" @@ -67333,7 +67402,18 @@ MenuData2_0x882ee: ; 882ee db " NAME @" ; title ; 88318 -INCBIN "baserom.gbc",$88318,$8832c - $88318 +Function88318: ; 88318 + ld hl, PlayerName + ld de, Unknown_882c9 + ld a, [PlayerGender] + bit 0, a + jr z, .asm_88328 + ld de, Unknown_882f9 + +.asm_88328 + call InitName + ret +; 8832c GetPlayerIcon: ; 8832c ; Get the player icon corresponding to gender @@ -67355,35 +67435,45 @@ GetPlayerIcon: ; 8832c ; 8833e Function8833e: ; 8833e - ld hl, $4365 + ld hl, ChrisCardPic ld a, [PlayerGender] ; $d472 bit 0, a jr z, .asm_8834b - ld hl, $4595 + ld hl, KrisCardPic .asm_8834b ld de, $9000 ld bc, $230 - ld a, $22 + ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic) call FarCopyBytes - ld hl, $47c5 + ld hl, CardGFX ld de, $9230 ld bc, $60 - ld a, $22 + ld a, BANK(CardGFX) call FarCopyBytes ret ; 88365 (22:4365) -INCBIN "baserom.gbc",$88365,$88825 - $88365 +ChrisCardPic: ; 88365 +INCBIN "gfx/misc/chris.5x7.2bpp" +; 88595 + +KrisCardPic: ; 88595 +INCBIN "gfx/misc/kris.5x7.2bpp" +; 887c5 + +CardGFX: ; 887c5 +INCBIN "gfx/misc/trainer_card.2bpp" +; 88825 GetPlayerBackpic: ; 88825 ld a, [PlayerGender] bit 0, a - jr z, .asm_88830 + jr z, GetChrisBackpic call GetKrisBackpic ret -.asm_88830 +GetChrisBackpic: ; 88830 ld hl, ChrisBackpic ld b, BANK(ChrisBackpic) ld de, $9310 @@ -67397,11 +67487,11 @@ Function88840: ; 88840 call WaitBGMap xor a ld [hBGMapMode], a - ld e, $0 + ld e, 0 ld a, [PlayerGender] bit 0, a jr z, .asm_88851 - ld e, $1 + ld e, 1 .asm_88851 ld a, e @@ -67414,7 +67504,7 @@ Function88840: ; 88840 .asm_88862 ld hl, VTiles2 - ld b, $22 + ld b, BANK(ChrisPic) ; BANK(KrisPic) ld c, $31 call Get2bpp call WaitBGMap @@ -67446,7 +67536,7 @@ DrawIntroPlayerPic: ; 88874 ld de, KrisPic .GotPic ld hl, VTiles2 - ld b, BANK(ChrisPic) + ld b, BANK(ChrisPic) ; BANK(KrisPic) ld c, 7 * 7 ; dimensions call Get2bpp @@ -67462,11 +67552,11 @@ DrawIntroPlayerPic: ; 88874 ChrisPic: ; 888a9 -INCBIN "baserom.gbc",$888a9,$88bb9 - $888a9 +INCBIN "gfx/misc/chris.7x7.2bpp" ; 88bb9 KrisPic: ; 88bb9 -INCBIN "baserom.gbc",$88bb9,$88ec9 - $88bb9 +INCBIN "gfx/misc/kris.7x7.2bpp" ; 88ec9 @@ -67480,11 +67570,27 @@ GetKrisBackpic: ; 88ec9 ; 88ed6 KrisBackpic: ; 88ed6 -INCBIN "baserom.gbc",$88ed6,$89116 - $88ed6 +INCBIN "gfx/misc/kris_back.6x6.2bpp" ; 89116 -INCBIN "baserom.gbc",$89116,$89160 - $89116 +String_89116: + db "-----@" +; 8911c + +String_8911c: ; 8911c + db "でんわばんごうが ただしく" ; Phone number is not + next "はいって いません!@" ; entered correctly! +; 89135 + +String_89135: ; 89135 + db "データが かわって いますが" ; The data has changed. + next "かきかえないで やめますか?@" ; Quit anyway? +; 89153 + +String_89153: ; 89153 + db "メッセージは ありません@" ; No message +; 89160 Function89160: ; 89160 push af @@ -67714,7 +67820,7 @@ Function8925e: ; 8925e Function89261: ; 89261 push af push bc - ld hl, $52a3 + ld hl, MenuDataHeader_0x892a3 call Function1d3c pop bc ld hl, $cf82 @@ -67752,7 +67858,20 @@ Function89261: ; 89261 ret ; 892a3 -INCBIN "baserom.gbc",$892a3,$892b4 - $892a3 +MenuDataHeader_0x892a3: ; 0x892a3 + db $40 ; flags + db 05, 10 ; start coords + db 09, 15 ; end coords + dw MenuData2_0x892ab + db 1 ; default option +; 0x892ab + +MenuData2_0x892ab: ; 0x892ab + db $c0 ; flags + db 2 ; items + db "はい@" + db "いいえ@" +; 0x892b4 ; known jump sources: 89313 (22:5313), 8a8f4 (22:68f4), 8b9ff (22:79ff) Function892b4: ; 892b4 (22:52b4) @@ -67999,14 +68118,24 @@ Function893e2: ; 893e2 (22:53e2) Function893ef: ; 893ef ld de, VTiles0 - ld hl, $540b + ld hl, GFX_8940b ld bc, $0020 - ld a, $22 + ld a, BANK(GFX_8940b) call FarCopyBytes ret ; 893fe -INCBIN "baserom.gbc",$893fe,$8942b - $893fe +Function893fe: ; 893fe + call DisableLCD + call Function893ef + call EnableLCD + call DelayFrame + ret +; 8940b + +GFX_8940b: ; 8940b +INCBIN "baserom.gbc",$8940b,$8942b - $8940b +; 8942b ; known jump sources: 893c2 (22:53c2) Function8942b: ; 8942b (22:542b) @@ -68086,7 +68215,7 @@ Function8949c: ; 8949c push af ld a, $5 ld [rSVBK], a - ld hl, $54b3 + ld hl, Palette_894b3 ld de, $d038 ld bc, $0008 call CopyBytes @@ -68095,7 +68224,12 @@ Function8949c: ; 8949c ret ; 894b3 -INCBIN "baserom.gbc",$894b3,$894bb - $894b3 +Palette_894b3: ; 894b3 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 00, 00, 00 +; 894bb Function894bb: ; 894bb call Function894dc @@ -68126,8 +68260,8 @@ Function894dc: ; 894dc ld a, $5 ld [rSVBK], a ld c, d - ld b, $0 - ld hl, $5509 + ld b, 0 + ld hl, Unknown_89509 add hl, bc add hl, bc ld a, [hli] @@ -68136,7 +68270,7 @@ Function894dc: ; 894dc ld de, Unkn1Pals ld bc, $0018 call CopyBytes - ld hl, $5557 + ld hl, Palette_89557 ld de, $d018 ld bc, $0018 call CopyBytes @@ -68146,7 +68280,76 @@ Function894dc: ; 894dc ret ; 89509 -INCBIN "baserom.gbc",$89509,$8956f - $89509 +Unknown_89509: ; 89509 + dw Palette_8950f + dw Palette_89527 + dw Palette_8953f +; 8950f + +Palette_8950f: ; 8950f + RGB 31, 31, 31 + RGB 10, 17, 13 + RGB 10, 08, 22 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 10, 08, 22 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 10, 17, 13 + RGB 00, 00, 00 + +Palette_89527: ; 89527 + RGB 31, 31, 31 + RGB 30, 22, 11 + RGB 31, 08, 15 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 31, 08, 15 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 30, 22, 11 + RGB 00, 00, 00 + +Palette_8953f: ; 8953f + RGB 31, 31, 31 + RGB 15, 20, 26 + RGB 25, 07, 20 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 25, 07, 20 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 15, 20, 26 + RGB 00, 00, 00 + +Palette_89557: ; 89557 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 13, 00 + RGB 14, 08, 00 + + RGB 31, 31, 31 + RGB 16, 16, 31 + RGB 00, 00, 31 + RGB 00, 00, 00 + + RGB 19, 31, 11 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 +; 8956f Function8956f: ; 8956f push bc @@ -68177,7 +68380,7 @@ Function8956f: ; 8956f ld l, a add hl, hl add hl, hl - ld de, $70ce + ld de, TrainerPalettes add hl, de ld a, [rSVBK] push af @@ -68186,7 +68389,7 @@ Function8956f: ; 8956f ld de, $d032 ld c, $4 .asm_895b1 - ld a, $2 + ld a, BANK(TrainerPalettes) call GetFarByte ld [de], a inc de @@ -68210,7 +68413,7 @@ Function895c7: ; 895c7 (22:55c7) push af ld a, $5 ld [rSVBK], a ; $ff00+$70 - ld hl, $55de + ld hl, Palette_895de ld de, $d030 ld bc, $8 call CopyBytes @@ -68219,7 +68422,20 @@ Function895c7: ; 895c7 (22:55c7) ret ; 895de (22:55de) -INCBIN "baserom.gbc",$895de,$895f2 - $895de +Palette_895de: ; 895de + RGB 31, 31, 31 + RGB 07, 07, 06 + RGB 07, 07, 06 + RGB 00, 00, 00 +; 895e6 + +Function895e6: ; 895e6 + ld a, $7 + ld hl, AttrMap + ld bc, $0168 + call ByteFill + ret +; 895f2 Function895f2: ; 895f2 push bc @@ -68747,7 +68963,7 @@ Function898be: ; 898be ld hl, DefaultFlypoint call Function89331 jr nc, .asm_898cd - ld de, $5116 + ld de, String_89116 .asm_898cd ld hl, $c4bd @@ -68770,7 +68986,7 @@ Function898dc: ; 898dc ld e, l call Function8934a jr nc, .asm_898eb - ld de, $5116 + ld de, String_89116 .asm_898eb ld hl, $c4f6 @@ -68794,7 +69010,7 @@ Function898f3: ; 898f3 .asm_8990a ld hl, $c509 - ld de, $5116 + ld de, String_89116 call PlaceString .asm_89913 @@ -68805,7 +69021,7 @@ Function898f3: ; 898f3 Function89915: ; 89915 push bc push hl - ld de, $5942 + ld de, Unknown_89942 ld c, $8 .asm_8991c ld a, [de] @@ -68820,7 +69036,7 @@ Function89915: ; 89915 ld b, $4 ld c, $2b ld a, $8 - ld de, $594a + ld de, Unknown_8994a .asm_89932 push af ld a, [de] @@ -68838,7 +69054,11 @@ Function89915: ; 89915 ret ; 89942 -INCBIN "baserom.gbc",$89942,$8994e - $89942 +Unknown_89942: ; 89942 + db $24, $25, $26, " ", $27, $28, $29, $2a +Unknown_8994a: ; 8994a + db $24, $27, $29, $ff +; 8994e Function8994e: ; 8994e push hl @@ -68921,12 +69141,14 @@ Function8999c: ; 8999c (22:599c) inc bc ld h, b ld l, c - ld de, $59ac + ld de, String_899ac call PlaceString ret ; 899ac (22:59ac) -INCBIN "baserom.gbc",$899ac,$899b2 - $899ac +String_899ac: ; 899ac + db "の めいし@" +; 899b2 ; known jump sources: 89897 (22:5897) Function899b2: ; 899b2 (22:59b2) @@ -68936,7 +69158,7 @@ Function899b2: ; 899b2 (22:59b2) ld de, PlayerName ; $d47d jr .asm_899c2 .asm_899bf - ld de, $5116 + ld de, String_89116 .asm_899c2 ld hl, $c4f6 call PlaceString @@ -68991,7 +69213,7 @@ Function89a0c: ; 89a0c ret .asm_89a1c - ld de, $5153 + ld de, String_89153 call PlaceString ret ; 89a23 @@ -69012,16 +69234,22 @@ Function89a2e: ; 89a2e (22:5a2e) ld c, $6 call TextBox ld hl, $c5b1 - ld de, $5a4e + ld de, String_89a4e call PlaceString ld hl, $c5c5 - ld de, $5a53 + ld de, String_89a53 call PlaceString call Function89655 ret ; 89a4e (22:5a4e) -INCBIN "baserom.gbc",$89a4e,$89a57 - $89a4e +String_89a4e: ; 89a4e + db "けってい@" +; 89a53 + +String_89a53: ; 89a53 + db "やめる@" +; 89a57 Function89a57: ; 89a57 call Function354b @@ -69063,7 +69291,7 @@ Function89a57: ; 89a57 Function89a8a: ; 89a8a push af - ld de, $0062 + ld de, SFX_UNKNOWN_62 call PlaySFX pop af ret @@ -69165,7 +69393,19 @@ Function89b00: ; 89b00 (22:5b00) ret ; 89b07 (22:5b07) -INCBIN "baserom.gbc",$89b07,$89b1e - $89b07 +Function89b07: ; 89b07 + call Function8923c + call DelayFrame + callba Function4a3a7 + ret +; 89b14 + +Function89b14: ; 89b14 + call WhiteBGMap + call Function89b07 + call Function89b00 + ret +; 89b1e ; known jump sources: 893e2 (22:53e2) Function89b1e: ; 89b1e (22:5b1e) @@ -69271,7 +69511,7 @@ Function89b97: ; 89b97 (22:5b97) ret .asm_89ba0 ld a, [$d011] - ld hl, $5bd8 + ld hl, Unknown_89bd8 and a jr z, .asm_89bae .asm_89ba9 @@ -69317,6 +69557,7 @@ Function89b97: ; 89b97 (22:5b97) jr .asm_89bb4 ; 89bd8 (22:5bd8) +Unknown_89bd8: ; 89bd8 INCBIN "baserom.gbc",$89bd8,$89c34 - $89bd8 ; known jump sources: 89b97 (22:5b97), 89c44 (22:5c44) @@ -69400,11 +69641,11 @@ Function89c67: ; 89c67 (22:5c67) dec a ld c, a ld d, $0 - ld hl, $5cbf + ld hl, Unknown_89cbf ld a, [$d02f] and a jr z, .asm_89ca5 - ld hl, $5ccf + ld hl, Unknown_89ccf .asm_89ca5 ld a, [$d011] and a @@ -69427,7 +69668,12 @@ Function89c67: ; 89c67 (22:5c67) ret ; 89cbf (22:5cbf) -INCBIN "baserom.gbc",$89cbf,$89cdf - $89cbf +Unknown_89cbf: ; 89cbf +INCBIN "baserom.gbc",$89cbf,$89ccf - $89cbf + +Unknown_89ccf: ; 89ccf +INCBIN "baserom.gbc",$89ccf,$89cdf - $89ccf +; 89cdf ; known jump sources: 8a50e (22:650e) Function89cdf: ; 89cdf (22:5cdf) @@ -69479,13 +69725,13 @@ Function89d0d: ; 89d0d (22:5d0d) ld de, Unkn1Pals ; $d000 .asm_89d1c push bc - ld hl, $5d4e + ld hl, Palette_89d4e ld bc, $8 call CopyBytes pop bc dec c jr nz, .asm_89d1c - ld hl, $5d56 + ld hl, Palette_89d56 ld de, $d010 ld bc, $8 call CopyBytes @@ -69500,7 +69746,19 @@ Function89d0d: ; 89d0d (22:5d0d) ret ; 89d4e (22:5d4e) -INCBIN "baserom.gbc",$89d4e,$89d5e - $89d4e +Palette_89d4e: ; 89d4e + RGB 31, 31, 31 + RGB 19, 19, 19 + RGB 15, 15, 15 + RGB 00, 00, 00 +; 89d56 + +Palette_89d56: ; 89d56 + RGB 31, 31, 31 + RGB 19, 19, 19 + RGB 19, 19, 19 + RGB 00, 00, 00 +; 89d5e ; known jump sources: 8a18b (22:618b), 8a9de (22:69de), 8b989 (22:7989) Function89d5e: ; 89d5e (22:5d5e) @@ -69710,7 +69968,7 @@ Function89e9a: ; 89e9a (22:5e9a) push af ld a, $5 ld [rSVBK], a ; $ff00+$70 - ld hl, $5eb1 + ld hl, Palette_89eb1 ld de, $d028 ld bc, $8 call CopyBytes @@ -69719,7 +69977,12 @@ Function89e9a: ; 89e9a (22:5e9a) ret ; 89eb1 (22:5eb1) -INCBIN "baserom.gbc",$89eb1,$89eb9 - $89eb1 +Palette_89eb1: ; 89eb1 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 27, 19, 00 + RGB 00, 00, 00 +; 89eb9 ; no known jump sources Function89eb9: ; 89eb9 (22:5eb9) @@ -69929,7 +70192,7 @@ Function89fce: ; 89fce (22:5fce) ; no known jump sources Function89fed: ; 89fed (22:5fed) - ld hl, $6102 + ld hl, UnknownText_0x8a102 call PrintText jp Function89e36 @@ -69962,7 +70225,7 @@ Function89ff6: ; 89ff6 (22:5ff6) ; no known jump sources Function8a03d: ; 8a03d (22:603d) - ld hl, $6107 + ld hl, UnknownText_0x8a107 call Function89209 call PrintText call Function8920f @@ -69970,7 +70233,7 @@ Function8a03d: ; 8a03d (22:603d) ; no known jump sources Function8a04c: ; 8a04c (22:604c) - ld hl, $610c + ld hl, UnknownText_0x8a10c call PrintText jp Function89e36 @@ -70078,7 +70341,7 @@ Function8a0e6: ; 8a0e6 (22:60e6) ; no known jump sources Function8a0ec: ; 8a0ec (22:60ec) - ld hl, $6111 + ld hl, UnknownText_0x8a111 call PrintText jp Function89e36 @@ -70094,7 +70357,29 @@ Function8a0ff: ; 8a0ff (22:60ff) jp Function89e36 ; 8a102 (22:6102) -INCBIN "baserom.gbc",$8a102,$8a116 - $8a102 +UnknownText_0x8a102: ; 0x8a102 + ; The CARD FOLDER stores your and your friends' CARDS. A CARD contains information like the person's name, phone number and profile. + text_jump UnknownText_0x1c5238 + db "@" +; 0x8a107 + +UnknownText_0x8a107: ; 0x8a107 + ; This is your CARD. Once you've entered your phone number, you can trade CARDS with your friends. + text_jump UnknownText_0x1c52bc + db "@" +; 0x8a10c + +UnknownText_0x8a10c: ; 0x8a10c + ; If you have your friend's CARD, you can use it to make a call from a mobile phone on the 2nd floor of a #MON CENTER. + text_jump UnknownText_0x1c531e + db "@" +; 0x8a111 + +UnknownText_0x8a111: ; 0x8a111 + ; To safely store your collection of CARDS, you must set a PASSCODE for your CARD FOLDER. + text_jump UnknownText_0x1c5394 + db "@" +; 0x8a116 ; no known jump sources Function8a116: ; 8a116 (22:6116) @@ -73029,7 +73314,7 @@ Function8b94a: ; 8b94a ; known jump sources: 8a656 (22:6656) Function8b960: ; 8b960 (22:7960) - ld hl, $79ac + ld hl, MenuDataHeader_0x8b9ac call LoadMenuDataHeader call Function8b9e9 jr c, .asm_8b97a @@ -73037,18 +73322,18 @@ Function8b960: ; 8b960 (22:7960) ld b, $6 ld c, $7 call Function8b703 - ld hl, $79b1 + ld hl, MenuDataHeader_0x8b9b1 jr .asm_8b987 .asm_8b97a ld hl, $c4ab ld b, $a ld c, $7 call Function8b703 - ld hl, $79ca + ld hl, MenuDataHeader_0x8b9ca .asm_8b987 ld a, $1 call Function89d5e - ld hl, $79ab + ld hl, Function8b9ab call Function89d85 call Function1c07 jr c, .asm_8b99c @@ -73072,7 +73357,48 @@ Function8b99f: ; 8b99f (22:799f) ret ; 8b9ab (22:79ab) -INCBIN "baserom.gbc",$8b9ab,$8b9e9 - $8b9ab +Function8b9ab: ; 8b9ab + ret +; 8b9ac + +MenuDataHeader_0x8b9ac: ; 0x8b9ac + db $40 ; flags + db 00, 11 ; start coords + db 11, 19 ; end coords + +MenuDataHeader_0x8b9b1: ; 0x8b9b1 + db $40 ; flags + db 00, 11 ; start coords + db 07, 19 ; end coords + dw MenuData2_0x8b9b9 + db 1 ; default option +; 0x8b9b9 + +MenuData2_0x8b9b9: ; 0x8b9b9 + db $a0 ; flags + db 3 ; items + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "やめる@" ; QUIT +; 0x8b9ca + +MenuDataHeader_0x8b9ca: ; 0x8b9ca + db $40 ; flags + db 00, 11 ; start coords + db 11, 19 ; end coords + dw MenuData2_0x8b9d2 + db 1 ; default option +; 0x8b9d2 + +MenuData2_0x8b9d2: ; 0x8b9d2 + db $a0 ; flags + db 5 ; items + db "みる@" ; VIEW + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "けす@" ; ERASE + db "やめる@" ; QUIT +; 0x8b9e9 ; known jump sources: 8b966 (22:7966) Function8b9e9: ; 8b9e9 (22:79e9) @@ -73089,10 +73415,10 @@ Function8b9e9: ; 8b9e9 (22:79e9) .asm_8b9ff call Function892b4 and a - ld de, $7a1c + ld de, Unknown_8ba1c jr .asm_8ba0c .asm_8ba08 - ld de, $7a1f + ld de, Unknown_8ba1f scf .asm_8ba0c push af @@ -73108,7 +73434,12 @@ Function8b9e9: ; 8b9e9 (22:79e9) ret ; 8ba1c (22:7a1c) -INCBIN "baserom.gbc",$8ba1c,$8ba24 - $8ba1c +Unknown_8ba1c: ; 8b1ac + db 2, 4, -1 + +Unknown_8ba1f: ; 8ba1f + db 1, 2, 4, 3, -1 +; 8ba24 SECTION "bank23", ROMX, BANK[$23] @@ -73720,10 +74051,10 @@ Function8c2a0: ; 8c2a0 ; 8c2aa Function8c2aa: ; 8c2aa - ld de, $42f4 + ld de, GFX_8c2f4 ld hl, $8fe0 - ld b, $23 - ld c, $2 + ld b, BANK(GFX_8c2f4) + ld c, 2 call Request2bpp ld a, [rVBK] push af @@ -73764,6 +74095,7 @@ Function8c2cf: ; 8c2cf ret ; 8c2f4 +GFX_8c2f4: ; 8c2f4 INCBIN "baserom.gbc",$8c2f4,$8c314 - $8c2f4 Function8c314: ; 8c314 @@ -73836,13 +74168,14 @@ Function8c365: ; 8c365 (23:4365) jr z, .asm_8c386 set 1, e .asm_8c386 - ld hl, $438f + ld hl, Unknown_8c38f add hl, de ld a, [hl] ld [$cf63], a ret ; 8c38f (23:438f) +Unknown_8c38f: ; 8c38f INCBIN "baserom.gbc",$8c38f,$8c393 - $8c38f ; no known jump sources @@ -73883,8 +74216,8 @@ Function8c3b3: ; 8c3b3 (23:43b3) inc [hl] srl a ld e, a - ld d, $0 - ld hl, $43db + ld d, 0 + ld hl, Unknown_8c3db add hl, de ld a, [hl] cp $1 @@ -73900,6 +74233,7 @@ Function8c3b3: ; 8c3b3 (23:43b3) ret ; 8c3db (23:43db) +Unknown_8c3db: ; 8c3db INCBIN "baserom.gbc",$8c3db,$8c3e8 - $8c3db ; no known jump sources @@ -73975,8 +74309,8 @@ Function8c44f: ; 8c44f (23:444f) ld [hBGMapMode], a ; $ff00+$d4 ld a, [$cf64] ld e, a - ld d, $0 - ld hl, $4490 + ld d, 0 + ld hl, Unknown_8c490 add hl, de add hl, de add hl, de @@ -74007,6 +74341,7 @@ Function8c44f: ; 8c44f (23:444f) ret ; 8c490 (23:4490) +Unknown_8c490: ; 8c490 INCBIN "baserom.gbc",$8c490,$8c4f5 - $8c490 ; known jump sources: 8c468 (23:4468) From 0ad21e6c18c05fe015c1eecffb8fa3c1eacdb3f8 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 19 Apr 2014 23:15:01 -0400 Subject: [PATCH 02/18] The unused name array is move descriptions. Still not sure where the bank comes from. --- home.asm | 3 +-- main.asm | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/home.asm b/home.asm index 7c2b98ceb..caa595adb 100644 --- a/home.asm +++ b/home.asm @@ -842,10 +842,9 @@ NamesPointers:: ; 33ab dbw 0, PartyMonOT dbw 0, OTPartyMonOT dbw BANK(TrainerClassNames), TrainerClassNames - dbw $04, $4b52 ; ???? + dbw $04, MoveDescriptions ; ???? ; 33c3 - GetName:: ; 33c3 ; Return name CurSpecies from name list $cf61 in StringBuffer1. diff --git a/main.asm b/main.asm index dc2541e88..a5414ff9e 100644 --- a/main.asm +++ b/main.asm @@ -43081,7 +43081,7 @@ PrintMoveDesc: ; 2cb3e jp PlaceString ; 2cb52 -MoveDescriptions: ; 2cb52 +MoveDescriptions:: ; 2cb52 INCLUDE "battle/moves/move_descriptions.asm" ; 2ed44 From 1dc2a1776c73159d57fcea4d890183b0bfef97ef Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 19 Apr 2014 23:15:59 -0400 Subject: [PATCH 03/18] More incbins in bank 22. --- main.asm | 865 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 750 insertions(+), 115 deletions(-) diff --git a/main.asm b/main.asm index a5414ff9e..cb3a434ef 100644 --- a/main.asm +++ b/main.asm @@ -65946,7 +65946,7 @@ Function84785: ; 84785 ld a, $77 call Function13d4 ld hl, $c5ce - ld de, $47f5 + ld de, String_847f5 call PlaceString ld a, $1 ld [hBGMapMode], a @@ -65955,7 +65955,13 @@ Function84785: ; 84785 ret ; 847bd -INCBIN "baserom.gbc",$847bd,$84817 - $847bd +INCBIN "baserom.gbc", $847bd, $847f5 - $847bd + +String_847f5: + db "Press B to Cancel@" +; 84807 + +INCBIN "baserom.gbc", $84807, $84817 - $84807 ; known jump sources: 844f2 (21:44f2) Function84817: ; 84817 (21:4817) @@ -65973,7 +65979,7 @@ Function84817: ; 84817 (21:4817) call Function849e9 call Function849d7 ld hl, $c4e0 - ld de, $4865 + ld de, String_84865 call PlaceString ld a, [MovementBuffer] ; $d007 ld bc, $9 @@ -65991,7 +65997,9 @@ Function84817: ; 84817 (21:4817) ret ; 84865 (21:4865) -INCBIN "baserom.gbc",$84865,$8486f - $84865 +String_84865: + db "#MON LIST@" +; 8486f ; known jump sources: 8450a (21:450a) Function8486f: ; 8486f (21:486f) @@ -66301,9 +66309,9 @@ HallOfFame:: ; 0x8640e ; 0x86455 Function86455:: ; 86455 - ld a, $0 + ld a, MUSIC_NONE % $100 ld [MusicFadeIDLo], a - ld a, $0 + ld a, MUSIC_NONE / $100 ld [MusicFadeIDHi], a ld a, $a ld [MusicFade], a @@ -66324,9 +66332,9 @@ Function86455:: ; 86455 ; 8648e Function8648e: ; 8648e - ld a, $0 + ld a, MUSIC_NONE % $100 ld [MusicFadeIDLo], a - ld a, $0 + ld a, MUSIC_NONE / $100 ld [MusicFadeIDHi], a ld a, $a ld [MusicFade], a @@ -66341,7 +66349,7 @@ Function8648e: ; 8648e Function864b4: ; 864b4 push de - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic call DelayFrame pop de @@ -66389,7 +66397,7 @@ Function864c3: ; 864c3 Function8650c: ; 8650c call Function86748 - ld de, $652c + ld de, String_8652c ld hl, $c4c9 call PlaceString call WaitBGMap @@ -66403,7 +66411,9 @@ Function8650c: ; 8650c ret ; 8652c -INCBIN "baserom.gbc",$8652c,$8653f - $8652c +String_8652c: + db "New Hall of Famer!@" +; 8653f Function8653f: ; 8653f @@ -66616,6 +66626,8 @@ Function86665: ; 86665 ; 86692 Function86692: ; 86692 +; Print the number of times the player has entered the Hall of Fame. +; If that number is above 200, print "HOF Master!" instead. ld a, [$cf64] cp $6 jr nc, .asm_866a7 @@ -66636,16 +66648,16 @@ Function86692: ; 86692 pop hl call Function86748 ld a, [EnemyMoveAnimation] - cp $c9 + cp 200 + 1 jr c, .asm_866c6 - ld de, $66fc + ld de, String_866fc ld hl, $c4c9 call PlaceString ld hl, $c4d5 jr .asm_866de .asm_866c6 - ld de, $670c + ld de, String_8670c ld hl, $c4c9 call PlaceString ld hl, $c4ca @@ -66655,7 +66667,7 @@ Function86692: ; 86692 ld hl, $c4d3 .asm_866de - ld de, $66fb + ld de, String_866fb call PlaceString call WaitBGMap ld b, $1a @@ -66669,7 +66681,17 @@ Function86692: ; 86692 ret ; 866fb -INCBIN "baserom.gbc", $866fb, $8671c - $866fb +String_866fb: + db "@" +; 866fc + +String_866fc: + db " HOF Master!@" +; 8670c + +String_8670c: + db " -Time Famer@" +; 8671c Function8671c: ; 8671c @@ -70385,7 +70407,7 @@ UnknownText_0x8a111: ; 0x8a111 Function8a116: ; 8a116 (22:6116) ld a, $1 ld [$d030], a - ld hl, $6176 + ld hl, MenuDataHeader_0x8a176 call LoadMenuDataHeader .asm_8a121 call Function8923c @@ -70409,7 +70431,7 @@ Function8a116: ; 8a116 (22:6116) jr .asm_8a15a .asm_8a14c call WaitSFX - ld de, $ce + ld de, SFX_TWINKLE call PlaySFX ld c, $10 call DelayFrames @@ -70429,7 +70451,11 @@ Function8a116: ; 8a116 (22:6116) ret ; 8a176 (22:6176) -INCBIN "baserom.gbc",$8a176,$8a17b - $8a176 +MenuDataHeader_0x8a176: ; 0x8a176 + db $40 ; flags + db 00, 14 ; start coords + db 06, 19 ; end coords +; 8a17b ; known jump sources: 8a124 (22:6124) Function8a17b: ; 8a17b (22:617b) @@ -70437,7 +70463,7 @@ Function8a17b: ; 8a17b (22:617b) ld b, $5 ld c, $4 call Function89b3b - ld hl, $619a + ld hl, MenuDataHeader_0x8a19a ld a, [$d030] call Function89d5e ld hl, $61b0 @@ -70449,30 +70475,86 @@ Function8a17b: ; 8a17b (22:617b) ret ; 8a19a (22:619a) -INCBIN "baserom.gbc",$8a19a,$8a20d - $8a19a +MenuDataHeader_0x8a19a: ; 0x8a19a + db $40 ; flags + db 00, 14 ; start coords + db 06, 19 ; end coords + dw MenuData2_0x8a1a2 + db 1 ; default option +; 0x8a1a2 + +MenuData2_0x8a1a2: ; 0x8a1a2 + db $e0 ; flags + db 3 ; items + db "ひらく@" + db "すてる@" + db "もどる@" +; 0x8a1b0 + +Function8a1b0: ; 8a1b0 + ld hl, $c590 + ld b, $4 + ld c, $12 + call TextBox + ld hl, $c5b9 + ld a, [$cfa9] + ld de, Strings_8a1cc + dec a + ld c, a + call Function8919e + call PlaceString + ret +; 8a1cc + +Strings_8a1cc: ; 8a1cc + db "めいし", $25, "せいりと へんしゅうを" + next "おこないます@" + + db "めいしフ,ルダー", $25, "めいしと" + next "あんしょうばんごう", $1f, "けします@" + + db "まえ", $25, "がめん", $1d, "もどります@" +; 8a20d + ; known jump sources: 8a132 (22:6132), 8a2ca (22:62ca) Function8a20d: ; 8a20d (22:620d) - ld hl, $6232 + ld hl, UnknownText_0x8a232 call PrintText ld a, $2 call Function89259 ret c - ld hl, $6237 + ld hl, UnknownText_0x8a237 call PrintText ld a, $2 call Function89259 ret c xor a call Function8a2fe - ld hl, $623c + ld hl, UnknownText_0x8a23c call PrintText xor a and a ret ; 8a232 (22:6232) -INCBIN "baserom.gbc",$8a232,$8a241 - $8a232 +UnknownText_0x8a232: ; 0x8a232 + ; If the CARD FOLDER is deleted, all its CARDS and the PASSCODE will also be deleted. Beware--a deleted CARD FOLDER can't be restored. Want to delete your CARD FOLDER? + text_jump UnknownText_0x1c53ee + db "@" +; 0x8a237 + +UnknownText_0x8a237: ; 0x8a237 + ; Are you sure you want to delete it? + text_jump UnknownText_0x1c5494 + db "@" +; 0x8a23c + +UnknownText_0x8a23c: ; 0x8a23c + ; The CARD FOLDER has been deleted. + text_jump UnknownText_0x1c54b9 + db "@" +; 0x8a241 ; known jump sources: 8a145 (22:6145), 8a2d2 (22:62d2) Function8a241: ; 8a241 (22:6241) @@ -70521,14 +70603,14 @@ Function8a262: ; 8a262 (22:6262) ; no known jump sources Function8a2aa: ; 8a2aa (22:62aa) - ld hl, $62ef + ld hl, MenuDataHeader_0x8a2ef call LoadMenuDataHeader - ld hl, $62f4 + ld hl, UnknownText_0x8a2f4 call PrintText ld a, $1 call Function89259 jr nc, .asm_8a2cf - ld hl, $62f9 + ld hl, UnknownText_0x8a2f9 call PrintText ld a, $2 call Function89259 @@ -70554,7 +70636,23 @@ Function8a2aa: ; 8a2aa (22:62aa) ret ; 8a2ef (22:62ef) -INCBIN "baserom.gbc",$8a2ef,$8a2fe - $8a2ef +MenuDataHeader_0x8a2ef: ; 0x8a2ef + db $40 ; flags + db 12, 00 ; start coords + db 17, 19 ; end coords +; 8a2f4 + +UnknownText_0x8a2f4: ; 0x8a2f4 + ; There is an older CARD FOLDER from a previous journey. Do you want to open it? + text_jump UnknownText_0x1c54dd + db "@" +; 0x8a2f9 + +UnknownText_0x8a2f9: ; 0x8a2f9 + ; Delete the old CARD FOLDER? + text_jump UnknownText_0x1c552d + db "@" +; 0x8a2fe ; known jump sources: 89e5a (22:5e5a), 8a138 (22:6138), 8a226 (22:6226) Function8a2fe: ; 8a2fe (22:62fe) @@ -70665,14 +70763,14 @@ Function8a3b2: ; 8a3b2 (22:63b2) ld b, $6 ld c, $9 call Function89b3b - ld hl, $6435 + ld hl, MenuDataHeader_0x8a435 jr .asm_8a3db .asm_8a3ce ld de, $c4c8 ld b, $8 ld c, $9 call Function89b3b - ld hl, $640f + ld hl, MenuDataHeader_0x8a40f .asm_8a3db call Function1d3c ret @@ -70685,12 +70783,12 @@ Function8a3df: ; 8a3df (22:63df) call CloseSRAM ld hl, DefaultFlypoint ; $d002 jr c, .asm_8a3f8 - ld de, $6408 + ld de, Unknown_8a408 call Function8a400 scf ret .asm_8a3f8 - ld de, $640b + ld de, Unknown_8a40b call Function8a400 and a ret @@ -70705,7 +70803,41 @@ Function8a400: ; 8a400 (22:6400) ret ; 8a408 (22:6408) -INCBIN "baserom.gbc",$8a408,$8a453 - $8a408 +Unknown_8a408: db 1, 2, -1 +Unknown_8a40b: db 1, 2, 3, -1 + +MenuDataHeader_0x8a40f: ; 0x8a40f + db $40 ; flags + db 02, 00 ; start coords + db 11, 10 ; end coords + dw MenuData2_0x8a417 + db 1 ; default option +; 0x8a417 + +MenuData2_0x8a417: ; 0x8a417 + db $a0 ; flags + db 4 ; items + db "めいしりスト@" + db "じぶんの めいし@" + db "めいしこうかん@" + db "やめる@" +; 0x8a435 + +MenuDataHeader_0x8a435: ; 0x8a435 + db $40 ; flags + db 02, 00 ; start coords + db 09, 10 ; end coords + dw MenuData2_0x8a43d + db 1 ; default option +; 0x8a43d + +MenuData2_0x8a43d: ; 0x8a43d + db $a0 ; flags + db 3 ; items + db "めいしりスト@" + db "じぶんの めいし@" + db "やめる@" +; 0x8a453 ; known jump sources: 8a354 (22:6354) Function8a453: ; 8a453 (22:6453) @@ -70714,11 +70846,11 @@ Function8a453: ; 8a453 (22:6453) ld c, $12 call TextBox ld hl, $c5b9 - ld de, $6476 + ld de, String_8a476 ld a, [MenuSelection] ; $cf74 cp $ff jr z, .asm_8a472 - ld de, $6483 + ld de, Strings_8a483 dec a ld c, a call Function8919e @@ -70727,7 +70859,20 @@ Function8a453: ; 8a453 (22:6453) ret ; 8a476 (22:6476) -INCBIN "baserom.gbc",$8a476,$8a4d3 - $8a476 +String_8a476: ; 8a476 + db "まえ", $25, "がめん", $1d, "もどります@" +; 8a483 + +Strings_8a483: ; 8a483 + db "おともだち", $25, "めいしは" + next "ここ", $1d, "いれておきます@" + + db "でんわばんごう", $1f, "いれると" + next "めいしこうかん", $4a, "できます@" + + db "ともだちと じぶん", $25, "めいしを" + next "せきがいせんで こうかん します@" +; 8a4d3 ; known jump sources: 8a357 (22:6357) Function8a4d3: ; 8a4d3 (22:64d3) @@ -70895,15 +71040,15 @@ Function8a5b6: ; 8a5b6 (22:65b6) push af ld a, $5 ld [rSVBK], a ; $ff00+$70 - ld hl, $65e5 + ld hl, Palette_8a5e5 ld de, $d020 ld bc, $18 call CopyBytes - ld hl, $65fd - ld de, MartPointer ; $d040 (aliases: Unkn2Pals) + ld hl, Palette_8a5fd + ld de, Unkn2Pals ; $d040 ld bc, $8 call CopyBytes - ld hl, $6605 + ld hl, Palette_8a605 ld de, $d048 ld bc, $8 call CopyBytes @@ -70912,14 +71057,41 @@ Function8a5b6: ; 8a5b6 (22:65b6) ret ; 8a5e5 (22:65e5) -INCBIN "baserom.gbc",$8a5e5,$8a60d - $8a5e5 +Palette_8a5e5: ; 8a5e5 + RGB 31, 31, 31 + RGB 27, 19, 00 + RGB 07, 11, 22 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 16, 16, 31 + RGB 27, 19, 00 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 31, 00, 00 + RGB 27, 19, 00 + RGB 00, 00, 00 +; 8a5fd + +Palette_8a5fd: ; 8a5fd + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 31, 31, 31 +; 8a605 + +Palette_8a605: ; 8a605 + RGB 00, 00, 00 + RGB 14, 18, 31 + RGB 16, 16, 31 + RGB 31, 31, 31 +; 8a60d Function8a60d: ; 8a60d ld a, [rSVBK] push af ld a, $5 ld [rSVBK], a - ld hl, $6624 + ld hl, Palette_8a624 ld de, Unkn2Pals ld bc, $0008 call CopyBytes @@ -70928,7 +71100,12 @@ Function8a60d: ; 8a60d ret ; 8a624 -INCBIN "baserom.gbc",$8a624,$8a62c - $8a624 +Palette_8a624: ; 8a624 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 00, 00, 00 +; 8a62c ; no known jump sources Function8a62c: ; 8a62c (22:662c) @@ -71068,7 +71245,7 @@ Function8a6cd: ; 8a6cd (22:66cd) call Function89448 call Function89a23 ld hl, $c5a5 - ld de, $5135 + ld de, String_89135 call PlaceString call WaitBGMap ld a, $2 @@ -71217,7 +71394,7 @@ Function8a818: ; 8a818 (22:6818) ld c, $8 call Function89193 ld hl, $c5a5 - ld de, $6868 + ld de, .string_8a868 call PlaceString call WaitBGMap call Functiona36 @@ -71227,12 +71404,14 @@ Function8a818: ; 8a818 (22:6818) ret ; 8a868 (22:6868) -INCBIN "baserom.gbc",$8a868,$8a875 - $8a868 +.string_8a868 + db "めいし", $1f, "かきかえ まし", $22, "@" + .asm_8a875 - ld de, $688b + ld de, String_8a88b jr .asm_8a87d .asm_8a87a - ld de, $511c + ld de, String_8911c .asm_8a87d ld hl, $c5a5 call PlaceString @@ -71242,7 +71421,10 @@ INCBIN "baserom.gbc",$8a868,$8a875 - $8a868 ret ; 8a88b (22:688b) -INCBIN "baserom.gbc",$8a88b,$8a8a1 - $8a88b +String_8a88b: ; 8a88b + db "おともだち", $25, "なまえが" + next "かかれて いません!@" +; 8a8a1 ; no known jump sources Function8a8a1: ; 8a8a1 (22:68a1) @@ -71252,7 +71434,7 @@ Function8a8a1: ; 8a8a1 (22:68a1) jr nc, .asm_8a8bf call Function89a23 ld hl, $c5a5 - ld de, $5135 + ld de, String_89135 call PlaceString ld a, $2 call Function89254 @@ -71277,7 +71459,7 @@ Function8a8c3: ; 8a8c3 (22:68c3) call CloseSRAM call Function891ab ld hl, $c5a5 - ld de, $6919 + ld de, String_8a919 call PlaceString ld a, $2 call Function89254 @@ -71288,7 +71470,7 @@ Function8a8c3: ; 8a8c3 (22:68c3) call Function89a23 call Function8923c ld hl, $c5a5 - ld de, $6926 + ld de, String_8a926 call PlaceString call WaitBGMap call Functiona36 @@ -71299,7 +71481,13 @@ Function8a8c3: ; 8a8c3 (22:68c3) ret ; 8a919 (22:6919) -INCBIN "baserom.gbc",$8a919,$8a930 - $8a919 +String_8a919: ; 8a919 + db "このデータ", $1f, "けしますか?@" +; 8a926 + +String_8a926: ; 8a926 + db "データ", $1f, "けしまし", $22, "@" +; 8a930 ; no known jump sources Function8a930: ; 8a930 (22:6930) @@ -71359,7 +71547,7 @@ Function8a930: ; 8a930 (22:6930) ; no known jump sources Function8a999: ; 8a999 (22:6999) - ld hl, Unknown_8a9c9 + ld hl, MenuDataHeader_0x8a9c9 call LoadMenuDataHeader ld c, $1 .asm_8a9a1 @@ -71389,8 +71577,10 @@ Jumptable_8a9c5: ; 8a9c5 (22:69c5) dw Function8ab3b ; 8a9c9 (22:69c9) -Unknown_8a9c9: ; 8a9c9 -INCBIN "baserom.gbc",$8a9c9,$8a9ce - $8a9c9 +MenuDataHeader_0x8a9c9: ; 0x8a9c9 + db $40 ; flags + db 04, 11 ; start coords + db 11, 18 ; end coords ; 8a9ce ; known jump sources: 8a9a1 (22:69a1) @@ -71402,7 +71592,7 @@ Function8a9ce: ; 8a9ce (22:69ce) call Function89b3b pop bc ld a, c - ld hl, Unknown_8a9f2 + ld hl, MenuDataHeader_0x8a9f2 call Function89d5e ld hl, Function8aa09 call Function89d85 @@ -71418,9 +71608,21 @@ Function8a9ce: ; 8a9ce (22:69ce) ret ; 8a9f2 (22:69f2) -Unknown_8a9f2: ; 8a9f2 -INCBIN "baserom.gbc",$8a9f2,$8aa09 - $8a9f2 -; 8aa09 +MenuDataHeader_0x8a9f2: ; 0x8a9f2 + db $40 ; flags + db 04, 11 ; start coords + db 11, 18 ; end coords + dw MenuData2_0x8a9fa + db 1 ; default option +; 0x8a9fa + +MenuData2_0x8a9fa: ; 0x8a9fa + db $a0 ; flags + db 3 ; items + db "へんしゅう@" + db "みる@" + db "やめる@" +; 0x8aa09 Function8aa09: ; 8aa09 ret @@ -71516,7 +71718,7 @@ Function8aab6: ; 8aab6 (22:6ab6) call Function89a23 ld hl, $d008 call Function89b45 - jr nc, .asm_8ab00 + jr nc, Function8ab00 call Function89160 ld de, $d008 ld hl, $a603 @@ -71528,7 +71730,7 @@ Function8aab6: ; 8aab6 (22:6ab6) ld c, $8 call Function89193 ld hl, $c5a5 - ld de, $6af0 + ld de, String_8aaf0 call PlaceString call WaitBGMap call Functiona36 @@ -71538,9 +71740,12 @@ Function8aab6: ; 8aab6 (22:6ab6) ret ; 8aaf0 (22:6af0) -INCBIN "baserom.gbc",$8aaf0,$8ab00 - $8aaf0 -.asm_8ab00 - ld de, $511c +String_8aaf0: ; 8aaf0 + db "あたらしい めいし", $4a, "できまし", $22, "@" +; 8ab00 + +Function8ab00: ; 8ab00 + ld de, String_8911c ld hl, $c5a5 call PlaceString call WaitBGMap @@ -71559,7 +71764,7 @@ Function8ab11: ; 8ab11 (22:6b11) jr z, .asm_8ab37 call Function89a23 ld hl, $c5a5 - ld de, $5135 + ld de, String_89135 call PlaceString ld a, $2 call Function89254 @@ -71624,7 +71829,79 @@ Function8ab93: ; 8ab93 (22:6b93) ret ; 8aba9 (22:6ba9) -INCBIN "baserom.gbc",$8aba9,$8ac4e - $8aba9 +Function8aba9: ; 8aba9 + ld a, $2 + call Function8b94a + ld a, $1 + ld [$d032], a +.asm_8abb3 + call Function891fe + call Function8b677 +.asm_8abb9 + call Function8b7bd + jr z, .asm_8abdf + ld a, c + ld [MenuSelection], a + call Function89160 + call Function8931b + ld hl, $0011 + add hl, bc + call Function89b45 + call CloseSRAM + jr c, .asm_8abe2 + ld de, SFX_WRONG + call WaitPlaySFX + call CloseSRAM + jr .asm_8abb9 + +.asm_8abdf + xor a + ld c, a + ret + +.asm_8abe2 + call PlayClickSFX +.asm_8abe5 + call Function891de + call WhiteBGMap + call Function893cc + call Function89160 + call Function8931b + call Function89844 + call CloseSRAM + call Function89160 + call Function8939a + call Function89856 + ld hl, $c5a5 + call Function899fe + call CloseSRAM + call Function891ab +.asm_8ac0f + call Function89a57 + jr c, .asm_8ac0f + and a + jr z, .asm_8abe5 + cp $2 + jr z, .asm_8ac0f + ld hl, $c590 + ld b, $4 + ld c, $12 + call TextBox + ld hl, $c5b9 + ld de, String_8ac3b + call PlaceString + ld a, $1 + call Function8925e + jp c, .asm_8abb3 + ld a, [MenuSelection] + ld c, a + ret +; 8ac3b + +String_8ac3b: ; 8ac3b + db "こ", $25, "ともだち", $1d, "でんわを" + next "かけますか?@" +; 8ac4e Function8ac4e: ; 8ac4e xor a @@ -71717,7 +71994,7 @@ Function8ac7c: ; 8ac7c ret .asm_8acf0 - ld hl, $6d06 + ld hl, UnknownText_0x8ad06 call PrintText ld a, $2 call Function89259 @@ -71729,7 +72006,11 @@ Function8ac7c: ; 8ac7c ret ; 8ad06 -INCBIN "baserom.gbc",$8ad06,$8ad0b - $8ad06 +UnknownText_0x8ad06: ; 0x8ad06 + ; Finish registering CARDS? + text_jump UnknownText_0x1c554a + db "@" +; 0x8ad0b Function8ad0b: ; 8ad0b .asm_8ad0b @@ -71764,7 +72045,7 @@ Function8ad0b: ; 8ad0b ld b, $4 ld c, $12 call TextBox - ld de, $6d89 + ld de, String_8ad89 ld hl, $c5b9 call PlaceString ld a, $2 @@ -71775,7 +72056,7 @@ Function8ad0b: ; 8ad0b ld b, $4 ld c, $12 call TextBox - ld de, $6d9c + ld de, String_8ad9c ld hl, $c5b9 call PlaceString ld a, $1 @@ -71795,7 +72076,44 @@ Function8ad0b: ; 8ad0b ret ; 8ad89 -INCBIN "baserom.gbc",$8ad89,$8addb - $8ad89 +String_8ad89: ; 8ad89 + db "こ", $25, "めいし", $1f, "けして" + next "いれかえますか?@" +; 8ad9c + +String_8ad9c: ; 8ad9c + db "おともだち", $25, "なまえを" + next "のこして おきますか?@" +; 8adb3 + +Function8adb3: ; 8adb3 + call Function891de + call Function8a262 + push af + call Function891de + pop af + ret +; 8adbf + +Function8adbf: ; 8adbf + call Function89160 + ld hl, $a603 + call Function89b45 + call CloseSRAM + ret +; 8adcc + +Function8adcc: ; 8adcc + call Function89160 + call Function8b3b0 + call CloseSRAM + ret nc + cp $2 + ret z + scf + ret +; 8addb + SpecialHoOhChamber: ; 0x8addb ld hl, PartySpecies @@ -71839,7 +72157,7 @@ Function8adef: ; 8adef call GetPartyParamLocation pop bc ld a, [hl] - cp $18 + cp WATER_STONE jr nz, .asm_8ae10 .asm_8ae24 @@ -71858,10 +72176,10 @@ Function8ae30: ; 8ae30 call GetSecondaryMapHeaderPointer ld a, h - cp RuinsofAlphAerodactylChamber_SecondMapHeader >> 8 + cp RuinsofAlphAerodactylChamber_SecondMapHeader / $100 jr nz, .asm_8ae4a ld a, l - cp RuinsofAlphAerodactylChamber_SecondMapHeader & $ff + cp RuinsofAlphAerodactylChamber_SecondMapHeader % $100 jr nz, .asm_8ae4a ld de, $0329 @@ -71886,10 +72204,10 @@ Function8ae4e: ; 8ae4e call GetSecondaryMapHeaderPointer ld a, h - cp RuinsofAlphKabutoChamber_SecondMapHeader >> 8 + cp RuinsofAlphKabutoChamber_SecondMapHeader / $100 jr nz, .done ld a, l - cp RuinsofAlphKabutoChamber_SecondMapHeader & $ff + cp RuinsofAlphKabutoChamber_SecondMapHeader % $100 jr nz, .done ld de, $0327 @@ -71904,9 +72222,10 @@ Function8ae4e: ; 8ae4e Function8ae68: ; 8ae68 ld a, [ScriptVar] - ld hl, $6ed5 + ld hl, MenuDataHeader_0x8aed5 and a jr z, .asm_8ae79 + ld d, $0 ld e, $5 .asm_8ae75 @@ -71929,7 +72248,7 @@ Function8ae68: ; 8ae68 add hl, de ld a, [ScriptVar] ld c, a - ld de, $6ebc + ld de, Unknown_8aebc and a jr z, .asm_8aea5 .asm_8ae9c @@ -71952,7 +72271,33 @@ Function8ae68: ; 8ae68 ret ; 8aebc -INCBIN "baserom.gbc",$8aebc,$8aee9 - $8aebc +Unknown_8aebc: ; 8aebc + db $08, $44, $04, $00, $2e, $08, $ff + db $26, $20, $0c, $0e, $46, $ff + db $4c, $00, $46, $08, $42, $ff + db $0e, $2c, $64, $2c, $0e, $ff +; 8aed5 + +MenuDataHeader_0x8aed5: ; 0x8aed5 + db $40 ; flags + db 04, 03 ; start coords + db 09, 16 ; end coords + +MenuDataHeader_0x8aeda: ; 0x8aeda + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords + +MenuDataHeader_0x8aedf: ; 0x8aedf + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords + +MenuDataHeader_0x8aee4: ; 0x8aee4 + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords +; 8aee9 Function8aee9: ; 8aee9 .asm_8aee9 @@ -72069,7 +72414,7 @@ Function8af1c: ; 8af1c Function8af6b: ; 8af6b xor a ld [$cf76], a - ld hl, $6fa9 + ld hl, Unknown_8afa9 call Function1d3c ld a, [$dc4a] ld c, a @@ -72096,6 +72441,7 @@ Function8af6b: ; 8af6b ret ; 8afa9 +Unknown_8afa9: ; 8afa9 INCBIN "baserom.gbc",$8afa9,$8afd4 - $8afa9 Function8afd4: ; 8afd4 @@ -72105,12 +72451,12 @@ Function8afd4: ; 8afd4 ld [MenuSelection], a call Function8b0d6 call Function8b090 - ld hl, $7072 + ld hl, UnknownText_0x8b072 call PrintText jr .asm_8aff1 .asm_8afeb - ld hl, $7072 + ld hl, UnknownText_0x8b072 call Function105a .asm_8aff1 @@ -72124,7 +72470,7 @@ Function8afd4: ; 8afd4 ld a, [hl] ld [$d265], a call GetItemName - ld hl, $7077 + ld hl, UnknownText_0x8b077 call Function105a call YesNoBox jr c, .asm_8afeb @@ -72154,17 +72500,17 @@ Function8afd4: ; 8afd4 jr .asm_8b051 .asm_8b047 - ld hl, $7081 + ld hl, UnknownText_0x8b081 jr .asm_8b05a .asm_8b04c - ld hl, $7086 + ld hl, UnknownText_0x8b086 jr .asm_8b05a .asm_8b051 - ld de, $0022 + ld de, SFX_TRANSACTION call PlaySFX - ld hl, $707c + ld hl, UnknownText_0x8b07c .asm_8b05a call Function105a @@ -72180,7 +72526,41 @@ Function8afd4: ; 8afd4 ret ; 8b072 -INCBIN "baserom.gbc",$8b072,$8b090 - $8b072 +UnknownText_0x8b072: ; 0x8b072 + ; Which prize would you like? + text_jump UnknownText_0x1c589f + db "@" +; 0x8b077 + +UnknownText_0x8b077: ; 0x8b077 + ; ? Is that right? + text_jump UnknownText_0x1c58bc + db "@" +; 0x8b07c + +UnknownText_0x8b07c: ; 0x8b07c + ; Here you go! + text_jump UnknownText_0x1c58d1 + db "@" +; 0x8b081 + +UnknownText_0x8b081: ; 0x8b081 + ; You don't have enough points. + text_jump UnknownText_0x1c58e0 + db "@" +; 0x8b086 + +UnknownText_0x8b086: ; 0x8b086 + ; You have no room for it. + text_jump UnknownText_0x1c58ff + db "@" +; 0x8b08b + +UnknownText_0x8b08b: ; 0x8b08b + ; Oh. Please come back again! + text_jump UnknownText_0x1c591a + db "@" +; 0x8b090 Function8b090: ; 8b090 ld hl, $70d1 @@ -72198,14 +72578,14 @@ Function8b09e: ; 8b09e push de xor a ld [hBGMapMode], a - ld hl, $70d1 + ld hl, MenuDataHeader_0x8b0d1 call Function1d3c call Function1cbb call Function1ad2 call Function1cfd ld bc, $0015 add hl, bc - ld de, $70ca + ld de, String_8b0ca call PlaceString ld h, b ld l, c @@ -72219,18 +72599,30 @@ Function8b09e: ; 8b09e ret ; 8b0ca -INCBIN "baserom.gbc",$8b0ca,$8b0d6 - $8b0ca +String_8b0ca: + db "Points@" +; 8b0d1 + +MenuDataHeader_0x8b0d1: ; 0x8b0d1 + db $40 ; flags + db 11, 00 ; start coords + db 13, 11 ; end coords +; 8b0d6 Function8b0d6: ; 8b0d6 - ld hl, $70dd + ld hl, MenuDataHeader_0x8b0dd call LoadMenuDataHeader ret ; 8b0dd -INCBIN "baserom.gbc",$8b0dd,$8b0e2 - $8b0dd +MenuDataHeader_0x8b0dd: ; 0x8b0dd + db $40 ; flags + db 00, 00 ; start coords + db 11, 17 ; end coords +; 8b0e2 Function8b0e2: ; 8b0e2 - ld hl, $7113 + ld hl, Unknown_8b113 call Function1d3c ld a, [MenuSelection] ld [$cf88], a @@ -72256,11 +72648,12 @@ Function8b0e2: ; 8b0e2 ret ; 8b113 +Unknown_8b113: ; 8b113 INCBIN "baserom.gbc",$8b113,$8b154 - $8b113 Function8b154: ; 8b154 dec a - ld hl, $715e + ld hl, Unknown_8b15e ld b, $0 ld c, a add hl, bc @@ -72268,12 +72661,16 @@ Function8b154: ; 8b154 ret ; 8b15e +Unknown_8b15e: ; 8b15e INCBIN "baserom.gbc",$8b15e,$8b170 - $8b15e +; 8b170 + INCLUDE "event/dratini.asm" + Function8b1e1: ; 8b1e1 - ld de, $71ed + ld de, Unknown_8b1ed call Function8b25b ret z call Function8b231 @@ -72281,14 +72678,34 @@ Function8b1e1: ; 8b1e1 ret ; 8b1ed -INCBIN "baserom.gbc",$8b1ed,$8b201 - $8b1ed +Unknown_8b1ed: ; 8b1ed + db 2 + dw Unknown_8b1f2 + dw Unknown_8b1f6 + +Unknown_8b1f2: ; 8b1f2 + dw Function8b2bb + dw Function8b2c1 +; 8b1f6 + +Unknown_8b1f6: ; 8b1f6 + dw UnknownText_0x8b1fc + dw UnknownText_0x8b23d + dw UnknownText_0x8b242 +; 8b1fc + +UnknownText_0x8b1fc: ; 0x8b1fc + ; Excuse me! + text_jump UnknownText_0x1c5937 + db "@" +; 0x8b201 Function8b201: ; 8b201 ld hl, StringBuffer2 - ld [hl], $f9 + ld [hl], "3" inc hl - ld [hl], $50 - ld de, $7215 + ld [hl], "@" + ld de, Unknown_8b215 call Function8b25b ret z call Function8b231 @@ -72296,15 +72713,79 @@ Function8b201: ; 8b201 ret ; 8b215 -INCBIN "baserom.gbc",$8b215,$8b231 - $8b215 +Unknown_8b215: ; 8b215 + db 4 + dw Unknown_8b21a + dw Unknown_8b222 + +Unknown_8b21a: ; 8b21a + dw Function8b2da + dw Function8b2e2 + dw Function8b32a + dw Function8b331 +; 8b222 + +Unknown_8b222: ; 8b222 + dw UnknownText_0x8b22c + dw UnknownText_0x8b247 + dw UnknownText_0x8b24c + dw UnknownText_0x8b251 + dw UnknownText_0x8b256 +; 8b22c + +UnknownText_0x8b22c: ; 0x8b22c + ; Excuse me. You're not ready. + text_jump UnknownText_0x1c5944 + db "@" +; 0x8b231 Function8b231: ; 8b231 - ld hl, $7238 + ld hl, UnknownText_0x8b238 call PrintText ret ; 8b238 -INCBIN "baserom.gbc",$8b238,$8b25b - $8b238 +UnknownText_0x8b238: ; 0x8b238 + ; Please return when you're ready. + text_jump UnknownText_0x1c5962 + db "@" +; 0x8b23d + +UnknownText_0x8b23d: ; 0x8b23d + ; You need at least three #MON. + text_jump UnknownText_0x1c5983 + db "@" +; 0x8b242 + +UnknownText_0x8b242: ; 0x8b242 + ; Sorry, an EGG doesn't qualify. + text_jump UnknownText_0x1c59a3 + db "@" +; 0x8b247 + +UnknownText_0x8b247: ; 0x8b247 + ; Only three #MON may be entered. + text_jump UnknownText_0x1c59c3 + db "@" +; 0x8b24c + +UnknownText_0x8b24c: ; 0x8b24c + ; The @ #MON must all be different kinds. + text_jump UnknownText_0x1c59e5 + db "@" +; 0x8b251 + +UnknownText_0x8b251: ; 0x8b251 + ; The @ #MON must not hold the same items. + text_jump UnknownText_0x1c5a13 + db "@" +; 0x8b256 + +UnknownText_0x8b256: ; 0x8b256 + ; You can't take an EGG! + text_jump UnknownText_0x1c5a42 + db "@" +; 0x8b25b Function8b25b: ; 8b25b ld bc, $0000 @@ -72401,7 +72882,135 @@ Function8b2a9: ; 8b2a9 ret ; 8b2bb -INCBIN "baserom.gbc",$8b2bb,$8b342 - $8b2bb +Function8b2bb: ; 8b2bb + ld a, [PartyCount] + cp 3 + ret +; 8b2c1 + +Function8b2c1: ; 8b2c1 + ld hl, PartyCount + ld a, [hli] + ld b, $0 + ld c, a +.asm_8b2c8 + ld a, [hli] + cp EGG + jr z, .asm_8b2ce + inc b + +.asm_8b2ce + dec c + jr nz, .asm_8b2c8 + ld a, [PartyCount] + cp b + ret z + ld a, b + cp 3 + ret +; 8b2da + +Function8b2da: ; 8b2da + ld a, [PartyCount] + cp 3 + ret z + scf + ret +; 8b2e2 + +Function8b2e2: ; 8b2e2 + ld hl, PartyMon1Species + call Function8b2e9 + ret +; 8b2e9 + +Function8b2e9: ; 8b2e9 + ld de, PartyCount + ld a, [de] + inc de + dec a + jr z, .asm_8b314 + ld b, a +.asm_8b2f2 + push hl + push de + ld c, b + call Function8b322 + jr z, .asm_8b30c + ld a, [hl] + and a + jr z, .asm_8b30c +.asm_8b2fe + call Function8b31a + call Function8b322 + jr z, .asm_8b309 + cp [hl] + jr z, .asm_8b316 + +.asm_8b309 + dec c + jr nz, .asm_8b2fe + +.asm_8b30c + pop de + pop hl + call Function8b31a + dec b + jr nz, .asm_8b2f2 + +.asm_8b314 + and a + ret + +.asm_8b316 + pop de + pop hl + scf + ret +; 8b31a + +Function8b31a: ; 8b31a + push bc + ld bc, $0030 + add hl, bc + inc de + pop bc + ret +; 8b322 + +Function8b322: ; 8b322 + push bc + ld b, a + ld a, [de] + cp EGG + ld a, b + pop bc + ret +; 8b32a + +Function8b32a: ; 8b32a + ld hl, PartyMon1Item + call Function8b2e9 + ret +; 8b331 + +Function8b331: ; 8b331 + ld hl, PartyCount + ld a, [hli] + ld c, a +.asm_8b336 + ld a, [hli] + cp EGG + jr z, .asm_8b340 + dec c + jr nz, .asm_8b336 + and a + ret + +.asm_8b340 + scf + ret +; 8b342 Function8b342:: ; 8b342 @@ -72411,16 +73020,16 @@ Function8b342:: ; 8b342 xor a .asm_8b348 push af - ld hl, Table8b354 + ld hl, Jumptable_8b354 rst JumpTable pop af inc a - cp $3 + cp 3 jr nz, .asm_8b348 ret ; 8b354 -Table8b354: ; 8b354 +Jumptable_8b354: ; 8b354 dw Function8b35a dw Function8b35b dw Function8b35c @@ -72430,7 +73039,6 @@ Function8b35a: ; 8b35a ret ; 8b35b - Function8b35b: ; 8b35b ret ; 8b35c @@ -72439,7 +73047,21 @@ Function8b35c: ; 8b35c ret ; 8b35d -INCBIN "baserom.gbc",$8b35d,$8b36c - $8b35d +Function8b35d: ; 8b35d + ld a, h + cp d + ret nz + ld a, l + cp e + ret +; 8b363 + +Function8b363: ; 8b363 + push bc + callba Function10632f + pop bc + ret +; 8b36c ; known jump sources: 89e24 (22:5e24), 8a29a (22:629a), 8b3c2 (22:73c2), 8b45c (22:745c), 8b53c (22:753c), 8b5ea (22:75ea), 8b630 (22:7630) Function8b36c: ; 8b36c (22:736c) @@ -73019,7 +73641,7 @@ Function8b6bb: ; 8b6bb push af ld a, $5 ld [rSVBK], a - ld hl, Unknown_8b6d5 + ld hl, Palette_8b6d5 ld de, Unkn1Pals ld bc, $0018 call CopyBytes @@ -73029,8 +73651,20 @@ Function8b6bb: ; 8b6bb ret ; 8b6d5 -Unknown_8b6d5: ; 8b6d5 -INCBIN "baserom.gbc",$8b6d5,$8b6ed - $8b6d5 +Palette_8b6d5: ; 8b6d5 + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 14, 07, 03 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 22, 09, 17 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 06, 24, 08 + RGB 00, 00, 00 +; 8b6ed Function8b6ed: ; 8b6ed ld hl, AttrMap @@ -73196,7 +73830,7 @@ Function8b79e: ; 8b79e Function8b7bd: ; 8b7bd call Function8b855 - ld hl, $7867 + ld hl, Unknown_8b867 call Function1d3c ld a, [$d030] ld [$cf88], a @@ -73297,6 +73931,7 @@ Function8b855: ; 8b855 ret ; 8b867 +Unknown_8b867: ; 8b867 INCBIN "baserom.gbc",$8b867,$8b94a - $8b867 Function8b94a: ; 8b94a From 7ab25c9f5996f4d9179a25363b38d62bdac0ddd9 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 22 Apr 2014 00:02:40 -0400 Subject: [PATCH 04/18] Danger in the sound engine. --- audio/engine.asm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/audio/engine.asm b/audio/engine.asm index fef41bb5d..499adcadb 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -201,8 +201,8 @@ _UpdateSound:: ; e805c ld [CurChannel], a cp a, $08 ; are we done? jp nz, .loop ; do it all again - ; writing to hardware registers? - call Functione8307 + + call PlayDanger ; fade music in/out call FadeMusic ; write volume to hardware register @@ -240,7 +240,7 @@ UpdateChannels: ; e8125 dw .Channel8 .Channel1 - ld a, [$c2a6] + ld a, [Danger] bit 7, a ret nz .Channel5 @@ -513,9 +513,8 @@ _CheckSFX: ; e82e7 ret ; e8307 -Functione8307: ; e8307 -; what is $c2a6? - ld a, [$c2a6] +PlayDanger: ; e8307 + ld a, [Danger] bit 7, a ret z and a, $7f @@ -524,7 +523,7 @@ Functione8307: ; e8307 jr c, .asm_e8335 and a jr z, .asm_e8323 - cp a, $10 + cp a, 16 ; halfway jr z, .asm_e831e jr .asm_e8335 .asm_e831e @@ -546,12 +545,12 @@ Functione8307: ; e8307 .asm_e8335 ld a, d inc a - cp a, $1e + cp a, 30 jr c, .asm_e833c xor a .asm_e833c or a, $80 - ld [$c2a6], a + ld [Danger], a ; is hw ch1 on? ld a, [SoundOutput] and a, $11 From 7d03634d680de9a0e5cfd3a5044438b0ebb5e13e Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 28 Apr 2014 15:08:20 -0400 Subject: [PATCH 05/18] Kanto mon Special stats for the Time Machine. --- main.asm | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 175 insertions(+), 15 deletions(-) diff --git a/main.asm b/main.asm index cb3a434ef..088711f2f 100644 --- a/main.asm +++ b/main.asm @@ -36318,7 +36318,7 @@ Function2805d: ; 2805d ld [rSC], a .asm_28091 - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic ld c, $3 call DelayFrames @@ -36422,13 +36422,13 @@ Function2805d: ; 2805d ld [$d102], a ld a, $d3 ld [$d103], a - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic ld a, [$ffcb] cp $2 - ld c, $42 + ld c, 66 call z, DelayFrames - ld de, $002b + ld de, MUSIC_ROUTE_30 call PlayMusic jp Function287e3 ; 28177 @@ -36461,7 +36461,7 @@ Function28177: ; 28177 ld [rSC], a .asm_281ae - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic ld c, $3 call DelayFrames @@ -36498,7 +36498,7 @@ Function28177: ; 28177 ld [rIF], a ld a, $1d ld [rIE], a - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic call Function287ab ld hl, $d26b @@ -36664,16 +36664,16 @@ Function28177: ; 28177 ld [$d102], a ld a, $d3 ld [$d103], a - ld de, $0000 + ld de, MUSIC_NONE call PlayMusic ld a, [$ffcb] cp $2 - ld c, $42 + ld c, 66 call z, DelayFrames ld a, [InLinkBattle] cp $3 jr nz, .asm_283a9 - ld a, $c + ld a, CAL ld [OtherTrainerClass], a call Functionfdb callba Function4d354 @@ -36721,7 +36721,7 @@ Function28177: ; 28177 jp Function28b22 .asm_283a9 - ld de, $002b + ld de, MUSIC_ROUTE_30 call PlayMusic jp Function287e3 ; 283b2 @@ -37008,39 +37008,46 @@ Function284f6: ; 284f6 ld bc, $1a call CopyBytes pop bc + ld hl, $001f add hl, bc ld a, [hl] ld [de], a ld [CurPartyLevel], a inc de + push bc ld hl, $0024 add hl, bc ld bc, $0008 call CopyBytes pop bc + push de push bc + ld a, [bc] dec a push bc - ld b, $0 + ld b, 0 ld c, a - ld hl, Unknown_fb656 + ld hl, KantoMonSpecials add hl, bc - ld a, BANK(Unknown_fb656) + ld a, BANK(KantoMonSpecials) call GetFarByte ld [BaseSpecialAttack], a pop bc + ld hl, $000a add hl, bc ld c, $5 ld b, $1 ld a, $d call Predef + pop bc pop de + ld a, [$ffb5] ld [de], a inc de @@ -95485,8 +95492,161 @@ Functionfb634: ; fb634 jr .asm_fb636 ; fb656 -Unknown_fb656: ; fb656 -INCBIN "baserom.gbc",$fb656,$fb6ed - $fb656 +KantoMonSpecials: ; fb656 +; The original special base stat for +; each Kanto monster from Red/Blue. + db 65 ; BULBASAUR + db 80 ; IVYSAUR + db 100 ; VENUSAUR + db 50 ; CHARMANDER + db 65 ; CHARMELEON + db 85 ; CHARIZARD + db 50 ; SQUIRTLE + db 65 ; WARTORTLE + db 85 ; BLASTOISE + db 20 ; CATERPIE + db 25 ; METAPOD + db 80 ; BUTTERFREE + db 20 ; WEEDLE + db 25 ; KAKUNA + db 45 ; BEEDRILL + db 35 ; PIDGEY + db 50 ; PIDGEOTTO + db 70 ; PIDGEOT + db 25 ; RATTATA + db 50 ; RATICATE + db 31 ; SPEAROW + db 61 ; FEAROW + db 40 ; EKANS + db 65 ; ARBOK + db 50 ; PIKACHU + db 90 ; RAICHU + db 30 ; SANDSHREW + db 55 ; SANDSLASH + db 40 ; NIDORAN_F + db 55 ; NIDORINA + db 75 ; NIDOQUEEN + db 40 ; NIDORAN_M + db 55 ; NIDORINO + db 75 ; NIDOKING + db 60 ; CLEFAIRY + db 85 ; CLEFABLE + db 65 ; VULPIX + db 100 ; NINETALES + db 25 ; JIGGLYPUFF + db 50 ; WIGGLYTUFF + db 40 ; ZUBAT + db 75 ; GOLBAT + db 75 ; ODDISH + db 85 ; GLOOM + db 100 ; VILEPLUME + db 55 ; PARAS + db 80 ; PARASECT + db 40 ; VENONAT + db 90 ; VENOMOTH + db 45 ; DIGLETT + db 70 ; DUGTRIO + db 40 ; MEOWTH + db 65 ; PERSIAN + db 50 ; PSYDUCK + db 80 ; GOLDUCK + db 35 ; MANKEY + db 60 ; PRIMEAPE + db 50 ; GROWLITHE + db 80 ; ARCANINE + db 40 ; POLIWAG + db 50 ; POLIWHIRL + db 70 ; POLIWRATH + db 105 ; ABRA + db 120 ; KADABRA + db 135 ; ALAKAZAM + db 35 ; MACHOP + db 50 ; MACHOKE + db 65 ; MACHAMP + db 70 ; BELLSPROUT + db 85 ; WEEPINBELL + db 100 ; VICTREEBEL + db 100 ; TENTACOOL + db 120 ; TENTACRUEL + db 30 ; GEODUDE + db 45 ; GRAVELER + db 55 ; GOLEM + db 65 ; PONYTA + db 80 ; RAPIDASH + db 40 ; SLOWPOKE + db 80 ; SLOWBRO + db 95 ; MAGNEMITE + db 120 ; MAGNETON + db 58 ; FARFETCH_D + db 35 ; DODUO + db 60 ; DODRIO + db 70 ; SEEL + db 95 ; DEWGONG + db 40 ; GRIMER + db 65 ; MUK + db 45 ; SHELLDER + db 85 ; CLOYSTER + db 100 ; GASTLY + db 115 ; HAUNTER + db 130 ; GENGAR + db 30 ; ONIX + db 90 ; DROWZEE + db 115 ; HYPNO + db 25 ; KRABBY + db 50 ; KINGLER + db 55 ; VOLTORB + db 80 ; ELECTRODE + db 60 ; EXEGGCUTE + db 125 ; EXEGGUTOR + db 40 ; CUBONE + db 50 ; MAROWAK + db 35 ; HITMONLEE + db 35 ; HITMONCHAN + db 60 ; LICKITUNG + db 60 ; KOFFING + db 85 ; WEEZING + db 30 ; RHYHORN + db 45 ; RHYDON + db 105 ; CHANSEY + db 100 ; TANGELA + db 40 ; KANGASKHAN + db 70 ; HORSEA + db 95 ; SEADRA + db 50 ; GOLDEEN + db 80 ; SEAKING + db 70 ; STARYU + db 100 ; STARMIE + db 100 ; MR__MIME + db 55 ; SCYTHER + db 95 ; JYNX + db 85 ; ELECTABUZZ + db 85 ; MAGMAR + db 55 ; PINSIR + db 70 ; TAUROS + db 20 ; MAGIKARP + db 100 ; GYARADOS + db 95 ; LAPRAS + db 48 ; DITTO + db 65 ; EEVEE + db 110 ; VAPOREON + db 110 ; JOLTEON + db 110 ; FLAREON + db 75 ; PORYGON + db 90 ; OMANYTE + db 115 ; OMASTAR + db 45 ; KABUTO + db 70 ; KABUTOPS + db 60 ; AERODACTYL + db 65 ; SNORLAX + db 125 ; ARTICUNO + db 125 ; ZAPDOS + db 125 ; MOLTRES + db 50 ; DRATINI + db 70 ; DRAGONAIR + db 100 ; DRAGONITE + db 154 ; MEWTWO + db 100 ; MEW +; fb6ed INCLUDE "event/name_rater.asm" From 0e63b0433fbabe1559291590d3450fb218d3fd6a Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 28 Apr 2014 16:41:16 -0400 Subject: [PATCH 06/18] String and OAM incbins in Town Map code. --- main.asm | 68 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/main.asm b/main.asm index 088711f2f..989a76b74 100644 --- a/main.asm +++ b/main.asm @@ -81291,7 +81291,7 @@ Function919b0: ; 919b0 Function91a04: ; 91a04 ld a, [DefaultFlypoint] - cp $2f + cp KANTO_LANDMARK jr nc, .asm_91a0f ld e, $0 jr .asm_91a11 @@ -81992,12 +81992,14 @@ Function91de9: ; 91de9 call PlaceString ld h, b ld l, c - ld de, $5e16 + ld de, String_91e16 call PlaceString ret ; 91e16 -INCBIN "baserom.gbc",$91e16,$91e1e - $91e16 +String_91e16: + db "'S NEST@" +; 91e1e Function91e1e: ; 91e1e ld [$d003], a @@ -82039,74 +82041,87 @@ Function91e1e: ; 91e1e Function91e5a: ; 91e5a call Function91ea9 ret c + ld a, [DefaultFlypoint] ld e, a callba GetLandmarkCoords ld c, e ld b, d - ld de, $5e9c + ld de, Unknown_91e9c ld hl, Sprites .asm_91e70 ld a, [de] cp $80 jr z, .asm_91e91 + add b ld [hli], a inc de + ld a, [de] add c ld [hli], a inc de + ld a, [de] add $78 ld [hli], a inc de + push bc - ld c, $0 + ld c, 0 ld a, [PlayerGender] bit 0, a jr z, .asm_91e8c inc c - .asm_91e8c ld a, c ld [hli], a pop bc + jr .asm_91e70 .asm_91e91 - ld hl, $c410 - ld bc, $0090 + ld hl, Sprites + $10 + ld bc, SpritesEnd - (Sprites + $10) xor a call ByteFill ret ; 91e9c -INCBIN "baserom.gbc",$91e9c,$91ea9 - $91e9c +Unknown_91e9c: ; 91e9c + db -8, -8, 0 + db -8, 0, 1 + db 0, -8, 2 + db 0, 0, 3 + db $80 ; terminator +; 91ea9 Function91ea9: ; 91ea9 ld a, [DefaultFlypoint] - cp $5f - jr z, .asm_91ebc - cp $2f - jr c, .asm_91ebc + cp FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr c, .johto + +.kanto ld a, [$d003] and a - jr z, .asm_91ec4 - jr .asm_91ec2 + jr z, .clear + jr .ok -.asm_91ebc +.johto ld a, [$d003] and a - jr nz, .asm_91ec4 + jr nz, .clear -.asm_91ec2 +.ok and a ret -.asm_91ec4 +.clear ld hl, Sprites - ld bc, $00a0 + ld bc, SpritesEnd - Sprites xor a call ByteFill scf @@ -82115,14 +82130,14 @@ Function91ea9: ; 91ea9 Function91ed0: ; 91ed0 ld a, [DefaultFlypoint] - cp $5f + cp FAST_SHIP jr z, .asm_91ede callba GetPlayerIcon ret .asm_91ede - ld de, $4cb2 - ld b, $24 + ld de, FastShipGFX + ld b, BANK(FastShipGFX) ret ; 91ee4 @@ -82195,7 +82210,7 @@ TownMapPals: ; 91f13 ; The palette data is condensed to nybbles, ; least-significant first. - ld hl, .Pals + ld hl, TownMapPalMap srl a jr c, .odd @@ -82234,7 +82249,7 @@ TownMapPals: ; 91f13 jr nz, .loop ret -.Pals +TownMapPalMap: db $11, $21, $22, $00, $11, $13, $54, $54, $11, $21, $22, $00 db $11, $10, $01, $00, $11, $21, $22, $00, $00, $00, $00, $00 db $00, $00, $44, $04, $00, $00, $00, $00, $33, $33, $33, $33 @@ -82289,7 +82304,7 @@ TownMapPlayerIcon: ; 91fa6 ld e, l ld hl, $8140 ld c, 4 ; # tiles - ld a, $30 + ld a, BANK(ChrisSpriteGFX) ; does nothing call Request2bpp ; Animation/palette @@ -82299,7 +82314,6 @@ TownMapPlayerIcon: ; 91fa6 bit 0, a jr z, .asm_91fd3 ld b, $1e ; Female - .asm_91fd3 ld a, b call Function3b2a From 6bba0e7fd14a4b166e8779392c6ff994a42e14f1 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 28 Apr 2014 16:43:11 -0400 Subject: [PATCH 07/18] Add constants for unused items, including Town Map and Poke Flute. --- constants/item_constants.asm | 32 ++++++++++++++++++++++++++++++-- items/item_effects.asm | 8 ++++---- main.asm | 24 ++++++++++++------------ 3 files changed, 46 insertions(+), 18 deletions(-) diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 7fc132378..06e15fa34 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -4,6 +4,7 @@ ULTRA_BALL EQU $02 BRIGHTPOWDER EQU $03 GREAT_BALL EQU $04 POKE_BALL EQU $05 +TOWN_MAP EQU $06 BICYCLE EQU $07 MOON_STONE EQU $08 ANTIDOTE EQU $09 @@ -22,6 +23,7 @@ MAX_ELIXER EQU $15 FIRE_STONE EQU $16 THUNDERSTONE EQU $17 WATER_STONE EQU $18 +ITEM_19 EQU $19 HP_UP EQU $1A PROTEIN EQU $1B IRON EQU $1C @@ -41,15 +43,18 @@ GUARD_SPEC EQU $29 SUPER_REPEL EQU $2A MAX_REPEL EQU $2B DIRE_HIT EQU $2C +ITEM_2D EQU $2D FRESH_WATER EQU $2E SODA_POP EQU $2F LEMONADE EQU $30 X_ATTACK EQU $31 +ITEM_32 EQU $32 X_DEFEND EQU $33 X_SPEED EQU $34 X_SPECIAL EQU $35 COIN_CASE EQU $36 ITEMFINDER EQU $37 +POKE_FLUTE EQU $38 EXP_SHARE EQU $39 OLD_ROD EQU $3A GOOD_ROD EQU $3B @@ -83,6 +88,7 @@ TINYMUSHROOM EQU $56 BIG_MUSHROOM EQU $57 SILVERPOWDER EQU $58 BLU_APRICORN EQU $59 +ITEM_5A EQU $5A AMULET_COIN EQU $5B YLW_APRICORN EQU $5C GRN_APRICORN EQU $5D @@ -92,6 +98,7 @@ TWISTEDSPOON EQU $60 WHT_APRICORN EQU $61 BLACKBELT EQU $62 BLK_APRICORN EQU $63 +ITEM_64 EQU $64 PNK_APRICORN EQU $65 BLACKGLASSES EQU $66 SLOWPOKETAIL EQU $67 @@ -111,6 +118,7 @@ BLUE_CARD EQU $74 MIRACLE_SEED EQU $75 THICK_CLUB EQU $76 FOCUS_BAND EQU $77 +ITEM_78 EQU $78 ENERGYPOWDER EQU $79 ENERGY_ROOT EQU $7A HEAL_POWDER EQU $7B @@ -125,21 +133,34 @@ STARDUST EQU $83 STAR_PIECE EQU $84 BASEMENT_KEY EQU $85 PASS EQU $86 +ITEM_87 EQU $87 +ITEM_88 EQU $88 +ITEM_89 EQU $89 CHARCOAL EQU $8A BERRY_JUICE EQU $8B SCOPE_LENS EQU $8C +ITEM_8D EQU $8D +ITEM_8E EQU $8E METAL_COAT EQU $8F DRAGON_FANG EQU $90 +ITEM_91 EQU $91 LEFTOVERS EQU $92 +ITEM_93 EQU $93 +ITEM_94 EQU $94 +ITEM_95 EQU $95 MYSTERYBERRY EQU $96 DRAGON_SCALE EQU $97 BERSERK_GENE EQU $98 +ITEM_99 EQU $99 +ITEM_9A EQU $9A +ITEM_9B EQU $9B SACRED_ASH EQU $9C HEAVY_BALL EQU $9D FLOWER_MAIL EQU $9E LEVEL_BALL EQU $9F LURE_BALL EQU $A0 FAST_BALL EQU $A1 +ITEM_A2 EQU $A2 LIGHT_BALL EQU $A3 FRIEND_BALL EQU $A4 MOON_BALL EQU $A5 @@ -148,12 +169,15 @@ NORMAL_BOX EQU $A7 GORGEOUS_BOX EQU $A8 SUN_STONE EQU $A9 POLKADOT_BOW EQU $AA +ITEM_AB EQU $AB UP_GRADE EQU $AC BERRY EQU $AD GOLD_BERRY EQU $AE SQUIRTBOTTLE EQU $AF +ITEM_B0 EQU $B0 PARK_BALL EQU $B1 RAINBOW_WING EQU $B2 +ITEM_B3 EQU $B3 BRICK_PIECE EQU $B4 SURF_MAIL EQU $B5 LITEBLUEMAIL EQU $B6 @@ -164,10 +188,12 @@ MORPH_MAIL EQU $BA BLUESKY_MAIL EQU $BB MUSIC_MAIL EQU $BC MIRAGE_MAIL EQU $BD +ITEM_BE EQU $BE TM_01 EQU $BF TM_02 EQU $C0 TM_03 EQU $C1 TM_04 EQU $C2 +ITEM_C3 EQU $C3 TM_05 EQU $C4 TM_06 EQU $C5 TM_07 EQU $C6 @@ -192,6 +218,7 @@ TM_25 EQU $D8 TM_26 EQU $D9 TM_27 EQU $DA TM_28 EQU $DB +ITEM_DC EQU $DC TM_29 EQU $DD TM_30 EQU $DE TM_31 EQU $DF @@ -221,6 +248,7 @@ HM_04 EQU $F6 HM_05 EQU $F7 HM_06 EQU $F8 HM_07 EQU $F9 +HM_08 EQU $FA NUM_TMS EQU HM_01 - TM_01 - 2 @@ -231,8 +259,8 @@ BALL EQU 3 TM_HM EQU 4 ; item actions -CANT_SELECT EQU %01000000 -CANT_TOSS EQU %10000000 +CANT_SELECT EQU 1 << 6 +CANT_TOSS EQU 1 << 7 ; held item effects HELD_BERRY EQU $01 diff --git a/items/item_effects.asm b/items/item_effects.asm index f34f95c70..ca5336a07 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -19,7 +19,7 @@ ItemEffects: ; e73c dw Brightpowder dw GreatBall dw PokeBall - dw Item06 + dw TownMap dw Bicycle dw MoonStone dw Antidote @@ -69,7 +69,7 @@ ItemEffects: ; e73c dw XSpecial dw CoinCase dw Itemfinder - dw Item38 + dw PokeFlute dw ExpShare dw OldRod dw GoodRod @@ -1152,7 +1152,7 @@ Functionedfa: ; edfa (3:6dfa) callba Function2715c ret -Item06: ; ee01 +TownMap: ; ee01 callba Function91ae1 ret ; ee08 @@ -2374,7 +2374,7 @@ Tablef504: ; f504 ; f50c -Item38: ; f50c +PokeFlute: ; f50c ld a, [IsInBattle] and a jr nz, .asm_f512 diff --git a/main.asm b/main.asm index 989a76b74..858c640c6 100644 --- a/main.asm +++ b/main.asm @@ -37376,18 +37376,18 @@ Function28771: ; 28771 Unknown_28785: ; 28785 ; Alternate mappings for unused items. - db $19, LEFTOVERS - db $2d, BITTER_BERRY - db $32, GOLD_BERRY - db $5a, BERRY - db $64, BERRY - db $78, BERRY - db $87, BERRY - db $be, BERRY - db $c3, BERRY - db $dc, BERRY - db $fa, BERRY - db $ff, BERRY + db ITEM_19, LEFTOVERS + db ITEM_2D, BITTER_BERRY + db ITEM_32, GOLD_BERRY + db ITEM_5A, BERRY + db ITEM_64, BERRY + db ITEM_78, BERRY + db ITEM_87, BERRY + db ITEM_BE, BERRY + db ITEM_C3, BERRY + db ITEM_DC, BERRY + db HM_08, BERRY + db $ff, BERRY db $00 ; 2879e From da88588636e2a296668e509ce8e614f51727a254 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 28 Apr 2014 16:43:50 -0400 Subject: [PATCH 08/18] Use BCD for Teru-sama prices. --- items/item_attributes.asm | 68 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/items/item_attributes.asm b/items/item_attributes.asm index 94043c32d..d35011f70 100644 --- a/items/item_attributes.asm +++ b/items/item_attributes.asm @@ -43,7 +43,7 @@ Item2Attributes: db $06 ; ball ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -195,7 +195,7 @@ Item2Attributes: db $50 ; party menu ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -355,7 +355,7 @@ Item2Attributes: db $06 ; ball ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -395,7 +395,7 @@ Item2Attributes: db $06 ; ball ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -443,7 +443,7 @@ Item2Attributes: db $60 ; overworld ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -715,7 +715,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -795,7 +795,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -955,7 +955,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1075,7 +1075,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1083,7 +1083,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1091,7 +1091,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1123,7 +1123,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1131,7 +1131,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1155,7 +1155,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1171,7 +1171,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1179,7 +1179,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1187,7 +1187,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1219,7 +1219,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1227,7 +1227,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1235,7 +1235,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1291,7 +1291,7 @@ Item2Attributes: db $06 ; ball ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1363,7 +1363,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1403,7 +1403,7 @@ Item2Attributes: db $60 ; overworld ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1427,7 +1427,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1515,7 +1515,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1555,7 +1555,7 @@ Item2Attributes: db $50 ; party menu ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1755,7 +1755,7 @@ Item2Attributes: db $50 ; party menu ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -1995,7 +1995,7 @@ Item2Attributes: db $50 ; party menu ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2003,7 +2003,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2011,7 +2011,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2019,7 +2019,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2027,7 +2027,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2035,7 +2035,7 @@ Item2Attributes: db $00 ; can't use ; TERU-SAMA - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss @@ -2043,7 +2043,7 @@ Item2Attributes: db $00 ; can't use ; ? - dw 39321 ; price + dw $9999 ; price db NONE ; effect db 0 ; param db 0 ; can select + toss From c7938cc7d368a68f73fe5cbb3a750172db70cf7a Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 29 Apr 2014 17:43:24 -0400 Subject: [PATCH 09/18] Split the mobile adapter library into another object file. --- Makefile | 1 + lib/mobile/main.asm | 5 +++++ main.asm | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c35b888bb..40972ac52 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ TEXTQUEUE := CRYSTAL_OBJS := \ wram.o \ main.o \ +lib/mobile/main.o \ home.o \ audio.o \ maps_crystal.o \ diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index 758e79a93..0d390955f 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -1,5 +1,10 @@ ; A library included as part of the Mobile Adapter GB SDK. +INCLUDE "gbhw.asm" + + +SECTION "Main", ROMX + ; known jump sources: 110004 (44:4004), 111bdd (44:5bdd), 111bfd (44:5bfd), 111c0e (44:5c0e), 111c7d (44:5c7d), 111cbd (44:5cbd), 111cf4 (44:5cf4), 111d30 (44:5d30) Function110000: ; 110000 (44:4000) ld a, [hli] diff --git a/main.asm b/main.asm index 858c640c6..81db117f1 100644 --- a/main.asm +++ b/main.asm @@ -104690,10 +104690,6 @@ Function10ed51: ; 10ed51 INCLUDE "engine/title.asm" -SECTION "bank44", ROMX, BANK[$44] - -INCLUDE "lib/mobile/main.asm" - SECTION "bank45", ROMX, BANK[$45] From c456555f15cb01a4c72b782695b7a002c9971893 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 29 Apr 2014 22:59:39 -0400 Subject: [PATCH 10/18] Disassemble the mobile adapter library. --- lib/mobile/main.asm | 8094 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 8059 insertions(+), 35 deletions(-) diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index 0d390955f..d5d4bb188 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -15,7 +15,44 @@ Function110000: ; 110000 (44:4000) ret ; 110007 (44:4007) -INCBIN "baserom.gbc",$110007,$110029 - $110007 +Function110007: ; 110007 +.asm_110007 + ld a, [hli] + ld [de], a + or a + ret z + inc de + inc bc + jr .asm_110007 +; 11000f + +Function11000f: ; 11000f + push bc + ld c, $0 + ld b, a + dec b +.asm_110014 + ld a, [hli] + ld [de], a + or a + jr z, .asm_110020 + inc de + inc c + dec b + jr nz, .asm_110014 + xor a + ld [de], a + +.asm_110020 + ld a, c + pop bc + add c + ld c, a + ld a, b + adc $0 + ld b, a + ret +; 110029 ; known jump sources: 111aa8 (44:5aa8), 111ad4 (44:5ad4) Function110029: ; 110029 (44:4029) @@ -41,7 +78,7 @@ Function110030:: ; 110030 (44:4030) .asm_110047 ld d, $0 ld e, a - ld hl, $4070 + ld hl, Jumptable_110070 add hl, de ld a, [hli] ld [$c988], a @@ -67,14 +104,49 @@ Function110030:: ; 110030 (44:4030) ret ; 110070 (44:4070) -INCBIN "baserom.gbc",$110070,$1100b4 - $110070 +Jumptable_110070: ; 110070 + dw Function110115 + dw Function110236 + dw Function110291 + dw Function1103ac + dw Function110438 + dw Function1104c6 + dw Function110578 + dw Function110582 + dw Function11058c + dw Function1105dd + dw Function1106ef + dw Function110757 + dw Function1107ff + dw Function110899 + dw Function1108a3 + dw Function110905 + dw Function1109a4 + dw Function1109f9 + dw Function110a5b + dw Function110c3c + dw Function110c9e + dw Function110ddd + dw Function1111fe + dw Function1113fe + dw Function1100dc + dw Function111541 + dw Function111596 + dw Function11162d + dw Function11032c + dw Function11148c + dw Function111610 + dw Function1103ac + dw Function110235 + dw Function111540 +; 1100b4 ; known jump sources: 110066 (44:4066), 111f07 (44:5f07) Function1100b4: ; 1100b4 (44:40b4) push bc .asm_1100b5 di - ld a, [OverworldMap] ; $c800 + ld a, [$c800] ld b, a ld a, [$c80b] ld c, a @@ -99,31 +171,3246 @@ Function1100b4: ; 1100b4 (44:40b4) ret ; 1100dc (44:40dc) -INCBIN "baserom.gbc",$1100dc,$110226 - $1100dc +Function1100dc: ; 1100dc + xor a + ld [rTAC], a + ld e, c + ld b, a + ld hl, Unknown_112089 + add hl, bc + ld c, [hl] + inc hl + ld a, [rKEY1] + bit 7, a + jr nz, .asm_1100f9 + ld a, e + sra c + ld a, e + cp $4 + jr nc, .asm_1100f9 + ld de, $000f + add hl, de + +.asm_1100f9 + ld a, c + ld [rTMA], a + ld [rTIMA], a + ld a, [hli] + ld [$c81f], a + ld [$c816], a + ld a, [hl] + ld [$c820], a + ld [$c815], a + ld c, $7 + ld a, $2 + ld [$ff00+c], a + ld a, $6 + ld [$ff00+c], a + ret +; 110115 + +Function110115: ; 110115 + ld hl, $c821 + bit 1, [hl] + jr nz, .asm_110120 + xor a + ld l, a + ld h, a + ret + +.asm_110120 + res 1, [hl] + ld a, [$c80f] + ld e, a + cp $22 + jr z, .asm_11016a + cp $23 + jr z, .asm_11016a + cp $25 + jr z, .asm_11016a + cp $26 + jr z, .asm_11018e + cp $24 + jr z, .asm_1101a4 + cp $30 + jp z, .asm_1101f8 + cp $31 + jp z, .asm_11020d + cp $32 + jr z, .asm_1101a4 + cp $33 + jr z, .asm_1101a4 + swap a + and $f + cp $1 + jr z, .asm_11016a + cp $0 + jr z, .asm_11015d +.asm_110158 + ld hl, $0000 +.asm_11015b + ld a, e + ret + +.asm_11015d + ld a, e + add $15 + ld e, a + xor a + ld hl, $c810 + ld [hli], a + ld [hl], a + ld hl, $c821 + +.asm_11016a + xor a + ld [$c86d], a + ld [hl], a + ld [$c807], a + inc a + ld [$c86a], a + ld hl, $c822 + res 0, [hl] + res 5, [hl] + ld hl, $cb47 + xor a + ld [hli], a + inc a + ld [hl], a + call Function111686 + ld a, $15 + cp e + jr nz, .asm_110158 + jr .asm_1101d7 + +.asm_11018e + ld a, [$c821] + bit 4, a + ld a, $1 + jr z, .asm_11016a + ld a, $2 + ld [$c86a], a + ld a, [$c805] + ld [$c807], a + jr .asm_110158 + +.asm_1101a4 + res 0, [hl] + ld hl, $c822 + res 5, [hl] + ld hl, $c821 + res 7, [hl] + res 6, [hl] + set 5, [hl] + xor a + ld [$c86d], a + ld [$c9af], a + ld a, $2 + ld [$c86a], a + ld a, $4 + ld [$c807], a + ld a, e + cp $32 + jr z, .asm_1101d7 + cp $33 + jr z, .asm_1101d7 + cp $30 + jr z, .asm_1101d7 + cp $31 + jp nz, .asm_110158 + +.asm_1101d7 + ld hl, $c810 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, $32 + cp e + jp nz, .asm_11015b + ld a, $3 + cp h + jp nz, .asm_11015b + dec a + cp l + jr z, .asm_1101f2 + dec a + cp l + jp nz, .asm_11015b + +.asm_1101f2 + ld bc, $c880 + jp .asm_11015b + +.asm_1101f8 + ld a, [$ca3c] + cp $a4 + jr z, .asm_1101a4 + ld a, $3 + ld [$c86a], a + ld hl, $c810 + ld a, [hli] + ld h, [hl] + ld l, a + jp .asm_11015b + +.asm_11020d + ld a, [$c810] + cp $2 + jr z, .asm_1101a4 + cp $3 + jr z, .asm_1101a4 + ld a, $4 + ld [$c86a], a + ld hl, $c810 + ld a, [hli] + ld h, [hl] + ld l, a + jp .asm_11015b +; 110226 ; known jump sources: 111f12 (44:5f12) Function110226: ; 110226 (44:4226) ld a, $21 + +Function110228: ; 110228 ld [$c80f], a ld hl, $c821 set 1, [hl] ret ; 110231 (44:4231) -INCBIN "baserom.gbc", $110231, $110fad - $110231 +Function110231: ; 110231 + ld a, $20 + jr Function110228 +; 110235 + +Function110235: ; 110235 + nop + +Function110236: ; 110236 + ld a, [$c988] + push af + push bc + push hl + xor a + ld [rTAC], a + ld a, [rIF] + and $1b + ld [rIF], a + call Function110029 + ld bc, $0452 + ld hl, $c800 +.asm_11024e + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .asm_11024e + ld a, [$c822] + set 6, a + ld [$c822], a + pop hl + ld a, l + ld [$c981], a + ld a, h + ld [$c982], a + pop bc + ld hl, $c983 + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, $c86e + ld a, e + ld [hli], a + ld [hl], d + xor a + ld [$c819], a + ld c, $c + call Function1100dc + call Function1104b0 + pop af + cp $35 + jr nz, .asm_110289 + ld a, $2b + jr .asm_11028b + +.asm_110289 + ld a, $a + +.asm_11028b + ld [$c86a], a + jp Function110432 +; 110291 + +Function110291: ; 110291 + ld a, [$c821] + bit 1, a + jr z, .asm_1102a6 + ld a, [$c80f] + cp $14 + jr z, .asm_1102b3 + cp $25 + jr z, .asm_1102b3 + ld a, [$c821] + +.asm_1102a6 + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $1 + jp nz, Function110226 + +.asm_1102b3 + xor a + ld [rTAC], a + xor a + ld [$c819], a + ld a, l + ld b, h + ld hl, $c880 + ld [hli], a + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld a, [$c870] + ld c, a + call Function1100dc + ld hl, $c829 + ld a, $72 + ld [hli], a + ld a, $c8 + ld [hl], a + ld de, $cb47 + ld b, $5 + ld hl, Unknown_11205e + call Function110000 + ld a, [$c882] + ld c, a + or a + jr z, .asm_1102f2 + cp $80 + jr nc, .asm_1102f2 + ld c, $80 + jr .asm_1102f4 + +.asm_1102f2 + ld a, $80 + +.asm_1102f4 + ld b, a + inc a + ld [de], a + inc de + ld a, $80 + add c + ld hl, $c882 + ld [hli], a + ld a, [hl] + ld [de], a + inc de + add $80 + ld [hl], a + ld hl, $c880 + ld a, [hli] + ld h, [hl] + ld l, a + ld c, b + call Function110000 + ld a, l + ld [$c880], a + ld a, h + ld [$c881], a + ld b, c + inc b + call Function111f63 + call Function1104b0 + ld a, $2e + ld [$c86a], a + ld hl, $c821 + res 1, [hl] + set 0, [hl] + ret +; 11032c + +Function11032c: ; 11032c + ld a, [$c821] + bit 1, a + jp nz, Function110226 + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $1 + jp nz, Function110226 + xor a + ld [rTAC], a + ld [$c819], a + ld hl, $c880 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld a, [$c870] + ld c, a + call Function1100dc + ld de, $cb47 + ld b, $6 + ld hl, Unknown_112046 + call Function110000 + ld a, [$c883] + ld [de], a + inc de + ld a, [$c882] + ld c, a + or a + jr z, .asm_11037f + cp $80 + jr nc, .asm_11037f + ld c, $80 + jr .asm_110381 + +.asm_11037f + ld a, $80 + +.asm_110381 + ld [de], a + inc de + ld b, $2 + call Function111f63 + call Function1104b0 + ld a, $2d + ld [$c86a], a + jp Function110432 +; 110393 + +Function110393: ; 110393 + ld c, $ff + ld a, [$ff00+c] + or $c + ld [$ff00+c], a + ret +; 11039a + +Function11039a: ; 11039a + ld b, $0 +.asm_11039c + inc b + jr z, .asm_1103a3 + ld a, [hli] + or a + jr nz, .asm_11039c + +.asm_1103a3 + ld a, b + cp c + jr nc, .asm_1103aa + cp $2 + ret + +.asm_1103aa + scf + ret +; 1103ac + +Function1103ac: ; 1103ac + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $1 + jp nz, Function110226 + push hl + ld c, $15 + call Function11039a + jr c, .asm_1103d2 + ld c, $22 + call Function11039a + jr c, .asm_1103d2 + ld c, $12 + call Function11039a + jr nc, .asm_1103d6 + +.asm_1103d2 + pop hl + jp Function110231 + +.asm_1103d6 + xor a + ld [rTAC], a + ld [$c86d], a + ld [$c97a], a + ld a, [$c870] + ld c, a + call Function1100dc + ld hl, $c829 + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hl], a + call Function110485 + push hl + ld b, a + call Function111f63 + ld b, $5 + ld hl, Unknown_112037 + ld de, $cb74 + call Function110000 + inc de + inc de + pop hl + ld bc, $0000 + call Function110007 + ld a, c + ld [$cb7a], a + ld [$c86b], a + push de + inc de + ld bc, $0000 + ld a, $20 + call Function11000f + ld l, e + ld h, d + pop de + ld a, c + ld [de], a + ld a, [$c86b] + add c + add $a + ld [$cb79], a + call Function1104b0 + ld a, $b + ld [$c86a], a + +Function110432: ; 110432 + ld hl, $c821 + set 0, [hl] + ret +; 110438 + +Function110438: ; 110438 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $1 + jp nz, Function110226 + push hl + ld c, $15 + call Function11039a + jr nc, .asm_110454 + pop hl + jp Function110231 + +.asm_110454 + xor a + ld [rTAC], a + ld [$c97a], a + ld a, [$c870] + ld c, a + call Function1100dc + ld hl, $c98f + ld a, $81 + ld [hli], a + ld a, $c8 + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $ff + ld [$c86e], a + call Function110485 + ld b, a + call Function111f63 + call Function1104b0 + ld a, $c + ld [$c86a], a + jr Function110432 +; 110485 + +Function110485: ; 110485 + ld de, $cb47 + ld hl, Unknown_11201d + ld b, $6 + call Function110000 + pop bc + pop hl + push bc + ld a, [$c818] + cp $8c + jr c, .asm_11049e + ld a, $3 + jr .asm_1104a1 + +.asm_11049e + ld a, [$c871] + +.asm_1104a1 + ld [de], a + inc de + ld bc, $0001 + ld a, $14 + call Function11000f + ld a, c + ld [$cb4c], a + ret +; 1104b0 + +Function1104b0: ; 1104b0 + xor a + ld [$c81e], a + call Function110393 + xor a + ld [$c86b], a + ld de, $0001 + ld hl, Unknown_112000 + ld b, $1 + jp Function111f07 +; 1104c6 + +Function1104c6: ; 1104c6 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jr z, .asm_110526 + cp $3 + jr z, .asm_110526 + cp $2 + jp nz, Function110226 + ld hl, $c822 + bit 4, [hl] + jr nz, .asm_110507 + ld a, $2 + ld [$c86b], a + ld a, $a2 + ld [$c81e], a + ld de, $000a + ld hl, Unknown_11203c + ld b, $5 + call Function111f07 +.asm_1104fa + ld a, $e + ld [$c86a], a + ld hl, $c821 + set 0, [hl] + res 3, [hl] + ret + +.asm_110507 + ld a, [$c807] + or a + jr nz, .asm_11051f + ld a, $1 + ld [$c86a], a + ld hl, $c822 + res 4, [hl] + ld hl, $c821 + ld a, [hl] + and $17 + ld [hl], a + ret + +.asm_11051f + ld a, $2 + ld [$c86b], a + jr .asm_1104fa + +.asm_110526 + call Function112724 + xor a + ld [$c86b], a + ld de, $cb67 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $7 + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120c1 + call Function110007 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $e + ld [$c86a], a + jp Function110432 +; 110578 + +Function110578: ; 110578 + ld b, $25 + call Function110596 + or a + jp nz, Function1135ba + ret +; 110582 + +Function110582: ; 110582 + ld b, $26 + call Function110596 + or a + jp nz, Function11359d + ret +; 11058c + +Function11058c: ; 11058c + ld b, $27 + call Function110596 + or a + jp nz, Function1135ad + ret +; 110596 + +Function110596: ; 110596 + ld a, [$c821] + bit 0, a + jr nz, .asm_1105d9 + ld a, [$c86a] + cp $1 + jr nz, .asm_1105d9 + ld a, [$c835] + or a + ret nz + ld a, b + ld [$cb36], a + xor a + ld [rTAC], a + ld a, e + ld [$c86e], a + ld a, d + ld [$c86f], a + xor a + ld [$c819], a + ld a, [$c870] + ld c, a + call Function1100dc + ld hl, $c829 + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hl], a + call Function1104b0 + ld a, [$cb36] + ld [$c86a], a + xor a + jp Function110432 + +.asm_1105d9 + pop hl + jp Function110226 +; 1105dd + +Function1105dd: ; 1105dd + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $1 + jp nz, Function110226 + xor a + ld [rTAC], a + ld a, [$c870] + ld c, a + call Function1100dc + ld hl, $c98f + ld a, $81 + ld [hli], a + ld a, $c8 + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $ff + ld [$c86e], a + call Function1104b0 + ld a, $d + ld [$c86a], a + jp Function110432 +; 110615 + +Function110615: ; 110615 + ld b, $15 + ld [$c86e], a + or a + jr z, .asm_110625 + dec a + jr z, .asm_11062c + dec a + jp z, .asm_1106c1 + ret + +.asm_110625 + ld a, $19 + ld hl, $c83e + jr .asm_110631 + +.asm_11062c + ld a, $6e + ld hl, $c852 + +.asm_110631 + push hl + push bc + ld [$cba2], a + ld hl, $c829 + ld a, $9d + ld [hli], a + ld a, $cb + ld [hl], a + xor a + ld [$cba1], a + ld [$c86b], a + ld [$c9af], a + ld de, $cb97 + ld hl, Unknown_11207d + ld b, $6 + call Function110000 + ld de, $cb47 + ld hl, Unknown_112063 + ld b, $5 + call Function110000 + pop bc + pop hl + push de + inc de + ld a, b + ld bc, $0000 + call Function11000f + ld a, c + pop hl + ld [hl], a + ld b, c + call Function111f63 + ld a, [$c86e] + cp $2 + jr nz, .asm_1106ac + ld a, [$cabc] + or a + jr z, .asm_1106ac + ld hl, $c995 + ld a, [hli] + cp $99 + jr nz, .asm_1106ac + ld a, [hli] + cp $66 + jr nz, .asm_1106ac + ld a, [hli] + cp $23 + jr nz, .asm_1106ac + ld a, $2 + ld [$c86e], a + dec a + ld [$c86b], a + ld a, $a3 + ld de, $0010 + ld hl, $c995 + call Function111f02 + ld a, $f + ld [$c86a], a + jp Function110432 + +.asm_1106ac + ld hl, $cb47 + ld a, $a8 + ld [$c81e], a + ld b, $5 + call Function111f07 + ld a, $f + ld [$c86a], a + jp Function110432 + +.asm_1106c1 + ld b, $50 + ld hl, $c876 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $0007 + add hl, de + ld de, $c8ff +.asm_1106d0 + ld a, [hli] + ld [de], a + cp $2f + jr z, .asm_1106da + inc de + dec b + jr nz, .asm_1106d0 + +.asm_1106da + xor a + ld [de], a + dec hl + ld a, l + ld [$c876], a + ld a, h + ld [$c877], a + ld hl, $c8ff + ld a, $50 + ld b, $40 + jp .asm_110631 +; 1106ef + +Function1106ef: ; 1106ef + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $2 + jp nz, Function110226 + ld a, [$c86d] + or a + jp nz, Function110226 + push hl + ld c, $20 + call Function11039a + jr nc, .asm_110712 + pop hl + jp Function110231 + +.asm_110712 + xor a + ld [$c86b], a + ld de, $cba7 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld de, $cbb7 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + inc de + inc de + ld bc, $0001 + ld hl, Unknown_11209e + call Function110007 + pop hl + push hl + ld b, $ff +.asm_11073b + inc b + ld a, [hli] + or a + jr z, .asm_110744 + cp $40 + jr nz, .asm_11073b + +.asm_110744 + ld a, c + add b + add $2 + ld [$cbbc], a + pop hl + call Function110000 + call Function11295e + ld a, $0 + jp Function110615 +; 110757 + +Function110757: ; 110757 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $3 + jp nz, Function110226 + ld a, [$c98a] + or a + jp nz, Function110226 + push hl +.asm_11076f + ld a, [hli] + or a + jr nz, .asm_11076f + ld a, [hl] + or a + jp z, .asm_1107fb + pop hl + push hl + ld c, $20 + call Function11039a + jr c, .asm_1107fb +.asm_110781 + ld c, $81 + call Function11039a + jr c, .asm_1107fb + xor a + cp [hl] + jr nz, .asm_110781 + call Function112724 + xor a + ld [$c86b], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cb53 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld de, $cb59 + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld de, $cb5a + ld hl, Unknown_1120a4 + call Function110007 + pop hl + call Function110007 + ld a, $3e + ld [de], a + inc de + inc c + ld a, l + ld [$c87c], a + ld a, h + ld [$c87d], a + call Function11295e + ld a, c + ld [$cb58], a + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb53 + ld d, $0 + ld e, c + ld b, $5 + call Function111f07 + ld a, $15 + ld [$c86a], a + jp Function110432 + +.asm_1107fb + pop hl + jp Function110231 +; 1107ff + +Function1107ff: ; 1107ff + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $3 + jp nz, Function110226 + ld a, [$c98a] + or a + jp z, Function110226 + ld a, c + or b + jp z, Function110231 + ld a, l + ld [$c87c], a + ld a, h + ld [$c87d], a + ld hl, $c87e + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, d + ld [$c86f], a + call Function112724 + ld hl, $c98a + ld a, [hl] + and $1 + xor $1 + ld [$c86b], a + inc [hl] + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld de, $cb4d + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cbdd + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld de, $cbe3 + ld a, [$c86c] + ld [de], a + ld a, [$c86b] + or a + jr nz, .asm_110891 + ld bc, $0001 + ld de, $cbe4 + ld hl, Unknown_1120ba + call Function110007 + ld a, c + ld [$cbe2], a + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld de, $0011 + ld hl, $cbdd + ld b, $5 + call Function111f07 + +.asm_110891 + ld a, $16 + ld [$c86a], a + jp Function110432 +; 110899 + +Function110899: ; 110899 + ld a, [$c86a] + cp $3 + jp nz, Function110226 + jr Function1108ab +; 1108a3 + +Function1108a3: ; 1108a3 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + +Function1108ab: ; 1108ab + ld hl, $c821 + bit 0, [hl] + jp nz, Function110226 + call Function112724 + xor a + ld [$c86b], a + ld de, $cb67 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $7 + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120c1 + call Function110007 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $17 + ld [$c86a], a + jp Function110432 +; 110905 + +Function110905: ; 110905 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $2 + jp nz, Function110226 + ld a, [$c86d] + or a + jp nz, Function110226 + xor a + ld [$c86b], a + push hl + ld c, $20 + call Function11039a + jr c, .asm_11092f + ld c, $22 + call Function11039a + jr nc, .asm_110933 + +.asm_11092f + pop hl + jp Function110231 + +.asm_110933 + ld de, $cba7 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + inc de + inc de + ld hl, Unknown_1120c8 + call Function110007 + pop hl + push hl + ld b, $ff +.asm_11094a + inc b + ld a, [hli] + or a + jr z, .asm_110953 + cp $40 + jr nz, .asm_11094a + +.asm_110953 + ld a, b + add $6 + ld c, a + ld [$cbac], a + pop hl + ld de, $cbb3 + call Function110000 +.asm_110961 + ld a, [hli] + or a + jr nz, .asm_110961 + call Function11295e + ld a, c + ld [$cbac], a + ld bc, $0006 + ld de, $cbf3 + ld a, $20 + call Function11000f + call Function11295e + ld a, c + ld [$cbec], a + ld de, $cbe7 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld de, $cbee + ld hl, Unknown_1120ce + ld b, $5 + call Function110000 + ld de, $cbc7 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, $1 + jp Function110615 +; 1109a4 + +Function1109a4: ; 1109a4 + ld hl, $c821 + bit 0, [hl] + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + ld a, e + ld [$c86e], a + ld a, d + ld [$c86f], a + xor a + ld [$c86b], a + call Function112729 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $7 + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120d4 + call Function110007 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $18 + ld [$c86a], a + jp Function110432 +; 1109f9 + +Function1109f9: ; 1109f9 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + xor a + ld [$c86b], a + ld a, e + ld [$c86e], a + ld a, d + ld [$c86f], a + ld a, l + or h + jp z, Function110231 + push hl + call Function112729 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $d + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120db + call Function110007 + ld de, $cb53 + pop hl + call Function110d37 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $1d + ld [$c86a], a + jp Function110432 +; 110a5b + +Function110a5b: ; 110a5b + ld a, [$c821] + bit 2, a + jr z, .asm_110a6d + ld a, [$c86a] + cp $1a + jp nz, Function110226 + jp Function110af4 + +.asm_110a6d + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [$c86e], a + ld a, h + ld [$c86f], a + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + dec bc + dec bc + ld hl, $c98f + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, $c829 + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + xor a + ld [$c86b], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $d + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120e8 + call Function110007 + ld de, $cb53 + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $1a + ld [$c86a], a + jp Function110432 +; 110af4 + +Function110af4: ; 110af4 + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld e, [hl] + ld a, b + or c + ld [$c86e], a + ld [$c86f], a + jr z, .asm_110b5c + dec bc + dec bc + ld a, [$c993] + or a + jp nz, .asm_110bd5 + ld a, [$c994] + or a + jr z, .asm_110b1c + ld e, a + +.asm_110b1c + xor a + ld [$c994], a + cp b + jr nz, .asm_110b5c + ld a, e + cp c + jr c, .asm_110b5c + push bc + sub c + ld [hl], a + ld b, c + ld hl, $c82d + ld a, [$c993] + add c + ld [hli], a + ld a, b + adc $0 + ld [hl], a + xor a + ld [$c993], a + ld hl, $ca3f + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, $0 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + pop bc + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + ld [hl], b + ret + +.asm_110b5c + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, c + ld [hli], a + ld [hl], b + ld hl, $c82d + ld a, [$c993] + add e + ld [hli], a + ld a, $0 + adc $0 + ld [hl], a + xor a + ld [$c993], a + ld a, [$c86e] + or a + jr z, .asm_110b9b + ld b, e + ld hl, $ca3f + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, $0 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + +.asm_110b9b + call Function1127f3 + jr z, .asm_110bbb + di + ld hl, $c821 + res 2, [hl] + ld a, $1 + ld [$c86b], a + ld de, $000b + ld a, $95 + ld [$c81e], a + ld hl, $cbc7 + ld b, $5 + jp Function111f07 + +.asm_110bbb + ld a, $4 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + res 2, [hl] + ld hl, $c827 + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, $c82d + ld b, $2 + jp Function110000 + +.asm_110bd5 + ld e, a + xor a + cp b + jr nz, .asm_110c05 + ld a, e + cp c + jr c, .asm_110c05 + ld b, c + ld hl, $c993 + ld a, [hl] + sub c + ld [hl], a + ld a, $80 + sub e + ld e, a + ld d, $0 + ld hl, $c880 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + ret + +.asm_110c05 + push hl + push bc + ld a, [$c993] + ld b, a + ld a, $80 + sub e + ld e, a + ld d, $0 + ld hl, $c880 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + ld a, e + ld [$c829], a + ld a, d + ld [$c82a], a + pop bc + ld a, [$c993] + ld e, a + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, [$c994] + ld e, a + pop hl + jp .asm_110b1c +; 110c3c + +Function110c3c: ; 110c3c + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [$c86e], a + ld a, h + ld [$c86f], a + call Function112729 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $d + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120f5 + call Function110007 + ld de, $cb53 + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $1b + ld [$c86a], a + jp Function110432 +; 110c9e + +Function110c9e: ; 110c9e + ld a, [$c821] + bit 2, a + jr z, .asm_110cb0 + ld a, [$c86a] + cp $1c + jp nz, Function110226 + jp Function110af4 + +.asm_110cb0 + bit 0, a + jp nz, Function110226 + ld a, [$c86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [$c86e], a + ld a, h + ld [$c86f], a + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + dec bc + dec bc + ld hl, $c98f + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, $c829 + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + xor a + ld [$c86b], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + ld a, $e + ld [de], a + inc de + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_112102 + call Function110007 + ld de, $cb52 + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $1c + ld [$c86a], a + jp Function110432 +; 110d37 + +Function110d37: ; 110d37 + push bc + push de + ld b, $0 +.asm_110d3b + ld a, $27 + cp h + jr c, .asm_110d49 + jr nz, .asm_110d52 + ld a, $10 + cp l + jr z, .asm_110d49 + jr nc, .asm_110d52 + +.asm_110d49 + inc b + ld a, b + ld bc, $d8f0 + add hl, bc + ld b, a + jr .asm_110d3b + +.asm_110d52 + ld a, $30 + or b + ld [de], a + inc de + ld b, $0 +.asm_110d59 + ld a, $3 + cp h + jr c, .asm_110d67 + jr nz, .asm_110d70 + ld a, $e8 + cp l + jr z, .asm_110d67 + jr nc, .asm_110d70 + +.asm_110d67 + inc b + ld a, b + ld bc, $fc18 + add hl, bc + ld b, a + jr .asm_110d59 + +.asm_110d70 + ld a, $30 + or b + ld [de], a + inc de + ld b, $0 +.asm_110d77 + ld a, $0 + cp h + jr nz, .asm_110d83 + ld a, $64 + cp l + jr z, .asm_110d83 + jr nc, .asm_110d8c + +.asm_110d83 + inc b + ld a, b + ld bc, $ff9c + add hl, bc + ld b, a + jr .asm_110d77 + +.asm_110d8c + ld a, $30 + or b + ld [de], a + inc de + ld b, $0 + ld a, l +.asm_110d94 + cp $a + jr c, .asm_110d9d + sub $a + inc b + jr .asm_110d94 + +.asm_110d9d + ld l, a + ld a, $30 + or b + ld [de], a + inc de + ld a, $30 + or l + ld [de], a + pop de + ld l, e + ld h, d + ld b, $5 +.asm_110dac + ld a, [hl] + cp $30 + jr nz, .asm_110db7 + inc hl + dec b + jr nz, .asm_110dac + jr .asm_110dd5 + +.asm_110db7 + ld a, $5 + cp b + jr z, .asm_110dd5 + sub b + ld c, a + ld a, [$cb4c] + sub c + ld c, a + ld [$cb4c], a + push hl + ld b, $1 +.asm_110dc9 + inc b + ld a, [hli] + cp $d + jr nz, .asm_110dc9 + pop hl + call Function110000 + pop hl + ret + +.asm_110dd5 + pop bc +.asm_110dd6 + ld a, [de] + inc de + cp $a + jr nz, .asm_110dd6 + ret +; 110ddd + +Function110ddd: ; 110ddd + ld a, [$c821] + bit 2, a + ld a, [$c86a] + jr z, .asm_110e00 + cp $13 + jp z, Function111044 + cp $1f + jp z, Function111044 + cp $21 + jp z, Function111044 + jp Function110226 + +.asm_110df9 + pop hl +.asm_110dfa + pop hl + pop hl + pop hl +.asm_110dfd + jp Function110231 + +.asm_110e00 + cp $2 + jp nz, Function110226 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86d] + or a + jp nz, Function110226 + ld a, l + ld [$c9b5], a + ld a, h + ld [$c9b6], a + xor a + ld [$c989], a + ld [$c9a5], a + ld [$c98a], a + ld [$c993], a + ld a, [hli] + ld [$c833], a + ld a, [hli] + ld [$c834], a + inc hl + inc hl + ld a, l + ld [$c97f], a + ld a, h + ld [$c980], a + dec hl + dec hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, $80 + cp l + jr nz, .asm_110e4a + ld a, $c8 + cp h + jr z, .asm_110dfd + +.asm_110e4a + push hl + push de + push bc + push hl + ld b, URIPrefixEnd - URIPrefix + ld de, URIPrefix +.asm_110e53 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110df9 + inc hl + dec b + jr nz, .asm_110e53 + push hl + ld b, HTTPUploadURLEnd - HTTPUploadURL + ld c, $0 + ld de, HTTPUploadURL +.asm_110e64 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110e70 + inc hl + dec b + jr nz, .asm_110e64 + pop hl + jr .asm_110df9 + +.asm_110e70 + pop hl + push hl + ld b, HTTPRankingURLEnd - HTTPRankingURL + ld c, $0 + ld de, HTTPRankingURL +.asm_110e79 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110e86 + inc hl + dec b + jr nz, .asm_110e79 + pop hl + jp .asm_110df9 + +.asm_110e86 + pop hl + push hl + ld b, HTTPUtilityURLEnd - HTTPUtilityURL + ld c, $0 + ld de, HTTPUtilityURL +.asm_110e8f + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110ea2 + inc hl + dec b + jr nz, .asm_110e8f + pop hl + ld a, $1 + ld [$c98a], a + ld c, $1 + jr .asm_110eb3 + +.asm_110ea2 + pop hl + ld b, HTTPDownloadURLEnd - HTTPDownloadURL + ld c, $0 + ld de, HTTPDownloadURL +.asm_110eaa + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110ecb + inc hl + dec b + jr nz, .asm_110eaa + +.asm_110eb3 + ld hl, $c97f + ld a, [hli] + ld h, [hl] + ld l, a + ld c, $12 + call Function11039a + jp c, .asm_110df9 + ld c, $12 + call Function11039a + jp c, .asm_110df9 + ld c, $1 + +.asm_110ecb + ld a, c + ld [$c98f], a + ld [$cabc], a + pop hl + call Function1111d7 + ld a, b + cp $4 + jr c, .asm_110ee3 + jp nz, .asm_110dfa + xor a + or c + jp nz, .asm_110dfa + +.asm_110ee3 + ld hl, $c98b + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + pop bc + pop de + pop hl + ld a, l + ld [$c876], a + ld a, h + ld [$c877], a + ld hl, $c872 + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc hl + inc hl + xor a + ld [$c994], a + +Function110f07: ; 110f07 + ld hl, $c833 + ld a, [hli] + ld h, [hl] + ld l, a + or h + jr z, .asm_110f12 + xor a + ld [hl], a + +.asm_110f12 + ld hl, $c991 + xor a + ld [hli], a + ld [hl], a + ld hl, $c866 + ld a, [hli] + or [hl] + inc hl + or [hl] + inc hl + or [hl] + jr nz, .asm_110f28 + ld a, $2 + jp Function110615 + +.asm_110f28 + ld a, $2 + ld [$c86e], a + ld a, $1f + ld [$cb51], a + ld a, $90 + ld [$cb52], a + ld a, $1 + ld [$c86b], a + ld de, $cb47 + ld hl, Unknown_11207d + ld b, $6 + call Function110000 + ld hl, $c866 + ld b, $4 + call Function110000 + inc de + inc de + ld b, $6 + call Function111f63 + ld a, [$cabc] + or a + jr z, .asm_110f95 + ld hl, $c995 + ld a, [hli] + cp $99 + jr nz, .asm_110f8a + ld a, [hli] + cp $66 + jr nz, .asm_110f8a + ld a, [hli] + cp $23 + jr nz, .asm_110f8a + ld a, $2 + ld [$c86e], a + dec a + ld [$c86b], a + ld a, $a3 + ld de, $0010 + ld hl, $c995 + call Function111f02 + ld a, $f + ld [$c86a], a + jp Function110432 + +.asm_110f8a + ld hl, $cb47 + ld de, $c995 + ld b, $10 + call Function110000 + +.asm_110f95 + ld de, $0010 + ld hl, $cb47 + ld a, $a3 + ld [$c81e], a + ld b, $5 + call Function111f07 + ld a, $f + ld [$c86a], a + jp Function110432 +; 110fad URIPrefix: ; 0x110fad ascii "http://" +URIPrefixEnd + HTTPDownloadURL: ; 0x110fb4 ascii "gameboy.datacenter.ne.jp/cgb/download" +HTTPDownloadURLEnd + HTTPUploadURL: ; 0x110fd9 ascii "gameboy.datacenter.ne.jp/cgb/upload" +HTTPUploadURLEnd + HTTPUtilityURL: ; 0x110ffc ascii "gameboy.datacenter.ne.jp/cgb/utility" +HTTPUtilityURLEnd + HTTPRankingURL: ; 0x111020 ascii "gameboy.datacenter.ne.jp/cgb/ranking" +HTTPRankingURLEnd -INCBIN "baserom.gbc", $111044, $11164f - $111044 +Function111044: ; 111044 + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld e, [hl] + ld a, b + or c + ld [$c86e], a + ld [$c86f], a + dec bc + dec bc + jp z, Function1111ca + ld a, [$c991] + or a + call nz, Function11115f + xor a + cp e + jp z, .asm_1110eb + xor a + cp b + jr nz, .asm_1110ac + ld a, e + cp c + jr c, .asm_1110ac + push bc + sub c + ld [hl], a + ld b, c + ld hl, $c82d + ld a, c + ld [hli], a + xor a + ld [hl], a + ld hl, $ca3f + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, $0 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + pop bc + ld a, [$c991] + ld l, a + ld h, $0 + add hl, bc + ld c, l + ld b, h + xor a + ld [$c991], a + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + ld [hl], b + ret + +.asm_1110ac + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, c + ld [hli], a + ld [hl], b + ld hl, $c82d + ld a, [$c991] + add e + ld [hli], a + ld a, $0 + adc $0 + ld [hl], a + xor a + ld [$c991], a + ld a, [$c86e] + or a + jr z, .asm_1110eb + ld b, e + ld hl, $ca3f + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, $0 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + +.asm_1110eb + di + ld a, $2 + ld [$c989], a + ld hl, $c821 + res 2, [hl] + ld a, [$ca3c] + cp $9f + jr z, .asm_111144 + ld de, $000b + ld a, $95 + ld [$c81e], a + ld hl, $cb47 + ld b, $5 + call Function111f07 + ld a, $1 + ld [$c86b], a + ret + + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$c82d] + ld [hli], a + ld a, [$c82e] + ld [hl], a + ld hl, $c98f + inc [hl] + ld a, $f + ld [$c86a], a + ld a, $1 + ld [$c86b], a + ld a, [$c86d] + ld [$c86e], a + xor a + ld [$c989], a + ld a, $a3 + ld de, $0010 + ld hl, $c995 + jp Function111f02 + +.asm_111144 + res 0, [hl] + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$c82d] + ld [hli], a + ld a, [$c82e] + ld [hl], a + ld a, $2 + ld [$c86a], a + xor a + ld [$c86d], a + ei + ret +; 11115f + +Function11115f: ; 11115f + ld e, a + xor a + cp b + jr nz, .asm_111168 + ld a, c + cp e + jr c, .asm_1111a2 + +.asm_111168 + push hl + push bc + ld b, e + ld c, e + ld a, [$c993] + sub e + ld e, a + ld d, $0 + ld hl, $c880 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + call Function110000 + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld e, c + ld a, c + ld hl, $c82d + ld [hli], a + xor a + ld [hl], a + pop bc + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, [$c992] + ld [$c82b], a + ld e, a + pop hl + ret + +.asm_1111a2 + ld a, e + sub c + ld [$c991], a + ld a, [$c993] + sub e + ld e, a + ld d, $0 + ld hl, $c880 + add hl, de + ld a, [$c829] + ld e, a + ld a, [$c82a] + ld d, a + ld b, c + call Function110000 + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + pop af + ret +; 1111ca + +Function1111ca: ; 1111ca + ld hl, $c821 + res 2, [hl] + ld a, $6 + ld [$c86b], a + jp Function112430 +; 1111d7 + +Function1111d7: ; 1111d7 + push hl + ld hl, $c866 + ld a, [hli] + or [hl] + inc hl + or [hl] + inc hl + or [hl] + pop hl + jr nz, .asm_1111ee + ld de, $0007 + add hl, de +.asm_1111e8 + ld a, [hli] + cp $2f + jr nz, .asm_1111e8 + dec hl + +.asm_1111ee + ld bc, rIE +.asm_1111f1 + ld a, [hli] + inc bc + or a + jr nz, .asm_1111f1 + ld hl, $c87a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ret +; 1111fe + +Function1111fe: ; 1111fe + ld a, [$c821] + bit 2, a + ld a, [$c86a] + jp nz, Function1113ea + cp $2 + jp nz, Function110226 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + ld a, [$c86d] + or a + jp nz, Function110226 + xor a + ld [$c989], a + ld [$c98a], a + ld [$c993], a + push hl + push de + push bc + push hl + inc hl + inc hl + inc hl + inc hl + ld a, [hli] + ld [$c833], a + ld a, [hli] + ld [$c834], a + inc hl + inc hl + ld a, l + ld [$c97f], a + ld a, h + ld [$c980], a + dec hl + dec hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, $80 + cp l + jr nz, .asm_111251 + ld a, $c8 + cp h + jp z, Function1113f7 + +.asm_111251 + ld b, URIPrefixEnd - URIPrefix + ld de, URIPrefix +.asm_111256 + ld a, [de] + inc de + cp [hl] + jp nz, Function1113f7 + inc hl + dec b + jr nz, .asm_111256 + push hl + ld b, HTTPDownloadURLEnd - HTTPDownloadURL + ld c, $0 + ld de, HTTPDownloadURL +.asm_111268 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_111275 + inc hl + dec b + jr nz, .asm_111268 + pop hl + jp Function1113f7 + +.asm_111275 + pop hl + push hl + ld b, HTTPRankingURLEnd - HTTPRankingURL + ld c, $0 + ld de, HTTPRankingURL +.asm_11127e + ld a, [de] + inc de + cp [hl] + jr nz, .asm_11128f + inc hl + dec b + jr nz, .asm_11127e + ld a, $2 + ld [$c98a], a + pop hl + jr .asm_1112a0 + +.asm_11128f + pop hl + ld b, HTTPUploadURLEnd - HTTPUploadURL + ld c, $0 + ld de, HTTPUploadURL +.asm_111297 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_1112cc + inc hl + dec b + jr nz, .asm_111297 + +.asm_1112a0 + ld a, [hli] + or a + jr nz, .asm_1112a0 +.asm_1112a4 + ld a, [hld] + cp $2f + jr nz, .asm_1112a4 + inc hl + inc hl + ld a, [hl] + cp $30 + jr c, .asm_1112cc + cp $3a + jr nc, .asm_1112cc + ld hl, $c97f + ld a, [hli] + ld h, [hl] + ld l, a + ld c, $12 + call Function11039a + jp c, Function1113f7 + ld c, $12 + call Function11039a + jp c, Function1113f7 + ld c, $1 + +.asm_1112cc + ld a, c + ld [$c98f], a + ld [$cabc], a + pop hl + ld de, $0006 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call Function1111d7 + ld a, b + cp $4 + jr c, .asm_1112eb + jp nz, Function1113f8 + xor a + or c + jp nz, Function1113f8 + +.asm_1112eb + pop bc + pop de + pop hl + ld a, l + ld [$c876], a + ld a, h + ld [$c877], a + ld hl, $c872 + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc hl + inc hl + ld a, e + ld [hli], a + ld a, d + ld [hl], a + call Function111335 + ld hl, $c876 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] + ld [$c9aa], a + ld a, [hli] + ld [$c9ab], a + ld a, [hli] + ld [$c9ac], a + ld a, [hli] + ld [$c9ad], a + inc hl + inc hl + ld a, [hli] + ld [$c876], a + ld a, [hl] + ld [$c877], a + ld a, [$c98f] + xor $1 + ld [$c994], a + jp Function110f07 +; 111335 + +Function111335: ; 111335 + ld hl, $c876 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + xor a + ld [$c8c9], a +.asm_111344 + ld de, $8ad0 + add hl, de + jr nc, .asm_11134e + add $3 + jr .asm_111344 + +.asm_11134e + ld de, $7530 + add hl, de +.asm_111352 + ld de, $d8f0 + add hl, de + jr nc, .asm_11135b + inc a + jr .asm_111352 + +.asm_11135b + ld de, $2710 + add hl, de + ld [$c8c6], a + xor a +.asm_111363 + ld de, $f448 + add hl, de + jr nc, .asm_11136d + add $30 + jr .asm_111363 + +.asm_11136d + ld de, $0bb8 + add hl, de +.asm_111371 + ld de, $fc18 + add hl, de + jr nc, .asm_11137b + add $10 + jr .asm_111371 + +.asm_11137b + ld de, $03e8 + add hl, de +.asm_11137f + ld de, $fed4 + add hl, de + jr nc, .asm_111389 + add $3 + jr .asm_11137f + +.asm_111389 + ld de, $012c + add hl, de +.asm_11138d + ld de, $ff9c + add hl, de + jr nc, .asm_111396 + inc a + jr .asm_11138d + +.asm_111396 + ld de, $0064 + add hl, de + ld [$c8c7], a + xor a +.asm_11139e + ld de, $ffe2 + add hl, de + jr nc, .asm_1113a8 + add $30 + jr .asm_11139e + +.asm_1113a8 + ld de, $001e + add hl, de +.asm_1113ac + ld de, $fff6 + add hl, de + jr nc, .asm_1113b6 + add $10 + jr .asm_1113ac + +.asm_1113b6 + ld de, $000a + add hl, de + add l + ld [$c8c8], a + ld de, $c9a5 + ld hl, $c8c6 + ld a, [hli] + or $30 + ld [de], a + inc de + ld a, [hl] + swap a + and $f + or $30 + ld [de], a + inc de + ld a, [hli] + and $f + or $30 + ld [de], a + inc de + ld a, [hl] + swap a + and $f + or $30 + ld [de], a + inc de + ld a, [hl] + and $f + or $30 + ld [de], a + inc de + ret +; 1113ea + +Function1113ea: ; 1113ea + cp $14 + jp z, Function111044 + cp $24 + jp z, Function111044 + jp Function110226 +; 1113f7 + +Function1113f7: ; 1113f7 + pop hl + +Function1113f8: ; 1113f8 + pop hl + pop hl + pop hl + jp Function110231 +; 1113fe + +Function1113fe: ; 1113fe + ld a, [$c822] + bit 4, a + jp z, .asm_11147f + bit 7, a + jp nz, .asm_11147f + ld a, [$c821] + bit 0, a + jp nz, .asm_11147f +.asm_111413 + ld a, [$c800] + or a + jr nz, .asm_111413 + di + ld a, [$c821] + bit 3, a + jp nz, .asm_11147b + ld a, [$c807] + or a + jr nz, .asm_111436 + ld hl, $c821 + set 1, [hl] + ld a, $23 + ld [$c80f], a + ld a, $ff + ei + ret + +.asm_111436 + xor a + ld [$c86b], a + push hl + ld hl, $c829 + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + pop hl + ld a, [hli] + or a + jr z, .asm_111485 + cp $81 + jr nc, .asm_111485 + ld c, a + inc a + inc a + ld [de], a + inc de + ld a, $ff + ld [de], a + inc de + ld a, c + ld [de], a + inc de + ld b, c + call Function110000 + ld b, c + inc b + inc b + call Function111f63 + ld hl, $c822 + set 7, [hl] + ld hl, $c821 + set 0, [hl] + ld a, $0 + ei + ret + +.asm_11147b + ei + ld a, $1 + ret + +.asm_11147f + call Function110226 + ld a, $ff + ret + +.asm_111485 + ei + call Function110231 + ld a, $ff + ret +; 11148c + +Function11148c: ; 11148c + ld a, [$c822] + bit 4, a + jp z, Function110226 + ld a, [$c821] + bit 0, a + jp nz, Function110226 + bit 3, a + jp z, Function110226 + ld e, l + ld d, h + ld a, [$c992] + or a + jr nz, .asm_111507 + ld a, [$c993] + ld c, a + ld b, $0 + ld hl, $ca40 + add hl, bc + ld a, [hli] + or a + jr z, .asm_1114bb + cp $81 + jr c, .asm_1114bd + +.asm_1114bb + ld a, $80 + +.asm_1114bd + ld b, a + inc c + add c + ld [$c993], a + ld a, [$c994] + dec a + sub b + ld c, a + ld [$c994], a + ld a, b + ld [de], a + inc de + call Function110000 +.asm_1114d2 + xor a + or c + jr nz, .asm_1114dc + ld hl, $c821 + res 3, [hl] + ret + +.asm_1114dc + ld a, [hli] + or a + jr z, .asm_1114e4 + cp $81 + jr c, .asm_1114e6 + +.asm_1114e4 + ld a, $80 + +.asm_1114e6 + cp c + ret c + ld [$c991], a + dec c + ld a, c + or a + jr z, .asm_111500 + ld [$c992], a + ld b, a + ld de, $c880 + call Function110000 +.asm_1114fa + ld hl, $c821 + res 3, [hl] + ret + +.asm_111500 + ld a, $ff + ld [$c992], a + jr .asm_1114fa + +.asm_111507 + cp $ff + jr nz, .asm_11150c + xor a + +.asm_11150c + ld b, a + ld a, [$c991] + sub b + ld c, a + ld hl, $c880 + ld a, [$c991] + ld [de], a + inc de + ld a, b + or a + jr z, .asm_111521 + call Function110000 + +.asm_111521 + ld hl, $ca41 + ld b, c + call Function110000 + push hl + ld a, c + inc a + ld [$c993], a + ld b, a + ld a, [$ca3f] + sub b + ld [$c994], a + ld c, a + xor a + ld hl, $c991 + ld [hli], a + ld [hl], a + pop hl + jr .asm_1114d2 +; 111540 + +Function111540: ; 111540 + nop + +Function111541: ; 111541 + ld hl, $c821 + bit 0, [hl] + jp nz, Function110226 + ld a, [$c86a] + cp $5 + jp nc, Function110226 + ld [$c985], a + ld a, e + ld [$c86e], a + ld a, d + ld [$c86f], a + ld a, [$c807] + cp $2 + jr c, .asm_111582 + xor a + ld [$c86b], a + ld a, $97 + ld hl, Unknown_11202d + call Function111eff +.asm_11156f + ld a, [$c988] + cp $40 + jr nz, .asm_11157a + ld a, $2c + jr .asm_11157c + +.asm_11157a + ld a, $1e + +.asm_11157c + ld [$c86a], a + jp Function110432 + +.asm_111582 + xor a + ld [rTAC], a + ld a, [$c870] + ld c, a + call Function1100dc + call Function1104b0 + ld a, $1 + ld [$c86b], a + jr .asm_11156f +; 111596 + +Function111596: ; 111596 + ld hl, $c86a + ld a, [hl] + cp $1 + jp z, Function110226 + cp $2a + jp z, Function110226 + ld a, [$c800] + bit 1, a + jr nz, .asm_1115af + ld a, $2a + jr Function1115e4 + +.asm_1115af + ld a, [$c81e] + cp $92 + jr nz, .asm_1115dd + ld a, $2a + ld b, $0 + di + ld [hli], a + ld [hl], b + ld hl, $c822 + res 5, [hl] + res 0, [hl] + xor a + ld [$c80b], a + ld [$c800], a + ld a, $8 + ld [$c807], a + call Function110029 + call Function11164f + ld hl, $c821 + set 0, [hl] + ei + ret + +.asm_1115dd + ld a, $2a + ld [hli], a + ld a, $1 + ld [hl], a + ret +; 1115e4 + +Function1115e4: ; 1115e4 + di + push af + ld hl, $c821 + set 0, [hl] + ld a, $1 + ld [$c86b], a + ld a, [$c86d] + or a + ld a, [$ca3c] + jr z, .asm_111609 + cp $9f + jr z, .asm_11160d + cp $a4 + jr z, .asm_11160d +.asm_111601 + call Function112430 +.asm_111604 + pop af + ld [$c86a], a + ret + +.asm_111609 + cp $a3 + jr z, .asm_111601 + +.asm_11160d + ei + jr .asm_111604 +; 111610 + +Function111610: ; 111610 + ld hl, $c86a + ld a, [hl] + dec a + jp z, Function110226 + dec a + jp z, Function110226 + ld a, [$c800] + or a + jr nz, .asm_111626 + ld a, $28 + jr Function1115e4 + +.asm_111626 + ld a, $28 + ld b, $2 + ld [hli], a + ld [hl], b + ret +; 11162d + +Function11162d: ; 11162d + ld a, [$c86a] + cp $1 + jp nz, Function110226 + xor a + ld hl, $cb47 + ld [hli], a + ld [hl], a + call Function111686 + call Function110029 + ld bc, $0452 + ld hl, $c800 +.asm_111647 + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .asm_111647 + ret +; 11164f ; known jump sources: 111aab (44:5aab) Function11164f: ; 11164f (44:564f) @@ -185,11 +3472,36 @@ Function111686: ; 111686 (44:5686) ret ; 1116a0 (44:56a0) -INCBIN "baserom.gbc",$1116a0,$1116c5 - $1116a0 +Function1116a0: ; 1116a0 + ld a, $1 + jr Function1116a9 + +Function1116a4: ; 1116a4 + set 1, [hl] + ld a, [$c86a] + +Function1116a9: ; 1116a9 + ld [$cb48], a + ld hl, $c815 + xor a + ld [hli], a + ld a, [$c81f] + rla + ld [hl], a + ld hl, $c821 + ld a, [hl] + ld b, a + and $d + ld [hl], a + ld a, $2 + and b + ld [$cb47], a + ret +; 1116c5 ; known jump sources: 3e89 (0:3e89) Function1116c5:: ; 1116c5 (44:56c5) - ld a, [OverworldMap] ; $c800 + ld a, [$c800] rrca jp nc, Function1118bc rrca @@ -252,7 +3564,7 @@ Function1116c5:: ; 1116c5 (44:56c5) xor a ld [$c819], a ld a, $3 - ld [OverworldMap], a ; $c800 + ld [$c800], a xor a ld hl, $c80a ld [hli], a @@ -293,7 +3605,7 @@ Function1116c5:: ; 1116c5 (44:56c5) jp Function1118bc .asm_111778 xor a - ld [OverworldMap], a ; $c800 + ld [$c800], a ; known jump sources: 111861 (44:5861) Function11177c: ; 11177c (44:577c) @@ -338,7 +3650,7 @@ asm_1117a2: ; 1117a2 (44:57a2) ld a, [$c81f] ld [hl], a xor a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld hl, $c819 inc [hl] ld a, b @@ -347,7 +3659,7 @@ asm_1117a2: ; 1117a2 (44:57a2) xor a ld hl, $c806 ld [hli], a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld a, $6 ld [hl], a ld hl, $c821 @@ -408,7 +3720,7 @@ Function1117e7: ; 1117e7 (44:57e7) ld a, $10 ld [$c80f], a xor a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld hl, $c822 res 0, [hl] ld hl, $c821 @@ -555,7 +3867,7 @@ Function1118de:: ; 1118de (44:58de) ld a, $10 ld [$c80f], a xor a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld hl, $c822 res 0, [hl] ld hl, $c821 @@ -567,7 +3879,7 @@ Function1118de:: ; 1118de (44:58de) ld [$c80f], a jp Function111b3b .asm_111927 - ld a, [OverworldMap] ; $c800 + ld a, [$c800] cp $1 jp z, Function111b21 cp $3 @@ -635,7 +3947,7 @@ Function1118de:: ; 1118de (44:58de) bit 3, a jr nz, .asm_111977 ld de, $b - ld hl, $6072 + ld hl, Unknown_112072 ld a, $95 call Function111f02 jp Function111b3b @@ -670,7 +3982,7 @@ Function1119f0: ; 1119f0 (44:59f0) ld [$c808], a ld b, $5 ld de, $12 - ld hl, $6001 + ld hl, Unknown_112001 call Function111f07 ld a, $1 ld [$c806], a @@ -764,7 +4076,7 @@ asm_111a47: ; 111a47 (44:5a47) ld [$c806], a ld [$c86b], a ld [$c80b], a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld a, $8 ld [$c807], a .asm_111aa8 @@ -797,7 +4109,7 @@ Function111abd: ; 111abd (44:5abd) jr z, .asm_111afe call Function110029 ld a, $3 - ld [OverworldMap], a ; $c800 + ld [$c800], a xor a ld hl, $c80a ld [hli], a @@ -822,7 +4134,7 @@ Function111abd: ; 111abd (44:5abd) ld hl, $c806 xor a ld [hli], a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld a, $6 ld [hl], a ld hl, $c821 @@ -871,7 +4183,7 @@ Function111b3c: ; 111b3c (44:5b3c) ld hl, $c9b1 ld [hli], a ld [hl], a - ld [OverworldMap], a ; $c800 + ld [$c800], a ld hl, $c822 res 5, [hl] bit 0, [hl] @@ -886,7 +4198,7 @@ Function111b3c: ; 111b3c (44:5b3c) ld a, $95 .asm_111b62 ld b, a - ld hl, $5e28 + ld hl, Function111e28 push hl cp $ee jp z, Function111e2b @@ -924,7 +4236,7 @@ Function111b3c: ; 111b3c (44:5b3c) ld a, $a ld [$c807], a xor a - ld [OverworldMap], a ; $c800 + ld [$c800], a ret .asm_111bbe ld a, [$ca40] @@ -1158,7 +4470,7 @@ Function111d23: ; 111d23 (44:5d23) ; known jump sources: 111ba2 (44:5ba2) Function111d39: ; 111d39 (44:5d39) ld de, $ca3f - ld hl, $6006 + ld hl, Unknown_112006 ld b, $9 .asm_111d41 ld a, [de] @@ -1309,7 +4621,9 @@ Function111e15: ; 111e15 (44:5e15) ret ; 111e28 (44:5e28) -INCBIN "baserom.gbc",$111e28,$111e2b - $111e28 +Function111e28: ; 111e28 + jp Function110029 +; 111e2b ; known jump sources: 111b69 (44:5b69) Function111e2b: ; 111e2b (44:5e2b) @@ -1434,7 +4748,8 @@ Function111ef8: ; 111ef8 (44:5ef8) ret ; 111eff (44:5eff) -INCBIN "baserom.gbc",$111eff,$111f02 - $111eff +Function111eff: ; 111eff + ld de, $000a ; known jump sources: 1119b8 (44:59b8) Function111f02: ; 111f02 (44:5f02) @@ -1445,7 +4760,7 @@ Function111f02: ; 111f02 (44:5f02) Function111f07: ; 111f07 (44:5f07) call Function1100b4 ret c - ld a, [OverworldMap] ; $c800 + ld a, [$c800] cp $0 jr z, .asm_111f17 call Function110226 @@ -1487,14 +4802,60 @@ Function111f07: ; 111f07 (44:5f07) xor a ld [$c806], a ld a, $1 - ld [OverworldMap], a ; $c800 + ld [$c800], a ld hl, $c822 set 5, [hl] ei ret ; 111f63 (44:5f63) -INCBIN "baserom.gbc",$111f63,$111f97 - $111f63 +Function111f63: ; 111f63 + push de + ld hl, $0000 + ld c, b + xor a + cp b + jr z, .asm_111f71 +.asm_111f6c + call Function111f8d + jr nz, .asm_111f6c + +.asm_111f71 + ld b, $4 +.asm_111f73 + call Function111f8d + jr nz, .asm_111f73 + ld e, l + ld d, h + ld hl, $000a + add hl, bc + ld c, l + ld b, h + pop hl + ld a, d + ld [hli], a + ld a, e + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hl], a + ld e, c + ld d, b + ret +; 111f8d + +Function111f8d: ; 111f8d + dec de + ld a, [de] + add l + ld l, a + ld a, $0 + adc h + ld h, a + dec b + ret +; 111f97 ; known jump sources: 111977 (44:5977) Function111f97: ; 111f97 (44:5f97) @@ -1534,19 +4895,111 @@ Function111f97: ; 111f97 (44:5f97) jr z, .asm_111fe9 ld a, $97 ld [hl], a - ld hl, $602d + ld hl, Unknown_11202d ld de, $a call Function111f07 ld hl, $c822 set 0, [hl] ret .asm_111fe9 - ld hl, $6001 + ld hl, Unknown_112001 ld de, $12 jp Function111f07 ; 111ff2 (44:5ff2) -INCBIN "baserom.gbc",$111ff2,$11214e - $111ff2 + ds 14 + +Unknown_112000: ; 112000 +INCBIN "baserom.gbc", $112000, $112001 - $112000 + +Unknown_112001: ; 112001 +INCBIN "baserom.gbc", $112001, $112006 - $112001 + +Unknown_112006: ; 112006 +INCBIN "baserom.gbc", $112006, $112013 - $112006 + +Unknown_112013: ; 112013 +INCBIN "baserom.gbc", $112013, $11201d - $112013 + +Unknown_11201d: ; 11201d +INCBIN "baserom.gbc", $11201d, $112023 - $11201d + +Unknown_112023: ; 112023 +INCBIN "baserom.gbc", $112023, $11202d - $112023 + +Unknown_11202d: ; 11202d +INCBIN "baserom.gbc", $11202d, $112037 - $11202d + +Unknown_112037: ; 112037 +INCBIN "baserom.gbc", $112037, $11203c - $112037 + +Unknown_11203c: ; 11203c +INCBIN "baserom.gbc", $11203c, $112046 - $11203c + +Unknown_112046: ; 112046 +INCBIN "baserom.gbc", $112046, $112052 - $112046 + +Unknown_112052: ; 112052 +INCBIN "baserom.gbc", $112052, $11205e - $112052 + +Unknown_11205e: ; 11205e +INCBIN "baserom.gbc", $11205e, $112063 - $11205e + +Unknown_112063: ; 112063 +INCBIN "baserom.gbc", $112063, $112068 - $112063 + +Unknown_112068: ; 112068 +INCBIN "baserom.gbc", $112068, $112072 - $112068 + +Unknown_112072: ; 112072 +INCBIN "baserom.gbc", $112072, $11207d - $112072 + +Unknown_11207d: ; 11207d +INCBIN "baserom.gbc", $11207d, $112083 - $11207d + +Unknown_112083: ; 112083 +INCBIN "baserom.gbc", $112083, $112089 - $112083 + +Unknown_112089: ; 112089 +INCBIN "baserom.gbc", $112089, $11209e - $112089 + +Unknown_11209e: + ascii "HELO ", $0 +Unknown_1120a4: + ascii "MAIL FROM:<", $0 +Unknown_1120b0: + ascii "RCPT TO:<", $0 +Unknown_1120ba: + ascii "DATA", $d, "\n", $0 +Unknown_1120c1: + ascii "QUIT", $d, "\n", $0 +Unknown_1120c8: + ascii "USER ", $0 +Unknown_1120ce: + ascii "PASS ", $0 +Unknown_1120d4: + ascii "STAT", $d, "\n", $0 +Unknown_1120db: + ascii "LIST 00000", $d, "\n", $0 +Unknown_1120e8: + ascii "RETR 00000", $d, "\n", $0 +Unknown_1120f5: + ascii "DELE 00000", $d, "\n", $0 +Unknown_112102: + ascii "TOP 00000 0", $d, "\n", $0 +Unknown_112110: + ascii "GET ", $0 +Unknown_112115: + ascii " HTTP/1.0", $d, "\n", $0 +Unknown_112121: + ascii "User-Agent: CGB-", $0 +Unknown_112132: + ascii $d, "\n", $d, "\n", $0 +Unknown_112137: + ascii "POST ", $0 +Unknown_11213d: + ascii "Content-Length: ", $0 +; 11214e ; known jump sources: 1118e6 (44:58e6) Function11214e: ; 11214e (44:614e) @@ -1574,7 +5027,7 @@ Function11214e: ; 11214e (44:614e) .asm_112175 ld b, $0 sla c - ld hl, $6198 + ld hl, Jumptable_1121ac - 2 * $a add hl, bc ld a, [hli] ld h, [hl] @@ -1605,5 +5058,4576 @@ Function11214e: ; 11214e (44:614e) jr .asm_112175 ; 1121ac (44:61ac) -INCBIN "baserom.gbc",$1121ac,$113f84 - $1121ac +Jumptable_1121ac: ; 1121ac + dw Function1121f6 + dw Function112271 + dw Function112373 + dw Function1123b6 + dw Function1123e1 + dw Function112451 + dw Function112715 + dw Function11273a + dw Function11299c + dw Function112d33 + dw Function112d33 + dw Function112840 + dw Function1128db + dw Function112969 + dw Function112a56 + dw Function112b71 + dw Function112bec + dw Function112bbb + dw Function112bec + dw Function112b71 + dw Function1134cb + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function113519 + dw Function113519 + dw Function113519 + dw Function113e42 + dw Function113ef2 + dw Function113f2d + dw Function1121f6 + dw Function1134cb + dw Function113672 + dw Function113626 +; 1121f6 + +Function1121f6: ; 1121f6 + dec a + jr z, .asm_1121fe + dec a + jr z, .asm_112210 + dec [hl] + ret + +.asm_1121fe + ld a, [$c818] + or a + jr z, .asm_112206 + jr Function112269 + +.asm_112206 + ld a, $10 + call Function11225d + res 0, [hl] + set 1, [hl] + ret + +.asm_112210 + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$c818] + cp $88 + jr c, .asm_112249 + sub $88 + ld [hl], a + cp $4 + jr c, .asm_112226 + ld a, $3 + +.asm_112226 + cp $3 + jr nz, .asm_11222b + dec a + +.asm_11222b + ld b, a + ld a, $4 + sub b + ld d, a + rlca + add d + ld c, a + xor a + cp b + jr z, .asm_11223a + ld a, $3 + xor b + +.asm_11223a + ld hl, $c871 + ld [hld], a + ld [hl], c + ld a, [$c86a] + cp $a + jr nz, Function112251 + jp Function1116a0 + +.asm_112249 + ld a, $10 + call Function11225d + jp Function1116a4 + +Function112251: ; 112251 + xor a + ld [$c821], a + ld [$c807], a + inc a + ld [$c86a], a + ret +; 11225d + +Function11225d: ; 11225d + ld [$c80f], a + ld a, $5 + ld [$c86a], a + ld hl, $c821 + ret +; 112269 + +Function112269: ; 112269 + ld a, $91 + ld hl, Unknown_112013 + jp Function111eff +; 112271 + +Function112271: ; 112271 + dec a + jr z, .asm_11228c + dec a + jr z, .asm_112292 + dec a + jr z, .asm_1122a1 + dec a + jp z, .asm_112309 + dec a + jp z, .asm_112326 + dec a + jp z, .asm_112335 + dec a + jp z, .asm_112342 + dec [hl] + ret + +.asm_11228c + ld hl, Unknown_112046 + jp Function11236b + +.asm_112292 + ld hl, $c829 + ld a, $e0 + ld [hli], a + ld a, $c8 + ld [hli], a + ld hl, Unknown_112052 + jp Function11236b + +.asm_1122a1 + ld hl, $c880 + ld a, [hli] + cp $4d + jr nz, .asm_1122f5 + ld a, [hld] + cp $41 + jr nz, .asm_1122f5 + ld b, $be + ld de, $0000 +.asm_1122b3 + ld a, [hli] + add e + ld e, a + ld a, $0 + adc d + ld d, a + dec b + jr nz, .asm_1122b3 + ld a, [hli] + cp d + jr nz, .asm_1122fc + ld a, [hl] + cp e + jr nz, .asm_1122fc + ld hl, $c884 + ld de, $c836 + ld b, $8 + call Function110000 + ld hl, $c8ca + ld b, $2c + call Function110000 + ld a, [$cb79] + ld c, a + sub $8 + ld e, a + ld d, $0 + ld hl, $cb7a + add hl, de + ld e, l + ld d, h + ld hl, $c836 + ld b, $8 + call Function110000 + ld b, c + call Function111f63 + jr Function11235a + +.asm_1122f5 + ld a, $25 + ld [$c872], a + jr .asm_112301 + +.asm_1122fc + ld a, $14 + ld [$c872], a + +.asm_112301 + ld a, $6 + ld [$c86b], a + jp Function112269 + +.asm_112309 + ld a, [$c821] + and $e0 + jr nz, .asm_112314 + ld b, $92 + jr Function11234b + +.asm_112314 + cp $e0 + ld a, $11 + jr z, .asm_11231b + inc a + +.asm_11231b + ld [$c872], a + ld a, $6 + ld [$c86b], a + jp Function112269 + +.asm_112326 + ld d, a + ld a, [$cb79] + add $a + ld e, a + ld hl, $cb74 + ld a, $a1 + jp Function111f02 + +.asm_112335 + ld a, $2 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + set 5, [hl] + ret + +.asm_112342 + ld a, [$c872] + call Function11225d + jp Function1116a4 + +Function11234b: ; 11234b + ld a, [$cb4c] + add $a + ld e, a + ld d, $0 + ld hl, $cb47 + ld a, b + jp Function111f02 + +Function11235a: ; 11235a + ld hl, $c86e + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hl], a + ld a, $97 + ld hl, Unknown_11202d + jp Function111eff +; 11236b + +Function11236b: ; 11236b + ld a, $99 + ld de, $000c + jp Function111f02 +; 112373 + +Function112373: ; 112373 + dec a + jr z, Function11235a + dec a + jr z, .asm_112381 + dec a + jr z, .asm_11239b + dec a + jr z, .asm_1123ad + dec [hl] + ret + +.asm_112381 + ld a, [$c821] + and $e0 + jr nz, .asm_11238c + ld b, $92 + jr Function11234b + +.asm_11238c + cp $e0 + ld a, $11 + jr z, .asm_112393 + inc a + +.asm_112393 + ld a, $3 + ld [$c86b], a + jp Function112269 + +.asm_11239b + ld hl, $c822 + set 4, [hl] + ld a, $2 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + set 6, [hl] + ret + +.asm_1123ad + ld a, [$c872] + call Function11225d + jp Function1116a4 +; 1123b6 + +Function1123b6: ; 1123b6 + dec a + jr z, .asm_1123be + dec a + jr z, .asm_1123c6 + ret + +.asm_1123bd + dec [hl] + +.asm_1123be + ld a, $94 + ld hl, Unknown_112068 + jp Function111eff + +.asm_1123c6 + ld a, [$ca3c] + cp $ee + jr z, .asm_1123bd + ld hl, $c822 + set 4, [hl] + ld a, $2 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + set 6, [hl] + set 5, [hl] + ret +; 1123e1 + +Function1123e1: ; 1123e1 + dec a + jr z, .asm_1123f2 + dec a + jr z, .asm_11240a + dec a + jr z, .asm_112416 + dec a + jr z, .asm_11241e + dec a + jr z, .asm_112421 + dec [hl] + ret + +.asm_1123f2 + ld a, [$ca3c] + cp $9f + jr z, .asm_112408 + call Function1127e1 + jr z, .asm_112408 + ld hl, $c86b + dec [hl] + ld hl, $cb67 + jp Function1127c5 + +.asm_112408 + jr Function112430 + +.asm_11240a + xor a + ld [$c86d], a + ld a, $a2 + ld hl, Unknown_11203c + jp Function111eff + +.asm_112416 + ld a, $93 + ld hl, Unknown_112023 + jp Function111eff + +.asm_11241e + jp Function112269 + +.asm_112421 + ld hl, $c822 + res 4, [hl] + ld hl, $c821 + ld a, [hl] + and $f + ld [hl], a + jp Function1116a0 + +Function112430: ; 112430 + ld a, $3 + ld [$c807], a + ld de, $cb47 + ld hl, Unknown_112083 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + inc b + call Function111f63 + ld a, $a4 + ld hl, $cb47 + jp Function111f02 +; 112451 + +Function112451: ; 112451 + dec a + jr z, .asm_112458 + dec a + jr z, .asm_112496 + ret + +.asm_112458 + ld b, $6 + ld de, $cba3 + call Function111f63 + ld a, [$c86e] + inc a + cp $3 + jr nz, .asm_11248b + ld a, [$cabc] + or a + jr z, .asm_11248b + ld hl, $c995 + ld a, [hli] + cp $99 + jr nz, .asm_112480 + ld a, [hli] + cp $66 + jr nz, .asm_112480 + ld a, [hli] + cp $23 + jr z, .asm_11248b + +.asm_112480 + ld hl, $cb97 + ld de, $c995 + ld b, $10 + call Function110000 + +.asm_11248b + ld a, $a3 + ld de, $0010 + ld hl, $cb97 + jp Function111f02 + +.asm_112496 + ld a, [$ca3c] + cp $a3 + jr z, .asm_1124ce + ld a, [$c822] + bit 3, a + jr z, .asm_1124ab + dec [hl] + ld a, $3 + ld [$c807], a + ret + +.asm_1124ab + ld a, [$c9af] + cp $5 + jr c, .asm_1124b8 + ld hl, $c821 + set 1, [hl] + ret + +.asm_1124b8 + dec [hl] + ld hl, $c9af + inc [hl] + ld hl, $c822 + set 3, [hl] + ld hl, $c815 + ld a, [$c820] + ld [hli], a + ld a, [$c81f] + ld [hl], a + ret + +.asm_1124ce + xor a + ld [$c9af], a + ld a, [$c86e] + inc a + ld [$c86d], a + dec a + jp z, Function11261c + dec a + jp z, Function112654 + dec a + jp z, Function112597 + dec a + jp z, Function112566 + call Function1125c7 + push de + ld de, $c880 + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, $1 + ld [$c86e], a + ld a, $fa + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + pop de + ld a, $1 + ld [$c994], a + call Function11269b + ld a, $5 + ld [$c86b], a + call Function112534 + ld a, [$c9a5] + or a + jr z, .asm_112521 + ld a, $1 + +.asm_112521 + add $23 + ld [$c86a], a + ld a, [$c98a] + cp $2 + jr nz, .asm_112531 + xor a + ld [$c9a5], a + +.asm_112531 + jp Function1125bf +; 112534 + +Function112534: ; 112534 + ld b, $fa + ld hl, $c880 + xor a +.asm_11253a + ld [hli], a + dec b + jr nz, .asm_11253a + ld a, [$c876] + ld [$c87c], a + ld a, [$c877] + ld [$c87d], a + ld a, [$c87a] + ld [$c87e], a + ld a, [$c87b] + ld [$c87f], a + ld a, c + ld [$cb58], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, $cb53 + jp Function111f02 +; 112566 + +Function112566: ; 112566 + call Function1125c7 + ld a, [$cb5a] + and $1 + or a + jr nz, .asm_11257d + ld a, [$c98a] + cp $2 + jr nz, .asm_11257d + ld a, $1 + ld [$c994], a + +.asm_11257d + call Function11269b + ld a, $5 + ld [$c86b], a + call Function112534 + ld a, [$c9a5] + or a + jr z, .asm_112590 + ld a, $1 + +.asm_112590 + add $21 + ld [$c86a], a + jr Function1125bf + +Function112597: ; 112597 + call Function1125c7 + call Function11269b + ld a, $5 + ld [$c86b], a + call Function112534 + ld a, [$c98f] + ld b, a + ld a, [$c994] + and $1 + add $13 + bit 0, b + jr z, .asm_1125bc + sub $13 + add $1f + dec b + sla b + add b + +.asm_1125bc + ld [$c86a], a + +Function1125bf: ; 1125bf + ld hl, $c821 + set 0, [hl] + res 2, [hl] + ret +; 1125c7 + +Function1125c7: ; 1125c7 + ld hl, $c872 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld d, [hl] + ld a, [$c994] + and $1 + xor $1 + ld [$c86b], a + ld hl, $c827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, $80 + ld [hli], a + ld a, $c8 + ld [hli], a + dec bc + dec bc + ld a, $fa + ld [hli], a + ld a, $0 + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cb53 + ld hl, Unknown_112072 + ld b, $5 + call Function110000 + inc de + ld a, [$c86c] + ld [de], a + inc de + ret +; 11261c + +Function11261c: ; 11261c + xor a + ld [$c86b], a + ld a, [$c86c] + ld [$cbbd], a + ld de, $cbad + ld [de], a + inc de + ld b, $1 + call Function111f63 + call Function112724 + ld a, [$cbbc] + ld b, a + ld de, $cbbd + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld hl, $cba7 + call Function1127c5 + ld a, $11 + ld [$c86a], a + +Function11264e: ; 11264e + ld hl, $c821 + set 0, [hl] + ret +; 112654 + +Function112654: ; 112654 + xor a + ld [$c86b], a + ld a, [$c86c] + ld [$cbad], a + ld [$cbed], a + ld de, $cbcd + ld [de], a + inc de + ld b, $1 + call Function111f63 + call Function112724 + ld a, [$cbec] + ld b, a + ld de, $cbed + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld a, [$cbac] + ld b, a + ld de, $cbad + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld hl, $cbc7 + call Function1127c5 + ld a, $12 + ld [$c86a], a + jr Function11264e +; 11269b + +Function11269b: ; 11269b + ld bc, $0001 + ld hl, Unknown_112110 + ld a, [$c994] + or a + call nz, Function1126ac + call Function110007 + ret +; 1126ac + +Function1126ac: ; 1126ac + ld hl, Unknown_112137 + ret +; 1126b0 + +Function1126b0: ; 1126b0 + ld hl, Unknown_112115 + jp Function110007 +; 1126b6 + +Function1126b6: ; 1126b6 + ld hl, Unknown_112121 + call Function110007 + ld hl, $013f + ld b, $4 + call Function110000 + ld a, $2d + ld [de], a + inc de + ld a, [$014c] + and $f0 + swap a + or $30 + ld [de], a + inc de + ld a, [$014c] + and $f + or $30 + ld [de], a + inc de + ld a, $7 + add c + ld c, a + ld hl, Unknown_112132 + jp Function110007 +; 1126e6 + +Function1126e6: ; 1126e6 + xor a + ld [$c86b], a + ld hl, Unknown_11213d + call Function110007 + ld hl, $c9a5 + ld b, $5 +.asm_1126f5 + ld a, [hl] + cp $30 + jr nz, .asm_112701 + inc hl + dec b + ld a, $1 + cp b + jr nz, .asm_1126f5 + +.asm_112701 + push bc + call Function110000 + ld a, $d + ld [de], a + inc de + ld a, $a + ld [de], a + inc de + pop bc + ld a, b + add $2 + add c + ld c, a + or c + ret +; 112715 + +Function112715: ; 112715 + xor a + ld [$c86c], a + ld a, $2 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + ret +; 112724 + +Function112724: ; 112724 + ld a, $ff + ld [$c86e], a + +Function112729: ; 112729 + push hl + ld hl, $c82c + xor a + ld [hld], a + ld a, $ff + ld [hld], a + ld a, $c8 + ld [hld], a + ld a, $80 + ld [hl], a + pop hl + ret +; 11273a + +Function11273a: ; 11273a + dec a + jr z, .asm_112752 + dec a + jr z, .asm_11278f + dec a + jr z, .asm_112744 + ret + +.asm_112744 + xor a + ld [$c86d], a + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret + +.asm_112752 + call Function1127e1 + jr nz, .asm_11277a + ld hl, $c880 + call Function112b11 + ld a, $2 + cp d + jr nz, .asm_1127b7 + ld a, $20 + cp e + jr nz, .asm_1127b7 + call Function112724 + ld a, [$cbbc] + add $a + ld e, a + ld d, $0 + ld a, $95 + ld hl, $cbb7 + jp Function111f02 + +.asm_11277a + ld a, [$ca3c] + cp $9f + jr z, Function1127cd + ld hl, $c86b + dec [hl] + xor a + ld [$ca3f], a + ld hl, $cba7 + jp Function1127c5 + +.asm_11278f + call Function1127e1 + jr nz, .asm_11277a + ld hl, $c880 + call Function112b11 + ld a, $2 + cp d + jr nz, .asm_1127b7 + ld a, $50 + cp e + jr nz, .asm_1127b7 + ld a, $3 + ld [$c86a], a + ld hl, $c821 + ld a, [hl] + and $d6 + or $80 + ld [hl], a + xor a + ld [$c98a], a + ret + +.asm_1127b7 + ld hl, $c810 + ld a, e + ld [hli], a + ld [hl], d + ld a, $2 + ld [$c86b], a + jp Function112430 + +Function1127c5: ; 1127c5 + ld de, $000b + ld a, $95 + jp Function111f02 + +Function1127cd: ; 1127cd + ld hl, $c810 + xor a + ld [hli], a + ld [hl], a + xor a + ld [$c86d], a + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret +; 1127e1 + +Function1127e1: ; 1127e1 + call Function112807 + ld hl, $c832 + +Function1127e7: ; 1127e7 + ld a, [hli] + cp $d + ret nz + ld a, [hl] + cp $a + ret nz + ld a, $20 + ld [hl], a + ret +; 1127f3 + +Function1127f3: ; 1127f3 + call Function112807 + ld hl, $c82f + ld a, [hli] + cp $d + ret nz + ld a, [hli] + cp $a + ret nz + ld a, [hli] + cp $2e + ret nz + jr Function1127e7 +; 112807 + +Function112807: ; 112807 + push bc + push de + ld hl, $ca3f + ld a, [hl] + dec a + jr z, .asm_11282d + ld c, a + cp $5 + jr nc, .asm_112830 + ld a, $5 + sub c + ld b, a + ld e, c + ld d, $0 + ld hl, $c82f + add hl, de + ld de, $c82f + call Function110000 + ld hl, $ca41 + ld b, c +.asm_11282a + call Function110000 + +.asm_11282d + pop de + pop bc + ret + +.asm_112830 + sub $5 + ld c, a + ld b, $0 + ld hl, $ca41 + add hl, bc + ld b, $5 + ld de, $c82f + jr .asm_11282a +; 112840 + +Function112840: ; 112840 + dec a + jr z, .asm_112844 + ret + +.asm_112844 + call Function1127e1 + jr nz, .asm_1128ab + ld hl, $c880 + ld a, [hli] + cp $32 + jr nz, Function1128bd + ld a, [hli] + cp $35 + jr nz, Function1128bd + call Function112724 + ld hl, $c87c + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + or a + jr z, .asm_11289d + push hl + ld hl, $c86b + dec [hl] + ld bc, $0001 + ld de, $cb5a + ld hl, Unknown_1120b0 + call Function110007 + pop hl + ld a, $80 + call Function11000f + ld a, $3e + ld [de], a + inc de + inc c + ld a, l + ld [$c87c], a + ld a, h + ld [$c87d], a + call Function11295e + ld a, c + ld [$cb58], a + ld b, c + call Function111f63 + ld hl, $cb53 + ld d, $0 + ld e, c + ld a, $95 + jp Function111f02 + +.asm_11289d + ld a, $3 + ld [$c86a], a + call Function1128d3 + ld a, $1 + ld [$c98a], a + ret + +.asm_1128ab + ld a, [$ca3c] + cp $9f + jp z, Function1127cd + ld hl, $c86b + dec [hl] + ld hl, $cb47 + jp Function1127c5 + +Function1128bd: ; 1128bd + ld hl, $c880 + call Function112b11 + ld hl, $c810 + ld a, e + ld [hli], a + ld [hl], d + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret +; 1128d3 + +Function1128d3: ; 1128d3 + ld hl, $c821 + res 0, [hl] + res 2, [hl] + ret +; 1128db + +Function1128db: ; 1128db + dec a + jr z, .asm_112947 + dec a + jr z, .asm_1128e5 + dec a + jr z, .asm_112913 + ret + +.asm_1128e5 + ld a, [$ca3c] + cp $9f + jp z, Function1127cd + call Function113482 + ld a, [$c86f] + or a + jr nz, .asm_112901 + ld a, $3 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + ret + +.asm_112901 + call Function112724 + ld de, $cb4c + ld a, $1 + ld [de], a + inc de + inc de + ld b, $1 + call Function111f63 + jr .asm_112941 + +.asm_112913 + call Function1127e1 + jr nz, .asm_11293d + ld a, [$ca3c] + cp $9f + jp z, Function1127cd + ld hl, $c880 + call Function112b11 + ld a, d + cp $2 + jr nz, .asm_11295b + ld a, e + cp $50 + jr nz, .asm_11295b + ld a, $3 + ld [$c86a], a + call Function1128d3 + xor a + ld [$c98a], a + ret + +.asm_11293d + ld hl, $c86b + dec [hl] + +.asm_112941 + ld hl, $cb47 + jp Function1127c5 + +.asm_112947 + call Function1127e1 + jr nz, .asm_11293d + ld hl, $c880 + call Function112b11 + ld a, d + cp $3 + jr nz, .asm_11295b + ld a, e + cp $54 + ret z + +.asm_11295b + jp Function1128bd +; 11295e + +Function11295e: ; 11295e + ld a, $d + ld [de], a + inc de + inc c + ld a, $a + ld [de], a + inc de + inc c + ret +; 112969 + +Function112969: ; 112969 + dec a + jr z, .asm_112970 + dec a + jr z, .asm_112989 + ret + +.asm_112970 + ld a, [$ca3c] + cp $9f + jr z, .asm_112986 + call Function1127e1 + jr z, .asm_112986 + ld hl, $c86b + dec [hl] + ld hl, $cb67 + jp Function1127c5 + +.asm_112986 + jp Function112430 + +.asm_112989 + xor a + ld [$c86d], a + ld a, $2 + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + res 7, [hl] + set 5, [hl] + ret +; 11299c + +Function11299c: ; 11299c + dec a + jr z, .asm_1129aa + dec a + jr z, .asm_1129c9 + dec a + jr z, .asm_1129e7 + dec a + jp z, .asm_112a1d + ret + +.asm_1129aa + call Function1127e1 + jr nz, .asm_1129fe + ld a, [$c880] + cp $2b + jr nz, .asm_112a0f + call Function112724 + ld a, [$cbac] + add $a + ld e, a + ld d, $0 + ld a, $95 + ld hl, $cba7 + jp Function111f02 + +.asm_1129c9 + ld d, a + call Function1127e1 + jr nz, .asm_1129fe + ld a, [$c880] + cp $2b + jr nz, .asm_112a0f + call Function112724 + ld a, [$cbec] + add $a + ld e, a + ld a, $95 + ld hl, $cbe7 + jp Function111f02 + +.asm_1129e7 + call Function1127e1 + jr nz, .asm_1129fe + ld a, [$c880] + cp $2b + jr nz, .asm_112a0f + ld a, $4 + ld [$c86a], a + call Function1128d3 + set 7, [hl] + ret + +.asm_1129fe + ld a, [$ca3c] + cp $9f + jr z, Function112a42 + ld hl, $c86b + dec [hl] + ld hl, $cbc7 + jp Function1127c5 + +.asm_112a0f + ld a, [$c86b] + ld [$cb67], a + ld a, $3 + ld [$c86b], a + jp Function112430 + +.asm_112a1d + xor a + ld [$c86d], a + ld de, $0002 + ld a, [$cb67] + cp $1 + jr z, .asm_112a2c + inc de +.asm_112a2c + +Function112a2c: ; 112a2c + ld hl, $c821 + set 1, [hl] + res 0, [hl] + ld hl, $c80f + ld a, $31 + ld [hli], a + ld a, e + ld [hli], a + ld [hl], d + ld a, $5 + ld [$c86a], a + ret + +Function112a42: ; 112a42 + ld hl, $c810 + xor a + ld [hli], a + ld [hl], a + xor a + ld [$c86d], a + ld a, $31 + call Function11225d + set 1, [hl] + res 0, [hl] + ret +; 112a56 + +Function112a56: ; 112a56 + dec a + jr z, .asm_112a5a + ret + +.asm_112a5a + call Function1127e1 + jr nz, .asm_112a95 + ld hl, $c880 + ld a, [hli] + cp $2b + jr nz, .asm_112aa6 +.asm_112a67 + ld a, [hli] + cp $20 + jr nz, .asm_112a67 + call Function112aac + ld a, [$c86e] + ld c, a + ld a, [$c86f] + ld b, a + ld a, e + ld [bc], a + inc bc + ld a, d + ld [bc], a + call Function112aac + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, $4 + ld [$c86a], a + jp Function1128d3 + +.asm_112a95 + ld a, [$ca3c] + cp $9f + jr z, Function112a42 + ld hl, $c86b + dec [hl] + ld hl, $cbc7 + jp Function1127c5 + +.asm_112aa6 + ld de, $0005 + jp Function112a2c +; 112aac + +Function112aac: ; 112aac + ld a, [$c872] + push af + ld a, [$c873] + push af + ld a, [$c874] + push af + ld bc, $0000 + ld de, $0000 +.asm_112abe + ld a, [hli] + cp $d + jr z, .asm_112b04 + cp $20 + jr z, .asm_112b04 + and $f + ld b, a + sla e + rl d + rl c + ld a, e + ld [$c872], a + ld a, d + ld [$c873], a + ld a, c + ld [$c874], a + sla e + rl d + rl c + sla e + rl d + rl c + ld a, [$c872] + add e + ld e, a + ld a, [$c873] + adc d + ld d, a + ld a, [$c874] + adc c + ld c, a + ld a, b + add e + ld e, a + ld a, $0 + adc d + ld d, a + ld a, $0 + adc c + ld c, a + jr .asm_112abe + +.asm_112b04 + pop af + ld [$c874], a + pop af + ld [$c873], a + pop af + ld [$c872], a + ret +; 112b11 + +Function112b11: ; 112b11 + ld a, [$c872] + push af + ld a, [$c873] + push af + ld a, [$c874] + push af + ld bc, $0300 + ld de, $c872 + call Function112b60 + call nc, Function112b60 + call nc, Function112b60 + dec hl +.asm_112b2d + ld a, [hli] + cp $d + jr z, .asm_112b36 + cp $20 + jr nz, .asm_112b2d + +.asm_112b36 + push hl + ld hl, $c872 + ld de, $0000 + ld a, b + or a + jr z, .asm_112b49 + dec a + jr z, .asm_112b4b + dec a + jr z, .asm_112b4f + jr .asm_112b52 + +.asm_112b49 + ld a, [hli] + ld d, a + +.asm_112b4b + ld a, [hli] + swap a + ld e, a + +.asm_112b4f + ld a, [hli] + or e + ld e, a + +.asm_112b52 + pop hl + pop af + ld [$c874], a + pop af + ld [$c873], a + pop af + ld [$c872], a + ret +; 112b60 + +Function112b60: ; 112b60 + ld a, [hli] + cp $30 + jr c, .asm_112b6f + cp $3a + jr nc, .asm_112b6f + and $f + ld [de], a + inc de + dec b + ret + +.asm_112b6f + scf + ret +; 112b71 + +Function112b71: ; 112b71 + dec a + jr z, .asm_112b75 + ret + +.asm_112b75 + call Function1127e1 + jr nz, .asm_112ba3 + ld hl, $c880 + ld a, [hli] + cp $2b + jr nz, .asm_112bb5 +.asm_112b82 + ld a, [hli] + cp $20 + jr nz, .asm_112b82 +.asm_112b87 + ld a, [hli] + cp $20 + jr nz, .asm_112b87 + call Function112aac + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, $4 + ld [$c86a], a + jp Function1128d3 + +.asm_112ba3 + ld a, [$ca3c] + cp $9f + jp z, Function112a42 + ld hl, $c86b + dec [hl] + ld hl, $cbc7 + jp Function1127c5 + +.asm_112bb5 + ld de, $0004 + jp Function112a2c +; 112bbb + +Function112bbb: ; 112bbb + dec a + jr z, .asm_112bbf + ret + +.asm_112bbf + call Function1127e1 + jr nz, .asm_112bd4 + ld hl, $c880 + ld a, [hli] + cp $2b + jr nz, .asm_112be6 + ld a, $4 + ld [$c86a], a + jp Function1128d3 + +.asm_112bd4 + ld a, [$ca3c] + cp $9f + jp z, Function112a42 + ld hl, $c86b + dec [hl] + ld hl, $cbc7 + jp Function1127c5 + +.asm_112be6 + ld de, $0004 + jp Function112a2c +; 112bec + +Function112bec: ; 112bec + dec a + jr z, .asm_112bf7 + dec a + jp z, .asm_112cdb + dec a + ret nz + dec [hl] + ret + +.asm_112bf7 + ld a, [$c880] + cp $2d + jr nz, .asm_112c03 + call Function1127e1 + jr z, .asm_112c0b + +.asm_112c03 + ld a, [$c821] + bit 2, a + jp z, .asm_112cef + +.asm_112c0b + ld hl, $c86b + inc [hl] + ld hl, $c880 + ld a, [hli] + cp $2b + jp nz, Function112d20 + ld b, $7f +.asm_112c1a + ld a, [hli] + dec b + cp $a + jr nz, .asm_112c1a + push hl + ld hl, $c98f + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, b + ld [$c82d], a + ld a, [hli] + ld h, [hl] + sub b + ld l, a + ld a, h + sbc $0 + ld h, a + jr nc, .asm_112c56 + cp $ff + jr nz, .asm_112c56 + ld hl, $c991 + ld a, [hli] + ld c, a + inc hl + ld a, b + sub c + ld [hli], a + ld a, [$c82b] + ld [hl], a + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + pop hl + ld b, c + jp Function110000 + +.asm_112c56 + ld [$c993], a + ld a, [$c82b] + ld c, a + ld [$c994], a + push hl + ld a, l + sub c + ld l, a + ld a, h + sbc $0 + ld h, a + jr nc, .asm_112c9f + cp $ff + jr nz, .asm_112c9f + ld a, c + ld [$ca3d], a + ld a, [$ca3f] + sub c + pop hl + ld c, l + pop hl + push af + call Function110000 + pop af + push de + ld hl, $ca40 + ld e, a + ld d, $0 + add hl, de + pop de + ld b, c + call Function110000 + ld a, [$ca3d] + sub c + ld [$c994], a + ld hl, $c827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$c991] + ld [hli], a + xor a + ld [hl], a + ret + +.asm_112c9f + ld [$c994], a + ld a, l + ld [$c82b], a + ld a, h + ld [$c82c], a + pop hl + pop hl + call Function110000 + ld a, [$ca3f] + sub c + push de + ld hl, $ca40 + ld e, a + ld d, $0 + add hl, de + pop de + ld b, c + call Function110000 + ld a, [$c82d] + add c + ld [$c82d], a + ld a, [$c82e] + adc $0 + ld [$c82e], a + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld hl, $c821 + res 2, [hl] + +.asm_112cdb + ld a, [$c821] + bit 2, a + jr z, .asm_112cea + ld a, $2 + ld [$c86b], a + jp .asm_112d09 + +.asm_112cea + call Function1127f3 + jr z, .asm_112d01 + +.asm_112cef + ld a, [$ca3c] + cp $9f + jp z, Function112a42 + ld hl, $c86b + dec [hl] + ld hl, $cbc7 + jp Function1127c5 + +.asm_112d01 + ld a, $4 + ld [$c86a], a + call Function1128d3 + +.asm_112d09 + ld a, [$c86e] + ld l, a + ld a, [$c86f] + or l + ret z + ld hl, $c827 + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, $c82d + ld b, $2 + jp Function110000 +; 112d20 + +Function112d20: ; 112d20 + ld a, [$c86a] + cp $1a + jr nz, .asm_112d2d + ld de, $0004 + jp Function112a2c + +.asm_112d2d + ld de, $0004 + jp Function112a2c +; 112d33 + +Function112d33: ; 112d33 + dec a + jr z, .asm_112d87 + dec a + jr z, .asm_112d9f + dec a + jp z, .asm_112e46 + dec a + jr z, .asm_112d4d + dec a + jp z, Function113317 + dec a + jp z, Function113386 + dec a + jp .asm_112e46 + +; XXX + ret + +.asm_112d4d + ld a, [$c86a] + cp $23 + jr z, .asm_112d6d + cp $1f + jr z, .asm_112d60 + cp $20 + jr z, .asm_112d6d + cp $22 + jr nz, .asm_112d82 + +.asm_112d60 + ld hl, $c98b + ld a, [hli] + cp $1 + jr nz, .asm_112d82 + ld a, [hl] + cp $4 + jr nz, .asm_112d82 + +.asm_112d6d + ld hl, $c86e + xor a + ld [hli], a + ld [hl], a + ld hl, $c82b + ld [hli], a + ld [hl], a + ld hl, $c821 + res 2, [hl] + ld hl, $c86b + dec [hl] + dec [hl] + +.asm_112d82 + ld hl, $c86b + dec [hl] + ret + +.asm_112d87 + call Function113482 + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + +.asm_112d9f + ld a, [$c821] + bit 2, a + jr z, .asm_112dab + ld a, $3 + ld [hl], a + jr .asm_112dc1 + +.asm_112dab + ld a, [$ca3c] + cp $9f + jr z, .asm_112dc1 + ld hl, $c86b + dec [hl] + ld de, $000b + ld hl, $cb47 + ld b, $5 + jp Function111f07 + +.asm_112dc1 + ld a, [$c989] + cp $2 + jr nc, .asm_112df2 + call Function112f61 + bit 2, a + ret nz + cp $3 + jr z, .asm_112e38 + cp $1 + jr nz, .asm_112df2 + ld a, [$c86a] + cp $1f + jr z, .asm_112de1 + cp $20 + jr nz, .asm_112df2 + +.asm_112de1 + ld hl, $c98b + ld a, [hli] + cp $1 + jr nz, .asm_112df2 + ld a, $4 + cp [hl] + jr nz, .asm_112df2 + xor a + ld [$c990], a + +.asm_112df2 + ld a, [$c86e] + ld l, a + ld a, [$c86f] + or l + ret z + ld a, [$c86a] + cp $13 + jr z, .asm_112e21 + cp $14 + jr z, .asm_112e21 + cp $20 + ret z + cp $22 + ret z + cp $23 + ret z + cp $1f + jr nz, .asm_112e21 + ld hl, $c98b + ld a, [hli] + cp $0 + ret nz + ld a, $2 + cp [hl] + ret nz + ld a, [$c86a] + +.asm_112e21 + cp $24 + jr nz, .asm_112e2a + ld hl, $c878 + jr .asm_112e2d + +.asm_112e2a + ld hl, $c827 + +.asm_112e2d + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, $c82d + ld b, $2 + jp Function110000 + +.asm_112e38 + ld hl, $c821 + set 1, [hl] + res 0, [hl] + ld de, $c98b + ld a, $24 + jr .asm_112e95 + +.asm_112e46 + ld a, [$c86a] + cp $1f + jr z, .asm_112ea6 + cp $20 + jr z, .asm_112ea6 + ld a, [$c98a] + cp $1 + jr z, .asm_112e65 + ld a, [$c86a] + cp $21 + jp z, .asm_112eea + cp $22 + jp z, .asm_112eea + +.asm_112e65 + ld a, [$c990] + or a + jp z, .asm_112f3d +.asm_112e6c + ld hl, $c98c + ld a, [hld] + cp $3 + jr nz, .asm_112e7f + ld a, [hl] + or a + jr z, .asm_112e7f + cp $3 + jr nc, .asm_112e7f + call Function1133fe + +.asm_112e7f + ld hl, $c821 + set 1, [hl] + res 0, [hl] + ld de, $c98b + ld a, [$c990] + cp $1 + ld a, $32 + jr z, .asm_112e95 + inc de + inc de + inc a + +.asm_112e95 + ld [$c80f], a + ld hl, $c810 + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + ld a, $5 + ld [$c86a], a + ret + +.asm_112ea6 + ld hl, $c98b + ld a, [hli] + ld h, [hl] + ld l, a + cp $0 + jr nz, .asm_112ec1 + ld a, $2 + cp h + jr nz, .asm_112ec1 + ld a, [$c98d] + ld b, a + ld a, [$c98e] + or b + jr nz, .asm_112e6c + jr .asm_112f3d + +.asm_112ec1 + ld a, $1 + cp l + jr nz, .asm_112e6c + ld a, $4 + cp h + jr nz, .asm_112e6c + ld a, [$c9a5] + or a + jr nz, .asm_112efb + ld a, [$c86e] + ld l, a + ld a, [$c86f] + or l + jr nz, .asm_112efb + ld a, $2 + ld [$c86a], a + xor a + ld [$c86d], a + ld hl, $c821 + res 0, [hl] + ret + +.asm_112eea + ld hl, $c98b + ld a, [hli] + ld h, [hl] + ld l, a + cp $0 + jp nz, .asm_112e6c + ld a, $2 + cp h + jp nz, .asm_112e6c + +.asm_112efb + ld a, [$c98d] + ld b, a + ld a, [$c98e] + cp b + jp nz, .asm_112e6c + or a + jr z, .asm_112f13 + cp $1 + jp nz, .asm_112e6c + ld a, $1 + ld [$c993], a + +.asm_112f13 + ld a, [$c86b] + cp $7 + jr z, .asm_112f3d + ld hl, $c98f + inc [hl] + ld a, $f + ld [$c86a], a + ld a, $1 + ld [$c86b], a + ld a, [$c86d] + ld [$c86e], a + xor a + ld [$c989], a + ld a, $a3 + ld de, $0010 + ld hl, $c995 + jp Function111f02 + +.asm_112f3d + ld a, [$c993] + cp $1 + jr nz, .asm_112f52 + ld a, $2 + ld [$c990], a + ld hl, $c98d + dec a + ld [hli], a + ld [hl], a + jp .asm_112e7f + +.asm_112f52 + ld a, $2 + ld [$c86a], a + xor a + ld [$c86d], a + ld hl, $c821 + res 0, [hl] + ret +; 112f61 + +Function112f61: ; 112f61 + ld hl, $c989 + ld a, [hl] + or a + jr nz, .asm_112f8a + inc [hl] + ld hl, $c880 + ld de, $0008 + add hl, de +.asm_112f70 + ld a, [hli] + cp $20 + jr z, .asm_112f70 + dec hl + ld d, $0 + cp $32 + jr z, .asm_112f7d + inc d + +.asm_112f7d + ld a, d + ld [$c990], a + call Function112b11 + ld hl, $c98b + ld a, e + ld [hli], a + ld [hl], d + +.asm_112f8a + ld hl, $c880 + ld a, [$c82d] + ld b, a + or a + jr nz, .asm_112fa1 + ld hl, $c98b + ld a, $0 + ld [hli], a + ld [hl], a + ld a, $1 + ld [$c990], a + ret + +.asm_112fa1 + call Function112fd5 + call Function113008 + call Function113026 + call Function113054 + call Function113167 + call Function113180 + call Function113268 + jr c, .asm_112fc9 + ld a, $d + cp [hl] + jr z, .asm_112fc2 + ld a, $a + cp [hl] + jr nz, .asm_112fa1 + +.asm_112fc2 + ld hl, $c990 + res 2, [hl] + jr .asm_112fce + +.asm_112fc9 + ld hl, $c990 + set 2, [hl] + +.asm_112fce + call Function11306b + ld a, [$c990] + ret +; 112fd5 + +Function112fd5: ; 112fd5 + ld de, Unknown_113001 + push hl + call Function113281 + jr nc, .asm_112fe0 + pop hl + ret + +.asm_112fe0 + pop de + push bc + push de + push hl + ld b, $0 +.asm_112fe6 + inc b + ld a, [hli] + cp $a + jr nz, .asm_112fe6 + pop hl + ld c, b + ld a, [$c833] + ld e, a + ld a, [$c834] + ld d, a + or e + jr z, .asm_112ffe + call Function110000 + xor a + ld [de], a + +.asm_112ffe + pop hl + pop bc + ret +; 113001 + +Unknown_113001: ; 113001 + ascii "date: ", $0 +; 113008 + +Function113008: ; 113008 + ld de, Unknown_1132a6 + push hl + call Function113273 + jr nc, .asm_113013 + pop hl + ret + +.asm_113013 + call Function112b11 + ld hl, $c98d + ld a, e + ld [hli], a + ld [hl], d + pop hl + ld a, d + or e + ret z + ld a, $2 + ld [$c990], a + ret +; 113026 + +Function113026: ; 113026 + ld de, Unknown_1132b2 + push hl + call Function113273 + jr nc, .asm_113031 + pop hl + ret + +.asm_113031 + pop hl + push bc + push hl + push hl + ld b, $0 +.asm_113037 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113037 + pop hl + ld c, b + ld de, $cb59 + call Function110000 + ld hl, $cb59 + ld de, $c9b5 + ld b, c + call Function110000 + xor a + ld [de], a + pop hl + pop bc + ret +; 113054 + +Function113054: ; 113054 + ld de, Unknown_1132bf + push hl + call Function113273 + jr nc, .asm_11305f + pop hl + ret + +.asm_11305f + push bc + ld de, $c9b5 + ld b, $30 + call Function1136c1 + pop bc + pop hl + ret +; 11306b + +Function11306b: ; 11306b + ld hl, $c880 + ld a, [$c82d] + ld b, a + +Function113072: ; 113072 + call Function113268 + jp nc, Function113089 + ld a, [$ca3c] + cp $9f + jp nz, Function1131a9 + push hl + ld hl, $c990 + res 2, [hl] + pop hl + jr Function113095 + +Function113089: ; 113089 + ld a, [hl] + cp $d + jr z, .asm_113094 + cp $a + jr z, Function113095 + jr Function113072 + +.asm_113094 + inc hl + +Function113095: ; 113095 + inc hl + push bc + ld a, [$c872] + ld b, a + ld a, [$c873] + or b + pop bc + jr z, .asm_1130b3 + ld a, [$c86a] + cp $23 + jr z, .asm_1130b3 + cp $20 + jr z, .asm_1130b3 + cp $22 + jr z, .asm_1130b3 + jr .asm_1130d6 + +.asm_1130b3 + xor a + ld hl, $c86e + ld [hli], a + ld [hl], a + ld hl, $c821 + res 2, [hl] + ld a, [$c86a] + cp $13 + jr z, .asm_1130c8 + cp $14 + ret nz + +.asm_1130c8 + ld a, $6 + ld [$c86b], a + ld a, [$ca3c] + cp $9f + ret z + jp Function112430 + +.asm_1130d6 + ld a, [$c82b] + ld c, a + dec b + dec b + ld a, b + ld [$c82d], a + jr z, .asm_11310d + ld a, [$c873] + ld d, a + ld a, [$c872] + ld e, a + dec de + dec de + xor a + or d + jr nz, .asm_1130f5 + ld a, e + cp b + jp c, Function113206 + +.asm_1130f5 + ld a, e + sub b + ld [$c82b], a + ld a, d + sbc $0 + ld [$c82c], a + ld a, [$c874] + ld e, a + ld a, [$c875] + ld d, a + inc de + inc de + call Function110000 + +.asm_11310d + ld a, [$ca3c] + cp $9f + jr z, .asm_113150 + ld a, [$ca3f] + or a + jr z, .asm_113150 + ld l, c + sub c + ld c, a + ld a, l + ld hl, $ca40 + add hl, bc + ld b, a + push de + ld a, [$c82b] + ld e, a + ld a, [$c82c] + ld d, a + xor a + or d + jr nz, .asm_113135 + ld a, e + cp b + jp c, Function113245 + +.asm_113135 + pop de + push hl + ld hl, $c82d + ld a, [hl] + add b + ld [hli], a + ld a, [hl] + adc $0 + ld [hl], a + ld c, b + pop hl + call Function110000 + ld hl, $c82b + ld a, [hl] + sub c + ld [hli], a + ld a, [hl] + sbc $0 + ld [hl], a + +.asm_113150 + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld hl, $c821 + res 2, [hl] + ld a, $1 + ld [$c86b], a + ld a, $2 + ld [$c989], a + ret +; 113167 + +Function113167: ; 113167 + ld de, Unknown_1132ff + push hl + call Function113273 + jr nc, .asm_113172 + pop hl + ret + +.asm_113172 + pop de + push bc + push de + push hl + ld b, $0 +.asm_113178 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113178 + jr Function113197 + +Function113180: ; 113180 + ld de, Unknown_11330c + push hl + call Function113273 + jr nc, .asm_11318b + pop hl + ret + +.asm_11318b + pop de + push bc + push de + push hl + ld b, $0 +.asm_113191 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113191 + +Function113197: ; 113197 + pop hl + ld c, b + ld de, $cb57 + ld a, b + ld [de], a + inc de + dec b + dec b + call Function110000 + xor a + ld [de], a + pop hl + pop bc + ret +; 1131a9 + +Function1131a9: ; 1131a9 + ld hl, $c979 + ld de, $c880 + ld b, $0 + ld c, b + ld a, [hl] + cp $a + jr z, .asm_1131c4 +.asm_1131b7 + ld a, [hld] + inc b + cp $a + jr nz, .asm_1131b7 + inc hl + inc hl + dec b + ld c, b + call Function110000 + +.asm_1131c4 + ld a, [$c82b] + ld b, a + add c + ld c, a + push bc + ld a, $ff + sub b + ld c, a + ld b, $0 + ld hl, $ca40 + add hl, bc + pop bc + call Function110000 + ld a, c + ld [$c82d], a + ld a, $fa + sub c + ld [$c82b], a + ld hl, $c829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld l, e + ld h, d + ld de, $c97a +.asm_1131ef + xor a + ld [hli], a + ld a, l + cp e + jr nz, .asm_1131ef + ld a, d + cp h + jr nz, .asm_1131ef + ld hl, $c821 + res 2, [hl] + ld hl, $c86b + dec [hl] + dec [hl] + ld a, $4 + ret +; 113206 + +Function113206: ; 113206 + ld a, b + sub e + ld [$c991], a + ld a, [$c821] + bit 2, a + ld a, c + jr nz, .asm_113214 + xor a + +.asm_113214 + ld [$c992], a + ld b, e + ld c, e + ld a, [$c874] + ld e, a + ld a, [$c875] + ld d, a + inc de + inc de + call Function110000 + ld a, [$c991] + ld [$c993], a + ld b, a + ld de, $c880 + call Function110000 + ld hl, $c82d + ld a, c + ld [hli], a + xor a + ld [hl], a + ld hl, $c821 + set 2, [hl] + ld a, $3 + ld [$c86b], a + ret +; 113245 + +Function113245: ; 113245 + ld a, b + sub e + ld [$c992], a + ld [$c82b], a + ld b, e + ld c, e + pop de + call Function110000 + ld hl, $c82d + ld a, c + add [hl] + ld [hli], a + ld a, $0 + adc [hl] + ld [hl], a + ld hl, $c821 + set 2, [hl] + ld a, $3 + ld [$c86b], a + ret +; 113268 + +Function113268: ; 113268 +.asm_113268 + dec b + ld a, [hli] + cp $a + ret z + xor a + or b + jr nz, .asm_113268 + scf + ret +; 113273 + +Function113273: ; 113273 + ld c, $0 +.asm_113275 + ld a, [de] + inc de + or a + ret z + xor [hl] + inc hl + or c + ld c, a + jr z, .asm_113275 + scf + ret +; 113281 + +Function113281: ; 113281 + ld c, $0 + push hl + ld l, e + ld h, d + pop de +.asm_113287 + ld a, [de] + inc de + call Function11329d + xor [hl] + inc hl + or c + ld c, a + xor a + cp [hl] + jr z, .asm_113298 + cp c + jr z, .asm_113287 + scf + +.asm_113298 + push hl + ld l, e + ld h, d + pop de + ret +; 11329d + +Function11329d: ; 11329d + cp $41 + ret c + cp $5b + ret nc + or $20 + ret +; 1132a6 + +Unknown_1132a6: + ascii "Gb-Status: ", $0 +Unknown_1132b2: + ascii "Gb-Auth-ID: ", $0 +Unknown_1132bf: + ascii "WWW-Authenticate: GB00 name=", $22, $0 +Unknown_1132dd: + ascii "Content-Type: application/x-cgb", $d, "\n", $0 +Unknown_1132ff: + ascii "URI-header: ", $0 +Unknown_11330c: + ascii "Location: ", $0 +; 113317 + +Function113317: ; 113317 + ld a, $1 + ld [$c86b], a + ld de, $cb59 + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + call Function1126b0 + ld hl, Unknown_1132dd + ld a, [$c9a5] + or a + call nz, Function110007 + ld a, [$c86a] + cp $22 + jr nz, .asm_113344 + ld a, [$c98a] + cp $2 + jr nz, .asm_113351 + jr .asm_113348 + +.asm_113344 + cp $24 + jr nz, .asm_113351 + +.asm_113348 + ld a, [$c9a5] + or a + jr z, .asm_11336a + call Function1133de + +.asm_113351 + ld hl, $c9b5 + call Function110007 + call Function1126b6 + ld a, c + ld [$cb58], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, $cb53 + jp Function111f02 + +.asm_11336a + ld hl, Unknown_113372 + call Function110007 + jr .asm_113351 +; 113372 + +Unknown_113372: ; 113372 + ascii "Content-Length: 0", $d, "\n", $0 +; 113386 + +Function113386: ; 113386 + call Function113482 + ld a, $1 + ld [$c86b], a + ld de, $cb47 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, $cb53 + ld hl, Unknown_112072 + ld b, $6 + call Function110000 + ld a, [$c86d] + cp $3 + jp nz, Function113317 + ld de, $cb59 + ld a, [$c86c] + ld [de], a + inc de + ld bc, $0001 + call Function1126b0 + ld a, [$c994] + or a + call nz, Function1133de + call Function1126b6 + ld a, c + ld [$cb58], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, $cb53 + jp Function111f02 +; 1133de + +Function1133de: ; 1133de + call Function1126e6 + xor a + ld [$c86b], a + ld a, [$c9aa] + ld [$c87c], a + ld a, [$c9ab] + ld [$c87d], a + ld a, [$c9ac] + ld [$c87e], a + ld a, [$c9ad] + ld [$c87f], a + ret +; 1133fe + +Function1133fe: ; 1133fe + ld hl, $cb58 + ld a, [hli] + cp $68 + jr nz, .asm_113432 + ld a, [hli] + cp $74 + jr nz, .asm_113432 + ld a, [hli] + cp $74 + jr nz, .asm_113432 + ld a, [hli] + cp $70 + jr nz, .asm_113432 + ld a, [hli] + cp $3a + jr nz, .asm_113432 + ld a, [hli] + cp $2f + jr nz, .asm_113432 + ld a, [hli] + cp $2f + jr nz, .asm_113432 + ld hl, $cb57 + ld de, $c880 + ld a, [hli] + ld b, a + call Function110000 + xor a + ld [de], a + ret + +.asm_113432 + ld a, [$cb58] + cp $2f + jr z, .asm_113460 + ld de, $c880 + ld hl, $c9b5 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + call Function110007 + ld l, e + ld h, d +.asm_11344c + ld a, [hld] + cp $2f + jr nz, .asm_11344c + inc hl + inc hl + ld e, l + ld d, h +.asm_113455 + ld hl, $cb57 + ld a, [hli] + ld b, a + call Function110000 + xor a + ld [de], a + ret + +.asm_113460 + ld de, $c880 + ld hl, $c9b5 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + cp $2f + jr z, .asm_113478 + ld b, $7 + call Function110000 + +.asm_113478 + ld a, [hli] + ld [de], a + inc de + cp $2f + jr nz, .asm_113478 + dec de + jr .asm_113455 +; 113482 + +Function113482: ; 113482 + ld hl, $c87f + ld a, [hld] + ld b, a + ld a, [hld] + ld c, a + ld a, b + or c + ret z + pop hl + ld hl, rSC + add hl, bc + jr c, .asm_113496 + xor a + ld l, a + ld h, a + +.asm_113496 + ld e, l + ld d, h + ld hl, $c87f + ld a, d + ld [hld], a + ld a, e + ld [hld], a + jr nc, .asm_1134a3 + ld c, $fe + +.asm_1134a3 + ld a, [hld] + ld l, [hl] + ld h, a + ld a, c + inc a + ld [$cb4c], a + ld de, $cb4e + ld b, c + call Function110000 + ld a, l + ld [$c87c], a + ld a, h + ld [$c87d], a + ld b, c + inc b + call Function111f63 + ld hl, $c86b + dec [hl] + ld hl, $cb47 + ld a, $95 + jp Function111f02 +; 1134cb + +Function1134cb: ; 1134cb + dec a + jr z, .asm_1134d9 + dec a + jr z, .asm_1134f4 + dec a + jr z, .asm_1134fc + dec a + jr z, .asm_11350e + dec [hl] + ret + +.asm_1134d9 + ld a, [$ca40] + cp $0 + jr z, .asm_1134f0 + cp $ff + jr z, .asm_1134f0 + ld a, [$c985] + ld [$c86a], a + ld hl, $c821 + res 0, [hl] + ret + +.asm_1134f0 + inc [hl] + inc [hl] + jr .asm_1134fc + +.asm_1134f4 + ld a, $97 + ld hl, Unknown_11202d + jp Function111eff + +.asm_1134fc + ld hl, $c86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$ca42] + cp $f0 + jr c, .asm_11350b + set 7, [hl] + +.asm_11350b + jp Function112269 + +.asm_11350e + ld a, [$c86a] + cp $1e + jp nz, Function112251 + jp Function1116a0 +; 113519 + +Function113519: ; 113519 + dec a + jr z, .asm_113527 + dec a + jr z, .asm_11352d + dec a + jr z, .asm_11353c + dec a + jr z, .asm_11353f + dec [hl] + ret + +.asm_113527 + ld hl, Unknown_112046 + jp Function11236b + +.asm_11352d + ld hl, $c829 + ld a, $e0 + ld [hli], a + ld a, $c8 + ld [hli], a + ld hl, Unknown_112052 + jp Function11236b + +.asm_11353c + jp Function112269 + +.asm_11353f + ld hl, $c880 + ld a, [hli] + cp $4d + jr nz, .asm_113586 + ld a, [hld] + cp $41 + jr nz, .asm_113586 + ld b, $be + ld de, $0000 +.asm_113551 + ld a, [hli] + add e + ld e, a + ld a, $0 + adc d + ld d, a + dec b + jr nz, .asm_113551 + ld a, [hli] + cp d + jr nz, .asm_11358a + ld a, [hl] + cp e + jr nz, .asm_11358a + ld a, [$c86e] + ld e, a + ld a, [$c86f] + ld d, a + ld hl, .asm_11357e + push hl + ld a, [$c86a] + cp $25 + jr z, Function1135ba + cp $26 + jr z, Function11359d + cp $27 + jr z, Function1135ad +.asm_11357e + ld a, $1 + ld [$c835], a + jp Function1116a0 + +.asm_113586 + ld a, $25 + jr .asm_11358c + +.asm_11358a + ld a, $14 + +.asm_11358c + call Function11225d + jp Function1116a4 +; 113592 + +Function113592: ; 113592 + push de + ld l, e + ld h, d + xor a + ld [hl], a + inc de + call Function110000 + pop de + ret +; 11359d + +Function11359d: ; 11359d + ld b, $20 + call Function113592 + ld a, $21 + ld hl, $c88c + call Function11000f + xor a + ld [de], a + ret +; 1135ad + +Function1135ad: ; 1135ad + ld b, $1e + call Function113592 + ld a, $1f + ld hl, $c8ac + jp Function11000f +; 1135ba + +Function1135ba: ; 1135ba + ld b, $65 + call Function113592 + ld hl, $c8f6 + call Function1135eb + ld a, $11 + ld hl, $c8fe + call Function11000f + inc de + ld hl, $c90e + call Function1135eb + ld a, $11 + ld hl, $c916 + call Function11000f + inc de + ld hl, $c926 + call Function1135eb + ld a, $11 + ld hl, $c92e + jp Function11000f +; 1135eb + +Function1135eb: ; 1135eb + ld b, $8 +.asm_1135ed + ld a, [hl] + swap a + and $f + cp $f + jr z, .asm_11361c + or $30 + cp $3a + call z, Function113620 + cp $3b + call z, Function113623 + ld [de], a + inc de + ld a, [hli] + and $f + cp $f + jr z, .asm_11361c + or $30 + cp $3a + call z, Function113620 + cp $3b + call z, Function113623 + ld [de], a + inc de + dec b + jr nz, .asm_1135ed + +.asm_11361c + xor a + ld [de], a + inc de + ret +; 113620 + +Function113620: ; 113620 + ld a, $23 + ret +; 113623 + +Function113623: ; 113623 + ld a, $2a + ret +; 113626 + +Function113626: ; 113626 + dec a + jr z, .asm_113634 + dec a + jr z, .asm_113639 + dec a + jr z, .asm_11366c + dec a + jr z, .asm_11366f + dec [hl] + ret + +.asm_113634 + ld b, $9a + jp Function11234b + +.asm_113639 + ld a, [$c882] + or a + jr nz, .asm_113642 + inc [hl] + jr .asm_11366c + +.asm_113642 + ld de, $cb4c + ld c, a + inc a + ld [de], a + inc de + ld a, $80 + ld [de], a + inc de + ld hl, $c880 + ld a, [hli] + ld h, [hl] + ld l, a + ld b, c + call Function110000 + ld b, c + inc b + call Function111f63 + ld a, [$cb4c] + add $a + ld e, a + ld d, $0 + ld a, $9a + ld hl, $cb47 + jp Function111f02 + +.asm_11366c + jp Function112269 + +.asm_11366f + jp Function1116a0 +; 113672 + +Function113672: ; 113672 + dec a + jr z, .asm_113680 + dec a + jr z, .asm_113686 + dec a + jr z, .asm_1136bb + dec a + jr z, .asm_1136be + dec [hl] + ret + +.asm_113680 + ld hl, $cb47 + jp Function11236b + +.asm_113686 + ld a, [$c882] + or a + jr z, .asm_113693 + cp $81 + jr nc, .asm_113693 + inc [hl] + jr .asm_1136bb + +.asm_113693 + ld hl, $cb4e + sub $80 + ld [hld], a + ld a, $80 + ld [hl], a + ld de, $cb4f + ld b, $2 + call Function111f63 + ld hl, $c880 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $0080 + add hl, de + ld e, h + ld a, l + ld hl, $c829 + ld [hli], a + ld [hl], e + ld hl, $cb47 + jp Function11236b + +.asm_1136bb + jp Function112269 + +.asm_1136be + jp Function1116a0 +; 1136c1 + +Function1136c1: ; 1136c1 + xor a + ld [$cc28], a + ld a, l + ld [$cc07], a + ld a, h + ld [$cc08], a + ld hl, $cc09 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, b + ld [hli], a + ld hl, $cc07 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cb67 + ld b, $30 + ld c, b + call Function110000 + ld hl, $c97f + ld a, [hli] + ld h, [hl] + ld l, a +.asm_1136eb + ld a, [hli] + or a + jr nz, .asm_1136eb + call Function110007 + ld a, $37 + cp c + inc a + jr nc, .asm_1136ff + ld a, $2 + ld [$cc28], a + ld a, $78 + +.asm_1136ff + sub c + ld b, a + ld a, $80 + ld [de], a + inc de + xor a +.asm_113706 + dec b + jr z, .asm_11370d + ld [de], a + inc de + jr .asm_113706 + +.asm_11370d + or a + sla c + rl b + sla c + rl b + sla c + rl b + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld l, e + ld h, d + ld b, $6 + xor a +.asm_113725 + ld [hli], a + dec b + jr nz, .asm_113725 + ld de, $cbe7 + ld hl, Unknown_113b7e + ld b, $10 + call Function110000 + +.asm_113734 + ld hl, $cc0c + ld a, $8e + ld [hli], a + ld a, $7b + ld [hl], a + ld hl, $cc0e + ld a, $70 + ld [hli], a + ld a, $7a + ld [hl], a + ld hl, $cbe7 + ld de, $cc18 + ld b, $10 + call Function110000 + +.asm_113751 + ld hl, $cc0e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] + ld c, a + push hl + call Function113909 + ld hl, $cbf7 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a32 + pop hl + ld a, [hli] + ld d, [hl] + inc hl + ld e, a + push hl + ld a, [$cc28] + bit 0, a + jr z, .asm_11377c + ld hl, $0040 + add hl, de + ld e, l + ld d, h + +.asm_11377c + ld hl, $cb67 + add hl, de + ld e, l + ld d, h + ld hl, $cbff + call Function113a32 + ld hl, $cc0c + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a32 + pop hl + ld a, [hli] + ld b, a + ld a, l + ld [$cc0e], a + ld a, h + ld [$cc0f], a + ld hl, $cbff + call Function113a40 + ld hl, $cbf9 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a32 + ld hl, $cbf7 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + ld b, $4 + call Function110000 + ld hl, $cc0c + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + inc hl + inc hl + ld a, h + ld [$cc0d], a + ld a, l + ld [$cc0c], a + cp $8e + jp nz, .asm_113751 + ld de, $cc18 + ld hl, $cbe7 + call Function113a32 + ld de, $cc1c + call Function113a32 + ld de, $cc20 + call Function113a32 + ld de, $cc24 + call Function113a32 + ld hl, $cc28 + bit 1, [hl] + jr z, .asm_1137fc + dec [hl] + jp .asm_113734 + +.asm_1137fc + ld hl, $cb67 + ld de, $cb97 + ld bc, $0030 + call Function113d66 + ld hl, $cc09 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, Unknown_113a55 + call Function110007 + ld hl, $cb97 + ld bc, $0020 + call Function113c8e + ld a, l + ld [$cc09], a + ld a, h + ld [$cc0a], a + ld b, $12 + ld hl, $cb97 + ld de, $cb67 +.asm_11382d + ld a, $40 + and [hl] + rlca + ld c, a + ld a, [hli] + bit 4, a + jr z, .asm_113839 + set 6, c + +.asm_113839 + bit 2, a + jr z, .asm_11383f + set 5, c + +.asm_11383f + bit 0, a + jr z, .asm_113845 + set 4, c + +.asm_113845 + ld a, [hli] + bit 6, a + jr z, .asm_11384c + set 3, c + +.asm_11384c + bit 4, a + jr z, .asm_113852 + set 2, c + +.asm_113852 + bit 2, a + jr z, .asm_113858 + set 1, c + +.asm_113858 + bit 0, a + jr z, .asm_11385e + set 0, c + +.asm_11385e + ld a, c + ld [de], a + inc de + dec b + jr nz, .asm_11382d + ld b, $12 + ld hl, $cbba + ld de, $cb8a +.asm_11386c + ld a, $2 + and [hl] + rrca + ld c, a + ld a, [hld] + bit 3, a + jr z, .asm_113878 + set 1, c + +.asm_113878 + bit 5, a + jr z, .asm_11387e + set 2, c + +.asm_11387e + bit 7, a + jr z, .asm_113884 + set 3, c + +.asm_113884 + ld a, [hld] + bit 1, a + jr z, .asm_11388b + set 4, c + +.asm_11388b + bit 3, a + jr z, .asm_113891 + set 5, c + +.asm_113891 + bit 5, a + jr z, .asm_113897 + set 6, c + +.asm_113897 + bit 7, a + jr z, .asm_11389d + set 7, c + +.asm_11389d + ld a, c + ld [de], a + dec de + dec b + jr nz, .asm_11386c + ld b, $10 + ld de, $cb97 + ld hl, $cbe7 + call Function110000 + ld bc, $0010 + ld hl, $c97f + ld a, [hli] + ld h, [hl] + ld l, a + call Function110007 + ld a, $24 + sub c + ld b, a + ld l, e + ld h, d + ld a, $ff +.asm_1138c2 + ld [hli], a + dec b + jr nz, .asm_1138c2 + xor a + ld [hl], a + ld b, $24 + ld hl, $cb67 + ld de, $cb97 +.asm_1138d0 + ld a, [de] + inc de + xor [hl] + ld c, $0 + bit 0, a + jr z, .asm_1138db + set 3, c + +.asm_1138db + bit 3, a + jr z, .asm_1138e1 + set 6, c + +.asm_1138e1 + bit 6, a + jr z, .asm_1138e7 + set 0, c + +.asm_1138e7 + and $b6 + or c + ld [hli], a + dec b + jr nz, .asm_1138d0 + ld hl, $cc09 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cb67 + ld bc, $0024 + call Function113c8e + ld a, $22 + ld [hli], a + ld a, $d + ld [hli], a + ld a, $a + ld [hli], a + xor a + ld [hl], a + ret +; 113909 + +Function113909: ; 113909 + call Function11391e + ld a, c + and $f0 + swap a + or a + jr z, Function11392f + dec a + jr z, Function113973 + dec a + jp z, Function1139b7 + jp Function1139de + +Function11391e: ; 11391e + and $f + ld e, a + ld d, $0 + ld hl, Unknown_113b70 + add hl, de + ld de, $cbf7 + ld b, $8 + jp Function110000 + +Function11392f: ; 11392f + ld hl, $cbf9 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cbff + ld b, $4 + call Function110000 + ld hl, $cbfb + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a0b + ld hl, $cbf9 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cc03 + ld b, $4 + call Function110000 + ld hl, $cc03 + call Function113a1f + ld hl, $cbfd + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cc03 + call Function113a0b + ld hl, $cbff + ld de, $cc03 + call Function113a15 + ret + +Function113973: ; 113973 + ld hl, $cbf9 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cbff + ld b, $4 + call Function110000 + ld hl, $cbfd + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a0b + ld hl, $cbfd + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cc03 + ld b, $4 + call Function110000 + ld hl, $cc03 + call Function113a1f + ld hl, $cbfb + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cc03 + call Function113a0b + ld hl, $cbff + ld de, $cc03 + call Function113a15 + ret +; 1139b7 + +Function1139b7: ; 1139b7 + ld hl, $cbf9 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cbff + ld b, $4 + call Function110000 + ld hl, $cbfb + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a28 + ld hl, $cbfd + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a28 + ret +; 1139de + +Function1139de: ; 1139de + ld hl, $cbfd + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $cbff + ld b, $4 + call Function110000 + ld hl, $cbff + call Function113a1f + ld hl, $cbf9 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a15 + ld hl, $cbfb + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, $cbff + call Function113a28 + ret +; 113a0b + +Function113a0b: ; 113a0b + ld b, $4 +.asm_113a0d + ld a, [de] + inc de + and [hl] + ld [hli], a + dec b + jr nz, .asm_113a0d + ret +; 113a15 + +Function113a15: ; 113a15 + ld b, $4 +.asm_113a17 + ld a, [de] + inc de + or [hl] + ld [hli], a + dec b + jr nz, .asm_113a17 + ret +; 113a1f + +Function113a1f: ; 113a1f + ld b, $4 +.asm_113a21 + ld a, [hl] + cpl + ld [hli], a + dec b + jr nz, .asm_113a21 + ret +; 113a28 + +Function113a28: ; 113a28 + ld b, $4 +.asm_113a2a + ld a, [de] + inc de + xor [hl] + ld [hli], a + dec b + jr nz, .asm_113a2a + ret +; 113a32 + +Function113a32: ; 113a32 + ld a, [de] + inc de + add [hl] + ld [hli], a + ld b, $3 +.asm_113a38 + ld a, [de] + inc de + adc [hl] + ld [hli], a + dec b + jr nz, .asm_113a38 + ret +; 113a40 + +Function113a40: ; 113a40 +.asm_113a40 + or a + push hl + ld a, [hli] + rla + ld a, [hl] + rla + ld [hli], a + ld a, [hl] + rla + ld [hli], a + ld a, [hl] + rla + ld [hl], a + pop hl + ld a, [hl] + rla + ld [hl], a + dec b + jr nz, .asm_113a40 + ret +; 113a55 + +Unknown_113a55: ; 113a55 + ascii "Authorization: GB00 name=", $22, $0 +; 113a70 + +INCBIN "baserom.gbc", $113a70, $113b70 - $113a70 + +Unknown_113b70: ; 113b70 +INCBIN "baserom.gbc", $113b70, $113b7e - $113b70 + +Unknown_113b7e: ; 113b7e +INCBIN "baserom.gbc", $113b7e, $113c8e - $113b7e + +Function113c8e: ; 113c8e + ld a, c + ld [$cc10], a + ld a, b + ld [$cc11], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b + xor a + ld [$cc16], a + +.asm_113ca0 + ld b, $3 + push hl + ld hl, $cc12 +.asm_113ca6 + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .asm_113ca6 + ld a, [$cc10] + ld c, a + ld a, [$cc11] + ld b, a + xor a + or b + jr nz, .asm_113ccf + ld a, $2 + cp c + jr c, .asm_113ccf + push hl + dec hl + ld a, c + ld [$cc16], a +.asm_113cc3 + xor a + ld [hld], a + inc c + ld a, $3 + cp c + jr nz, .asm_113cc3 + pop hl + ld bc, $0003 + +.asm_113ccf + dec bc + dec bc + dec bc + ld a, c + ld [$cc10], a + ld a, b + ld [$cc11], a + push de + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + ld d, a + srl a + srl a + ld [hli], a + ld a, $3 + and d + ld d, a + ld a, $f0 + and b + or d + swap a + ld [hli], a + ld a, $f + and b + ld d, a + ld a, c + and $c0 + or d + rlca + rlca + ld [hli], a + ld a, $3f + and c + ld [hld], a + dec hl + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [$cc10] + cp $0 + jp nz, .asm_113ca0 + ld a, [$cc11] + cp $0 + jp nz, .asm_113ca0 + ld a, [$cc16] + cp $0 + jr z, .asm_113d43 + push hl + dec hl + ld b, a +.asm_113d39 + ld a, $3d + ld [hld], a + inc b + ld a, $3 + cp b + jr nz, .asm_113d39 + pop hl + +.asm_113d43 + ld a, $0 + ld [hl], a + ret +; 113d47 + +Function113d47: ; 113d47 + cp $1a + jr c, .asm_113d5a + cp $34 + jr c, .asm_113d5d + cp $3e + jr c, .asm_113d60 + cp $3e + jr z, .asm_113d63 + ld a, $2f + ret + +.asm_113d5a + add $41 + ret + +.asm_113d5d + add $47 + ret + +.asm_113d60 + sub $4 + ret + +.asm_113d63 + ld a, $2b + ret +; 113d66 + +Function113d66: ; 113d66 + ld a, c + ld [$cc10], a + ld a, b + ld [$cc11], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b +.asm_113d74 + ld a, [$cc11] + or a + jr nz, .asm_113d82 + ld a, [$cc10] + cp $4 + jp c, .asm_113e26 + +.asm_113d82 + ld b, $4 + push hl + ld hl, $cc12 +.asm_113d88 + ld a, [de] + inc de + call .Function113dfa + ld [hli], a + dec b + jr nz, .asm_113d88 + ld a, [$cc10] + ld c, a + ld a, [$cc11] + ld b, a + dec bc + dec bc + dec bc + dec bc + ld a, b + or c + jr z, .asm_113dae +.asm_113da1 + ld a, [de] + cp $d + jr z, .asm_113daa + cp $a + jr nz, .asm_113dae + +.asm_113daa + inc de + dec bc + jr .asm_113da1 + +.asm_113dae + ld a, c + ld [$cc10], a + ld a, b + ld [$cc11], a + push de + dec hl + ld d, [hl] + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + sla b + sla b + sla b + rla + sla b + rla + ld [hli], a + ld [hl], b + inc hl + rrc c + rrc c + ld [hl], c + dec hl + ld a, $f + and c + or [hl] + ld [hli], a + ld a, [hli] + and $c0 + or [hl] + dec hl + ld [hld], a + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + ld a, [$cc10] + or a + jr nz, .asm_113d74 + ld a, [$cc11] + or a + jp nz, .asm_113d74 + xor a + ld [hl], a + ret + +.Function113dfa + cp $2b + jr c, .asm_113e24 + jr z, .asm_113e31 + cp $2f + jr c, .asm_113e24 + jr z, .asm_113e34 + cp $30 + jr c, .asm_113e24 + cp $3a + jr c, .asm_113e37 + cp $3d + jr c, .asm_113e24 + jr z, .asm_113e3a + cp $41 + jr c, .asm_113e24 + cp $5b + jr c, .asm_113e3c + cp $61 + jr c, .asm_113e24 + cp $7b + jr c, .asm_113e3f + +.asm_113e24 + pop hl + pop hl +.asm_113e26 + ld hl, $c821 + set 1, [hl] + ld a, $20 + ld [$c80f], a + ret + +.asm_113e31 + ld a, $3e + ret + +.asm_113e34 + ld a, $3f + ret + +.asm_113e37 + add $4 + ret + +.asm_113e3a + xor a + ret + +.asm_113e3c + sub $41 + ret + +.asm_113e3f + sub $47 + ret +; 113e42 + +Function113e42: ; 113e42 + dec a + jr z, .asm_113e4f + dec a + jr z, .asm_113e85 + dec a + jr z, .asm_113ea8 + dec a + jr z, .asm_113eb0 + ret + +.asm_113e4f + ld a, [$c807] + cp $8 + jr nz, .asm_113e58 +.asm_113e56 + dec [hl] + ret + +.asm_113e58 + xor a + ld [$c86d], a + ld a, $2 + ld [$c86a], a + ld hl, $c821 + ld a, [hl] + and $10 + set 5, a + ld [hl], a + jp Function113eb8 + +.asm_113e6d + ld a, [$c86d] + or a + ld a, [$ca3c] + jr z, .asm_113e81 + cp $9f + jr z, .asm_113e85 + cp $a4 + jr z, .asm_113e85 +.asm_113e7e + jp Function112430 + +.asm_113e81 + cp $a3 + jr z, .asm_113e7e + +.asm_113e85 + xor a + ld [$c86d], a + ld [$c81e], a + ld a, $2 + ld [$c86a], a + ld a, $3 + ld [$c807], a + ld hl, $c821 + ld a, [hl] + and $10 + set 5, a + ld [hl], a + ld hl, $c822 + bit 0, [hl] + call z, Function111f97 + ret + +.asm_113ea8 + ld a, [$c807] + cp $8 + jr z, .asm_113e56 + ret + +.asm_113eb0 + ld a, $1 + ld [$c86b], a + jp .asm_113e6d +; 113eb8 + +Function113eb8: ; 113eb8 + ld a, $ff + ld [$c81e], a + ld hl, $c822 + res 5, [hl] + res 0, [hl] + jp Function111f97 +; 113ec7 + +Function113ec7: ; 113ec7 +; Unreferenced + ld hl, $c822 + ld a, [hl] + push af + res 3, [hl] + res 0, [hl] + ld hl, $c81a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hld] + dec hl + xor $80 + ld [$c81e], a + ld b, $5 + call Function111f07 + pop af + bit 0, a + ret z + ld hl, $c822 + set 0, [hl] + ret +; 113ef2 + +Function113ef2: ; 113ef2 + dec a + jr z, .asm_113efa + dec a + jr z, .asm_113f03 + dec [hl] + ret + +.asm_113efa + ld a, [$c807] + cp $8 + jr nz, Function113eb8 + dec [hl] + ret + +.asm_113f03 + ld a, $26 + call Function11225d + ld a, $2a + ld [$c86a], a + ld hl, $c820 + ld a, [hld] + ld h, [hl] + ld l, a + ld e, l + ld d, h + add hl, de + add hl, de + ld e, l + ld d, h + ld hl, $c815 + ld e, a + ld [hli], a + ld a, d + ld [hl], a + xor a + ld [$c800], a + ld hl, $cb47 + ld a, $2 + ld [hli], a + dec a + ld [hl], a + ret +; 113f2d + +Function113f2d: ; 113f2d + dec a + jr z, .asm_113f35 + dec a + jr z, .asm_113f4f + dec [hl] + ret + +.asm_113f35 + ld a, [$c807] + cp $8 + jr nz, .asm_113f3e + dec [hl] + ret + +.asm_113f3e + xor a + ld [$ca3c], a + ld [$ca2f], a + ld a, [$c81e] + cp $91 + jr z, .asm_113f4f + jp Function113eb8 + +.asm_113f4f + xor a + ld [$c86d], a + ld hl, $c821 + set 0, [hl] + ld hl, $c822 + xor a + ld [hl], a + xor a + ld [$c80b], a + xor a + ld [$cb47], a + ld hl, $c820 + ld a, [hld] + ld h, [hl] + ld l, a + ld e, l + ld d, h + add hl, de + add hl, de + ld e, l + ld d, h + ld hl, $c815 + ld e, a + ld [hli], a + ld a, d + ld [hl], a + xor a + ld [$c800], a + ld hl, $cb47 + xor a + ld [hli], a + inc a + ld [hl], a + ret +; 113f84 From 5708cf75690d066c6e72f0e99d1aba2cfa54f774 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 30 Apr 2014 05:40:22 -0400 Subject: [PATCH 11/18] Fix some static addresses in maps. --- maps/BattleTower1F.asm | 3 +++ maps/BattleTowerHallway.asm | 8 ++++---- maps/DragonsDenB1F.asm | 2 +- maps/ElmsLab.asm | 3 ++- maps/GoldenrodPokeComCenter2FMobile.asm | 2 +- maps/LancesRoom.asm | 6 +++--- maps/Route35NationalParkgate.asm | 4 +++- maps/second_map_headers.asm | 8 ++++---- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm index 98425ae66..b229feef6 100644 --- a/maps/BattleTower1F.asm +++ b/maps/BattleTower1F.asm @@ -308,6 +308,7 @@ MovementData_0x9e578: ; 0x9e578 MovementData_0x9e57a: ; 0x9e57a step_right step_right +MovementData_0x9e57c: ; 0x9e57c step_right step_right step_up @@ -319,8 +320,10 @@ MovementData_0x9e57a: ; 0x9e57a MovementData_0x9e582: ; 0x9e582 step_left step_left +MovementData_0x9e584: ; 0x9e584 step_left step_left +MovementData_0x9e586: ; 0x9e586 step_left step_left step_up diff --git a/maps/BattleTowerHallway.asm b/maps/BattleTowerHallway.asm index 43f1d4fe7..c9c2f4f85 100644 --- a/maps/BattleTowerHallway.asm +++ b/maps/BattleTowerHallway.asm @@ -55,17 +55,17 @@ UnknownScript_0x9f5dc: ; 0x9f5dc ; 0x9f603 UnknownScript_0x9f603: ; 0x9f603 - applymovement $2, $657c + applymovement $2, MovementData_0x9e57c 2jump UnknownScript_0x9f61f ; 0x9f60a UnknownScript_0x9f60a: ; 0x9f60a - applymovement $2, $6586 + applymovement $2, MovementData_0x9e586 2jump UnknownScript_0x9f61f ; 0x9f611 UnknownScript_0x9f611: ; 0x9f611 - applymovement $2, $6584 + applymovement $2, MovementData_0x9e584 2jump UnknownScript_0x9f61f ; 0x9f618 @@ -81,7 +81,7 @@ UnknownScript_0x9f61f: ; 0x9f61f closetext loadmovesprites stopfollow - applymovement $0, $6576 + applymovement $0, MovementData_0x9e576 warpcheck end ; 0x9f62f diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm index ebd4cddaa..e4be7d72b 100644 --- a/maps/DragonsDenB1F.asm +++ b/maps/DragonsDenB1F.asm @@ -542,7 +542,7 @@ DragonsDenB1F_MapEventHeader: ; 0x18cf73 person_event SPRITE_SILVER, 27, 24, $2, $22, 255, 255, $0, 0, SilverScript_0x18c97e, $06c6 person_event SPRITE_COOLTRAINER_M, 12, 24, $7, $0, 255, 255, $82, 4, TrainerCooltrainermDarin, $ffff person_event SPRITE_COOLTRAINER_F, 12, 12, $6, $0, 255, 255, $82, 3, TrainerCooltrainerfCara, $ffff - person_event SPRITE_TWIN, 21, 8, $9, $0, 255, 255, $82, 1, $4932, $ffff + person_event SPRITE_TWIN, 21, 8, $9, $0, 255, 255, $82, 1, TrainerTwinsLeaandpia1, $ffff person_event SPRITE_TWIN, 22, 8, $9, $0, 255, 255, $82, 1, TrainerTwinsLeaandpia2, $ffff person_event SPRITE_POKE_BALL, 8, 34, $1, $0, 255, 255, $1, 0, ItemFragment_0x18c9a1, $07bf person_event SPRITE_POKE_BALL, 24, 9, $1, $0, 255, 255, $1, 0, ItemFragment_0x18c9a3, $07c0 diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm index 6f10e9391..b98a8c70a 100644 --- a/maps/ElmsLab.asm +++ b/maps/ElmsLab.asm @@ -599,6 +599,7 @@ UnknownScript_0x78f12: ; 0x78f12 MeetCopScript: ; 0x78f16 applymovement $0, MovementData_0x78f74 +CopScript: ; 0x78f1a spriteface $7, $2 loadfont 2writetext UnknownText_0x7a0f0 @@ -1552,6 +1553,6 @@ ElmsLab_MapEventHeader: ; 0x7a3de person_event SPRITE_POKE_BALL, 7, 10, $1, $0, 255, 255, $0, 0, CyndaquilPokeBallScript, $0640 person_event SPRITE_POKE_BALL, 7, 11, $1, $0, 255, 255, $0, 0, TotodilePokeBallScript, $0641 person_event SPRITE_POKE_BALL, 7, 12, $1, $0, 255, 255, $0, 0, ChikoritaPokeBallScript, $0642 - person_event SPRITE_OFFICER, 7, 9, $7, $0, 255, 255, $90, 0, $4f1a, $0702 + person_event SPRITE_OFFICER, 7, 9, $7, $0, 255, 255, $90, 0, CopScript, $0702 ; 0x7a4cc diff --git a/maps/GoldenrodPokeComCenter2FMobile.asm b/maps/GoldenrodPokeComCenter2FMobile.asm index 624555c35..eb16abcde 100644 --- a/maps/GoldenrodPokeComCenter2FMobile.asm +++ b/maps/GoldenrodPokeComCenter2FMobile.asm @@ -75,7 +75,7 @@ MapGoldenrodPokeComCenter2FMobileSignpost1Script: ; 0x62624 closetext UnknownScript_0x62629: ; 0x62629 reloadmappart - loadmenudata $664c + loadmenudata MenuDataHeader_0x6264c interpretmenu2 writebackup if_equal $1, UnknownScript_0x6263a diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm index ee67ac8c1..4c18799f2 100644 --- a/maps/LancesRoom.asm +++ b/maps/LancesRoom.asm @@ -51,13 +51,13 @@ UnknownScript_0x180e53: ; 0x180e53 UnknownScript_0x180e6a: ; 0x180e6a special $006a applymovement $0, MovementData_0x180f38 - 2jump UnknownScript_0x180e7b + 2jump LanceScript_0x180e7b ; 0x180e74 UnknownScript_0x180e74: ; 0x180e74 special $006a applymovement $0, MovementData_0x180f3c -UnknownScript_0x180e7b: ; 0x180e7b +LanceScript_0x180e7b: ; 0x180e7b spriteface $2, $2 loadfont 2writetext UnknownText_0x180f67 @@ -385,7 +385,7 @@ LancesRoom_MapEventHeader: ; 0x1813f4 ; people-events db 3 - person_event SPRITE_LANCE, 7, 9, $6, $0, 255, 255, $0, 0, $4e7b, $ffff + person_event SPRITE_LANCE, 7, 9, $6, $0, 255, 255, $0, 0, LanceScript_0x180e7b, $ffff person_event SPRITE_TEACHER, 11, 8, $7, $0, 255, 255, $a0, 0, ObjectEvent, $075f person_event SPRITE_OAK, 11, 8, $7, $0, 255, 255, $0, 0, ObjectEvent, $075f ; 0x181445 diff --git a/maps/Route35NationalParkgate.asm b/maps/Route35NationalParkgate.asm index e0a07a0cc..fa53f19f5 100644 --- a/maps/Route35NationalParkgate.asm +++ b/maps/Route35NationalParkgate.asm @@ -143,9 +143,11 @@ UnknownScript_0x6a26c: ; 0x6a26c UnknownScript_0x6a271: ; 0x6a271 checkcode $1 - if_less_than $6, $627d + if_less_than $6, UnknownScript_0x6a27d checkcode $10 if_equal $0, UnknownScript_0x6a2b5 + +UnknownScript_0x6a27d: ; 6a27d special $005a if_equal $1, UnknownScript_0x6a2bb 2writetext UnknownText_0x6a4c6 diff --git a/maps/second_map_headers.asm b/maps/second_map_headers.asm index 70e7d69ad..4ad9c6475 100644 --- a/maps/second_map_headers.asm +++ b/maps/second_map_headers.asm @@ -587,7 +587,7 @@ Route30_SecondMapHeader: ; 0x9500c ; NORTH to Route 31 db GROUP_ROUTE_31, MAP_ROUTE_31 ; connected map (group, id) - dw $7288 ; strip pointer + dw (Route31_BlockData + ((ROUTE_31_HEIGHT - 3) * ROUTE_31_WIDTH) + 7) ; strip pointer dw ($C703 + 253) ; strip destination db 13, ROUTE_31_WIDTH ; (connection strip length, connected map width) db ((ROUTE_31_HEIGHT * 2) - 1), 20 ; yoffset, xoffset @@ -1351,7 +1351,7 @@ Route1_SecondMapHeader: ; 0x9530c ; NORTH to Viridian City db GROUP_VIRIDIAN_CITY, MAP_VIRIDIAN_CITY ; connected map (group, id) - dw $6d9c ; strip pointer + dw (ViridianCity_BlockData + ((VIRIDIAN_CITY_HEIGHT - 3) * VIRIDIAN_CITY_WIDTH) + 7) ; strip pointer dw ($C703 + 253) ; strip destination db 13, VIRIDIAN_CITY_WIDTH ; (connection strip length, connected map width) db ((VIRIDIAN_CITY_HEIGHT * 2) - 1), 20 ; yoffset, xoffset @@ -1611,7 +1611,7 @@ Route18_SecondMapHeader: ; 0x95414 ; WEST to Route 17 db GROUP_ROUTE_17, MAP_ROUTE_17 ; connected map (group, id) - dw $7152 ; strip pointer + dw (Route17_BlockData + ((ROUTE_17_HEIGHT - 10) * ROUTE_17_WIDTH) + 7) ; strip pointer dw $c800 ; strip destination db 10, ROUTE_17_WIDTH ; (connection strip length, connected map width) db 76, ((ROUTE_17_WIDTH * 2) - 1) ; yoffset, xoffset @@ -2443,7 +2443,7 @@ Route10North_SecondMapHeader: ; 0x95768 ; NORTH to Route 9 db GROUP_ROUTE_9, MAP_ROUTE_9 ; connected map (group, id) - dw $7eae ; strip pointer + dw (Route9_BlockData + ((ROUTE_9_HEIGHT - 3) * ROUTE_9_WIDTH) + 17) ; strip pointer dw ($C703 + 253) ; strip destination db 13, ROUTE_9_WIDTH ; (connection strip length, connected map width) db ((ROUTE_9_HEIGHT * 2) - 1), 40 ; yoffset, xoffset From ce59c9a84f34600dff097858ab3d00d55eaeaf78 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 30 Apr 2014 06:04:35 -0400 Subject: [PATCH 12/18] Music and sound effect constants in map events. --- maps/AzaleaGym.asm | 2 +- maps/AzaleaTown.asm | 6 +-- maps/BattleTowerBattleRoom.asm | 4 +- maps/BattleTowerElevator.asm | 2 +- maps/BlackthornGym1F.asm | 2 +- maps/BlackthornGym2F.asm | 2 +- maps/BluesHouse.asm | 2 +- maps/BrunosRoom.asm | 4 +- maps/BurnedTower1F.asm | 8 ++-- maps/BurnedTowerB1F.asm | 14 +++--- maps/CeladonCafe.asm | 2 +- maps/CeladonDeptStore6F.asm | 2 +- maps/CeladonDeptStoreElevator.asm | 2 +- maps/CeladonGameCornerPrizeRoom.asm | 8 ++-- maps/CeladonGym.asm | 2 +- maps/CeladonMansion3F.asm | 2 +- maps/CeladonPokeCenter1F.asm | 2 +- maps/CeruleanCity.asm | 16 +++---- maps/CeruleanGym.asm | 8 ++-- maps/CherrygroveCity.asm | 12 ++--- maps/CianwoodCity.asm | 8 ++-- maps/CianwoodGym.asm | 4 +- maps/CianwoodPharmacy.asm | 2 +- maps/CinnabarIsland.asm | 2 +- maps/DayCare.asm | 2 +- maps/DragonShrine.asm | 10 ++--- maps/DragonsDenB1F.asm | 8 ++-- maps/EcruteakGym.asm | 4 +- maps/EcruteakPokeCenter1F.asm | 4 +- maps/ElmsLab.asm | 12 ++--- maps/FastShip1F.asm | 8 ++-- maps/FastShipCabins.asm | 2 +- maps/FastShipCabins_NNW_NNE_NE.asm | 6 +-- maps/FastShipCabins_SE_SSE_CaptainsCabin.asm | 2 +- maps/FastShipCabins_SW_SSW_NW.asm | 4 +- maps/FuchsiaGym.asm | 2 +- maps/GoldenrodBikeShop.asm | 2 +- maps/GoldenrodBillsHouse.asm | 4 +- maps/GoldenrodCity.asm | 4 +- maps/GoldenrodDeptStore6F.asm | 2 +- maps/GoldenrodDeptStoreElevator.asm | 2 +- maps/GoldenrodGameCorner.asm | 8 ++-- maps/GoldenrodGym.asm | 2 +- maps/GoldenrodPokeCenter1F.asm | 12 ++--- maps/IcePathB1F.asm | 2 +- maps/IndigoPlateauPokeCenter1F.asm | 8 ++-- maps/KarensRoom.asm | 4 +- maps/KogasRoom.asm | 4 +- maps/KrissHouse1F.asm | 4 +- maps/KrissHouse2F.asm | 2 +- maps/KrissNeighborsHouse.asm | 2 +- maps/KurtsHouse.asm | 14 +++--- maps/LakeofRage.asm | 4 +- maps/LancesRoom.asm | 8 ++-- maps/MahoganyGym.asm | 2 +- maps/MahoganyMart1F.asm | 6 +-- maps/MahoganyTown.asm | 2 +- maps/ManiasHouse.asm | 2 +- maps/MobileBattleRoom.asm | 2 +- maps/MountMoon.asm | 4 +- maps/MountMortarB1F.asm | 2 +- maps/MrPokemonsHouse.asm | 10 ++--- maps/NewBarkTown.asm | 6 +-- maps/OlivineCity.asm | 8 ++-- maps/OlivineGym.asm | 2 +- maps/OlivineLighthouse6F.asm | 2 +- maps/OlivinePort.asm | 4 +- maps/PewterGym.asm | 2 +- maps/PokeCenter2F.asm | 10 ++--- maps/PokemonFanClub.asm | 2 +- maps/PowerPlant.asm | 2 +- maps/RadioTower1F.asm | 20 ++++----- maps/RadioTower2F.asm | 6 +-- maps/RadioTower3F.asm | 2 +- maps/RadioTower5F.asm | 6 +-- maps/Route24.asm | 4 +- maps/Route25.asm | 4 +- maps/Route26HealSpeechHouse.asm | 2 +- maps/Route30.asm | 6 +-- maps/Route34.asm | 6 +-- maps/Route35.asm | 2 +- maps/Route35Goldenrodgate.asm | 2 +- maps/Route35NationalParkgate.asm | 8 ++-- maps/Route36.asm | 6 +-- maps/Route36NationalParkgate.asm | 8 ++-- maps/Route39Barn.asm | 2 +- maps/Route39Farmhouse.asm | 2 +- maps/Route42.asm | 2 +- maps/Route43Gate.asm | 2 +- maps/RuinsofAlphAerodactylChamber.asm | 6 +-- maps/RuinsofAlphHoOhChamber.asm | 6 +-- maps/RuinsofAlphKabutoChamber.asm | 6 +-- maps/RuinsofAlphOmanyteChamber.asm | 6 +-- maps/RuinsofAlphOutside.asm | 2 +- maps/RuinsofAlphResearchCenter.asm | 10 ++--- maps/SaffronGym.asm | 2 +- maps/SeafoamGym.asm | 2 +- maps/SproutTower3F.asm | 12 ++--- maps/TeamRocketBaseB1F.asm | 46 ++++++++++---------- maps/TeamRocketBaseB2F.asm | 6 +-- maps/TeamRocketBaseB3F.asm | 10 ++--- maps/TinTower1F.asm | 22 +++++----- maps/UndergroundPathSwitchRoomEntrances.asm | 28 ++++++------ maps/VermilionGym.asm | 2 +- maps/VermilionPort.asm | 4 +- maps/VictoryRoad.asm | 4 +- maps/VioletCity.asm | 4 +- maps/VioletGym.asm | 2 +- maps/VioletPokeCenter1F.asm | 4 +- maps/ViridianGym.asm | 2 +- maps/WarehouseEntrance.asm | 6 +-- maps/WillsRoom.asm | 4 +- 112 files changed, 312 insertions(+), 312 deletions(-) diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm index 6d5db0b19..1181cc37e 100644 --- a/maps/AzaleaGym.asm +++ b/maps/AzaleaGym.asm @@ -21,7 +21,7 @@ BugsyScript_0x18ec1e: ; 0x18ec1e setevent EVENT_BEAT_BUGSY loadfont 2writetext UnknownText_0x18ee14 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $001c checkcode $7 diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm index dd9567bbb..4000f9d61 100644 --- a/maps/AzaleaTown.asm +++ b/maps/AzaleaTown.asm @@ -53,7 +53,7 @@ UnknownScript_0x198034: ; 0x198034 applymovement $b, MovementData_0x19813c spriteface $0, $1 UnknownScript_0x198049: ; 0x198049 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x19814d closetext @@ -93,14 +93,14 @@ UnknownScript_0x198081: ; 0x198081 ; 0x198091 UnknownScript_0x198091: ; 0x198091 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x198233 closetext loadmovesprites spriteface $0, $2 applymovement $b, MovementData_0x198144 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $b dotrigger $0 waitbutton diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm index 8dba68b55..8668d9856 100644 --- a/maps/BattleTowerBattleRoom.asm +++ b/maps/BattleTowerBattleRoom.asm @@ -48,7 +48,7 @@ UnknownScript_0x9f425: ; 0x9f425 2writetext UnknownText_0x9ee92 closetext loadmovesprites - playmusic $000d + playmusic MUSIC_HEAL special $002e special $00a4 pause 60 @@ -75,7 +75,7 @@ UnknownScript_0x9f483: ; 0x9f483 special $0086 writebyte $3 special $0086 - playsound $0025 + playsound SFX_SAVE waitbutton special $002e special $007e diff --git a/maps/BattleTowerElevator.asm b/maps/BattleTowerElevator.asm index a0874bf4f..4314730d1 100644 --- a/maps/BattleTowerElevator.asm +++ b/maps/BattleTowerElevator.asm @@ -25,7 +25,7 @@ UnknownScript_0x9f568: ; 0x9f568 applymovement $0, MovementData_0x9f592 writebyte $a special $0086 - playsound $006e + playsound SFX_ELEVATOR earthquake 60 waitbutton follow $2, $0 diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm index b4a2a4d40..f10f1f2f3 100644 --- a/maps/BlackthornGym1F.asm +++ b/maps/BlackthornGym1F.asm @@ -72,7 +72,7 @@ UnknownScript_0x194e69: ; 0x194e69 iffalse UnknownScript_0x194e8e itemtotext TM_24, $0 2writetext UnknownText_0x1951bf - playsound $0001 + playsound SFX_ITEM waitbutton itemnotify setevent EVENT_GOT_TM24_DRAGONBREATH diff --git a/maps/BlackthornGym2F.asm b/maps/BlackthornGym2F.asm index 9da3d6617..a941e9c6a 100644 --- a/maps/BlackthornGym2F.asm +++ b/maps/BlackthornGym2F.asm @@ -59,7 +59,7 @@ UnknownScript_0x19574c: ; 0x19574c ; 0x195758 UnknownScript_0x195758: ; 0x195758 - playsound $001b + playsound SFX_STRENGTH earthquake 80 end ; 0x19575e diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm index a6c528db2..dee311fdf 100644 --- a/maps/BluesHouse.asm +++ b/maps/BluesHouse.asm @@ -33,7 +33,7 @@ UnknownScript_0x19b0de: ; 0x19b0de closetext loadmovesprites special $002e - playmusic $000d + playmusic MUSIC_HEAL pause 60 special $0031 special $003d diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm index ae87a3928..a3ef29365 100644 --- a/maps/BrunosRoom.asm +++ b/maps/BrunosRoom.asm @@ -38,7 +38,7 @@ UnknownScript_0x1809ac: ; 0x1809ac UnknownScript_0x1809ad: ; 0x1809ad applymovement $0, MovementData_0x1809f9 refreshscreen $86 - playsound $001b + playsound SFX_STRENGTH earthquake 80 changeblock $4, $e, $2a reloadmappart @@ -66,7 +66,7 @@ BrunoScript_0x1809c5: ; 0x1809c5 2writetext UnknownText_0x180b3c closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR changeblock $4, $2, $16 reloadmappart loadmovesprites diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm index f73933fab..34346b3d3 100644 --- a/maps/BurnedTower1F.asm +++ b/maps/BurnedTower1F.asm @@ -61,7 +61,7 @@ UnknownScript_0x185c25: ; 0x185c25 pause 15 applymovement $0, MovementData_0x185ccd applymovement $4, MovementData_0x185ccf - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x185cd9 closetext @@ -100,7 +100,7 @@ UnknownScript_0x185c70: ; 0x185c70 ; 0x185c80 UnknownScript_0x185c80: ; 0x185c80 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x185de2 closetext @@ -111,13 +111,13 @@ UnknownScript_0x185c80: ; 0x185c80 pause 15 earthquake 50 showemote $0, $0, 15 - playsound $001f + playsound SFX_ENTER_DOOR waitbutton changeblock $a, $8, $25 reloadmappart pause 15 applymovement $0, MovementData_0x185cd1 - playsound $002f + playsound SFX_KINESIS showemote $0, $4, 20 loadfont 2writetext UnknownText_0x185e75 diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm index e5cc4ced1..686996354 100644 --- a/maps/BurnedTowerB1F.asm +++ b/maps/BurnedTowerB1F.asm @@ -31,7 +31,7 @@ UnknownScript_0x18616a: ; 0x18616a ; 0x18616b UnknownScript_0x18616b: ; 0x18616b - playmusic $0000 + playmusic MUSIC_NONE pause 30 appear $3 spriteface $0, $1 @@ -52,28 +52,28 @@ UnknownScript_0x18616b: ; 0x18616b pause 15 cry SUICUNE pause 15 - playsound $0014 + playsound SFX_WARP_FROM spriteface $0, $2 applymovement $3, MovementData_0x186236 disappear $3 waitbutton - playsound $0014 + playsound SFX_WARP_FROM spriteface $0, $3 applymovement $4, MovementData_0x18623b disappear $4 waitbutton pause 15 - playsound $0014 + playsound SFX_WARP_FROM spriteface $0, $1 applymovement $5, MovementData_0x186241 - playsound $0014 + playsound SFX_WARP_FROM spriteface $0, $0 applymovement $5, MovementData_0x186248 spriteface $0, $1 pause 20 cry SUICUNE pause 30 - playsound $0014 + playsound SFX_WARP_FROM applymovement $5, MovementData_0x186253 spriteface $0, $0 disappear $5 @@ -114,7 +114,7 @@ UnknownScript_0x186226: ; 0x186226 applymovement $a, MovementData_0x18625c UnknownScript_0x18622a: ; 0x18622a disappear $a - playsound $0023 + playsound SFX_EXIT_BUILDING waitbutton end ; 0x186231 diff --git a/maps/CeladonCafe.asm b/maps/CeladonCafe.asm index 10e98ed70..50a9a6376 100644 --- a/maps/CeladonCafe.asm +++ b/maps/CeladonCafe.asm @@ -99,7 +99,7 @@ MapCeladonCafeSignpost1Script: ; 0x730b0 loadfont itemtotext LEFTOVERS, $0 2writetext UnknownText_0x732e7 - playsound $0001 + playsound SFX_ITEM waitbutton itemnotify loadmovesprites diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm index 8508e9830..e1625c26c 100644 --- a/maps/CeladonDeptStore6F.asm +++ b/maps/CeladonDeptStore6F.asm @@ -70,7 +70,7 @@ UnknownScript_0x711ce: ; 0x711ce UnknownScript_0x711e8: ; 0x711e8 pause 10 - playsound $001f + playsound SFX_ENTER_DOOR 2writetext UnknownText_0x71274 keeptextopen itemnotify diff --git a/maps/CeladonDeptStoreElevator.asm b/maps/CeladonDeptStoreElevator.asm index aa2ed2cf8..5d45c7bb8 100644 --- a/maps/CeladonDeptStoreElevator.asm +++ b/maps/CeladonDeptStoreElevator.asm @@ -12,7 +12,7 @@ MapCeladonDeptStoreElevatorSignpost0Script: ; 0x713ad loadmovesprites iffalse UnknownScript_0x713bd pause 5 - playsound $006e + playsound SFX_ELEVATOR earthquake 60 waitbutton UnknownScript_0x713bd: ; 0x713bd diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm index c7065e0c1..25a8162fa 100644 --- a/maps/CeladonGameCornerPrizeRoom.asm +++ b/maps/CeladonGameCornerPrizeRoom.asm @@ -77,7 +77,7 @@ UnknownScript_0x72768: ; 0x72768 UnknownScript_0x7276d: ; 0x7276d waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x729ad closetext 2jump UnknownScript_0x726fd @@ -158,7 +158,7 @@ UnknownScript_0x727ed: ; 0x727ed 2call UnknownScript_0x72768 iffalse UnknownScript_0x72784 waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x729ad closetext writebyte PIKACHU @@ -177,7 +177,7 @@ UnknownScript_0x7281b: ; 0x7281b 2call UnknownScript_0x72768 iffalse UnknownScript_0x72784 waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x729ad closetext writebyte PORYGON @@ -196,7 +196,7 @@ UnknownScript_0x72849: ; 0x72849 2call UnknownScript_0x72768 iffalse UnknownScript_0x72784 waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x729ad closetext writebyte LARVITAR diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm index f6426f8c4..34ccccc83 100644 --- a/maps/CeladonGym.asm +++ b/maps/CeladonGym.asm @@ -25,7 +25,7 @@ ErikaScript_0x72a6a: ; 0x72a6a setevent EVENT_BEAT_TWINS_JO_AND_ZOE loadfont 2writetext UnknownText_0x72c96 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0026 UnknownScript_0x72a9b: ; 0x72a9b diff --git a/maps/CeladonMansion3F.asm b/maps/CeladonMansion3F.asm index e05564271..95f44697f 100644 --- a/maps/CeladonMansion3F.asm +++ b/maps/CeladonMansion3F.asm @@ -20,7 +20,7 @@ CooltrainerMScript_0x71670: ; 0x71670 UnknownScript_0x7167e: ; 0x7167e keeptextopen 2writetext UnknownText_0x71725 - playsound $00a3 + playsound SFX_DEX_FANFARE_230_PLUS waitbutton 2writetext UnknownText_0x71760 keeptextopen diff --git a/maps/CeladonPokeCenter1F.asm b/maps/CeladonPokeCenter1F.asm index dc1a9a99f..ff964082d 100644 --- a/maps/CeladonPokeCenter1F.asm +++ b/maps/CeladonPokeCenter1F.asm @@ -53,7 +53,7 @@ UnknownScript_0x71e5a: ; 0x71e5a applymovement $6, MovementData_0x71e65 UnknownScript_0x71e5e: ; 0x71e5e disappear $6 - playsound $0023 + playsound SFX_EXIT_BUILDING waitbutton end ; 0x71e65 diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm index f92804d08..374a57679 100644 --- a/maps/CeruleanCity.asm +++ b/maps/CeruleanCity.asm @@ -103,21 +103,21 @@ YoungsterScript_0x184064: ; 0x184064 UnknownScript_0x184072: ; 0x184072 waitbutton - playsound $0012 + playsound SFX_SECOND_PART_OF_ITEMFINDER waitbutton - playsound $0022 + playsound SFX_TRANSACTION waitbutton - playsound $0012 + playsound SFX_SECOND_PART_OF_ITEMFINDER waitbutton - playsound $0022 + playsound SFX_TRANSACTION waitbutton - playsound $0012 + playsound SFX_SECOND_PART_OF_ITEMFINDER waitbutton - playsound $0022 + playsound SFX_TRANSACTION waitbutton - playsound $0012 + playsound SFX_SECOND_PART_OF_ITEMFINDER waitbutton - playsound $0022 + playsound SFX_TRANSACTION waitbutton showemote $0, $7, 15 spriteface $7, $2 diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm index 2efde060a..d1f2ddb5f 100644 --- a/maps/CeruleanGym.asm +++ b/maps/CeruleanGym.asm @@ -21,9 +21,9 @@ UnknownScript_0x1883da: ; 0x1883da UnknownScript_0x1883de: ; 0x1883de applymovement $2, MovementData_0x1884e3 - playsound $0041 + playsound SFX_TACKLE applymovement $2, MovementData_0x1884eb - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER loadfont 2writetext UnknownText_0x1884fb closetext @@ -40,7 +40,7 @@ UnknownScript_0x1883de: ; 0x1883de closetext loadmovesprites applymovement $2, MovementData_0x1884e8 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 setevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM clearevent $076c @@ -74,7 +74,7 @@ MistyScript_0x188432: ; 0x188432 setevent EVENT_BEAT_SWIMMERM_PARKER loadfont 2writetext UnknownText_0x188768 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0024 UnknownScript_0x188460: ; 0x188460 diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm index a29f53b91..f2573913b 100644 --- a/maps/CherrygroveCity.asm +++ b/maps/CherrygroveCity.asm @@ -40,7 +40,7 @@ UnknownScript_0x19c01f: ; 0x19c01f 2writetext UnknownText_0x19c26f closetext loadmovesprites - playmusic $0011 + playmusic MUSIC_SHOW_ME_AROUND follow $2, $0 applymovement $2, MovementData_0x19c195 loadfont @@ -85,7 +85,7 @@ UnknownScript_0x19c01f: ; 0x19c01f special $003d spriteface $0, $1 applymovement $2, MovementData_0x19c1cb - playsound $001f + playsound SFX_ENTER_DOOR disappear $2 clearevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE waitbutton @@ -118,7 +118,7 @@ UnknownScript_0x19c0ae: ; 0x19c0ae appear $3 applymovement $3, MovementData_0x19c1ce spriteface $0, $3 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x19c4e2 closetext @@ -163,7 +163,7 @@ UnknownScript_0x19c104: ; 0x19c104 ; 0x19c11a UnknownScript_0x19c11a: ; 0x19c11a - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x19c608 closetext @@ -172,13 +172,13 @@ UnknownScript_0x19c11a: ; 0x19c11a ; 0x19c126 UnknownScript_0x19c126: ; 0x19c126 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x19c59e closetext loadmovesprites UnknownScript_0x19c12f: ; 0x19c12f - playsound $0041 + playsound SFX_TACKLE applymovement $0, MovementData_0x19c1d4 spriteface $0, $2 applymovement $3, MovementData_0x19c1da diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm index 8f4192e98..1339de71b 100644 --- a/maps/CianwoodCity.asm +++ b/maps/CianwoodCity.asm @@ -36,11 +36,11 @@ UnknownScript_0x1a001e: ; 0x1a001e spriteface $0, $1 showemote $0, $0, 15 pause 15 - playsound $0014 + playsound SFX_WARP_FROM applymovement $d, MovementData_0x1a00da spriteface $0, $0 pause 15 - playsound $0014 + playsound SFX_WARP_FROM applymovement $d, MovementData_0x1a00e0 disappear $d pause 10 @@ -50,7 +50,7 @@ UnknownScript_0x1a001e: ; 0x1a001e checkevent $0333 iftrue UnknownScript_0x1a0083 setevent $0333 - playmusic $0061 + playmusic MUSIC_MYSTICALMAN_ENCOUNTER appear $c applymovement $c, MovementData_0x1a00e7 loadfont @@ -63,7 +63,7 @@ UnknownScript_0x1a001e: ; 0x1a001e startbattle reloadmapmusic returnafterbattle - playmusic $0061 + playmusic MUSIC_MYSTICALMAN_ENCOUNTER loadfont 2writetext UnknownText_0x1a05c3 closetext diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm index a920a7155..6b271d51d 100644 --- a/maps/CianwoodGym.asm +++ b/maps/CianwoodGym.asm @@ -20,7 +20,7 @@ ChuckScript_0x9d60f: ; 0x9d60f closetext loadmovesprites applymovement $7, MovementData_0x9d6f3 - playsound $001b + playsound SFX_STRENGTH earthquake 80 disappear $7 pause 30 @@ -36,7 +36,7 @@ ChuckScript_0x9d60f: ; 0x9d60f setevent EVENT_BEAT_CHUCK loadfont 2writetext UnknownText_0x9d835 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0020 checkcode $7 diff --git a/maps/CianwoodPharmacy.asm b/maps/CianwoodPharmacy.asm index 2b0dbc3fc..a16097af8 100644 --- a/maps/CianwoodPharmacy.asm +++ b/maps/CianwoodPharmacy.asm @@ -24,7 +24,7 @@ PharmacistScript_0x9df9e: ; 0x9df9e keeptextopen giveitem SECRETPOTION, $1 2writetext UnknownText_0x9e056 - playsound $0091 + playsound SFX_KEY_ITEM waitbutton itemnotify setevent EVENT_GOT_SECRETPOTION_FROM_PHARMACY diff --git a/maps/CinnabarIsland.asm b/maps/CinnabarIsland.asm index 2df937c70..3d9ea00ed 100644 --- a/maps/CinnabarIsland.asm +++ b/maps/CinnabarIsland.asm @@ -21,7 +21,7 @@ BlueScript_0x1ac9b0: ; 0x1ac9b0 2writetext UnknownText_0x1ac9d2 closetext loadmovesprites - playsound $0013 + playsound SFX_WARP_TO applymovement $2, MovementData_0x1ac9d0 disappear $2 clearevent $0776 diff --git a/maps/DayCare.asm b/maps/DayCare.asm index ce4e30294..0e1cc2441 100644 --- a/maps/DayCare.asm +++ b/maps/DayCare.asm @@ -37,7 +37,7 @@ GrampsScript_0x62f8f: ; 0x62f8f special $007d loadfont 2writetext UnknownText_0x631ae - playsound $0091 + playsound SFX_KEY_ITEM waitbutton 2writetext UnknownText_0x631c3 closetext diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm index 699e72240..942f72705 100644 --- a/maps/DragonShrine.asm +++ b/maps/DragonShrine.asm @@ -119,9 +119,9 @@ UnknownScript_0x18d100: ; 0x18d100 2writetext UnknownText_0x18d47c closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR showemote $0, $0, 15 - playmusic $005d + playmusic MUSIC_CLAIR appear $5 waitbutton spriteface $0, $0 @@ -161,7 +161,7 @@ UnknownScript_0x18d100: ; 0x18d100 2writetext UnknownText_0x18d9bf closetext setflag $0022 - playsound $009c + playsound SFX_GET_BADGE waitbutton special $003d specialphonecall $8 @@ -185,7 +185,7 @@ UnknownScript_0x18d100: ; 0x18d100 closetext loadmovesprites applymovement $5, MovementData_0x18d2e3 - playsound $001f + playsound SFX_ENTER_DOOR disappear $5 waitbutton setevent $0000 @@ -215,7 +215,7 @@ UnknownScript_0x18d1c5: ; 0x18d1c5 checkcode $1 if_equal $6, UnknownScript_0x18d1ed 2writetext UnknownText_0x18d697 - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton givepoke DRATINI, 15, 0, 0 checkevent $00c1 diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm index e4be7d72b..c84ed1813 100644 --- a/maps/DragonsDenB1F.asm +++ b/maps/DragonsDenB1F.asm @@ -50,7 +50,7 @@ UnknownScript_0x18c8b8: ; 0x18c8b8 loadmovesprites showemote $0, $0, 15 spriteface $0, $2 - playmusic $005d + playmusic MUSIC_CLAIR applymovement $3, MovementData_0x18c9ae loadfont 2writetext UnknownText_0x18c9bf @@ -59,7 +59,7 @@ UnknownScript_0x18c8b8: ; 0x18c8b8 iffalse UnknownScript_0x18c8f4 itemtotext TM_24, $0 2writetext UnknownText_0x18c9fb - playsound $0001 + playsound SFX_ITEM waitbutton itemnotify setevent EVENT_GOT_TM24_DRAGONBREATH @@ -208,7 +208,7 @@ PokeBallScript_0x18c95a: ; 0x18c95a loadfont itemtotext DRAGON_FANG, $0 2writetext UnknownText_0x18cf41 - playsound $0001 + playsound SFX_ITEM waitbutton itemnotify loadmovesprites @@ -227,7 +227,7 @@ UnknownScript_0x18c970: ; 0x18c970 ; 0x18c97e SilverScript_0x18c97e: ; 0x18c97e - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER faceplayer loadfont checkevent $0000 diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm index 2afe30b04..26010678a 100644 --- a/maps/EcruteakGym.asm +++ b/maps/EcruteakGym.asm @@ -34,7 +34,7 @@ MortyScript_0x99d58: ; 0x99d58 setevent EVENT_BEAT_MORTY loadfont 2writetext UnknownText_0x9a043 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $001e checkcode $7 @@ -93,7 +93,7 @@ UnknownScript_0x99dc6: ; 0x99dc6 applymovement $0, MovementData_0x99e5f stopfollow special $002e - playsound $001f + playsound SFX_ENTER_DOOR waitbutton warp GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY, $6, $1b end diff --git a/maps/EcruteakPokeCenter1F.asm b/maps/EcruteakPokeCenter1F.asm index ac81daccf..4d393bb6b 100644 --- a/maps/EcruteakPokeCenter1F.asm +++ b/maps/EcruteakPokeCenter1F.asm @@ -21,7 +21,7 @@ UnknownScript_0x98e63: ; 0x98e63 UnknownScript_0x98e64: ; 0x98e64 pause 30 - playsound $0023 + playsound SFX_EXIT_BUILDING appear $6 waitbutton applymovement $6, MovementData_0x98ec5 @@ -48,7 +48,7 @@ UnknownScript_0x98e95: ; 0x98e95 loadmovesprites spriteface $0, $0 applymovement $6, MovementData_0x98ece - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $6 clearevent $0712 setflag $0053 diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm index b98a8c70a..af2135a6b 100644 --- a/maps/ElmsLab.asm +++ b/maps/ElmsLab.asm @@ -70,7 +70,7 @@ UnknownScript_0x78ba5: ; 0x78ba5 2writetext UnknownText_0x7913a closetext loadmovesprites - playsound $00bc + playsound SFX_GLASS_TING pause 30 showemote $0, $2, 10 spriteface $2, $0 @@ -188,7 +188,7 @@ CyndaquilPokeBallScript: ; 0x78c73 waitbutton pokenamemem CYNDAQUIL, $0 2writetext ReceivedStarterText - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton keeptextopen givepoke CYNDAQUIL, 5, BERRY, 0 @@ -219,7 +219,7 @@ TotodilePokeBallScript: ; 0x78cb5 waitbutton pokenamemem TOTODILE, $0 2writetext ReceivedStarterText - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton keeptextopen givepoke TOTODILE, 5, BERRY, 0 @@ -248,7 +248,7 @@ ChikoritaPokeBallScript: ; 0x78cf1 waitbutton pokenamemem CHIKORITA, $0 2writetext ReceivedStarterText - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton keeptextopen givepoke CHIKORITA, 5, BERRY, 0 @@ -273,7 +273,7 @@ ElmDirectionsScript: ; 0x78d33 addcellnum $4 loadfont 2writetext GotElmsNumberText - playsound $0093 + playsound SFX_REGISTER_PHONE_NUMBER waitbutton closetext loadmovesprites @@ -330,7 +330,7 @@ UnknownScript_0x78d81: ; 0x78d81 UnknownScript_0x78d8a: ; 0x78d8a special $009d special $001b - playmusic $0000 + playmusic MUSIC_NONE writebyte $1 special $003e pause 30 diff --git a/maps/FastShip1F.asm b/maps/FastShip1F.asm index 407c0ba49..c2821f41f 100644 --- a/maps/FastShip1F.asm +++ b/maps/FastShip1F.asm @@ -29,7 +29,7 @@ UnknownScript_0x7513b: ; 0x7513b applymovement $0, MovementData_0x75217 applymovement $2, MovementData_0x75211 pause 30 - playsound $001c + playsound SFX_BOAT earthquake 30 blackoutmod GROUP_FAST_SHIP_CABINS_SW_SSW_NW, MAP_FAST_SHIP_CABINS_SW_SSW_NW clearevent $0031 @@ -71,7 +71,7 @@ UnknownScript_0x7517a: ; 0x7517a closetext loadmovesprites 2call UnknownScript_0x751b8 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton setevent $072b @@ -85,7 +85,7 @@ UnknownScript_0x7519c: ; 0x7519c closetext loadmovesprites 2call UnknownScript_0x751b8 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton setevent $072a @@ -137,7 +137,7 @@ UnknownScript_0x751e7: ; 0x751e7 UnknownScript_0x751eb: ; 0x751eb appear $5 applymovement $5, MovementData_0x7521b - playsound $0041 + playsound SFX_TACKLE applymovement $0, MovementData_0x7522e applymovement $5, MovementData_0x75220 loadfont diff --git a/maps/FastShipCabins.asm b/maps/FastShipCabins.asm index 65044c6c2..b8776e0af 100644 --- a/maps/FastShipCabins.asm +++ b/maps/FastShipCabins.asm @@ -100,7 +100,7 @@ UnknownScript_0x75f37: ; 0x75f37 UnknownScript_0x75f44: ; 0x75f44 loadmovesprites waitbutton - playsound $0027 + playsound SFX_ELEVATOR_END pause 30 loadfont 2writetext UnknownText_0x76645 diff --git a/maps/FastShipCabins_NNW_NNE_NE.asm b/maps/FastShipCabins_NNW_NNE_NE.asm index 09c0a4133..e2e80bbb7 100644 --- a/maps/FastShipCabins_NNW_NNE_NE.asm +++ b/maps/FastShipCabins_NNW_NNE_NE.asm @@ -181,7 +181,7 @@ BurglarCoreyScript: ; 0x755e9 ; 0x755f1 SailorScript_0x755f1: ; 0x755f1 - playmusic $000a + playmusic MUSIC_HIKER_ENCOUNTER faceplayer loadfont 2writetext UnknownText_0x75812 @@ -202,7 +202,7 @@ SailorScript_0x755f1: ; 0x755f1 checkcode $9 if_equal $3, UnknownScript_0x75629 applymovement $6, MovementData_0x75637 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $6 waitbutton end @@ -210,7 +210,7 @@ SailorScript_0x755f1: ; 0x755f1 UnknownScript_0x75629: ; 0x75629 applymovement $6, MovementData_0x7563c - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $6 waitbutton end diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm index 65044c6c2..b8776e0af 100644 --- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm @@ -100,7 +100,7 @@ UnknownScript_0x75f37: ; 0x75f37 UnknownScript_0x75f44: ; 0x75f44 loadmovesprites waitbutton - playsound $0027 + playsound SFX_ELEVATOR_END pause 30 loadfont 2writetext UnknownText_0x76645 diff --git a/maps/FastShipCabins_SW_SSW_NW.asm b/maps/FastShipCabins_SW_SSW_NW.asm index 3592a6c1d..8859a2f2f 100644 --- a/maps/FastShipCabins_SW_SSW_NW.asm +++ b/maps/FastShipCabins_SW_SSW_NW.asm @@ -141,7 +141,7 @@ MapFastShipCabins_SW_SSW_NWSignpost1Script: ; 0x75aac special $0033 special $009d special $001b - playmusic $000d + playmusic MUSIC_HEAL pause 60 special $003d special $0032 @@ -160,7 +160,7 @@ UnknownScript_0x75ae1: ; 0x75ae1 ; 0x75ae2 UnknownScript_0x75ae2: ; 0x75ae2 - playsound $0027 + playsound SFX_ELEVATOR_END pause 30 checkevent $002f iftrue UnknownScript_0x75af7 diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm index b608e7914..834d6dd94 100644 --- a/maps/FuchsiaGym.asm +++ b/maps/FuchsiaGym.asm @@ -31,7 +31,7 @@ JanineScript_0x195db9: ; 0x195db9 special $005e loadfont 2writetext UnknownText_0x195feb - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0027 2jump UnknownScript_0x195e02 diff --git a/maps/GoldenrodBikeShop.asm b/maps/GoldenrodBikeShop.asm index 0d7b95b0f..7b0d5c64f 100644 --- a/maps/GoldenrodBikeShop.asm +++ b/maps/GoldenrodBikeShop.asm @@ -23,7 +23,7 @@ ClerkScript_0x54750: ; 0x54750 waitbutton giveitem BICYCLE, $1 2writetext UnknownText_0x54848 - playsound $0091 + playsound SFX_KEY_ITEM waitbutton itemnotify setflag $0014 diff --git a/maps/GoldenrodBillsHouse.asm b/maps/GoldenrodBillsHouse.asm index 4781b71b8..55902f248 100644 --- a/maps/GoldenrodBillsHouse.asm +++ b/maps/GoldenrodBillsHouse.asm @@ -20,7 +20,7 @@ BillScript_0x54be4: ; 0x54be4 checkcode $1 if_equal $6, UnknownScript_0x54c13 2writetext UnknownText_0x54dae - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton givepoke EEVEE, 20, 0, 0 setevent EVENT_GOT_EEVEE @@ -81,7 +81,7 @@ TwinScript_0x54c39: ; 0x54c39 waitbutton addcellnum $3 2writetext UnknownText_0x54fd9 - playsound $0093 + playsound SFX_REGISTER_PHONE_NUMBER waitbutton keeptextopen UnknownScript_0x54c58: ;0x54c58 diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm index 729c3da3f..3364aadd6 100644 --- a/maps/GoldenrodCity.asm +++ b/maps/GoldenrodCity.asm @@ -127,7 +127,7 @@ UnknownScript_0x1989a6: ; 0x1989a6 keeptextopen takecoins 4000 waitbutton - playsound $0022 + playsound SFX_TRANSACTION special $004f 2writetext UnknownText_0x19918b closetext @@ -141,7 +141,7 @@ UnknownScript_0x1989a6: ; 0x1989a6 UnknownScript_0x1989c6: ; 0x1989c6 applymovement $10, MovementData_0x198a63 UnknownScript_0x1989ca: ; 0x1989ca - playsound $001f + playsound SFX_ENTER_DOOR disappear $10 clearevent $076b setflag $005e diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm index fa7449cfe..d137b8d3c 100644 --- a/maps/GoldenrodDeptStore6F.asm +++ b/maps/GoldenrodDeptStore6F.asm @@ -53,7 +53,7 @@ UnknownScript_0x56443: ; 0x56443 UnknownScript_0x5645d: ; 0x5645d pause 10 - playsound $001f + playsound SFX_ENTER_DOOR 2writetext UnknownText_0x564ef keeptextopen itemnotify diff --git a/maps/GoldenrodDeptStoreElevator.asm b/maps/GoldenrodDeptStoreElevator.asm index 696ac6fda..8182801b1 100644 --- a/maps/GoldenrodDeptStoreElevator.asm +++ b/maps/GoldenrodDeptStoreElevator.asm @@ -12,7 +12,7 @@ MapGoldenrodDeptStoreElevatorSignpost0Script: ; 0x56699 loadmovesprites iffalse UnknownScript_0x566df pause 5 - playsound $006e + playsound SFX_ELEVATOR earthquake 60 waitbutton checkevent $0307 diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index 69d16411a..8b446511f 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -108,7 +108,7 @@ UnknownScript_0x56ca1: ; 0x56ca1 UnknownScript_0x56ca6: ; 0x56ca6 waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x56ebd closetext 2jump UnknownScript_0x56c36 @@ -189,7 +189,7 @@ UnknownScript_0x56d26: ; 0x56d26 2call UnknownScript_0x56ca1 iffalse UnknownScript_0x56cbd waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x56ebd closetext writebyte ABRA @@ -208,7 +208,7 @@ UnknownScript_0x56d54: ; 0x56d54 2call UnknownScript_0x56ca1 iffalse UnknownScript_0x56cbd waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x56ebd closetext writebyte CUBONE @@ -227,7 +227,7 @@ UnknownScript_0x56d82: ; 0x56d82 2call UnknownScript_0x56ca1 iffalse UnknownScript_0x56cbd waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x56ebd closetext writebyte WOBBUFFET diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm index 034a88fa1..c28c30f6a 100644 --- a/maps/GoldenrodGym.asm +++ b/maps/GoldenrodGym.asm @@ -56,7 +56,7 @@ UnknownScript_0x54044: ; 0x54044 keeptextopen waitbutton 2writetext UnknownText_0x54273 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $001d checkcode $7 diff --git a/maps/GoldenrodPokeCenter1F.asm b/maps/GoldenrodPokeCenter1F.asm index 25b4595de..f0a5466c3 100644 --- a/maps/GoldenrodPokeCenter1F.asm +++ b/maps/GoldenrodPokeCenter1F.asm @@ -20,11 +20,11 @@ UnknownScript_0x60f94: ; 0x60f94 UnknownScript_0x60f9e: ; 0x60f9e checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER iftrue UnknownScript_0x60fd8 - playsound $0023 + playsound SFX_EXIT_BUILDING moveperson $3, $0, $7 disappear $3 appear $3 - playmusic $0011 + playmusic MUSIC_SHOW_ME_AROUND applymovement $3, MovementData_0x6105a spriteface $0, $1 loadfont @@ -39,7 +39,7 @@ UnknownScript_0x60f9e: ; 0x60f9e applymovement $3, MovementData_0x61060 special $003d disappear $3 - playsound $0023 + playsound SFX_EXIT_BUILDING UnknownScript_0x60fd8: ; 0x60fd8 end ; 0x60fd9 @@ -54,11 +54,11 @@ UnknownScript_0x60fd9: ; 0x60fd9 UnknownScript_0x60fe3: ; 0x60fe3 checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER iftrue UnknownScript_0x6101d - playsound $0023 + playsound SFX_EXIT_BUILDING moveperson $3, $0, $7 disappear $3 appear $3 - playmusic $0011 + playmusic MUSIC_SHOW_ME_AROUND applymovement $3, MovementData_0x61065 spriteface $0, $1 loadfont @@ -73,7 +73,7 @@ UnknownScript_0x60fe3: ; 0x60fe3 applymovement $3, MovementData_0x6106c special $003d disappear $3 - playsound $0023 + playsound SFX_EXIT_BUILDING UnknownScript_0x6101d: ; 0x6101d end ; 0x6101e diff --git a/maps/IcePathB1F.asm b/maps/IcePathB1F.asm index 8f09e39b5..9e181432e 100644 --- a/maps/IcePathB1F.asm +++ b/maps/IcePathB1F.asm @@ -71,7 +71,7 @@ UnknownScript_0x7e4f8: ; 0x7e4f8 ; 0x7e504 UnknownScript_0x7e504: ; 0x7e504 - playsound $001b + playsound SFX_STRENGTH earthquake 80 end ; 0x7e50a diff --git a/maps/IndigoPlateauPokeCenter1F.asm b/maps/IndigoPlateauPokeCenter1F.asm index ee1fb0055..89f2cfc0a 100644 --- a/maps/IndigoPlateauPokeCenter1F.asm +++ b/maps/IndigoPlateauPokeCenter1F.asm @@ -61,7 +61,7 @@ UnknownScript_0x180053: ; 0x180053 special $006a pause 15 applymovement $5, MovementData_0x180164 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER spriteface $0, $3 2jump UnknownScript_0x1800ce ; 0x180094 @@ -83,7 +83,7 @@ UnknownScript_0x180094: ; 0x180094 special $006a pause 15 applymovement $5, MovementData_0x18016b - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER spriteface $0, $2 UnknownScript_0x1800ce: ; 0x1800ce loadfont @@ -125,7 +125,7 @@ UnknownScript_0x180103: ; 0x180103 ; 0x180113 UnknownScript_0x180113: ; 0x180113 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x1802a4 closetext @@ -164,7 +164,7 @@ GrampsScript_0x180139: ; 0x180139 2writetext UnknownText_0x1803e7 closetext loadmovesprites - playsound $0013 + playsound SFX_WARP_TO special $002e waitbutton warp GROUP_NEW_BARK_TOWN, MAP_NEW_BARK_TOWN, $d, $6 diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm index 5795a0efa..cf74ed065 100644 --- a/maps/KarensRoom.asm +++ b/maps/KarensRoom.asm @@ -38,7 +38,7 @@ UnknownScript_0x180bd5: ; 0x180bd5 UnknownScript_0x180bd6: ; 0x180bd6 applymovement $0, MovementData_0x180c22 refreshscreen $86 - playsound $001b + playsound SFX_STRENGTH earthquake 80 changeblock $4, $e, $2a reloadmappart @@ -66,7 +66,7 @@ KarenScript_0x180bee: ; 0x180bee 2writetext UnknownText_0x180d29 closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR changeblock $4, $2, $16 reloadmappart loadmovesprites diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm index dabf4b8cd..937a53705 100644 --- a/maps/KogasRoom.asm +++ b/maps/KogasRoom.asm @@ -38,7 +38,7 @@ UnknownScript_0x180741: ; 0x180741 UnknownScript_0x180742: ; 0x180742 applymovement $0, MovementData_0x18078e refreshscreen $86 - playsound $001b + playsound SFX_STRENGTH earthquake 80 changeblock $4, $e, $2a reloadmappart @@ -66,7 +66,7 @@ KogaScript_0x18075a: ; 0x18075a 2writetext UnknownText_0x1808ca closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR changeblock $4, $2, $16 reloadmappart loadmovesprites diff --git a/maps/KrissHouse1F.asm b/maps/KrissHouse1F.asm index 24390b2e9..b067a3657 100644 --- a/maps/KrissHouse1F.asm +++ b/maps/KrissHouse1F.asm @@ -23,7 +23,7 @@ UnknownScript_0x7a4d8: ; 0x7a4d8 ; 0x7a4db UnknownScript_0x7a4db: ; 0x7a4db - playmusic $004e + playmusic MUSIC_MOM showemote $0, $2, 15 spriteface $0, $2 checkevent $0000 @@ -110,7 +110,7 @@ UnknownScript_0x7a56b: ; 0x7a56b ; 0x7a572 UnknownScript_0x7a572: ; 0x7a572 - playmusic $004e + playmusic MUSIC_MOM 2jump UnknownScript_0x7a4f6 ; 0x7a578 diff --git a/maps/KrissHouse2F.asm b/maps/KrissHouse2F.asm index 6ed4d4dfd..693bd6386 100644 --- a/maps/KrissHouse2F.asm +++ b/maps/KrissHouse2F.asm @@ -68,7 +68,7 @@ MapKrissHouse2FSignpost2Script: ; 0x7abda iftrue UnknownScript_0x7ac07 checkevent EVENT_LISTENED_TO_RADIO_IN_NEIGHBORS_HOUSE iftrue UnknownScript_0x7ac0a - playmusic $001d + playmusic MUSIC_POKEMON_TALK loadfont 2writetext UnknownText_0x7ac24 pause 45 diff --git a/maps/KrissNeighborsHouse.asm b/maps/KrissNeighborsHouse.asm index 930f2db1f..38c2b4f01 100644 --- a/maps/KrissNeighborsHouse.asm +++ b/maps/KrissNeighborsHouse.asm @@ -23,7 +23,7 @@ MapKrissNeighborsHouseSignpost2Script: ; 0x7acf7 iftrue UnknownScript_0x7ad24 checkevent EVENT_LISTENED_TO_RADIO_IN_NEIGHBORS_HOUSE iftrue UnknownScript_0x7ad27 - playmusic $001d + playmusic MUSIC_POKEMON_TALK loadfont 2writetext UnknownText_0x7ae3b pause 45 diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm index e6ffa6c23..1faf19ec7 100644 --- a/maps/KurtsHouse.asm +++ b/maps/KurtsHouse.asm @@ -48,9 +48,9 @@ KurtScript_0x18e178: ; 0x18e178 checkcode $9 if_equal $1, UnknownScript_0x18e1ab spriteface $0, $0 - playsound $0018 + playsound SFX_FLY applymovement $2, MovementData_0x18e466 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 waitbutton special $003d @@ -59,9 +59,9 @@ KurtScript_0x18e178: ; 0x18e178 UnknownScript_0x18e1ab: ; 0x18e1ab spriteface $0, $0 - playsound $0018 + playsound SFX_FLY applymovement $2, MovementData_0x18e46c - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 waitbutton special $003d @@ -325,17 +325,17 @@ UnknownScript_0x18e378: ; 0x18e378 checkcode $9 if_equal $1, UnknownScript_0x18e3a2 spriteface $0, $0 - playsound $0018 + playsound SFX_FLY applymovement $2, MovementData_0x18e466 2jump UnknownScript_0x18e3ac ; 0x18e3a2 UnknownScript_0x18e3a2: ; 0x18e3a2 spriteface $0, $0 - playsound $0018 + playsound SFX_FLY applymovement $2, MovementData_0x18e46c UnknownScript_0x18e3ac: ; 0x18e3ac - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 clearevent $07a4 waitbutton diff --git a/maps/LakeofRage.asm b/maps/LakeofRage.asm index 96e5eb2f3..46cdf948f 100644 --- a/maps/LakeofRage.asm +++ b/maps/LakeofRage.asm @@ -55,7 +55,7 @@ UnknownScript_0x70035: ; 0x70035 2writetext UnknownText_0x702c6 closetext loadmovesprites - playsound $0013 + playsound SFX_WARP_TO applymovement $2, MovementData_0x70155 disappear $2 clearevent $06d5 @@ -98,7 +98,7 @@ UnknownScript_0x7007a: ; 0x7007a giveitem RED_SCALE, $1 waitbutton 2writetext UnknownText_0x703df - playsound $0001 + playsound SFX_ITEM waitbutton itemnotify loadmovesprites diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm index 4c18799f2..bed117617 100644 --- a/maps/LancesRoom.asm +++ b/maps/LancesRoom.asm @@ -38,7 +38,7 @@ UnknownScript_0x180e52: ; 0x180e52 UnknownScript_0x180e53: ; 0x180e53 applymovement $0, MovementData_0x180f33 refreshscreen $86 - playsound $001b + playsound SFX_STRENGTH earthquake 80 changeblock $4, $16, $34 reloadmappart @@ -74,7 +74,7 @@ LanceScript_0x180e7b: ; 0x180e7b 2writetext UnknownText_0x181132 closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR changeblock $4, $0, $b reloadmappart loadmovesprites @@ -119,10 +119,10 @@ LanceScript_0x180e7b: ; 0x180e7b spriteface $4, $1 applymovement $2, MovementData_0x180f53 stopfollow - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 applymovement $0, MovementData_0x180f55 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $0 applymovement $3, MovementData_0x180f57 showemote $0, $3, 15 diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm index 3221571d9..7130e36c7 100644 --- a/maps/MahoganyGym.asm +++ b/maps/MahoganyGym.asm @@ -21,7 +21,7 @@ PryceScript_0x199a9e: ; 0x199a9e setevent EVENT_BEAT_PRYCE loadfont 2writetext UnknownText_0x199d3b - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0021 checkcode $7 diff --git a/maps/MahoganyMart1F.asm b/maps/MahoganyMart1F.asm index b1d67c446..2afd8040d 100644 --- a/maps/MahoganyMart1F.asm +++ b/maps/MahoganyMart1F.asm @@ -75,7 +75,7 @@ UnknownScript_0x6c38f: ; 0x6c38f 2writetext UnknownText_0x6c52a pause 15 loadmovesprites - playsound $0041 + playsound SFX_TACKLE applymovement $5, MovementData_0x6c3f6 applymovement $3, MovementData_0x6c3fb pause 15 @@ -95,7 +95,7 @@ UnknownScript_0x6c38f: ; 0x6c38f 2writetext UnknownText_0x6c59e closetext showemote $0, $2, 10 - playsound $002a + playsound SFX_UNKNOWN_2A changeblock $6, $2, $1e reloadmappart loadmovesprites @@ -106,7 +106,7 @@ UnknownScript_0x6c38f: ; 0x6c38f closetext loadmovesprites applymovement $4, MovementData_0x6c412 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $4 dotrigger $0 waitbutton diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm index 072945b94..b4dd98865 100644 --- a/maps/MahoganyTown.asm +++ b/maps/MahoganyTown.asm @@ -67,7 +67,7 @@ UnknownScript_0x190040: ; 0x190040 giveitem RAGECANDYBAR, $1 iffalse UnknownScript_0x190078 waitbutton - playsound $0022 + playsound SFX_TRANSACTION takemoney $0, 300 special $0051 2writetext UnknownText_0x19014a diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm index a9193f91d..b0c5ec1fd 100644 --- a/maps/ManiasHouse.asm +++ b/maps/ManiasHouse.asm @@ -22,7 +22,7 @@ RockerScript_0x9d278: ; 0x9d278 keeptextopen waitbutton 2writetext UnknownText_0x9d41b - playsound $0091 + playsound SFX_KEY_ITEM waitbutton loadmovesprites setevent EVENT_GOT_SHUCKIE diff --git a/maps/MobileBattleRoom.asm b/maps/MobileBattleRoom.asm index 8e2e872a3..bf47c1539 100644 --- a/maps/MobileBattleRoom.asm +++ b/maps/MobileBattleRoom.asm @@ -41,7 +41,7 @@ UnknownScript_0x1935f4: ; 0x1935f4 pause 20 loadmovesprites special $002e - playmusic $000d + playmusic MUSIC_HEAL special $00a4 pause 60 special $0031 diff --git a/maps/MountMoon.asm b/maps/MountMoon.asm index 67d248d3b..b2437062e 100644 --- a/maps/MountMoon.asm +++ b/maps/MountMoon.asm @@ -25,7 +25,7 @@ UnknownScript_0x7408e: ; 0x7408e special $006a pause 15 applymovement $2, MovementData_0x740f9 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x74105 closetext @@ -64,7 +64,7 @@ UnknownScript_0x740d3: ; 0x740d3 ; 0x740e3 UnknownScript_0x740e3: ; 0x740e3 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x741fa closetext diff --git a/maps/MountMortarB1F.asm b/maps/MountMortarB1F.asm index 74ff4081e..dbb55a2b3 100644 --- a/maps/MountMortarB1F.asm +++ b/maps/MountMortarB1F.asm @@ -29,7 +29,7 @@ UnknownScript_0x7e217: ; 0x7e217 checkcode $1 if_equal $6, UnknownScript_0x7e237 2writetext UnknownText_0x7e355 - playsound $0002 + playsound SFX_CAUGHT_MON waitbutton givepoke TYROGUE, 10, 0, 0 setevent EVENT_GOT_TYROGUE_FROM_KIYO diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm index a41e4a21d..8b7d3eb90 100644 --- a/maps/MrPokemonsHouse.asm +++ b/maps/MrPokemonsHouse.asm @@ -33,7 +33,7 @@ UnknownScript_0x196e56: ; 0x196e56 waitbutton giveitem MYSTERY_EGG, $1 2writetext UnknownText_0x196fd2 - playsound $0091 + playsound SFX_KEY_ITEM waitbutton itemnotify setevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON @@ -90,7 +90,7 @@ UnknownScript_0x196ec7: ; 0x196ec7 ; 0x196ec9 UnknownScript_0x196ec9: ; 0x196ec9 - playmusic $001e + playmusic MUSIC_PROF_OAK applymovement $3, MovementData_0x196f5d spriteface $0, $3 loadfont @@ -98,7 +98,7 @@ UnknownScript_0x196ec9: ; 0x196ec9 keeptextopen waitbutton 2writetext UnknownText_0x1973cc - playsound $0001 + playsound SFX_ITEM waitbutton setflag $000b 2writetext UnknownText_0x1973de @@ -106,7 +106,7 @@ UnknownScript_0x196ec9: ; 0x196ec9 loadmovesprites spriteface $0, $0 applymovement $3, MovementData_0x196f61 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $3 waitbutton special $003d @@ -118,7 +118,7 @@ UnknownScript_0x196ec9: ; 0x196ec9 loadmovesprites special $0030 special $0033 - playmusic $000d + playmusic MUSIC_HEAL special $009d special $001b pause 60 diff --git a/maps/NewBarkTown.asm b/maps/NewBarkTown.asm index 2f2ebc0a1..9645456b5 100644 --- a/maps/NewBarkTown.asm +++ b/maps/NewBarkTown.asm @@ -29,7 +29,7 @@ UnknownScript_0x1a800f: ; 0x1a800f ; 0x1a8016 UnknownScript_0x1a8016: ; 0x1a8016 - playmusic $004e + playmusic MUSIC_MOM spriteface $2, $2 loadfont 2writetext UnknownText_0x1a8134 @@ -53,7 +53,7 @@ UnknownScript_0x1a8016: ; 0x1a8016 ; 0x1a8041 UnknownScript_0x1a8041: ; 0x1a8041 - playmusic $004e + playmusic MUSIC_MOM spriteface $2, $2 loadfont 2writetext UnknownText_0x1a8134 @@ -133,7 +133,7 @@ SilverScript_0x1a809e: ; 0x1a809e pause 5 spriteface $4, $0 pause 5 - playsound $0041 + playsound SFX_TACKLE applymovement $0, MovementData_0x1a80f0 applymovement $4, MovementData_0x1a80f5 end diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm index 03c03e39d..6c754dd7f 100644 --- a/maps/OlivineCity.asm +++ b/maps/OlivineCity.asm @@ -32,11 +32,11 @@ UnknownScript_0x1a8833: ; 0x1a8833 showemote $0, $0, 15 special $006a pause 15 - playsound $001f + playsound SFX_ENTER_DOOR appear $5 waitbutton applymovement $5, MovementData_0x1a88d2 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x1a88fa closetext @@ -57,11 +57,11 @@ UnknownScript_0x1a886b: ; 0x1a886b showemote $0, $0, 15 special $006a pause 15 - playsound $001f + playsound SFX_ENTER_DOOR appear $5 waitbutton applymovement $5, MovementData_0x1a88d6 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x1a88fa closetext diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm index 3544c45e1..bae05d336 100644 --- a/maps/OlivineGym.asm +++ b/maps/OlivineGym.asm @@ -21,7 +21,7 @@ JasmineScript_0x9c12f: ; 0x9c12f setevent EVENT_BEAT_JASMINE loadfont 2writetext UnknownText_0x9c33a - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $001f checkcode $7 diff --git a/maps/OlivineLighthouse6F.asm b/maps/OlivineLighthouse6F.asm index eae9d8033..2bcaac655 100644 --- a/maps/OlivineLighthouse6F.asm +++ b/maps/OlivineLighthouse6F.asm @@ -37,7 +37,7 @@ UnknownScript_0x60bab: ; 0x60bab pause 15 spriteface $3, $2 loadfont - playmusic $000d + playmusic MUSIC_HEAL 2writetext UnknownText_0x60e44 pause 60 keeptextopen diff --git a/maps/OlivinePort.asm b/maps/OlivinePort.asm index e362a8597..ac54186e1 100644 --- a/maps/OlivinePort.asm +++ b/maps/OlivinePort.asm @@ -38,11 +38,11 @@ SailorScript_0x748c0: ; 0x748c0 loadmovesprites spriteface $2, $0 pause 10 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 waitbutton applymovement $0, MovementData_0x74a30 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton checkevent $0030 diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm index d5a57681c..4ea9b6a5f 100644 --- a/maps/PewterGym.asm +++ b/maps/PewterGym.asm @@ -22,7 +22,7 @@ BrockScript_0x1a2864: ; 0x1a2864 setevent EVENT_BEAT_CAMPER_JERRY loadfont 2writetext UnknownText_0x1a2a3d - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0023 2writetext UnknownText_0x1a2a57 diff --git a/maps/PokeCenter2F.asm b/maps/PokeCenter2F.asm index d99134a7c..9525509e5 100644 --- a/maps/PokeCenter2F.asm +++ b/maps/PokeCenter2F.asm @@ -480,7 +480,7 @@ UnknownScript_0x192b12: ; 0x192b12 2writetext UnknownText_0x193278 closetext loadmovesprites - playsound $00ca + playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $80 special $0098 @@ -509,7 +509,7 @@ UnknownScript_0x192b63: ; 0x192b63 applymovement $2, MovementData_0x192d04 applymovement $0, MovementData_0x192d28 clearflag $009f - playsound $00ca + playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 special $0098 @@ -533,7 +533,7 @@ UnknownScript_0x192b9d: ; 0x192b9d applymovement $3, MovementData_0x192d04 applymovement $0, MovementData_0x192d28 clearflag $009f - playsound $00ca + playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 special $0098 @@ -598,7 +598,7 @@ UnknownScript_0x192c20: ; 0x192c20 2writetext UnknownText_0x193278 closetext loadmovesprites - playsound $00ca + playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $80 special $0098 @@ -629,7 +629,7 @@ UnknownScript_0x192c66: ; 0x192c66 applymovement $4, MovementData_0x192d08 applymovement $0, MovementData_0x192cfc clearflag $009f - playsound $00ca + playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 special $0098 diff --git a/maps/PokemonFanClub.asm b/maps/PokemonFanClub.asm index e59d8170c..94e4d8e52 100644 --- a/maps/PokemonFanClub.asm +++ b/maps/PokemonFanClub.asm @@ -80,7 +80,7 @@ UnknownScript_0x191844: ; 0x191844 iffalse UnknownScript_0x191865 disappear $6 2writetext UnknownText_0x191d0a - playsound $0091 + playsound SFX_KEY_ITEM waitbutton itemnotify setevent EVENT_GOT_LOST_ITEM_FROM_FAN_CLUB diff --git a/maps/PowerPlant.asm b/maps/PowerPlant.asm index 02c3720ad..08ed89873 100644 --- a/maps/PowerPlant.asm +++ b/maps/PowerPlant.asm @@ -19,7 +19,7 @@ UnknownScript_0x188dc4: ; 0x188dc4 ; 0x188dc5 UnknownScript_0x188dc5: ; 0x188dc5 - playsound $006a + playsound SFX_CALL showemote $0, $2, 15 waitbutton pause 30 diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm index 30da18c32..78b1fec7c 100644 --- a/maps/RadioTower1F.asm +++ b/maps/RadioTower1F.asm @@ -45,7 +45,7 @@ UnknownScript_0x5cd4c: ; 0x5cd4c keeptextopen waitbutton 2writetext UnknownText_0x5cf79 - playsound $0009 + playsound SFX_DEX_FANFARE_20_49 waitbutton keeptextopen special $0052 @@ -67,7 +67,7 @@ UnknownScript_0x5cd84: ; 0x5cd84 UnknownScript_0x5cd8a: ; 0x5cd8a 2writetext UnknownText_0x5cfb5 - playsound $0099 + playsound SFX_1ST_PLACE waitbutton keeptextopen giveitem MASTER_BALL, $1 @@ -79,7 +79,7 @@ UnknownScript_0x5cd8a: ; 0x5cd8a UnknownScript_0x5cd9f: ; 0x5cd9f 2writetext UnknownText_0x5d023 - playsound $0098 + playsound SFX_2ND_PLACE waitbutton keeptextopen giveitem EXP_SHARE, $1 @@ -91,7 +91,7 @@ UnknownScript_0x5cd9f: ; 0x5cd9f UnknownScript_0x5cdb4: ; 0x5cdb4 2writetext UnknownText_0x5d076 - playsound $0094 + playsound SFX_3RD_PLACE waitbutton keeptextopen giveitem PP_UP, $1 @@ -126,27 +126,27 @@ CooltrainerFScript_0x5cdd5: ; 0x5cdd5 2writetext UnknownText_0x5d1f2 yesorno iffalse UnknownScript_0x5ce42 - playsound $0027 + playsound SFX_ELEVATOR_END waitbutton 2writetext UnknownText_0x5d231 yesorno iffalse UnknownScript_0x5ce42 - playsound $0027 + playsound SFX_ELEVATOR_END waitbutton 2writetext UnknownText_0x5d282 yesorno iftrue UnknownScript_0x5ce42 - playsound $0027 + playsound SFX_ELEVATOR_END waitbutton 2writetext UnknownText_0x5d2bc yesorno iffalse UnknownScript_0x5ce42 - playsound $0027 + playsound SFX_ELEVATOR_END waitbutton 2writetext UnknownText_0x5d30e yesorno iftrue UnknownScript_0x5ce42 - playsound $0027 + playsound SFX_ELEVATOR_END waitbutton 2writetext UnknownText_0x5d37b keeptextopen @@ -172,7 +172,7 @@ UnknownScript_0x5ce3e: ; 0x5ce3e ; 0x5ce42 UnknownScript_0x5ce42: ; 0x5ce42 - playsound $0019 + playsound SFX_WRONG 2writetext UnknownText_0x5d409 closetext loadmovesprites diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm index b2caa2cb9..1af8412e6 100644 --- a/maps/RadioTower2F.asm +++ b/maps/RadioTower2F.asm @@ -182,7 +182,7 @@ BuenaScript_0x5d775: ; 0x5d775 iffalse UnknownScript_0x5d86b checkcode $18 if_equal $1e, UnknownScript_0x5d87f - playmusic $0060 + playmusic MUSIC_BUENAS_PASSWORD 2writetext UnknownText_0x5de35 special $00a3 iffalse UnknownScript_0x5d81e @@ -212,7 +212,7 @@ UnknownScript_0x5d7be: ; 0x5d7be addvar $1 writevarcode $18 waitbutton - playsound $0022 + playsound SFX_TRANSACTION setflag $0060 pause 20 spriteface $b, $3 @@ -361,7 +361,7 @@ UnknownScript_0x5d8d0: ; 0x5d8d0 if_equal $1, UnknownScript_0x5d8f6 if_equal $2, UnknownScript_0x5d8ed 2writetext UnknownText_0x5e2f3 - playsound $0093 + playsound SFX_REGISTER_PHONE_NUMBER waitbutton keeptextopen 2writetext UnknownText_0x5e310 diff --git a/maps/RadioTower3F.asm b/maps/RadioTower3F.asm index 1b83961ee..9c62810d8 100644 --- a/maps/RadioTower3F.asm +++ b/maps/RadioTower3F.asm @@ -219,7 +219,7 @@ UnknownScript_0x5e605: ; 0x5e605 2writetext UnknownText_0x5eabc closetext setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER - playsound $001f + playsound SFX_ENTER_DOOR changeblock $e, $2, $2a changeblock $e, $4, $1 reloadmappart diff --git a/maps/RadioTower5F.asm b/maps/RadioTower5F.asm index 5f67feb0f..424435e46 100644 --- a/maps/RadioTower5F.asm +++ b/maps/RadioTower5F.asm @@ -31,7 +31,7 @@ UnknownScript_0x60011: ; 0x60011 closetext loadmovesprites applymovement $2, MovementData_0x60109 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER loadfont 2writetext UnknownText_0x60147 closetext @@ -100,7 +100,7 @@ Executivef1Script: ; 0x60066 UnknownScript_0x6006e: ; 0x6006e applymovement $0, MovementData_0x60125 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $3, $3 loadfont 2writetext UnknownText_0x603d1 @@ -155,7 +155,7 @@ UnknownScript_0x6006e: ; 0x6006e UnknownScript_0x600f1: ; 0x600f1 applymovement $2, MovementData_0x6011a - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 end ; 0x600fb diff --git a/maps/Route24.asm b/maps/Route24.asm index 7ec93ba71..6c77d33f8 100644 --- a/maps/Route24.asm +++ b/maps/Route24.asm @@ -8,7 +8,7 @@ Route24_MapScriptHeader: ; 0x1adbf8 RocketScript_0x1adbfa: ; 0x1adbfa faceplayer - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER loadfont 2writetext UnknownText_0x1adc2e closetext @@ -18,7 +18,7 @@ RocketScript_0x1adbfa: ; 0x1adbfa startbattle reloadmapmusic returnafterbattle - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER loadfont 2writetext UnknownText_0x1addc0 keeptextopen diff --git a/maps/Route25.asm b/maps/Route25.asm index 6ea3695ed..30c4b6dfe 100644 --- a/maps/Route25.asm +++ b/maps/Route25.asm @@ -26,7 +26,7 @@ UnknownScript_0x19eea0: ; 0x19eea0 applymovement $3, MovementData_0x19efe8 disappear $3 pause 15 - playmusic $0038 + playmusic MUSIC_BEAUTY_ENCOUNTER spriteface $2, $1 pause 10 applymovement $2, MovementData_0x19efed @@ -53,7 +53,7 @@ UnknownScript_0x19eee0: ; 0x19eee0 applymovement $3, MovementData_0x19efea disappear $3 pause 15 - playmusic $0038 + playmusic MUSIC_BEAUTY_ENCOUNTER spriteface $2, $1 pause 10 applymovement $2, MovementData_0x19eff4 diff --git a/maps/Route26HealSpeechHouse.asm b/maps/Route26HealSpeechHouse.asm index 16b21d94c..1befb5f02 100644 --- a/maps/Route26HealSpeechHouse.asm +++ b/maps/Route26HealSpeechHouse.asm @@ -15,7 +15,7 @@ TeacherScript_0x7b125: ; 0x7b125 special $0030 special $0033 special $009d - playmusic $000d + playmusic MUSIC_HEAL special $001b pause 60 special $0032 diff --git a/maps/Route30.asm b/maps/Route30.asm index b3388605e..eb1e7cc39 100644 --- a/maps/Route30.asm +++ b/maps/Route30.asm @@ -8,12 +8,12 @@ Route30_MapScriptHeader: ; 0x1a1671 YoungsterScript_0x1a1673: ; 0x1a1673 waitbutton - playmusic $002a + playmusic MUSIC_JOHTO_TRAINER_BATTLE loadfont 2writetext UnknownText_0x1a1806 pause 30 loadmovesprites - playsound $0041 + playsound SFX_TACKLE applymovement $8, MovementData_0x1a17fe loadfont faceplayer @@ -21,7 +21,7 @@ YoungsterScript_0x1a1673: ; 0x1a1673 closetext spriteface $2, $1 loadmovesprites - playsound $0041 + playsound SFX_TACKLE applymovement $7, MovementData_0x1a1802 special $003d end diff --git a/maps/Route34.asm b/maps/Route34.asm index 962c305ab..6b09fa468 100644 --- a/maps/Route34.asm +++ b/maps/Route34.asm @@ -59,7 +59,7 @@ GrampsScript_0x7803d: ; 0x7803d checkcode $9 if_equal $3, UnknownScript_0x7805b applymovement $8, MovementData_0x78333 - playsound $001f + playsound SFX_ENTER_DOOR disappear $8 UnknownScript_0x7805a: ; 0x7805a end @@ -67,7 +67,7 @@ UnknownScript_0x7805a: ; 0x7805a UnknownScript_0x7805b: ; 0x7805b applymovement $8, MovementData_0x78337 - playsound $001f + playsound SFX_ENTER_DOOR disappear $8 end ; 0x78065 @@ -423,7 +423,7 @@ OfficerScript_0x7824c: ; 0x7824c iffalse UnknownScript_0x78276 checkevent $0546 iftrue UnknownScript_0x78270 - playmusic $000c + playmusic MUSIC_OFFICER_ENCOUNTER 2writetext UnknownText_0x785e4 closetext loadmovesprites diff --git a/maps/Route35.asm b/maps/Route35.asm index ca4159b77..ec3366a2f 100644 --- a/maps/Route35.asm +++ b/maps/Route35.asm @@ -390,7 +390,7 @@ OfficerScript_0x19ca49: ; 0x19ca49 iffalse UnknownScript_0x19ca73 checkevent $0547 iftrue UnknownScript_0x19ca6d - playmusic $000c + playmusic MUSIC_OFFICER_ENCOUNTER 2writetext UnknownText_0x19ceea closetext loadmovesprites diff --git a/maps/Route35Goldenrodgate.asm b/maps/Route35Goldenrodgate.asm index a512b5eb3..6a619d091 100644 --- a/maps/Route35Goldenrodgate.asm +++ b/maps/Route35Goldenrodgate.asm @@ -24,7 +24,7 @@ OfficerScript_0x69d37: ; 0x69d37 checkcode $1 if_equal $6, UnknownScript_0x69d79 2writetext UnknownText_0x69eb8 - playsound $0091 + playsound SFX_KEY_ITEM waitbutton givepoke SPEAROW, 10, 0, 1, GiftSpearowName, GiftSpearowOTName givepokeitem GiftSpearowMail diff --git a/maps/Route35NationalParkgate.asm b/maps/Route35NationalParkgate.asm index fa53f19f5..073648aeb 100644 --- a/maps/Route35NationalParkgate.asm +++ b/maps/Route35NationalParkgate.asm @@ -83,7 +83,7 @@ UnknownScript_0x6a1ee: ; 0x6a1ee closetext loadmovesprites 2call UnknownScript_0x6a261 - playsound $001f + playsound SFX_ENTER_DOOR special $002e waitbutton warpfacing $1, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $a, $2f @@ -114,14 +114,14 @@ UnknownScript_0x6a234: ; 0x6a234 2writetext UnknownText_0x6a39d keeptextopen 2writetext UnknownText_0x6a3c7 - playsound $0001 + playsound SFX_ITEM waitbutton 2writetext UnknownText_0x6a3e2 closetext loadmovesprites special $0018 2call UnknownScript_0x6a261 - playsound $001f + playsound SFX_ENTER_DOOR special $002e waitbutton special $0047 @@ -159,7 +159,7 @@ UnknownScript_0x6a27d: ; 6a27d 2writetext UnknownText_0x6a537 keeptextopen 2writetext UnknownText_0x6a56b - playsound $000c + playsound SFX_GOT_SAFARI_BALLS waitbutton keeptextopen 2jump UnknownScript_0x6a234 diff --git a/maps/Route36.asm b/maps/Route36.asm index 040669575..7f29e415c 100644 --- a/maps/Route36.asm +++ b/maps/Route36.asm @@ -37,7 +37,7 @@ UnknownScript_0x194018: ; 0x194018 UnknownScript_0x19401b: ; 0x19401b showemote $0, $0, 15 pause 15 - playsound $0014 + playsound SFX_WARP_FROM spriteface $0, $1 applymovement $a, MovementData_0x194262 disappear $a @@ -53,7 +53,7 @@ WeirdTreeScript_0x19403c: ; 0x19403c checkitem SQUIRTBOTTLE iftrue UnknownScript_0x19404a waitbutton - playsound $006d + playsound SFX_SANDSTORM applymovement $4, MovementData_0x194249 end ; 0x19404a @@ -73,7 +73,7 @@ WateredWeirdTreeScript:: ; 0x194053 closetext loadmovesprites waitbutton - playsound $006d + playsound SFX_SANDSTORM applymovement $4, MovementData_0x194249 loadfont 2writetext UnknownText_0x1942aa diff --git a/maps/Route36NationalParkgate.asm b/maps/Route36NationalParkgate.asm index 01a99882f..1a62b0100 100644 --- a/maps/Route36NationalParkgate.asm +++ b/maps/Route36NationalParkgate.asm @@ -91,7 +91,7 @@ UnknownScript_0x6ab76: ; 0x6ab76 closetext loadmovesprites spriteface $0, $2 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton warpfacing $2, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $21, $12 @@ -168,7 +168,7 @@ UnknownScript_0x6ac10: ; 0x6ac10 keeptextopen waitbutton 2writetext UnknownText_0x6aeb1 - playsound $0001 + playsound SFX_ITEM waitbutton 2writetext UnknownText_0x6aecc closetext @@ -176,7 +176,7 @@ UnknownScript_0x6ac10: ; 0x6ac10 setflag $0011 special $0018 spriteface $0, $2 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton special $0047 @@ -201,7 +201,7 @@ UnknownScript_0x6ac4d: ; 0x6ac4d 2writetext UnknownText_0x6b021 keeptextopen 2writetext UnknownText_0x6b055 - playsound $000c + playsound SFX_GOT_SAFARI_BALLS waitbutton keeptextopen 2jump UnknownScript_0x6ac10 diff --git a/maps/Route39Barn.asm b/maps/Route39Barn.asm index 16a059a33..fff276d77 100644 --- a/maps/Route39Barn.asm +++ b/maps/Route39Barn.asm @@ -101,7 +101,7 @@ UnknownScript_0x9ccfa: ; 0x9ccfa ; 0x9cd04 UnknownScript_0x9cd04: ; 0x9cd04 - playmusic $000d + playmusic MUSIC_HEAL 2writetext UnknownText_0x9cdbc pause 60 keeptextopen diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm index 977640e3d..8457c2765 100644 --- a/maps/Route39Farmhouse.asm +++ b/maps/Route39Farmhouse.asm @@ -32,7 +32,7 @@ UnknownScript_0x9cec5: ; 0x9cec5 takemoney $0, 500 special $0051 waitbutton - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x9d05d keeptextopen itemnotify diff --git a/maps/Route42.asm b/maps/Route42.asm index 3460d74fe..bc6b72371 100644 --- a/maps/Route42.asm +++ b/maps/Route42.asm @@ -21,7 +21,7 @@ UnknownScript_0x1a9217: ; 0x1a9217 UnknownScript_0x1a9218: ; 0x1a9218 showemote $0, $0, 15 pause 15 - playsound $0014 + playsound SFX_WARP_FROM applymovement $a, MovementData_0x1a9356 disappear $a pause 10 diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm index cf5ea9324..6f53bf1d9 100644 --- a/maps/Route43Gate.asm +++ b/maps/Route43Gate.asm @@ -36,7 +36,7 @@ UnknownScript_0x19abd5: ; 0x19abd5 ; 0x19abda UnknownScript_0x19abda: ; 0x19abda - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER checkcode $9 if_equal $0, UnknownScript_0x19abea if_equal $1, UnknownScript_0x19ac38 diff --git a/maps/RuinsofAlphAerodactylChamber.asm b/maps/RuinsofAlphAerodactylChamber.asm index cccb78f53..cd4366089 100644 --- a/maps/RuinsofAlphAerodactylChamber.asm +++ b/maps/RuinsofAlphAerodactylChamber.asm @@ -50,7 +50,7 @@ UnknownScript_0x58dd3: ; 0x58dd3 earthquake 30 showemote $0, $0, 20 pause 30 - playsound $001b + playsound SFX_STRENGTH changeblock $4, $0, $30 reloadmappart earthquake 50 @@ -78,10 +78,10 @@ UnknownScript_0x58df7: ; 0x58df7 changeblock $2, $2, $18 changeblock $4, $2, $19 reloadmappart - playsound $001b + playsound SFX_STRENGTH earthquake 80 applymovement $0, MovementData_0x58e4d - playsound $002f + playsound SFX_KINESIS waitbutton pause 20 warpcheck diff --git a/maps/RuinsofAlphHoOhChamber.asm b/maps/RuinsofAlphHoOhChamber.asm index be2693c67..9e123d8b1 100644 --- a/maps/RuinsofAlphHoOhChamber.asm +++ b/maps/RuinsofAlphHoOhChamber.asm @@ -51,7 +51,7 @@ UnknownScript_0x58596: ; 0x58596 earthquake 30 showemote $0, $0, 20 pause 30 - playsound $001b + playsound SFX_STRENGTH changeblock $4, $0, $30 reloadmappart earthquake 50 @@ -79,10 +79,10 @@ UnknownScript_0x585ba: ; 0x585ba changeblock $2, $2, $18 changeblock $4, $2, $19 reloadmappart - playsound $001b + playsound SFX_STRENGTH earthquake 80 applymovement $0, MovementData_0x58610 - playsound $002f + playsound SFX_KINESIS waitbutton pause 20 warpcheck diff --git a/maps/RuinsofAlphKabutoChamber.asm b/maps/RuinsofAlphKabutoChamber.asm index 9da5ef7de..cd502aff2 100644 --- a/maps/RuinsofAlphKabutoChamber.asm +++ b/maps/RuinsofAlphKabutoChamber.asm @@ -53,7 +53,7 @@ UnknownScript_0x58751: ; 0x58751 earthquake 30 showemote $0, $0, 20 pause 30 - playsound $001b + playsound SFX_STRENGTH changeblock $4, $0, $30 reloadmappart earthquake 50 @@ -86,10 +86,10 @@ UnknownScript_0x58778: ; 0x58778 changeblock $2, $2, $18 changeblock $4, $2, $19 reloadmappart - playsound $001b + playsound SFX_STRENGTH earthquake 80 applymovement $0, MovementData_0x587fe - playsound $002f + playsound SFX_KINESIS waitbutton pause 20 warpcheck diff --git a/maps/RuinsofAlphOmanyteChamber.asm b/maps/RuinsofAlphOmanyteChamber.asm index 42e16d033..44be92c98 100644 --- a/maps/RuinsofAlphOmanyteChamber.asm +++ b/maps/RuinsofAlphOmanyteChamber.asm @@ -51,7 +51,7 @@ UnknownScript_0x58c12: ; 0x58c12 earthquake 30 showemote $0, $0, 20 pause 30 - playsound $001b + playsound SFX_STRENGTH changeblock $4, $0, $30 reloadmappart earthquake 50 @@ -79,10 +79,10 @@ UnknownScript_0x58c36: ; 0x58c36 changeblock $2, $2, $18 changeblock $4, $2, $19 reloadmappart - playsound $001b + playsound SFX_STRENGTH earthquake 80 applymovement $0, MovementData_0x58c8c - playsound $002f + playsound SFX_KINESIS waitbutton pause 20 warpcheck diff --git a/maps/RuinsofAlphOutside.asm b/maps/RuinsofAlphOutside.asm index 056645554..0e2684092 100644 --- a/maps/RuinsofAlphOutside.asm +++ b/maps/RuinsofAlphOutside.asm @@ -67,7 +67,7 @@ UnknownScript_0x58044: ; 0x58044 2writetext UnknownText_0x580c7 closetext loadmovesprites - playmusic $0011 + playmusic MUSIC_SHOW_ME_AROUND follow $3, $0 applymovement $3, MovementData_0x580ba disappear $3 diff --git a/maps/RuinsofAlphResearchCenter.asm b/maps/RuinsofAlphResearchCenter.asm index 57048db91..f1b1a0d38 100644 --- a/maps/RuinsofAlphResearchCenter.asm +++ b/maps/RuinsofAlphResearchCenter.asm @@ -37,13 +37,13 @@ UnknownScript_0x5918b: ; 0x5918b UnknownScript_0x59192: ; 0x59192 applymovement $4, MovementData_0x5926f - playsound $000d + playsound SFX_BOOT_PC pause 60 - playsound $0020 + playsound SFX_SWITCH_POKEMON pause 30 - playsound $0021 + playsound SFX_TALLY pause 30 - playsound $0022 + playsound SFX_TRANSACTION pause 30 spriteface $4, $0 loadfont @@ -53,7 +53,7 @@ UnknownScript_0x59192: ; 0x59192 applymovement $4, MovementData_0x59274 loadfont 2writetext UnknownText_0x592fa - playsound $0001 + playsound SFX_ITEM waitbutton setflag $000c 2writetext UnknownText_0x59311 diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm index 85a8680c1..205e29034 100644 --- a/maps/SaffronGym.asm +++ b/maps/SaffronGym.asm @@ -25,7 +25,7 @@ SabrinaScript_0x189c2e: ; 0x189c2e setevent EVENT_BEAT_PSYCHIC_JARED loadfont 2writetext UnknownText_0x189e95 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0028 2writetext UnknownText_0x189ead diff --git a/maps/SeafoamGym.asm b/maps/SeafoamGym.asm index 3a4949518..d62909263 100644 --- a/maps/SeafoamGym.asm +++ b/maps/SeafoamGym.asm @@ -31,7 +31,7 @@ UnknownScript_0x1ab516: ; 0x1ab516 setevent $04cb loadfont 2writetext UnknownText_0x1ab683 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0029 2writetext UnknownText_0x1ab69d diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm index 1e59781c6..6021f6ef3 100644 --- a/maps/SproutTower3F.asm +++ b/maps/SproutTower3F.asm @@ -22,12 +22,12 @@ UnknownScript_0x184947: ; 0x184947 spriteface $0, $1 showemote $0, $0, 15 special $006a - playsound $0041 - playsound $006e + playsound SFX_TACKLE + playsound SFX_ELEVATOR earthquake 79 pause 15 - playsound $0041 - playsound $006e + playsound SFX_TACKLE + playsound SFX_ELEVATOR earthquake 79 applymovement $0, MovementData_0x184a1d applymovement $8, MovementData_0x184a22 @@ -39,7 +39,7 @@ UnknownScript_0x184947: ; 0x184947 spriteface $8, $0 pause 15 applymovement $8, MovementData_0x184a24 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x184aec closetext @@ -49,7 +49,7 @@ UnknownScript_0x184947: ; 0x184947 2writetext UnknownText_0x184bc8 pause 15 loadmovesprites - playsound $0013 + playsound SFX_WARP_TO special $0030 special $0033 disappear $8 diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm index 8a72e5234..7c8b2f50b 100644 --- a/maps/TeamRocketBaseB1F.asm +++ b/maps/TeamRocketBaseB1F.asm @@ -29,7 +29,7 @@ SecurityCamera1a: ; 0x6c65e checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $2 appear $2 spriteface $0, $2 @@ -38,7 +38,7 @@ SecurityCamera1a: ; 0x6c65e if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $2 appear $2 applymovement $2, SecurityCameraMovement1 @@ -55,7 +55,7 @@ SecurityCamera1b: ; 0x6c6a7 checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $3 appear $2 spriteface $0, $2 @@ -64,7 +64,7 @@ SecurityCamera1b: ; 0x6c6a7 if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $3 appear $2 applymovement $2, SecurityCameraMovement1 @@ -81,7 +81,7 @@ SecurityCamera2a: ; 0x6c6f0 checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $4, $7 appear $2 spriteface $0, $2 @@ -90,7 +90,7 @@ SecurityCamera2a: ; 0x6c6f0 if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $c, $5 appear $2 @@ -108,7 +108,7 @@ SecurityCamera2b: ; 0x6c73c checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $4, $8 appear $2 spriteface $0, $2 @@ -117,7 +117,7 @@ SecurityCamera2b: ; 0x6c73c if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $c, $5 appear $2 @@ -135,7 +135,7 @@ SecurityCamera3a: ; 0x6c788 checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $6 appear $2 spriteface $0, $2 @@ -144,7 +144,7 @@ SecurityCamera3a: ; 0x6c788 if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $19, $b appear $2 @@ -162,7 +162,7 @@ SecurityCamera3b: ; 0x6c7d4 checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $13, $7 appear $2 spriteface $0, $2 @@ -171,7 +171,7 @@ SecurityCamera3b: ; 0x6c7d4 if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $19, $c appear $2 @@ -189,7 +189,7 @@ SecurityCamera4: ; 0x6c820 checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $11, $10 appear $2 spriteface $0, $2 @@ -198,7 +198,7 @@ SecurityCamera4: ; 0x6c820 if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $19, $b appear $2 @@ -216,7 +216,7 @@ SecurityCamera5: ; 0x6c86c checkevent $06da iftrue NoSecurityCamera showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER moveperson $2, $3, $10 appear $2 spriteface $0, $2 @@ -225,7 +225,7 @@ SecurityCamera5: ; 0x6c86c if_equal $1, NoSecurityCamera 2call PlaySecurityCameraSounds showemote $0, $0, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $0, $3 moveperson $2, $e, $10 appear $2 @@ -269,17 +269,17 @@ TrainerCameraGrunt2: ; 0x6c8ce ; 0x6c8e3 PlaySecurityCameraSounds: ; 0x6c8e3 - playsound $0030 + playsound SFX_LICK pause 10 - playsound $0030 + playsound SFX_LICK pause 10 - playsound $0030 + playsound SFX_LICK pause 10 - playsound $0030 + playsound SFX_LICK pause 10 - playsound $0030 + playsound SFX_LICK pause 10 - playsound $0030 + playsound SFX_LICK end ; 0x6c900 @@ -564,7 +564,7 @@ MapTeamRocketBaseB1FSignpost0Script: ; 0x6ca9c checkevent EVENT_TURNED_OFF_SECURITY_CAMERAS iftrue UnknownScript_0x6cabe 2writetext UnknownText_0x6cdad - playsound $0021 + playsound SFX_TALLY closetext loadmovesprites setevent EVENT_TURNED_OFF_SECURITY_CAMERAS diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm index a04102b07..2d2ea3804 100644 --- a/maps/TeamRocketBaseB2F.asm +++ b/maps/TeamRocketBaseB2F.asm @@ -63,7 +63,7 @@ UnknownScript_0x6cfac: ; 0x6cfac spriteface $0, $0 showemote $0, $0, 15 applymovement $0, MovementData_0x6d21f - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER applymovement $3, MovementData_0x6d224 spriteface $0, $1 applymovement $2, MovementData_0x6d22f @@ -169,7 +169,7 @@ UnknownScript_0x6d091: ; 0x6d091 loadmovesprites special $002e special $009d - playsound $0005 + playsound SFX_FULL_HEAL special $001b special $0031 loadfont @@ -395,7 +395,7 @@ MapTeamRocketBaseB2FSignpost1Script: ; 0x6d1db UnknownScript_0x6d1e8: ; 0x6d1e8 2writetext UnknownText_0x6dd6b closetext - playsound $001f + playsound SFX_ENTER_DOOR changeblock $e, $c, $7 reloadmappart loadmovesprites diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm index cd46f157d..cc23fbecf 100644 --- a/maps/TeamRocketBaseB3F.asm +++ b/maps/TeamRocketBaseB3F.asm @@ -67,12 +67,12 @@ UnknownScript_0x6e019: ; 0x6e019 appear $a applymovement $a, MovementData_0x6e164 spriteface $0, $2 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x6e267 closetext loadmovesprites - playsound $0041 + playsound SFX_TACKLE applymovement $0, MovementData_0x6e175 applymovement $a, MovementData_0x6e16d disappear $a @@ -95,7 +95,7 @@ UnknownScript_0x6e052: ; 0x6e052 UnknownScript_0x6e056: ; 0x6e056 pause 30 showemote $0, $3, 15 - playmusic $0039 + playmusic MUSIC_ROCKET_ENCOUNTER spriteface $3, $0 loadfont 2writetext UnknownText_0x6e400 @@ -113,7 +113,7 @@ UnknownScript_0x6e056: ; 0x6e056 closetext loadmovesprites applymovement $3, MovementData_0x6e144 - playsound $0041 + playsound SFX_TACKLE applymovement $3, MovementData_0x6e147 disappear $3 dotrigger $3 @@ -272,7 +272,7 @@ UnknownScript_0x6e105: ; 0x6e105 UnknownScript_0x6e10b: ; 0x6e10b 2writetext UnknownText_0x6e9a3 closetext - playsound $001f + playsound SFX_ENTER_DOOR changeblock $a, $8, $7 reloadmappart loadmovesprites diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm index ab4355f08..4e4d93d04 100644 --- a/maps/TinTower1F.asm +++ b/maps/TinTower1F.asm @@ -96,10 +96,10 @@ UnknownScript_0x18508f: ; 0x18508f spriteface $0, $2 cry RAIKOU pause 10 - playsound $0014 + playsound SFX_WARP_FROM applymovement $3, MovementData_0x1851d4 disappear $3 - playsound $0023 + playsound SFX_EXIT_BUILDING waitbutton UnknownScript_0x1850b6: ; 0x1850b6 writebyte ENTEI @@ -109,10 +109,10 @@ UnknownScript_0x1850b6: ; 0x1850b6 spriteface $0, $3 cry ENTEI pause 10 - playsound $0014 + playsound SFX_WARP_FROM applymovement $4, MovementData_0x1851de disappear $4 - playsound $0023 + playsound SFX_EXIT_BUILDING waitbutton UnknownScript_0x1850d7: ; 0x1850d7 spriteface $0, $1 @@ -138,20 +138,20 @@ UnknownScript_0x1850d7: ; 0x1850d7 returnafterbattle pause 20 spriteface $0, $0 - playmusic $0061 - playsound $001f + playmusic MUSIC_MYSTICALMAN_ENCOUNTER + playsound SFX_ENTER_DOOR moveperson $5, $a, $f appear $5 applymovement $5, MovementData_0x1851ec - playsound $001f + playsound SFX_ENTER_DOOR moveperson $6, $9, $f appear $6 applymovement $6, MovementData_0x1851f5 - playsound $001f + playsound SFX_ENTER_DOOR moveperson $7, $9, $f appear $7 applymovement $7, MovementData_0x1851fb - playsound $001f + playsound SFX_ENTER_DOOR moveperson $8, $9, $f appear $8 applymovement $8, MovementData_0x1851fe @@ -164,7 +164,7 @@ UnknownScript_0x1850d7: ; 0x1850d7 closetext loadmovesprites applymovement $5, MovementData_0x1851f1 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $5 waitbutton special $006a @@ -209,7 +209,7 @@ SageScript_0x185188: ; 0x185188 refreshscreen $0 earthquake 72 waitbutton - playsound $001b + playsound SFX_STRENGTH changeblock $a, $2, $20 reloadmappart setevent EVENT_GOT_RAINBOW_WING diff --git a/maps/UndergroundPathSwitchRoomEntrances.asm b/maps/UndergroundPathSwitchRoomEntrances.asm index 43460e951..52973d7c2 100644 --- a/maps/UndergroundPathSwitchRoomEntrances.asm +++ b/maps/UndergroundPathSwitchRoomEntrances.asm @@ -88,14 +88,14 @@ UnknownScript_0x7ca80: ; 0x7ca80 showemote $0, $0, 15 special $006a pause 15 - playsound $0023 + playsound SFX_EXIT_BUILDING appear $c waitbutton applymovement $c, MovementData_0x7ce87 spriteface $0, $3 2call UnknownScript_0x7cad4 applymovement $c, MovementData_0x7ce92 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $c dotrigger $1 waitbutton @@ -108,14 +108,14 @@ UnknownScript_0x7caaa: ; 0x7caaa showemote $0, $0, 15 special $006a pause 15 - playsound $0023 + playsound SFX_EXIT_BUILDING appear $c waitbutton applymovement $c, MovementData_0x7ce8c spriteface $0, $3 2call UnknownScript_0x7cad4 applymovement $c, MovementData_0x7ce97 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $c dotrigger $1 waitbutton @@ -129,7 +129,7 @@ UnknownScript_0x7cad4: ; 0x7cad4 setevent $06c5 domaptrigger GROUP_BURNED_TOWER_1F, MAP_BURNED_TOWER_1F, $1 UnknownScript_0x7cae1: ; 0x7cae1 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x7ce9d closetext @@ -169,7 +169,7 @@ UnknownScript_0x7cb19: ; 0x7cb19 ; 0x7cb29 UnknownScript_0x7cb29: ; 0x7cb29 - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x7cfc2 closetext @@ -479,7 +479,7 @@ UnknownScript_0x7cc8d: ; 0x7cc8d if_equal $6, UnknownScript_0x7cd5e if_equal $7, UnknownScript_0x7cd79 UnknownScript_0x7ccb0: ; 0x7ccb0 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7ce11 2call UnknownScript_0x7ce19 2call UnknownScript_0x7ce21 @@ -497,7 +497,7 @@ UnknownScript_0x7ccb0: ; 0x7ccb0 ; 0x7ccd7 UnknownScript_0x7ccd7: ; 0x7ccd7 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cda5 2call UnknownScript_0x7cdd5 2call UnknownScript_0x7cdf9 @@ -511,7 +511,7 @@ UnknownScript_0x7ccd7: ; 0x7ccd7 ; 0x7ccf2 UnknownScript_0x7ccf2: ; 0x7ccf2 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cdad 2call UnknownScript_0x7cde1 2call UnknownScript_0x7cded @@ -525,7 +525,7 @@ UnknownScript_0x7ccf2: ; 0x7ccf2 ; 0x7cd0d UnknownScript_0x7cd0d: ; 0x7cd0d - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cdb5 2call UnknownScript_0x7cdd5 2call UnknownScript_0x7cdf9 @@ -539,7 +539,7 @@ UnknownScript_0x7cd0d: ; 0x7cd0d ; 0x7cd28 UnknownScript_0x7cd28: ; 0x7cd28 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cdbd 2call UnknownScript_0x7cde1 2call UnknownScript_0x7cded @@ -553,7 +553,7 @@ UnknownScript_0x7cd28: ; 0x7cd28 ; 0x7cd43 UnknownScript_0x7cd43: ; 0x7cd43 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cdc5 2call UnknownScript_0x7cdd5 2call UnknownScript_0x7cdf9 @@ -567,7 +567,7 @@ UnknownScript_0x7cd43: ; 0x7cd43 ; 0x7cd5e UnknownScript_0x7cd5e: ; 0x7cd5e - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7cdcd 2call UnknownScript_0x7cde1 2call UnknownScript_0x7cded @@ -581,7 +581,7 @@ UnknownScript_0x7cd5e: ; 0x7cd5e ; 0x7cd79 UnknownScript_0x7cd79: ; 0x7cd79 - playsound $001f + playsound SFX_ENTER_DOOR 2call UnknownScript_0x7ce11 2call UnknownScript_0x7ce19 2call UnknownScript_0x7cdb5 diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm index 5e022945e..2e221bb18 100644 --- a/maps/VermilionGym.asm +++ b/maps/VermilionGym.asm @@ -24,7 +24,7 @@ SurgeScript_0x1920a5: ; 0x1920a5 setevent EVENT_BEAT_JUGGLER_HORTON loadfont 2writetext UnknownText_0x192277 - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $0025 2writetext UnknownText_0x192291 diff --git a/maps/VermilionPort.asm b/maps/VermilionPort.asm index 72f7e2b80..c8c7680bb 100644 --- a/maps/VermilionPort.asm +++ b/maps/VermilionPort.asm @@ -52,11 +52,11 @@ SailorScript_0x74dc4: ; 0x74dc4 loadmovesprites spriteface $2, $0 pause 10 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $2 waitbutton applymovement $0, MovementData_0x74ef1 - playsound $0023 + playsound SFX_EXIT_BUILDING special $002e waitbutton setevent $073a diff --git a/maps/VictoryRoad.asm b/maps/VictoryRoad.asm index 59f9fb9f0..05310b5ac 100644 --- a/maps/VictoryRoad.asm +++ b/maps/VictoryRoad.asm @@ -51,7 +51,7 @@ UnknownScript_0x744b5: ; 0x744b5 UnknownScript_0x744d4: ; 0x744d4 spriteface $0, $0 - playmusic $001f + playmusic MUSIC_RIVAL_ENCOUNTER loadfont 2writetext UnknownText_0x7455f closetext @@ -91,7 +91,7 @@ UnknownScript_0x7450f: ; 0x7450f ; 0x7451f UnknownScript_0x7451f: ; 0x7451f - playmusic $0020 + playmusic MUSIC_RIVAL_AFTER loadfont 2writetext UnknownText_0x746ce closetext diff --git a/maps/VioletCity.asm b/maps/VioletCity.asm index e29b2b6b0..ab7d58456 100644 --- a/maps/VioletCity.asm +++ b/maps/VioletCity.asm @@ -36,7 +36,7 @@ UnknownScript_0x1a83d1: ; 0x1a83d1 2writetext UnknownText_0x1a84cb closetext loadmovesprites - playmusic $0011 + playmusic MUSIC_SHOW_ME_AROUND follow $2, $0 applymovement $2, MovementData_0x1a842a spriteface $0, $1 @@ -49,7 +49,7 @@ UnknownScript_0x1a83d1: ; 0x1a83d1 loadmovesprites applymovement $2, MovementData_0x1a8465 applymovement $2, MovementData_0x1a8463 - playsound $001f + playsound SFX_ENTER_DOOR disappear $2 clearevent $06cb waitbutton diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm index 82ab8e9bd..563c25c25 100644 --- a/maps/VioletGym.asm +++ b/maps/VioletGym.asm @@ -21,7 +21,7 @@ FalknerScript_0x683c2: ; 0x683c2 setevent EVENT_BEAT_FALKNER loadfont 2writetext UnknownText_0x685af - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $001b checkcode $7 diff --git a/maps/VioletPokeCenter1F.asm b/maps/VioletPokeCenter1F.asm index be6d27a4b..49d6a2a71 100644 --- a/maps/VioletPokeCenter1F.asm +++ b/maps/VioletPokeCenter1F.asm @@ -35,7 +35,7 @@ UnknownScript_0x694d7: ; 0x694d7 if_equal $1, .UnknownScript_0x69511 spriteface $0, $0 applymovement $6, MovementData_0x69549 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $6 waitbutton end @@ -44,7 +44,7 @@ UnknownScript_0x694d7: ; 0x694d7 applymovement $6, MovementData_0x6954e spriteface $0, $0 applymovement $6, MovementData_0x69551 - playsound $0023 + playsound SFX_EXIT_BUILDING disappear $6 waitbutton end diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm index 4337011cf..e3a8def43 100644 --- a/maps/ViridianGym.asm +++ b/maps/ViridianGym.asm @@ -21,7 +21,7 @@ BlueScript_0x9aa26: ; 0x9aa26 setevent EVENT_BEAT_BLUE loadfont 2writetext UnknownText_0x9ac0f - playsound $009c + playsound SFX_GET_BADGE waitbutton setflag $002a 2writetext UnknownText_0x9ac27 diff --git a/maps/WarehouseEntrance.asm b/maps/WarehouseEntrance.asm index d869bdb33..1085fa4af 100644 --- a/maps/WarehouseEntrance.asm +++ b/maps/WarehouseEntrance.asm @@ -317,7 +317,7 @@ UnknownScript_0x7c1cd: ; 0x7c1cd closetext loadmovesprites special $002e - playmusic $000d + playmusic MUSIC_HEAL pause 60 special $0031 special $003d @@ -409,7 +409,7 @@ UnknownScript_0x7c27a: ; 0x7c27a closetext loadmovesprites special $002e - playmusic $000d + playmusic MUSIC_HEAL pause 60 special $0031 special $003d @@ -481,7 +481,7 @@ MapWarehouseEntranceSignpost0Script:: ; 0x7c2d6 ; 0x7c2e8 UnknownScript_0x7c2e8: ; 0x7c2e8 - playsound $0022 + playsound SFX_TRANSACTION 2writetext UnknownText_0x7c5d6 closetext loadmovesprites diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm index 62682ad9d..4eda6e204 100644 --- a/maps/WillsRoom.asm +++ b/maps/WillsRoom.asm @@ -38,7 +38,7 @@ UnknownScript_0x1804df: ; 0x1804df UnknownScript_0x1804e0: ; 0x1804e0 applymovement $0, MovementData_0x18052c refreshscreen $86 - playsound $001b + playsound SFX_STRENGTH earthquake 80 changeblock $4, $e, $2a reloadmappart @@ -66,7 +66,7 @@ WillScript_0x1804f8: ; 0x1804f8 2writetext UnknownText_0x180644 closetext loadmovesprites - playsound $001f + playsound SFX_ENTER_DOOR changeblock $4, $2, $16 reloadmappart loadmovesprites From c58a5b8b7a8dcdf47ea87b4f43c93e00f0de5106 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 30 Apr 2014 23:37:50 -0400 Subject: [PATCH 13/18] Use constants for the skipped dummy TMs. --- main.asm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.asm b/main.asm index 81db117f1..dd5159547 100644 --- a/main.asm +++ b/main.asm @@ -11455,9 +11455,9 @@ GetTMHMNumber:: ; d407 ld a, c ; Skip any dummy items. - cp $c3 ; TM04-05 + cp ITEM_C3 ; TM04-05 jr c, .done - cp $dc ; TM28-29 + cp ITEM_DC ; TM28-29 jr c, .skip dec a @@ -11477,13 +11477,14 @@ GetNumberedTMHM: ; d417 ld a, c ; Skip any gaps. - cp 5 + cp ITEM_C3 - (TM_01 - 1) jr c, .done - cp 29 - jr c, .skip + cp ITEM_DC - (TM_01 - 1) - 1 + jr c, .skip_one +.skip_two inc a -.skip +.skip_one inc a .done add TM_01 From 95af7dd873165ca197372a7b6e896fe3bd66e24a Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 30 Apr 2014 23:44:44 -0400 Subject: [PATCH 14/18] Move RegionCheck into engine/landmarks.asm. --- engine/landmarks.asm | 37 +++++++++++++++++++++++++++++++++++++ main.asm | 38 -------------------------------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/engine/landmarks.asm b/engine/landmarks.asm index 1d050da77..28c0d60a9 100644 --- a/engine/landmarks.asm +++ b/engine/landmarks.asm @@ -255,3 +255,40 @@ UndergroundName: db "UNDERGROUND@" BattleTowerName: db "BATTLE", $1f, "TOWER@" SpecialMapName: db "SPECIAL@" + +RegionCheck: ; 0x1caea1 +; Checks if the player is in Kanto or Johto. +; If in Johto, returns 0 in e. +; If in Kanto, returns 1 in e. + ld a, [MapGroup] + ld b, a + ld a, [MapNumber] + ld c, a + call GetWorldMapLocation + cp FAST_SHIP ; S.S. Aqua + jr z, .johto + cp SPECIAL_MAP + jr nz, .checkagain + +; In a special map, get the backup map group / map id + ld a, [BackupMapGroup] + ld b, a + ld a, [BackupMapNumber] + ld c, a + call GetWorldMapLocation + +.checkagain + cp KANTO_LANDMARK + jr c, .johto + +; Victory Road area is considered to be Johto. + cp VICTORY_ROAD + jr c, .kanto + +.johto + ld e, 0 + ret +.kanto + ld e, 1 + ret + diff --git a/main.asm b/main.asm index dd5159547..a39ae6a64 100644 --- a/main.asm +++ b/main.asm @@ -114283,44 +114283,6 @@ INCLUDE "battle/move_names.asm" INCLUDE "engine/landmarks.asm" -RegionCheck: ; 0x1caea1 -; Checks if the player is in Kanto or Johto. -; If in Johto, returns 0 in e. -; If in Kanto, returns 1 in e. - ld a, [MapGroup] - ld b, a - ld a, [MapNumber] - ld c, a - call GetWorldMapLocation - cp FAST_SHIP ; S.S. Aqua - jr z, .johto - cp SPECIAL_MAP - jr nz, .checkagain - -; In a special map, get the backup map group / map id - ld a, [BackupMapGroup] - ld b, a - ld a, [BackupMapNumber] - ld c, a - call GetWorldMapLocation - -.checkagain - cp KANTO_LANDMARK - jr c, .johto - -; Victory Road area is considered to be Johto. - cp VICTORY_ROAD - jr c, .kanto - -.johto - ld e, 0 - ret -.kanto - ld e, 1 - ret - - - SECTION "bank75", ROMX, BANK[$75] From 2f218f5283ca53c5d512c05332826aa761507195 Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 1 May 2014 00:09:32 -0400 Subject: [PATCH 15/18] Some GB Printer strings. --- main.asm | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/main.asm b/main.asm index a39ae6a64..0251d553b 100644 --- a/main.asm +++ b/main.asm @@ -65963,13 +65963,52 @@ Function84785: ; 84785 ret ; 847bd -INCBIN "baserom.gbc", $847bd, $847f5 - $847bd +Function847bd: ; 847bd + ld a, [$cbf8] + and a + ret z + push af + xor a + ld [hBGMapMode], a + ld hl, $c4f2 + ld bc, $0d10 + call ClearBox + pop af + ld e, a + ld d, 0 + ld hl, Unknown_84807 + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $c530 + ld a, $77 + call Function13d4 + ld hl, $c5d0 + ld de, String_847f5 + call PlaceString + ld a, $1 + ld [hBGMapMode], a + xor a + ld [$cbf8], a + ret +; 847f5 String_847f5: db "Press B to Cancel@" ; 84807 -INCBIN "baserom.gbc", $84807, $84817 - $84807 +Unknown_84807: ; 84807 + dw String_1dc275 + dw String_1dc276 + dw String_1dc289 + dw String_1dc29c + dw String_1dc2ad + dw String_1dc2e2 + dw String_1dc317 + dw String_1dc34c +; 84817 ; known jump sources: 844f2 (21:44f2) Function84817: ; 84817 (21:4817) @@ -114398,7 +114437,31 @@ Function1dc26a: ; 1dc26a ret ; 1dc275 -INCBIN "baserom.gbc", $1dc275, $1dc381 - $1dc275 +String_1dc275: db "@" +String_1dc276: next " CHECKING LINK...@" +String_1dc289: next " TRANSMITTING...@" +String_1dc29c: next " PRINTING...@" +String_1dc2ad: + db " Printer Error 1" + db $4e + next "Check the Game Boy" + next "Printer Manual.@" +String_1dc2e2: + db " Printer Error 2" + db $4e + next "Check the Game Boy" + next "Printer Manual.@" +String_1dc317: + db " Printer Error 3" + db $4e + next "Check the Game Boy" + next "Printer Manual.@" +String_1dc34c: + db " Printer Error 4" + db $4e + next "Check the Game Boy" + next "Printer Manual.@" +; 1dc381 Function1dc381: ; 1dc381 call WhiteBGMap From b7e37621873f36a7b1e1d29a02d5b0322194fecf Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 1 May 2014 02:21:26 -0400 Subject: [PATCH 16/18] A couple Buena's Password specials. --- constants/script_constants.asm | 3 +- main.asm | 285 ++++++++++++++++++++++++++++++--- maps/RadioTower2F.asm | 4 +- 3 files changed, 263 insertions(+), 29 deletions(-) diff --git a/constants/script_constants.asm b/constants/script_constants.asm index 1e4145ea3..540612441 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -29,7 +29,8 @@ SPECIAL_HOOHCHAMBER EQU $008d SPECIAL_CELEBI EQU $008f SPECIAL_AFTERCELEBI EQU $0090 SPECIAL_POKESEER EQU $0091 - +SPECIAL_BUENAS_PASSWORD EQU $0092 +SPECIAL_BUENA_PRIZE EQU $0093 SPECIAL_DRATINI EQU $0094 SPECIAL_BEASTSCHECK EQU $0096 diff --git a/main.asm b/main.asm index 0251d553b..b97cd0c7b 100644 --- a/main.asm +++ b/main.asm @@ -8030,8 +8030,8 @@ SpecialsPointers: ; c029 dbw BANK(Function4989a), Function4989a dbw BANK(Function49bf9), Function49bf9 dbw BANK(SpecialPokeSeer), SpecialPokeSeer - dbw BANK(Function8af6b), Function8af6b - dbw BANK(Function8afd4), Function8afd4 + dbw BANK(SpecialBuenasPassword), SpecialBuenasPassword + dbw BANK(SpecialBuenaPrize), SpecialBuenaPrize dbw BANK(SpecialDratini),SpecialDratini dbw BANK(Function11485), Function11485 dbw BANK(SpecialBeastsCheck),SpecialBeastsCheck @@ -69627,7 +69627,40 @@ Function89b97: ; 89b97 (22:5b97) ; 89bd8 (22:5bd8) Unknown_89bd8: ; 89bd8 -INCBIN "baserom.gbc",$89bd8,$89c34 - $89bd8 + dw Unknown_89be0 + dw Unknown_89bf5 + dw Unknown_89c0a + dw Unknown_89c1f +; 89be0 + +Unknown_89be0: ; 89be0 + db $01, $12, $4e, $01, $00 + db $01, $19, $4e, $01, $40 + db $01, $12, $72, $01, $20 + db $01, $19, $72, $01, $60 + db $ff + +Unknown_89bf5: ; 89bf5 + db $01, $60, $16, $01, $00 + db $01, $62, $16, $01, $40 + db $01, $60, $92, $01, $20 + db $01, $62, $92, $01, $60 + db $ff + +Unknown_89c0a: ; 89c0a + db $01, $78, $66, $01, $00 + db $01, $78, $66, $01, $40 + db $01, $78, $92, $01, $20 + db $01, $78, $92, $01, $60 + db $ff + +Unknown_89c1f: ; 89c1f + db $01, $80, $66, $01, $00 + db $01, $80, $66, $01, $40 + db $01, $80, $92, $01, $20 + db $01, $80, $92, $01, $60 + db $ff +; 89c34 ; known jump sources: 89b97 (22:5b97), 89c44 (22:5c44) Function89c34: ; 89c34 (22:5c34) @@ -69738,10 +69771,16 @@ Function89c67: ; 89c67 (22:5c67) ; 89cbf (22:5cbf) Unknown_89cbf: ; 89cbf -INCBIN "baserom.gbc",$89cbf,$89ccf - $89cbf + db 0, 2, 0, 0 + db 1, 3, 0, 0 + db 2, 4, 0, 0 + db 3, 0, 0, 0 Unknown_89ccf: ; 89ccf -INCBIN "baserom.gbc",$89ccf,$89cdf - $89ccf + db 0, 0, 0, 0 + db 0, 3, 0, 0 + db 2, 4, 0, 0 + db 3, 0, 0, 0 ; 89cdf ; known jump sources: 8a50e (22:650e) @@ -72458,10 +72497,10 @@ Function8af1c: ; 8af1c ret ; 8af6b -Function8af6b: ; 8af6b +SpecialBuenasPassword: ; 8af6b xor a ld [$cf76], a - ld hl, Unknown_8afa9 + ld hl, MenuDataHeader_0x8afa9 call Function1d3c ld a, [$dc4a] ld c, a @@ -72488,10 +72527,42 @@ Function8af6b: ; 8af6b ret ; 8afa9 -Unknown_8afa9: ; 8afa9 -INCBIN "baserom.gbc",$8afa9,$8afd4 - $8afa9 +MenuDataHeader_0x8afa9: ; 0x8afa9 + db $40 ; flags + db 00, 00 ; start coords + db 07, 10 ; end coords + dw MenuData2_0x8afb2 + db 1 ; default option +; 0x8afb1 -Function8afd4: ; 8afd4 + db 0 + +MenuData2_0x8afb2: ; 0x8afb2 + db $81 ; flags + db 0 ; items + dw Unknown_8afb8 + dw Function8afbd +; 0x8afb4 + +Unknown_8afb8: ; 8afb8 + db 3 + db 0, 1, 2, $ff + +Function8afbd: ; 8afbd + push de + ld a, [$dc4a] + and $f0 + ld c, a + ld a, [MenuSelection] + add c + ld c, a + callba Functionb8f8f + pop hl + call PlaceString + ret +; 8afd4 + +SpecialBuenaPrize: ; 8afd4 xor a ld [$d0e4], a ld a, $1 @@ -72513,7 +72584,7 @@ Function8afd4: ; 8afd4 call Function8b0e2 jr z, .asm_8b05f ld [$cf75], a - call Function8b154 + call GetBuenaPrize ld a, [hl] ld [$d265], a call GetItemName @@ -72522,7 +72593,7 @@ Function8afd4: ; 8afd4 call YesNoBox jr c, .asm_8afeb ld a, [$cf75] - call Function8b154 + call GetBuenaPrize inc hl ld a, [hld] ld c, a @@ -72566,7 +72637,7 @@ Function8afd4: ; 8afd4 .asm_8b05f call Function1c17 call Function1c17 - ld hl, $708b + ld hl, UnknownText_0x8b08b call PrintText call Functiona36 call PlayClickSFX @@ -72610,7 +72681,7 @@ UnknownText_0x8b08b: ; 0x8b08b ; 0x8b090 Function8b090: ; 8b090 - ld hl, $70d1 + ld hl, MenuDataHeader_0x8b0d1 call LoadMenuDataHeader ret ; 8b097 @@ -72669,7 +72740,7 @@ MenuDataHeader_0x8b0dd: ; 0x8b0dd ; 8b0e2 Function8b0e2: ; 8b0e2 - ld hl, Unknown_8b113 + ld hl, MenuDataHeader_0x8b113 call Function1d3c ld a, [MenuSelection] ld [$cf88], a @@ -72695,21 +72766,73 @@ Function8b0e2: ; 8b0e2 ret ; 8b113 -Unknown_8b113: ; 8b113 -INCBIN "baserom.gbc",$8b113,$8b154 - $8b113 +MenuDataHeader_0x8b113: ; 0x8b113 + db $40 ; flags + db 01, 01 ; start coords + db 09, 16 ; end coords + dw MenuData2_0x8b11c + db 1 ; default option +; 0x8b11b -Function8b154: ; 8b154 + db 0 + +MenuData2_0x8b11c: ; 0x8b11c + db $10 ; flags + db 4 ; items + db $d, $1 + dbw BANK(Unknown_8b129), Unknown_8b129 + dbw BANK(BuenaPrizeItem), BuenaPrizeItem + dbw BANK(BuenaPrizePoints), BuenaPrizePoints +; 8b129 + +Unknown_8b129: ; 8b129 + db 9 + db 1, 2, 3, 4, 5, 6, 7, 8, 9, $ff +; 8b134 + +BuenaPrizeItem: ; 8b134 + ld a, [MenuSelection] + call GetBuenaPrize + ld a, [hl] + push de + ld [$d265], a + call GetItemName + pop hl + call PlaceString + ret +; 8b147 + +BuenaPrizePoints: ; 8b147 + ld a, [MenuSelection] + call GetBuenaPrize + inc hl + ld a, [hl] + ld c, "0" + add c + ld [de], a + ret +; 8b154 + +GetBuenaPrize: ; 8b154 dec a - ld hl, Unknown_8b15e - ld b, $0 + ld hl, BuenaPrizes + ld b, 0 ld c, a add hl, bc add hl, bc ret ; 8b15e -Unknown_8b15e: ; 8b15e -INCBIN "baserom.gbc",$8b15e,$8b170 - $8b15e +BuenaPrizes: ; 8b15e + db ULTRA_BALL, 2 + db FULL_RESTORE, 2 + db NUGGET, 3 + db RARE_CANDY, 3 + db PROTEIN, 5 + db IRON, 5 + db CARBOS, 5 + db CALCIUM, 5 + db HP_UP, 5 ; 8b170 @@ -73877,7 +74000,7 @@ Function8b79e: ; 8b79e Function8b7bd: ; 8b7bd call Function8b855 - ld hl, Unknown_8b867 + ld hl, MenuDataHeader_0x8b867 call Function1d3c ld a, [$d030] ld [$cf88], a @@ -73978,8 +74101,118 @@ Function8b855: ; 8b855 ret ; 8b867 -Unknown_8b867: ; 8b867 -INCBIN "baserom.gbc",$8b867,$8b94a - $8b867 +MenuDataHeader_0x8b867: ; 0x8b867 + db $40 ; flags + db 03, 01 ; start coords + db 13, 18 ; end coords + dw MenuData2_0x8b870 + db 1 ; default option +; 0x8b86f + + db 0 + +MenuData2_0x8b870: ; 0x8b870 + db $3c ; flags + db 5 ; items + db 3, 1 + dbw 0, $d002 + dbw BANK(Function8b880), Function8b880 + dbw BANK(Function8b88c), Function8b88c + dbw BANK(Function8b8c8), Function8b8c8 +; 8b880 + +Function8b880: ; 8b880 + ld h, d + ld l, e + ld de, MenuSelection + ld bc, $8102 + call PrintNum + ret +; 8b88c + +Function8b88c: ; 8b88c + call Function89160 + ld h, d + ld l, e + push hl + ld de, String_89116 + call Function8931b + call Function8932d + jr c, .asm_8b8a3 + ld hl, $0000 + add hl, bc + ld d, h + ld e, l + +.asm_8b8a3 + pop hl + push hl + call PlaceString + pop hl + ld d, $0 + ld e, $6 + add hl, de + push hl + ld de, String_89116 + call Function8931b + call Function8934a + jr c, .asm_8b8c0 + ld hl, $0006 + add hl, bc + ld d, h + ld e, l + +.asm_8b8c0 + pop hl + call PlaceString + call CloseSRAM + ret +; 8b8c8 + +Function8b8c8: ; 8b8c8 + ld hl, $c5b8 + ld b, $2 + ld c, $12 + call TextBox + ld a, [$d033] + ld b, 0 + ld c, a + ld hl, Unknown_8b903 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld d, h + ld e, l + ld hl, $c5e1 + call PlaceString + ld hl, $c5a4 + ld a, $f + ld [hl], a + ld hl, $c5b7 + ld a, $11 + ld [hl], a + ld a, [$d0e4] + cp $24 + ret c + ld hl, $c5a4 + ld c, $12 + call Function8b732 + ret +; 8b903 + +Unknown_8b903: ; 8b903 + dw String_8b90b + dw String_8b919 + dw String_8b92a + dw String_8b938 + +String_8b90b: db "めいしを えらんでください@" ; Please select a noun. +String_8b919: db "どの めいしと いれかえますか?@" ; OK to swap with any noun? +String_8b92a: db "あいてを えらんでください@" ; Please select an opponent. +String_8b938: db "いれる ところを えらんでください@" ; Please select a location. +; 8b94a Function8b94a: ; 8b94a ld [$d033], a @@ -86426,7 +86659,7 @@ Functionb8f8f: ; b8f8f and $f ld c, a push hl - ld hl, $4fb8 + ld hl, Jumptable_b8fb8 ld e, b add hl, de add hl, de diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm index 1af8412e6..ece419c38 100644 --- a/maps/RadioTower2F.asm +++ b/maps/RadioTower2F.asm @@ -201,7 +201,7 @@ UnknownScript_0x5d7be: ; 0x5d7be loadmovesprites spriteface $b, $0 refreshscreen $0 - special $0092 + special SPECIAL_BUENAS_PASSWORD loadmovesprites iffalse UnknownScript_0x5d845 loadfont @@ -396,7 +396,7 @@ ReceptionistScript_0x5d8ff: ; 0x5d8ff iffalse UnknownScript_0x5d90f 2writetext UnknownText_0x5e392 keeptextopen - special $0093 + special SPECIAL_BUENA_PRIZE loadmovesprites end ; 0x5d90f From af77c4eddd63bbe66f9504574ad56d0507fcf9fa Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 1 May 2014 03:37:22 -0400 Subject: [PATCH 17/18] Misc incbins in bank 23. --- main.asm | 301 +++++++++++++++++++++++-------------------------------- 1 file changed, 123 insertions(+), 178 deletions(-) diff --git a/main.asm b/main.asm index b97cd0c7b..ecc5b6f87 100644 --- a/main.asm +++ b/main.asm @@ -74564,7 +74564,7 @@ Function8c0c1: ; 8c0c1 ; 8c0e5 Function8c0e5: ; 8c0e5 - ld hl, $410f + ld hl, Unknown_8c10f ld a, [$c2d0] cp $4 jr z, .asm_8c0fc @@ -74590,21 +74590,27 @@ Function8c0e5: ; 8c0e5 ret ; 8c10f (23:410f) -INCBIN "baserom.gbc",$8c10f,$8c117 - $8c10f +Unknown_8c10f: ; 8c10f + db $e4 ; 3210 + db $55 ; 1111 + db $aa ; 2222 + db $00 ; 0000 + db $ff ; 3333 + db $e4 ; 3210 + db $e4 ; 3210 + db $e4 ; 3210 +; 8c117 GetTimePalette: ; 8c117 -; get time of day ld a, [TimeOfDay] ld e, a - ld d, $0 -; get fn ptr + ld d, 0 ld hl, .TimePalettes add hl, de add hl, de ld a, [hli] ld h, [hl] ld l, a -; go jp [hl] ; 8c126 @@ -74614,28 +74620,25 @@ GetTimePalette: ; 8c117 dw .NitePalette dw .DarknessPalette -.MorningPalette ; 8c12e +.MorningPalette ld a, [$d847] and %00000011 ; 0 ret -; 8c134 -.DayPalette ; 8c134 +.DayPalette ld a, [$d847] and %00001100 ; 1 srl a srl a ret -; 8c13e -.NitePalette ; 8c13e +.NitePalette ld a, [$d847] and %00110000 ; 2 swap a ret -; 8c146 -.DarknessPalette ; 8c146 +.DarknessPalette ld a, [$d847] and %11000000 ; 3 rlca @@ -74720,163 +74723,57 @@ GetTimePalFade: ; 8c17c ld b, $0 add hl, bc ret -; 8c19e -.dmgfades ; 8c19e +.dmgfades dw .morn dw .day dw .nite dw .darkness -; 8c1a6 -.morn ; 8c1a6 - db %11111111 - db %11111111 - db %11111111 - - db %11111110 - db %11111110 - db %11111110 - - db %11111001 - db %11100100 - db %11100100 - - db %11100100 - db %11010000 - db %11010000 - - db %10010000 - db %10000000 - db %10000000 - - db %01000000 - db %01000000 - db %01000000 - - db %00000000 - db %00000000 - db %00000000 -; 8c1bb +.morn + db %11111111, %11111111, %11111111 + db %11111110, %11111110, %11111110 + db %11111001, %11100100, %11100100 + db %11100100, %11010000, %11010000 + db %10010000, %10000000, %10000000 + db %01000000, %01000000, %01000000 + db %00000000, %00000000, %00000000 -.day ; 8c1bb - db %11111111 - db %11111111 - db %11111111 - - db %11111110 - db %11111110 - db %11111110 - - db %11111001 - db %11100100 - db %11100100 - - db %11100100 - db %11010000 - db %11010000 - - db %10010000 - db %10000000 - db %10000000 - - db %01000000 - db %01000000 - db %01000000 - - db %00000000 - db %00000000 - db %00000000 -; 8c1d0 +.day + db %11111111, %11111111, %11111111 + db %11111110, %11111110, %11111110 + db %11111001, %11100100, %11100100 + db %11100100, %11010000, %11010000 + db %10010000, %10000000, %10000000 + db %01000000, %01000000, %01000000 + db %00000000, %00000000, %00000000 -.nite ; 8c1d0 - db %11111111 - db %11111111 - db %11111111 - - db %11111110 - db %11111110 - db %11111110 - - db %11111001 - db %11100100 - db %11100100 - - db %11101001 - db %11010000 - db %11010000 - - db %10010000 - db %10000000 - db %10000000 - - db %01000000 - db %01000000 - db %01000000 - - db %00000000 - db %00000000 - db %00000000 -; 8c1e5 +.nite + db %11111111, %11111111, %11111111 + db %11111110, %11111110, %11111110 + db %11111001, %11100100, %11100100 + db %11101001, %11010000, %11010000 + db %10010000, %10000000, %10000000 + db %01000000, %01000000, %01000000 + db %00000000, %00000000, %00000000 -.darkness ; 8c1e5 - db %11111111 - db %11111111 - db %11111111 - - db %11111110 - db %11111110 - db %11111111 - - db %11111110 - db %11100100 - db %11111111 - - db %11111101 - db %11010000 - db %11111111 - - db %11111101 - db %10000000 - db %11111111 - - db %00000000 - db %01000000 - db %00000000 - - db %00000000 - db %00000000 - db %00000000 -; 8c1fa +.darkness + db %11111111, %11111111, %11111111 + db %11111110, %11111110, %11111111 + db %11111110, %11100100, %11111111 + db %11111101, %11010000, %11111111 + db %11111101, %10000000, %11111111 + db %00000000, %01000000, %00000000 + db %00000000, %00000000, %00000000 -.cgbfade ; 8c1fa - db %11111111 - db %11111111 - db %11111111 - - db %11111110 - db %11111110 - db %11111110 - - db %11111001 - db %11111001 - db %11111001 - - db %11100100 - db %11100100 - db %11100100 - - db %10010000 - db %10010000 - db %10010000 - - db %01000000 - db %01000000 - db %01000000 - - db %00000000 - db %00000000 - db %00000000 +.cgbfade + db %11111111, %11111111, %11111111 + db %11111110, %11111110, %11111110 + db %11111001, %11111001, %11111001 + db %11100100, %11100100, %11100100 + db %10010000, %10010000, %10010000 + db %01000000, %01000000, %01000000 + db %00000000, %00000000, %00000000 ; 8c20f @@ -74975,10 +74872,10 @@ Function8c2aa: ; 8c2aa push af ld a, $1 ld [rVBK], a - ld de, $42f4 + ld de, GFX_8c2f4 ld hl, $8fe0 - ld b, $23 - ld c, $2 + ld b, BANK(GFX_8c2f4) + ld c, 2 call Request2bpp pop af ld [rVBK], a @@ -74991,8 +74888,8 @@ Function8c2cf: ; 8c2cf ld a, $6 ld [rSVBK], a push hl - ld hl, Unkn1Pals - ld bc, $0280 + ld hl, $d000 + ld bc, $28 * $10 .asm_8c2dd ld [hl], $ff inc hl @@ -75001,8 +74898,8 @@ Function8c2cf: ; 8c2cf or b jr nz, .asm_8c2dd pop hl - ld de, Unkn1Pals - ld b, $23 + ld de, $d000 + ld b, BANK(Function8c2cf) ; BANK(@) ld c, $28 call Request2bpp pop af @@ -75013,6 +74910,7 @@ Function8c2cf: ; 8c2cf GFX_8c2f4: ; 8c2f4 INCBIN "baserom.gbc",$8c2f4,$8c314 - $8c2f4 + Function8c314: ; 8c314 ld a, [$cf63] ld e, a @@ -75026,7 +74924,6 @@ Function8c314: ; 8c314 jp [hl] ; 8c323 - ; no known jump sources Jumptable_8c323: ; 8c323 (23:4323) dw Function8c365 @@ -75066,9 +74963,9 @@ Jumptable_8c323: ; 8c323 (23:4323) ; no known jump sources Function8c365: ; 8c365 (23:4365) - ld de, $0 + ld de, 0 ld a, [BattleMonLevel] ; $c639 - add $3 + add 3 ld hl, EnemyMonLevel ; $d213 cp [hl] jr nc, .asm_8c375 @@ -75091,7 +74988,9 @@ Function8c365: ; 8c365 (23:4365) ; 8c38f (23:438f) Unknown_8c38f: ; 8c38f -INCBIN "baserom.gbc",$8c38f,$8c393 - $8c38f + db 1, 9 + db 16, 24 +; 8c393 ; no known jump sources Function8c393: ; 8c393 (23:4393) @@ -75149,7 +75048,20 @@ Function8c3b3: ; 8c3b3 (23:43b3) ; 8c3db (23:43db) Unknown_8c3db: ; 8c3db -INCBIN "baserom.gbc",$8c3db,$8c3e8 - $8c3db + db $f9 ; 3321 + db $fe ; 3332 + db $ff ; 3333 + db $fe ; 3332 + db $f9 ; 3321 + db $e4 ; 3210 + db $90 ; 2100 + db $40 ; 1000 + db $00 ; 0000 + db $40 ; 1000 + db $90 ; 2100 + db $e4 ; 3210 + db $01 ; 0001 +; 8c3e8 ; no known jump sources Function8c3e8: ; 8c3e8 (23:43e8) @@ -75190,7 +75102,7 @@ Function8c419: ; 8c419 (23:4419) add [hl] ld [hl], a ld a, $90 - ld bc, CurMartEnd ; $d100 (aliases: LYOverrides) + ld bc, $d100 ld e, $0 .asm_8c42b push af @@ -75257,7 +75169,35 @@ Function8c44f: ; 8c44f (23:444f) ; 8c490 (23:4490) Unknown_8c490: ; 8c490 -INCBIN "baserom.gbc",$8c490,$8c4f5 - $8c490 +macro_8c490: MACRO + db \1 + dw \2 + FuncCoord \3, \4 + dw Coord +ENDM + + macro_8c490 0, Unknown_8c538, 1, 6 + macro_8c490 0, Unknown_8c53e, 0, 3 + macro_8c490 0, Unknown_8c548, 1, 0 + macro_8c490 0, Unknown_8c55a, 5, 0 + macro_8c490 0, Unknown_8c568, 9, 0 + macro_8c490 1, Unknown_8c568, 10, 0 + macro_8c490 1, Unknown_8c55a, 14, 0 + macro_8c490 1, Unknown_8c548, 18, 0 + macro_8c490 1, Unknown_8c53e, 19, 3 + macro_8c490 1, Unknown_8c538, 18, 6 + macro_8c490 3, Unknown_8c538, 18, 11 + macro_8c490 3, Unknown_8c53e, 19, 14 + macro_8c490 3, Unknown_8c548, 18, 17 + macro_8c490 3, Unknown_8c55a, 14, 17 + macro_8c490 3, Unknown_8c568, 10, 17 + macro_8c490 2, Unknown_8c568, 9, 17 + macro_8c490 2, Unknown_8c55a, 5, 17 + macro_8c490 2, Unknown_8c548, 1, 17 + macro_8c490 2, Unknown_8c53e, 0, 14 + macro_8c490 2, Unknown_8c538, 1, 11 + db $ff +; 8c4f5 ; known jump sources: 8c468 (23:4468) Function8c4f5: ; 8c4f5 (23:44f5) @@ -75314,7 +75254,12 @@ Function8c4f5: ; 8c4f5 (23:44f5) jr .asm_8c4fc ; 8c538 (23:4538) -INCBIN "baserom.gbc",$8c538,$8c578 - $8c538 +Unknown_8c538: db 2, 3, 5, 4, 9, $ff +Unknown_8c53e: db 1, 1, 2, 2, 4, 2, 4, 2, 3, $ff +Unknown_8c548: db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, $ff +Unknown_8c55a: db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, $ff +Unknown_8c568: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, $ff +; 8c578 ; no known jump sources Function8c578: ; 8c578 (23:4578) @@ -75484,7 +75429,7 @@ Function8c677: ; 8c677 (23:4677) call Function8c698 ld de, $d070 call Function8c698 - ld de, CurMart ; $d0f0 + ld de, $d0f0 call Function8c698 ld de, $d078 call Function8c698 @@ -76082,9 +76027,9 @@ Function8cb82: ; 8cb82 (23:4b82) ; known jump sources: 8caf8 (23:4af8), 8cb3e (23:4b3e) Function8cb9b: ; 8cb9b (23:4b9b) callab Function8cf53 - ld de, $49cc + ld de, GFX_8c9cc ld hl, $8800 - ld bc, $2304 + lb bc, BANK(GFX_8c9cc), 4 call Request2bpp ld a, [CurPartyMon] ; $d109 ld hl, PartySpecies ; $dcd8 From 7e4744fdaf9ec1a9d260a2e7717af3023a49d326 Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 1 May 2014 22:21:29 -0400 Subject: [PATCH 18/18] Fix some lines that were indented with spaces instead of tabs. It's mostly menudata. Whoops. --- main.asm | 474 +++++++++++++++++++++++++++---------------------------- 1 file changed, 237 insertions(+), 237 deletions(-) diff --git a/main.asm b/main.asm index ecc5b6f87..82c2e5955 100644 --- a/main.asm +++ b/main.asm @@ -16292,15 +16292,15 @@ MenuData2_0x10a87: ; 0x10a87 ; 10a97 MenuDataHeader_0x10a97: ; 0x10a97 - db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords - dw MenuData2_0x10a9f - db 1 ; default option + db $40 ; flags + db 01, 07 ; start coords + db 11, 19 ; end coords + dw MenuData2_0x10a9f + db 1 ; default option ; 0x10a9f MenuData2_0x10a9f: ; 0x10a9f - db $2e ; flags + db $2e ; flags db 5, 8 ; rows, columns db 1 ; horizontal spacing dbw 0, $d8bc @@ -16310,15 +16310,15 @@ MenuData2_0x10a9f: ; 0x10a9f ; 10aaf MenuDataHeader_0x10aaf: ; 0x10aaf - db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords - dw MenuData2_0x10ab7 - db 1 ; default option + db $40 ; flags + db 01, 07 ; start coords + db 11, 19 ; end coords + dw MenuData2_0x10ab7 + db 1 ; default option ; 0x10ab7 MenuData2_0x10ab7: ; 0x10ab7 - db $ae ; flags + db $ae ; flags db 5, 8 ; rows, columns db 2 ; horizontal spacing dbw 0, $d8d7 @@ -16328,15 +16328,15 @@ MenuData2_0x10ab7: ; 0x10ab7 ; 10ac7 MenuDataHeader_0x10ac7: ; 0x10ac7 - db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords - dw MenuData2_0x10acf - db 1 ; default option + db $40 ; flags + db 01, 07 ; start coords + db 11, 19 ; end coords + dw MenuData2_0x10acf + db 1 ; default option ; 0x10acf MenuData2_0x10acf: ; 0x10acf - db $2e ; flags + db $2e ; flags db 5, 8 ; rows, columns db 2 ; horizontal spacing dbw 0, $d8d7 @@ -31950,11 +31950,11 @@ Function24528:: ; 24528 ; 24547 MenuDataHeader_0x24547: ; 0x24547 - db $40 ; flags - db 04, 06 ; start coords - db 13, 14 ; end coords - dw NULL - db 1 ; default option + db $40 ; flags + db 04, 06 ; start coords + db 13, 14 ; end coords + dw NULL + db 1 ; default option ; 0x2454f Function2454f: ; 2454f @@ -32911,19 +32911,19 @@ Function24b01: ; 24b01 ; 24b15 MenuDataHeader_0x24b15: ; 0x24b15 - db $40 ; flags - db 00, 11 ; start coords - db 02, 19 ; end coords - dw NULL - db 1 ; default option + db $40 ; flags + db 00, 11 ; start coords + db 02, 19 ; end coords + dw NULL + db 1 ; default option ; 0x24b1d MenuDataHeader_0x24b1d: ; 0x24b1d - db $40 ; flags - db 11, 00 ; start coords - db 13, 08 ; end coords - dw NULL - db 1 ; default option + db $40 ; flags + db 11, 00 ; start coords + db 13, 08 ; end coords + dw NULL + db 1 ; default option ; 0x24b25 Function24b25: ; 24b25 @@ -33821,27 +33821,27 @@ Function250d1: ; 250d1 ; 250ed MenuDataHeader_0x250ed: ; 0x250ed - db $40 ; flags - db 09, 15 ; start coords - db 11, 19 ; end coords - dw Function25097 - db 0 ; default option + db $40 ; flags + db 09, 15 ; start coords + db 11, 19 ; end coords + dw Function25097 + db 0 ; default option ; 0x250f5 MenuDataHeader_0x250f5: ; 0x250f5 - db $40 ; flags - db 15, 07 ; start coords - db 17, 19 ; end coords - dw Function25098 - db -1 ; default option + db $40 ; flags + db 15, 07 ; start coords + db 17, 19 ; end coords + dw Function25098 + db -1 ; default option ; 0x250fd MenuDataHeader_0x250fd: ; 0x250fd - db $40 ; flags - db 15, 07 ; start coords - db 17, 19 ; end coords - dw Function2509f - db 0 ; default option + db $40 ; flags + db 15, 07 ; start coords + db 17, 19 ; end coords + dw Function2509f + db 0 ; default option ; 0x25105 Function25105: ; 25105 @@ -35163,12 +35163,12 @@ MenuDataHeader_0x269c5: ; 0x269c5 MenuData2_0x269cd: ; 0x269cd db $10 ; flags - db 8, 0 ; rows, columns - db 1 ; horizontal spacing - dbw 0, $d002 ; text pointer - dbw BANK(Function269f3), Function269f3 - dbw 0, 0 - dbw 0, 0 + db 8, 0 ; rows, columns + db 1 ; horizontal spacing + dbw 0, $d002 ; text pointer + dbw BANK(Function269f3), Function269f3 + dbw 0, 0 + dbw 0, 0 ; 269dd @@ -49934,21 +49934,21 @@ MenuDataHeader_0x48509: ; 0x48509 db 07, 19 ; end coords MenuDataHeader_0x4850e: ; 0x4850e - db $40 ; flags - db 09, 10 ; start coords - db 11, 19 ; end coords + db $40 ; flags + db 09, 10 ; start coords + db 11, 19 ; end coords MenuDataHeader_0x48513: ; 0x48513 - db $40 ; flags - db 01, 11 ; start coords - db 12, 18 ; end coords - dw MenuData2_0x4851b - db 1 ; default option + db $40 ; flags + db 01, 11 ; start coords + db 12, 18 ; end coords + dw MenuData2_0x4851b + db 1 ; default option ; 0x4851b MenuData2_0x4851b: ; 0x4851b - db $1d ; flags - db 6 ; items + db $1d ; flags + db 6 ; items Unknown_4851d: ; 4851d db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04 @@ -50622,9 +50622,9 @@ Function48a9a: ; 48a9a (12:4a9a) ; 48a9c (12:4a9c) MenuDataHeader_0x48a9c: ; 0x48a9c - db $40 ; flags - db 08, 10 ; start coords - db 13, 19 ; end coord + db $40 ; flags + db 08, 10 ; start coords + db 13, 19 ; end coord String_48aa1: ; 48aa1 db "Tell Now" @@ -67036,17 +67036,17 @@ Function88055: ; 88055 ; 88086 MenuDataHeader_0x88086: ; 0x88086 - db $40 ; flags - db 01, 01 ; start coords - db 10, 13 ; end coords - dw MenuData2_0x8808f - db 1 ; default option + db $40 ; flags + db 01, 01 ; start coords + db 10, 13 ; end coords + dw MenuData2_0x8808f + db 1 ; default option ; 0x8808e db 0 MenuData2_0x8808f: ; 0x8808f - db $10 ; flags + db $10 ; flags db 4, 7 db 1 dbw 0, $d1ea @@ -67110,9 +67110,9 @@ Function880c2: ; 880c2 ; 8810d MenuDataHeader_0x8810d: ; 0x8810d - db $40 ; flags - db 09, 06 ; start coords - db 12, 19 ; end coords + db $40 ; flags + db 09, 06 ; start coords + db 12, 19 ; end coords INCBIN "baserom.gbc",$88112,$88116 - $88112 @@ -71664,9 +71664,9 @@ Jumptable_8a9c5: ; 8a9c5 (22:69c5) ; 8a9c9 (22:69c9) MenuDataHeader_0x8a9c9: ; 0x8a9c9 - db $40 ; flags - db 04, 11 ; start coords - db 11, 18 ; end coords + db $40 ; flags + db 04, 11 ; start coords + db 11, 18 ; end coords ; 8a9ce ; known jump sources: 8a9a1 (22:69a1) @@ -72365,24 +72365,24 @@ Unknown_8aebc: ; 8aebc ; 8aed5 MenuDataHeader_0x8aed5: ; 0x8aed5 - db $40 ; flags - db 04, 03 ; start coords - db 09, 16 ; end coords + db $40 ; flags + db 04, 03 ; start coords + db 09, 16 ; end coords MenuDataHeader_0x8aeda: ; 0x8aeda - db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords MenuDataHeader_0x8aedf: ; 0x8aedf - db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords MenuDataHeader_0x8aee4: ; 0x8aee4 - db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + db $40 ; flags + db 04, 04 ; start coords + db 09, 15 ; end coords ; 8aee9 Function8aee9: ; 8aee9 @@ -74102,18 +74102,18 @@ Function8b855: ; 8b855 ; 8b867 MenuDataHeader_0x8b867: ; 0x8b867 - db $40 ; flags - db 03, 01 ; start coords - db 13, 18 ; end coords - dw MenuData2_0x8b870 - db 1 ; default option + db $40 ; flags + db 03, 01 ; start coords + db 13, 18 ; end coords + dw MenuData2_0x8b870 + db 1 ; default option ; 0x8b86f db 0 MenuData2_0x8b870: ; 0x8b870 - db $3c ; flags - db 5 ; items + db $3c ; flags + db 5 ; items db 3, 1 dbw 0, $d002 dbw BANK(Function8b880), Function8b880 @@ -74277,42 +74277,42 @@ Function8b9ab: ; 8b9ab ; 8b9ac MenuDataHeader_0x8b9ac: ; 0x8b9ac - db $40 ; flags - db 00, 11 ; start coords - db 11, 19 ; end coords + db $40 ; flags + db 00, 11 ; start coords + db 11, 19 ; end coords MenuDataHeader_0x8b9b1: ; 0x8b9b1 - db $40 ; flags - db 00, 11 ; start coords - db 07, 19 ; end coords - dw MenuData2_0x8b9b9 - db 1 ; default option + db $40 ; flags + db 00, 11 ; start coords + db 07, 19 ; end coords + dw MenuData2_0x8b9b9 + db 1 ; default option ; 0x8b9b9 MenuData2_0x8b9b9: ; 0x8b9b9 - db $a0 ; flags - db 3 ; items - db "へんしゅう@" ; EDIT - db "いれかえ@" ; REPLACE - db "やめる@" ; QUIT + db $a0 ; flags + db 3 ; items + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "やめる@" ; QUIT ; 0x8b9ca MenuDataHeader_0x8b9ca: ; 0x8b9ca - db $40 ; flags - db 00, 11 ; start coords - db 11, 19 ; end coords - dw MenuData2_0x8b9d2 - db 1 ; default option + db $40 ; flags + db 00, 11 ; start coords + db 11, 19 ; end coords + dw MenuData2_0x8b9d2 + db 1 ; default option ; 0x8b9d2 MenuData2_0x8b9d2: ; 0x8b9d2 - db $a0 ; flags - db 5 ; items - db "みる@" ; VIEW - db "へんしゅう@" ; EDIT - db "いれかえ@" ; REPLACE - db "けす@" ; ERASE - db "やめる@" ; QUIT + db $a0 ; flags + db 5 ; items + db "みる@" ; VIEW + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "けす@" ; ERASE + db "やめる@" ; QUIT ; 0x8b9e9 ; known jump sources: 8b966 (22:7966) @@ -88213,99 +88213,99 @@ Functione0768: ; e0768 Functione0770: ; e0770 - ld e, $0 - jr Functione07ce + ld e, $0 + jr Functione07ce Functione0774: ; e0774 - ld e, $1 - jr Functione07ce + ld e, $1 + jr Functione07ce Functione0778: ; e0778 - ld e, $2 - jr Functione07ce + ld e, $2 + jr Functione07ce Functione077c: ; e077c - ld e, $3 - jr Functione07ce + ld e, $3 + jr Functione07ce Functione0780: ; e0780 - ld e, $4 - jr Functione07ce + ld e, $4 + jr Functione07ce Functione0784: ; e0784 - ld e, $5 - jr Functione07ce + ld e, $5 + jr Functione07ce Functione0788: ; e0788 - ld e, $6 - jr Functione07ce + ld e, $6 + jr Functione07ce Functione078c: ; e078c - ld e, $7 - jr Functione07ce + ld e, $7 + jr Functione07ce Functione0790: ; e0790 - ld e, $8 - jr Functione07ce + ld e, $8 + jr Functione07ce Functione0794: ; e0794 - ld e, $9 - jr Functione07ce + ld e, $9 + jr Functione07ce Functione0798: ; e0798 - ld e, $a - jr Functione07ce + ld e, $a + jr Functione07ce Functione079c: ; e079c - ld e, $b - jr Functione07ce + ld e, $b + jr Functione07ce Functione07a0: ; e07a0 - ld e, $c - jr Functione07ce + ld e, $c + jr Functione07ce Functione07a4: ; e07a4 - ld e, $d - jr Functione07ce + ld e, $d + jr Functione07ce Functione07a8: ; e07a8 - ld e, $e - jr Functione07ce + ld e, $e + jr Functione07ce Functione07ac: ; e07ac - ld e, $f - jr Functione07ce + ld e, $f + jr Functione07ce Functione07b0: ; e07b0 - ld e, $10 - jr Functione07ce + ld e, $10 + jr Functione07ce Functione07b4: ; e07b4 - ld e, $11 - jr Functione07ce + ld e, $11 + jr Functione07ce Functione07b8: ; e07b8 - ld e, $12 - jr Functione07ce + ld e, $12 + jr Functione07ce Functione07bc: ; e07bc - ld e, $13 - jr Functione07ce + ld e, $13 + jr Functione07ce Functione07c0: ; e07c0 - ld e, $14 - jr Functione07ce + ld e, $14 + jr Functione07ce Functione07c4: ; e07c4 - ld e, $15 - jr Functione07ce + ld e, $15 + jr Functione07ce Functione07c8: ; e07c8 - ld e, $16 - jr Functione07ce + ld e, $16 + jr Functione07ce Functione07cc: ; e07cc - ld e, $17 + ld e, $17 Functione07ce: ; e07ce ld a, [CurEnemyMoveNum] @@ -104349,87 +104349,87 @@ SECTION "bank43", ROMX, BANK[$43] UnusedTitleScreen: ; 10c000 - call WhiteBGMap - call ClearTileMap - call DisableLCD - xor a - ld [hBGMapMode], a + call WhiteBGMap + call ClearTileMap + call DisableLCD + xor a + ld [hBGMapMode], a - ld hl, $cf63 - ld [hli], a - ld [hli], a - ld [hli], a - ld [hl], a + ld hl, $cf63 + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a - ld hl, UnusedTitleBG_GFX - ld de, VTiles2 - ld bc, $800 - call CopyBytes + ld hl, UnusedTitleBG_GFX + ld de, VTiles2 + ld bc, $800 + call CopyBytes - ld hl, UnusedTitleBG_GFX + $800 - ld de, VTiles1 - ld bc, $800 - call CopyBytes + ld hl, UnusedTitleBG_GFX + $800 + ld de, VTiles1 + ld bc, $800 + call CopyBytes - ld hl, UnusedTitleFG_GFX - ld de, VTiles0 - ld bc, $800 - call CopyBytes + ld hl, UnusedTitleFG_GFX + ld de, VTiles0 + ld bc, $800 + call CopyBytes - ld hl, UnusedTitleBG_Tilemap - ld de, VBGMap0 - ld bc, 32 * 32 + ld hl, UnusedTitleBG_Tilemap + ld de, VBGMap0 + ld bc, 32 * 32 .copy - ld a, 0 - ld [rVBK], a - ld a, [hli] - ld [de], a - ld a, 1 - ld [rVBK], a - ld a, [hli] - ld [de], a - inc de - dec bc - ld a, b - or c - jr nz, .copy + ld a, 0 + ld [rVBK], a + ld a, [hli] + ld [de], a + ld a, 1 + ld [rVBK], a + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .copy - ld hl, UnusedTitleFG_OAM - ld de, Sprites - ld bc, $a0 - call CopyBytes + ld hl, UnusedTitleFG_OAM + ld de, Sprites + ld bc, $a0 + call CopyBytes - call EnableLCD - ld a, [rLCDC] - set 1, a - set 2, a - ld [rLCDC], a + call EnableLCD + ld a, [rLCDC] + set 1, a + set 2, a + ld [rLCDC], a - call DelayFrame + call DelayFrame - ld a, [rSVBK] - push af - ld a, $5 - ld [rSVBK], a + ld a, [rSVBK] + push af + ld a, $5 + ld [rSVBK], a - ld hl, UnsuedTitleBG_Palettes - ld de, Unkn1Pals - ld bc, $40 - call CopyBytes + ld hl, UnsuedTitleBG_Palettes + ld de, Unkn1Pals + ld bc, $40 + call CopyBytes - ld hl, UnsuedTitleFG_Palettes - ld de, Unkn2Pals - ld bc, $40 - call CopyBytes + ld hl, UnsuedTitleFG_Palettes + ld de, Unkn2Pals + ld bc, $40 + call CopyBytes - ld hl, UnsuedTitleBG_Palettes - ld de, BGPals - ld bc, $40 - call CopyBytes + ld hl, UnsuedTitleBG_Palettes + ld de, BGPals + ld bc, $40 + call CopyBytes - ld hl, UnsuedTitleFG_Palettes - ld de, OBPals - ld bc, $40 + ld hl, UnsuedTitleFG_Palettes + ld de, OBPals + ld bc, $40 call CopyBytes pop af