summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/macros/event.inc6
-rw-r--r--asm/mauville_old_man.s9
-rw-r--r--data/event_scripts.s11
-rw-r--r--data/mauville_old_man.s49
-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.inc350
-rw-r--r--data/scripts/storyteller.inc82
-rw-r--r--data/scripts/trader.inc88
-rw-r--r--data/specials.inc10
-rw-r--r--data/text/bard.inc18
-rw-r--r--include/global.h8
-rw-r--r--include/mauville_old_man.h1
-rw-r--r--ld_script.txt2
-rw-r--r--src/mauville_old_man.c337
-rw-r--r--src/record_mixing.c2
-rw-r--r--src/trader.c14
18 files changed, 625 insertions, 505 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 ef4d313d4..000000000
--- a/asm/mauville_old_man.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .include "constants/gba_constants.inc"
- .include "constants/species_constants.inc"
- .include "asm/macros.inc"
-
- .syntax unified
-
- .text
-
- .align 2, 0 @ Don't pad with nop.
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 4ccec0db3..000000000
--- a/data/mauville_old_man.s
+++ /dev/null
@@ -1,49 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .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
- .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 bc7b1b8f1..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 ScrSpecial_GenerateGiddyLine
- 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..f406d33fe
--- /dev/null
+++ b/data/scripts/mauville_man.inc
@@ -0,0 +1,350 @@
+@ 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, speak_to_bard
+ case MAUVILLE_MAN_HIPSTER, speak_to_hipster
+ case MAUVILLE_MAN_TRADER, speak_to_trader
+ case MAUVILLE_MAN_STORYTELLER, speak_to_storyteller
+ case MAUVILLE_MAN_GIDDY, MauvilleCity_PokemonCenter_1F_EventScript_1B09EB
+ end
+
+@-------------------------------------------------------------------------------
+@ Bard
+@-------------------------------------------------------------------------------
+
+speak_to_bard:
+ 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
+ special ScrSpecial_PlayBardSong
+ pause 60
+ special ScrSpecial_HasBardSongBeenChanged
+ compare RESULT, FALSE
+ jumpeq prompt_write_lyrics @ Prompt new lyrics only if song hasn't been changed
+ 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
+ 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
+@-------------------------------------------------------------------------------
+
+speak_to_hipster:: @ 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 ScrSpecial_SetHipsterSpokenFlag
+ release
+ end
+
+@-------------------------------------------------------------------------------
+@ Trader
+@-------------------------------------------------------------------------------
+
+ .include "data/text/trader.inc"
+
+speak_to_trader:: @ 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
+
+@-------------------------------------------------------------------------------
+@ Storyteller
+@-------------------------------------------------------------------------------
+
+ .include "data/text/storyteller.inc"
+
+speak_to_storyteller:: @ 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
+
+@-------------------------------------------------------------------------------
+@ Giddy
+@-------------------------------------------------------------------------------
+
+ .include "data/text/giddy.inc"
+
+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 ScrSpecial_GenerateGiddyLine
+ 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
+
+ .include "data/text/bard.inc"
+ .include "data/text/hipster.inc" \ No newline at end of file
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 e588a29d3..06ba22a23 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -104,13 +104,13 @@ 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 ScrSpecial_GetCurrentMauvilleMan
+ def_special ScrSpecial_HasBardSongBeenChanged
+ def_special ScrSpecial_SaveBardSongLyrics
def_special sub_80F7C70
- def_special sub_80F7C84
+ def_special ScrSpecial_SetHipsterSpokenFlag
def_special sub_80F7C90
- def_special sub_80F7C54
+ def_special ScrSpecial_PlayBardSong
def_special sub_80F83D0
def_special ScrSpecial_GenerateGiddyLine
def_special sub_80F7CC8
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/include/global.h b/include/global.h
index f172c12a3..32a6beb2b 100644
--- a/include/global.h
+++ b/include/global.h
@@ -464,7 +464,7 @@ struct MauvilleManBard
/*0x1A*/ u8 playerName[8];
/*0x22*/ u8 filler_2DB6[0x3];
/*0x25*/ u8 playerTrainerId[4];
- /*0x29*/ u8 unk_2DBD;
+ /*0x29*/ bool8 hasChangedSong;
}; /*size = 0x2C*/
struct MauvilleManHipster
@@ -502,7 +502,7 @@ struct MauvilleManGiddy
}; /*size = 0x2C*/
-typedef union OldMan
+union MauvilleMan
{
struct MauvilleManCommon common;
struct MauvilleManBard bard;
@@ -511,7 +511,7 @@ typedef union OldMan
struct MauvilleManStoryteller storyteller;
struct MauvilleManGiddy giddy;
u8 filler[0x40];
-} OldMan;
+};
struct Unk_SB_Access_Struct1
{
@@ -668,7 +668,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/mauville_old_man.h b/include/mauville_old_man.h
index 43bf3e093..277e5fbe6 100644
--- a/include/mauville_old_man.h
+++ b/include/mauville_old_man.h
@@ -14,7 +14,6 @@ enum
void SetupMauvilleOldMan(void);
void sub_80F7DC0(void);
void sub_80F7F30(void);
-void sub_80F7F80(u8);
void sub_80F83D0(void);
#endif // GUARD_MAUVILLE_OLD_MAN_H
diff --git a/ld_script.txt b/ld_script.txt
index 4b7d28768..5e604b480 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -190,7 +190,6 @@ SECTIONS {
asm/pokenav.o(.text_80F708C);
src/mon_markings.o(.text);
src/mauville_old_man.o(.text);
- asm/mauville_old_man.o(.text);
src/mail.o(.text);
src/menu_helpers.o(.text);
src/script_pokemon_util_80F99CC.o(.text);
@@ -422,7 +421,6 @@ SECTIONS {
data/pokenav.o(.rodata);
data/mon_markings.o(.rodata);
src/mauville_old_man.o(.rodata);
- data/mauville_old_man.o(.rodata);
data/mail.o(.rodata);
src/menu_helpers.o(.rodata);
src/heal_location.o(.rodata);
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
index 9400dfc32..3bf682ca0 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -23,11 +23,121 @@ extern struct MusicPlayerInfo gMPlay_SE2;
extern u16 gScriptResult;
extern u16 gSpecialVar_0x8004;
+
+extern const u8 UnknownString_81AEFFC[];
+extern const u8 UnknownString_81AF013[];
+extern const u8 UnknownString_81AF022[];
+extern const u8 UnknownString_81AF0A3[];
+extern const u8 UnknownString_81AF0BB[];
+extern const u8 UnknownString_81AF0CA[];
+extern const u8 UnknownString_81AF149[];
+extern const u8 UnknownString_81AF164[];
+extern const u8 UnknownString_81AF174[];
+extern const u8 UnknownString_81AF1E5[];
+extern const u8 UnknownString_81AF1FD[];
+extern const u8 UnknownString_81AF20A[];
+extern const u8 UnknownString_81AF281[];
+extern const u8 UnknownString_81AF299[];
+extern const u8 UnknownString_81AF2A9[];
+extern const u8 UnknownString_81AF32C[];
+extern const u8 UnknownString_81AF345[];
+extern const u8 UnknownString_81AF34D[];
+extern const u8 UnknownString_81AF3D0[];
+extern const u8 UnknownString_81AF3ED[];
+extern const u8 UnknownString_81AF3FC[];
+extern const u8 UnknownString_81AF46D[];
+extern const u8 UnknownString_81AF481[];
+extern const u8 UnknownString_81AF49B[];
+extern const u8 UnknownString_81AF511[];
+extern const u8 UnknownString_81AF529[];
+extern const u8 UnknownString_81AF536[];
+extern const u8 UnknownString_81AF5A9[];
+extern const u8 UnknownString_81AF5BD[];
+extern const u8 UnknownString_81AF5CD[];
+extern const u8 UnknownString_81AF63F[];
+extern const u8 UnknownString_81AF661[];
+extern const u8 UnknownString_81AF676[];
+extern const u8 UnknownString_81AF711[];
+extern const u8 UnknownString_81AF726[];
+extern const u8 UnknownString_81AF73D[];
+extern const u8 UnknownString_81AF7BF[];
+extern const u8 UnknownString_81AF7D9[];
+extern const u8 UnknownString_81AF7F1[];
+extern const u8 UnknownString_81AF88A[];
+extern const u8 UnknownString_81AF8A1[];
+extern const u8 UnknownString_81AF8AA[];
+extern const u8 UnknownString_81AF91B[];
+extern const u8 UnknownString_81AF935[];
+extern const u8 UnknownString_81AF943[];
+extern const u8 UnknownString_81AF9C8[];
+extern const u8 UnknownString_81AF9E0[];
+extern const u8 UnknownString_81AF9F6[];
+extern const u8 UnknownString_81AFA79[];
+extern const u8 UnknownString_81AFA92[];
+extern const u8 UnknownString_81AFA9E[];
+extern const u8 UnknownString_81AFB17[];
+extern const u8 UnknownString_81AFB2D[];
+extern const u8 UnknownString_81AFB48[];
+extern const u8 UnknownString_81AFBD8[];
+extern const u8 UnknownString_81AFBE7[];
+extern const u8 UnknownString_81AFC04[];
+extern const u8 UnknownString_81AFC8A[];
+extern const u8 UnknownString_81AFC9D[];
+extern const u8 UnknownString_81AFCBE[];
+extern const u8 UnknownString_81AFD44[];
+extern const u8 UnknownString_81AFD60[];
+extern const u8 UnknownString_81AFD80[];
+extern const u8 UnknownString_81AFE1D[];
+extern const u8 UnknownString_81AFE36[];
+extern const u8 UnknownString_81AFE42[];
+extern const u8 UnknownString_81AFEC2[];
+extern const u8 UnknownString_81AFEDD[];
+extern const u8 UnknownString_81AFEEE[];
+extern const u8 UnknownString_81AFF68[];
+extern const u8 UnknownString_81AFF7B[];
+extern const u8 UnknownString_81AFF88[];
+extern const u8 UnknownString_81AFFFB[];
+extern const u8 UnknownString_81B000D[];
+extern const u8 UnknownString_81B0015[];
+extern const u8 UnknownString_81B009D[];
+extern const u8 UnknownString_81B00B6[];
+extern const u8 UnknownString_81B00C9[];
+extern const u8 UnknownString_81B014D[];
+extern const u8 UnknownString_81B0165[];
+extern const u8 UnknownString_81B0173[];
+extern const u8 UnknownString_81B01E9[];
+extern const u8 UnknownString_81B0201[];
+extern const u8 UnknownString_81B0213[];
+extern const u8 UnknownString_81B0290[];
+extern const u8 UnknownString_81B02A5[];
+extern const u8 UnknownString_81B02B6[];
+extern const u8 UnknownString_81B0337[];
+extern const u8 UnknownString_81B0351[];
+extern const u8 UnknownString_81B0364[];
+extern const u8 UnknownString_81B03E9[];
+extern const u8 UnknownString_81B0401[];
+extern const u8 UnknownString_81B040C[];
+extern const u8 UnknownString_81B046E[];
+extern const u8 UnknownString_81B0489[];
+extern const u8 UnknownString_81B049A[];
+extern const u8 UnknownString_81B0523[];
+extern const u8 UnknownString_81B053E[];
+extern const u8 UnknownString_81B0554[];
+extern const u8 UnknownString_81B05D8[];
+extern const u8 UnknownString_81B05F3[];
+extern const u8 UnknownString_81B0610[];
+extern const u8 UnknownString_81B06A9[];
+extern const u8 UnknownString_81B06C6[];
+extern const u8 UnknownString_81B06D9[];
+extern const u8 UnknownString_81B0763[];
+extern const u8 UnknownString_81B0781[];
+extern const u8 UnknownString_81B0797[];
+
extern struct UnkBard2 gUnknown_03005DA0;
extern u16 gUnknown_020388BC; // set but not used?
-const u16 gDefaultBardSongLyrics[] =
+static const u16 gDefaultBardSongLyrics[] =
{
#ifdef ENGLISH
EC_WORD_SISTER,
@@ -46,7 +156,7 @@ const u16 gDefaultBardSongLyrics[] =
#endif
};
-const u8 *const gGiddyAdjectives[] =
+static const u8 *const gGiddyAdjectives[] =
{
OtherText_SoPretty,
OtherText_SoDarling,
@@ -58,7 +168,7 @@ const u8 *const gGiddyAdjectives[] =
OtherText_SoMagical,
};
-const u8 *const gGiddyQuestions[] =
+static const u8 *const gGiddyQuestions[] =
{
OtherText_WantVacationNicePlace,
OtherText_BoughtCrayonsIsNice,
@@ -70,24 +180,25 @@ const u8 *const gGiddyQuestions[] =
OtherText_SecretBasesWonderful,
};
-void sub_80F8184(u8);
+void Task_BardSong(u8);
+void StartBardSong(u8);
void StorytellerSetup(void);
void sub_80F8428(void);
void SetupBard(void)
{
u16 i;
- struct MauvilleManBard *bard = &gSaveBlock1.oldMan.bard;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
bard->id = MAUVILLE_MAN_BARD;
- bard->unk_2DBD = 0;
+ bard->hasChangedSong = FALSE;
for (i = 0; i < 6; i++)
bard->songLyrics[i] = gDefaultBardSongLyrics[i];
}
void SetupHipster(void)
{
- struct MauvilleManHipster *hipster = &gSaveBlock1.oldMan.hipster;
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
hipster->id = MAUVILLE_MAN_HIPSTER;
hipster->unk1 = 0;
@@ -100,7 +211,7 @@ void SetupStoryteller(void)
void SetupGiddy(void)
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
giddy->id = MAUVILLE_MAN_GIDDY;
giddy->unk1 = 0;
@@ -137,12 +248,14 @@ void SetupMauvilleOldMan(void)
sub_80F83D0();
}
-/*
+//#define TEST MAUVILLE_MAN_BARD
+
+#ifdef TEST
// Safely changes man to test functionality
u8 GetCurrentMauvilleOldMan(void)
{
- u8 newMan = MAUVILLE_MAN_GIDDY;
- struct MauvilleManCommon *common = &gSaveBlock1.oldMan.common;
+ u8 newMan = TEST;
+ struct MauvilleManCommon *common = &gSaveBlock1.mauvilleMan.common;
if (common->id != newMan)
{
@@ -168,56 +281,56 @@ u8 GetCurrentMauvilleOldMan(void)
}
return common->id;
}
-*/
-
+#else
u8 GetCurrentMauvilleOldMan(void)
{
- struct MauvilleManCommon *common = &gSaveBlock1.oldMan.common;
+ struct MauvilleManCommon *common = &gSaveBlock1.mauvilleMan.common;
return common->id;
}
+#endif
-void sub_80F7B14(void)
+void ScrSpecial_GetCurrentMauvilleMan(void)
{
gScriptResult = GetCurrentMauvilleOldMan();
}
-void sub_80F7B2C(void)
+void ScrSpecial_HasBardSongBeenChanged(void)
{
- u16 *scriptPtr = &gScriptResult; // why??
- OldMan *oldMan = &gSaveBlock1.oldMan;
+ u16 *scriptResult = &gScriptResult; // why??
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
- *scriptPtr = oldMan->bard.unk_2DBD;
+ *scriptResult = bard->hasChangedSong;
}
-void sub_80F7B40(void)
+void ScrSpecial_SaveBardSongLyrics(void)
{
u16 i;
- struct MauvilleManBard *bard = &gSaveBlock1.oldMan.bard;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
StringCopy(bard->playerName, gSaveBlock2.playerName);
- for(i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
bard->playerTrainerId[i] = gSaveBlock2.playerTrainerId[i];
- for(i = 0; i < 6; i++)
+ for (i = 0; i < 6; i++)
bard->songLyrics[i] = bard->mauvilleOldMan_ecArray2[i];
- bard->unk_2DBD = 1;
+ bard->hasChangedSong = TRUE;
}
void sub_80F7BA0(void)
{
- struct MauvilleManBard *oldMan = &gSaveBlock1.oldMan.bard;
+ 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 *r5;
u16 i;
u8 *ptr;
u8 *r4;
- r5 = oldMan->mauvilleOldMan_ecArray2;
+ r5 = bard->mauvilleOldMan_ecArray2;
if (specialVar == 0)
- r5 = oldMan->songLyrics;
+ r5 = bard->songLyrics;
ptr = gStringVar4;
r4 = ptr;
for (i = 0; i < 2; i++)
@@ -230,7 +343,7 @@ void sub_80F7BA0(void)
r4++;
}
r4++;
- *(ptr++) = 0;
+ *(ptr++) = CHAR_SPACE;
ptr = sub_80EB3FC(ptr, *(r5++));
while (ptr != r4)
{
@@ -239,7 +352,7 @@ void sub_80F7BA0(void)
r4++;
}
r4++;
- *(ptr++) = 0xFE;
+ *(ptr++) = CHAR_NEWLINE;
ptr = sub_80EB3FC(ptr, *(r5++));
while (ptr != r4)
{
@@ -247,7 +360,6 @@ void sub_80F7BA0(void)
*r4 = 0x37;
r4++;
}
- //_080F7C2A
if (i == 0)
{
*(ptr++) = EXT_CTRL_CODE_BEGIN;
@@ -256,33 +368,33 @@ void sub_80F7BA0(void)
}
}
-void sub_80F7C54(void)
+void ScrSpecial_PlayBardSong(void)
{
- sub_80F7F80(gSpecialVar_0x8004);
+ StartBardSong(gSpecialVar_0x8004);
MenuDisplayMessageBox();
ScriptContext1_Stop();
}
void sub_80F7C70(void)
{
- u16 *scriptPtr = &gScriptResult; // again??
- OldMan *oldMan = &gSaveBlock1.oldMan;
+ u16 *scriptResult = &gScriptResult; // again??
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
- *scriptPtr = oldMan->bard.unk_2D95;
+ *scriptResult = hipster->unk1;
}
-void sub_80F7C84(void)
+void ScrSpecial_SetHipsterSpokenFlag(void)
{
- OldMan *oldMan = &gSaveBlock1.oldMan;
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
- oldMan->bard.unk_2D95 = 1;
+ hipster->unk1 = 1;
}
void sub_80F7C90(void)
{
u16 var = sub_80EB8EC();
- if(var == 0xFFFF)
+ if (var == 0xFFFF)
{
gScriptResult = FALSE;
}
@@ -295,12 +407,12 @@ void sub_80F7C90(void)
void sub_80F7CC8(void)
{
- OldMan *oldMan = &gSaveBlock1.oldMan;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
- if (oldMan->bard.unk_2D95 == 10)
+ if (bard->unk_2D95 == 10)
{
gScriptResult = FALSE;
- oldMan->bard.unk_2D95 = 0;
+ bard->unk_2D95 = 0;
}
else
{
@@ -310,7 +422,7 @@ void sub_80F7CC8(void)
void ScrSpecial_GenerateGiddyLine(void)
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
if (giddy->unk1 == 0)
sub_80F7DC0();
@@ -357,22 +469,22 @@ void sub_80F7DC0(void)
for (i = 0; i < 8; i++)
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
- //gSaveBlock1.oldMan.giddy.questionList[i] = i;
+ //gSaveBlock1.mauvilleMan.giddy.questionList[i] = i;
giddy->questionList[i] = i;
}
// Scramble questions
for (i = 0; i < 8; i++)
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
/*
u16 r1 = Random() % (i + 1);
- u8 r7 = gSaveBlock1.oldMan.giddy.questionList[i];
- gSaveBlock1.oldMan.giddy.questionList[i] = gSaveBlock1.oldMan.giddy.questionList[r1];
- gSaveBlock1.oldMan.giddy.questionList[r1] = r7;
+ 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];
@@ -388,20 +500,20 @@ void sub_80F7DC0(void)
}
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
giddy->questionNum = 0;
}
- //gSaveBlock1.oldMan.giddy.questionNum = 0;
+ //gSaveBlock1.mauvilleMan.giddy.questionNum = 0;
r7 = 0;
for (i = 0; i < 10; i++)
{
- struct MauvilleManGiddy *giddy = &gSaveBlock1.oldMan.giddy;
+ struct MauvilleManGiddy *giddy = &gSaveBlock1.mauvilleMan.giddy;
u16 var = Random() % 10;
if (var < 3 && r7 < 8)
{
- //gSaveBlock1.oldMan.giddy.mauvilleOldMan_ecArray[i] = 0xFFFF;
+ //gSaveBlock1.mauvilleMan.giddy.mauvilleOldMan_ecArray[i] = 0xFFFF;
giddy->mauvilleOldMan_ecArray[i] = 0xFFFF;
r7++;
}
@@ -422,7 +534,7 @@ void sub_80F7DC0(void)
if (r1 == 6)
r1 = 0;
- //gSaveBlock1.oldMan.giddy.mauvilleOldMan_ecArray[i] = sub_80EB784(arr[r1][0]);
+ //gSaveBlock1.mauvilleMan.giddy.mauvilleOldMan_ecArray[i] = sub_80EB784(arr[r1][0]);
giddy->mauvilleOldMan_ecArray[i] = sub_80EB784(arr[r1][0]);
}
}
@@ -604,14 +716,14 @@ _080F7EE2:\n\
void sub_80F7EFC(void)
{
- struct MauvilleManBard *bard = &gSaveBlock1.oldMan.bard;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
- bard->unk_2DBD = 0;
+ bard->hasChangedSong = FALSE;
}
void sub_80F7F0C(void)
{
- struct MauvilleManHipster *hipster = &gSaveBlock1.oldMan.hipster;
+ struct MauvilleManHipster *hipster = &gSaveBlock1.mauvilleMan.hipster;
hipster->unk1 = 0;
}
@@ -648,9 +760,9 @@ void sub_80F7F30(void)
sub_80F83D0();
}
-void sub_80F7F80(u8 a)
+void StartBardSong(u8 a)
{
- u8 taskId = CreateTask(sub_80F8184, 0x50);
+ u8 taskId = CreateTask(Task_BardSong, 0x50);
gTasks[taskId].data[5] = a;
}
@@ -661,7 +773,7 @@ void BardSingWord(struct Task *task, struct UnkBard2 *b)
{
case 0:
{
- struct MauvilleManBard *bard = &gSaveBlock1.oldMan.bard;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
u16 *r2;
s32 i;
@@ -756,7 +868,7 @@ void BardSingWord(struct Task *task, struct UnkBard2 *b)
}
}
-void sub_80F8184(u8 taskId)
+void Task_BardSong(u8 taskId)
{
struct Task *task = &gTasks[taskId]; // r5
@@ -780,7 +892,7 @@ void sub_80F8184(u8 taskId)
break;
case 2:
{
- struct MauvilleManBard *bard = &gSaveBlock1.oldMan.bard;
+ struct MauvilleManBard *bard = &gSaveBlock1.mauvilleMan.bard;
u8 *string = gStringVar4 + task->data[3];
u16 wordLen = 0;
// Can't get it to match without hacking
@@ -885,9 +997,58 @@ void sub_80F83D0(void)
VarSet(0x4010, 0x45 + GetCurrentMauvilleOldMan());
}
+struct UnknownStruct1
+{
+ u8 unk0;
+ u8 unk1;
+ const u8 *unk4;
+ const u8 *unk8;
+ const u8 *unkC;
+};
+
+static const struct UnknownStruct1 gUnknown_083E53E0[] =
+{
+ {0x32, 1, UnknownString_81AEFFC, UnknownString_81AF013, UnknownString_81AF022},
+ {0x02, 1, UnknownString_81AF0A3, UnknownString_81AF0BB, UnknownString_81AF0CA},
+ {0x03, 1, UnknownString_81AF149, UnknownString_81AF164, UnknownString_81AF174},
+ {0x04, 1, UnknownString_81AF1E5, UnknownString_81AF1FD, UnknownString_81AF20A},
+ {0x06, 1, UnknownString_81AF281, UnknownString_81AF299, UnknownString_81AF2A9},
+ {0x09, 1, UnknownString_81AF32C, UnknownString_81AF345, UnknownString_81AF34D},
+ {0x0B, 1, UnknownString_81AF3D0, UnknownString_81AF3ED, UnknownString_81AF3FC},
+ {0x0C, 1, UnknownString_81AF46D, UnknownString_81AF481, UnknownString_81AF49B},
+ {0x0D, 1, UnknownString_81AF511, UnknownString_81AF529, UnknownString_81AF536},
+ {0x0E, 1, UnknownString_81AF5A9, UnknownString_81AF5BD, UnknownString_81AF5CD},
+ {0x0F, 1, UnknownString_81AF63F, UnknownString_81AF661, UnknownString_81AF676},
+ {0x10, 1, UnknownString_81AF711, UnknownString_81AF726, UnknownString_81AF73D},
+ {0x11, 1, UnknownString_81AF7BF, UnknownString_81AF7D9, UnknownString_81AF7F1},
+ {0x12, 1, UnknownString_81AF88A, UnknownString_81AF8A1, UnknownString_81AF8AA},
+ {0x13, 1, UnknownString_81AF91B, UnknownString_81AF935, UnknownString_81AF943},
+ {0x14, 1, UnknownString_81AF9C8, UnknownString_81AF9E0, UnknownString_81AF9F6},
+ {0x1A, 1, UnknownString_81AFA79, UnknownString_81AFA92, UnknownString_81AFA9E},
+ {0x1B, 1, UnknownString_81AFB17, UnknownString_81AFB2D, UnknownString_81AFB48},
+ {0x1C, 1, UnknownString_81AFBD8, UnknownString_81AFBE7, UnknownString_81AFC04},
+ {0x1D, 2, UnknownString_81AFC8A, UnknownString_81AFC9D, UnknownString_81AFCBE},
+ {0x1E, 1, UnknownString_81AFD44, UnknownString_81AFD60, UnknownString_81AFD80},
+ {0x21, 1, UnknownString_81AFE1D, UnknownString_81AFE36, UnknownString_81AFE42},
+ {0x24, 1, UnknownString_81AFEC2, UnknownString_81AFEDD, UnknownString_81AFEEE},
+ {0x25, 1, UnknownString_81AFF68, UnknownString_81AFF7B, UnknownString_81AFF88},
+ {0x26, 1, UnknownString_81AFFFB, UnknownString_81B000D, UnknownString_81B0015},
+ {0x27, 1, UnknownString_81B009D, UnknownString_81B00B6, UnknownString_81B00C9},
+ {0x28, 1, UnknownString_81B014D, UnknownString_81B0165, UnknownString_81B0173},
+ {0x29, 1, UnknownString_81B01E9, UnknownString_81B0201, UnknownString_81B0213},
+ {0x2A, 1, UnknownString_81B0290, UnknownString_81B02A5, UnknownString_81B02B6},
+ {0x2B, 1, UnknownString_81B0337, UnknownString_81B0351, UnknownString_81B0364},
+ {0x2C, 1, UnknownString_81B03E9, UnknownString_81B0401, UnknownString_81B040C},
+ {0x2D, 1, UnknownString_81B046E, UnknownString_81B0489, UnknownString_81B049A},
+ {0x2E, 1, UnknownString_81B0523, UnknownString_81B053E, UnknownString_81B0554},
+ {0x2F, 1, UnknownString_81B05D8, UnknownString_81B05F3, UnknownString_81B0610},
+ {0x30, 1, UnknownString_81B06A9, UnknownString_81B06C6, UnknownString_81B06D9},
+ {0x31, 1, UnknownString_81B0763, UnknownString_81B0781, UnknownString_81B0797},
+};
+
void StorytellerSetup(void)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
s32 i;
storyteller->id = MAUVILLE_MAN_STORYTELLER;
@@ -901,7 +1062,7 @@ void StorytellerSetup(void)
void sub_80F8428(void)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
storyteller->id = MAUVILLE_MAN_STORYTELLER;
storyteller->unk1 = FALSE;
@@ -914,17 +1075,6 @@ u32 sub_80F8438(u8 stat)
GetGameStat(stat);
}
-struct UnknownStruct1
-{
- u8 unk0;
- u8 unk1;
- const u8 *unk4;
- const u8 *unk8;
- const u8 *unkC;
-};
-
-extern const struct UnknownStruct1 gUnknown_083E53E0[];
-
const struct UnknownStruct1 *sub_80F844C(u32 a)
{
s32 i;
@@ -958,7 +1108,7 @@ u8 sub_80F849C(void)
for (i = 0; i < 4; i++)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
if (storyteller->unk4[i] == 0)
break;
@@ -968,14 +1118,14 @@ u8 sub_80F849C(void)
u32 sub_80F84C8(u32 a)
{
- u8 *ptr = gSaveBlock1.oldMan.storyteller.unk24[a];
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.unk24[a];
return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24);
}
void sub_80F84EC(u32 a, u32 b)
{
- u8 *ptr = gSaveBlock1.oldMan.storyteller.unk24[a];
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.unk24[a];
ptr[0] = b;
ptr[1] = b >> 8;
@@ -985,7 +1135,7 @@ void sub_80F84EC(u32 a, u32 b)
bool32 sub_80F8508(u32 a)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
if (sub_80F8438(storyteller->unk4[a]) > sub_80F84C8(a))
return TRUE;
@@ -995,7 +1145,7 @@ bool32 sub_80F8508(u32 a)
void sub_80F8534(u32 a, void *b)
{
- u8 *ptr = gSaveBlock1.oldMan.storyteller.unk8[a];
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.unk8[a];
memset(b, 0xFF, 8);
memcpy(b, ptr, 7);
@@ -1003,7 +1153,7 @@ void sub_80F8534(u32 a, void *b)
void sub_80F8560(u32 a, const u8 *b)
{
- u8 *ptr = gSaveBlock1.oldMan.storyteller.unk8[a];
+ u8 *ptr = gSaveBlock1.mauvilleMan.storyteller.unk8[a];
u8 len = StringLength(b);
memset(ptr, 0xFF, 7);
@@ -1012,7 +1162,7 @@ void sub_80F8560(u32 a, const u8 *b)
void sub_80F8598(u32 a, u32 b)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
storyteller->unk4[a] = b;
sub_80F8560(a, gSaveBlock2.playerName);
@@ -1037,19 +1187,16 @@ void sub_80F85FC(u8 *arr, s32 count)
}
}
-extern const struct {u32 unk0; struct MauvilleManStoryteller *unk4; u32 unk8;} gUnknown_083E5620;
-/*
-static const struct {u32 unk0; struct MauvilleManStoryteller *unk4; u32 unk8;} gUnknown_083E5620 =
+static const struct {u32 length; struct MauvilleManStoryteller *unused1; u32 unused2;} gUnknown_083E5620 =
{
36,
- &gSaveBlock1.oldMan.storyteller,
- 12,
+ &gSaveBlock1.mauvilleMan.storyteller, // unused
+ 12, // unused
};
-*/
bool8 sub_80F8650(void)
{
- u8 arr[gUnknown_083E5620.unk0];
+ u8 arr[gUnknown_083E5620.length];
s32 i;
s32 j;
@@ -1058,11 +1205,11 @@ bool8 sub_80F8650(void)
{
u8 r4 = gUnknown_083E53E0[arr[i]].unk0;
u8 r6 = gUnknown_083E53E0[arr[i]].unk1;
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
for (j = 0; j < 4; j++)
{
- if (gSaveBlock1.oldMan.storyteller.unk4[j] == r4)
+ if (gSaveBlock1.mauvilleMan.storyteller.unk4[j] == r4)
break;
}
if (j == 4 && sub_80F8438(r4) >= r6)
@@ -1077,7 +1224,7 @@ bool8 sub_80F8650(void)
void sub_80F8700(u32 a)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
u8 r6 = storyteller->unk4[a];
ConvertIntToDecimalStringN(gStringVar1, sub_80F84C8(a), 0, 10);
@@ -1093,7 +1240,7 @@ void sub_80F8758(void)
MenuDrawTextWindow(0, 0, 25, 4 + sub_80F849C() * 2);
for (i = 0; i < 4; i++)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
u8 r0 = storyteller->unk4[i];
if (r0 == 0)
@@ -1155,7 +1302,7 @@ u8 sub_80F889C(void)
bool8 sub_80F88AC(void)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
u8 r4 = storyteller->unk4[gUnknown_03000748];
if (sub_80F8508(gUnknown_03000748) == TRUE)
@@ -1168,7 +1315,7 @@ bool8 sub_80F88AC(void)
bool8 sub_80F88E0(void)
{
- struct MauvilleManStoryteller *storyteller = &gSaveBlock1.oldMan.storyteller;
+ struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
if (storyteller->unk1 == FALSE)
return FALSE;
diff --git a/src/record_mixing.c b/src/record_mixing.c
index d1083910c..e5f892d20 100644
--- a/src/record_mixing.c
+++ b/src/record_mixing.c
@@ -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/trader.c b/src/trader.c
index 9aeefa3d1..d289f72a8 100644
--- a/src/trader.c
+++ b/src/trader.c
@@ -37,7 +37,7 @@ void sub_810993C(void)
{
u8 i, j;
u8 buffer[12];
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
for (i = 0; i < 3; i++)
{
@@ -59,7 +59,7 @@ void sub_810993C(void)
void TraderSetup(void)
{
u8 i;
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
trader->id = MAUVILLE_MAN_TRADER;
trader->unk31 = 0;
@@ -75,7 +75,7 @@ void TraderSetup(void)
void sub_8109A20(void)
{
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
trader->unk31 = 0;
}
@@ -89,7 +89,7 @@ void sub_8109A48(u8 taskId)
u8 i;
u8 numChoices = 1;
u8 numDecorations = 0;
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
for (i = 0; i < 4; i++)
{
@@ -142,7 +142,7 @@ void sub_8109B34(u8 taskId, u8 decorationId)
void sub_8109B7C(u8 taskId)
{
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
if (gMain.newKeys & DPAD_UP)
{
@@ -177,7 +177,7 @@ void sub_8109B7C(u8 taskId)
void sub_8109C44(void)
{
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
gScriptResult = trader->unk31;
}
@@ -245,7 +245,7 @@ void sub_8109DAC(u8 taskId)
void sub_8109DE0(void)
{
- struct MauvilleManTrader *trader = &gSaveBlock1.oldMan.trader;
+ struct MauvilleManTrader *trader = &gSaveBlock1.mauvilleMan.trader;
sub_81340A8(gSpecialVar_0x8006);
IsThereStorageSpaceForDecoration(gSpecialVar_0x8004);