let's dev sep 19th 2017
event draw stuff
This commit is contained in:
@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
|
|||||||
db #$00 ; expand file to 2mb
|
db #$00 ; expand file to 2mb
|
||||||
|
|
||||||
org $1FFFF8 ; <- FFFF8 timestamp rom
|
org $1FFFF8 ; <- FFFF8 timestamp rom
|
||||||
db #$20, #$17, #$09, #$15 ; year/month/day
|
db #$20, #$17, #$09, #$19 ; year/month/day
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
|
||||||
|
|||||||
13
dialog.asm
13
dialog.asm
@@ -98,7 +98,10 @@ macro CopyDialog(address)
|
|||||||
LDA.b #<address> : STA $00 ; write pointer to direct page
|
LDA.b #<address> : STA $00 ; write pointer to direct page
|
||||||
LDA.b #<address>>>8 : STA $01
|
LDA.b #<address>>>8 : STA $01
|
||||||
LDA.b #<address>>>16 : STA $02
|
LDA.b #<address>>>16 : STA $02
|
||||||
|
%CopyDialogIndirect()
|
||||||
|
endmacro
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
macro CopyDialogIndirect()
|
||||||
REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
|
REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
|
||||||
?loop:
|
?loop:
|
||||||
LDA [$00], Y ; load the next character from the pointer
|
LDA [$00], Y ; load the next character from the pointer
|
||||||
@@ -111,6 +114,12 @@ macro CopyDialog(address)
|
|||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
endmacro
|
endmacro
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
LoadDialogAddressIndirect:
|
||||||
|
LDA.b #$01 : STA $7F5035 ; set flag
|
||||||
|
%CopyDialogIndirect()
|
||||||
|
;%LoadDialogAddress(UncleText)
|
||||||
|
RTL
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
!ITEM_TEMPORARY = "$7F5040"
|
!ITEM_TEMPORARY = "$7F5040"
|
||||||
FreeDungeonItemNotice:
|
FreeDungeonItemNotice:
|
||||||
STA !ITEM_TEMPORARY
|
STA !ITEM_TEMPORARY
|
||||||
@@ -192,7 +201,7 @@ FreeDungeonItemNotice:
|
|||||||
PLP
|
PLP
|
||||||
PLY : PLX : PLA
|
PLY : PLX : PLA
|
||||||
|
|
||||||
JSL.l Sprite_ShowMessageMinimal
|
JSL.l Main_ShowTextMessage
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
|
|||||||
5
eventdata.asm
Normal file
5
eventdata.asm
Normal file
File diff suppressed because one or more lines are too long
@@ -91,6 +91,12 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
PostItemAnimation:
|
PostItemAnimation:
|
||||||
LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished
|
LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished
|
||||||
|
|
||||||
|
LDA $7F50A0 : BEQ +
|
||||||
|
JSL.l Main_ShowTextMessage
|
||||||
|
LDA.b #$00 : STA $7F50A0
|
||||||
|
+
|
||||||
|
|
||||||
STZ $02E9 : LDA $0C5E, X ; thing we wrote over to get here
|
STZ $02E9 : LDA $0C5E, X ; thing we wrote over to get here
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
41
newitems.asm
41
newitems.asm
@@ -130,9 +130,48 @@ endmacro
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
!CHALLENGE_TIMER = "$7EF454"
|
!CHALLENGE_TIMER = "$7EF454"
|
||||||
!GOAL_COUNTER = "$7EF460"
|
!GOAL_COUNTER = "$7EF460"
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
;carry clear if pass
|
||||||
|
;carry set if caught
|
||||||
|
incsrc eventdata.asm
|
||||||
|
ProcessEventItems:
|
||||||
|
LDA $00 : PHA
|
||||||
|
LDA $01 : PHA
|
||||||
|
LDA $02 : PHA
|
||||||
|
PHY : PHP
|
||||||
|
LDA $02D8
|
||||||
|
CMP.b #$70 : !BLT + : CMP.b #$E0 : !BGE + ; Free Item Block
|
||||||
|
!SUB #$70
|
||||||
|
|
||||||
|
REP #$30 ; set 16-bit accumulator & index registers
|
||||||
|
AND.w #$00FF : ASL : TAX
|
||||||
|
LDA.l EventDataOffsets, X : !ADD.w #EventDataTable : STA $00
|
||||||
|
|
||||||
|
SEP #$20 ; set 8-bit accumulator
|
||||||
|
PHK : PLA : STA $02
|
||||||
|
|
||||||
|
JSL.l LoadDialogAddressIndirect
|
||||||
|
|
||||||
|
SEP #$10 ; set 8-bit index registers
|
||||||
|
LDX.b #$01 : BRA .done
|
||||||
|
+
|
||||||
|
LDX.b #$00
|
||||||
|
.done
|
||||||
|
PLP : PLY
|
||||||
|
PLA : STA $02
|
||||||
|
PLA : STA $01
|
||||||
|
PLA : STA $00
|
||||||
|
RTS
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
AddReceivedItemExpandedGetItem:
|
AddReceivedItemExpandedGetItem:
|
||||||
;STA $FFFFFF
|
|
||||||
PHX
|
PHX
|
||||||
|
|
||||||
|
JSR.w ProcessEventItems : CPX.b #$00 : BEQ ++
|
||||||
|
;JSL.l Main_ShowTextMessage
|
||||||
|
LDA.b #$01 : STA $7F50A0
|
||||||
|
BRL .done
|
||||||
|
++
|
||||||
|
|
||||||
LDA $02D8 ; check inventory
|
LDA $02D8 ; check inventory
|
||||||
CMP.b #$4C : BNE + ; 50 bombs
|
CMP.b #$4C : BNE + ; 50 bombs
|
||||||
;LDA.b #$07 : STA $7EF370 ; upgrade bombs
|
;LDA.b #$07 : STA $7EF370 ; upgrade bombs
|
||||||
|
|||||||
@@ -1174,6 +1174,9 @@ dw #9999 ; Rupee Limit
|
|||||||
; $7F5097 - Dialog Offset Pointer Return (High)
|
; $7F5097 - Dialog Offset Pointer Return (High)
|
||||||
; $7F5098 - Water Entry Index
|
; $7F5098 - Water Entry Index
|
||||||
; $7F5099 - Last Entered Entrance
|
; $7F5099 - Last Entered Entrance
|
||||||
|
|
||||||
|
; $7F50A0 - Event Parameter 1
|
||||||
|
|
||||||
; $7F50D0 - $7F50FF - Block Cypher Parameters
|
; $7F50D0 - $7F50FF - Block Cypher Parameters
|
||||||
; $7F5100 - $7F51FF - Block Cypher Buffer
|
; $7F5100 - $7F51FF - Block Cypher Buffer
|
||||||
; $7F5200 - $7F52FF - RNG Pointer Block
|
; $7F5200 - $7F52FF - RNG Pointer Block
|
||||||
|
|||||||
Reference in New Issue
Block a user