diff options
-rw-r--r-- | src/constants/npc_constants.asm | 124 | ||||
-rw-r--r-- | src/data/npcs.asm | 1006 | ||||
-rw-r--r-- | src/engine/bank03.asm | 19 | ||||
-rw-r--r-- | src/engine/bank04.asm | 6 | ||||
-rw-r--r-- | src/engine/bank20.asm | 225 | ||||
-rw-r--r-- | src/engine/home.asm | 35 | ||||
-rw-r--r-- | src/macros/scripts.asm | 2 | ||||
-rw-r--r-- | src/wram.asm | 2 | ||||
-rw-r--r-- | tools/script_extractor.py | 2 |
9 files changed, 813 insertions, 608 deletions
diff --git a/src/constants/npc_constants.asm b/src/constants/npc_constants.asm index c023a58..d7eeaa8 100644 --- a/src/constants/npc_constants.asm +++ b/src/constants/npc_constants.asm @@ -6,9 +6,9 @@ const NPC_DATA_FIELD_03 const NPC_DATA_FIELD_04 const NPC_DATA_OWSEQUENCE_PTR - const NPC_DATA_OWSEQUENCE_PTR_2 +const_value = const_value+1 const NPC_DATA_NAME_TEXT - const NPC_DATA_NAME_TEXT_2 +const_value = const_value+1 const NPC_DATA_BATTLE_PICTURE const NPC_DATA_FIELD_0A const NPC_DATA_FIELD_0B @@ -58,6 +58,120 @@ NPC_DATA_LENGTH EQU const_value const STEPHANIE_PIC ; $28 const AARON_PIC ; $29 -DRMASON EQU $01 -SARA EQU $1F -AMANDA EQU $20 + const_def 1 + const DRMASON ; $01 + const RONALD1 ; $02 + const ISHIHARA ; $03 + const IMAKUNI ; $04 +const_value = const_value+1 ; DRMASON duplicate +const_value = const_value+1 ; DRMASON duplicate + const SAM ; $07 + const TECH1 ; $08 + const TECH2 ; $09 + const TECH3 ; $0a + const TECH4 ; $0b + const TECH5 ; $0c + const TECH6 ; $0d + const CLERK1 ; $0e + const CLERK2 ; $0f + const CLERK3 ; $10 + const CLERK4 ; $11 + const CLERK5 ; $12 + const CLERK6 ; $13 + const CLERK7 ; $14 + const CLERK8 ; $15 + const CLERK9 ; $16 + const CHRIS ; $17 + const MICHAEL ; $18 + const JESSICA ; $19 + const MITCH ; $1a + const MATTHEW ; $1b + const RYAN ; $1c + const ANDREW ; $1d + const GENE ; $1e + const SARA ; $1f + const AMANDA ; $20 + const JOSHUA ; $21 + const AMY ; $22 + const JENNIFER ; $23 + const NICHOLAS ; $24 + const BRANDON ; $25 + const ISAAC ; $26 + const BRITTANY ; $27 + const KRISTIN ; $28 + const HEATHER ; $29 + const NIKKI ; $2a + const ROBERT ; $2b + const DANIEL ; $2c + const STEPHANIE ; $2d + const MURRAY1 ; $2e + const JOSEPH ; $2f + const DAVID ; $30 + const ERIK ; $31 + const RICK ; $32 + const JOHN ; $33 + const ADAM ; $34 + const JONATHAN ; $35 + const KEN ; $36 + const COURTNEY ; $37 + const STEVE ; $38 + const JACK ; $39 + const ROD ; $3a + const CLERK10 ; $3b + const CLERK11 ; $3c + const MAN1 ; $3d + const WOMAN1 ; $3e + const CHAP1 ; $3f + const GAL1 ; $40 + const LASS1 ; $41 + const CHAP2 ; $42 + const LASS2 ; $43 + const PAPPY1 ; $44 + const LAD1 ; $45 + const LAD2 ; $46 + const CHAP3 ; $47 + const CLERK12 ; $48 + const CLERK13 ; $49 + const HOST ; $4a + const SPECS1 ; $4b + const BUTCH ; $4c + const GRANNY1 ; $4d + const LASS3 ; $4e + const MAN2 ; $4f + const PAPPY2 ; $50 + const LASS4 ; $51 + const HOOD1 ; $52 + const GRANNY2 ; $53 + const GAL2 ; $54 + const LAD3 ; $55 + const GAL3 ; $56 + const CHAP4 ; $57 + const MAN3 ; $58 + const SPECS2 ; $59 + const SPECS3 ; $5a + const WOMAN2 ; $5b + const MANIA ; $5c + const PAPPY3 ; $5d + const GAL4 ; $5e + const CHAMP ; $5f + const HOOD2 ; $60 + const LASS5 ; $61 + const CHAP5 ; $62 + const AARON ; $63 + const GUIDE ; $64 + const TECH7 ; $65 + const TECH8 ; $66 + const _11F18 ; $67 + const _11F1F ; $68 + const _11F26 ; $69 + const _11F2D ; $6a + const _11F34 ; $6b + const _11F3B ; $6c + const _11F42 ; $6d + const _11F49 ; $6e +const_value = const_value+1 ; _11F49 duplicate + const MURRAY2 ; $70 + const RONALD2 ; $71 + const RONALD3 ; $72 +const_value = const_value+1 ; _11f49 duplicate + diff --git a/src/data/npcs.asm b/src/data/npcs.asm index 41cd562..23b4330 100644 --- a/src/data/npcs.asm +++ b/src/data/npcs.asm @@ -1,110 +1,110 @@ ; When you press the A button in front of something it will find a data entry somewhere on this list ; it will then jump to the pointer in the data item. All jumps lead to an RST20 operation. PointerTable_118f5: - dw Data_119dd - dw Data_119dd - dw Data_119ea - dw Data_11a11 - dw Data_11a1e - dw Data_119dd - dw Data_119dd - dw Data_11a2b - dw Data_11a38 - dw Data_11a45 - dw Data_11a52 - dw Data_11a5f - dw Data_11a6c - dw Data_11a79 - dw Data_11a86 - dw Data_11a93 - dw Data_11aa0 - dw Data_11aad - dw Data_11aba - dw Data_11ac7 - dw Data_11ad4 - dw Data_11ae1 - dw Data_11aee - dw Data_11afb - dw Data_11b08 - dw Data_11b15 - dw Data_11b22 - dw Data_11b2f - dw Data_11b3c - dw Data_11b49 - dw Data_11b56 + dw DrMasonData + dw DrMasonData + dw Ronald1Data + dw IshiharaData + dw ImakuniData + dw DrMasonData + dw DrMasonData + dw SamData + dw Tech1Data + dw Tech2Data + dw Tech3Data + dw Tech4Data + dw Tech5Data + dw Tech6Data + dw Clerk1Data + dw Clerk2Data + dw Clerk3Data + dw Clerk4Data + dw Clerk5Data + dw Clerk6Data + dw Clerk7Data + dw Clerk8Data + dw Clerk9Data + dw ChrisData + dw MichaelData + dw JessicaData + dw MitchData + dw MatthewData + dw RyanData + dw AndrewData + dw GeneData dw SaraData dw AmandaData - dw Data_11b7d - dw Data_11b8a - dw Data_11b97 - dw Data_11ba4 - dw Data_11bb1 - dw Data_11bbe - dw Data_11bcb - dw Data_11bd8 - dw Data_11be5 - dw Data_11bf2 - dw Data_11bff - dw Data_11c0c - dw Data_11c19 - dw Data_11c26 - dw Data_11c40 - dw Data_11c4d - dw Data_11c5a - dw Data_11c67 - dw Data_11c74 - dw Data_11c81 - dw Data_11c8e - dw Data_11c9b - dw Data_11ca8 - dw Data_11cb5 - dw Data_11cc2 - dw Data_11ccf - dw Data_11cdc - dw Data_11ce9 - dw Data_11cf6 - dw Data_11d03 - dw Data_11d10 - dw Data_11d1d - dw Data_11d2a - dw Data_11d37 - dw Data_11d44 - dw Data_11d51 - dw Data_11d5e - dw Data_11d6b - dw Data_11d78 - dw Data_11d85 - dw Data_11d92 - dw Data_11d9f - dw Data_11dac - dw Data_11db9 - dw Data_11dc6 - dw Data_11dd3 - dw Data_11de0 - dw Data_11ded - dw Data_11dfa - dw Data_11e07 - dw Data_11e14 - dw Data_11e21 - dw Data_11e2e - dw Data_11e3b - dw Data_11e48 - dw Data_11e55 - dw Data_11e62 - dw Data_11e6f - dw Data_11e7c - dw Data_11e89 - dw Data_11e96 - dw Data_11ea3 - dw Data_11eb0 - dw Data_11ebd - dw Data_11eca - dw Data_11ed7 - dw Data_11ee4 - dw Data_11ef1 - dw Data_11efe - dw Data_11f0b - dw Data_11f18 + dw JoshuaData + dw AmyData + dw JenniferData + dw NicholasData + dw BrandonData + dw IsaacData + dw BrittanyData + dw KristinData + dw HeatherData + dw NikkiData + dw RobertData + dw DanielData + dw StephanieData + dw Murray1Data + dw JosephData + dw DavidData + dw ErikData + dw RickData + dw JohnData + dw AdamData + dw JonathanData + dw KenData + dw CourtneyData + dw SteveData + dw JackData + dw RodData + dw Clerk10Data + dw Clerk11Data + dw Man1Data + dw Woman1Data + dw Chap1Data + dw Gal1Data + dw Lass1Data + dw Chap2Data + dw Lass2Data + dw Pappy1Data + dw Lad1Data + dw Lad2Data + dw Chap3Data + dw Clerk12Data + dw Clerk13Data + dw HostData + dw Specs1Data + dw ButchData + dw Granny1Data + dw Lass3Data + dw Man2Data + dw Pappy2Data + dw Lass4Data + dw Hood1Data + dw Granny2Data + dw Gal2Data + dw Lad3Data + dw Gal3Data + dw Chap4Data + dw Man3Data + dw Specs2Data + dw Specs3Data + dw Woman2Data + dw ManiaData + dw Pappy3Data + dw Gal4Data + dw ChampData + dw Hood2Data + dw Lass5Data + dw Chap5Data + dw AaronData + dw GuideData + dw Tech7Data + dw Tech8Data + dw Data_11f18 ; these actually are used for the effects around the legendary cards dw Data_11f1f dw Data_11f26 dw Data_11f2d @@ -113,12 +113,12 @@ PointerTable_118f5: dw Data_11f42 dw Data_11f49 dw Data_11f49 - dw Data_11c33 - dw Data_119f7 - dw Data_11a04 + dw Murray2Data + dw Ronald2Data + dw Ronald3Data dw Data_11f49 -Data_119dd: - db $01 +DrMasonData: + db DRMASON db $02 db $00 db $26 @@ -129,393 +129,363 @@ Data_119dd: db $00 db $00 db $00 -Data_119ea: - db $02 +Ronald1Data: + db RONALD1 db $01 db $04 db $0e db $00 dw $5c4b ; Pointer to NPC Data - db $ad - db $03 - db $02 + tx Text03ad + db RONALD_PIC db $1a db $0f db $16 -Data_119f7: - db $71 +Ronald2Data: + db RONALD2 db $01 db $04 db $0e db $00 dw $5c4b ; Pointer to NPC Data - db $ad - db $03 - db $02 + tx Text03ad + db RONALD_PIC db $1a db $0f db $16 -Data_11a04: - db $72 +Ronald3Data: + db RONALD3 db $01 db $04 db $0e db $00 dw $5c4b ; Pointer to NPC Data - db $ad - db $03 - db $02 + tx Text03ad + db RONALD_PIC db $1a db $0f db $16 -Data_11a11: - db $03 +IshiharaData: + db ISHIHARA db $03 db $04 db $22 db $00 dw $5b4a ; Pointer to NPC Data - db $ae - db $03 + tx Text03ae db $00 db $00 db $00 db $00 -Data_11a1e: - db $04 +ImakuniData: + db IMAKUNI db $04 db $00 db $0e db $00 dw $5d0d ; Pointer to NPC Data - db $af - db $03 - db $04 + tx Text03af + db IMAKUNI_PIC db $34 db $10 db $15 -Data_11a2b: - db $07 +SamData: + db SAM db $18 db $00 db $0e db $00 dw $561d ; Pointer to NPC Data - db $b1 - db $03 - db $03 + tx Text03b1 + db SAM_PIC db $02 db $02 db $15 -Data_11a38: - db $08 +Tech1Data: + db TECH1 db $18 db $00 db $0e db $00 dw $5583 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a45: - db $09 +Tech2Data: + db TECH2 db $18 db $00 db $0e db $00 dw $55ca ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a52: - db $0a +Tech3Data: + db TECH3 db $18 db $00 db $0e db $00 dw $55d5 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a5f: - db $0b +Tech4Data: + db TECH4 db $18 db $00 db $0e db $00 dw $55e0 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a6c: - db $0c +Tech5Data: + db TECH5 db $18 db $00 db $0e db $00 dw $55f9 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a79: - db $0d +Tech6Data: + db TECH6 db $18 db $00 db $0e db $00 dw $58bb ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11a86: - db $0e +Clerk1Data: + db CLERK1 db $21 db $0a db $30 db $00 dw $5c64 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11a93: - db $0f +Clerk2Data: + db CLERK2 db $21 db $0a db $30 db $00 dw $5ed1 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11aa0: - db $10 +Clerk3Data: + db CLERK3 db $21 db $0a db $30 db $00 dw $609e ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11aad: - db $11 +Clerk4Data: + db CLERK4 db $21 db $0a db $30 db $00 dw $6369 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11aba: - db $12 +Clerk5Data: + db CLERK5 db $21 db $0a db $30 db $00 dw $6566 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11ac7: - db $13 +Clerk6Data: + db CLERK6 db $21 db $0a db $30 db $00 dw $684c ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11ad4: - db $14 +Clerk7Data: + db CLERK7 db $21 db $0a db $30 db $00 dw $6b53 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11ae1: - db $15 +Clerk8Data: + db CLERK8 db $21 db $0a db $30 db $00 dw $6d45 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11aee: - db $16 +Clerk9Data: + db CLERK9 db $21 db $0a db $30 db $00 dw $7025 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11afb: - db $17 +ChrisData: + db CHRIS db $15 db $00 db $26 db $00 dw $5ef2 ; Pointer to NPC Data - db $b4 - db $03 - db $1d + tx Text03b4 + db CHRIS_PIC db $1c db $03 db $15 -Data_11b08: - db $18 +MichaelData: + db MICHAEL db $15 db $00 db $26 db $00 dw $6573 ; Pointer to NPC Data - db $b5 - db $03 - db $1e + tx Text03b5 + db MICHAEL_PIC db $1d db $03 db $15 -Data_11b15: - db $19 +JessicaData: + db JESSICA db $1f db $04 db $1a db $00 dw $6d96 ; Pointer to NPC Data - db $b6 - db $03 - db $27 + tx Text03b6 + db JESSICA_PIC db $1e db $03 db $15 -Data_11b22: - db $1a +MitchData: + db MITCH db $0a db $00 db $0e db $00 dw $5dc3 ; Pointer to NPC Data - db $b7 - db $03 - db $0a + tx Text03b7 + db MITCH_PIC db $10 db $03 db $16 -Data_11b2f: - db $1b +MatthewData: + db MATTHEW db $15 db $00 db $16 db $00 dw $5f39 ; Pointer to NPC Data - db $b8 - db $03 - db $1a + tx Text03b8 + db MATTHEW_PIC db $21 db $03 db $15 -Data_11b3c: - db $1c +RyanData: + db RYAN db $11 db $00 db $26 db $00 dw $5ff0 ; Pointer to NPC Data - db $b9 - db $03 - db $1b + tx Text03b9 + db RYAN_PIC db $1f db $03 db $15 -Data_11b49: - db $1d +AndrewData: + db ANDREW db $1a db $00 db $16 db $00 dw $6017 ; Pointer to NPC Data - db $ba - db $03 - db $1c + tx Text03ba + db ANDREW_PIC db $20 db $03 db $15 -Data_11b56: - db $1e +GeneData: + db GENE db $0b db $04 db $1e db $00 dw $603e ; Pointer to NPC Data - db $bb - db $03 - db $0b + tx Text03bb + db GENE_PIC db $11 db $03 db $16 SaraData: - db SARA ; trainer id + db SARA db $20 db $00 db $0e db $00 dw OWSequence_Sara ; Pointer to NPC Data - db $bc - db $03 - db SARA_PIC ; battle profile picture + tx Text03bc + db SARA_PIC db $22 db $03 db $15 @@ -526,931 +496,859 @@ AmandaData: db $16 db $00 dw OWSequence_Amanda ; Pointer to NPC Data - db $bd - db $03 + tx Text03bd db AMANDA_PIC ; battle profile picture db $23 db $03 db $15 -Data_11b7d: - db $21 +JoshuaData: + db JOSHUA db $16 db $00 db $26 db $00 dw OWSequence_Joshua ; Pointer to NPC Data - db $be - db $03 - db $17 + tx Text03be + db JOSHUA_PIC db $24 db $03 db $15 -Data_11b8a: - db $22 +AmyData: + db AMY db $08 db $08 db $2e db $10 dw $6304 ; Pointer to NPC Data - db $bf - db $03 - db $08 + tx Text03bf + db AMY_PIC db $12 db $03 db $16 -Data_11b97: - db $23 +JenniferData: + db JENNIFER db $1c db $04 db $0e db $00 dw $6408 ; Pointer to NPC Data - db $c0 - db $03 - db $26 + tx Text03c0 + db JENNIFER_PIC db $25 db $03 db $15 -Data_11ba4: - db $24 +NicholasData: + db NICHOLAS db $17 db $04 db $1e db $00 dw $642f ; Pointer to NPC Data - db $c1 - db $03 - db $18 + tx Text03c1 + db NICHOLAS_PIC db $26 db $03 db $15 -Data_11bb1: - db $25 +BrandonData: + db BRANDON db $17 db $04 db $1e db $00 dw $6456 ; Pointer to NPC Data - db $c2 - db $03 - db $19 + tx Text03c2 + db BRANDON_PIC db $27 db $03 db $15 -Data_11bbe: - db $26 +IsaacData: + db ISAAC db $09 db $00 db $16 db $00 dw $64ad ; Pointer to NPC Data - db $c3 - db $03 - db $09 + tx Text03c3 + db ISAAC_PIC db $13 db $03 db $16 -Data_11bcb: - db $27 +BrittanyData: + db BRITTANY db $1c db $04 db $0e db $00 dw $65d2 ; Pointer to NPC Data - db $c4 - db $03 - db $21 + tx Text03c4 + db BRITTANY_PIC db $28 db $03 db $15 -Data_11bd8: - db $28 +KristinData: + db KRISTIN db $1e db $00 db $1e db $00 dw $6701 ; Pointer to NPC Data - db $c5 - db $03 - db $22 + tx Text03c5 + db KRISTIN_PIC db $29 db $03 db $15 -Data_11be5: - db $29 +HeatherData: + db HEATHER db $1d db $04 db $22 db $00 dw $6745 ; Pointer to NPC Data - db $c6 - db $03 - db $23 + tx Text03c6 + db HEATHER_PIC db $2a db $03 db $15 -Data_11bf2: - db $2a +NikkiData: + db NIKKI db $05 db $00 db $1a db $00 dw $679e ; Pointer to NPC Data - db $c7 - db $03 - db $05 + tx Text03c7 + db NIKKI_PIC db $14 db $03 db $16 -Data_11bff: - db $2b +RobertData: + db ROBERT db $11 db $04 db $16 db $00 dw $6980 ; Pointer to NPC Data - db $c8 - db $03 - db $20 + tx Text03c8 + db ROBERT_PIC db $2b db $03 db $15 -Data_11c0c: - db $2c +DanielData: + db DANIEL db $12 db $04 db $1a db $00 dw $6a60 ; Pointer to NPC Data - db $c9 - db $03 - db $1f + tx Text03c9 + db DANIEL_PIC db $2c db $03 db $15 -Data_11c19: - db $2d +StephanieData: + db STEPHANIE db $1c db $04 db $0e db $00 dw $6aa2 ; Pointer to NPC Data - db $ca - db $03 - db $28 + tx Text03ca + db STEPHANIE_PIC db $2d db $03 db $15 -Data_11c26: - db $2e +Murray1Data: + db MURRAY1 db $0c db $00 db $12 db $00 dw $6adf ; Pointer to NPC Data - db $cb - db $03 - db $0c + tx Text03cb + db MURRAY_PIC db $15 db $03 db $16 -Data_11c33: - db $70 +Murray2Data: + db MURRAY2 db $0c db $03 db $15 db $10 dw $6adf ; Pointer to NPC Data - db $cb - db $03 - db $0c + tx Text03cb + db MURRAY_PIC db $15 db $03 db $16 -Data_11c40: - db $2f +JosephData: + db JOSEPH db $18 db $00 db $0e db $00 dw $6cdb ; Pointer to NPC Data - db $cc - db $03 - db $11 + tx Text03cc + db JOSEPH_PIC db $2e db $03 db $15 -Data_11c4d: - db $30 +DavidData: + db DAVID db $18 db $00 db $0e db $00 dw $6c11 ; Pointer to NPC Data - db $cd - db $03 - db $12 + tx Text03cd + db DAVID_PIC db $2f db $03 db $15 -Data_11c5a: - db $31 +ErikData: + db ERIK db $18 db $00 db $0e db $00 dw $6c42 ; Pointer to NPC Data - db $ce - db $03 - db $13 + tx Text03ce + db ERIK_PIC db $30 db $03 db $15 -Data_11c67: - db $32 +RickData: + db RICK db $06 db $00 db $0e db $00 dw $6c67 ; Pointer to NPC Data - db $cf - db $03 - db $06 + tx Text03cf + db RICK_PIC db $16 db $03 db $16 -Data_11c74: - db $33 +JohnData: + db JOHN db $12 db $04 db $1a db $00 dw $6eb3 ; Pointer to NPC Data - db $d0 - db $03 - db $14 + tx Text03d0 + db JOHN_PIC db $31 db $03 db $15 -Data_11c81: - db $34 +AdamData: + db ADAM db $13 db $00 db $22 db $00 dw $6ed8 ; Pointer to NPC Data - db $d1 - db $03 - db $15 + tx Text03d1 + db ADAM_PIC db $32 db $03 db $15 -Data_11c8e: - db $35 +JonathanData: + db JONATHAN db $11 db $04 db $16 db $00 dw $6efd ; Pointer to NPC Data - db $d2 - db $03 - db $16 + tx Text03d2 + db JONATHAN_PIC db $33 db $03 db $15 -Data_11c9b: - db $36 +KenData: + db KEN db $07 db $04 db $1e db $00 dw $6f22 ; Pointer to NPC Data - db $d3 - db $03 - db $07 + tx Text03d3 + db KEN_PIC db $17 db $03 db $16 -Data_11ca8: - db $37 +CourtneyData: + db COURTNEY db $0d db $00 db $12 db $00 dw $771f ; Pointer to NPC Data - db $d4 - db $03 - db $0d + tx Text03d4 + db COURTNEY_PIC db $0c db $04 db $17 -Data_11cb5: - db $38 +SteveData: + db STEVE db $0e db $00 db $2a db $00 dw $772a ; Pointer to NPC Data - db $d5 - db $03 - db $0e + tx Text03d5 + db STEVE_PIC db $0d db $04 db $17 -Data_11cc2: - db $39 +JackData: + db JACK db $0f db $00 db $26 db $00 dw $7735 ; Pointer to NPC Data - db $d6 - db $03 - db $0f + tx Text03d6 + db JACK_PIC db $0e db $04 db $17 -Data_11ccf: - db $3a +RodData: + db ROD db $10 db $00 db $0e db $00 dw $7740 ; Pointer to NPC Data - db $d7 - db $03 - db $10 + tx Text03d7 + db ROD_PIC db $0f db $04 db $17 -Data_11cdc: - db $3b +Clerk10Data: + db CLERK10 db $21 db $0a db $30 db $00 dw $4c3e ; Pointer to NPC Data - db $b0 - db $03 + tx Text03b0 db $00 db $00 db $00 db $00 -Data_11ce9: - db $3c +Clerk11Data: + db CLERK11 db $21 db $0a db $30 db $00 dw $4c3e ; Pointer to NPC Data - db $b0 - db $03 + tx Text03b0 db $00 db $00 db $00 db $00 -Data_11cf6: - db $3d +Man1Data: + db MAN1 db $1a db $00 db $16 db $00 dw $5c76 ; Pointer to NPC Data - db $d8 - db $03 + tx Text03d8 db $00 db $00 db $00 db $00 -Data_11d03: - db $3e +Woman1Data: + db WOMAN1 db $23 db $04 db $1e db $00 dw $5f83 ; Pointer to NPC Data - db $d9 - db $03 + tx Text03d9 db $00 db $00 db $00 db $00 -Data_11d10: - db $3f +Chap1Data: + db CHAP1 db $19 db $00 db $1a db $00 dw $5fc0 ; Pointer to NPC Data - db $da - db $03 + tx Text03da db $00 db $00 db $00 db $00 -Data_11d1d: - db $40 +Gal1Data: + db GAL1 db $22 db $00 db $16 db $00 dw $60cf ; Pointer to NPC Data - db $db - db $03 + tx Text03db db $00 db $00 db $00 db $00 -Data_11d2a: - db $41 +Lass1Data: + db LASS1 db $1e db $00 db $1e db $00 dw $6111 ; Pointer to NPC Data - db $dc - db $03 + tx Text03dc db $00 db $00 db $00 db $00 -Data_11d37: - db $42 +Chap2Data: + db CHAP2 db $19 db $00 db $1a db $00 dw $639a ; Pointer to NPC Data - db $da - db $03 + tx Text03da db $00 db $00 db $00 db $00 -Data_11d44: - db $43 +Lass2Data: + db LASS2 db $1e db $00 db $1e db $00 dw $661f ; Pointer to NPC Data - db $dc - db $03 + tx Text03dc db $00 db $00 db $00 db $00 -Data_11d51: - db $44 +Pappy1Data: + db PAPPY1 db $1b db $00 db $22 db $00 dw $69a5 ; Pointer to NPC Data - db $dd - db $03 + tx Text03dd db $00 db $00 db $00 db $00 -Data_11d5e: - db $45 +Lad1Data: + db LAD1 db $12 db $04 db $1a db $00 dw $6b84 ; Pointer to NPC Data - db $de - db $03 + tx Text03de db $00 db $00 db $00 db $00 -Data_11d6b: - db $46 +Lad2Data: + db LAD2 db $11 db $04 db $16 db $00 dw $6e2c ; Pointer to NPC Data - db $de - db $03 + tx Text03de db $00 db $00 db $00 db $00 -Data_11d78: - db $47 +Chap3Data: + db CHAP3 db $19 db $00 db $1a db $00 dw $6de8 ; Pointer to NPC Data - db $da - db $03 + tx Text03da db $00 db $00 db $00 db $00 -Data_11d85: - db $48 +Clerk12Data: + db CLERK12 db $22 db $00 db $16 db $00 dw $7295 ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11d92: - db $49 +Clerk13Data: + db CLERK13 db $22 db $00 db $16 db $00 dw $726c ; Pointer to NPC Data - db $b3 - db $03 + tx Text03b3 db $00 db $00 db $00 db $00 -Data_11d9f: - db $4a +HostData: + db HOST db $22 db $00 db $16 db $00 dw $7352 ; Pointer to NPC Data - db $df - db $03 + tx Text03df db $00 db $00 db $00 db $00 -Data_11dac: - db $4b +Specs1Data: + db SPECS1 db $13 db $00 db $22 db $00 dw $5d82 ; Pointer to NPC Data - db $e0 - db $03 + tx Text03e0 db $00 db $00 db $00 db $00 -Data_11db9: - db $4c +ButchData: + db BUTCH db $14 db $00 db $16 db $00 dw $5d8d ; Pointer to NPC Data - db $e1 - db $03 + tx Text03e1 db $00 db $00 db $00 db $00 -Data_11dc6: - db $4d +Granny1Data: + db GRANNY1 db $24 db $00 db $16 db $00 dw $5d9f ; Pointer to NPC Data - db $e5 - db $03 + tx Text03e5 db $00 db $00 db $00 db $00 -Data_11dd3: - db $4e +Lass3Data: + db LASS3 db $1d db $04 db $22 db $00 dw $5fd2 ; Pointer to NPC Data - db $dc - db $03 + tx Text03dc db $00 db $00 db $00 db $00 -Data_11de0: - db $4f +Man2Data: + db MAN2 db $1a db $00 db $16 db $00 dw $6137 ; Pointer to NPC Data - db $d8 - db $03 + tx Text03d8 db $00 db $00 db $00 db $00 -Data_11ded: - db $50 +Pappy2Data: + db PAPPY2 db $1b db $00 db $22 db $00 dw $613b ; Pointer to NPC Data - db $dd - db $03 + tx Text03dd db $00 db $00 db $00 db $00 -Data_11dfa: - db $51 +Lass4Data: + db LASS4 db $1d db $04 db $22 db $00 dw $63d9 ; Pointer to NPC Data - db $dc - db $03 + tx Text03dc db $00 db $00 db $00 db $00 -Data_11e07: - db $52 +Hood1Data: + db HOOD1 db $17 db $04 db $1e db $00 dw $63dd ; Pointer to NPC Data - db $e2 - db $03 + tx Text03e2 db $00 db $00 db $00 db $00 -Data_11e14: - db $53 +Granny2Data: + db GRANNY2 db $24 db $00 db $16 db $00 dw $66d8 ; Pointer to NPC Data - db $e5 - db $03 + tx Text03e5 db $00 db $00 db $00 db $00 -Data_11e21: - db $54 +Gal2Data: + db GAL2 db $22 db $00 db $16 db $00 dw $66e3 ; Pointer to NPC Data - db $db - db $03 + tx Text03db db $00 db $00 db $00 db $00 -Data_11e2e: - db $55 +Lad3Data: + db LAD3 db $12 db $04 db $1a db $00 dw $6850 ; Pointer to NPC Data - db $de - db $03 + tx Text03de db $00 db $00 db $00 db $00 -Data_11e3b: - db $56 +Gal3Data: + db GAL3 db $22 db $00 db $16 db $00 dw $6a30 ; Pointer to NPC Data - db $db - db $03 + tx Text03db db $00 db $00 db $00 db $00 -Data_11e48: - db $57 +Chap4Data: + db CHAP4 db $19 db $00 db $1a db $00 dw $6a3b ; Pointer to NPC Data - db $da - db $03 + tx Text03da db $00 db $00 db $00 db $00 -Data_11e55: - db $58 +Man3Data: + db MAN3 db $1a db $00 db $16 db $00 dw $6bc1 ; Pointer to NPC Data - db $d8 - db $03 + tx Text03d8 db $00 db $00 db $00 db $00 -Data_11e62: - db $59 +Specs2Data: + db SPECS2 db $18 db $00 db $0e db $00 dw $6bc5 ; Pointer to NPC Data - db $e0 - db $03 + tx Text03e0 db $00 db $00 db $00 db $00 -Data_11e6f: - db $5a +Specs3Data: + db SPECS3 db $13 db $00 db $22 db $00 dw $6bed ; Pointer to NPC Data - db $e0 - db $03 + tx Text03e0 db $00 db $00 db $00 db $00 -Data_11e7c: - db $5b +Woman2Data: + db WOMAN2 db $23 db $04 db $1e db $00 dw $4c3e ; Pointer to NPC Data - db $d9 - db $03 + tx Text03d9 db $00 db $00 db $00 db $00 -Data_11e89: - db $5c +ManiaData: + db MANIA db $15 db $00 db $26 db $00 dw $6e88 ; Pointer to NPC Data - db $e4 - db $03 + tx Text03e4 db $00 db $00 db $00 db $00 -Data_11e96: - db $5d +Pappy3Data: + db PAPPY3 db $1b db $00 db $22 db $00 dw $709c ; Pointer to NPC Data - db $dd - db $03 + tx Text03dd db $00 db $00 db $00 db $00 -Data_11ea3: - db $5e +Gal4Data: + db GAL4 db $22 db $00 db $16 db $00 dw $70a0 ; Pointer to NPC Data - db $db - db $03 + tx Text03db db $00 db $00 db $00 db $00 -Data_11eb0: - db $5f +ChampData: + db CHAMP db $15 db $00 db $26 db $00 dw $70a4 ; Pointer to NPC Data - db $e3 - db $03 + tx Text03e3 db $00 db $00 db $00 db $00 -Data_11ebd: - db $60 +Hood2Data: + db HOOD2 db $17 db $04 db $1e db $00 dw $70a8 ; Pointer to NPC Data - db $e2 - db $03 + tx Text03e2 db $00 db $00 db $00 db $00 -Data_11eca: - db $61 +Lass5Data: + db LASS5 db $1f db $04 db $1a db $00 dw $70ac ; Pointer to NPC Data - db $dc - db $03 + tx Text03dc db $00 db $00 db $00 db $00 -Data_11ed7: - db $62 +Chap5Data: + db CHAP5 db $19 db $00 db $1a db $00 dw $70b0 ; Pointer to NPC Data - db $da - db $03 + tx Text03da db $00 db $00 db $00 db $00 -Data_11ee4: - db $63 +AaronData: + db AARON db $18 db $00 db $0e db $00 dw $58dd ; Pointer to NPC Data - db $e7 - db $03 - db $29 + tx Text03e7 + db AARON_PIC db $09 db $02 db $15 -Data_11ef1: - db $64 +GuideData: + db GUIDE db $1a db $00 db $16 db $00 dw $7283 ; Pointer to NPC Data - db $e6 - db $03 + tx Text03e6 db $00 db $00 db $00 db $00 -Data_11efe: - db $65 +Tech7Data: + db TECH7 db $18 db $00 db $0e db $00 dw $58c6 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 db $00 -Data_11f0b: - db $66 +Tech8Data: + db TECH8 db $18 db $00 db $0e db $00 dw $58d1 ; Pointer to NPC Data - db $b2 - db $03 + tx Text03b2 db $00 db $00 db $00 diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm index e63481f..e89bbfb 100644 --- a/src/engine/bank03.asm +++ b/src/engine/bank03.asm @@ -128,9 +128,9 @@ Func_c10a: ; c10a (3:410a) ; closes dialogue window. seems to be for other things as well. CloseDialogueBox: ; c111 (3:4111) - ld a, [wd0c1] + ld a, [wd0c1] ; with 0 set i can't move cursors, can move around bit 0, a - call nz, Func_c135 + call nz, Func_c135 ; seems to actually close the dialog window ld a, [wd0c1] bit 1, a jr z, .asm_c12a @@ -144,10 +144,11 @@ CloseDialogueBox: ; c111 (3:4111) ld [wd0bf], a ret +; this seems to legitimately close the dialogue box Func_c135: ; c135 (3:4135) push hl - farcall Func_80028 - ld hl, wd0c1 + farcall Func_80028 ; Draw background of the current room, I think + ld hl, wd0c1 ; at this point, the background tiles are back to normal res 0, [hl] pop hl ret @@ -1236,7 +1237,7 @@ Func_c943: ; c943 (3:4943) ld [wd4c6], a ld de, wd3ab ld bc, $0006 - call Func_3bf5 + call CopyBankedDataToDE ld a, [wd3ab] or a jr z, .asm_c98f @@ -2324,12 +2325,12 @@ Func_d0be: ; d0be (3:50be) farcall Func_1c461 jp IncreaseOWScriptPointerBy3 -Func_d0ce: ; d0ce (3:50ce) +OWScript_DoFrames: ; d0ce (3:50ce) push bc call DoFrameIfLCDEnabled pop bc dec c - jr nz, Func_d0ce + jr nz, OWScript_DoFrames jp IncreaseOWScriptPointerBy2 Func_d0d9: ; d0d9 (3:50d9) @@ -2922,10 +2923,10 @@ asm_d4e6 OWSequence_d52e: ; d52e (3:552e) start_script - run_script Func_d0ce + run_script OWScript_DoFrames db $3c run_script Func_d3e0 - run_script Func_d0ce + run_script OWScript_DoFrames db $78 run_script Func_d36d db $02 diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm index 48b6c12..2ebb399 100644 --- a/src/engine/bank04.asm +++ b/src/engine/bank04.asm @@ -1004,7 +1004,7 @@ OverworldScriptTable: ; 1217b (4:617b) dw Func_d088 dw Func_d095 dw Func_d0be - dw Func_d0ce + dw OWScript_DoFrames dw Func_d0d9 dw Func_d0f2 dw Func_ce4a @@ -1331,7 +1331,7 @@ Func_12ae2: ; 12ae2 (4:6ae2) ld [hli], a push hl ld l, $6 - farcall Func_8020f + farcall GetMapDataPointer farcall Func_80229 pop hl ld a, [wd4c6] @@ -1374,7 +1374,7 @@ Func_12b13: ; 12b13 (4:6b13) ld [hl], a ld de, wd23e ld bc, $0004 - call Func_3bf5 + call CopyBankedDataToDE pop hl ld de, wd23e ld a, [de] diff --git a/src/engine/bank20.asm b/src/engine/bank20.asm index d2acf6a..967ffb0 100644 --- a/src/engine/bank20.asm +++ b/src/engine/bank20.asm @@ -2,7 +2,7 @@ Func_80000: ; 80000 (20:4000) INCROM $80000, $80028 Func_80028: ; 80028 (20:4028) - call Func_801f1 + call Func_801f1 ; Clears the first x800 bytes of S1:a000 ld bc, $0000 call Func_80077 farcall $3, $49c7 @@ -13,6 +13,7 @@ Func_80028: ; 80028 (20:4028) INCROM $8003d, $80077 +; loads the background it seems. Also includes background tile permissions? Func_80077: ; 80077 (20:4077) ld a, $1 ld [wd292], a @@ -25,37 +26,187 @@ Func_80077: ; 80077 (20:4077) push hl push bc push de - call BCCoordToBGMap0Address + call BCCoordToBGMap0Address ; de ld hl, wd4c2 ld [hl], e inc hl ld [hl], d - call $43b9 + call Func_803b9 ; load more d4c* stuff from mapdatapointers ld a, [wd4c6] - ld [wd23d], a + ld [wd23d], a ; copies the bank of the data we loaded to wd23d ld de, wd23e ld bc, $0006 - call Func_3bf5 + call CopyBankedDataToDE ; copies 6 bytes to wd23e+ ld l, e - ld h, d + ld h, d ; then copies that data into various other places? ld a, [hli] - ld [wd12f], a + ld [wd12f], a ; just happens to correspond to size of room ld a, [hli] - ld [wd130], a + ld [wd130], a ; hmmm ld a, [hli] - ld [wd23a], a + ld [wd23a], a ; these 3 are before this data and after room collision ld a, [hli] ld [wd23b], a ld a, [hli] ld [wd23c], a - call $40bd + call Func_800bd ; moves the background data to some place vblank knows about pop de pop bc pop hl ret -; 0x800bd - INCROM $800bd, $801a1 +Func_800bd: ; 800bd (20:40bd) + push hl + push bc + push de + ld a, [wd4c4] ; these are still the copy locations + add $05 + ld e, a + ld a, [wd4c5] + adc $00 + ld d, a ; de = [wd4c4/5] + 5 + ld b, $c0 ; b = c0 + call Func_08bf + ld a, [wd4c2] + ld e, a + ld a, [wd4c3] ; bg map coord from earlier + ld d, a + call Func_800e0 + pop de + pop bc + pop hl + ret + +; de is a bg map coord +Func_800e0: ; 800e0 (20:40e0) + push hl + ld hl, $d28e + ld a, [wd12f] + ld [hl], a + ld a, [wd23c] + or a + jr z, .asm_800f0 + sla [hl] ; if wd23c is nonzero, double d28e +.asm_800f0 + ld c, $40 + ld hl, wd23e + xor a +.asm_800f6 + ld [hli], a + dec c + jr nz, .asm_800f6 ; clear out wd23e-40+ + ld a, [wd130] + ld c, a +.asm_800fe + push bc ; push the height of this map + push de ; push the destination of this map + ld b, $00 + ld a, [$d28e] + ld c, a ; bc is now the width + ld de, wd23e ; wd23e is the place we copied map data to (The 6 bytes) before + call Func_3be4 + ld a, [wd12f] + ld b, a + pop de + push de + ld hl, wd23e + call Func_8016e + ld a, [wConsole] + cp $02 + jr nz, .asm_8013b + call BankswitchVRAM1 + ld a, [wd12f] + ld c, a + ld b, $00 + ld hl, wd23e + add hl, bc + pop de + push de + ld a, [wd12f] + ld b, a + call Func_80148 + call Func_8016e + call BankswitchVRAM0 +.asm_8013b + pop de + ld hl, $20 + add hl, de + ld e, l + ld d, h + pop bc + dec c + jr nz, .asm_800fe + pop hl + ret +; 0x80148 + +Func_80148: ; 80148 (20:4148) + ld a, [$d291] + or a + ret z + ld a, [$d23c] + or a + jr z, .asm_80162 + push hl + push bc +.asm_80155 + push bc + ld a, [$d291] + add [hl] + ld [hli], a + pop bc + dec b + jr nz, .asm_80155 + pop bc + pop hl + ret +.asm_80162 + push hl + push bc + ld a, [$d291] +.asm_80167 + ld [hli], a + dec b + jr nz, .asm_80167 + pop bc + pop hl + ret + +Func_8016e: ; 8016e (20:416e) + ld a, [wd292] + or a + jp z, SafeCopyDataHLtoDE + push hl + push bc + push de + ldh a, [hBankSRAM] + push af + ld a, $01 + call BankswitchSRAM + push hl + ld hl, $800 + ldh a, [hBankVRAM] + or a + jr z, .asm_8018c + ld hl, $c00 +.asm_8018c + add hl, de + ld e, l + ld d, h + pop hl +.asm_80190 + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .asm_80190 + pop af + call BankswitchSRAM + call DisableSRAM + pop de + pop bc + pop hl + ret Func_801a1: ; 801a1 (20:41a1) push hl @@ -108,6 +259,7 @@ Func_801a1: ; 801a1 (20:41a1) pop hl ret +; Clears the first x800 bytes of S1:a000 Func_801f1: ; 801f1 (20:41f1) push hl push bc @@ -118,7 +270,7 @@ Func_801f1: ; 801f1 (20:41f1) ld hl, $a000 ld bc, $0800 xor a - call $3c10 + call FillMemoryWithA pop af call BankswitchSRAM call DisableSRAM @@ -126,7 +278,7 @@ Func_801f1: ; 801f1 (20:41f1) pop hl ret -Func_8020f: ; 8020f (20:420f) +GetMapDataPointer: ; 8020f (20:420f) push bc push af ld bc, MapDataPointers @@ -135,17 +287,18 @@ Func_8020f: ; 8020f (20:420f) ld c, [hl] inc hl ld b, [hl] - pop af + pop af ; bc = [MapDataPointers+l] ld l, a ld h, $0 sla l rl h sla l rl h - add hl, bc + add hl, bc ; hl = [MapDataPointers+l] + 4*a pop bc ret +; These vars are used as a copy source for something about drawing the background? Func_80229: ; 80229 (20:4229) ld a, [hli] ld [wd4c4], a @@ -162,7 +315,7 @@ Func_80229: ; 80229 (20:4229) Func_8025b: ; 8025b (20:425b) push hl ld l, $4 - call Func_8020f + call GetMapDataPointer call Func_80229 ld a, [hl] push af @@ -234,7 +387,19 @@ Func_802bb: ; 802bb (20:42bb) ret ; 0x802d4 - INCROM $802d4, $80418 + INCROM $802d4, $803b9 + +Func_803b9: ; 803b9 (20:43b9) + ld l, $00 + ld a, [wd131] ; current screen/state/almost room? + call GetMapDataPointer + call Func_80229 ; basically get pointer to background tilemap? + ld a, [hl] + ld [$d239], a ; the final value in mapDataPointer goes to this mystery + ret +; 0x803c9 + + INCROM $803c9, $80418 Func_80418: ; 80418 (20:4418) INCROM $80418, $80480 @@ -332,5 +497,27 @@ Func_80ba4: ; 80ba4 (20:4ba4) Unknown_80e5a: ; 80e5a (20:4e5a) INCROM $80e5a, $80e5d +; might be closer to "screen specific data" than map data +; ex: one thing is reading from something that changes multipl times in loading +; of screens, and changes in duels (4d131) MapDataPointers: ; 80e5d (20:4e5d) - INCROM $80e5d, $84000 + dw MapDataPointers_80e67 + dw MapDataPointers_8100f + dw MapDataPointers_8116b + dw MapDataPointers_81333 + dw MapDataPointers_81697 + +MapDataPointers_80e67: ; 80e67 (20:4e67) + INCROM $80e67, $8100f + +MapDataPointers_8100f: ; 8100f (20:500f) + INCROM $8100f, $8116b + +MapDataPointers_8116b: ; 8116b (20:516b) + INCROM $8116b, $81333 + +MapDataPointers_81333: ; 81333 (20:5333) + INCROM $81333, $81697 + +MapDataPointers_81697: ; 81697 (20:5697) + INCROM $81697, $84000 diff --git a/src/engine/home.asm b/src/engine/home.asm index 5acb742..450d9c1 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -1537,37 +1537,39 @@ UpdateRNGSources: ; 089b (0:089b) pop hl ret +; ld d, a ; de = wd4c4/5 + 5 +; ld b, $c0 ; b = c0 Func_08bf: ; 08bf (0:08bf) ld hl, wcad6 ld [hl], e inc hl - ld [hl], d + ld [hl], d ; load wcad6/7 with [wd4c4]+5 ld hl, wcad8 ld [hl], $1 - inc hl + inc hl ; wcad8 is 1, a bunch of things after it are 0 xor a ld [hli], a ld [hli], a ld [hli], a ld [hli], a - ld [hl], b + ld [hl], b ; then wcad i think is set to c0 inc hl - ld [hli], a - ld [hl], $ef + ld [hli], a ; 0 + ld [hl], $ef ; and ef ld h, b - ld l, $0 + ld l, $0 ; hl is now c000, first byte of wram, first card collection or no name xor a .asm_8d9 - ld [hl], a - inc l + ld [hl], a ; 0 out ff bytes + inc l ; inc the first ff bytes of wram (was an arg so could be other stuff) jr nz, .asm_8d9 ret Func_08de: ; 08de (0:08de) - push hl - push de + push hl ; wd23e + 40 i think? + push de ; 6 mdp bytes .asm_8e0 - push bc + push bc ; as of first run, bc is the width call Func_08ef ld [de], a inc de @@ -1584,7 +1586,7 @@ Func_08ef: ; 08ef (0:08ef) ld hl, wcadc ld a, [hl] or a - jr z, .asm_902 + jr z, .asm_902 ; for the purpose of this, we made it 0 earlier dec [hl] inc hl .asm_8f8 @@ -1603,9 +1605,9 @@ Func_08ef: ; 08ef (0:08ef) ld c, [hl] inc hl ld b, [hl] - inc hl - dec [hl] - inc hl + inc hl ; get pointer from wcad6/7 + dec [hl] ; dec wcad8 (was 1) + inc hl ; wcad9 jr nz, .asm_914 dec hl ld [hl], $8 @@ -11329,7 +11331,8 @@ Func_3be4: ; 3be4 (0:3be4) ret ; 0x3bf5 -Func_3bf5: ; 3bf5 (0:3bf5) +; Copies bc bytes from [wd4c4] to de +CopyBankedDataToDE: ; 3bf5 (0:3bf5) ldh a, [hBankROM] push af push hl diff --git a/src/macros/scripts.asm b/src/macros/scripts.asm index 9c81bda..2fa15fb 100644 --- a/src/macros/scripts.asm +++ b/src/macros/scripts.asm @@ -50,7 +50,7 @@ ENDM const Func_d088_index ; $21 const Func_d095_index ; $22 const Func_d0be_index ; $23 - const Func_d0ce_index ; $24 + const OWScript_DoFrames_index ; $24 const Func_d0d9_index ; $25 const Func_d0f2_index ; $26 const Func_ce4a_index ; $27 diff --git a/src/wram.asm b/src/wram.asm index cee7340..7ae9e59 100644 --- a/src/wram.asm +++ b/src/wram.asm @@ -1900,6 +1900,7 @@ wd12f:: ; d12f wd130:: ; d130 ds $1 +; current screen, at least for some purpose -- changed multiple times on loads and changes when screen changes in battle? wd131:: ; d131 ds $1 @@ -2210,6 +2211,7 @@ wd4c2:: ; d4c2 wd4c3:: ; d4c3 ds $1 +; these next 3 seem to be an address (bank @ end) for copying bg data wd4c4:: ; d4c4 ds $1 diff --git a/tools/script_extractor.py b/tools/script_extractor.py index efe98a4..d9cea6b 100644 --- a/tools/script_extractor.py +++ b/tools/script_extractor.py @@ -101,7 +101,7 @@ def createList(): # this is a func just so all this can go at the bottom ("Func_d088", "bbb", False), ("Func_d095", "bbb", False), ("Func_d0be", "bb", False), - ("Func_d0ce", "b", False), + ("OWScript_DoFrames", "b", False), ("Func_d0d9", "bbb", False), # jumps but still needs args ("Func_d0f2", "bbb", False), # jumps but still needs args ("Func_ce4a", "bb", False), |