fix (ILSEx v1.3): transit with only fade-in (instant fade-out)

This commit is contained in:
sup39 2024-02-25 17:56:41 +09:00
parent 790ac0a8c1
commit 993f16e808
Signed by: sup39
GPG key ID: 111C00916C1641E5
4 changed files with 350 additions and 448 deletions

View file

@ -3,7 +3,7 @@
<title lang="en-US">Instant Level Select Extra</title> <title lang="en-US">Instant Level Select Extra</title>
<title lang="ja-JP">レベル選択EX</title> <title lang="ja-JP">レベル選択EX</title>
<author>sup39(サポミク)</author> <author>sup39(サポミク)</author>
<version>1.2.1</version> <version>1.3</version>
<date>Feb 25, 2024</date> <date>Feb 25, 2024</date>
<description lang="en-US"> <description lang="en-US">
::: warning ::: warning
@ -69,7 +69,7 @@
4. これで好きなだけハニスキを練習できます。他のエリアに入ろうとする時に自動的にやり直すので、手動でやり直す必要がありません。必要であれば`十字キー上`でやり直すこともできます。 4. これで好きなだけハニスキを練習できます。他のエリアに入ろうとする時に自動的にやり直すので、手動でやり直す必要がありません。必要であれば`十字キー上`でやり直すこともできます。
</description> </description>
<source version="GMSJ01"> <source version="GMSJ01">
C20F9B74 00000066 C20F9B74 00000057
3C80817F 816D97D0 3C80817F 816D97D0
3D808040 80AC0D80 3D808040 80AC0D80
20050022 540A043D 20050022 540A043D
@ -78,103 +78,88 @@
28830001 4C451102 28830001 4C451102
40A2000C 38A00008 40A2000C 38A00008
90AC0D80 7C7D1B79 90AC0D80 7C7D1B79
418202D8 818D97E8 41820274 818D97E8
2B0C0000 419A0018 280C0000 41820014
898C0064 2E8C0009 898C0064 38000021
38000021 5C00656B 5C00656B 40820258
408202B8 70A00004 70A00004 41A20040
41A20040 881F0008 881F0008 2C000008
2C000008 41820034 41820034 881F000E
881F000E 3D40803B 3D40803B 394A40E8
394A40E8 7CEA00AE 7CEA00AE 2C070001
2C070001 4081028C 4081022C 38070001
38070001 5400EFFE 5400EFFE 7CE70214
7CE70214 54E7403E 54E7403E 60E700FF
60E700FF 4800011C 480000FC 70A00008
70A00008 41A2026C 41A2020C 4800003D
48000045 00141516 00141516 0017181D
0017181D 34000090 34000090 2F2E3020
2F2E3020 32293328 32293328 2A1FBA3C
2A1FBA3C 371E213A 371E213A 0E2C3900
0E2C3900 00010507 00010507 08090200
08090200 123457D0 123457D0 24567000
24567000 12234070 12234070 23467001
23467001 7D8903A6 7D2802A6 54A6CF3A
4E800420 7D2802A6 50A6E7BC 50A6D7FE
54A6CF3A 50A6E7BC 54A0F77A 7CC60378
50A6D7FE 54A0F77A 54A0C738 50A0B77C
7CC60378 54A0C738 7CC60378 54A3873F
50A0B77C 7CC60378 41820054 2C030009
54A3873F 41820054 41820098 3C00C84A
2C030009 418200B0 6000C004 1C630003
3C00C84A 6000C004 5C031F7E 5465103A
1C630003 5C031F7E 2C06000C 408000BC
5465103A 2C06000C 2C06000A 408000D4
408000D4 2C06000A 2C060008 40800090
408000EC 2C060008 3C005689 60000234
408000A8 3C005689 546C103A 5C0C652E
60000234 546C103A 7CC76378 54C8077E
5C0C652E 7CC76378 480000C4 A0FF000E
54C8077E 480000DC 2C060000 41820028
A0FF000E 2C060000 2C060004 41820028
41820028 2C060004 2C06000A 41820028
41820040 2C06000A 7C0930AE 540744AE
41820040 7C0930AE 5408CFFE 1D080007
540744AE 5408CFFE 48000094 A01F000A
1D080007 480000AC B01F000E 890B00DF
88040007 2C000000 4800008C A0E40028
40820014 A01F000A 8904002A 48000078
B01F000E 9BA40007 3989000C 7C0C30AE
48000008 A0FF0012 540744AE 5007CFFE
890B00DF 4800008C 3C00AC1A 60005CA2
A0E40028 8904002A 1D860003 5C08677E
48000078 3989000C 48000054 39890018
7C0C30AE 540744AE 7C0C18AE 540744AE
5007CFFE 3C00AC1A 3C001373 60002301
60005CA2 1D860003 5C082F7E 48000038
5C08677E 48000054 3989FFF8 54C016B8
39890018 7C0C18AE 7C0C006E 5C072F7E
540744AE 3C001373 5007252E 800C0004
60002301 5C082F7E 5C082F7E 48000018
48000038 3989FFF8 3C001578 60009200
54C016B8 7C0C006E 5C072F3E 60E70100
5C072F7E 5007252E 39000000 B0E40028
800C0004 5C082F7E 9904002A 9BA400B3
48000018 3C001578 990B00DF 38000000
60009200 5C072F3E 900B00D8 A00B00CC
60E70100 39000000 60004000 54000524
B0E40028 9904002A B00B00CC B0FF0012
9BA400B3 990B00DF 54E0C63E 819F0020
38000000 900B00D8 2C000007 2C80000E
A00B00CC 60004000 4C423382 3800003B
54000524 B00B00CC 41820008 38000000
B0FF0012 54E0C63E B00C00E4 A00C00E2
819F0020 2C000007 540007FA B00C00E2
2C80000E 4C423382
3800003B 41820008
38000000 B00C00E4
A00C00E2 540007FA
B00C00E2 409A0010
54FDD7BE 3BBD0005 54FDD7BE 3BBD0005
48000068 41960064 819F0034 38000000
806D97E8 3D80800E 900C0020 38000012
618CAB40 4BFFFE29 900C0024 380000FF
387F0034 38800000 280709FF 40A2000C
3D808020 618C1150 3C00D2D2 6000D2FF
4BFFFE15 3800000F 900C0018 00000000
806D97E8 900300E4
38800009 3D80800E
618CC11C 4BFFFDF9
806D97E8 38800009
3D80800E 618CB80C
4BFFFDE5 806D97E8
38000009 98030064
2C1D0001 4081000C
3D80817F 998C0007
60000000 00000000
</source> </source>
<source version="GMSE01"> <source version="GMSE01">
C22A6170 00000066 C22A6170 00000057
3C80817F 816D9FA0 3C80817F 816D9FA0
3D808040 80AC4484 3D808040 80AC4484
20050022 540A043D 20050022 540A043D
@ -183,103 +168,88 @@
28830001 4C451102 28830001 4C451102
40A2000C 38A00008 40A2000C 38A00008
90AC4484 7C7D1B79 90AC4484 7C7D1B79
418202D8 818D9FB8 41820274 818D9FB8
2B0C0000 419A0018 280C0000 41820014
898C0064 2E8C0009 898C0064 38000021
38000021 5C00656B 5C00656B 40820258
408202B8 70A00004 70A00004 41A20040
41A20040 881F0008 881F0008 2C000008
2C000008 41820034 41820034 881F000E
881F000E 3D40803E 3D40803E 394AF498
394AF498 7CEA00AE 7CEA00AE 2C070001
2C070001 4081028C 4081022C 38070001
38070001 5400EFFE 5400EFFE 7CE70214
7CE70214 54E7403E 54E7403E 60E700FF
60E700FF 4800011C 480000FC 70A00008
70A00008 41A2026C 41A2020C 4800003D
48000045 00141516 00141516 0017181D
0017181D 34000090 34000090 2F2E3020
2F2E3020 32293328 32293328 2A1FBA3C
2A1FBA3C 371E213A 371E213A 0E2C3900
0E2C3900 00010507 00010507 08090200
08090200 123457D0 123457D0 24567000
24567000 12234070 12234070 23467001
23467001 7D8903A6 7D2802A6 54A6CF3A
4E800420 7D2802A6 50A6E7BC 50A6D7FE
54A6CF3A 50A6E7BC 54A0F77A 7CC60378
50A6D7FE 54A0F77A 54A0C738 50A0B77C
7CC60378 54A0C738 7CC60378 54A3873F
50A0B77C 7CC60378 41820054 2C030009
54A3873F 41820054 41820098 3C00C84A
2C030009 418200B0 6000C004 1C630003
3C00C84A 6000C004 5C031F7E 5465103A
1C630003 5C031F7E 2C06000C 408000BC
5465103A 2C06000C 2C06000A 408000D4
408000D4 2C06000A 2C060008 40800090
408000EC 2C060008 3C005689 60000234
408000A8 3C005689 546C103A 5C0C652E
60000234 546C103A 7CC76378 54C8077E
5C0C652E 7CC76378 480000C4 A0FF000E
54C8077E 480000DC 2C060000 41820028
A0FF000E 2C060000 2C060004 41820028
41820028 2C060004 2C06000A 41820028
41820040 2C06000A 7C0930AE 540744AE
41820040 7C0930AE 5408CFFE 1D080007
540744AE 5408CFFE 48000094 A01F000A
1D080007 480000AC B01F000E 890B00DF
88040007 2C000000 4800008C A0E40028
40820014 A01F000A 8904002A 48000078
B01F000E 9BA40007 3989000C 7C0C30AE
48000008 A0FF0012 540744AE 5007CFFE
890B00DF 4800008C 3C00AC1A 60005CA2
A0E40028 8904002A 1D860003 5C08677E
48000078 3989000C 48000054 39890018
7C0C30AE 540744AE 7C0C18AE 540744AE
5007CFFE 3C00AC1A 3C001373 60002301
60005CA2 1D860003 5C082F7E 48000038
5C08677E 48000054 3989FFF8 54C016B8
39890018 7C0C18AE 7C0C006E 5C072F7E
540744AE 3C001373 5007252E 800C0004
60002301 5C082F7E 5C082F7E 48000018
48000038 3989FFF8 3C001578 60009200
54C016B8 7C0C006E 5C072F3E 60E70100
5C072F7E 5007252E 39000000 B0E40028
800C0004 5C082F7E 9904002A 9BA400B3
48000018 3C001578 990B00DF 38000000
60009200 5C072F3E 900B00D8 A00B00CC
60E70100 39000000 60004000 54000524
B0E40028 9904002A B00B00CC B0FF0012
9BA400B3 990B00DF 54E0C63E 819F0020
38000000 900B00D8 2C000007 2C80000E
A00B00CC 60004000 4C423382 3800003B
54000524 B00B00CC 41820008 38000000
B0FF0012 54E0C63E B00C00E4 A00C00E2
819F0020 2C000007 540007FA B00C00E2
2C80000E 4C423382
3800003B 41820008
38000000 B00C00E4
A00C00E2 540007FA
B00C00E2 409A0010
54FDD7BE 3BBD0005 54FDD7BE 3BBD0005
48000068 41960064 819F0034 38000000
806D9FB8 3D808029 900C0020 38000012
618C7584 4BFFFE29 900C0024 380000FF
387F0034 38800000 280709FF 40A2000C
3D808013 618CF638 3C00D2D2 6000D2FF
4BFFFE15 3800000F 900C0018 00000000
806D9FB8 900300E4
38800009 3D808029
618C8BB0 4BFFFDF9
806D9FB8 38800009
3D808029 618C8250
4BFFFDE5 806D9FB8
38000009 98030064
2C1D0001 4081000C
3D80817F 998C0007
60000000 00000000
</source> </source>
<source version="GMSP01"> <source version="GMSP01">
C229E080 00000066 C229E080 00000057
3C80817F 816D9EC8 3C80817F 816D9EC8
3D808040 80ACBC24 3D808040 80ACBC24
20050022 540A043D 20050022 540A043D
@ -288,103 +258,88 @@
28830001 4C451102 28830001 4C451102
40A2000C 38A00008 40A2000C 38A00008
90ACBC24 7C7D1B79 90ACBC24 7C7D1B79
418202D8 818D9EE0 41820274 818D9EE0
2B0C0000 419A0018 280C0000 41820014
898C0064 2E8C0009 898C0064 38000021
38000021 5C00656B 5C00656B 40820258
408202B8 70A00004 70A00004 41A20040
41A20040 881F0008 881F0008 2C000008
2C000008 41820034 41820034 881F000E
881F000E 3D40803D 3D40803D 394A6DB0
394A6DB0 7CEA00AE 7CEA00AE 2C070001
2C070001 4081028C 4081022C 38070001
38070001 5400EFFE 5400EFFE 7CE70214
7CE70214 54E7403E 54E7403E 60E700FF
60E700FF 4800011C 480000FC 70A00008
70A00008 41A2026C 41A2020C 4800003D
48000045 00141516 00141516 0017181D
0017181D 34000090 34000090 2F2E3020
2F2E3020 32293328 32293328 2A1FBA3C
2A1FBA3C 371E213A 371E213A 0E2C3900
0E2C3900 00010507 00010507 08090200
08090200 123457D0 123457D0 24567000
24567000 12234070 12234070 23467001
23467001 7D8903A6 7D2802A6 54A6CF3A
4E800420 7D2802A6 50A6E7BC 50A6D7FE
54A6CF3A 50A6E7BC 54A0F77A 7CC60378
50A6D7FE 54A0F77A 54A0C738 50A0B77C
7CC60378 54A0C738 7CC60378 54A3873F
50A0B77C 7CC60378 41820054 2C030009
54A3873F 41820054 41820098 3C00C84A
2C030009 418200B0 6000C004 1C630003
3C00C84A 6000C004 5C031F7E 5465103A
1C630003 5C031F7E 2C06000C 408000BC
5465103A 2C06000C 2C06000A 408000D4
408000D4 2C06000A 2C060008 40800090
408000EC 2C060008 3C005689 60000234
408000A8 3C005689 546C103A 5C0C652E
60000234 546C103A 7CC76378 54C8077E
5C0C652E 7CC76378 480000C4 A0FF000E
54C8077E 480000DC 2C060000 41820028
A0FF000E 2C060000 2C060004 41820028
41820028 2C060004 2C06000A 41820028
41820040 2C06000A 7C0930AE 540744AE
41820040 7C0930AE 5408CFFE 1D080007
540744AE 5408CFFE 48000094 A01F000A
1D080007 480000AC B01F000E 890B00DF
88040007 2C000000 4800008C A0E40028
40820014 A01F000A 8904002A 48000078
B01F000E 9BA40007 3989000C 7C0C30AE
48000008 A0FF0012 540744AE 5007CFFE
890B00DF 4800008C 3C00AC1A 60005CA2
A0E40028 8904002A 1D860003 5C08677E
48000078 3989000C 48000054 39890018
7C0C30AE 540744AE 7C0C18AE 540744AE
5007CFFE 3C00AC1A 3C001373 60002301
60005CA2 1D860003 5C082F7E 48000038
5C08677E 48000054 3989FFF8 54C016B8
39890018 7C0C18AE 7C0C006E 5C072F7E
540744AE 3C001373 5007252E 800C0004
60002301 5C082F7E 5C082F7E 48000018
48000038 3989FFF8 3C001578 60009200
54C016B8 7C0C006E 5C072F3E 60E70100
5C072F7E 5007252E 39000000 B0E40028
800C0004 5C082F7E 9904002A 9BA400B3
48000018 3C001578 990B00DF 38000000
60009200 5C072F3E 900B00D8 A00B00CC
60E70100 39000000 60004000 54000524
B0E40028 9904002A B00B00CC B0FF0012
9BA400B3 990B00DF 54E0C63E 819F0020
38000000 900B00D8 2C000007 2C80000E
A00B00CC 60004000 4C423382 3800003B
54000524 B00B00CC 41820008 38000000
B0FF0012 54E0C63E B00C00E4 A00C00E2
819F0020 2C000007 540007FA B00C00E2
2C80000E 4C423382
3800003B 41820008
38000000 B00C00E4
A00C00E2 540007FA
B00C00E2 409A0010
54FDD7BE 3BBD0005 54FDD7BE 3BBD0005
48000068 41960064 819F0034 38000000
806D9EE0 3D808028 900C0020 38000012
618CF41C 4BFFFE29 900C0024 380000FF
387F0034 38800000 280709FF 40A2000C
3D808013 618C41B4 3C00D2D2 6000D2FF
4BFFFE15 3800000F 900C0018 00000000
806D9EE0 900300E4
38800009 3D808029
618C0A48 4BFFFDF9
806D9EE0 38800009
3D808029 618C00E8
4BFFFDE5 806D9EE0
38000009 98030064
2C1D0001 4081000C
3D80817F 998C0007
60000000 00000000
</source> </source>
<source version="GMSJ0A"> <source version="GMSJ0A">
C2285FCC 00000066 C2285FCC 00000057
3C80817F 816D9E60 3C80817F 816D9E60
3D80803F 80AC5458 3D80803F 80AC5458
20050022 540A043D 20050022 540A043D
@ -393,99 +348,84 @@
28830001 4C451102 28830001 4C451102
40A2000C 38A00008 40A2000C 38A00008
90AC5458 7C7D1B79 90AC5458 7C7D1B79
418202D8 818D9E78 41820274 818D9E78
2B0C0000 419A0018 280C0000 41820014
898C0064 2E8C0009 898C0064 38000021
38000021 5C00656B 5C00656B 40820258
408202B8 70A00004 70A00004 41A20040
41A20040 881F0008 881F0008 2C000008
2C000008 41820034 41820034 881F000E
881F000E 3D40803D 3D40803D 394AF9B8
394AF9B8 7CEA00AE 7CEA00AE 2C070001
2C070001 4081028C 4081022C 38070001
38070001 5400EFFE 5400EFFE 7CE70214
7CE70214 54E7403E 54E7403E 60E700FF
60E700FF 4800011C 480000FC 70A00008
70A00008 41A2026C 41A2020C 4800003D
48000045 00141516 00141516 0017181D
0017181D 34000090 34000090 2F2E3020
2F2E3020 32293328 32293328 2A1FBA3C
2A1FBA3C 371E213A 371E213A 0E2C3900
0E2C3900 00010507 00010507 08090200
08090200 123457D0 123457D0 24567000
24567000 12234070 12234070 23467001
23467001 7D8903A6 7D2802A6 54A6CF3A
4E800420 7D2802A6 50A6E7BC 50A6D7FE
54A6CF3A 50A6E7BC 54A0F77A 7CC60378
50A6D7FE 54A0F77A 54A0C738 50A0B77C
7CC60378 54A0C738 7CC60378 54A3873F
50A0B77C 7CC60378 41820054 2C030009
54A3873F 41820054 41820098 3C00C84A
2C030009 418200B0 6000C004 1C630003
3C00C84A 6000C004 5C031F7E 5465103A
1C630003 5C031F7E 2C06000C 408000BC
5465103A 2C06000C 2C06000A 408000D4
408000D4 2C06000A 2C060008 40800090
408000EC 2C060008 3C005689 60000234
408000A8 3C005689 546C103A 5C0C652E
60000234 546C103A 7CC76378 54C8077E
5C0C652E 7CC76378 480000C4 A0FF000E
54C8077E 480000DC 2C060000 41820028
A0FF000E 2C060000 2C060004 41820028
41820028 2C060004 2C06000A 41820028
41820040 2C06000A 7C0930AE 540744AE
41820040 7C0930AE 5408CFFE 1D080007
540744AE 5408CFFE 48000094 A01F000A
1D080007 480000AC B01F000E 890B00DF
88040007 2C000000 4800008C A0E40028
40820014 A01F000A 8904002A 48000078
B01F000E 9BA40007 3989000C 7C0C30AE
48000008 A0FF0012 540744AE 5007CFFE
890B00DF 4800008C 3C00AC1A 60005CA2
A0E40028 8904002A 1D860003 5C08677E
48000078 3989000C 48000054 39890018
7C0C30AE 540744AE 7C0C18AE 540744AE
5007CFFE 3C00AC1A 3C001373 60002301
60005CA2 1D860003 5C082F7E 48000038
5C08677E 48000054 3989FFF8 54C016B8
39890018 7C0C18AE 7C0C006E 5C072F7E
540744AE 3C001373 5007252E 800C0004
60002301 5C082F7E 5C082F7E 48000018
48000038 3989FFF8 3C001578 60009200
54C016B8 7C0C006E 5C072F3E 60E70100
5C072F7E 5007252E 39000000 B0E40028
800C0004 5C082F7E 9904002A 9BA400B3
48000018 3C001578 990B00DF 38000000
60009200 5C072F3E 900B00D8 A00B00CC
60E70100 39000000 60004000 54000524
B0E40028 9904002A B00B00CC B0FF0012
9BA400B3 990B00DF 54E0C63E 819F0020
38000000 900B00D8 2C000007 2C80000E
A00B00CC 60004000 4C423382 3800003B
54000524 B00B00CC 41820008 38000000
B0FF0012 54E0C63E B00C00E4 A00C00E2
819F0020 2C000007 540007FA B00C00E2
2C80000E 4C423382
3800003B 41820008
38000000 B00C00E4
A00C00E2 540007FA
B00C00E2 409A0010
54FDD7BE 3BBD0005 54FDD7BE 3BBD0005
48000068 41960064 819F0034 38000000
806D9E78 3D808027 900C0020 38000012
618C722C 4BFFFE29 900C0024 380000FF
387F0034 38800000 280709FF 40A2000C
3D808012 618C0908 3C00D2D2 6000D2FF
4BFFFE15 3800000F 900C0018 00000000
806D9E78 900300E4
38800009 3D808027
618C8858 4BFFFDF9
806D9E78 38800009
3D808027 618C7EF8
4BFFFDE5 806D9E78
38000009 98030064
2C1D0001 4081000C
3D80817F 998C0007
60000000 00000000
</source> </source>
</code> </code>

View file

@ -3,7 +3,7 @@
<title lang="en-US">Instant Level Select Extra</title> <title lang="en-US">Instant Level Select Extra</title>
<title lang="ja-JP">レベル選択EX</title> <title lang="ja-JP">レベル選択EX</title>
<author>sup39(サポミク)</author> <author>sup39(サポミク)</author>
<version>1.2.1</version> <version>1.3</version>
<date>Feb 25, 2024</date> <date>Feb 25, 2024</date>
<description lang="en-US"> <description lang="en-US">
::: warning ::: warning

View file

@ -4,12 +4,10 @@ def main(g, ver):
S = symbols[ver] S = symbols[ver]
# Instant Level Select main function # Instant Level Select main function
g.C2(0x220 + S['TApplication_gameLoop'], 'src/main.s', extra_as_input=[ g.C2(0x220 + S['TApplication_gameLoop'], 'src/main.s', extra_ld_input=[
'.set $LevelSelect.area, 0x817F0028', '$LevelSelect.area = 0x817F0028;',
'.set $LevelSelect.epFlag, 0x817F002A', '$LevelSelect.epFlag = 0x817F002A;',
'.set $LevelSelect.AreaLock, 0x817F002B', '$LevelSelect.AreaLock = 0x817F002B;',
# TODO conflict with Level Select
'.set $restartNActivated, 0x817F0007',
]); ]);
make_xml(main) make_xml(main)

View file

@ -11,8 +11,6 @@
.set rApp, 31 # gpApplication .set rApp, 31 # gpApplication
.set rNextGameMode, 29 .set rNextGameMode, 29
.set crAreaLock, 7 .set crAreaLock, 7
.set crMarDirector, 6
.set crWarping, 5
.set $btnLevelSelect, 0x8 # D_UP .set $btnLevelSelect, 0x8 # D_UP
.set $btnShineSelect, 0x4 # D_DOWN .set $btnShineSelect, 0x4 # D_DOWN
@ -20,10 +18,12 @@
lis \reg, \val@h lis \reg, \val@h
ori \reg, \reg, \val@l ori \reg, \reg, \val@l
.endm .endm
.macro call addr #.macro call addr
li32 r12, \addr # li32 r12, \addr
bl call # mtlr r12
.endm # blrl r12
# #bl call
#.endm
.L.prepare: .L.prepare:
## prepare registers ## prepare registers
@ -69,12 +69,10 @@
.L.checkPaused: .L.checkPaused:
### r12 = *gpMarDirector ### r12 = *gpMarDirector
lwz r12, gpMarDirector$r13(r13) lwz r12, gpMarDirector$r13(r13)
cmplwi crMarDirector, r12, 0 cmplwi r12, 0
beq crMarDirector, .L.checkPaused.done beq .L.checkPaused.done
### r12 = gpMarDirector->gameMode ### r12 = gpMarDirector->gameMode
lbz r12, 0x64(r12) lbz r12, 0x64(r12)
### crWarping(eq) = gpMarDirector->gameMode == 9
cmpwi crWarping, r12, 9
### if gameMode == 5 or 10 ### if gameMode == 5 or 10
li r0, 0x21 # (LSB 0, 5 == 1) li r0, 0x21 # (LSB 0, 5 == 1)
rlwnm. r0, r0, r12, 31-10, 31-10 # LSB 10 rlwnm. r0, r0, r12, 31-10, 31-10 # LSB 10
@ -148,9 +146,9 @@
.long 0x12234070 .long 0x12234070
.long 0x23467001 .long 0x23467001
call: #call:
mtctr r12 # mtctr r12
bctr # bctr
.L.LevelSelect: .L.LevelSelect:
mflr rD mflr rD
@ -235,23 +233,9 @@ handleSpecial:
b .L.loadStage b .L.loadStage
handleRestartN: handleRestartN:
## skip if restartN already activated
lbz r0, $restartNActivated@l(r817F)
cmpwi r0, 0
bne handleRestartN.alreadyActivated
handleRestartN.activate:
## set curArea = prevArea ## set curArea = prevArea
lhz r0, 0xA(rApp) lhz r0, 0xA(rApp)
sth r0, 0xE(rApp) sth r0, 0xE(rApp)
## set restartNActivated flag (NOTE: nextGameMode > 0)
stb rNextGameMode, $restartNActivated@l(r817F)
## done
b handleRestartN.done
handleRestartN.alreadyActivated:
## load rAns from nextArea
lhz rAns, 0x12(rApp)
handleRestartN.done:
handleRestartZ: handleRestartZ:
## load curMap, ep ## load curMap, ep
lbz rAnsEp, 0xDF(rFM) lbz rAnsEp, 0xDF(rFM)
@ -351,49 +335,29 @@ handlePlaza:
rlwinm r0, r0, 0, 31, 29 rlwinm r0, r0, 0, 31, 29
sth r0, 0xe2(rMGP) sth r0, 0xe2(rMGP)
## set nextGameMode if gpMarDirector == NULL ## set nextGameMode if gpMarDirector == NULL
bne crMarDirector, .L.setFader
### nextGameMode = nextArea == (shine select) ? 8 : 5 ### nextGameMode = nextArea == (shine select) ? 8 : 5
## ep==0xFF ? 3 : 0 (Note: all valid ep id < 0x40) ## ep==0xFF ? 3 : 0 (Note: all valid ep id < 0x40)
rlwinm rNextGameMode, rAns, 32-6, 0x3 rlwinm rNextGameMode, rAns, 32-6, 0x3
addi rNextGameMode, rNextGameMode, 5 addi rNextGameMode, rNextGameMode, 5
b .L.setFader.done
.L.setFader: .L.setFader:
## skip setting fader if warping ## TSMSFader::setFadeStatus(gpApplication.fader, FadedOut(=0))
beq crWarping, .L.setFader.done lwz r12, 0x34(rApp)
## TMarDirector::moveStage(gpMarDirector) ### this->status = FadedOut(0);
lwz r3, gpMarDirector$r13(r13) li r0, 0
call TMarDirector_moveStage stw r0, 0x20(r12)
## TSMSFader::setFadeStatus(main::gpApplication.fader, FadedOut(0)) ### this->color->a = 0xff; (overwritten afterward)
addi r3, rApp, 0x34 ### (this->wipeRequest).type = 0x12;
li r4, 0 li r0, 0x12
call TSMSFader_setFadeStatus stw r0, 0x24(r12)
## gpMarDirector->faderType = 0xf ## TSMSFader::setColor(gpApplication.fader, color=0xff)
li r0, 0xf ### this->color = rAns == 0x09FF ? 0xd2d2d2ff : 0xff
lwz r3, gpMarDirector$r13(r13) li r0, 0xff
stw r0, 0xe4(r3) cmplwi rAns, 0x09FF
## TMarDirector::currentStateFinalize(gpMarDirector, 9); bne+ .L.setFader.color.apply
li r4, 9 li32 r0, 0xd2d2d2ff
call TMarDirector_currentStateFinalize .L.setFader.color.apply:
## TMarDirector::nextStateInitialize(gpMarDirectorthis, 9); stw r0, 0x18(r12)
lwz r3, gpMarDirector$r13(r13)
li r4, 9
call TMarDirector_nextStateInitialize
## gpMarDirector->gameMode = 9
lwz r3, gpMarDirector$r13(r13)
li r0, 9
stb r0, 0x64(r3)
.L.setFader.done:
.L.done: .L.done:
## reset restartNActivated flag if game mode changes (>1)
.L.resetActivatedFlag:
cmpwi rNextGameMode, 1
ble .L.resetActivatedFlag.done
### activated flag = 0
lis r12, 0x817f
stb r12, $restartNActivated@l(r12) # 0x00
.L.resetActivatedFlag.done: