diff --git a/.gitignore b/.gitignore index f7c4e9e2..e808e398 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,5 @@ _Deparsed_XSubs.pm *.sna __pycache__ .vscode/settings.json +.vscode/c_cpp_properties.json +.vscode/tasks.json diff --git a/Makefile b/Makefile index 360a949d..d8c37941 100644 --- a/Makefile +++ b/Makefile @@ -66,12 +66,12 @@ MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR) ASFLAGS := -mcpu=arm7tdmi --defsym $(GAME_VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(GAME_LANGUAGE)=1 CC1 := tools/agbcc/bin/agbcc -override CFLAGS += -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar +override CFLAGS += -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar -g3 # -fhex-asm -ifeq ($(DINFO),1) -override CFLAGS += -g -endif +# ifeq ($(DINFO),1) +# override CFLAGS += -g +# endif CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE) diff --git a/asm/bird.s b/asm/bird.s index 2934667f..c0995f9e 100644 --- a/asm/bird.s +++ b/asm/bird.s @@ -128,7 +128,7 @@ _0809D2D6: mov r8, r3 cmp r0, #0 beq _0809D3A8 - ldr r0, _0809D434 @ =gTextBox + ldr r0, _0809D434 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -285,7 +285,7 @@ _0809D3DA: b _0809D454 .align 2, 0 _0809D430: .4byte gPlayerEntity -_0809D434: .4byte gTextBox +_0809D434: .4byte gMessage _0809D438: .4byte gPlayerState _0809D43C: .4byte gUnk_03003DC0 _0809D440: .4byte gUnk_02034490 diff --git a/asm/code_0801C370.s b/asm/code_0801C370.s index 88b5614f..f9c6146d 100644 --- a/asm/code_0801C370.s +++ b/asm/code_0801C370.s @@ -130,8 +130,8 @@ _0801C488: .4byte 0x00000427 _0801C48C: .4byte 0x00000426 _0801C490: .4byte 0x0000042E - thumb_func_start sub_0801C494 -sub_0801C494: @ 0x0801C494 + thumb_func_start RefreshUI +RefreshUI: @ 0x0801C494 ldr r1, _0801C49C @ =gScreen movs r0, #1 strh r0, [r1, #0xe] @@ -139,8 +139,8 @@ sub_0801C494: @ 0x0801C494 .align 2, 0 _0801C49C: .4byte gScreen - thumb_func_start sub_0801C4A0 -sub_0801C4A0: @ 0x0801C4A0 + thumb_func_start RecoverUI +RecoverUI: @ 0x0801C4A0 ldr r1, _0801C4AC @ =gUnk_0200AF00 movs r0, #0 strb r0, [r1, #2] diff --git a/asm/code_0801C85C.s b/asm/code_0801C85C.s index 0c145b51..b4b269e5 100644 --- a/asm/code_0801C85C.s +++ b/asm/code_0801C85C.s @@ -479,7 +479,7 @@ sub_0801CBC8: @ 0x0801CBC8 ands r0, r1 cmp r0, #0 bne _0801CBF6 - ldr r0, _0801CC0C @ =gTextBox + ldr r0, _0801CC0C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -497,7 +497,7 @@ _0801CBF6: b _0801CC1E .align 2, 0 _0801CC08: .4byte gUnk_0200AF00 -_0801CC0C: .4byte gTextBox +_0801CC0C: .4byte gMessage _0801CC10: ldr r1, _0801CC7C @ =gUnk_0200AF00 ldrb r0, [r5, #1] @@ -575,7 +575,7 @@ sub_0801CC80: @ 0x0801CC80 adds r0, r0, r1 ldrb r4, [r0] adds r0, r4, #0 - bl sub_080544C8 + bl ItemIsBottle cmp r0, #0 beq _0801CCA8 adds r0, r5, r4 @@ -828,7 +828,7 @@ sub_0801CE58: @ 0x0801CE58 ands r0, r1 cmp r0, #0 bne _0801CEB4 - ldr r0, _0801CEBC @ =gTextBox + ldr r0, _0801CEBC @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -866,4 +866,4 @@ _0801CEB4: pop {r4, pc} .align 2, 0 _0801CEB8: .4byte gUnk_0200AF00 -_0801CEBC: .4byte gTextBox +_0801CEBC: .4byte gMessage diff --git a/asm/code_0801D79C.s b/asm/code_0801D79C.s index 91e62776..dd9b50d8 100644 --- a/asm/code_0801D79C.s +++ b/asm/code_0801D79C.s @@ -1034,7 +1034,7 @@ _0801E040: .4byte gUnk_02022740 thumb_func_start sub_0801E044 sub_0801E044: @ 0x0801E044 push {lr} - ldr r0, _0801E06C @ =gTextBox + ldr r0, _0801E06C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -1053,7 +1053,7 @@ sub_0801E044: @ 0x0801E044 _0801E06A: pop {pc} .align 2, 0 -_0801E06C: .4byte gTextBox +_0801E06C: .4byte gMessage _0801E070: .4byte gUnk_02022740 thumb_func_start sub_0801E074 @@ -1086,7 +1086,7 @@ _0801E09C: .4byte gUnk_02022740 thumb_func_start sub_0801E0A0 sub_0801E0A0: @ 0x0801E0A0 push {r4, lr} - ldr r0, _0801E0D8 @ =gTextBox + ldr r0, _0801E0D8 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -1116,7 +1116,7 @@ _0801E0D2: _0801E0D4: pop {r4, pc} .align 2, 0 -_0801E0D8: .4byte gTextBox +_0801E0D8: .4byte gMessage _0801E0DC: .4byte gUnk_02022740 thumb_func_start sub_0801E0E0 @@ -1130,13 +1130,13 @@ sub_0801E0E0: @ 0x0801E0E0 cmp r1, #0 beq _0801E0FC adds r0, r2, #0 - bl TextboxNoOverlap + bl MessageNoOverlap b _0801E102 .align 2, 0 _0801E0F8: .4byte gUnk_02022740 _0801E0FC: adds r0, r2, #0 - bl TextboxNoOverlapFollow + bl MessageFromTarget _0801E102: pop {pc} diff --git a/asm/code_080526F8.s b/asm/code_080526F8.s index b29a3351..3e2f6fc0 100644 --- a/asm/code_080526F8.s +++ b/asm/code_080526F8.s @@ -658,7 +658,7 @@ _08052BEC: _08052BEE: ldrh r0, [r3, #0x36] adds r1, r2, #0 - bl TextBoxAtYPosition + bl MessageAtHeight pop {pc} .ifdef USA @@ -2560,8 +2560,8 @@ sub_08053A1C: @ 0x08053A1C movs r0, #8 strh r0, [r1, #8] ldr r0, _08053A54 @ =0x00000F07 - bl TextboxNoOverlapFollow - ldr r1, _08053A58 @ =gTextBox + bl MessageFromTarget + ldr r1, _08053A58 @ =gMessage movs r0, #1 strb r0, [r1, #6] strb r4, [r1, #7] @@ -2573,12 +2573,12 @@ _08053A4E: .align 2, 0 _08053A50: .4byte gMenu _08053A54: .4byte 0x00000F07 -_08053A58: .4byte gTextBox +_08053A58: .4byte gMessage thumb_func_start sub_08053A5C sub_08053A5C: @ 0x08053A5C push {lr} - ldr r0, _08053A88 @ =gTextBox + ldr r0, _08053A88 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -2600,7 +2600,7 @@ sub_08053A5C: @ 0x08053A5C _08053A86: pop {pc} .align 2, 0 -_08053A88: .4byte gTextBox +_08053A88: .4byte gMessage _08053A8C: .4byte gMenu thumb_func_start sub_08053A90 @@ -3314,7 +3314,7 @@ _08054014: mov r8, r2 _08054018: adds r0, r6, #0 - bl sub_080544C8 + bl ItemIsBottle cmp r0, #0 bne _08054034 adds r0, r6, #0 @@ -3612,7 +3612,7 @@ sub_08054288: @ 0x08054288 lsls r0, r0, #3 adds r0, r0, r1 ldrh r0, [r0, #6] - bl TextboxNoOverlapFollow + bl MessageFromTarget pop {pc} .align 2, 0 _08054298: .4byte gUnk_080FD5B4 diff --git a/asm/code_08054C04.s b/asm/code_08054C04.s index b629f27c..a097ffe5 100644 --- a/asm/code_08054C04.s +++ b/asm/code_08054C04.s @@ -2335,7 +2335,7 @@ sub_08055DC0: @ 0x08055DC0 cmp r0, #0 bne _08055DDC ldr r0, _08055DE4 @ =0x00000A01 - bl TextboxNoOverlapFollow + bl MessageFromTarget ldr r1, _08055DE8 @ =gMenu ldrb r0, [r1, #6] adds r0, #1 diff --git a/asm/code_0805E3B0.s b/asm/code_0805E3B0.s index adb78211..4c6580c8 100644 --- a/asm/code_0805E3B0.s +++ b/asm/code_0805E3B0.s @@ -35,7 +35,7 @@ _0805E3DC: .4byte gUnk_03003DC0 _0805E3E0: ldrb r2, [r1, #1] _0805E3E2: - ldr r0, _0805E408 @ =gTextBox + ldr r0, _0805E408 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -57,7 +57,7 @@ _0805E402: _0805E404: pop {pc} .align 2, 0 -_0805E408: .4byte gTextBox +_0805E408: .4byte gMessage thumb_func_start sub_0805E40C sub_0805E40C: @ 0x0805E40C diff --git a/asm/code_0805EC04.s b/asm/code_0805EC04.s index 6c8dc59f..9b095c0e 100644 --- a/asm/code_0805EC04.s +++ b/asm/code_0805EC04.s @@ -396,8 +396,8 @@ _0805EFE4: adds r0, r4, #0 pop {r4, pc} - thumb_func_start sub_0805EFE8 -sub_0805EFE8: @ 0x0805EFE8 + thumb_func_start GetCharacter +GetCharacter: @ 0x0805EFE8 push {r4, r5, r6, r7, lr} adds r6, r0, #0 _0805EFEC: @@ -794,8 +794,8 @@ _0805F320: pop {pc} .align 2, 0 - thumb_func_start sub_GetFontStrWidth -sub_GetFontStrWidth: @ 0xGetFontStrWidth + thumb_func_start GetFontStrWith +GetFontStrWith: @ 0xGetFontStrWidth push {r4, r5, r6, r7, lr} mov r7, sl mov r6, sb @@ -822,7 +822,7 @@ _0805F34C: mov sb, r2 _0805F352: mov r0, sp - bl sub_0805EFE8 + bl GetCharacter adds r6, r0, #0 cmp r6, #0xe bhi _0805F3B4 @@ -1028,7 +1028,7 @@ _0805F486: str r0, [r4, #4] mov r0, sp movs r1, #1 - bl sub_GetFontStrWidth + bl GetFontStrWith lsrs r2, r0, #0x18 ldrb r1, [r4, #0x16] muls r2, r1, r2 @@ -1161,7 +1161,7 @@ sub_0805F5CC: @ 0x0805F5CC bl MemFill32 adds r0, r6, #0 movs r1, #0 - bl sub_GetFontStrWidth + bl GetFontStrWith adds r2, r0, #0 ldrb r1, [r4, #0x13] movs r0, #1 @@ -1266,7 +1266,7 @@ sub_0805F6A4: @ 0x0805F6A4 movs r6, #0 _0805F6AC: adds r0, r5, #0 - bl sub_0805EFE8 + bl GetCharacter movs r7, #1 cmp r0, #0xe bhi _0805F746 diff --git a/asm/code_0806ED78.s b/asm/code_0806ED78.s index d6735892..d93e7cc2 100644 --- a/asm/code_0806ED78.s +++ b/asm/code_0806ED78.s @@ -818,10 +818,10 @@ _0806F34E: cmp r7, #0 beq _0806F35A mov r1, r8 - bl TextboxNoOverlap + bl MessageNoOverlap b _0806F35E _0806F35A: - bl TextboxNoOverlapFollow + bl MessageFromTarget _0806F35E: pop {r3} mov r8, r3 diff --git a/asm/code_0807059C.s b/asm/code_0807059C.s index 0015f569..b7bcb418 100644 --- a/asm/code_0807059C.s +++ b/asm/code_0807059C.s @@ -33,7 +33,7 @@ sub_080705AC: @ 0x080705AC ldrb r0, [r0] cmp r0, #0 bne _08070674 - ldr r0, _08070620 @ =gTextBox + ldr r0, _08070620 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -73,7 +73,7 @@ sub_080705AC: @ 0x080705AC _08070614: .4byte gInput _08070618: .4byte gFadeControl _0807061C: .4byte gUnk_02034490 -_08070620: .4byte gTextBox +_08070620: .4byte gMessage _08070624: .4byte gSave _08070628: .4byte gPlayerState _0807062C: .4byte gUnk_03003DC0 diff --git a/asm/code_080732D0.s b/asm/code_080732D0.s index a2e22468..6b1dde5b 100644 --- a/asm/code_080732D0.s +++ b/asm/code_080732D0.s @@ -2323,7 +2323,7 @@ sub_0807441C: @ 0x0807441C adds r4, r6, #0 adds r4, #0xb4 ldrb r0, [r4] - bl sub_0805449C + bl ItemIsSword cmp r0, #0 beq _08074448 ldrb r0, [r4] diff --git a/asm/code_08077B98.s b/asm/code_08077B98.s index 75eb2a4b..972fafe0 100644 --- a/asm/code_08077B98.s +++ b/asm/code_08077B98.s @@ -29,13 +29,13 @@ sub_08078008: @ 0x08078008 adds r5, r6, #0 adds r5, #0xb4 ldrb r0, [r5] - bl sub_0805449C + bl ItemIsSword cmp r0, #0 bne _0807802C adds r5, r6, #0 adds r5, #0xb5 ldrb r0, [r5] - bl sub_0805449C + bl ItemIsSword movs r2, #0 cmp r0, #0 beq _0807802E diff --git a/asm/code_08078778.s b/asm/code_08078778.s index 0905212a..c470b6d6 100644 --- a/asm/code_08078778.s +++ b/asm/code_08078778.s @@ -3185,7 +3185,7 @@ sub_0807A050: @ 0x0807A050 ldrb r2, [r3, #0xf] cmp r2, #0 beq _0807A06A - ldr r0, _0807A08C @ =gTextBox + ldr r0, _0807A08C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -3209,7 +3209,7 @@ _0807A084: pop {pc} .align 2, 0 _0807A088: .4byte gPlayerState -_0807A08C: .4byte gTextBox +_0807A08C: .4byte gMessage _0807A090: .4byte gPlayerEntity thumb_func_start sub_0807A094 @@ -3327,13 +3327,13 @@ sub_0807A158: @ 0x0807A158 adds r0, r4, #0 adds r0, #0xb4 ldrb r0, [r0] - bl sub_0805449C + bl ItemIsSword cmp r0, #0 bne _0807A17C adds r0, r4, #0 adds r0, #0xb5 ldrb r0, [r0] - bl sub_0805449C + bl ItemIsSword b _0807A17E .align 2, 0 _0807A178: .4byte gSave diff --git a/asm/code_080A3BD0.s b/asm/code_080A3BD0.s index b2ee41bb..80f40961 100644 --- a/asm/code_080A3BD0.s +++ b/asm/code_080A3BD0.s @@ -430,7 +430,7 @@ _080A3F96: bl SoundReq ldr r0, _080A3FC8 @ =0x00000702 movs r1, #0xe - bl TextBoxAtYPosition + bl MessageAtHeight movs r0, #1 strb r0, [r5, #6] movs r0, #0x78 @@ -447,7 +447,7 @@ _080A3FC8: .4byte 0x00000702 thumb_func_start sub_080A3FCC sub_080A3FCC: @ 0x080A3FCC push {lr} - ldr r0, _080A3FE8 @ =gTextBox + ldr r0, _080A3FE8 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -461,7 +461,7 @@ sub_080A3FCC: @ 0x080A3FCC _080A3FE6: pop {pc} .align 2, 0 -_080A3FE8: .4byte gTextBox +_080A3FE8: .4byte gMessage _080A3FEC: .4byte gMenu _080A3FF0: .4byte 0x00000147 @@ -1170,7 +1170,7 @@ sub_080A4494: @ 0x080A4494 adds r4, r0, #0 cmp r4, #0 beq _080A44D0 - ldr r0, _080A44D4 @ =gUnk_02000D00 + ldr r0, _080A44D4 @ =gTextGfxBuffer str r0, [r4, #8] movs r1, #0 strb r1, [r4, #2] @@ -1194,7 +1194,7 @@ _080A44D0: adds r0, r5, #0 pop {r4, r5, pc} .align 2, 0 -_080A44D4: .4byte gUnk_02000D00 +_080A44D4: .4byte gTextGfxBuffer _080A44D8: .4byte gUnk_02002AC0 _080A44DC: .4byte gUnk_02022740 diff --git a/asm/code_080A5574.s b/asm/code_080A5574.s index cf99ced1..bab14c4d 100644 --- a/asm/code_080A5574.s +++ b/asm/code_080A5574.s @@ -4085,7 +4085,7 @@ _080A6D38: strb r0, [r2] bl sub_080A7114 ldr r0, _080A6D48 @ =0x00000704 - bl TextboxNoOverlapFollow + bl MessageFromTarget b _080A6D54 .align 2, 0 _080A6D48: .4byte 0x00000704 diff --git a/asm/code_080A7C00.s b/asm/code_080A7C00.s index 38273dbe..91127b4c 100644 --- a/asm/code_080A7C00.s +++ b/asm/code_080A7C00.s @@ -192,7 +192,7 @@ sub_080A7D44: @ 0x080A7D44 bl sub_08078AA8 b _080A7D56 _080A7D52: - bl TextboxNoOverlapFollow + bl MessageFromTarget _080A7D56: pop {pc} diff --git a/asm/figurineDevice.s b/asm/figurineDevice.s index 11a601b2..0b58d4db 100644 --- a/asm/figurineDevice.s +++ b/asm/figurineDevice.s @@ -465,8 +465,8 @@ _080878EA: movs r0, #3 bl SetRoomFlag ldr r0, _08087910 @ =0x0000431A - bl TextboxNoOverlapFollow - ldr r1, _08087914 @ =gTextBox + bl MessageFromTarget + ldr r1, _08087914 @ =gMessage adds r0, r4, #0 adds r0, #0x81 ldrb r0, [r0] @@ -475,7 +475,7 @@ _0808790C: pop {r4, r5, r6, pc} .align 2, 0 _08087910: .4byte 0x0000431A -_08087914: .4byte gTextBox +_08087914: .4byte gMessage .else push {r4, r5, r6, r7, lr} @@ -599,8 +599,8 @@ _08087F24: movs r0, #3 bl SetRoomFlag ldr r0, _08087F50 @ =0x0000431A - bl TextboxNoOverlapFollow - ldr r1, _08087F54 @ =gTextBox + bl MessageFromTarget + ldr r1, _08087F54 @ =gMessage movs r0, #1 strb r0, [r1, #6] movs r0, #0xc @@ -613,7 +613,7 @@ _08087F4E: pop {r4, r5, r6, r7, pc} .align 2, 0 _08087F50: .4byte 0x0000431A -_08087F54: .4byte gTextBox +_08087F54: .4byte gMessage .endif thumb_func_start sub_08087F58 @@ -1940,8 +1940,8 @@ _080884D0: ldr r1, _080884F8 @ =0x00004327 _080884D2: adds r0, r1, #0 - bl TextboxNoOverlapFollow - ldr r1, _080884FC @ =gTextBox + bl MessageFromTarget + ldr r1, _080884FC @ =gMessage movs r0, #1 strb r0, [r1, #6] movs r0, #0xc @@ -1960,7 +1960,7 @@ _080884EA: .align 2, 0 _080884F4: .4byte 0x00004328 _080884F8: .4byte 0x00004327 -_080884FC: .4byte gTextBox +_080884FC: .4byte gMessage .ifndef EU _08088500: .4byte gPlayerEntity .endif @@ -1988,8 +1988,8 @@ _08088524: .4byte 0x00004314 _08088528: ldr r0, _0808853C @ =0x00004311 _0808852A: - bl TextboxNoOverlapFollow - ldr r0, _08088540 @ =gTextBox + bl MessageFromTarget + ldr r0, _08088540 @ =gMessage movs r1, #1 strb r1, [r0, #6] movs r1, #0xc @@ -1997,7 +1997,7 @@ _0808852A: pop {pc} .align 2, 0 _0808853C: .4byte 0x00004311 -_08088540: .4byte gTextBox +_08088540: .4byte gMessage thumb_func_start sub_08088544 sub_08088544: @ 0x08088544 @@ -2011,8 +2011,8 @@ sub_08088544: @ 0x08088544 subs r1, #7 _08088554: adds r0, r1, #0 - bl TextboxNoOverlapFollow - ldr r0, _08088570 @ =gTextBox + bl MessageFromTarget + ldr r0, _08088570 @ =gMessage movs r1, #1 strb r1, [r0, #6] movs r1, #0xc @@ -2021,7 +2021,7 @@ _08088554: .align 2, 0 _08088568: .4byte gSave _0808856C: .4byte 0x00004315 -_08088570: .4byte gTextBox +_08088570: .4byte gMessage thumb_func_start sub_08088574 sub_08088574: @ 0x08088574 @@ -2047,8 +2047,8 @@ _08088594: ldr r1, _080885A8 @ =0x0000430B _08088596: adds r0, r1, #0 - bl TextboxNoOverlapFollow - ldr r0, _080885AC @ =gTextBox + bl MessageFromTarget + ldr r0, _080885AC @ =gMessage movs r1, #1 strb r1, [r0, #6] movs r1, #0xc @@ -2056,7 +2056,7 @@ _08088596: pop {pc} .align 2, 0 _080885A8: .4byte 0x0000430B -_080885AC: .4byte gTextBox +_080885AC: .4byte gMessage thumb_func_start sub_080885B0 sub_080885B0: @ 0x080885B0 @@ -2072,8 +2072,8 @@ sub_080885B0: @ 0x080885B0 movs r0, #5 bl ModRupees ldr r0, _080885E0 @ =0x00004326 - bl TextboxNoOverlapFollow - ldr r1, _080885E4 @ =gTextBox + bl MessageFromTarget + ldr r1, _080885E4 @ =gMessage movs r0, #1 strb r0, [r1, #6] movs r0, #0xc @@ -2081,7 +2081,7 @@ sub_080885B0: @ 0x080885B0 b _0808860A .align 2, 0 _080885E0: .4byte 0x00004326 -_080885E4: .4byte gTextBox +_080885E4: .4byte gMessage _080885E8: ldr r1, _08088618 @ =gSave adds r0, r1, #0 diff --git a/asm/fileScreen.s b/asm/fileScreen.s index 67b9f73d..06c15115 100755 --- a/asm/fileScreen.s +++ b/asm/fileScreen.s @@ -427,7 +427,7 @@ sub_08051BD0: @ 0x08051BD0 ldrb r0, [r0, #4] cmp r0, #2 bne _08051C9C - ldr r0, _08051C60 @ =gTextBox + ldr r0, _08051C60 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -467,7 +467,7 @@ _08051C06: b _08051C9C .align 2, 0 _08051C5C: .4byte gMain -_08051C60: .4byte gTextBox +_08051C60: .4byte gMessage _08051C64: .4byte gUnk_03003DC0 _08051C68: .4byte gRoomControls _08051C6C: diff --git a/asm/fourElements.s b/asm/fourElements.s index dd5ffa82..2c46e6b1 100644 --- a/asm/fourElements.s +++ b/asm/fourElements.s @@ -276,7 +276,7 @@ sub_080A03B8: @ 0x080A03B8 ldrb r0, [r4, #0xa] bl sub_0805429C adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap _080A03E4: pop {r4, pc} .align 2, 0 @@ -287,7 +287,7 @@ sub_080A03E8: @ 0x080A03E8 movs r0, #0 movs r1, #0xa bl sub_0805E4E0 - ldr r0, _080A041C @ =gTextBox + ldr r0, _080A041C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -306,7 +306,7 @@ sub_080A03E8: @ 0x080A03E8 _080A041A: pop {pc} .align 2, 0 -_080A041C: .4byte gTextBox +_080A041C: .4byte gMessage _080A0420: .4byte gPlayerState thumb_func_start sub_080A0424 diff --git a/asm/itemForSale.s b/asm/itemForSale.s index af98dc19..941d9eee 100644 --- a/asm/itemForSale.s +++ b/asm/itemForSale.s @@ -148,7 +148,7 @@ _080818F0: adds r0, #0x2f movs r1, #2 strb r1, [r0] - bl sub_08056360 + bl MessageClose _08081920: pop {r4, pc} .align 2, 0 diff --git a/asm/macros/scripts.inc b/asm/macros/scripts.inc index c165f8fe..f6454ae0 100644 --- a/asm/macros/scripts.inc +++ b/asm/macros/scripts.inc @@ -479,33 +479,33 @@ .2byte 0x0459 .endm -.macro TextboxNoOverlapFollow s:req +.macro MessageFromTarget s:req .2byte 0x085a .2byte \s .endm -.macro TextboxNoOverlap s:req +.macro MessageNoOverlap s:req .2byte 0x085b .2byte \s .endm -.macro TextboxNoOverlapFollowPos a:req, b:req +.macro MessageFromTargetPos a:req, b:req .2byte 0x0c5c .2byte \a .2byte \b .endm -.macro TextboxNoOverlapFollowPos_1 s:req +.macro MessageFromTargetPos_1 s:req .2byte 0x085c .2byte \s .endm -.macro TextboxNoOverlapFollowTable labels:vararg +.macro MessageFromTargetTable labels:vararg RecursiveOpcode 0x5d 1 \labels RecursiveArgs .2byte \labels .endm -.macro TextboxNoOverlapVar +.macro MessageNoOverlapVar .2byte 0x045e .endm diff --git a/asm/non_matching/brocco/sub_08063584.inc b/asm/non_matching/brocco/sub_08063584.inc index 25e669f5..2d2d704a 100644 --- a/asm/non_matching/brocco/sub_08063584.inc +++ b/asm/non_matching/brocco/sub_08063584.inc @@ -54,7 +54,7 @@ _080635D0: ldrb r0, [r4, #0xe] ldr r1, _08063604 @ =0x00000A01 adds r0, r0, r1 - bl TextboxNoOverlapFollow + bl MessageFromTarget _080635FC: adds r0, r4, #0 bl sub_0806ED78 diff --git a/asm/non_matching/castleMaid/sub_08064570.inc b/asm/non_matching/castleMaid/sub_08064570.inc index abcae064..24d04d1c 100644 --- a/asm/non_matching/castleMaid/sub_08064570.inc +++ b/asm/non_matching/castleMaid/sub_08064570.inc @@ -90,7 +90,7 @@ _080645EA: .align 2, 0 _08064628: .4byte gPlayerEntity _0806462C: - ldr r0, _08064640 @ =gTextBox + ldr r0, _08064640 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -101,5 +101,5 @@ _0806462C: _0806463C: pop {r4, r5, pc} .align 2, 0 -_08064640: .4byte gTextBox +_08064640: .4byte gMessage .syntax divided diff --git a/asm/non_matching/cucco/sub_0806E6A8.inc b/asm/non_matching/cucco/sub_0806E6A8.inc index 3088da67..1c05898d 100644 --- a/asm/non_matching/cucco/sub_0806E6A8.inc +++ b/asm/non_matching/cucco/sub_0806E6A8.inc @@ -17,7 +17,7 @@ _0806E6C2: adds r1, r1, r0 ldrh r0, [r1] adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, r5, pc} .align 2, 0 _0806E6D4: .4byte gSave diff --git a/asm/non_matching/eu/HandlePlayerLife.inc b/asm/non_matching/eu/HandlePlayerLife.inc index 96134c53..bc528d6e 100644 --- a/asm/non_matching/eu/HandlePlayerLife.inc +++ b/asm/non_matching/eu/HandlePlayerLife.inc @@ -99,7 +99,7 @@ _080170F8: beq _08017104 b _08017222 _08017104: - ldr r0, _08017160 @ =gTextBox + ldr r0, _08017160 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -148,7 +148,7 @@ _0801714E: strh r1, [r0] b _08017192 .align 2, 0 -_08017160: .4byte gTextBox +_08017160: .4byte gMessage _08017164: .4byte gUnk_0200AF00 _08017168: .4byte gScreenTransition _0801716C: .4byte gSave diff --git a/asm/non_matching/eu/TextBoxHandlerQuestion.inc b/asm/non_matching/eu/TextBoxHandlerQuestion.inc index 86aee30b..1835ff7f 100644 --- a/asm/non_matching/eu/TextBoxHandlerQuestion.inc +++ b/asm/non_matching/eu/TextBoxHandlerQuestion.inc @@ -5,7 +5,7 @@ mov r5, r8 push {r5, r6, r7} adds r6, r0, #0 - ldr r0, _08056570 @ =gUnk_02024030 + ldr r0, _08056570 @ =gMessageChoices movs r7, #3 ldrsb r7, [r0, r7] ldr r0, _08056574 @ =gInput @@ -18,7 +18,7 @@ beq _08056582 b _080565EA .align 2, 0 -_08056570: .4byte gUnk_02024030 +_08056570: .4byte gMessageChoices _08056574: .4byte gInput _08056578: cmp r0, #0x10 @@ -27,7 +27,7 @@ _08056578: beq _080565E4 b _080565EA _08056582: - ldr r0, _08056598EU @ =gUnk_02024030 + ldr r0, _08056598EU @ =gMessageChoices lsls r1, r7, #1 adds r0, #0x10 adds r1, r1, r0 @@ -39,7 +39,7 @@ _08056582: adds r0, #0x20 b _080565B0EU .align 2, 0 -_08056598EU: .4byte gUnk_02024030 +_08056598EU: .4byte gMessageChoices _0805659CEU: .4byte gUnk_08107C14 _080565A0EU: strh r1, [r6, #8] @@ -52,7 +52,7 @@ _080565A0EU: _080565B0EU: bl sub_0805EF40 ldr r2, _080565DC @ =gUnk_02000040 - ldr r0, _080565E0 @ =gUnk_02024030 + ldr r0, _080565E0 @ =gMessageChoices ldrb r1, [r0, #3] strb r1, [r2, #1] movs r1, #3 @@ -69,14 +69,14 @@ _080565B0EU: .align 2, 0 _080565D8: .4byte gUnk_08107C0F _080565DC: .4byte gUnk_02000040 -_080565E0: .4byte gUnk_02024030 +_080565E0: .4byte gMessageChoices _080565E4: subs r7, #1 b _080565EA _080565E8: adds r7, #1 _080565EA: - ldr r4, _0805660C @ =gUnk_02024030 + ldr r4, _0805660C @ =gMessageChoices movs r1, #2 ldrsb r1, [r4, r1] adds r0, r7, r1 @@ -92,7 +92,7 @@ _080565EA: movs r1, #1 b _08056612 .align 2, 0 -_0805660C: .4byte gUnk_02024030 +_0805660C: .4byte gMessageChoices _08056610: movs r1, #0 _08056612: @@ -100,7 +100,7 @@ _08056612: ldrb r0, [r2] cmp r0, #1 bne _08056624 - ldr r1, _08056678 @ =gUnk_02024030 + ldr r1, _08056678 @ =gMessageChoices movs r0, #2 strb r0, [r2] strb r0, [r1] @@ -108,14 +108,14 @@ _08056612: _08056624: cmp r1, #0 beq _0805666A - ldr r0, _0805667C @ =gCurrentTextBox + ldr r0, _0805667C @ =gTextRender mov sl, r0 movs r1, #0x56 add r1, sl mov sb, r1 ldrh r0, [r1] mov r8, r0 - ldr r4, _08056678 @ =gUnk_02024030 + ldr r4, _08056678 @ =gMessageChoices lsls r0, r5, #1 adds r4, #8 adds r0, r0, r4 @@ -147,7 +147,7 @@ _0805666A: pop {r4, r5, r6, r7, pc} .align 2, 0 _08056674: .4byte gUnk_02000040 -_08056678: .4byte gUnk_02024030 -_0805667C: .4byte gCurrentTextBox +_08056678: .4byte gMessageChoices +_0805667C: .4byte gTextRender _08056680: .4byte 0x0202281D .syntax divided diff --git a/asm/non_matching/ghostBrothers/sub_08065D74.inc b/asm/non_matching/ghostBrothers/sub_08065D74.inc index eee44d0e..7437a539 100644 --- a/asm/non_matching/ghostBrothers/sub_08065D74.inc +++ b/asm/non_matching/ghostBrothers/sub_08065D74.inc @@ -28,7 +28,7 @@ _08065DA8: adds r0, #1 strb r0, [r1, #0xc] movs r0, #0 - bl TextboxNoOverlapFollow + bl MessageFromTarget _08065DB4: pop {pc} .align 2, 0 diff --git a/asm/non_matching/ghostBrothers/sub_08065DB8.inc b/asm/non_matching/ghostBrothers/sub_08065DB8.inc index 6e6e7d6e..1ec10789 100644 --- a/asm/non_matching/ghostBrothers/sub_08065DB8.inc +++ b/asm/non_matching/ghostBrothers/sub_08065DB8.inc @@ -18,7 +18,7 @@ _08065DD0: @ jump table .4byte _08065E34 @ case 3 .4byte _08065E4E @ case 4 _08065DE4: - ldr r0, _08065E04 @ =gTextBox + ldr r0, _08065E04 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -34,7 +34,7 @@ _08065DE4: bl InitAnimationForceUpdate b _08065EB0 .align 2, 0 -_08065E04: .4byte gTextBox +_08065E04: .4byte gMessage _08065E08: ldrb r0, [r4, #0xe] subs r0, #1 @@ -65,13 +65,13 @@ _08065E34: cmp r0, #0 bne _08065EB0 movs r0, #0 - bl TextboxNoOverlapFollow + bl MessageFromTarget ldrb r0, [r4, #0xd] adds r0, #1 strb r0, [r4, #0xd] b _08065EB0 _08065E4E: - ldr r0, _08065E6C @ =gTextBox + ldr r0, _08065E6C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -86,7 +86,7 @@ _08065E4E: str r0, [r4, #0x6c] b _08065EB0 .align 2, 0 -_08065E6C: .4byte gTextBox +_08065E6C: .4byte gMessage _08065E70: .4byte gUnk_0811022E _08065E74: ldrb r0, [r4, #0xe] diff --git a/asm/non_matching/guardWithSpear/sub_080643D8.inc b/asm/non_matching/guardWithSpear/sub_080643D8.inc index 75d9f6e8..dfb5fc95 100644 --- a/asm/non_matching/guardWithSpear/sub_080643D8.inc +++ b/asm/non_matching/guardWithSpear/sub_080643D8.inc @@ -33,7 +33,7 @@ _08064406: adds r1, r1, r2 ldrh r0, [r1] adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, pc} .align 2, 0 _08064424: .4byte gUnk_0810F6D4 diff --git a/asm/non_matching/itemPegasusBoots/sub_08076964.inc b/asm/non_matching/itemPegasusBoots/sub_08076964.inc index ab565b3d..979d4f34 100644 --- a/asm/non_matching/itemPegasusBoots/sub_08076964.inc +++ b/asm/non_matching/itemPegasusBoots/sub_08076964.inc @@ -92,7 +92,7 @@ _080769CC: adds r4, r6, #0 adds r4, #0xb4 ldrb r0, [r4] - bl sub_0805449C + bl ItemIsSword cmp r0, #0 beq _08076A38 ldrb r1, [r4] diff --git a/asm/non_matching/kid/sub_080621AC.inc b/asm/non_matching/kid/sub_080621AC.inc index 63614833..0b353636 100644 --- a/asm/non_matching/kid/sub_080621AC.inc +++ b/asm/non_matching/kid/sub_080621AC.inc @@ -150,7 +150,7 @@ _080622C8: .4byte gPlayerEntity _080622CC: adds r0, r4, #0 bl GetNextFrame - ldr r0, _080622E0 @ =gTextBox + ldr r0, _080622E0 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -158,7 +158,7 @@ _080622CC: bne _080622F2 b _080622EE .align 2, 0 -_080622E0: .4byte gTextBox +_080622E0: .4byte gMessage _080622E4: adds r0, r4, #0 bl UpdateFuseInteraction diff --git a/asm/non_matching/kid/sub_08062634.inc b/asm/non_matching/kid/sub_08062634.inc index 8d76db7c..2c665de5 100644 --- a/asm/non_matching/kid/sub_08062634.inc +++ b/asm/non_matching/kid/sub_08062634.inc @@ -14,7 +14,7 @@ adds r1, r1, r0 ldrh r0, [r1] adds r1, r5, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, r5, pc} .align 2, 0 _08062658: .4byte gUnk_0810BDE8 diff --git a/asm/non_matching/kid/sub_0806265C.inc b/asm/non_matching/kid/sub_0806265C.inc index 7d7aa455..aff37fc7 100644 --- a/asm/non_matching/kid/sub_0806265C.inc +++ b/asm/non_matching/kid/sub_0806265C.inc @@ -9,7 +9,7 @@ bne _08062678 movs r0, #0 adds r1, r2, #0 - bl TextboxNoOverlap + bl MessageNoOverlap b _08062690 .align 2, 0 _08062674: .4byte gSave diff --git a/asm/non_matching/librarians/sub_0806BA34.inc b/asm/non_matching/librarians/sub_0806BA34.inc index ca7a41f4..3d50153e 100644 --- a/asm/non_matching/librarians/sub_0806BA34.inc +++ b/asm/non_matching/librarians/sub_0806BA34.inc @@ -104,7 +104,7 @@ _0806BAF8: _0806BB06: mov r0, r8 mov r1, sb - bl TextboxNoOverlap + bl MessageNoOverlap pop {r3, r4} mov r8, r3 mov sb, r4 diff --git a/asm/non_matching/mountainMinish/sub_08067EF0.inc b/asm/non_matching/mountainMinish/sub_08067EF0.inc index 3087d0e6..a1953289 100644 --- a/asm/non_matching/mountainMinish/sub_08067EF0.inc +++ b/asm/non_matching/mountainMinish/sub_08067EF0.inc @@ -110,7 +110,7 @@ _08067F98: .align 2, 0 _08067FD8: .4byte gPlayerEntity _08067FDC: - ldr r0, _08067FFC @ =gTextBox + ldr r0, _08067FFC @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -126,7 +126,7 @@ _08067FF2: bl InitializeAnimation b _0806801A .align 2, 0 -_08067FFC: .4byte gTextBox +_08067FFC: .4byte gMessage _08068000: adds r0, r5, #0 bl UpdateFuseInteraction diff --git a/asm/non_matching/mountainMinish/sub_08068190.inc b/asm/non_matching/mountainMinish/sub_08068190.inc index 496f19d5..cb82b078 100644 --- a/asm/non_matching/mountainMinish/sub_08068190.inc +++ b/asm/non_matching/mountainMinish/sub_08068190.inc @@ -30,7 +30,7 @@ _080681C0: adds r0, r0, r2 ldrh r0, [r0] adds r1, r6, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, r5, r6, pc} .align 2, 0 _080681D4: .4byte gUnk_0811130E diff --git a/asm/non_matching/npc5/sub_08061B18.inc b/asm/non_matching/npc5/sub_08061B18.inc index 7875a8d3..6ee68383 100644 --- a/asm/non_matching/npc5/sub_08061B18.inc +++ b/asm/non_matching/npc5/sub_08061B18.inc @@ -29,7 +29,7 @@ _08061B4C: ldrh r0, [r2] adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap _08061B54: pop {r4, pc} .align 2, 0 diff --git a/asm/non_matching/picolyteBottles/sub_0806E140.inc b/asm/non_matching/picolyteBottles/sub_0806E140.inc index f20da175..e67e3237 100644 --- a/asm/non_matching/picolyteBottles/sub_0806E140.inc +++ b/asm/non_matching/picolyteBottles/sub_0806E140.inc @@ -36,21 +36,21 @@ _0806E172: movs r0, #0 str r0, [r5, #0x14] ldr r0, _0806E190 @ =0x0000421B - bl TextboxNoOverlapFollow + bl MessageFromTarget b _0806E1C0 .align 2, 0 _0806E18C: .4byte 0x000003E7 _0806E190: .4byte 0x0000421B _0806E194: ldr r0, _0806E1A4 @ =0x00004218 - bl TextboxNoOverlapFollow - ldr r1, _0806E1A8 @ =gTextBox + bl MessageFromTarget + ldr r1, _0806E1A8 @ =gMessage ldrh r0, [r4] str r0, [r1, #0x10] b _0806E1C0 .align 2, 0 _0806E1A4: .4byte 0x00004218 -_0806E1A8: .4byte gTextBox +_0806E1A8: .4byte gMessage _0806E1AC: str r1, [r5, #0x14] adds r0, r3, #0 @@ -60,7 +60,7 @@ _0806E1AC: adds r4, #0x76 strh r1, [r4] ldr r0, _0806E1D4 @ =0x0000421C - bl TextboxNoOverlapFollow + bl MessageFromTarget _0806E1C0: ldr r1, _0806E1D8 @ =gScreenTransition ldrh r0, [r4] diff --git a/asm/non_matching/pina/sub_08063AC0.inc b/asm/non_matching/pina/sub_08063AC0.inc index e08da02c..ee5fd0e5 100644 --- a/asm/non_matching/pina/sub_08063AC0.inc +++ b/asm/non_matching/pina/sub_08063AC0.inc @@ -54,7 +54,7 @@ _08063B0C: ldrb r0, [r4, #0xe] ldr r1, _08063B40 @ =0x00000A01 adds r0, r0, r1 - bl TextboxNoOverlapFollow + bl MessageFromTarget _08063B38: adds r0, r4, #0 bl sub_0806ED78 diff --git a/asm/non_matching/rem/sub_0806AA50.inc b/asm/non_matching/rem/sub_0806AA50.inc index 8d40bee1..d1618f63 100644 --- a/asm/non_matching/rem/sub_0806AA50.inc +++ b/asm/non_matching/rem/sub_0806AA50.inc @@ -55,7 +55,7 @@ _0806AA9A: _0806AAB6: adds r0, r7, #0 adds r1, r6, #0 - bl TextboxNoOverlap + bl MessageNoOverlap ldr r0, [r5, #4] cmp r0, #1 beq _0806AAEE diff --git a/asm/non_matching/sittingPerson/sub_0806387C.inc b/asm/non_matching/sittingPerson/sub_0806387C.inc index 46a94fb0..336f23c9 100644 --- a/asm/non_matching/sittingPerson/sub_0806387C.inc +++ b/asm/non_matching/sittingPerson/sub_0806387C.inc @@ -103,7 +103,7 @@ _080638E2: adds r0, r0, r2 ldrh r0, [r0] adds r1, r6, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, r5, r6, pc} .align 2, 0 _080638F8: .4byte gUnk_02002B0E diff --git a/asm/non_matching/sittingPerson/sub_0806390C.inc b/asm/non_matching/sittingPerson/sub_0806390C.inc index 20ebf13e..3089960c 100644 --- a/asm/non_matching/sittingPerson/sub_0806390C.inc +++ b/asm/non_matching/sittingPerson/sub_0806390C.inc @@ -44,7 +44,7 @@ _0806392E: adds r1, r1, r0 ldrh r0, [r1] adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap pop {r4, r5, pc} .align 2, 0 _08063940: .4byte gUnk_0810CC04 diff --git a/asm/non_matching/stockwell/sub_080650CC.inc b/asm/non_matching/stockwell/sub_080650CC.inc index bdd7f568..961a8ac3 100644 --- a/asm/non_matching/stockwell/sub_080650CC.inc +++ b/asm/non_matching/stockwell/sub_080650CC.inc @@ -70,8 +70,8 @@ _0806513C: _0806515E: adds r0, r7, #0 adds r1, r5, #0 - bl TextboxNoOverlap - ldr r1, _08065178 @ =gTextBox + bl MessageNoOverlap + ldr r1, _08065178 @ =gMessage mov r2, r8 lsls r0, r2, #0x10 lsrs r0, r0, #0x10 @@ -79,7 +79,7 @@ _0806515E: b _080651A6 .align 2, 0 _08065174: .4byte script_08014384 -_08065178: .4byte gTextBox +_08065178: .4byte gMessage _0806517C: ldrb r1, [r2] movs r0, #0x40 diff --git a/asm/non_matching/stockwell/sub_08065370.inc b/asm/non_matching/stockwell/sub_08065370.inc index 14d83cbc..97ca3a99 100644 --- a/asm/non_matching/stockwell/sub_08065370.inc +++ b/asm/non_matching/stockwell/sub_08065370.inc @@ -97,7 +97,7 @@ _08064E94: bls _08064EAA ldr r0, _08064F0C @ =0x00002C0E adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap movs r6, #0 _08064EAA: cmp r6, #0 @@ -167,7 +167,7 @@ _08064F30: ldr r0, _08064F48 @ =0x00002C0D _08064F32: adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap _08064F38: movs r0, #0 mov r1, r8 @@ -282,7 +282,7 @@ _08065426: bls _0806543C ldr r0, _0806549C @ =0x00002C0E adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap movs r6, #0 _0806543C: cmp r6, #0 @@ -352,7 +352,7 @@ _080654C0: ldr r0, _080654D8 @ =0x00002C0D _080654C2: adds r1, r4, #0 - bl TextboxNoOverlap + bl MessageNoOverlap _080654C8: movs r0, #0 mov r1, r8 diff --git a/asm/non_matching/textbox/TextBoxFunction1.inc b/asm/non_matching/textbox/TextBoxFunction1.inc index ddbafe5e..45ab5344 100644 --- a/asm/non_matching/textbox/TextBoxFunction1.inc +++ b/asm/non_matching/textbox/TextBoxFunction1.inc @@ -3,14 +3,14 @@ ldr r0, _08056598 @ =gNewWindow movs r1, #8 bl MemClear - ldr r0, _0805659C @ =gUnk_02024030 + ldr r0, _0805659C @ =gMessageChoices movs r1, #0x18 bl MemClear - ldr r4, _080565A0 @ =gCurrentTextBox + ldr r4, _080565A0 @ =gTextRender adds r0, r4, #0 movs r1, #0xa8 bl MemClear - ldr r0, _080565A4 @ =gTextBox + ldr r0, _080565A4 @ =gMessage adds r1, r4, #0 movs r2, #0x20 bl MemCopy @@ -61,12 +61,12 @@ _08056560: strb r0, [r3, #1] movs r0, #0 strb r0, [r3, #2] - ldr r4, _080565A0 @ =gCurrentTextBox + ldr r4, _080565A0 @ =gTextRender adds r0, r4, #0 bl sub_08056FBC ldr r0, _080565AC @ =gUnk_08107BE0 str r0, [r4, #0x2c] - ldr r0, _080565B0 @ =gUnk_02000D00 + ldr r0, _080565B0 @ =gTextGfxBuffer str r0, [r4, #0x58] adds r4, #0x54 movs r0, #0xd0 @@ -74,17 +74,17 @@ _08056560: movs r0, #2 bl SetDoTextBox movs r0, #0 - bl sub_08056BDC + bl MsgChangeLine movs r0, #2 - bl sub_080564C8 + bl StatusUpdate movs r0, #1 pop {r4, pc} .align 2, 0 _08056598: .4byte gNewWindow -_0805659C: .4byte gUnk_02024030 -_080565A0: .4byte gCurrentTextBox -_080565A4: .4byte gTextBox +_0805659C: .4byte gMessageChoices +_080565A0: .4byte gTextRender +_080565A4: .4byte gMessage _080565A8: .4byte gSave _080565AC: .4byte gUnk_08107BE0 -_080565B0: .4byte gUnk_02000D00 +_080565B0: .4byte gTextGfxBuffer .syntax divided diff --git a/asm/non_matching/textbox/sub_08056750.inc b/asm/non_matching/textbox/sub_08056750.inc index c6f8b6c0..7ed352b6 100644 --- a/asm/non_matching/textbox/sub_08056750.inc +++ b/asm/non_matching/textbox/sub_08056750.inc @@ -13,7 +13,7 @@ _0805675C: adds r4, r5, #0 adds r4, #0x20 adds r0, r4, #0 - bl sub_0805EFE8 + bl GetCharacter adds r7, r0, #0 cmp r7, #0xe bls _0805676E @@ -54,7 +54,7 @@ _080567B8: .ifndef EU movs r0, #0 movs r1, #0 - bl sub_08056ABC + bl SwitchChoice .endif b _08056942 .align 2, 0 @@ -74,7 +74,7 @@ _080567DE: cmp r0, #0 bne _080567F8 movs r0, #1 - bl sub_08056BDC + bl MsgChangeLine b _08056942 _080567F8: adds r1, r5, #0 @@ -84,16 +84,16 @@ _080567F8: b _08056942 _08056802: movs r0, #3 - bl sub_080564C8 + bl StatusUpdate b _08056942 _0805680A: movs r0, #4 - bl sub_080564C8 + bl StatusUpdate b _08056942 _08056812: adds r0, r4, #0 movs r1, #0 - bl sub_GetFontStrWidth + bl GetFontStrWith adds r3, r0, #0 adds r4, r5, #0 adds r4, #0x56 @@ -110,12 +110,12 @@ _08056812: strh r2, [r4] b _08056942 _08056838: - ldr r1, _08056840 @ =gTextBox + ldr r1, _08056840 @ =gMessage ldrh r0, [r5, #0x22] strb r0, [r1, #1] b _08056942 .align 2, 0 -_08056840: .4byte gTextBox +_08056840: .4byte gMessage _08056844: ldr r0, _08056854 @ =gUnk_0200005C ldrh r1, [r5, #0x22] @@ -152,14 +152,14 @@ _0805687A: strb r0, [r1] adds r0, r5, #0 adds r1, r3, #0 - bl sub_080569C4 + bl PaletteChange b _08056942 _0805688C: ldrh r0, [r5, #0x22] bl SoundReq b _08056942 _08056894: - ldr r1, _080568A8 @ =gCurrentTextBox + ldr r1, _080568A8 @ =gTextRender ldrh r0, [r5, #0x22] strb r0, [r1, #3] ldrh r0, [r5, #0x22] @@ -169,7 +169,7 @@ _08056894: bl sub_08056F88 b _08056942 .align 2, 0 -_080568A8: .4byte gCurrentTextBox +_080568A8: .4byte gTextRender _080568AC: ldrh r0, [r5, #0x22] strb r0, [r5, #7] @@ -182,7 +182,7 @@ _080568B2: adds r0, r6, #0 movs r1, #4 bl MemClear - ldr r4, _08056910 @ =gUnk_02024030 + ldr r4, _08056910 @ =gMessageChoices adds r0, r4, #0 movs r1, #0x18 bl MemClear @@ -190,7 +190,7 @@ _080568B2: strb r0, [r4] strb r0, [r6] _080568D2: - ldr r2, _08056910 @ =gUnk_02024030 + ldr r2, _08056910 @ =gMessageChoices movs r0, #2 ldrsb r0, [r2, r0] cmp r0, #3 @@ -220,7 +220,7 @@ _080568D2: b _08056942 .align 2, 0 _0805690C: .4byte gUnk_02000040 -_08056910: .4byte gUnk_02024030 +_08056910: .4byte gMessageChoices _08056914: ldrh r3, [r5, #0x22] cmp r3, #0xfe @@ -256,19 +256,19 @@ _08056942: movs r0, #0 b _080569C2 _0805694C: - ldr r0, _08056960 @ =gCurrentTextBox + ldr r0, _08056960 @ =gTextRender adds r0, #0x99 ldrb r0, [r0] cmp r0, #2 beq _08056964 movs r0, #3 - bl sub_080564C8 + bl StatusUpdate movs r0, #0 b _080569C2 .align 2, 0 -_08056960: .4byte gCurrentTextBox +_08056960: .4byte gTextRender _08056964: - ldr r1, _08056994 @ =gTextBox + ldr r1, _08056994 @ =gMessage ldrb r0, [r1, #1] cmp r0, #0 bne _08056970 @@ -290,10 +290,10 @@ _08056970: strb r1, [r2] adds r0, r5, #0 movs r1, #0 - bl sub_080569C4 + bl PaletteChange b _080569B4 .align 2, 0 -_08056994: .4byte gTextBox +_08056994: .4byte gMessage _08056998: adds r2, r5, #0 adds r2, #0x90 @@ -307,7 +307,7 @@ _08056998: strb r0, [r2] adds r0, r5, #0 adds r1, r3, #0 - bl sub_080569C4 + bl PaletteChange _080569B4: adds r1, r5, #0 adds r1, #0x50 diff --git a/asm/non_matching/tingleSiblings/sub_08064F28.inc b/asm/non_matching/tingleSiblings/sub_08064F28.inc index 837f5fc0..aa6af2fd 100644 --- a/asm/non_matching/tingleSiblings/sub_08064F28.inc +++ b/asm/non_matching/tingleSiblings/sub_08064F28.inc @@ -93,10 +93,10 @@ _08064FD2: adds r0, r0, r2 ldrh r0, [r0] adds r1, r6, #0 - bl TextboxNoOverlap + bl MessageNoOverlap cmp r4, #0 ble _08064FF4 - ldr r1, _0806500C @ =gTextBox + ldr r1, _0806500C @ =gMessage lsls r0, r4, #0x10 lsrs r0, r0, #0x10 str r0, [r1, #0x10] @@ -110,7 +110,7 @@ _08064FF4: b _08065016 .align 2, 0 _08065008: .4byte gUnk_0810FC08 -_0806500C: .4byte gTextBox +_0806500C: .4byte gMessage _08065010: adds r0, r7, #0 bl ClearRoomFlag diff --git a/asm/object6.s b/asm/object6.s index af416ed0..7814bddc 100644 --- a/asm/object6.s +++ b/asm/object6.s @@ -156,7 +156,7 @@ sub_080829E4: @ 0x080829E4 ands r0, r2 orrs r0, r1 strb r0, [r5, #0x1a] - ldr r3, _08082A14 @ =gTextBox + ldr r3, _08082A14 @ =gMessage ldrb r0, [r3] movs r1, #0x7f ands r1, r0 @@ -167,7 +167,7 @@ sub_080829E4: @ 0x080829E4 b _08082AB4 .align 2, 0 _08082A10: .4byte gPlayerEntity -_08082A14: .4byte gTextBox +_08082A14: .4byte gMessage _08082A18: cmp r1, #5 beq _08082A9C diff --git a/asm/object6A.s b/asm/object6A.s index 8e01d30f..4004db87 100644 --- a/asm/object6A.s +++ b/asm/object6A.s @@ -972,7 +972,7 @@ _080950C8: .align 2, 0 _080950EC: .4byte 0x00001F1F _080950F0: - ldr r0, _0809511C @ =gTextBox + ldr r0, _0809511C @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -992,7 +992,7 @@ _0809510A: strb r4, [r5, #0xa] pop {r4, r5, pc} .align 2, 0 -_0809511C: .4byte gTextBox +_0809511C: .4byte gMessage thumb_func_start sub_08095120 sub_08095120: @ 0x08095120 diff --git a/asm/object9.s b/asm/object9.s index 3e195043..7ae593b8 100644 --- a/asm/object9.s +++ b/asm/object9.s @@ -23,7 +23,7 @@ Object9: @ 0x0808386C bgt _08083894 cmp r0, #0 blt _08083894 - ldr r0, _080838D0 @ =gTextBox + ldr r0, _080838D0 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -59,7 +59,7 @@ _080838B6: .align 2, 0 _080838C8: .4byte gPlayerState _080838CC: .4byte gUnk_02022740 -_080838D0: .4byte gTextBox +_080838D0: .4byte gMessage _080838D4: .4byte gUnk_03003DF0 _080838D8: .4byte gUnk_0811F754 diff --git a/asm/object91.s b/asm/object91.s index 35eb581d..6ae9e0b9 100644 --- a/asm/object91.s +++ b/asm/object91.s @@ -580,7 +580,7 @@ _0809C82A: cmp r0, #0xff bne _0809C84A ldr r0, _0809C850 @ =0x00000B43 - bl TextboxNoOverlapFollow + bl MessageFromTarget movs r0, #1 strb r0, [r5, #0xd] movs r0, #8 @@ -595,7 +595,7 @@ _0809C850: .4byte 0x00000B43 sub_0809C854: @ 0x0809C854 push {r4, r5, lr} adds r4, r0, #0 - ldr r0, _0809C8A8 @ =gTextBox + ldr r0, _0809C8A8 @ =gMessage ldrb r1, [r0] movs r0, #0x7f ands r0, r1 @@ -635,7 +635,7 @@ _0809C892: bl SoundReq b _0809C8B8 .align 2, 0 -_0809C8A8: .4byte gTextBox +_0809C8A8: .4byte gMessage _0809C8AC: .4byte gRoomControls _0809C8B0: movs r0, #3 diff --git a/asm/objectB.s b/asm/objectB.s index cfb07492..cd3200fc 100644 --- a/asm/objectB.s +++ b/asm/objectB.s @@ -206,14 +206,14 @@ _08083D14: adds r1, #1 _08083D16: adds r0, r1, #0 - bl TextboxNoOverlapFollow - ldr r1, _08083D24 @ =gTextBox + bl MessageFromTarget + ldr r1, _08083D24 @ =gMessage ldrb r0, [r4, #0xb] str r0, [r1, #0x10] _08083D22: pop {r4, pc} .align 2, 0 -_08083D24: .4byte gTextBox +_08083D24: .4byte gMessage thumb_func_start sub_08083D28 sub_08083D28: @ 0x08083D28 diff --git a/asm/objectB9.s b/asm/objectB9.s index fcebb4f0..4741530f 100644 --- a/asm/objectB9.s +++ b/asm/objectB9.s @@ -246,14 +246,14 @@ sub_080A13B4: @ 0x080A13B4 cmp r1, r0 blt _080A13D8 ldr r0, _080A13D4 @ =0x0000300C - bl TextboxNoOverlapFollow + bl MessageFromTarget movs r0, #1 b _080A13E0 .align 2, 0 _080A13D4: .4byte 0x0000300C _080A13D8: ldr r0, _080A13E4 @ =0x00003005 - bl TextboxNoOverlapFollow + bl MessageFromTarget movs r0, #0 _080A13E0: str r0, [r4, #0x14] @@ -353,8 +353,8 @@ _080A1472: bl ModRupees ldr r0, _080A14A0 @ =0x00003007 adds r1, r5, #0 - bl TextboxNoOverlap - ldr r1, _080A14A4 @ =gTextBox + bl MessageNoOverlap + ldr r1, _080A14A4 @ =gMessage lsls r0, r4, #0x10 lsrs r0, r0, #0x10 str r0, [r1, #0x10] @@ -362,7 +362,7 @@ _080A1472: .align 2, 0 _080A149C: .4byte gUnk_08124ECC _080A14A0: .4byte 0x00003007 -_080A14A4: .4byte gTextBox +_080A14A4: .4byte gMessage thumb_func_start sub_080A14A8 sub_080A14A8: @ 0x080A14A8 @@ -557,8 +557,8 @@ sub_080A1608: @ 0x080A1608 adds r4, #4 _080A1618: adds r0, r4, #0 - bl TextboxNoOverlapFollow - ldr r4, _080A1640 @ =gTextBox + bl MessageFromTarget + ldr r4, _080A1640 @ =gMessage movs r1, #0 movs r0, #1 strb r0, [r4, #6] @@ -574,7 +574,7 @@ _080A1618: pop {r4, pc} .align 2, 0 _080A163C: .4byte 0x00003002 -_080A1640: .4byte gTextBox +_080A1640: .4byte gMessage _080A1644: .4byte gUnk_08124C20 thumb_func_start sub_080A1648 diff --git a/asm/objectC1.s b/asm/objectC1.s index a18b4d33..88bd02ef 100644 --- a/asm/objectC1.s +++ b/asm/objectC1.s @@ -182,7 +182,7 @@ _080A269C: _080A26B4: adds r0, r4, #0 bl UpdateAnimationSingleFrame - ldr r0, _080A2764 @ =gTextBox + ldr r0, _080A2764 @ =gMessage ldrb r1, [r0] adds r0, r7, #0 ands r0, r1 @@ -268,5 +268,5 @@ _080A273C: _080A2762: pop {r4, r5, r6, r7, pc} .align 2, 0 -_080A2764: .4byte gTextBox +_080A2764: .4byte gMessage _080A2768: .4byte gPlayerState diff --git a/data/data_08107BC8.s b/data/data_08107BC8.s deleted file mode 100755 index aea9c811..00000000 --- a/data/data_08107BC8.s +++ /dev/null @@ -1,17 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08107C0C:: @ 08107C0C - .incbin "baserom.gba", 0x107C0C, 0x0000003 - -gUnk_08107C0F:: @ 08107C0F - .incbin "baserom.gba", 0x107C0F, 0x0000005 - -gUnk_08107C14:: @ 08107C14 - .incbin "baserom.gba", 0x107C14, 0x0000004 - -gUnk_08107C18:: @ 08107C18 - .incbin "baserom.gba", 0x107C18, 0x0000004 diff --git a/data/scripts/script_08008B5C.inc b/data/scripts/script_08008B5C.inc index 2009cc62..d2ac2ac4 100644 --- a/data/scripts/script_08008B5C.inc +++ b/data/scripts/script_08008B5C.inc @@ -28,8 +28,8 @@ script_08008BA2: _0807E864 _0807E930 0x0004 Call sub_0807F2D4 - TextboxNoOverlapFollow 0x4912 - _0807EA94 + MessageFromTarget 0x4912 + _0807EA94 _0807E930 0x0008 _0807E878 Jump script_08008BA2 @@ -60,8 +60,8 @@ script_08008BD2: CallWithArg sub_0806BB1C, 0x00000001 Call sub_0806BB7C JumpIfNot script_08008C5C - TextboxNoOverlap 0x490c - _0807EA94 + MessageNoOverlap 0x490c + _0807EA94 LoadRoomEntityList gUnk_080D6784 WaitForSomething 0x00000001 WaitForSomething 0x00000004 @@ -69,8 +69,8 @@ script_08008BD2: PlaySound SFX_SECRET _0807E930 0x0004 Call sub_0807F2D4 - TextboxNoOverlap 0x4913 - _0807EA94 + MessageNoOverlap 0x4913 + _0807EA94 _0807E930 0x0008 Call sub_0807F2D4 Jump script_08008C5C @@ -91,8 +91,8 @@ SCRIPT_START script_08008C64 PlaySound SFX_STAIRS EndBlock WaitForSomething 0x00000002 - TextboxNoOverlap 0x490d - _0807EA94 + MessageNoOverlap 0x490d + _0807EA94 DoPostScriptAction 0x0007 Call sub_08064D08 _0807EDD4 0x0068, 0x0078 diff --git a/data/scripts/script_08008D8C.inc b/data/scripts/script_08008D8C.inc index 777a0a63..bec68bb0 100644 --- a/data/scripts/script_08008D8C.inc +++ b/data/scripts/script_08008D8C.inc @@ -64,8 +64,8 @@ script_08008E12: WaitForSomething2 0x00000100 _0807E5F8 0x00000004 WaitForSomething2 0x00000008 - TextboxNoOverlapFollowPos 0x1053, 0x000e - _0807EA94 + MessageFromTargetPos 0x1053, 0x000e + _0807EA94 _0807E5F8 0x00000080 WaitForSomething2 0x00000100 _0807E5F8 0x00000080 diff --git a/data/scripts/script_08008FC0.inc b/data/scripts/script_08008FC0.inc index 85717dac..e09554bb 100644 --- a/data/scripts/script_08008FC0.inc +++ b/data/scripts/script_08008FC0.inc @@ -4,8 +4,8 @@ SCRIPT_START script_08008FC0 PlaySound SFX_109 CallWithArg sub_0807F238, 0x0000045f Call sub_0807F304 - TextboxNoOverlapFollowPos 0x0501, 0x000e - _0807EA94 + MessageFromTargetPos 0x0501, 0x000e + _0807EA94 _0807E5F8 0x00000020 Call sub_080791BC SCRIPT_END diff --git a/data/scripts/script_0800903C.inc b/data/scripts/script_0800903C.inc index 06a5ef94..46262f67 100644 --- a/data/scripts/script_0800903C.inc +++ b/data/scripts/script_0800903C.inc @@ -29,21 +29,21 @@ SCRIPT_START script_08009080 _0807EB44 0x0004 _0807ECC4 0x0008 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x1050, 0x000e - _0807EA94 + MessageFromTargetPos 0x1050, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x1052, 0x000e - _0807EA94 + MessageFromTargetPos 0x1052, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807EB44 0x0006 _0807E930 0x0005 - TextboxNoOverlapFollowPos 0x1054, 0x000e - _0807EA94 + MessageFromTargetPos 0x1054, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 @@ -51,26 +51,26 @@ SCRIPT_START script_08009080 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x1056, 0x000e - _0807EA94 + MessageFromTargetPos 0x1056, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x1057, 0x000e - _0807EA94 + MessageFromTargetPos 0x1057, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x1058, 0x000e - _0807EA94 + MessageFromTargetPos 0x1058, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 WaitForSomething2 0x00000080 _0807E930 0x0004 - TextboxNoOverlapFollowPos 0x105c, 0x000e - _0807EA94 + MessageFromTargetPos 0x105c, 0x000e + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000100 script_0800917C: @@ -92,8 +92,8 @@ SCRIPT_START script_08009198 WaitForSomething2 0x00000001 _0807EB74 DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x105b, 0x0000 - _0807EA94 + MessageFromTargetPos 0x105b, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000002 WaitForSomething2 0x00000001 @@ -104,8 +104,8 @@ SCRIPT_START script_08009198 DoPostScriptAction 0x0005 Wait 0x003c DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x1051, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1051, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000002 WaitForSomething2 0x00000001 @@ -114,8 +114,8 @@ SCRIPT_START script_08009198 _0807EB74 _0807EB8C DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x1055, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1055, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000002 WaitForSomething2 0x00000001 @@ -128,8 +128,8 @@ SCRIPT_START script_08009198 _0807EB74 DoPostScriptAction 0x0000 DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x1059, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1059, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000002 BeginBlock @@ -167,10 +167,10 @@ script_080092B2: script_080092BA: CheckEntityInteractType JumpIfNot script_080092BA - _0807E864 - _0807EB74 - TextboxNoOverlap 0x105e - _0807EA94 + _0807E864 + _0807EB74 + MessageNoOverlap 0x105e + _0807EA94 Wait 0x000f _0807E878 Jump script_080092BA @@ -192,11 +192,11 @@ SCRIPT_START script_080092F0 script_08009300: CheckEntityInteractType JumpIfNot script_08009300 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x1071 - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageNoOverlap 0x1071 + _0807EA94 + _0807E878 Jump script_08009300 .2byte 0x0000 SCRIPT_START script_08009318 diff --git a/data/scripts/script_08009348.inc b/data/scripts/script_08009348.inc index 0ac133ef..8138e6c5 100644 --- a/data/scripts/script_08009348.inc +++ b/data/scripts/script_08009348.inc @@ -12,8 +12,8 @@ script_0800934E: CameraTargetEntity CheckGlobalFlag 0x0055 JumpIf script_0800939A - TextboxNoOverlap 0x1d01 - _0807EA94 + MessageNoOverlap 0x1d01 + _0807EA94 script_08009376: _0807EA94 Call sub_0806D640 diff --git a/data/scripts/script_0800939A.inc b/data/scripts/script_0800939A.inc index 2b5a9bbc..cd222161 100644 --- a/data/scripts/script_0800939A.inc +++ b/data/scripts/script_0800939A.inc @@ -17,15 +17,15 @@ SCRIPT_START script_0800939A JumpIf script_080093BC CheckInventory1 0x000e JumpIf script_080093BC - TextboxNoOverlap 0x1d02 - _0807EA94 + MessageNoOverlap 0x1d02 + _0807EA94 Jump script_08009376 script_080093BC: CheckInventory1 0x000e JumpIfNot script_080093DA Call sub_0806D788 - TextboxNoOverlap 0x1d03 - _0807EA94 + MessageNoOverlap 0x1d03 + _0807EA94 Call sub_0806D70C Jump script_08009376 script_080093DA: @@ -46,13 +46,13 @@ script_080093DA: JumpIf script_080093EE SetIntVariable 0x00001d04 script_080093EE: - TextboxNoOverlapVar - _0807EA94 - _0807E3E8 + MessageNoOverlapVar + _0807EA94 + _0807E3E8 JumpIfNot script_08009376 Wait 0x001e - TextboxNoOverlap 0x1d08 - _0807EA94 + MessageNoOverlap 0x1d08 + _0807EA94 LoadRoomEntityList gUnk_080F9C38 Wait 0x0078 Call sub_0806D6D0 @@ -77,19 +77,19 @@ script_080093EE: .endif .endif Call sub_0806D5D4 - _0807EB8C - TextboxNoOverlap 0x1d09 - _0807EA94 + _0807EB8C + MessageNoOverlap 0x1d09 + _0807EA94 Wait 0x000a Jump script_08009376 script_0800943E: Call sub_0806D600 JumpIf script_08009452 - TextboxNoOverlap 0x1d0a - _0807EA94 + MessageNoOverlap 0x1d0a + _0807EA94 JumpIfNot script_08009376 script_08009452: - TextboxNoOverlap 0x1d0b - _0807EA94 + MessageNoOverlap 0x1d0b + _0807EA94 Call sub_0806D74C _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_08009464.inc b/data/scripts/script_08009464.inc index 83fbcbbb..f85d454f 100644 --- a/data/scripts/script_08009464.inc +++ b/data/scripts/script_08009464.inc @@ -20,10 +20,10 @@ SCRIPT_START script_08009464 .endif Call sub_0806D620 Wait 0x003c - WaitPlayerAction8 - _0807EB8C - TextboxNoOverlap 0x1d0c - _0807EA94 + WaitPlayerAction8 + _0807EB8C + MessageNoOverlap 0x1d0c + _0807EA94 Wait 0x000a Jump script_08009376 .2byte 0x0000 diff --git a/data/scripts/script_080095F2.inc b/data/scripts/script_080095F2.inc index ee702274..cda95152 100644 --- a/data/scripts/script_080095F2.inc +++ b/data/scripts/script_080095F2.inc @@ -9,9 +9,9 @@ SCRIPT_START script_080095F2 JumpIfNot script_08009622 PlaySound SFX_109 _0807F088 0x003c - TextboxNoOverlapFollow 0x053c - WaitPlayerAction8 - _0807EA94 + MessageFromTarget 0x053c + WaitPlayerAction8 + _0807EA94 _0807F078 0x003c, 0x0001 script_08009622: _0807E878 diff --git a/data/scripts/script_08009950.inc b/data/scripts/script_08009950.inc index bffaaa59..8fcf8511 100644 --- a/data/scripts/script_08009950.inc +++ b/data/scripts/script_08009950.inc @@ -16,8 +16,8 @@ SCRIPT_START script_08009950 Wait 0x001e _0807E930 0x000b Wait 0x001e - TextboxNoOverlapFollow 0x1002 - _0807EA94 + MessageFromTarget 0x1002 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000004 WaitForSomething2 0x00000008 @@ -26,8 +26,8 @@ SCRIPT_START script_08009950 _0807EDD4 0x00b8, 0x005c _0807EB44 0x0006 DoPostScriptAction 0x0001 - TextboxNoOverlapFollow 0x1004 - _0807EA94 + MessageFromTarget 0x1004 + _0807EA94 DoPostScriptAction 0x0000 Wait 0x001e _0807E778 0x0002 diff --git a/data/scripts/script_080099DC.inc b/data/scripts/script_080099DC.inc index e55f9999..9c526d16 100644 --- a/data/scripts/script_080099DC.inc +++ b/data/scripts/script_080099DC.inc @@ -9,14 +9,14 @@ SCRIPT_START script_080099DC DoPostScriptAction 0x0007 _0807EDD4 0x0068, 0x0060 Wait 0x000f - TextboxNoOverlapFollow 0x1001 - _0807EA94 + MessageFromTarget 0x1001 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 DoPostScriptAction 0x0001 - TextboxNoOverlapFollow 0x1003 - _0807EA94 + MessageFromTarget 0x1003 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000008 SCRIPT_END diff --git a/data/scripts/script_08009B30.inc b/data/scripts/script_08009B30.inc index cfca6b8a..7217bf9b 100644 --- a/data/scripts/script_08009B30.inc +++ b/data/scripts/script_08009B30.inc @@ -6,8 +6,8 @@ SCRIPT_START script_08009B30 EndBlock WaitFor_2 Wait 0x001e - TextboxNoOverlapFollow 0x1005 - _0807EA94 + MessageFromTarget 0x1005 + _0807EA94 Wait 0x003c Call sub_0807529C Wait 0x003c diff --git a/data/scripts/script_08009B78.inc b/data/scripts/script_08009B78.inc index 718c99d0..8bc7cabe 100644 --- a/data/scripts/script_08009B78.inc +++ b/data/scripts/script_08009B78.inc @@ -18,16 +18,16 @@ SCRIPT_START script_08009B78 DoPostScriptAction 0x0000 Wait 0x000f DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x1009, 0x0000 - _0807E8E4_1 - _0807EA94 + MessageFromTargetPos 0x1009, 0x0000 + _0807E8E4_1 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000004 WaitForSomething2 0x00000008 _0807EB8C DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x100b, 0x0000 - _0807EA94 + MessageFromTargetPos 0x100b, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000002 WaitForSomething2 0x00000008 @@ -45,8 +45,8 @@ SCRIPT_START script_08009B78 WaitPlayerAction8 _0807E8E4_1 DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x100c, 0x0000 - _0807EA94 + MessageFromTargetPos 0x100c, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000004 script_08009C4C: @@ -54,10 +54,10 @@ script_08009C4C: script_08009C50: CheckEntityInteractType JumpIfNot script_08009C50 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x100e - _0807E878 + _0807E864 + _0807EB74 + MessageNoOverlap 0x100e + _0807E878 Jump script_08009C50 SCRIPT_END .2byte 0x0000 diff --git a/data/scripts/script_08009C68.inc b/data/scripts/script_08009C68.inc index 0737d769..2b81699f 100644 --- a/data/scripts/script_08009C68.inc +++ b/data/scripts/script_08009C68.inc @@ -13,8 +13,8 @@ SCRIPT_START script_08009C68 _0807EB74 _0807EB8C DoPostScriptAction 0x0001 - TextboxNoOverlapFollowPos 0x100a, 0x0000 - _0807EA94 + MessageFromTargetPos 0x100a, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 @@ -22,8 +22,8 @@ SCRIPT_START script_08009C68 DoPostScriptAction 0x0001 _0807EB8C _0807EB44 0x0002 - TextboxNoOverlapFollowPos 0x100d, 0x0000 - _0807EA94 + MessageFromTargetPos 0x100d, 0x0000 + _0807EA94 DoPostScriptAction 0x0000 _0807EDD4 0x0028, 0x0060 _0807EDD4 0x0000, 0x0060 diff --git a/data/scripts/script_08009F14.inc b/data/scripts/script_08009F14.inc index 84295d14..98e1691e 100644 --- a/data/scripts/script_08009F14.inc +++ b/data/scripts/script_08009F14.inc @@ -21,8 +21,8 @@ script_08009F36: StartPlayerScript script_0800A088 WaitForSomething2 0x00000002 Call sub_0806014C - TextboxNoOverlapFollowPos 0x1f01, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1f01, 0x0000 + _0807EA94 Wait 0x001e _0807F034 0x0065 WaitPlayerAction8 @@ -62,11 +62,11 @@ script_08009FDC: Call sub_08060158 CheckEntityInteractType JumpIfNot script_08009FDC - EndBlock - _0807E864 - TextboxNoOverlap 0x1f0e - _0807EA94 - _0807E3E8 + EndBlock + _0807E864 + MessageNoOverlap 0x1f0e + _0807EA94 + _0807E3E8 JumpIf script_0800A002 _0807E878 Jump script_08009FDC @@ -76,9 +76,9 @@ script_0800A002: Call sub_08060318 WaitPlayerAction8 Wait 0x0008 - _0807EB8C - TextboxNoOverlapFollow 0x1f13 - _0807EA94 + _0807EB8C + MessageFromTarget 0x1f13 + _0807EA94 SetLocalFlag 0x00b0 _0807E878 script_0800A024: @@ -91,16 +91,16 @@ script_0800A024: _0807E864 CheckInventory1 0x0008 JumpIf script_0800A052 - TextboxNoOverlap 0x1f14 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x1f14 + _0807EA94 + _0807E3E8 JumpIf script_0800A002 _0807E878 Jump script_0800A024 script_0800A052: - TextboxNoOverlap 0x1f11 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x1f11 + _0807EA94 + _0807E3E8 JumpIf script_0800A064 _0807E878 Jump script_0800A024 @@ -110,9 +110,9 @@ script_0800A064: Call sub_08060318 WaitPlayerAction8 Wait 0x0008 - _0807EB8C - TextboxNoOverlapFollow 0x1f10 - _0807EA94 - _0807E878 + _0807EB8C + MessageFromTarget 0x1f10 + _0807EA94 + _0807E878 Jump script_0800A024 .2byte 0x0000 diff --git a/data/scripts/script_0800A1D8.inc b/data/scripts/script_0800A1D8.inc index 27f9114e..ee3b8650 100644 --- a/data/scripts/script_0800A1D8.inc +++ b/data/scripts/script_0800A1D8.inc @@ -12,8 +12,8 @@ SCRIPT_START script_0800A1D8 WaitForSomething2 0x00000001 _0807E5F8 0x00000004 WaitForSomething2 0x00000080 - TextboxNoOverlapFollowPos 0x1659, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1659, 0x0000 + _0807EA94 Wait 0x003c _0807E5F8 0x00000010 WaitForSomething2 0x00000200 @@ -27,11 +27,11 @@ SCRIPT_START script_0800A1D8 _0807E5F8 0x00000004 Call sub_0807F3F8 WaitForSomething2 0x00000080 - TextboxNoOverlapFollowPos 0x165a, 0x000e - _0807EA94 + MessageFromTargetPos 0x165a, 0x000e + _0807EA94 Wait 0x003c - TextboxNoOverlapFollowPos 0x165b, 0x000e - _0807EA94 + MessageFromTargetPos 0x165b, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000040 _0807E5F8 0x00000008 @@ -45,11 +45,11 @@ SCRIPT_START script_0800A1D8 WaitForSomething2 0x00000100 _0807E5F8 0x00000006 WaitForSomething2 0x000000c0 - TextboxNoOverlapFollowPos 0x165c, 0x000e - _0807EA94 + MessageFromTargetPos 0x165c, 0x000e + _0807EA94 StopBgm - TextboxNoOverlapFollowPos 0x165d, 0x000e - _0807EA94 + MessageFromTargetPos 0x165d, 0x000e + _0807EA94 _0807E5F8 0x00000006 WaitForSomething2 0x000000c0 _0807E5F8 0x00000006 diff --git a/data/scripts/script_0800AB08.inc b/data/scripts/script_0800AB08.inc index 284bd514..98fa305e 100644 --- a/data/scripts/script_0800AB08.inc +++ b/data/scripts/script_0800AB08.inc @@ -13,9 +13,9 @@ SCRIPT_START script_0800AB08 _0807F0B4 0x0001 SetEntityPositionRelative 0x0088, 0x0078 Call sub_0807F5C0 - TextboxNoOverlapFollowPos 0x1664, 0x0000 - _0807EA94 - TextboxNoOverlapFollowPos 0x165e, 0x000e - _0807EA94 + MessageFromTargetPos 0x1664, 0x0000 + _0807EA94 + MessageFromTargetPos 0x165e, 0x000e + _0807EA94 CallWithArg CreateManager36, 0x00000001 _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_0800AB6E.inc b/data/scripts/script_0800AB6E.inc index a0623913..80fa03e7 100644 --- a/data/scripts/script_0800AB6E.inc +++ b/data/scripts/script_0800AB6E.inc @@ -13,16 +13,16 @@ SCRIPT_START script_0800AB6E Wait 0x003c _0807E5F8 0x00000002 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x165f, 0x000e - _0807EA94 + MessageFromTargetPos 0x165f, 0x000e + _0807EA94 StartPlayerScript script_0800ACBC WaitForSomething2 0x00000001 - TextboxNoOverlapFollowPos 0x1660, 0x000e - _0807EA94 + MessageFromTargetPos 0x1660, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x1661, 0x000e - _0807EA94 + MessageFromTargetPos 0x1661, 0x000e + _0807EA94 _0807E5F8 0x00000008 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 @@ -32,10 +32,10 @@ SCRIPT_START script_0800AB6E StartPlayerScript script_0800ACE0 WaitForSomething2 0x00000001 Wait 0x003c - TextboxNoOverlapFollowPos 0x1662, 0x000e - _0807EA94 - TextboxNoOverlapFollowPos 0x1663, 0x000e - _0807EA94 + MessageFromTargetPos 0x1662, 0x000e + _0807EA94 + MessageFromTargetPos 0x1663, 0x000e + _0807EA94 SetEntityPosition 0x0000, 0xffe0 Call sub_0807F5C0 _0807E5F8 0x00000002 @@ -45,8 +45,8 @@ SCRIPT_START script_0800AB6E StartPlayerScript script_0800AD54 WaitForSomething2 0x00000001 Wait 0x003c - TextboxNoOverlapFollowPos 0x1665, 0x000e - _0807EA94 + MessageFromTargetPos 0x1665, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 Wait 0x0078 diff --git a/data/scripts/script_0800B00C.inc b/data/scripts/script_0800B00C.inc index 1f0482f5..58c12fe8 100644 --- a/data/scripts/script_0800B00C.inc +++ b/data/scripts/script_0800B00C.inc @@ -14,8 +14,8 @@ script_0800B024: JumpIf script_0800B082 CheckGlobalFlag 0x0053 JumpIf script_0800B064 - TextboxNoOverlap 0x3f32 - _0807EA94 + MessageNoOverlap 0x3f32 + _0807EA94 DoPostScriptAction 0x0008 Call Windcrest_Unlock Wait 0x003c @@ -24,8 +24,8 @@ script_0800B024: SetGlobalFlag 0x0053 Jump script_0800B09C script_0800B064: - TextboxNoOverlap 0x3f32 - _0807EA94 + MessageNoOverlap 0x3f32 + _0807EA94 DoPostScriptAction 0x0008 Call Windcrest_Unlock Wait 0x003c @@ -33,8 +33,8 @@ script_0800B064: _0807EA94 Jump script_0800B09C script_0800B082: - TextboxNoOverlap 0x3f32 - _0807EA94 + MessageNoOverlap 0x3f32 + _0807EA94 DoPostScriptAction 0x0008 Call Windcrest_Unlock Wait 0x003c diff --git a/data/scripts/script_0800B41C.inc b/data/scripts/script_0800B41C.inc index abcdb975..e17cead1 100644 --- a/data/scripts/script_0800B41C.inc +++ b/data/scripts/script_0800B41C.inc @@ -17,10 +17,10 @@ SCRIPT_START script_0800B41C Wait 0x003c PlaySound SFX_TASK_COMPLETE _0807F088 0x0037 - WaitPlayerAction8 - _0807EB8C - TextboxNoOverlapFollow 0x200c - _0807EA94 + WaitPlayerAction8 + _0807EB8C + MessageFromTarget 0x200c + _0807EA94 Wait 0x0014 _0807EDD4 0x0158, 0x0290 Wait 0x000a diff --git a/data/scripts/script_0800B4AC.inc b/data/scripts/script_0800B4AC.inc index d4eca1cb..29239a02 100644 --- a/data/scripts/script_0800B4AC.inc +++ b/data/scripts/script_0800B4AC.inc @@ -16,9 +16,9 @@ script_0800B4D4: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlapFollow 0x200b - EndBlock - _0807E878 + MessageFromTarget 0x200b + EndBlock + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_0800B4BC @@ -28,8 +28,8 @@ script_0800B4F0: _0807EDD4 0x0134, 0x0288 _0807EB44 0x0004 WaitForSomething2 0x00000008 - TextboxNoOverlapFollow 0x2016 - _0807EA94 + MessageFromTarget 0x2016 + _0807EA94 _0807EDD4 0x0158, 0x0288 DoPostScriptAction 0x0000 _0807EB44 0x0000 diff --git a/data/scripts/script_0800B5EC.inc b/data/scripts/script_0800B5EC.inc index 9bc039db..6c55593b 100644 --- a/data/scripts/script_0800B5EC.inc +++ b/data/scripts/script_0800B5EC.inc @@ -7,11 +7,11 @@ SCRIPT_START script_0800B5EC script_0800B5FA: CheckEntityInteractType JumpIfNot script_0800B5FA - _0807E864 - _0807EB74 - TextboxNoOverlap 0x2009 - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageNoOverlap 0x2009 + _0807EA94 + _0807E878 _0807EB44 0x0004 Jump script_0800B5FA SCRIPT_START script_0800B614 @@ -29,20 +29,20 @@ script_0800B618: WaitForSomething2 0x00000004 CheckLocalFlag 0x009e JumpIf script_0800B7A2 - TextboxNoOverlap 0x0583 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x0583 + _0807EA94 + _0807E3E8 JumpIfNot script_0800B684 Wait 0x000f - TextboxNoOverlap 0x0584 + MessageNoOverlap 0x0584 CallWithArg sub_0807F970, 0x0000058b JumpIf script_0800B68E CallWithArg sub_08087424, 0x00000000 Wait 0x00b4 Jump script_0800B6A6 script_0800B684: - TextboxNoOverlap 0x057d - _0807EA94 + MessageNoOverlap 0x057d + _0807EA94 Jump script_0800B6A6 script_0800B68E: _0807EA94 @@ -52,8 +52,8 @@ script_0800B698: WaitPlayerAction8 _0807EB8C Wait 0x001e - TextboxNoOverlap 0x057f - _0807EA94 + MessageNoOverlap 0x057f + _0807EA94 script_0800B6A6: _0807E778 0x0004 DoFade7 diff --git a/data/scripts/script_0800B6C8.inc b/data/scripts/script_0800B6C8.inc index aa5ffd6e..c2e0c56c 100644 --- a/data/scripts/script_0800B6C8.inc +++ b/data/scripts/script_0800B6C8.inc @@ -16,8 +16,8 @@ script_0800B6D4: WaitForSomething2 0x00000004 CheckLocalFlag 0x009f JumpIf script_0800B7A2 - TextboxNoOverlap 0x057b - _0807EA94 + MessageNoOverlap 0x057b + _0807EA94 CallWithArg sub_0807F970, 0x0000057d JumpIf script_0800B6A6 _0807EA94 @@ -41,8 +41,8 @@ script_0800B734: WaitForSomething2 0x00000004 CheckLocalFlag 0x00a0 JumpIf script_0800B7A2 - TextboxNoOverlap 0x0580 - _0807EA94 + MessageNoOverlap 0x0580 + _0807EA94 CallWithArg sub_0807F970, 0x00000582 JumpIf script_0800B794 CallWithArg sub_08087424, 0x00000001 @@ -54,15 +54,15 @@ script_0800B794: _0807F034 0x0065 Jump script_0800B698 script_0800B7A2: - TextboxNoOverlap 0x0590 - _0807EA94 + MessageNoOverlap 0x0590 + _0807EA94 _0807E778 0x0010 DoFade7 WaitFor_2 ModHealth 0x00a0 - DoFade6 - WaitFor_2 - TextboxNoOverlap 0x057f - _0807EA94 + DoFade6 + WaitFor_2 + MessageNoOverlap 0x057f + _0807EA94 Jump script_0800B6A6 .2byte 0x0000 diff --git a/data/scripts/script_0800B828.inc b/data/scripts/script_0800B828.inc index 37f795e2..5c17fb53 100644 --- a/data/scripts/script_0800B828.inc +++ b/data/scripts/script_0800B828.inc @@ -5,10 +5,10 @@ SCRIPT_START script_0800B828 DoPostScriptAction 0x000a EndBlock script_0800B836: - _0807E944 - _0807E864 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 + _0807E944 + _0807E864 + MessageFromTarget 0x0a01 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800B836 @@ -42,10 +42,10 @@ script_0800B87E: script_0800B89E: CheckEntityInteractType JumpIfNot script_0800B89E - _0807E864 - _0807EB74 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 + _0807E864 + _0807EB74 + MessageFromTarget 0x0a01 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800B89E @@ -91,21 +91,21 @@ SCRIPT_START script_0800B91C script_0800B934: CheckEntityInteractType JumpIfNot script_0800B934 - _0807E864 - _0807EB74 - TextboxNoOverlapFollow 0x3f19 - _0807EA94 + _0807E864 + _0807EB74 + MessageFromTarget 0x3f19 + _0807EA94 SetLocalFlag 0x005f _0807E878 Jump script_0800B934 script_0800B94E: CheckEntityInteractType JumpIfNot script_0800B94E - _0807E864 - _0807EB74 - TextboxNoOverlapFollow 0x3f1a - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageFromTarget 0x3f1a + _0807EA94 + _0807E878 Jump script_0800B94E SCRIPT_START script_0800B964 BeginBlock diff --git a/data/scripts/script_0800B9B4.inc b/data/scripts/script_0800B9B4.inc index 36547a00..9448c48a 100644 --- a/data/scripts/script_0800B9B4.inc +++ b/data/scripts/script_0800B9B4.inc @@ -48,9 +48,9 @@ script_0800BA46: JumpIfNot script_0800BA46 _0807E864 Call sub_0807DF28 - TextboxNoOverlapFollow 0x3301 - _0807EA94 - _0807E3E8 + MessageFromTarget 0x3301 + _0807EA94 + _0807E3E8 JumpIfNot script_0800BA6C StopBgm Call sub_0806E964 @@ -77,8 +77,8 @@ script_0800BA8E: Wait 0x001e _0807EDD4 0x02f0, 0x0350 Wait 0x001e - TextboxNoOverlap 0x0e00 - _0807EA94 + MessageNoOverlap 0x0e00 + _0807EA94 Wait 0x0078 Call sub_08054968 SCRIPT_END diff --git a/data/scripts/script_0800BACC.inc b/data/scripts/script_0800BACC.inc index a7536962..3eb79b27 100644 --- a/data/scripts/script_0800BACC.inc +++ b/data/scripts/script_0800BACC.inc @@ -9,8 +9,8 @@ script_0800BADE: JumpIfNot script_0800BADE DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e01 - _0807EA94 + MessageNoOverlap 0x0e01 + _0807EA94 Wait 0x0078 Call sub_08054968 SCRIPT_END diff --git a/data/scripts/script_0800BB00.inc b/data/scripts/script_0800BB00.inc index 57f1ebc3..a35881e1 100644 --- a/data/scripts/script_0800BB00.inc +++ b/data/scripts/script_0800BB00.inc @@ -6,8 +6,8 @@ script_0800BB04: JumpIfNot script_0800BB04 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e02 - _0807EA94 + MessageNoOverlap 0x0e02 + _0807EA94 Wait 0x003c DoPostScriptAction 0x000f Wait 0x00b4 diff --git a/data/scripts/script_0800BB30.inc b/data/scripts/script_0800BB30.inc index f45cc966..1e96d74a 100644 --- a/data/scripts/script_0800BB30.inc +++ b/data/scripts/script_0800BB30.inc @@ -9,8 +9,8 @@ script_0800BB42: JumpIfNot script_0800BB42 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e05 - _0807EA94 + MessageNoOverlap 0x0e05 + _0807EA94 Wait 0x0078 Call sub_08054968 SCRIPT_END diff --git a/data/scripts/script_0800BB64.inc b/data/scripts/script_0800BB64.inc index e0e57a4a..ba26abd0 100644 --- a/data/scripts/script_0800BB64.inc +++ b/data/scripts/script_0800BB64.inc @@ -10,8 +10,8 @@ script_0800BB7A: JumpIfNot script_0800BB7A _0807EDD4 0x03a0, 0x00f8 Wait 0x001e - TextboxNoOverlap 0x0e06 - _0807EA94 + MessageNoOverlap 0x0e06 + _0807EA94 Wait 0x000f _0807EDD4 0x0380, 0x00f8 Call sub_08054968 diff --git a/data/scripts/script_0800BBA4.inc b/data/scripts/script_0800BBA4.inc index 2a6f3f19..27d24a2e 100644 --- a/data/scripts/script_0800BBA4.inc +++ b/data/scripts/script_0800BBA4.inc @@ -10,8 +10,8 @@ script_0800BBBA: JumpIfNot script_0800BBBA DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e04 - _0807EA94 + MessageNoOverlap 0x0e04 + _0807EA94 Wait 0x0078 Call sub_08054968 SCRIPT_END diff --git a/data/scripts/script_0800BBDC.inc b/data/scripts/script_0800BBDC.inc index 40e3f7a9..12c615e9 100644 --- a/data/scripts/script_0800BBDC.inc +++ b/data/scripts/script_0800BBDC.inc @@ -7,8 +7,8 @@ script_0800BBE4: JumpIfNot script_0800BBE4 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e03 - _0807EA94 + MessageNoOverlap 0x0e03 + _0807EA94 Wait 0x0078 Call sub_08054968 SCRIPT_END diff --git a/data/scripts/script_0800BC08.inc b/data/scripts/script_0800BC08.inc index 165bc66e..8da602bf 100644 --- a/data/scripts/script_0800BC08.inc +++ b/data/scripts/script_0800BC08.inc @@ -9,9 +9,9 @@ script_0800BC18: JumpIfNot script_0800BC18 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e07 - _0807EA94 - BeginBlock + MessageNoOverlap 0x0e07 + _0807EA94 + BeginBlock _0807EB44 0x0000 _0807E930 0x0004 EndBlock diff --git a/data/scripts/script_0800BC50.inc b/data/scripts/script_0800BC50.inc index 1d947843..b5c20051 100644 --- a/data/scripts/script_0800BC50.inc +++ b/data/scripts/script_0800BC50.inc @@ -11,8 +11,8 @@ script_0800BC62: Wait 0x001e DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e08 - _0807EA94 + MessageNoOverlap 0x0e08 + _0807EA94 DoPostScriptAction 0x000f _0807E930 0x0008 Wait 0x00f0 @@ -25,8 +25,8 @@ script_0800BC62: Wait 0x003c DoPostScriptAction 0x000c Wait 0x003c - TextboxNoOverlap 0x0e09 - _0807EA94 + MessageNoOverlap 0x0e09 + _0807EA94 Call sub_0807F158 CallWithArg sub_0807F4F8, 0x0000035c Wait 0x001e diff --git a/data/scripts/script_0800BCE8.inc b/data/scripts/script_0800BCE8.inc index 363c0f86..f27d63b6 100644 --- a/data/scripts/script_0800BCE8.inc +++ b/data/scripts/script_0800BCE8.inc @@ -8,8 +8,8 @@ SCRIPT_START script_0800BCE8 Wait 0x00f0 _0807E930 0x0000 Wait 0x003c - TextboxNoOverlap 0x0e0a - _0807EA94 + MessageNoOverlap 0x0e0a + _0807EA94 _0807E930 0x0008 Wait 0x003c _0807E5F8 0x00000001 @@ -21,8 +21,8 @@ script_0800BD1C: _0807E930 0x0000 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e0c - _0807EA94 + MessageNoOverlap 0x0e0c + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 DoPostScriptAction 0x000f diff --git a/data/scripts/script_0800BD78.inc b/data/scripts/script_0800BD78.inc index 95cf6780..023678b8 100644 --- a/data/scripts/script_0800BD78.inc +++ b/data/scripts/script_0800BD78.inc @@ -10,8 +10,8 @@ SCRIPT_START script_0800BD78 DoPostScriptAction 0x0007 CallWithArg sub_0807F4F8, 0x00000270 Wait 0x001e - TextboxNoOverlap 0x0e0b - _0807EA94 + MessageNoOverlap 0x0e0b + _0807EA94 _0807E5F8 0x00000004 WaitForSomething2 0x00000002 SetEntitySpeed 0x0100 diff --git a/data/scripts/script_0800BE1C.inc b/data/scripts/script_0800BE1C.inc index db96e9f7..7bc53d08 100644 --- a/data/scripts/script_0800BE1C.inc +++ b/data/scripts/script_0800BE1C.inc @@ -9,8 +9,8 @@ SCRIPT_START script_0800BE1C _0807E930 0x0000 _0807EB44 0x0002 Wait 0x003c - TextboxNoOverlap 0x0e0d - _0807EA94 + MessageNoOverlap 0x0e0d + _0807EA94 _0807E930 0x0008 Wait 0x003c Jump script_0800BE88 @@ -40,8 +40,8 @@ script_0800BE8C: _0807E930 0x0000 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e0f - _0807EA94 + MessageNoOverlap 0x0e0f + _0807EA94 _0807E5F8 0x00000002 Call sub_08054F64 DoPostScriptAction 0x000f diff --git a/data/scripts/script_0800BECC.inc b/data/scripts/script_0800BECC.inc index a43f732a..98969897 100644 --- a/data/scripts/script_0800BECC.inc +++ b/data/scripts/script_0800BECC.inc @@ -10,8 +10,8 @@ SCRIPT_START script_0800BECC DoPostScriptAction 0x0007 CallWithArg sub_0807F4F8, 0x000001b8 Wait 0x001e - TextboxNoOverlap 0x0e0e - _0807EA94 + MessageNoOverlap 0x0e0e + _0807EA94 _0807E5F8 0x0000000c WaitForSomething2 0x00000002 SetEntitySpeed 0x0100 diff --git a/data/scripts/script_0800BF38.inc b/data/scripts/script_0800BF38.inc index 3bae9d7c..fdf7faef 100644 --- a/data/scripts/script_0800BF38.inc +++ b/data/scripts/script_0800BF38.inc @@ -9,8 +9,8 @@ SCRIPT_START script_0800BF38 _0807E930 0x0000 _0807EB44 0x0002 Wait 0x003c - TextboxNoOverlap 0x0e10 - _0807EA94 + MessageNoOverlap 0x0e10 + _0807EA94 _0807E930 0x0008 Wait 0x003c Jump script_0800BFA4 @@ -40,8 +40,8 @@ script_0800BFA8: _0807E930 0x0000 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e12 - _0807EA94 + MessageNoOverlap 0x0e12 + _0807EA94 _0807E5F8 0x00000002 Call sub_08054F64 DoPostScriptAction 0x000f diff --git a/data/scripts/script_0800C004.inc b/data/scripts/script_0800C004.inc index 80cf2923..1a581e15 100644 --- a/data/scripts/script_0800C004.inc +++ b/data/scripts/script_0800C004.inc @@ -10,8 +10,8 @@ SCRIPT_START script_0800C004 DoPostScriptAction 0x0007 CallWithArg sub_0807F4F8, 0x000001b8 Wait 0x001e - TextboxNoOverlap 0x0e11 - _0807EA94 + MessageNoOverlap 0x0e11 + _0807EA94 _0807E5F8 0x0000001c WaitForSomething2 0x00000002 SetEntitySpeed 0x0100 diff --git a/data/scripts/script_0800C0B0.inc b/data/scripts/script_0800C0B0.inc index 162aff86..69b49329 100644 --- a/data/scripts/script_0800C0B0.inc +++ b/data/scripts/script_0800C0B0.inc @@ -9,8 +9,8 @@ SCRIPT_START script_0800C0B0 _0807E930 0x0000 _0807EB44 0x0002 Wait 0x003c - TextboxNoOverlap 0x0e13 - _0807EA94 + MessageNoOverlap 0x0e13 + _0807EA94 _0807E930 0x0008 Wait 0x003c Jump script_0800C11C @@ -40,8 +40,8 @@ script_0800C120: _0807E930 0x0000 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e15 - _0807EA94 + MessageNoOverlap 0x0e15 + _0807EA94 _0807E5F8 0x00000002 Call sub_08054F64 DoPostScriptAction 0x000f diff --git a/data/scripts/script_0800C160.inc b/data/scripts/script_0800C160.inc index 686aed8f..de972fbe 100644 --- a/data/scripts/script_0800C160.inc +++ b/data/scripts/script_0800C160.inc @@ -10,8 +10,8 @@ SCRIPT_START script_0800C160 DoPostScriptAction 0x0007 CallWithArg sub_0807F4F8, 0x00000128 Wait 0x001e - TextboxNoOverlap 0x0e14 - _0807EA94 + MessageNoOverlap 0x0e14 + _0807EA94 _0807E5F8 0x0000003c WaitForSomething2 0x00000002 SetEntitySpeed 0x0100 diff --git a/data/scripts/script_0800C1D8.inc b/data/scripts/script_0800C1D8.inc index 59e04df4..d8987f9a 100644 --- a/data/scripts/script_0800C1D8.inc +++ b/data/scripts/script_0800C1D8.inc @@ -9,8 +9,8 @@ SCRIPT_START script_0800C1D8 _0807E930 0x0000 _0807EB44 0x0002 Wait 0x003c - TextboxNoOverlap 0x0e16 - _0807EA94 + MessageNoOverlap 0x0e16 + _0807EA94 _0807E930 0x0008 Wait 0x003c Jump script_0800C244 @@ -40,8 +40,8 @@ script_0800C248: _0807E930 0x0000 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x0e18 - _0807EA94 + MessageNoOverlap 0x0e18 + _0807EA94 _0807E5F8 0x00000002 Call sub_08054F64 DoPostScriptAction 0x000f diff --git a/data/scripts/script_0800C2A4.inc b/data/scripts/script_0800C2A4.inc index 3816afe8..01484265 100644 --- a/data/scripts/script_0800C2A4.inc +++ b/data/scripts/script_0800C2A4.inc @@ -10,8 +10,8 @@ SCRIPT_START script_0800C2A4 DoPostScriptAction 0x0007 CallWithArg sub_0807F4F8, 0x00000128 Wait 0x001e - TextboxNoOverlap 0x0e17 - _0807EA94 + MessageNoOverlap 0x0e17 + _0807EA94 _0807E5F8 0x0000007c WaitForSomething2 0x00000002 SetEntitySpeed 0x0100 diff --git a/data/scripts/script_0800C370.inc b/data/scripts/script_0800C370.inc index 6bd48e6e..da292797 100644 --- a/data/scripts/script_0800C370.inc +++ b/data/scripts/script_0800C370.inc @@ -6,8 +6,8 @@ SCRIPT_START script_0800C370 _0807EEF4 0xfff8, 0x0000 _0807F0C8 0x0000, 0x0000 Wait 0x001e - TextboxNoOverlap 0x1d00 - _0807EA94 + MessageNoOverlap 0x1d00 + _0807EA94 _0807E5F8 0x00000006 WaitForSomething2 0x00000001 _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_0800C550.inc b/data/scripts/script_0800C550.inc index 05e0d753..880ad576 100644 --- a/data/scripts/script_0800C550.inc +++ b/data/scripts/script_0800C550.inc @@ -37,7 +37,7 @@ script_0800C5A6: Call sub_08060208 Jump script_0800C5C0 script_0800C5BC: - TextboxNoOverlap 0x4710 + MessageNoOverlap 0x4710 script_0800C5C0: _0807EA94 _0807E878 @@ -111,8 +111,8 @@ script_0800C684: CheckInventory1 0x005b JumpIf script_0800C6B6 DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f16 - _0807EA94 + MessageFromTarget 0x1f16 + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a SetLocalFlag 0x0080 @@ -123,8 +123,8 @@ script_0800C6B6: CheckLocalFlag 0x0081 JumpIf script_0800C6DC DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f1b - _0807EA94 + MessageFromTarget 0x1f1b + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a Call sub_0807DF50 @@ -134,8 +134,8 @@ script_0800C6DC: CheckLocalFlag 0x0082 JumpIf script_0800C712 DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f17 - _0807EA94 + MessageFromTarget 0x1f17 + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a _0807EB44 0x0002 @@ -147,8 +147,8 @@ script_0800C6DC: SetLocalFlag 0x0082 script_0800C712: DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f18 - _0807EA94 + MessageFromTarget 0x1f18 + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a Call sub_0807DF50 @@ -158,8 +158,8 @@ script_0800C730: CheckLocalFlag 0x0083 JumpIf script_0800C756 DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f19 - _0807EA94 + MessageFromTarget 0x1f19 + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a Call sub_0807DF50 @@ -167,8 +167,8 @@ script_0800C730: Jump script_0800C652 script_0800C756: DoPostScriptAction 0x0002 - TextboxNoOverlapFollow 0x1f1a - _0807EA94 + MessageFromTarget 0x1f1a + _0807EA94 DoPostScriptAction 0x0015 Wait 0x000a Call sub_0807DF50 @@ -190,8 +190,8 @@ script_0800C780: CheckInventory1 0x005b JumpIf script_0800C7C0 _0807E930 0x0008 - TextboxNoOverlapFollow 0x2122 - _0807EA94 + MessageFromTarget 0x2122 + _0807EA94 DoPostScriptAction 0x0000 Call sub_0807DF50 _0807E878 @@ -200,17 +200,17 @@ script_0800C7C0: _0807E930 0x0008 CheckLocalFlag 0x0081 JumpIf script_0800C80A - TextboxNoOverlapFollow 0x1130 - _0807EA94 + MessageFromTarget 0x1130 + _0807EA94 _0807EB28 0x1131 - _0807EA94 - _0807EB8C - TextboxNoOverlapFollow 0x1132 - _0807EA94 + _0807EA94 + _0807EB8C + MessageFromTarget 0x1132 + _0807EA94 SetIntVariable 0x00000103 Call sub_0807F420 - TextboxNoOverlapFollow 0x1133 - _0807EA94 + MessageFromTarget 0x1133 + _0807EA94 Wait 0x000a DoPostScriptAction 0x0000 SetLocalFlag 0x0081 @@ -218,8 +218,8 @@ script_0800C7C0: _0807E878 Jump script_0800C780 script_0800C80A: - TextboxNoOverlapFollow 0x1133 - _0807EA94 + MessageFromTarget 0x1133 + _0807EA94 Wait 0x000a _0807E930 0x0000 Call sub_0807DF50 @@ -229,8 +229,8 @@ script_0800C824: _0807E930 0x0008 CheckLocalFlag 0x0083 JumpIf script_0800C8AE - TextboxNoOverlapFollow 0x1135 - _0807EA94 + MessageFromTarget 0x1135 + _0807EA94 SetEntitySpeed 0x0040 _0807EDD4 0x0038, 0x0044 DoPostScriptAction 0x0000 @@ -239,10 +239,10 @@ script_0800C824: Wait 0x003c PlaySound SFX_SECRET Wait 0x003c - _0807EB74 - _0807EB8C - TextboxNoOverlapFollow 0x1136 - _0807EA94 + _0807EB74 + _0807EB8C + MessageFromTarget 0x1136 + _0807EA94 _0807EB28 0x1137 _0807EA94 Wait 0x000a @@ -257,16 +257,16 @@ script_0800C87C: _0807EB74 SetIntVariable 0x00000008 Call sub_0807F3D8 - TextboxNoOverlapFollow 0x1136 - _0807EA94 + MessageFromTarget 0x1136 + _0807EA94 Wait 0x000a DoPostScriptAction 0x0000 Call sub_0807DF50 _0807E878 Jump script_0800C87C script_0800C8AE: - TextboxNoOverlapFollow 0x1136 - _0807EA94 + MessageFromTarget 0x1136 + _0807EA94 Wait 0x000a DoPostScriptAction 0x0000 Call sub_0807DF50 diff --git a/data/scripts/script_0800C91C.inc b/data/scripts/script_0800C91C.inc index 54ab0f85..65d16b14 100644 --- a/data/scripts/script_0800C91C.inc +++ b/data/scripts/script_0800C91C.inc @@ -38,8 +38,8 @@ script_0800C928: Wait 0x003c _0807E5F8 0x00000200 WaitForSomething2 0x00000400 - _0807E8E4_0 - TextboxNoOverlapFollow 0x1126 + _0807E8E4_0 + MessageFromTarget 0x1126 Call sub_0807F40C _0807EA94 _0807E5F8 0x00000200 @@ -54,14 +54,14 @@ script_0800C928: WaitForSomething2 0x00040000 _0807E5F8 0x00008000 WaitForSomething2 0x00010000 - _0807E8E4_3 - TextboxNoOverlapFollow 0x1127 - _0807EA94 + _0807E8E4_3 + MessageFromTarget 0x1127 + _0807EA94 _0807E5F8 0x00002000 WaitForSomething2 0x00004000 - _0807E8E4_1 - TextboxNoOverlapFollow 0x1128 - _0807EA94 + _0807E8E4_1 + MessageFromTarget 0x1128 + _0807EA94 _0807E5F8 0x00000200 _0807E5F8 0x00000800 _0807E5F8 0x00002000 diff --git a/data/scripts/script_0800CD7C.inc b/data/scripts/script_0800CD7C.inc index b5e9bc5c..c2a19374 100644 --- a/data/scripts/script_0800CD7C.inc +++ b/data/scripts/script_0800CD7C.inc @@ -19,7 +19,7 @@ script_0800CDA6: CheckLocalFlag 0x009d JumpIf script_0800CDC4 SetLocalFlag 0x009d - TextboxNoOverlap 0x213d + MessageNoOverlap 0x213d Jump script_0800CF40 script_0800CDC4: CheckGlobalFlag 0x003b @@ -30,16 +30,16 @@ script_0800CDC4: JumpIfNot script_0800CF2A SetGlobalFlag 0x003b ClearGlobalFlag 0x0054 - TextboxNoOverlap 0x2141 + MessageNoOverlap 0x2141 Jump script_0800CF40 script_0800CDEC: - TextboxNoOverlap 0x213e - _0807EA94 + MessageNoOverlap 0x213e + _0807EA94 _0807E48C 0x0023 JumpIfNot script_0800CE14 - TextboxNoOverlap 0x214b - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x214b + _0807EA94 + _0807E3E8 JumpIfNot script_0800CF40 PlaySound SFX_TASK_COMPLETE _0807F088 0x0023 @@ -48,9 +48,9 @@ script_0800CDEC: script_0800CE14: _0807E48C 0x0022 JumpIfNot script_0800CF40 - TextboxNoOverlap 0x214b - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x214b + _0807EA94 + _0807E3E8 JumpIfNot script_0800CF40 PlaySound SFX_TASK_COMPLETE _0807F088 0x0022 @@ -59,7 +59,7 @@ script_0800CE32: _0807EB8C SetGlobalFlag 0x0054 Call sub_08060340 - TextboxNoOverlap 0x213f + MessageNoOverlap 0x213f Jump script_0800CF02 script_0800CE46: CheckGlobalFlag 0x003c @@ -70,16 +70,16 @@ script_0800CE46: JumpIfNot script_0800CF2A SetGlobalFlag 0x003c ClearGlobalFlag 0x0054 - TextboxNoOverlap 0x2145 + MessageNoOverlap 0x2145 Jump script_0800CF40 script_0800CE6E: - TextboxNoOverlap 0x2142 - _0807EA94 + MessageNoOverlap 0x2142 + _0807EA94 _0807E48C 0x0027 JumpIfNot script_0800CF40 - TextboxNoOverlap 0x214c - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x214c + _0807EA94 + _0807E3E8 JumpIfNot script_0800CF40 PlaySound SFX_TASK_COMPLETE _0807F088 0x0027 @@ -87,7 +87,7 @@ script_0800CE6E: _0807EB8C SetGlobalFlag 0x0054 Call sub_08060340 - TextboxNoOverlap 0x2143 + MessageNoOverlap 0x2143 Jump script_0800CF02 script_0800CEA6: CheckGlobalFlag 0x003d @@ -98,16 +98,16 @@ script_0800CEA6: JumpIfNot script_0800CF2A SetGlobalFlag 0x003d ClearGlobalFlag 0x0054 - TextboxNoOverlap 0x2149 + MessageNoOverlap 0x2149 Jump script_0800CF40 script_0800CECE: - TextboxNoOverlap 0x2146 - _0807EA94 + MessageNoOverlap 0x2146 + _0807EA94 _0807E48C 0x0024 JumpIfNot script_0800CF40 - TextboxNoOverlap 0x214d - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x214d + _0807EA94 + _0807E3E8 JumpIfNot script_0800CF40 PlaySound SFX_TASK_COMPLETE _0807F088 0x0024 @@ -115,7 +115,7 @@ script_0800CECE: _0807EB8C SetGlobalFlag 0x0054 Call sub_08060340 - TextboxNoOverlap 0x2147 + MessageNoOverlap 0x2147 script_0800CF02: _0807EA94 Call sub_0807DF50 @@ -132,13 +132,13 @@ script_0800CF20: _0807E864 Call sub_0807DF28 script_0800CF2A: - TextboxNoOverlap 0x2140 - _0807EA94 + MessageNoOverlap 0x2140 + _0807EA94 Call sub_0807DF50 _0807E878 Jump script_0800CF0C script_0800CF3C: - TextboxNoOverlap 0x214a + MessageNoOverlap 0x214a script_0800CF40: _0807EA94 Call sub_0807DF50 @@ -215,7 +215,7 @@ script_0800CFFA: _0807EB74 SetIntVariable 0x00000000 Call sub_0806C028 - TextboxNoOverlap 0x1219 + MessageNoOverlap 0x1219 Jump script_0800D17C script_0800D032: CheckInventory1 0x0041 @@ -225,8 +225,8 @@ script_0800D032: _0807EB74 SetIntVariable 0x00000000 Call sub_0806C028 - TextboxNoOverlapFollowPos 0x125c, 0x0002 - _0807EA94 + MessageFromTargetPos 0x125c, 0x0002 + _0807EA94 StartPlayerScript script_0800D1B4 WaitForSomething2 0x00000008 _0807EB44 0x0002 @@ -236,12 +236,12 @@ script_0800D032: _0807E5F8 0x00000020 StartPlayerScript script_0800D1E0 WaitForSomething2 0x00000008 - TextboxNoOverlapFollowPos 0x125d, 0x0002 + MessageFromTargetPos 0x125d, 0x0002 Jump script_0800D17C script_0800D098: CheckLocalFlag 0x007e JumpIfNot script_0800D0A8 - TextboxNoOverlapFollow 0x123e + MessageFromTarget 0x123e Jump script_0800D17C script_0800D0A8: StartPlayerScript script_0800D190 @@ -253,8 +253,8 @@ script_0800D0A8: _0807EB74 SetIntVariable 0x00000000 Call sub_0806C028 - TextboxNoOverlapFollowPos 0x123d, 0x0002 - _0807EA94 + MessageFromTargetPos 0x123d, 0x0002 + _0807EA94 StartPlayerScript script_0800D1B4 WaitForSomething2 0x00000008 _0807EB44 0x0002 @@ -268,8 +268,8 @@ script_0800D108: PlaySound SFX_F8 _0807E5F8 0x00000010 SetLocalFlag 0x007e - TextboxNoOverlapFollowPos 0x123e, 0x0002 - _0807EA94 + MessageFromTargetPos 0x123e, 0x0002 + _0807EA94 Wait 0x000f _0807E930 0x0009 _0807E5F8 0x00000002 @@ -277,8 +277,8 @@ script_0800D108: _0807E5F8 0x00000002 WaitForSomething2 0x00000004 Wait 0x001e - TextboxNoOverlapFollowPos 0x123f, 0x0002 - _0807EA94 + MessageFromTargetPos 0x123f, 0x0002 + _0807EA94 _0807E5F8 0x00000001 WaitForSomething2 0x00000004 _0807E5F8 0x00000001 diff --git a/data/scripts/script_0800D1E0.inc b/data/scripts/script_0800D1E0.inc index f923cce1..15b082e9 100644 --- a/data/scripts/script_0800D1E0.inc +++ b/data/scripts/script_0800D1E0.inc @@ -4,8 +4,8 @@ SCRIPT_START script_0800D1E0 PlaySound SFX_109 CallWithArg sub_0807F238, 0x000001e2 Call sub_0807F304 - TextboxNoOverlap 0x0502 - _0807EA94 + MessageNoOverlap 0x0502 + _0807EA94 _0807E5F8 0x00000008 Call sub_080791BC SCRIPT_END diff --git a/data/scripts/script_0800D278.inc b/data/scripts/script_0800D278.inc index 35f525df..774708b7 100644 --- a/data/scripts/script_0800D278.inc +++ b/data/scripts/script_0800D278.inc @@ -62,8 +62,8 @@ script_0800D31E: _0807EB74 SetIntVariable 0x00000000 Call sub_0806C028 - TextboxNoOverlapFollow 0x1219 - _0807EA94 + MessageFromTarget 0x1219 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800D31E diff --git a/data/scripts/script_0800D874.inc b/data/scripts/script_0800D874.inc index 7f0ee12a..56f230fa 100644 --- a/data/scripts/script_0800D874.inc +++ b/data/scripts/script_0800D874.inc @@ -15,9 +15,9 @@ script_0800D88E: StartPlayerScript script_0800D92C WaitForSomething2 0x00000001 script_0800D8B0: - _0807E8E4_0 - TextboxNoOverlap 0x1324 - _0807EA94 + _0807E8E4_0 + MessageNoOverlap 0x1324 + _0807EA94 CheckInventory1 0x0017 JumpIf script_0800D8D6 CheckLocalFlag 0x0045 diff --git a/data/scripts/script_0800D954.inc b/data/scripts/script_0800D954.inc index 0fa534e2..662df63e 100644 --- a/data/scripts/script_0800D954.inc +++ b/data/scripts/script_0800D954.inc @@ -17,12 +17,12 @@ script_0800D962: DoPostScriptAction 0x0007 PlaySound SFX_ELEMENT_FLOAT SetEntity0x20 0xffff8000 - TextboxNoOverlap 0x1701 - _0807EA94 + MessageNoOverlap 0x1701 + _0807EA94 _0807E5F8 0x00000004 WaitForSomething2 0x00000002 - TextboxNoOverlap 0x1702 - _0807EA94 + MessageNoOverlap 0x1702 + _0807EA94 SetEntity0x20 0x00010000 _0807E5F8 0x00000004 WaitForSomething2 0x00000002 diff --git a/data/scripts/script_0800DA60.inc b/data/scripts/script_0800DA60.inc index 60e36513..6069f4b8 100644 --- a/data/scripts/script_0800DA60.inc +++ b/data/scripts/script_0800DA60.inc @@ -16,13 +16,13 @@ script_0800DA64: Call sub_0807F5C0 _0807E5F8 0x00000001 WaitForSomething2 0x00000002 - TextboxNoOverlapFollowPos 0x162d, 0x0002 - _0807EA94 + MessageFromTargetPos 0x162d, 0x0002 + _0807EA94 _0807E5F8 0x00000001 Wait 0x001e - TextboxNoOverlapFollowPos 0x162e, 0x0002 - _0807EA94 - _0807E8E4_0 + MessageFromTargetPos 0x162e, 0x0002 + _0807EA94 + _0807E8E4_0 CallWithArg sub_0807F75C, 0x00780138 _0807F0B4 0x0004 CameraTargetPlayer diff --git a/data/scripts/script_0800DB78.inc b/data/scripts/script_0800DB78.inc index ed07cc92..090c75e6 100644 --- a/data/scripts/script_0800DB78.inc +++ b/data/scripts/script_0800DB78.inc @@ -34,8 +34,8 @@ script_0800DBCA: _0807E5F8 0x00000001 StartPlayerScript script_0800DE00 WaitForSomething2 0x00000006 - TextboxNoOverlapFollowPos 0x1643, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1643, 0x0002 + _0807EA94 _0807EB28 0x1645 _0807EA94 Call sub_0807F3F8 diff --git a/data/scripts/script_0800DF24.inc b/data/scripts/script_0800DF24.inc index ab64048a..1afd3357 100644 --- a/data/scripts/script_0800DF24.inc +++ b/data/scripts/script_0800DF24.inc @@ -19,8 +19,8 @@ SCRIPT_START script_0800DF24 Call sub_08066C94 Wait 0x00e9 DoPostScriptAction 0x0007 - TextboxNoOverlapFollowPos 0x162f, 0x0002 - _0807EA94 + MessageFromTargetPos 0x162f, 0x0002 + _0807EA94 PlayBgm BGM_VAATI_REBORN DoPostScriptAction 0x0019 PlaySound SFX_198 diff --git a/data/scripts/script_0800DFE4.inc b/data/scripts/script_0800DFE4.inc index 9ab37ed5..1b159705 100644 --- a/data/scripts/script_0800DFE4.inc +++ b/data/scripts/script_0800DFE4.inc @@ -4,8 +4,8 @@ SCRIPT_START script_0800DFE4 _0807E864 EndBlock StopBgm - TextboxNoOverlapFollowPos 0x1632, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1632, 0x0002 + _0807EA94 SetRoomFlag 0x0003 script_0800DFFE: CheckRoomFlag 0x0000 @@ -19,8 +19,8 @@ script_0800E012: _0807E864 Call sub_0807DF28 SetLocalFlag 0x007b - TextboxNoOverlapFollowPos 0x1639, 0x000c - _0807EA94 + MessageFromTargetPos 0x1639, 0x000c + _0807EA94 Wait 0x0096 PlaySound SFX_EVAPORATE CallWithArg sub_0806DA1C, 0x00000005 diff --git a/data/scripts/script_0800E0BC.inc b/data/scripts/script_0800E0BC.inc index c1432caf..5451a2f8 100644 --- a/data/scripts/script_0800E0BC.inc +++ b/data/scripts/script_0800E0BC.inc @@ -27,8 +27,8 @@ script_0800E0DE: _0807EB8C _0807EB74 Wait 0x000a - TextboxNoOverlap 0x2402 - _0807EA94 + MessageNoOverlap 0x2402 + _0807EA94 SetLocalFlag 0x0093 script_0800E12E: Call sub_080668F0 @@ -37,10 +37,10 @@ script_0800E12E: script_0800E138: CheckEntityInteractType JumpIfNot script_0800E138 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x2402 - _0807EA94 + _0807E864 + _0807EB74 + MessageNoOverlap 0x2402 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800E138 @@ -75,8 +75,8 @@ script_0800E176: _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 Wait 0x000a - TextboxNoOverlap 0x2401 - _0807EA94 + MessageNoOverlap 0x2401 + _0807EA94 SetLocalFlag 0x0094 script_0800E1D0: CallWithArg sub_0807F3D8, 0x00000000 @@ -89,9 +89,9 @@ script_0800E1E0: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlap 0x2401 - _0807EA94 - _0807E878 + MessageNoOverlap 0x2401 + _0807EA94 + _0807E878 Jump script_0800E1E0 SCRIPT_START script_0800E200 BeginBlock @@ -167,10 +167,10 @@ script_0800E312: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - EndBlock - TextboxNoOverlap 0x2404 - _0807EA94 - _0807E878 + EndBlock + MessageNoOverlap 0x2404 + _0807EA94 + _0807E878 Jump script_0800E2AE script_0800E32E: CheckEntityInteractType @@ -178,9 +178,9 @@ script_0800E32E: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlap 0x2403 - _0807EA94 - _0807E878 + MessageNoOverlap 0x2403 + _0807EA94 + _0807E878 Jump script_0800E32E .2byte 0x0000 SCRIPT_START script_0800E350 @@ -221,10 +221,10 @@ script_0800E3BE: script_0800E3C8: CheckEntityInteractType JumpIfNot script_0800E3C8 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x240c - _0807EA94 + _0807E864 + _0807EB74 + MessageNoOverlap 0x240c + _0807EA94 Wait 0x000f _0807F034 0x0053 WaitPlayerAction8 @@ -237,10 +237,10 @@ script_0800E3E8: script_0800E3EE: CheckEntityInteractType JumpIfNot script_0800E3EE - _0807E864 - _0807EB74 - TextboxNoOverlap 0x240d - _0807EA94 + _0807E864 + _0807EB74 + MessageNoOverlap 0x240d + _0807EA94 Wait 0x000f _0807E878 Jump script_0800E3EE @@ -253,10 +253,10 @@ SCRIPT_START script_0800E408 script_0800E41A: CheckEntityInteractType JumpIfNot script_0800E41A - _0807E864 - _0807EB74 - TextboxNoOverlap 0x2406 - _0807EA94 + _0807E864 + _0807EB74 + MessageNoOverlap 0x2406 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800E41A @@ -273,9 +273,9 @@ script_0800E44C: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlap 0x2405 - _0807EA94 - _0807E878 + MessageNoOverlap 0x2405 + _0807EA94 + _0807E878 Jump script_0800E44C SCRIPT_START script_0800E46C BeginBlock @@ -290,9 +290,9 @@ script_0800E484: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlap 0x2407 - _0807EA94 - _0807E878 + MessageNoOverlap 0x2407 + _0807EA94 + _0807E878 Jump script_0800E484 @@ -327,11 +327,11 @@ script_0800E4B6: EndBlock Call sub_0807F3F8 Wait 0x003c - TextboxNoOverlapFollow 0x160c - _0807EA94 + MessageFromTarget 0x160c + _0807EA94 Wait 0x001e - TextboxNoOverlapFollow 0x160d - _0807EA94 + MessageFromTarget 0x160d + _0807EA94 Wait 0x001e _0807EB28 0x160e Wait 0x003c diff --git a/data/scripts/script_0800E58C.inc b/data/scripts/script_0800E58C.inc index f01aa39a..1a6df15e 100644 --- a/data/scripts/script_0800E58C.inc +++ b/data/scripts/script_0800E58C.inc @@ -9,8 +9,8 @@ SCRIPT_START script_0800E58C Wait 0x003c PlaySound SFX_9B Wait 0x001e - TextboxNoOverlap 0x1625 - _0807EA94 + MessageNoOverlap 0x1625 + _0807EA94 Wait 0x003c Call sub_08053C84 SCRIPT_END diff --git a/data/scripts/script_0800E6B0.inc b/data/scripts/script_0800E6B0.inc index 83cdc0f8..1828fe16 100644 --- a/data/scripts/script_0800E6B0.inc +++ b/data/scripts/script_0800E6B0.inc @@ -136,8 +136,8 @@ script_0800E832: JumpIfNot script_0800E832 _0807E864 _0807EB44 0x0004 - BeginBlock - TextboxNoOverlapFollow 0x4501 + BeginBlock + MessageFromTarget 0x4501 CallWithArg sub_0807F854, 0x00010032 CallWithArg sub_0807F854, 0x000200c8 CallWithArg sub_0807F854, 0x00030190 @@ -146,8 +146,8 @@ script_0800E832: _0807EB38 JumpTable script_0800E910, script_0800E8D6, script_0800E8A4, script_0800E872 script_0800E872: - BeginBlock - TextboxNoOverlapFollow 0x4505 + BeginBlock + MessageFromTarget 0x4505 CallWithArg sub_0807F854, 0x00010190 EndBlock _0807EA94 @@ -155,7 +155,7 @@ script_0800E872: JumpIfNot script_0800E908 ModRupees 0xfe70 SetLocalFlag 0x0091 - TextboxNoOverlapFollow 0x4508 - _0807EA94 + MessageFromTarget 0x4508 + _0807EA94 Call sub_0806C578 SCRIPT_END diff --git a/data/scripts/script_0800E8A4.inc b/data/scripts/script_0800E8A4.inc index 5cffcef6..f9465a10 100644 --- a/data/scripts/script_0800E8A4.inc +++ b/data/scripts/script_0800E8A4.inc @@ -1,6 +1,6 @@ SCRIPT_START script_0800E8A4 - BeginBlock - TextboxNoOverlapFollow 0x4504 + BeginBlock + MessageFromTarget 0x4504 CallWithArg sub_0807F854, 0x000100c8 EndBlock _0807EA94 @@ -8,7 +8,7 @@ SCRIPT_START script_0800E8A4 JumpIfNot script_0800E908 ModRupees 0xff38 SetLocalFlag 0x0091 - TextboxNoOverlapFollow 0x4508 - _0807EA94 + MessageFromTarget 0x4508 + _0807EA94 Call sub_0806C588 SCRIPT_END diff --git a/data/scripts/script_0800E8D6.inc b/data/scripts/script_0800E8D6.inc index cfa1d8ff..f5a7cd6c 100644 --- a/data/scripts/script_0800E8D6.inc +++ b/data/scripts/script_0800E8D6.inc @@ -1,6 +1,6 @@ SCRIPT_START script_0800E8D6 - BeginBlock - TextboxNoOverlapFollow 0x4503 + BeginBlock + MessageFromTarget 0x4503 CallWithArg sub_0807F854, 0x00010032 EndBlock _0807EA94 @@ -8,7 +8,7 @@ SCRIPT_START script_0800E8D6 JumpIfNot script_0800E908 ModRupees 0xffce SetLocalFlag 0x0091 - TextboxNoOverlapFollow 0x4508 - _0807EA94 + MessageFromTarget 0x4508 + _0807EA94 Call sub_0806C598 SCRIPT_END diff --git a/data/scripts/script_0800E908.inc b/data/scripts/script_0800E908.inc index d0f8d043..24c3c825 100644 --- a/data/scripts/script_0800E908.inc +++ b/data/scripts/script_0800E908.inc @@ -1,8 +1,8 @@ SCRIPT_START script_0800E908 - TextboxNoOverlapFollow 0x4507 + MessageFromTarget 0x4507 Jump script_0800E914 script_0800E910: - TextboxNoOverlapFollow 0x4509 + MessageFromTarget 0x4509 script_0800E914: _0807EA94 _0807E878 @@ -50,20 +50,20 @@ script_0800E974: StartPlayerScript script_0800E9F4 WaitForSomething2 0x00000001 DoPostScriptAction 0x000a - TextboxNoOverlapFollow 0x4a24 - _0807EA94 + MessageFromTarget 0x4a24 + _0807EA94 _0807E930 0x000a Wait 0x0014 - TextboxNoOverlapFollow 0x4a25 - _0807EA94 + MessageFromTarget 0x4a25 + _0807EA94 _0807E930 0x0000 StartPlayerScript script_0800EA1C WaitForSomething2 0x00000001 SetLocalFlag 0x0074 PlaySound SFX_SECRET Wait 0x00f0 - TextboxNoOverlapFollow 0x4a26 - _0807EA94 + MessageFromTarget 0x4a26 + _0807EA94 SetLocalFlag 0x0075 script_0800E9E4: _0807EA94 diff --git a/data/scripts/script_0800EA54.inc b/data/scripts/script_0800EA54.inc index 74afaf9f..12b58b6c 100644 --- a/data/scripts/script_0800EA54.inc +++ b/data/scripts/script_0800EA54.inc @@ -265,14 +265,14 @@ script_0800EDB6: JumpIf script_0800EE3E Wait 0x000a _0807E5F8 0x00000001 - TextboxNoOverlapFollow 0x4c07 - _0807EA94 + MessageFromTarget 0x4c07 + _0807EA94 _0807E5F8 0x00000010 - TextboxNoOverlapFollow 0x4c08 - _0807EA94 + MessageFromTarget 0x4c08 + _0807EA94 _0807E5F8 0x00000020 - TextboxNoOverlapFollow 0x4c09 - _0807EA94 + MessageFromTarget 0x4c09 + _0807EA94 SetIntVariable 0x00000503 Call sub_0807F420 _0807E5F8 0x00000040 @@ -290,8 +290,8 @@ script_0800EE12: WaitForSomething2 0x00000008 Jump script_0800ED98 script_0800EE3E: - TextboxNoOverlapFollow 0x4c16 - _0807EA94 + MessageFromTarget 0x4c16 + _0807EA94 Call sub_0807DF50 _0807E878 Jump script_0800ED98 @@ -316,14 +316,14 @@ script_0800EE76: JumpIf script_0800EEFE Wait 0x000a _0807E5F8 0x00000001 - TextboxNoOverlapFollow 0x4c07 - _0807EA94 + MessageFromTarget 0x4c07 + _0807EA94 _0807E5F8 0x00000002 - TextboxNoOverlapFollow 0x4c08 - _0807EA94 + MessageFromTarget 0x4c08 + _0807EA94 _0807E5F8 0x00000004 - TextboxNoOverlapFollow 0x4c09 - _0807EA94 + MessageFromTarget 0x4c09 + _0807EA94 SetIntVariable 0x00000503 Call sub_0807F420 _0807E5F8 0x00000008 @@ -341,20 +341,20 @@ script_0800EED2: WaitForSomething2 0x00000040 Jump script_0800EE58 script_0800EEFE: - TextboxNoOverlapFollow 0x4c15 - _0807EA94 + MessageFromTarget 0x4c15 + _0807EA94 Call sub_0807DF50 _0807E878 Jump script_0800EE58 - TextboxNoOverlapFollow 0x4c07 - _0807EA94 + MessageFromTarget 0x4c07 + _0807EA94 _0807E5F8 0x00000012 Wait 0x000a - TextboxNoOverlapFollow 0x4c08 - _0807EA94 + MessageFromTarget 0x4c08 + _0807EA94 _0807E5F8 0x00000024 - TextboxNoOverlapFollow 0x4c09 - _0807EA94 + MessageFromTarget 0x4c09 + _0807EA94 _0807E5F8 0x00000048 Call sub_080791BC SCRIPT_END diff --git a/data/scripts/script_0800EF40.inc b/data/scripts/script_0800EF40.inc index e897f7e2..037fbfc6 100644 --- a/data/scripts/script_0800EF40.inc +++ b/data/scripts/script_0800EF40.inc @@ -10,8 +10,8 @@ script_0800EF50: _0807E864 CheckLocalFlagByOffset 0x0200, 0x006d JumpIf script_0800EF82 - TextboxNoOverlapFollow 0x4d01 - _0807EA94 + MessageFromTarget 0x4d01 + _0807EA94 StartPlayerScript script_0800EF9C WaitForSomething2 0x00000001 Wait 0x000f @@ -19,8 +19,8 @@ script_0800EF50: Jump script_0800EF50 script_0800EF82: SetGlobalFlag 0x001f - TextboxNoOverlapFollow 0x4d02 - _0807EA94 + MessageFromTarget 0x4d02 + _0807EA94 Wait 0x000f _0807E878 script_0800EF92: diff --git a/data/scripts/script_0800EFC0.inc b/data/scripts/script_0800EFC0.inc index 76060064..77fdfb49 100644 --- a/data/scripts/script_0800EFC0.inc +++ b/data/scripts/script_0800EFC0.inc @@ -59,19 +59,19 @@ script_0800F09A: WaitForSomething2 0x00000001 _0807E5F8 0x0000001e WaitForSomething2 0x00000040 - TextboxNoOverlapFollowPos 0x1201, 0x000c - _0807EA94 + MessageFromTargetPos 0x1201, 0x000c + _0807EA94 WaitForSomething2 0x000003c0 - _0807E8E4_0 - TextboxNoOverlapFollowPos 0x1202, 0x000c - _0807EA94 + _0807E8E4_0 + MessageFromTargetPos 0x1202, 0x000c + _0807EA94 _0807F034 0x0067 WaitPlayerAction8 _0807E8E4_0 _0807E5F8 0x00000002 WaitForSomething2 0x00000040 - TextboxNoOverlapFollowPos 0x1203, 0x000c - _0807EA94 + MessageFromTargetPos 0x1203, 0x000c + _0807EA94 _0807E5F8 0x00000002 Call sub_0807DF50 _0807E878 diff --git a/data/scripts/script_0800F184.inc b/data/scripts/script_0800F184.inc index fc4cbc3f..36ca4f79 100644 --- a/data/scripts/script_0800F184.inc +++ b/data/scripts/script_0800F184.inc @@ -32,8 +32,8 @@ script_0800F1E6: _0807E930 0x0008 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlapFollowPos 0x1206, 0x000c - _0807EA94 + MessageFromTargetPos 0x1206, 0x000c + _0807EA94 StartPlayerScript script_0800F33C WaitForSomething2 0x00000400 _0807E878 @@ -48,8 +48,8 @@ script_0800F22A: _0807E930 0x0008 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlapFollowPos 0x1206, 0x000c - _0807EA94 + MessageFromTargetPos 0x1206, 0x000c + _0807EA94 StartPlayerScript script_0800F354 WaitForSomething2 0x00000400 _0807E878 @@ -64,8 +64,8 @@ script_0800F26A: _0807E930 0x0008 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlapFollowPos 0x1206, 0x000c - _0807EA94 + MessageFromTargetPos 0x1206, 0x000c + _0807EA94 StartPlayerScript script_0800F36C WaitForSomething2 0x00000400 _0807E878 @@ -80,8 +80,8 @@ script_0800F2AA: _0807E930 0x0008 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlapFollowPos 0x1206, 0x000c - _0807EA94 + MessageFromTargetPos 0x1206, 0x000c + _0807EA94 StartPlayerScript script_0800F384 WaitForSomething2 0x00000400 _0807E878 @@ -97,9 +97,9 @@ script_0800F2EA: _0807E864 _0807EB74 _0807E930 0x0008 - TextboxNoOverlapFollowPos 0x1208, 0x000c - _0807EA94 - _0807E878 + MessageFromTargetPos 0x1208, 0x000c + _0807EA94 + _0807E878 Jump script_0800F1E6 script_0800F314: EndBlock diff --git a/data/scripts/script_0800F39C.inc b/data/scripts/script_0800F39C.inc index e5f3f939..dda4ca39 100644 --- a/data/scripts/script_0800F39C.inc +++ b/data/scripts/script_0800F39C.inc @@ -22,12 +22,12 @@ script_0800F3EA: BeginBlock CheckEntityInteractType JumpIfNot script_0800F402 - EndBlock - _0807E864 - _0807EB74 - TextboxNoOverlap 0x1237 - _0807EA94 - _0807E878 + EndBlock + _0807E864 + _0807EB74 + MessageNoOverlap 0x1237 + _0807EA94 + _0807E878 script_0800F402: TestBit 0x00000004 JumpIfNot script_0800F3EA diff --git a/data/scripts/script_0800F430.inc b/data/scripts/script_0800F430.inc index d66d02c1..acf631a4 100644 --- a/data/scripts/script_0800F430.inc +++ b/data/scripts/script_0800F430.inc @@ -21,12 +21,12 @@ script_0800F478: BeginBlock CheckEntityInteractType JumpIfNot script_0800F490 - EndBlock - _0807E864 - _0807EB74 - TextboxNoOverlap 0x1238 - _0807EA94 - _0807E878 + EndBlock + _0807E864 + _0807EB74 + MessageNoOverlap 0x1238 + _0807EA94 + _0807E878 script_0800F490: TestBit 0x00000008 JumpIfNot script_0800F478 diff --git a/data/scripts/script_0800F4C4.inc b/data/scripts/script_0800F4C4.inc index edbecc19..99b156af 100644 --- a/data/scripts/script_0800F4C4.inc +++ b/data/scripts/script_0800F4C4.inc @@ -21,12 +21,12 @@ script_0800F50C: BeginBlock CheckEntityInteractType JumpIfNot script_0800F524 - EndBlock - _0807E864 - _0807EB74 - TextboxNoOverlap 0x1239 - _0807EA94 - _0807E878 + EndBlock + _0807E864 + _0807EB74 + MessageNoOverlap 0x1239 + _0807EA94 + _0807E878 script_0800F524: TestBit 0x00000010 JumpIfNot script_0800F50C diff --git a/data/scripts/script_0800F554.inc b/data/scripts/script_0800F554.inc index 521ca3b4..0bd91b70 100644 --- a/data/scripts/script_0800F554.inc +++ b/data/scripts/script_0800F554.inc @@ -64,8 +64,8 @@ script_0800F604: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000008 - TextboxNoOverlap 0x2511 - _0807EA94 + MessageNoOverlap 0x2511 + _0807EA94 Wait 0x000f _0807E878 Jump script_0800F604 @@ -135,10 +135,10 @@ script_0800F6A0: .endif .endif JumpIf script_0800F6C4 - TextboxNoOverlap 0x2512 + MessageNoOverlap 0x2512 Jump script_0800F6C8 script_0800F6C4: - TextboxNoOverlap 0x251f + MessageNoOverlap 0x251f script_0800F6C8: _0807EA94 Wait 0x000f diff --git a/data/scripts/script_0800F724.inc b/data/scripts/script_0800F724.inc index 501b6814..8ea80527 100644 --- a/data/scripts/script_0800F724.inc +++ b/data/scripts/script_0800F724.inc @@ -54,8 +54,8 @@ SCRIPT_START script_0800F73C Call sub_0807F5C0 WaitForSomething2 0x00000001 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x2501, 0x0000 - _0807EA94 + MessageFromTargetPos 0x2501, 0x0000 + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 _0807F0B4 0x0004 @@ -70,8 +70,8 @@ SCRIPT_START script_0800F73C WaitForSomething2 0x00000001 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x2503, 0x000e - _0807EA94 + MessageFromTargetPos 0x2503, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 Call sub_0807DF50 @@ -83,8 +83,8 @@ SCRIPT_START script_0800F73C WaitForSomething2 0x00000001 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x2504, 0x000e - _0807EA94 + MessageFromTargetPos 0x2504, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 Call sub_0807DF50 @@ -96,8 +96,8 @@ SCRIPT_START script_0800F73C WaitForSomething2 0x00000001 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 - TextboxNoOverlapFollowPos 0x2505, 0x000e - _0807EA94 + MessageFromTargetPos 0x2505, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 Call sub_0807DF50 @@ -111,8 +111,8 @@ SCRIPT_START script_0800F73C _0807E8E4_0 Call sub_0807F3F8 Wait 0x003c - TextboxNoOverlapFollowPos 0x1021, 0x000e - _0807EA94 + MessageFromTargetPos 0x1021, 0x000e + _0807EA94 StartPlayerScript script_0800FAE4 SetEntityPositionRelative 0x00f0, 0x0258 _0807F0B4 0x0001 @@ -120,45 +120,45 @@ SCRIPT_START script_0800F73C Wait 0x001e Call sub_08063C2C WaitForSomething2 0x00000001 - TextboxNoOverlapFollowPos 0x1022, 0x000e - _0807EA94 - _0807E8E4_0 + MessageFromTargetPos 0x1022, 0x000e + _0807EA94 + _0807E8E4_0 Call sub_08063C14 Call sub_08094CDC Wait 0x001e - TextboxNoOverlapFollowPos 0x1023, 0x000e - _0807EA94 + MessageFromTargetPos 0x1023, 0x000e + _0807EA94 Call sub_08063C14 Call sub_08094DD8 Wait 0x001e - TextboxNoOverlapFollowPos 0x1024, 0x000e - _0807EA94 + MessageFromTargetPos 0x1024, 0x000e + _0807EA94 Call sub_08063C14 Call sub_08094D34 Wait 0x001e - TextboxNoOverlapFollowPos 0x1025, 0x000e - _0807EA94 + MessageFromTargetPos 0x1025, 0x000e + _0807EA94 Call sub_08063C5C - TextboxNoOverlapFollowPos 0x1026, 0x000e - _0807EA94 + MessageFromTargetPos 0x1026, 0x000e + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 _0807E8E4_1 Call sub_08063C2C - TextboxNoOverlapFollowPos 0x1027, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1027, 0x0000 + _0807EA94 Call sub_08063C74 Wait 0x003c Call sub_08063C14 - _0807E8E4_0 - TextboxNoOverlapFollowPos 0x1028, 0x000e - _0807EA94 - _0807E8E4_1 - TextboxNoOverlapFollowPos 0x1029, 0x0000 - _0807EA94 - _0807E8E4_0 - TextboxNoOverlapFollowPos 0x102a, 0x000e - _0807EA94 + _0807E8E4_0 + MessageFromTargetPos 0x1028, 0x000e + _0807EA94 + _0807E8E4_1 + MessageFromTargetPos 0x1029, 0x0000 + _0807EA94 + _0807E8E4_0 + MessageFromTargetPos 0x102a, 0x000e + _0807EA94 Call sub_08063C14 Call sub_08094D70 PlaySound SFX_103 @@ -172,8 +172,8 @@ SCRIPT_START script_0800F73C _0807E8E4_1 Call sub_0807F3F8 Wait 0x003c - TextboxNoOverlapFollowPos 0x102b, 0x0000 - _0807EA94 + MessageFromTargetPos 0x102b, 0x0000 + _0807EA94 _0807F034 0x000d WaitPlayerAction8 Call sub_0806DC3C @@ -185,8 +185,8 @@ SCRIPT_START script_0800F73C Wait 0x00b7 SetIntVariable 0x00000000 Call sub_0807F5B0 - TextboxNoOverlapFollowPos 0x102c, 0x0000 - _0807EA94 + MessageFromTargetPos 0x102c, 0x0000 + _0807EA94 CallWithArg sub_0807F29C, 0x00000000 Call sub_0806DC58 _0807F0B4 0x0004 diff --git a/data/scripts/script_0800FD0C.inc b/data/scripts/script_0800FD0C.inc index 3ecbe8f3..c424f576 100644 --- a/data/scripts/script_0800FD0C.inc +++ b/data/scripts/script_0800FD0C.inc @@ -33,8 +33,8 @@ script_0800FD1A: JumpIf script_0800FD5C _0807E864 Call sub_0807F9A4 - TextboxNoOverlapFollowPos 0x2506, 0x0000 - _0807EA94 + MessageFromTargetPos 0x2506, 0x0000 + _0807EA94 StartPlayerScript script_0800FD80 WaitForSomething2 0x00000008 _0807E878 @@ -45,8 +45,8 @@ script_0800FD50: script_0800FD5C: _0807E864 Call sub_0807F9A4 - TextboxNoOverlapFollowPos 0x106c, 0x0000 - _0807EA94 + MessageFromTargetPos 0x106c, 0x0000 + _0807EA94 StartPlayerScript script_0800FD80 WaitForSomething2 0x00000008 _0807E878 diff --git a/data/scripts/script_0800FF74.inc b/data/scripts/script_0800FF74.inc index 4d54243d..0d3ac1a2 100644 --- a/data/scripts/script_0800FF74.inc +++ b/data/scripts/script_0800FF74.inc @@ -77,8 +77,8 @@ script_0800FFCC: CallWithArg sub_0807F3D8, 0x00000008 CheckInventory1 0x0048 JumpIf script_0800FFF8 - TextboxNoOverlap 0x3401 - _0807EA94 + MessageNoOverlap 0x3401 + _0807EA94 Jump script_08010060 script_0800FFF8: .ifdef JP @@ -95,12 +95,12 @@ script_0800FFF8: .endif .endif JumpIfNot script_0801000A - TextboxNoOverlap 0x340b - _0807EA94 + MessageNoOverlap 0x340b + _0807EA94 Jump script_08010060 script_0801000A: - TextboxNoOverlap 0x3402 - _0807EA94 + MessageNoOverlap 0x3402 + _0807EA94 Jump script_08010060 script_08010014: EndBlock @@ -110,8 +110,8 @@ script_08010014: _0807EB74 CallWithArg sub_0807F3D8, 0x00000008 PlaySound SFX_TASK_COMPLETE - TextboxNoOverlap 0x340a - _0807EA94 + MessageNoOverlap 0x340a + _0807EA94 _0807EB44 0x0004 CallWithArg sub_0807F3D8, 0x0000000c SetEntitySpeed 0x0100 @@ -149,8 +149,8 @@ script_08010090: _0807E864 _0807EB74 CallWithArg sub_080672B0, 0x00000004 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 + MessageFromTarget 0x0a01 + _0807EA94 Wait 0x000f _0807E878 _0807EB44 0x0004 diff --git a/data/scripts/script_080100C8.inc b/data/scripts/script_080100C8.inc index eae8c627..629171b7 100644 --- a/data/scripts/script_080100C8.inc +++ b/data/scripts/script_080100C8.inc @@ -36,11 +36,11 @@ SCRIPT_START script_08010120 script_08010132: CheckEntityInteractType JumpIfNot script_08010132 - _0807E864 - _0807EB74 - TextboxNoOverlapFollow 0x4f22 - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageFromTarget 0x4f22 + _0807EA94 + _0807E878 Jump script_08010132 SCRIPT_START script_08010148 BeginBlock @@ -55,9 +55,9 @@ script_0801015A: _0807EB74 CheckRoomFlag 0x0001 JumpIf script_0801019E - TextboxNoOverlapFollowPos 0x3001, 0x0000 - _0807EA94 - _0807E3E8 + MessageFromTargetPos 0x3001, 0x0000 + _0807EA94 + _0807E3E8 JumpIfNot script_080101A6 Call sub_080A1608 _0807EA94 @@ -81,8 +81,8 @@ script_080101AC: Call sub_080A1270 _0807E864 Call sub_0807DF28 - TextboxNoOverlapFollowPos 0x3004, 0x0007 - _0807EA94 + MessageFromTargetPos 0x3004, 0x0007 + _0807EA94 StopBgm _0807E778 0x0004 DoFade5 diff --git a/data/scripts/script_08010264.inc b/data/scripts/script_08010264.inc index a86eb227..9ebf8099 100644 --- a/data/scripts/script_08010264.inc +++ b/data/scripts/script_08010264.inc @@ -211,13 +211,13 @@ script_08010502: CheckRoomFlag 0x000e JumpIf script_0801052E SetRoomFlag 0x000e - TextboxNoOverlap 0x2b10 - _0807EA94 + MessageNoOverlap 0x2b10 + _0807EA94 script_0801052E: Call sub_080634E4 JumpTable script_08010544, script_08010558, script_08010570, script_08010570, script_0801054C, script_08010564, script_08010570 script_08010544: - TextboxNoOverlap 0x2b0d + MessageNoOverlap 0x2b0d Jump script_080105E0 script_0801054C: CheckGlobalFlag 0x003d @@ -243,24 +243,24 @@ script_08010570: JumpIfNot script_080105CC Call sub_08063504 JumpIf script_080105D4 - TextboxNoOverlap 0x2b07 - _0807EA94 + MessageNoOverlap 0x2b07 + _0807EA94 CallWithArg sub_0807F800, 0x00000000 - WaitPlayerAction8 - _0807EA94 - TextboxNoOverlap 0x2b0c + WaitPlayerAction8 + _0807EA94 + MessageNoOverlap 0x2b0c Jump script_080105E0 script_080105C4: - TextboxNoOverlap 0x2b09 + MessageNoOverlap 0x2b09 Jump script_080105E0 script_080105CC: - TextboxNoOverlap 0x2b0a + MessageNoOverlap 0x2b0a Jump script_080105E0 script_080105D4: - TextboxNoOverlap 0x2b0b + MessageNoOverlap 0x2b0b Jump script_080105E0 script_080105DC: - TextboxNoOverlap 0x2b0e + MessageNoOverlap 0x2b0e script_080105E0: _0807EA94 Call sub_0807DF50 @@ -276,11 +276,11 @@ script_080105E0: script_08010602: CheckEntityInteractType JumpIfNot script_08010602 - _0807E864 - _0807EB74 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageFromTarget 0x0a01 + _0807EA94 + _0807E878 _0807EB44 0x0004 Jump script_08010602 SCRIPT_START script_0801061C @@ -330,9 +330,9 @@ script_08010686: _0807EB74 HasRoomItemForSale Call sub_0807F77C - TextboxNoOverlapFollowTable 0x3c08, 0x3c09 - _0807EA94 - _0807E878 + MessageFromTargetTable 0x3c08, 0x3c09 + _0807EA94 + _0807E878 _0807EB44 0x0004 Jump script_08010686 .2byte 0x0000 @@ -352,7 +352,7 @@ script_080106BE: DoPostScriptAction 0x0000 HasRoomItemForSale JumpIf script_080106E0 - TextboxNoOverlap 0x3c07 + MessageNoOverlap 0x3c07 Jump script_08010726 script_080106E0: Call sub_08062EB8 @@ -363,14 +363,14 @@ script_080106E0: _0807EA94 BuyItem 0x0000, 0x0000 JumpIf script_0801070C - TextboxNoOverlap 0x3c04 + MessageNoOverlap 0x3c04 Jump script_08010726 script_0801070C: WaitPlayerAction8 ModHealth 0x0008 Call sub_08062EDC JumpIf script_08010724 - TextboxNoOverlap 0x3c06 + MessageNoOverlap 0x3c06 Jump script_08010726 script_08010724: WaitPlayerAction8 @@ -401,12 +401,12 @@ script_08010746: JumpIfNot script_08010786 HasRupees 0x00c8 JumpIf script_08010778 - TextboxNoOverlap 0x4008 + MessageNoOverlap 0x4008 Jump script_08010786 script_08010778: ModRupees 0xff38 Call sub_08062E14 - TextboxNoOverlap 0x4007 + MessageNoOverlap 0x4007 script_08010786: EndBlock _0807EA94 @@ -470,13 +470,13 @@ script_08010804: JumpIfNot script_08010858 CheckGlobalFlag 0x0041 JumpIfNot script_08010850 - TextboxNoOverlap 0x3f39 + MessageNoOverlap 0x3f39 Jump script_080108BA script_08010850: - TextboxNoOverlap 0x2c1b + MessageNoOverlap 0x2c1b Jump script_080108BA script_08010858: - TextboxNoOverlap 0x2c1a + MessageNoOverlap 0x2c1a Jump script_080108BA script_08010860: EndBlock @@ -498,7 +498,7 @@ script_08010860: JumpIfNot script_080108AA CheckGlobalFlag 0x0044 JumpIfNot script_080108AA - TextboxNoOverlap 0x2c21 + MessageNoOverlap 0x2c21 Jump script_080108B2 script_080108AA: .ifdef USA @@ -508,7 +508,7 @@ script_080108AA: SetLocalFlag 0x00fa .endif .endif - TextboxNoOverlap 0x2c20 + MessageNoOverlap 0x2c20 script_080108B2: _0807EA94 Call sub_0807F83C diff --git a/data/scripts/script_08010BB4.inc b/data/scripts/script_08010BB4.inc index 8535ddbb..a3e0af1a 100644 --- a/data/scripts/script_08010BB4.inc +++ b/data/scripts/script_08010BB4.inc @@ -24,16 +24,16 @@ SCRIPT_START script_08010BEC StartPlayerScript script_08011074 WaitForSomething2 0x00000400 _0807F078 0x0034, 0x0002 - TextboxNoOverlapFollowPos 0x1036, 0x000c - _0807EA94 + MessageFromTargetPos 0x1036, 0x000c + _0807EA94 _0807E5F8 0x00000010 WaitForSomething2 0x00000020 - TextboxNoOverlapFollowPos 0x1037, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1037, 0x0002 + _0807EA94 _0807E5F8 0x00000010 WaitForSomething2 0x00000020 - TextboxNoOverlapFollowPos 0x1038, 0x000c - _0807EA94 + MessageFromTargetPos 0x1038, 0x000c + _0807EA94 StopBgm _0807E778 0x0004 DoFade5 @@ -69,8 +69,8 @@ SCRIPT_START script_08010BEC _0807E8E4_1 _0807E5F8 0x00000004 WaitForSomething2 0x00000008 - TextboxNoOverlapFollowPos 0x1039, 0x000c - _0807EA94 + MessageFromTargetPos 0x1039, 0x000c + _0807EA94 PlayBgm BGM_CASTLE_TOURNAMENT _0807E8E4_2 _0807E5F8 0x00000004 @@ -82,8 +82,8 @@ SCRIPT_START script_08010BEC Wait 0x012c _0807E5F8 0x00000004 WaitForSomething2 0x00000008 - TextboxNoOverlapFollowPos 0x103a, 0x000c - _0807EA94 + MessageFromTargetPos 0x103a, 0x000c + _0807EA94 SetEntityPositionRelative 0x01f8, 0x01c0 _0807F0B4 0x0004 Wait 0x0078 @@ -100,8 +100,8 @@ SCRIPT_START script_08010BEC PlaySound SFX_9B _0807E5F8 0x00000100 WaitForSomething2 0x00000200 - TextboxNoOverlapFollowPos 0x1043, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1043, 0x0000 + _0807EA94 PlayBgm BGM_VAATI_THEME _0807E5F8 0x00000100 WaitForSomething2 0x00000200 @@ -116,8 +116,8 @@ SCRIPT_START script_08010BEC WaitForSomething2 0x00005000 _0807E5F8 0x00028000 WaitForSomething2 0x00050000 - TextboxNoOverlapFollowPos 0x1044, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1044, 0x0000 + _0807EA94 SetEntityPositionRelative 0x01f8, 0x0098 StopBgm Wait 0x003c diff --git a/data/scripts/script_08010E5A.inc b/data/scripts/script_08010E5A.inc index 20cde3ce..9c65b510 100644 --- a/data/scripts/script_08010E5A.inc +++ b/data/scripts/script_08010E5A.inc @@ -47,9 +47,9 @@ SCRIPT_START script_08010E5A _0807E5F8 0x00000100 WaitForSomething2 0x00000020 WaitForSomething2 0x00000200 - TextboxNoOverlapFollowPos 0x1045, 0x000c - _0807EA94 - TextboxNoOverlapFollowPos 0x1046, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1045, 0x000c + _0807EA94 + MessageFromTargetPos 0x1046, 0x0000 + _0807EA94 CallWithArg CreateManager36, 0x00000002 _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_08010F84.inc b/data/scripts/script_08010F84.inc index e9d967cd..d0bd4361 100644 --- a/data/scripts/script_08010F84.inc +++ b/data/scripts/script_08010F84.inc @@ -4,8 +4,8 @@ SCRIPT_START script_08010F84 WaitForSomething2 0x00000200 StartPlayerScript script_080110BC WaitForSomething2 0x00000400 - TextboxNoOverlapFollowPos 0x1047, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1047, 0x0000 + _0807EA94 Call sub_0806DC3C Call sub_080791BC CallWithArg sub_0807F244, 0x0000000d @@ -28,12 +28,12 @@ SCRIPT_START script_08010F84 WaitForSomething2 0x00000020 StopBgm Wait 0x003c - TextboxNoOverlapFollowPos 0x104a, 0x0000 - _0807EA94 + MessageFromTargetPos 0x104a, 0x0000 + _0807EA94 _0807E5F8 0x00000100 WaitForSomething2 0x00000200 - TextboxNoOverlapFollowPos 0x1049, 0x0000 - _0807EA94 + MessageFromTargetPos 0x1049, 0x0000 + _0807EA94 SetEntityPositionRelative 0x01f8, 0x0098 Wait 0x0078 _0807E5F8 0x00000100 diff --git a/data/scripts/script_0801194C.inc b/data/scripts/script_0801194C.inc index 295f3d62..d88825af 100644 --- a/data/scripts/script_0801194C.inc +++ b/data/scripts/script_0801194C.inc @@ -24,10 +24,10 @@ script_0801197C: CallWithArg sub_0807F3D8, 0x00000000 CheckGlobalFlag 0x0015 JumpIf script_080119A0 - TextboxNoOverlapFollow 0x103d + MessageFromTarget 0x103d Jump script_080119A4 script_080119A0: - TextboxNoOverlapFollow 0x103f + MessageFromTarget 0x103f script_080119A4: _0807EA94 Wait 0x000f @@ -87,9 +87,9 @@ script_08011A44: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlapFollow 0x1320 - _0807EA94 - _0807E878 + MessageFromTarget 0x1320 + _0807EA94 + _0807E878 Jump script_08011A44 SCRIPT_START script_08011A64 BeginBlock @@ -106,9 +106,9 @@ script_08011A7C: CallWithArg sub_0807F3D8, 0x00000000 CallWithArg sub_080644B4, 0x00000006 JumpIf script_08011AFA - TextboxNoOverlapFollow 0x1320 - _0807EA94 - _0807E878 + MessageFromTarget 0x1320 + _0807EA94 + _0807E878 Jump script_08011A7C .2byte 0x0000 BeginBlock @@ -123,9 +123,9 @@ script_08011AC4: _0807E864 _0807EB74 CallWithArg sub_0807F3D8, 0x00000000 - TextboxNoOverlapFollow 0x1322 - _0807EA94 - _0807E878 + MessageFromTarget 0x1322 + _0807EA94 + _0807E878 Jump script_08011AC4 SCRIPT_START script_08011AE4 @@ -135,8 +135,8 @@ SCRIPT_START script_08011AE4 Call sub_0807F9A4 Call sub_0807DF28 script_08011AFA: - TextboxNoOverlapFollowPos 0x1321, 0x0007 - _0807EA94 + MessageFromTargetPos 0x1321, 0x0007 + _0807EA94 .ifdef JP SetLocalFlag 0x0011 .else diff --git a/data/scripts/script_08011B20.inc b/data/scripts/script_08011B20.inc index e81b6e16..958cb9f1 100644 --- a/data/scripts/script_08011B20.inc +++ b/data/scripts/script_08011B20.inc @@ -1,9 +1,9 @@ SCRIPT_START script_08011B20 _0807E864 Call sub_0807DF28 - TextboxNoOverlapFollowPos 0x1320, 0x000c - _0807EA94 - _0807E878 + MessageFromTargetPos 0x1320, 0x000c + _0807EA94 + _0807E878 Call sub_0807DF50 DoPostScriptAction 0x0006 SCRIPT_END diff --git a/data/scripts/script_08011B40.inc b/data/scripts/script_08011B40.inc index fecdf231..e17bd540 100644 --- a/data/scripts/script_08011B40.inc +++ b/data/scripts/script_08011B40.inc @@ -11,9 +11,9 @@ SCRIPT_START script_08011B40 _0807EB44 0x0006 DoPostScriptAction 0x0004 Wait 0x003c - _0807EB8C - TextboxNoOverlap 0x3d07 - _0807EA94 + _0807EB8C + MessageNoOverlap 0x3d07 + _0807EA94 _0807EB44 0x0004 ClearGlobalFlag 0x0050 Call sub_0807DF50 @@ -21,11 +21,11 @@ SCRIPT_START script_08011B40 script_08011B84: CheckEntityInteractType JumpIfNot script_08011B84 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x3d01 - _0807EA94 - _0807E3E8 + _0807E864 + _0807EB74 + MessageNoOverlap 0x3d01 + _0807EA94 + _0807E3E8 JumpIf script_08011BA4 script_08011B9A: _0807E878 @@ -36,13 +36,13 @@ script_08011BA4: JumpIf script_08011BBC DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x3d05 + MessageNoOverlap 0x3d05 Jump script_08011B9A script_08011BBC: ModRupees 0xfff6 Wait 0x001e - TextboxNoOverlap 0x3d06 - _0807EA94 + MessageNoOverlap 0x3d06 + _0807EA94 CallWithArg sub_0806C2A0, 0x00000000 WaitFor_2 Wait 0x003c diff --git a/data/scripts/script_08011C7C.inc b/data/scripts/script_08011C7C.inc index 2a833792..0cf1a0d0 100644 --- a/data/scripts/script_08011C7C.inc +++ b/data/scripts/script_08011C7C.inc @@ -16,9 +16,9 @@ script_08011C9A: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4515 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4515 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_08011C9A @@ -35,9 +35,9 @@ script_08011CC2: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x3105 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3105 + _0807EA94 + _0807E3E8 JumpIf script_08011D0E _0807E878 _0807EB44 0x0004 @@ -50,8 +50,8 @@ script_08011D00: _0807EB74 DoPostScriptAction 0x0000 script_08011D0E: - TextboxNoOverlap 0x3108 - _0807EA94 + MessageNoOverlap 0x3108 + _0807EA94 SetGlobalFlag 0x002b _0807E878 _0807EB44 0x0004 @@ -76,9 +76,9 @@ script_08011D46: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4513 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4513 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_08011D46 @@ -95,9 +95,9 @@ script_08011D6E: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x3103 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3103 + _0807EA94 + _0807E3E8 JumpIf script_08011DBA _0807E878 _0807EB44 0x0004 @@ -110,8 +110,8 @@ script_08011DAC: _0807EB74 DoPostScriptAction 0x0000 script_08011DBA: - TextboxNoOverlap 0x3106 - _0807EA94 + MessageNoOverlap 0x3106 + _0807EA94 SetGlobalFlag 0x002c _0807E878 _0807EB44 0x0004 @@ -136,9 +136,9 @@ script_08011DF2: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4514 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4514 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_08011DF2 @@ -155,9 +155,9 @@ script_08011E1A: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x3104 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3104 + _0807EA94 + _0807E3E8 JumpIf script_08011E66 _0807E878 _0807EB44 0x0004 @@ -170,8 +170,8 @@ script_08011E58: _0807EB74 DoPostScriptAction 0x0000 script_08011E66: - TextboxNoOverlap 0x3107 - _0807EA94 + MessageNoOverlap 0x3107 + _0807EA94 SetGlobalFlag 0x002d _0807E878 _0807EB44 0x0004 @@ -200,13 +200,13 @@ script_08011E96: DoPostScriptAction 0x0000 CheckGlobalFlag 0x0048 JumpIf script_08011ECC - TextboxNoOverlap 0x4524 - _0807EA94 + MessageNoOverlap 0x4524 + _0807EA94 Jump script_08011ED8 script_08011ECC: - TextboxNoOverlap 0x3111 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3111 + _0807EA94 + _0807E3E8 JumpIf script_08011EF4 script_08011ED8: _0807E878 @@ -220,8 +220,8 @@ script_08011EE6: _0807EB74 DoPostScriptAction 0x0000 script_08011EF4: - TextboxNoOverlap 0x3114 - _0807EA94 + MessageNoOverlap 0x3114 + _0807EA94 SetGlobalFlag 0x002e _0807E878 _0807EB44 0x0004 @@ -249,13 +249,13 @@ script_08011F22: DoPostScriptAction 0x0000 CheckGlobalFlag 0x0048 JumpIf script_08011F58 - TextboxNoOverlap 0x4522 - _0807EA94 + MessageNoOverlap 0x4522 + _0807EA94 Jump script_08011F64 script_08011F58: - TextboxNoOverlap 0x310f - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x310f + _0807EA94 + _0807E3E8 JumpIf script_08011F80 script_08011F64: _0807E878 @@ -269,8 +269,8 @@ script_08011F72: _0807EB74 DoPostScriptAction 0x0000 script_08011F80: - TextboxNoOverlap 0x3112 - _0807EA94 + MessageNoOverlap 0x3112 + _0807EA94 SetGlobalFlag 0x002f _0807E878 _0807EB44 0x0004 @@ -298,13 +298,13 @@ script_08011FAE: DoPostScriptAction 0x0000 CheckGlobalFlag 0x0048 JumpIf script_08011FE4 - TextboxNoOverlap 0x4523 - _0807EA94 + MessageNoOverlap 0x4523 + _0807EA94 Jump script_08011FF0 script_08011FE4: - TextboxNoOverlap 0x3110 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3110 + _0807EA94 + _0807E3E8 JumpIf script_0801200C script_08011FF0: _0807E878 @@ -318,8 +318,8 @@ script_08011FFE: _0807EB74 DoPostScriptAction 0x0000 script_0801200C: - TextboxNoOverlap 0x3113 - _0807EA94 + MessageNoOverlap 0x3113 + _0807EA94 SetGlobalFlag 0x0030 _0807E878 _0807EB44 0x0004 @@ -342,25 +342,25 @@ script_0801203A: DoPostScriptAction 0x0000 CheckLocalFlag 0x0094 JumpIf script_0801205E - TextboxNoOverlap 0x3122 - _0807EA94 + MessageNoOverlap 0x3122 + _0807EA94 SetLocalFlag 0x0094 Jump script_0801209E script_0801205E: _0807E48C 0x0031 JumpIfNot script_08012070 - TextboxNoOverlap 0x3123 - _0807EA94 + MessageNoOverlap 0x3123 + _0807EA94 Jump script_0801209E script_08012070: - TextboxNoOverlap 0x3124 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3124 + _0807EA94 + _0807E3E8 JumpIfNot script_0801209E _0807E48C 0x0020 JumpIfNot script_0801209A - TextboxNoOverlap 0x3125 - _0807EA94 + MessageNoOverlap 0x3125 + _0807EA94 _0807F034 0x0031 WaitPlayerAction8 .ifdef USA @@ -376,7 +376,7 @@ script_08012070: .endif Jump script_0801209E script_0801209A: - TextboxNoOverlap 0x3127 + MessageNoOverlap 0x3127 script_0801209E: _0807EA94 _0807E878 @@ -400,25 +400,25 @@ script_080120C6: DoPostScriptAction 0x0000 CheckLocalFlag 0x0095 JumpIf script_080120EA - TextboxNoOverlap 0x3116 - _0807EA94 + MessageNoOverlap 0x3116 + _0807EA94 SetLocalFlag 0x0095 Jump script_0801212A script_080120EA: _0807E48C 0x002f JumpIfNot script_080120FC - TextboxNoOverlap 0x3117 - _0807EA94 + MessageNoOverlap 0x3117 + _0807EA94 Jump script_0801212A script_080120FC: - TextboxNoOverlap 0x3118 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x3118 + _0807EA94 + _0807E3E8 JumpIfNot script_0801212A _0807E48C 0x0020 JumpIfNot script_08012126 - TextboxNoOverlap 0x3119 - _0807EA94 + MessageNoOverlap 0x3119 + _0807EA94 _0807F034 0x002f WaitPlayerAction8 .ifdef USA @@ -434,7 +434,7 @@ script_080120FC: .endif Jump script_0801212A script_08012126: - TextboxNoOverlap 0x311b + MessageNoOverlap 0x311b script_0801212A: _0807EA94 _0807E878 @@ -458,25 +458,25 @@ script_08012152: DoPostScriptAction 0x0000 CheckLocalFlag 0x0096 JumpIf script_08012176 - TextboxNoOverlap 0x311c - _0807EA94 + MessageNoOverlap 0x311c + _0807EA94 SetLocalFlag 0x0096 Jump script_080121B6 script_08012176: _0807E48C 0x0030 JumpIfNot script_08012188 - TextboxNoOverlap 0x311d - _0807EA94 + MessageNoOverlap 0x311d + _0807EA94 Jump script_080121B6 script_08012188: - TextboxNoOverlap 0x311e - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x311e + _0807EA94 + _0807E3E8 JumpIfNot script_080121B6 _0807E48C 0x0020 JumpIfNot script_080121B2 - TextboxNoOverlap 0x311f - _0807EA94 + MessageNoOverlap 0x311f + _0807EA94 _0807F034 0x0030 WaitPlayerAction8 .ifdef USA @@ -492,7 +492,7 @@ script_08012188: .endif Jump script_080121B6 script_080121B2: - TextboxNoOverlap 0x3121 + MessageNoOverlap 0x3121 script_080121B6: _0807EA94 _0807E878 @@ -514,9 +514,9 @@ script_080121DE: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4527 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4527 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_080121DE @@ -533,9 +533,9 @@ script_08012216: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4525 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4525 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_08012216 @@ -552,9 +552,9 @@ script_0801224E: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x4526 - _0807EA94 - _0807E878 + MessageNoOverlap 0x4526 + _0807EA94 + _0807E878 _0807EB44 0x0004 DoPostScriptAction 0x0001 Jump script_0801224E @@ -579,9 +579,9 @@ script_08012298: _0807EB74 _0807E864 Call sub_08061FD8 - TextboxNoOverlapFollow 0x2302 - _0807EA94 - _0807E878 + MessageFromTarget 0x2302 + _0807EA94 + _0807E878 SetGlobalFlag 0x001e Jump script_08012284 script_080122BA: @@ -598,9 +598,9 @@ script_080122CE: _0807EB74 _0807E864 Call sub_08061FD8 - TextboxNoOverlapFollow 0x2303 - _0807EA94 - _0807E878 + MessageFromTarget 0x2303 + _0807EA94 + _0807E878 Jump script_080122BA script_080122EC: EndBlock diff --git a/data/scripts/script_0801232C.inc b/data/scripts/script_0801232C.inc index 313b7c64..2f81b0e5 100644 --- a/data/scripts/script_0801232C.inc +++ b/data/scripts/script_0801232C.inc @@ -7,10 +7,10 @@ SCRIPT_START script_0801232C script_08012338: CheckEntityInteractType JumpIfNot script_08012338 - _0807EB74 - _0807E864 - TextboxNoOverlapFollow 0x2304 - _0807EA94 + _0807EB74 + _0807E864 + MessageFromTarget 0x2304 + _0807EA94 CheckLocalFlag 0x0042 JumpIf script_0801235A SetLocalFlag 0x0042 @@ -48,8 +48,8 @@ script_08012368: _0807E8E4_0 StartPlayerScript script_08012410 WaitForSomething2 0x00000001 - TextboxNoOverlap 0x1402 - _0807EA94 + MessageNoOverlap 0x1402 + _0807EA94 StopBgm SetEntity0x20 0x00010000 Wait 0x003c diff --git a/data/scripts/script_08012430.inc b/data/scripts/script_08012430.inc index 675ecb48..f6af7e93 100644 --- a/data/scripts/script_08012430.inc +++ b/data/scripts/script_08012430.inc @@ -44,9 +44,9 @@ script_0801248A: Call sub_0807F9A4 Call sub_0807DF28 StartPlayerScript script_08012AB0 - TextboxNoOverlapFollowPos 0x1101, 0x0007 - _0807EA94 - CameraTargetPlayer + MessageFromTargetPos 0x1101, 0x0007 + _0807EA94 + CameraTargetPlayer _0807E778 0x0004 _0807E80C 0x00000000 WaitFor_2 diff --git a/data/scripts/script_080126FC.inc b/data/scripts/script_080126FC.inc index 2fa50394..5deb674a 100644 --- a/data/scripts/script_080126FC.inc +++ b/data/scripts/script_080126FC.inc @@ -7,15 +7,15 @@ SCRIPT_START script_080126FC WaitForSomething2 0x00000004 _0807E930 0x0022 Call sub_0807F3C8 - TextboxNoOverlapFollowPos 0x1102, 0x000c - _0807EA94 + MessageFromTargetPos 0x1102, 0x000c + _0807EA94 _0807E930 0x0020 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0021 Call sub_0807F3C8 - TextboxNoOverlapFollowPos 0x1103, 0x000c - _0807EA94 + MessageFromTargetPos 0x1103, 0x000c + _0807EA94 _0807E930 0x0020 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 @@ -25,30 +25,30 @@ SCRIPT_START script_080126FC WaitForSomething2 0x00000004 DoPostScriptAction 0x0011 _0807E930 0x001c - TextboxNoOverlapFollowPos 0x1105, 0x000c - _0807EA94 + MessageFromTargetPos 0x1105, 0x000c + _0807EA94 _0807E930 0x0020 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0022 Call sub_0807F3C8 - TextboxNoOverlapFollowPos 0x1106, 0x000c - _0807EA94 + MessageFromTargetPos 0x1106, 0x000c + _0807EA94 _0807E930 0x001c Call sub_0806D96C - TextboxNoOverlapFollowPos 0x1107, 0x000c - _0807EA94 + MessageFromTargetPos 0x1107, 0x000c + _0807EA94 _0807E930 0x0020 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0021 Call sub_0807F3C8 - TextboxNoOverlapFollowPos 0x1108, 0x000c - _0807EA94 + MessageFromTargetPos 0x1108, 0x000c + _0807EA94 _0807E930 0x001c Call sub_0806D96C - TextboxNoOverlapFollowPos 0x1109, 0x000c - _0807EA94 + MessageFromTargetPos 0x1109, 0x000c + _0807EA94 _0807E930 0x0020 DoPostScriptAction 0x000a _0807E9D4 @@ -64,8 +64,8 @@ script_080127F2: _0807E864 Call sub_0806D944 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x1114, 0x000c - _0807EA94 + MessageFromTargetPos 0x1114, 0x000c + _0807EA94 _0807E930 0x0020 _0807E878 Jump script_080127F2 @@ -82,34 +82,34 @@ script_08012824: WaitForSomething2 0x00000004 Call sub_0806D944 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110a, 0x000c - _0807EA94 + MessageFromTargetPos 0x110a, 0x000c + _0807EA94 _0807E930 0x001f _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110b, 0x000c - _0807EA94 + MessageFromTargetPos 0x110b, 0x000c + _0807EA94 _0807E930 0x001f _0807E5F8 0x00000008 WaitForSomething2 0x00000004 DoPostScriptAction 0x0004 Wait 0x003c _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110c, 0x000c - _0807EA94 + MessageFromTargetPos 0x110c, 0x000c + _0807EA94 _0807E930 0x001f _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110d, 0x000c - _0807EA94 + MessageFromTargetPos 0x110d, 0x000c + _0807EA94 _0807E930 0x001f _0807E5F8 0x00000008 WaitForSomething2 0x00000004 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110e, 0x000c - _0807EA94 + MessageFromTargetPos 0x110e, 0x000c + _0807EA94 _0807E930 0x0018 SetEntitySpeed 0x0080 Call sub_0806D908 @@ -130,9 +130,9 @@ script_08012904: script_08012920: _0807E864 _0807E930 0x0010 - EndBlock - TextboxNoOverlapFollowPos 0x1115, 0x000c - _0807EA94 + EndBlock + MessageFromTargetPos 0x1115, 0x000c + _0807EA94 _0807E930 0x0018 _0807E878 Jump script_08012904 @@ -144,7 +144,7 @@ script_0801293A: _0807EB8C Call sub_0806D944 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x110f, 0x000c + MessageFromTargetPos 0x110f, 0x000c _0807E930 0x0018 SetEntitySpeed 0x0080 Call sub_0806D908 @@ -166,9 +166,9 @@ script_08012984: script_080129A0: _0807E864 _0807E930 0x0010 - EndBlock - TextboxNoOverlapFollowPos 0x1115, 0x000c - _0807EA94 + EndBlock + MessageFromTargetPos 0x1115, 0x000c + _0807EA94 _0807E930 0x0018 _0807E878 Jump script_08012984 @@ -180,7 +180,7 @@ script_080129BA: _0807EB8C Call sub_0806D944 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x1110, 0x000c + MessageFromTargetPos 0x1110, 0x000c _0807E930 0x0018 SetEntitySpeed 0x0080 Call sub_0806D908 @@ -203,9 +203,9 @@ script_08012A08: script_08012A24: _0807E864 _0807E930 0x0010 - EndBlock - TextboxNoOverlapFollowPos 0x1115, 0x000c - _0807EA94 + EndBlock + MessageFromTargetPos 0x1115, 0x000c + _0807EA94 _0807E930 0x0018 _0807E878 Jump script_08012A08 @@ -219,7 +219,7 @@ script_08012A3E: _0807EB8C Call sub_0806D944 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x1111, 0x000c + MessageFromTargetPos 0x1111, 0x000c _0807E930 0x0018 SetEntitySpeed 0x0080 Call sub_0806D8A0 diff --git a/data/scripts/script_08012C68.inc b/data/scripts/script_08012C68.inc index 6f60275d..22678ad8 100644 --- a/data/scripts/script_08012C68.inc +++ b/data/scripts/script_08012C68.inc @@ -8,10 +8,10 @@ SCRIPT_START script_08012C68 script_08012C7E: CheckEntityInteractType JumpIfNot script_08012C7E - _0807E864 - _0807E8E4_0 - TextboxNoOverlapFollow 0x111d - _0807EA94 + _0807E864 + _0807E8E4_0 + MessageFromTarget 0x111d + _0807EA94 SetGlobalFlag 0x0022 _0807E878 Jump script_08012C7E diff --git a/data/scripts/script_08012F0C.inc b/data/scripts/script_08012F0C.inc index 8174dc07..405d2900 100644 --- a/data/scripts/script_08012F0C.inc +++ b/data/scripts/script_08012F0C.inc @@ -19,17 +19,17 @@ script_08012F48: script_08012F50: Call sub_0806A96C JumpIfNot script_08012F50 - _0807E864 - TextboxNoOverlap 0x4401 - _0807EA94 + _0807E864 + MessageNoOverlap 0x4401 + _0807EA94 SetLocalFlag 0x0061 _0807E878 _0807E908 0x0001 script_08012F6C: Call sub_0806A96C JumpIfNot script_08012F6C - TextboxNoOverlap 0x4402 - _0807EA94 + MessageNoOverlap 0x4402 + _0807EA94 _0807E908 0x0001 Jump script_08012F6C SCRIPT_END diff --git a/data/scripts/script_08012F86.inc b/data/scripts/script_08012F86.inc index 24041dde..ec2ff144 100644 --- a/data/scripts/script_08012F86.inc +++ b/data/scripts/script_08012F86.inc @@ -27,9 +27,9 @@ script_08012FD2: CheckInventory1 0x0038 JumpIf script_08013006 script_08012FFA: - _0807E944 - TextboxNoOverlap 0x4403 - _0807EA94 + _0807E944 + MessageNoOverlap 0x4403 + _0807EA94 Jump script_08012FFA script_08013006: _0807E944 @@ -47,39 +47,39 @@ script_08013006: Wait 0x003c DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x4404 - _0807EA94 + MessageNoOverlap 0x4404 + _0807EA94 Wait 0x001e DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x440e - _0807EA94 + MessageNoOverlap 0x440e + _0807EA94 Wait 0x001e Call sub_0806A9E8 _0807E930 0x000f Wait 0x00f0 - TextboxNoOverlap 0x4405 - _0807EA94 + MessageNoOverlap 0x4405 + _0807EA94 _0807E5F8 0x00000200 _0807F034 0x0015 - WaitPlayerAction8 - _0807EB8C - TextboxNoOverlap 0x4406 - _0807EA94 + WaitPlayerAction8 + _0807EB8C + MessageNoOverlap 0x4406 + _0807EA94 _0807E908 0x0001 Call sub_0807DF50 _0807E878 script_0801308A: Call sub_0806A96C JumpIfNot script_0801308A - TextboxNoOverlap 0x4407 - _0807EA94 + MessageNoOverlap 0x4407 + _0807EA94 _0807E908 0x0001 script_0801309E: Call sub_0806A96C JumpIfNot script_0801309E - TextboxNoOverlap 0x440d - _0807EA94 + MessageNoOverlap 0x440d + _0807EA94 _0807E908 0x0001 Jump script_0801308A script_080130B6: diff --git a/data/scripts/script_0801319A.inc b/data/scripts/script_0801319A.inc index f7e6a70f..d3b10195 100644 --- a/data/scripts/script_0801319A.inc +++ b/data/scripts/script_0801319A.inc @@ -30,9 +30,9 @@ SCRIPT_START script_080131AC Call sub_080536B8 _0807E864 Call sub_0807DF28 - WaitFor_2 - TextboxNoOverlapFollowPos 0x1602, 0x000c - _0807EA94 + WaitFor_2 + MessageFromTargetPos 0x1602, 0x000c + _0807EA94 _0807E5F8 0x00000008 WaitForSomething2 0x00000010 _0807E5F8 0x00000020 @@ -45,8 +45,8 @@ SCRIPT_START script_080131AC StartPlayerScript script_08013378 _0807E5F8 0x00000020 WaitForSomething2 0x00000042 - TextboxNoOverlapFollowPos 0x1603, 0x000c - _0807EA94 + MessageFromTargetPos 0x1603, 0x000c + _0807EA94 _0807E5F8 0x00000020 WaitForSomething2 0x00000040 SetFadeMask 0xffff7fff @@ -58,8 +58,8 @@ SCRIPT_START script_080131AC Wait 0x003c CameraTargetPlayer Call sub_0807F5C0 - TextboxNoOverlapFollowPos 0x1604, 0x0007 - _0807EA94 + MessageFromTargetPos 0x1604, 0x0007 + _0807EA94 SetFadeMask 0xffffffff _0807E778 0x0004 DoFade4 diff --git a/data/scripts/script_080134DC.inc b/data/scripts/script_080134DC.inc index 63bf844d..a355d9e0 100644 --- a/data/scripts/script_080134DC.inc +++ b/data/scripts/script_080134DC.inc @@ -66,8 +66,8 @@ script_080134F8: DoFade6 WaitFor_2 PlaySound SFX_109 - TextboxNoOverlapFollowPos 0x0503, 0x000c - _0807EA94 + MessageFromTargetPos 0x0503, 0x000c + _0807EA94 _0807E5F8 0x00040000 CallWithArg CreateManager36, 0x00000001 _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_08013720.inc b/data/scripts/script_08013720.inc index e8018f05..b7321df8 100644 --- a/data/scripts/script_08013720.inc +++ b/data/scripts/script_08013720.inc @@ -69,8 +69,8 @@ script_0801373C: DoFade6 WaitFor_2 PlaySound SFX_109 - TextboxNoOverlapFollowPos 0x0504, 0x000c - _0807EA94 + MessageFromTargetPos 0x0504, 0x000c + _0807EA94 _0807E5F8 0x00040000 SetLocalFlag 0x007b Call sub_08053250 diff --git a/data/scripts/script_080138B4.inc b/data/scripts/script_080138B4.inc index 93b64077..e2cce8fe 100644 --- a/data/scripts/script_080138B4.inc +++ b/data/scripts/script_080138B4.inc @@ -74,8 +74,8 @@ script_080138D0: DoFade6 WaitFor_2 PlaySound SFX_109 - TextboxNoOverlapFollowPos 0x0505, 0x000c - _0807EA94 + MessageFromTargetPos 0x0505, 0x000c + _0807EA94 _0807E5F8 0x00040000 .ifndef EU _0807F0B4 0x0002 diff --git a/data/scripts/script_08014248.inc b/data/scripts/script_08014248.inc index 1108937b..9801bd81 100644 --- a/data/scripts/script_08014248.inc +++ b/data/scripts/script_08014248.inc @@ -24,10 +24,10 @@ script_0801427C: script_08014298: CheckEntityInteractType JumpIfNot script_08014298 - _0807E864 - TextboxNoOverlapFollowPos 0x0647, 0x000c - _0807EA94 - _0807E878 + _0807E864 + MessageFromTargetPos 0x0647, 0x000c + _0807EA94 + _0807E878 Jump script_08014298 .2byte 0x0000 .endif diff --git a/data/scripts/script_080142B0.inc b/data/scripts/script_080142B0.inc index 1a69e91f..aa5eac36 100644 --- a/data/scripts/script_080142B0.inc +++ b/data/scripts/script_080142B0.inc @@ -29,8 +29,8 @@ script_080142C4: Wait 0x000a _0807E930 0x0002 Wait 0x001e - TextboxNoOverlap 0x2c12 - _0807EA94 + MessageNoOverlap 0x2c12 + _0807EA94 Wait 0x0014 _0807E930 0x0004 _0807E878 @@ -53,8 +53,8 @@ script_08014330: Wait 0x001e _0807E930 0x0001 Wait 0x001e - TextboxNoOverlap 0x2c13 - _0807EA94 + MessageNoOverlap 0x2c13 + _0807EA94 Wait 0x0014 _0807E930 0x0004 _0807E908 0x0001 diff --git a/data/scripts/script_08014384.inc b/data/scripts/script_08014384.inc index ea9f4c78..7503513a 100644 --- a/data/scripts/script_08014384.inc +++ b/data/scripts/script_08014384.inc @@ -11,7 +11,7 @@ SCRIPT_START script_08014384 _0807EA94 _0807EB8C Wait 0x001e - TextboxNoOverlapVar + MessageNoOverlapVar script_080143AC: _0807EA94 Wait 0x001e diff --git a/data/scripts/script_080143C0.inc b/data/scripts/script_080143C0.inc index b95fc900..a908f1fe 100644 --- a/data/scripts/script_080143C0.inc +++ b/data/scripts/script_080143C0.inc @@ -6,9 +6,9 @@ SCRIPT_START script_080143C0 _0807E930 0x0001 Call sub_080654EC Wait 0x003c - TextboxNoOverlap 0x2c16 - _0807EA94 - _0807E3E8 + MessageNoOverlap 0x2c16 + _0807EA94 + _0807E3E8 JumpIf script_080143FA SetIntVariable 0x00000002 Call sub_08065528 @@ -16,22 +16,22 @@ SCRIPT_START script_080143C0 script_080143FA: Call sub_080654EC Wait 0x001e - TextboxNoOverlap 0x2c18 - _0807EA94 + MessageNoOverlap 0x2c18 + _0807EA94 Wait 0x000a SetIntVariable 0x00000000 Call sub_08065528 _0807F034 0x0036 - WaitPlayerAction8 - TextboxNoOverlap 0x2c19 - _0807EA94 + WaitPlayerAction8 + MessageNoOverlap 0x2c19 + _0807EA94 SetIntVariable 0x00000303 Call sub_0807F420 .ifndef EU Wait 0x001e - _0807EB8C - TextboxNoOverlap 0x2c22 - _0807EA94 + _0807EB8C + MessageNoOverlap 0x2c22 + _0807EA94 .endif script_0801443E: _0807E930 0x0004 diff --git a/data/scripts/script_08014450.inc b/data/scripts/script_08014450.inc index d9c80760..f6f2473f 100644 --- a/data/scripts/script_08014450.inc +++ b/data/scripts/script_08014450.inc @@ -12,23 +12,23 @@ script_08014462: _0807E930 0x0008 Wait 0x0020 _0807E930 0x0002 - TextboxNoOverlapFollow 0x4202 - TextboxNoOverlapFollow 0x4203 - _0807EA94 - _0807E3E8 + MessageFromTarget 0x4202 + MessageFromTarget 0x4203 + _0807EA94 + _0807E3E8 JumpIfNot script_080144F0 DoPostScriptAction 0x0001 Wait 0x008c DoPostScriptAction 0x0000 HasRupees 0x000a JumpIf script_080144A2 - TextboxNoOverlapFollow 0x4204 + MessageFromTarget 0x4204 Jump script_080144FC script_080144A2: Call sub_0806E250 JumpIfNot script_080144B8 - TextboxNoOverlapFollow 0x420b - _0807EB38 + MessageFromTarget 0x420b + _0807EB38 JumpTable script_080144B8, script_080144C0 script_080144B8: ClearLocalFlag 0x0093 @@ -44,7 +44,7 @@ script_080144C0: .endif script_080144C8: ModRupees 0xfff6 - TextboxNoOverlapFollow 0x420c + MessageFromTarget 0x420c PlaySound SFX_10C Wait 0x0018 SetRoomFlag 0x0000 diff --git a/data/scripts/script_080145B0.inc b/data/scripts/script_080145B0.inc index e5890fd0..266ab97d 100644 --- a/data/scripts/script_080145B0.inc +++ b/data/scripts/script_080145B0.inc @@ -17,8 +17,8 @@ script_080145C2: Wait 0x000c _0807EB8C .endif - TextboxNoOverlapFollowPos 0x432e, 0x000c - _0807EA94 + MessageFromTargetPos 0x432e, 0x000c + _0807EA94 .ifdef EU Wait 0x0018 .endif diff --git a/data/scripts/script_080145E8.inc b/data/scripts/script_080145E8.inc index 5a62b9cc..edd2babc 100644 --- a/data/scripts/script_080145E8.inc +++ b/data/scripts/script_080145E8.inc @@ -16,8 +16,8 @@ script_080145F8: Wait 0x0018 _0807E8E4_3 _0807EB44 0x0002 - TextboxNoOverlapFollowPos 0x432b, 0x000c - _0807EA94 + MessageFromTargetPos 0x432b, 0x000c + _0807EA94 Wait 0x0018 _0807E878 Jump script_080145F8 @@ -102,7 +102,7 @@ script_080146E2: SetRoomFlag 0x000a Jump script_0801473C script_0801472E_2: - TextboxNoOverlapFollowPos 0x432f, 0x000c + MessageFromTargetPos 0x432f, 0x000c Jump script_080147CE @ TODO script_08014816 .else CheckRoomFlag 0x0004 @@ -111,9 +111,9 @@ script_0801472E_2: JumpIfNot script_0801463A CheckLocalFlag 0x005e JumpIf script_080146A0 - _0807E864 - _0807EB8C - TextboxNoOverlapFollowPos 0x432b, 0x000c + _0807E864 + _0807EB8C + MessageFromTargetPos 0x432b, 0x000c Jump script_080147CE script_08014672: .ifdef DEMO_JP @@ -144,7 +144,7 @@ script_080146A0: _0807E930 0x0002 CheckGlobalFlag 0x0059 JumpIfNot script_080146C6 - TextboxNoOverlapFollowPos 0x432f, 0x000c + MessageFromTargetPos 0x432f, 0x000c Jump script_080147CE script_080146C6: CheckRoomFlag 0x0004 @@ -161,7 +161,7 @@ script_080146C6: .endif script_080146F4: - TextboxNoOverlapFollowPos 0x431e, 0x000c + MessageFromTargetPos 0x431e, 0x000c Jump script_080147CE script_080146FE: .ifdef EU @@ -174,11 +174,11 @@ script_080146FE: script_0801474A: SetRoomFlag 0x000a .endif - TextboxNoOverlapFollowPos 0x4305, 0x000c - _0807EA94 + MessageFromTargetPos 0x4305, 0x000c + _0807EA94 _0807E3BC 0x0001 JumpIfNot script_080147C4 - TextboxNoOverlapFollowPos 0x4306, 0x000c + MessageFromTargetPos 0x4306, 0x000c Jump script_0801473C script_08014720: .ifdef EU @@ -214,7 +214,7 @@ script_08014754: .else SetRoomFlag 0x0004 .endif - TextboxNoOverlapFollowPos 0x431e, 0x000c + MessageFromTargetPos 0x431e, 0x000c Jump script_080147CE script_08014770: .ifdef EU @@ -252,7 +252,7 @@ script_080147C4: .else SetRoomFlag 0x0009 .endif - TextboxNoOverlapFollowPos 0x4307, 0x000c + MessageFromTargetPos 0x4307, 0x000c script_080147CE: _0807EA94 .ifdef EU diff --git a/data/scripts/script_08014804.inc b/data/scripts/script_08014804.inc index 82f48f9d..6ab2315f 100644 --- a/data/scripts/script_08014804.inc +++ b/data/scripts/script_08014804.inc @@ -9,8 +9,8 @@ SCRIPT_START script_08014804 Wait 0x0010 CheckLocalFlag 0x0093 JumpIf script_080148B6 - TextboxNoOverlapFollowPos 0x4215, 0x000c - _0807E878 + MessageFromTargetPos 0x4215, 0x000c + _0807E878 script_0801482E: TestBit 0x00000001 JumpIf script_08014862 @@ -22,8 +22,8 @@ script_0801482E: _0807E930 0x0008 Wait 0x0020 _0807E930 0x0002 - TextboxNoOverlapFollowPos 0x4215, 0x000c - _0807E878 + MessageFromTargetPos 0x4215, 0x000c + _0807E878 Jump script_0801482E script_08014862: _0807E930 0x0008 @@ -49,8 +49,8 @@ script_0801488E: Wait 0x0020 _0807E930 0x0002 script_080148B6: - TextboxNoOverlapFollowPos 0x4216, 0x000c - _0807E878 + MessageFromTargetPos 0x4216, 0x000c + _0807E878 Jump script_0801488E script_080148C2: _0807E930 0x0008 diff --git a/data/scripts/script_08014A80.inc b/data/scripts/script_08014A80.inc index dd674139..458e2c90 100644 --- a/data/scripts/script_08014A80.inc +++ b/data/scripts/script_08014A80.inc @@ -7,17 +7,17 @@ SCRIPT_START script_08014A80 DoPostScriptAction 0x0004 _0807E5F8 0x00000002 WaitForSomething2 0x00000001 - TextboxNoOverlap 0x2f0a - _0807EA94 + MessageNoOverlap 0x2f0a + _0807EA94 _0807E5F8 0x00000002 script_08014AAC: _0807E30C JumpIfNot script_08014AAC - _0807E864 - _0807EB74 - TextboxNoOverlap 0x2f0a - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageNoOverlap 0x2f0a + _0807EA94 + _0807E878 Jump script_08014AAC .2byte 0x0000 SCRIPT_START script_08014AC4 @@ -36,10 +36,10 @@ script_08014AD2: CheckLocalFlag 0x0064 JumpIf script_08014AFE SetLocalFlag 0x0064 - TextboxNoOverlap 0x2f0b + MessageNoOverlap 0x2f0b Jump script_08014B02 script_08014AFE: - TextboxNoOverlap 0x2f0c + MessageNoOverlap 0x2f0c script_08014B02: _0807EA94 Wait 0x000f diff --git a/data/scripts/script_08014B34.inc b/data/scripts/script_08014B34.inc index 0d97b17f..d62ae07d 100644 --- a/data/scripts/script_08014B34.inc +++ b/data/scripts/script_08014B34.inc @@ -12,11 +12,11 @@ script_08014B48: JumpIf script_08014B70 CheckEntityInteractType JumpIfNot script_08014B48 - EndBlock - _0807E864 - _0807EB74 - TextboxNoOverlap 0x2f01 - _0807EA94 + EndBlock + _0807E864 + _0807EB74 + MessageNoOverlap 0x2f01 + _0807EA94 Wait 0x000f _0807E878 Jump script_08014B48 @@ -56,15 +56,15 @@ script_08014BF2: CheckLocalFlag 0x0065 JumpIf script_08014C1C SetLocalFlag 0x0065 - TextboxNoOverlap 0x2f07 - _0807EA94 + MessageNoOverlap 0x2f07 + _0807EA94 SetIntVariable 0x00000064 _0807F034 0x003f WaitPlayerAction8 Jump script_08014C22 script_08014C1C: - TextboxNoOverlap 0x2f08 - _0807EA94 + MessageNoOverlap 0x2f08 + _0807EA94 script_08014C22: Wait 0x000f _0807E878 @@ -90,14 +90,14 @@ script_08014C56: CheckLocalFlag 0x0066 JumpIf script_08014C7C SetLocalFlag 0x0066 - TextboxNoOverlap 0x2f0d - _0807EA94 + MessageNoOverlap 0x2f0d + _0807EA94 _0807F034 0x000a WaitPlayerAction8 Jump script_08014C82 script_08014C7C: - TextboxNoOverlap 0x2f09 - _0807EA94 + MessageNoOverlap 0x2f09 + _0807EA94 script_08014C82: Wait 0x000f _0807E878 diff --git a/data/scripts/script_08014CDC.inc b/data/scripts/script_08014CDC.inc index 7eea160e..71fa1f1f 100644 --- a/data/scripts/script_08014CDC.inc +++ b/data/scripts/script_08014CDC.inc @@ -10,9 +10,9 @@ SCRIPT_START script_08014CDC EndBlock WaitForSomething2 0x00000001 Call sub_08066E08 - _0807E864 - TextboxNoOverlapFollowPos 0x1010, 0x000c - _0807EA94 + _0807E864 + MessageFromTargetPos 0x1010, 0x000c + _0807EA94 _0807E5F8 0x00000002 script_08014D1E: EndBlock @@ -23,8 +23,8 @@ script_08014D1E: _0807E864 Call sub_0807F9A4 Call sub_0807DF28 - TextboxNoOverlap 0x1012 - _0807EA94 + MessageNoOverlap 0x1012 + _0807EA94 _0807EC64 0x0040 _0807EB44 0x0004 Call sub_08066E08 @@ -36,8 +36,8 @@ script_08014D60: JumpIf script_08014D60 _0807E864 Call sub_0807DF28 - TextboxNoOverlap 0x1013 - _0807EA94 + MessageNoOverlap 0x1013 + _0807EA94 _0807EC64 0x0040 _0807EB44 0x0004 DoPostScriptAction 0x0000 @@ -50,8 +50,8 @@ script_08014D96: _0807E864 Call sub_0807F9A4 Call sub_0807DF28 - TextboxNoOverlap 0x1014 - _0807EA94 + MessageNoOverlap 0x1014 + _0807EA94 _0807EC64 0x0018 .ifdef JP SetLocalFlag 0x006b diff --git a/data/scripts/script_08014E14.inc b/data/scripts/script_08014E14.inc index 6db6e5f8..2de18b8c 100644 --- a/data/scripts/script_08014E14.inc +++ b/data/scripts/script_08014E14.inc @@ -38,14 +38,14 @@ script_08014E64: _0807E48C 0x0020 JumpIfNot script_08014EB8 CallWithArg sub_0807F800, 0x00000022 - WaitPlayerAction8 - TextboxNoOverlap 0x0a04 + WaitPlayerAction8 + MessageNoOverlap 0x0a04 Jump script_08014EBC script_08014EB0: - TextboxNoOverlap 0x0a03 + MessageNoOverlap 0x0a03 Jump script_08014EBC script_08014EB8: - TextboxNoOverlap 0x0a02 + MessageNoOverlap 0x0a02 script_08014EBC: _0807EA94 Call sub_0807DF50 @@ -62,11 +62,11 @@ SCRIPT_START script_08014ECC script_08014EE0: CheckEntityInteractType JumpIfNot script_08014EE0 - _0807E864 - _0807EB74 - TextboxNoOverlap 0x200d - _0807EA94 - _0807E878 + _0807E864 + _0807EB74 + MessageNoOverlap 0x200d + _0807EA94 + _0807E878 Jump script_08014EE0 .2byte 0x0000 SCRIPT_START script_08014EF8 @@ -82,9 +82,9 @@ script_08014F0C: _0807E864 _0807EB74 DoPostScriptAction 0x0000 - TextboxNoOverlap 0x200e - _0807EA94 - _0807E878 + MessageNoOverlap 0x200e + _0807EA94 + _0807E878 _0807EB44 0x0004 _0807E930 0x000a Jump script_08014F0C @@ -104,8 +104,8 @@ script_08014F4A: Call sub_0807DF28 _0807EB74 DoPostScriptAction 0x0000 - BeginBlock - TextboxNoOverlap 0x3b0b + BeginBlock + MessageNoOverlap 0x3b0b CallWithArg sub_0807F854, 0x00010064 EndBlock _0807EA94 @@ -117,14 +117,14 @@ script_08014F4A: JumpIfNot script_08014FA2 ModRupees 0xff9c _0807F034 0x0022 - WaitPlayerAction8 - TextboxNoOverlap 0x3b11 + WaitPlayerAction8 + MessageNoOverlap 0x3b11 Jump script_08014FA6 script_08014F9A: - TextboxNoOverlap 0x3b0e + MessageNoOverlap 0x3b0e Jump script_08014FA6 script_08014FA2: - TextboxNoOverlap 0x3b0f + MessageNoOverlap 0x3b0f script_08014FA6: _0807EA94 Call sub_0807DF50 @@ -148,8 +148,8 @@ script_08014FCC: CameraTargetEntity StartPlayerScript script_080152B4 WaitForSomething2 0x00000001 - TextboxNoOverlapFollowPos 0x1301, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1301, 0x0002 + _0807EA94 Call sub_0807F3F8 Wait 0x003c _0807E5F8 0x00000002 @@ -158,13 +158,13 @@ script_08014FCC: WaitForSomething2 0x00000004 PlayBgm BGM_VAATI_THEME _0807EB28 0x1302 - _0807EA94 - TextboxNoOverlapFollowPos 0x1303, 0x0002 - _0807EA94 + _0807EA94 + MessageFromTargetPos 0x1303, 0x0002 + _0807EA94 _0807EB28 0x1304 - _0807EA94 - TextboxNoOverlapFollowPos 0x1305, 0x0002 - _0807EA94 + _0807EA94 + MessageFromTargetPos 0x1305, 0x0002 + _0807EA94 _0807E5F8 0x00000002 WaitForSomething2 0x00000004 _0807EB28 0x1306 diff --git a/data/scripts/script_08015390.inc b/data/scripts/script_08015390.inc index bfa9a257..953164f8 100644 --- a/data/scripts/script_08015390.inc +++ b/data/scripts/script_08015390.inc @@ -7,8 +7,8 @@ SCRIPT_START script_08015390 Call sub_0806D944 WaitForSomething2 0x00000008 _0807E930 0x0010 - TextboxNoOverlapFollowPos 0x1314, 0x000c - _0807EA94 + MessageFromTargetPos 0x1314, 0x000c + _0807EA94 _0807E930 0x0018 Call sub_0806D8A0 script_080153C2: diff --git a/data/scripts/script_080153EC.inc b/data/scripts/script_080153EC.inc index 5d469635..5fc90ba9 100644 --- a/data/scripts/script_080153EC.inc +++ b/data/scripts/script_080153EC.inc @@ -17,20 +17,20 @@ SCRIPT_START script_080153EC WaitForSomething2 0x00001100 _0807F0B4 0x0004 SetEntityPositionRelative 0x0078, 0x0090 - TextboxNoOverlapFollowPos 0x1330, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1330, 0x0002 + _0807EA94 _0807E5F8 0x00008000 WaitForSomething2 0x00010000 _0807E5F8 0x00000880 WaitForSomething2 0x00001000 Wait 0x003c - TextboxNoOverlapFollowPos 0x130d, 0x0002 - _0807EA94 - TextboxNoOverlapFollowPos 0x130e, 0x000c - _0807EA94 - TextboxNoOverlapFollowPos 0x130f, 0x0002 - _0807EA94 - TextboxNoOverlapFollowPos 0x1310, 0x000c - _0807EA94 + MessageFromTargetPos 0x130d, 0x0002 + _0807EA94 + MessageFromTargetPos 0x130e, 0x000c + _0807EA94 + MessageFromTargetPos 0x130f, 0x0002 + _0807EA94 + MessageFromTargetPos 0x1310, 0x000c + _0807EA94 CallWithArg CreateManager36, 0x00000001 _0807F0C8 0xffff, 0x0000 diff --git a/data/scripts/script_0801548E.inc b/data/scripts/script_0801548E.inc index 70537368..7ca27f15 100644 --- a/data/scripts/script_0801548E.inc +++ b/data/scripts/script_0801548E.inc @@ -5,16 +5,16 @@ SCRIPT_START script_0801548E CallWithArg sub_0807FB28, 0x00000003 _0807E5F8 0x00048000 WaitForSomething2 0x00090000 - TextboxNoOverlapFollowPos 0x1311, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1311, 0x0002 + _0807EA94 _0807E5F8 0x00008000 WaitForSomething2 0x00010000 _0807E5F8 0x00048000 WaitForSomething2 0x00010000 CallWithArg DeleteManager36, 0x00000001 _0807F0C8 0x0000, 0x0000 - TextboxNoOverlapFollowPos 0x1312, 0x000c - _0807EA94 + MessageFromTargetPos 0x1312, 0x000c + _0807EA94 _0807E5F8 0x00000800 WaitForSomething2 0x00001000 StopBgm diff --git a/data/scripts/script_080157AC.inc b/data/scripts/script_080157AC.inc index 209a89aa..e218446c 100644 --- a/data/scripts/script_080157AC.inc +++ b/data/scripts/script_080157AC.inc @@ -32,8 +32,8 @@ script_080157DA: WaitForSomething2 0x00000010 _0807E5F8 0x00000001 WaitForSomething2 0x00000002 - TextboxNoOverlapFollowPos 0x1066, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1066, 0x0002 + _0807EA94 _0807E5F8 0x00000001 WaitForSomething2 0x00000002 Call sub_0807DF50 @@ -54,13 +54,13 @@ script_08015888: CameraTargetEntity StartPlayerScript script_08015938 WaitForSomething2 0x00000010 - TextboxNoOverlapFollowPos 0x106a, 0x000c - _0807EA94 + MessageFromTargetPos 0x106a, 0x000c + _0807EA94 _0807E5F8 0x00000008 Wait 0x0078 - _0807E8E4_2 - TextboxNoOverlapFollowPos 0x1068, 0x0002 - _0807EA94 + _0807E8E4_2 + MessageFromTargetPos 0x1068, 0x0002 + _0807EA94 _0807E5F8 0x00000001 WaitForSomething2 0x00000002 .ifdef JP diff --git a/data/scripts/script_08015958.inc b/data/scripts/script_08015958.inc index 9b2ce9e8..4992ef17 100644 --- a/data/scripts/script_08015958.inc +++ b/data/scripts/script_08015958.inc @@ -15,8 +15,8 @@ SCRIPT_START script_08015958 _0807EDD4 0x01f8, 0x02f8 _0807EB44 0x0004 DoPostScriptAction 0x0000 - TextboxNoOverlapFollowPos 0x1011, 0x0002 - _0807EA94 + MessageFromTargetPos 0x1011, 0x0002 + _0807EA94 _0807EDD4 0x01f8, 0x0268 SetEntityPositionRelative 0x0248, 0x0218 _0807EB44 0x0006 @@ -56,9 +56,9 @@ script_08015A32: JumpIf script_08015A54 CheckEntityInteractType JumpIfNot script_08015A32 - EndBlock - TextboxNoOverlapFollowPos 0x1067, 0x0002 - _0807EA94 + EndBlock + MessageFromTargetPos 0x1067, 0x0002 + _0807EA94 Jump script_08015A32 script_08015A54: EndBlock diff --git a/data/scripts/script_08015B34.inc b/data/scripts/script_08015B34.inc index a6e0cc20..9bbdebc1 100644 --- a/data/scripts/script_08015B34.inc +++ b/data/scripts/script_08015B34.inc @@ -21,8 +21,8 @@ SCRIPT_START script_08015B34 _0807E864 Call sub_0807F9A4 Call sub_0807DF28 - TextboxNoOverlapFollowPos 0x2506, 0x0002 - _0807EA94 + MessageFromTargetPos 0x2506, 0x0002 + _0807EA94 StartPlayerScript script_08015B84 WaitForSomething2 0x00000004 Call sub_0807DF50 diff --git a/data/scripts/script_08015C7C.inc b/data/scripts/script_08015C7C.inc index b977512b..82dfed5b 100644 --- a/data/scripts/script_08015C7C.inc +++ b/data/scripts/script_08015C7C.inc @@ -8,8 +8,8 @@ SCRIPT_START script_08015C7C DoPostScriptAction 0x0000 CallWithArg sub_0807F238, 0x000003c5 Call sub_0807F304 - TextboxNoOverlapFollowPos 0x1318, 0x000c - _0807EA94 + MessageFromTargetPos 0x1318, 0x000c + _0807EA94 CallWithArg sub_0807F238, 0x000003c9 Call sub_0807F304 _0807EB44 0x0004 diff --git a/data/scripts/script_08015DF0.inc b/data/scripts/script_08015DF0.inc index 6ab45a4f..530298f8 100644 --- a/data/scripts/script_08015DF0.inc +++ b/data/scripts/script_08015DF0.inc @@ -6,20 +6,20 @@ SCRIPT_START script_08015DF0 WaitForSomething2 0x00000004 DoPostScriptAction 0x0004 Wait 0x003c - TextboxNoOverlap 0x1319 - _0807EA94 + MessageNoOverlap 0x1319 + _0807EA94 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 - TextboxNoOverlap 0x131a - _0807EA94 + MessageNoOverlap 0x131a + _0807EA94 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 - TextboxNoOverlap 0x131d - _0807EA94 + MessageNoOverlap 0x131d + _0807EA94 _0807E5F8 0x00000008 WaitForSomething2 0x00000004 - TextboxNoOverlap 0x131e - _0807EA94 + MessageNoOverlap 0x131e + _0807EA94 _0807E5F8 0x00000008 WaitForSomething 0x00000400 DoPostScriptAction 0x0006 diff --git a/data/scripts/script_08015E58.inc b/data/scripts/script_08015E58.inc index bd9fd02f..9b010505 100644 --- a/data/scripts/script_08015E58.inc +++ b/data/scripts/script_08015E58.inc @@ -32,8 +32,8 @@ SCRIPT_START script_08015E58 WaitForSomething2 0x00000010 DoPostScriptAction 0x0014 Wait 0x001e - TextboxNoOverlap 0x131b - _0807EA94 + MessageNoOverlap 0x131b + _0807EA94 _0807E5F8 0x00000020 WaitForSomething2 0x00000010 DoPostScriptAction 0x0006 diff --git a/data/scripts/script_08015F08.inc b/data/scripts/script_08015F08.inc index 1ecc9b4d..587e9899 100644 --- a/data/scripts/script_08015F08.inc +++ b/data/scripts/script_08015F08.inc @@ -4,8 +4,8 @@ SCRIPT_START script_08015F08 DoPostScriptAction 0x0000 EndBlock WaitForSomething2 0x00000001 - TextboxNoOverlap 0x131c - _0807EA94 + MessageNoOverlap 0x131c + _0807EA94 _0807E5F8 0x00000002 WaitForSomething 0x00000200 DoPostScriptAction 0x0005 diff --git a/data/scripts/script_080160A8.inc b/data/scripts/script_080160A8.inc index 0d780e49..9910c142 100644 --- a/data/scripts/script_080160A8.inc +++ b/data/scripts/script_080160A8.inc @@ -23,34 +23,34 @@ script_080160E0: EndBlock HasRoomItemForSale JumpIfNot script_0801611A - TextboxNoOverlapFollow 0x2d07 - _0807EA94 - _0807E3E8 + MessageFromTarget 0x2d07 + _0807EA94 + _0807E3E8 JumpIfNot script_08016132 BuyItem 0x0000, 0x0000 JumpIf script_0801610C - TextboxNoOverlapFollow 0x2d0b - _0807EA94 + MessageFromTarget 0x2d0b + _0807EA94 Jump script_08016132 script_0801610C: WaitPlayerAction8 .ifndef EU - _0807EB8C - TextboxNoOverlapFollow 0x2d0d + _0807EB8C + MessageFromTarget 0x2d0d .else - TextboxNoOverlapFollow 0x2d08 + MessageFromTarget 0x2d08 .endif _0807EA94 Jump script_08016132 script_0801611A: CheckKinstoneFused 0x0014 JumpIfNot script_0801612C - TextboxNoOverlapFollow 0x2d09 - _0807EA94 + MessageFromTarget 0x2d09 + _0807EA94 Jump script_08016132 script_0801612C: - TextboxNoOverlapFollow 0x2d01 - _0807EA94 + MessageFromTarget 0x2d01 + _0807EA94 script_08016132: _0807E878 _0807EB44 0x0004 @@ -66,21 +66,21 @@ script_08016146: JumpIfNot script_08016146 _0807E864 GetInventoryValue 0x0025 - TextboxNoOverlapFollowTable 0x2d03, 0x2d02, 0x2d02, 0x2d02 - _0807E3E8 + MessageFromTargetTable 0x2d03, 0x2d02, 0x2d02, 0x2d02 + _0807E3E8 JumpIfNot script_0801618A _0807E48C 0x0020 JumpIf script_08016172 - TextboxNoOverlapFollow 0x2d0c + MessageFromTarget 0x2d0c Jump script_0801618A script_08016172: BuyItem 0x0025, 0x0000 JumpIf script_08016184 - TextboxNoOverlapFollow 0x2d0b + MessageFromTarget 0x2d0b Jump script_0801618A script_08016184: - WaitPlayerAction8 - TextboxNoOverlapFollow 0x2d06 + WaitPlayerAction8 + MessageFromTarget 0x2d06 script_0801618A: _0807E878 Jump script_08016146 @@ -95,26 +95,26 @@ script_0801619A: JumpIfNot script_0801619A _0807E864 GetInventoryValue 0x0024 - TextboxNoOverlapFollowTable 0x2d05, 0x2d04, 0x2d04, 0x2d04 - _0807E3E8 + MessageFromTargetTable 0x2d05, 0x2d04, 0x2d04, 0x2d04 + _0807E3E8 JumpIfNot script_080161E2 _0807E48C 0x0020 JumpIf script_080161C6 - TextboxNoOverlapFollow 0x2d0c + MessageFromTarget 0x2d0c Jump script_080161E2 script_080161C6: BuyItem 0x0024, 0x0000 JumpIf script_080161D8 - TextboxNoOverlapFollow 0x2d0b + MessageFromTarget 0x2d0b Jump script_080161E2 script_080161D8: .ifndef EU - WaitPlayerAction8 - _0807EA94 - _0807EB8C - TextboxNoOverlap 0x2d06 + WaitPlayerAction8 + _0807EA94 + _0807EB8C + MessageNoOverlap 0x2d06 .else - TextboxNoOverlapFollow 0x2d06 + MessageFromTarget 0x2d06 .endif script_080161E2: _0807E878 diff --git a/data/scripts/script_08016482.inc b/data/scripts/script_08016482.inc index a62ea33f..a20d7522 100644 --- a/data/scripts/script_08016482.inc +++ b/data/scripts/script_08016482.inc @@ -28,12 +28,12 @@ SCRIPT_START script_08016482 _0807E9DC _0807E9E4 0x0000 _0807EA88 0x0001 - _0807EA94 - TextboxNoOverlapFollow 0x0601 - TextboxNoOverlap 0x0601 - TextboxNoOverlapFollowPos_1 0x0601 - TextboxNoOverlapFollowTable 0x0601, 0x0602, 0x0603 - TextboxNoOverlapVar + _0807EA94 + MessageFromTarget 0x0601 + MessageNoOverlap 0x0601 + MessageFromTargetPos_1 0x0601 + MessageFromTargetTable 0x0601, 0x0602, 0x0603 + MessageNoOverlapVar _0807EB28 0x0602 _0807EB38 _0807EB44 0x0000 diff --git a/data/scripts/script_080165D8.inc b/data/scripts/script_080165D8.inc index d0e3de77..42d14295 100644 --- a/data/scripts/script_080165D8.inc +++ b/data/scripts/script_080165D8.inc @@ -13,17 +13,17 @@ SCRIPT_START script_080165F8 script_080165FE: _0807E30C JumpIfNot script_080165FE - TextboxNoOverlapFollow 0x0601 + MessageFromTarget 0x0601 Jump script_080165FE SCRIPT_START script_0801660C BeginBlock _0807E9D4 EndBlock script_08016612: - _0807E944 - _0807E864 - TextboxNoOverlapFollow 0x0602 - _0807EA94 + _0807E944 + _0807E864 + MessageFromTarget 0x0602 + _0807EA94 Wait 0x000f _0807E878 Jump script_08016612 @@ -239,8 +239,8 @@ script_0801693E: _0807E944 _0807E864 Wait 0x0018 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 + MessageFromTarget 0x0a01 + _0807EA94 Wait 0x000f _0807E878 Jump script_0801693E @@ -255,8 +255,8 @@ script_0801696A: _0807E944 _0807E864 Wait 0x0018 - TextboxNoOverlapFollow 0x0a01 - _0807EA94 + MessageFromTarget 0x0a01 + _0807EA94 Wait 0x000f _0807E878 Jump script_0801696A diff --git a/include/entity.h b/include/entity.h index 70e84d38..1873138f 100644 --- a/include/entity.h +++ b/include/entity.h @@ -91,7 +91,7 @@ typedef struct Entity { /*0x1d*/ u8 field_0x1d; /*0x1e*/ u8 frameIndex; /*0x1f*/ u8 lastFrameIndex; - /*0x20*/ s32 field_0x20; + /*0x20*/ s32 hVelocity; /*0x24*/ s16 speed; /*0x26*/ u8 spriteAnimation[3]; /*0x29*/ struct { diff --git a/include/fileScreen.h b/include/fileScreen.h index 3ec9b15b..ef528333 100644 --- a/include/fileScreen.h +++ b/include/fileScreen.h @@ -54,7 +54,7 @@ extern struct_02019EE0 gUnk_02019EE0; extern void sub_08056FEC(u32, struct_020227E8*); extern void sub_0805F46C(u32, void*); -extern void sub_0801C4A0(u32, u32); +extern void RecoverUI(u32 bottomPt, u32 topPt); extern void sub_08080668(void); extern void sub_0805194C(u32); extern void LoadPalettes(const u8*, int, int); @@ -70,7 +70,7 @@ extern void (*const gUnk_080FC908[])(void); extern const u8 gGlobalGfxAndPalettes[]; extern void (*const gUnk_080FC93C[])(); extern u32 gUsedPalettes; -extern u8 gUnk_02000D00[]; +extern u8 gTextGfxBuffer[]; extern u8 gUnk_02001B40; extern u8 gUnk_02022030; diff --git a/include/functions.h b/include/functions.h index 662227a4..cc9b7d45 100644 --- a/include/functions.h +++ b/include/functions.h @@ -260,7 +260,7 @@ extern u32 sub_08079D48(); extern u32 sub_08008B22(); extern void sub_080791BC9(); extern void sub_080791BC(); -extern void sub_08056360(); +extern void MessageClose(); extern u32 sub_080542AC(u32); extern u32 sub_08079FC4(u32); extern void sub_0800455E(Entity*); @@ -269,10 +269,6 @@ extern void sub_0804ACF8(); extern void sub_08073904(Entity*); extern u32 sub_08056134(void); extern void sub_08004484(Entity*, Entity*); -extern void sub_080564C8(u32); -extern void sub_0805EEB4(u8*, u32); -extern void sub_08056BDC(u32); -extern void sub_08056F88(u32, u32); extern void sub_0805F8E4(u32 r0, WStruct* r1); extern u32 sub_08002632(Entity*); extern void sub_0807879C(Entity*); diff --git a/include/main.h b/include/main.h index 0d3643ae..b358ba49 100644 --- a/include/main.h +++ b/include/main.h @@ -88,7 +88,6 @@ extern void sub_080ADD30(void); extern void DoSoftReset(void); extern void sub_08056260(void); extern void VBlankIntrWait(); -extern void MessageUpdate(void); extern void UpdateFade(void); extern u8 gUnk_03003DE4; diff --git a/include/player.h b/include/player.h index c4ef0f0f..11d91234 100644 --- a/include/player.h +++ b/include/player.h @@ -67,24 +67,20 @@ typedef struct { /*0x26*/ u8 swimState; /*0x27*/ u8 field_0x27[5]; /*0x2c*/ u8* field_0x2c; - /*0x30*/ union { - /* */ u32 all; - /* */ struct { - /* */ u32 unk1 : 1; - /* */ u32 unk2 : 1; - /* */ u32 unk4 : 1; - /* */ u32 noMinishCap : 1; - /* */ u32 pullingState : 1; - /* */ u32 windyState : 1; - /* */ u32 filler6 : 1; - /* */ u32 unk7 : 1; - /* */ u32 unk8 : 1; - /* */ u32 unk9 : 1; - /* */ u32 slipperyState : 1; - /* */ u32 filler11 : 5; - /* */ u32 filler11b : 16; - /* */ } PACKED b; - /* */ } flags; + /*0x30*/ u32 flags; + /* unk1 : 1; */ + /* unk2 : 1; */ + /* unk4 : 1; */ + /* noMinishCap : 1; */ + /* pullingState : 1; */ + /* windyState : 1; */ + /* filler6 : 1; */ + /* unk7 : 1; */ + /* unk8 : 1; */ + /* unk9 : 1; */ + /* slipperyState : 1; */ + /* filler11 : 5; */ + /* filler11b : 16; */ /*0x34*/ u8 field_0x34[2]; /*0x36*/ s16 field_0x36; /*0x38*/ u8 field_0x38; diff --git a/include/structures.h b/include/structures.h index 5298e1f5..a875d89a 100644 --- a/include/structures.h +++ b/include/structures.h @@ -15,8 +15,8 @@ typedef struct { u8 _e; u8 _f; } struct_02000000; -#define gUnk_02000000 ((struct_02000000*)(0x2000000)) -// extern struct_02000000 gUnk_02000000; +#define gSaveHeader ((struct_02000000*)(0x2000000)) +// extern struct_02000000 gSaveHeader; typedef struct { u8 unk_00; diff --git a/include/textbox.h b/include/textbox.h index e85590b9..b2603fbf 100644 --- a/include/textbox.h +++ b/include/textbox.h @@ -16,34 +16,36 @@ typedef struct { u8 textWindowPosY; u16 textIndex; u16 unk2; // HI? - u16 field_0xc; - u16 field_0xe; + u32 field_0xc; u32 field_0x10; u32 field_0x14; u32 field_0x18; u32 field_0x1c; -} TextBox; -extern TextBox gTextBox; +} Message; +extern Message gMessage; typedef struct { - TextBox textBox; - u8 _20; - u8 _21; - u16 _22; - u16 _24; - u16 _26; - u16 _28; - u8 _2a[0x2]; - void* _2c; - u8 _30[0x20]; + u8 flags; + u8 code; // first byte read + u16 param; // second byte read + u16 extended; // ascii adjusted for jp chars + u16 _6; + u16 textIndex; + void* _c; + u8 buf[32]; +} Token; + +typedef struct { + Message message; + Token curToken; WStruct _50; - char playerName[0xa]; + char playerName[10]; u8 _66[0x10]; u8 _76; u8 _77[0x11]; - u8 _88; - u8 state; - u8 _8a; + u8 msgStatus; + u8 renderStatus; + u8 newlineDelay; u8 _8b; u8 _8c; u8 _8d; @@ -51,43 +53,46 @@ typedef struct { u8 _8f; u8 _90; u8 _91; - s8 _92; + s8 typeSpeed; u8 _93; u8 _94; - u8 _95; + u8 delay; u8 _96; u8 _97; union { u32 word; struct { - u8 b0; + u8 lineNo; u8 b1; u8 b2; s8 sizeScale; } bytes; } _98; u8 _9c; - u8 _9d; - u16 _9e; - u16 _a0; - u16 _a2; - u16 _a4; + u8 updateDraw; + u16 beginTiles[4]; u16 _a6; -} CurrentTextBox; -extern CurrentTextBox gCurrentTextBox; -static_assert(sizeof(CurrentTextBox) == 0xa8); +} TextRender; +extern TextRender gTextRender; +static_assert(sizeof(TextRender) == 0xa8); /** * @brief Initialize the message system. */ void MessageInitialize(void); +/** + * @brief Update the message system. + * + */ +void MessageMain(void); + /** * @brief Show a message on screen. * * @param index u32 Message index */ -void ShowTextbox(u32 index); +void MessageRequest(u32 index); /** * @brief Show a message at screen posiiton. @@ -96,7 +101,7 @@ void ShowTextbox(u32 index); * @param x u32 Screen x * @param y u32 Screen y */ -void TextboxAtPosition(u32 index, u32 x, u32 y); +void MessageAtPos(u32 index, u32 x, u32 y); /** * @brief Show a message that attempts not to obscure the entity. @@ -104,13 +109,15 @@ void TextboxAtPosition(u32 index, u32 x, u32 y); * @param index u32 Message index * @param entity Entity* Your important entity */ -void TextboxNoOverlap(u32 index, Entity* entity); +void MessageNoOverlap(u32 index, Entity* entity); /** * @brief Show a message that attempts not to obscure the camera target. * * @param index u32 Message index */ -void TextboxNoOverlapFollow(u32 index); +void MessageFromTarget(u32 index); + +void DispMessageFrame(u16*, u32, u32, u32); #endif diff --git a/linker.ld b/linker.ld index 6d575979..f59ced88 100644 --- a/linker.ld +++ b/linker.ld @@ -16,7 +16,7 @@ SECTIONS { . = 0x00000020; gUnk_02000020 = .; . = 0x00000030; gUnk_02000030 = .; . = 0x00000040; gUnk_02000040 = .; - . = 0x00000050; gTextBox = .; + . = 0x00000050; gMessage = .; . = 0x0000005C; gUnk_0200005C = .; . = 0x00000070; gUnk_02000070 = .; . = 0x00000080; gMenu = .; @@ -26,7 +26,7 @@ SECTIONS { . = 0x000000B0; gUnk_020000B0 = .; . = 0x000000C0; gUnk_020000C0 = .; . = 0x00000CC0; gUnk_02000CC0 = .; - . = 0x00000D00; gUnk_02000D00 = .; + . = 0x00000D00; gTextGfxBuffer = .; . = 0x00001A00; gUnk_02001A00 = .; . = 0x00001A3C; gUnk_02001A3C = .; . = 0x00001A40; gBG3Buffer = .; @@ -90,7 +90,7 @@ SECTIONS { . = 0x00022730; gUnk_02022730 = .; . = 0x00022740; gUnk_02022740 = .; . = 0x00022750; gPlayerScriptExecutionContext = .; - . = 0x00022780; gCurrentTextBox = .; + . = 0x00022780; gTextRender = .; . = 0x000227DC; gUnk_020227DC = .; . = 0x000227E8; gUnk_020227E8 = .; . = 0x000227F0; gUnk_020227F0 = .; @@ -98,7 +98,7 @@ SECTIONS { . = 0x00022800; gUnk_02022800 = .; . = 0x0002281E; gUnk_0202281E = .; . = 0x00022830; gUnk_02022830 = .; - . = 0x00024030; gUnk_02024030 = .; + . = 0x00024030; gMessageChoices = .; . = 0x00024048; gUnk_02024048 = .; . = 0x00024050; gUnk_02024050 = .; . = 0x00024090; gUnk_02024090 = .; @@ -1192,7 +1192,6 @@ SECTIONS { data/metatile_headers.o(.rodata); data/map_headers.o(.rodata); src/textbox.o(.rodata); - data/data_08107BC8.o(.rodata); data/const/manager/manager1.o(.rodata); data/const/manager/manager3.o(.rodata); data/const/manager/manager4.o(.rodata); diff --git a/src/arm_proxy.c b/src/arm_proxy.c index d61749d7..d8efb2a0 100644 --- a/src/arm_proxy.c +++ b/src/arm_proxy.c @@ -129,16 +129,16 @@ void PrepNextFrame(void) { void PlayerUpdate(Entity* this) { if (gSave.stats.effect != 0) - gPlayerState.flags.all |= 0x4000; + gPlayerState.flags |= 0x4000; else - gPlayerState.flags.all &= ~0x4000; + gPlayerState.flags &= ~0x4000; if (sub_0805E3B0(this) == 0) { - if ((gPlayerState.flags.all & 0x80000) != 0) { + if ((gPlayerState.flags & 0x80000) != 0) { sub_08077B20(); - if ((gPlayerState.flags.all & 0x200000) != 0) { + if ((gPlayerState.flags & 0x200000) != 0) { gPlayerState.playerAction = 0x18; - gPlayerState.flags.all &= ~0x80000; + gPlayerState.flags &= ~0x80000; gPlayerState.hurtBlinkSpeed = 0xf0; this->flags |= 0x80; } else { @@ -171,10 +171,10 @@ void HandlePlayerLife(Entity* this) { if ((gPlayerEntity.bitfield & 0x80) && (gPlayerEntity.iframes > 0)) SoundReq(SFX_86); - gPlayerState.flags.all &= ~(0x2000000 | 0x200); - if (gPlayerState.flags.all & 0x400) + gPlayerState.flags &= ~(0x2000000 | 0x200); + if (gPlayerState.flags & 0x400) ResetPlayer(); - if ((gPlayerState.flags.all & 0x400000) && !gPlayerState.field_0xa0[0]) + if ((gPlayerState.flags & 0x400000) && !gPlayerState.field_0xa0[0]) sub_0807A108(); if (sub_08079B24() == 0) sub_08079708(this); @@ -190,10 +190,10 @@ void HandlePlayerLife(Entity* this) { return; } - if ((gPlayerState.field_0x8b != 0) || (gTextBox.doTextBox & 0x7f)) + if ((gPlayerState.field_0x8b != 0) || (gMessage.doTextBox & 0x7f)) return; - gRoomVars.unk2 = gTextBox.doTextBox & 0x7f; + gRoomVars.unk2 = gMessage.doTextBox & 0x7f; temp = gSave.stats.maxHealth / 4; if (temp > 24) temp = 24; @@ -243,12 +243,12 @@ void sub_080171F0(void) { gPlayerEntity.bitfield &= ~0x80; if (gPlayerEntity.action != 0x14) - gPlayerState.flags.all = (gPlayerState.flags.all & ~0x10000) | (0x10000 * (gPlayerState.flags.all & 2) / 2); + gPlayerState.flags = (gPlayerState.flags & ~0x10000) | (0x10000 * (gPlayerState.flags & 2) / 2); - gPlayerState.flags.all &= ~2; + gPlayerState.flags &= ~2; sub_080028E0(&gPlayerEntity); - if (gPlayerState.flags.all & 0x400000) + if (gPlayerState.flags & 0x400000) gUnk_0200AF00.filler25[10] = 1; sub_08078180(); @@ -263,13 +263,13 @@ void sub_080171F0(void) { gPlayerState.field_0x3f = 0; sub_0807B0C8(); - if (gPlayerState.flags.all & 0x400000) + if (gPlayerState.flags & 0x400000) gUnk_03004040[0]->spriteOffsetY = gUnk_03004040[1]->spriteOffsetY = gUnk_03004040[2]->spriteOffsetY = 0; if (gPlayerEntity.action == 0x1d) - gPlayerState.flags.all |= 0x20000000; + gPlayerState.flags |= 0x20000000; else - gPlayerState.flags.all &= ~0x20000000; + gPlayerState.flags &= ~0x20000000; sub_0807A8D8(&gPlayerEntity); if (gPlayerState.jumpStatus & 0xc0) diff --git a/src/code_08018C58.c b/src/code_08018C58.c index 14caf9cd..04d39a04 100644 --- a/src/code_08018C58.c +++ b/src/code_08018C58.c @@ -15,12 +15,10 @@ void CreateMinishEntrance(u32 tilePos) { } void sub_08018C58(u32 tilePos) { - u32 i = 0; + u32 i; - for (; i < 6;) { + for (i = 0; i < 6; i += 2, tilePos += 0x40) { SetTileType(0x260 + i, tilePos, 1); SetTileType(0x261 + i, tilePos + 1, 1); - i += 2; - tilePos += 0x40; } } diff --git a/src/code_0805436C.c b/src/code_0805436C.c index c2625d5b..7ec445b3 100644 --- a/src/code_0805436C.c +++ b/src/code_0805436C.c @@ -4,22 +4,14 @@ #include "menu.h" #include "area.h" #include "utils.h" - -typedef struct { - u8 filler[0xa8]; - Stats stats; -} SaveFile; +#include "structures.h" +#include "save.h" typedef struct { u8 unk; u8 filler[7]; } struct_080FD5B4; -typedef struct { - u8 filler[0x2e]; - u8 unk; -} ScreenTransition; - extern SaveFile gSave; extern struct_080FD5B4 gUnk_080FD5B4[]; extern ScreenTransition gScreenTransition; @@ -105,7 +97,7 @@ u32 SetBottleContents(u32 itemID, u32 bottleIndex) { return bottleIndex; } -u32 sub_0805449C(u32 arg0) { +u32 ItemIsSword(u32 arg0) { switch (arg0) { case 1: case 2: @@ -118,8 +110,8 @@ u32 sub_0805449C(u32 arg0) { } } -u32 sub_080544B4(u32 arg0) { - switch (arg0) { +u32 ItemIsShield(u32 id) { + switch (id) { case 13: case 14: return 1; @@ -128,8 +120,8 @@ u32 sub_080544B4(u32 arg0) { } } -u32 sub_080544C8(u32 arg0) { - switch (arg0) { +u32 ItemIsBottle(u32 id) { + switch (id) { case 28: case 29: case 30: @@ -140,14 +132,14 @@ u32 sub_080544C8(u32 arg0) { } } -u32 GetBottleContaining(u32 arg0) { - if (arg0 == gSave.stats.bottles[0]) { +u32 GetBottleContaining(u32 id) { + if (id == gSave.stats.bottles[0]) { return 1; - } else if (arg0 == gSave.stats.bottles[1]) { + } else if (id == gSave.stats.bottles[1]) { return 2; - } else if (arg0 == gSave.stats.bottles[2]) { + } else if (id == gSave.stats.bottles[2]) { return 3; - } else if (arg0 == gSave.stats.bottles[3]) { + } else if (id == gSave.stats.bottles[3]) { return 4; } else { return 0; @@ -160,7 +152,7 @@ NONMATCH("asm/non_matching/sub_08054524.inc", void sub_08054524(void)) { bVar1 = gArea.locationIndex; if (gArea.locationIndex == 0) { - bVar1 = gScreenTransition.unk; + bVar1 = gScreenTransition.field_0x24[0xa]; } if (bVar1 > 0x16) { bVar1 = 0; @@ -263,7 +255,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) { } else if (arg0->id == 0x1e) { itemEntity->direction = arg0->animationState << 3 | 0x80; itemEntity->speed = 0xc0; - itemEntity->field_0x20 = 0x18000; + itementity->hVelocity = 0x18000; } } CopyPosition(arg0, itemEntity); diff --git a/src/code_0805F9A0.c b/src/code_0805F9A0.c index 120a7625..a921491e 100644 --- a/src/code_0805F9A0.c +++ b/src/code_0805F9A0.c @@ -141,7 +141,7 @@ void sub_0805F918(u32 idx, u32 idx2, void* dest) { u32 sub_0805F9A0(u32 r0) { - if (gUnk_02000000->gameLanguage == 0) { + if (gSaveHeader->gameLanguage == 0) { u16* val = &gUnk_081092D4; u32 i = 0; diff --git a/src/debugScreen.c b/src/debugScreen.c index b75181f2..9e290ae2 100644 --- a/src/debugScreen.c +++ b/src/debugScreen.c @@ -27,7 +27,7 @@ void sub_0805FA04(void) { MessageInitialize(); MemClear((void*)&gUnk_02032EC0, sizeof(UI)); MemClear((void*)&gMenu, sizeof(Menu)); - gMenu.unk16 = gUnk_02000000->gameLanguage; + gMenu.unk16 = gSaveHeader->gameLanguage; sub_08053320(); sub_0801D79C(0, 0x1144); gMain.funcIndex = 1; @@ -56,8 +56,8 @@ void sub_0805FA98(void) { } break; case 0x100: - gUnk_02000000->gameLanguage = gMenu.unk16; - TextboxNoOverlapFollow(gMenu.unk14 * 0x100 + gMenu.unk15); + gSaveHeader->gameLanguage = gMenu.unk16; + MessageFromTarget(gMenu.unk14 * 0x100 + gMenu.unk15); break; case 0x2: MessageInitialize(); diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 5edc7d1d..4644e620 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -323,7 +323,7 @@ void sub_08031E90(Entity* this) { void sub_08031EA8(Entity* this) { this->action = 1; this->spritePriority.b1 = 1; - this->field_0x20 = 0x40000; + this->hVelocity = 0x40000; this->height.HALF.HI = (4 - this->type2) * 0xe; this->field_0x78.HALF.HI = Random(); InitializeAnimation(this, 4); @@ -332,8 +332,8 @@ void sub_08031EA8(Entity* this) { void sub_08031EE8(Entity* this) { int draw; - this->height.WORD -= this->field_0x20; - this->field_0x20 -= 0x1800; + this->height.WORD -= this->hVelocity; + this->hVelocity -= 0x1800; if (this->height.HALF.HI < 1) { draw = this->spriteSettings.b.draw; @@ -347,7 +347,7 @@ void sub_08031EE8(Entity* this) { if (draw == 1) GetNextFrame(this); - if (this->field_0x20 < 1) { + if (this->hVelocity < 1) { this->action = 2; this->flags |= 0x80; InitializeAnimation(this, 5); @@ -450,7 +450,7 @@ void sub_08032160(Entity* this) { this->spriteSettings.b.flipX = 0; } this->speed = 0xf0; - this->field_0x20 = 0x12000; + this->hVelocity = 0x12000; this->spritePriority.b1 = 1; InitializeAnimation(this, 12); } diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c index 09224225..15535172 100644 --- a/src/enemy/beetle.c +++ b/src/enemy/beetle.c @@ -105,7 +105,7 @@ void sub_080218CC(Entity* this) { this->spriteSettings.b.draw = 1; this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f; this->speed = 0x100; - this->field_0x20 = 0x12000; + this->hVelocity = 0x12000; } GetNextFrame(this); @@ -216,7 +216,7 @@ void sub_08021AD8(Entity* this) { } void sub_08021B64(Entity* this) { - if (gPlayerState.flags.all & 4) { + if (gPlayerState.flags & 4) { this->action = 3; this->height.WORD = 0; InitializeAnimation(this, 2); @@ -233,12 +233,12 @@ void sub_08021B64(Entity* this) { this->actionDelay = (u8)iVar4; } - if (gPlayerState.flags.all & 0x110) + if (gPlayerState.flags & 0x110) iVar4 = 0; if (iVar4 == 0) { this->action = 6; - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; ((u8*)&this->field_0x86)[1] = 0; if (gPlayerEntity.direction != 0xff) { this->direction = 0x10 ^ gPlayerEntity.direction; @@ -299,7 +299,7 @@ u32 sub_08021D00(Entity* this) { } else { this->action = 4; this->actionDelay = 1; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; InitializeAnimation(this, 4); ret = 1; } diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c index 3d107aa3..67bb138b 100644 --- a/src/enemy/bobomb.c +++ b/src/enemy/bobomb.c @@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) { this->action = 3; this->damageType = 0x6e; this->field_0xf = 1; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->speed = 0; this->field_0x80.HALF.HI = 1; InitializeAnimation(this, this->direction >> 4 | 6); @@ -72,7 +72,7 @@ void sub_0802C7AC(Entity* this) { if (this->field_0x82.HALF.LO != 2) { this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80; } - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->field_0x82.HALF.HI = 0; this->field_0x80.HALF.HI = 0; } else { @@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) { this->flags &= ~0x80; this->field_0xf = 1; this->spritePriority.b1 = 1; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->speed = 0; this->field_0x82.HALF.HI = 0; this->field_0x80.HALF.HI = 0; diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c index e096feda..d5220c6d 100644 --- a/src/enemy/bombPeahat.c +++ b/src/enemy/bombPeahat.c @@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) { void sub_0802AE24(Entity* this) { this->action = 1; this->actionDelay = 0xf0; - this->field_0x20 = 0x8000; + this->hVelocity = 0x8000; this->hitbox = (Hitbox*)&gUnk_080CD174; this->field_0x3c = 3; this->field_0x16 = 0; diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index 7d79aa5f..989c6bea 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -246,11 +246,11 @@ void sub_08028CE8(Entity* this) { struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD; u32 subtype; - if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) { + if ((gMessage.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) { if (offer->price <= gSave.stats.rupees) { if (sub_080291DC(this)) { /* Bag full. */ - TextboxNoOverlapFollow(0x2904); + MessageFromTarget(0x2904); sub_08078A90(0); } else { ModRupees(-offer->price); @@ -285,7 +285,7 @@ void sub_08028CE8(Entity* this) { } } else { /* Not enough money. */ - TextboxNoOverlapFollow(0x2903); + MessageFromTarget(0x2903); sub_08078A90(0); } } @@ -303,7 +303,7 @@ void sub_08028DE8(Entity* this) { this->field_0x80.HALF.HI = 1; } } else { - TextboxNoOverlapFollow(0x2902); + MessageFromTarget(0x2902); this->action = 4; this->field_0x80.HALF.HI = 0; this->actionDelay = 1; @@ -315,11 +315,11 @@ void sub_08028DE8(Entity* this) { } void sub_08028E40(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD; this->action = 4; - this->subAction = gTextBox.doTextBox & 0x7f; + this->subAction = gMessage.doTextBox & 0x7f; this->actionDelay = 1; if (CheckLocalFlag(offer->field_0xa) == 0) { SetLocalFlag(offer->field_0xa); @@ -383,8 +383,8 @@ void sub_08028F0C(Entity* this) { dialog = offer->field_0x4; sub_08078A90(1); } - TextboxNoOverlapFollow(dialog); - gTextBox.field_0x10 = offer->price; + MessageFromTarget(dialog); + gMessage.field_0x10 = offer->price; } } diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c index 7c891a9f..56e23b75 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -117,7 +117,7 @@ void sub_0801EF40(Entity* this) { } } else { sub_0804AA1C(this); - this->field_0x20 = 0; + this->hVelocity = 0; InitializeAnimation(this, 9); } this->field_0x80.HALF.LO = this->currentHealth; @@ -698,7 +698,7 @@ void sub_0801FB68(Entity* this) { break; } - this->field_0x20 = 0; + this->hVelocity = 0; } u32 sub_0801FBD0(Entity* this) { @@ -711,7 +711,7 @@ u32 sub_0801FBD0(Entity* this) { void Chuchu_JumpAtPlayer(Entity* this) { this->speed = 0x180; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->direction = sub_08049F84(this, 1); InitializeAnimation(this, 3); } diff --git a/src/enemy/cuccoChickAggr.c b/src/enemy/cuccoChickAggr.c index 683ba4b8..2ae41b08 100644 --- a/src/enemy/cuccoChickAggr.c +++ b/src/enemy/cuccoChickAggr.c @@ -49,7 +49,7 @@ void sub_08022988(Entity* this) { return; this->frameIndex = 1; - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; EnqueueSFX(0xd6); } @@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) { this->speed = 0xc0; sub_08022B44(this); } else { - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; EnqueueSFX(0xd6); } } @@ -138,7 +138,7 @@ u32 sub_08022B20(Entity* this) { } void sub_08022B44(Entity* this) { - this->field_0x20 = 0xc000; + this->hVelocity = 0xc000; this->direction = GetFacingDirection(this, &gPlayerEntity); if (this->direction & 0xf) diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c index 5195b542..29446667 100644 --- a/src/enemy/fallingBoulder.c +++ b/src/enemy/fallingBoulder.c @@ -32,7 +32,7 @@ void sub_0802C254(Entity* this) { void sub_0802C258(Entity* this) { sub_0804A720(this); - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->actionDelay = 2; this->field_0x7a.HWORD = Random() & 0x70; switch (this->type) { @@ -190,7 +190,7 @@ void sub_0802C4B0(Entity* this) { } rand = Random() & 7; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; if (rand & 4) { if (rand & 3) { *(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1]; diff --git a/src/enemy/fireballGuy.c b/src/enemy/fireballGuy.c index 42916d3e..2103e19f 100644 --- a/src/enemy/fireballGuy.c +++ b/src/enemy/fireballGuy.c @@ -101,7 +101,7 @@ u32 sub_0804A024(Entity*, u32, u32); void sub_08045524(Entity* this) { u32 tmp, tmp1, tmp2; - this->field_0x20 = 0x1c000; + this->hVelocity = 0x1c000; tmp = sub_0804A024(this, 1, 8); if (tmp != 0xff && (Random() & 3) == 0) { this->actionDelay = Random() & 3; diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c index 923ebbdc..d1773a7d 100644 --- a/src/enemy/gibdo.c +++ b/src/enemy/gibdo.c @@ -350,7 +350,7 @@ void sub_08037A58(Entity* this) { } void sub_08037ACC(Entity* this) { - gPlayerState.flags.all &= 0xFFFFFEFF; + gPlayerState.flags &= 0xFFFFFEFF; gPlayerEntity.flags |= 0x80; gPlayerEntity.iframes = 0x1e; gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState); diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c index 2385b12e..41f0ed85 100644 --- a/src/enemy/helmasaur.c +++ b/src/enemy/helmasaur.c @@ -89,7 +89,7 @@ void sub_0802BCA8(Entity* this) { this->action = 7; this->actionDelay = 0x5a; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->damageType = 0x19; this->field_0x3a = this->field_0x3a & 0xfb; this->field_0x1c = 0x12; @@ -369,7 +369,7 @@ void sub_0802C1CC(Entity* this) { void sub_0802C218(Entity* this) { this->action = 6; this->speed = 0xe0; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; } // clang-format off diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c index b35d9540..1353d489 100644 --- a/src/enemy/lakitu.c +++ b/src/enemy/lakitu.c @@ -57,7 +57,7 @@ void Lakitu_DoAction(Entity* this) { void sub_0803C784(Entity* this) { if ((this->bitfield & 0x7f) == 0x1d) { - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; sub_0803CBAC(this); } else { @@ -353,7 +353,7 @@ void sub_0803CC08(Entity* this) { return; } - if (this->field_0x20 >= 0) { + if (this->hVelocity >= 0) { return; } diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c index b6a5988f..70f5ea3f 100644 --- a/src/enemy/likeLike.c +++ b/src/enemy/likeLike.c @@ -6,7 +6,7 @@ #include "createObject.h" #include "functions.h" -extern bool32 sub_080544B4(u32); +extern bool32 ItemIsShield(u32); void sub_0802810C(Entity*); void sub_080281A0(Entity*); @@ -207,9 +207,9 @@ void sub_0802805C(Entity* this) { NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity* this)) { gPlayerState.jumpStatus = 0x41; gPlayerState.field_0xa = 0; - gPlayerState.flags.all &= 0xffffffef; + gPlayerState.flags &= 0xffffffef; gPlayerEntity.flags |= 0x80; - gPlayerEntity.field_0x20 = 0x18000; + gPlayerEntity.hVelocity = 0x18000; gPlayerEntity.iframes = -60; gPlayerEntity.direction = gPlayerEntity.animationState << 2; gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI; @@ -229,10 +229,10 @@ void sub_080281A0(Entity* this) { this->field_0xf = 0x19; if (sub_080281E0(0xe)) { this->field_0x80.HALF.LO = 0xe; - TextboxNoOverlapFollow(0x578); + MessageFromTarget(0x578); } else if (sub_080281E0(0xd)) { this->field_0x80.HALF.LO = 0xd; - TextboxNoOverlapFollow(0x578); + MessageFromTarget(0x578); } else { ModHealth(-1); } @@ -241,11 +241,11 @@ void sub_080281A0(Entity* this) { bool32 sub_080281E0(u32 param_1) { bool32 ret = FALSE; if (GetInventoryValue(param_1) == 1) { - if (sub_080544B4(gSave.stats.itemOnA)) { + if (ItemIsShield(gSave.stats.itemOnA)) { gSave.stats.itemOnA = 0; } - if (sub_080544B4(gSave.stats.itemOnB)) { + if (ItemIsShield(gSave.stats.itemOnB)) { gSave.stats.itemOnB = 0; } @@ -262,7 +262,7 @@ void sub_08028224(u32 param_1) { #else sub_080A7C18(param_1, 0, 1); #endif - TextboxNoOverlapFollow(0x579); + MessageFromTarget(0x579); } void (*const gUnk_080CC6FC[])(Entity*) = { diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c index a0f50903..96ded54d 100644 --- a/src/enemy/mazaalBracelet.c +++ b/src/enemy/mazaalBracelet.c @@ -916,7 +916,7 @@ void sub_0803B100(Entity* this) { Entity* temp; this->action = 0x29; - this->field_0x20 = 0x14000; + this->hVelocity = 0x14000; if (this->type == 0) { this->hitbox = &gUnk_080FD364; } else { @@ -982,7 +982,7 @@ void sub_0803B1B8(Entity* this) { if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) { temp->action = 0xb; temp->actionDelay = 0x78; - temp->field_0x20 = 0; + temp->hVelocity = 0; (*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708; (*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708; } @@ -1227,9 +1227,9 @@ void sub_0803B724(Entity* param_1) { void sub_0803B798(void) { gPlayerState.jumpStatus = 0x41; gPlayerState.field_0xa = 0; - gPlayerState.flags.all &= 0xffef; + gPlayerState.flags &= 0xffef; gPlayerEntity.flags |= 0x80; - gPlayerEntity.field_0x20 = 0x18000; + gPlayerEntity.hVelocity = 0x18000; gPlayerEntity.height.HALF.HI = -10; gPlayerEntity.direction = 0x10; gPlayerEntity.animationState = 4; @@ -1257,7 +1257,7 @@ u32 sub_0803B870(Entity* this) { Entity* entity; entity = this->attachedEntity; - if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags.all & 0x10) != 0) { + if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags & 0x10) != 0) { this->action = 0x18; this->actionDelay = 0x44; this->spriteSettings.b.draw = 0; diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c index 04b80eff..a4b000e8 100644 --- a/src/enemy/mazaalHead.c +++ b/src/enemy/mazaalHead.c @@ -816,7 +816,7 @@ void sub_08034BC8(Entity* this) { } void sub_08034C00(Entity* this) { - if (((gPlayerState.flags.all & 0x80) != 0) && + if (((gPlayerState.flags & 0x80) != 0) && CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX, this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) { if (gScreenTransition.field_0x39 >= 0x3d) { diff --git a/src/enemy/miniFireballGuy.c b/src/enemy/miniFireballGuy.c index 3210aeeb..930ed8f0 100644 --- a/src/enemy/miniFireballGuy.c +++ b/src/enemy/miniFireballGuy.c @@ -53,7 +53,7 @@ void sub_08045654(Entity* this) { void sub_08045678(Entity* this) { - this->field_0x20 = 0x1c000; + this->hVelocity = 0x1c000; if (this->actionDelay != 0) { this->actionDelay--; } else { diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c index 8f805aaf..88ad48bf 100644 --- a/src/enemy/moldworm.c +++ b/src/enemy/moldworm.c @@ -84,11 +84,11 @@ void sub_080230E4(Entity* this) { CopyPosition(this, &gPlayerEntity); gPlayerEntity.flags = gPlayerEntity.flags | 0x80; gPlayerEntity.spriteSettings.b.draw = 1; - gPlayerEntity.field_0x20 = 0x18000; + gPlayerEntity.hVelocity = 0x18000; gPlayerEntity.direction = 0xff; gPlayerEntity.iframes = -0x14; gPlayerState.jumpStatus = 0x41; - gPlayerState.flags.all &= 0xfff7ffff; + gPlayerState.flags &= 0xfff7ffff; } sub_0804AA30(this, gUnk_080CBC38); @@ -266,7 +266,7 @@ void sub_0802351C(Entity* this) { if (this->field_0x7c.BYTES.byte3 == 0) { if (this->type2 == 0) { gPlayerEntity.animationState = this->animationState & 7; - gPlayerState.flags.all |= 0x80000; + gPlayerState.flags |= 0x80000; PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10); gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7]; } @@ -401,7 +401,7 @@ void sub_08023894(Entity* this) { this->parent->field_0x7c.BYTES.byte3 = 1; InitializeAnimation(this, this->animationState); if (this->parent->type2 == 0) { - gPlayerState.flags.all |= 0x200000; + gPlayerState.flags |= 0x200000; gPlayerEntity.x.HALF.HI = this->x.HALF.HI; gPlayerEntity.y.HALF.HI = this->y.HALF.HI; gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this)); diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c index 597ab1da..9a96a72d 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -260,7 +260,7 @@ void Peahat_RepairPropeller(Entity* this) { return; this->action = 9; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->direction = Random() & 0x1f; sub_0804AA1C(this); this->animationState = PeahatAnimation_RepairPropeller; @@ -286,7 +286,7 @@ void Peahat_Hop(Entity* this) { if (--this->actionDelay == 0) { if (this->frames.all & 0x80) { this->action = 9; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->animationState = PeahatAnimation_NewPropeller; InitializeAnimation(this, this->animationState); } else { diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index 698edc94..b8247e34 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -395,7 +395,7 @@ void sub_080244E8(Entity* this) { sub_080249DC(this); this->cutsceneBeh.HALF.HI = gPlayerEntity.spritePriority.b1; gPlayerEntity.flags &= 0x7f; - gPlayerState.flags.all |= 0x100; + gPlayerState.flags |= 0x100; gPlayerState.field_0xa |= 0x80; if (gPlayerState.swimState != 0) { gPlayerState.swimState = 0; @@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th Entity* player = &gPlayerEntity; ResetPlayer(); - gPlayerState.flags.all |= 0x100; + gPlayerState.flags |= 0x100; gPlayerState.field_0xa |= 0x80; gPlayerState.playerAction = 0xe; gPlayerState.field_0x38 = 0x14; @@ -832,7 +832,7 @@ END_NONMATCH void sub_08024F50(Entity* this) { gPlayerState.field_0xa = 0; - gPlayerState.flags.all &= 0xfffffeff; + gPlayerState.flags &= 0xfffffeff; CopyPosition(this, &gPlayerEntity); gPlayerEntity.action = 1; gPlayerEntity.flags |= 0x80; diff --git a/src/enemy/puffstool.c b/src/enemy/puffstool.c index b7139173..4225a61f 100644 --- a/src/enemy/puffstool.c +++ b/src/enemy/puffstool.c @@ -72,8 +72,8 @@ void sub_08025020(Entity* this) { } this->action = 7; this->actionDelay = 0x3c; - if (0 < this->field_0x20) { - this->field_0x20 = 0; + if (0 < this->hVelocity) { + this->hVelocity = 0; } this->iframes = -0xc; this->knockbackDuration = 0; @@ -200,7 +200,7 @@ void sub_080252E0(Entity* this) { this->action = 3; this->actionDelay = 0x1e; this->field_0xf = 0; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; InitializeAnimation(this, 1); } } @@ -213,7 +213,7 @@ void sub_0802538C(Entity* this) { GetNextFrame(this); } else { sub_08003FC4(this, 0x2000); - if (this->field_0x20 < 0x2000) { + if (this->hVelocity < 0x2000) { this->action = 4; InitializeAnimation(this, 2); } @@ -242,7 +242,7 @@ void sub_0802541C(Entity* this) { if (this->frames.all & 0x80) { this->action = 3; this->field_0xf = 1; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; InitializeAnimation(this, 1); } } diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c index d8774285..cafa618d 100644 --- a/src/enemy/rollobite.c +++ b/src/enemy/rollobite.c @@ -32,7 +32,7 @@ void Rollobite_OnTick(Entity* this) { void sub_08020668(Entity* this) { if (this->damageType == 34 && this->currentHealth != 0xff) { this->action = 4; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->direction = 0xff; this->currentHealth = 0xff; this->damageType = 35; @@ -102,7 +102,7 @@ void sub_080207A8(Entity* this) { this->spritePriority.b0 = 4; this->field_0x3a &= 0xfb; this->direction ^= 0x10; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->speed = 0x80; InitializeAnimation(this, this->animationState + 0x10); } @@ -262,7 +262,7 @@ bool32 Rollobite_TryToHoleUp(Entity* this) { this->x.HALF.HI += 8; this->y.HALF.HI &= 0xfff0; this->y.HALF.HI += 13; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; InitializeAnimation(this, this->animationState + 0x14); SetTile(0x4034, tile, this->collisionLayer); return TRUE; diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index 0f29065a..fd72c272 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -231,9 +231,9 @@ void sub_080296C8(Entity* this) { void sub_080296D8(Entity* this) { gPlayerState.jumpStatus = 0x41; - gPlayerState.flags.all &= 0xffffffef; + gPlayerState.flags &= 0xffffffef; gPlayerEntity.flags |= 0x80; - gPlayerEntity.field_0x20 = 0x18000; + gPlayerEntity.hVelocity = 0x18000; gPlayerEntity.iframes = 0xa6; gPlayerEntity.height.HALF.HI = -2; gPlayerEntity.direction = gPlayerEntity.animationState << 2; diff --git a/src/enemy/spikedBeetle.c b/src/enemy/spikedBeetle.c index 4c458a14..4884f873 100644 --- a/src/enemy/spikedBeetle.c +++ b/src/enemy/spikedBeetle.c @@ -49,7 +49,7 @@ void sub_0802B628(Entity* this) { case 0x1d: if (this->action < 6) { this->action = 6; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->speed = 0xc0; this->direction = this->knockbackDirection; this->knockbackDuration = 0; @@ -166,7 +166,7 @@ void sub_0802B8E0(Entity* this) { } } else { this->action = 8; - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; this->speed = 0x60; this->damageType = 99; InitializeAnimation(this, this->animationState); diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c index bd0ca141..5f928636 100644 --- a/src/enemy/spinyChuchu.c +++ b/src/enemy/spinyChuchu.c @@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) { if (sub_080228F0(this)) { this->action = 6; - this->field_0x20 = 0x12000; + this->hVelocity = 0x12000; this->speed = 0x140; this->direction = GetFacingDirection(this, gUnk_020000B0); this->damageType = 0x5a; diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c index ab5da752..0a2367bd 100644 --- a/src/enemy/tektite.c +++ b/src/enemy/tektite.c @@ -39,9 +39,9 @@ void sub_0802F150(Entity* this) { this->field_0xf = 0; *(u8*)&this->field_0x7c = 0; if (this->height.HALF.HI != 0) { - this->field_0x20 >>= 2; + this->hVelocity >>= 2; } else { - this->field_0x20 = 0; + this->hVelocity = 0; } InitializeAnimation(this, 0); break; @@ -95,7 +95,7 @@ void sub_0802F284(Entity* this) { this->action = 2; this->actionDelay = 0x10; this->field_0xf = this->type; - this->field_0x20 = this->field_0x82.HWORD << 4; + this->hVelocity = this->field_0x82.HWORD << 4; sub_0802F45C(this); InitializeAnimation(this, 2); } @@ -166,7 +166,7 @@ void sub_0802F3F4(Entity* this) { this->action = 2; this->actionDelay = 0x10; this->field_0xf = this->type; - this->field_0x20 = this->field_0x82.HWORD << 4; + this->hVelocity = this->field_0x82.HWORD << 4; (*(u8*)&this->field_0x7c.HALF.LO)++; sub_0802F45C(this); InitializeAnimation(this, 2); diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c index 2567c463..f5b7103a 100644 --- a/src/enemy/tektiteGolden.c +++ b/src/enemy/tektiteGolden.c @@ -33,9 +33,9 @@ void sub_08037F00(Entity* this) { this->field_0xf = 0; this->field_0x80.HALF.LO = 0; if (this->height.HALF.HI != 0) { - this->field_0x20 >>= 2; + this->hVelocity >>= 2; } else { - this->field_0x20 = 0; + this->hVelocity = 0; } InitializeAnimation(this, 0); @@ -86,7 +86,7 @@ void sub_08037Fe0(Entity* this) { this->action = 2; this->actionDelay = 6; this->field_0xf = 0; - this->field_0x20 = 0x38000; + this->hVelocity = 0x38000; sub_08038168(this); InitializeAnimation(this, 2); } @@ -142,7 +142,7 @@ void sub_08038110(Entity* this) { if (this->field_0x80.HALF.LO < 5) { this->action = 2; this->actionDelay = 8; - this->field_0x20 = 0x38000; + this->hVelocity = 0x38000; sub_08038168(this); InitializeAnimation(this, 2); } else { diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c index 3134e9ef..bd5d18f8 100644 --- a/src/enemy/vaatiArm.c +++ b/src/enemy/vaatiArm.c @@ -952,7 +952,7 @@ NONMATCH("asm/non_matching/vaati/sub_08043490.inc", void sub_08043490(Entity* th entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]; if (entity->height.HALF.HI < -4) { - entity->field_0x20 = 0x18000; + entity->hVelocity = 0x18000; this->subAction = 2; this->field_0x7c.BYTES.byte2 = 0; ((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2; @@ -979,7 +979,7 @@ void sub_08043520(Entity* this) { entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]; sub_08003FC4(entity, 0x1a00); - if ((entity->field_0x20 < 0) && (-6 < entity->height.HALF.HI)) { + if ((entity->hVelocity < 0) && (-6 < entity->height.HALF.HI)) { entity->height.HALF.HI = -6; this->subAction = 3; this->field_0x7a.HWORD = 900; @@ -1352,7 +1352,7 @@ void sub_08043DB0(Entity* this) { Entity* pEVar3; Entity* pEVar4; - if (((gPlayerState.flags.all & 0x80) != 0)) { + if (((gPlayerState.flags & 0x80) != 0)) { pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3]; if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.roomOriginX, pEVar3->y.HALF.HI - gRoomControls.roomOriginY + 2, 3, 3)) { diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c index 1d77249e..a74de388 100644 --- a/src/enemy/vaatiProjectile.c +++ b/src/enemy/vaatiProjectile.c @@ -74,7 +74,7 @@ void VaatiProjectileFunction1(Entity* this) { entity->flags = entity->flags & 0x7f; } } else { - gPlayerState.flags.all &= 0xfffffeff; // using b.unk8 does not match + gPlayerState.flags &= 0xfffffeff; // using b.unk8 does not match entity = &gPlayerEntity; entity->flags = gPlayerEntity.flags | 0x80; } diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c index 94d7935a..757d6544 100644 --- a/src/enemy/vaatiTransfigured.c +++ b/src/enemy/vaatiTransfigured.c @@ -313,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) { if (this->actionDelay != 0) { if (--this->actionDelay == 0) { this->flags &= 0x7f; - this->field_0x20 = 0x38000; + this->hVelocity = 0x38000; this->field_0xf = 0x10; } break; @@ -379,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) { this->field_0x74.HALF.LO = 0; this->actionDelay = 0x80; this->field_0xf = 0; - this->field_0x20 = 0x24000; + this->hVelocity = 0x24000; SoundReq(SFX_12B); } break; @@ -1061,7 +1061,7 @@ void sub_080409B0(Entity* this) { this->field_0x80.HALF.HI = 3; this->flags &= 0x7f; this->damageType = 0x36; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; SoundReq(SFX_164); } } diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c index ab0bd34a..a4cf8999 100644 --- a/src/enemy/vaatiTransfiguredEye.c +++ b/src/enemy/vaatiTransfiguredEye.c @@ -93,8 +93,8 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) { Entity* child; u8 bVar2; - bVar2 = gTextBox.doTextBox & 0x7f; - if ((gTextBox.doTextBox & 0x7f) == 0) { + bVar2 = gMessage.doTextBox & 0x7f; + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; this->spriteSettings.b.draw = 0; this->field_0x80.HALF.LO = bVar2; diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c index 26a39ff6..08b5cb85 100644 --- a/src/enemy/vaatiWrath.c +++ b/src/enemy/vaatiWrath.c @@ -456,7 +456,7 @@ void VaatiWrathType0ActionA(Entity* this) { this->subAction = 0; this->direction = 0; this->speed = 0x100; - this->field_0x20 = 0x12000; + this->hVelocity = 0x12000; sub_0801D2B4(this, 0x16b); InitAnimationForceUpdate(this, 5); type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1; @@ -626,7 +626,7 @@ void sub_08041CD0(Entity* this) { } else { this->subAction = 2; this->actionDelay = 0x3c; - TextboxNoOverlapFollow(0x1651); + MessageFromTarget(0x1651); } } else { UpdateAnimationSingleFrame(this); @@ -637,7 +637,7 @@ void sub_08041D14(Entity* this) { Entity* pEVar1; GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { if (this->actionDelay != 0) { this->actionDelay--; } else { diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c index a0c79d74..26074c7d 100644 --- a/src/enemy/wallMaster2.c +++ b/src/enemy/wallMaster2.c @@ -118,7 +118,7 @@ void sub_0802CE68(Entity* this) { gPlayerState.field_0xa |= 0x80; gPlayerState.field_0x1a[0] |= 0x80; - gPlayerState.flags.all |= 0x100; + gPlayerState.flags |= 0x100; if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) { this->direction = GetFacingDirection(this, &gPlayerEntity); sub_0806F69C(this); diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c index e469cd03..73fc59eb 100644 --- a/src/enemy/waterDrop.c +++ b/src/enemy/waterDrop.c @@ -22,7 +22,7 @@ void sub_0802A250(Entity* this) { this->action = 1; this->actionDelay = 0; - this->field_0x20 = -0x30000; + this->hVelocity = -0x30000; this->speed = gUnk_080CD03C[Random() & 3]; this->direction = gUnk_080CD040[Random() & 3] + 0x18; this->collisionLayer = 2; diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c index 213665c3..05fdc4e0 100644 --- a/src/enemy/wisp.c +++ b/src/enemy/wisp.c @@ -37,7 +37,7 @@ void sub_08033564(Entity* this) { this->spriteSettings.b.draw = FALSE; this->flags &= 0x7f; this->field_0x7c.HALF.LO = 0x27c; - gPlayerState.flags.all |= 0x4000; + gPlayerState.flags |= 0x4000; gSave.stats.effect = this->type + 1; gSave.stats.effectTimer = 600; if (this->type == 0) { diff --git a/src/ezloNag.c b/src/ezloNag.c index aa45634e..584b13fa 100644 --- a/src/ezloNag.c +++ b/src/ezloNag.c @@ -66,7 +66,7 @@ void sub_0801CF18(Element* arg0) { void sub_0801CF60(Element* arg0) { - if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gTextBox.doTextBox & 0x7f)) { + if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gMessage.doTextBox & 0x7f)) { arg0->unk4 = 0; arg0->unk0 &= -3; return; diff --git a/src/fileScreen.c b/src/fileScreen.c index b1e990be..0c8d4e6c 100644 --- a/src/fileScreen.c +++ b/src/fileScreen.c @@ -113,7 +113,7 @@ void CreateDialogBox(u32 arg0, u32 arg1) { } void sub_08050384(void) { - sub_0801C4A0(0, 0); + RecoverUI(0, 0); MemClear(&gBG0Buffer, sizeof(gBG0Buffer)); gScreen.bg.bg0Updated = 1; } @@ -144,14 +144,14 @@ void LoadOptionsFromSave(u32 idx) { brightnessPref = saveFile->brightnessPref; } - gUnk_02000000->messageSpeed = messageSpeed; - gUnk_02000000->brightnessPref = brightnessPref; + gSaveHeader->messageSpeed = messageSpeed; + gSaveHeader->brightnessPref = brightnessPref; gUsedPalettes = 0xFFFFFFFF; } void SetActiveSave(u32 idx) { if (idx < NUM_SAVE_SLOTS) { - gUnk_02000000->saveFileId = idx; + gSaveHeader->saveFileId = idx; MemCopy(&gUnk_02019EE0.saves[idx], &gSave, sizeof(gUnk_02019EE0.saves[idx])); } LoadOptionsFromSave(idx); @@ -181,8 +181,8 @@ void HandleChooseFileScreen(void) { sub_0801C208(); sub_080AD9B0(); sub_080AD918(); - if (gUnk_02019EE0.unk3 != gUnk_02000000->gameLanguage) { - gUnk_02019EE0.unk3 = gUnk_02000000->gameLanguage; + if (gUnk_02019EE0.unk3 != gSaveHeader->gameLanguage) { + gUnk_02019EE0.unk3 = gSaveHeader->gameLanguage; sub_080503A8(0x6); sub_080503A8(0xF); } @@ -202,7 +202,7 @@ static void HandleFileScreenEnter(void) { MemClear(&gUnk_0200AF00, sizeof(gUnk_0200AF00)); MemClear(&gUnk_02019EE0, sizeof(gUnk_02019EE0)); gUnk_02019EE0.unk3 = 7; - gUnk_02019EE0.unk6 = gUnk_02000000->gameLanguage > LANGUAGE_EN ? 3 : 0; + gUnk_02019EE0.unk6 = gSaveHeader->gameLanguage > LANGUAGE_EN ? 3 : 0; MemClear(&gUnk_02032EC0, sizeof(gUnk_02032EC0)); gUnk_02032EC0.lastState = 8; SetFileSelectState(STATE_NONE); @@ -297,7 +297,7 @@ void sub_0805070C(void) { var0->bgColor = 5; var0->unk1 = 1; var0->unk4 = 0x30; - var0->unk8 = gUnk_02000D00; + var0->unk8 = gTextGfxBuffer; for (i = 0; i < NUM_SAVE_SLOTS; i++) { var0->unk6 = 0; MemClear(var0->unk8, 0x200); @@ -323,7 +323,7 @@ void sub_08050790(void) { var0->bgColor = 5; var0->unk1 = 1; var0->unk4 = 0x80; - var0->unk8 = gUnk_02000D00; + var0->unk8 = gTextGfxBuffer; for (i = 0; i < 16; i++) { var0->unk6 = 0; var1 = i * 16; @@ -331,7 +331,7 @@ void sub_08050790(void) { sub_0805F7DC(var1, var0); var1++; } - MemCopy(gUnk_02000D00, (void*)(BG_VRAM + i * 0x400), 0x400); + MemCopy(gTextGfxBuffer, (void*)(BG_VRAM + i * 0x400), 0x400); } sub_0805F300(var0); } @@ -420,7 +420,7 @@ void sub_08050940(void) { keys &= ~(DPAD_UP | DPAD_DOWN); } - num_rows = gUnk_02000000->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS; + num_rows = gSaveHeader->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS; mode = gUnk_02032EC0.lastState; switch (keys) { case DPAD_UP: @@ -679,7 +679,7 @@ void HandleFileLanguageSelect(void) { void sub_08050DB8(void) { MemClear(&gBG2Buffer, sizeof(gBG2Buffer)); sub_080503A8(0xc); - gMenu.field_0x4 = gUnk_02000000->gameLanguage; + gMenu.field_0x4 = gSaveHeader->gameLanguage; sub_080A7114(1); } @@ -689,7 +689,7 @@ void sub_08050DE4(void) { if (gUnk_02019EE0.isTransitioning) return; - row_idx = gUnk_02000000->gameLanguage; + row_idx = gSaveHeader->gameLanguage; switch (gInput.newKeys) { case DPAD_UP: row_idx--; @@ -709,7 +709,7 @@ void sub_08050DE4(void) { break; case B_BUTTON: row_idx = gMenu.field_0x4; - gUnk_02000000->gameLanguage = gMenu.field_0x4; + gSaveHeader->gameLanguage = gMenu.field_0x4; SoundReq(SFX_MENU_CANCEL); SetFileSelectState(STATE_NONE); break; @@ -722,8 +722,8 @@ void sub_08050DE4(void) { if (row_idx > 6) { row_idx = 6; } - if (gUnk_02000000->gameLanguage != row_idx) { - gUnk_02000000->gameLanguage = row_idx; + if (gSaveHeader->gameLanguage != row_idx) { + gSaveHeader->gameLanguage = row_idx; SoundReq(SFX_TEXTBOX_CHOICE); } } @@ -869,7 +869,7 @@ NONMATCH("asm/non_matching/fileScreen/sub_080610B8.inc", void sub_080610B8(void) END_NONMATCH void sub_08051358(void) { - gMenu.field_0x12 = gUnk_02000000->gameLanguage == 0 ? 4 : 3; + gMenu.field_0x12 = gSaveHeader->gameLanguage == 0 ? 4 : 3; if (gMenu.focusCoords[0] != 0x0b || gMenu.focusCoords[1] != 0x5) { gMenu.focusCoords[1] = 0x5; @@ -958,7 +958,7 @@ u32 sub_080514BC(u32 a1) { u32 c; u32 idx; - if (gUnk_02000000->gameLanguage != 0) + if (gSaveHeader->gameLanguage != 0) return 1; switch (a1) { @@ -1169,7 +1169,7 @@ void sub_080517EC(void) { void sub_08051874(void) { s32 temp; - gUnk_02000000->saveFileId = gUnk_02019EE0.unk7; + gSaveHeader->saveFileId = gUnk_02019EE0.unk7; temp = HandleSave(0); gUnk_02019EE0.saveStatus[gUnk_02019EE0.unk7] = temp; switch (temp) { @@ -1202,8 +1202,8 @@ void sub_080518E4(void) { void HandleFileStart(void) { if (gMenu.menuType == 0) { gMenu.menuType = 1; - gUnk_02000000->messageSpeed = gSave.messageSpeed; - gUnk_02000000->brightnessPref = gSave.brightnessPref; + gSaveHeader->messageSpeed = gSave.messageSpeed; + gSaveHeader->brightnessPref = gSave.brightnessPref; gMain.funcIndex = 2; DoFade(5, 8); } diff --git a/src/game.c b/src/game.c index 6fd0526b..408f3e73 100644 --- a/src/game.c +++ b/src/game.c @@ -245,7 +245,7 @@ NONMATCH("asm/non_matching/game/sub_08052418.inc", void sub_08052418(int param_1 gUnk_020227E8._0[param_2 * 2].BYTES.byte1 = 1; MemCopy(&gUnk_080FCA8C, &temp, sizeof(temp)); i = param_1 * 0xc; - // temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gUnk_02000000->gameLanguage + i]] * 2; + // temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gSaveHeader->gameLanguage + i]] * 2; temp._13 = ((temp._13 & 0xfe) | gUnk_080FCAA4._8[i + 1]) & 1; sub_0805F46C(gUnk_080FCAA4._a[param_1], &temp); gScreen.bg.bg1xOffset = 1; @@ -265,7 +265,7 @@ void InitializePlayer(void) { gRoomControls.cameraTarget = pl; gPlayerState.playerAction = gUnk_080FCAC8[gScreenTransition.field_0xf]; if (!CheckGlobalFlag(EZERO_1ST)) { - gPlayerState.flags.all |= 8; + gPlayerState.flags |= 8; } switch (gScreenTransition.field_0xf) { case 0x2: diff --git a/src/intro.c b/src/intro.c index 5321ed2d..04783e12 100644 --- a/src/intro.c +++ b/src/intro.c @@ -94,7 +94,7 @@ static void HandleNintendoCapcomLogos(void) { gIntroState.timer = 120; LoadGfxGroup(16); LoadGfxGroup(1); - if (gUnk_02000000->gameLanguage == 0) { + if (gSaveHeader->gameLanguage == 0) { paletteGroup = 1; } else { paletteGroup = 2; @@ -148,13 +148,13 @@ static void HandleTitlescreen(void) { sub_080ADD30(); gUnk_02024490.unk0 = 1; LoadGfxGroup(2); - if (gUnk_02000000->gameLanguage == 0) { + if (gSaveHeader->gameLanguage == 0) { paletteGroup = 3; } else { paletteGroup = 4; } LoadPaletteGroup(paletteGroup); - if (gUnk_02000000->gameLanguage == 0) { + if (gSaveHeader->gameLanguage == 0) { // Blend first and second layer gScreen.controls.layerFXControl = BLDCNT_TGT1_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_EFFECT_BLEND; gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9); @@ -183,7 +183,7 @@ static void HandleTitlescreen(void) { if (gFadeControl.active) { return; } - if (gUnk_02000000->gameLanguage == 0) { + if (gSaveHeader->gameLanguage == 0) { HandleJapaneseTitlescreenAnimationIntro(); } else { HandleTitlescreenAnimationIntro(); @@ -240,8 +240,8 @@ static void HandleTitlescreen(void) { #endif } } - if (gIntroState.gameLanguage != gUnk_02000000->gameLanguage) { - gIntroState.gameLanguage = gUnk_02000000->gameLanguage; + if (gIntroState.gameLanguage != gSaveHeader->gameLanguage) { + gIntroState.gameLanguage = gSaveHeader->gameLanguage; LoadGfxGroup(3); } UpdateLightRays(); diff --git a/src/item/itemLantern.c b/src/item/itemLantern.c index 51f52afe..652dd5e0 100644 --- a/src/item/itemLantern.c +++ b/src/item/itemLantern.c @@ -21,9 +21,9 @@ void sub_08075A0C(ItemBehavior* this, u32 arg1) { s8* tmp; itemSlot = IsItemEquipped(this->behaviorID); if (gPlayerState.heldObject != 0 || gPlayerState.playerAction == 0x18 || gPlayerState.jumpStatus != 0 || - gPlayerState.field_0x2c != NULL || (gPlayerState.flags.all & 0x80) != 0) { + gPlayerState.field_0x2c != NULL || (gPlayerState.flags & 0x80) != 0) { ForceEquipItem(0xf, itemSlot); - gPlayerState.flags.all &= 0xff7fffff; + gPlayerState.flags &= 0xff7fffff; ForceEquipItem(0xf, itemSlot); sub_08077E78(this, arg1); } else { @@ -50,11 +50,11 @@ ASM_FUNC("asm/non_matching/eu/sub_08075ADC.inc", void sub_08075ADC(ItemBehavior* void sub_08075ADC(ItemBehavior* this, u32 arg1) { u32 bVar1; - if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags.all & 0x110) != 0 || + if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags & 0x110) != 0 || sub_08079D48() == 0) { this->field_0xf = 0; this->stateID += 1; - gPlayerState.flags.all |= 0x800000; + gPlayerState.flags |= 0x800000; bVar1 = 8 >> arg1; gPlayerState.field_0x3[1] = gPlayerState.field_0x3[1] & ~((bVar1 << 4) | bVar1); bVar1 = ~bVar1; @@ -73,11 +73,11 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) { Entity* object; s8* tmp; - if ((gPlayerState.flags.all & 0x110) == 0) { + if ((gPlayerState.flags & 0x110) == 0) { itemSlot = IsItemEquipped(this->behaviorID); if (!(((sub_08077F10(this) == 0) && (itemSlot < 2)) || (gPlayerState.jumpStatus != 0))) { ForceEquipItem(0xf, itemSlot); - gPlayerState.flags.all &= 0xff7fffff; + gPlayerState.flags &= 0xff7fffff; sub_08077E78(this, arg1); SoundReq(SFX_ITEM_LANTERN_OFF); } else { diff --git a/src/item/itemOcarina.c b/src/item/itemOcarina.c index bb4c6d34..c84ac6b9 100644 --- a/src/item/itemOcarina.c +++ b/src/item/itemOcarina.c @@ -24,7 +24,7 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) { gPlayerEntity.spriteSettings.b.flipX = 0; gPlayerEntity.flags &= 0x7f; gPlayerEntity.field_0x7a.HWORD = 2; - gPlayerState.flags.all |= 0x10000000; + gPlayerState.flags |= 0x10000000; gPlayerState.field_0x27[0] = -1; gUnk_02034490[0] = 1; gPlayerState.field_0xa = (8 >> arg1) | gPlayerState.field_0xa; @@ -41,7 +41,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe UpdateItemAnim(this); if ((this->field_0x5[9] & 0x80) != 0) { gPlayerEntity.flags |= 0x80; - gPlayerState.flags.all &= 0xefffffff; + gPlayerState.flags &= 0xefffffff; gPlayerState.field_0x27[0] = 0; gUnk_02034490[0] = 0; CreateBird(); diff --git a/src/item/itemPegasusBoots.c b/src/item/itemPegasusBoots.c index 9cd2ef72..b572d2f6 100644 --- a/src/item/itemPegasusBoots.c +++ b/src/item/itemPegasusBoots.c @@ -17,14 +17,13 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) { gPlayerState.field_0x1d[1] = 0; gPlayerState.field_0xe = 0; sub_08077E78(this, arg1); - } else { bVar1 = this->field_0x5[2] - 1; this->field_0x5[2] = bVar1; if ((bVar1 & 7) == 0) { SoundReq(SFX_PLY_LAND); } - if (((gPlayerState.flags.all & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) { + if (((gPlayerState.flags & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) { if (gPlayerState.field_0x10[2] == 0x11) { if (gPlayerEntity.spriteOffsetY == 0) { CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0); @@ -54,12 +53,12 @@ void sub_080768F8(ItemBehavior* this, u32 arg1) { u32 bVar2; bVar1 = gPlayerState.field_0x1c | gPlayerState.field_0x3[1] | gPlayerState.heldObject | gPlayerState.jumpStatus; - bVar2 = (gPlayerState.flags.all & 0x1000); + bVar2 = (gPlayerState.flags & 0x1000); bVar1 |= bVar2; if (bVar1 == 0) { gPlayerState.field_0x1d[1] = 1; gPlayerState.field_0x1d[4] = bVar1; - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { this->field_0x5[2] = 0x10; } else { gPlayerState.field_0x8 = 0xc14; diff --git a/src/item/itemRocsCape.c b/src/item/itemRocsCape.c index ba98de91..d718e610 100644 --- a/src/item/itemRocsCape.c +++ b/src/item/itemRocsCape.c @@ -22,7 +22,7 @@ extern bool32 sub_08077EFC(ItemBehavior*); if ((gPlayerState.jumpStatus != 0) && ((gPlayerState.jumpStatus & 7) != 3)) goto _08076710; if (-1 < gPlayerEntity.height.WORD) { - gPlayerEntity.field_0x20 = 0x20000; + gPlayerEntity.hVelocity = 0x20000; gPlayerState.jumpStatus = 1; gPlayerState.field_0x2c = NULL; this->stateID += 1; @@ -45,7 +45,7 @@ extern bool32 sub_08077EFC(ItemBehavior*); gPlayerState.jumpStatus = 1; gPlayerState.field_0xe = -1; gPlayerState.field_0x2c = NULL; - gPlayerEntity.field_0x20 = 0x20000; + gPlayerEntity.hVelocity = 0x20000; _0807673C: sub_08077F84(); SoundReq(SFX_PLY_VO4); @@ -67,10 +67,10 @@ void sub_08076758(ItemBehavior* this, u32 arg1) { ((gPlayerState.jumpStatus & 7) != 3)) { if (sub_08077EFC(this)) { if (this->stateID < 2) { - if ((gPlayerEntity.field_0x20 < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) { + if ((gPlayerEntity.hVelocity < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) { this->stateID = 2; gPlayerEntity.field_0x7a.HWORD = 2; - gPlayerEntity.field_0x20 = 0x20000; + gPlayerEntity.hVelocity = 0x20000; gPlayerState.jumpStatus |= 0x10; gPlayerState.field_0x8 = 0x288; SoundReq(SFX_172); diff --git a/src/item/itemSword.c b/src/item/itemSword.c index 951ef527..c18178f2 100644 --- a/src/item/itemSword.c +++ b/src/item/itemSword.c @@ -72,9 +72,9 @@ void sub_0807564C(ItemBehavior* this, u32 arg1) { void sub_08075694(ItemBehavior* this, u32 arg1) { this->field_0x5[2] = 1; - if ((gPlayerState.flags.all & 0x8000000) != 0) { - gPlayerState.flags.all &= 0xf7ffffff; - gPlayerState.flags.all &= 0xfffbffff; + if ((gPlayerState.flags & 0x8000000) != 0) { + gPlayerState.flags &= 0xf7ffffff; + gPlayerState.flags &= 0xfffbffff; sub_08077DF4(this, 300); } else { gPlayerState.field_0xab = 1; @@ -86,7 +86,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) { gPlayerEntity.field_0x40 = 0x1e; gPlayerState.field_0x1a[1] |= 0x40; gPlayerState.field_0x1a[1] &= 0xdf; - if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags.all & 0x400000) == 0)) { + if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & 0x400000) == 0)) { gPlayerState.field_0xa0[0] = 0x01; sub_0807A108(); } @@ -121,10 +121,10 @@ void sub_080758B0(ItemBehavior* this, u32 arg1) { ASM_FUNC("asm/non_matching/itemSword/sub_08075900.inc", void sub_08075900(ItemBehavior* this, u32 arg1)) void sub_080759B8(ItemBehavior* this, u32 arg1) { - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { gPlayerEntity.field_0x40 = 0; } - gPlayerState.flags.all &= 0xf7ffffff; + gPlayerState.flags &= 0xf7ffffff; gPlayerState.field_0x1a[1] = 0; gPlayerState.field_0x2c = NULL; sub_08077E78(this, arg1); diff --git a/src/main.c b/src/main.c index 4eb3d881..bff9997b 100644 --- a/src/main.c +++ b/src/main.c @@ -80,7 +80,7 @@ void AgbMain(void) { gMain.ticks++; sScreenHandlers[gMain.screen](); - MessageUpdate(); + MessageMain(); UpdateFade(); SoundLoop(); break; @@ -191,7 +191,7 @@ NONMATCH("asm/non_matching/sub_080560B8.inc", static void sub_080560B8(void)) { case -1: default: MemCopy(&sDefaultSettings, (void*)0x2000000, 16); - Write_02000000(gUnk_02000000); + Write_02000000(gSaveHeader); break; } } @@ -211,14 +211,13 @@ END_NONMATCH u32 sub_08056134(void) { #ifdef EU - if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) || - (gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) || - (gUnk_02000000->gameLanguage <= GAME_LANGUAGE) || (gUnk_02000000->gameLanguage >= 7) || - (gUnk_02000000->_e != 0)) + if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) || + (gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) || + (gSaveHeader->gameLanguage <= GAME_LANGUAGE) || (gSaveHeader->gameLanguage >= 7) || (gSaveHeader->_e != 0)) #else - if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) || - (gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) || - (gUnk_02000000->gameLanguage != GAME_LANGUAGE) || (gUnk_02000000->_e != 0)) + if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) || + (gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) || + (gSaveHeader->gameLanguage != GAME_LANGUAGE) || (gSaveHeader->_e != 0)) #endif return FALSE; diff --git a/src/manager/manager1.c b/src/manager/manager1.c index 200fc720..59a9373f 100644 --- a/src/manager/manager1.c +++ b/src/manager/manager1.c @@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) { u8* pbVar2; gUnk_08107C5C[this->action](this); - gUnk_08107C48[((u8*)&this->field_0x20)[1]](this); - bVar1 = gUnk_08107C40[((u8*)&this->field_0x20)[1]]; - if ((bVar1 != 0) && (*(u8*)&this->field_0x20 != bVar1)) { - ((u8*)&this->field_0x20)[0] = bVar1; + gUnk_08107C48[((u8*)&this->hVelocity)[1]](this); + bVar1 = gUnk_08107C40[((u8*)&this->hVelocity)[1]]; + if ((bVar1 != 0) && (*(u8*)&this->hVelocity != bVar1)) { + ((u8*)&this->hVelocity)[0] = bVar1; LoadGfxGroup(bVar1); } } @@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) { void sub_080570B8(Entity* this) { u8* pbVar1; - LoadGfxGroup(((u8*)&this->field_0x20)[0]); + LoadGfxGroup(((u8*)&this->hVelocity)[0]); this->height.WORD = 0; - pbVar1 = ((u8*)&this->field_0x20 + 1); + pbVar1 = ((u8*)&this->hVelocity + 1); if (*pbVar1 == 3) { gScreen.affine.bg3Updated = 1; } else { @@ -46,9 +46,9 @@ void sub_080570F8(void) { void sub_08057118(Entity* this) { this->actionDelay = 0; - *(u8*)&this->field_0x20 = 0; - ((u8*)&this->field_0x20)[1] = 0; - ((u8*)&this->field_0x20)[2] = 0; + *(u8*)&this->hVelocity = 0; + ((u8*)&this->hVelocity)[1] = 0; + ((u8*)&this->hVelocity)[2] = 0; this->action = 1; gScreen.affine.bg3Control = 0x1e04; gScreen.lcd.displayControl |= 0x800; diff --git a/src/manager/manager1A.c b/src/manager/manager1A.c index c006ddaf..838fd898 100644 --- a/src/manager/manager1A.c +++ b/src/manager/manager1A.c @@ -139,9 +139,9 @@ void sub_0805B168(Manager1A* this) { u32 sub_0805B1CC(Manager1A* this) { u32 re = 0; if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) { - if ((gPlayerState.flags.all & 0x4) && (gPlayerState.flags.all & 0x1)) { - gPlayerState.flags.all |= 0x8000; - } else if (gPlayerState.flags.all & 0x8000) { + if ((gPlayerState.flags & 0x4) && (gPlayerState.flags & 0x1)) { + gPlayerState.flags |= 0x8000; + } else if (gPlayerState.flags & 0x8000) { re = 1; } } @@ -157,7 +157,7 @@ void sub_0805B210(Manager1A* this) { gScreenTransition.areaID = tmp->unk_01; gScreenTransition.roomID = tmp->unk_02; gScreenTransition.playerLayer = tmp->unk_03; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { gScreenTransition.field_0xf = 6; } else { gScreenTransition.field_0xf = 2; diff --git a/src/manager/manager26.c b/src/manager/manager26.c index 6fa80711..96d0d270 100644 --- a/src/manager/manager26.c +++ b/src/manager/manager26.c @@ -76,7 +76,7 @@ void sub_0805C7C4(Manager26* this) { } void sub_0805C7CC(Manager26* this) { - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x10) { this->manager.unk_0d = 1; } else { diff --git a/src/manager/manager3.c b/src/manager/manager3.c index 2a6a4c24..99884daa 100644 --- a/src/manager/manager3.c +++ b/src/manager/manager3.c @@ -47,7 +47,7 @@ void Manager3_Main(Manager3* this) { gArea.field_0x18 = 1; gArea.curPortalType = 5; } else { - if ((gPlayerState.flags.all & 0x20) && gPlayerState.jumpStatus == 0) { + if ((gPlayerState.flags & 0x20) && gPlayerState.jumpStatus == 0) { gArea.field_0x18 = 2; } else { if (sub_08057810()) { @@ -94,7 +94,7 @@ void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) { } u32 sub_08057810(void) { - if ((gPlayerState.flags.all & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) && + if ((gPlayerState.flags & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) && (gPlayerState.heldObject == 0)) { switch (gPlayerState.field_0xa8) { case 0: diff --git a/src/manager/manager37.c b/src/manager/manager37.c index 35003011..c05425b0 100644 --- a/src/manager/manager37.c +++ b/src/manager/manager37.c @@ -79,13 +79,13 @@ void sub_0805DF4C(Manager* this) { if (--this->unk_0e == 0) { this->action = 3; this->unk_0e = 0x1e; - TextboxNoOverlapFollow(0x164f); + MessageFromTarget(0x164f); } } } void sub_0805DF98(Manager* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { if (this->unk_0e != 0) { this->unk_0e -= 1; } else { diff --git a/src/manager/manager39.c b/src/manager/manager39.c index d6018b42..d607b3c2 100644 --- a/src/manager/manager39.c +++ b/src/manager/manager39.c @@ -37,7 +37,7 @@ void sub_0805E1F8(u32, u32); void Manager39_Main(Manager39* this) { gUnk_08108E28[this->manager.action](this); - if ((gRoomControls.roomID != this->unk_20) || (gTextBox.doTextBox & 0x7F)) { + if ((gRoomControls.roomID != this->unk_20) || (gMessage.doTextBox & 0x7F)) { sub_0805E1D8(this); } } diff --git a/src/manager/manager6.c b/src/manager/manager6.c index 7c7f3cfb..d2a8fc66 100644 --- a/src/manager/manager6.c +++ b/src/manager/manager6.c @@ -18,7 +18,7 @@ void Manager6_Main(Manager6* this) { for (i = this->warpList; i->posX != 0xFFFF; i++) { tmp = (i->unk_07.all & 0x3); if (((tmp & (gPlayerEntity.collisionLayer)) != 0) && - (((gPlayerState.flags.all & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) && + (((gPlayerState.flags & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) && (CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) && (gPlayerEntity.height.HALF.HI == 0)) { DoExitTransition(GetCurrentRoomProperty(i->unk_06)); diff --git a/src/manager/managerA.c b/src/manager/managerA.c index 3f1b841e..6003f891 100644 --- a/src/manager/managerA.c +++ b/src/manager/managerA.c @@ -49,7 +49,7 @@ void sub_080585DC(ManagerA*); void sub_08058408(ManagerA* this) { u32 tmp2; - tmp2 = (gPlayerState.flags.all & 0x08); + tmp2 = (gPlayerState.flags & 0x08); if (tmp2 != 0) return; if (!CheckPlayerInRegion(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) @@ -59,7 +59,7 @@ void sub_08058408(ManagerA* this) { return; case 2: sub_080585DC(this); - if ((gPlayerState.flags.all & 0x80) == 0) + if ((gPlayerState.flags & 0x80) == 0) return; case 0: default: @@ -118,7 +118,7 @@ extern void UnfreezeTime(void); void sub_08058514(ManagerA* this) { switch (this->manager.unk_0d) { case 1: - if ((gPlayerState.flags.all & 0x1235) != 0) + if ((gPlayerState.flags & 0x1235) != 0) return; if (gPlayerEntity.height.HALF.HI != 0) return; diff --git a/src/manager/managerF.c b/src/manager/managerF.c index d6f916a5..69f8c369 100644 --- a/src/manager/managerF.c +++ b/src/manager/managerF.c @@ -343,7 +343,7 @@ void SetDirtTile(u32 tile) { void sub_08059368(ManagerF* this) { this->manager.action = 1; - if (this->unk_3c == gCurrentTextBox._28) { + if (this->unk_3c == gTextRender.curToken.textIndex) { SetFlag(this->unk_3e); DeleteThisEntity(); } @@ -360,7 +360,7 @@ void sub_0805938C(ManagerF* this) { } u32 sub_080593CC(ManagerF* this) { - if (!(gPlayerState.flags.all & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 && + if (!(gPlayerState.flags & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 && (gPlayerState.field_0x90.HALF.LO & 0xF00) == 0x400) { return sub_0806FCB8(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6); } diff --git a/src/npc/beedle.c b/src/npc/beedle.c index b4d25858..55d54a01 100644 --- a/src/npc/beedle.c +++ b/src/npc/beedle.c @@ -53,14 +53,14 @@ void sub_08063314(Entity* this) { InitializeAnimation(this, offset); } if (this->interactType != '\0') { - TextboxNoOverlapFollow(this->actionDelay + 0xA01); + MessageFromTarget(this->actionDelay + 0xA01); this->action++; } sub_0806ED78(this); } void sub_0806336C(Entity* this) { - if ((gTextBox.doTextBox & 0x7F) == 0) { + if ((gMessage.doTextBox & 0x7F) == 0) { this->action++; InitializeAnimation(this, 8); } diff --git a/src/npc/bigGoron.c b/src/npc/bigGoron.c index 34a336ff..d5320463 100644 --- a/src/npc/bigGoron.c +++ b/src/npc/bigGoron.c @@ -184,7 +184,7 @@ void sub_0806D274(Entity* this) { case 0: case 1: default: - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->frameIndex = 2; break; } diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c index 6567e840..d6069c99 100644 --- a/src/npc/bladeBrothers.c +++ b/src/npc/bladeBrothers.c @@ -87,7 +87,7 @@ void sub_08068A4C(Entity* this) { if (this->interactType != 0) { this->interactType = 0; this->action = 2; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } } @@ -307,42 +307,42 @@ switchD_08068d12_caseD_0: // Introduction dialoague void sub_08068DB8(Entity* this) { - TextboxNoOverlap(gUnk_08111664[this->actionDelay], this); + MessageNoOverlap(gUnk_08111664[this->actionDelay], this); } // Ask to teach dialoague void sub_08068DD0(Entity* this) { - TextboxNoOverlap(gUnk_0811167A[this->actionDelay], this); + MessageNoOverlap(gUnk_0811167A[this->actionDelay], this); } // Technique Dialogue void sub_08068DE8(Entity* this) { - TextboxNoOverlap(gUnk_08111690[this->actionDelay], this); + MessageNoOverlap(gUnk_08111690[this->actionDelay], this); } // Posession dialogue void sub_08068E00(Entity* this) { - TextboxNoOverlap(gUnk_081116A6[this->actionDelay], this); + MessageNoOverlap(gUnk_081116A6[this->actionDelay], this); } void sub_08068E18(Entity* this) { - TextboxNoOverlap(gUnk_081116BC[this->actionDelay], this); + MessageNoOverlap(gUnk_081116BC[this->actionDelay], this); } void sub_08068E30(Entity* this) { - TextboxNoOverlap(gUnk_081116D2[this->actionDelay], this); + MessageNoOverlap(gUnk_081116D2[this->actionDelay], this); } void sub_08068E48(Entity* this) { - TextboxNoOverlap(gUnk_081116E8[this->actionDelay], this); + MessageNoOverlap(gUnk_081116E8[this->actionDelay], this); } void sub_08068E60(Entity* this) { - TextboxNoOverlap(gUnk_081116FE[this->actionDelay], this); + MessageNoOverlap(gUnk_081116FE[this->actionDelay], this); } void sub_08068E78(Entity* this) { - TextboxNoOverlap(gUnk_08111714[this->actionDelay], this); + MessageNoOverlap(gUnk_08111714[this->actionDelay], this); } void sub_08068E90(Entity* this) { diff --git a/src/npc/brocco.c b/src/npc/brocco.c index 46ec7aa5..e38053fa 100644 --- a/src/npc/brocco.c +++ b/src/npc/brocco.c @@ -34,7 +34,7 @@ void sub_0806355C(Entity* this) { ASM_FUNC("asm/non_matching/brocco/sub_08063584.inc", void sub_08063584(Entity* this)) void sub_08063608(Entity* this) { - u8 tmp = gTextBox.doTextBox & 0x7f; + u8 tmp = gMessage.doTextBox & 0x7f; if (tmp == 0) { this->action = 1; this->field_0xf = tmp; diff --git a/src/npc/carpenter.c b/src/npc/carpenter.c index 9b1e5606..aa070e14 100644 --- a/src/npc/carpenter.c +++ b/src/npc/carpenter.c @@ -77,7 +77,7 @@ void sub_080672C8(Entity* this) { tmp = CheckGlobalFlag(TABIDACHI); dialog = BOOLCAST(tmp); } - TextboxNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this); + MessageNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this); } void sub_08067304(Entity* this) { diff --git a/src/npc/castleMaid.c b/src/npc/castleMaid.c index 425dd203..bf2289c8 100644 --- a/src/npc/castleMaid.c +++ b/src/npc/castleMaid.c @@ -80,7 +80,7 @@ NONMATCH("asm/non_matching/castleMaid/sub_08064570.inc", void sub_08064570(Entit } break; case 2: - if ((gTextBox.doTextBox & 0x7f) != 0) { + if ((gMessage.doTextBox & 0x7f) != 0) { return; } this->action = 1; @@ -111,7 +111,7 @@ void sub_0806464C(Entity* this) { } else { tmp = 1; } - TextboxNoOverlap(gUnk_0810F88C[tmp], this); + MessageNoOverlap(gUnk_0810F88C[tmp], this); } void sub_08064688(Entity* this) { diff --git a/src/npc/cat.c b/src/npc/cat.c index b08369a0..30160f98 100644 --- a/src/npc/cat.c +++ b/src/npc/cat.c @@ -151,7 +151,7 @@ void sub_0806797C(Entity* this) { void sub_0806799C(Entity* this) { UpdateAnimationSingleFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { sub_08067B08(this); sub_0805E3A0(this, 1); } @@ -272,7 +272,7 @@ void sub_08067C44(Entity* this) { s32 iVar4; u32 uVar5; - uVar5 = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f); + uVar5 = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f); if (uVar5 != this->field_0x68.HALF.HI) { if (uVar5 == 0) { sub_08078778(this); diff --git a/src/npc/cow.c b/src/npc/cow.c index 411b139f..0a1ec389 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -181,7 +181,7 @@ void Cow_ShowDialogue(Entity* ent) { void sub_0806920C(Entity* ent) { // TODO: figure out what bitfield flag this is - u32 var0 = gPlayerState.flags.all & 0x80; + u32 var0 = gPlayerState.flags & 0x80; u32 var1 = -var0 >> 0x1F; if (var1 != ent->field_0x6c.HALF.HI) { @@ -200,7 +200,7 @@ void sub_0806924C(Entity* ent) { s8 itype = ent->interactType; if (itype != 0) { // TODO: figure out what bitfield flag this is - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { if (itype == 2) { ent->action = 4; sub_0806F118(ent); diff --git a/src/npc/cucco.c b/src/npc/cucco.c index abfe0904..37d3efb4 100644 --- a/src/npc/cucco.c +++ b/src/npc/cucco.c @@ -59,7 +59,7 @@ void sub_0806E648(Entity* this) { void sub_0806E65C(Entity* this) { if (this->interactType != 0) { - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { if (this->interactType == 2) { this->action = 4; sub_0806F118(this); diff --git a/src/npc/cuccoChick.c b/src/npc/cuccoChick.c index a1963b41..faf90f6e 100644 --- a/src/npc/cuccoChick.c +++ b/src/npc/cuccoChick.c @@ -53,7 +53,7 @@ void sub_0806E824(Entity* this) { void sub_0806E838(Entity* this) { if (this->interactType != 0) { - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { if (this->interactType == 2) { this->action = 3; sub_0806F118(this); @@ -69,7 +69,7 @@ void sub_0806E838(Entity* this) { } void sub_0806E884(Entity* this) { - TextboxNoOverlap(0xdb6, this); + MessageNoOverlap(0xdb6, this); } void CuccoChick_Fusion(Entity* this) { @@ -79,7 +79,7 @@ void CuccoChick_Fusion(Entity* this) { this->frameIndex = 1; } else { if (sub_08003FC4(this, 0x3000) == 0) { - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; } } } diff --git a/src/npc/dampe.c b/src/npc/dampe.c index 6293bcd7..f42e3cce 100644 --- a/src/npc/dampe.c +++ b/src/npc/dampe.c @@ -66,7 +66,7 @@ void sub_0806BE84(Entity* this, ScriptExecutionContext* context) { if (GetInventoryValue(0x3C) >= 2) { msgIndex = 2; } - TextboxNoOverlap(gUnk_08113344[msgIndex], this); + MessageNoOverlap(gUnk_08113344[msgIndex], this); } void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) { @@ -83,7 +83,7 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) { msgIndex = 2; } - TextboxNoOverlap(gUnk_0811334A[msgIndex], this); + MessageNoOverlap(gUnk_0811334A[msgIndex], this); } void sub_0806BEFC() { diff --git a/src/npc/dog.c b/src/npc/dog.c index 6f9ed898..7f312ff4 100644 --- a/src/npc/dog.c +++ b/src/npc/dog.c @@ -71,7 +71,7 @@ void sub_08069B44(Entity* this) { if ((this->flags & 2) != 0) { sub_0807DD50(this); } - if (((this->type == 0) && ((gPlayerState.flags.all & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) { + if (((this->type == 0) && ((gPlayerState.flags & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) { this->action = 4; } #if defined(JP) || defined(EU) || defined(DEMO_JP) @@ -87,7 +87,7 @@ void sub_08069B44(Entity* this) { void sub_08069C40(Entity* this) { UpdateAnimationSingleFrame(this); if (sub_08069F90(this) != 0) { - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { sub_08069CB8(this); } else { this->animationState = GetAnimationState(this); @@ -282,14 +282,14 @@ u32 sub_08069F90(Entity* this) { } void sub_08069FBC(Entity* this) { - u32 tmp = (gPlayerState.flags.all & 0x80) != 0 ? 0x24 : 0x20; + u32 tmp = (gPlayerState.flags & 0x80) != 0 ? 0x24 : 0x20; if ((this->animationState == 1) || (this->animationState == 3)) { this->field_0x6a.HALF.HI = tmp; } } void sub_08069FE8(Entity* this) { - u32 tmp = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f); + u32 tmp = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f); if (tmp != this->field_0x6a.HALF.LO) { if (tmp == 0) { sub_08078778(this); @@ -302,7 +302,7 @@ void sub_08069FE8(Entity* this) { void sub_0806A028(Entity* this) { if (this->interactType != 0) { - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { if (this->interactType == 2) { this->action = 6; sub_0806F118(this); @@ -326,7 +326,7 @@ void sub_0806A080(Entity* this) { void sub_0806A0A4(Entity* this) { s32 dialog; - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { dialog = 4; #if defined(JP) || defined(EU) || defined(DEMO_JP) if (CheckLocalFlag(0xcc) == 0) { @@ -364,12 +364,12 @@ void sub_0806A0A4(Entity* this) { } } } - TextboxNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this); + MessageNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this); } void sub_0806A144(Entity* this) { s32 dialog = 4; - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { dialog = 3; if ((GetInventoryValue(0x46) == 0) && (CheckGlobalFlag(0x29) != 0)) { if (CheckLocalFlag(0x85) == 0) { @@ -379,7 +379,7 @@ void sub_0806A144(Entity* this) { } } } - TextboxNoOverlap(gUnk_08111FD8[dialog], this); + MessageNoOverlap(gUnk_08111FD8[dialog], this); } void Dog_Fusion(Entity* this) { diff --git a/src/npc/drLeft.c b/src/npc/drLeft.c index 65863d72..9a99a651 100644 --- a/src/npc/drLeft.c +++ b/src/npc/drLeft.c @@ -77,7 +77,7 @@ void sub_0806C038(Entity* this) { } } } - TextboxNoOverlap(gUnk_081133A4[index], this); + MessageNoOverlap(gUnk_081133A4[index], this); } void sub_0806C09C(Entity* this) { diff --git a/src/npc/epona.c b/src/npc/epona.c index 1846d4f9..4c0abc0f 100644 --- a/src/npc/epona.c +++ b/src/npc/epona.c @@ -38,7 +38,7 @@ void sub_08065A00(Entity* this) { } void sub_08065A10(Entity* this) { - if ((gTextBox.doTextBox & 0x7F) == 0) { + if ((gMessage.doTextBox & 0x7F) == 0) { this->action = 1; InitAnimationForceUpdate(this, this->animationState / 2); } @@ -58,7 +58,7 @@ void sub_08065A50(Entity* this) { void sub_08065A64(Entity* this) { u32 uVar2; - uVar2 = -(gPlayerState.flags.all & 0x80) >> 0x1f; + uVar2 = -(gPlayerState.flags & 0x80) >> 0x1f; if (uVar2 != this->field_0x68.HALF.HI) { if (uVar2 == 0) { sub_08078778(this); @@ -71,7 +71,7 @@ void sub_08065A64(Entity* this) { void sub_08065AA4(Entity* this) { if (this->interactType != 0) { - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { if (this->interactType == 2) { this->action = 4; sub_0806F118(this); diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c index e42500e8..48c5f42d 100644 --- a/src/npc/forestMinish.c +++ b/src/npc/forestMinish.c @@ -149,7 +149,7 @@ void sub_080601D4(Entity* this) { temp = CheckKinstoneFused(0x17); uVar2 = BOOLCAST(temp); } - TextboxNoOverlap(gUnk_0810A354[uVar2], this); + MessageNoOverlap(gUnk_0810A354[uVar2], this); } void sub_08060208(Entity* this) { @@ -197,7 +197,7 @@ void sub_08060270(Entity* this) { SetLocalFlag(0x76); } } - TextboxNoOverlap(gUnk_0810A35A[index], this); + MessageNoOverlap(gUnk_0810A35A[index], this); } void sub_080602BC(Entity* this) { @@ -213,7 +213,7 @@ void sub_080602BC(Entity* this) { index = 0; } } - TextboxNoOverlap(gUnk_0810A362[index], this); + MessageNoOverlap(gUnk_0810A362[index], this); } void sub_0806030C(Entity* this, ScriptExecutionContext* context) { diff --git a/src/npc/ghostBrothers.c b/src/npc/ghostBrothers.c index 31bedabb..e3ca2a68 100644 --- a/src/npc/ghostBrothers.c +++ b/src/npc/ghostBrothers.c @@ -115,7 +115,7 @@ void sub_08065F20(Entity* this) { UpdateAnimationSingleFrame(this); if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); this->animIndex += 1; if (gUnk_0811033C[this->animIndex] == 0) { this->animIndex = 0; diff --git a/src/npc/gorman.c b/src/npc/gorman.c index 861a29d8..8c45efdc 100644 --- a/src/npc/gorman.c +++ b/src/npc/gorman.c @@ -99,7 +99,7 @@ void sub_08069888(Entity* this) { } else { index = 5; } - TextboxNoOverlap(gUnk_08111C50[index], this); + MessageNoOverlap(gUnk_08111C50[index], this); } ASM_FUNC("asm/non_matching/gorman/sub_0806991C.inc", void sub_0806991C(Entity* this, ScriptExecutionContext* context)) diff --git a/src/npc/goron.c b/src/npc/goron.c index 441a80a6..a2498d86 100644 --- a/src/npc/goron.c +++ b/src/npc/goron.c @@ -41,13 +41,13 @@ void sub_08069328(Entity* this) { this->action = 2; sub_0805E47C(this); InitAnimationForceUpdate(this, 8); - TextboxNoOverlapFollow(this->actionDelay + (0x90 << 5)); + MessageFromTarget(this->actionDelay + (0x90 << 5)); } } void sub_08069390(Entity* this) { UpdateAnimationSingleFrame(this); - if ((gTextBox.doTextBox & 0x7F) == 0) { + if ((gMessage.doTextBox & 0x7F) == 0) { this->action = 1; this->interactType = 0; sub_0805E584(this); diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c index ca41b899..f081cead 100644 --- a/src/npc/goronMerchant.c +++ b/src/npc/goronMerchant.c @@ -52,9 +52,9 @@ void sub_080695AC(Entity* this) { void sub_080695E8(Entity* this) { UpdateAnimationSingleFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; - this->interactType = gTextBox.doTextBox & 0x7f; + this->interactType = gMessage.doTextBox & 0x7f; sub_0805E584(this); InitAnimationForceUpdate(this, this->animationState); } @@ -80,8 +80,8 @@ void sub_08069654(Entity* this) { void sub_08069660(Entity* this) { u32 uVar1; - TextboxNoOverlap(0x2c1c, this); - gTextBox.field_0x10 = (u16)GoronMerchant_GetSalePrice(this); + MessageNoOverlap(0x2c1c, this); + gMessage.field_0x10 = (u16)GoronMerchant_GetSalePrice(this); } void sub_08069684(void) { @@ -142,11 +142,11 @@ void GoronMerchant_TryToBuyKinstone(Entity* this, ScriptExecutionContext* contex gRoomVars.field_0x7 = 0; context->condition = 1; } else { - TextboxNoOverlap(0x2c1f, this); + MessageNoOverlap(0x2c1f, this); context->condition = 0; } } else { - TextboxNoOverlap(0x2c1e, this); + MessageNoOverlap(0x2c1e, this); context->condition = 0; } gActiveScriptInfo.flags = gActiveScriptInfo.flags | 1; diff --git a/src/npc/guard.c b/src/npc/guard.c index 0f6470ad..736625cd 100644 --- a/src/npc/guard.c +++ b/src/npc/guard.c @@ -107,7 +107,7 @@ void sub_08063E54(Entity* this) { } void sub_08063E6C(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; InitializeAnimation(this, this->animationState + 4); } @@ -160,7 +160,7 @@ void sub_08063F20(Entity* this) { } void sub_08063F78(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = this->action - 1; InitializeAnimation(this, (this->animationState >> 1) + 4 + *(s8*)&this->field_0x70); } diff --git a/src/npc/kid.c b/src/npc/kid.c index e4c4c80a..459e545d 100644 --- a/src/npc/kid.c +++ b/src/npc/kid.c @@ -70,7 +70,7 @@ void sub_08062130(Entity* this) { } void sub_08062194(Entity* this) { - TextboxNoOverlapFollow(0); + MessageFromTarget(0); this->action = 1; this->interactType = 0; } @@ -132,7 +132,7 @@ NONMATCH("asm/non_matching/kid/sub_080621AC.inc", void sub_080621AC(Entity* this break; case 2: GetNextFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; } break; @@ -203,13 +203,13 @@ END_NONMATCH NONMATCH("asm/non_matching/kid/sub_08062634.inc", void sub_08062634(Entity* this)) { u32 a = this->type2; u32 b = (Random() & 1); - TextboxNoOverlap(*((u16*)gUnk_0810BDE8 + b + a * 2), this); + MessageNoOverlap(*((u16*)gUnk_0810BDE8 + b + a * 2), this); } END_NONMATCH NONMATCH("asm/non_matching/kid/sub_0806265C.inc", void sub_0806265C(Entity* this, ScriptExecutionContext* context)) { if (gSave.unk8 == 0) { - TextboxNoOverlap(0, this); + MessageNoOverlap(0, this); } else { ShowNPCDialogue(this, &gUnk_0810BE10[this->type * 9 + gSave.unk8]); } diff --git a/src/npc/kingDaltus.c b/src/npc/kingDaltus.c index 714ed1f6..f296cd4b 100644 --- a/src/npc/kingDaltus.c +++ b/src/npc/kingDaltus.c @@ -90,7 +90,7 @@ void sub_0806673C(Entity* this) { } else { index = 3; } - TextboxNoOverlap(gUnk_081104F8[index], this); + MessageNoOverlap(gUnk_081104F8[index], this); } void KingDaltus_Fusion(Entity* this) { diff --git a/src/npc/kingGustaf.c b/src/npc/kingGustaf.c index cd0d3722..97388682 100644 --- a/src/npc/kingGustaf.c +++ b/src/npc/kingGustaf.c @@ -16,12 +16,12 @@ void KingGustaf(Entity* this) { gScreen.controls.layerFXControl = 0x3f40; gScreen.controls.alphaBlend = 0x1000; this->speed = 0x1000; - this->field_0x20 = 0; + this->hVelocity = 0; } else { sub_0807DD94(this, 0); speed = 0x100; speed *= this->speed; - speed += this->field_0x20; + speed += this->hVelocity; speed >>= 0x10; if (speed > 0x10) { speed = 0x10; diff --git a/src/npc/librari.c b/src/npc/librari.c index 992a920c..f5e1b629 100644 --- a/src/npc/librari.c +++ b/src/npc/librari.c @@ -55,7 +55,7 @@ void sub_0806B260(Entity* this, ScriptExecutionContext* context) { } else { index = 3; } - TextboxNoOverlap(gUnk_08112D48[index], this); + MessageNoOverlap(gUnk_08112D48[index], this); } extern u16 gUnk_08112D50[]; @@ -82,7 +82,7 @@ void sub_0806B2B4(Entity* this) { } else { index = 0; } - TextboxNoOverlap(gUnk_08112D50[index], this); + MessageNoOverlap(gUnk_08112D50[index], this); } void Librari_Fusion(Entity* this) { diff --git a/src/npc/librarians.c b/src/npc/librarians.c index f88ecc6d..9b134e7a 100644 --- a/src/npc/librarians.c +++ b/src/npc/librarians.c @@ -57,5 +57,5 @@ void sub_0806BBB0(Entity* this) { } else { tmp = 2; } - TextboxNoOverlap(gUnk_08113078[tmp], this); + MessageNoOverlap(gUnk_08113078[tmp], this); } diff --git a/src/npc/mailbox.c b/src/npc/mailbox.c index 6309b2bd..43b87eb8 100644 --- a/src/npc/mailbox.c +++ b/src/npc/mailbox.c @@ -42,7 +42,7 @@ void sub_08063254(Entity* this, u32 unused) { sub_08063280(this, unused); if ((this->frames.all & 0x80) != 0) { this->action = 3; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } } diff --git a/src/npc/marcy.c b/src/npc/marcy.c index 35e66f8f..89937936 100644 --- a/src/npc/marcy.c +++ b/src/npc/marcy.c @@ -50,7 +50,7 @@ void sub_08062D18(Entity* this, ScriptExecutionContext* context) { tmp = 3; } - TextboxNoOverlap(gUnk_0810C34C[tmp], this); + MessageNoOverlap(gUnk_0810C34C[tmp], this); if (tmp == 0) { context->condition = TRUE; } else { diff --git a/src/npc/melari.c b/src/npc/melari.c index 99c04122..9f1df856 100644 --- a/src/npc/melari.c +++ b/src/npc/melari.c @@ -50,7 +50,7 @@ void sub_08068730(Entity* this) { } if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlapFollow(this->actionDelay + 0x1200); + MessageFromTarget(this->actionDelay + 0x1200); } } diff --git a/src/npc/ministerPotho.c b/src/npc/ministerPotho.c index 5beb9499..6c3bfb29 100644 --- a/src/npc/ministerPotho.c +++ b/src/npc/ministerPotho.c @@ -92,7 +92,7 @@ void sub_08066904(Entity* this) { } else { index = 3; } - TextboxNoOverlap(gUnk_08110650[index], this); + MessageNoOverlap(gUnk_08110650[index], this); } void MinisterPotho_Fusion(Entity* this) { diff --git a/src/npc/mountainMinish.c b/src/npc/mountainMinish.c index b295b57d..fa4ab4c8 100644 --- a/src/npc/mountainMinish.c +++ b/src/npc/mountainMinish.c @@ -50,7 +50,7 @@ void sub_08067E88(Entity* this) { if (this->interactType != 0) { this->interactType = 0; this->action = 2; - TextboxNoOverlapFollow(this->actionDelay + 0x1200); + MessageFromTarget(this->actionDelay + 0x1200); } } @@ -86,7 +86,7 @@ NONMATCH("asm/non_matching/mountainMinish/sub_08068190.inc", void sub_08068190(E } // TODO unable to devide the array access variables by two without breaking everything - TextboxNoOverlap(gUnk_0811130E[uVar2 * 2 + uVar3 * 8], this); + MessageNoOverlap(gUnk_0811130E[uVar2 * 2 + uVar3 * 8], this); } END_NONMATCH diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c index 5391ac8d..3f66dd26 100644 --- a/src/npc/mutoh.c +++ b/src/npc/mutoh.c @@ -60,7 +60,7 @@ void sub_080670B4(Entity* this) { uVar1 = CheckGlobalFlag(TABIDACHI); uVar2 = BOOLCAST(uVar1); } - TextboxNoOverlap(gUnk_08110C0C[uVar2], this); + MessageNoOverlap(gUnk_08110C0C[uVar2], this); } void sub_080670E4(Entity* this) { diff --git a/src/npc/npc23.c b/src/npc/npc23.c index 6320a7fe..fbb6e943 100644 --- a/src/npc/npc23.c +++ b/src/npc/npc23.c @@ -39,7 +39,7 @@ void sub_080662F8(Entity* this) { void sub_08066358(Entity* this) { if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); if ((this->type2 & 0x10) != 0) { this->action = 3; this->subAction = 0; diff --git a/src/npc/npc5.c b/src/npc/npc5.c index d64e5c77..f90e709b 100644 --- a/src/npc/npc5.c +++ b/src/npc/npc5.c @@ -392,7 +392,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t this->action = 6; tmp = (sub_08079FD4(this, 1) * 0x10 - 4); // tmp <<= 0xc; - this->field_0x20 = tmp; + this->hVelocity = tmp; this->speed = 0x100; this->direction = direction; this->animationState = direction >> 2; @@ -867,7 +867,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061B18.inc", void sub_08061B18(Entity* thi if ((((Tmp**)&this->field_0x68))[++this->actionDelay]->unk_2 == 0) { this->actionDelay = 0; } - TextboxNoOverlap((u32)*puVar2, this); + MessageNoOverlap((u32)*puVar2, this); break; } } diff --git a/src/npc/npc9.c b/src/npc/npc9.c index 23a0bd3e..f0924a9b 100644 --- a/src/npc/npc9.c +++ b/src/npc/npc9.c @@ -30,13 +30,13 @@ void sub_08062B14(Entity* this) { void sub_08062B48(Entity* this) { GetNextFrame(this); if ((this->frames.b.f3) != 0) { - TextboxNoOverlapFollow(0xa01); + MessageFromTarget(0xa01); this->action++; } } void sub_08062B70(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { InitializeAnimation(this, 2); this->action = 1; sub_0805E584(this); diff --git a/src/npc/percy.c b/src/npc/percy.c index 1317fce2..16578b58 100644 --- a/src/npc/percy.c +++ b/src/npc/percy.c @@ -49,7 +49,7 @@ void sub_0806B3CC(Entity* this) { GetNextFrame(this); if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } sub_0806ED78(this); } @@ -107,7 +107,7 @@ void sub_0806B504(Entity* this) { SetLocalFlag(0x86); } - TextboxNoOverlap(gUnk_08112E54[idx], this); + MessageNoOverlap(gUnk_08112E54[idx], this); } void sub_0806B540(Entity* this) { @@ -116,7 +116,7 @@ void sub_0806B540(Entity* this) { context = *(ScriptExecutionContext**)&this->cutsceneBeh; switch (context->unk_18) { case 0: - TextboxNoOverlap(0x2312, this); + MessageNoOverlap(0x2312, this); if (CheckLocalFlag(0x3f) != 0) { return; } @@ -124,13 +124,13 @@ void sub_0806B540(Entity* this) { SetLocalFlag(0x3f); break; case 1: - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { context->unk_18 = 2; - TextboxNoOverlap(0x2315, this); + MessageNoOverlap(0x2315, this); } break; case 2: - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { context->unk_18 = 3; if (gSave.stats.filler3[0] != 0) { sub_080A7C18(0x58, 0, 0); diff --git a/src/npc/picolyteBottle.c b/src/npc/picolyteBottle.c index 73c99b40..f95ef7d3 100644 --- a/src/npc/picolyteBottle.c +++ b/src/npc/picolyteBottle.c @@ -109,10 +109,10 @@ void sub_0806E1FC(Entity* this) { void sub_0806E20C(void) { if (gScreenTransition.field_0x6 != 0) { - TextboxNoOverlapFollow(0x421f); - gTextBox.field_0x10 = gScreenTransition.field_0x6; + MessageFromTarget(0x421f); + gMessage.field_0x10 = gScreenTransition.field_0x6; } else { - TextboxNoOverlapFollow(0x4220); + MessageFromTarget(0x4220); } } diff --git a/src/npc/pina.c b/src/npc/pina.c index 0acf265f..53c31486 100644 --- a/src/npc/pina.c +++ b/src/npc/pina.c @@ -36,7 +36,7 @@ void sub_08063A98(Entity* this) { ASM_FUNC("asm/non_matching/pina/sub_08063AC0.inc", void sub_08063AC0(Entity* this)) void sub_08063B44(Entity* this) { - u8 tmp = gTextBox.doTextBox & 0x7f; + u8 tmp = gMessage.doTextBox & 0x7f; if (tmp == 0) { this->action = 1; this->field_0xf = tmp; diff --git a/src/npc/pita.c b/src/npc/pita.c index ebd369bc..90c28687 100644 --- a/src/npc/pita.c +++ b/src/npc/pita.c @@ -61,7 +61,7 @@ bool32 sub_08062EDC(Entity* this, ScriptExecutionContext* context) { tmp = sub_080028F4(gUnk_0810C435); tmp2 = gUnk_0810C43D[tmp]; sub_080A7C18(0x5c, tmp2, 1); - TextboxNoOverlap(0x3c05, this); + MessageNoOverlap(0x3c05, this); context->condition = TRUE; return TRUE; } diff --git a/src/npc/postman.c b/src/npc/postman.c index 3d61962e..8a378f79 100644 --- a/src/npc/postman.c +++ b/src/npc/postman.c @@ -65,7 +65,7 @@ void sub_0806045C(Entity* this) { case 1: case 2: this->action = 2; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); break; default: bVar1 = this->knockbackDirection; @@ -140,7 +140,7 @@ void sub_08060528(Entity* this) { break; case 2: UpdateAnimationSingleFrame(this); - if ((gTextBox.doTextBox & 0x7f) != 0) { + if ((gMessage.doTextBox & 0x7f) != 0) { break; } this->action = 1; @@ -156,7 +156,7 @@ void sub_08060528(Entity* this) { if (0 < (s16)this->field_0x6a.HWORD) { if ((s16)this->field_0x6a.HWORD > 0x12b) { this->field_0x6a.HWORD = 0; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->field_0x6c.HALF.HI = 1; sub_080788E0(this); EnqueueSFX(0x7c); @@ -165,7 +165,7 @@ void sub_08060528(Entity* this) { } } sub_08003FC4(this, 0x1800); - if (((this->field_0x6c.HALF.HI != 0) && (this->field_0x20 == 0)) && this->height.WORD == 0) { + if (((this->field_0x6c.HALF.HI != 0) && (this->hVelocity == 0)) && this->height.WORD == 0) { this->field_0x6c.HALF.HI = 0; sub_080606C0(this); } diff --git a/src/npc/rem.c b/src/npc/rem.c index 974640a1..cc172a52 100644 --- a/src/npc/rem.c +++ b/src/npc/rem.c @@ -302,7 +302,7 @@ void sub_0806AA18(Entity* this) { } else { index = 0x440d; } - TextboxNoOverlap(index, this); + MessageNoOverlap(index, this); } ASM_FUNC("asm/non_matching/rem/sub_0806AA50.inc", void sub_0806AA50(Entity* this, ScriptExecutionContext* context)) diff --git a/src/npc/smallTownMinish.c b/src/npc/smallTownMinish.c index a51772c1..eee7d9e8 100644 --- a/src/npc/smallTownMinish.c +++ b/src/npc/smallTownMinish.c @@ -20,7 +20,7 @@ void SmallTownMinish(Entity* this) { } else { sub_0807DD94(this, NULL); } - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { this->spriteSettings.b.draw = 1; } else { this->spriteSettings.b.draw = 0; diff --git a/src/npc/smith.c b/src/npc/smith.c index 55471f6c..cdeff498 100644 --- a/src/npc/smith.c +++ b/src/npc/smith.c @@ -91,7 +91,7 @@ void sub_08066118(Entity* this) { } if (this->interactType != 0) { this->action = 2; - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } } diff --git a/src/npc/stamp.c b/src/npc/stamp.c index 54cc7ec6..b983f9c5 100644 --- a/src/npc/stamp.c +++ b/src/npc/stamp.c @@ -41,13 +41,13 @@ void sub_08062C24(Entity* ent) { GetNextFrame(ent); if ((ent->frames.all & 128) != 0) { InitializeAnimation(ent, 4); - TextboxNoOverlapFollow(2561); + MessageFromTarget(2561); ent->action++; } } void sub_08062C54(Entity* ent) { - if ((gTextBox.doTextBox & 127) == 0) { + if ((gMessage.doTextBox & 127) == 0) { ent->action = 1; InitializeAnimation(ent, 0); sub_0805E584(ent); diff --git a/src/npc/stockwell.c b/src/npc/stockwell.c index 3977a633..91e4a53c 100644 --- a/src/npc/stockwell.c +++ b/src/npc/stockwell.c @@ -42,8 +42,8 @@ ASM_FUNC("asm/non_matching/stockwell/sub_080650CC.inc", void sub_080650CC(Entity void sub_080651AC(Entity* this) { GetNextFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { - this->interactType = gTextBox.doTextBox & 0x7f; + if ((gMessage.doTextBox & 0x7f) == 0) { + this->interactType = gMessage.doTextBox & 0x7f; this->action = 1; InitializeAnimation(this, 4); } @@ -67,7 +67,7 @@ void sub_080651F8(Entity* this) { void sub_0806522C(Entity* this) { if (--this->actionDelay == 0) { ++this->subAction; - TextboxNoOverlap(0x2c16, this); + MessageNoOverlap(0x2c16, this); } } @@ -90,12 +90,12 @@ void sub_08065250(Entity* this) { void sub_0806528C(Entity* this) { if (--this->actionDelay == 0) { ++this->subAction; - TextboxNoOverlap(0x2c18, this); + MessageNoOverlap(0x2c18, this); } } void sub_080652B0(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->subAction += 1; this->actionDelay = 10; gRoomVars.greatFairyState = this->field_0xf; @@ -109,22 +109,22 @@ void sub_080652E4(Entity* this) { } else { if (gPlayerEntity.action != 8) { this->subAction += 1; - TextboxNoOverlap(0x2c19, this); + MessageNoOverlap(0x2c19, this); } } } void sub_08065314(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->subAction += 1; MenuFadeIn(3, 3); } } void sub_08065338(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; - this->subAction = gTextBox.doTextBox & 0x7f; + this->subAction = gMessage.doTextBox & 0x7f; gRoomVars.greatFairyState = this->field_0xf; InitializeAnimation(this, 4); } diff --git a/src/npc/sturgeon.c b/src/npc/sturgeon.c index 7f2ce06b..0e317696 100644 --- a/src/npc/sturgeon.c +++ b/src/npc/sturgeon.c @@ -66,7 +66,7 @@ void sub_08064B44(Entity* this) { ASM_FUNC("asm/non_matching/sturgeon/sub_08064B88.inc", void sub_08064B88(Entity* this)) void sub_08064C2C(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; InitializeAnimation(this, (u32)this->field_0xf); } @@ -104,7 +104,7 @@ void sub_08064CD8(Entity* this) { flag = CheckLocalFlag(0x73); tmp = BOOLCAST(flag); } - TextboxNoOverlap(gUnk_0810FA54[tmp], this); + MessageNoOverlap(gUnk_0810FA54[tmp], this); } void sub_08064D08(Entity* this) { diff --git a/src/npc/talon.c b/src/npc/talon.c index f9c7d66f..841d9467 100644 --- a/src/npc/talon.c +++ b/src/npc/talon.c @@ -92,7 +92,7 @@ void sub_08065680(Entity* this) { } void sub_080656A4(Entity* this) { - if ((gTextBox.doTextBox & 0x7F) == 0) { + if ((gMessage.doTextBox & 0x7F) == 0) { this->action = this->field_0x68.HALF.HI; InitAnimationForceUpdate(this, this->field_0x6a.HALF.LO); } @@ -115,7 +115,7 @@ void sub_080656D4(Entity* this) { this->field_0x68.HALF.HI = this->action; this->action = 3; this->interactType = 0; - TextboxNoOverlap(*(u32*)(*(u32*)&this->cutsceneBeh.HWORD + 4), this); + MessageNoOverlap(*(u32*)(*(u32*)&this->cutsceneBeh.HWORD + 4), this); label: sub_0806574C(this); } diff --git a/src/npc/tingleSiblings.c b/src/npc/tingleSiblings.c index f5bcaf5b..f4111b05 100644 --- a/src/npc/tingleSiblings.c +++ b/src/npc/tingleSiblings.c @@ -33,7 +33,7 @@ void sub_08064DA0(Entity* this) { if (this->interactType != 0) { this->action = 2; InitAnimationForceUpdate(this, 6); - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } } diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c index 79f35176..b5103040 100644 --- a/src/npc/townMinish.c +++ b/src/npc/townMinish.c @@ -122,7 +122,7 @@ void sub_0806ACC4(Entity* this) { } break; case 2: - if (gTextBox.doTextBox & 0x7f) + if (gMessage.doTextBox & 0x7f) break; this->action = 1; @@ -223,12 +223,12 @@ void sub_0806AF60(Entity* this, ScriptExecutionContext* context) { } void sub_0806AF70(Entity* this, ScriptExecutionContext* context) { - this->field_0x20 = 0x24000; + this->hVelocity = 0x24000; } void sub_0806AF78(Entity* this, ScriptExecutionContext* context) { sub_08003FC4(this, 0x1800); - if (0 <= this->height.WORD && this->field_0x20 < 1) { + if (0 <= this->height.WORD && this->hVelocity < 1) { this->height.WORD = 0; sub_0806AF70(this, context); } @@ -273,7 +273,7 @@ void sub_0806B004(Entity* this, ScriptExecutionContext* context) { SetLocalFlag(0x6a); } } - TextboxNoOverlap(gUnk_08112C40[idx], this); + MessageNoOverlap(gUnk_08112C40[idx], this); } void sub_0806B064(Entity* this) { @@ -285,7 +285,7 @@ void sub_0806B064(Entity* this) { idx = 2; } } - TextboxNoOverlap(gUnk_08112C4A[idx], this); + MessageNoOverlap(gUnk_08112C4A[idx], this); } void sub_0806B098(Entity* this) { @@ -299,7 +299,7 @@ void sub_0806B098(Entity* this) { idx = BOOLCAST(f); } } - TextboxNoOverlap(gUnk_08112C50[(this->type2 - 7) * 3 + idx], this); + MessageNoOverlap(gUnk_08112C50[(this->type2 - 7) * 3 + idx], this); } void sub_0806B0E0(Entity* this) { @@ -310,7 +310,7 @@ void sub_0806B0E0(Entity* this) { idx = 1; } - TextboxNoOverlap(gUnk_08112C5C[idx], this); + MessageNoOverlap(gUnk_08112C5C[idx], this); } void sub_0806B134(Entity* this) { @@ -329,7 +329,7 @@ void sub_0806B134(Entity* this) { if (5 < gSave.unk8) { idx = 3; } - TextboxNoOverlap(gUnk_08112C60[idx], this); + MessageNoOverlap(gUnk_08112C60[idx], this); } void TownMinish_Fusion(Entity* this) { diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c index 3db8fd02..eb86baed 100644 --- a/src/npc/townsperson.c +++ b/src/npc/townsperson.c @@ -70,7 +70,7 @@ void sub_08061C00(Entity* this) { sub_0806ED78(this); if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlapFollow(this->type2 + 0xa01); + MessageFromTarget(this->type2 + 0xa01); } } @@ -141,7 +141,7 @@ void sub_08061D64(Entity* this) { void sub_08061E24(Entity* this) { GetNextFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->action = 1; InitializeAnimation(this, this->field_0x68.HALF.HI); } @@ -254,7 +254,7 @@ void sub_08061FE4(Entity* this) { } void sub_08061FF4(Entity* this) { - TextboxNoOverlap(gUnk_0810B790[this->type], this); + MessageNoOverlap(gUnk_0810B790[this->type], this); } void sub_0806200C(Entity* this) { @@ -270,7 +270,7 @@ void sub_0806200C(Entity* this) { index = 1; } } - TextboxNoOverlap(gUnk_0810B7BA[index], this); + MessageNoOverlap(gUnk_0810B7BA[index], this); } void sub_08062048(Entity* this) { @@ -283,7 +283,7 @@ void sub_08062048(Entity* this) { } ShowNPCDialogue(this, gUnk_0810B7C0 + this->type * 0x8 + iVar1); } else { - TextboxNoOverlap(0, this); + MessageNoOverlap(0, this); } } diff --git a/src/npc/vaatiReborn.c b/src/npc/vaatiReborn.c index b3555aeb..61c88c55 100644 --- a/src/npc/vaatiReborn.c +++ b/src/npc/vaatiReborn.c @@ -103,7 +103,7 @@ void VaatiRebornAction1(Entity* this) { break; } CopyPosition(this, entity); - TextboxNoOverlapFollow(0x1634); + MessageFromTarget(0x1634); this->subAction = this->subAction + 1; DeleteThisEntity(); return; diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c index 677ce4f3..789e5b2c 100644 --- a/src/npc/windTribespeople.c +++ b/src/npc/windTribespeople.c @@ -69,7 +69,7 @@ void sub_0806C7D4(Entity* this) { } void sub_0806C834(Entity* this) { - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { --this->action; InitializeAnimation(this, (this->animationState / 2) + 4); } @@ -140,7 +140,7 @@ void sub_0806C944(Entity* this) { iVar2 = 1; } } - TextboxNoOverlap(gUnk_08113B0C[iVar2], this); + MessageNoOverlap(gUnk_08113B0C[iVar2], this); } void sub_0806C978(Entity* this) { @@ -148,7 +148,7 @@ void sub_0806C978(Entity* this) { u32 flagAsBool; flag = CheckGlobalFlag(0x58); flagAsBool = BOOLCAST(flag); - TextboxNoOverlap(gUnk_08113B12[flagAsBool], this); + MessageNoOverlap(gUnk_08113B12[flagAsBool], this); } void sub_0806C99C(Entity* this) { @@ -160,7 +160,7 @@ void sub_0806C99C(Entity* this) { if (CheckLocalFlag(99) != 0) { flagAsBool += 1; } - TextboxNoOverlap(gUnk_08113B16[flagAsBool], this); + MessageNoOverlap(gUnk_08113B16[flagAsBool], this); } void sub_0806C9D0(Entity* this) { @@ -168,7 +168,7 @@ void sub_0806C9D0(Entity* this) { if (CheckLocalFlag(100) == 0) { tmp = 1; } - TextboxNoOverlap(gUnk_08113B1E[tmp], this); + MessageNoOverlap(gUnk_08113B1E[tmp], this); } void sub_0806C9F8(Entity* this) { @@ -176,15 +176,15 @@ void sub_0806C9F8(Entity* this) { u32 flagAsBool; flag = CheckGlobalFlag(0x58); flagAsBool = BOOLCAST(flag); - TextboxNoOverlap(gUnk_08113B22[flagAsBool], this); + MessageNoOverlap(gUnk_08113B22[flagAsBool], this); } void sub_0806CA1C(Entity* this) { - TextboxNoOverlap(0x251b, this); + MessageNoOverlap(0x251b, this); } void sub_0806CA2C(Entity* this) { - TextboxNoOverlap(0x2527, this); + MessageNoOverlap(0x2527, this); } void sub_0806CA3C(Entity* this) { diff --git a/src/npc/zelda.c b/src/npc/zelda.c index c9a50cfb..13045c51 100644 --- a/src/npc/zelda.c +++ b/src/npc/zelda.c @@ -129,7 +129,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) { UpdateAnimationSingleFrame(this); if (this->frames.all & 1) { context->unk_18++; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->frames.all &= 0xFE; SoundReq(SFX_PLY_JUMP); } @@ -140,7 +140,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) { if (!(this->frames.all & 1)) { UpdateAnimationSingleFrame(this); } - if (this->field_0x20 < 0) { + if (this->hVelocity < 0) { context->unk_18++; } break; diff --git a/src/object/bird.c b/src/object/bird.c index 0dad159f..758a3564 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -29,7 +29,7 @@ void sub_0809CF54(Entity* this) { this->spriteSettings.b.draw = TRUE; this->actionDelay = 0x31; this->field_0xf = 1; - this->field_0x20 = -0x18000; + this->hVelocity = -0x18000; this->height.WORD = -0x38C000; this->field_0x68.HWORD = -0x800; this->speed = 0x280; @@ -85,7 +85,7 @@ void sub_0809D084(Entity* this) { PositionRelative(this->parent, this, 0, 0x80000); } else { this->subAction++; - this->field_0x20 = temp; + this->hVelocity = temp; } } } @@ -119,7 +119,7 @@ void sub_0809D10C(Entity* this) { } void sub_0809D130(Entity* this) { - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { sub_0800445C(this); } else if (sub_08017850(this) != 0) { CreateItemEntity(0x17, 0, 0); diff --git a/src/object/book.c b/src/object/book.c index 356b85d9..3c60630c 100644 --- a/src/object/book.c +++ b/src/object/book.c @@ -97,7 +97,7 @@ void sub_0809B4A8(Entity* this) { gPlayerState.pushedObject = 0x9e; gPlayerState.playerAction = 5; - gPlayerState.flags.all |= 1; + gPlayerState.flags |= 1; gPlayerEntity.x.HALF.LO = 0; gPlayerEntity.y.HALF.LO = 0; @@ -143,7 +143,7 @@ void sub_0809B56C(Entity* this) { } void sub_0809B5B4(Entity* this) { - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { sub_0800445C(this); } else if (sub_08017850(this)) { CreateItemEntity(this->type + 0x39, 0, 0); @@ -197,7 +197,7 @@ void sub_0809B5EC(Entity* this) { break; } case 1: { - u8 doTextBox = gTextBox.doTextBox & 0x7f; + u8 doTextBox = gMessage.doTextBox & 0x7f; if (!doTextBox) { this->spriteSettings.b.draw = 1; this->subAction = doTextBox; diff --git a/src/object/button.c b/src/object/button.c index 52876a45..8bbd7bca 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -153,11 +153,11 @@ Entity* sub_08081D74(Entity* this) { } ent = 0; if (sub_08081E0C(this)) { - if (!(gPlayerState.flags.all & 0x10) && !(gPlayerState.flags.all & 0x80)) { + if (!(gPlayerState.flags & 0x10) && !(gPlayerState.flags & 0x80)) { ent = &gPlayerEntity; } } else { - if (gPlayerState.flags.all & 0x400000) { + if (gPlayerState.flags & 0x400000) { if (sub_080041A0(this, gUnk_03004040[0], 5, 6)) { ent = gUnk_03004040[0]; } else if (sub_080041A0(this, gUnk_03004040[1], 5, 6)) { diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c index bff3a5d8..5c5e419e 100644 --- a/src/object/fileScreenObjects.c +++ b/src/object/fileScreenObjects.c @@ -181,7 +181,7 @@ void sub_0808EA28(Entity* this) { u32 var1; if (this->type == 3) { - if (gUnk_02000000->gameLanguage > LANGUAGE_EN) { + if (gSaveHeader->gameLanguage > LANGUAGE_EN) { this->spriteSettings.b.draw = 2; } else { this->spriteSettings.b.draw = 0; diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index 046eb0aa..1821a27b 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -59,7 +59,7 @@ static void sub_0808E714(Entity* this) { static void sub_0808E764(Entity* this) { sub_08080CB4(this); - if (!(gPlayerState.flags.all & 0x80) && sub_08017850(this)) { + if (!(gPlayerState.flags & 0x80) && sub_08017850(this)) { SetFlag(this->cutsceneBeh.HWORD); CreateItemEntity(0x62, 0, 0); DeleteThisEntity(); diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index ee77e759..2e4f555a 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -150,8 +150,8 @@ void sub_080810A8(Entity* this) { this->direction |= 0xFF; } - if (this->field_0x20 == 0) { - this->field_0x20 = 0x1E000; + if (this->hVelocity == 0) { + this->hVelocity = 0x1E000; } if (this->collisionLayer == 2) { @@ -218,7 +218,7 @@ void sub_080811EC(Entity* this) { } sub_08003FC4(this, 0x2800); - if (this->field_0x20 <= 0) { + if (this->hVelocity <= 0) { this->action = 2; this->flags |= 0x80; sub_080814A4(this); @@ -273,7 +273,7 @@ void sub_080812E8(Entity* this) { #ifdef EU if ((playerState->swimState & 0x80) && sub_080177A0(this, &gPlayerEntity)) { #else - if ((playerState->swimState & 0x80) && !(playerState->flags.all & 0x80) && sub_080177A0(this, &gPlayerEntity)) { + if ((playerState->swimState & 0x80) && !(playerState->flags & 0x80) && sub_080177A0(this, &gPlayerEntity)) { #endif sub_080810FC(this); } @@ -413,7 +413,7 @@ void sub_0808153C(Entity* this) { if (this->field_0x68.HALF.LO == 0) { if (!sub_08003FC4(this, 0x1000) && !sub_0800442E(this)) { this->field_0x68.HALF.LO = 1; - this->field_0x20 = 0x1E000; + this->hVelocity = 0x1E000; sub_0808148C(this->type); UpdateSpriteForCollisionLayer(this); } @@ -433,7 +433,7 @@ void sub_08081598(Entity* this) { this->flags &= 0x7F; this->action = 4; this->actionDelay = 14; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->spriteSettings.b.draw = 1; this->spritePriority.b1 = 2; this->spritePriority.b0 = 3; diff --git a/src/object/jarPortal.c b/src/object/jarPortal.c index 9d85f282..a3f2541d 100644 --- a/src/object/jarPortal.c +++ b/src/object/jarPortal.c @@ -63,7 +63,7 @@ void sub_0808BF58(Entity* this) { sub_08003FC4(this, 0x2000); switch (this->subAction) { case 0: - if (this->field_0x20 <= 98303) { + if (this->hVelocity <= 98303) { ++this->subAction; InitAnimationForceUpdate(this, 2); } @@ -72,7 +72,7 @@ void sub_0808BF58(Entity* this) { UpdateAnimationSingleFrame(this); if (!this->height.HALF.HI) { ++this->subAction; - this->field_0x20 = 0x8000; + this->hVelocity = 0x8000; } break; case 2: @@ -111,7 +111,7 @@ void sub_0808C01C(Entity* this, u32 r1) { type = 2; gArea.curPortalType = type; if (r1 == 1) { - if (((gPlayerState.flags.all & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) { + if (((gPlayerState.flags & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) { gArea.field_0x18 = 2; } else { if (sub_08057810() != 0) { @@ -131,7 +131,7 @@ void sub_0808C0AC(Entity* this) { sub_08003FC4(this, 0x2000); switch (this->subAction) { case 0: - if (this->field_0x20 <= 98303) { + if (this->hVelocity <= 98303) { this->subAction = 1; InitAnimationForceUpdate(this, 3); } @@ -140,7 +140,7 @@ void sub_0808C0AC(Entity* this) { UpdateAnimationSingleFrame(this); if (!this->height.HALF.HI) { ++this->subAction; - this->field_0x20 = 0x8000; + this->hVelocity = 0x8000; } break; case 2: @@ -160,7 +160,7 @@ u32 sub_0808C128(Entity* this) { void sub_0808C13C(Entity* this) { this->subAction = 0; - this->field_0x20 = 163840; + this->hVelocity = 163840; } void sub_0808C148(Entity* this, u32 a2) { diff --git a/src/object/lilypadSmall.c b/src/object/lilypadSmall.c index ce0d8c08..37f78580 100644 --- a/src/object/lilypadSmall.c +++ b/src/object/lilypadSmall.c @@ -32,7 +32,7 @@ void LilypadSmall(Entity* this) { } u32 sub_08097ADC(Entity* this) { - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { return 0; } else if (sub_080041A0(this, &gPlayerEntity, 8, 8) == 0) { return 0; diff --git a/src/object/mask.c b/src/object/mask.c index 05a49fb7..cd94a1b5 100644 --- a/src/object/mask.c +++ b/src/object/mask.c @@ -47,7 +47,7 @@ void sub_080929A4(Entity* this) { } this->action = 1; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->field_0x78.HWORD = ((Random() & 7) << 10) | 0x2000; diff --git a/src/object/minecart.c b/src/object/minecart.c index 7578a6b2..01d7d1ac 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -36,7 +36,7 @@ void sub_080916EC(Entity* this) { struct_030010EC* unk = &gUnk_030010EC[this->actionDelay]; *(struct_030010EC**)&this->cutsceneBeh.HWORD = unk; - if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags.all & 0x1000) != 0) { + if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags & 0x1000) != 0) { DeleteThisEntity(); } this->x.HALF.HI = gRoomControls.roomOriginX + ((unk->field_0x0 & 0x3f) << 4) + 8; @@ -60,13 +60,13 @@ void sub_080916EC(Entity* this) { void sub_080917DC(Entity* this) { if ((this->bitfield & 0x7f) == 0x1d) { - this->field_0x20 = 0x2a000; + this->hVelocity = 0x2a000; this->action = 7; InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState); SoundReq(SFX_13B); } else { if (sub_0800445C(this) != 0) { - if (((gPlayerState.flags.all & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) && + if (((gPlayerState.flags & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) && (gPlayerState.heldObject == 0) && (gPlayerState.jumpStatus == 0)) { this->actionDelay++; } else { @@ -79,8 +79,8 @@ void sub_080917DC(Entity* this) { if (8 < this->actionDelay) { this->action = this->action + 1; gPlayerState.jumpStatus = 0x81; - gPlayerState.flags.all |= 0x4000000; - gPlayerEntity.field_0x20 = 0x20000; + gPlayerState.flags |= 0x4000000; + gPlayerEntity.hVelocity = 0x20000; gPlayerEntity.speed = 0x100; gPlayerEntity.flags &= 0x7f; ResetPlayer(); @@ -98,11 +98,11 @@ void sub_080918A4(Entity* this) { gPlayerEntity.x.HALF.HI = this->x.HALF.HI; gPlayerEntity.y.HALF.HI = this->y.HALF.HI; if (gPlayerEntity.height.HALF.HI > -0x10) { - if ((s32)gPlayerEntity.field_0x20 > -1) { + if ((s32)gPlayerEntity.hVelocity > -1) { return; } gPlayerEntity.animationState = this->animationState << 1; - gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x4000000) | 0x1000; + gPlayerState.flags = (gPlayerState.flags ^ 0x4000000) | 0x1000; this->action++; this->field_0xf = 1; this->flags |= 0x20; @@ -118,7 +118,7 @@ void sub_080918A4(Entity* this) { } else { gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, this); } - if (gPlayerEntity.field_0x20 < 0) { + if (gPlayerEntity.hVelocity < 0) { gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1; } } @@ -128,7 +128,7 @@ void sub_080919AC(Entity* this) { u32 uVar3; gRoomControls.unk5 = 7; - if ((gPlayerState.flags.all & 0x1000) == 0) { + if ((gPlayerState.flags & 0x1000) == 0) { this->action = 1; return; } @@ -174,8 +174,8 @@ void sub_080919AC(Entity* this) { this->action = 6; sub_08017744(this); gPlayerState.jumpStatus = 0x41; - gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000; - gPlayerEntity.field_0x20 = 0x20000; + gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | 0x4000000; + gPlayerEntity.hVelocity = 0x20000; gPlayerEntity.speed = 0x200; gPlayerEntity.animationState = this->animationState << 1; gPlayerEntity.direction = this->direction; diff --git a/src/object/minishSizedEntrance.c b/src/object/minishSizedEntrance.c index ce5ab316..ddd776ae 100644 --- a/src/object/minishSizedEntrance.c +++ b/src/object/minishSizedEntrance.c @@ -27,11 +27,11 @@ void sub_08090F00(Entity* this) { if (this->type == 1) { Entity* parent = this->parent; u32 mask = 1 << this->field_0xf; - if (!(parent->field_0x20 & mask)) { + if (!(parent->hVelocity & mask)) { DeleteThisEntity(); } } - if ((gPlayerState.flags.all & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) && + if ((gPlayerState.flags & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) && (gPlayerEntity.height.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) { DoExitTransition(GetCurrentRoomProperty(this->actionDelay)); } diff --git a/src/object/object1A.c b/src/object/object1A.c index ad3b1389..494ba821 100644 --- a/src/object/object1A.c +++ b/src/object/object1A.c @@ -54,7 +54,7 @@ void sub_08086A6C(Entity* ent) { u32 uVar1; uVar1 = Random(); - ent->field_0x20 = 163840; + ent->hVelocity = 163840; ent->direction = (uVar1 >> 16) & 31; ent->speed = uVar1 & 480; } diff --git a/src/object/object1C.c b/src/object/object1C.c index 3ca965c6..3bd9af76 100644 --- a/src/object/object1C.c +++ b/src/object/object1C.c @@ -13,7 +13,7 @@ void Object1C(Entity* this) { this->action = 1; } if (CheckRectOnScreen(this->field_0x80.HWORD, this->field_0x82.HWORD, 0x10, 0x10) == 0) { - this->parent->field_0x20 &= ~(1 << this->type2); + this->parent->hVelocity &= ~(1 << this->type2); DeleteThisEntity(); } } diff --git a/src/object/object86.c b/src/object/object86.c index 02e0b480..717e3ad0 100644 --- a/src/object/object86.c +++ b/src/object/object86.c @@ -75,5 +75,5 @@ void sub_08099ECC(Entity* this) { CopyPosition(this, &gPlayerEntity); gPlayerState.playerAction = 3; gPlayerState.field_0x34[4] = 0; - gPlayerState.flags.all |= 0x8000; + gPlayerState.flags |= 0x8000; } diff --git a/src/object/objectA2.c b/src/object/objectA2.c index 73cb101f..a2092bb7 100644 --- a/src/object/objectA2.c +++ b/src/object/objectA2.c @@ -46,7 +46,7 @@ void sub_0809F318(Entity* this) { void sub_0809F374(Entity* this) { sub_0806F69C(this); #ifndef EU - if (gUnk_02000000->gameLanguage < 2) { + if (gSaveHeader->gameLanguage < 2) { if (sub_080044EC(this, 0x2000) < 2) { this->height.WORD = 0; this->action = 2; diff --git a/src/object/pot.c b/src/object/pot.c index f3423433..79d0a38f 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -67,7 +67,7 @@ void sub_08082310(Entity* this) { case 0x1D: SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); this->action = 5; - this->field_0x20 = 0x2A000; + this->hVelocity = 0x2A000; this->spriteOffsetY = 0; this->spriteSettings.b.shadow = 1; this->spritePriority.b1 = 3; @@ -85,7 +85,7 @@ void sub_08082310(Entity* this) { this->direction = (tileType - 0x4001) * 8; this->actionDelay = 32; this->action = 4; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { this->speed >>= 1; this->actionDelay = 64; } @@ -184,7 +184,7 @@ void sub_08082614(Entity* this) { } this->action = 1; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { this->speed <<= 1; } @@ -251,7 +251,7 @@ void sub_08082818(Entity* this) { } void sub_08082824(Entity* this) { - if (this->field_0x20 < 0) { + if (this->hVelocity < 0) { this->spriteSettings.b.flipY = 1; } diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c index e74d2ee1..1cca2ba0 100644 --- a/src/object/swordsmanNewsletter.c +++ b/src/object/swordsmanNewsletter.c @@ -24,6 +24,6 @@ void sub_080933D8(Entity* this) { void sub_080933FC(Entity* this) { if (this->interactType != 0) { this->interactType = 0; - TextboxNoOverlap(gUnk_081228B8[this->type], this); + MessageNoOverlap(gUnk_081228B8[this->type], this); } } diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c index 287a2e70..69ed1fdc 100644 --- a/src/object/warpPoint.c +++ b/src/object/warpPoint.c @@ -206,7 +206,7 @@ void sub_0808B73C(Entity* this) { } u32 sub_0808B7C8(Entity* this) { - if (!(gPlayerState.flags.all & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 && + if (!(gPlayerState.flags & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 && sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.height.HALF.HI == 0) { if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) { sub_080791D0(); diff --git a/src/player.c b/src/player.c index 655f4a28..0f68f9e3 100644 --- a/src/player.c +++ b/src/player.c @@ -155,14 +155,14 @@ void PlayerFall(Entity* this) { void sub_08070C3C(Entity* this) { sub_08004168(this); - gPlayerState.flags.all |= 0x1 | 0x4; - gPlayerState.flags.all &= ~0x400; + gPlayerState.flags |= 0x1 | 0x4; + gPlayerState.flags &= ~0x400; gPlayerState.jumpStatus = 0; - if ((gPlayerState.flags.all & 0x80) != 0) + if ((gPlayerState.flags & 0x80) != 0) gPlayerState.field_0x8 = 0x1ba; - else if ((gPlayerState.flags.all & 8) != 0) + else if ((gPlayerState.flags & 8) != 0) gPlayerState.field_0x8 = 0x458; else gPlayerState.field_0x8 = 0x1b8; @@ -179,11 +179,11 @@ void sub_08070C3C(Entity* this) { void sub_08070CB4(Entity* this) { UpdateAnimationSingleFrame(this); if ((this->frames.all & 0x80) != 0) { - if ((gSave.stats.health != 0) && ((gPlayerState.flags.all & 0x8000) != 0)) { - gPlayerState.flags.all &= ~(0x1 | 0x4); + if ((gSave.stats.health != 0) && ((gPlayerState.flags & 0x8000) != 0)) { + gPlayerState.flags &= ~(0x1 | 0x4); this->spriteSettings.b.draw = 0; } else { - gPlayerState.flags.all &= ~(0x4 | 0x8000); + gPlayerState.flags &= ~(0x4 | 0x8000); RespawnPlayer(); gPlayerState.field_0xa = 0; this->iframes = 32; @@ -205,13 +205,13 @@ void sub_08070D38(Entity* this) { this->actionDelay = gPlayerState.field_0x38; this->spriteIndex = 1; - if ((gPlayerState.flags.all & 0x80) == 0) { - this->field_0x20 = 0x20000; + if ((gPlayerState.flags & 0x80) == 0) { + this->hVelocity = 0x20000; gPlayerState.field_0x8 = 0x114; sub_08080964(16, 0); } else { gPlayerState.field_0x8 = 0xc18; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; } gPlayerState.jumpStatus = 0x80; @@ -242,7 +242,7 @@ NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void sub_08070DC4(Entity* t } if (--this->actionDelay != 0xFF) { - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; return; } @@ -259,7 +259,7 @@ NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void sub_08070DC4(Entity* t this->actionDelay = 8; this->subAction++; - if ((gPlayerState.flags.all & 0x80) == 0) + if ((gPlayerState.flags & 0x80) == 0) gPlayerState.field_0x8 = 0x100; } END_NONMATCH @@ -275,7 +275,7 @@ void sub_08070E7C(Entity* this) { void sub_08070E9C(Entity* this) { if (sub_08078EFC() != 0) { - sub_08056360(); + MessageClose(); } else { gPlayerState.field_0x27[0] = 4; gPlayerState.field_0xa8 = 0x13; @@ -287,10 +287,10 @@ void sub_08070E9C(Entity* this) { void sub_08070EDC(Entity* this) { this->scriptedScene = 2; - if ((gTextBox.doTextBox & 0x7f) != 0) + if ((gMessage.doTextBox & 0x7f) != 0) this->subAction = 1; - if ((gPlayerState.flags.all & 0x80) == 0) + if ((gPlayerState.flags & 0x80) == 0) sub_08079938(); else gPlayerState.field_0x8 = 0xc18; @@ -298,7 +298,7 @@ void sub_08070EDC(Entity* this) { void sub_08070f24(Entity* this) { UpdateAnimationSingleFrame(this); - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->scriptedScene = this->scriptedScene2; sub_080791D0(); } @@ -327,11 +327,11 @@ void sub_08070FA4(Entity* this) { this->spriteSettings.b.flipX = FALSE; this->animationState = 4; - gPlayerState.flags.all |= 1; + gPlayerState.flags |= 1; gPlayerState.jumpStatus = 0; - if ((gPlayerState.flags.all & 0x80) == 0) { - if (gPlayerState.flags.all & 0x8) { + if ((gPlayerState.flags & 0x80) == 0) { + if (gPlayerState.flags & 0x8) { if (sub_080542AC(gPlayerState.field_0x38)) { temp = 0x45e; } else { @@ -362,7 +362,7 @@ void sub_08071038(Entity* this) { UpdateAnimationSingleFrame(this); - if (sub_08078EFC() || (gTextBox.doTextBox & 0x7f)) + if (sub_08078EFC() || (gMessage.doTextBox & 0x7f)) return; if (this->frames.all & 0x80) { @@ -384,16 +384,16 @@ void sub_080710A8(Entity* this) { this->subAction++; - gPlayerState.flags.all |= 1; - gPlayerState.flags.all &= ~(0x400 | 0x800); + gPlayerState.flags |= 1; + gPlayerState.flags &= ~(0x400 | 0x800); gPlayerState.playerAction = 0; if ((gPlayerState.heldObject | gPlayerState.field_0x1a[1]) == 0) { - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { ResetPlayer(); - if ((gPlayerState.flags.all & 0x8) != 0) { + if ((gPlayerState.flags & 0x8) != 0) { gPlayerState.field_0x8 = 0x420; } else { gPlayerState.field_0x8 = 0x810; @@ -406,7 +406,7 @@ void sub_080710A8(Entity* this) { temp = sub_08079FC4(1); asm("lsl r0, r0, #0x4"); - this->field_0x20 = (temp - 4) * 64 * 64; + this->hVelocity = (temp - 4) * 64 * 64; this->speed = 256; sub_0807A108(); @@ -455,8 +455,8 @@ void sub_08071130(Entity* this) { this->actionDelay = 6; - if (((gPlayerState.heldObject | gPlayerState.keepFacing) == 0) && ((gPlayerState.flags.all & 0x80) == 0)) { - if (gPlayerState.flags.all & 0x8) { + if (((gPlayerState.heldObject | gPlayerState.keepFacing) == 0) && ((gPlayerState.flags & 0x80) == 0)) { + if (gPlayerState.flags & 0x8) { gPlayerState.field_0x8 = 0x424; } else { gPlayerState.field_0x8 = 0x820; @@ -472,7 +472,7 @@ void sub_08071130(Entity* this) { void sub_08071208(Entity* this) { if ((gPlayerState.heldObject | gPlayerState.keepFacing) == 0) { - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { UpdateAnimationSingleFrame(this); } } @@ -485,7 +485,7 @@ void sub_08071208(Entity* this) { void PlayerDrown(Entity* this) { gPlayerState.field_0xa8 = 0x16; - gPlayerState.flags.all |= 4; + gPlayerState.flags |= 4; this->flags &= ~0x80; gUnk_0811BA94[this->subAction](this); } @@ -494,17 +494,17 @@ void sub_0807127C(Entity* this) { this->subAction = 1; this->spritePriority.b1 = 0; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { this->actionDelay = 0x3c; gPlayerState.field_0x8 = 0xc19; SoundReq(SFX_WATER_SPLASH); } else { - if ((gPlayerState.flags.all & 0x10000) == 0) + if ((gPlayerState.flags & 0x10000) == 0) sub_08004168(this); CreateFx(this, FX_WATER_SPLASH, 0); - if ((gPlayerState.flags.all & 8) == 0) + if ((gPlayerState.flags & 8) == 0) gPlayerState.field_0x8 = 0x72c; else gPlayerState.field_0x8 = 0x44c; @@ -519,7 +519,7 @@ void sub_080712F0(Entity* this) { temp = FALSE; - if ((gPlayerState.flags.all & 0x80) != 0) { + if ((gPlayerState.flags & 0x80) != 0) { if (--this->actionDelay == 0) temp = TRUE; } else if ((this->frames.all & 0x80) != 0) { @@ -536,7 +536,7 @@ void sub_080712F0(Entity* this) { this->iframes = 32; this->spritePriority.b1 = 1; this->spriteSettings.b.draw = FALSE; - gPlayerState.flags.all &= ~0x4; + gPlayerState.flags &= ~0x4; RespawnPlayer(); } @@ -548,7 +548,7 @@ static void PlayerUsePortal(Entity* this) { if ((this->subAction == 7) || (this->subAction < 3)) return; - if ((gPlayerState.flags.all & 0x20) == 0) + if ((gPlayerState.flags & 0x20) == 0) return; if ((gInput.newKeys & (0x100 | 0x2)) == 0) @@ -584,7 +584,7 @@ void PortalJumpOnUpdate(Entity* this) { UpdateAnimationSingleFrame(this); if (gPlayerState.jumpStatus == 0) { - gPlayerState.flags.all |= 0x20; + gPlayerState.flags |= 0x20; this->subAction = 1; this->animationState = 4; this->spriteSettings.b.flipX = FALSE; @@ -615,13 +615,13 @@ void PortalStandUpdate(Entity* this) { if (--this->actionDelay == 0xff) { this->direction = gPlayerState.field_0xd; this->animationState = this->direction >> 2; - this->field_0x20 = 0x20000; + this->hVelocity = 0x20000; this->speed = 256; this->action = 9; this->subAction = 7; this->field_0xf = 0; - gPlayerState.field_0x8 = (gPlayerState.flags.all & 8) ? 0x41C : 0x80C; - gPlayerState.flags.all &= ~0x20; + gPlayerState.field_0x8 = (gPlayerState.flags & 8) ? 0x41C : 0x80C; + gPlayerState.flags &= ~0x20; return; } this->direction = gPlayerState.field_0xd; @@ -657,7 +657,7 @@ void PortalActivateUpdate(Entity* this) { UpdateAnimationSingleFrame(this); - if (gPlayerState.flags.all & 0x80) + if (gPlayerState.flags & 0x80) this->subAction = 4; } @@ -670,7 +670,7 @@ void PortalShrinkInit(Entity* this) { *(u32*)&this->cutsceneBeh = 0x100; sub_0805EC9C(this, 0x100, 0x100, 0); gPlayerState.field_0x8 = 0x2c3; - gPlayerState.flags.all |= 0x80; + gPlayerState.flags |= 0x80; SoundReq(SFX_PLY_SHRINKING); } @@ -724,14 +724,14 @@ void sub_080717F8(Entity* this) { gUnk_02034490[0] = 0; this->action = 9; this->subAction = 0; - gPlayerState.flags.all = (gPlayerState.flags.all & ~0x20) | 0x80; + gPlayerState.flags = (gPlayerState.flags & ~0x20) | 0x80; sub_0805EC60(this); UnfreezeTime(); } void PlayerTalkEzlo(Entity* this) { if (sub_08078EFC()) { - sub_08056360(); + MessageClose(); sub_08071A6C(); } else { gPlayerState.field_0xa8 = 0x13; @@ -747,7 +747,7 @@ void sub_080718A0(Entity* this) { gUnk_03003DC0.unk0 = 6; this->scriptedScene = 6; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { this->subAction = 2; this->spritePriority.b1 = 0; sub_08052BB8(); @@ -791,10 +791,10 @@ void sub_0807193C(Entity* this) { void sub_08071990(Entity* this) { u32 temp; - if ((gTextBox.doTextBox & 0x7f) == 0) { + if ((gMessage.doTextBox & 0x7f) == 0) { this->subAction++; - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { if (this->animationState == 2) gPlayerState.field_0x8 = 0x3cd; else @@ -806,7 +806,7 @@ void sub_08071990(Entity* this) { return; } - if (gPlayerState.flags.all & 0x80) + if (gPlayerState.flags & 0x80) return; if (this->animationState == 2) @@ -850,13 +850,13 @@ void sub_08071AB0(Entity* this) { u32 speed; this->subAction++; - gPlayerState.flags.all |= 1; + gPlayerState.flags |= 1; if (this->type == 1) { this->speed = 0; this->actionDelay = 0; this->field_0xf = 1; } else { - this->speed = (gPlayerState.flags.all & 0x80) ? 64 : 128; + this->speed = (gPlayerState.flags & 0x80) ? 64 : 128; } sub_08071AF0(this); } @@ -886,12 +886,12 @@ void sub_08071AF0(Entity* this) { void sub_08071B60(Entity* this) { gPlayerState.pushedObject = 2; - gPlayerState.flags.all &= ~0x1; + gPlayerState.flags &= ~0x1; this->type = 0; this->knockbackDuration = 0; sub_080728AC(this); this->field_0xf = 6; - if ((gPlayerState.flags.all & 0x80) == 0) { + if ((gPlayerState.flags & 0x80) == 0) { gPlayerState.field_0x8 = 0x104; this->spriteIndex = 3; InitAnimationForceUpdate(this, (this->animationState >> 1) + 0x3c); @@ -909,11 +909,11 @@ void PlayerMinishDie(Entity* this) { void sub_08071BDC(Entity* this) { u32 temp; - if (gPlayerState.flags.all & (0x10 | 0x100)) + if (gPlayerState.flags & (0x10 | 0x100)) return; if (sub_08003FC4(this, 0x2000)) { - if ((gPlayerState.flags.all & 8) != 0) + if ((gPlayerState.flags & 8) != 0) gPlayerState.field_0x8 = 0x420; else gPlayerState.field_0x8 = 0x810; @@ -921,7 +921,7 @@ void sub_08071BDC(Entity* this) { } gPlayerState.playerAction = 0; - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { if ((u8)(gPlayerState.field_0x10[2] - 8) < 3) { sub_0807A298(this); RespawnPlayer(); @@ -929,11 +929,11 @@ void sub_08071BDC(Entity* this) { } temp = 0xc1a; } else { - temp = (gPlayerState.flags.all & 8) ? 0x459 : 0x1bc; + temp = (gPlayerState.flags & 8) ? 0x459 : 0x1bc; } gPlayerState.field_0x8 = temp; - gPlayerState.flags.all &= ~(0x1000000 | 0x200000 | 0x40000 | 0x800 | 0x400 | 0x100 | 0x1); + gPlayerState.flags &= ~(0x1000000 | 0x200000 | 0x40000 | 0x800 | 0x400 | 0x100 | 0x1); this->subAction = 1; this->animationState = 4; this->spritePriority.b1 = 1; @@ -949,8 +949,8 @@ void sub_08071CAC(Entity* this) { UpdateAnimationSingleFrame(this); if (this->frames.all & 0x80) { u32 temp; - if ((gPlayerState.flags.all & 0x80) == 0) - temp = (gPlayerState.flags.all & 8) ? 0x45a : 0x2bd; + if ((gPlayerState.flags & 0x80) == 0) + temp = (gPlayerState.flags & 8) ? 0x45a : 0x2bd; else temp = 0xc1b; gPlayerState.field_0x8 = temp; @@ -983,7 +983,7 @@ void sub_08071D04(Entity* this) { gPlayerState.field_0x3c[0] = 0; this->direction = 0xff; this->speed = 0; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; gPlayerState.jumpStatus = 1; gPlayerState.swimState = 0; return; @@ -1025,7 +1025,7 @@ void sub_08071E04(Entity* this) { sub_0807A1B8(); if (gPlayerState.field_0x10[2] == 1) { gPlayerState.field_0x10[1] = 7; - gPlayerState.flags.all |= 0x200; + gPlayerState.flags |= 0x200; sub_080791BC(); return; } @@ -1123,7 +1123,7 @@ void sub_08071F80(Entity* this) { if (sub_08079B24() == 0) { sub_08079708(this); } else { - if (gPlayerState.flags.all & 0x800) { + if (gPlayerState.flags & 0x800) { if (sub_0807953C() != 0) { this->actionDelay -= 3; this->spriteOffsetX = 2; @@ -1143,7 +1143,7 @@ void sub_08072008(Entity* this) { this->knockbackDuration = 0; this->flags |= 0x80; this->spriteOffsetX = 0; - gPlayerState.flags.all &= ~(0x800 | 0x1); + gPlayerState.flags &= ~(0x800 | 0x1); CreateFx(this, FX_ICE, 0); sub_080791BC(); } @@ -1194,7 +1194,7 @@ void sub_08072100(Entity* this) { if (gPlayerState.field_0x39) this->direction = 0xff; - if ((gPlayerState.flags.all & 8)) { + if ((gPlayerState.flags & 8)) { gPlayerState.field_0x8 = 0x404; } else { gPlayerState.field_0x8 = 0x104; @@ -1237,12 +1237,12 @@ void sub_08072214(Entity* this) { this->speed = 128; this->actionDelay = gPlayerState.field_0x38; this->direction = (this->animationState ^ 4) << 2; - if (!(gPlayerState.flags.all & 8)) { + if (!(gPlayerState.flags & 8)) { gPlayerState.field_0x8 = 0x34c; } else { gPlayerState.field_0x8 = 0x944; } - gPlayerState.flags.all |= 1; + gPlayerState.flags |= 1; sub_08072260(this); } @@ -1251,8 +1251,8 @@ void sub_08072260(Entity* this) { sub_08079E08(); UpdateAnimationSingleFrame(this); if (--this->actionDelay == 0) { - gPlayerState.flags.all &= ~0x1; - if (!(gPlayerState.flags.all & 8)) { + gPlayerState.flags &= ~0x1; + if (!(gPlayerState.flags & 8)) { gPlayerState.field_0x8 = 0x34c; } else { gPlayerState.field_0x8 = 0x944; @@ -1273,9 +1273,9 @@ void sub_080722DC(Entity* this) { Entity* ent; this->flags &= ~0x80; - if (!(gPlayerState.flags.all & 0x80)) { + if (!(gPlayerState.flags & 0x80)) { this->subAction = 1; - this->field_0x20 = 0x28000; + this->hVelocity = 0x28000; ent = CreateObject(OBJECT_42, 0x80, 0); if (ent != NULL) { ent->attachedEntity = this; @@ -1286,7 +1286,7 @@ void sub_080722DC(Entity* this) { this->subAction = 3; this->knockbackDuration = 10; } - gPlayerState.flags.all |= (0x400 | 0x1); + gPlayerState.flags |= (0x400 | 0x1); ResetPlayer(); SoundReq(SFX_124); SoundReq(SFX_PLY_VO6); @@ -1304,7 +1304,7 @@ void sub_08072354(Entity* this) { this->subAction = 2; this->actionDelay = 0x3c; gPlayerState.field_0x8 = 0x2c1; - gPlayerState.flags.all &= ~0x400; + gPlayerState.flags &= ~0x400; UpdateSpriteForCollisionLayer(this); CreateFx(this, FX_LAVA_SPLASH, 0); SoundReq(SFX_1A6); @@ -1324,7 +1324,7 @@ void sub_0807240C(Entity* this) { if (--this->knockbackDuration == 0xff) { this->spriteSettings.b.draw = 3; this->iframes = 0x14; - gPlayerState.flags.all &= ~0x400; + gPlayerState.flags &= ~0x400; ModHealth(-2); RespawnPlayer(); } @@ -1377,7 +1377,7 @@ void sub_080724DC(Entity* this) { this->spriteSettings.b.draw = 3; this->subAction = 1; if (gRoomVars.field_0x0 == 0) { - if (gPlayerState.flags.all & 0x80) { + if (gPlayerState.flags & 0x80) { gPlayerState.field_0x8 = 0xc18; } else { gPlayerState.field_0x8 = 0x104; @@ -1421,15 +1421,15 @@ void PlayerRoll(Entity* this) { void sub_08072650(Entity* this) { u32 temp; - if ((gPlayerState.flags.all & 0x200000) == 0) { + if ((gPlayerState.flags & 0x200000) == 0) { sub_0806F948(&gPlayerEntity); this->direction = this->animationState << 2; } this->subAction = 1; this->actionDelay = 0; ResetPlayer(); - temp = gPlayerState.flags.all; - if (gPlayerState.flags.all & 0x80) { + temp = gPlayerState.flags; + if (gPlayerState.flags & 0x80) { this->spritePriority.b1 = 0; gPlayerState.field_0x8 = 0xc08; } else { @@ -1440,7 +1440,7 @@ void sub_08072650(Entity* this) { gPlayerState.field_0x8 = 0x2ac; } } - gPlayerState.flags.all |= 0x40000; + gPlayerState.flags |= 0x40000; if (Random() & 1) { SoundReq(SFX_PLY_VO5); } else { @@ -1450,29 +1450,29 @@ void sub_08072650(Entity* this) { } void sub_080726F4(Entity* this) { - if (((gPlayerState.flags.all & (0x40000 | 0x80000)) != 0x40000) || - (!(gPlayerState.flags.all & 0x200000) && (this->iframes != 0) && (this->bitfield & 0x80))) { - gPlayerState.flags.all &= ~0x40000; + if (((gPlayerState.flags & (0x40000 | 0x80000)) != 0x40000) || + (!(gPlayerState.flags & 0x200000) && (this->iframes != 0) && (this->bitfield & 0x80))) { + gPlayerState.flags &= ~0x40000; if (!sub_08078EFC()) sub_080728AC(this); return; } this->direction = (this->animationState & 6) << 2; - if (((gPlayerState.flags.all & 0x80) == 0) && (--this->actionDelay == 0xff)) { + if (((gPlayerState.flags & 0x80) == 0) && (--this->actionDelay == 0xff)) { CreateFx(&gPlayerEntity, FX_DASH, 0x40); this->actionDelay = 4; } - if ((gPlayerState.flags.all & 2) == 0) { + if ((gPlayerState.flags & 2) == 0) { sub_0807A1B8(); } if (sub_08078EFC()) { - gPlayerState.flags.all &= ~0x40000; + gPlayerState.flags &= ~0x40000; return; } - if ((gPlayerState.flags.all & 0x80000) != 0) { - gPlayerState.flags.all &= ~0x40000; + if ((gPlayerState.flags & 0x80000) != 0) { + gPlayerState.flags &= ~0x40000; return; } @@ -1480,8 +1480,8 @@ void sub_080726F4(Entity* this) { return; } - if (gPlayerState.flags.all & 0x250) { - gPlayerState.flags.all &= ~0x40000; + if (gPlayerState.flags & 0x250) { + gPlayerState.flags &= ~0x40000; sub_080728AC(this); return; } @@ -1508,7 +1508,7 @@ void sub_080726F4(Entity* this) { sub_08078F24(); sub_08079E08(); } - if (((this->frames.all & 0x10) == 0) && ((gPlayerState.flags.all & 0x80) == 0)) { + if (((this->frames.all & 0x10) == 0) && ((gPlayerState.flags & 0x80) == 0)) { *(u8*)&this->field_0x40 = 0; } if ((this->frames.all & 0x40) != 0) { @@ -1518,31 +1518,31 @@ void sub_080726F4(Entity* this) { sub_080791D0(); } if ((this->frames.all & 0x80) != 0) { - gPlayerState.flags.all &= ~(0x200000 | 0x40000); + gPlayerState.flags &= ~(0x200000 | 0x40000); } UpdateAnimationSingleFrame(this); } void sub_080728AC(Entity* this) { sub_08079938(); - if (gPlayerState.flags.all & 0x80) + if (gPlayerState.flags & 0x80) sub_0807B068(this); else sub_08078F60(); if (gPlayerState.swimState != 0) this->speed = 0; - if (!(gPlayerState.flags.all & 0x40)) + if (!(gPlayerState.flags & 0x40)) gPlayerEntity.spriteSettings.b.draw = 3; - if (!(gPlayerState.flags.all & 0x80)) + if (!(gPlayerState.flags & 0x80)) gPlayerEntity.spritePriority.b1 = 1; if (!(gRoomControls.unk6 & 4)) { - if ((gPlayerState.flags.all & 0x40)) + if ((gPlayerState.flags & 0x40)) this->flags |= 0x80; sub_080791D0(); } - if (!(gPlayerState.flags.all & 2)) { + if (!(gPlayerState.flags & 2)) { sub_0807A1B8(); } } @@ -1563,8 +1563,8 @@ void sub_08072970(Entity* this) { this->spritePriority.b0 = 7; this->spritePriority.b1 = 0; this->actionDelay = 0; - gPlayerState.flags.all |= 0x100000; - if (gPlayerState.flags.all & 8) { + gPlayerState.flags |= 0x100000; + if (gPlayerState.flags & 8) { gPlayerState.field_0x8 = 0x950; } else { gPlayerState.field_0x8 = 0x61c; @@ -1590,7 +1590,7 @@ void sub_08072A60(Entity* this) { } this->subAction = 2; - if (gPlayerState.flags.all & 8) { + if (gPlayerState.flags & 8) { gPlayerState.field_0x8 = 0x954; } else { gPlayerState.field_0x8 = 0x620; @@ -1606,7 +1606,7 @@ void sub_08072ACC(Entity* this) { } else if (this->field_0xf > 7) { this->flags |= 0x80; this->direction = gPlayerState.field_0xd; - this->field_0x20 = 0x1a000; + this->hVelocity = 0x1a000; this->speed = 0x78; this->spritePriority.b0 = 4; this->spritePriority.b1 = 1; @@ -1636,7 +1636,7 @@ void sub_08072B5C(Entity* this) { this->flags |= 0x80; this->spritePriority.b0 = 4; this->speed = 0x40; - this->field_0x20 = 0x39000; + this->hVelocity = 0x39000; this->height.WORD--; gPlayerState.jumpStatus = 0x41; sub_0806F854(this, 0, -12); @@ -1651,7 +1651,7 @@ void sub_08072B5C(Entity* this) { temp <<= 4; temp -= 4; temp <<= 12; - this->field_0x20 = temp; + this->hVelocity = temp; this->speed = 0x100; gPlayerState.field_0x8 = 0x810; SoundReq(0x7c); @@ -1667,7 +1667,7 @@ void sub_08072C48(Entity* this) { if (gPlayerState.field_0x14) { if (sub_08008B22()) { gPlayerState.field_0x10[1] = 7; - if (!(gPlayerState.flags.all & 0x80)) { + if (!(gPlayerState.flags & 0x80)) { sub_080791BC(); } } @@ -1704,7 +1704,7 @@ void sub_08072CFC(Entity* this) { if (gPlayerState.field_0x38 < 8) { gPlayerState.field_0x38 = 8; } - this->field_0x20 = gPlayerState.field_0x38 << 0xc; + this->hVelocity = gPlayerState.field_0x38 << 0xc; this->speed = 0x200; gPlayerState.field_0x8 = 0x810; this->actionDelay = 5; @@ -1783,12 +1783,12 @@ NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(Entity* t if (gPlayerState.field_0x14 != 0) { if (sub_08008B22() == 0) { gPlayerState.field_0x10[1] = 7; - if (!(gPlayerState.flags.all & 0x80)) { + if (!(gPlayerState.flags & 0x80)) { sub_080791BC(); } } } else { - if ((gPlayerState.flags.all & 8)) { + if ((gPlayerState.flags & 8)) { gPlayerState.field_0x8 = 0x424; } else { gPlayerState.field_0x8 = 0x820; @@ -1899,7 +1899,7 @@ void sub_08073094(Entity* this) { case 0x2a: case 0x2c: this->knockbackDuration = 0; - gPlayerState.flags.all |= 0x20000000; + gPlayerState.flags |= 0x20000000; UpdateAnimationSingleFrame(this); if ((this->frames.all & 0x40) != 0) { sub_0807A1B8(); diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c index d2f4f45e..fc6d3305 100644 --- a/src/projectile/arrowProjectile.c +++ b/src/projectile/arrowProjectile.c @@ -48,7 +48,7 @@ void ArrowProjectile_Init(Entity* this) { this->flags &= 0x7f; this->actionDelay = 0x6a; this->field_0xf = 0; - this->field_0x20 = 0xa00; + this->hVelocity = 0xa00; sub_080A94C0(this, this->type); } @@ -106,7 +106,7 @@ void sub_080A9488(Entity* this) { this->action = 4; this->flags &= 0x7f; this->actionDelay = 2; - this->field_0x20 = 0x18000; + this->hVelocity = 0x18000; this->animationState = (this->knockbackDirection & 0x18) >> 3; EnqueueSFX(SFX_METAL_CLINK); sub_080A94C0(this, this->animationState); diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c index 61f60863..cfa5f3ed 100644 --- a/src/projectile/boneProjectile.c +++ b/src/projectile/boneProjectile.c @@ -59,7 +59,7 @@ void BoneProjectile_Action2(Entity* this) { this->action = 3; this->flags = this->flags & 0x7f; this->speed = 0xe0; - this->field_0x20 = 0xe000; + this->hVelocity = 0xe000; } } @@ -83,7 +83,7 @@ void BoneProjectile_Action4(Entity* this) { void sub_080A82D8(Entity* this) { this->action = 4; this->flags &= 0x7f; - this->field_0x20 = 0x10000; + this->hVelocity = 0x10000; this->direction ^= 0x10; this->speed = 0x80; } diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c index 150d5fe3..2f4c8339 100644 --- a/src/projectile/cannonballProjectile.c +++ b/src/projectile/cannonballProjectile.c @@ -78,7 +78,7 @@ bool32 sub_080AB5F4(Entity* this) { } bool32 sub_080AB634(Entity* this) { - Entity** entities = ((Entity**)&this->parent->field_0x20); + Entity** entities = ((Entity**)&this->parent->hVelocity); u32 i; for (i = 0; i <= 3; ++i) { if (entities[i] != NULL && (sub_080177A0(this, entities[i]) != 0)) { diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c index 371473da..fd5909b8 100644 --- a/src/projectile/dirtBallProjectile.c +++ b/src/projectile/dirtBallProjectile.c @@ -48,7 +48,7 @@ void DirtBallProjectile_Init(Entity* this) { this->action = 1; this->subAction = 0; this->spriteSettings.b.shadow = 1; - this->field_0x20 = 0x8000; + this->hVelocity = 0x8000; this->hitbox = (Hitbox*)&gUnk_08129764; this->field_0x3c |= 0x10; switch (this->type) { diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c index d8eeff71..d48820b0 100644 --- a/src/projectile/gleerokProjectile.c +++ b/src/projectile/gleerokProjectile.c @@ -36,7 +36,7 @@ void GleerokProjectile_Init(Entity* this) { s32 iVar2; this->action = 1; - this->field_0x20 = -0x10000; + this->hVelocity = -0x10000; if (this->type != 3) { CopyPosition(this->parent, this); sub_0806F5BC(this, 0x1000, this->direction); @@ -63,11 +63,11 @@ void GleerokProjectile_Init(Entity* this) { } else if (0x400 < iVar2) { iVar2 = 0x400; } - this->field_0x20 = this->height.WORD / (iVar2 << 8) << 0xd; + this->hVelocity = this->height.WORD / (iVar2 << 8) << 0xd; this->field_0xf = 0x1e; break; case 2: - this->field_0x20 = (this->height.WORD / 0x18000) << 0xc; + this->hVelocity = (this->height.WORD / 0x18000) << 0xc; break; case 3: this->height.WORD = 0xff600000; diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c index 6f677525..5b1f8e44 100644 --- a/src/projectile/octorokBossProjectile.c +++ b/src/projectile/octorokBossProjectile.c @@ -40,7 +40,7 @@ void OctorokBossProjectile_Init(Entity* this) { this->spriteRendering.b3 = 3; this->spritePriority.b0 = 6; this->speed = (Random() & 0x1ff) + 0x200; - this->field_0x20 = (Random() & 0x1fff) + 0x18000; + this->hVelocity = (Random() & 0x1fff) + 0x18000; uVar1 = (((u8)Random() & 7) - 4); this->direction -= uVar1; *(u32*)&this->field_0x78 = 600; diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c index 265a1e5b..72d34a73 100644 --- a/src/projectile/rockProjectile.c +++ b/src/projectile/rockProjectile.c @@ -31,7 +31,7 @@ void sub_080A8064(Entity* this) { void RockProjectile_Init(Entity* this) { this->action = 1; this->actionDelay = 0x30; - this->field_0x20 = 0xa000; + this->hVelocity = 0xa000; InitializeAnimation(this, 0); } @@ -86,7 +86,7 @@ void sub_080A8178(Entity* this) { this->action = 2; this->flags &= 0x7f; this->speed = 0x40; - this->field_0x20 = 0x14000; + this->hVelocity = 0x14000; } void (*const RockProjectile_Functions[])(Entity*) = { diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c index 0c48006f..fb75691e 100644 --- a/src/projectile/stalfosProjectile.c +++ b/src/projectile/stalfosProjectile.c @@ -33,7 +33,7 @@ void sub_080A9A34(Entity* this) { if (this->bitfield == 0x9d) { this->action = 3; this->flags &= 0x7f; - this->field_0x20 = 0x2a000; + this->hVelocity = 0x2a000; this->spritePriority.b1 = 1; } } @@ -77,7 +77,7 @@ void StalfosProjectile_Init(Entity* this) { break; case 2: this->action = 3; - this->field_0x20 = 0x2a000; + this->hVelocity = 0x2a000; this->spritePriority.b1 = 1; break; default: @@ -117,7 +117,7 @@ void StalfosProjectile_Action2(Entity* this) { } void StalfosProjectile_Action3(Entity* this) { - if (this->field_0x20 < 0) { + if (this->hVelocity < 0) { this->spriteSettings.b.flipY = 1; } if (sub_08003FC4(this, 0x2000) == 0) { diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c index cad6d879..00dff22b 100644 --- a/src/projectile/v1FireProjectile.c +++ b/src/projectile/v1FireProjectile.c @@ -42,7 +42,7 @@ void V1FireProjectile_Init(Entity* this) { s8* data; this->action = 1; - this->field_0x20 = -0x10000; + this->hVelocity = -0x10000; this->field_0x76.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); CopyPosition(this->parent, this); sub_0806F5BC(this, 0x1000, this->direction); @@ -68,7 +68,7 @@ void V1FireProjectile_Init(Entity* this) { iVar2 = 0x20; } } - this->field_0x20 = (this->height.WORD / (iVar2 << 8)) << 0xd; + this->hVelocity = (this->height.WORD / (iVar2 << 8)) << 0xd; this->direction = sub_080045B4(this, x, y); } diff --git a/src/room.c b/src/room.c index 5cfde7c1..d136e2f4 100644 --- a/src/room.c +++ b/src/room.c @@ -2241,7 +2241,7 @@ u32 sub_0804CD0C() { #if defined(DEMO_USA) || defined(DEMO_JP) void nullsub_251() { #ifdef DEMO_USA - if (gUnk_02000000->saveFileId != 0 && GetInventoryValue(0x40) == 0) { + if (gSaveHeader->saveFileId != 0 && GetInventoryValue(0x40) == 0) { #else #ifdef DEMO_JP if (GetInventoryValue(0x40) == 0) { @@ -4872,7 +4872,7 @@ extern EntityData gUnk_080F30CC; void sub_0804E7A4(void) { // dog food - if ((GetInventoryValue(0x36) == 1) && !CheckGlobalFlag(BIN_DOGFOOD) && (gPlayerState.flags.all & 0x80) == 0) { + if ((GetInventoryValue(0x36) == 1) && !CheckGlobalFlag(BIN_DOGFOOD) && (gPlayerState.flags & 0x80) == 0) { LoadRoomEntityList(&gUnk_080F30CC); } } @@ -4896,7 +4896,7 @@ void sub_0804E7DC(void) { gArea.musicIndex = gArea.pMusicIndex; SoundReq(SONG_PLAY_VOL_RESET | BGM_MINISH_CAP); } - if ((gPlayerState.flags.all & 8) == 0) { + if ((gPlayerState.flags & 8) == 0) { LoadRoomEntityList(&gUnk_080F31D8); } } diff --git a/src/save.c b/src/save.c index f030c3e4..562f116e 100644 --- a/src/save.c +++ b/src/save.c @@ -115,14 +115,14 @@ SaveResult HandleSaveInProgress(u32 arg0) { InitDMA(); switch (arg0) { case 0: - temp = WriteSaveFile(gUnk_02000000->saveFileId, &gSave); + temp = WriteSaveFile(gSaveHeader->saveFileId, &gSave); break; case 1: - SetFileStatusDeleted(gUnk_02000000->saveFileId); + SetFileStatusDeleted(gSaveHeader->saveFileId); temp = 1; break; case 2: - temp = Write_02000000(gUnk_02000000); + temp = Write_02000000(gSaveHeader); break; } gMenu.field_0xa = temp; diff --git a/src/script.c b/src/script.c index b1a1420a..e38dee61 100644 --- a/src/script.c +++ b/src/script.c @@ -106,11 +106,11 @@ void ScriptCommand_0807E9F0(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EA88(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EA94(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_TextboxNoOverlapFollow(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_TextboxNoOverlap(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_TextboxNoOverlapFollowPos(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_TextboxNoOverlapFollowTable(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_TextboxNoOverlapVar(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_MessageFromTarget(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_MessageNoOverlap(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_MessageFromTargetPos(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_MessageFromTargetTable(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_MessageNoOverlapVar(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EB38(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EB44(Entity* entity, ScriptExecutionContext* context); @@ -159,7 +159,7 @@ void ScriptCommand_0807F0C8(Entity* entity, ScriptExecutionContext* context); extern void CreateSpeechBubbleExclamationMark(Entity*, u32, u32); extern void CreateSpeechBubbleQuestionMark(Entity*, u32, u32); -extern void sub_0801C4A0(u32); +extern void RecoverUI(u32); typedef void (*ScriptCommand)(Entity*, ScriptExecutionContext*); @@ -253,11 +253,11 @@ const ScriptCommand gScriptCommands[] = { ScriptCommandNop, ScriptCommand_0807EA4C, ScriptCommand_0807EA88, ScriptCommand_0807EA94, - ScriptCommand_TextboxNoOverlapFollow, - ScriptCommand_TextboxNoOverlap, - ScriptCommand_TextboxNoOverlapFollowPos, - ScriptCommand_TextboxNoOverlapFollowTable, - ScriptCommand_TextboxNoOverlapVar, + ScriptCommand_MessageFromTarget, + ScriptCommand_MessageNoOverlap, + ScriptCommand_MessageFromTargetPos, + ScriptCommand_MessageFromTargetTable, + ScriptCommand_MessageNoOverlapVar, ScriptCommand_0807EB28, ScriptCommand_0807EB38, ScriptCommand_0807EB44, @@ -406,7 +406,7 @@ void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context) { case 1 << 0x02: break; case 1 << 0x03: - entity->field_0x20 = 0x18000; + entity->hVelocity = 0x18000; break; case 1 << 0x04: CreateSpeechBubbleExclamationMark(entity, 8, -0x18); @@ -602,7 +602,7 @@ void sub_0807DF38(void) { void sub_0807DF50(void) { gUnk_02034490[0] = 0; gUnk_0200AF00.filler0[1] = 0; - sub_0801C4A0(0); + RecoverUI(0); sub_080791D0(); sub_08079184(); } @@ -806,7 +806,7 @@ void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContex } void ScriptCommand_0807E30C(Entity* entity, ScriptExecutionContext* context) { - if ((context->unk_1A & 0xF) == 0 && (gPlayerState.flags.all & 0x80) == 0 && + if ((context->unk_1A & 0xF) == 0 && (gPlayerState.flags & 0x80) == 0 && sub_080041A0(entity, &gPlayerEntity, 0x28, 0x28)) { entity->animationState = sub_0806F5B0(GetFacingDirection(entity, &gPlayerEntity)); } @@ -890,12 +890,12 @@ void ScriptCommand_0807E514(Entity* entity, ScriptExecutionContext* context) { void ScriptCommand_CheckPlayerFlags(Entity* entity, ScriptExecutionContext* context) { context->condition = - !!(GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer) & gPlayerState.flags.all); + !!(GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer) & gPlayerState.flags); gActiveScriptInfo.flags |= 1; } void ScriptCommand_0807E564(Entity* entity, ScriptExecutionContext* context) { - context->condition = (gPlayerState.flags.all >> 7) & 1; + context->condition = (gPlayerState.flags >> 7) & 1; gActiveScriptInfo.flags |= 1; } @@ -1131,10 +1131,10 @@ void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context) { break; entity->interactType = 0; context->unk_18++; - TextboxNoOverlapFollow(context->scriptInstructionPointer[1]); + MessageFromTarget(context->scriptInstructionPointer[1]); break; case 1: - if (gTextBox.doTextBox & 0x7F) + if (gMessage.doTextBox & 0x7F) break; context->unk_18 = 2; context->unk_19 = 0xF; @@ -1195,36 +1195,36 @@ void ScriptCommand_0807EA88(Entity* entity, ScriptExecutionContext* context) { } void ScriptCommand_0807EA94(Entity* entity, ScriptExecutionContext* context) { - if (gTextBox.doTextBox & 0x7F) { + if (gMessage.doTextBox & 0x7F) { gActiveScriptInfo.commandSize = 0; } } -void ScriptCommand_TextboxNoOverlapFollow(Entity* entity, ScriptExecutionContext* context) { - TextboxNoOverlapFollow(context->scriptInstructionPointer[1]); +void ScriptCommand_MessageFromTarget(Entity* entity, ScriptExecutionContext* context) { + MessageFromTarget(context->scriptInstructionPointer[1]); } -void ScriptCommand_TextboxNoOverlap(Entity* entity, ScriptExecutionContext* context) { - TextboxNoOverlap(context->scriptInstructionPointer[1], entity); +void ScriptCommand_MessageNoOverlap(Entity* entity, ScriptExecutionContext* context) { + MessageNoOverlap(context->scriptInstructionPointer[1], entity); } -void ScriptCommand_TextboxNoOverlapFollowPos(Entity* entity, ScriptExecutionContext* context) { - TextboxNoOverlapFollow(context->scriptInstructionPointer[1]); - gTextBox.textWindowPosX = 1; - gTextBox.textWindowPosY = context->scriptInstructionPointer[2]; +void ScriptCommand_MessageFromTargetPos(Entity* entity, ScriptExecutionContext* context) { + MessageFromTarget(context->scriptInstructionPointer[1]); + gMessage.textWindowPosX = 1; + gMessage.textWindowPosY = context->scriptInstructionPointer[2]; } -void ScriptCommand_TextboxNoOverlapFollowTable(Entity* entity, ScriptExecutionContext* context) { +void ScriptCommand_MessageFromTargetTable(Entity* entity, ScriptExecutionContext* context) { if (gActiveScriptInfo.commandSize > context->intVariable) { u16* tmp = context->scriptInstructionPointer + context->intVariable; - TextboxNoOverlapFollow(tmp[1]); + MessageFromTarget(tmp[1]); } else { - TextboxNoOverlapFollow(0); + MessageFromTarget(0); } } -void ScriptCommand_TextboxNoOverlapVar(Entity* entity, ScriptExecutionContext* context) { - TextboxNoOverlap(context->intVariable, entity); +void ScriptCommand_MessageNoOverlapVar(Entity* entity, ScriptExecutionContext* context) { + MessageNoOverlap(context->intVariable, entity); } void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context) { @@ -1267,7 +1267,7 @@ void ScriptCommand_SetEntitySpeed(Entity* entity, ScriptExecutionContext* contex } void ScriptCommand_SetEntity0x20(Entity* entity, ScriptExecutionContext* context) { - entity->field_0x20 = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer); + entity->hVelocity = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer); } void ScriptCommand_SetEntityPositionRelative(Entity* entity, ScriptExecutionContext* context) { @@ -1438,7 +1438,7 @@ void ScriptCommand_0807EEF4(Entity* entity, ScriptExecutionContext* context) { void ScriptCommand_0807EF3C(Entity* entity, ScriptExecutionContext* context) { if (!context->unk_18) { context->unk_18 = 1; - entity->field_0x20 = ((s16)context->scriptInstructionPointer[1]) << 8; + entity->hVelocity = ((s16)context->scriptInstructionPointer[1]) << 8; context->x.HALF.LO = context->scriptInstructionPointer[2] << 8; sub_08003FC4(entity, (u16)context->x.HALF.LO); } else { @@ -1583,7 +1583,7 @@ void sub_0807F1A0(Entity* entity, ScriptExecutionContext* context) { } void sub_0807F1C4(Entity* entity, ScriptExecutionContext* context) { - if ((gPlayerState.flags.all & 8) != 0) { + if ((gPlayerState.flags & 8) != 0) { gPlayerState.field_0x8 = 0x459; } else { gPlayerState.field_0x8 = 0x1bc; @@ -1591,7 +1591,7 @@ void sub_0807F1C4(Entity* entity, ScriptExecutionContext* context) { } void sub_0807F1E8(Entity* entity, ScriptExecutionContext* context) { - if ((gPlayerState.flags.all & 8) != 0) { + if ((gPlayerState.flags & 8) != 0) { gPlayerState.field_0x8 = 0x45a; } else { gPlayerState.field_0x8 = 0x2bd; @@ -1599,7 +1599,7 @@ void sub_0807F1E8(Entity* entity, ScriptExecutionContext* context) { } void sub_0807F210(Entity* entity, ScriptExecutionContext* context) { - if ((gPlayerState.flags.all & 8) != 0) { + if ((gPlayerState.flags & 8) != 0) { gPlayerState.field_0x8 = 0x41c; } else { gPlayerState.field_0x8 = 0x80c; @@ -1843,11 +1843,11 @@ void sub_0807F6B4(Entity* entity, ScriptExecutionContext* context) { } void sub_0807F6E8(Entity* entity, ScriptExecutionContext* context) { - gPlayerState.flags.all |= context->intVariable; + gPlayerState.flags |= context->intVariable; } void sub_0807F6F8(Entity* entity, ScriptExecutionContext* context) { - gPlayerState.flags.all &= ~context->intVariable; + gPlayerState.flags &= ~context->intVariable; } void sub_0807F708(Entity* entity, ScriptExecutionContext* context) { @@ -1887,8 +1887,8 @@ void sub_0807F78C(Entity* entity, ScriptExecutionContext* context) { msg = GetSaleItemConfirmMessageID(item); price = GetItemPrice(item); - TextboxNoOverlap(msg, entity); - gTextBox.field_0x10 = (u16)price; + MessageNoOverlap(msg, entity); + gMessage.field_0x10 = (u16)price; } void sub_0807F7C4(Entity* entity, ScriptExecutionContext* context) { @@ -1936,16 +1936,16 @@ void sub_0807F854(Entity* entity, ScriptExecutionContext* context) { switch (idx) { case 0: case 1: - gTextBox.field_0x10 = value; + gMessage.field_0x10 = value; break; case 2: - gTextBox.field_0x14 = value; + gMessage.field_0x14 = value; break; case 3: - gTextBox.field_0x18 = value; + gMessage.field_0x18 = value; break; case 4: - gTextBox.field_0x1c = value; + gMessage.field_0x1c = value; break; } } @@ -1997,7 +1997,7 @@ void sub_0807F950(Entity* entity, ScriptExecutionContext* context) { } void sub_0807F970(Entity* entity, ScriptExecutionContext* context) { - context->condition = context->intVariable == gCurrentTextBox._28; + context->condition = context->intVariable == gTextRender.curToken.textIndex; } void sub_0807F98C(Entity* entity, ScriptExecutionContext* context) { diff --git a/src/sub_0807CA18.c b/src/sub_0807CA18.c index da748a58..7dd5603a 100644 --- a/src/sub_0807CA18.c +++ b/src/sub_0807CA18.c @@ -24,8 +24,8 @@ u8 sub_0807CA18() { #ifdef DEMO_USA { const u8* tmp; - MemCopy(demoPointers[gUnk_02000000->saveFileId], &gSave, 0x4B4); - if (gUnk_02000000->gameLanguage == 0) { + MemCopy(demoPointers[gSaveHeader->saveFileId], &gSave, 0x4B4); + if (gSaveHeader->gameLanguage == 0) { gSave.playerName[0] = 0x97; gSave.playerName[1] = 0x7F; gSave.playerName[2] = 0xDD; @@ -34,7 +34,7 @@ u8 sub_0807CA18() { ModHealth(0xA0); ModRupees(-9999); tmp = demoUnknown1 + gUnk_02000010.field_0x7 * 3; - gSave.unk_4a8 = tmp[gUnk_02000000->saveFileId] * 3600; + gSave.unk_4a8 = tmp[gSaveHeader->saveFileId] * 3600; } #endif return 1; diff --git a/src/textbox.c b/src/textbox.c index 01b7bbae..71da7228 100644 --- a/src/textbox.c +++ b/src/textbox.c @@ -8,74 +8,96 @@ #include "structures.h" #include "save.h" -#define TEXTBOX_ADVANCE_KEYS (A_BUTTON | B_BUTTON | DPAD_ANY | R_BUTTON) -#define TEXTBOX_PRESS_ANY_ADVANCE_KEYS ((gInput.newKeys & TEXTBOX_ADVANCE_KEYS) != 0) +#define MESSAGE_ADVANCE_KEYS (A_BUTTON | B_BUTTON | DPAD_ANY | R_BUTTON) +#define MESSAGE_PRESS_ANY_ADVANCE_KEYS ((gInput.newKeys & MESSAGE_ADVANCE_KEYS) != 0) -#define TEXTBOX_WIDTH 0x20 -#define TEXTBOX_POSITION_INDEX(window) ((window).yPos * TEXTBOX_WIDTH + (window).xPos) +#define MESSAGE_WIDTH 0x20 +#define MESSAGE_POSITION_INDEX(window) ((window).yPos * MESSAGE_WIDTH + (window).xPos) + +#define MESSAGE_PALETTE 0xF + +// todo: move this to a shared header for ui tiles +enum { + MSG_BORDER_CORNER = 0x7B, + MSG_BORDER_H_CORNER = 0x7C, + MSG_BORDER_H_STRAIGHT = 0x7D, + MSG_BORDER_V_CORNER = 0x7E, + MSG_BORDER_V_STRAIGHT = 0x7F, + MSG_CURSOR = 0x80, + MSG_BACKGROUND = 0x81, + MSG_TEXT_LINE1TOP = 0x82, + MSG_TEXT_LINE1BOTTOM = 0x83, + MSG_TEXT_LINE2TOP = 0xb6, + MSG_TEXT_LINE2BOTTOM = 0xb7, +}; extern void WriteBit(u32*, u32); -extern void sub_0805EF40(u8*, u8*); -extern void sub_0801C4A0(u32, u32); -extern void sub_0801C494(void); +extern void sub_0805EF40(Token* tok, const u8*); +extern void RecoverUI(u32 bottomPt, u32 topPt); +extern void RefreshUI(void); extern void sub_0805F918(u32, u32, u32); extern u32 sub_0801D51C(u32, u8*, u32); u32 sub_08056FEC(u32, u8*); - -u16 sub_08056750(CurrentTextBox*); -u32 sub_0805EFE8(u8*); -void sub_08056ABC(u32, u32); -void sub_080569C4(CurrentTextBox*, u32); +u32 GetCharacter(Token* tok); +extern void sub_0805EEB4(Token* tok, u32 textIdx); u16 sub_0805F7DC(u32, u8*); -u32 sub_GetFontStrWidth(u8*, u32); -void sub_08056FBC(CurrentTextBox*); -void SetDoTextBox(u32 doTextbox); -void Load_02000D00_Asyc(void); +u32 GetFontStrWith(u8*, u32); -void DeleteWindow(void); -void CreateWindow(void); -u32 CalcWindowSize(u32 fade); +static void StatusUpdate(u32 status); -void DispMessageFrame(u16*, u32, u32, u32); -void DispString(void); -void DispCursor(void); +static u16 RunTextCommand(TextRender* this); +static void PaletteChange(TextRender* this, u32 id); +static void SwitchChoice(u32 to, u32 from); -typedef u32 (*TextBoxFunction)(void); +static void MsgChangeLine(u32 lineNo); +static void SetDoTextBox(u32 doTextbox); -u32 TextBoxFunction0(void); -u32 TextBoxFunction1(void); -u32 HandleTextBox(void); -u32 TextBoxFunctionOpen(void); -u32 TextBoxFunctionClose(void); -u32 TextBoxFunction5(void); +static void DeleteWindow(void); +static u32 ChangeWindowSize(u32 delta); +static void CreateWindow(void); -const TextBoxFunction gTextBoxFunctions[] = { - TextBoxFunction0, TextBoxFunction1, HandleTextBox, TextBoxFunctionOpen, TextBoxFunctionClose, TextBoxFunction5, -}; +static void DispString(void); +static void DispCursor(void); +static void DrawCanvasLine(void); +static void sub_08056F88(u32, u32); +static void sub_08056FBC(TextRender*); -extern u8 gUnk_020227DC, gUnk_020227E8, gUnk_020227F0, gUnk_020227F8, gUnk_02022800; -u8* const gUnk_08107BE0[] = { - &gUnk_020227DC, &gUnk_020227E8, &gUnk_020227F0, &gUnk_020227F8, &gUnk_02022800, -}; +typedef u32 (*MessageFunction)(void); +static u32 MsgIdle(void); +static u32 MsgInit(void); +static u32 MsgUpdate(void); +static u32 MsgOpen(void); +static u32 MsgClose(void); +static u32 MsgDie(void); +typedef enum { + MSG_IDLE, + MSG_INIT, + MSG_UPDATE, + MSG_OPEN, + MSG_CLOSE, + MSG_DIE, +} MessageStatus; -typedef void (*TextBoxHandler)(CurrentTextBox*); - -void TextBoxHandler0(CurrentTextBox* this); -void TextBoxHandler1(CurrentTextBox* param_1); -void TextBoxHandlerAdvance(CurrentTextBox* ctb); -void TextBoxHandlerNextBox(CurrentTextBox* ctb); -void TextBoxHandler4(CurrentTextBox* ctb); -void TextBoxHandlerQuestion(CurrentTextBox* ctb); - -const TextBoxHandler gTextBoxHandlers[] = { - TextBoxHandler0, TextBoxHandler1, TextBoxHandlerAdvance, - TextBoxHandlerNextBox, TextBoxHandler4, TextBoxHandlerQuestion, -}; +typedef void (*TextRenderFunction)(TextRender*); +static void TextDispInit(TextRender* this); +static void TextDispUpdate(TextRender* this); +static void TextDispDie(TextRender* this); +static void TextDispWait(TextRender* this); +static void TextDispRoll(TextRender* this); +static void TextDispEnquiry(TextRender* this); +typedef enum { + RENDER_INIT, + RENDER_UPDATE, + RENDER_DIE, + RENDER_WAIT, + RENDER_ROLL, + RENDER_ENQUIRY, +} TextRenderStatus; typedef struct Window { u8 unk0; - u8 unk1; + u8 active; u8 unk2; u8 unk3; u8 xPos; @@ -89,658 +111,660 @@ extern Window gNewWindow; extern struct { u8 unk_00; u8 unk_01[1]; - s8 unk_02; - s8 unk_03; + s8 choiceCount; + s8 currentChoice; u8 unk_04[4]; u16 unk_08[4]; u16 unk_10[4]; -} gUnk_02024030; +} gMessageChoices; -extern u32 gUnk_0200005C; - -extern u8 gUnk_020227A0; -extern u8 gUnk_02000D00[0xD00]; - -extern const u8 gUnk_08107C0C[]; +extern u8 gTextGfxBuffer[0xD00]; s32 sub_08056338(void) { s32 result; result = -1; - if (((gTextBox.doTextBox & 0x7f) == 0) && (gUnk_02000040.unk_00 == 3)) + if (((gMessage.doTextBox & 0x7f) == 0) && (gUnk_02000040.unk_00 == 3)) result = gUnk_02000040.unk_01; return result; } -void sub_08056360(void) { - if ((gTextBox.doTextBox & 0x7f) != 0) { - gTextBox.doTextBox = 0x88; +void MessageClose(void) { + if ((gMessage.doTextBox & 0x7f) != 0) { + gMessage.doTextBox = 0x88; } } -void TextboxNoOverlapFollow(u32 index) { +void MessageFromTarget(u32 index) { if (gRoomControls.cameraTarget != NULL) { - TextboxNoOverlap(index, gRoomControls.cameraTarget); + MessageNoOverlap(index, gRoomControls.cameraTarget); } else { - ShowTextbox(index); + MessageRequest(index); } } -void TextboxNoOverlap(u32 index, Entity* entity) { +void MessageNoOverlap(u32 index, Entity* entity) { s16 y; s16 height; - ShowTextbox(index); + MessageRequest(index); y = entity->y.HALF.HI; height = entity->height.HALF.HI; if (((y + height) - gRoomControls.roomScrollY) > 0x58) { - gTextBox.textWindowPosY = 1; + gMessage.textWindowPosY = 1; } } -void TextBoxAtYPosition(u32 index, u32 y) { - TextboxAtPosition(index, 1, y); +void MessageAtHeight(u32 index, u32 y) { + MessageAtPos(index, 1, y); } -void TextboxAtPosition(u32 index, u32 x, u32 y) { - ShowTextbox(index); - gTextBox.textWindowPosX = x; - gTextBox.textWindowPosY = y; +void MessageAtPos(u32 index, u32 x, u32 y) { + MessageRequest(index); + gMessage.textWindowPosX = x; + gMessage.textWindowPosY = y; } -void ShowTextbox(u32 index) { - MemClear(&gTextBox, sizeof(gTextBox)); - gTextBox.textIndex = index; - gTextBox.textSpeed = 99; - gTextBox.textWindowWidth = 26; - gTextBox.textWindowHeight = 4; - gTextBox.textWindowPosX = 1; - gTextBox.textWindowPosY = 12; - gTextBox.doTextBox = 1; +void MessageRequest(u32 index) { + MemClear(&gMessage, sizeof(gMessage)); + gMessage.textIndex = index; + gMessage.textSpeed = 99; + gMessage.textWindowWidth = 26; + gMessage.textWindowHeight = 4; + gMessage.textWindowPosX = 1; + gMessage.textWindowPosY = 12; + gMessage.doTextBox = 1; } void MessageInitialize(void) { - MemClear(&gTextBox, sizeof(gTextBox)); - MemClear(&gCurrentTextBox, sizeof(gCurrentTextBox)); + MemClear(&gMessage, sizeof(gMessage)); + MemClear(&gTextRender, sizeof(gTextRender)); MemClear(&gNewWindow, sizeof(gNewWindow)); MemClear(&gCurrentWindow, sizeof(gCurrentWindow)); MemClear(&gUnk_02000040, 4); } -void MessageUpdate(void) { - int iVar1; +void MessageMain(void) { + static const MessageFunction gMessageFunctions[] = { + [MSG_IDLE] = MsgIdle, [MSG_INIT] = MsgInit, [MSG_UPDATE] = MsgUpdate, + [MSG_OPEN] = MsgOpen, [MSG_CLOSE] = MsgClose, [MSG_DIE] = MsgDie, + }; - if (gTextBox.doTextBox == 1) { - MemClear((u32*)&gCurrentTextBox, sizeof(gCurrentTextBox)); - sub_080564C8(1); + if (gMessage.doTextBox == 1) { + MemClear((u32*)&gTextRender, sizeof(gTextRender)); + StatusUpdate(MSG_INIT); } - if (gCurrentTextBox._8a != 0) { - gCurrentTextBox._8a--; + if (gTextRender.newlineDelay != 0) { + gTextRender.newlineDelay--; } else { + int result; do { - iVar1 = gTextBoxFunctions[gCurrentTextBox._88](); - } while (iVar1 != 0); + result = gMessageFunctions[gTextRender.msgStatus](); + } while (result != 0); } - if (gCurrentTextBox._9d != 0) { - gCurrentTextBox._9d = 0; - Load_02000D00_Asyc(); + if (gTextRender.updateDraw) { + gTextRender.updateDraw = 0; + DrawCanvasLine(); } DeleteWindow(); CreateWindow(); } -void sub_080564C8(u32 unk) { - gCurrentTextBox._88 = unk; - gCurrentTextBox.state = 0; +static void StatusUpdate(MessageStatus status) { + gTextRender.msgStatus = status; + gTextRender.renderStatus = RENDER_INIT; } -u32 TextBoxFunction0(void) { - gCurrentTextBox._98.bytes.b1 = 0; +static u32 MsgIdle(void) { + gTextRender._98.bytes.b1 = 0; return 0; } +extern u8 gUnk_020227DC, gUnk_020227E8, gUnk_020227F0, gUnk_020227F8, gUnk_02022800; +u8* const gUnk_08107BE0[] = { + &gUnk_020227DC, &gUnk_020227E8, &gUnk_020227F0, &gUnk_020227F8, &gUnk_02022800, +}; + // regalloc in loop -NONMATCH("asm/non_matching/textbox/TextBoxFunction1.inc", u32 TextBoxFunction1(void)) { - u32 uVar1; +NONMATCH("asm/non_matching/textbox/TextBoxFunction1.inc", static u32 MsgInit(void)) { char* dest; u32 i; - char c; - MemClear((void*)&gNewWindow, 8); - MemClear((void*)&gUnk_02024030, 0x18); - MemClear((void*)&gCurrentTextBox, sizeof(gCurrentTextBox)); - MemCopy(&gTextBox, &gCurrentTextBox, sizeof(gTextBox)); - if (gCurrentTextBox.textBox.textSpeed == 0x63) { - gCurrentTextBox.textBox.textSpeed = gUnk_02000000->messageSpeed; + MemClear((void*)&gNewWindow, sizeof(gNewWindow)); + MemClear((void*)&gMessageChoices, sizeof(gMessageChoices)); + MemClear((void*)&gTextRender, sizeof(gTextRender)); + MemCopy(&gMessage, &gTextRender, sizeof(gMessage)); + if (gTextRender.message.textSpeed == 99) { + gTextRender.message.textSpeed = gSaveHeader->messageSpeed; } - gCurrentTextBox._9c = 0xff; - sub_0805EEB4(&gCurrentTextBox._20, gCurrentTextBox.textBox.textIndex); - gCurrentTextBox.playerName[0] = 2; - gCurrentTextBox.playerName[1] = 0xe; - dest = &gCurrentTextBox.playerName[2]; + gTextRender._9c = 0xff; + sub_0805EEB4(&gTextRender.curToken, gTextRender.message.textIndex); + gTextRender.playerName[0] = 2; + gTextRender.playerName[1] = 0xe; // Green text color + dest = &gTextRender.playerName[2]; for (i = 0; i < FILENAME_LENGTH; ++i) { - c = gSave.playerName[i]; + char c = gSave.playerName[i]; if (c == '\0') break; - *dest = c; - dest++; + *dest++ = c; } dest[0] = 2; - dest[1] = 15; - dest[2] = 0; - sub_08056FBC(&gCurrentTextBox); - gCurrentTextBox._2c = &gUnk_08107BE0; - gCurrentTextBox._50.unk8 = gUnk_02000D00; - gCurrentTextBox._50.unk4 = 0xd0; + dest[1] = 0xf; // White text color + dest[2] = '\0'; + sub_08056FBC(&gTextRender); + gTextRender.curToken._c = &gUnk_08107BE0; + gTextRender._50.unk8 = gTextGfxBuffer; + gTextRender._50.unk4 = 0xd0; SetDoTextBox(2); - sub_08056BDC(0); - sub_080564C8(2); + MsgChangeLine(0); + StatusUpdate(MSG_UPDATE); return 1; } END_NONMATCH -u32 TextBoxFunctionOpen(void) { - if (gCurrentTextBox.state == 0) { - gCurrentTextBox.state = 1; - gCurrentTextBox._98.bytes.b1 = 1; - sub_08056F88(gCurrentTextBox.textBox.unk3, gCurrentTextBox._50.unk3); +static u32 MsgOpen(void) { + if (gTextRender.renderStatus == RENDER_INIT) { + gTextRender.renderStatus = RENDER_UPDATE; + gTextRender._98.bytes.b1 = 1; + sub_08056F88(gTextRender.message.unk3, gTextRender._50.unk3); SoundReq(SFX_TEXTBOX_OPEN); } - if (CalcWindowSize(1)) { - gCurrentTextBox._98.bytes.b1 = 2; - sub_080564C8(2); + if (ChangeWindowSize(1)) { + gTextRender._98.bytes.b1 = 2; + StatusUpdate(MSG_UPDATE); } return 0; } -u32 TextBoxFunctionClose(void) { - if (gCurrentTextBox.state == 0) { - gCurrentTextBox.state = 1; - gCurrentTextBox._98.bytes.b1 = 3; - sub_08056BDC(0); +static u32 MsgClose(void) { + if (gTextRender.renderStatus == RENDER_INIT) { + gTextRender.renderStatus = RENDER_UPDATE; + gTextRender._98.bytes.b1 = 3; + MsgChangeLine(0); SoundReq(SFX_TEXTBOX_CLOSE); } - if (CalcWindowSize(-1)) { - gCurrentTextBox._98.bytes.b1 = 0; - sub_080564C8(2); + if (ChangeWindowSize(-1)) { + gTextRender._98.bytes.b1 = 0; + StatusUpdate(MSG_UPDATE); } return 0; } -u32 TextBoxFunction5(void) { +static u32 MsgDie(void) { SetDoTextBox(0); - sub_080564C8(0); + StatusUpdate(MSG_IDLE); return 0; } -u32 HandleTextBox(void) { +static u32 MsgUpdate(void) { + static const TextRenderFunction gTextDispFunctions[] = { + [RENDER_INIT] = TextDispInit, [RENDER_UPDATE] = TextDispUpdate, [RENDER_DIE] = TextDispDie, + [RENDER_WAIT] = TextDispWait, [RENDER_ROLL] = TextDispRoll, [RENDER_ENQUIRY] = TextDispEnquiry, + }; + SetDoTextBox(4); - gTextBoxHandlers[gCurrentTextBox.state](&gCurrentTextBox); - CalcWindowSize(0); + gTextDispFunctions[gTextRender.renderStatus](&gTextRender); + ChangeWindowSize(0); return 0; } -void TextBoxHandler0(CurrentTextBox* this) { - if ((gCurrentTextBox._20 & 1) == 0) { - if (gCurrentTextBox._98.bytes.b1 == 0) { - sub_080564C8(5); +static void TextDispInit(TextRender* this) { + if ((gTextRender.curToken.flags & 1) == 0) { + if (gTextRender._98.bytes.b1 == 0) { + StatusUpdate(MSG_DIE); } } else { - this->state = 1; + this->renderStatus = RENDER_UPDATE; } } -void TextBoxHandler1(CurrentTextBox* param_1) { - u32 uVar3; - s32 iVar4; - int iVar5; - int iVar6; +static void TextDispUpdate(TextRender* this) { + static const u8 speeds[] = { 5, 3, 1 }; + u32 speedModifier; + s32 numCharsToRead, pxDrawn; - if (param_1->_95 != 0) { - param_1->_95--; + if (this->delay != 0) { + this->delay--; + return; + } + + if ((gInput.heldKeys & B_BUTTON) != 0) { + speedModifier = 8; } else { - if ((gInput.heldKeys & B_BUTTON) != 0) { - iVar4 = 8; - } else { - iVar4 = 1; - } - param_1->_92 -= iVar4; - if (param_1->_92 < 1) { - iVar5 = 0; - do { - iVar5++; - param_1->_92 += gUnk_08107C0C[param_1->textBox.textSpeed]; - } while (param_1->_92 < 1); - iVar6 = 0; - do { - uVar3 = sub_08056750(param_1); - if (((uVar3 == 0) || (param_1->_95 != 0)) || (param_1->_8a != 0)) - break; - iVar6 += uVar3; - iVar5--; - } while (0 < iVar5); - if (iVar6 != 0) { - gCurrentTextBox._9d = 1; - } else { - param_1->_92 = 0; - } - } + speedModifier = 1; + } + this->typeSpeed -= speedModifier; + + if (this->typeSpeed > 0) { + return; + } + + numCharsToRead = 0; + do { + numCharsToRead++; + this->typeSpeed += speeds[this->message.textSpeed]; + } while (this->typeSpeed <= 0); + + pxDrawn = 0; + do { + u32 pxCnt = RunTextCommand(this); + if (pxCnt == 0 || this->delay != 0 || this->newlineDelay != 0) + break; + pxDrawn += pxCnt; + numCharsToRead--; + } while (0 < numCharsToRead); + + if (pxDrawn != 0) { + gTextRender.updateDraw = 1; + } else { + this->typeSpeed = 0; } } -NONMATCH("asm/non_matching/textbox/sub_08056750.inc", u16 sub_08056750(CurrentTextBox* param_1)) { - s32 r0, r1, r2, r3; - u32 r7; - s32 tmp; - u32 t; - u32* t2; +NONMATCH("asm/non_matching/textbox/sub_08056750.inc", static u16 RunTextCommand(TextRender* this)) { + s32 palette; + u32 chr = this->curToken.extended; - r7 = param_1->_24; - - if (r7 == 0) { - r7 = sub_0805EFE8(¶m_1->_20); - switch (r7) { + if (chr == 0) { + s32 r1; + chr = GetCharacter(&this->curToken); + switch (chr) { case 0: if (gUnk_02000040.unk_00 == 1) { - param_1->state = 5; - sub_08056ABC(0, 0); + this->renderStatus = RENDER_ENQUIRY; + SwitchChoice(0, 0); } else { - param_1->state = 2; + this->renderStatus = RENDER_DIE; } break; case 1: - param_1->_8a = 2; - if (param_1->_98.bytes.b0 == 0) { - sub_08056BDC(1); + this->newlineDelay = 2; + if (this->_98.bytes.lineNo == 0) { + MsgChangeLine(1); } else { - param_1->state = 3; + this->renderStatus = RENDER_WAIT; } break; case 2: - sub_080564C8(3); + StatusUpdate(MSG_OPEN); break; case 3: - sub_080564C8(4); + StatusUpdate(MSG_CLOSE); break; case 4: - param_1->_50.unk6 += - (param_1->_50.unk4 - param_1->_50.unk6 - sub_GetFontStrWidth(¶m_1->_20, 0)) / 2; + this->_50.unk6 += (this->_50.unk4 - this->_50.unk6 - GetFontStrWith(&this->curToken.flags, 0)) / 2; break; case 5: - gTextBox.unk = param_1->_22; + gMessage.unk = this->curToken.param; break; case 6: - t2 = &gUnk_0200005C; - t = param_1->_22; - WriteBit(t2, 0x1f & t); + WriteBit(&gMessage.field_0xc, this->curToken.param & 0x1f); break; case 7: - switch (param_1->_22) { + switch (this->curToken.param) { case 0xe: - param_1->_91 = param_1->_8f; - r3 = 2; + this->_91 = this->_8f; + palette = 2; break; case 0xf: - r3 = param_1->_91; + palette = this->_91; break; default: - r3 = param_1->_22; + palette = this->curToken.param; break; } - param_1->_90 = 0; - sub_080569C4(param_1, r3); + this->_90 = 0; + PaletteChange(this, palette); break; case 8: - SoundReq(param_1->_22); + SoundReq(this->curToken.param); break; case 9: - gCurrentTextBox.textBox.unk3 = param_1->_22; - sub_08056F88(param_1->_22, param_1->_50.unk3); + gTextRender.message.unk3 = this->curToken.param; + sub_08056F88(this->curToken.param, this->_50.unk3); break; case 10: - param_1->textBox.textWindowPosY = param_1->_22; + this->message.textWindowPosY = this->curToken.param; break; case 12: if (gUnk_02000040.unk_00 != 1) { MemClear(&gUnk_02000040, 4); - MemClear(&gUnk_02024030, sizeof(gUnk_02024030)); - gUnk_02024030.unk_00 = 1; + MemClear(&gMessageChoices, sizeof(gMessageChoices)); + gMessageChoices.unk_00 = 1; gUnk_02000040.unk_00 = 1; } - if (gUnk_02024030.unk_02 > 3) + if (gMessageChoices.choiceCount > 3) break; - gUnk_02024030.unk_10[gUnk_02024030.unk_02] = param_1->_26; - gUnk_02024030.unk_08[gUnk_02024030.unk_02] = param_1->_50.unk6; - gUnk_02024030.unk_02++; - param_1->_50.unk6 += 8; + gMessageChoices.unk_10[gMessageChoices.choiceCount] = this->curToken._6; + gMessageChoices.unk_08[gMessageChoices.choiceCount] = this->_50.unk6; + gMessageChoices.choiceCount++; + this->_50.unk6 += 8; break; case 13: - switch (param_1->_22) { + switch (this->curToken.param) { case 0xff: - param_1->_8e = 1; + this->_8e = 1; break; case 0xfe: - param_1->_8e = 2; + this->_8e = 2; break; default: - param_1->_95 = param_1->_22; + this->delay = this->curToken.param; break; } break; case 14: - r1 = param_1->_22; - param_1->_94 = r1; + r1 = this->curToken.param; + this->_94 = r1; break; default: break; } - if (r7 >> 8 == 0) + if (chr >> 8 == 0) return 0; } - if (gCurrentTextBox._98.bytes.b1 != 2) { - sub_080564C8(3); + if (gTextRender._98.bytes.b1 != 2) { + StatusUpdate(MSG_OPEN); return 0; } - if (gTextBox.unk == 0) { - gTextBox.unk = 0x80; + if (gMessage.unk == 0) { + gMessage.unk = 0x80; } - param_1->_24 = 0; - if (r7 >> 8 == 7) { - param_1->_90 = param_1->_8f | 0x80; - sub_080569C4(param_1, 0); + this->curToken.extended = '\0'; + if (chr >> 8 == 7) { + this->_90 = this->_8f | 0x80; + PaletteChange(this, 0); } else { - if ((param_1->_90 & 0x80) != 0) { - r3 = param_1->_90; - param_1->_90 = 0; - sub_080569C4(param_1, r3); + if ((this->_90 & 0x80) != 0) { + palette = this->_90; + this->_90 = 0; + PaletteChange(this, palette); } } - return sub_0805F7DC(r7, ¶m_1->_30[0x20]); + return sub_0805F7DC(chr, &this->_50.unk0); } END_NONMATCH -void sub_080569C4(CurrentTextBox* ctb, u32 unk) { - u32 temp = unk & 0x7; - ctb->_8f = temp; - ctb->_50.unk2 = temp; +static void PaletteChange(TextRender* this, u32 id) { + u32 temp = id % 8; + this->_8f = temp; + this->_50.unk2 = temp; } -extern u8 gUnk_08107C14; -extern u8 gUnk_08107C0F; +const u8 gUnk_08107C0F[] = { 0x8, 0x1e, 0x4, 0x12, 0x0 }; +const u8 gUnk_08107C14[] = { 0x8, 0x1e, 0x8, 0xFE, 0x0 }; #ifdef EU -ASM_FUNC("asm/non_matching/eu/TextBoxHandlerQuestion.inc", void TextBoxHandlerQuestion(CurrentTextBox* ctb)) +ASM_FUNC("asm/non_matching/eu/TextBoxHandlerQuestion.inc", static void TextDispEnquiry(TextRender* ctb)) #else -void TextBoxHandlerQuestion(CurrentTextBox* ctb) { - s32 r1, r5, r6; - u32 error; - u8* ptr1; - u8* ptr2; +static void TextDispEnquiry(TextRender* this) { + s32 nextTextIdx, choiceIdx, lastChoice; + u32 doSwitch; + const u8* src; - r5 = gUnk_02024030.unk_03; + choiceIdx = gMessageChoices.currentChoice; switch (gInput.newKeys) { case START_BUTTON: case A_BUTTON: - r1 = gUnk_02024030.unk_10[r5]; - if (r1 == 0) { - ptr2 = &gUnk_08107C14; - ptr1 = &ctb->_20; + nextTextIdx = gMessageChoices.unk_10[choiceIdx]; + if (nextTextIdx == 0) { + src = gUnk_08107C14; } else { - ctb->textBox.textIndex = r1; - sub_0805EEB4(&ctb->_20, r1); - ptr2 = &gUnk_08107C0F; - ptr1 = &ctb->_20; + this->message.textIndex = nextTextIdx; + sub_0805EEB4(&this->curToken, nextTextIdx); + src = gUnk_08107C0F; } - sub_0805EF40(ptr1, ptr2); - gUnk_02000040.unk_01 = gUnk_02024030.unk_03; + sub_0805EF40(&this->curToken, src); + gUnk_02000040.unk_01 = gMessageChoices.currentChoice; gUnk_02000040.unk_00 = 3; - MemClear(&gUnk_02024030, sizeof(gUnk_02024030)); - SoundReq(0x6a); // SFX_TEXTBOX_SELECT - ctb->state = 1; + MemClear(&gMessageChoices, sizeof(gMessageChoices)); + SoundReq(SFX_TEXTBOX_SELECT); + this->renderStatus = RENDER_UPDATE; break; case DPAD_LEFT: - r5--; + choiceIdx--; break; case DPAD_RIGHT: - r5++; + choiceIdx++; break; default: break; } - r5 = (r5 + gUnk_02024030.unk_02) % gUnk_02024030.unk_02; - r6 = gUnk_02024030.unk_03; - if (r5 != r6) { - gUnk_02024030.unk_03 = r5; - SoundReq(0x69); // SFX_TEXTBOX_CHOICE - error = 1; + choiceIdx = (choiceIdx + gMessageChoices.choiceCount) % gMessageChoices.choiceCount; + lastChoice = gMessageChoices.currentChoice; + if (choiceIdx != lastChoice) { + gMessageChoices.currentChoice = choiceIdx; + SoundReq(SFX_TEXTBOX_CHOICE); + doSwitch = 1; } else { - error = 0; + doSwitch = 0; } if (gUnk_02000040.unk_00 == 1) { - gUnk_02024030.unk_00 = gUnk_02000040.unk_00 = 2; - error = 1; + gMessageChoices.unk_00 = gUnk_02000040.unk_00 = 2; + doSwitch = 1; } - if (error != 0) { - sub_08056ABC(r5, r6); + if (doSwitch) { + SwitchChoice(choiceIdx, lastChoice); } } -void sub_08056ABC(u32 unk_0, u32 unk_1) { +static void SwitchChoice(u32 to, u32 from) { u16 t; - t = gCurrentTextBox._50.unk6; - gCurrentTextBox._50.unk6 = gUnk_02024030.unk_08[unk_1]; - sub_0805F8E4(0, &gCurrentTextBox._50); - gCurrentTextBox._50.unk6 = gUnk_02024030.unk_08[unk_0]; - sub_0805F8E4(1, &gCurrentTextBox._50); - gCurrentTextBox._50.unk6 = t; - gCurrentTextBox._9d = 1; + t = gTextRender._50.unk6; + gTextRender._50.unk6 = gMessageChoices.unk_08[from]; + sub_0805F8E4(0, &gTextRender._50); + gTextRender._50.unk6 = gMessageChoices.unk_08[to]; + sub_0805F8E4(1, &gTextRender._50); + gTextRender._50.unk6 = t; + gTextRender.updateDraw = 1; } #endif -void TextBoxHandlerNextBox(CurrentTextBox* ctb) { - u32 t; - u8* ptr; - gTextBox.unk = 0; - if (ctb->_94 != 0) { - ctb->_94--; - if (ctb->_94 != 0) - return; - ptr = &ctb->state; - t = 4; - } else { - if (TEXTBOX_PRESS_ANY_ADVANCE_KEYS) { - SoundReq(0x68); // SFX_TEXTBOX_SWAP - ctb->_98.bytes.b2 = 0; - ptr = &ctb->state; - t = 4; - } else { - ptr = &ctb->_98.bytes.b2; - t = *ptr + 1; +static void TextDispWait(TextRender* this) { + gMessage.unk = 0; + if (this->_94 != 0) { + if (--this->_94 == 0) { + this->renderStatus = RENDER_ROLL; } - } - *ptr = t; -} - -void TextBoxHandler4(CurrentTextBox* ctb) { - sub_08056BDC(0); - sub_080569C4(ctb, ctb->_8f | 0x40); - ctb->state = 1; -} - -void TextBoxHandlerAdvance(CurrentTextBox* ctb) { - gTextBox.unk = 0; - SetDoTextBox(7); - if ((ctb->_8e != 1) && (ctb->_8e == 2 || TEXTBOX_PRESS_ANY_ADVANCE_KEYS)) { - sub_080564C8(4); - } -} - -void sub_08056BDC(u32 unk) { - gCurrentTextBox._98.bytes.b0 = unk; - if (unk == 0) { - MemFill32(0xFFFFFFFF, gUnk_02000D00, sizeof(gUnk_02000D00)); - Load_02000D00_Asyc(); - gCurrentTextBox._9e = 0xf082; - gCurrentTextBox._a0 = 0xf083; - gCurrentTextBox._a2 = 0xf0b6; - gCurrentTextBox._a4 = 0xf0b7; - gCurrentTextBox._50.unk6 = 0; - gCurrentTextBox._50.unk4 = 0xd0; + } else if (MESSAGE_PRESS_ANY_ADVANCE_KEYS) { + SoundReq(SFX_TEXTBOX_SWAP); + this->_98.bytes.b2 = 0; + this->renderStatus = RENDER_ROLL; } else { - gCurrentTextBox._50.unk6 = 0xd0; - gCurrentTextBox._50.unk4 = 0x1a0; + this->_98.bytes.b2++; } - sub_080569C4(&gCurrentTextBox, gCurrentTextBox._8f | 0x40); } -void SetDoTextBox(u32 doTextbox) { - gTextBox.doTextBox = gCurrentTextBox.textBox.doTextBox = doTextbox; +static void TextDispRoll(TextRender* this) { + MsgChangeLine(0); + PaletteChange(this, this->_8f | 0x40); + this->renderStatus = RENDER_UPDATE; } -void DeleteWindow(void) { - u16* ptr; - int i, j; +static void TextDispDie(TextRender* this) { + gMessage.unk = 0; + SetDoTextBox(7); + if ((this->_8e != 1) && (this->_8e == 2 || MESSAGE_PRESS_ANY_ADVANCE_KEYS)) { + StatusUpdate(MSG_CLOSE); + } +} +static void MsgChangeLine(u32 lineNo) { + gTextRender._98.bytes.lineNo = lineNo; + if (lineNo == 0) { + MemFill32(0xFFFFFFFF, gTextGfxBuffer, sizeof(gTextGfxBuffer)); + DrawCanvasLine(); + gTextRender.beginTiles[0] = (MESSAGE_PALETTE << 12) | MSG_TEXT_LINE1TOP; + gTextRender.beginTiles[1] = (MESSAGE_PALETTE << 12) | MSG_TEXT_LINE1BOTTOM; + gTextRender.beginTiles[2] = (MESSAGE_PALETTE << 12) | MSG_TEXT_LINE2TOP; + gTextRender.beginTiles[3] = (MESSAGE_PALETTE << 12) | MSG_TEXT_LINE2BOTTOM; + gTextRender._50.unk6 = 0; + gTextRender._50.unk4 = 0xd0; + } else { + gTextRender._50.unk6 = 0xd0; + gTextRender._50.unk4 = 0x1a0; + } + PaletteChange(&gTextRender, gTextRender._8f | 0x40); +} + +static void SetDoTextBox(u32 doTextbox) { + gMessage.doTextBox = gTextRender.message.doTextBox = doTextbox; +} + +static void DeleteWindow(void) { Window* window = &gCurrentWindow; - - if (window->unk1 != 0) { - window->unk1 = 0; - ptr = &gBG0Buffer[TEXTBOX_POSITION_INDEX(*window)]; + if (window->active) { + u16* ptr; + int i; + window->active = 0; + ptr = &gBG0Buffer[MESSAGE_POSITION_INDEX(*window)]; i = window->height + 2; do { - j = 0; + int j = 0; do { ptr[j] = 0; } while (j++, j < window->width + 2); - ptr += TEXTBOX_WIDTH; + ptr += MESSAGE_WIDTH; i--; } while (i > 0); - sub_0801C4A0(window->yPos, window->height); - sub_0801C494(); + RecoverUI(window->yPos, window->height); + RefreshUI(); } } -u32 CalcWindowSize(u32 fade) { - u32 scale; - u32 ret; +static u32 ChangeWindowSize(u32 delta) { Window* window; + u32 result = 0; - ret = 0; + gTextRender._98.bytes.sizeScale += delta; - gCurrentTextBox._98.bytes.sizeScale += fade; - if (gCurrentTextBox._98.bytes.sizeScale < 1) { - gCurrentTextBox._98.bytes.sizeScale = 0; - } else { - if (gCurrentTextBox._98.bytes.sizeScale < 8) - goto LAB_08056cee; - gCurrentTextBox._98.bytes.sizeScale = 8; + if (gTextRender._98.bytes.sizeScale < 1) { + gTextRender._98.bytes.sizeScale = 0; + result = 1; + } else if (gTextRender._98.bytes.sizeScale >= 8) { + gTextRender._98.bytes.sizeScale = 8; + result = 1; } - ret = 1; -LAB_08056cee: + window = &gNewWindow; - if (gCurrentTextBox._98.bytes.sizeScale != 0) { - scale = gCurrentTextBox._98.bytes.sizeScale; - window->width = (scale * (gCurrentTextBox.textBox.textWindowWidth << 1)) / 16; + if (gTextRender._98.bytes.sizeScale != 0) { + u32 scale = gTextRender._98.bytes.sizeScale; + window->width = (scale * (gTextRender.message.textWindowWidth << 1)) / 16; if ((window->width & 1) != 0) { window->width++; } - window->xPos = ((gCurrentTextBox.textBox.textWindowWidth / 2) + gCurrentTextBox.textBox.textWindowPosX) - - (window->width / 2); + window->xPos = + ((gTextRender.message.textWindowWidth / 2) + gTextRender.message.textWindowPosX) - (window->width / 2); - window->height = (scale * (gCurrentTextBox.textBox.textWindowHeight << 1)) / 16; + window->height = (scale * (gTextRender.message.textWindowHeight << 1)) / 16; if ((window->height & 1) != 0) { window->height++; } - window->yPos = ((gCurrentTextBox.textBox.textWindowHeight / 2) + gCurrentTextBox.textBox.textWindowPosY) - - (window->height / 2); + window->yPos = + ((gTextRender.message.textWindowHeight / 2) + gTextRender.message.textWindowPosY) - (window->height / 2); } else { window->yPos = -1; window->xPos = -1; window->height = -1; window->width = -1; } - window->unk1 = 1; - return ret; + window->active = 1; + return result; } -void CreateWindow(void) { - s32 r0, r3; +static void CreateWindow(void) { + s32 borderBeginTile; u16* ptr; - r0 = gCurrentTextBox._98.bytes.sizeScale; - if (r0 <= 0) + if (gTextRender._98.bytes.sizeScale <= 0) return; - ptr = &gBG0Buffer[TEXTBOX_POSITION_INDEX(gNewWindow)]; - r3 = 0xf07b; - DispMessageFrame(ptr, gNewWindow.width, gNewWindow.height, r3); + ptr = &gBG0Buffer[MESSAGE_POSITION_INDEX(gNewWindow)]; + borderBeginTile = (MESSAGE_PALETTE << 12) | MSG_BORDER_CORNER; + DispMessageFrame(ptr, gNewWindow.width, gNewWindow.height, borderBeginTile); DispString(); DispCursor(); gCurrentWindow = gNewWindow; - sub_0801C494(); + RefreshUI(); } +// Also used by figurine menu ASM_FUNC("asm/non_matching/textbox/DispMessageFrame.inc", void DispMessageFrame(u16* buffer, u32 width_, u32 height_, u32 flags_)) extern u16 gUnk_02034CB2[]; extern u16 gUnk_0202281E[]; -void DispString(void) { - u32 r0, r2, r4; - u16 *ptr, *ptr2; - s32 i, j; +/* + Each character is two tiles tall. + They are stored in VRAM in the following order: + + 82 84 86 --> | | |\| |/ + 83 85 87 --> |_ | | \ |\ + + b6 b8 ba --> | | | + b7 b9 bb --> . . . + + There are 2 lines of text available, and each line is 20 chars long, + So the canvas is 20x4 tiles. +*/ + +static void DispString(void) { + u32 r0, tileAttr; + u16 *buf, *line; + s32 i, w, h; Window* window = &gNewWindow; if (window->width != 0) { if (window->height != 0) { - r4 = window->height; - ptr = &gUnk_02034CB2[TEXTBOX_POSITION_INDEX(*window)]; - i = (s32)(4 - r4) / 2; + h = window->height; + buf = &gBG0Buffer[MESSAGE_POSITION_INDEX(*window) + 1]; + i = (4 - h) / 2; do { - j = window->width; - r2 = gUnk_0202281E[i]; - ptr += TEXTBOX_WIDTH; + //! @bug abnormally big width causes tile idx to overwrite other tile attributes + w = window->width; + tileAttr = gTextRender.beginTiles[i]; + buf += MESSAGE_WIDTH; r0 = i + 1; - r4--; - ptr2 = ptr; + h--; + line = buf; do { - *ptr2 = r2; - ptr2++; - r2 += 2; - j--; - } while (j > 0); + *line = tileAttr; + line++; + tileAttr += 2; + w--; + } while (w > 0); i = r0; - } while (r4 != 0); + } while (h != 0); } } } -void DispCursor(void) { +static void DispCursor(void) { u32 offset; u16* ptr; - if ((gCurrentTextBox._98.word & 0x10ff00) == 0x100200) { - ptr = &gBG0Buffer[TEXTBOX_POSITION_INDEX(gNewWindow)]; - offset = (((gNewWindow.height + 1) * TEXTBOX_WIDTH) - 2); + if ((gTextRender._98.word & 0x10ff00) == 0x100200) { + ptr = &gBG0Buffer[MESSAGE_POSITION_INDEX(gNewWindow)]; + offset = (((gNewWindow.height + 1) * MESSAGE_WIDTH) - 2); offset += gNewWindow.width; ptr += offset; *ptr = 0xf080; } } -void Load_02000D00_Asyc(void) { - LoadResourceAsync(gUnk_02000D00, 0x0600D040, sizeof(gUnk_02000D00)); +static void DrawCanvasLine(void) { + LoadResourceAsync(gTextGfxBuffer, 0x0600D040, sizeof(gTextGfxBuffer)); } void sub_08056F88(u32 unk_1, u32 unk_2) { @@ -750,27 +774,27 @@ void sub_08056F88(u32 unk_1, u32 unk_2) { unk_1 = 0; } uVar1 = unk_1 << 4 | unk_2; - if (gCurrentTextBox._9c != uVar1) { - gCurrentTextBox._9c = uVar1; + if (gTextRender._9c != uVar1) { + gTextRender._9c = uVar1; sub_0805F918(unk_1, unk_2, 0x0600CF60); } } -void sub_08056FBC(CurrentTextBox* ctb) { - sub_08056FEC(ctb->textBox.field_0x10, &ctb->_66[0x2]); - sub_08056FEC(ctb->textBox.field_0x14, &ctb->_66[0xa]); - sub_08056FEC(ctb->textBox.field_0x18, &ctb->_77[0x1]); - sub_08056FEC(ctb->textBox.field_0x1c, &ctb->_77[0x9]); +static void sub_08056FBC(TextRender* ctb) { + sub_08056FEC(ctb->message.field_0x10, &ctb->_66[0x2]); + sub_08056FEC(ctb->message.field_0x14, &ctb->_66[0xa]); + sub_08056FEC(ctb->message.field_0x18, &ctb->_77[0x1]); + sub_08056FEC(ctb->message.field_0x1c, &ctb->_77[0x9]); } -NONMATCH("asm/non_matching/textbox/sub_08056FEC.inc", u32 sub_08056FEC(u32 param_1, u8* param_2)) { +NONMATCH("asm/non_matching/textbox/sub_08056FEC.inc", u32 sub_08056FEC(u32 this, u8* param_2)) { u32 uVar1; int iVar2; int iVar3; int iVar4; u8 local_1c[8]; - uVar1 = sub_0801D51C(param_1, param_2, param_1); + uVar1 = sub_0801D51C(this, param_2, this); uVar1 = uVar1 & 0xfffffff; iVar4 = 0; do { diff --git a/src/utils.c b/src/utils.c index b88fb9cd..2c13f52b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -157,17 +157,17 @@ void LoadGfxGroup(u32 group) { case 0xD: return; case 0xE: - if (gUnk_02000000->gameLanguage != 0 && gUnk_02000000->gameLanguage != 1) { + if (gSaveHeader->gameLanguage != 0 && gSaveHeader->gameLanguage != 1) { loadGfx = TRUE; } break; case 0xF: - if (gUnk_02000000->gameLanguage != 0) { + if (gSaveHeader->gameLanguage != 0) { loadGfx = TRUE; } break; default: - if (ctrl == gUnk_02000000->gameLanguage) { + if (ctrl == gSaveHeader->gameLanguage) { loadGfx = TRUE; } break;