Users browsing this thread: 1 Guest(s)
Patch: Informative Miss
07-08-2023, 08:28 PM
The MissType routine overwrites the X register, which causes counter attack scripts to fail. You can fix it by adding PHX and PLX like so:
Code:
MissType:
PHX
CLC ; default to no "miss" text
LDX #$04 ; point to "fail" bytes first
.loop
BIT !msgs,X ; is this miss message flagged
BNE .done ; exit with X offset if so
DEX #2 ; point to next lowest message
BNE .loop
.done
TRB !miss ; test and reset miss flag
BNE .set_msg ; if set, convert X to message value
DEX ; else check if "null" or "fail" was set
BMI .exit ; if not, exit
TSB !miss ; else, show fail/null on next loop
.exit
PLX
RTS
.set_msg
TRB !fail ; clear "fail" bit
TRB !null ; clear "null" bit
SEC ; indicate "miss" text
TXA ; get message flag in A
XBA ; move to hi byte
PLX
RTS
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)