Users browsing this thread: 1 Guest(s)
Patch: Restored Ability Names (Update)
02-25-2019, 09:42 PM
(This post was last modified: 03-03-2019, 01:19 AM by SilentEnigma.)
Antamaru, nice catch! Thank you. Yes, this would have been in Angelo's patch as well. Mea culpa!
DrakeyC, thank you very much for your solution! It looks nice. I will release an update incorporating your fix as soon as possible.
Edit:
This bug came up and was fixed during Angelo's original development, and I was tragically too lazy to read the whole thread back then.
The code at C3/5AF9 - C3/5B25, which generates the growth rate string, is shared between the Item submenu and the Skills>Esper submenu. To fix one trivially is to break the other.
It appears that Angelo dealt with this problem by realigning the spell list in the Esper menu. I, unaware of his reasons, thought the change looked unnecessary; so in order to improve the menu's appearance, I proceeded to revert his solution without realizing it.
Below is my new solution to fix the bug in the Item submenu, while still getting the most out of the Esper submenu. The " :" will always be added to the string; however, depending on which submenu is active, it will either be placed at the beginning (Esper menu) or at the end (Item submenu, invisible).
New subroutine - Conditionally appends ": " to growth rate string, then loads char value for Space:
The updated patch uses 18 additional bytes of free space compared version 1.1.
The new version 1.2 can be found here.
Cheers!
DrakeyC, thank you very much for your solution! It looks nice. I will release an update incorporating your fix as soon as possible.
Edit:
This bug came up and was fixed during Angelo's original development, and I was tragically too lazy to read the whole thread back then.
The code at C3/5AF9 - C3/5B25, which generates the growth rate string, is shared between the Item submenu and the Skills>Esper submenu. To fix one trivially is to break the other.
It appears that Angelo dealt with this problem by realigning the spell list in the Esper menu. I, unaware of his reasons, thought the change looked unnecessary; so in order to improve the menu's appearance, I proceeded to revert his solution without realizing it.
Below is my new solution to fix the bug in the Item submenu, while still getting the most out of the Esper submenu. The " :" will always be added to the string; however, depending on which submenu is active, it will either be placed at the beginning (Esper menu) or at the end (Item submenu, invisible).
Code:
C3/5AFF: A9 01 LDA #$01 ; Submenu I.D. for "Skills"
C3/5B01: 20 E2 F0 JSR $F0E2 ; Jump to new subroutine $F0E2
C3/5B04: 8D 80 21 STA $2180 ; Add to string
C3/5B07: A9 D7 LDA #$D7 ; Char: "×"
C3/5B09: 8D 80 21 STA $2180 ; Add to string
C3/5B0C: A5 E0 LDA $E0 ; Learning rate
C3/5B0E: 20 E0 04 JSR $04E0 ; Turn into text
C3/5B11: A5 F8 LDA $F8 ; Tens digit
C3/5B13: 8D 80 21 STA $2180 ; Add to string
C3/5B16: A5 F9 LDA $F9 ; Ones digit
C3/5B18: 8D 80 21 STA $2180 ; Add to string
C3/5B1B: A9 00 LDA #$00 ; Submenu I.D. for "Items"
C3/5B1D: 20 E2 F0 JSR $F0E2 ; Jump to new subroutine $F0E2
C3/5B20: 9C 80 21 STZ $2180 ; End string
C3/5B23: 4C D9 7F JMP $7FD9 ; Draw string
New subroutine - Conditionally appends ": " to growth rate string, then loads char value for Space:
Code:
C3/F0E2: CD 2C 02 CMP $0220 ; Does current submenu I.D. equal accumulator value?
C3/F0E5: D0 0A BNE $F0F1 ; If not, skip appending string
C3/F0E7: A9 C1 LDA #$C1 ; Char: ":"
C3/F0E9: 8D 80 21 STA $2180 ; Add to string
C3/F0EC: A9 FF LDA #$FF ; Space char
C3/F0EE: 8D 80 21 STA $2180 ; Add to string
C3/F0F1: A9 FF LDA #$FF ; Space char
C3/F0F3: 60 RTS ; Return
The updated patch uses 18 additional bytes of free space compared version 1.1.
The new version 1.2 can be found here.
Cheers!
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)