Through ScrCmd_getbraillestringwidth

This commit is contained in:
scnorton
2019-01-06 15:08:17 -05:00
parent 607d6e13d4
commit 6a064a4fa4
5 changed files with 182 additions and 294 deletions
-281
View File
@@ -5,287 +5,6 @@
.text
thumb_func_start ScrCmd_yesnobox
ScrCmd_yesnobox: @ 806BA80
push {lr}
ldr r2, [r0, 0x8]
ldrb r3, [r2]
adds r2, 0x1
str r2, [r0, 0x8]
ldrb r1, [r2]
adds r2, 0x1
str r2, [r0, 0x8]
adds r0, r3, 0
bl sub_809CDEC
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0806BAA2
movs r0, 0
b _0806BAA8
_0806BAA2:
bl ScriptContext1_Stop
movs r0, 0x1
_0806BAA8:
pop {r1}
bx r1
thumb_func_end ScrCmd_yesnobox
thumb_func_start ScrCmd_multichoice
ScrCmd_multichoice: @ 806BAAC
push {r4,r5,lr}
ldr r2, [r0, 0x8]
ldrb r5, [r2]
adds r2, 0x1
str r2, [r0, 0x8]
ldrb r1, [r2]
adds r3, r2, 0x1
str r3, [r0, 0x8]
ldrb r2, [r2, 0x1]
adds r4, r3, 0x1
str r4, [r0, 0x8]
ldrb r3, [r3, 0x1]
adds r4, 0x1
str r4, [r0, 0x8]
adds r0, r5, 0
bl ScriptMenu_Multichoice
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0806BADA
movs r0, 0
b _0806BAE0
_0806BADA:
bl ScriptContext1_Stop
movs r0, 0x1
_0806BAE0:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end ScrCmd_multichoice
thumb_func_start ScrCmd_multichoicedefault
ScrCmd_multichoicedefault: @ 806BAE8
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x4
ldr r2, [r0, 0x8]
ldrb r1, [r2]
mov r8, r1
adds r2, 0x1
str r2, [r0, 0x8]
ldrb r1, [r2]
adds r3, r2, 0x1
str r3, [r0, 0x8]
ldrb r2, [r2, 0x1]
adds r5, r3, 0x1
str r5, [r0, 0x8]
ldrb r6, [r3, 0x1]
adds r4, r5, 0x1
str r4, [r0, 0x8]
ldrb r3, [r5, 0x1]
adds r4, 0x1
str r4, [r0, 0x8]
str r6, [sp]
mov r0, r8
bl ScriptMenu_MultichoiceWithDefault
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0806BB26
movs r0, 0
b _0806BB2C
_0806BB26:
bl ScriptContext1_Stop
movs r0, 0x1
_0806BB2C:
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end ScrCmd_multichoicedefault
thumb_func_start ScrCmd_drawbox
ScrCmd_drawbox: @ 806BB38
movs r0, 0
bx lr
thumb_func_end ScrCmd_drawbox
thumb_func_start ScrCmd_multichoicegrid
ScrCmd_multichoicegrid: @ 806BB3C
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x4
ldr r2, [r0, 0x8]
ldrb r1, [r2]
mov r8, r1
adds r2, 0x1
str r2, [r0, 0x8]
ldrb r1, [r2]
adds r3, r2, 0x1
str r3, [r0, 0x8]
ldrb r2, [r2, 0x1]
adds r5, r3, 0x1
str r5, [r0, 0x8]
ldrb r6, [r3, 0x1]
adds r4, r5, 0x1
str r4, [r0, 0x8]
ldrb r3, [r5, 0x1]
adds r4, 0x1
str r4, [r0, 0x8]
str r6, [sp]
mov r0, r8
bl sub_809CEC8
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0806BB7A
movs r0, 0
b _0806BB80
_0806BB7A:
bl ScriptContext1_Stop
movs r0, 0x1
_0806BB80:
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end ScrCmd_multichoicegrid
thumb_func_start ScrCmd_erasebox
ScrCmd_erasebox: @ 806BB8C
ldr r1, [r0, 0x8]
adds r1, 0x4
str r1, [r0, 0x8]
movs r0, 0
bx lr
thumb_func_end ScrCmd_erasebox
thumb_func_start ScrCmd_drawboxtext
ScrCmd_drawboxtext: @ 806BB98
movs r0, 0
bx lr
thumb_func_end ScrCmd_drawboxtext
thumb_func_start ScrCmd_showmonpic
ScrCmd_showmonpic: @ 806BB9C
push {r4,r5,lr}
adds r5, r0, 0
bl ScriptReadHalfword
lsls r0, 16
lsrs r0, 16
bl VarGet
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldr r0, [r5, 0x8]
ldrb r1, [r0]
adds r0, 0x1
str r0, [r5, 0x8]
ldrb r2, [r0]
adds r0, 0x1
str r0, [r5, 0x8]
adds r0, r4, 0
bl sub_809D2F0
adds r0, r4, 0
movs r1, 0
bl PlayCry7
movs r0, 0
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end ScrCmd_showmonpic
thumb_func_start ScrCmd_hidemonpic
ScrCmd_hidemonpic: @ 806BBD8
push {r4,lr}
adds r4, r0, 0
bl sub_809D3CC
adds r1, r0, 0
cmp r1, 0
beq _0806BBF0
adds r0, r4, 0
bl SetupNativeScript
movs r0, 0x1
b _0806BBF2
_0806BBF0:
movs r0, 0
_0806BBF2:
pop {r4}
pop {r1}
bx r1
thumb_func_end ScrCmd_hidemonpic
thumb_func_start ScrCmd_showcontestwinner
ScrCmd_showcontestwinner: @ 806BBF8
ldr r1, [r0, 0x8]
adds r1, 0x1
str r1, [r0, 0x8]
movs r0, 0
bx lr
thumb_func_end ScrCmd_showcontestwinner
thumb_func_start ScrCmd_braillemessage
ScrCmd_braillemessage: @ 806BC04
push {r4,r5,lr}
sub sp, 0xC
adds r5, r0, 0
bl ScriptReadWord
adds r4, r0, 0
cmp r4, 0
bne _0806BC16
ldr r4, [r5, 0x64]
_0806BC16:
bl sub_80F6E9C
movs r0, 0
movs r1, 0x1
bl sub_80F6EE4
movs r0, 0x1
str r0, [sp]
movs r0, 0
str r0, [sp, 0x4]
str r0, [sp, 0x8]
movs r1, 0x6
adds r2, r4, 0
movs r3, 0
bl AddTextPrinterParameterized
movs r0, 0
add sp, 0xC
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end ScrCmd_braillemessage
thumb_func_start ScrCmd_getstringwidth
ScrCmd_getstringwidth: @ 806BC40
push {r4,lr}
adds r4, r0, 0
bl ScriptReadWord
adds r1, r0, 0
cmp r1, 0
bne _0806BC50
ldr r1, [r4, 0x64]
_0806BC50:
ldr r4, _0806BC68 @ =gSpecialVar_0x8004
movs r2, 0x1
negs r2, r2
movs r0, 0x6
bl GetStringWidth
strh r0, [r4]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.align 2, 0
_0806BC68: .4byte gSpecialVar_0x8004
thumb_func_end ScrCmd_getstringwidth
thumb_func_start ScrCmd_vmessage
ScrCmd_vmessage: @ 806BC6C
push {lr}
+12 -12
View File
@@ -613,8 +613,8 @@ _0809CDE0:
_0809CDE8: .4byte gUnknown_83E0748
thumb_func_end sub_809CD48
thumb_func_start sub_809CDEC
sub_809CDEC: @ 809CDEC
thumb_func_start ScriptMenu_YesNo
ScriptMenu_YesNo: @ 809CDEC
push {r4,lr}
ldr r4, _0809CE04 @ =task_yes_no_maybe
adds r0, r4, 0
@@ -649,7 +649,7 @@ _0809CE28:
.align 2, 0
_0809CE30: .4byte gSpecialVar_Result
_0809CE34: .4byte sub_809D6D4
thumb_func_end sub_809CDEC
thumb_func_end ScriptMenu_YesNo
thumb_func_start sub_809CE38
sub_809CE38: @ 809CE38
@@ -733,8 +733,8 @@ _0809CEBC:
_0809CEC4: .4byte gSpecialVar_Result
thumb_func_end task_yes_no_maybe
thumb_func_start sub_809CEC8
sub_809CEC8: @ 809CEC8
thumb_func_start ScriptMenu_MultichoiceGrid
ScriptMenu_MultichoiceGrid: @ 809CEC8
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@@ -862,7 +862,7 @@ _0809CFCC: .4byte gSpecialVar_Result
_0809CFD0: .4byte sub_809D6D4
_0809CFD4: .4byte gUnknown_83E04B0
_0809CFD8: .4byte gTasks
thumb_func_end sub_809CEC8
thumb_func_end ScriptMenu_MultichoiceGrid
thumb_func_start sub_809CFDC
sub_809CFDC: @ 809CFDC
@@ -1241,8 +1241,8 @@ _0809D2E8:
bx r0
thumb_func_end sub_809D288
thumb_func_start sub_809D2F0
sub_809D2F0: @ 809D2F0
thumb_func_start ScriptMenu_ShowPokemonPic
ScriptMenu_ShowPokemonPic: @ 809D2F0
push {r4-r7,lr}
mov r7, r8
push {r7}
@@ -1344,10 +1344,10 @@ _0809D3C2:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_809D2F0
thumb_func_end ScriptMenu_ShowPokemonPic
thumb_func_start sub_809D3CC
sub_809D3CC: @ 809D3CC
thumb_func_start ScriptMenu_GetPicboxWaitFunc
ScriptMenu_GetPicboxWaitFunc: @ 809D3CC
push {lr}
ldr r0, _0809D3F0 @ =sub_809D288
bl FindTaskIdByFunc
@@ -1374,7 +1374,7 @@ _0809D3FC:
_0809D3FE:
pop {r1}
bx r1
thumb_func_end sub_809D3CC
thumb_func_end ScriptMenu_GetPicboxWaitFunc
thumb_func_start sub_809D404
sub_809D404: @ 809D404