Ich kann einige (ASM)-Codes fixen. <!-- s:) -->:)<!-- s:) -->
Ich kann einige (ASM)-Codes fixen. <!-- s:) -->:)<!-- s:) -->
;==============;
;Shop Block ;
;By Iceguy ;
;Act Like 130 ;
;==============;
!Ram = $0DBF ; $0DBF -> Coin counter.
; $1422 -> Yoshi Coins.
; $0F48 -> Bonus stars.
; $0DBE -> Lives.
!Price = 12 ; Price of the item in decimal, with the Ram defined above.
!1ups = 02 ; How many 1ups to give the player.
!SoundWrong = $2A
!PushSpeed = $20
!ActLike = $29 ; If $29, it will turn into a used-block after hitting it (when the item is purchased).
; If $30, the block will stay intact after hitting it (when the item is purchased).
!PlayMsg = $01 ; Whether a message is played if the player has too few coins. 00 = no, any other value = yes.
!MsgNum = $01 ; Which message to use (1 or 2) if the above is set to $01.
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return : JMP Return
MarioBelow:
LDA #!PushSpeed
STA $7D
LDA !Ram
CMP #!Price
BCC +
SEC
SBC #!Price
STA !Ram
LDA #!SoundRight
STA $1DFC
LDA #1!ups
STA $18E4
LDY #$01
LDA #!ActLike
STA $1693
RTL
+ LDA #!SoundWrong
STA $1DFC
LDA #!PlayMsg
BEQ Return
LDA #!MsgNum
STA $1426
Return:
RTL
LDA #1!ups
LDA #!1ups
;==============;
;Shop Block ;
;By Iceguy ;
;Act Like 130 ;
;==============;
!Ram = $0DBF ; $0DBF -> Coin counter.
; $1422 -> Yoshi Coins.
; $0F48 -> Bonus stars.
; $0DBE -> Lives.
!Price = 12 ; Price of the item in decimal, with the Ram defined above.
!1ups = 02 ; How many 1ups to give the player.
!SoundWrong = $2A
!PushSpeed = $20
!ActLike = $29 ; If $29, it will turn into a used-block after hitting it (when the item is purchased).
; If $30, the block will stay intact after hitting it (when the item is purchased).
!PlayMsg = $01 ; Whether a message is played if the player has too few coins. 00 = no, any other value = yes.
!MsgNum = $01 ; Which message to use (1 or 2) if the above is set to $01.
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return : JMP Return
MarioBelow:
LDA #!PushSpeed
STA $7D
LDA !Ram
CMP #!Price
BCC +
SEC
SBC #!Price
STA !Ram
LDA #!SoundRight
STA $1DFC
LDA #!1ups
STA $18E4
LDY #$01
LDA #!ActLike
STA $1693
RTL
+ LDA #!SoundWrong
STA $1DFC
LDA #!PlayMsg
BEQ Return
LDA #!MsgNum
STA $1426
Return:
RTL