summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Hall <camthesaxman@users.noreply.github.com>2017-09-08 22:11:08 -0500
committerGitHub <noreply@github.com>2017-09-08 22:11:08 -0500
commit99dc97f6aa48646c90def102ce2632be8c45eab9 (patch)
tree4e62298c3b9cf520e6d955e7da58239aa5808931
parent3ca2cec4f0cca98664feabae80aa5b0d3c691bf6 (diff)
parent3e68cbc51f867e507644c1c19bb3be7a89fcd3e4 (diff)
Merge pull request #417 from camthesaxman/decompile_mauville_old_man
finish decompiling mauville_old_man
-rw-r--r--asm/macros/event.inc6
-rw-r--r--asm/mauville_old_man.s1522
-rw-r--r--data-de/event_scripts.s11
-rw-r--r--data-de/text/bard.inc18
-rw-r--r--data-de/text/giddy.inc8
-rw-r--r--data-de/text/hipster.inc8
-rw-r--r--data-de/text/storyteller.inc236
-rw-r--r--data-de/text/trader.inc28
-rw-r--r--data/event_scripts.s11
-rw-r--r--data/mauville_old_man.s101
-rw-r--r--data/scripts/bard.inc67
-rw-r--r--data/scripts/giddy.inc51
-rw-r--r--data/scripts/hipster.inc25
-rw-r--r--data/scripts/mauville_man.inc357
-rw-r--r--data/scripts/storyteller.inc82
-rw-r--r--data/scripts/trader.inc88
-rw-r--r--data/specials.inc42
-rw-r--r--data/text/bard.inc18
-rw-r--r--data/text/giddy.inc8
-rw-r--r--data/text/hipster.inc8
-rw-r--r--data/text/storyteller.inc236
-rw-r--r--data/text/trader.inc28
-rw-r--r--include/bard_music.h31
-rw-r--r--include/easy_chat.h1036
-rw-r--r--include/gba/m4a_internal.h4
-rw-r--r--include/global.h82
-rw-r--r--include/m4a.h5
-rw-r--r--include/mauville_man.h18
-rw-r--r--include/mauville_old_man.h11
-rw-r--r--include/text.h1
-rw-r--r--include/trader.h3
-rw-r--r--ld_script.txt5
-rw-r--r--src/bard_music.c76
-rw-r--r--src/easy_chat.c26
-rw-r--r--src/m4a_4.c2
-rw-r--r--src/mail.c2
-rw-r--r--src/mauville_man.c1311
-rw-r--r--src/mauville_old_man.c247
-rw-r--r--src/new_game.c4
-rw-r--r--src/record_mixing.c4
-rw-r--r--src/strings.c4
-rw-r--r--src/trader.c47
-rw-r--r--src/trainer_card.c2
-rw-r--r--src/tv.c22
-rw-r--r--sym_bss.txt6
-rw-r--r--sym_ewram.txt8
46 files changed, 3225 insertions, 2691 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index cd2927c66..9fddd9194 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -1493,6 +1493,12 @@
callstd \type
.endm
+ @ Message box types
+ MSGBOX_YESNO = 5
+
+ YES = 1
+ NO = 0
+
.macro giveitem item, amount=1, function=0
setorcopyvar 0x8000, \item
setorcopyvar 0x8001, \amount
diff --git a/asm/mauville_old_man.s b/asm/mauville_old_man.s
deleted file mode 100644
index 726de6fc1..000000000
--- a/asm/mauville_old_man.s
+++ /dev/null
@@ -1,1522 +0,0 @@
- .include "constants/gba_constants.inc"
- .include "constants/species_constants.inc"
- .include "asm/macros.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_80F7DC0
-sub_80F7DC0: @ 80F7DC0
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x18
- ldr r1, _080F7E84 @ =gUnknown_083E53C8
- mov r0, sp
- movs r2, 0x18
- bl memcpy
- movs r5, 0
- movs r0, 0x2
- add r0, sp
- mov r8, r0
- ldr r1, _080F7E88 @ =gSaveBlock1 + 0x2D94
- adds r1, 0x18
- adds r3, r1, 0
-_080F7DE4:
- adds r0, r3, r5
- strb r5, [r0]
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- cmp r5, 0x7
- bls _080F7DE4
- movs r5, 0
- ldr r2, _080F7E88 @ =gSaveBlock1 + 0x2D94
- adds r2, 0x4
- mov r9, r2
- adds r6, r1, 0
-_080F7DFC:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r4, r5, 0x1
- adds r1, r4, 0
- bl __modsi3
- lsls r0, 16
- lsrs r1, r0, 16
- adds r2, r6, r5
- ldrb r7, [r2]
- adds r1, r6, r1
- ldrb r0, [r1]
- strb r0, [r2]
- strb r7, [r1]
- lsls r4, 16
- lsrs r5, r4, 16
- cmp r5, 0x7
- bls _080F7DFC
- movs r3, 0
- mov r10, r3
- movs r5, 0
-_080F7E2A:
- lsls r4, r5, 2
- mov r1, sp
- adds r0, r1, r4
- ldrb r0, [r0]
- bl sub_80EAE88
- add r4, r8
- strh r0, [r4]
- add r0, r10
- lsls r0, 16
- lsrs r0, 16
- mov r10, r0
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- cmp r5, 0x5
- bls _080F7E2A
- movs r0, 0
- ldr r2, _080F7E88 @ =gSaveBlock1 + 0x2D94
- strb r0, [r2, 0x2]
- movs r7, 0
- movs r5, 0
-_080F7E56:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0xA
- bl __umodsi3
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, 0x2
- bhi _080F7E90
- cmp r7, 0x7
- bhi _080F7E90
- lsls r0, r5, 1
- add r0, r9
- ldr r1, _080F7E8C @ =0x0000ffff
- strh r1, [r0]
- adds r0, r7, 0x1
- lsls r0, 16
- lsrs r7, r0, 16
- adds r4, r5, 0x1
- b _080F7EE2
- .align 2, 0
-_080F7E84: .4byte gUnknown_083E53C8
-_080F7E88: .4byte gSaveBlock1 + 0x2D94
-_080F7E8C: .4byte 0x0000ffff
-_080F7E90:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- mov r1, r10
- bl __umodsi3
- lsls r0, 16
- lsrs r2, r0, 16
- movs r1, 0
- adds r4, r5, 0x1
- lsls r6, r5, 1
- cmp r5, 0x5
- bhi _080F7ECC
- mov r3, r8
- ldrh r0, [r3]
- b _080F7EC2
-_080F7EB2:
- adds r0, r1, 0x1
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r5, 0x5
- bhi _080F7ECC
- lsls r0, r1, 2
- adds r0, r3, r0
- ldrh r0, [r0]
-_080F7EC2:
- subs r0, r2, r0
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r0, 0
- bgt _080F7EB2
-_080F7ECC:
- cmp r1, 0x6
- bne _080F7ED2
- movs r1, 0
-_080F7ED2:
- lsls r0, r1, 2
- add r0, sp
- ldrh r0, [r0]
- bl sub_80EB784
- mov r2, r9
- adds r1, r2, r6
- strh r0, [r1]
-_080F7EE2:
- lsls r0, r4, 16
- lsrs r5, r0, 16
- cmp r5, 0x9
- bls _080F7E56
- add sp, 0x18
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80F7DC0
-
- thumb_func_start sub_80F7EFC
-sub_80F7EFC: @ 80F7EFC
- ldr r0, _080F7F08 @ =gSaveBlock1 + 0x2D94
- adds r0, 0x29
- movs r1, 0
- strb r1, [r0]
- bx lr
- .align 2, 0
-_080F7F08: .4byte gSaveBlock1 + 0x2D94
- thumb_func_end sub_80F7EFC
-
- thumb_func_start sub_80F7F0C
-sub_80F7F0C: @ 80F7F0C
- ldr r1, _080F7F14 @ =gSaveBlock1 + 0x2D94
- movs r0, 0
- strb r0, [r1, 0x1]
- bx lr
- .align 2, 0
-_080F7F14: .4byte gSaveBlock1 + 0x2D94
- thumb_func_end sub_80F7F0C
-
- thumb_func_start sub_80F7F18
-sub_80F7F18: @ 80F7F18
- push {lr}
- bl sub_8109A20
- pop {r0}
- bx r0
- thumb_func_end sub_80F7F18
-
- thumb_func_start sub_80F7F24
-sub_80F7F24: @ 80F7F24
- push {lr}
- bl sub_80F8428
- pop {r0}
- bx r0
- thumb_func_end sub_80F7F24
-
- thumb_func_start sub_80F7F30
-sub_80F7F30: @ 80F7F30
- push {lr}
- bl GetCurrentMauvilleOldMan
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x4
- bhi _080F7F76
- lsls r0, 2
- ldr r1, _080F7F48 @ =_080F7F4C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080F7F48: .4byte _080F7F4C
- .align 2, 0
-_080F7F4C:
- .4byte _080F7F60
- .4byte _080F7F66
- .4byte _080F7F72
- .4byte _080F7F6C
- .4byte _080F7F76
-_080F7F60:
- bl sub_80F7EFC
- b _080F7F76
-_080F7F66:
- bl sub_80F7F0C
- b _080F7F76
-_080F7F6C:
- bl sub_80F7F24
- b _080F7F76
-_080F7F72:
- bl sub_80F7F18
-_080F7F76:
- bl sub_80F83D0
- pop {r0}
- bx r0
- thumb_func_end sub_80F7F30
-
- thumb_func_start sub_80F7F80
-sub_80F7F80: @ 80F7F80
- push {r4,lr}
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- ldr r0, _080F7FA8 @ =sub_80F8184
- movs r1, 0x50
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- ldr r2, _080F7FAC @ =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- strh r4, [r1, 0x12]
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080F7FA8: .4byte sub_80F8184
-_080F7FAC: .4byte gTasks
- thumb_func_end sub_80F7F80
-
- thumb_func_start sub_80F7FB0
-sub_80F7FB0: @ 80F7FB0
- push {r4-r7,lr}
- adds r6, r1, 0
- movs r1, 0x8
- ldrsh r0, [r0, r1]
- cmp r0, 0x5
- bls _080F7FBE
- b _080F817A
-_080F7FBE:
- lsls r0, 2
- ldr r1, _080F7FC8 @ =_080F7FCC
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080F7FC8: .4byte _080F7FCC
- .align 2, 0
-_080F7FCC:
- .4byte _080F7FE4
- .4byte _080F817A
- .4byte _080F8040
- .4byte _080F8074
- .4byte _080F8074
- .4byte _080F817A
-_080F7FE4:
- ldr r2, _080F8034 @ =gSaveBlock1 + 0x2D94
- ldr r0, _080F8038 @ =gSpecialVar_0x8004
- ldrh r0, [r0]
- adds r1, r2, 0
- adds r1, 0xE
- cmp r0, 0
- bne _080F7FF4
- adds r1, r2, 0x2
-_080F7FF4:
- adds r2, r1, 0
- adds r1, r6, 0
- adds r1, 0xC
- movs r3, 0x5
-_080F7FFC:
- ldrh r0, [r2]
- strh r0, [r1]
- adds r2, 0x2
- adds r1, 0x2
- subs r3, 0x1
- cmp r3, 0
- bge _080F7FFC
- ldr r2, _080F803C @ =0x0000ffff
- adds r4, r2, 0
- movs r2, 0
- adds r1, r6, 0
- adds r1, 0x18
- movs r3, 0x5
-_080F8016:
- ldrh r0, [r1]
- orrs r0, r4
- strh r0, [r1]
- strh r2, [r1, 0x2]
- strh r2, [r1, 0x4]
- strh r2, [r1, 0x6]
- adds r1, 0x8
- subs r3, 0x1
- cmp r3, 0
- bge _080F8016
- movs r0, 0
- strb r0, [r6]
- strb r0, [r6, 0x1]
- strh r0, [r6, 0x4]
- b _080F817A
- .align 2, 0
-_080F8034: .4byte gSaveBlock1 + 0x2D94
-_080F8038: .4byte gSpecialVar_0x8004
-_080F803C: .4byte 0x0000ffff
-_080F8040:
- ldrb r1, [r6]
- lsls r1, 1
- adds r0, r6, 0
- adds r0, 0xC
- adds r0, r1
- ldrh r4, [r0]
- lsrs r0, r4, 9
- ldr r1, _080F8070 @ =0x000001ff
- ands r1, r4
- bl sub_814A2D0
- adds r1, r0, 0
- movs r0, 0
- strh r0, [r6, 0x4]
- movs r2, 0x3
- ands r2, r4
- lsrs r4, 3
- movs r0, 0x1
- ands r4, r0
- adds r2, r4
- adds r0, r6, 0
- bl sub_814A2EC
- b _080F817A
- .align 2, 0
-_080F8070: .4byte 0x000001ff
-_080F8074:
- ldrb r1, [r6, 0x1]
- lsls r0, r1, 3
- adds r0, 0x18
- adds r7, r6, r0
- ldrb r0, [r6, 0x3]
- cmp r0, 0x1
- beq _080F8124
- cmp r0, 0x1
- bgt _080F808C
- cmp r0, 0
- beq _080F8092
- b _080F817A
-_080F808C:
- cmp r0, 0xFE
- beq _080F8170
- b _080F817A
-_080F8092:
- ldrb r0, [r6, 0x2]
- cmp r0, 0
- bne _080F80D0
- cmp r1, 0x6
- beq _080F80A2
- ldrh r0, [r7]
- cmp r0, 0xFF
- bne _080F80A6
-_080F80A2:
- movs r0, 0xFE
- b _080F8178
-_080F80A6:
- ldrh r0, [r7, 0x2]
- strb r0, [r6, 0x2]
- ldrh r0, [r7]
- cmp r0, 0x32
- bhi _080F80CA
- movs r1, 0x3
- bl __udivsi3
- adds r1, r0, 0
- lsls r1, 16
- lsrs r1, 16
- lsls r0, r1, 1
- adds r0, r1
- adds r0, 0xF9
- lsls r0, 16
- lsrs r0, 16
- bl m4aSongNumStart
-_080F80CA:
- movs r0, 0x1
- strb r0, [r6, 0x3]
- b _080F8114
-_080F80D0:
- ldrh r1, [r6, 0xA]
- movs r2, 0xA
- ldrsh r0, [r6, r2]
- cmp r0, 0xA
- ble _080F80E0
- ldrh r0, [r6, 0x6]
- subs r0, 0x2
- strh r0, [r6, 0x6]
-_080F80E0:
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _080F80EE
- ldrh r0, [r6, 0x8]
- adds r0, 0x40
- b _080F80F2
-_080F80EE:
- ldrh r0, [r6, 0x8]
- subs r0, 0x40
-_080F80F2:
- strh r0, [r6, 0x8]
- ldr r4, _080F811C @ =gMPlay_SE2
- ldr r5, _080F8120 @ =0x0000ffff
- ldrh r2, [r6, 0x6]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayVolumeControl
- movs r0, 0x8
- ldrsh r2, [r6, r0]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayPitchControl
- ldrh r0, [r6, 0xA]
- adds r0, 0x1
- strh r0, [r6, 0xA]
-_080F8114:
- ldrb r0, [r6, 0x2]
- subs r0, 0x1
- strb r0, [r6, 0x2]
- b _080F817A
- .align 2, 0
-_080F811C: .4byte gMPlay_SE2
-_080F8120: .4byte 0x0000ffff
-_080F8124:
- adds r0, r1, 0x1
- movs r1, 0
- strb r0, [r6, 0x1]
- strb r1, [r6, 0x3]
- ldrh r0, [r7]
- cmp r0, 0x32
- bhi _080F817A
- ldrh r0, [r7, 0x6]
- lsls r0, 4
- movs r1, 0x80
- lsls r1, 1
- adds r0, r1
- strh r0, [r6, 0x6]
- ldr r4, _080F8168 @ =gMPlay_SE2
- ldr r5, _080F816C @ =0x0000ffff
- ldrh r2, [r6, 0x6]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayVolumeControl
- movs r2, 0x80
- lsls r2, 2
- adds r0, r2, 0
- ldrh r7, [r7, 0x4]
- adds r0, r7
- strh r0, [r6, 0x8]
- movs r0, 0x8
- ldrsh r2, [r6, r0]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayPitchControl
- b _080F817A
- .align 2, 0
-_080F8168: .4byte gMPlay_SE2
-_080F816C: .4byte 0x0000ffff
-_080F8170:
- ldr r0, _080F8180 @ =gMPlay_SE2
- bl m4aMPlayStop
- movs r0, 0xFF
-_080F8178:
- strb r0, [r6, 0x3]
-_080F817A:
- pop {r4-r7}
- pop {r0}
- bx r0
- .align 2, 0
-_080F8180: .4byte gMPlay_SE2
- thumb_func_end sub_80F7FB0
-
- thumb_func_start sub_80F8184
-sub_80F8184: @ 80F8184
- push {r4-r7,lr}
- sub sp, 0x4
- lsls r0, 24
- lsrs r6, r0, 24
- lsls r0, r6, 2
- adds r0, r6
- lsls r0, 3
- ldr r1, _080F81B4 @ =gTasks
- adds r5, r0, r1
- ldr r1, _080F81B8 @ =gUnknown_03005DA0
- adds r0, r5, 0
- bl sub_80F7FB0
- movs r1, 0x8
- ldrsh r0, [r5, r1]
- cmp r0, 0x5
- bls _080F81A8
- b _080F83C8
-_080F81A8:
- lsls r0, 2
- ldr r1, _080F81BC @ =_080F81C0
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080F81B4: .4byte gTasks
-_080F81B8: .4byte gUnknown_03005DA0
-_080F81BC: .4byte _080F81C0
- .align 2, 0
-_080F81C0:
- .4byte _080F81D8
- .4byte _080F8218
- .4byte _080F8228
- .4byte _080F82D8
- .4byte _080F83B8
- .4byte _080F82C6
-_080F81D8:
- bl sub_80F7BA0
- ldr r4, _080F820C @ =gMenuWindowPtr
- ldr r0, [r4]
- ldr r1, _080F8210 @ =gWindowConfig_81E6CE4
- bl InitWindowFromConfig
- ldr r0, [r4]
- ldr r1, _080F8214 @ =gStringVar4
- movs r2, 0xF
- str r2, [sp]
- movs r2, 0x2
- movs r3, 0x4
- bl sub_8002EB0
- movs r0, 0
- strh r0, [r5, 0xA]
- strh r0, [r5, 0xC]
- strh r0, [r5, 0xE]
- strh r0, [r5, 0x10]
- movs r0, 0x4
- bl FadeOutBGMTemporarily
- movs r0, 0x1
- b _080F83C6
- .align 2, 0
-_080F820C: .4byte gMenuWindowPtr
-_080F8210: .4byte gWindowConfig_81E6CE4
-_080F8214: .4byte gStringVar4
-_080F8218:
- bl IsBGMPausedOrStopped
- lsls r0, 24
- cmp r0, 0
- bne _080F8224
- b _080F83C8
-_080F8224:
- movs r0, 0x2
- b _080F83C6
-_080F8228:
- ldr r4, _080F8240 @ =gSaveBlock1 + 0x2D94
- movs r2, 0xE
- ldrsh r1, [r5, r2]
- ldr r0, _080F8244 @ =gStringVar4
- adds r1, r0
- movs r3, 0
- ldrb r0, [r1]
- ldr r7, _080F8248 @ =gUnknown_03005DA0
- ldrh r2, [r5, 0x12]
- ldr r6, _080F824C @ =gUnknown_020388BC
- b _080F825A
- .align 2, 0
-_080F8240: .4byte gSaveBlock1 + 0x2D94
-_080F8244: .4byte gStringVar4
-_080F8248: .4byte gUnknown_03005DA0
-_080F824C: .4byte gUnknown_020388BC
-_080F8250:
- adds r1, 0x1
- adds r0, r3, 0x1
- lsls r0, 16
- lsrs r3, r0, 16
- ldrb r0, [r1]
-_080F825A:
- cmp r0, 0
- beq _080F826A
- cmp r0, 0xFE
- beq _080F826A
- cmp r0, 0xFC
- beq _080F826A
- cmp r0, 0xFF
- bne _080F8250
-_080F826A:
- cmp r2, 0
- bne _080F8278
- movs r0, 0x10
- ldrsh r1, [r5, r0]
- lsls r1, 1
- adds r0, r4, 0x2
- b _080F8282
-_080F8278:
- movs r2, 0x10
- ldrsh r1, [r5, r2]
- lsls r1, 1
- adds r0, r4, 0
- adds r0, 0xE
-_080F8282:
- adds r0, r1
- ldrh r0, [r0]
- movs r1, 0x3
- ands r1, r0
- lsrs r0, 3
- movs r2, 0x1
- ands r0, r2
- adds r1, r0
- strh r1, [r6]
- movs r1, 0x4
- ldrsh r0, [r7, r1]
- adds r1, r3, 0
- bl __divsi3
- movs r1, 0
- strh r0, [r7, 0x4]
- lsls r0, 16
- cmp r0, 0
- bgt _080F82AC
- movs r0, 0x1
- strh r0, [r7, 0x4]
-_080F82AC:
- ldrh r0, [r5, 0x10]
- adds r0, 0x1
- strh r0, [r5, 0x10]
- movs r2, 0xC
- ldrsh r0, [r5, r2]
- cmp r0, 0
- bne _080F82BE
- movs r0, 0x3
- b _080F82C0
-_080F82BE:
- movs r0, 0x5
-_080F82C0:
- strh r0, [r5, 0x8]
- strh r1, [r5, 0xA]
- b _080F83C8
-_080F82C6:
- ldrh r1, [r5, 0xC]
- movs r2, 0xC
- ldrsh r0, [r5, r2]
- cmp r0, 0
- bne _080F82D2
- b _080F83C4
-_080F82D2:
- subs r0, r1, 0x1
- strh r0, [r5, 0xC]
- b _080F83C8
-_080F82D8:
- ldr r1, _080F8304 @ =gStringVar4
- movs r2, 0xE
- ldrsh r0, [r5, r2]
- adds r0, r1
- ldrb r4, [r0]
- cmp r4, 0xFF
- bne _080F830C
- movs r0, 0xC8
- lsls r0, 1
- movs r1, 0x6
- bl FadeInNewBGM
- ldr r0, _080F8308 @ =gMPlay_SE2
- movs r1, 0x2
- bl m4aMPlayFadeOutTemporarily
- bl EnableBothScriptContexts
- adds r0, r6, 0
- bl DestroyTask
- b _080F83C8
- .align 2, 0
-_080F8304: .4byte gStringVar4
-_080F8308: .4byte gMPlay_SE2
-_080F830C:
- cmp r4, 0
- bne _080F832C
- ldr r0, _080F8328 @ =gMenuWindowPtr
- ldr r0, [r0]
- bl sub_8003418
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- strh r4, [r5, 0xC]
- b _080F83C8
- .align 2, 0
-_080F8328: .4byte gMenuWindowPtr
-_080F832C:
- cmp r4, 0xFE
- bne _080F8340
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- movs r1, 0
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- strh r1, [r5, 0xC]
- b _080F83C8
-_080F8340:
- cmp r4, 0xFC
- bne _080F8354
- ldrh r0, [r5, 0xE]
- adds r0, 0x2
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- movs r0, 0x8
- strh r0, [r5, 0xC]
- b _080F83C8
-_080F8354:
- cmp r4, 0x37
- bne _080F8374
- movs r4, 0
- strb r4, [r0]
- ldr r0, _080F8370 @ =gMenuWindowPtr
- ldr r0, [r0]
- bl sub_8003418
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- strh r0, [r5, 0xE]
- strh r4, [r5, 0xC]
- b _080F83C8
- .align 2, 0
-_080F8370: .4byte gMenuWindowPtr
-_080F8374:
- movs r1, 0xA
- ldrsh r0, [r5, r1]
- cmp r0, 0x1
- beq _080F8394
- cmp r0, 0x1
- bgt _080F8386
- cmp r0, 0
- beq _080F838C
- b _080F83C8
-_080F8386:
- cmp r0, 0x2
- beq _080F83A0
- b _080F83C8
-_080F838C:
- ldr r0, _080F839C @ =gMenuWindowPtr
- ldr r0, [r0]
- bl sub_8003418
-_080F8394:
- ldrh r0, [r5, 0xA]
- adds r0, 0x1
- strh r0, [r5, 0xA]
- b _080F83C8
- .align 2, 0
-_080F839C: .4byte gMenuWindowPtr
-_080F83A0:
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- movs r1, 0
- strh r0, [r5, 0xE]
- strh r1, [r5, 0xA]
- ldr r0, _080F83B4 @ =gUnknown_03005DA0
- ldrh r0, [r0, 0x4]
- strh r0, [r5, 0xC]
- movs r0, 0x4
- b _080F83C6
- .align 2, 0
-_080F83B4: .4byte gUnknown_03005DA0
-_080F83B8:
- ldrh r0, [r5, 0xC]
- subs r0, 0x1
- strh r0, [r5, 0xC]
- lsls r0, 16
- cmp r0, 0
- bne _080F83C8
-_080F83C4:
- movs r0, 0x3
-_080F83C6:
- strh r0, [r5, 0x8]
-_080F83C8:
- add sp, 0x4
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80F8184
-
- thumb_func_start sub_80F83D0
-sub_80F83D0: @ 80F83D0
- push {r4,lr}
- ldr r4, _080F83F4 @ =0x00004010
- bl GetCurrentMauvilleOldMan
- adds r1, r0, 0
- lsls r1, 24
- lsrs r1, 8
- movs r0, 0x8A
- lsls r0, 15
- adds r1, r0
- lsrs r1, 16
- adds r0, r4, 0
- bl VarSet
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080F83F4: .4byte 0x00004010
- thumb_func_end sub_80F83D0
-
- thumb_func_start sub_80F83F8
-sub_80F83F8: @ 80F83F8
- push {r4,lr}
- ldr r0, _080F8424 @ =gSaveBlock1 + 0x2D94
- movs r2, 0
- movs r1, 0x3
- strb r1, [r0]
- strb r2, [r0, 0x1]
- movs r4, 0
- movs r3, 0xFF
- adds r1, r0, 0x4
- movs r2, 0x3
-_080F840C:
- strb r4, [r1]
- ldrb r0, [r1, 0x4]
- orrs r0, r3
- strb r0, [r1, 0x4]
- adds r1, 0x1
- subs r2, 0x1
- cmp r2, 0
- bge _080F840C
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_080F8424: .4byte gSaveBlock1 + 0x2D94
- thumb_func_end sub_80F83F8
-
- thumb_func_start sub_80F8428
-sub_80F8428: @ 80F8428
- ldr r0, _080F8434 @ =gSaveBlock1 + 0x2D94
- movs r2, 0
- movs r1, 0x3
- strb r1, [r0]
- strb r2, [r0, 0x1]
- bx lr
- .align 2, 0
-_080F8434: .4byte gSaveBlock1 + 0x2D94
- thumb_func_end sub_80F8428
-
- thumb_func_start sub_80F8438
-sub_80F8438: @ 80F8438
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x32
- bne _080F8444
- movs r0, 0
-_080F8444:
- bl GetGameStat
- pop {r1}
- bx r1
- thumb_func_end sub_80F8438
-
- thumb_func_start sub_80F844C
-sub_80F844C: @ 80F844C
- push {lr}
- adds r3, r0, 0
- movs r2, 0
- ldr r1, _080F8460 @ =gUnknown_083E53E0
-_080F8454:
- ldrb r0, [r1]
- cmp r0, r3
- bne _080F8464
- adds r0, r1, 0
- b _080F846E
- .align 2, 0
-_080F8460: .4byte gUnknown_083E53E0
-_080F8464:
- adds r1, 0x10
- adds r2, 0x1
- cmp r2, 0x23
- ble _080F8454
- ldr r0, _080F8474 @ =gUnknown_083E5610
-_080F846E:
- pop {r1}
- bx r1
- .align 2, 0
-_080F8474: .4byte gUnknown_083E5610
- thumb_func_end sub_80F844C
-
- thumb_func_start sub_80F8478
-sub_80F8478: @ 80F8478
- push {lr}
- bl sub_80F844C
- ldr r0, [r0, 0x4]
- pop {r1}
- bx r1
- thumb_func_end sub_80F8478
-
- thumb_func_start sub_80F8484
-sub_80F8484: @ 80F8484
- push {lr}
- bl sub_80F844C
- ldr r0, [r0, 0xC]
- pop {r1}
- bx r1
- thumb_func_end sub_80F8484
-
- thumb_func_start sub_80F8490
-sub_80F8490: @ 80F8490
- push {lr}
- bl sub_80F844C
- ldr r0, [r0, 0x8]
- pop {r1}
- bx r1
- thumb_func_end sub_80F8490
-
- thumb_func_start sub_80F849C
-sub_80F849C: @ 80F849C
- push {lr}
- movs r1, 0
- ldr r2, _080F84C4 @ =gSaveBlock1 + 0x2D94
- ldrb r0, [r2, 0x4]
- cmp r0, 0
- beq _080F84BC
- adds r2, 0x4
-_080F84AA:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x3
- bhi _080F84BC
- adds r0, r1, r2
- ldrb r0, [r0]
- cmp r0, 0
- bne _080F84AA
-_080F84BC:
- adds r0, r1, 0
- pop {r1}
- bx r1
- .align 2, 0
-_080F84C4: .4byte gSaveBlock1 + 0x2D94
- thumb_func_end sub_80F849C
-
- thumb_func_start sub_80F84C8
-sub_80F84C8: @ 80F84C8
- lsls r0, 2
- ldr r1, _080F84E8 @ =gSaveBlock1 + 0x2DB8
- adds r0, r1
- ldrb r2, [r0]
- ldrb r1, [r0, 0x1]
- lsls r1, 8
- orrs r2, r1
- ldrb r1, [r0, 0x2]
- lsls r1, 16
- orrs r2, r1
- ldrb r0, [r0, 0x3]
- lsls r0, 24
- orrs r2, r0
- adds r0, r2, 0
- bx lr
- .align 2, 0
-_080F84E8: .4byte gSaveBlock1 + 0x2DB8
- thumb_func_end sub_80F84C8
-
- thumb_func_start sub_80F84EC
-sub_80F84EC: @ 80F84EC
- lsls r0, 2
- ldr r2, _080F8504 @ =gSaveBlock1 + 0x2DB8
- adds r0, r2
- strb r1, [r0]
- lsrs r2, r1, 8
- strb r2, [r0, 0x1]
- lsrs r2, r1, 16
- strb r2, [r0, 0x2]
- lsrs r1, 24
- strb r1, [r0, 0x3]
- bx lr
- .align 2, 0
-_080F8504: .4byte gSaveBlock1 + 0x2DB8
- thumb_func_end sub_80F84EC
-
- thumb_func_start sub_80F8508
-sub_80F8508: @ 80F8508
- push {r4,r5,lr}
- adds r5, r0, 0
- ldr r0, _080F8528 @ =gSaveBlock1 + 0x2D94
- adds r0, 0x4
- adds r0, r5, r0
- ldrb r0, [r0]
- bl sub_80F8438
- adds r4, r0, 0
- adds r0, r5, 0
- bl sub_80F84C8
- cmp r4, r0
- bhi _080F852C
- movs r0, 0
- b _080F852E
- .align 2, 0
-_080F8528: .4byte gSaveBlock1 + 0x2D94
-_080F852C:
- movs r0, 0x1
-_080F852E:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_80F8508
-
- thumb_func_start sub_80F8534
-sub_80F8534: @ 80F8534
- push {r4,r5,lr}
- adds r5, r1, 0
- lsls r4, r0, 3
- subs r4, r0
- ldr r0, _080F855C @ =gSaveBlock1 + 0x2D9C
- adds r4, r0
- adds r0, r5, 0
- movs r1, 0xFF
- movs r2, 0x8
- bl memset
- adds r0, r5, 0
- adds r1, r4, 0
- movs r2, 0x7
- bl memcpy
- pop {r4,r5}
- pop {r0}
- bx r0
- .align 2, 0
-_080F855C: .4byte gSaveBlock1 + 0x2D9C
- thumb_func_end sub_80F8534
-
- thumb_func_start sub_80F8560
-sub_80F8560: @ 80F8560
- push {r4-r6,lr}
- adds r6, r1, 0
- lsls r5, r0, 3
- subs r5, r0
- ldr r0, _080F8594 @ =gSaveBlock1 + 0x2D9C
- adds r5, r0
- adds r0, r6, 0
- bl StringLength
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- adds r0, r5, 0
- movs r1, 0xFF
- movs r2, 0x7
- bl memset
- adds r0, r5, 0
- adds r1, r6, 0
- adds r2, r4, 0
- bl StringCopyN
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080F8594: .4byte gSaveBlock1 + 0x2D9C
- thumb_func_end sub_80F8560
-
- thumb_func_start sub_80F8598
-sub_80F8598: @ 80F8598
- push {r4-r6,lr}
- adds r5, r0, 0
- adds r6, r1, 0
- ldr r0, _080F85EC @ =gSaveBlock1 + 0x2D94
- adds r0, 0x4
- adds r0, r5, r0
- strb r6, [r0]
- ldr r1, _080F85F0 @ =gSaveBlock2
- adds r0, r5, 0
- bl sub_80F8560
- lsls r4, r6, 24
- lsrs r4, 24
- adds r0, r4, 0
- bl sub_80F8438
- adds r1, r0, 0
- adds r0, r5, 0
- bl sub_80F84EC
- ldr r5, _080F85F4 @ =gStringVar1
- adds r0, r4, 0
- bl sub_80F8438
- adds r1, r0, 0
- adds r0, r5, 0
- movs r2, 0
- movs r3, 0xA
- bl ConvertIntToDecimalStringN
- ldr r4, _080F85F8 @ =gStringVar2
- adds r0, r6, 0
- bl sub_80F8490
- adds r1, r0, 0
- adds r0, r4, 0
- bl StringCopy
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080F85EC: .4byte gSaveBlock1 + 0x2D94
-_080F85F0: .4byte gSaveBlock2
-_080F85F4: .4byte gStringVar1
-_080F85F8: .4byte gStringVar2
- thumb_func_end sub_80F8598
-
- thumb_func_start sub_80F85FC
-sub_80F85FC: @ 80F85FC
- push {r4-r7,lr}
- adds r7, r0, 0
- adds r6, r1, 0
- movs r5, 0
- cmp r5, r6
- bge _080F8612
-_080F8608:
- adds r0, r7, r5
- strb r5, [r0]
- adds r5, 0x1
- cmp r5, r6
- blt _080F8608
-_080F8612:
- cmp r6, 0
- ble _080F8648
- adds r5, r6, 0
-_080F8618:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r1, r6, 0
- bl __modsi3
- adds r4, r0, 0
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r1, r6, 0
- bl __modsi3
- adds r4, r7, r4
- ldrb r2, [r4]
- adds r0, r7, r0
- ldrb r1, [r0]
- strb r1, [r4]
- strb r2, [r0]
- subs r5, 0x1
- cmp r5, 0
- bne _080F8618
-_080F8648:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80F85FC
-
- thumb_func_start sub_80F8650
-sub_80F8650: @ 80F8650
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x4
- mov r7, sp
- mov r10, sp
- ldr r0, _080F86D4 @ =gUnknown_083E5620
- ldr r0, [r0]
- lsls r0, 3
- lsrs r0, 3
- adds r0, 0x3
- lsrs r0, 2
- lsls r0, 2
- mov r1, sp
- subs r1, r0
- mov sp, r1
- mov r8, sp
- mov r0, sp
- movs r1, 0x24
- bl sub_80F85FC
- movs r5, 0
- ldr r0, _080F86D8 @ =gUnknown_083E53E0
- mov r9, r0
- ldr r3, _080F86DC @ =gSaveBlock1 + 0x2D94
-_080F8686:
- mov r1, r8
- adds r0, r1, r5
- ldrb r0, [r0]
- lsls r0, 4
- add r0, r9
- ldrb r4, [r0]
- ldrb r6, [r0, 0x1]
- movs r1, 0
- ldrb r0, [r3, 0x4]
- cmp r0, r4
- beq _080F86AC
- ldr r2, _080F86E0 @ =gSaveBlock1 + 0x2D98
-_080F869E:
- adds r1, 0x1
- cmp r1, 0x3
- bgt _080F86AC
- adds r0, r1, r2
- ldrb r0, [r0]
- cmp r0, r4
- bne _080F869E
-_080F86AC:
- cmp r1, 0x4
- bne _080F86E4
- adds r0, r4, 0
- str r3, [r7]
- bl sub_80F8438
- ldr r3, [r7]
- cmp r0, r6
- bcc _080F86E4
- movs r0, 0x1
- strb r0, [r3, 0x1]
- bl sub_80F849C
- lsls r0, 24
- lsrs r0, 24
- adds r1, r4, 0
- bl sub_80F8598
- movs r0, 0x1
- b _080F86EC
- .align 2, 0
-_080F86D4: .4byte gUnknown_083E5620
-_080F86D8: .4byte gUnknown_083E53E0
-_080F86DC: .4byte gSaveBlock1 + 0x2D94
-_080F86E0: .4byte gSaveBlock1 + 0x2D98
-_080F86E4:
- adds r5, 0x1
- cmp r5, 0x23
- ble _080F8686
- movs r0, 0
-_080F86EC:
- mov sp, r10
- add sp, 0x4
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_80F8650
-
- thumb_func_start sub_80F8700
-sub_80F8700: @ 80F8700
- push {r4-r6,lr}
- adds r5, r0, 0
- ldr r0, _080F8748 @ =gSaveBlock1 + 0x2D94
- adds r0, 0x4
- adds r0, r5, r0
- ldrb r6, [r0]
- ldr r4, _080F874C @ =gStringVar1
- adds r0, r5, 0
- bl sub_80F84C8
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0xA
- bl ConvertIntToDecimalStringN
- ldr r4, _080F8750 @ =gStringVar2
- adds r0, r6, 0
- bl sub_80F8490
- adds r1, r0, 0
- adds r0, r4, 0
- bl StringCopy
- ldr r1, _080F8754 @ =gStringVar3
- adds r0, r5, 0
- bl sub_80F8534
- adds r0, r6, 0
- bl sub_80F8484
- bl ShowFieldMessage
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080F8748: .4byte gSaveBlock1 + 0x2D94
-_080F874C: .4byte gStringVar1
-_080F8750: .4byte gStringVar2
-_080F8754: .4byte gStringVar3
- thumb_func_end sub_80F8700
-
- thumb_func_start sub_80F8758
-sub_80F8758: @ 80F8758
- push {r4-r6,lr}
- bl sub_80F849C
- adds r3, r0, 0
- lsls r3, 25
- movs r0, 0x80
- lsls r0, 19
- adds r3, r0
- lsrs r3, 24
- movs r0, 0
- movs r1, 0
- movs r2, 0x19
- bl MenuDrawTextWindow
- movs r4, 0
- ldr r1, _080F87BC @ =gSaveBlock1 + 0x2D94
- ldrb r0, [r1, 0x4]
- cmp r0, 0
- beq _080F87A4
- adds r6, r1, 0x4
- movs r5, 0x80
- lsls r5, 18
-_080F8784:
- bl sub_80F8478
- lsrs r2, r5, 24
- movs r1, 0x1
- bl MenuPrint
- movs r1, 0x80
- lsls r1, 18
- adds r5, r1
- adds r4, 0x1
- cmp r4, 0x3
- bgt _080F87A4
- adds r0, r4, r6
- ldrb r0, [r0]
- cmp r0, 0
- bne _080F8784
-_080F87A4:
- ldr r0, _080F87C0 @ =gPCText_Cancel
- lsls r2, r4, 25
- movs r1, 0x80
- lsls r1, 18
- adds r2, r1
- lsrs r2, 24
- movs r1, 0x1
- bl MenuPrint
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080F87BC: .4byte gSaveBlock1 + 0x2D94
-_080F87C0: .4byte gPCText_Cancel
- thumb_func_end sub_80F8758
-
- thumb_func_start sub_80F87C4
-sub_80F87C4: @ 80F87C4
- push {r4-r6,lr}
- sub sp, 0x8
- lsls r0, 24
- lsrs r6, r0, 24
- lsls r0, r6, 2
- adds r0, r6
- lsls r0, 3
- ldr r1, _080F87E4 @ =gTasks
- adds r4, r0, r1
- movs r0, 0x8
- ldrsh r5, [r4, r0]
- cmp r5, 0
- beq _080F87E8
- cmp r5, 0x1
- beq _080F8810
- b _080F8862
- .align 2, 0
-_080F87E4: .4byte gTasks
-_080F87E8:
- bl sub_80F8758
- bl sub_80F849C
- adds r3, r0, 0
- adds r3, 0x1
- lsls r3, 24
- lsrs r3, 24
- str r5, [sp]
- movs r0, 0x18
- str r0, [sp, 0x4]
- movs r0, 0
- movs r1, 0x1
- movs r2, 0x2
- bl InitMenu
- ldrh r0, [r4, 0x8]
- adds r0, 0x1
- strh r0, [r4, 0x8]
- b _080F8862
-_080F8810:
- bl ProcessMenuInput
- lsls r0, 24
- asrs r4, r0, 24
- movs r0, 0x2
- negs r0, r0
- cmp r4, r0
- beq _080F8862
- adds r0, 0x1
- cmp r4, r0
- beq _080F8832
- bl sub_80F849C
- lsls r0, 24
- lsrs r0, 24
- cmp r4, r0
- bne _080F8840
-_080F8832:
- ldr r1, _080F883C @ =gScriptResult
- movs r0, 0
- strh r0, [r1]
- b _080F8848
- .align 2, 0
-_080F883C: .4byte gScriptResult
-_080F8840:
- ldr r0, _080F886C @ =gScriptResult
- strh r5, [r0]
- ldr r0, _080F8870 @ =gUnknown_03000748
- strb r4, [r0]
-_080F8848:
- bl HandleDestroyMenuCursors
- movs r0, 0
- movs r1, 0
- movs r2, 0x19
- movs r3, 0xC
- bl MenuZeroFillWindowRect
- adds r0, r6, 0
- bl DestroyTask
- bl EnableBothScriptContexts
-_080F8862:
- add sp, 0x8
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_080F886C: .4byte gScriptResult
-_080F8870: .4byte gUnknown_03000748
- thumb_func_end sub_80F87C4
-
- thumb_func_start sub_80F8874
-sub_80F8874: @ 80F8874
- push {lr}
- ldr r0, _080F8884 @ =sub_80F87C4
- movs r1, 0x50
- bl CreateTask
- pop {r0}
- bx r0
- .align 2, 0
-_080F8884: .4byte sub_80F87C4
- thumb_func_end sub_80F8874
-
- thumb_func_start sub_80F8888
-sub_80F8888: @ 80F8888
- push {lr}
- ldr r0, _080F8898 @ =gUnknown_03000748
- ldrb r0, [r0]
- bl sub_80F8700
- pop {r0}
- bx r0
- .align 2, 0
-_080F8898: .4byte gUnknown_03000748
- thumb_func_end sub_80F8888
-
- thumb_func_start sub_80F889C
-sub_80F889C: @ 80F889C
- push {lr}
- bl sub_80F849C
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end sub_80F889C
-
- thumb_func_start sub_80F88AC
-sub_80F88AC: @ 80F88AC
- push {r4,r5,lr}
- ldr r1, _080F88C8 @ =gSaveBlock1 + 0x2D94
- ldr r5, _080F88CC @ =gUnknown_03000748
- ldrb r0, [r5]
- adds r1, 0x4
- adds r1, r0, r1
- ldrb r4, [r1]
- bl sub_80F8508
- cmp r0, 0x1
- beq _080F88D0
- movs r0, 0
- b _080F88DA
- .align 2, 0
-_080F88C8: .4byte gSaveBlock1 + 0x2D94
-_080F88CC: .4byte gUnknown_03000748
-_080F88D0:
- ldrb r0, [r5]
- adds r1, r4, 0
- bl sub_80F8598
- movs r0, 0x1
-_080F88DA:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_80F88AC
-
- thumb_func_start sub_80F88E0
-sub_80F88E0: @ 80F88E0
- push {lr}
- ldr r0, _080F88F0 @ =gSaveBlock1 + 0x2D94
- ldrb r0, [r0, 0x1]
- cmp r0, 0
- beq _080F88F4
- movs r0, 0x1
- b _080F88F6
- .align 2, 0
-_080F88F0: .4byte gSaveBlock1 + 0x2D94
-_080F88F4:
- movs r0, 0
-_080F88F6:
- pop {r1}
- bx r1
- thumb_func_end sub_80F88E0
-
- thumb_func_start sub_80F88FC
-sub_80F88FC: @ 80F88FC
- push {lr}
- bl sub_80F8650
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end sub_80F88FC
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s
index 4d809241c..a6bb9e015 100644
--- a/data-de/event_scripts.s
+++ b/data-de/event_scripts.s
@@ -4771,16 +4771,7 @@ BattleTower_Lobby_EventScript_1AE30F:: @ 81AE30F
.include "data/scripts/gabby_and_ty.inc"
- .include "data/scripts/bard.inc"
- .include "data/scripts/hipster.inc"
- .include "data/text/trader.inc"
- .include "data/scripts/trader.inc"
- .include "data/text/storyteller.inc"
- .include "data/scripts/storyteller.inc"
- .include "data/text/giddy.inc"
- .include "data/scripts/giddy.inc"
- .include "data/text/bard.inc"
- .include "data/text/hipster.inc"
+ .include "data/scripts/mauville_man.inc"
.include "data/field_move_scripts.inc"
.include "data/item_ball_scripts.inc"
diff --git a/data-de/text/bard.inc b/data-de/text/bard.inc
index 089741d00..dbfb7d400 100644
--- a/data-de/text/bard.inc
+++ b/data-de/text/bard.inc
@@ -1,20 +1,20 @@
-UnknownString_81B0A83: @ 81B0A83
+gTextBard_BardTesting: @ 81B0A83
.string "BARDEN Test.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0A91:: @ 81B0A91
+gTextBard_HiImTheBard:: @ 81B0A91
.string "Hallo, ich bin der BARDE.\n"
.string "Möchtest du meinem Lied lauschen?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0AC3:: @ 81B0AC3
+gTextBard_OhYouveLeftMe:: @ 81B0AC3
.string "Oh...\n"
.string "Du überlässt mich meinem Blues?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0AED:: @ 81B0AED
+gTextBard_OhWhatAMovingSong:: @ 81B0AED
.string "Hach, was für ein bewegendes Lied...\n"
.string "Ich wünschte, ich könnte es für\l"
.string "andere spielen...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0B2C:: @ 81B0B2C
+gTextBard_SoHowDoYouLikeMySong:: @ 81B0B2C
.string "So?\n"
.string "Wie fandest du mein Lied?\p"
.string "Ich bin noch nicht ganz zufrieden mit\n"
@@ -22,17 +22,17 @@ MauvilleCity_PokemonCenter_1F_Text_1B0B2C:: @ 81B0B2C
.string "Hast du nicht Lust, den Text für mich\n"
.string "neu zu schreiben?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BA6:: @ 81B0BA6
+gTextBard_OhYouveLeftMe2:: @ 81B0BA6
.string "Oh... Und wieder werde ich meinem\n"
.string "Blues überlassen.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BD0:: @ 81B0BD0
+gTextBard_ThankYouKindly:: @ 81B0BD0
.string "Vielen herzlichen Dank!\n"
.string "Ich möchte für dich singen.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BFA:: @ 81B0BFA
+gTextBard_WasThatHowYouWanted:: @ 81B0BFA
.string "Hast du dir dein Lied so vorgestellt?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0C23:: @ 81B0C23
+gTextBard_OkayThatsIt:: @ 81B0C23
.string "Okay! Das ist es! Dieses Lied werde\n"
.string "ich nun für eine Weile singen.$"
diff --git a/data-de/text/giddy.inc b/data-de/text/giddy.inc
index 6e1a46883..8bc5bebda 100644
--- a/data-de/text/giddy.inc
+++ b/data-de/text/giddy.inc
@@ -1,16 +1,16 @@
-MauvilleCity_PokemonCenter_1F_Text_1B092A:: @ 81B092A
+gTextGiddy_Introduction:: @ 81B092A
.string "Ich bin MÄRCHEN-MAN! Ich habe eine sehr\n"
.string "geistreiche Geschichte für dich!\p"
.string "Soll ich sie dir erzählen?$"
-MauvilleCity_PokemonCenter_1F_Text_1B097C:: @ 81B097C
+gTextGiddy_YouveDeflatedMe:: @ 81B097C
.string "Oh...\n"
.string "Du hast mir die Luft rausgelassen...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0998:: @ 81B0998
+gTextGiddy_AlsoIWasThinking:: @ 81B0998
.string "Und ich war in Gedanken vertieft...$"
-MauvilleCity_PokemonCenter_1F_Text_1B09B0:: @ 81B09B0
+gTextGiddy_ByeBye:: @ 81B09B0
.string "Das wäre alles, glaube ich...\p"
.string "Wir sollten bald wieder ein Schwätzchen\n"
.string "halten! Tschüss!$"
diff --git a/data-de/text/hipster.inc b/data-de/text/hipster.inc
index c315b523d..8801b05fd 100644
--- a/data-de/text/hipster.inc
+++ b/data-de/text/hipster.inc
@@ -1,18 +1,18 @@
-MauvilleCity_PokemonCenter_1F_Text_1B0C5B:: @ 81B0C5B
+gTextHipster_TheyCallMeTheHipster:: @ 81B0C5B
.string "Hey, yo! Man nennt mich TRENDWIG. Ich\n"
.string "zeige dir, was hip ist und abgeht.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0CA7:: @ 81B0CA7
+gTextHipster_TaughtYouAlready:: @ 81B0CA7
.string "Aber, hey, ich habe dir doch schon ge-\n"
.string "zeigt, was hip ist und abgeht.\p"
.string "Ich will das auch anderen mitteilen.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0D11:: @ 81B0D11
+gTextHipster_YouAlreadyKnowALot:: @ 81B0D11
.string "Aber, hey, ich habe dir doch schon ge-\n"
.string "zeigt, was hip ist und abgeht.\p"
.string "Ich habe nichts mehr in petto.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0D75:: @ 81B0D75
+gTextHipster_HaveYouHeardAbout:: @ 81B0D75
.string "Hast du schon von\n"
.string "“{STR_VAR_1}” gehört?\p"
.string "Was das heißt? Ähäm...\n"
diff --git a/data-de/text/storyteller.inc b/data-de/text/storyteller.inc
index ee2068766..abcc8a4a8 100644
--- a/data-de/text/storyteller.inc
+++ b/data-de/text/storyteller.inc
@@ -1,25 +1,25 @@
-MauvilleCity_PokemonCenter_1F_Text_1AECC6:: @ 81AECC6
+gTextStoryteller_Introduction:: @ 81AECC6
.string "Ich bin der GESCHICHTENERZÄHLER.\n"
.string "Ich erzähle dir die Geschichten von\l"
.string "legendären TRAINERN.\p"
.string "Soll ich dir etwas erzählen?$"
-MauvilleCity_PokemonCenter_1F_Text_1AED1D:: @ 81AED1D
+gTextStoryteller_OhIFeelStifled:: @ 81AED1D
.string "Oh...\n"
.string "Keiner mag mich...$"
-MauvilleCity_PokemonCenter_1F_Text_1AED35:: @ 81AED35
+gTextStoryteller_WhichTale:: @ 81AED35
.string "Ich kenne viele dieser Legenden.\n"
.string "Welche möchtest du hören?$"
-MauvilleCity_PokemonCenter_1F_Text_1AED70:: @ 81AED70
+gTextStoryteller_ButIKnowOfNoLegendaryTrainers:: @ 81AED70
.string "Aber ich weiß nichts über legendäre\n"
.string "TRAINER. Also habe ich keine Ge-\l"
.string "schichte auf Lager.\p"
.string "Wo findet man wohl einen TRAINER, der\n"
.string "einer lebenden Legende gleicht?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEDE8:: @ 81AEDE8
+gTextStoryteller_BirthOfANewLegend:: @ 81AEDE8
.string "Was ist?\n"
.string "Du... Du...\p"
.string "{STR_VAR_2}\n"
@@ -27,39 +27,39 @@ MauvilleCity_PokemonCenter_1F_Text_1AEDE8:: @ 81AEDE8
.string "Das ist einfach großartig!\n"
.string "Die Geburt einer neuen Legende!$"
-MauvilleCity_PokemonCenter_1F_Text_1AEE50:: @ 81AEE50
+gTextStoryteller_CouldThereBeOtherTrainers:: @ 81AEE50
.string "Ich überlege, ob es nicht noch andere\n"
.string "TRAINER gibt, die mir beeindruckende\l"
.string "Geschichten erzählen können.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEEB4:: @ 81AEEB4
+gTextStoryteller_HaveYouAnyTales:: @ 81AEEB4
.string "Bist du ein TRAINER?\p"
.string "Dann sag mir, ob du Geschichten\n"
.string "für mich hast, die legendär sind?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEF0A:: @ 81AEF0A
+gTextStoryteller_HearAnotherLegendaryTale:: @ 81AEF0A
.string "Übrigens... Möchtest du eine weitere\n"
.string "legendäre Geschichte hören?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEF49:: @ 81AEF49
+gTextStoryteller_ImNotSatisfied:: @ 81AEF49
.string "Hmm...\n"
.string "Ich bin nicht zufrieden...\p"
.string "Ich wünschte, du würdest mir Neuig-\n"
.string "keiten erzählen, die den Titel Legende\l"
.string "verdienen.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEFA5:: @ 81AEFA5
+gTextStoryteller_WishMorePeopleWould:: @ 81AEFA5
.string "Ich wollte, mehr Leute würden sich für\n"
.string "meine epischen Geschichten über\l"
.string "legendäre TRAINER interessieren.$"
-UnknownString_81AEFFC:: @ 81AEFFC
+gTextStoryteller_Story1Title:: @ 81AEFFC
.string "Der speicherfreudige TRAINER$"
-UnknownString_81AF013:: @ 81AF013
+gTextStoryteller_Story1Action:: @ 81AF013
.string "Hast das Spiel gespeichert?$"
-UnknownString_81AF022:: @ 81AF022
+gTextStoryteller_Story1Text:: @ 81AF022
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat das Spiel\n"
@@ -67,13 +67,13 @@ UnknownString_81AF022:: @ 81AF022
.string "Einen vorsichtigeren TRAINER als\n"
.string "{STR_VAR_3} wird man nicht finden!$"
-UnknownString_81AF0A3:: @ 81AF0A3
+gTextStoryteller_Story2Title:: @ 81AF0A3
.string "Der TRAINER als Trendsetter$"
-UnknownString_81AF0BB:: @ 81AF0BB
+gTextStoryteller_Story2Action:: @ 81AF0BB
.string "Hast Trends gesetzt?$"
-UnknownString_81AF0CA:: @ 81AF0CA
+gTextStoryteller_Story2Text:: @ 81AF0CA
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -81,13 +81,13 @@ UnknownString_81AF0CA:: @ 81AF0CA
.string "{STR_VAR_3} setzt den Trend für alle - in\n"
.string "der ganzen HOENN-Region!$"
-UnknownString_81AF149:: @ 81AF149
+gTextStoryteller_Story3Title:: @ 81AF149
.string "Der BEEREN pflanzende TRAINER$"
-UnknownString_81AF164:: @ 81AF164
+gTextStoryteller_Story3Action:: @ 81AF164
.string "Hast BEEREN gepflanzt?$"
-UnknownString_81AF174:: @ 81AF174
+gTextStoryteller_Story3Text:: @ 81AF174
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -95,13 +95,13 @@ UnknownString_81AF174:: @ 81AF174
.string "{STR_VAR_3} ist ein legendärer Lieb-\n"
.string "haber von BEEREN!$"
-UnknownString_81AF1E5:: @ 81AF1E5
+gTextStoryteller_Story4Title:: @ 81AF1E5
.string "Der RAD verrückte TRAINER$"
-UnknownString_81AF1FD:: @ 81AF1FD
+gTextStoryteller_Story4Action:: @ 81AF1FD
.string "Hast RÄDER getauscht?$"
-UnknownString_81AF20A:: @ 81AF20A
+gTextStoryteller_Story4Text:: @ 81AF20A
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -109,13 +109,13 @@ UnknownString_81AF20A:: @ 81AF20A
.string "{STR_VAR_3} ist ein TRAINER, dessen\n"
.string "Passion das RADfahren ist!$"
-UnknownString_81AF281:: @ 81AF281
+gTextStoryteller_Story5Title:: @ 81AF281
.string "Der Interviews gebende TRAINER$"
-UnknownString_81AF299:: @ 81AF299
+gTextStoryteller_Story5Action:: @ 81AF299
.string "Hast Interviews gegeben?$"
-UnknownString_81AF2A9:: @ 81AF2A9
+gTextStoryteller_Story5Text:: @ 81AF2A9
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER wurde {STR_VAR_1}-mal\n"
@@ -123,13 +123,13 @@ UnknownString_81AF2A9:: @ 81AF2A9
.string "{STR_VAR_3} ist ein TRAINER, der überall\n"
.string "Aufmerksamkeit erregt!$"
-UnknownString_81AF32C:: @ 81AF32C
+gTextStoryteller_Story6Title:: @ 81AF32C
.string "Der kampfliebende TRAINER$"
-UnknownString_81AF345:: @ 81AF345
+gTextStoryteller_Story6Action:: @ 81AF345
.string "Hast oft gekämpft?$"
-UnknownString_81AF34D:: @ 81AF34D
+gTextStoryteller_Story6Text:: @ 81AF34D
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -137,13 +137,13 @@ UnknownString_81AF34D:: @ 81AF34D
.string "{STR_VAR_3} ist ein TRAINER, der zu\n"
.string "einem Kampf nicht nein sagt!$"
-UnknownString_81AF3D0:: @ 81AF3D0
+gTextStoryteller_Story7Title:: @ 81AF3D0
.string "Der POKéMON fangende TRAINER$"
-UnknownString_81AF3ED:: @ 81AF3ED
+gTextStoryteller_Story7Action:: @ 81AF3ED
.string "Hast POKéMON gefangen?$"
-UnknownString_81AF3FC:: @ 81AF3FC
+gTextStoryteller_Story7Text:: @ 81AF3FC
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}\n"
@@ -151,13 +151,13 @@ UnknownString_81AF3FC:: @ 81AF3FC
.string "{STR_VAR_3} ist ein legendärer Fänger\n"
.string "von POKéMON!$"
-UnknownString_81AF46D:: @ 81AF46D
+gTextStoryteller_Story8Title:: @ 81AF46D
.string "Der angelnde TRAINER$"
-UnknownString_81AF481:: @ 81AF481
+gTextStoryteller_Story8Action:: @ 81AF481
.string "Hast POKéMON mit einer ANGEL gefangen?$"
-UnknownString_81AF49B:: @ 81AF49B
+gTextStoryteller_Story8Text:: @ 81AF49B
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}\n"
@@ -165,13 +165,13 @@ UnknownString_81AF49B:: @ 81AF49B
.string "{STR_VAR_3} ist ein legendärer Angel-\n"
.string "experte!$"
-UnknownString_81AF511:: @ 81AF511
+gTextStoryteller_Story9Title:: @ 81AF511
.string "Der EIER wärmende TRAINER$"
-UnknownString_81AF529:: @ 81AF529
+gTextStoryteller_Story9Action:: @ 81AF529
.string "Hast EIER ausgebrütet?$"
-UnknownString_81AF536:: @ 81AF536
+gTextStoryteller_Story9Text:: @ 81AF536
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Es passierte {STR_VAR_1}-mal, dass der TRAINER\n"
@@ -179,13 +179,13 @@ UnknownString_81AF536:: @ 81AF536
.string "{STR_VAR_3} ist ein legendärer Pfleger\n"
.string "von EIERN!$"
-UnknownString_81AF5A9:: @ 81AF5A9
+gTextStoryteller_Story10Title:: @ 81AF5A9
.string "Der TRAINER der Entwicklungen$"
-UnknownString_81AF5BD:: @ 81AF5BD
+gTextStoryteller_Story10Action:: @ 81AF5BD
.string "Hast POKéMON sich entwickeln lassen?$"
-UnknownString_81AF5CD:: @ 81AF5CD
+gTextStoryteller_Story10Text:: @ 81AF5CD
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}\n"
@@ -193,13 +193,13 @@ UnknownString_81AF5CD:: @ 81AF5CD
.string "{STR_VAR_3} ist der ultimative Ent-\n"
.string "wickler von POKéMON!$"
-UnknownString_81AF63F:: @ 81AF63F
+gTextStoryteller_Story11Title:: @ 81AF63F
.string "Der PKMN-CENTER liebende TRAINER$"
-UnknownString_81AF661:: @ 81AF661
+gTextStoryteller_Story11Action:: @ 81AF661
.string "Gingst in ein POKéMON-CENTER?$"
-UnknownString_81AF676:: @ 81AF676
+gTextStoryteller_Story11Text:: @ 81AF676
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat POKéMON\n"
@@ -208,13 +208,13 @@ UnknownString_81AF676:: @ 81AF676
.string "Es gibt keinen größeren Fan der\n"
.string "POKéMON-CENTER als {STR_VAR_3}!$"
-UnknownString_81AF711:: @ 81AF711
+gTextStoryteller_Story12Title:: @ 81AF711
.string "Der gastfreundliche TRAINER$"
-UnknownString_81AF726:: @ 81AF726
+gTextStoryteller_Story12Action:: @ 81AF726
.string "POKéMON haben sich bei dir erholt?$"
-UnknownString_81AF73D:: @ 81AF73D
+gTextStoryteller_Story12Text:: @ 81AF73D
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat POKéMON\n"
@@ -223,13 +223,13 @@ UnknownString_81AF73D:: @ 81AF73D
.string "Kein TRAINER ist so gastfreundlich\n"
.string "wie {STR_VAR_3}!$"
-UnknownString_81AF7BF:: @ 81AF7BF
+gTextStoryteller_Story13Title:: @ 81AF7BF
.string "Der SAFARI liebende TRAINER$"
-UnknownString_81AF7D9:: @ 81AF7D9
+gTextStoryteller_Story13Action:: @ 81AF7D9
.string "Bist in die SAFARI-ZONE gegangen?$"
-UnknownString_81AF7F1:: @ 81AF7F1
+gTextStoryteller_Story13Text:: @ 81AF7F1
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER ist {STR_VAR_1}-mal in die\n"
@@ -238,13 +238,13 @@ UnknownString_81AF7F1:: @ 81AF7F1
.string "wilde Seite in der SAFARI-ZONE zum\l"
.string "Vorschein kommt!$"
-UnknownString_81AF88A:: @ 81AF88A
+gTextStoryteller_Story14Title:: @ 81AF88A
.string "Der TRAINER als ZERSCHNEIDER$"
-UnknownString_81AF8A1:: @ 81AF8A1
+gTextStoryteller_Story14Action:: @ 81AF8A1
.string "Hast ZERSCHNEIDER eingesetzt?$"
-UnknownString_81AF8AA:: @ 81AF8AA
+gTextStoryteller_Story14Text:: @ 81AF8AA
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -252,13 +252,13 @@ UnknownString_81AF8AA:: @ 81AF8AA
.string "{STR_VAR_3} ist ein TRAINER, der es\n"
.string "liebt, etwas zu ZERSCHNEIDEN.$"
-UnknownString_81AF91B:: @ 81AF91B
+gTextStoryteller_Story15Title:: @ 81AF91B
.string "Der TRAINER als ZERTRÜMMERER$"
-UnknownString_81AF935:: @ 81AF935
+gTextStoryteller_Story15Action:: @ 81AF935
.string "Hast Felsen ZERTRÜMMERT?$"
-UnknownString_81AF943:: @ 81AF943
+gTextStoryteller_Story15Text:: @ 81AF943
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -266,13 +266,13 @@ UnknownString_81AF943:: @ 81AF943
.string "{STR_VAR_3} ist ein TRAINER, der keinen\n"
.string "Felsen unbeschädigt lassen kann.$"
-UnknownString_81AF9C8:: @ 81AF9C8
+gTextStoryteller_Story16Title:: @ 81AF9C8
.string "Der Umzüge liebende TRAINER$"
-UnknownString_81AF9E0:: @ 81AF9E0
+gTextStoryteller_Story16Action:: @ 81AF9E0
.string "Bist du mit der GEHEIMBASIS umgezogen?$"
-UnknownString_81AF9F6:: @ 81AF9F6
+gTextStoryteller_Story16Text:: @ 81AF9F6
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER ist {STR_VAR_1}-mal mit\n"
@@ -280,13 +280,13 @@ UnknownString_81AF9F6:: @ 81AF9F6
.string "{STR_VAR_3} ist ein TRAINER, der es\n"
.string "liebt, sich ein neues Haus einzurichten.$"
-UnknownString_81AFA79:: @ 81AFA79
+gTextStoryteller_Story17Title:: @ 81AFA79
.string "Der PLATSCHER des TRAINERS$"
-UnknownString_81AFA92:: @ 81AFA92
+gTextStoryteller_Story17Action:: @ 81AFA92
.string "Hast PLATSCHER eingesetzt?$"
-UnknownString_81AFA9E:: @ 81AFA9E
+gTextStoryteller_Story17Text:: @ 81AFA9E
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -294,13 +294,13 @@ UnknownString_81AFA9E:: @ 81AFA9E
.string "{STR_VAR_3} ist ein TRAINER, der es\n"
.string "liebt, zu PLATSCHEN.$"
-UnknownString_81AFB17:: @ 81AFB17
+gTextStoryteller_Story18Title:: @ 81AFB17
.string "Der verbissene TRAINER$"
-UnknownString_81AFB2D:: @ 81AFB2D
+gTextStoryteller_Story18Action:: @ 81AFB2D
.string "Hast VERZWEIFLER angewendet?$"
-UnknownString_81AFB48:: @ 81AFB48
+gTextStoryteller_Story18Text:: @ 81AFB48
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat sich {STR_VAR_1}-mal\n"
@@ -308,13 +308,13 @@ UnknownString_81AFB48:: @ 81AFB48
.string "{STR_VAR_3}... Ein verbissener TRAINER,\n"
.string "der auch in der Not nicht aufgibt.$"
-UnknownString_81AFBD8:: @ 81AFBD8
+gTextStoryteller_Story19Title:: @ 81AFBD8
.string "Der König der EINARMIGEN BANDITEN$"
-UnknownString_81AFBE7:: @ 81AFBE7
+gTextStoryteller_Story19Action:: @ 81AFBE7
.string "Hast den EINARMIGEN BANDITEN besiegt?$"
-UnknownString_81AFC04:: @ 81AFC04
+gTextStoryteller_Story19Text:: @ 81AFC04
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -322,13 +322,13 @@ UnknownString_81AFC04:: @ 81AFC04
.string "{STR_VAR_3}... Ein TRAINER, der am\n"
.string "EINARMIGEN BANDITEN Glück hat.$"
-UnknownString_81AFC8A:: @ 81AFC8A
+gTextStoryteller_Story20Title:: @ 81AFC8A
.string "Der König des ROULETTES$"
-UnknownString_81AFC9D:: @ 81AFC9D
+gTextStoryteller_Story20Action:: @ 81AFC9D
.string "Hast in Folge beim ROULETTE gewonnen,$"
-UnknownString_81AFCBE:: @ 81AFCBE
+gTextStoryteller_Story20Text:: @ 81AFCBE
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal in Folge\n"
@@ -336,13 +336,13 @@ UnknownString_81AFCBE:: @ 81AFCBE
.string "{STR_VAR_3}... Ein TRAINER, dem die Kugel\n"
.string "beim ROULETTE gehorcht.$"
-UnknownString_81AFD44:: @ 81AFD44
+gTextStoryteller_Story21Title:: @ 81AFD44
.string "Der Herausforderer im DUELLTURM$"
-UnknownString_81AFD60:: @ 81AFD60
+gTextStoryteller_Story21Action:: @ 81AFD60
.string "Hast Gegner im DUELLTURM gefordert?$"
-UnknownString_81AFD80:: @ 81AFD80
+gTextStoryteller_Story21Text:: @ 81AFD80
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal Gegner\n"
@@ -350,13 +350,13 @@ UnknownString_81AFD80:: @ 81AFD80
.string "{STR_VAR_3}... Ein TRAINER, der im DUELL-\n"
.string "TURM nach Perfektion strebt.$"
-UnknownString_81AFE1D:: @ 81AFE1D
+gTextStoryteller_Story22Title:: @ 81AFE1D
.string "Der mixende TRAINER$"
-UnknownString_81AFE36:: @ 81AFE36
+gTextStoryteller_Story22Action:: @ 81AFE36
.string "Hast {POKEBLOCK} hergestellt?$"
-UnknownString_81AFE42:: @ 81AFE42
+gTextStoryteller_Story22Text:: @ 81AFE42
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -364,13 +364,13 @@ UnknownString_81AFE42:: @ 81AFE42
.string "Niemand bedient den BEERENMIXER\n"
.string "besser als {STR_VAR_3}.$"
-UnknownString_81AFEC2:: @ 81AFEC2
+gTextStoryteller_Story23Title:: @ 81AFEC2
.string "Der Fan der WETTBEWERBE$"
-UnknownString_81AFEDD:: @ 81AFEDD
+gTextStoryteller_Story23Action:: @ 81AFEDD
.string "Hast an WETTBEWERBEN teilgenommen?$"
-UnknownString_81AFEEE:: @ 81AFEEE
+gTextStoryteller_Story23Text:: @ 81AFEEE
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -378,13 +378,13 @@ UnknownString_81AFEEE:: @ 81AFEEE
.string "{STR_VAR_3} liebt es, anderen seine\n"
.string "POKéMON zu zeigen.$"
-UnknownString_81AFF68:: @ 81AFF68
+gTextStoryteller_Story24Title:: @ 81AFF68
.string "Der Meister der WETTBEWERBE$"
-UnknownString_81AFF7B:: @ 81AFF7B
+gTextStoryteller_Story24Action:: @ 81AFF7B
.string "Hast WETTBEWERBE gewonnen?$"
-UnknownString_81AFF88:: @ 81AFF88
+gTextStoryteller_Story24Text:: @ 81AFF88
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -392,26 +392,26 @@ UnknownString_81AFF88:: @ 81AFF88
.string "{STR_VAR_3} ist ein unvergleichlicher\n"
.string "Meister der WETTBEWERBE.$"
-UnknownString_81AFFFB:: @ 81AFFFB
+gTextStoryteller_Story25Title:: @ 81AFFFB
.string "Der glückliche Einkäufer$"
-UnknownString_81B000D:: @ 81B000D
+gTextStoryteller_Story25Action:: @ 81B000D
.string "Bist einkaufen gegangen?$"
-UnknownString_81B0015:: @ 81B0015
+gTextStoryteller_Story25Text:: @ 81B0015
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
.string "in einem Geschäft Items gekauft!\p"
.string "{STR_VAR_3} ein geborener Einkäufer.$"
-UnknownString_81B009D:: @ 81B009D
+gTextStoryteller_Story26Title:: @ 81B009D
.string "Der TRAINER, der Items findet$"
-UnknownString_81B00B6:: @ 81B00B6
+gTextStoryteller_Story26Action:: @ 81B00B6
.string "Hast den DETEKTOR eingesetzt?$"
-UnknownString_81B00C9:: @ 81B00C9
+gTextStoryteller_Story26Text:: @ 81B00C9
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -419,13 +419,13 @@ UnknownString_81B00C9:: @ 81B00C9
.string "{STR_VAR_3} liebt es, den Boden nach\n"
.string "verborgenen Items abzusuchen.$"
-UnknownString_81B014D:: @ 81B014D
+gTextStoryteller_Story27Title:: @ 81B014D
.string "Der regennasse TRAINER$"
-UnknownString_81B0165:: @ 81B0165
+gTextStoryteller_Story27Action:: @ 81B0165
.string "Wurdest nass geregnet?$"
-UnknownString_81B0173:: @ 81B0173
+gTextStoryteller_Story27Text:: @ 81B0173
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER wurde {STR_VAR_1}-mal\n"
@@ -433,13 +433,13 @@ UnknownString_81B0173:: @ 81B0173
.string "Das Charisma von {STR_VAR_3} zieht\n"
.string "sogar den Regen an.$"
-UnknownString_81B01E9:: @ 81B01E9
+gTextStoryteller_Story28Title:: @ 81B01E9
.string "Der passionierte POKéDEX-Leser$"
-UnknownString_81B0201:: @ 81B0201
+gTextStoryteller_Story28Action:: @ 81B0201
.string "Hast im POKéDEX nachgeschlagen?$"
-UnknownString_81B0213:: @ 81B0213
+gTextStoryteller_Story28Text:: @ 81B0213
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -447,13 +447,13 @@ UnknownString_81B0213:: @ 81B0213
.string "{STR_VAR_3} liebt es, alles über\n"
.string "POKéMON im POKéDEX nachzulesen.$"
-UnknownString_81B0290:: @ 81B0290
+gTextStoryteller_Story29Title:: @ 81B0290
.string "Der Sammler der BÄNDER$"
-UnknownString_81B02A5:: @ 81B02A5
+gTextStoryteller_Story29Action:: @ 81B02A5
.string "Hast BÄNDER erhalten?$"
-UnknownString_81B02B6:: @ 81B02B6
+gTextStoryteller_Story29Text:: @ 81B02B6
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}\n"
@@ -461,13 +461,13 @@ UnknownString_81B02B6:: @ 81B02B6
.string "{STR_VAR_3} ist ein TRAINER, der es\n"
.string "liebt, BÄNDER zu sammeln.$"
-UnknownString_81B0337:: @ 81B0337
+gTextStoryteller_Story30Title:: @ 81B0337
.string "Der springende TRAINER$"
-UnknownString_81B0351:: @ 81B0351
+gTextStoryteller_Story30Action:: @ 81B0351
.string "Bist Absätze heruntergesprungen?$"
-UnknownString_81B0364:: @ 81B0364
+gTextStoryteller_Story30Text:: @ 81B0364
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER ist {STR_VAR_1}-mal\n"
@@ -476,26 +476,26 @@ UnknownString_81B0364:: @ 81B0364
.string "TRAINER {STR_VAR_3} einfach hinab-\l"
.string "springen.$"
-UnknownString_81B03E9:: @ 81B03E9
+gTextStoryteller_Story31Title:: @ 81B03E9
.string "Der legendäre Fernsehzuschauer$"
-UnknownString_81B0401:: @ 81B0401
+gTextStoryteller_Story31Action:: @ 81B0401
.string "Hast ferngeschaut?$"
-UnknownString_81B040C:: @ 81B040C
+gTextStoryteller_Story31Text:: @ 81B040C
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
.string "Fernsehen geschaut!\p"
.string "{STR_VAR_3} liebt es, fernzusehen.$"
-UnknownString_81B046E:: @ 81B046E
+gTextStoryteller_Story32Title:: @ 81B046E
.string "Der zeitbewusste TRAINER$"
-UnknownString_81B0489:: @ 81B0489
+gTextStoryteller_Story32Action:: @ 81B0489
.string "Hast nach der Uhrzeit gesehen?$"
-UnknownString_81B049A:: @ 81B049A
+gTextStoryteller_Story32Text:: @ 81B049A
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -503,13 +503,13 @@ UnknownString_81B049A:: @ 81B049A
.string "{STR_VAR_3} ist ein pünktlicher\n"
.string "TRAINER, der sich der Zeit bewusst ist.$"
-UnknownString_81B0523:: @ 81B0523
+gTextStoryteller_Story33Title:: @ 81B0523
.string "Der Zauberer der POKéMON-LOTTERIE$"
-UnknownString_81B053E:: @ 81B053E
+gTextStoryteller_Story33Action:: @ 81B053E
.string "Hast in der LOTTERIE gewonnen?$"
-UnknownString_81B0554:: @ 81B0554
+gTextStoryteller_Story33Text:: @ 81B0554
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -517,13 +517,13 @@ UnknownString_81B0554:: @ 81B0554
.string "TRAINER {STR_VAR_3} hat viele Freunde,\n"
.string "die mit ihm POKéMON tauschen.$"
-UnknownString_81B05D8:: @ 81B05D8
+gTextStoryteller_Story34Title:: @ 81B05D8
.string "Der TRAINER und die PENSION$"
-UnknownString_81B05F3:: @ 81B05F3
+gTextStoryteller_Story34Action:: @ 81B05F3
.string "Hast POKéMON in die PENSION gebracht?$"
-UnknownString_81B0610:: @ 81B0610
+gTextStoryteller_Story34Text:: @ 81B0610
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
@@ -532,13 +532,13 @@ UnknownString_81B0610:: @ 81B0610
.string "alles für die Entwicklung seiner\l"
.string "POKéMON tut.$"
-UnknownString_81B06A9:: @ 81B06A9
+gTextStoryteller_Story35Title:: @ 81B06A9
.string "Der SEILBAHN verrückte TRAINER$"
-UnknownString_81B06C6:: @ 81B06C6
+gTextStoryteller_Story35Action:: @ 81B06C6
.string "Bist mit der SEILBAHN gefahren?$"
-UnknownString_81B06D9:: @ 81B06D9
+gTextStoryteller_Story35Text:: @ 81B06D9
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER ist {STR_VAR_1}-mal\n"
@@ -547,13 +547,13 @@ UnknownString_81B06D9:: @ 81B06D9
.string "TRAINER, der ständig rauf und runter\l"
.string "fährt.$"
-UnknownString_81B0763:: @ 81B0763
+gTextStoryteller_Story36Title:: @ 81B0763
.string "Der Liebhaber der Heißen Quellen$"
-UnknownString_81B0781:: @ 81B0781
+gTextStoryteller_Story36Action:: @ 81B0781
.string "Hast in den Heißen Quellen gebadet?$"
-UnknownString_81B0797:: @ 81B0797
+gTextStoryteller_Story36Text:: @ 81B0797
.string "Dies ist die Geschichte eines TRAINERS\n"
.string "namens {STR_VAR_3}.\p"
.string "Dieser TRAINER hat {STR_VAR_1}-mal\n"
diff --git a/data-de/text/trader.inc b/data-de/text/trader.inc
index adf5d3aeb..dae453e8b 100644
--- a/data-de/text/trader.inc
+++ b/data-de/text/trader.inc
@@ -1,58 +1,58 @@
-MauvilleCity_PokemonCenter_1F_Text_1AE88F:: @ 81AE88F
+gTextTrader_Introduction:: @ 81AE88F
.string "Hallo! Ich bin der HÄNDLER. Möchtest\n"
.string "du Dekorationen mit mir tauschen?$"
-MauvilleCity_PokemonCenter_1F_Text_1AE8C6:: @ 81AE8C6
+gTextTrader_FeelUnwanted1:: @ 81AE8C6
.string "Oh...\n"
.string "Ich fühle mich überflüssig...$"
-MauvilleCity_PokemonCenter_1F_Text_1AE8DF:: @ 81AE8DF
+gTextTrader_TradedAlready:: @ 81AE8DF
.string "Aber wir beide haben doch bereits\n"
.string "Dekorationen ausgetauscht.$"
-MauvilleCity_PokemonCenter_1F_Text_1AE910:: @ 81AE910
+gTextTrader_MenuPrompt:: @ 81AE910
.string "Wenn du etwas Dekoratives siehst, das\n"
.string "du haben möchtest, lass es mich wissen.$"
-MauvilleCity_PokemonCenter_1F_Text_1AE950:: @ 81AE950
+gTextTrader_DontWantAnything:: @ 81AE950
.string "Du möchtest nichts haben?\n"
.string "Ich fühle mich so überflüssig...$"
-MauvilleCity_PokemonCenter_1F_Text_1AE97C:: @ 81AE97C
+gTextTrader_ItemOnceBelongedTo:: @ 81AE97C
.string "Das dekorative Item gehörte einst\n"
.string "{STR_VAR_1}.\p"
.string "Möchtest du es haben?$"
-MauvilleCity_PokemonCenter_1F_Text_1AE9B6:: @ 81AE9B6
+gTextTrader_YouDontHaveDecorations:: @ 81AE9B6
.string "Äh... Warte eine Sekunde. Du hast über-\n"
.string "haupt kein dekoratives Item!$"
-MauvilleCity_PokemonCenter_1F_Text_1AE9F8:: @ 81AE9F8
+gTextTrader_PickDecorationYoullTrade:: @ 81AE9F8
.string "Okay, wähle die Dekoration aus, die du\n"
.string "mit mir tauschen willst.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA2B:: @ 81AEA2B
+gTextTrader_FeelUnwanted2:: @ 81AEA2B
.string "Du willst nicht mit mir tauschen?\n"
.string "Ich fühle mich überflüssig...$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA57:: @ 81AEA57
+gTextTrader_NoRoomForThis:: @ 81AEA57
.string "Du hast keinen Platz mehr für eine/n\n"
.string "{STR_VAR_2}.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA9B:: @ 81AEA9B
+gTextTrader_SoWellTrade:: @ 81AEA9B
.string "Okay, dann lass uns tauschen:\n"
.string "{STR_VAR_3} gegen\l"
.string "{STR_VAR_2}!$"
-MauvilleCity_PokemonCenter_1F_Text_1AEAC3:: @ 81AEAC3
+gTextTrader_InUseYouCantTradeIt:: @ 81AEAC3
.string "Dieses Dekorationsstück ist im Ge-\n"
.string "brauch. Das kannst du nicht tauschen.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEAFB:: @ 81AEAFB
+gTextTrader_ThenWellTrade:: @ 81AEAFB
.string "Dann lass uns tauschen! Ich werde meine\n"
.string "Dekorationen auf deinen PC senden.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEB31:: @ 81AEB31
+gTextTrader_ICantTradeThatOneAway:: @ 81AEB31
.string "Huups! Tut mir Leid!\n"
.string "Das ist ein ganz seltenes Stück!\l"
.string "Das kann ich nicht tauschen!\p"
diff --git a/data/event_scripts.s b/data/event_scripts.s
index d6702745a..33bb39308 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -4744,16 +4744,7 @@ BattleTower_Lobby_EventScript_1AE30F:: @ 81AE30F
.include "data/scripts/gabby_and_ty.inc"
- .include "data/scripts/bard.inc"
- .include "data/scripts/hipster.inc"
- .include "data/text/trader.inc"
- .include "data/scripts/trader.inc"
- .include "data/text/storyteller.inc"
- .include "data/scripts/storyteller.inc"
- .include "data/text/giddy.inc"
- .include "data/scripts/giddy.inc"
- .include "data/text/bard.inc"
- .include "data/text/hipster.inc"
+ .include "data/scripts/mauville_man.inc"
.include "data/field_move_scripts.inc"
.include "data/item_ball_scripts.inc"
diff --git a/data/mauville_old_man.s b/data/mauville_old_man.s
deleted file mode 100644
index 5c4bd47b9..000000000
--- a/data/mauville_old_man.s
+++ /dev/null
@@ -1,101 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 1
-gUnknown_083E537C:: @ 83E537C
-.ifdef ENGLISH
- ec_word SISTER
- ec_word EATS
- ec_word SWEETS
- ec_word VORACIOUS
- ec_word AND
- ec_word DROOLING
-.else
- ec_word SISTER
- ec_word MUST_BE
- ec_word SWEETS
- ec_word VORACIOUS
- ec_word DROOLING
- ec_word THICK
-.endif
-
-
- .align 2
-gUnknown_083E5388:: @ 83E5388
- .4byte OtherText_SoPretty
- .4byte OtherText_SoDarling
- .4byte OtherText_SoRelaxed
- .4byte OtherText_SoSunny
- .4byte OtherText_SoDesirable
- .4byte OtherText_SoExciting
- .4byte OtherText_SoAmusing
- .4byte OtherText_SoMagical
-
- .align 2
-gUnknown_083E53A8:: @ 83E53A8
- .4byte OtherText_WantVacationNicePlace
- .4byte OtherText_BoughtCrayonsIsNice
- .4byte OtherText_IfWeCouldFloat
- .4byte OtherText_SandWashesAwayMakeSad
- .4byte OtherText_WhatsBottomSeaLike
- .4byte OtherText_SeeSettingSun
- .4byte OtherText_LyingInGreenGrass
- .4byte OtherText_SecretBasesWonderful
-
- .align 1
-gUnknown_083E53C8:: @ 83E53C8
- .2byte 0x0, 0
- .2byte 0xC, 0
- .2byte 0xD, 0
- .2byte 0x12, 0
- .2byte 0x13, 0
- .2byte 0x15, 0
-
- .align 2
-gUnknown_083E53E0:: @ 83E53E0
- .4byte 0x132, UnknownString_81AEFFC, UnknownString_81AF013, UnknownString_81AF022
- .4byte 0x102, UnknownString_81AF0A3, UnknownString_81AF0BB, UnknownString_81AF0CA
- .4byte 0x103, UnknownString_81AF149, UnknownString_81AF164, UnknownString_81AF174
- .4byte 0x104, UnknownString_81AF1E5, UnknownString_81AF1FD, UnknownString_81AF20A
- .4byte 0x106, UnknownString_81AF281, UnknownString_81AF299, UnknownString_81AF2A9
- .4byte 0x109, UnknownString_81AF32C, UnknownString_81AF345, UnknownString_81AF34D
- .4byte 0x10b, UnknownString_81AF3D0, UnknownString_81AF3ED, UnknownString_81AF3FC
- .4byte 0x10c, UnknownString_81AF46D, UnknownString_81AF481, UnknownString_81AF49B
- .4byte 0x10d, UnknownString_81AF511, UnknownString_81AF529, UnknownString_81AF536
- .4byte 0x10e, UnknownString_81AF5A9, UnknownString_81AF5BD, UnknownString_81AF5CD
- .4byte 0x10f, UnknownString_81AF63F, UnknownString_81AF661, UnknownString_81AF676
- .4byte 0x110, UnknownString_81AF711, UnknownString_81AF726, UnknownString_81AF73D
- .4byte 0x111, UnknownString_81AF7BF, UnknownString_81AF7D9, UnknownString_81AF7F1
- .4byte 0x112, UnknownString_81AF88A, UnknownString_81AF8A1, UnknownString_81AF8AA
- .4byte 0x113, UnknownString_81AF91B, UnknownString_81AF935, UnknownString_81AF943
- .4byte 0x114, UnknownString_81AF9C8, UnknownString_81AF9E0, UnknownString_81AF9F6
- .4byte 0x11a, UnknownString_81AFA79, UnknownString_81AFA92, UnknownString_81AFA9E
- .4byte 0x11b, UnknownString_81AFB17, UnknownString_81AFB2D, UnknownString_81AFB48
- .4byte 0x11c, UnknownString_81AFBD8, UnknownString_81AFBE7, UnknownString_81AFC04
- .4byte 0x21d, UnknownString_81AFC8A, UnknownString_81AFC9D, UnknownString_81AFCBE
- .4byte 0x11e, UnknownString_81AFD44, UnknownString_81AFD60, UnknownString_81AFD80
- .4byte 0x121, UnknownString_81AFE1D, UnknownString_81AFE36, UnknownString_81AFE42
- .4byte 0x124, UnknownString_81AFEC2, UnknownString_81AFEDD, UnknownString_81AFEEE
- .4byte 0x125, UnknownString_81AFF68, UnknownString_81AFF7B, UnknownString_81AFF88
- .4byte 0x126, UnknownString_81AFFFB, UnknownString_81B000D, UnknownString_81B0015
- .4byte 0x127, UnknownString_81B009D, UnknownString_81B00B6, UnknownString_81B00C9
- .4byte 0x128, UnknownString_81B014D, UnknownString_81B0165, UnknownString_81B0173
- .4byte 0x129, UnknownString_81B01E9, UnknownString_81B0201, UnknownString_81B0213
- .4byte 0x12a, UnknownString_81B0290, UnknownString_81B02A5, UnknownString_81B02B6
- .4byte 0x12b, UnknownString_81B0337, UnknownString_81B0351, UnknownString_81B0364
- .4byte 0x12c, UnknownString_81B03E9, UnknownString_81B0401, UnknownString_81B040C
- .4byte 0x12d, UnknownString_81B046E, UnknownString_81B0489, UnknownString_81B049A
- .4byte 0x12e, UnknownString_81B0523, UnknownString_81B053E, UnknownString_81B0554
- .4byte 0x12f, UnknownString_81B05D8, UnknownString_81B05F3, UnknownString_81B0610
- .4byte 0x130, UnknownString_81B06A9, UnknownString_81B06C6, UnknownString_81B06D9
-
-gUnknown_083E5610:: @ 83E5610
- .4byte 0x131, UnknownString_81B0763, UnknownString_81B0781, UnknownString_81B0797
-
- .align 2
-gUnknown_083E5620:: @ 83E5620
- .4byte 0x24
- .4byte gSaveBlock1 + 0x2D94
- .4byte 0xC
diff --git a/data/scripts/bard.inc b/data/scripts/bard.inc
deleted file mode 100644
index 3f25b100f..000000000
--- a/data/scripts/bard.inc
+++ /dev/null
@@ -1,67 +0,0 @@
-MauvilleCity_PokemonCenter_1F_EventScript_1AE744:: @ 81AE744
- special sub_80F7B14
- switch RESULT
- case 0, MauvilleCity_PokemonCenter_1F_EventScript_1AE784
- case 1, MauvilleCity_PokemonCenter_1F_EventScript_1AE845
- case 2, MauvilleCity_PokemonCenter_1F_EventScript_1AEBAB
- case 3, MauvilleCity_PokemonCenter_1F_EventScript_1B0816
- case 4, MauvilleCity_PokemonCenter_1F_EventScript_1B09EB
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE784:: @ 81AE784
- lock
- faceplayer
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0A91, 5
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE7A5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE7C8
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE7A5:: @ 81AE7A5
- setvar 0x8004, 0
- special sub_80F7C54
- pause 60
- special sub_80F7B2C
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE7D2
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0AED, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE7C8:: @ 81AE7C8
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0AC3, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE7D2:: @ 81AE7D2
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0B2C, 5
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE7F1
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE83B
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE7F1:: @ 81AE7F1
- setvar 0x8004, 6
- call MauvilleCity_PokemonCenter_1F_EventScript_1A00F3
- lock
- faceplayer
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE83B
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0BD0, 4
- setvar 0x8004, 1
- special sub_80F7C54
- pause 60
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0BFA, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE7F1
- special sub_80F7B40
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0C23, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE83B:: @ 81AE83B
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0BA6, 4
- release
- end
diff --git a/data/scripts/giddy.inc b/data/scripts/giddy.inc
deleted file mode 100644
index 263589fe9..000000000
--- a/data/scripts/giddy.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-MauvilleCity_PokemonCenter_1F_EventScript_1B09EB:: @ 81B09EB
- lock
- faceplayer
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B092A, 5
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A0C
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A6F
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A0C:: @ 81B0A0C
- special sub_80F7CC8
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A4E
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A79
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A26:: @ 81B0A26
- special sub_80F7CC8
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A40
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A79
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A40:: @ 81B0A40
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0998, 4
- jump MauvilleCity_PokemonCenter_1F_EventScript_1B0A4E
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A4E:: @ 81B0A4E
- special sub_80F7CF4
- special ShowFieldMessageStringVar4
- waittext
- yesnobox 20, 8
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A26
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0A26
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A6F:: @ 81B0A6F
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B097C, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0A79:: @ 81B0A79
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B09B0, 4
- release
- end
diff --git a/data/scripts/hipster.inc b/data/scripts/hipster.inc
deleted file mode 100644
index 3e24e4868..000000000
--- a/data/scripts/hipster.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-MauvilleCity_PokemonCenter_1F_EventScript_1AE845:: @ 81AE845
- lock
- faceplayer
- setflag 2054
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0C5B, 4
- special sub_80F7C70
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE86A
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0CA7, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE86A:: @ 81AE86A
- special sub_80F7C90
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AE882
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0D11, 4
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AE882:: @ 81AE882
- msgbox MauvilleCity_PokemonCenter_1F_Text_1B0D75, 4
- special sub_80F7C84
- release
- end
diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc
new file mode 100644
index 000000000..997b5a31c
--- /dev/null
+++ b/data/scripts/mauville_man.inc
@@ -0,0 +1,357 @@
+@ From mauville_old_man.h
+@ TODO: Put these in a header
+
+MAUVILLE_MAN_BARD = 0
+MAUVILLE_MAN_HIPSTER = 1
+MAUVILLE_MAN_TRADER = 2
+MAUVILLE_MAN_STORYTELLER = 3
+MAUVILLE_MAN_GIDDY = 4
+
+MauvilleCity_PokemonCenter_1F_EventScript_1AE744:: @ 81AE744
+ special ScrSpecial_GetCurrentMauvilleMan
+ switch RESULT
+ case MAUVILLE_MAN_BARD, SpeakToBard
+ case MAUVILLE_MAN_HIPSTER, SpeakToHipster
+ case MAUVILLE_MAN_TRADER, SpeakToTrader
+ case MAUVILLE_MAN_STORYTELLER, SpeakToStoryteller
+ case MAUVILLE_MAN_GIDDY, SpeakToGiddy
+ end
+
+
+@-------------------------------------------------------------------------------
+@ Bard
+@-------------------------------------------------------------------------------
+
+SpeakToBard:
+ lock
+ faceplayer
+ msgbox gTextBard_HiImTheBard, MSGBOX_YESNO
+ compare RESULT, YES
+ jumpeq yes_hear_song
+ compare RESULT, NO
+ jumpeq dont_hear_song
+ end
+
+yes_hear_song:
+ setvar 0x8004, 0
+ @ Give the player ear rape
+ special ScrSpecial_PlayBardSong
+ pause 60
+ special ScrSpecial_HasBardSongBeenChanged
+ compare RESULT, FALSE
+ @ Prompt new lyrics only if song hasn't been changed
+ jumpeq prompt_write_lyrics
+ msgbox gTextBard_OhWhatAMovingSong, 4
+ release
+ end
+
+dont_hear_song:
+ msgbox gTextBard_OhYouveLeftMe, 4
+ release
+ end
+
+prompt_write_lyrics:
+ msgbox gTextBard_SoHowDoYouLikeMySong, MSGBOX_YESNO
+ compare RESULT, YES
+ jumpeq write_lyrics
+ compare RESULT, NO
+ jumpeq dont_write_lyrics
+ end
+
+write_lyrics:
+ setvar 0x8004, 6
+ call MauvilleCity_PokemonCenter_1F_EventScript_1A00F3
+ lock
+ faceplayer
+ compare RESULT, NO
+ jumpeq dont_write_lyrics
+ msgbox gTextBard_ThankYouKindly, 4
+ setvar 0x8004, 1
+ @ Give the player ear rape again
+ special ScrSpecial_PlayBardSong
+ pause 60
+ msgbox gTextBard_WasThatHowYouWanted, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq write_lyrics @ Keep looping until player responds YES
+ special ScrSpecial_SaveBardSongLyrics
+ msgbox gTextBard_OkayThatsIt, 4
+ release
+ end
+
+dont_write_lyrics:
+ msgbox gTextBard_OhYouveLeftMe2, 4
+ release
+ end
+
+
+@-------------------------------------------------------------------------------
+@ Hipster
+@-------------------------------------------------------------------------------
+
+SpeakToHipster:
+ lock
+ faceplayer
+ setflag 2054
+ msgbox gTextHipster_TheyCallMeTheHipster, 4
+ special ScrSpecial_GetHipsterSpokenFlag
+ compare RESULT, FALSE
+ jumpeq hipster_first_time
+ msgbox gTextHipster_TaughtYouAlready, 4
+ release
+ end
+
+hipster_first_time:
+ special ScrSpecial_HipsterTeachWord
+ compare RESULT, TRUE @ TRUE if player learned a new word
+ jumpeq teach_new_word
+ msgbox gTextHipster_YouAlreadyKnowALot, 4
+ release
+ end
+
+teach_new_word:
+ msgbox gTextHipster_HaveYouHeardAbout, 4
+ special ScrSpecial_SetHipsterSpokenFlag
+ release
+ end
+
+
+@-------------------------------------------------------------------------------
+@ Trader
+@-------------------------------------------------------------------------------
+
+ .include "data/text/trader.inc"
+
+SpeakToTrader:
+ lock
+ faceplayer
+ msgbox gTextTrader_Introduction, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq dont_want_to_trade
+ special ScrSpecial_GetTraderTradedFlag
+ compare RESULT, TRUE
+ jumpeq already_traded
+ message gTextTrader_MenuPrompt
+ waittext
+ jump do_trader_menu_get
+ end
+
+dont_want_to_trade:
+ msgbox gTextTrader_FeelUnwanted1, 2
+ end
+
+already_traded:
+ msgbox gTextTrader_TradedAlready, 2
+ end
+
+do_trader_menu_get:
+ special ScrSpecial_TraderMenuGetDecoration
+ waitstate
+ compare 0x8004, 0
+ jumpeq cancelled_get_menu
+ compare 0x8004, 65535
+ jumpeq rare_item_cant_trade_away
+ msgbox gTextTrader_ItemOnceBelongedTo, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq dont_want_item
+ special ScrSpecial_DoesPlayerHaveNoDecorations
+ compare RESULT, TRUE
+ jumpeq player_has_no_decorations
+ jump do_trader_menu_give
+ end
+
+cancelled_get_menu:
+ msgbox gTextTrader_DontWantAnything, 2
+ end
+
+rare_item_cant_trade_away:
+ message gTextTrader_ICantTradeThatOneAway
+ waittext
+ jump do_trader_menu_get
+ end
+
+dont_want_item:
+ message gTextTrader_MenuPrompt
+ waittext
+ jump do_trader_menu_get
+ end
+
+player_has_no_decorations:
+ msgbox gTextTrader_YouDontHaveDecorations, 2
+ end
+
+do_trader_menu_give:
+ msgbox gTextTrader_PickDecorationYoullTrade, 4
+ special ScrSpecial_TraderMenuGiveDecoration
+ waitstate
+ compare 0x8006, 0
+ jumpeq cancelled_give_menu
+ compare 0x8006, 65535
+ jumpeq decoration_is_in_use
+ special ScrSpecial_IsDecorationFull
+ compare RESULT, 1
+ jumpeq decorations_full
+ msgbox gTextTrader_SoWellTrade, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq do_trader_menu_give
+ special ScrSpecial_TraderDoDecorationTrade
+ msgbox gTextTrader_ThenWellTrade, 2
+ end
+
+cancelled_give_menu:
+ msgbox gTextTrader_FeelUnwanted2, 2
+ end
+
+decoration_is_in_use:
+ msgbox gTextTrader_InUseYouCantTradeIt, 4
+ jump do_trader_menu_give
+ end
+
+decorations_full:
+ msgbox gTextTrader_NoRoomForThis, 2
+ end
+
+
+@-------------------------------------------------------------------------------
+@ Storyteller
+@-------------------------------------------------------------------------------
+
+ .include "data/text/storyteller.inc"
+
+SpeakToStoryteller:
+ setvar 0x8008, 0
+ setvar 0x8009, 0
+ setvar 0x800a, 0
+ setvar 0x800b, 0
+ lock
+ faceplayer
+ msgbox gTextStoryteller_Introduction, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq dont_hear_story
+ specialval RESULT, ScrSpecial_StorytellerGetFreeStorySlot
+ compare RESULT, 0 @ If slot is 0, then the list is empty
+ jumpeq no_stories_recorded
+choose_story:
+ message gTextStoryteller_WhichTale
+ waittext
+ special ScrSpecial_StorytellerStoryListMenu
+ waitstate
+ compare RESULT, FALSE
+ jumpeq cancel_story_menu
+ setvar 0x8008, 1
+ special ScrSpecial_StorytellerDisplayStory
+ waittext
+ waitbutton
+ specialval RESULT, ScrSpecial_StorytellerUpdateStat
+ compare RESULT, FALSE
+ jumpeq no_stat_update
+ jump stat_update
+cancel_story_menu:
+ compare 0x8008, 0
+ jumpeq dont_hear_story
+ jump yes_hear_story
+no_stat_update:
+ msgbox gTextStoryteller_CouldThereBeOtherTrainers, 4
+ msgbox gTextStoryteller_HearAnotherLegendaryTale, MSGBOX_YESNO
+ compare RESULT, YES
+ jumpeq choose_story
+yes_hear_story:
+ specialval RESULT, ScrSpecial_HasStorytellerAlreadyRecorded
+ compare RESULT, TRUE
+ jumpeq cant_record_story @ already recorded story
+ specialval RESULT, ScrSpecial_StorytellerGetFreeStorySlot
+ compare RESULT, 4
+ jumpeq cant_record_story @ story list is full
+ jump prompt_record_story
+no_stories_recorded:
+ msgbox gTextStoryteller_ButIKnowOfNoLegendaryTrainers, 4
+prompt_record_story:
+ msgbox gTextStoryteller_HaveYouAnyTales, MSGBOX_YESNO
+ compare RESULT, NO
+ jumpeq dont_hear_story
+ specialval RESULT, ScrSpecial_StorytellerInitializeRandomStat
+ compare RESULT, TRUE
+ jumpeq stat_update
+ msgbox gTextStoryteller_ImNotSatisfied, 4
+ closebutton
+ release
+ end
+
+stat_update:
+ msgbox gTextStoryteller_BirthOfANewLegend, 4
+ closebutton
+ release
+ end
+
+dont_hear_story:
+ msgbox gTextStoryteller_OhIFeelStifled, 4
+ closebutton
+ release
+ end
+
+cant_record_story:
+ msgbox gTextStoryteller_WishMorePeopleWould, 4
+ closebutton
+ release
+ end
+
+
+@-------------------------------------------------------------------------------
+@ Giddy
+@-------------------------------------------------------------------------------
+
+ .include "data/text/giddy.inc"
+
+SpeakToGiddy:
+ lock
+ faceplayer
+ msgbox gTextGiddy_Introduction, MSGBOX_YESNO
+ compare RESULT, YES
+ jumpeq yes_hear_giddy
+ compare RESULT, NO
+ jumpeq dont_hear_giddy
+ end
+
+yes_hear_giddy:
+ special ScrSpecial_GiddyShouldTellAnotherTale
+ compare RESULT, TRUE
+ jumpeq tell_giddy_tale
+ compare RESULT, FALSE
+ jumpeq bye_bye
+ end
+
+tell_another_giddy_tale:
+ special ScrSpecial_GiddyShouldTellAnotherTale
+ compare RESULT, TRUE
+ jumpeq also_i_was_thinking
+ compare RESULT, FALSE
+ jumpeq bye_bye
+ end
+
+also_i_was_thinking:
+ msgbox gTextGiddy_AlsoIWasThinking, 4
+ jump tell_giddy_tale
+ end
+
+tell_giddy_tale:
+ special ScrSpecial_GenerateGiddyLine
+ special ShowFieldMessageStringVar4
+ waittext
+ yesnobox 20, 8
+ compare RESULT, 1
+ jumpeq tell_another_giddy_tale
+ compare RESULT, 0
+ jumpeq tell_another_giddy_tale
+ end
+
+dont_hear_giddy:
+ msgbox gTextGiddy_YouveDeflatedMe, 4
+ release
+ end
+
+bye_bye:
+ msgbox gTextGiddy_ByeBye, 4
+ release
+ end
+
+ .include "data/text/bard.inc"
+ .include "data/text/hipster.inc"
diff --git a/data/scripts/storyteller.inc b/data/scripts/storyteller.inc
deleted file mode 100644
index eba94e698..000000000
--- a/data/scripts/storyteller.inc
+++ /dev/null
@@ -1,82 +0,0 @@
-MauvilleCity_PokemonCenter_1F_EventScript_1B0816:: @ 81B0816
- setvar 0x8008, 0
- setvar 0x8009, 0
- setvar 0x800a, 0
- setvar 0x800b, 0
- lock
- faceplayer
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AECC6, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0914
- specialval RESULT, sub_80F889C
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B08D3
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B084F:: @ 81B084F
- message MauvilleCity_PokemonCenter_1F_Text_1AED35
- waittext
- special sub_80F8874
- waitstate
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0883
- setvar 0x8008, 1
- special sub_80F8888
- waittext
- waitbutton
- specialval RESULT, sub_80F88AC
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0893
- jump MauvilleCity_PokemonCenter_1F_EventScript_1B0909
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0883:: @ 81B0883
- compare 0x8008, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0914
- jump MauvilleCity_PokemonCenter_1F_EventScript_1B08AE
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0893:: @ 81B0893
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEE50, 4
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEF0A, 5
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B084F
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B08AE:: @ 81B08AE
- specialval RESULT, sub_80F88E0
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B091F
- specialval RESULT, sub_80F889C
- compare RESULT, 4
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B091F
- jump MauvilleCity_PokemonCenter_1F_EventScript_1B08DB
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B08D3:: @ 81B08D3
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AED70, 4
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B08DB:: @ 81B08DB
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEEB4, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0914
- specialval RESULT, sub_80F88FC
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1B0909
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEF49, 4
- closebutton
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0909:: @ 81B0909
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEDE8, 4
- closebutton
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B0914:: @ 81B0914
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AED1D, 4
- closebutton
- release
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1B091F:: @ 81B091F
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEFA5, 4
- closebutton
- release
- end
diff --git a/data/scripts/trader.inc b/data/scripts/trader.inc
deleted file mode 100644
index b52c8a2dc..000000000
--- a/data/scripts/trader.inc
+++ /dev/null
@@ -1,88 +0,0 @@
-MauvilleCity_PokemonCenter_1F_EventScript_1AEBAB:: @ 81AEBAB
- lock
- faceplayer
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE88F, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEBDA
- special sub_8109C44
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEBE3
- message MauvilleCity_PokemonCenter_1F_Text_1AE910
- waittext
- jump MauvilleCity_PokemonCenter_1F_EventScript_1AEBEC
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEBDA:: @ 81AEBDA
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE8C6, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEBE3:: @ 81AEBE3
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE8DF, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEBEC:: @ 81AEBEC
- special sub_8109E34
- waitstate
- compare 0x8004, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEC2D
- compare 0x8004, 65535
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEC36
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE97C, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEC42
- special sub_8109C58
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEC4E
- jump MauvilleCity_PokemonCenter_1F_EventScript_1AEC57
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEC2D:: @ 81AEC2D
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE950, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEC36:: @ 81AEC36
- message MauvilleCity_PokemonCenter_1F_Text_1AEB31
- waittext
- jump MauvilleCity_PokemonCenter_1F_EventScript_1AEBEC
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEC42:: @ 81AEC42
- message MauvilleCity_PokemonCenter_1F_Text_1AE910
- waittext
- jump MauvilleCity_PokemonCenter_1F_EventScript_1AEBEC
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEC4E:: @ 81AEC4E
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE9B6, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AEC57:: @ 81AEC57
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AE9F8, 4
- special sub_8109CF0
- waitstate
- compare 0x8006, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AECA6
- compare 0x8006, 65535
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AECAF
- special sub_8109C90
- compare RESULT, 1
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AECBD
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEA9B, 5
- compare RESULT, 0
- jumpeq MauvilleCity_PokemonCenter_1F_EventScript_1AEC57
- special sub_8109DE0
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEAFB, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AECA6:: @ 81AECA6
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEA2B, 2
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AECAF:: @ 81AECAF
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEAC3, 4
- jump MauvilleCity_PokemonCenter_1F_EventScript_1AEC57
- end
-
-MauvilleCity_PokemonCenter_1F_EventScript_1AECBD:: @ 81AECBD
- msgbox MauvilleCity_PokemonCenter_1F_Text_1AEA57, 2
- end
diff --git a/data/specials.inc b/data/specials.inc
index 0eb6b742d..a17bc943a 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -104,28 +104,28 @@ gSpecials::
def_special DoWateringBerryTreeAnim
def_special sub_80E60D8
def_special sub_80EB7C4
- def_special sub_80F7B14
- def_special sub_80F7B2C
- def_special sub_80F7B40
- def_special sub_80F7C70
- def_special sub_80F7C84
- def_special sub_80F7C90
- def_special sub_80F7C54
+ def_special ScrSpecial_GetCurrentMauvilleMan
+ def_special ScrSpecial_HasBardSongBeenChanged
+ def_special ScrSpecial_SaveBardSongLyrics
+ def_special ScrSpecial_GetHipsterSpokenFlag
+ def_special ScrSpecial_SetHipsterSpokenFlag
+ def_special ScrSpecial_HipsterTeachWord
+ def_special ScrSpecial_PlayBardSong
def_special sub_80F83D0
- def_special sub_80F7CF4
- def_special sub_80F7CC8
- def_special sub_80F889C
- def_special sub_80F8888
- def_special sub_80F8874
- def_special sub_80F88AC
- def_special sub_80F88FC
- def_special sub_80F88E0
- def_special sub_8109E34
- def_special sub_8109C44
- def_special sub_8109C58
- def_special sub_8109C90
- def_special sub_8109CF0
- def_special sub_8109DE0
+ def_special ScrSpecial_GenerateGiddyLine
+ def_special ScrSpecial_GiddyShouldTellAnotherTale
+ def_special ScrSpecial_StorytellerGetFreeStorySlot
+ def_special ScrSpecial_StorytellerDisplayStory
+ def_special ScrSpecial_StorytellerStoryListMenu
+ def_special ScrSpecial_StorytellerUpdateStat
+ def_special ScrSpecial_StorytellerInitializeRandomStat
+ def_special ScrSpecial_HasStorytellerAlreadyRecorded
+ def_special ScrSpecial_TraderMenuGetDecoration
+ def_special ScrSpecial_GetTraderTradedFlag
+ def_special ScrSpecial_DoesPlayerHaveNoDecorations
+ def_special ScrSpecial_IsDecorationFull
+ def_special ScrSpecial_TraderMenuGiveDecoration
+ def_special ScrSpecial_TraderDoDecorationTrade
def_special GetShroomishSizeRecordInfo
def_special CompareShroomishSize
def_special GetBarboachSizeRecordInfo
diff --git a/data/text/bard.inc b/data/text/bard.inc
index edf4942f6..bd22c97a3 100644
--- a/data/text/bard.inc
+++ b/data/text/bard.inc
@@ -1,19 +1,19 @@
-UnknownString_81B0A83: @ 81B0A83
+gTextBard_BardTesting: @ 81B0A83
.string "BARD testing!$"
-MauvilleCity_PokemonCenter_1F_Text_1B0A91:: @ 81B0A91
+gTextBard_HiImTheBard:: @ 81B0A91
.string "Hi, I’m the BARD.\n"
.string "Would you like to hear my song?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0AC3:: @ 81B0AC3
+gTextBard_OhYouveLeftMe:: @ 81B0AC3
.string "Oh...\n"
.string "You’ve left me feeling the blues...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0AED:: @ 81B0AED
+gTextBard_OhWhatAMovingSong:: @ 81B0AED
.string "Oh, what a moving song...\n"
.string "I wish I could play it for others...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0B2C:: @ 81B0B2C
+gTextBard_SoHowDoYouLikeMySong:: @ 81B0B2C
.string "So?\n"
.string "How do you like my song?\p"
.string "But I’m none too happy about the\n"
@@ -21,18 +21,18 @@ MauvilleCity_PokemonCenter_1F_Text_1B0B2C:: @ 81B0B2C
.string "How would you like to write some new\n"
.string "lyrics for me?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BA6:: @ 81B0BA6
+gTextBard_OhYouveLeftMe2:: @ 81B0BA6
.string "Oh...\n"
.string "You’ve left me feeling the blues...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BD0:: @ 81B0BD0
+gTextBard_ThankYouKindly:: @ 81B0BD0
.string "Thank you kindly!\n"
.string "Let me sing it for you.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0BFA:: @ 81B0BFA
+gTextBard_WasThatHowYouWanted:: @ 81B0BFA
.string "Was that how you wanted your song\n"
.string "to go?$"
-MauvilleCity_PokemonCenter_1F_Text_1B0C23:: @ 81B0C23
+gTextBard_OkayThatsIt:: @ 81B0C23
.string "Okay! That’s it, then.\n"
.string "I’ll sing this song for a while.$"
diff --git a/data/text/giddy.inc b/data/text/giddy.inc
index 040ef2ae5..a763776bf 100644
--- a/data/text/giddy.inc
+++ b/data/text/giddy.inc
@@ -1,16 +1,16 @@
-MauvilleCity_PokemonCenter_1F_Text_1B092A:: @ 81B092A
+gTextGiddy_Introduction:: @ 81B092A
.string "I’m GIDDY!\n"
.string "I have a scintillating story for you!\p"
.string "Would you like to hear my story?$"
-MauvilleCity_PokemonCenter_1F_Text_1B097C:: @ 81B097C
+gTextGiddy_YouveDeflatedMe:: @ 81B097C
.string "Oh...\n"
.string "You’ve deflated me...$"
-MauvilleCity_PokemonCenter_1F_Text_1B0998:: @ 81B0998
+gTextGiddy_AlsoIWasThinking:: @ 81B0998
.string "Also, I was thinking...$"
-MauvilleCity_PokemonCenter_1F_Text_1B09B0:: @ 81B09B0
+gTextGiddy_ByeBye:: @ 81B09B0
.string "That’s about it, I think...\p"
.string "We should chat again!\n"
.string "Bye-bye!$"
diff --git a/data/text/hipster.inc b/data/text/hipster.inc
index a30943d3a..630db02b2 100644
--- a/data/text/hipster.inc
+++ b/data/text/hipster.inc
@@ -1,19 +1,19 @@
-MauvilleCity_PokemonCenter_1F_Text_1B0C5B:: @ 81B0C5B
+gTextHipster_TheyCallMeTheHipster:: @ 81B0C5B
.string "Hey, yo! They call me the HIPSTER.\n"
.string "I’ll teach you what’s hip and happening.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0CA7:: @ 81B0CA7
+gTextHipster_TaughtYouAlready:: @ 81B0CA7
.string "But, hey, I taught you what’s hip and\n"
.string "happening already.\p"
.string "I’d like to spread the good word to\n"
.string "other folks.$"
-MauvilleCity_PokemonCenter_1F_Text_1B0D11:: @ 81B0D11
+gTextHipster_YouAlreadyKnowALot:: @ 81B0D11
.string "But, hey, you already know a lot about\n"
.string "what’s hip and happening.\p"
.string "I’ve got nothing new to teach you!$"
-MauvilleCity_PokemonCenter_1F_Text_1B0D75:: @ 81B0D75
+gTextHipster_HaveYouHeardAbout:: @ 81B0D75
.string "Hey, have you heard about\n"
.string "“{STR_VAR_1}”?\p"
.string "What’s it mean? Well...\n"
diff --git a/data/text/storyteller.inc b/data/text/storyteller.inc
index 3cfa8a698..437a1fa21 100644
--- a/data/text/storyteller.inc
+++ b/data/text/storyteller.inc
@@ -1,24 +1,24 @@
-MauvilleCity_PokemonCenter_1F_Text_1AECC6:: @ 81AECC6
+gTextStoryteller_Introduction:: @ 81AECC6
.string "I’m the STORYTELLER.\n"
.string "I’ll tell you tales of legendary\l"
.string "TRAINERS.\p"
.string "Will you hear my tale?$"
-MauvilleCity_PokemonCenter_1F_Text_1AED1D:: @ 81AED1D
+gTextStoryteller_OhIFeelStifled:: @ 81AED1D
.string "Oh...\n"
.string "I feel stifled...$"
-MauvilleCity_PokemonCenter_1F_Text_1AED35:: @ 81AED35
+gTextStoryteller_WhichTale:: @ 81AED35
.string "I know of these legends.\n"
.string "Which tale will you have me tell?$"
-MauvilleCity_PokemonCenter_1F_Text_1AED70:: @ 81AED70
+gTextStoryteller_ButIKnowOfNoLegendaryTrainers:: @ 81AED70
.string "But, I know of no legendary TRAINERS.\n"
.string "Hence, I know no tales.\p"
.string "Where does one find a TRAINER worthy\n"
.string "of a legendary tale?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEDE8:: @ 81AEDE8
+gTextStoryteller_BirthOfANewLegend:: @ 81AEDE8
.string "What’s that?!\n"
.string "You... You...\p"
.string "{STR_VAR_2}\n"
@@ -26,38 +26,38 @@ MauvilleCity_PokemonCenter_1F_Text_1AEDE8:: @ 81AEDE8
.string "That is indeed magnificent!\n"
.string "It’s the birth of a new legend!$"
-MauvilleCity_PokemonCenter_1F_Text_1AEE50:: @ 81AEE50
+gTextStoryteller_CouldThereBeOtherTrainers:: @ 81AEE50
.string "It gets me thinking, could there be\n"
.string "other TRAINERS with more impressive\l"
.string "legends awaiting discovery?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEEB4:: @ 81AEEB4
+gTextStoryteller_HaveYouAnyTales:: @ 81AEEB4
.string "Are you a TRAINER?\p"
.string "Then tell me, have you any tales that\n"
.string "are even remotely legendary?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEF0A:: @ 81AEF0A
+gTextStoryteller_HearAnotherLegendaryTale:: @ 81AEF0A
.string "Incidentally... Would you care to hear\n"
.string "another legendary tale?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEF49:: @ 81AEF49
+gTextStoryteller_ImNotSatisfied:: @ 81AEF49
.string "Hmm...\n"
.string "I’m not satisfied...\p"
.string "I wish you would bring me news worthy\n"
.string "of being called a legend.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEFA5:: @ 81AEFA5
+gTextStoryteller_WishMorePeopleWould:: @ 81AEFA5
.string "I wish more people would be interested\n"
.string "in hearing my epic tales of legendary\l"
.string "TRAINERS.$"
-UnknownString_81AEFFC:: @ 81AEFFC
+gTextStoryteller_Story1Title:: @ 81AEFFC
.string "The Save-Happy TRAINER$"
-UnknownString_81AF013:: @ 81AF013
+gTextStoryteller_Story1Action:: @ 81AF013
.string "Saved the game$"
-UnknownString_81AF022:: @ 81AF022
+gTextStoryteller_Story1Text:: @ 81AF022
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER saved the game\n"
@@ -65,13 +65,13 @@ UnknownString_81AF022:: @ 81AF022
.string "A more cautious TRAINER than\n"
.string "{STR_VAR_3} one will never find!$"
-UnknownString_81AF0A3:: @ 81AF0A3
+gTextStoryteller_Story2Title:: @ 81AF0A3
.string "The Trendsetter TRAINER$"
-UnknownString_81AF0BB:: @ 81AF0BB
+gTextStoryteller_Story2Action:: @ 81AF0BB
.string "Started trends$"
-UnknownString_81AF0CA:: @ 81AF0CA
+gTextStoryteller_Story2Text:: @ 81AF0CA
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER started new trends\n"
@@ -79,13 +79,13 @@ UnknownString_81AF0CA:: @ 81AF0CA
.string "{STR_VAR_3} is setting trends for all\n"
.string "the HOENN region!$"
-UnknownString_81AF149:: @ 81AF149
+gTextStoryteller_Story3Title:: @ 81AF149
.string "The BERRY-Planting TRAINER$"
-UnknownString_81AF164:: @ 81AF164
+gTextStoryteller_Story3Action:: @ 81AF164
.string "Planted BERRIES$"
-UnknownString_81AF174:: @ 81AF174
+gTextStoryteller_Story3Text:: @ 81AF174
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER planted BERRIES\n"
@@ -93,13 +93,13 @@ UnknownString_81AF174:: @ 81AF174
.string "{STR_VAR_3} is a legendary lover of\n"
.string "BERRIES!$"
-UnknownString_81AF1E5:: @ 81AF1E5
+gTextStoryteller_Story4Title:: @ 81AF1E5
.string "The BIKE-Loving TRAINER$"
-UnknownString_81AF1FD:: @ 81AF1FD
+gTextStoryteller_Story4Action:: @ 81AF1FD
.string "Traded BIKES$"
-UnknownString_81AF20A:: @ 81AF20A
+gTextStoryteller_Story4Text:: @ 81AF20A
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER swapped BIKES\n"
@@ -107,13 +107,13 @@ UnknownString_81AF20A:: @ 81AF20A
.string "{STR_VAR_3} must love BIKES deeply\n"
.string "and passionately!$"
-UnknownString_81AF281:: @ 81AF281
+gTextStoryteller_Story5Title:: @ 81AF281
.string "The Interviewed TRAINER$"
-UnknownString_81AF299:: @ 81AF299
+gTextStoryteller_Story5Action:: @ 81AF299
.string "Got interviewed$"
-UnknownString_81AF2A9:: @ 81AF2A9
+gTextStoryteller_Story5Text:: @ 81AF2A9
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER got interviewed\n"
@@ -121,26 +121,26 @@ UnknownString_81AF2A9:: @ 81AF2A9
.string "{STR_VAR_3} must be a TRAINER who’s\n"
.string "attracting much attention!$"
-UnknownString_81AF32C:: @ 81AF32C
+gTextStoryteller_Story6Title:: @ 81AF32C
.string "The Battle-Happy TRAINER$"
-UnknownString_81AF345:: @ 81AF345
+gTextStoryteller_Story6Action:: @ 81AF345
.string "Battled$"
-UnknownString_81AF34D:: @ 81AF34D
+gTextStoryteller_Story6Text:: @ 81AF34D
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER battled {STR_VAR_1} times!\p"
.string "{STR_VAR_3} must be a TRAINER who can\n"
.string "never refuse a chance to battle!$"
-UnknownString_81AF3D0:: @ 81AF3D0
+gTextStoryteller_Story7Title:: @ 81AF3D0
.string "The POKéMON-Catching TRAINER$"
-UnknownString_81AF3ED:: @ 81AF3ED
+gTextStoryteller_Story7Action:: @ 81AF3ED
.string "Caught POKéMON$"
-UnknownString_81AF3FC:: @ 81AF3FC
+gTextStoryteller_Story7Text:: @ 81AF3FC
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER caught\n"
@@ -148,13 +148,13 @@ UnknownString_81AF3FC:: @ 81AF3FC
.string "{STR_VAR_3} is a legendary catcher of\n"
.string "wild POKéMON!$"
-UnknownString_81AF46D:: @ 81AF46D
+gTextStoryteller_Story8Title:: @ 81AF46D
.string "The Fishing TRAINER$"
-UnknownString_81AF481:: @ 81AF481
+gTextStoryteller_Story8Action:: @ 81AF481
.string "Caught POKéMON with a ROD$"
-UnknownString_81AF49B:: @ 81AF49B
+gTextStoryteller_Story8Text:: @ 81AF49B
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER caught\n"
@@ -162,13 +162,13 @@ UnknownString_81AF49B:: @ 81AF49B
.string "{STR_VAR_3} is a legendary fishing\n"
.string "expert!$"
-UnknownString_81AF511:: @ 81AF511
+gTextStoryteller_Story9Title:: @ 81AF511
.string "The EGG-Warming TRAINER$"
-UnknownString_81AF529:: @ 81AF529
+gTextStoryteller_Story9Action:: @ 81AF529
.string "Hatched EGGS$"
-UnknownString_81AF536:: @ 81AF536
+gTextStoryteller_Story9Text:: @ 81AF536
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER hatched {STR_VAR_1} POKéMON\n"
@@ -176,13 +176,13 @@ UnknownString_81AF536:: @ 81AF536
.string "{STR_VAR_3} is a legendary warmer\n"
.string "of EGGS!$"
-UnknownString_81AF5A9:: @ 81AF5A9
+gTextStoryteller_Story10Title:: @ 81AF5A9
.string "The Evolver TRAINER$"
-UnknownString_81AF5BD:: @ 81AF5BD
+gTextStoryteller_Story10Action:: @ 81AF5BD
.string "Evolved POKéMON$"
-UnknownString_81AF5CD:: @ 81AF5CD
+gTextStoryteller_Story10Text:: @ 81AF5CD
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER made {STR_VAR_1} POKéMON\n"
@@ -190,13 +190,13 @@ UnknownString_81AF5CD:: @ 81AF5CD
.string "{STR_VAR_3} is the ultimate evolver\n"
.string "of POKéMON!$"
-UnknownString_81AF63F:: @ 81AF63F
+gTextStoryteller_Story11Title:: @ 81AF63F
.string "The POKéMON CENTER-Loving TRAINER$"
-UnknownString_81AF661:: @ 81AF661
+gTextStoryteller_Story11Action:: @ 81AF661
.string "Used POKéMON CENTERS$"
-UnknownString_81AF676:: @ 81AF676
+gTextStoryteller_Story11Text:: @ 81AF676
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER healed POKéMON\n"
@@ -204,13 +204,13 @@ UnknownString_81AF676:: @ 81AF676
.string "There could be no greater lover of\n"
.string "POKéMON CENTERS than {STR_VAR_3}!$"
-UnknownString_81AF711:: @ 81AF711
+gTextStoryteller_Story12Title:: @ 81AF711
.string "The Homebody TRAINER$"
-UnknownString_81AF726:: @ 81AF726
+gTextStoryteller_Story12Action:: @ 81AF726
.string "Rested POKéMON at home$"
-UnknownString_81AF73D:: @ 81AF73D
+gTextStoryteller_Story12Text:: @ 81AF73D
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER healed POKéMON\n"
@@ -218,13 +218,13 @@ UnknownString_81AF73D:: @ 81AF73D
.string "There could be no more of a homebody\n"
.string "than {STR_VAR_3}!$"
-UnknownString_81AF7BF:: @ 81AF7BF
+gTextStoryteller_Story13Title:: @ 81AF7BF
.string "The SAFARI-Loving TRAINER$"
-UnknownString_81AF7D9:: @ 81AF7D9
+gTextStoryteller_Story13Action:: @ 81AF7D9
.string "Entered the SAFARI ZONE$"
-UnknownString_81AF7F1:: @ 81AF7F1
+gTextStoryteller_Story13Text:: @ 81AF7F1
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER went into the SAFARI ZONE\n"
@@ -232,13 +232,13 @@ UnknownString_81AF7F1:: @ 81AF7F1
.string "{STR_VAR_3} is a TRAINER whose wild side\n"
.string "must come out in the SAFARI ZONE!$"
-UnknownString_81AF88A:: @ 81AF88A
+gTextStoryteller_Story14Title:: @ 81AF88A
.string "The CUT-Frenzy TRAINER$"
-UnknownString_81AF8A1:: @ 81AF8A1
+gTextStoryteller_Story14Action:: @ 81AF8A1
.string "Used CUT$"
-UnknownString_81AF8AA:: @ 81AF8AA
+gTextStoryteller_Story14Text:: @ 81AF8AA
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER used CUT\n"
@@ -246,13 +246,13 @@ UnknownString_81AF8AA:: @ 81AF8AA
.string "{STR_VAR_3} is a TRAINER who just must\n"
.string "love to CUT!$"
-UnknownString_81AF91B:: @ 81AF91B
+gTextStoryteller_Story15Title:: @ 81AF91B
.string "The ROCK-SMASHING TRAINER$"
-UnknownString_81AF935:: @ 81AF935
+gTextStoryteller_Story15Action:: @ 81AF935
.string "Smashed rocks$"
-UnknownString_81AF943:: @ 81AF943
+gTextStoryteller_Story15Text:: @ 81AF943
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER used ROCK SMASH\n"
@@ -260,13 +260,13 @@ UnknownString_81AF943:: @ 81AF943
.string "{STR_VAR_3} must be a TRAINER who\n"
.string "can’t leave a stone unsmashed!$"
-UnknownString_81AF9C8:: @ 81AF9C8
+gTextStoryteller_Story16Title:: @ 81AF9C8
.string "The Move-Loving TRAINER$"
-UnknownString_81AF9E0:: @ 81AF9E0
+gTextStoryteller_Story16Action:: @ 81AF9E0
.string "Moved the SECRET BASE$"
-UnknownString_81AF9F6:: @ 81AF9F6
+gTextStoryteller_Story16Text:: @ 81AF9F6
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER moved the SECRET BASE\n"
@@ -274,13 +274,13 @@ UnknownString_81AF9F6:: @ 81AF9F6
.string "{STR_VAR_3} is a TRAINER who loves\n"
.string "to move houses often!$"
-UnknownString_81AFA79:: @ 81AFA79
+gTextStoryteller_Story17Title:: @ 81AFA79
.string "The SPLASH-Happy TRAINER$"
-UnknownString_81AFA92:: @ 81AFA92
+gTextStoryteller_Story17Action:: @ 81AFA92
.string "Used SPLASH$"
-UnknownString_81AFA9E:: @ 81AFA9E
+gTextStoryteller_Story17Text:: @ 81AFA9E
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER used SPLASH\n"
@@ -288,13 +288,13 @@ UnknownString_81AFA9E:: @ 81AFA9E
.string "{STR_VAR_3} is a TRAINER who must love\n"
.string "SPLASHING around!$"
-UnknownString_81AFB17:: @ 81AFB17
+gTextStoryteller_Story18Title:: @ 81AFB17
.string "The Tenacious TRAINER$"
-UnknownString_81AFB2D:: @ 81AFB2D
+gTextStoryteller_Story18Action:: @ 81AFB2D
.string "Resorted to using STRUGGLE$"
-UnknownString_81AFB48:: @ 81AFB48
+gTextStoryteller_Story18Text:: @ 81AFB48
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER had to rely on STRUGGLE\n"
@@ -302,13 +302,13 @@ UnknownString_81AFB48:: @ 81AFB48
.string "{STR_VAR_3} is a tenacious TRAINER\n"
.string "who never gives in to adversity!$"
-UnknownString_81AFBD8:: @ 81AFBD8
+gTextStoryteller_Story19Title:: @ 81AFBD8
.string "The SLOT Champ$"
-UnknownString_81AFBE7:: @ 81AFBE7
+gTextStoryteller_Story19Action:: @ 81AFBE7
.string "Won the jackpot on the SLOTS$"
-UnknownString_81AFC04:: @ 81AFC04
+gTextStoryteller_Story19Text:: @ 81AFC04
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER won the jackpot on\n"
@@ -316,13 +316,13 @@ UnknownString_81AFC04:: @ 81AFC04
.string "{STR_VAR_3} is a TRAINER who was lucky\n"
.string "on the SLOTS!$"
-UnknownString_81AFC8A:: @ 81AFC8A
+gTextStoryteller_Story20Title:: @ 81AFC8A
.string "The ROULETTE Champ$"
-UnknownString_81AFC9D:: @ 81AFC9D
+gTextStoryteller_Story20Action:: @ 81AFC9D
.string "Had consecutive ROULETTE wins of$"
-UnknownString_81AFCBE:: @ 81AFCBE
+gTextStoryteller_Story20Text:: @ 81AFCBE
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER won in ROULETTE\n"
@@ -330,13 +330,13 @@ UnknownString_81AFCBE:: @ 81AFCBE
.string "{STR_VAR_3} was lucky when the ball\n"
.string "bounced in ROULETTE!$"
-UnknownString_81AFD44:: @ 81AFD44
+gTextStoryteller_Story21Title:: @ 81AFD44
.string "The BATTLE TOWER Challenger$"
-UnknownString_81AFD60:: @ 81AFD60
+gTextStoryteller_Story21Action:: @ 81AFD60
.string "Took the BATTLE TOWER challenge$"
-UnknownString_81AFD80:: @ 81AFD80
+gTextStoryteller_Story21Text:: @ 81AFD80
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER took the BATTLE TOWER\n"
@@ -344,13 +344,13 @@ UnknownString_81AFD80:: @ 81AFD80
.string "{STR_VAR_3} is a TRAINER who aspires\n"
.string "for excellence in the BATTLE TOWER!$"
-UnknownString_81AFE1D:: @ 81AFE1D
+gTextStoryteller_Story22Title:: @ 81AFE1D
.string "The Blend-Loving TRAINER$"
-UnknownString_81AFE36:: @ 81AFE36
+gTextStoryteller_Story22Action:: @ 81AFE36
.string "Made {POKEBLOCK}S$"
-UnknownString_81AFE42:: @ 81AFE42
+gTextStoryteller_Story22Text:: @ 81AFE42
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER made {POKEBLOCK}S\n"
@@ -358,13 +358,13 @@ UnknownString_81AFE42:: @ 81AFE42
.string "There is none better at using a BERRY\n"
.string "BLENDER than {STR_VAR_3}!$"
-UnknownString_81AFEC2:: @ 81AFEC2
+gTextStoryteller_Story23Title:: @ 81AFEC2
.string "The CONTEST-Loving TRAINER$"
-UnknownString_81AFEDD:: @ 81AFEDD
+gTextStoryteller_Story23Action:: @ 81AFEDD
.string "Entered CONTESTS$"
-UnknownString_81AFEEE:: @ 81AFEEE
+gTextStoryteller_Story23Text:: @ 81AFEEE
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER entered CONTESTS\n"
@@ -372,13 +372,13 @@ UnknownString_81AFEEE:: @ 81AFEEE
.string "{STR_VAR_3} must love showing off\n"
.string "POKéMON to others!$"
-UnknownString_81AFF68:: @ 81AFF68
+gTextStoryteller_Story24Title:: @ 81AFF68
.string "The CONTEST Master$"
-UnknownString_81AFF7B:: @ 81AFF7B
+gTextStoryteller_Story24Action:: @ 81AFF7B
.string "Won CONTESTS$"
-UnknownString_81AFF88:: @ 81AFF88
+gTextStoryteller_Story24Text:: @ 81AFF88
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER won CONTESTS\n"
@@ -386,13 +386,13 @@ UnknownString_81AFF88:: @ 81AFF88
.string "{STR_VAR_3} must be an incredible\n"
.string "CONTEST master!$"
-UnknownString_81AFFFB:: @ 81AFFFB
+gTextStoryteller_Story25Title:: @ 81AFFFB
.string "The Happy Shopper$"
-UnknownString_81B000D:: @ 81B000D
+gTextStoryteller_Story25Action:: @ 81B000D
.string "Shopped$"
-UnknownString_81B0015:: @ 81B0015
+gTextStoryteller_Story25Text:: @ 81B0015
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER bought items in shops\n"
@@ -400,13 +400,13 @@ UnknownString_81B0015:: @ 81B0015
.string "{STR_VAR_3} must be one of those\n"
.string "people who are born to shop.$"
-UnknownString_81B009D:: @ 81B009D
+gTextStoryteller_Story26Title:: @ 81B009D
.string "The Item-Finding TRAINER$"
-UnknownString_81B00B6:: @ 81B00B6
+gTextStoryteller_Story26Action:: @ 81B00B6
.string "Used an ITEMFINDER$"
-UnknownString_81B00C9:: @ 81B00C9
+gTextStoryteller_Story26Text:: @ 81B00C9
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER used an ITEMFINDER\n"
@@ -414,13 +414,13 @@ UnknownString_81B00C9:: @ 81B00C9
.string "{STR_VAR_3} must enjoy scouring the\n"
.string "ground for hidden items!$"
-UnknownString_81B014D:: @ 81B014D
+gTextStoryteller_Story27Title:: @ 81B014D
.string "The Rain-Soaked TRAINER$"
-UnknownString_81B0165:: @ 81B0165
+gTextStoryteller_Story27Action:: @ 81B0165
.string "Got rained on$"
-UnknownString_81B0173:: @ 81B0173
+gTextStoryteller_Story27Text:: @ 81B0173
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER got soaked by rain\n"
@@ -428,13 +428,13 @@ UnknownString_81B0173:: @ 81B0173
.string "{STR_VAR_3}’s charisma must even\n"
.string "attract rain!$"
-UnknownString_81B01E9:: @ 81B01E9
+gTextStoryteller_Story28Title:: @ 81B01E9
.string "The Avid POKéDEX Reader$"
-UnknownString_81B0201:: @ 81B0201
+gTextStoryteller_Story28Action:: @ 81B0201
.string "Checked a POKéDEX$"
-UnknownString_81B0213:: @ 81B0213
+gTextStoryteller_Story28Text:: @ 81B0213
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER checked a POKéDEX\n"
@@ -442,13 +442,13 @@ UnknownString_81B0213:: @ 81B0213
.string "{STR_VAR_3} must love inspecting\n"
.string "POKéMON in a POKéDEX!$"
-UnknownString_81B0290:: @ 81B0290
+gTextStoryteller_Story29Title:: @ 81B0290
.string "The RIBBON Collector$"
-UnknownString_81B02A5:: @ 81B02A5
+gTextStoryteller_Story29Action:: @ 81B02A5
.string "Received RIBBONS$"
-UnknownString_81B02B6:: @ 81B02B6
+gTextStoryteller_Story29Text:: @ 81B02B6
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER received RIBBONS\n"
@@ -456,13 +456,13 @@ UnknownString_81B02B6:: @ 81B02B6
.string "{STR_VAR_3} must be a TRAINER who\n"
.string "loves to collect RIBBONS!$"
-UnknownString_81B0337:: @ 81B0337
+gTextStoryteller_Story30Title:: @ 81B0337
.string "The Ledge-Jumping TRAINER$"
-UnknownString_81B0351:: @ 81B0351
+gTextStoryteller_Story30Action:: @ 81B0351
.string "Jumped down ledges$"
-UnknownString_81B0364:: @ 81B0364
+gTextStoryteller_Story30Text:: @ 81B0364
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER jumped down ledges\n"
@@ -470,26 +470,26 @@ UnknownString_81B0364:: @ 81B0364
.string "If there’s a ledge to be jumped,\n"
.string "{STR_VAR_3} can’t ignore it!$"
-UnknownString_81B03E9:: @ 81B03E9
+gTextStoryteller_Story31Title:: @ 81B03E9
.string "The Legendary TV Viewer$"
-UnknownString_81B0401:: @ 81B0401
+gTextStoryteller_Story31Action:: @ 81B0401
.string "Watched TV$"
-UnknownString_81B040C:: @ 81B040C
+gTextStoryteller_Story31Text:: @ 81B040C
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER watched TV\n"
.string "{STR_VAR_1} times!\p"
.string "{STR_VAR_3} must love watching TV!$"
-UnknownString_81B046E:: @ 81B046E
+gTextStoryteller_Story32Title:: @ 81B046E
.string "The Time-Conscious TRAINER$"
-UnknownString_81B0489:: @ 81B0489
+gTextStoryteller_Story32Action:: @ 81B0489
.string "Checked the time$"
-UnknownString_81B049A:: @ 81B049A
+gTextStoryteller_Story32Text:: @ 81B049A
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER checked the time\n"
@@ -497,13 +497,13 @@ UnknownString_81B049A:: @ 81B049A
.string "{STR_VAR_3} must be a punctual TRAINER\n"
.string "who’s conscious of the time.$"
-UnknownString_81B0523:: @ 81B0523
+gTextStoryteller_Story33Title:: @ 81B0523
.string "The POKéMON LOTTERY Wizard$"
-UnknownString_81B053E:: @ 81B053E
+gTextStoryteller_Story33Action:: @ 81B053E
.string "Won POKéMON LOTTERIES$"
-UnknownString_81B0554:: @ 81B0554
+gTextStoryteller_Story33Text:: @ 81B0554
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER won POKéMON LOTTERIES\n"
@@ -511,13 +511,13 @@ UnknownString_81B0554:: @ 81B0554
.string "{STR_VAR_3} must have many friends\n"
.string "to trade POKéMON with!$"
-UnknownString_81B05D8:: @ 81B05D8
+gTextStoryteller_Story34Title:: @ 81B05D8
.string "The DAY CARE-Using Trainer$"
-UnknownString_81B05F3:: @ 81B05F3
+gTextStoryteller_Story34Action:: @ 81B05F3
.string "Left POKéMON at the DAY CARE$"
-UnknownString_81B0610:: @ 81B0610
+gTextStoryteller_Story34Text:: @ 81B0610
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER left POKéMON with the\n"
@@ -525,13 +525,13 @@ UnknownString_81B0610:: @ 81B0610
.string "{STR_VAR_3} must be a real go-getter\n"
.string "who raises POKéMON aggressively!$"
-UnknownString_81B06A9:: @ 81B06A9
+gTextStoryteller_Story35Title:: @ 81B06A9
.string "The CABLE CAR-Loving TRAINER$"
-UnknownString_81B06C6:: @ 81B06C6
+gTextStoryteller_Story35Action:: @ 81B06C6
.string "Rode the CABLE CAR$"
-UnknownString_81B06D9:: @ 81B06D9
+gTextStoryteller_Story35Text:: @ 81B06D9
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER rode the CABLE CAR\n"
@@ -539,13 +539,13 @@ UnknownString_81B06D9:: @ 81B06D9
.string "{STR_VAR_3} must be a busy TRAINER\n"
.string "who’s up and down all the time!$"
-UnknownString_81B0763:: @ 81B0763
+gTextStoryteller_Story36Title:: @ 81B0763
.string "The Hot Spring-Loving TRAINER$"
-UnknownString_81B0781:: @ 81B0781
+gTextStoryteller_Story36Action:: @ 81B0781
.string "Bathed in hot springs$"
-UnknownString_81B0797:: @ 81B0797
+gTextStoryteller_Story36Text:: @ 81B0797
.string "This is a tale of a TRAINER\n"
.string "named {STR_VAR_3}.\p"
.string "This TRAINER bathed in hot springs\n"
diff --git a/data/text/trader.inc b/data/text/trader.inc
index dba63bcf8..599344091 100644
--- a/data/text/trader.inc
+++ b/data/text/trader.inc
@@ -1,57 +1,57 @@
-MauvilleCity_PokemonCenter_1F_Text_1AE88F:: @ 81AE88F
+gTextTrader_Introduction:: @ 81AE88F
.string "Hi, I’m the TRADER.\n"
.string "Want to trade decorations with me?$"
-MauvilleCity_PokemonCenter_1F_Text_1AE8C6:: @ 81AE8C6
+gTextTrader_FeelUnwanted1:: @ 81AE8C6
.string "Oh...\n"
.string "I feel unwanted...$"
-MauvilleCity_PokemonCenter_1F_Text_1AE8DF:: @ 81AE8DF
+gTextTrader_TradedAlready:: @ 81AE8DF
.string "But we’ve traded decorations already,\n"
.string "you and I.$"
-MauvilleCity_PokemonCenter_1F_Text_1AE910:: @ 81AE910
+gTextTrader_MenuPrompt:: @ 81AE910
.string "If you see any decorative item that\n"
.string "you want of mine, speak up.$"
-MauvilleCity_PokemonCenter_1F_Text_1AE950:: @ 81AE950
+gTextTrader_DontWantAnything:: @ 81AE950
.string "You don’t want anything?\n"
.string "I feel unwanted...$"
-MauvilleCity_PokemonCenter_1F_Text_1AE97C:: @ 81AE97C
+gTextTrader_ItemOnceBelongedTo:: @ 81AE97C
.string "That decorative item once belonged\n"
.string "to {STR_VAR_1}.\p"
.string "Do you want it?$"
-MauvilleCity_PokemonCenter_1F_Text_1AE9B6:: @ 81AE9B6
+gTextTrader_YouDontHaveDecorations:: @ 81AE9B6
.string "Uh... Wait a second. You don’t have a\n"
.string "single piece of decoration!$"
-MauvilleCity_PokemonCenter_1F_Text_1AE9F8:: @ 81AE9F8
+gTextTrader_PickDecorationYoullTrade:: @ 81AE9F8
.string "Okay, pick the decoration that you’ll\n"
.string "trade to me.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA2B:: @ 81AEA2B
+gTextTrader_FeelUnwanted2:: @ 81AEA2B
.string "You won’t trade with me?\n"
.string "I feel unwanted...$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA57:: @ 81AEA57
+gTextTrader_NoRoomForThis:: @ 81AEA57
.string "You’ve got all the {STR_VAR_2}S that can\n"
.string "be stored. You’ve no room for this.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEA9B:: @ 81AEA9B
+gTextTrader_SoWellTrade:: @ 81AEA9B
.string "Okay, so we’ll trade my {STR_VAR_3}\n"
.string "for your {STR_VAR_2}?$"
-MauvilleCity_PokemonCenter_1F_Text_1AEAC3:: @ 81AEAC3
+gTextTrader_InUseYouCantTradeIt:: @ 81AEAC3
.string "That piece of decoration is in use.\n"
.string "You can’t trade it.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEAFB:: @ 81AEAFB
+gTextTrader_ThenWellTrade:: @ 81AEAFB
.string "Then we’ll trade!\n"
.string "I’ll send my decoration to your PC.$"
-MauvilleCity_PokemonCenter_1F_Text_1AEB31:: @ 81AEB31
+gTextTrader_ICantTradeThatOneAway:: @ 81AEB31
.string "Oops! Sorry!\n"
.string "That’s a really rare piece of decoration.\l"
.string "I can’t trade that one away!\p"
diff --git a/include/bard_music.h b/include/bard_music.h
new file mode 100644
index 000000000..529fd50f8
--- /dev/null
+++ b/include/bard_music.h
@@ -0,0 +1,31 @@
+#ifndef GUARD_BARD_MUSIC_H
+#define GUARD_BARD_MUSIC_H
+
+struct BardSound;
+
+struct BardPhoneme
+{
+ /*0x00*/ u16 sound;
+ /*0x02*/ u16 length;
+ /*0x04*/ s16 pitch;
+ /*0x06*/ u16 volume;
+};
+
+struct BardSong
+{
+ /*0x00*/ u8 currWord;
+ /*0x01*/ u8 currPhoneme;
+ /*0x02*/ u8 phonemeTimer;
+ /*0x03*/ u8 state;
+ /*0x04*/ s16 var04;
+ /*0x06*/ u16 volume;
+ /*0x08*/ s16 pitch;
+ /*0x0A*/ s16 voiceInflection;
+ /*0x0C*/ u16 lyrics[6];
+ /*0x18*/ struct BardPhoneme phonemes[6];
+};
+
+const struct BardSound *GetWordSounds(u16 arg0, u16 arg1);
+s32 GetWordPhonemes(struct BardSong *dest, const struct BardSound *src, u16 arg2);
+
+#endif // GUARD_BARD_MUSIC_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index 03e9bb737..702082966 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -1,7 +1,8 @@
#ifndef GUARD_EASYCHAT_H
#define GUARD_EASYCHAT_H
-enum {
+enum
+{
EC_GROUP_POKEMON,
EC_GROUP_TRAINER,
EC_GROUP_STATUS,
@@ -26,6 +27,1037 @@ enum {
EC_GROUP_POKEMON_2,
};
+// TRAINER
+#define EC_WORD_I_CHOOSE_YOU (EC_GROUP_TRAINER << 9) | 0x0
+#define EC_WORD_GOTCHA (EC_GROUP_TRAINER << 9) | 0x1
+#define EC_WORD_TRADE (EC_GROUP_TRAINER << 9) | 0x2
+#define EC_WORD_SAPPHIRE (EC_GROUP_TRAINER << 9) | 0x3
+#define EC_WORD_EVOLVE (EC_GROUP_TRAINER << 9) | 0x4
+#define EC_WORD_ENCYCLOPEDIA (EC_GROUP_TRAINER << 9) | 0x5
+#define EC_WORD_NATURE (EC_GROUP_TRAINER << 9) | 0x6
+#define EC_WORD_CENTER (EC_GROUP_TRAINER << 9) | 0x7
+#define EC_WORD_EGG (EC_GROUP_TRAINER << 9) | 0x8
+#define EC_WORD_LINK (EC_GROUP_TRAINER << 9) | 0x9
+#define EC_WORD_SP_ABILITY (EC_GROUP_TRAINER << 9) | 0xa
+#define EC_WORD_TRAINER (EC_GROUP_TRAINER << 9) | 0xb
+#define EC_WORD_VERSION (EC_GROUP_TRAINER << 9) | 0xc
+#define EC_WORD_POKENAV (EC_GROUP_TRAINER << 9) | 0xd
+#define EC_WORD_POKEMON (EC_GROUP_TRAINER << 9) | 0xe
+#define EC_WORD_GET (EC_GROUP_TRAINER << 9) | 0xf
+#define EC_WORD_POKEDEX (EC_GROUP_TRAINER << 9) | 0x10
+#define EC_WORD_RUBY (EC_GROUP_TRAINER << 9) | 0x11
+#define EC_WORD_LEVEL (EC_GROUP_TRAINER << 9) | 0x12
+
+// STATUS
+#define EC_WORD_DARK (EC_GROUP_STATUS << 9) | 0x0
+#define EC_WORD_STENCH (EC_GROUP_STATUS << 9) | 0x1
+#define EC_WORD_THICK_FAT (EC_GROUP_STATUS << 9) | 0x2
+#define EC_WORD_RAIN_DISH (EC_GROUP_STATUS << 9) | 0x3
+#define EC_WORD_DRIZZLE (EC_GROUP_STATUS << 9) | 0x4
+#define EC_WORD_ARENA_TRAP (EC_GROUP_STATUS << 9) | 0x5
+#define EC_WORD_INTIMIDATE (EC_GROUP_STATUS << 9) | 0x6
+#define EC_WORD_ROCK_HEAD (EC_GROUP_STATUS << 9) | 0x7
+#define EC_WORD_COLOR (EC_GROUP_STATUS << 9) | 0x8
+#define EC_WORD_ALT_COLOR (EC_GROUP_STATUS << 9) | 0x9
+#define EC_WORD_ROCK (EC_GROUP_STATUS << 9) | 0xa
+#define EC_WORD_BEAUTIFUL (EC_GROUP_STATUS << 9) | 0xb
+#define EC_WORD_BEAUTY (EC_GROUP_STATUS << 9) | 0xc
+#define EC_WORD_AIR_LOCK (EC_GROUP_STATUS << 9) | 0xd
+#define EC_WORD_PSYCHIC (EC_GROUP_STATUS << 9) | 0xe
+#define EC_WORD_HYPER_CUTTER (EC_GROUP_STATUS << 9) | 0xf
+#define EC_WORD_FIGHTING (EC_GROUP_STATUS << 9) | 0x10
+#define EC_WORD_SHADOW_TAG (EC_GROUP_STATUS << 9) | 0x11
+#define EC_WORD_SMART (EC_GROUP_STATUS << 9) | 0x12
+#define EC_WORD_SMARTNESS (EC_GROUP_STATUS << 9) | 0x13
+#define EC_WORD_SPEED_BOOST (EC_GROUP_STATUS << 9) | 0x14
+#define EC_WORD_COOL (EC_GROUP_STATUS << 9) | 0x15
+#define EC_WORD_COOLNESS (EC_GROUP_STATUS << 9) | 0x16
+#define EC_WORD_BATTLE_ARMOR (EC_GROUP_STATUS << 9) | 0x17
+#define EC_WORD_CUTE (EC_GROUP_STATUS << 9) | 0x18
+#define EC_WORD_CUTENESS (EC_GROUP_STATUS << 9) | 0x19
+#define EC_WORD_STURDY (EC_GROUP_STATUS << 9) | 0x1a
+#define EC_WORD_SUCTION_CUPS (EC_GROUP_STATUS << 9) | 0x1b
+#define EC_WORD_GRASS (EC_GROUP_STATUS << 9) | 0x1c
+#define EC_WORD_CLEAR_BODY (EC_GROUP_STATUS << 9) | 0x1d
+#define EC_WORD_TORRENT (EC_GROUP_STATUS << 9) | 0x1e
+#define EC_WORD_GHOST (EC_GROUP_STATUS << 9) | 0x1f
+#define EC_WORD_ICE (EC_GROUP_STATUS << 9) | 0x20
+#define EC_WORD_GUTS (EC_GROUP_STATUS << 9) | 0x21
+#define EC_WORD_ROUGH_SKIN (EC_GROUP_STATUS << 9) | 0x22
+#define EC_WORD_SHELL_ARMOR (EC_GROUP_STATUS << 9) | 0x23
+#define EC_WORD_NATURAL_CURE (EC_GROUP_STATUS << 9) | 0x24
+#define EC_WORD_DAMP (EC_GROUP_STATUS << 9) | 0x25
+#define EC_WORD_GROUND (EC_GROUP_STATUS << 9) | 0x26
+#define EC_WORD_LIMBER (EC_GROUP_STATUS << 9) | 0x27
+#define EC_WORD_MAGNET_PULL (EC_GROUP_STATUS << 9) | 0x28
+#define EC_WORD_WHITE_SMOKE (EC_GROUP_STATUS << 9) | 0x29
+#define EC_WORD_SYNCHRONIZE (EC_GROUP_STATUS << 9) | 0x2a
+#define EC_WORD_OVERGROW (EC_GROUP_STATUS << 9) | 0x2b
+#define EC_WORD_SWIFT_SWIM (EC_GROUP_STATUS << 9) | 0x2c
+#define EC_WORD_SAND_STREAM (EC_GROUP_STATUS << 9) | 0x2d
+#define EC_WORD_SAND_VEIL (EC_GROUP_STATUS << 9) | 0x2e
+#define EC_WORD_KEEN_EYE (EC_GROUP_STATUS << 9) | 0x2f
+#define EC_WORD_INNER_FOCUS (EC_GROUP_STATUS << 9) | 0x30
+#define EC_WORD_STATIC (EC_GROUP_STATUS << 9) | 0x31
+#define EC_WORD_TYPE (EC_GROUP_STATUS << 9) | 0x32
+#define EC_WORD_TOUGH (EC_GROUP_STATUS << 9) | 0x33
+#define EC_WORD_TOUGHNESS (EC_GROUP_STATUS << 9) | 0x34
+#define EC_WORD_SHED_SKIN (EC_GROUP_STATUS << 9) | 0x35
+#define EC_WORD_HUGE_POWER (EC_GROUP_STATUS << 9) | 0x36
+#define EC_WORD_VOLT_ABSORB (EC_GROUP_STATUS << 9) | 0x37
+#define EC_WORD_WATER_ABSORB (EC_GROUP_STATUS << 9) | 0x38
+#define EC_WORD_ELECTRIC (EC_GROUP_STATUS << 9) | 0x39
+#define EC_WORD_FORECAST (EC_GROUP_STATUS << 9) | 0x3a
+#define EC_WORD_SERENE_GRACE (EC_GROUP_STATUS << 9) | 0x3b
+#define EC_WORD_POISON (EC_GROUP_STATUS << 9) | 0x3c
+#define EC_WORD_POISON_POINT (EC_GROUP_STATUS << 9) | 0x3d
+#define EC_WORD_DRAGON (EC_GROUP_STATUS << 9) | 0x3e
+#define EC_WORD_TRACE (EC_GROUP_STATUS << 9) | 0x3f
+#define EC_WORD_OBLIVIOUS (EC_GROUP_STATUS << 9) | 0x40
+#define EC_WORD_TRUANT (EC_GROUP_STATUS << 9) | 0x41
+#define EC_WORD_RUN_AWAY (EC_GROUP_STATUS << 9) | 0x42
+#define EC_WORD_STICKY_HOLD (EC_GROUP_STATUS << 9) | 0x43
+#define EC_WORD_CLOUD_NINE (EC_GROUP_STATUS << 9) | 0x44
+#define EC_WORD_NORMAL (EC_GROUP_STATUS << 9) | 0x45
+#define EC_WORD_STEEL (EC_GROUP_STATUS << 9) | 0x46
+#define EC_WORD_ILLUMINATE (EC_GROUP_STATUS << 9) | 0x47
+#define EC_WORD_EARLY_BIRD (EC_GROUP_STATUS << 9) | 0x48
+#define EC_WORD_HUSTLE (EC_GROUP_STATUS << 9) | 0x49
+#define EC_WORD_SHINE (EC_GROUP_STATUS << 9) | 0x4a
+#define EC_WORD_FLYING (EC_GROUP_STATUS << 9) | 0x4b
+#define EC_WORD_DROUGHT (EC_GROUP_STATUS << 9) | 0x4c
+#define EC_WORD_LIGHTNINGROD (EC_GROUP_STATUS << 9) | 0x4d
+#define EC_WORD_COMPOUNDEYES (EC_GROUP_STATUS << 9) | 0x4e
+#define EC_WORD_MARVEL_SCALE (EC_GROUP_STATUS << 9) | 0x4f
+#define EC_WORD_WONDER_GUARD (EC_GROUP_STATUS << 9) | 0x50
+#define EC_WORD_INSOMNIA (EC_GROUP_STATUS << 9) | 0x51
+#define EC_WORD_LEVITATE (EC_GROUP_STATUS << 9) | 0x52
+#define EC_WORD_PLUS (EC_GROUP_STATUS << 9) | 0x53
+#define EC_WORD_PRESSURE (EC_GROUP_STATUS << 9) | 0x54
+#define EC_WORD_LIQUID_OOZE (EC_GROUP_STATUS << 9) | 0x55
+#define EC_WORD_COLOR_CHANGE (EC_GROUP_STATUS << 9) | 0x56
+#define EC_WORD_SOUNDPROOF (EC_GROUP_STATUS << 9) | 0x57
+#define EC_WORD_EFFECT_SPORE (EC_GROUP_STATUS << 9) | 0x58
+#define EC_WORD_PKRS (EC_GROUP_STATUS << 9) | 0x59
+#define EC_WORD_FIRE (EC_GROUP_STATUS << 9) | 0x5a
+#define EC_WORD_FLAME_BODY (EC_GROUP_STATUS << 9) | 0x5b
+#define EC_WORD_MINUS (EC_GROUP_STATUS << 9) | 0x5c
+#define EC_WORD_OWN_TEMPO (EC_GROUP_STATUS << 9) | 0x5d
+#define EC_WORD_MAGMA_ARMOR (EC_GROUP_STATUS << 9) | 0x5e
+#define EC_WORD_WATER (EC_GROUP_STATUS << 9) | 0x5f
+#define EC_WORD_WATER_VEIL (EC_GROUP_STATUS << 9) | 0x60
+#define EC_WORD_BUG (EC_GROUP_STATUS << 9) | 0x61
+#define EC_WORD_SWARM (EC_GROUP_STATUS << 9) | 0x62
+#define EC_WORD_CUTE_CHARM (EC_GROUP_STATUS << 9) | 0x63
+#define EC_WORD_IMMUNITY (EC_GROUP_STATUS << 9) | 0x64
+#define EC_WORD_BLAZE (EC_GROUP_STATUS << 9) | 0x65
+#define EC_WORD_PICKUP (EC_GROUP_STATUS << 9) | 0x66
+#define EC_WORD_PATTERN (EC_GROUP_STATUS << 9) | 0x67
+#define EC_WORD_FLASH_FIRE (EC_GROUP_STATUS << 9) | 0x68
+#define EC_WORD_VITAL_SPIRIT (EC_GROUP_STATUS << 9) | 0x69
+#define EC_WORD_CHLOROPHYLL (EC_GROUP_STATUS << 9) | 0x6a
+#define EC_WORD_PURE_POWER (EC_GROUP_STATUS << 9) | 0x6b
+#define EC_WORD_SHIELD_DUST (EC_GROUP_STATUS << 9) | 0x6c
+
+// BATTLE
+#define EC_WORD_MATCH_UP (EC_GROUP_BATTLE << 9) | 0x0
+#define EC_WORD_GO (EC_GROUP_BATTLE << 9) | 0x1
+#define EC_WORD_NO_1 (EC_GROUP_BATTLE << 9) | 0x2
+#define EC_WORD_DECIDE (EC_GROUP_BATTLE << 9) | 0x3
+#define EC_WORD_LET_ME_WIN (EC_GROUP_BATTLE << 9) | 0x4
+#define EC_WORD_WINS (EC_GROUP_BATTLE << 9) | 0x5
+#define EC_WORD_WIN (EC_GROUP_BATTLE << 9) | 0x6
+#define EC_WORD_WON (EC_GROUP_BATTLE << 9) | 0x7
+#define EC_WORD_IF_I_WIN (EC_GROUP_BATTLE << 9) | 0x8
+#define EC_WORD_WHEN_I_WIN (EC_GROUP_BATTLE << 9) | 0x9
+#define EC_WORD_CAN_T_WIN (EC_GROUP_BATTLE << 9) | 0xa
+#define EC_WORD_CAN_WIN (EC_GROUP_BATTLE << 9) | 0xb
+#define EC_WORD_NO_MATCH (EC_GROUP_BATTLE << 9) | 0xc
+#define EC_WORD_SPIRIT (EC_GROUP_BATTLE << 9) | 0xd
+#define EC_WORD_DECIDED (EC_GROUP_BATTLE << 9) | 0xe
+#define EC_WORD_TRUMP_CARD (EC_GROUP_BATTLE << 9) | 0xf
+#define EC_WORD_TAKE_THAT (EC_GROUP_BATTLE << 9) | 0x10
+#define EC_WORD_COME_ON (EC_GROUP_BATTLE << 9) | 0x11
+#define EC_WORD_ATTACK (EC_GROUP_BATTLE << 9) | 0x12
+#define EC_WORD_SURRENDER (EC_GROUP_BATTLE << 9) | 0x13
+#define EC_WORD_GUTSY (EC_GROUP_BATTLE << 9) | 0x14
+#define EC_WORD_TALENT (EC_GROUP_BATTLE << 9) | 0x15
+#define EC_WORD_STRATEGY (EC_GROUP_BATTLE << 9) | 0x16
+#define EC_WORD_SMITE (EC_GROUP_BATTLE << 9) | 0x17
+#define EC_WORD_MATCH (EC_GROUP_BATTLE << 9) | 0x18
+#define EC_WORD_VICTORY (EC_GROUP_BATTLE << 9) | 0x19
+#define EC_WORD_OFFENSIVE (EC_GROUP_BATTLE << 9) | 0x1a
+#define EC_WORD_SENSE (EC_GROUP_BATTLE << 9) | 0x1b
+#define EC_WORD_VERSUS (EC_GROUP_BATTLE << 9) | 0x1c
+#define EC_WORD_FIGHTS (EC_GROUP_BATTLE << 9) | 0x1d
+#define EC_WORD_POWER (EC_GROUP_BATTLE << 9) | 0x1e
+#define EC_WORD_CHALLENGE (EC_GROUP_BATTLE << 9) | 0x1f
+#define EC_WORD_STRONG (EC_GROUP_BATTLE << 9) | 0x20
+#define EC_WORD_TOO_STRONG (EC_GROUP_BATTLE << 9) | 0x21
+#define EC_WORD_GO_EASY (EC_GROUP_BATTLE << 9) | 0x22
+#define EC_WORD_FOE (EC_GROUP_BATTLE << 9) | 0x23
+#define EC_WORD_GENIUS (EC_GROUP_BATTLE << 9) | 0x24
+#define EC_WORD_LEGEND (EC_GROUP_BATTLE << 9) | 0x25
+#define EC_WORD_ESCAPE (EC_GROUP_BATTLE << 9) | 0x26
+#define EC_WORD_AIM (EC_GROUP_BATTLE << 9) | 0x27
+#define EC_WORD_BATTLE (EC_GROUP_BATTLE << 9) | 0x28
+#define EC_WORD_FIGHT (EC_GROUP_BATTLE << 9) | 0x29
+#define EC_WORD_RESUSCITATE (EC_GROUP_BATTLE << 9) | 0x2a
+#define EC_WORD_POINTS (EC_GROUP_BATTLE << 9) | 0x2b
+#define EC_WORD_SERIOUS (EC_GROUP_BATTLE << 9) | 0x2c
+#define EC_WORD_GIVE_UP (EC_GROUP_BATTLE << 9) | 0x2d
+#define EC_WORD_LOSS (EC_GROUP_BATTLE << 9) | 0x2e
+#define EC_WORD_IF_I_LOSE (EC_GROUP_BATTLE << 9) | 0x2f
+#define EC_WORD_LOST (EC_GROUP_BATTLE << 9) | 0x30
+#define EC_WORD_LOSE (EC_GROUP_BATTLE << 9) | 0x31
+#define EC_WORD_GUARD (EC_GROUP_BATTLE << 9) | 0x32
+#define EC_WORD_PARTNER (EC_GROUP_BATTLE << 9) | 0x33
+#define EC_WORD_REJECT (EC_GROUP_BATTLE << 9) | 0x34
+#define EC_WORD_ACCEPT (EC_GROUP_BATTLE << 9) | 0x35
+#define EC_WORD_INVINCIBLE (EC_GROUP_BATTLE << 9) | 0x36
+#define EC_WORD_RECEIVED (EC_GROUP_BATTLE << 9) | 0x37
+#define EC_WORD_EASY (EC_GROUP_BATTLE << 9) | 0x38
+#define EC_WORD_WEAK (EC_GROUP_BATTLE << 9) | 0x39
+#define EC_WORD_TOO_WEAK (EC_GROUP_BATTLE << 9) | 0x3a
+#define EC_WORD_PUSHOVER (EC_GROUP_BATTLE << 9) | 0x3b
+#define EC_WORD_LEADER (EC_GROUP_BATTLE << 9) | 0x3c
+#define EC_WORD_RULE (EC_GROUP_BATTLE << 9) | 0x3d
+#define EC_WORD_MOVE (EC_GROUP_BATTLE << 9) | 0x3e
+
+// GREETINGS
+#define EC_WORD_THANKS (EC_GROUP_GREETINGS << 9) | 0x0
+#define EC_WORD_YES (EC_GROUP_GREETINGS << 9) | 0x1
+#define EC_WORD_HERE_GOES (EC_GROUP_GREETINGS << 9) | 0x2
+#define EC_WORD_HERE_I_COME (EC_GROUP_GREETINGS << 9) | 0x3
+#define EC_WORD_HERE_IT_IS (EC_GROUP_GREETINGS << 9) | 0x4
+#define EC_WORD_YEAH (EC_GROUP_GREETINGS << 9) | 0x5
+#define EC_WORD_WELCOME (EC_GROUP_GREETINGS << 9) | 0x6
+#define EC_WORD_OI (EC_GROUP_GREETINGS << 9) | 0x7
+#define EC_WORD_HOW_DO (EC_GROUP_GREETINGS << 9) | 0x8
+#define EC_WORD_CONGRATS (EC_GROUP_GREETINGS << 9) | 0x9
+#define EC_WORD_GIVE_ME (EC_GROUP_GREETINGS << 9) | 0xa
+#define EC_WORD_SORRY (EC_GROUP_GREETINGS << 9) | 0xb
+#define EC_WORD_APOLOGIZE (EC_GROUP_GREETINGS << 9) | 0xc
+#define EC_WORD_FORGIVE (EC_GROUP_GREETINGS << 9) | 0xd
+#define EC_WORD_HEY_THERE (EC_GROUP_GREETINGS << 9) | 0xe
+#define EC_WORD_HELLO (EC_GROUP_GREETINGS << 9) | 0xf
+#define EC_WORD_GOOD_BYE (EC_GROUP_GREETINGS << 9) | 0x10
+#define EC_WORD_THANK_YOU (EC_GROUP_GREETINGS << 9) | 0x11
+#define EC_WORD_I_VE_ARRIVED (EC_GROUP_GREETINGS << 9) | 0x12
+#define EC_WORD_PARDON (EC_GROUP_GREETINGS << 9) | 0x13
+#define EC_WORD_EXCUSE (EC_GROUP_GREETINGS << 9) | 0x14
+#define EC_WORD_SEE_YA (EC_GROUP_GREETINGS << 9) | 0x15
+#define EC_WORD_EXCUSE_ME (EC_GROUP_GREETINGS << 9) | 0x16
+#define EC_WORD_WELL_THEN (EC_GROUP_GREETINGS << 9) | 0x17
+#define EC_WORD_GO_AHEAD (EC_GROUP_GREETINGS << 9) | 0x18
+#define EC_WORD_APPRECIATE (EC_GROUP_GREETINGS << 9) | 0x19
+#define EC_WORD_HEY_QUES (EC_GROUP_GREETINGS << 9) | 0x1a
+#define EC_WORD_WHAT_S_UP_QUES (EC_GROUP_GREETINGS << 9) | 0x1b
+#define EC_WORD_HUH_QUES (EC_GROUP_GREETINGS << 9) | 0x1c
+#define EC_WORD_NO (EC_GROUP_GREETINGS << 9) | 0x1d
+#define EC_WORD_HI (EC_GROUP_GREETINGS << 9) | 0x1e
+#define EC_WORD_YEAH_YEAH (EC_GROUP_GREETINGS << 9) | 0x1f
+#define EC_WORD_BYE_BYE (EC_GROUP_GREETINGS << 9) | 0x20
+#define EC_WORD_MEET_YOU (EC_GROUP_GREETINGS << 9) | 0x21
+#define EC_WORD_HEY (EC_GROUP_GREETINGS << 9) | 0x22
+#define EC_WORD_SMELL (EC_GROUP_GREETINGS << 9) | 0x23
+#define EC_WORD_LISTENING (EC_GROUP_GREETINGS << 9) | 0x24
+#define EC_WORD_HOO_HAH (EC_GROUP_GREETINGS << 9) | 0x25
+#define EC_WORD_YAHOO (EC_GROUP_GREETINGS << 9) | 0x26
+#define EC_WORD_YO (EC_GROUP_GREETINGS << 9) | 0x27
+#define EC_WORD_COME_OVER (EC_GROUP_GREETINGS << 9) | 0x28
+#define EC_WORD_COUNT_ON (EC_GROUP_GREETINGS << 9) | 0x29
+
+// PEOPLE
+#define EC_WORD_OPPONENT (EC_GROUP_PEOPLE << 9) | 0x0
+#define EC_WORD_I (EC_GROUP_PEOPLE << 9) | 0x1
+#define EC_WORD_YOU (EC_GROUP_PEOPLE << 9) | 0x2
+#define EC_WORD_YOURS (EC_GROUP_PEOPLE << 9) | 0x3
+#define EC_WORD_SON (EC_GROUP_PEOPLE << 9) | 0x4
+#define EC_WORD_YOUR (EC_GROUP_PEOPLE << 9) | 0x5
+#define EC_WORD_YOU_RE (EC_GROUP_PEOPLE << 9) | 0x6
+#define EC_WORD_YOU_VE (EC_GROUP_PEOPLE << 9) | 0x7
+#define EC_WORD_MOTHER (EC_GROUP_PEOPLE << 9) | 0x8
+#define EC_WORD_GRANDFATHER (EC_GROUP_PEOPLE << 9) | 0x9
+#define EC_WORD_UNCLE (EC_GROUP_PEOPLE << 9) | 0xa
+#define EC_WORD_FATHER (EC_GROUP_PEOPLE << 9) | 0xb
+#define EC_WORD_BOY (EC_GROUP_PEOPLE << 9) | 0xc
+#define EC_WORD_ADULT (EC_GROUP_PEOPLE << 9) | 0xd
+#define EC_WORD_BROTHER (EC_GROUP_PEOPLE << 9) | 0xe
+#define EC_WORD_SISTER (EC_GROUP_PEOPLE << 9) | 0xf
+#define EC_WORD_GRANDMOTHER (EC_GROUP_PEOPLE << 9) | 0x10
+#define EC_WORD_AUNT (EC_GROUP_PEOPLE << 9) | 0x11
+#define EC_WORD_PARENT (EC_GROUP_PEOPLE << 9) | 0x12
+#define EC_WORD_MAN (EC_GROUP_PEOPLE << 9) | 0x13
+#define EC_WORD_ME (EC_GROUP_PEOPLE << 9) | 0x14
+#define EC_WORD_GIRL (EC_GROUP_PEOPLE << 9) | 0x15
+#define EC_WORD_BABE (EC_GROUP_PEOPLE << 9) | 0x16
+#define EC_WORD_FAMILY (EC_GROUP_PEOPLE << 9) | 0x17
+#define EC_WORD_HER (EC_GROUP_PEOPLE << 9) | 0x18
+#define EC_WORD_HIM (EC_GROUP_PEOPLE << 9) | 0x19
+#define EC_WORD_HE (EC_GROUP_PEOPLE << 9) | 0x1a
+#define EC_WORD_PLACE (EC_GROUP_PEOPLE << 9) | 0x1b
+#define EC_WORD_DAUGHTER (EC_GROUP_PEOPLE << 9) | 0x1c
+#define EC_WORD_HIS (EC_GROUP_PEOPLE << 9) | 0x1d
+#define EC_WORD_HE_S (EC_GROUP_PEOPLE << 9) | 0x1e
+#define EC_WORD_AREN_T (EC_GROUP_PEOPLE << 9) | 0x1f
+#define EC_WORD_SIBLINGS (EC_GROUP_PEOPLE << 9) | 0x20
+#define EC_WORD_KID (EC_GROUP_PEOPLE << 9) | 0x21
+#define EC_WORD_CHILDREN (EC_GROUP_PEOPLE << 9) | 0x22
+#define EC_WORD_MR (EC_GROUP_PEOPLE << 9) | 0x23
+#define EC_WORD_MRS (EC_GROUP_PEOPLE << 9) | 0x24
+#define EC_WORD_MYSELF (EC_GROUP_PEOPLE << 9) | 0x25
+#define EC_WORD_I_WAS (EC_GROUP_PEOPLE << 9) | 0x26
+#define EC_WORD_TO_ME (EC_GROUP_PEOPLE << 9) | 0x27
+#define EC_WORD_MY (EC_GROUP_PEOPLE << 9) | 0x28
+#define EC_WORD_I_AM (EC_GROUP_PEOPLE << 9) | 0x29
+#define EC_WORD_I_VE (EC_GROUP_PEOPLE << 9) | 0x2a
+#define EC_WORD_WHO (EC_GROUP_PEOPLE << 9) | 0x2b
+#define EC_WORD_SOMEONE (EC_GROUP_PEOPLE << 9) | 0x2c
+#define EC_WORD_WHO_WAS (EC_GROUP_PEOPLE << 9) | 0x2d
+#define EC_WORD_TO_WHOM (EC_GROUP_PEOPLE << 9) | 0x2e
+#define EC_WORD_WHOSE (EC_GROUP_PEOPLE << 9) | 0x2f
+#define EC_WORD_WHO_IS (EC_GROUP_PEOPLE << 9) | 0x30
+#define EC_WORD_IT_S (EC_GROUP_PEOPLE << 9) | 0x31
+#define EC_WORD_LADY (EC_GROUP_PEOPLE << 9) | 0x32
+#define EC_WORD_FRIEND (EC_GROUP_PEOPLE << 9) | 0x33
+#define EC_WORD_ALLY (EC_GROUP_PEOPLE << 9) | 0x34
+#define EC_WORD_PERSON (EC_GROUP_PEOPLE << 9) | 0x35
+#define EC_WORD_DUDE (EC_GROUP_PEOPLE << 9) | 0x36
+#define EC_WORD_THEY (EC_GROUP_PEOPLE << 9) | 0x37
+#define EC_WORD_THEY_WERE (EC_GROUP_PEOPLE << 9) | 0x38
+#define EC_WORD_TO_THEM (EC_GROUP_PEOPLE << 9) | 0x39
+#define EC_WORD_THEIR (EC_GROUP_PEOPLE << 9) | 0x3a
+#define EC_WORD_THEY_RE (EC_GROUP_PEOPLE << 9) | 0x3b
+#define EC_WORD_THEY_VE (EC_GROUP_PEOPLE << 9) | 0x3c
+#define EC_WORD_WE (EC_GROUP_PEOPLE << 9) | 0x3d
+#define EC_WORD_BEEN (EC_GROUP_PEOPLE << 9) | 0x3e
+#define EC_WORD_TO_US (EC_GROUP_PEOPLE << 9) | 0x3f
+#define EC_WORD_OUR (EC_GROUP_PEOPLE << 9) | 0x40
+#define EC_WORD_WE_RE (EC_GROUP_PEOPLE << 9) | 0x41
+#define EC_WORD_RIVAL (EC_GROUP_PEOPLE << 9) | 0x42
+#define EC_WORD_WE_VE (EC_GROUP_PEOPLE << 9) | 0x43
+#define EC_WORD_WOMAN (EC_GROUP_PEOPLE << 9) | 0x44
+#define EC_WORD_SHE (EC_GROUP_PEOPLE << 9) | 0x45
+#define EC_WORD_SHE_WAS (EC_GROUP_PEOPLE << 9) | 0x46
+#define EC_WORD_TO_HER (EC_GROUP_PEOPLE << 9) | 0x47
+#define EC_WORD_HERS (EC_GROUP_PEOPLE << 9) | 0x48
+#define EC_WORD_SHE_IS (EC_GROUP_PEOPLE << 9) | 0x49
+#define EC_WORD_SOME (EC_GROUP_PEOPLE << 9) | 0x4a
+
+// VOICES
+#define EC_WORD_EXCL (EC_GROUP_VOICES << 9) | 0x0
+#define EC_WORD_EXCL_EXCL (EC_GROUP_VOICES << 9) | 0x1
+#define EC_WORD_QUES_EXCL (EC_GROUP_VOICES << 9) | 0x2
+#define EC_WORD_QUES (EC_GROUP_VOICES << 9) | 0x3
+#define EC_WORD_ELLIPSIS (EC_GROUP_VOICES << 9) | 0x4
+#define EC_WORD_ELLIPSIS_EXCL (EC_GROUP_VOICES << 9) | 0x5
+#define EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS (EC_GROUP_VOICES << 9) | 0x6
+#define EC_WORD_DASH (EC_GROUP_VOICES << 9) | 0x7
+#define EC_WORD_DASH_DASH_DASH (EC_GROUP_VOICES << 9) | 0x8
+#define EC_WORD_UH_OH (EC_GROUP_VOICES << 9) | 0x9
+#define EC_WORD_WAAAH (EC_GROUP_VOICES << 9) | 0xa
+#define EC_WORD_AHAHA (EC_GROUP_VOICES << 9) | 0xb
+#define EC_WORD_OH_QUES (EC_GROUP_VOICES << 9) | 0xc
+#define EC_WORD_NOPE (EC_GROUP_VOICES << 9) | 0xd
+#define EC_WORD_URGH (EC_GROUP_VOICES << 9) | 0xe
+#define EC_WORD_HMM (EC_GROUP_VOICES << 9) | 0xf
+#define EC_WORD_WHOAH (EC_GROUP_VOICES << 9) | 0x10
+#define EC_WORD_WROOOAAR_EXCL (EC_GROUP_VOICES << 9) | 0x11
+#define EC_WORD_WOW (EC_GROUP_VOICES << 9) | 0x12
+#define EC_WORD_GIGGLE (EC_GROUP_VOICES << 9) | 0x13
+#define EC_WORD_SIGH (EC_GROUP_VOICES << 9) | 0x14
+#define EC_WORD_UNBELIEVABLE (EC_GROUP_VOICES << 9) | 0x15
+#define EC_WORD_CRIES (EC_GROUP_VOICES << 9) | 0x16
+#define EC_WORD_AGREE (EC_GROUP_VOICES << 9) | 0x17
+#define EC_WORD_EH_QUES (EC_GROUP_VOICES << 9) | 0x18
+#define EC_WORD_CRY (EC_GROUP_VOICES << 9) | 0x19
+#define EC_WORD_EHEHE (EC_GROUP_VOICES << 9) | 0x1a
+#define EC_WORD_OI_OI_OI (EC_GROUP_VOICES << 9) | 0x1b
+#define EC_WORD_OH_YEAH (EC_GROUP_VOICES << 9) | 0x1c
+#define EC_WORD_OH (EC_GROUP_VOICES << 9) | 0x1d
+#define EC_WORD_OOPS (EC_GROUP_VOICES << 9) | 0x1e
+#define EC_WORD_SHOCKED (EC_GROUP_VOICES << 9) | 0x1f
+#define EC_WORD_EEK (EC_GROUP_VOICES << 9) | 0x20
+#define EC_WORD_GRAAAH (EC_GROUP_VOICES << 9) | 0x21
+#define EC_WORD_GWAHAHAHA (EC_GROUP_VOICES << 9) | 0x22
+#define EC_WORD_WAY (EC_GROUP_VOICES << 9) | 0x23
+#define EC_WORD_TCH (EC_GROUP_VOICES << 9) | 0x24
+#define EC_WORD_HEHE (EC_GROUP_VOICES << 9) | 0x25
+#define EC_WORD_HAH (EC_GROUP_VOICES << 9) | 0x26
+#define EC_WORD_YUP (EC_GROUP_VOICES << 9) | 0x27
+#define EC_WORD_HAHAHA (EC_GROUP_VOICES << 9) | 0x28
+#define EC_WORD_AIYEEH (EC_GROUP_VOICES << 9) | 0x29
+#define EC_WORD_HIYAH (EC_GROUP_VOICES << 9) | 0x2a
+#define EC_WORD_FUFUFU (EC_GROUP_VOICES << 9) | 0x2b
+#define EC_WORD_LOL (EC_GROUP_VOICES << 9) | 0x2c
+#define EC_WORD_SNORT (EC_GROUP_VOICES << 9) | 0x2d
+#define EC_WORD_HUMPH (EC_GROUP_VOICES << 9) | 0x2e
+#define EC_WORD_HEHEHE (EC_GROUP_VOICES << 9) | 0x2f
+#define EC_WORD_HEH (EC_GROUP_VOICES << 9) | 0x30
+#define EC_WORD_HOHOHO (EC_GROUP_VOICES << 9) | 0x31
+#define EC_WORD_UH_HUH (EC_GROUP_VOICES << 9) | 0x32
+#define EC_WORD_OH_DEAR (EC_GROUP_VOICES << 9) | 0x33
+#define EC_WORD_ARRGH (EC_GROUP_VOICES << 9) | 0x34
+#define EC_WORD_MUFUFU (EC_GROUP_VOICES << 9) | 0x35
+#define EC_WORD_MMM (EC_GROUP_VOICES << 9) | 0x36
+#define EC_WORD_OH_KAY (EC_GROUP_VOICES << 9) | 0x37
+#define EC_WORD_OKAY (EC_GROUP_VOICES << 9) | 0x38
+#define EC_WORD_LALALA (EC_GROUP_VOICES << 9) | 0x39
+#define EC_WORD_YAY (EC_GROUP_VOICES << 9) | 0x3a
+#define EC_WORD_AWW (EC_GROUP_VOICES << 9) | 0x3b
+#define EC_WORD_WOWEE (EC_GROUP_VOICES << 9) | 0x3c
+#define EC_WORD_GWAH (EC_GROUP_VOICES << 9) | 0x3d
+#define EC_WORD_WAHAHAHA (EC_GROUP_VOICES << 9) | 0x3e
+
+// SPEECH
+#define EC_WORD_LISTEN (EC_GROUP_SPEECH << 9) | 0x0
+#define EC_WORD_NOT_VERY (EC_GROUP_SPEECH << 9) | 0x1
+#define EC_WORD_MEAN (EC_GROUP_SPEECH << 9) | 0x2
+#define EC_WORD_LIE (EC_GROUP_SPEECH << 9) | 0x3
+#define EC_WORD_LAY (EC_GROUP_SPEECH << 9) | 0x4
+#define EC_WORD_RECOMMEND (EC_GROUP_SPEECH << 9) | 0x5
+#define EC_WORD_NITWIT (EC_GROUP_SPEECH << 9) | 0x6
+#define EC_WORD_QUITE (EC_GROUP_SPEECH << 9) | 0x7
+#define EC_WORD_FROM (EC_GROUP_SPEECH << 9) | 0x8
+#define EC_WORD_FEELING (EC_GROUP_SPEECH << 9) | 0x9
+#define EC_WORD_BUT (EC_GROUP_SPEECH << 9) | 0xa
+#define EC_WORD_HOWEVER (EC_GROUP_SPEECH << 9) | 0xb
+#define EC_WORD_CASE (EC_GROUP_SPEECH << 9) | 0xc
+#define EC_WORD_THE (EC_GROUP_SPEECH << 9) | 0xd
+#define EC_WORD_MISS (EC_GROUP_SPEECH << 9) | 0xe
+#define EC_WORD_HOW (EC_GROUP_SPEECH << 9) | 0xf
+#define EC_WORD_HIT (EC_GROUP_SPEECH << 9) | 0x10
+#define EC_WORD_ENOUGH (EC_GROUP_SPEECH << 9) | 0x11
+#define EC_WORD_A_LOT (EC_GROUP_SPEECH << 9) | 0x12
+#define EC_WORD_A_LITTLE (EC_GROUP_SPEECH << 9) | 0x13
+#define EC_WORD_ABSOLUTELY (EC_GROUP_SPEECH << 9) | 0x14
+#define EC_WORD_AND (EC_GROUP_SPEECH << 9) | 0x15
+#define EC_WORD_ONLY (EC_GROUP_SPEECH << 9) | 0x16
+#define EC_WORD_AROUND (EC_GROUP_SPEECH << 9) | 0x17
+#define EC_WORD_PROBABLY (EC_GROUP_SPEECH << 9) | 0x18
+#define EC_WORD_IF (EC_GROUP_SPEECH << 9) | 0x19
+#define EC_WORD_VERY (EC_GROUP_SPEECH << 9) | 0x1a
+#define EC_WORD_A_TINY_BIT (EC_GROUP_SPEECH << 9) | 0x1b
+#define EC_WORD_WILD (EC_GROUP_SPEECH << 9) | 0x1c
+#define EC_WORD_THAT_S (EC_GROUP_SPEECH << 9) | 0x1d
+#define EC_WORD_JUST (EC_GROUP_SPEECH << 9) | 0x1e
+#define EC_WORD_EVEN_SO (EC_GROUP_SPEECH << 9) | 0x1f
+#define EC_WORD_MUST_BE (EC_GROUP_SPEECH << 9) | 0x20
+#define EC_WORD_NATURALLY (EC_GROUP_SPEECH << 9) | 0x21
+#define EC_WORD_FOR_NOW (EC_GROUP_SPEECH << 9) | 0x22
+#define EC_WORD_UNDERSTOOD (EC_GROUP_SPEECH << 9) | 0x23
+#define EC_WORD_JOKING (EC_GROUP_SPEECH << 9) | 0x24
+#define EC_WORD_READY (EC_GROUP_SPEECH << 9) | 0x25
+#define EC_WORD_SOMETHING (EC_GROUP_SPEECH << 9) | 0x26
+#define EC_WORD_SOMEHOW (EC_GROUP_SPEECH << 9) | 0x27
+#define EC_WORD_ALTHOUGH (EC_GROUP_SPEECH << 9) | 0x28
+#define EC_WORD_ALSO (EC_GROUP_SPEECH << 9) | 0x29
+#define EC_WORD_PERFECT (EC_GROUP_SPEECH << 9) | 0x2a
+#define EC_WORD_AS_MUCH_AS (EC_GROUP_SPEECH << 9) | 0x2b
+#define EC_WORD_REALLY (EC_GROUP_SPEECH << 9) | 0x2c
+#define EC_WORD_TRULY (EC_GROUP_SPEECH << 9) | 0x2d
+#define EC_WORD_SERIOUSLY (EC_GROUP_SPEECH << 9) | 0x2e
+#define EC_WORD_TOTALLY (EC_GROUP_SPEECH << 9) | 0x2f
+#define EC_WORD_UNTIL (EC_GROUP_SPEECH << 9) | 0x30
+#define EC_WORD_AS_IF (EC_GROUP_SPEECH << 9) | 0x31
+#define EC_WORD_MOOD (EC_GROUP_SPEECH << 9) | 0x32
+#define EC_WORD_RATHER (EC_GROUP_SPEECH << 9) | 0x33
+#define EC_WORD_AWFULLY (EC_GROUP_SPEECH << 9) | 0x34
+#define EC_WORD_MODE (EC_GROUP_SPEECH << 9) | 0x35
+#define EC_WORD_MORE (EC_GROUP_SPEECH << 9) | 0x36
+#define EC_WORD_TOO_LATE (EC_GROUP_SPEECH << 9) | 0x37
+#define EC_WORD_FINALLY (EC_GROUP_SPEECH << 9) | 0x38
+#define EC_WORD_ANY (EC_GROUP_SPEECH << 9) | 0x39
+#define EC_WORD_INSTEAD (EC_GROUP_SPEECH << 9) | 0x3a
+#define EC_WORD_FANTASTIC (EC_GROUP_SPEECH << 9) | 0x3b
+
+// ENDINGS
+#define EC_WORD_WILL (EC_GROUP_ENDINGS << 9) | 0x0
+#define EC_WORD_WILL_BE_HERE (EC_GROUP_ENDINGS << 9) | 0x1
+#define EC_WORD_OR (EC_GROUP_ENDINGS << 9) | 0x2
+#define EC_WORD_TIMES (EC_GROUP_ENDINGS << 9) | 0x3
+#define EC_WORD_WONDER (EC_GROUP_ENDINGS << 9) | 0x4
+#define EC_WORD_IS_IT_QUES (EC_GROUP_ENDINGS << 9) | 0x5
+#define EC_WORD_BE (EC_GROUP_ENDINGS << 9) | 0x6
+#define EC_WORD_GIMME (EC_GROUP_ENDINGS << 9) | 0x7
+#define EC_WORD_COULD (EC_GROUP_ENDINGS << 9) | 0x8
+#define EC_WORD_LIKELY_TO (EC_GROUP_ENDINGS << 9) | 0x9
+#define EC_WORD_WOULD (EC_GROUP_ENDINGS << 9) | 0xa
+#define EC_WORD_IS (EC_GROUP_ENDINGS << 9) | 0xb
+#define EC_WORD_ISN_T_IT_QUES (EC_GROUP_ENDINGS << 9) | 0xc
+#define EC_WORD_LET_S (EC_GROUP_ENDINGS << 9) | 0xd
+#define EC_WORD_OTHER (EC_GROUP_ENDINGS << 9) | 0xe
+#define EC_WORD_ARE (EC_GROUP_ENDINGS << 9) | 0xf
+#define EC_WORD_WAS (EC_GROUP_ENDINGS << 9) | 0x10
+#define EC_WORD_WERE (EC_GROUP_ENDINGS << 9) | 0x11
+#define EC_WORD_THOSE (EC_GROUP_ENDINGS << 9) | 0x12
+#define EC_WORD_ISN_T (EC_GROUP_ENDINGS << 9) | 0x13
+#define EC_WORD_WON_T (EC_GROUP_ENDINGS << 9) | 0x14
+#define EC_WORD_CAN_T (EC_GROUP_ENDINGS << 9) | 0x15
+#define EC_WORD_CAN (EC_GROUP_ENDINGS << 9) | 0x16
+#define EC_WORD_DON_T (EC_GROUP_ENDINGS << 9) | 0x17
+#define EC_WORD_DO (EC_GROUP_ENDINGS << 9) | 0x18
+#define EC_WORD_DOES (EC_GROUP_ENDINGS << 9) | 0x19
+#define EC_WORD_WHOM (EC_GROUP_ENDINGS << 9) | 0x1a
+#define EC_WORD_WHICH (EC_GROUP_ENDINGS << 9) | 0x1b
+#define EC_WORD_WASN_T (EC_GROUP_ENDINGS << 9) | 0x1c
+#define EC_WORD_WEREN_T (EC_GROUP_ENDINGS << 9) | 0x1d
+#define EC_WORD_HAVE (EC_GROUP_ENDINGS << 9) | 0x1e
+#define EC_WORD_HAVEN_T (EC_GROUP_ENDINGS << 9) | 0x1f
+#define EC_WORD_A (EC_GROUP_ENDINGS << 9) | 0x20
+#define EC_WORD_AN (EC_GROUP_ENDINGS << 9) | 0x21
+#define EC_WORD_NOT (EC_GROUP_ENDINGS << 9) | 0x22
+#define EC_WORD_THERE (EC_GROUP_ENDINGS << 9) | 0x23
+#define EC_WORD_OK_QUES (EC_GROUP_ENDINGS << 9) | 0x24
+#define EC_WORD_SO (EC_GROUP_ENDINGS << 9) | 0x25
+#define EC_WORD_MAYBE (EC_GROUP_ENDINGS << 9) | 0x26
+#define EC_WORD_ABOUT (EC_GROUP_ENDINGS << 9) | 0x27
+#define EC_WORD_OVER (EC_GROUP_ENDINGS << 9) | 0x28
+#define EC_WORD_IT (EC_GROUP_ENDINGS << 9) | 0x29
+#define EC_WORD_ALL (EC_GROUP_ENDINGS << 9) | 0x2a
+#define EC_WORD_FOR (EC_GROUP_ENDINGS << 9) | 0x2b
+#define EC_WORD_ON (EC_GROUP_ENDINGS << 9) | 0x2c
+#define EC_WORD_OFF (EC_GROUP_ENDINGS << 9) | 0x2d
+#define EC_WORD_AS (EC_GROUP_ENDINGS << 9) | 0x2e
+#define EC_WORD_TO (EC_GROUP_ENDINGS << 9) | 0x2f
+#define EC_WORD_WITH (EC_GROUP_ENDINGS << 9) | 0x30
+#define EC_WORD_BETTER (EC_GROUP_ENDINGS << 9) | 0x31
+#define EC_WORD_EVER (EC_GROUP_ENDINGS << 9) | 0x32
+#define EC_WORD_SINCE (EC_GROUP_ENDINGS << 9) | 0x33
+#define EC_WORD_OF (EC_GROUP_ENDINGS << 9) | 0x34
+#define EC_WORD_BELONGS_TO (EC_GROUP_ENDINGS << 9) | 0x35
+#define EC_WORD_AT (EC_GROUP_ENDINGS << 9) | 0x36
+#define EC_WORD_IN (EC_GROUP_ENDINGS << 9) | 0x37
+#define EC_WORD_OUT (EC_GROUP_ENDINGS << 9) | 0x38
+#define EC_WORD_TOO (EC_GROUP_ENDINGS << 9) | 0x39
+#define EC_WORD_LIKE (EC_GROUP_ENDINGS << 9) | 0x3a
+#define EC_WORD_DID (EC_GROUP_ENDINGS << 9) | 0x3b
+#define EC_WORD_DIDN_T (EC_GROUP_ENDINGS << 9) | 0x3c
+#define EC_WORD_DOESN_T (EC_GROUP_ENDINGS << 9) | 0x3d
+#define EC_WORD_WITHOUT (EC_GROUP_ENDINGS << 9) | 0x3e
+#define EC_WORD_AFTER (EC_GROUP_ENDINGS << 9) | 0x3f
+#define EC_WORD_BEFORE (EC_GROUP_ENDINGS << 9) | 0x40
+#define EC_WORD_WHILE (EC_GROUP_ENDINGS << 9) | 0x41
+#define EC_WORD_THAN (EC_GROUP_ENDINGS << 9) | 0x42
+#define EC_WORD_ONCE (EC_GROUP_ENDINGS << 9) | 0x43
+#define EC_WORD_ANYWHERE (EC_GROUP_ENDINGS << 9) | 0x44
+
+// FEELINGS
+#define EC_WORD_MEET (EC_GROUP_FEELINGS << 9) | 0x0
+#define EC_WORD_PLAY (EC_GROUP_FEELINGS << 9) | 0x1
+#define EC_WORD_HURRIED (EC_GROUP_FEELINGS << 9) | 0x2
+#define EC_WORD_GOES (EC_GROUP_FEELINGS << 9) | 0x3
+#define EC_WORD_GIDDY (EC_GROUP_FEELINGS << 9) | 0x4
+#define EC_WORD_HAPPY (EC_GROUP_FEELINGS << 9) | 0x5
+#define EC_WORD_HAPPINESS (EC_GROUP_FEELINGS << 9) | 0x6
+#define EC_WORD_EXCITE (EC_GROUP_FEELINGS << 9) | 0x7
+#define EC_WORD_IMPORTANT (EC_GROUP_FEELINGS << 9) | 0x8
+#define EC_WORD_FUNNY (EC_GROUP_FEELINGS << 9) | 0x9
+#define EC_WORD_GOT (EC_GROUP_FEELINGS << 9) | 0xa
+#define EC_WORD_GO_HOME (EC_GROUP_FEELINGS << 9) | 0xb
+#define EC_WORD_DISAPPOINTED (EC_GROUP_FEELINGS << 9) | 0xc
+#define EC_WORD_DISAPPOINTS (EC_GROUP_FEELINGS << 9) | 0xd
+#define EC_WORD_SAD (EC_GROUP_FEELINGS << 9) | 0xe
+#define EC_WORD_TRY (EC_GROUP_FEELINGS << 9) | 0xf
+#define EC_WORD_TRIES (EC_GROUP_FEELINGS << 9) | 0x10
+#define EC_WORD_HEARS (EC_GROUP_FEELINGS << 9) | 0x11
+#define EC_WORD_THINK (EC_GROUP_FEELINGS << 9) | 0x12
+#define EC_WORD_HEAR (EC_GROUP_FEELINGS << 9) | 0x13
+#define EC_WORD_WANTS (EC_GROUP_FEELINGS << 9) | 0x14
+#define EC_WORD_MISHEARD (EC_GROUP_FEELINGS << 9) | 0x15
+#define EC_WORD_DISLIKE (EC_GROUP_FEELINGS << 9) | 0x16
+#define EC_WORD_ANGRY (EC_GROUP_FEELINGS << 9) | 0x17
+#define EC_WORD_ANGER (EC_GROUP_FEELINGS << 9) | 0x18
+#define EC_WORD_SCARY (EC_GROUP_FEELINGS << 9) | 0x19
+#define EC_WORD_LONESOME (EC_GROUP_FEELINGS << 9) | 0x1a
+#define EC_WORD_DISAPPOINT (EC_GROUP_FEELINGS << 9) | 0x1b
+#define EC_WORD_JOY (EC_GROUP_FEELINGS << 9) | 0x1c
+#define EC_WORD_GETS (EC_GROUP_FEELINGS << 9) | 0x1d
+#define EC_WORD_NEVER (EC_GROUP_FEELINGS << 9) | 0x1e
+#define EC_WORD_DARN (EC_GROUP_FEELINGS << 9) | 0x1f
+#define EC_WORD_DOWNCAST (EC_GROUP_FEELINGS << 9) | 0x20
+#define EC_WORD_INCREDIBLE (EC_GROUP_FEELINGS << 9) | 0x21
+#define EC_WORD_LIKES (EC_GROUP_FEELINGS << 9) | 0x22
+#define EC_WORD_DISLIKES (EC_GROUP_FEELINGS << 9) | 0x23
+#define EC_WORD_BORING (EC_GROUP_FEELINGS << 9) | 0x24
+#define EC_WORD_CARE (EC_GROUP_FEELINGS << 9) | 0x25
+#define EC_WORD_CARES (EC_GROUP_FEELINGS << 9) | 0x26
+#define EC_WORD_ALL_RIGHT (EC_GROUP_FEELINGS << 9) | 0x27
+#define EC_WORD_ADORE (EC_GROUP_FEELINGS << 9) | 0x28
+#define EC_WORD_DISASTER (EC_GROUP_FEELINGS << 9) | 0x29
+#define EC_WORD_ENJOY (EC_GROUP_FEELINGS << 9) | 0x2a
+#define EC_WORD_ENJOYS (EC_GROUP_FEELINGS << 9) | 0x2b
+#define EC_WORD_EAT (EC_GROUP_FEELINGS << 9) | 0x2c
+#define EC_WORD_LACKING (EC_GROUP_FEELINGS << 9) | 0x2d
+#define EC_WORD_BAD (EC_GROUP_FEELINGS << 9) | 0x2e
+#define EC_WORD_HARD (EC_GROUP_FEELINGS << 9) | 0x2f
+#define EC_WORD_TERRIBLE (EC_GROUP_FEELINGS << 9) | 0x30
+#define EC_WORD_SHOULD (EC_GROUP_FEELINGS << 9) | 0x31
+#define EC_WORD_NICE (EC_GROUP_FEELINGS << 9) | 0x32
+#define EC_WORD_DRINK (EC_GROUP_FEELINGS << 9) | 0x33
+#define EC_WORD_SURPRISE (EC_GROUP_FEELINGS << 9) | 0x34
+#define EC_WORD_FEAR (EC_GROUP_FEELINGS << 9) | 0x35
+#define EC_WORD_WANT (EC_GROUP_FEELINGS << 9) | 0x36
+#define EC_WORD_WAIT (EC_GROUP_FEELINGS << 9) | 0x37
+#define EC_WORD_SATISFIED (EC_GROUP_FEELINGS << 9) | 0x38
+#define EC_WORD_SEE (EC_GROUP_FEELINGS << 9) | 0x39
+#define EC_WORD_RARE (EC_GROUP_FEELINGS << 9) | 0x3a
+#define EC_WORD_NEGATIVE (EC_GROUP_FEELINGS << 9) | 0x3b
+#define EC_WORD_DONE (EC_GROUP_FEELINGS << 9) | 0x3c
+#define EC_WORD_DANGER (EC_GROUP_FEELINGS << 9) | 0x3d
+#define EC_WORD_DEFEATED (EC_GROUP_FEELINGS << 9) | 0x3e
+#define EC_WORD_BEAT (EC_GROUP_FEELINGS << 9) | 0x3f
+#define EC_WORD_GREAT (EC_GROUP_FEELINGS << 9) | 0x40
+#define EC_WORD_ROMANTIC (EC_GROUP_FEELINGS << 9) | 0x41
+#define EC_WORD_QUESTION (EC_GROUP_FEELINGS << 9) | 0x42
+#define EC_WORD_UNDERSTAND (EC_GROUP_FEELINGS << 9) | 0x43
+#define EC_WORD_UNDERSTANDS (EC_GROUP_FEELINGS << 9) | 0x44
+
+// CONDITIONS
+#define EC_WORD_HOT (EC_GROUP_CONDITIONS << 9) | 0x0
+#define EC_WORD_EXISTS (EC_GROUP_CONDITIONS << 9) | 0x1
+#define EC_WORD_EXCESS (EC_GROUP_CONDITIONS << 9) | 0x2
+#define EC_WORD_APPROVED (EC_GROUP_CONDITIONS << 9) | 0x3
+#define EC_WORD_HAS (EC_GROUP_CONDITIONS << 9) | 0x4
+#define EC_WORD_GOOD (EC_GROUP_CONDITIONS << 9) | 0x5
+#define EC_WORD_LESS (EC_GROUP_CONDITIONS << 9) | 0x6
+#define EC_WORD_MOMENTUM (EC_GROUP_CONDITIONS << 9) | 0x7
+#define EC_WORD_GOING (EC_GROUP_CONDITIONS << 9) | 0x8
+#define EC_WORD_WEIRD (EC_GROUP_CONDITIONS << 9) | 0x9
+#define EC_WORD_BUSY (EC_GROUP_CONDITIONS << 9) | 0xa
+#define EC_WORD_TOGETHER (EC_GROUP_CONDITIONS << 9) | 0xb
+#define EC_WORD_FULL (EC_GROUP_CONDITIONS << 9) | 0xc
+#define EC_WORD_ABSENT (EC_GROUP_CONDITIONS << 9) | 0xd
+#define EC_WORD_BEING (EC_GROUP_CONDITIONS << 9) | 0xe
+#define EC_WORD_NEED (EC_GROUP_CONDITIONS << 9) | 0xf
+#define EC_WORD_TASTY (EC_GROUP_CONDITIONS << 9) | 0x10
+#define EC_WORD_SKILLED (EC_GROUP_CONDITIONS << 9) | 0x11
+#define EC_WORD_NOISY (EC_GROUP_CONDITIONS << 9) | 0x12
+#define EC_WORD_BIG (EC_GROUP_CONDITIONS << 9) | 0x13
+#define EC_WORD_LATE (EC_GROUP_CONDITIONS << 9) | 0x14
+#define EC_WORD_CLOSE (EC_GROUP_CONDITIONS << 9) | 0x15
+#define EC_WORD_DOCILE (EC_GROUP_CONDITIONS << 9) | 0x16
+#define EC_WORD_AMUSING (EC_GROUP_CONDITIONS << 9) | 0x17
+#define EC_WORD_ENTERTAINING (EC_GROUP_CONDITIONS << 9) | 0x18
+#define EC_WORD_PERFECTION (EC_GROUP_CONDITIONS << 9) | 0x19
+#define EC_WORD_PRETTY (EC_GROUP_CONDITIONS << 9) | 0x1a
+#define EC_WORD_HEALTHY (EC_GROUP_CONDITIONS << 9) | 0x1b
+#define EC_WORD_EXCELLENT (EC_GROUP_CONDITIONS << 9) | 0x1c
+#define EC_WORD_UPSIDE_DOWN (EC_GROUP_CONDITIONS << 9) | 0x1d
+#define EC_WORD_COLD (EC_GROUP_CONDITIONS << 9) | 0x1e
+#define EC_WORD_REFRESHING (EC_GROUP_CONDITIONS << 9) | 0x1f
+#define EC_WORD_UNAVOIDABLE (EC_GROUP_CONDITIONS << 9) | 0x20
+#define EC_WORD_MUCH (EC_GROUP_CONDITIONS << 9) | 0x21
+#define EC_WORD_OVERWHELMING (EC_GROUP_CONDITIONS << 9) | 0x22
+#define EC_WORD_FABULOUS (EC_GROUP_CONDITIONS << 9) | 0x23
+#define EC_WORD_ELSE (EC_GROUP_CONDITIONS << 9) | 0x24
+#define EC_WORD_EXPENSIVE (EC_GROUP_CONDITIONS << 9) | 0x25
+#define EC_WORD_CORRECT (EC_GROUP_CONDITIONS << 9) | 0x26
+#define EC_WORD_IMPOSSIBLE (EC_GROUP_CONDITIONS << 9) | 0x27
+#define EC_WORD_SMALL (EC_GROUP_CONDITIONS << 9) | 0x28
+#define EC_WORD_DIFFERENT (EC_GROUP_CONDITIONS << 9) | 0x29
+#define EC_WORD_TIRED (EC_GROUP_CONDITIONS << 9) | 0x2a
+#define EC_WORD_SKILL (EC_GROUP_CONDITIONS << 9) | 0x2b
+#define EC_WORD_TOP (EC_GROUP_CONDITIONS << 9) | 0x2c
+#define EC_WORD_NON_STOP (EC_GROUP_CONDITIONS << 9) | 0x2d
+#define EC_WORD_PREPOSTEROUS (EC_GROUP_CONDITIONS << 9) | 0x2e
+#define EC_WORD_NONE (EC_GROUP_CONDITIONS << 9) | 0x2f
+#define EC_WORD_NOTHING (EC_GROUP_CONDITIONS << 9) | 0x30
+#define EC_WORD_NATURAL (EC_GROUP_CONDITIONS << 9) | 0x31
+#define EC_WORD_BECOMES (EC_GROUP_CONDITIONS << 9) | 0x32
+#define EC_WORD_LUKEWARM (EC_GROUP_CONDITIONS << 9) | 0x33
+#define EC_WORD_FAST (EC_GROUP_CONDITIONS << 9) | 0x34
+#define EC_WORD_LOW (EC_GROUP_CONDITIONS << 9) | 0x35
+#define EC_WORD_AWFUL (EC_GROUP_CONDITIONS << 9) | 0x36
+#define EC_WORD_ALONE (EC_GROUP_CONDITIONS << 9) | 0x37
+#define EC_WORD_BORED (EC_GROUP_CONDITIONS << 9) | 0x38
+#define EC_WORD_SECRET (EC_GROUP_CONDITIONS << 9) | 0x39
+#define EC_WORD_MYSTERY (EC_GROUP_CONDITIONS << 9) | 0x3a
+#define EC_WORD_LACKS (EC_GROUP_CONDITIONS << 9) | 0x3b
+#define EC_WORD_BEST (EC_GROUP_CONDITIONS << 9) | 0x3c
+#define EC_WORD_LOUSY (EC_GROUP_CONDITIONS << 9) | 0x3d
+#define EC_WORD_MISTAKE (EC_GROUP_CONDITIONS << 9) | 0x3e
+#define EC_WORD_KIND (EC_GROUP_CONDITIONS << 9) | 0x3f
+#define EC_WORD_WELL (EC_GROUP_CONDITIONS << 9) | 0x40
+#define EC_WORD_WEAKENED (EC_GROUP_CONDITIONS << 9) | 0x41
+#define EC_WORD_SIMPLE (EC_GROUP_CONDITIONS << 9) | 0x42
+#define EC_WORD_SEEMS (EC_GROUP_CONDITIONS << 9) | 0x43
+#define EC_WORD_BADLY (EC_GROUP_CONDITIONS << 9) | 0x44
+
+// ACTIONS
+#define EC_WORD_MEETS (EC_GROUP_ACTIONS << 9) | 0x0
+#define EC_WORD_CONCEDE (EC_GROUP_ACTIONS << 9) | 0x1
+#define EC_WORD_GIVE (EC_GROUP_ACTIONS << 9) | 0x2
+#define EC_WORD_GIVES (EC_GROUP_ACTIONS << 9) | 0x3
+#define EC_WORD_PLAYED (EC_GROUP_ACTIONS << 9) | 0x4
+#define EC_WORD_PLAYS (EC_GROUP_ACTIONS << 9) | 0x5
+#define EC_WORD_COLLECT (EC_GROUP_ACTIONS << 9) | 0x6
+#define EC_WORD_WALKING (EC_GROUP_ACTIONS << 9) | 0x7
+#define EC_WORD_WALKS (EC_GROUP_ACTIONS << 9) | 0x8
+#define EC_WORD_SAYS (EC_GROUP_ACTIONS << 9) | 0x9
+#define EC_WORD_WENT (EC_GROUP_ACTIONS << 9) | 0xa
+#define EC_WORD_SAID (EC_GROUP_ACTIONS << 9) | 0xb
+#define EC_WORD_WAKE_UP (EC_GROUP_ACTIONS << 9) | 0xc
+#define EC_WORD_WAKES_UP (EC_GROUP_ACTIONS << 9) | 0xd
+#define EC_WORD_ANGERS (EC_GROUP_ACTIONS << 9) | 0xe
+#define EC_WORD_TEACH (EC_GROUP_ACTIONS << 9) | 0xf
+#define EC_WORD_TEACHES (EC_GROUP_ACTIONS << 9) | 0x10
+#define EC_WORD_PLEASE (EC_GROUP_ACTIONS << 9) | 0x11
+#define EC_WORD_LEARN (EC_GROUP_ACTIONS << 9) | 0x12
+#define EC_WORD_CHANGE (EC_GROUP_ACTIONS << 9) | 0x13
+#define EC_WORD_STORY (EC_GROUP_ACTIONS << 9) | 0x14
+#define EC_WORD_TRUST (EC_GROUP_ACTIONS << 9) | 0x15
+#define EC_WORD_LAVISH (EC_GROUP_ACTIONS << 9) | 0x16
+#define EC_WORD_LISTENS (EC_GROUP_ACTIONS << 9) | 0x17
+#define EC_WORD_HEARING (EC_GROUP_ACTIONS << 9) | 0x18
+#define EC_WORD_TRAINS (EC_GROUP_ACTIONS << 9) | 0x19
+#define EC_WORD_CHOOSE (EC_GROUP_ACTIONS << 9) | 0x1a
+#define EC_WORD_COME (EC_GROUP_ACTIONS << 9) | 0x1b
+#define EC_WORD_CAME (EC_GROUP_ACTIONS << 9) | 0x1c
+#define EC_WORD_SEARCH (EC_GROUP_ACTIONS << 9) | 0x1d
+#define EC_WORD_MAKE (EC_GROUP_ACTIONS << 9) | 0x1e
+#define EC_WORD_CAUSE (EC_GROUP_ACTIONS << 9) | 0x1f
+#define EC_WORD_KNOW (EC_GROUP_ACTIONS << 9) | 0x20
+#define EC_WORD_KNOWS (EC_GROUP_ACTIONS << 9) | 0x21
+#define EC_WORD_REFUSE (EC_GROUP_ACTIONS << 9) | 0x22
+#define EC_WORD_STORES (EC_GROUP_ACTIONS << 9) | 0x23
+#define EC_WORD_BRAG (EC_GROUP_ACTIONS << 9) | 0x24
+#define EC_WORD_IGNORANT (EC_GROUP_ACTIONS << 9) | 0x25
+#define EC_WORD_THINKS (EC_GROUP_ACTIONS << 9) | 0x26
+#define EC_WORD_BELIEVE (EC_GROUP_ACTIONS << 9) | 0x27
+#define EC_WORD_SLIDE (EC_GROUP_ACTIONS << 9) | 0x28
+#define EC_WORD_EATS (EC_GROUP_ACTIONS << 9) | 0x29
+#define EC_WORD_USE (EC_GROUP_ACTIONS << 9) | 0x2a
+#define EC_WORD_USES (EC_GROUP_ACTIONS << 9) | 0x2b
+#define EC_WORD_USING (EC_GROUP_ACTIONS << 9) | 0x2c
+#define EC_WORD_COULDN_T (EC_GROUP_ACTIONS << 9) | 0x2d
+#define EC_WORD_CAPABLE (EC_GROUP_ACTIONS << 9) | 0x2e
+#define EC_WORD_DISAPPEAR (EC_GROUP_ACTIONS << 9) | 0x2f
+#define EC_WORD_APPEAR (EC_GROUP_ACTIONS << 9) | 0x30
+#define EC_WORD_THROW (EC_GROUP_ACTIONS << 9) | 0x31
+#define EC_WORD_WORRY (EC_GROUP_ACTIONS << 9) | 0x32
+#define EC_WORD_SLEPT (EC_GROUP_ACTIONS << 9) | 0x33
+#define EC_WORD_SLEEP (EC_GROUP_ACTIONS << 9) | 0x34
+#define EC_WORD_RELEASE (EC_GROUP_ACTIONS << 9) | 0x35
+#define EC_WORD_DRINKS (EC_GROUP_ACTIONS << 9) | 0x36
+#define EC_WORD_RUNS (EC_GROUP_ACTIONS << 9) | 0x37
+#define EC_WORD_RUN (EC_GROUP_ACTIONS << 9) | 0x38
+#define EC_WORD_WORKS (EC_GROUP_ACTIONS << 9) | 0x39
+#define EC_WORD_WORKING (EC_GROUP_ACTIONS << 9) | 0x3a
+#define EC_WORD_TALKING (EC_GROUP_ACTIONS << 9) | 0x3b
+#define EC_WORD_TALK (EC_GROUP_ACTIONS << 9) | 0x3c
+#define EC_WORD_SINK (EC_GROUP_ACTIONS << 9) | 0x3d
+#define EC_WORD_SMACK (EC_GROUP_ACTIONS << 9) | 0x3e
+#define EC_WORD_PRETEND (EC_GROUP_ACTIONS << 9) | 0x3f
+#define EC_WORD_PRAISE (EC_GROUP_ACTIONS << 9) | 0x40
+#define EC_WORD_OVERDO (EC_GROUP_ACTIONS << 9) | 0x41
+#define EC_WORD_SHOW (EC_GROUP_ACTIONS << 9) | 0x42
+#define EC_WORD_LOOKS (EC_GROUP_ACTIONS << 9) | 0x43
+#define EC_WORD_SEES (EC_GROUP_ACTIONS << 9) | 0x44
+#define EC_WORD_SEEK (EC_GROUP_ACTIONS << 9) | 0x45
+#define EC_WORD_OWN (EC_GROUP_ACTIONS << 9) | 0x46
+#define EC_WORD_TAKE (EC_GROUP_ACTIONS << 9) | 0x47
+#define EC_WORD_ALLOW (EC_GROUP_ACTIONS << 9) | 0x48
+#define EC_WORD_FORGET (EC_GROUP_ACTIONS << 9) | 0x49
+#define EC_WORD_FORGETS (EC_GROUP_ACTIONS << 9) | 0x4a
+#define EC_WORD_APPEARS (EC_GROUP_ACTIONS << 9) | 0x4b
+#define EC_WORD_FAINT (EC_GROUP_ACTIONS << 9) | 0x4c
+#define EC_WORD_FAINTED (EC_GROUP_ACTIONS << 9) | 0x4d
+
+// LIFESTYLE
+#define EC_WORD_CHORES (EC_GROUP_LIFESTYLE << 9) | 0x0
+#define EC_WORD_HOME (EC_GROUP_LIFESTYLE << 9) | 0x1
+#define EC_WORD_MONEY (EC_GROUP_LIFESTYLE << 9) | 0x2
+#define EC_WORD_ALLOWANCE (EC_GROUP_LIFESTYLE << 9) | 0x3
+#define EC_WORD_BATH (EC_GROUP_LIFESTYLE << 9) | 0x4
+#define EC_WORD_CONVERSATION (EC_GROUP_LIFESTYLE << 9) | 0x5
+#define EC_WORD_SCHOOL (EC_GROUP_LIFESTYLE << 9) | 0x6
+#define EC_WORD_COMMEMORATE (EC_GROUP_LIFESTYLE << 9) | 0x7
+#define EC_WORD_HABIT (EC_GROUP_LIFESTYLE << 9) | 0x8
+#define EC_WORD_GROUP (EC_GROUP_LIFESTYLE << 9) | 0x9
+#define EC_WORD_WORD (EC_GROUP_LIFESTYLE << 9) | 0xa
+#define EC_WORD_STORE (EC_GROUP_LIFESTYLE << 9) | 0xb
+#define EC_WORD_SERVICE (EC_GROUP_LIFESTYLE << 9) | 0xc
+#define EC_WORD_WORK (EC_GROUP_LIFESTYLE << 9) | 0xd
+#define EC_WORD_SYSTEM (EC_GROUP_LIFESTYLE << 9) | 0xe
+#define EC_WORD_TRAIN (EC_GROUP_LIFESTYLE << 9) | 0xf
+#define EC_WORD_CLASS (EC_GROUP_LIFESTYLE << 9) | 0x10
+#define EC_WORD_LESSONS (EC_GROUP_LIFESTYLE << 9) | 0x11
+#define EC_WORD_INFORMATION (EC_GROUP_LIFESTYLE << 9) | 0x12
+#define EC_WORD_LIVING (EC_GROUP_LIFESTYLE << 9) | 0x13
+#define EC_WORD_TEACHER (EC_GROUP_LIFESTYLE << 9) | 0x14
+#define EC_WORD_TOURNAMENT (EC_GROUP_LIFESTYLE << 9) | 0x15
+#define EC_WORD_LETTER (EC_GROUP_LIFESTYLE << 9) | 0x16
+#define EC_WORD_EVENT (EC_GROUP_LIFESTYLE << 9) | 0x17
+#define EC_WORD_DIGITAL (EC_GROUP_LIFESTYLE << 9) | 0x18
+#define EC_WORD_TEST (EC_GROUP_LIFESTYLE << 9) | 0x19
+#define EC_WORD_DEPT_STORE (EC_GROUP_LIFESTYLE << 9) | 0x1a
+#define EC_WORD_TELEVISION (EC_GROUP_LIFESTYLE << 9) | 0x1b
+#define EC_WORD_PHONE (EC_GROUP_LIFESTYLE << 9) | 0x1c
+#define EC_WORD_ITEM (EC_GROUP_LIFESTYLE << 9) | 0x1d
+#define EC_WORD_NAME (EC_GROUP_LIFESTYLE << 9) | 0x1e
+#define EC_WORD_NEWS (EC_GROUP_LIFESTYLE << 9) | 0x1f
+#define EC_WORD_POPULAR (EC_GROUP_LIFESTYLE << 9) | 0x20
+#define EC_WORD_PARTY (EC_GROUP_LIFESTYLE << 9) | 0x21
+#define EC_WORD_STUDY (EC_GROUP_LIFESTYLE << 9) | 0x22
+#define EC_WORD_MACHINE (EC_GROUP_LIFESTYLE << 9) | 0x23
+#define EC_WORD_MAIL (EC_GROUP_LIFESTYLE << 9) | 0x24
+#define EC_WORD_MESSAGE (EC_GROUP_LIFESTYLE << 9) | 0x25
+#define EC_WORD_PROMISE (EC_GROUP_LIFESTYLE << 9) | 0x26
+#define EC_WORD_DREAM (EC_GROUP_LIFESTYLE << 9) | 0x27
+#define EC_WORD_KINDERGARTEN (EC_GROUP_LIFESTYLE << 9) | 0x28
+#define EC_WORD_LIFE (EC_GROUP_LIFESTYLE << 9) | 0x29
+#define EC_WORD_RADIO (EC_GROUP_LIFESTYLE << 9) | 0x2a
+#define EC_WORD_RENTAL (EC_GROUP_LIFESTYLE << 9) | 0x2b
+#define EC_WORD_WORLD (EC_GROUP_LIFESTYLE << 9) | 0x2c
+
+// HOBBIES
+#define EC_WORD_IDOL (EC_GROUP_HOBBIES << 9) | 0x0
+#define EC_WORD_ANIME (EC_GROUP_HOBBIES << 9) | 0x1
+#define EC_WORD_SONG (EC_GROUP_HOBBIES << 9) | 0x2
+#define EC_WORD_MOVIE (EC_GROUP_HOBBIES << 9) | 0x3
+#define EC_WORD_SWEETS (EC_GROUP_HOBBIES << 9) | 0x4
+#define EC_WORD_CHAT (EC_GROUP_HOBBIES << 9) | 0x5
+#define EC_WORD_CHILD_S_PLAY (EC_GROUP_HOBBIES << 9) | 0x6
+#define EC_WORD_TOYS (EC_GROUP_HOBBIES << 9) | 0x7
+#define EC_WORD_MUSIC (EC_GROUP_HOBBIES << 9) | 0x8
+#define EC_WORD_CARDS (EC_GROUP_HOBBIES << 9) | 0x9
+#define EC_WORD_SHOPPING (EC_GROUP_HOBBIES << 9) | 0xa
+#define EC_WORD_CAMERA (EC_GROUP_HOBBIES << 9) | 0xb
+#define EC_WORD_VIEWING (EC_GROUP_HOBBIES << 9) | 0xc
+#define EC_WORD_SPECTATOR (EC_GROUP_HOBBIES << 9) | 0xd
+#define EC_WORD_GOURMET (EC_GROUP_HOBBIES << 9) | 0xe
+#define EC_WORD_GAME (EC_GROUP_HOBBIES << 9) | 0xf
+#define EC_WORD_RPG (EC_GROUP_HOBBIES << 9) | 0x10
+#define EC_WORD_COLLECTION (EC_GROUP_HOBBIES << 9) | 0x11
+#define EC_WORD_COMPLETE (EC_GROUP_HOBBIES << 9) | 0x12
+#define EC_WORD_MAGAZINE (EC_GROUP_HOBBIES << 9) | 0x13
+#define EC_WORD_WALK (EC_GROUP_HOBBIES << 9) | 0x14
+#define EC_WORD_BIKE (EC_GROUP_HOBBIES << 9) | 0x15
+#define EC_WORD_HOBBY (EC_GROUP_HOBBIES << 9) | 0x16
+#define EC_WORD_SPORTS (EC_GROUP_HOBBIES << 9) | 0x17
+#define EC_WORD_SOFTWARE (EC_GROUP_HOBBIES << 9) | 0x18
+#define EC_WORD_SONGS (EC_GROUP_HOBBIES << 9) | 0x19
+#define EC_WORD_DIET (EC_GROUP_HOBBIES << 9) | 0x1a
+#define EC_WORD_TREASURE (EC_GROUP_HOBBIES << 9) | 0x1b
+#define EC_WORD_TRAVEL (EC_GROUP_HOBBIES << 9) | 0x1c
+#define EC_WORD_DANCE (EC_GROUP_HOBBIES << 9) | 0x1d
+#define EC_WORD_CHANNEL (EC_GROUP_HOBBIES << 9) | 0x1e
+#define EC_WORD_MAKING (EC_GROUP_HOBBIES << 9) | 0x1f
+#define EC_WORD_FISHING (EC_GROUP_HOBBIES << 9) | 0x20
+#define EC_WORD_DATE (EC_GROUP_HOBBIES << 9) | 0x21
+#define EC_WORD_DESIGN (EC_GROUP_HOBBIES << 9) | 0x22
+#define EC_WORD_LOCOMOTIVE (EC_GROUP_HOBBIES << 9) | 0x23
+#define EC_WORD_PLUSH_DOLL (EC_GROUP_HOBBIES << 9) | 0x24
+#define EC_WORD_PC (EC_GROUP_HOBBIES << 9) | 0x25
+#define EC_WORD_FLOWERS (EC_GROUP_HOBBIES << 9) | 0x26
+#define EC_WORD_HERO (EC_GROUP_HOBBIES << 9) | 0x27
+#define EC_WORD_NAP (EC_GROUP_HOBBIES << 9) | 0x28
+#define EC_WORD_HEROINE (EC_GROUP_HOBBIES << 9) | 0x29
+#define EC_WORD_FASHION (EC_GROUP_HOBBIES << 9) | 0x2a
+#define EC_WORD_ADVENTURE (EC_GROUP_HOBBIES << 9) | 0x2b
+#define EC_WORD_BOARD (EC_GROUP_HOBBIES << 9) | 0x2c
+#define EC_WORD_BALL (EC_GROUP_HOBBIES << 9) | 0x2d
+#define EC_WORD_BOOK (EC_GROUP_HOBBIES << 9) | 0x2e
+#define EC_WORD_FESTIVAL (EC_GROUP_HOBBIES << 9) | 0x2f
+#define EC_WORD_COMICS (EC_GROUP_HOBBIES << 9) | 0x30
+#define EC_WORD_HOLIDAY (EC_GROUP_HOBBIES << 9) | 0x31
+#define EC_WORD_PLANS (EC_GROUP_HOBBIES << 9) | 0x32
+#define EC_WORD_TRENDY (EC_GROUP_HOBBIES << 9) | 0x33
+#define EC_WORD_VACATION (EC_GROUP_HOBBIES << 9) | 0x34
+#define EC_WORD_LOOK (EC_GROUP_HOBBIES << 9) | 0x35
+
+// TIME
+#define EC_WORD_FALL (EC_GROUP_TIME << 9) | 0x0
+#define EC_WORD_MORNING (EC_GROUP_TIME << 9) | 0x1
+#define EC_WORD_TOMORROW (EC_GROUP_TIME << 9) | 0x2
+#define EC_WORD_LAST (EC_GROUP_TIME << 9) | 0x3
+#define EC_WORD_DAY (EC_GROUP_TIME << 9) | 0x4
+#define EC_WORD_SOMETIME (EC_GROUP_TIME << 9) | 0x5
+#define EC_WORD_ALWAYS (EC_GROUP_TIME << 9) | 0x6
+#define EC_WORD_CURRENT (EC_GROUP_TIME << 9) | 0x7
+#define EC_WORD_FOREVER (EC_GROUP_TIME << 9) | 0x8
+#define EC_WORD_DAYS (EC_GROUP_TIME << 9) | 0x9
+#define EC_WORD_END (EC_GROUP_TIME << 9) | 0xa
+#define EC_WORD_TUESDAY (EC_GROUP_TIME << 9) | 0xb
+#define EC_WORD_YESTERDAY (EC_GROUP_TIME << 9) | 0xc
+#define EC_WORD_TODAY (EC_GROUP_TIME << 9) | 0xd
+#define EC_WORD_FRIDAY (EC_GROUP_TIME << 9) | 0xe
+#define EC_WORD_MONDAY (EC_GROUP_TIME << 9) | 0xf
+#define EC_WORD_LATER (EC_GROUP_TIME << 9) | 0x10
+#define EC_WORD_EARLIER (EC_GROUP_TIME << 9) | 0x11
+#define EC_WORD_ANOTHER (EC_GROUP_TIME << 9) | 0x12
+#define EC_WORD_TIME (EC_GROUP_TIME << 9) | 0x13
+#define EC_WORD_FINISH (EC_GROUP_TIME << 9) | 0x14
+#define EC_WORD_WEDNESDAY (EC_GROUP_TIME << 9) | 0x15
+#define EC_WORD_SOON (EC_GROUP_TIME << 9) | 0x16
+#define EC_WORD_START (EC_GROUP_TIME << 9) | 0x17
+#define EC_WORD_MONTH (EC_GROUP_TIME << 9) | 0x18
+#define EC_WORD_STOP (EC_GROUP_TIME << 9) | 0x19
+#define EC_WORD_NOW (EC_GROUP_TIME << 9) | 0x1a
+#define EC_WORD_FINAL (EC_GROUP_TIME << 9) | 0x1b
+#define EC_WORD_NEXT (EC_GROUP_TIME << 9) | 0x1c
+#define EC_WORD_AGE (EC_GROUP_TIME << 9) | 0x1d
+#define EC_WORD_SATURDAY (EC_GROUP_TIME << 9) | 0x1e
+#define EC_WORD_SUMMER (EC_GROUP_TIME << 9) | 0x1f
+#define EC_WORD_SUNDAY (EC_GROUP_TIME << 9) | 0x20
+#define EC_WORD_BEGINNING (EC_GROUP_TIME << 9) | 0x21
+#define EC_WORD_SPRING (EC_GROUP_TIME << 9) | 0x22
+#define EC_WORD_DAYTIME (EC_GROUP_TIME << 9) | 0x23
+#define EC_WORD_WINTER (EC_GROUP_TIME << 9) | 0x24
+#define EC_WORD_DAILY (EC_GROUP_TIME << 9) | 0x25
+#define EC_WORD_OLDEN (EC_GROUP_TIME << 9) | 0x26
+#define EC_WORD_ALMOST (EC_GROUP_TIME << 9) | 0x27
+#define EC_WORD_NEARLY (EC_GROUP_TIME << 9) | 0x28
+#define EC_WORD_THURSDAY (EC_GROUP_TIME << 9) | 0x29
+#define EC_WORD_NIGHTTIME (EC_GROUP_TIME << 9) | 0x2a
+#define EC_WORD_NIGHT (EC_GROUP_TIME << 9) | 0x2b
+#define EC_WORD_WEEK (EC_GROUP_TIME << 9) | 0x2c
+
+// MISC
+#define EC_WORD_HIGHS (EC_GROUP_MISC << 9) | 0x0
+#define EC_WORD_LOWS (EC_GROUP_MISC << 9) | 0x1
+#define EC_WORD_UM (EC_GROUP_MISC << 9) | 0x2
+#define EC_WORD_REAR (EC_GROUP_MISC << 9) | 0x3
+#define EC_WORD_THINGS (EC_GROUP_MISC << 9) | 0x4
+#define EC_WORD_THING (EC_GROUP_MISC << 9) | 0x5
+#define EC_WORD_BELOW (EC_GROUP_MISC << 9) | 0x6
+#define EC_WORD_ABOVE (EC_GROUP_MISC << 9) | 0x7
+#define EC_WORD_BACK (EC_GROUP_MISC << 9) | 0x8
+#define EC_WORD_HIGH (EC_GROUP_MISC << 9) | 0x9
+#define EC_WORD_HERE (EC_GROUP_MISC << 9) | 0xa
+#define EC_WORD_INSIDE (EC_GROUP_MISC << 9) | 0xb
+#define EC_WORD_OUTSIDE (EC_GROUP_MISC << 9) | 0xc
+#define EC_WORD_BESIDE (EC_GROUP_MISC << 9) | 0xd
+#define EC_WORD_THIS_IS_IT_EXCL (EC_GROUP_MISC << 9) | 0xe
+#define EC_WORD_THIS (EC_GROUP_MISC << 9) | 0xf
+#define EC_WORD_EVERY (EC_GROUP_MISC << 9) | 0x10
+#define EC_WORD_THESE (EC_GROUP_MISC << 9) | 0x11
+#define EC_WORD_THESE_WERE (EC_GROUP_MISC << 9) | 0x12
+#define EC_WORD_DOWN (EC_GROUP_MISC << 9) | 0x13
+#define EC_WORD_THAT (EC_GROUP_MISC << 9) | 0x14
+#define EC_WORD_THOSE_ARE (EC_GROUP_MISC << 9) | 0x15
+#define EC_WORD_THOSE_WERE (EC_GROUP_MISC << 9) | 0x16
+#define EC_WORD_THAT_S_IT_EXCL (EC_GROUP_MISC << 9) | 0x17
+#define EC_WORD_AM (EC_GROUP_MISC << 9) | 0x18
+#define EC_WORD_THAT_WAS (EC_GROUP_MISC << 9) | 0x19
+#define EC_WORD_FRONT (EC_GROUP_MISC << 9) | 0x1a
+#define EC_WORD_UP (EC_GROUP_MISC << 9) | 0x1b
+#define EC_WORD_CHOICE (EC_GROUP_MISC << 9) | 0x1c
+#define EC_WORD_FAR (EC_GROUP_MISC << 9) | 0x1d
+#define EC_WORD_AWAY (EC_GROUP_MISC << 9) | 0x1e
+#define EC_WORD_NEAR (EC_GROUP_MISC << 9) | 0x1f
+#define EC_WORD_WHERE (EC_GROUP_MISC << 9) | 0x20
+#define EC_WORD_WHEN (EC_GROUP_MISC << 9) | 0x21
+#define EC_WORD_WHAT (EC_GROUP_MISC << 9) | 0x22
+#define EC_WORD_DEEP (EC_GROUP_MISC << 9) | 0x23
+#define EC_WORD_SHALLOW (EC_GROUP_MISC << 9) | 0x24
+#define EC_WORD_WHY (EC_GROUP_MISC << 9) | 0x25
+#define EC_WORD_CONFUSED (EC_GROUP_MISC << 9) | 0x26
+#define EC_WORD_OPPOSITE (EC_GROUP_MISC << 9) | 0x27
+#define EC_WORD_LEFT (EC_GROUP_MISC << 9) | 0x28
+#define EC_WORD_RIGHT (EC_GROUP_MISC << 9) | 0x29
+
+// ADJECTIVES
+#define EC_WORD_WANDERING (EC_GROUP_ADJECTIVES << 9) | 0x0
+#define EC_WORD_RICKETY (EC_GROUP_ADJECTIVES << 9) | 0x1
+#define EC_WORD_ROCK_SOLID (EC_GROUP_ADJECTIVES << 9) | 0x2
+#define EC_WORD_HUNGRY (EC_GROUP_ADJECTIVES << 9) | 0x3
+#define EC_WORD_TIGHT (EC_GROUP_ADJECTIVES << 9) | 0x4
+#define EC_WORD_TICKLISH (EC_GROUP_ADJECTIVES << 9) | 0x5
+#define EC_WORD_TWIRLING (EC_GROUP_ADJECTIVES << 9) | 0x6
+#define EC_WORD_SPIRALING (EC_GROUP_ADJECTIVES << 9) | 0x7
+#define EC_WORD_THIRSTY (EC_GROUP_ADJECTIVES << 9) | 0x8
+#define EC_WORD_LOLLING (EC_GROUP_ADJECTIVES << 9) | 0x9
+#define EC_WORD_SILKY (EC_GROUP_ADJECTIVES << 9) | 0xa
+#define EC_WORD_SADLY (EC_GROUP_ADJECTIVES << 9) | 0xb
+#define EC_WORD_HOPELESS (EC_GROUP_ADJECTIVES << 9) | 0xc
+#define EC_WORD_USELESS (EC_GROUP_ADJECTIVES << 9) | 0xd
+#define EC_WORD_DROOLING (EC_GROUP_ADJECTIVES << 9) | 0xe
+#define EC_WORD_EXCITING (EC_GROUP_ADJECTIVES << 9) | 0xf
+#define EC_WORD_THICK (EC_GROUP_ADJECTIVES << 9) | 0x10
+#define EC_WORD_SMOOTH (EC_GROUP_ADJECTIVES << 9) | 0x11
+#define EC_WORD_SLIMY (EC_GROUP_ADJECTIVES << 9) | 0x12
+#define EC_WORD_THIN (EC_GROUP_ADJECTIVES << 9) | 0x13
+#define EC_WORD_BREAK (EC_GROUP_ADJECTIVES << 9) | 0x14
+#define EC_WORD_VORACIOUS (EC_GROUP_ADJECTIVES << 9) | 0x15
+#define EC_WORD_SCATTER (EC_GROUP_ADJECTIVES << 9) | 0x16
+#define EC_WORD_AWESOME (EC_GROUP_ADJECTIVES << 9) | 0x17
+#define EC_WORD_WIMPY (EC_GROUP_ADJECTIVES << 9) | 0x18
+#define EC_WORD_WOBBLY (EC_GROUP_ADJECTIVES << 9) | 0x19
+#define EC_WORD_SHAKY (EC_GROUP_ADJECTIVES << 9) | 0x1a
+#define EC_WORD_RIPPED (EC_GROUP_ADJECTIVES << 9) | 0x1b
+#define EC_WORD_SHREDDED (EC_GROUP_ADJECTIVES << 9) | 0x1c
+#define EC_WORD_INCREASING (EC_GROUP_ADJECTIVES << 9) | 0x1d
+#define EC_WORD_YET (EC_GROUP_ADJECTIVES << 9) | 0x1e
+#define EC_WORD_DESTROYED (EC_GROUP_ADJECTIVES << 9) | 0x1f
+#define EC_WORD_FIERY (EC_GROUP_ADJECTIVES << 9) | 0x20
+#define EC_WORD_LOVEY_DOVEY (EC_GROUP_ADJECTIVES << 9) | 0x21
+#define EC_WORD_HAPPILY (EC_GROUP_ADJECTIVES << 9) | 0x22
+#define EC_WORD_ANTICIPATION (EC_GROUP_ADJECTIVES << 9) | 0x23
+
+// EVENTS
+#define EC_WORD_APPEAL (EC_GROUP_EVENTS << 9) | 0x0
+#define EC_WORD_EVENTS (EC_GROUP_EVENTS << 9) | 0x1
+#define EC_WORD_STAY_AT_HOME (EC_GROUP_EVENTS << 9) | 0x2
+#define EC_WORD_BERRY (EC_GROUP_EVENTS << 9) | 0x3
+#define EC_WORD_CONTEST (EC_GROUP_EVENTS << 9) | 0x4
+#define EC_WORD_MC (EC_GROUP_EVENTS << 9) | 0x5
+#define EC_WORD_JUDGE (EC_GROUP_EVENTS << 9) | 0x6
+#define EC_WORD_SUPER (EC_GROUP_EVENTS << 9) | 0x7
+#define EC_WORD_STAGE (EC_GROUP_EVENTS << 9) | 0x8
+#define EC_WORD_HALL_OF_FAME (EC_GROUP_EVENTS << 9) | 0x9
+#define EC_WORD_EVOLUTION (EC_GROUP_EVENTS << 9) | 0xa
+#define EC_WORD_HYPER (EC_GROUP_EVENTS << 9) | 0xb
+#define EC_WORD_BATTLE_TOWER (EC_GROUP_EVENTS << 9) | 0xc
+#define EC_WORD_LEADERS (EC_GROUP_EVENTS << 9) | 0xd
+#define EC_WORD_BATTLE_ROOM (EC_GROUP_EVENTS << 9) | 0xe
+#define EC_WORD_HIDDEN (EC_GROUP_EVENTS << 9) | 0xf
+#define EC_WORD_SECRET_BASE (EC_GROUP_EVENTS << 9) | 0x10
+#define EC_WORD_BLEND (EC_GROUP_EVENTS << 9) | 0x11
+#define EC_WORD_POKEBLOCK (EC_GROUP_EVENTS << 9) | 0x12
+#define EC_WORD_MASTER (EC_GROUP_EVENTS << 9) | 0x13
+#define EC_WORD_RANK (EC_GROUP_EVENTS << 9) | 0x14
+#define EC_WORD_RIBBON (EC_GROUP_EVENTS << 9) | 0x15
+
+// TRENDY_SAYING
+#define EC_WORD_KTHX_BYE (EC_GROUP_TRENDY_SAYING << 9) | 0x0
+#define EC_WORD_YES_SIR_EXCL (EC_GROUP_TRENDY_SAYING << 9) | 0x1
+#define EC_WORD_AVANT_GARDE (EC_GROUP_TRENDY_SAYING << 9) | 0x2
+#define EC_WORD_COUPLE (EC_GROUP_TRENDY_SAYING << 9) | 0x3
+#define EC_WORD_MUCH_OBLIGED (EC_GROUP_TRENDY_SAYING << 9) | 0x4
+#define EC_WORD_YEEHAW_EXCL (EC_GROUP_TRENDY_SAYING << 9) | 0x5
+#define EC_WORD_MEGA (EC_GROUP_TRENDY_SAYING << 9) | 0x6
+#define EC_WORD_1_HIT_KO_EXCL (EC_GROUP_TRENDY_SAYING << 9) | 0x7
+#define EC_WORD_DESTINY (EC_GROUP_TRENDY_SAYING << 9) | 0x8
+#define EC_WORD_CANCEL (EC_GROUP_TRENDY_SAYING << 9) | 0x9
+#define EC_WORD_NEW (EC_GROUP_TRENDY_SAYING << 9) | 0xa
+#define EC_WORD_FLATTEN (EC_GROUP_TRENDY_SAYING << 9) | 0xb
+#define EC_WORD_KIDDING (EC_GROUP_TRENDY_SAYING << 9) | 0xc
+#define EC_WORD_LOSER (EC_GROUP_TRENDY_SAYING << 9) | 0xd
+#define EC_WORD_LOSING (EC_GROUP_TRENDY_SAYING << 9) | 0xe
+#define EC_WORD_HAPPENING (EC_GROUP_TRENDY_SAYING << 9) | 0xf
+#define EC_WORD_HIP_AND (EC_GROUP_TRENDY_SAYING << 9) | 0x10
+#define EC_WORD_SHAKE (EC_GROUP_TRENDY_SAYING << 9) | 0x11
+#define EC_WORD_SHADY (EC_GROUP_TRENDY_SAYING << 9) | 0x12
+#define EC_WORD_UPBEAT (EC_GROUP_TRENDY_SAYING << 9) | 0x13
+#define EC_WORD_MODERN (EC_GROUP_TRENDY_SAYING << 9) | 0x14
+#define EC_WORD_SMELL_YA (EC_GROUP_TRENDY_SAYING << 9) | 0x15
+#define EC_WORD_BANG (EC_GROUP_TRENDY_SAYING << 9) | 0x16
+#define EC_WORD_KNOCKOUT (EC_GROUP_TRENDY_SAYING << 9) | 0x17
+#define EC_WORD_HASSLE (EC_GROUP_TRENDY_SAYING << 9) | 0x18
+#define EC_WORD_WINNER (EC_GROUP_TRENDY_SAYING << 9) | 0x19
+#define EC_WORD_FEVER (EC_GROUP_TRENDY_SAYING << 9) | 0x1a
+#define EC_WORD_WANNABE (EC_GROUP_TRENDY_SAYING << 9) | 0x1b
+#define EC_WORD_BABY (EC_GROUP_TRENDY_SAYING << 9) | 0x1c
+#define EC_WORD_HEART (EC_GROUP_TRENDY_SAYING << 9) | 0x1d
+#define EC_WORD_OLD (EC_GROUP_TRENDY_SAYING << 9) | 0x1e
+#define EC_WORD_YOUNG (EC_GROUP_TRENDY_SAYING << 9) | 0x1f
+#define EC_WORD_UGLY (EC_GROUP_TRENDY_SAYING << 9) | 0x20
+
+#define EC_GROUP(word) ((word) >> 9)
+#define EC_INDEX(word) ((word) & 0x1FF)
u16 sub_80EB72C(u16 group);
void sub_80EB6FC(u16 *, u16);
@@ -33,7 +1065,7 @@ void InitEasyChatPhrases(void);
u8 sub_80EAD7C(u8 group);
u16 sub_80EAE88(u8);
u8 sub_80EB37C(u16);
-u8* sub_80EB3FC(u8 *, u16);
+u8* EasyChat_GetWordText(u8 *, u16);
u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16);
u16 sub_80EB784(u16 group);
u8 sub_80EB868(u8);
diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h
index 572b77711..ff92fcc40 100644
--- a/include/gba/m4a_internal.h
+++ b/include/gba/m4a_internal.h
@@ -404,10 +404,6 @@ void SampleFreqSet(u32 freq);
void m4aSoundVSyncOn(void);
void m4aSoundVSyncOff(void);
-void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo);
-void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
-void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 pitch);
-void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan);
void ClearModM(struct MusicPlayerTrack *track);
void m4aMPlayModDepthSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 modDepth);
void m4aMPlayLFOSpeedSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 lfoSpeed);
diff --git a/include/global.h b/include/global.h
index f076274cc..ab7d43955 100644
--- a/include/global.h
+++ b/include/global.h
@@ -447,43 +447,69 @@ struct MailStruct
/*0x20*/ u16 itemId;
};
-struct UnkMauvilleOldManStruct
-{
- u8 unk_2D94;
- u8 unk_2D95;
- /*0x2D96*/ u16 mauvilleOldMan_ecArray[6];
- /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6];
- /*0x2DAE*/ u8 playerName[8];
- /*0x2DB6*/ u8 filler_2DB6[0x3];
- /*0x2DB9*/ u8 playerTrainerId[4];
- u8 unk_2DBD;
-}; /*size = 0x2C*/
-struct UnkMauvilleOldManStruct2
+// Mauville Pokemon Center men
+
+struct MauvilleManCommon
+{
+ u8 id;
+};
+
+struct MauvilleManBard
{
- u8 filler0;
- u8 unk1;
- u8 unk2;
- u16 mauvilleOldMan_ecArray[10];
- u8 mauvilleOldMan_ecArray2[12];
- u8 fillerF[0x2];
+ /*0x00*/ u8 id;
+ /*0x02*/ u16 songLyrics[6];
+ /*0x0E*/ u16 temporaryLyrics[6];
+ /*0x1A*/ u8 playerName[8];
+ /*0x22*/ u8 filler_2DB6[0x3];
+ /*0x25*/ u8 playerTrainerId[4];
+ /*0x29*/ bool8 hasChangedSong;
}; /*size = 0x2C*/
-struct MauvilleOldManTrader
+struct MauvilleManHipster
{
- u8 unk0;
+ u8 id;
+ bool8 alreadySpoken;
+};
+
+struct MauvilleManTrader
+{
+ u8 id;
u8 unk1[4];
u8 unk5[4][11];
- u8 unk31;
+ bool8 alreadyTraded;
};
-typedef union OldMan
+struct MauvilleManStoryteller
{
- struct UnkMauvilleOldManStruct oldMan1;
- struct UnkMauvilleOldManStruct2 oldMan2;
- struct MauvilleOldManTrader trader;
- u8 filler[0x40];
-} OldMan;
+ u8 id;
+ bool8 alreadyRecorded;
+ u8 filler2[2];
+ u8 gameStatIDs[4];
+ u8 trainerNames[4][7];
+ u8 statValues[4][4];
+};
+
+struct MauvilleManGiddy
+{
+ /*0x00*/ u8 id;
+ /*0x01*/ u8 taleCounter;
+ /*0x02*/ u8 questionNum;
+ /*0x04*/ u16 randomWords[10];
+ /*0x18*/ u8 questionList[12];
+}; /*size = 0x2C*/
+
+
+union MauvilleMan
+{
+ struct MauvilleManCommon common;
+ struct MauvilleManBard bard;
+ struct MauvilleManHipster hipster;
+ struct MauvilleManTrader trader;
+ struct MauvilleManStoryteller storyteller;
+ struct MauvilleManGiddy giddy;
+ u8 filler[0x40]; // needed to pad out the struct
+};
struct Unk_SB_Access_Struct1
{
@@ -640,7 +666,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2B4C*/ struct MailStruct mail[16];
/*0x2D8C*/ u8 unk2D8C[4];
/*0x2D90*/ u8 filler_2D90[0x4];
- /*0x2D94*/ OldMan oldMan;
+ /*0x2D94*/ union MauvilleMan mauvilleMan;
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
/*0x2DFC*/ u8 filler_2DFC[0x8];
/*0x2E04*/ SB_Struct sbStruct;
diff --git a/include/m4a.h b/include/m4a.h
index b6c8f9072..7d016c98b 100644
--- a/include/m4a.h
+++ b/include/m4a.h
@@ -16,4 +16,9 @@ void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo);
+void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo);
+void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
+void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s16 pitch);
+void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan);
+
#endif //GUARD_M4A_H
diff --git a/include/mauville_man.h b/include/mauville_man.h
new file mode 100644
index 000000000..2b8f139f2
--- /dev/null
+++ b/include/mauville_man.h
@@ -0,0 +1,18 @@
+#ifndef GUARD_MAUVILLE_OLD_MAN_H
+#define GUARD_MAUVILLE_OLD_MAN_H
+
+// IDs
+enum
+{
+ MAUVILLE_MAN_BARD,
+ MAUVILLE_MAN_HIPSTER,
+ MAUVILLE_MAN_TRADER,
+ MAUVILLE_MAN_STORYTELLER,
+ MAUVILLE_MAN_GIDDY,
+};
+
+void SetupMauvilleOldMan(void);
+void sub_80F7F30(void);
+void sub_80F83D0(void);
+
+#endif // GUARD_MAUVILLE_OLD_MAN_H
diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h
deleted file mode 100644
index 473fcf5c8..000000000
--- a/include/mauville_old_man.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef GUARD_MAUVILLE_OLD_MAN_H
-#define GUARD_MAUVILLE_OLD_MAN_H
-
-void SetMauvilleOldMan(void);
-void sub_80F7DC0(void);
-void sub_80F7F30(void);
-void sub_80F7F80(u8);
-void sub_80F83D0(void);
-void sub_80F83F8(void);
-
-#endif // GUARD_MAUVILLE_OLD_MAN_H
diff --git a/include/text.h b/include/text.h
index 9a70dec11..7125bc803 100644
--- a/include/text.h
+++ b/include/text.h
@@ -2,6 +2,7 @@
#define GUARD_TEXT_H
#define CHAR_SPACE 0x00
+#define CHAR_SONG_WORD_SEPARATOR 0x37 // separates words in the bard song. Not sure if it's used for anything else
#define CHAR_0 0xA1
#define CHAR_QUESTION_MARK 0xAC
#define CHAR_PERIOD 0xAD
diff --git a/include/trader.h b/include/trader.h
index 24a9f2a07..832a04b65 100644
--- a/include/trader.h
+++ b/include/trader.h
@@ -1,6 +1,7 @@
#ifndef GUARD_TRADER_H
#define GUARD_TRADER_H
-void sub_81099CC(void);
+void TraderSetup(void);
+void sub_8109A20(void);
#endif // GUARD_TRADER_H
diff --git a/ld_script.txt b/ld_script.txt
index 4fa23048d..05ce91cee 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -185,8 +185,7 @@ SECTIONS {
src/pokenav.o(.text);
asm/pokenav.o(.text_80F708C);
src/mon_markings.o(.text);
- src/mauville_old_man.o(.text);
- asm/mauville_old_man.o(.text);
+ src/mauville_man.o(.text);
src/mail.o(.text);
src/menu_helpers.o(.text);
src/script_pokemon_util_80F99CC.o(.text);
@@ -422,7 +421,7 @@ SECTIONS {
data/easy_chat.o(.rodata);
data/pokenav.o(.rodata);
data/mon_markings.o(.rodata);
- data/mauville_old_man.o(.rodata);
+ src/mauville_man.o(.rodata);
data/mail.o(.rodata);
src/menu_helpers.o(.rodata);
src/heal_location.o(.rodata);
diff --git a/src/bard_music.c b/src/bard_music.c
index a31568475..daf003233 100644
--- a/src/bard_music.c
+++ b/src/bard_music.c
@@ -1,71 +1,43 @@
#include "global.h"
+#include "bard_music.h"
#include "easy_chat.h"
struct BardSound
{
- u8 pad_00[48];
-};
-
-struct UnkBard
-{
/*0x00*/ u8 var00;
/*0x01*/ s8 var01;
/*0x02*/ u16 var02;
- /*0x04*/ u16 var04;
+ /*0x04*/ u16 volume;
/*0x06*/ u16 var06;
};
-struct UnkBard3
-{
- /*0x00*/ u16 var00;
- /*0x02*/ u16 var02;
- /*0x04*/ s16 var04;
- /*0x06*/ u16 var06;
-};
-
-struct UnkBard2
-{
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u8 var02;
- /*0x03*/ u8 var03;
- /*0x04*/ u16 var04;
- u8 pad06[4];
- /*0x0A*/ u16 var0A;
- u8 pad0C[12];
- /*0x18*/ struct UnkBard3 var18[6];
-};
-
-extern struct BardSound *gBardMusicTable[];
+extern const struct BardSound (*const gBardMusicTable[])[][6];
extern s16 *gUnknown_08417068[];
extern u32 gUnknown_084170F4[];
-static s16 sub_814A2B8(u32 arg0, u32 arg1)
+static s16 CalcWordPitch(u32 arg0, u32 songPos)
{
- return gUnknown_08417068[arg0][arg1];
+ return gUnknown_08417068[arg0][songPos];
}
#if ENGLISH
-struct BardSound *sub_814A2D0(u16 arg0, u16 arg1)
+const struct BardSound *GetWordSounds(u16 group, u16 word)
{
- struct BardSound *sounds = gBardMusicTable[arg0];
+ const struct BardSound (*sounds)[][6] = gBardMusicTable[group];
- return &sounds[arg1];
+ return (*sounds)[word];
}
#elif GERMAN
-struct BardSound *sub_814A2D0(u16 arg0, u16 arg1)
+const struct BardSound *GetWordSounds(u16 group, u16 word)
{
- u32 index;
- struct BardSound *sounds;
-
- sounds = gBardMusicTable[arg0];
- index = de_sub_80EB748(arg0, arg1);
+ const struct BardSound (*sounds)[][6] = gBardMusicTable[group];
+ u32 index = de_sub_80EB748(group, word);
- return &sounds[index];
+ return (*sounds)[index];
}
#endif
-s32 sub_814A2EC(struct UnkBard2 *dest, struct UnkBard *src, u16 arg2)
+s32 GetWordPhonemes(struct BardSong *song, const struct BardSound *src, u16 arg2)
{
s32 i;
s32 j;
@@ -73,25 +45,25 @@ s32 sub_814A2EC(struct UnkBard2 *dest, struct UnkBard *src, u16 arg2)
for (i = 0; i < 6; i++)
{
- dest->var18[i].var00 = src[i].var00;
+ song->phonemes[i].sound = src[i].var00;
if (src[i].var00 != 0xFF)
{
- s32 r1 = src[i].var01 +gUnknown_084170F4[src[i].var00];
+ s32 length = src[i].var01 + gUnknown_084170F4[src[i].var00];
- dest->var18[i].var02 = r1;
- dest->var18[i].var06 = src[i].var04;
- dest->var04 += r1;
+ song->phonemes[i].length = length;
+ song->phonemes[i].volume = src[i].volume;
+ song->var04 += length;
}
}
for (j = 0, thirty = 30; j < i; j++)
- dest->var18[j].var04 = sub_814A2B8(thirty + arg2, j);
+ song->phonemes[j].pitch = CalcWordPitch(thirty + arg2, j);
- dest->var00++;
- dest->var01 = 0;
- dest->var02 = 0;
- dest->var03 = 0;
- dest->var0A = 0;
+ song->currWord++;
+ song->currPhoneme = 0;
+ song->phonemeTimer = 0;
+ song->state = 0;
+ song->voiceInflection = 0;
//warning: no return statement in function returning non-void
}
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 214e4ef64..dd33e69c3 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -19,8 +19,8 @@ extern const u8 gEasyChatGroupSizes[];
extern u16 gSpecialVar_0x8004;
-
-u8 *sub_80EB3FC(u8 *dst, u16 word)
+// returns the end of the destination buffer text
+u8 *EasyChat_GetWordText(u8 *dst, u16 word)
{
u16 group;
u16 wordIndex;
@@ -32,13 +32,13 @@ u8 *sub_80EB3FC(u8 *dst, u16 word)
if (word == 0xFFFF)
{
- dst[0] = EOS;
+ *dst = EOS;
return dst;
}
else
{
- group = word >> 9;
- wordIndex = word & 0x1FF;
+ group = EC_GROUP(word);
+ wordIndex = EC_INDEX(word);
switch (group)
{
case EC_GROUP_POKEMON: // 0
@@ -59,7 +59,7 @@ u8 *sub_80EB3FC(u8 *dst, u16 word)
dst = StringCopy(dst, src);
break;
}
- dst[0] = EOS;
+ *dst = EOS;
return dst;
}
}
@@ -77,7 +77,7 @@ u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16 arg2, u16 arg3)
for (n = 0; n < i1; n++)
{
- dst = sub_80EB3FC(dst, words[0]);
+ dst = EasyChat_GetWordText(dst, words[0]);
if (words[0] != 0xFFFF)
{
@@ -90,7 +90,7 @@ u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16 arg2, u16 arg3)
word = words[0];
words++;
- dst = sub_80EB3FC(dst, word);
+ dst = EasyChat_GetWordText(dst, word);
dst[0] = CHAR_NEWLINE;
dst++;
@@ -115,7 +115,7 @@ u8 *sub_80EB544(u8 *dst, u16 *words, u16 arg2, u16 arg3)
for (n = 0; n < i1; n++)
{
- dst = sub_80EB3FC(dst, words[0]);
+ dst = EasyChat_GetWordText(dst, words[0]);
if (words[0] != 0xFFFF)
{
@@ -128,7 +128,7 @@ u8 *sub_80EB544(u8 *dst, u16 *words, u16 arg2, u16 arg3)
word = words[0];
words++;
- dst = sub_80EB3FC(dst, word);
+ dst = EasyChat_GetWordText(dst, word);
// Only difference with ConvertEasyChatWordsToString
dst[0] = (i == 0) ? CHAR_NEWLINE : CHAR_PROMPT_SCROLL;
@@ -153,8 +153,8 @@ u16 unref_sub_80EB5E0(u16 arg0)
if (arg0 == 0xFFFF)
return 0;
- group = arg0 >> 9;
- word = arg0 & 0x1FF;
+ group = EC_GROUP(arg0);
+ word = EC_INDEX(arg0);
switch (group)
{
case EC_GROUP_POKEMON: // 0
@@ -321,7 +321,7 @@ void sub_80EB83C(void)
group = EC_GROUP_LIFESTYLE;
local2 = sub_80EB784(group);
- sub_80EB3FC(gStringVar2, local2);
+ EasyChat_GetWordText(gStringVar2, local2);
}
u8 sub_80EB868(u8 arg0)
diff --git a/src/m4a_4.c b/src/m4a_4.c
index 99195ec00..2e1d140b4 100644
--- a/src/m4a_4.c
+++ b/src/m4a_4.c
@@ -45,7 +45,7 @@ void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16
mplayInfo->ident = ID_NUMBER;
}
-void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 pitch)
+void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s16 pitch)
{
s32 i;
u32 bit;
diff --git a/src/mail.c b/src/mail.c
index 658d37976..fb9251a5d 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -92,7 +92,7 @@ void HandleReadMail(struct MailStruct *arg0, MainCallback arg1, bool8 arg2)
ewram0.varFF = GAME_LANGUAGE;
ewram0.var100 = 1;
- ewram0.var104 = (MainCallback)sub_80EB3FC;
+ ewram0.var104 = (MainCallback)EasyChat_GetWordText;
ewram0.var108 = (MainCallback)ConvertEasyChatWordsToString;
mailDesign = arg0->itemId - ITEM_ORANGE_MAIL;
diff --git a/src/mauville_man.c b/src/mauville_man.c
new file mode 100644
index 000000000..4a77717f1
--- /dev/null
+++ b/src/mauville_man.c
@@ -0,0 +1,1311 @@
+#include "global.h"
+#include "bard_music.h"
+#include "mauville_man.h"
+#include "easy_chat.h"
+#include "event_data.h"
+#include "field_message_box.h"
+#include "m4a.h"
+#include "menu.h"
+#include "rom4.h"
+#include "rng.h"
+#include "script.h"
+#include "songs.h"
+#include "sound.h"
+#include "string_util.h"
+#include "strings.h"
+#include "task.h"
+#include "trader.h"
+
+#define MACRO1(a) (((a) % 4) + (((a) / 8) & 1))
+
+extern struct MusicPlayerInfo gMPlay_SE2;
+
+extern u16 gScriptResult;
+extern u16 gSpecialVar_0x8004;
+
+extern const u8 gTextStoryteller_Story1Title[];
+extern const u8 gTextStoryteller_Story1Action[];
+extern const u8 gTextStoryteller_Story1Text[];
+extern const u8 gTextStoryteller_Story2Title[];
+extern const u8 gTextStoryteller_Story2Action[];
+extern const u8 gTextStoryteller_Story2Text[];
+extern const u8 gTextStoryteller_Story3Title[];
+extern const u8 gTextStoryteller_Story3Action[];
+extern const u8 gTextStoryteller_Story3Text[];
+extern const u8 gTextStoryteller_Story4Title[];
+extern const u8 gTextStoryteller_Story4Action[];
+extern const u8 gTextStoryteller_Story4Text[];
+extern const u8 gTextStoryteller_Story5Title[];
+extern const u8 gTextStoryteller_Story5Action[];
+extern const u8 gTextStoryteller_Story5Text[];
+extern const u8 gTextStoryteller_Story6Title[];
+extern const u8 gTextStoryteller_Story6Action[];
+extern const u8 gTextStoryteller_Story6Text[];
+extern const u8 gTextStoryteller_Story7Title[];
+extern const u8 gTextStoryteller_Story7Action[];
+extern const u8 gTextStoryteller_Story7Text[];
+extern const u8 gTextStoryteller_Story8Title[];
+extern const u8 gTextStoryteller_Story8Action[];
+extern const u8 gTextStoryteller_Story8Text[];
+extern const u8 gTextStoryteller_Story9Title[];
+extern const u8 gTextStoryteller_Story9Action[];
+extern const u8 gTextStoryteller_Story9Text[];
+extern const u8 gTextStoryteller_Story10Title[];
+extern const u8 gTextStoryteller_Story10Action[];
+extern const u8 gTextStoryteller_Story10Text[];
+extern const u8 gTextStoryteller_Story11Title[];
+extern const u8 gTextStoryteller_Story11Action[];
+extern const u8 gTextStoryteller_Story11Text[];
+extern const u8 gTextStoryteller_Story12Title[];
+extern const u8 gTextStoryteller_Story12Action[];
+extern const u8 gTextStoryteller_Story12Text[];
+extern const u8 gTextStoryteller_Story13Title[];
+extern const u8 gTextStoryteller_Story13Action[];
+extern const u8 gTextStoryteller_Story13Text[];
+extern const u8 gTextStoryteller_Story14Title[];
+extern const u8 gTextStoryteller_Story14Action[];
+extern const u8 gTextStoryteller_Story14Text[];
+extern const u8 gTextStoryteller_Story15Title[];
+extern const u8 gTextStoryteller_Story15Action[];
+extern const u8 gTextStoryteller_Story15Text[];
+extern const u8 gTextStoryteller_Story16Title[];
+extern const u8 gTextStoryteller_Story16Action[];
+extern const u8 gTextStoryteller_Story16Text[];
+extern const u8 gTextStoryteller_Story17Title[];
+extern const u8 gTextStoryteller_Story17Action[];
+extern const u8 gTextStoryteller_Story17Text[];
+extern const u8 gTextStoryteller_Story18Title[];
+extern const u8 gTextStoryteller_Story18Action[];
+extern const u8 gTextStoryteller_Story18Text[];
+extern const u8 gTextStoryteller_Story19Title[];
+extern const u8 gTextStoryteller_Story19Action[];
+extern const u8 gTextStoryteller_Story19Text[];
+extern const u8 gTextStoryteller_Story20Title[];
+extern const u8 gTextStoryteller_Story20Action[];
+extern const u8 gTextStoryteller_Story20Text[];
+extern const u8 gTextStoryteller_Story21Title[];
+extern const u8 gTextStoryteller_Story21Action[];
+extern const u8 gTextStoryteller_Story21Text[];
+extern const u8 gTextStoryteller_Story22Title[];
+extern const u8 gTextStoryteller_Story22Action[];
+extern const u8 gTextStoryteller_Story22Text[];
+extern const u8 gTextStoryteller_Story23Title[];
+extern const u8 gTextStoryteller_Story23Action[];
+extern const u8 gTextStoryteller_Story23Text[];
+extern const u8 gTextStoryteller_Story24Title[];
+extern const u8 gTextStoryteller_Story24Action[];
+extern const u8 gTextStoryteller_Story24Text[];
+extern const u8 gTextStoryteller_Story25Title[];
+extern const u8 gTextStoryteller_Story25Action[];
+extern const u8 gTextStoryteller_Story25Text[];
+extern const u8 gTextStoryteller_Story26Title[];
+extern const u8 gTextStoryteller_Story26Action[];
+extern const u8 gTextStoryteller_Story26Text[];
+extern const u8 gTextStoryteller_Story27Title[];
+extern const u8 gTextStoryteller_Story27Action[];
+extern const u8 gTextStoryteller_Story27Text[];
+extern const u8 gTextStoryteller_Story28Title[];
+extern const u8 gTextStoryteller_Story28Action[];
+extern const u8 gTextStoryteller_Story28Text[];
+extern const u8 gTextStoryteller_Story29Title[];
+extern const u8 gTextStoryteller_Story29Action[];
+extern const u8 gTextStoryteller_Story29Text[];
+extern const u8 gTextStoryteller_Story30Title[];
+extern const u8 gTextStoryteller_Story30Action[];
+extern const u8 gTextStoryteller_Story30Text[];
+extern const u8 gTextStoryteller_Story31Title[];
+extern const u8 gTextStoryteller_Story31Action[];
+extern const u8 gTextStoryteller_Story31Text[];
+extern const u8 gTextStoryteller_Story32Title[];
+extern const u8 gTextStoryteller_Story32Action[];
+extern const u8 gTextStoryteller_Story32Text[];
+extern const u8 gTextStoryteller_Story33Title[];
+extern const u8 gTextStoryteller_Story33Action[];
+extern const u8 gTextStoryteller_Story33Text[];
+extern const u8 gTextStoryteller_Story34Title[];
+extern const u8 gTextStoryteller_Story34Action[];
+extern const u8 gTextStoryteller_Story34Text[];
+extern const u8 gTextStoryteller_Story35Title[];
+extern const u8 gTextStoryteller_Story35Action[];
+extern const u8 gTextStoryteller_Story35Text[];
+extern const u8 gTextStoryteller_Story36Title[];
+extern const u8 gTextStoryteller_Story36Action[];
+extern const u8 gTextStoryteller_Story36Text[];
+
+extern struct BardSong gUnknown_03005DA0;
+
+EWRAM_DATA static u16 gUnknown_020388BC = 0; // set but not used?
+
+static const u16 sDefaultBardSongLyrics[] =
+{
+#ifdef ENGLISH
+ EC_WORD_SISTER,
+ EC_WORD_EATS,
+ EC_WORD_SWEETS,
+ EC_WORD_VORACIOUS,
+ EC_WORD_AND,
+ EC_WORD_DROOLING,
+#else
+ EC_WORD_SISTER,
+ EC_WORD_MUST_BE,
+ EC_WORD_SWEETS,
+ EC_WORD_VORACIOUS,
+ EC_WORD_DROOLING,
+ EC_WORD_THICK,
+#endif
+};
+
+static const u8 *const sGiddyAdjectives[] =
+{
+ OtherText_SoPretty,
+ OtherText_SoDarling,
+ OtherText_SoRelaxed,
+ OtherText_SoSunny,
+ OtherText_SoDesirable,
+ OtherText_SoExciting,
+ OtherText_SoAmusing,
+ OtherText_SoMagical,
+};
+
+static const u8 *const sGiddyQuestions[] =
+{
+ OtherText_WantVacationNicePlace,
+ OtherText_BoughtCrayonsIsNice,
+ OtherText_IfWeCouldFloat,
+ OtherText_SandWashesAwayMakeSad,
+ OtherText_WhatsBottomSeaLike,
+ OtherText_SeeSettingSun,
+ OtherText_LyingInGreenGrass,
+ OtherText_SecretBasesWonderful,
+};
+
+static void sub_80F7DC0(void);
+static void Task_BardSong(u8);
+static void StartBardSong(u8);
+static void StorytellerSetup(void);
+static void sub_80F8428(void);
+
+static void SetupBard(void)
+{
+ u16 i;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+
+ bard->id = MAUVILLE_MAN_BARD;
+ bard->hasChangedSong = FALSE;
+ for (i = 0; i < 6; i++)
+ bard->songLyrics[i] = sDefaultBardSongLyrics[i];
+}
+
+static void SetupHipster(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
+
+ hipster->id = MAUVILLE_MAN_HIPSTER;
+ hipster->alreadySpoken = FALSE;
+}
+
+static void SetupStoryteller(void)
+{
+ StorytellerSetup();
+}
+
+static void SetupGiddy(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ giddy->id = MAUVILLE_MAN_GIDDY;
+ giddy->taleCounter = 0;
+}
+
+static void SetupTrader(void)
+{
+ TraderSetup();
+}
+
+void SetupMauvilleOldMan(void)
+{
+ u16 trainerId = (gSaveBlock2.playerTrainerId[1] << 8) | gSaveBlock2.playerTrainerId[0];
+
+ // Determine man based on the last digit of the player's trainer ID.
+ switch ((trainerId % 10) / 2)
+ {
+ case MAUVILLE_MAN_BARD:
+ SetupBard();
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ SetupHipster();
+ break;
+ case MAUVILLE_MAN_TRADER:
+ SetupTrader();
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ SetupStoryteller();
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ SetupGiddy();
+ break;
+ }
+ sub_80F83D0();
+}
+
+static u8 GetCurrentMauvilleOldMan(void)
+{
+ struct MauvilleManCommon *common = &gSaveBlock1.mauvilleMan.common;
+
+ return common->id;
+}
+
+void ScrSpecial_GetCurrentMauvilleMan(void)
+{
+ gScriptResult = GetCurrentMauvilleOldMan();
+}
+
+void ScrSpecial_HasBardSongBeenChanged(void)
+{
+ u16 *scriptResult = &gScriptResult; // why??
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+
+ *scriptResult = bard->hasChangedSong;
+}
+
+void ScrSpecial_SaveBardSongLyrics(void)
+{
+ u16 i;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+
+ StringCopy(bard->playerName, gSaveBlock2.playerName);
+
+ for (i = 0; i < 4; i++)
+ bard->playerTrainerId[i] = gSaveBlock2.playerTrainerId[i];
+
+ for (i = 0; i < 6; i++)
+ bard->songLyrics[i] = bard->temporaryLyrics[i];
+
+ bard->hasChangedSong = TRUE;
+}
+
+// Copies lyrics into gStringVar4
+void PrepareSongText(void)
+{
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+ u16 specialVar = gSpecialVar_0x8004; // It's a bit odd to use this temp variable, but it seems needed to match.
+ u16 *lyrics;
+ u16 lineNum;
+ u8 *wordEnd;
+ u8 *str;
+
+ lyrics = bard->temporaryLyrics;
+ if (specialVar == 0)
+ lyrics = bard->songLyrics;
+ wordEnd = gStringVar4;
+ str = wordEnd;
+ // Put three words on each line
+ for (lineNum = 0; lineNum < 2; lineNum++)
+ {
+ wordEnd = EasyChat_GetWordText(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ str++;
+ *(wordEnd++) = CHAR_SPACE;
+
+ wordEnd = EasyChat_GetWordText(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ str++;
+ *(wordEnd++) = CHAR_NEWLINE;
+
+ wordEnd = EasyChat_GetWordText(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ if (lineNum == 0)
+ {
+ *(wordEnd++) = EXT_CTRL_CODE_BEGIN;
+ *(wordEnd++) = 15;
+ }
+ }
+}
+
+void ScrSpecial_PlayBardSong(void)
+{
+ StartBardSong(gSpecialVar_0x8004);
+ MenuDisplayMessageBox();
+ ScriptContext1_Stop();
+}
+
+void ScrSpecial_GetHipsterSpokenFlag(void)
+{
+ u16 *scriptResult = &gScriptResult; // again??
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
+
+ *scriptResult = hipster->alreadySpoken;
+}
+
+void ScrSpecial_SetHipsterSpokenFlag(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
+
+ hipster->alreadySpoken = TRUE;
+}
+
+void ScrSpecial_HipsterTeachWord(void)
+{
+ u16 var = sub_80EB8EC();
+
+ if (var == 0xFFFF)
+ {
+ gScriptResult = FALSE;
+ }
+ else
+ {
+ EasyChat_GetWordText(gStringVar1, var);
+ gScriptResult = TRUE;
+ }
+}
+
+void ScrSpecial_GiddyShouldTellAnotherTale(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ if (giddy->taleCounter == 10)
+ {
+ gScriptResult = FALSE;
+ giddy->taleCounter = 0;
+ }
+ else
+ {
+ gScriptResult = TRUE;
+ }
+}
+
+void ScrSpecial_GenerateGiddyLine(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ if (giddy->taleCounter == 0)
+ sub_80F7DC0();
+
+ if (giddy->randomWords[giddy->taleCounter] != 0xFFFF) // is not the last element of the array?
+ {
+ u8 *stringPtr;
+ u32 adjective = Random();
+
+ adjective %= 8;
+ stringPtr = EasyChat_GetWordText(gStringVar4, giddy->randomWords[giddy->taleCounter]);
+ stringPtr = StringCopy(stringPtr, gOtherText_Is);
+ stringPtr = StringCopy(stringPtr, sGiddyAdjectives[adjective]);
+ StringCopy(stringPtr, gOtherText_DontYouAgree);
+ }
+ else
+ {
+ StringCopy(gStringVar4, sGiddyQuestions[giddy->questionList[giddy->questionNum++]]);
+ }
+
+ if (!(Random() % 10))
+ giddy->taleCounter = 10;
+ else
+ giddy->taleCounter++;
+
+ gScriptResult = TRUE;
+}
+
+#ifdef NONMATCHING
+static void sub_80F7DC0(void)
+{
+ u16 arr[][2] =
+ {
+ { 0x0, 0},
+ { 0xC, 0},
+ { 0xD, 0},
+ {0x12, 0},
+ {0x13, 0},
+ {0x15, 0},
+ };
+ u16 i;
+ u16 r10;
+ u16 r7;
+
+ for (i = 0; i < 8; i++)
+ {
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ //gSaveBlock1.mauvilleMan.giddy.questionList[i] = i;
+ giddy->questionList[i] = i;
+ }
+
+ // Scramble questions
+ for (i = 0; i < 8; i++)
+ {
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ /*
+ u16 r1 = Random() % (i + 1);
+ u8 r7 = gSaveBlock1.mauvilleMan.giddy.questionList[i];
+ gSaveBlock1.mauvilleMan.giddy.questionList[i] = gSaveBlock1.mauvilleMan.giddy.questionList[r1];
+ gSaveBlock1.mauvilleMan.giddy.questionList[r1] = r7;
+ */
+ u16 r1 = Random() % (i + 1);
+ u8 r7 = giddy->questionList[i];
+ giddy->questionList[i] = giddy->questionList[r1];
+ giddy->questionList[r1] = r7;
+ }
+
+ r10 = 0;
+ for (i = 0; i < 6; i++)
+ {
+ arr[i][1] = sub_80EAE88(arr[i][0]);
+ r10 += arr[i][1];
+ }
+
+ {
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+ giddy->questionNum = 0;
+ }
+ //gSaveBlock1.mauvilleMan.giddy.questionNum = 0;
+
+ r7 = 0;
+ for (i = 0; i < 10; i++)
+ {
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
+
+ u16 var = Random() % 10;
+ if (var < 3 && r7 < 8)
+ {
+ //gSaveBlock1.mauvilleMan.giddy.randomWords[i] = 0xFFFF;
+ giddy->randomWords[i] = 0xFFFF;
+ r7++;
+ }
+ //_080F7E90
+ else
+ {
+ s16 r2 = Random() % r10;
+
+ u16 r1 = 0;
+
+ while (i < 6) // comparing the wrong variable
+ {
+ r2 = arr[r1][1] - r2;
+ if (r2 <= 0)
+ break;
+ r1++;
+ }
+
+ if (r1 == 6)
+ r1 = 0;
+ //gSaveBlock1.mauvilleMan.giddy.randomWords[i] = sub_80EB784(arr[r1][0]);
+ giddy->randomWords[i] = sub_80EB784(arr[r1][0]);
+ }
+ }
+}
+#else
+
+static const u16 gUnknown_083E53C8[][2] =
+{
+ { 0x0, 0},
+ { 0xC, 0},
+ { 0xD, 0},
+ {0x12, 0},
+ {0x13, 0},
+ {0x15, 0},
+};
+
+__attribute__((naked))
+static void sub_80F7DC0(void)
+{
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x18\n\
+ ldr r1, _080F7E84 @ =gUnknown_083E53C8\n\
+ mov r0, sp\n\
+ movs r2, 0x18\n\
+ bl memcpy\n\
+ movs r5, 0\n\
+ movs r0, 0x2\n\
+ add r0, sp\n\
+ mov r8, r0\n\
+ ldr r1, _080F7E88 @ =gSaveBlock1 + 0x2D94\n\
+ adds r1, 0x18\n\
+ adds r3, r1, 0\n\
+_080F7DE4:\n\
+ adds r0, r3, r5\n\
+ strb r5, [r0]\n\
+ adds r0, r5, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+ cmp r5, 0x7\n\
+ bls _080F7DE4\n\
+ movs r5, 0\n\
+ ldr r2, _080F7E88 @ =gSaveBlock1 + 0x2D94\n\
+ adds r2, 0x4\n\
+ mov r9, r2\n\
+ adds r6, r1, 0\n\
+_080F7DFC:\n\
+ bl Random\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ adds r4, r5, 0x1\n\
+ adds r1, r4, 0\n\
+ bl __modsi3\n\
+ lsls r0, 16\n\
+ lsrs r1, r0, 16\n\
+ adds r2, r6, r5\n\
+ ldrb r7, [r2]\n\
+ adds r1, r6, r1\n\
+ ldrb r0, [r1]\n\
+ strb r0, [r2]\n\
+ strb r7, [r1]\n\
+ lsls r4, 16\n\
+ lsrs r5, r4, 16\n\
+ cmp r5, 0x7\n\
+ bls _080F7DFC\n\
+ movs r3, 0\n\
+ mov r10, r3\n\
+ movs r5, 0\n\
+_080F7E2A:\n\
+ lsls r4, r5, 2\n\
+ mov r1, sp\n\
+ adds r0, r1, r4\n\
+ ldrb r0, [r0]\n\
+ bl sub_80EAE88\n\
+ add r4, r8\n\
+ strh r0, [r4]\n\
+ add r0, r10\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ mov r10, r0\n\
+ adds r0, r5, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+ cmp r5, 0x5\n\
+ bls _080F7E2A\n\
+ movs r0, 0\n\
+ ldr r2, _080F7E88 @ =gSaveBlock1 + 0x2D94\n\
+ strb r0, [r2, 0x2]\n\
+ movs r7, 0\n\
+ movs r5, 0\n\
+_080F7E56:\n\
+ bl Random\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ movs r1, 0xA\n\
+ bl __umodsi3\n\
+ lsls r0, 16\n\
+ lsrs r1, r0, 16\n\
+ cmp r1, 0x2\n\
+ bhi _080F7E90\n\
+ cmp r7, 0x7\n\
+ bhi _080F7E90\n\
+ lsls r0, r5, 1\n\
+ add r0, r9\n\
+ ldr r1, _080F7E8C @ =0x0000ffff\n\
+ strh r1, [r0]\n\
+ adds r0, r7, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r7, r0, 16\n\
+ adds r4, r5, 0x1\n\
+ b _080F7EE2\n\
+ .align 2, 0\n\
+_080F7E84: .4byte gUnknown_083E53C8\n\
+_080F7E88: .4byte gSaveBlock1 + 0x2D94\n\
+_080F7E8C: .4byte 0x0000ffff\n\
+_080F7E90:\n\
+ bl Random\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ mov r1, r10\n\
+ bl __umodsi3\n\
+ lsls r0, 16\n\
+ lsrs r2, r0, 16\n\
+ movs r1, 0\n\
+ adds r4, r5, 0x1\n\
+ lsls r6, r5, 1\n\
+ cmp r5, 0x5\n\
+ bhi _080F7ECC\n\
+ mov r3, r8\n\
+ ldrh r0, [r3]\n\
+ b _080F7EC2\n\
+_080F7EB2:\n\
+ adds r0, r1, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r1, r0, 16\n\
+ cmp r5, 0x5\n\
+ bhi _080F7ECC\n\
+ lsls r0, r1, 2\n\
+ adds r0, r3, r0\n\
+ ldrh r0, [r0]\n\
+_080F7EC2:\n\
+ subs r0, r2, r0\n\
+ lsls r0, 16\n\
+ lsrs r2, r0, 16\n\
+ cmp r0, 0\n\
+ bgt _080F7EB2\n\
+_080F7ECC:\n\
+ cmp r1, 0x6\n\
+ bne _080F7ED2\n\
+ movs r1, 0\n\
+_080F7ED2:\n\
+ lsls r0, r1, 2\n\
+ add r0, sp\n\
+ ldrh r0, [r0]\n\
+ bl sub_80EB784\n\
+ mov r2, r9\n\
+ adds r1, r2, r6\n\
+ strh r0, [r1]\n\
+_080F7EE2:\n\
+ lsls r0, r4, 16\n\
+ lsrs r5, r0, 16\n\
+ cmp r5, 0x9\n\
+ bls _080F7E56\n\
+ add sp, 0x18\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .syntax divided\n");
+}
+#endif
+
+static void sub_80F7EFC(void)
+{
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+
+ bard->hasChangedSong = FALSE;
+}
+
+static void sub_80F7F0C(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
+
+ hipster->alreadySpoken = FALSE;
+}
+
+static void sub_80F7F18(void)
+{
+ sub_8109A20();
+}
+
+static void sub_80F7F24(void)
+{
+ sub_80F8428();
+}
+
+void sub_80F7F30(void)
+{
+ switch (GetCurrentMauvilleOldMan())
+ {
+ case MAUVILLE_MAN_BARD:
+ sub_80F7EFC();
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ sub_80F7F0C();
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ sub_80F7F24();
+ break;
+ case MAUVILLE_MAN_TRADER:
+ sub_80F7F18();
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ break;
+ }
+ sub_80F83D0();
+}
+
+#define tState data[0]
+#define tCharIndex data[3]
+#define tCurrWord data[4]
+#define tUseTemporaryLyrics data[5]
+
+static void StartBardSong(bool8 useTemporaryLyrics)
+{
+ u8 taskId = CreateTask(Task_BardSong, 0x50);
+
+ gTasks[taskId].tUseTemporaryLyrics = useTemporaryLyrics;
+}
+
+static void BardSing(struct Task *task, struct BardSong *song)
+{
+ switch (task->tState)
+ {
+ case 0: // Initialize song
+ {
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+ u16 *lyrics;
+ s32 i;
+
+ // Copy lyrics
+ if (gSpecialVar_0x8004 == 0)
+ lyrics = bard->songLyrics;
+ else
+ lyrics = bard->temporaryLyrics;
+ for (i = 0; i < 6; i++)
+ song->lyrics[i] = lyrics[i];
+
+ // Clear phonemes
+ for (i = 0; i < 6; i++)
+ {
+ song->phonemes[i].sound = 0xFFFF;
+ song->phonemes[i].length = 0;
+ song->phonemes[i].pitch = 0;
+ song->phonemes[i].volume = 0;
+ }
+ song->currWord = 0;
+ song->currPhoneme = 0;
+ song->var04 = 0;
+ }
+ break;
+ case 1: // Wait for BGM to end
+ break;
+ case 2: // Initialize word
+ {
+ u16 word = song->lyrics[song->currWord];
+ const struct BardSound *sounds = GetWordSounds(EC_GROUP(word), EC_INDEX(word));
+
+ song->var04 = 0;
+ GetWordPhonemes(song, sounds, MACRO1(word));
+ }
+ break;
+ case 3:
+ case 4:
+ {
+ struct BardPhoneme *phoneme = &song->phonemes[song->currPhoneme];
+
+ switch (song->state)
+ {
+ case 0:
+ if (song->phonemeTimer == 0) // Timer has expired. Move to next phoneme
+ {
+ if (song->currPhoneme == 6 || phoneme->sound == 0xFF)
+ {
+ song->state = 0xFE;
+ break;
+ }
+ song->phonemeTimer = phoneme->length;
+ if (phoneme->sound <= 50)
+ {
+ u16 num = phoneme->sound / 3;
+
+ m4aSongNumStart(249 + num * 3);
+ }
+ song->state = 1;
+ }
+ else
+ {
+ if (song->voiceInflection > 10)
+ song->volume -= 2;
+ if (song->voiceInflection & 1)
+ song->pitch += 64;
+ else
+ song->pitch -= 64;
+ m4aMPlayVolumeControl(&gMPlay_SE2, 0xFFFF, song->volume);
+ m4aMPlayPitchControl(&gMPlay_SE2, 0xFFFF, song->pitch);
+ song->voiceInflection++;
+ }
+ song->phonemeTimer--;
+ break;
+ case 1:
+ song->currPhoneme++;
+ song->state = 0;
+ if (phoneme->sound <= 50)
+ {
+ song->volume = 0x100 + phoneme->volume * 16;
+ m4aMPlayVolumeControl(&gMPlay_SE2, 0xFFFF, song->volume);
+ song->pitch = 0x200 + phoneme->pitch;
+ m4aMPlayPitchControl(&gMPlay_SE2, 0xFFFF, song->pitch);
+ }
+ break;
+ case 0xFE:
+ m4aMPlayStop(&gMPlay_SE2);
+ song->state = 0xFF;
+ break;
+ }
+ }
+ break;
+ case 5:
+ break;
+ }
+}
+
+static void Task_BardSong(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId]; // r5
+
+ BardSing(task, &gUnknown_03005DA0);
+ switch (task->tState)
+ {
+ case 0: // Initialize song
+ PrepareSongText();
+ InitWindowFromConfig(gMenuWindowPtr, &gWindowConfig_81E6CE4);
+ sub_8002EB0(gMenuWindowPtr, gStringVar4, 2, 4, 15);
+ task->data[1] = 0;
+ task->data[2] = 0;
+ task->tCharIndex = 0;
+ task->tCurrWord = 0;
+ FadeOutBGMTemporarily(4);
+ task->tState = 1;
+ break;
+ case 1: // Wait for BGM to end
+ if (IsBGMPausedOrStopped())
+ task->tState = 2;
+ break;
+ case 2: // Initialize word
+ {
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
+ u8 *str = gStringVar4 + task->tCharIndex;
+ u16 wordLen = 0;
+ // Can't get it to match without hacking
+ u32 temp;
+ register s16 zero asm("r1");
+
+ while (*str != CHAR_SPACE
+ && *str != CHAR_NEWLINE
+ && *str != EXT_CTRL_CODE_BEGIN
+ && *str != EOS)
+ {
+ str++;
+ wordLen++;
+ }
+ if (!task->tUseTemporaryLyrics)
+ gUnknown_020388BC = MACRO1(bard->songLyrics[task->tCurrWord]);
+ else
+ gUnknown_020388BC = MACRO1(bard->temporaryLyrics[task->tCurrWord]);
+ temp = gUnknown_03005DA0.var04 / wordLen;
+ zero = 0;
+ gUnknown_03005DA0.var04 = temp;
+ if (gUnknown_03005DA0.var04 <= 0)
+ gUnknown_03005DA0.var04 = 1;
+ task->tCurrWord++;
+ if (task->data[2] == 0)
+ task->tState = 3;
+ else
+ task->tState = 5;
+ task->data[1] = zero;
+ }
+ break;
+ case 5:
+ if (task->data[2] == 0)
+ task->tState = 3;
+ else
+ task->data[2]--;
+ break;
+ case 3:
+ if (gStringVar4[task->tCharIndex] == EOS)
+ {
+ FadeInNewBGM(BGM_POKECEN, 6);
+ m4aMPlayFadeOutTemporarily(&gMPlay_SE2, 2);
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_SPACE)
+ {
+ sub_8003418(gMenuWindowPtr);
+ task->tCharIndex++;
+ task->tState = 2;
+ task->data[2] = 0;
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE)
+ {
+ task->tCharIndex++;
+ task->tState = 2;
+ task->data[2] = 0;
+ }
+ else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN)
+ {
+ task->tCharIndex += 2; // skip over control codes
+ task->tState = 2;
+ task->data[2] = 8;
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR)
+ {
+ gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space
+ sub_8003418(gMenuWindowPtr);
+ task->tCharIndex++;
+ task->data[2] = 0;
+ }
+ else
+ {
+ switch (task->data[1])
+ {
+ case 0:
+ sub_8003418(gMenuWindowPtr);
+ task->data[1]++;
+ break;
+ case 1:
+ task->data[1]++;
+ break;
+ case 2:
+ task->tCharIndex++;
+ task->data[1] = 0;
+ task->data[2] = gUnknown_03005DA0.var04;
+ task->tState = 4;
+ break;
+ }
+ }
+ break;
+ case 4:
+ task->data[2]--;
+ if (task->data[2] == 0)
+ task->tState = 3;
+ break;
+ }
+}
+
+void sub_80F83D0(void)
+{
+ VarSet(0x4010, 0x45 + GetCurrentMauvilleOldMan());
+}
+
+struct Story
+{
+ u8 stat;
+ u8 minVal;
+ const u8 *title;
+ const u8 *action;
+ const u8 *fullText;
+};
+
+static const struct Story sStorytellerStories[] =
+{
+ {0x32, 1, gTextStoryteller_Story1Title, gTextStoryteller_Story1Action, gTextStoryteller_Story1Text},
+ {0x02, 1, gTextStoryteller_Story2Title, gTextStoryteller_Story2Action, gTextStoryteller_Story2Text},
+ {0x03, 1, gTextStoryteller_Story3Title, gTextStoryteller_Story3Action, gTextStoryteller_Story3Text},
+ {0x04, 1, gTextStoryteller_Story4Title, gTextStoryteller_Story4Action, gTextStoryteller_Story4Text},
+ {0x06, 1, gTextStoryteller_Story5Title, gTextStoryteller_Story5Action, gTextStoryteller_Story5Text},
+ {0x09, 1, gTextStoryteller_Story6Title, gTextStoryteller_Story6Action, gTextStoryteller_Story6Text},
+ {0x0B, 1, gTextStoryteller_Story7Title, gTextStoryteller_Story7Action, gTextStoryteller_Story7Text},
+ {0x0C, 1, gTextStoryteller_Story8Title, gTextStoryteller_Story8Action, gTextStoryteller_Story8Text},
+ {0x0D, 1, gTextStoryteller_Story9Title, gTextStoryteller_Story9Action, gTextStoryteller_Story9Text},
+ {0x0E, 1, gTextStoryteller_Story10Title, gTextStoryteller_Story10Action, gTextStoryteller_Story10Text},
+ {0x0F, 1, gTextStoryteller_Story11Title, gTextStoryteller_Story11Action, gTextStoryteller_Story11Text},
+ {0x10, 1, gTextStoryteller_Story12Title, gTextStoryteller_Story12Action, gTextStoryteller_Story12Text},
+ {0x11, 1, gTextStoryteller_Story13Title, gTextStoryteller_Story13Action, gTextStoryteller_Story13Text},
+ {0x12, 1, gTextStoryteller_Story14Title, gTextStoryteller_Story14Action, gTextStoryteller_Story14Text},
+ {0x13, 1, gTextStoryteller_Story15Title, gTextStoryteller_Story15Action, gTextStoryteller_Story15Text},
+ {0x14, 1, gTextStoryteller_Story16Title, gTextStoryteller_Story16Action, gTextStoryteller_Story16Text},
+ {0x1A, 1, gTextStoryteller_Story17Title, gTextStoryteller_Story17Action, gTextStoryteller_Story17Text},
+ {0x1B, 1, gTextStoryteller_Story18Title, gTextStoryteller_Story18Action, gTextStoryteller_Story18Text},
+ {0x1C, 1, gTextStoryteller_Story19Title, gTextStoryteller_Story19Action, gTextStoryteller_Story19Text},
+ {0x1D, 2, gTextStoryteller_Story20Title, gTextStoryteller_Story20Action, gTextStoryteller_Story20Text},
+ {0x1E, 1, gTextStoryteller_Story21Title, gTextStoryteller_Story21Action, gTextStoryteller_Story21Text},
+ {0x21, 1, gTextStoryteller_Story22Title, gTextStoryteller_Story22Action, gTextStoryteller_Story22Text},
+ {0x24, 1, gTextStoryteller_Story23Title, gTextStoryteller_Story23Action, gTextStoryteller_Story23Text},
+ {0x25, 1, gTextStoryteller_Story24Title, gTextStoryteller_Story24Action, gTextStoryteller_Story24Text},
+ {0x26, 1, gTextStoryteller_Story25Title, gTextStoryteller_Story25Action, gTextStoryteller_Story25Text},
+ {0x27, 1, gTextStoryteller_Story26Title, gTextStoryteller_Story26Action, gTextStoryteller_Story26Text},
+ {0x28, 1, gTextStoryteller_Story27Title, gTextStoryteller_Story27Action, gTextStoryteller_Story27Text},
+ {0x29, 1, gTextStoryteller_Story28Title, gTextStoryteller_Story28Action, gTextStoryteller_Story28Text},
+ {0x2A, 1, gTextStoryteller_Story29Title, gTextStoryteller_Story29Action, gTextStoryteller_Story29Text},
+ {0x2B, 1, gTextStoryteller_Story30Title, gTextStoryteller_Story30Action, gTextStoryteller_Story30Text},
+ {0x2C, 1, gTextStoryteller_Story31Title, gTextStoryteller_Story31Action, gTextStoryteller_Story31Text},
+ {0x2D, 1, gTextStoryteller_Story32Title, gTextStoryteller_Story32Action, gTextStoryteller_Story32Text},
+ {0x2E, 1, gTextStoryteller_Story33Title, gTextStoryteller_Story33Action, gTextStoryteller_Story33Text},
+ {0x2F, 1, gTextStoryteller_Story34Title, gTextStoryteller_Story34Action, gTextStoryteller_Story34Text},
+ {0x30, 1, gTextStoryteller_Story35Title, gTextStoryteller_Story35Action, gTextStoryteller_Story35Text},
+ {0x31, 1, gTextStoryteller_Story36Title, gTextStoryteller_Story36Action, gTextStoryteller_Story36Text},
+};
+
+static void StorytellerSetup(void)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+ s32 i;
+
+ storyteller->id = MAUVILLE_MAN_STORYTELLER;
+ storyteller->alreadyRecorded = FALSE;
+ for (i = 0; i < 4; i++)
+ {
+ storyteller->gameStatIDs[i] = 0;
+ storyteller->trainerNames[0][i] = EOS; // Maybe they meant storyteller->trainerNames[i][0] instead?
+ }
+}
+
+static void sub_80F8428(void)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ storyteller->id = MAUVILLE_MAN_STORYTELLER;
+ storyteller->alreadyRecorded = FALSE;
+}
+
+static u32 StorytellerGetGameStat(u8 stat)
+{
+ if (stat == NUM_GAME_STATS)
+ stat = 0;
+ return GetGameStat(stat);
+}
+
+static const struct Story *GetStoryByStat(u32 stat)
+{
+ s32 i;
+
+ for (i = 0; i < 36; i++)
+ {
+ if (sStorytellerStories[i].stat == stat)
+ return &sStorytellerStories[i];
+ }
+ return &sStorytellerStories[35];
+}
+
+static const u8 *GetStoryTitleByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->title;
+}
+
+static const u8 *GetStoryTextByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->fullText;
+}
+
+static const u8 *GetStoryActionByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->action;
+}
+
+static u8 GetFreeStorySlot(void)
+{
+ u8 i;
+
+ for (i = 0; i < 4; i++)
+ {
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ if (storyteller->gameStatIDs[i] == 0)
+ break;
+ }
+ return i;
+}
+
+static u32 StorytellerGetRecordedTrainerStat(u32 trainer)
+{
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.statValues[trainer];
+
+ return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24);
+}
+
+static void StorytellerSetRecordedTrainerStat(u32 trainer, u32 val)
+{
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.statValues[trainer];
+
+ ptr[0] = val;
+ ptr[1] = val >> 8;
+ ptr[2] = val >> 16;
+ ptr[3] = val >> 24;
+}
+
+static bool32 HasTrainerStatIncreased(u32 trainer)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ if (StorytellerGetGameStat(storyteller->gameStatIDs[trainer]) > StorytellerGetRecordedTrainerStat(trainer))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static void GetStoryByStattellerPlayerName(u32 player, void *dst)
+{
+ u8 *name = gSaveBlock1.mauvilleMan.storyteller.trainerNames[player];
+
+ memset(dst, EOS, 8);
+ memcpy(dst, name, 7);
+}
+
+static void StorytellerSetPlayerName(u32 player, const u8 *src)
+{
+ u8 *name = gSaveBlock1.mauvilleMan.storyteller.trainerNames[player];
+ u8 len = StringLength(src);
+
+ memset(name, EOS, 7);
+ StringCopyN(name, src, len);
+}
+
+static void StorytellerRecordNewStat(u32 player, u32 stat)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ storyteller->gameStatIDs[player] = stat;
+ StorytellerSetPlayerName(player, gSaveBlock2.playerName);
+ StorytellerSetRecordedTrainerStat(player, StorytellerGetGameStat(stat));
+ ConvertIntToDecimalStringN(gStringVar1, StorytellerGetGameStat(stat), 0, 10);
+ StringCopy(gStringVar2, GetStoryActionByStat(stat));
+}
+
+static void ScrambleStatList(u8 *arr, s32 count)
+{
+ s32 i;
+
+ for (i = 0; i < count; i++)
+ arr[i] = i;
+ for (i = 0; i < count; i++)
+ {
+ u32 a = Random() % count;
+ u32 b = Random() % count;
+ u8 temp = arr[a];
+ arr[a] = arr[b];
+ arr[b] = temp;
+ }
+}
+
+// What purpose does this struct even serve? Only the length field is used.
+static const struct {u32 length; struct MauvilleManStoryteller *unused1; u32 unused2;} sStorytellerStuff =
+{
+ 36,
+ &gSaveBlock1.mauvilleMan.storyteller, // unused
+ 12, // unused
+};
+
+static bool8 StorytellerInitializeRandomStat(void)
+{
+ u8 arr[sStorytellerStuff.length];
+ s32 i;
+ s32 j;
+
+ ScrambleStatList(arr, 36);
+ for (i = 0; i < 36; i++)
+ {
+ u8 stat = sStorytellerStories[arr[i]].stat;
+ u8 minVal = sStorytellerStories[arr[i]].minVal;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ for (j = 0; j < 4; j++)
+ {
+ if (gSaveBlock1.mauvilleMan.storyteller.gameStatIDs[j] == stat)
+ break;
+ }
+ if (j == 4 && StorytellerGetGameStat(stat) >= minVal)
+ {
+ storyteller->alreadyRecorded = TRUE;
+ StorytellerRecordNewStat(GetFreeStorySlot(), stat);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static void StorytellerDisplayStory(u32 player)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+ u8 stat = storyteller->gameStatIDs[player];
+
+ ConvertIntToDecimalStringN(gStringVar1, StorytellerGetRecordedTrainerStat(player), 0, 10);
+ StringCopy(gStringVar2, GetStoryActionByStat(stat));
+ GetStoryByStattellerPlayerName(player, gStringVar3);
+ ShowFieldMessage(GetStoryTextByStat(stat));
+}
+
+static void PrintStoryList(void)
+{
+ s32 i;
+
+ MenuDrawTextWindow(0, 0, 25, 4 + GetFreeStorySlot() * 2);
+ for (i = 0; i < 4; i++)
+ {
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+ u8 stat = storyteller->gameStatIDs[i];
+
+ if (stat == 0)
+ break;
+ MenuPrint(GetStoryTitleByStat(stat), 1, 2 + i * 2);
+ }
+ MenuPrint(gPCText_Cancel, 1, 2 + i * 2);
+}
+
+static u8 gUnknown_03000748;
+
+static void Task_StoryListMenu(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ s32 selection;
+
+ switch (task->data[0])
+ {
+ case 0:
+ PrintStoryList();
+ InitMenu(0, 1, 2, GetFreeStorySlot() + 1, 0, 24);
+ task->data[0]++;
+ break;
+ case 1:
+ selection = ProcessMenuInput();
+ if (selection == -2)
+ break;
+ if (selection == -1 || selection == GetFreeStorySlot())
+ {
+ gScriptResult = 0;
+ }
+ else
+ {
+ gScriptResult = 1;
+ gUnknown_03000748 = selection;
+ }
+ HandleDestroyMenuCursors();
+ MenuZeroFillWindowRect(0, 0, 25, 12);
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+ break;
+ }
+}
+
+// Sets gScriptResult to TRUE if player selected a story
+void ScrSpecial_StorytellerStoryListMenu(void)
+{
+ CreateTask(Task_StoryListMenu, 0x50);
+}
+
+void ScrSpecial_StorytellerDisplayStory(void)
+{
+ StorytellerDisplayStory(gUnknown_03000748);
+}
+
+u8 ScrSpecial_StorytellerGetFreeStorySlot(void)
+{
+ return GetFreeStorySlot();
+}
+
+// Returns TRUE if stat has increased
+bool8 ScrSpecial_StorytellerUpdateStat(void)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+ u8 r4 = storyteller->gameStatIDs[gUnknown_03000748];
+
+ if (HasTrainerStatIncreased(gUnknown_03000748) == TRUE)
+ {
+ StorytellerRecordNewStat(gUnknown_03000748, r4);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void)
+{
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
+
+ if (storyteller->alreadyRecorded == FALSE)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+bool8 ScrSpecial_StorytellerInitializeRandomStat(void)
+{
+ return StorytellerInitializeRandomStat();
+}
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
deleted file mode 100644
index 93684fc60..000000000
--- a/src/mauville_old_man.c
+++ /dev/null
@@ -1,247 +0,0 @@
-#include "global.h"
-#include "mauville_old_man.h"
-#include "easy_chat.h"
-#include "menu.h"
-#include "rng.h"
-#include "script.h"
-#include "string_util.h"
-#include "strings.h"
-#include "trader.h"
-
-extern u16 gScriptResult;
-extern u16 gSpecialVar_0x8004;
-
-extern u32 gUnknown_083E5388[];
-extern u32 gUnknown_083E53A8[];
-
-extern u16 gUnknown_083E537C[];
-
-void sub_80F7A34(void)
-{
- u16 i;
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- oldMan->oldMan1.unk_2D94 = 0;
- oldMan->oldMan1.unk_2DBD = 0;
-
- for(i = 0; i < 6; i++)
- oldMan->oldMan1.mauvilleOldMan_ecArray[i] = gUnknown_083E537C[i];
-}
-
-void sub_80F7A6C(void)
-{
- struct UnkMauvilleOldManStruct *bard = &gSaveBlock1.oldMan.oldMan1;
-
- bard->unk_2D94 = 1;
- bard->unk_2D95 = 0;
-}
-
-void sub_80F7A7C(void)
-{
- sub_80F83F8();
-}
-
-void sub_80F7A88(void)
-{
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- oldMan->oldMan1.unk_2D94 = 4;
- oldMan->oldMan1.unk_2D95 = 0;
-}
-
-void sub_80F7A98(void)
-{
- sub_81099CC();
-}
-
-void SetMauvilleOldMan(void)
-{
- u32 var = ((u16)((gSaveBlock2.playerTrainerId[1] << 8 | gSaveBlock2.playerTrainerId[0])) % 10) / 2;
-
- switch(var)
- {
- case 0:
- sub_80F7A34();
- break;
- case 1:
- sub_80F7A6C();
- break;
- case 2:
- sub_80F7A98();
- break;
- case 3:
- sub_80F7A7C();
- break;
- case 4:
- sub_80F7A88();
- break;
- }
- sub_80F83D0();
-}
-
-u8 GetCurrentMauvilleOldMan(void)
-{
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- return oldMan->oldMan1.unk_2D94;
-}
-
-void sub_80F7B14(void)
-{
- gScriptResult = GetCurrentMauvilleOldMan();
-}
-
-void sub_80F7B2C(void)
-{
- u16 *scriptPtr = &gScriptResult; // why??
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- *scriptPtr = oldMan->oldMan1.unk_2DBD;
-}
-
-void sub_80F7B40(void)
-{
- u16 i;
- OldMan *oldMan = &gSaveBlock1.oldMan;
- //struct UnkMauvilleOldManStruct *oldManStruct = &gSaveBlock1.oldManStruct;
-
- StringCopy(oldMan->oldMan1.playerName, gSaveBlock2.playerName);
-
- for(i = 0; i < 4; i++)
- oldMan->oldMan1.playerTrainerId[i] = gSaveBlock2.playerTrainerId[i];
-
- for(i = 0; i < 6; i++)
- oldMan->oldMan1.mauvilleOldMan_ecArray[i] = oldMan->oldMan1.mauvilleOldMan_ecArray2[i];
-
- oldMan->oldMan1.unk_2DBD = 1;
-}
-
-void sub_80F7BA0(void)
-{
- struct UnkMauvilleOldManStruct *oldMan = &gSaveBlock1.oldMan.oldMan1;
- u16 specialVar = gSpecialVar_0x8004; // It's a bit odd to use this temp variable, but it seems needed to match.
- u16 *r5;
- u16 i;
- u8 *ptr;
- u8 *r4;
-
- r5 = oldMan->mauvilleOldMan_ecArray2;
- if (specialVar == 0)
- r5 = oldMan->mauvilleOldMan_ecArray;
- ptr = gStringVar4;
- r4 = ptr;
- for (i = 0; i < 2; i++)
- {
- ptr = sub_80EB3FC(ptr, *(r5++));
- while (ptr != r4)
- {
- if (*r4 == 0)
- *r4 = 0x37;
- r4++;
- }
- r4++;
- *(ptr++) = 0;
- ptr = sub_80EB3FC(ptr, *(r5++));
- while (ptr != r4)
- {
- if (*r4 == 0)
- *r4 = 0x37;
- r4++;
- }
- r4++;
- *(ptr++) = 0xFE;
- ptr = sub_80EB3FC(ptr, *(r5++));
- while (ptr != r4)
- {
- if (*r4 == 0)
- *r4 = 0x37;
- r4++;
- }
- //_080F7C2A
- if (i == 0)
- {
- *(ptr++) = EXT_CTRL_CODE_BEGIN;
- *(ptr++) = 0xF;
- }
- }
-}
-
-void sub_80F7C54(void)
-{
- sub_80F7F80(gSpecialVar_0x8004);
- MenuDisplayMessageBox();
- ScriptContext1_Stop();
-}
-
-void sub_80F7C70(void)
-{
- u16 *scriptPtr = &gScriptResult; // again??
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- *scriptPtr = oldMan->oldMan1.unk_2D95;
-}
-
-void sub_80F7C84(void)
-{
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- oldMan->oldMan1.unk_2D95 = 1;
-}
-
-void sub_80F7C90(void)
-{
- u16 var = sub_80EB8EC();
-
- if(var == 0xFFFF)
- {
- gScriptResult = FALSE;
- }
- else
- {
- sub_80EB3FC(gStringVar1, var);
- gScriptResult = TRUE;
- }
-}
-
-void sub_80F7CC8(void)
-{
- OldMan *oldMan = &gSaveBlock1.oldMan;
-
- if(oldMan->oldMan1.unk_2D95 == 10)
- {
- gScriptResult = FALSE;
- oldMan->oldMan1.unk_2D95 = 0;
- }
- else
- gScriptResult = TRUE;
-}
-
-void sub_80F7CF4(void)
-{
- struct UnkMauvilleOldManStruct2 *oldMan = &gSaveBlock1.oldMan.oldMan2;
-
- if(oldMan->unk1 == 0)
- sub_80F7DC0();
-
- if(oldMan->mauvilleOldMan_ecArray[oldMan->unk1] != 0xFFFF) // is not the last element of the array?
- {
- u8 *stringPtr;
- u32 random = Random();
-
- random %= 8;
- stringPtr = sub_80EB3FC(gStringVar4, oldMan->mauvilleOldMan_ecArray[oldMan->unk1]);
- stringPtr = StringCopy(stringPtr, gOtherText_Is);
- stringPtr = StringCopy(stringPtr, (u8 *)gUnknown_083E5388[random]);
- StringCopy(stringPtr, gOtherText_DontYouAgree);
- }
- else
- {
- StringCopy(gStringVar4, (u8 *)gUnknown_083E53A8[oldMan->mauvilleOldMan_ecArray2[oldMan->unk2++]]);
- }
- if(!(Random() % 10))
- oldMan->unk1 = 10;
- else
- oldMan->unk1++;
-
- gScriptResult = TRUE;
-}
diff --git a/src/new_game.c b/src/new_game.c
index 226ac9bb7..46df14acd 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -11,7 +11,7 @@
#include "item_menu.h"
#include "lottery_corner.h"
#include "mail_data.h"
-#include "mauville_old_man.h"
+#include "mauville_man.h"
#include "play_time.h"
#include "player_pc.h"
#include "pokeblock.h"
@@ -157,7 +157,7 @@ void NewGameInitData(void)
ClearPokeblocks();
ClearDecorationInventories();
InitEasyChatPhrases();
- SetMauvilleOldMan();
+ SetupMauvilleOldMan();
InitDewfordTrend();
ResetFanClub();
ResetLotteryCorner();
diff --git a/src/record_mixing.c b/src/record_mixing.c
index d1083910c..30bcb29d1 100644
--- a/src/record_mixing.c
+++ b/src/record_mixing.c
@@ -10,7 +10,7 @@
#include "items.h"
#include "load_save.h"
#include "link.h"
-#include "mauville_old_man.h"
+#include "mauville_man.h"
#include "menu.h"
#include "mystery_event_script.h"
#include "rng.h"
@@ -40,7 +40,7 @@ static u8 gUnknown_0300071C[4];
void *recordMixingSecretBases = &gSaveBlock1.secretBases;
void *recordMixingTvShows = &gSaveBlock1.tvShows;
void *gUnknown_083D0274 = &gSaveBlock1.unknown_2ABC;
-void *gUnknown_083D0278 = &gSaveBlock1.oldMan;
+void *gUnknown_083D0278 = &gSaveBlock1.mauvilleMan;
void *recordMixingEasyChatPairs = &gSaveBlock1.easyChatPairs;
struct RecordMixing_UnknownStruct *gUnknown_083D0280 = &gUnknown_02038738;
void *gUnknown_083D0284 = &gSaveBlock2.filler_A8;
diff --git a/src/strings.c b/src/strings.c
index 219c5bec1..6c8dce9d6 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -861,7 +861,7 @@ const u8 gOtherText_AtBattleStart[] = _("At the battle’s start.");
const u8 gOtherText_UponWinningBattle[] = _("Upon winning a battle.");
const u8 gOtherText_UponLosingBattle[] = _("Upon losing a battle.");
-// mauville_old_man?
+// mauville_man?
const u8 gOtherText_TheBardsSong[] = _("The BARD’s Song");
const u8 gOtherText_WhatsHipHappening[] = _("What’s hip and happening?");
const u8 gOtherText_Interview[] = _("Interview");
@@ -1781,7 +1781,7 @@ const u8 gOtherText_AtBattleStart[] = _("Zum Kampfbeginn");
const u8 gOtherText_UponWinningBattle[] = _("Über den Sieg");
const u8 gOtherText_UponLosingBattle[] = _("Über die Niederlage");
-// mauville_old_man?
+// mauville_man?
const u8 gOtherText_TheBardsSong[] = _("Das BARDEN-Lied");
const u8 gOtherText_WhatsHipHappening[] = _("Was ist hip? Was ist top?");
const u8 gOtherText_Interview[] = _("Interview");
diff --git a/src/trader.c b/src/trader.c
index ea06058e9..61f48fad8 100644
--- a/src/trader.c
+++ b/src/trader.c
@@ -3,6 +3,7 @@
#include "decoration_inventory.h"
#include "event_data.h"
#include "main.h"
+#include "mauville_man.h"
#include "menu.h"
#include "menu_helpers.h"
#include "script.h"
@@ -36,7 +37,7 @@ void sub_810993C(void)
{
u8 i, j;
u8 buffer[12];
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
for (i = 0; i < 3; i++)
{
@@ -55,13 +56,13 @@ void sub_810993C(void)
}
}
-void sub_81099CC(void)
+void TraderSetup(void)
{
u8 i;
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
- trader->unk0 = 2;
- trader->unk31 = 0;
+ trader->id = MAUVILLE_MAN_TRADER;
+ trader->alreadyTraded = FALSE;
for (i = 0; i < 4; i++)
{
@@ -74,8 +75,8 @@ void sub_81099CC(void)
void sub_8109A20(void)
{
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
- trader->unk31 = 0;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
+ trader->alreadyTraded = FALSE;
}
void sub_8109A30(u8 value)
@@ -83,12 +84,12 @@ void sub_8109A30(u8 value)
VarSet(VAR_RECYCLE_GOODS, value);
}
-void sub_8109A48(u8 taskId)
+void CreateAvailableDecorationsMenu(u8 taskId)
{
u8 i;
u8 numChoices = 1;
u8 numDecorations = 0;
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
for (i = 0; i < 4; i++)
{
@@ -139,9 +140,9 @@ void sub_8109B34(u8 taskId, u8 decorationId)
EnableBothScriptContexts();
}
-void sub_8109B7C(u8 taskId)
+void Task_HandleGetDecorationMenuInput(u8 taskId)
{
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
if (gMain.newKeys & DPAD_UP)
{
@@ -174,13 +175,13 @@ void sub_8109B7C(u8 taskId)
}
}
-void sub_8109C44(void)
+void ScrSpecial_GetTraderTradedFlag(void)
{
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
- gScriptResult = trader->unk31;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
+ gScriptResult = trader->alreadyTraded;
}
-void sub_8109C58(void)
+void ScrSpecial_DoesPlayerHaveNoDecorations(void)
{
u8 i;
@@ -195,7 +196,7 @@ void sub_8109C58(void)
gScriptResult = TRUE;
}
-void sub_8109C90(void)
+void ScrSpecial_IsDecorationFull(void)
{
gScriptResult = FALSE;
if (gDecorations[gSpecialVar_0x8004].category != gDecorations[gSpecialVar_0x8006].category
@@ -206,7 +207,7 @@ void sub_8109C90(void)
}
}
-void sub_8109CF0(void)
+void ScrSpecial_TraderMenuGiveDecoration(void)
{
CreateTask(sub_80FE7A8, 0);
}
@@ -242,20 +243,20 @@ void sub_8109DAC(u8 taskId)
EnableBothScriptContexts();
}
-void sub_8109DE0(void)
+void ScrSpecial_TraderDoDecorationTrade(void)
{
- struct MauvilleOldManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
sub_81340A8(gSpecialVar_0x8006);
IsThereStorageSpaceForDecoration(gSpecialVar_0x8004);
StringCopy(trader->unk5[gSpecialVar_0x8005], gSaveBlock2.playerName);
trader->unk1[gSpecialVar_0x8005] = gSpecialVar_0x8006;
sub_810993C();
- trader->unk31 = 1;
+ trader->alreadyTraded = TRUE;
}
-void sub_8109E34(void)
+void ScrSpecial_TraderMenuGetDecoration(void)
{
- u8 taskId = CreateTask(sub_8109B7C, 0);
- sub_8109A48(taskId);
+ u8 taskId = CreateTask(Task_HandleGetDecorationMenuInput, 0);
+ CreateAvailableDecorationsMenu(taskId);
}
diff --git a/src/trainer_card.c b/src/trainer_card.c
index 626c5a7bf..e64ec1c86 100644
--- a/src/trainer_card.c
+++ b/src/trainer_card.c
@@ -509,7 +509,7 @@ static void sub_8093688(void)
ewram0.var_5 = 0;
ewram0.var_6 = 0;
for (i = 0; i < 4; i++)
- sub_80EB3FC(ewram0.var_20[i], ewram0.var_64.var_28[i]);
+ EasyChat_GetWordText(ewram0.var_20[i], ewram0.var_64.var_28[i]);
sub_80936D4();
}
diff --git a/src/tv.c b/src/tv.c
index a254bcd5f..996709209 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -388,7 +388,7 @@ bool8 GabbyAndTyGetLastQuote(void)
if (gSaveBlock1.gabbyAndTyData.quote == 0xffff)
return FALSE;
- sub_80EB3FC(gStringVar1, gSaveBlock1.gabbyAndTyData.quote);
+ EasyChat_GetWordText(gStringVar1, gSaveBlock1.gabbyAndTyData.quote);
gSaveBlock1.gabbyAndTyData.quote |= 0xffff;
return TRUE;
}
@@ -1624,7 +1624,7 @@ void sub_80BF79C(TVShow *arg0)
break;
i++;
}
- sub_80EB3FC(gStringVar3, arg0->recentHappenings.var04[i]);
+ EasyChat_GetWordText(gStringVar3, arg0->recentHappenings.var04[i]);
}
u8 sub_80BF7E8(struct TVShowNameRaterShow *arg0)
@@ -2575,20 +2575,20 @@ void DoTVShowBravoTrainerPokemonProfile(void)
break;
case 3:
TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language);
- sub_80EB3FC(gStringVar2, bravoTrainer->var04[0]);
+ EasyChat_GetWordText(gStringVar2, bravoTrainer->var04[0]);
sub_80BF088(2, bravoTrainer->contestResult + 1);
gUnknown_020387E8 = 5;
break;
case 4:
TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language);
- sub_80EB3FC(gStringVar2, bravoTrainer->var04[0]);
+ EasyChat_GetWordText(gStringVar2, bravoTrainer->var04[0]);
sub_80BF088(2, bravoTrainer->contestResult + 1);
gUnknown_020387E8 = 5;
break;
case 5:
TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language);
CopyContestCategoryToStringVar(1, bravoTrainer->contestCategory);
- sub_80EB3FC(gStringVar3, bravoTrainer->var04[1]);
+ EasyChat_GetWordText(gStringVar3, bravoTrainer->var04[1]);
if (bravoTrainer->var14)
gUnknown_020387E8 = 6;
else
@@ -2597,7 +2597,7 @@ void DoTVShowBravoTrainerPokemonProfile(void)
case 6:
StringCopy(gStringVar1, gSpeciesNames[bravoTrainer->species]);
StringCopy(gStringVar2, gMoveNames[bravoTrainer->var14]);
- sub_80EB3FC(gStringVar3, bravoTrainer->var04[1]);
+ EasyChat_GetWordText(gStringVar3, bravoTrainer->var04[1]);
gUnknown_020387E8 = 7;
break;
case 7:
@@ -2680,7 +2680,7 @@ void DoTVShowBravoTrainerBattleTowerProfile(void)
gUnknown_020387E8 = 11;
break;
case 11:
- sub_80EB3FC(gStringVar1, bravoTrainerTower->var18[0]);
+ EasyChat_GetWordText(gStringVar1, bravoTrainerTower->var18[0]);
if (bravoTrainerTower->var1b == 0)
gUnknown_020387E8 = 12;
else
@@ -2688,7 +2688,7 @@ void DoTVShowBravoTrainerBattleTowerProfile(void)
break;
case 12:
case 13:
- sub_80EB3FC(gStringVar1, bravoTrainerTower->var18[0]);
+ EasyChat_GetWordText(gStringVar1, bravoTrainerTower->var18[0]);
TVShowConvertInternationalString(gStringVar2, bravoTrainerTower->trainerName, bravoTrainerTower->language);
TVShowConvertInternationalString(gStringVar3, bravoTrainerTower->pokemonName, bravoTrainerTower->language);
gUnknown_020387E8 = 14;
@@ -3106,12 +3106,12 @@ void DoTVShowPokemonFanClubOpinions(void)
case 3:
TVShowConvertInternationalString(gStringVar1, fanclubOpinions->playerName, fanclubOpinions->language);
StringCopy(gStringVar2, gSpeciesNames[fanclubOpinions->var02]);
- sub_80EB3FC(gStringVar3, fanclubOpinions->var1C[0]);
+ EasyChat_GetWordText(gStringVar3, fanclubOpinions->var1C[0]);
gUnknown_020387E8 = 4;
break;
case 4:
TVShowConvertInternationalString(gStringVar1, fanclubOpinions->playerName, fanclubOpinions->language);
- sub_80EB3FC(gStringVar3, fanclubOpinions->var1C[1]);
+ EasyChat_GetWordText(gStringVar3, fanclubOpinions->var1C[1]);
TVShowDone();
break;
}
@@ -3176,7 +3176,7 @@ void DoTVShowInSearchOfTrainers(void)
gUnknown_020387E8 = 8;
break;
case 8:
- sub_80EB3FC(gStringVar1, gSaveBlock1.gabbyAndTyData.quote);
+ EasyChat_GetWordText(gStringVar1, gSaveBlock1.gabbyAndTyData.quote);
StringCopy(gStringVar2, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon1]);
StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon2]);
gScriptResult = 1;
diff --git a/sym_bss.txt b/sym_bss.txt
index b306da5f6..088c7d7ba 100644
--- a/sym_bss.txt
+++ b/sym_bss.txt
@@ -79,11 +79,7 @@ gUnknown_03000740: @ 3000740
gUnknown_03000744: @ 3000744
.space 0x4
-@ mauville_old_man
-
-gUnknown_03000748: @ 3000748
- .space 0x4
-
+ .include "src/mauville_man.o"
.include "src/menu_helpers.o"
.include "src/contest_painting.o"
.include "src/pokeblock.o"
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 7630569f0..8c6999307 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -545,13 +545,7 @@ gUnknown_020388B4: @ 20388B4
.space 0x4
.include "src/mon_markings.o"
-
-@ mauville_old_man
-
- .align 2
-gUnknown_020388BC: @ 20388BC
- .space 0x4
-
+ .include "src/mauville_man.o"
.include "src/menu_helpers.o"
.include "src/region_map.o"
.include "src/decoration.o"