let's dev sep 19th 2017

event draw stuff
This commit is contained in:
Karkat
2017-09-19 23:30:54 -04:00
parent b0abb5e823
commit b08e936057
6 changed files with 66 additions and 4 deletions

View File

@@ -130,9 +130,48 @@ endmacro
;--------------------------------------------------------------------------------
!CHALLENGE_TIMER = "$7EF454"
!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:
;STA $FFFFFF
PHX
JSR.w ProcessEventItems : CPX.b #$00 : BEQ ++
;JSL.l Main_ShowTextMessage
LDA.b #$01 : STA $7F50A0
BRL .done
++
LDA $02D8 ; check inventory
CMP.b #$4C : BNE + ; 50 bombs
;LDA.b #$07 : STA $7EF370 ; upgrade bombs