let's dev 6/6/17
freeroaming item text swordless settings breakout boss s&q for glitched mantle updates post-crystal s&q bug fixed lw map locations fixed for map mode
This commit is contained in:
83
dialog.asm
83
dialog.asm
@@ -44,43 +44,11 @@ RTL
|
||||
; PLY : PLX : PLA
|
||||
;endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
macro LoadDialogAddress(address)
|
||||
PHA : PHX : PHY
|
||||
PHP
|
||||
PHB : PHK : PLB
|
||||
SEP #$30 ; set 8-bit accumulator and index registers
|
||||
LDA $00 : PHA
|
||||
LDA $01 : PHA
|
||||
LDA $02 : PHA
|
||||
LDA.b #$01 : STA $7F5035 ; set flag
|
||||
|
||||
LDA.b #<address> : STA $00 ; write pointer to direct page
|
||||
LDA.b #<address>>>8 : STA $01
|
||||
LDA.b #<address>>>16 : STA $02
|
||||
|
||||
LDX.b #$00 : LDY.b #$00
|
||||
-
|
||||
LDA [$00], Y ; load the next character from the pointer
|
||||
STA $7F5700, X ; write to the buffer
|
||||
INX : INY
|
||||
CMP.b #$7F : BNE -
|
||||
PLA : STA $02
|
||||
PLA : STA $01
|
||||
PLA : STA $00
|
||||
PLB
|
||||
PLP
|
||||
PLY : PLX : PLA
|
||||
endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
!OFFSET_POINTER = "$7F5094"
|
||||
!OFFSET_RETURN = "$7F5096"
|
||||
!DIALOG_BUFFER = "$7F5700"
|
||||
;macro LoadDialogAddress(address)
|
||||
; PHA : PHX : PHY
|
||||
; PHP
|
||||
; PHB : PHK : PLB
|
||||
; SEP #$20 ; set 8-bit accumulator
|
||||
; REP #$10 ; set 16-bit index registers
|
||||
; SEP #$30 ; set 8-bit accumulator and index registers
|
||||
; LDA $00 : PHA
|
||||
; LDA $01 : PHA
|
||||
; LDA $02 : PHA
|
||||
@@ -90,16 +58,12 @@ endmacro
|
||||
; LDA.b #<address>>>8 : STA $01
|
||||
; LDA.b #<address>>>16 : STA $02
|
||||
;
|
||||
; LDA !OFFSET_POINTER : TAX : LDY.w #$0000
|
||||
; LDX.b #$00 : LDY.b #$00
|
||||
; -
|
||||
; LDA [$00], Y ; load the next character from the pointer
|
||||
; STA !DIALOG_BUFFER, X ; write to the buffer
|
||||
; STA $7F5700, X ; write to the buffer
|
||||
; INX : INY
|
||||
; CMP.b #$7F : BNE -
|
||||
; REP #$20 ; set 16-bit accumulator
|
||||
; TXA : STA !OFFSET_RETURN ; copy out X into
|
||||
; LDA.w #$0000 : STA !OFFSET_POINTER
|
||||
; SEP #$20 ; set 8-bit accumulator
|
||||
; PLA : STA $02
|
||||
; PLA : STA $01
|
||||
; PLA : STA $00
|
||||
@@ -108,10 +72,47 @@ endmacro
|
||||
; PLY : PLX : PLA
|
||||
;endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
!OFFSET_POINTER = "$7F5094"
|
||||
!OFFSET_RETURN = "$7F5096"
|
||||
!DIALOG_BUFFER = "$7F5700"
|
||||
macro LoadDialogAddress(address)
|
||||
PHA : PHX : PHY
|
||||
PHP
|
||||
PHB : PHK : PLB
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
REP #$10 ; set 16-bit index registers
|
||||
LDA $00 : PHA
|
||||
LDA $01 : PHA
|
||||
LDA $02 : PHA
|
||||
LDA.b #$01 : STA $7F5035 ; set flag
|
||||
|
||||
LDA.b #<address> : STA $00 ; write pointer to direct page
|
||||
LDA.b #<address>>>8 : STA $01
|
||||
LDA.b #<address>>>16 : STA $02
|
||||
|
||||
REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
|
||||
?loop:
|
||||
LDA [$00], Y ; load the next character from the pointer
|
||||
STA !DIALOG_BUFFER, X ; write to the buffer
|
||||
INX : INY
|
||||
CMP.b #$7F : BNE ?loop
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
TXA : INC : STA !OFFSET_RETURN ; copy out X into
|
||||
LDA.w #$0000 : STA !OFFSET_POINTER
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
PLA : STA $02
|
||||
PLA : STA $01
|
||||
PLA : STA $00
|
||||
PLB
|
||||
PLP
|
||||
PLY : PLX : PLA
|
||||
endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
FreeDungeonItemNotice:
|
||||
PHX : PHA
|
||||
LDA.l FreeItemTest : BNE + : BRL .skip : +
|
||||
LDA.l FreeItemText : BNE + : BRL .skip : +
|
||||
|
||||
PLA : PHA
|
||||
AND.b #$F0 ; looking at high bits only
|
||||
CMP.b #$70 : BNE + ; map of...
|
||||
%LoadDialogAddress(Notice_MapOf)
|
||||
@@ -128,7 +129,7 @@ FreeDungeonItemNotice:
|
||||
+
|
||||
|
||||
.dungeon
|
||||
LDA !OFFSET_RETURN : STA !OFFSET_POINTER
|
||||
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
|
||||
PLA : PHA
|
||||
AND.b #$0F ; looking at high bits only
|
||||
CMP.b #$00 : BNE + ; ...light world
|
||||
|
||||
Reference in New Issue
Block a user