Merge pull request #245 from notyourav/mdx

fade.c doc
This commit is contained in:
notyourav
2022-01-05 13:32:16 -08:00
committed by GitHub
66 changed files with 378 additions and 307 deletions
+4 -4
View File
@@ -195,7 +195,7 @@ SHORT_NAMES = NO
# description.)
# The default value is: NO.
JAVADOC_AUTOBRIEF = NO
JAVADOC_AUTOBRIEF = YES
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
# such as
@@ -1211,7 +1211,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = "./docs/doxygen-extra.css"
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@@ -1240,7 +1240,7 @@ HTML_COLORSTYLE_HUE = 220
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_SAT = 120
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
@@ -2275,7 +2275,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO
# The default value is: NO.
HAVE_DOT = NO
HAVE_DOT = YES
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
+1 -1
View File
@@ -79,7 +79,7 @@ _08019700:
bl CopyOAM
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
ldr r1, _0801973C @ =gUnk_02018EB0
ldrb r0, [r1]
adds r0, #1
+24 -24
View File
@@ -42,7 +42,7 @@ sub_080535AC: @ 0x080535AC
bl LoadRoomEntityList
movs r0, #6
movs r1, #8
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_080535DC: .4byte gMenu
@@ -175,7 +175,7 @@ sub_080536B8: @ 0x080536B8
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
@@ -224,7 +224,7 @@ sub_0805370C: @ 0x0805370C
bl LoadRoomEntityList
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_08053730: .4byte gMenu
@@ -306,7 +306,7 @@ sub_08053758: @ 0x08053758
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080537DC: .4byte gMenu
@@ -376,7 +376,7 @@ sub_08053800: @ 0x08053800
strh r1, [r0]
ldrh r1, [r4, #0xa]
movs r0, #4
bl DoFade
bl SetFade
_0805387A:
pop {r4, r5, pc}
.align 2, 0
@@ -438,7 +438,7 @@ _080538E4:
strb r0, [r4, #6]
movs r0, #5
movs r1, #8
bl DoFade
bl SetFade
_080538F8:
pop {r4, pc}
.align 2, 0
@@ -496,7 +496,7 @@ _08053954:
strb r0, [r4, #6]
movs r0, #5
movs r1, #1
bl DoFade
bl SetFade
_08053968:
pop {r4, pc}
.align 2, 0
@@ -520,7 +520,7 @@ sub_08053974: @ 0x08053974
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
ldr r1, _080539B4 @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -606,7 +606,7 @@ sub_08053A1C: @ 0x08053A1C
strb r4, [r1, #7]
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
_08053A4E:
pop {r4, pc}
.align 2, 0
@@ -635,7 +635,7 @@ sub_08053A5C: @ 0x08053A5C
strb r0, [r1, #6]
movs r0, #5
movs r1, #8
bl DoFade
bl SetFade
_08053A86:
pop {pc}
.align 2, 0
@@ -690,7 +690,7 @@ sub_08053ACC: @ 0x08053ACC
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_08053AF4: .4byte gMenu
@@ -723,7 +723,7 @@ sub_08053B10: @ 0x08053B10
movs r1, #0x80
lsls r1, r1, #1
movs r0, #4
bl DoFade
bl SetFade
_08053B34:
pop {pc}
.align 2, 0
@@ -741,7 +741,7 @@ sub_08053B3C: @ 0x08053B3C
bl sub_080A71C4
movs r0, #5
adds r1, r4, #0
bl DoFade
bl SetFade
pop {r4, pc}
thumb_func_start sub_08053B58
@@ -776,7 +776,7 @@ sub_08053B74: @ 0x08053B74
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_08053BA0: .4byte gMenu
@@ -809,7 +809,7 @@ sub_08053BBC: @ 0x08053BBC
movs r1, #0x80
lsls r1, r1, #1
movs r0, #4
bl DoFade
bl SetFade
_08053BE0:
pop {pc}
.align 2, 0
@@ -827,7 +827,7 @@ sub_08053BE8: @ 0x08053BE8
bl sub_080A71C4
movs r0, #5
adds r1, r4, #0
bl DoFade
bl SetFade
pop {r4, pc}
thumb_func_start sub_08053C04
@@ -862,7 +862,7 @@ sub_08053C20: @ 0x08053C20
bl LoadRoomEntityList
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x33
bl SoundReq
pop {pc}
@@ -881,7 +881,7 @@ sub_08053C60: @ 0x08053C60
push {lr}
movs r0, #5
movs r1, #2
bl DoFade
bl SetFade
movs r0, #0xf4
bl SoundReq
ldr r0, _08053C80 @ =0x80100000
@@ -965,7 +965,7 @@ sub_08053CC8: @ 0x08053CC8
strb r5, [r0]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
ldrb r0, [r4, #5]
cmp r0, #0x1d
bne _08053D1E
@@ -1040,7 +1040,7 @@ sub_08053D90: @ 0x08053D90
adds r0, #1
strb r0, [r1, #6]
movs r0, #0x10
bl sub_080500F4
bl SetFadeInverted
_08053DAC:
pop {pc}
.align 2, 0
@@ -1091,7 +1091,7 @@ sub_08053DB4: @ 0x08053DB4
adds r0, #1
strb r0, [r5, #6]
movs r0, #0x10
bl sub_080500F4
bl SetFadeInverted
_08053E1C:
pop {r4, r5, pc}
.align 2, 0
@@ -1165,7 +1165,7 @@ sub_08053E74: @ 0x08053E74
bl SetMinPriority
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08053EB0: .4byte gUnk_080FCFB8
@@ -1217,7 +1217,7 @@ sub_08053EFC: @ 0x08053EFC
adds r0, #1
strb r0, [r1, #6]
movs r0, #8
bl sub_080500F4
bl SetFadeInverted
_08053F18:
pop {pc}
.align 2, 0
@@ -1261,7 +1261,7 @@ sub_08053F20: @ 0x08053F20
adds r0, #1
strb r0, [r5, #6]
movs r0, #8
bl sub_080500F4
bl SetFadeInverted
_08053F74:
pop {r4, r5, pc}
.align 2, 0
+1 -1
View File
@@ -97,7 +97,7 @@ _08054954:
strb r0, [r1]
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
_08054962:
pop {pc}
.align 2, 0
+35 -35
View File
@@ -41,7 +41,7 @@ sub_08054C20: @ 0x08054C20
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08054C50: .4byte gMenu
@@ -60,7 +60,7 @@ sub_08054C58: @ 0x08054C58
beq _08054C7C
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
ldr r1, _08054C84 @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -84,7 +84,7 @@ sub_08054C88: @ 0x08054C88
bl sub_08054974
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x73
bl SoundReq
ldrb r0, [r4, #6]
@@ -157,7 +157,7 @@ sub_08054D04: @ 0x08054D04
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08054D34: .4byte gMenu
@@ -251,7 +251,7 @@ sub_08054DAC: @ 0x08054DAC
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08054DF0: .4byte gMenu
@@ -302,7 +302,7 @@ sub_08054E1C: @ 0x08054E1C
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, r5, pc}
.align 2, 0
_08054E54: .4byte gMenu
@@ -327,7 +327,7 @@ sub_08054E5C: @ 0x08054E5C
strh r0, [r4, #8]
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
ldrb r0, [r4, #4]
bl sub_080553E0
ldrb r0, [r4, #4]
@@ -526,7 +526,7 @@ _08054FCA:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
strh r4, [r6, #0xa]
movs r0, #0x80
lsls r0, r0, #3
@@ -599,7 +599,7 @@ sub_08055054: @ 0x08055054
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055080: .4byte gUnk_080FF128
@@ -654,7 +654,7 @@ sub_080550B0: @ 0x080550B0
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080550E8: .4byte gMenu
@@ -707,7 +707,7 @@ _0805512A:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055150: .4byte gUnk_080FF17C
@@ -798,7 +798,7 @@ sub_08055184: @ 0x08055184
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r3}
mov r8, r3
pop {r4, r5, r6, pc}
@@ -959,7 +959,7 @@ sub_08055318: @ 0x08055318
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055348: .4byte gMenu
@@ -978,7 +978,7 @@ sub_08055350: @ 0x08055350
beq _08055374
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
ldr r1, _0805537C @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -1002,7 +1002,7 @@ sub_08055380: @ 0x08055380
bl sub_08054974
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x73
bl SoundReq
ldrb r0, [r4, #6]
@@ -1102,7 +1102,7 @@ sub_08055430: @ 0x08055430
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055460: .4byte gMenu
@@ -1121,7 +1121,7 @@ sub_08055468: @ 0x08055468
beq _0805548C
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
ldr r1, _08055494 @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -1147,7 +1147,7 @@ sub_08055498: @ 0x08055498
bl sub_080553E0
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x73
bl SoundReq
ldrb r0, [r4, #6]
@@ -1216,7 +1216,7 @@ sub_08055518: @ 0x08055518
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055540: .4byte gMenu
@@ -1313,7 +1313,7 @@ sub_080555B8: @ 0x080555B8
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, r5, pc}
.align 2, 0
_08055600: .4byte gMenu
@@ -1430,7 +1430,7 @@ sub_080556AC: @ 0x080556AC
bl sub_08055B70
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080556E4: .4byte gMenu
@@ -1491,7 +1491,7 @@ _08055734:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_0805575C: .4byte gMenu
@@ -1578,7 +1578,7 @@ sub_080557D0: @ 0x080557D0
bl sub_08055B70
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055808: .4byte gMenu
@@ -1631,7 +1631,7 @@ _0805584A:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055870: .4byte gUnk_080FF2C0
@@ -1683,7 +1683,7 @@ sub_080558A4: @ 0x080558A4
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080558DC: .4byte gMenu
@@ -1734,7 +1734,7 @@ sub_08055908: @ 0x08055908
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, r5, pc}
.align 2, 0
_08055940: .4byte gMenu
@@ -1859,7 +1859,7 @@ _08055A0E:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055A30: .4byte gMenu
@@ -1879,7 +1879,7 @@ sub_08055A3C: @ 0x08055A3C
beq _08055A60
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
ldr r1, _08055A68 @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -1905,7 +1905,7 @@ sub_08055A6C: @ 0x08055A6C
bl sub_080553E0
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x73
bl SoundReq
ldrb r0, [r4, #6]
@@ -1986,7 +1986,7 @@ _08055B14:
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055B2C: .4byte gMenu
@@ -2095,7 +2095,7 @@ sub_08055BCC: @ 0x08055BCC
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055BFC: .4byte gMenu
@@ -2114,7 +2114,7 @@ sub_08055C04: @ 0x08055C04
beq _08055C28
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
ldr r1, _08055C30 @ =gMenu
ldrb r0, [r1, #6]
adds r0, #1
@@ -2168,7 +2168,7 @@ _08055C6C:
_08055C8C:
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
movs r0, #0x73
bl SoundReq
ldr r0, _08055CAC @ =gMenu
@@ -2242,7 +2242,7 @@ sub_08055CF4: @ 0x08055CF4
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_08055D24: .4byte gMenu
@@ -2321,7 +2321,7 @@ sub_08055D9C: @ 0x08055D9C
strb r0, [r1]
movs r0, #4
movs r1, #0x10
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_08055DB8: .4byte gMenu
+2 -2
View File
@@ -1013,7 +1013,7 @@ sub_080497D0: @ 0x080497D0
movs r0, #5
strb r0, [r4, #0xd]
movs r1, #0x10
bl DoFade
bl SetFade
_08049802:
pop {r4, pc}
@@ -1073,7 +1073,7 @@ sub_08049804: @ 0x08049804
bl sub_080809D4
movs r0, #4
movs r1, #4
bl DoFade
bl SetFade
_08049878:
pop {r4, pc}
.align 2, 0
+2 -2
View File
@@ -169,7 +169,7 @@ sub_0802D158: @ 0x0802D158
strb r1, [r0]
movs r0, #7
movs r1, #8
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_0802D16C: .4byte gUnk_02034490
@@ -234,7 +234,7 @@ sub_0802D170: @ 0x0802D170
str r5, [r4, #0x30]
movs r0, #6
movs r1, #8
bl DoFade
bl SetFade
b _0802D216
.align 2, 0
_0802D1F0: .4byte gFadeControl
+2 -2
View File
@@ -65,7 +65,7 @@ _0804ABA4:
strb r0, [r1, #0xe]
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {r4, r5, pc}
.align 2, 0
_0804ABF8: .4byte gScreen
@@ -137,7 +137,7 @@ _0804AC86:
strb r0, [r1, #0xe]
movs r0, #7
movs r1, #0x10
bl DoFade
bl SetFade
_0804AC96:
pop {r4, pc}
.align 2, 0
+4 -4
View File
@@ -343,19 +343,19 @@
.2byte \s
.endm
.macro DoFade4
.macro SetFade4
.2byte 0x043c
.endm
.macro DoFade5
.macro SetFade5
.2byte 0x043d
.endm
.macro DoFade6
.macro SetFade6
.2byte 0x043e
.endm
.macro DoFade7
.macro SetFade7
.2byte 0x043f
.endm
+2 -2
View File
@@ -86,7 +86,7 @@ _0804DE5C:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #7
bl DoFade
bl SetFade
b _0804DECC
.align 2, 0
_0804DEB4: .4byte gArea
@@ -96,7 +96,7 @@ _0804DEC0: .4byte gRoomTransition
_0804DEC4:
movs r0, #6
movs r1, #0x10
bl DoFade
bl SetFade
_0804DECC:
movs r0, #1
pop {r4, r5, r6, pc}
+1 -1
View File
@@ -183,7 +183,7 @@ sub_080A02CC: @ 0x080A02CC
bl sub_0808C650
movs r0, #6
movs r1, #2
bl DoFade
bl SetFade
movs r0, #0xf8
bl SoundReq
movs r0, #0xa4
+1 -1
View File
@@ -832,7 +832,7 @@ _080A1C40:
bne _080A1C9A
movs r0, #7
movs r1, #4
bl DoFade
bl SetFade
b _080A1C9A
_080A1C52:
subs r0, #1
+1 -1
View File
@@ -153,7 +153,7 @@ _0808CFC6:
strh r6, [r0, #0x10]
movs r0, #5
movs r1, #8
bl DoFade
bl SetFade
_0808D01E:
pop {r4, r5, r6, pc}
.align 2, 0
+1 -1
View File
@@ -611,7 +611,7 @@ _0809BCDC:
bne _0809BDAE
movs r0, #6
movs r1, #8
bl DoFade
bl SetFade
movs r0, #3
bl sub_0805AAF0
ldr r2, _0809BD18 @ =gScreen
+11 -11
View File
@@ -100,7 +100,7 @@ _080A365E:
movs r1, #0x80
lsls r1, r1, #1
movs r0, #5
bl DoFade
bl SetFade
pop {r4, r5, pc}
.align 2, 0
_080A36B0: .4byte gUnk_081272F0
@@ -181,7 +181,7 @@ sub_080A36F8: @ 0x080A36F8
_080A374A:
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
_080A3752:
pop {r4, r5, pc}
.align 2, 0
@@ -333,7 +333,7 @@ sub_080A3864: @ 0x080A3864
bl sub_080A3954
movs r0, #5
movs r1, #8
bl DoFade
bl SetFade
_080A3880:
pop {pc}
.align 2, 0
@@ -347,10 +347,10 @@ sub_080A3888: @ 0x080A3888
str r0, [r1, #4]
movs r0, #5
movs r1, #4
bl DoFade
bl SetFade
ldr r0, _080A38B0 @ =gMenu
ldrh r0, [r0, #8]
bl sub_08050038
bl SetFadeProgress
bl sub_080A3954
pop {pc}
.align 2, 0
@@ -363,10 +363,10 @@ sub_080A38B4: @ 0x080A38B4
push {lr}
movs r0, #4
movs r1, #4
bl DoFade
bl SetFade
ldr r0, _080A38CC @ =gMenu
ldrh r0, [r0, #8]
bl sub_08050038
bl SetFadeProgress
bl sub_080A3954
pop {pc}
.align 2, 0
@@ -404,7 +404,7 @@ sub_080A38D0: @ 0x080A38D0
strb r1, [r0, #5]
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
_080A3914:
pop {r3}
mov r8, r3
@@ -425,7 +425,7 @@ sub_080A3930: @ 0x080A3930
bne _080A3948
movs r0, #7
movs r1, #8
bl DoFade
bl SetFade
ldr r1, _080A3950 @ =gMain
movs r0, #2
strb r0, [r1, #3]
@@ -535,7 +535,7 @@ _080A39C8:
strh r5, [r2, #0x26]
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
b _080A3B36
.align 2, 0
_080A3A2C: .4byte gScreen
@@ -666,7 +666,7 @@ _080A3B14:
bl sub_08050384
movs r0, #7
movs r1, #8
bl DoFade
bl SetFade
ldr r1, _080A3B40 @ =gMain
movs r0, #3
strb r0, [r1, #3]
+2 -2
View File
@@ -1423,7 +1423,7 @@ _080A4694:
strb r1, [r3, #0x1c]
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080A46A0: .4byte gPaletteBuffer
@@ -2773,7 +2773,7 @@ _080A4F66:
bl sub_080A4DB8
movs r0, #4
movs r1, #0x20
bl DoFade
bl SetFade
movs r0, #1
bl sub_080A4E90
pop {r4, pc}
+10 -10
View File
@@ -1087,7 +1087,7 @@ _080A5B8E:
bne _080A5BAA
movs r0, #7
movs r1, #0x20
bl DoFade
bl SetFade
movs r0, #0x3c
strh r0, [r6, #8]
movs r0, #2
@@ -1115,7 +1115,7 @@ sub_080A5BB8: @ 0x080A5BB8
strb r0, [r1, #1]
movs r0, #6
movs r1, #8
bl DoFade
bl SetFade
movs r0, #2
bl sub_080A4E84
ldr r1, _080A5BEC @ =gUnk_02034490
@@ -2896,7 +2896,7 @@ sub_080A6534: @ 0x080A6534
bl sub_080A7114
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {r4, pc}
.align 2, 0
_080A6590: .4byte gScreen
@@ -3920,7 +3920,7 @@ _080A6BD4:
bl sub_080A7114
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7, pc}
@@ -4023,7 +4023,7 @@ sub_080A6CA8: @ 0x080A6CA8
bl sub_080A7114
movs r0, #4
movs r1, #8
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_080A6CD4: .4byte gMenu
@@ -4229,7 +4229,7 @@ sub_080A6DF8: @ 0x080A6DF8
bl sub_080A7114
movs r0, #5
movs r1, #8
bl DoFade
bl SetFade
b _080A6E3A
.align 2, 0
_080A6E14: .4byte gMenu
@@ -4729,7 +4729,7 @@ _080A716C:
strb r0, [r1, #4]
movs r0, #5
movs r1, #0x20
bl DoFade
bl SetFade
ldr r0, _080A71A0 @ =gUnk_02018EB0
strb r4, [r0]
strb r4, [r0, #1]
@@ -4781,7 +4781,7 @@ Subtask_Exit: @ 0x080A71DC
strb r0, [r1]
movs r0, #5
movs r1, #0x20
bl DoFade
bl SetFade
pop {pc}
.align 2, 0
_080A71F0: .4byte gUnk_02032EC0
@@ -5054,7 +5054,7 @@ _080A73B4:
beq _080A74A8
adds r0, r1, #0
ldrh r1, [r5, #0xa]
bl DoFade
bl SetFade
b _080A74AE
.align 2, 0
_080A7468: .4byte gFadeControl
@@ -5075,7 +5075,7 @@ _080A74A0: .4byte 0x0000085C
_080A74A4: .4byte 0x0000FFFF
_080A74A8:
ldrh r0, [r5, #0xa]
bl sub_080500F4
bl SetFadeInverted
_080A74AE:
ldr r1, _080A74C0 @ =gUnk_02032EC0
movs r2, #0
@@ -7,7 +7,7 @@ SCRIPT_START script_IntroCameraTarget
PlayBgm BGM_MINISH_CAP
SetFadeTime 0x0002
@ Fade in
DoFade4
SetFade4
WaitForFadeFinish @ TODO wait for fade to be finished
Wait 0x0078
SetSyncFlag 0x00000004
@@ -8,7 +8,7 @@ SCRIPT_START script_Npc4EOutsideLinksHouse
Call sub_0807DF28
EndBlock
SetFadeTime 0x0010
DoFade6
SetFade6
WaitForFadeFinish
SetSyncFlag 0x00000001
WaitForSyncFlagAndClear 0x00000002
@@ -32,7 +32,7 @@ SCRIPT_START script_SmithIntro
DoPostScriptAction 0x0000
Wait 0x001e
SetFadeTime 0x0002
DoFade5
SetFade5
WaitForFadeFinish
Call sub_08053634
SCRIPT_END
@@ -12,7 +12,7 @@ SCRIPT_START script_ZeldaLeaveLinksHouse
_0807EDD4 0x0078, 0x0098
DoPostScriptAction 0x0008
SetFadeTime 0x0010
DoFade5
SetFade5
WaitForFadeFinish
Call sub_08053634
DoPostScriptAction 0x0006
@@ -19,7 +19,7 @@ SCRIPT_START script_PlayerWakingUpInHyruleCastle
EndBlock
Wait 0x003c
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
script_08009EA4:
Call CheckAnyKeyPressed
@@ -14,7 +14,7 @@ SCRIPT_START script_Npc4EMonsters
SetSyncFlag 0x00800000
WaitForSyncFlagAndClear 0x01000000
SetFadeTime 0x0004
DoFade7
SetFade7
WaitForFadeFinish
Wait 0x003c
PlaySound SFX_SPIRITS_RELEASE
@@ -23,7 +23,7 @@ SCRIPT_START script_Npc4EMonsters
SetSyncFlag 0x00000010
WaitForSyncFlagAndClear 0x00000020
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
CallWithArg DeleteManager36, 0x00000002
_0807F0C8 0x0000, 0x0000
@@ -18,7 +18,7 @@ SCRIPT_START script_Npc4EIntroCastle
WaitUntilTextboxCloses
StopBgm
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
Call sub_08064180
Call sub_08064180
@@ -39,7 +39,7 @@ SCRIPT_START script_Npc4EIntroCastle
Wait 0x000a
_0807F0B4 0x0001
SetFadeTime 0x0001
DoFade4
SetFade4
SetSyncFlag 0x0002a800
WaitForSyncFlagAndClear 0x00055000
SetEntityPositionRelative 0x01f8, 0x0078
@@ -19,7 +19,7 @@ SCRIPT_START script_Npc4EIntroTown
SetEntityPositionRelative 0x00c8, 0x0148
Call sub_0807F844
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
StartPlayerScript script_PlayerIntro1
SetSyncFlag 0x00000002
@@ -20,7 +20,7 @@ SCRIPT_START script_Object69CameraTarget
WaitForSyncFlagAndClear 0x00001000
StopBgm
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
SetRoomFlag 0x0001
DoPostScriptAction 0x0006
@@ -7,7 +7,7 @@ SCRIPT_START script_Object69MinishVaati
EndBlock
PlayBgm BGM_EZLO_STORY
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
Wait 0x003c
SetSyncFlag 0x00000080
@@ -135,7 +135,7 @@ script_08015104:
_0807F0B4 0x0004
CameraTargetEntity
SetFadeTime 0x0100
DoFade4
SetFade4
_0807E80C 0x00000000
EndBlock
StartPlayerScript script_PlayerSeenOriginStory
@@ -54,7 +54,7 @@ SCRIPT_START script_Npc4EMinishPortalClosing
Call sub_0808D280
Wait 0x0078
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
Call sub_0807FB94 @ Roll Credits
MoveEntityToPlayer
@@ -62,7 +62,7 @@ SCRIPT_START script_Npc4EMinishPortalClosing
_0807F0B4 0x0004
CameraTargetPlayer
SetSyncFlag 0x80000000
DoFade4
SetFade4
WaitForFadeFinish
Call sub_0807DF50
EnablePlayerControl
@@ -9,12 +9,12 @@ SCRIPT_START script_Npc4EUnfreezeCastleStaff
Wait 0x003c
PlaySound SFX_EVAPORATE
SetFadeTime 0x0004
DoFade7
SetFade7
WaitForFadeFinish
SetSyncFlag 0x00000001
PlaySound SFX_APPARATE
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
Wait 0x001e
SetSyncFlag 0x00000002
@@ -12,7 +12,7 @@ SCRIPT_START script_Object3EPictureBackRoom
StartPlayerScript script_PlayerMoveToPicture
WaitForSyncFlagAndClear 0x00000002
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
LoadRoomEntityList gUnk_080F5680
StartPlayerScript script_PlayerSanctuaryIntro
@@ -45,7 +45,7 @@ SCRIPT_START script_Object3EPictureBackRoom
WaitForSyncFlagAndClear 0x00000040
SetFadeMask 0xffff7fff
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
StopBgm
_0807E858 0x0000
@@ -56,7 +56,7 @@ SCRIPT_START script_Object3EPictureBackRoom
WaitUntilTextboxCloses
SetFadeMask 0xffffffff
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
SetSyncFlag 0x00000004
WaitForSyncFlagAndClear 0x00000002
@@ -23,7 +23,7 @@ script_08015BF0:
Call sub_0807FBC4
CameraTargetPlayer
SetFadeTime 0x0100
DoFade4
SetFade4
_0807E80C 0x00000000
EndBlock
SetFadeTime 0x0004
@@ -6,7 +6,7 @@ SCRIPT_START script_Object69TakeoverCutscene
CameraTargetEntity
EndBlock
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
Wait 0x003c
_0807F0B4 0x0004
@@ -39,14 +39,14 @@ SCRIPT_START script_Object69TakeoverCutscene
SetSyncFlag 0x00000010
WaitForSyncFlagAndClear 0x00000020
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
SetSyncFlag 0x00000010
LoadRoomEntityList gUnk_080FCE30
StopBgm
Wait 0x0078
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
PlayBgm BGM_DIGGING_CAVE
SetSyncFlag 0x00000040
@@ -60,7 +60,7 @@ SCRIPT_START script_Object69TakeoverCutscene
SetSyncFlag 0x00000004
WaitForSyncFlagAndClear 0x00000008
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
StopBgm
SetRoomFlag 0x0000
+1 -1
View File
@@ -18,7 +18,7 @@ script_0800A0FE:
CallWithArg sub_08094AE8, script_Object6AV3DefeatedMinishCap
PlaySound SFX_APPARATE
SetFadeTime 0x0002
DoFade6
SetFade6
EndBlock
WaitForFadeFinish
WaitForSyncFlagAndClear 0x00000004
@@ -41,10 +41,10 @@ script_0800B698:
WaitUntilTextboxCloses
script_0800B6A6:
SetFadeTime 0x0004
DoFade7
SetFade7
WaitForFadeFinish
Call sub_080873FC
DoFade6
SetFade6
WaitForFadeFinish
CameraTargetPlayer
Wait 0x001e
+2 -2
View File
@@ -42,7 +42,7 @@ script_080101AC:
WaitUntilTextboxCloses
StopBgm
SetFadeTime 0x0004
DoFade5
SetFade5
WaitForFadeFinish
CallWithArg SetPlayerPos, 0x03400378
Call SetPlayerActionNormal
@@ -57,7 +57,7 @@ script_080101AC:
CameraTargetPlayer
EndBlock
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
PlayBGM
Call sub_080A13B4
@@ -7,7 +7,7 @@ SCRIPT_START script_PlayerSleepingInn
EndBlock
Wait 0x003c
SetFadeTime 0x0004
DoFade4
SetFade4
WaitForFadeFinish
script_08010A78:
Call CheckAnyKeyPressed
@@ -12,7 +12,7 @@ script_08012368:
BeginBlock
SetFadeTime 0x0004
SetFadeMask 0x00007fff
DoFade5
SetFade5
_0807E858 0x0080
EndBlock
WaitForFadeFinish
@@ -36,7 +36,7 @@ script_08012368:
BeginBlock
SetFadeTime 0x0004
SetFadeMask 0xffffffff
DoFade4
SetFade4
_0807E858 0x0080
EndBlock
WaitForFadeFinish
@@ -31,10 +31,10 @@ script_0800B7A2:
MessageNoOverlap 0x0590
WaitUntilTextboxCloses
SetFadeTime 0x0010
DoFade7
SetFade7
WaitForFadeFinish
ModHealth 0x00a0
DoFade6
SetFade6
WaitForFadeFinish
MessageNoOverlap 0x057f
WaitUntilTextboxCloses
@@ -58,13 +58,13 @@ script_080134F8:
Call WaitForPlayerFrameHiBit
Wait 0x003c
SetFadeTime 0x0004
DoFade7
SetFade7
PlaySound SFX_EVAPORATE
WaitForFadeFinish
Wait 0x003c
SetSyncFlag 0x00000010
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
PlaySound SFX_109
MessageFromTargetPos 0x0503, 0x000c
@@ -61,13 +61,13 @@ script_0801373C:
Call WaitForPlayerFrameHiBit
Wait 0x003c
SetFadeTime 0x0004
DoFade7
SetFade7
PlaySound SFX_EVAPORATE
WaitForFadeFinish
Wait 0x003c
SetSyncFlag 0x00000010
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
PlaySound SFX_109
MessageFromTargetPos 0x0504, 0x000c
@@ -66,13 +66,13 @@ script_080138D0:
Call WaitForPlayerFrameHiBit
Wait 0x003c
SetFadeTime 0x0004
DoFade7
SetFade7
PlaySound SFX_EVAPORATE
WaitForFadeFinish
Wait 0x003c
SetSyncFlag 0x00000010
SetFadeTime 0x0002
DoFade6
SetFade6
WaitForFadeFinish
PlaySound SFX_109
MessageFromTargetPos 0x0505, 0x000c
@@ -13,7 +13,7 @@ script_08009DF0:
JumpIfNot script_08009E4E
Call sub_0807DF28
SetFadeTime 0x0002
DoFade5
SetFade5
WaitForFadeFinish
Call sub_0804E864
Wait 0x001e
@@ -5,7 +5,7 @@ SCRIPT_START script_PlayerWakeAfterRest
EndBlock
WaitForSyncFlagAndClear 0x00000002
SetFadeTime 0x0002
DoFade4
SetFade4
WaitForFadeFinish
DoPostScriptAction 0x0014
Wait 0x001e
+4 -4
View File
@@ -2,10 +2,10 @@
SCRIPT_START script_08016482
FadeInvert
Nop2 0x0080
DoFade4
DoFade5
DoFade6
DoFade7
SetFade4
SetFade5
SetFade6
SetFade7
_0807E800 0x00000000
_0807E80C 0x00000000
_0807E858_0
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

+5
View File
@@ -0,0 +1,5 @@
body {
background-image: url("../../beanstalk-bg.png");
background-attachment: fixed;
background-size: cover;
}
+83 -6
View File
@@ -3,16 +3,93 @@
#include "global.h"
void SetBrightness(u32 arg0);
void DoFade(u32 type, u32 speed);
/**
* @struct FadeControl
* @brief Controls screen fading effects.
* @see gFadeControl
*/
typedef struct {
bool8 active; /**< Currently fading. */
u8 unused1;
u8 color;
u8 unused2;
u32 mask; /**< Fade palette mask.
* LSB = foreground, MSB = background. */
u16 type;
u16 speed;
u16 progress;
u16 sustain; /**< Fade progress to sustain. */
s16 iris_size;
s16 iris_x;
s16 iris_y;
u16 win_inside_cnt;
u16 win_outside_cnt;
} FadeControl;
extern FadeControl gFadeControl; /**< Fade control instance. */
void sub_08050008(void);
void sub_08050038(u32);
void sub_080500F4(u32 arg0);
void sub_08050110(u32 param_1, u32 param_2, u32 fadeType, u32 fadeSpeed);
/** Set game brightness.
* @param brightness brightness level, 0-2
*/
void SetBrightness(u32 brightness);
/**
* Start a fade effect.
*
* @param type Fade type. The following flags are supported:
* 0x1 | 0x2 | 0x4 | 0x8 | 0x10
* :-------|:------------|:--------|:-------|:-------------------------
* in/out | black/white | instant | mosaic | iris fade
* @param speed Effect speed, lower is slower. Negative values trigger an acid-like experience.
*/
void SetFade(u32 type, u32 speed);
/**
* Perform the last fade effect in reverse.
*
* @param speed Fade speed.
*/
void SetFadeInverted(u32 speed);
/**
* Peform an iris fade.
*
* @param x Screen x coordinate.
* @param y Screen y coordinate.
* @param type Fade type.
* @param speed Fade speed.
*/
void SetFadeIris(u32 x, u32 y, u32 type, u32 speed);
/**
* Set the fade progress.
*
* When used on a fade in effect, this will set the progress of the fade.
* When used on a fade out effect, progress will be sustained at the value.
*
* @param progress Progress value. 0-256.
*/
void SetFadeProgress(u32 progress);
/**
* Initialize the fade system.
*
* This will misbehave if called while a fade is active.
*/
void InitFade(void);
/**
* Entry point for the fade system.
*/
void FadeMain(void);
/**
* Fade VBlank entry point.
*/
void FadeVBlank(void);
/**
* Reset the fade palette mask.
*/
void ResetFadeMask(void);
#endif // FADE_H
-19
View File
@@ -38,25 +38,6 @@ static_assert(sizeof(struct_02000010) == 0x20);
extern struct_02000010 gUnk_02000010;
typedef struct {
u8 active;
u8 field_0x1;
u8 field_0x2;
u8 field_0x3;
u32 mask;
u16 fadeType; // fade in or out, are there others?
u16 fadeSpeed; // subtracted from duration
u16 fadeDuration;
u16 field_0xe;
s16 field_0x10;
s16 field_0x12;
s16 field_0x14;
u16 field_0x16;
u16 field_0x18;
} FadeControl;
extern FadeControl gFadeControl;
typedef struct {
u8 unk0;
u8 unk1;
+1 -1
View File
@@ -33,7 +33,7 @@ void sub_0805FA04(void) {
SetColor(0, 0x1144);
gMain.state = 1;
InitSoundPlayingInfo();
sub_08050008();
ResetFadeMask();
}
void sub_0805FA98(void) {
+2 -2
View File
@@ -68,7 +68,7 @@ void sub_080A2E40(void) {
sub_080A3198(0, 0);
gMain.state = 1;
SoundReq(BGM_FILE_SELECT);
DoFade(4, 8);
SetFade(4, 8);
}
void sub_080A2F8C(void) {
@@ -83,7 +83,7 @@ void sub_080A2F8C(void) {
*(u8*)(addr + 6) = 1;
}
gMain.state = 2;
DoFade(5, 8);
SetFade(5, 8);
break;
case 1:
SetTask(TASK_GAME);
+1 -1
View File
@@ -659,7 +659,7 @@ void sub_08041D84(Entity* this) {
ChangeObjPalette(this->child, gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
}
if (this->field_0xf == 0xe6) {
DoFade(7, 4);
SetFade(7, 4);
}
} else {
this->subAction = 4;
+54 -54
View File
@@ -16,8 +16,8 @@ extern u16 gUnk_080FC3C4[];
extern u32 gMakeFadeBuff256;
typedef void (*fptrMakeFadeBuff256)(u8*, u8*, u16, u8);
void SetBrightness(u32 arg0) {
gSaveHeader->brightness = arg0;
void SetBrightness(u32 brightness) {
gSaveHeader->brightness = brightness;
gUsedPalettes = 0xffffffff;
}
@@ -48,34 +48,34 @@ void InitFade(void) {
gFadeControl.mask = 0xffffffff;
}
void sub_08050008(void) {
void ResetFadeMask(void) {
MemClear(&gUnk_020354C0, sizeof(gUnk_020354C0));
gFadeControl.mask = 0xFFFFFFFF;
}
static void sub_08050024(void) {
sub_0801E104();
DoFade(5, 256);
SetFade(5, 256);
}
void sub_08050038(u32 arg0) {
if ((gFadeControl.fadeType & 1) != 0) {
gFadeControl.field_0xe = arg0;
void SetFadeProgress(u32 arg0) {
if ((gFadeControl.type & 1) != 0) {
gFadeControl.sustain = arg0;
} else {
gFadeControl.fadeDuration = arg0;
gFadeControl.progress = arg0;
}
}
void DoFade(u32 type, u32 speed) {
gFadeControl.fadeSpeed = speed;
gFadeControl.fadeType = type;
void SetFade(u32 type, u32 speed) {
gFadeControl.speed = speed;
gFadeControl.type = type;
gFadeControl.active = 1;
gFadeControl.fadeDuration = 0x100;
gFadeControl.field_0xe = 0;
if (gFadeControl.fadeType & 2) {
gFadeControl.field_0x2 = 0xf8;
gFadeControl.progress = 0x100;
gFadeControl.sustain = 0;
if (gFadeControl.type & 2) {
gFadeControl.color = 0xf8;
} else {
gFadeControl.field_0x2 = 0;
gFadeControl.color = 0;
}
if (type & 8) {
gOAMControls.spritesOffset = 1;
@@ -84,46 +84,46 @@ void DoFade(u32 type, u32 speed) {
gScreen.bg3.control |= BGCNT_MOSAIC;
}
if (type & 0x10) {
sub_0801E1B8(gFadeControl.field_0x16, gFadeControl.field_0x18);
sub_0801E1EC(gFadeControl.field_0x12, gFadeControl.field_0x14, gFadeControl.field_0x10);
sub_0801E1B8(gFadeControl.win_inside_cnt, gFadeControl.win_outside_cnt);
sub_0801E1EC(gFadeControl.iris_x, gFadeControl.iris_y, gFadeControl.iris_size);
if ((type & 1) == 0) {
gFadeControl.fadeType &= ~4;
sub_08050008();
gFadeControl.type &= ~4;
ResetFadeMask();
gUsedPalettes = 0xffffffff;
}
}
}
void sub_080500F4(u32 arg0) {
gFadeControl.fadeSpeed = arg0;
gFadeControl.fadeType ^= 1;
void SetFadeInverted(u32 arg0) {
gFadeControl.speed = arg0;
gFadeControl.type ^= 1;
gFadeControl.active = 1;
gFadeControl.fadeDuration = 256;
gFadeControl.progress = 256;
}
void sub_08050110(u32 param_1, u32 param_2, u32 fadeType, u32 fadeSpeed) {
if ((fadeType & 1) != 0) {
gFadeControl.field_0x10 = 0x96;
void SetFadeIris(u32 x, u32 y, u32 type, u32 speed) {
if ((type & 1) != 0) {
gFadeControl.iris_size = 0x96;
} else {
gFadeControl.field_0x10 = 0;
gFadeControl.iris_size = 0;
}
gFadeControl.field_0x12 = param_1;
gFadeControl.field_0x14 = param_2;
gFadeControl.field_0x16 = 0x3f3f;
gFadeControl.field_0x18 = 0;
DoFade(fadeType, fadeSpeed);
gFadeControl.iris_x = x;
gFadeControl.iris_y = y;
gFadeControl.win_inside_cnt = 0x3f3f;
gFadeControl.win_outside_cnt = 0;
SetFade(type, speed);
}
void FadeMain(void) {
FadeControl* ctl = &gFadeControl;
u32 flags = ctl->fadeType & 0x1C;
u32 flags = ctl->type & 0x1C;
u32 active = 0;
u32 bit;
if (ctl->active) {
ctl->fadeDuration -= ctl->fadeSpeed;
if ((s16)ctl->fadeDuration <= (s16)ctl->field_0xe)
ctl->fadeDuration = ctl->field_0xe;
ctl->progress -= ctl->speed;
if ((s16)ctl->progress <= (s16)ctl->sustain)
ctl->progress = ctl->sustain;
while (flags) {
bit = (~flags + 1) & flags;
flags ^= bit;
@@ -149,10 +149,10 @@ static u32 sub_080501C0(FadeControl* ctl) {
struct_020354C0* v3;
u32 i;
if (ctl->fadeType & 1) {
v1 = 256 - (s16)ctl->fadeDuration;
if (ctl->type & 1) {
v1 = 256 - (s16)ctl->progress;
} else {
v1 = (s16)ctl->fadeDuration;
v1 = (s16)ctl->progress;
}
v2 = gFadeControl.mask;
v3 = gUnk_020354C0;
@@ -164,21 +164,21 @@ static u32 sub_080501C0(FadeControl* ctl) {
v3->unk0 = 0;
v3->unk2 = 0;
}
v3->unk1 = ctl->field_0x2;
v3->unk1 = ctl->color;
v2 >>= 1;
}
gUsedPalettes = 0xffffffff;
return !!((s16)ctl->field_0xe ^ (s16)ctl->fadeDuration);
return !!((s16)ctl->sustain ^ (s16)ctl->progress);
}
static u32 sub_08050230(FadeControl* ctl) {
u32 type = ctl->fadeType;
u32 idx = ((s16)ctl->fadeDuration >> 4) & 0xF;
u32 type = ctl->type;
u32 idx = ((s16)ctl->progress >> 4) & 0xF;
if (type & 1)
idx = 0xF - idx;
gScreen.controls.mosaicSize = gUnk_080FC3C4[idx];
if (ctl->fadeDuration != 0)
if (ctl->progress != 0)
return 1;
// fade is finished
@@ -194,18 +194,18 @@ static u32 sub_08050230(FadeControl* ctl) {
}
static u32 sub_080502A4(FadeControl* ctl) {
if (ctl->fadeType & 1) {
s32 delta = (u16)gFadeControl.field_0x10 - gFadeControl.fadeSpeed;
gFadeControl.field_0x10 -= gFadeControl.fadeSpeed;
if (ctl->type & 1) {
s32 delta = (u16)gFadeControl.iris_size - gFadeControl.speed;
gFadeControl.iris_size -= gFadeControl.speed;
if (delta << 16 <= 0)
gFadeControl.field_0x10 = 0;
sub_0801E1EC(gFadeControl.field_0x12, gFadeControl.field_0x14, gFadeControl.field_0x10);
if (!gFadeControl.field_0x10)
gFadeControl.iris_size = 0;
sub_0801E1EC(gFadeControl.iris_x, gFadeControl.iris_y, gFadeControl.iris_size);
if (!gFadeControl.iris_size)
return 0;
} else {
gFadeControl.field_0x10 += gFadeControl.fadeSpeed;
sub_0801E1EC(gFadeControl.field_0x12, gFadeControl.field_0x14, gFadeControl.field_0x10);
if (gFadeControl.field_0x10 > 150) {
gFadeControl.iris_size += gFadeControl.speed;
sub_0801E1EC(gFadeControl.iris_x, gFadeControl.iris_y, gFadeControl.iris_size);
if (gFadeControl.iris_size > 150) {
sub_0801E104();
return 0;
}
+2 -2
View File
@@ -225,7 +225,7 @@ static void HandleFileScreenEnter(void) {
gGFXSlots.unk0 = 1;
gMain.state = 1;
SoundReq(BGM_FILE_SELECT);
DoFade(4, 8);
SetFade(4, 8);
}
static void HandleFileScreenActive(void) {
@@ -1204,7 +1204,7 @@ void HandleFileStart(void) {
gSaveHeader->msg_speed = gSave.msg_speed;
gSaveHeader->brightness = gSave.brightness;
gMain.state = 2;
DoFade(5, 8);
SetFade(5, 8);
}
}
+25 -25
View File
@@ -203,7 +203,7 @@ void GameTask(void) {
#ifdef DEMO_USA
if (gSave.demo_timer != 0) {
if (--gSave.demo_timer == 0) {
DoFade(7, 2);
SetFade(7, 2);
gMain.state = GAMETASK_EXIT;
}
}
@@ -430,7 +430,7 @@ static void GameTask_Exit(void) {
if (!gFadeControl.active)
DoSoftReset();
#else
DoFade(7, 8);
SetFade(7, 8);
SetTask(TASK_GAMEOVER);
#endif
}
@@ -574,7 +574,7 @@ static void AuxCutscene_Exit(void) {
MenuFadeIn(2, flag >> 4);
} else {
gUnk_02032EC0.nextToLoad = 3;
sub_080500F4(0x10);
SetFadeInverted(0x10);
MessageInitialize();
}
}
@@ -650,7 +650,7 @@ static void GameOver_Init(void) {
gSave.stats.health = 24;
gMain.field_0x5 = 60;
SoundReq(BGM_GAMEOVER);
sub_080500F4(4);
SetFadeInverted(4);
gFadeControl.mask = 0xFFFF0001;
switch_state(1);
}
@@ -668,12 +668,12 @@ static void GameOver_FadeIn(void) {
switch_state(2);
#if defined(DEMO_USA) || defined(DEMO_JP)
SoundReq(SONG_VOL_FADE_OUT);
DoFade(7, 4);
SetFade(7, 4);
#else
SetPopupState(0, 0);
gScreen.lcd.displayControl |= DISPCNT_BG1_ON | DISPCNT_BG2_ON;
gFadeControl.mask = 0x0000ffff;
DoFade(4, 16);
SetFade(4, 16);
#endif
}
}
@@ -791,9 +791,9 @@ static void GameOver_Update(void) {
sub_080A7114(2);
SoundReq(SFX_TEXTBOX_SELECT);
if (temp == 0) {
DoFade(5, 8);
SetFade(5, 8);
} else {
DoFade(7, 8);
SetFade(7, 8);
}
break;
}
@@ -1105,7 +1105,7 @@ static u32 CheckGameOver(void) {
InitFade();
gMain.state = 3;
gMain.substate = 0;
DoFade(5, 8);
SetFade(5, 8);
SoundReq(SONG_STOP_BGM);
return 1;
}
@@ -1126,29 +1126,29 @@ static u32 CheckRoomExit(void) {
switch (gRoomTransition.type) {
case TRANSITION_CUT:
DoFade(13, 8);
SetFade(13, 8);
break;
case TRANSITION_CUT_FAST:
DoFade(13, 3);
SetFade(13, 3);
break;
case TRANSITION_FADE_WHITE_SLOW:
DoFade(7, 4);
SetFade(7, 4);
break;
case TRANSITION_FADE_BLACK_SLOW:
DoFade(5, 4);
SetFade(5, 4);
break;
case TRANSITION_FADE_BLACK:
DoFade(5, 16);
SetFade(5, 16);
break;
case TRANSITION_FADE_BLACK_FAST:
DoFade(5, 256);
SetFade(5, 256);
break;
case TRANSITION_7:
case TRANSITION_FADE_WHITE_FAST:
DoFade(7, 256);
SetFade(7, 256);
break;
default:
DoFade(7, 16);
SetFade(7, 16);
break;
}
RoomExitCallback();
@@ -1195,30 +1195,30 @@ void InitParachuteRoom(void) {
static void InitRoomTransition(void) {
switch (gRoomTransition.type) {
case TRANSITION_CUT:
DoFade(12, 8);
SetFade(12, 8);
break;
case TRANSITION_CUT_FAST:
DoFade(12, 3);
SetFade(12, 3);
break;
case TRANSITION_FADE_WHITE_SLOW:
DoFade(6, 4);
SetFade(6, 4);
break;
case TRANSITION_3:
break;
case TRANSITION_FADE_BLACK_FAST:
DoFade(5, 256);
SetFade(5, 256);
break;
case TRANSITION_7:
DoFade(7, 256);
SetFade(7, 256);
break;
case TRANSITION_FADE_BLACK:
DoFade(4, 16);
SetFade(4, 16);
break;
case TRANSITION_FADE_WHITE_FAST:
DoFade(6, 8);
SetFade(6, 8);
break;
default:
sub_080500F4(16);
SetFadeInverted(16);
break;
}
}
+8
View File
@@ -57,6 +57,14 @@ void AgbMain(void) {
DoSoftReset();
}
// if (gInput.newKeys & B_BUTTON) {
// ResetFadeMask();
// }
// if (gInput.newKeys & A_BUTTON) {
// SetFade(0x7, 1);
// }
switch (gMain.sleepStatus) {
case SLEEP:
SetSleepMode();
+2 -2
View File
@@ -89,7 +89,7 @@ void sub_0805DF98(Manager* this) {
this->unk_0e -= 1;
} else {
this->action = 4;
DoFade(7, 4);
SetFade(7, 4);
SoundReq(SFX_EVAPORATE);
}
}
@@ -120,7 +120,7 @@ void sub_0805E000(Manager* this) {
this->action = 1;
SetPlayerControl(3);
gArea.queued_bgm = 0x80010000;
DoFade(6, 4);
SetFade(6, 4);
SoundReq(SFX_APPARATE);
}
}
+2 -2
View File
@@ -45,10 +45,10 @@ void sub_0806C280(void) {
void sub_0806C2A0(Entity* this, ScriptExecutionContext* context) {
switch (context->intVariable) {
case 0:
DoFade(0xd, 4);
SetFade(0xd, 4);
break;
case 1:
DoFade(0xc, 4);
SetFade(0xc, 4);
break;
}
}
+1 -1
View File
@@ -119,7 +119,7 @@ void GreatFairy_SpawningUpdate(Entity* this) {
mini = GreatFairy_CreateForm(this, WAKE, 0); //???
if (mini != NULL) {
CopyPosition(this, mini);
DoFade(6, 4);
SetFade(6, 4);
SoundReq(SFX_145);
this->action = 4;
this->actionDelay = 60;
+2 -2
View File
@@ -1310,11 +1310,11 @@ void sub_0809629C(Object6AEntity* this, u32 type) {
}
void sub_080962D8(Object6AEntity* this) {
DoFade(6, 0x100);
SetFade(6, 0x100);
}
void sub_080962E8(Object6AEntity* this) {
DoFade(7, 0x100);
SetFade(7, 0x100);
}
void sub_080962F8(Object6AEntity* this, ScriptExecutionContext* ctx) {
+4 -4
View File
@@ -1053,7 +1053,7 @@ static void PlayerUsePortal(Entity* this) {
if (AreaIsDungeon() || gArea.curPortalType == 3) {
this->subAction = 7;
this->actionDelay = 30;
DoFade(7, 16);
SetFade(7, 16);
SoundReq(SFX_F8);
} else {
RespawnAsMinish();
@@ -1209,7 +1209,7 @@ static void PortalUnknownUpdate(Entity* this) {
}
sub_080717F8(this);
sub_080500F4(0x10);
SetFadeInverted(0x10);
}
static void sub_080717F8(Entity* this) {
@@ -2627,7 +2627,7 @@ static void sub_0807332C(Entity* this) {
} else {
gMain.substate = 3;
*(&gMain.pauseInterval + 1) = 1;
DoFade(5, 8);
SetFade(5, 8);
}
}
@@ -3747,7 +3747,7 @@ static void sub_08074C68(Entity* this) {
gPlayerState.animation = 1850;
else
gPlayerState.animation = 1846;
DoFade(5, 0x100);
SetFade(5, 0x100);
}
}
+6 -6
View File
@@ -398,7 +398,7 @@ extern void* script_PlayerSleepingInn[];
void sub_StateChange_HouseInteriors1_InnWestRoom(void) {
if (CheckLocalFlag(YADO_CHECKIN)) {
ClearLocalFlag(YADO_CHECKIN);
DoFade(5, 256);
SetFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0x50;
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x38;
sub_080751E8(1, 2, &script_PlayerSleepingInn);
@@ -424,7 +424,7 @@ u32 sub_unk3_HouseInteriors1_InnMiddleRoom(void) {
void sub_StateChange_HouseInteriors1_InnMiddleRoom(void) {
if (CheckLocalFlag(YADO_CHECKIN) != 0) {
ClearLocalFlag(YADO_CHECKIN);
DoFade(5, 256);
SetFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0x50;
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x38;
sub_080751E8(1, 2, &script_PlayerSleepingInn);
@@ -450,7 +450,7 @@ u32 sub_unk3_HouseInteriors1_InnEastRoom(void) {
void sub_StateChange_HouseInteriors1_InnEastRoom(void) {
if (CheckLocalFlag(YADO_CHECKIN)) {
ClearLocalFlag(YADO_CHECKIN);
DoFade(5, 256);
SetFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0x60;
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x38;
sub_080751E8(1, 2, &script_PlayerSleepingInn);
@@ -672,7 +672,7 @@ extern u32 script_PlayerWakingUpInHyruleCastle;
void sub_StateChange_HyruleCastle_4(void) {
if (!CheckLocalFlag(CASTLE_04_MEZAME)) {
DoFade(5, 256);
SetFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0xb0;
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0x40;
sub_080751E8(0, 6, &script_PlayerWakingUpInHyruleCastle);
@@ -4815,7 +4815,7 @@ void sub_StateChange_HouseInteriors2_LinksHouseBedroom(void) {
if (!CheckGlobalFlag(START) && !CheckLocalFlag(0x46)) {
sub_080A71C4(5, 1, 4, 4);
gUpdateVisibleTiles = 0;
DoFade(5, 256);
SetFade(5, 256);
sub_080751E8(0, 6, &script_PlayerIntro);
}
if (!CheckGlobalFlag(OUTDOOR)) {
@@ -5550,7 +5550,7 @@ u32 sub_unk3_HyruleField_LinksHouseExterior(void) {
#else
if (!CheckLocalFlag(0x6d)) {
#endif
DoFade(7, 256);
SetFade(7, 256);
}
SetGlobalFlag(OUTDOOR);
return 1;
+21 -21
View File
@@ -74,10 +74,10 @@ void ScriptCommand_SetFadeTime(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_FadeInvert(Entity* entity, ScriptExecutionContext* context);
void ScriptCommandNop2(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_DoFade4(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_DoFade5(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_DoFade6(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_DoFade7(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFade4(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFade5(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFade6(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFade7(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E800(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E80C(Entity* entity, ScriptExecutionContext* context);
void sub_0807E818(u32);
@@ -523,10 +523,10 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_SetFadeMask,
ScriptCommand_FadeInvert,
ScriptCommandNop2,
ScriptCommand_DoFade4,
ScriptCommand_DoFade5,
ScriptCommand_DoFade6,
ScriptCommand_DoFade7,
ScriptCommand_SetFade4,
ScriptCommand_SetFade5,
ScriptCommand_SetFade6,
ScriptCommand_SetFade7,
ScriptCommand_0807E800,
ScriptCommand_0807E80C,
ScriptCommand_0807E858,
@@ -1006,26 +1006,26 @@ void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context)
}
void ScriptCommand_FadeInvert(Entity* entity, ScriptExecutionContext* context) {
sub_080500F4(gActiveScriptInfo.unk_08);
SetFadeInverted(gActiveScriptInfo.unk_08);
}
void ScriptCommandNop2(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_DoFade4(Entity* entity, ScriptExecutionContext* context) {
DoFade(4, gActiveScriptInfo.unk_08);
void ScriptCommand_SetFade4(Entity* entity, ScriptExecutionContext* context) {
SetFade(4, gActiveScriptInfo.unk_08);
}
void ScriptCommand_DoFade5(Entity* entity, ScriptExecutionContext* context) {
DoFade(5, gActiveScriptInfo.unk_08);
void ScriptCommand_SetFade5(Entity* entity, ScriptExecutionContext* context) {
SetFade(5, gActiveScriptInfo.unk_08);
}
void ScriptCommand_DoFade6(Entity* entity, ScriptExecutionContext* context) {
DoFade(6, gActiveScriptInfo.unk_08);
void ScriptCommand_SetFade6(Entity* entity, ScriptExecutionContext* context) {
SetFade(6, gActiveScriptInfo.unk_08);
}
void ScriptCommand_DoFade7(Entity* entity, ScriptExecutionContext* context) {
DoFade(7, gActiveScriptInfo.unk_08);
void ScriptCommand_SetFade7(Entity* entity, ScriptExecutionContext* context) {
SetFade(7, gActiveScriptInfo.unk_08);
}
void ScriptCommand_0807E800(Entity* entity, ScriptExecutionContext* context) {
@@ -1036,7 +1036,7 @@ void ScriptCommand_0807E80C(Entity* entity, ScriptExecutionContext* context) {
sub_0807E818(0x11);
}
void sub_0807E818(u32 fadeType) {
void sub_0807E818(u32 type) {
Entity* cameraTarget = gRoomControls.camera_target;
u32 x, y;
if (cameraTarget) {
@@ -1046,11 +1046,11 @@ void sub_0807E818(u32 fadeType) {
x = 0x78;
y = 0x50;
}
sub_08050110(x, y, fadeType, gActiveScriptInfo.unk_08);
SetFadeIris(x, y, type, gActiveScriptInfo.unk_08);
}
void ScriptCommand_0807E858(Entity* entity, ScriptExecutionContext* context) {
sub_08050038(context->scriptInstructionPointer[1]);
SetFadeProgress(context->scriptInstructionPointer[1]);
}
void ScriptCommand_SetPlayerIdle(Entity* entity, ScriptExecutionContext* context) {
@@ -1571,7 +1571,7 @@ void SetCollisionLayer2(Entity* entity, ScriptExecutionContext* context) {
}
void sub_0807F190(Entity* entity, ScriptExecutionContext* context) {
DoFade(4, 256);
SetFade(4, 256);
}
void sub_0807F1A0(Entity* entity, ScriptExecutionContext* context) {
+1 -1
View File
@@ -29,7 +29,7 @@ void sub_08055E24(void) {
sub_0804B0B0(gMenu.field_0xc[2], gMenu.field_0xc[3]);
LoadRoomEntityList(&gUnk_080FF400);
sub_08055B70(gMenu.field_0x4, 0, 0, 0);
DoFade(4, 0x10);
SetFade(4, 0x10);
}
void nullsub_493(void) {
+1 -1
View File
@@ -58,5 +58,5 @@ void sub_080A3BD0(void) {
sub_0801E738(0);
sub_080A70AC(&gUnk_081280DC);
sub_080A7114(1);
DoFade(6, 8);
SetFade(6, 8);
}
+6 -6
View File
@@ -120,7 +120,7 @@ static u32 AdvanceIntroSequence(u32 transition) {
gUnk_02032EC0.lastState = transition;
gMain.state = 2;
MemClear(&gIntroState, sizeof(gIntroState));
DoFade(7, 8);
SetFade(7, 8);
}
void TitleTask(void) {
@@ -164,7 +164,7 @@ static void HandleNintendoCapcomLogos(void) {
LoadPaletteGroup(paletteGroup);
gScreen.lcd.displayControl |= DISPCNT_BG2_ON;
gScreen.bg1.updated = 1;
DoFade(6, 8);
SetFade(6, 8);
advance = ADVANCE_NONE;
#if defined(DEMO_USA)
if (gUnk_02000010.listenForKeyPresses == 0) {
@@ -239,7 +239,7 @@ static void HandleTitlescreen(void) {
}
InitSoundPlayingInfo();
SoundReq(BGM_TITLE_SCREEN);
DoFade(6, 8);
SetFade(6, 8);
break;
case 1:
if (gFadeControl.active) {
@@ -348,7 +348,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
gScreen.bg1.yOffset = 0;
gScreen.bg1.control = BGCNT_SCREENBASE(12) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2);
gFadeControl.mask = 0x00000040;
DoFade(6, 0x10);
SetFade(6, 0x10);
SoundReq(SFX_F8);
}
}
@@ -396,7 +396,7 @@ static void HandleTitlescreenAnimationIntro(void) {
gIntroState.swordBgScaleRatio = 0x100;
gIntroState.timer = 40;
gIntroState.subState++;
DoFade(6, 16);
SetFade(6, 16);
}
UpdateSwordBgAffineData();
break;
@@ -409,7 +409,7 @@ static void HandleTitlescreenAnimationIntro(void) {
#endif
gIntroState.subState++;
CreateObject(OBJECT_BD, 0, 0);
DoFade(6, 16);
SetFade(6, 16);
SoundReq(SFX_F8);
}
break;