kein Ziel auslösen

geschrieben am 08.11.2010 15:26:04
( Link )
Also Leute ich habe hier die ASM datei von dem blargg boss und der löst ja , nachdem man ihn besiegt hat , das Ziel aus. Wie kann man es machen , dass er nicht das Ziel auslöst ?

hier ist der ASM Code

Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Blargg Boss
; By Atma
; Based on:
; sprite A8 - Blargg
; adapted for Romi's Spritetool and commented by yoshicookiezeus
; Description:
; A blargg boss that takes 4 (easily changed) spin jumps to kill.
; Like a normal blargg, he'll lunge if you're close to him.
; However, he does not go back to the same spot and he spits fire as he lunges.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


!RAM_FrameCounter = $13
!RAM_FrameCounterB = $14
!RAM_MarioSpeedX = $7B
!RAM_MarioXPos = $94
!RAM_MarioXPosHi = $95
!RAM_SpritesLocked = $9D
!RAM_SpriteNum = $9E
!RAM_SpriteSpeedY = $AA
!RAM_SpriteSpeedX = $B6
!RAM_SpriteState = $C2
!RAM_SpriteYLo = $D8
!RAM_SpriteXLo = $E4
!OAM_DispX = $0300
!OAM_DispY = $0301
!OAM_Tile = $0302
!OAM_Prop = $0303
!OAM_TileSize = $0460
!RAM_SpriteYHi = $14D4
!RAM_SpriteXHi = $14E0
!RAM_SpriteDir = $157C
!RAM_SprObjStatus = $1588
!RAM_OffscreenHorz = $15A0
!RAM_SprOAMIndex = $15EA
!RAM_SpritePal = $15F6
!RAM_OffscreenVert = $186C
!BossHealth = $04 ; Change this to change how many hits he'll take



X_Speed: db $18,$E8



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

print "INIT ",pc
PHB
PHK
PLB
LDA #!BossHealth
STA $1510,x
LDA !RAM_SpriteXLo,x
STA $151C,x
LDA !RAM_SpriteXHi,x
STA $1528,x
PLB
RTL

print "MAIN ",pc
PHB
PHK
PLB
JSR Blargg
PLB
RTL


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; main
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Blargg: JSR Sprite_Graphics
LDA $1510,x
BNE Alive
STZ $7B
STZ $7D
STZ $140D
LDA $14C8,x
CMP #$02
BEQ Loop
LDA #$02
STA $14C8,x
LDA #$15
STA $1504,x
Loop: DEC $1504,x
BNE RETURN
LDA #$FF ; \ set normal exit
STA $1493 ; /
LDA #$0B ; \ change music 0C for regular end, 0B for boss end
STA $1DFB ; /
STA $0DDA ; set music
DEC $13C6 ; prevent the player from walking
RETURN: RTS
Alive:
LDA !RAM_SpritesLocked ;\ if sprites locked,
BNE Return039F56 ;/ return
LDA $15A0,x
BEQ Contact
LDA !RAM_SpriteState,x
CMP #$04
BEQ Contact
LDA $151C,x
STA !RAM_SpriteXLo,x
LDA $1528,x
STA !RAM_SpriteXHi,x
Contact:
JSL $01A7DC ; interact with Mario
BCC NoContact
LDA !RAM_SpriteState,x
CMP #$04
BNE NoContact
LDA $0E
CMP #$E6
BPL SpriteWins
LDA $140D
BEQ SpriteWins
LDA #$B0
STA $7D
LDA #$20
STA $1DF9
DEC $1510,x
BRA NoContact
SpriteWins:
JSL $00F5B7
NoContact:
JSR SUB_OFF_SCREEN_X0
LDA !RAM_SpriteState,x
JSL $0086DF

BlarggPtrs: dw CODE_039F57 ; waiting
dw CODE_039F8B ; emerging
dw CODE_039FA4 ; more waiting
dw CODE_039FC8 ; submerging
dw CODE_039FEF ; lunging

Return039F56: RTS ; return

CODE_039F57: LDA !RAM_OffscreenHorz,x ;\ if sprite offscreen
ORA $1540,x ; | or still waiting since last lunge,
BNE Return039F8A ;/ return
JSR SUB_HORZ_POS ;\ if Mario not closer to sprite than 0x70 pixels (7 16x16 tiles),
LDA $0F ; |
CLC ; |
ADC #$70 ; |
CMP #$E0 ; |
BCS Return039F8A ;/ return
LDA #$E3 ;\ set sprite y speed
STA !RAM_SpriteSpeedY,x ;/
LDA !RAM_SpriteYHi,x ;\preserve initial sprite Y position
STA $1534,x ; |
LDA !RAM_SpriteYLo,x ; |
STA $1594,x ;/
JSR CODE_039FC0
INC !RAM_SpriteState,x ; go to next sprite state
Return039F8A: RTS ; return

CODE_039F8B: LDA !RAM_SpriteSpeedY,x ;\ if sprite y speed positive and greater than 0x10,
CMP #$10 ; |
BMI CODE_039F9B ;/ branch
LDA #$50 ;\ set time until next sprite state change
STA $1540,x ;/
INC !RAM_SpriteState,x ; go to next sprite state
STZ !RAM_SpriteSpeedY,x ; reset sprite y speed
RTS ; return

CODE_039F9B: JSL $01801A ; update sprite position
INC !RAM_SpriteSpeedY,x ;\ decelerate sprite downwards
INC !RAM_SpriteSpeedY,x ;/
RTS ; return

CODE_039FA4: LDA $1540,x ;\ if not time to go to next sprite state,
BNE CODE_039FB1 ;/ branch
INC !RAM_SpriteState,x ; go to next sprite state
LDA #$0A ;\ set time until next sprite state change
STA $1540,x ;/
RTS ; return

CODE_039FB1: CMP #$20 ;\ if sprite state timer is less than 0x20,
BCC CODE_039FC0 ;/ branch
AND #$1F ;\ if not time to flip sprite direction,
BNE Return039FC7 ;/ return
LDA !RAM_SpriteDir,x ;\ flip sprite direction
EOR #$01 ;/
BRA CODE_039FC4

CODE_039FC0: JSR SUB_HORZ_POS ;\ make sprite face Mario
TYA ; |
CODE_039FC4: STA !RAM_SpriteDir,x ;/
Return039FC7: RTS ; return

CODE_039FC8: LDA $1540,x ;\ if time to go to next sprite state,
BEQ CODE_039FD6 ;/ branch
LDA #$20 ;\ else, set sprite y speed
STA !RAM_SpriteSpeedY,x ;/
JSL $01801A ; update sprite position
RTS ; return

CODE_039FD6: LDA #$20 ;\ set timer
STA $1540,x ;/
LDY !RAM_SpriteDir,x ;\ set initial sprite x speed
LDA X_Speed,y ; |
STA !RAM_SpriteSpeedX,x ;/
LDA #$E2 ;\ set initial sprite y speed
STA !RAM_SpriteSpeedY,x ;/
JSR CODE_03A045
INC !RAM_SpriteState,x ; go to next sprite state
RTS ; return


CODE_039FEF:
STZ $1602,X ; clear graphics frame to use
LDA $1540,x ;\ if already lunging,
BEQ CODE_03A002 ;/ branch
LDA #$0A
STA $1504,x
DEC $1540,x ;\ if not yet time to lunge,
BNE CODE_03A038 ;/ branch
LDA #$25 ;\ sound effect
STA $1DF9 ;/
JSR CODE_03A045
CODE_03A002: JSL $018022 ;\ update sprite position
JSL $01801A ;/
LDA $1504,x
BNE NoFireball
JSL $02A9DE
BMI NoFireball ; If sprite slots are full, don't generate.
PHX
TYX
LDA #$01
STA $14C8,x
LDA #$B3
STA $9E,x
JSL $07F7D2
TXY
PLX
LDA $157C,x ; Load direction..
STA $157C,y
LDA $00E4,x
STA $00E4,y
LDA $14E0,x
STA $14E0,y
LDA $D8,x
STA $00D8,y
LDA $14D4,x
STA $14D4,y
PHY
LDY $157C,x
LDA X_Speed,y
PLY
STA $00B6,y
LDA #$1A
STA $1504,x
NoFireball: DEC $1504,x
LDA !RAM_FrameCounter ;\ every 0x100th frame, skip y speed increasing?
AND #$00 ; | how odd...
BNE CODE_03A012 ;/ perhaps this was #$01 or #$03 earlier, to make the y speed increase slower?
INC !RAM_SpriteSpeedY,x ; increase sprite y speed
CODE_03A012: LDA !RAM_SpriteSpeedY,x ;\ if sprite y speed is negative or less than 0x20:
CMP #$20 ; |
BMI CODE_03A038 ;/ branch
JSR CODE_03A045
STZ !RAM_SpriteState,x ; return to first sprite state
LDA $1534,x ;\ reset sprite position to its original values
STA !RAM_SpriteYHi,x ; |
LDA $1594,x ; |
STA !RAM_SpriteYLo,x ;/
LDA #$40 ;\ set time until next sprite state change
STA $1540,x ;/
CODE_03A038:
LDA !RAM_SpriteSpeedY,x ;\ if sprite y speed less than 06 in either direction (at the top of its lunge),
CLC ; |
ADC #$06 ; |
CMP #$0C ; |
BCS Return03A044 ;/ return
INC $1602,x ; set graphics frame to use
Return03A044: RTS

CODE_03A045:
LDA !RAM_SpriteYLo,x ;\ temporarily change y position of sprite
PHA ; |
SEC ; |
SBC #$0C ; |
STA !RAM_SpriteYLo,x ; |
LDA !RAM_SpriteYHi,x ; |
PHA ; |
SBC #$00 ; |
STA !RAM_SpriteYHi,x ;/
JSL $028528 ; show lava splash
PLA ;\ restore y position of sprite
STA !RAM_SpriteYHi,x ; |
PLA ; |
STA !RAM_SpriteYLo,x ;/
RTS ; return


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Graphics routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


!Eye_Tile = $A0


Sprite_Graphics: JSR GET_DRAW_INFO
LDA !RAM_SpriteState,x ;\ if sprite state == 0,
BEQ CODE_03A038 ;/ branch (skip graphics routine)
CMP #$04 ;\ if sprite state == 4,
BEQ CODE_03A09D ;/ branch (full graphics routine)

LDA #!Eye_Tile
STA !OAM_Tile,y
LDA $00
STA !OAM_DispX,y
LDA $01
STA !OAM_DispY,Y
LDA $15F6,x

PHY
LDY !RAM_SpriteDir,X
BNE No_X_Flip
EOR #$40
No_X_Flip:
PLY
ORA $64
STA !OAM_Prop,Y

LDY #$02 ; \ 460 = 2 (all 16x16 tiles)
LDA #$00 ; | A = (number of tiles drawn - 1)
JSL $01B7B3 ; / don't draw if offscreen
RTS ; return


X_Offset: db $F8,$08,$F8,$08,$18,$08,$F8,$08
db $F8,$E8

Y_Offset: db $F8,$F8,$08,$08,$08

BlarggTilemap: db $A2,$A4,$C2,$C4,$A6,$A2,$A4,$E6
db $C8,$A6

CODE_03A09D: LDA $1602,x ;\ use graphics frame to determine initial tile table offset
ASL ; |
ASL ; |
ADC $1602,x ; |
STA $03 ;/
LDA !RAM_SpriteDir,x
STA $02
PHX ; preserve sprite index
LDX #$04 ; setup loop counter
CODE_03A0AF: PHX ;\ preserve it in the stack,
PHX ;/ twice
LDA $01 ;\ set y position of tile
CLC ; |
ADC Y_Offset,x ; |
STA !OAM_DispY,y ;/
LDA $02 ;\ use sprite direction to determine offset for x offset table
BNE CODE_03A0C3 ; |
TXA ; |
CLC ; |
ADC #$05 ; |
TAX ;/
CODE_03A0C3: LDA $00 ;\ set x position of tile
CLC ; |
ADC X_Offset,x ; |
STA !OAM_DispX,y ;/
PLA ; retrieve loop counter
CLC ;\ add in initial tile table offset
ADC $03 ; |
TAX ;/
LDA BlarggTilemap,x ;\ set tile number
STA !OAM_Tile,y ;/
PHX ; preserve loop counter
LDX $15E9 ; load sprite index
LDA $15F6,x ; load sprite graphics properties
PHY ; preserve OAM index
LDY $02 ;\ if sprite facing right,
BNE No_X_Flip2 ; |
EOR #$40 ;/ flip tile
No_X_Flip2: PLY ; retrieve OAM index
PLX ; retrieve loop counter
ORA $64 ; add in level properties
STA !OAM_Prop,Y ; set tile properties
PLX ; retrieve loop counter
INY ;\ as we wrote a 16x16 tile to OAM, we need to increase the pointer by 4
INY ; |
INY ; |
INY ;/
DEX ; decrease loop counter
BPL CODE_03A0AF ; if still tiles left to draw, go to start of loop
PLX ; retrieve sprite index
LDY #$02 ; the tiles written were 16x16
LDA #$04 ; we wrote five tiles
JSL $01B7B3
RTS ; return



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B760 - graphics routine helper - shared
; sets off screen flags and sets index to OAM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B75C

TABLE1: db $0C,$1C
TABLE2: db $01,$02

GET_DRAW_INFO: STZ $186C,x ; reset sprite offscreen flag, vertical
STZ $15A0,x ; reset sprite offscreen flag, horizontal
LDA $E4,x ; \
CMP $1A ; | set horizontal offscreen if necessary
LDA $14E0,x ; |
SBC $1B ; |
BEQ ON_SCREEN_X ; |
INC $15A0,x ; /

ON_SCREEN_X: LDA $14E0,x ; \
XBA ; |
LDA $E4,x ; |
REP #$20 ; |
SEC ; |
SBC $1A ; | mark sprite invalid if far enough off screen
CLC ; |
ADC #$0040 ; |
CMP #$0180 ; |
SEP #$20 ; |
ROL A ; |
AND #$01 ; |
STA $15C4,x ; /
BNE INVALID ;

LDY #$00 ; \ set up loop:
LDA $1662,x ; |
AND #$20 ; | if not smushed (1662 & 0x20), go through loop twice
BEQ ON_SCREEN_LOOP ; | else, go through loop once
INY ; /
ON_SCREEN_LOOP: LDA $D8,x ; \
CLC ; | set vertical offscreen if necessary
ADC TABLE1,y ; |
PHP ; |
CMP $1C ; | (vert screen boundry)
ROL $00 ; |
PLP ; |
LDA $14D4,x ; |
ADC #$00 ; |
LSR $00 ; |
SBC $1D ; |
BEQ ON_SCREEN_Y ; |
LDA $186C,x ; | (vert offscreen)
ORA TABLE2,y ; |
STA $186C,x ; |
ON_SCREEN_Y: DEY ; |
BPL ON_SCREEN_LOOP ; /

LDY $15EA,x ; get offset to sprite OAM
LDA $E4,x ; \
SEC ; |
SBC $1A ; | $00 = sprite x position relative to screen boarder
STA $00 ; /
LDA $D8,x ; \
SEC ; |
SBC $1C ; | $01 = sprite y position relative to screen boarder
STA $01 ; /
RTS ; return

INVALID: PLA ; \ return from *main gfx routine* subroutine...
PLA ; | ...(not just this subroutine)
RTS ; /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SUB_OFF_SCREEN
; This subroutine deals with sprites that have moved off screen
; It is adapted from the subroutine at $01AC0D
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

SPR_T12: db $40,$B0
SPR_T13: db $01,$FF
SPR_T14: db $30,$C0,$A0,$C0,$A0,$F0,$60,$90 ;bank 1 sizes
db $30,$C0,$A0,$80,$A0,$40,$60,$B0 ;bank 3 sizes
SPR_T15: db $01,$FF,$01,$FF,$01,$FF,$01,$FF ;bank 1 sizes
db $01,$FF,$01,$FF,$01,$00,$01,$FF ;bank 3 sizes

SUB_OFF_SCREEN_X1: LDA #$02 ; \ entry point of routine determines value of $03
BRA STORE_03 ; | (table entry to use on horizontal levels)
SUB_OFF_SCREEN_X2: LDA #$04 ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X3: LDA #$06 ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X4: LDA #$08 ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X5: LDA #$0A ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X6: LDA #$0C ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X7: LDA #$0E ; |
STORE_03: STA $03 ; |
BRA START_SUB ; |
SUB_OFF_SCREEN_X0: STZ $03 ; /

START_SUB: JSR SUB_IS_OFF_SCREEN ; \ if sprite is not off screen, return
BEQ RETURN_35 ; /
LDA $5B ; \ goto VERTICAL_LEVEL if vertical level
AND #$01 ; |
BNE VERTICAL_LEVEL ; /
LDA $D8,x ; \
CLC ; |
ADC #$50 ; | if the sprite has gone off the bottom of the level...
LDA $14D4,x ; | (if adding 0x50 to the sprite y position would make the high byte >= 2)
ADC #$00 ; |
CMP #$02 ; |
BPL ERASE_SPRITE ; / ...erase the sprite
LDA $167A,x ; \ if "process offscreen" flag is set, return
AND #$04 ; |
BNE RETURN_35 ; /
LDA $13 ;A:8A00 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdiZcHC:0756 VC:176 00 FL:205
AND #$01 ;A:8A01 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizcHC:0780 VC:176 00 FL:205
ORA $03 ;A:8A01 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizcHC:0796 VC:176 00 FL:205
STA $01 ;A:8A01 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizcHC:0820 VC:176 00 FL:205
TAY ;A:8A01 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizcHC:0844 VC:176 00 FL:205
LDA $1A ;A:8A01 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizcHC:0858 VC:176 00 FL:205
CLC ;A:8A00 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdiZcHC:0882 VC:176 00 FL:205
ADC SPR_T14,y ;A:8A00 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdiZcHC:0896 VC:176 00 FL:205
ROL $00 ;A:8AC0 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:eNvMXdizcHC:0928 VC:176 00 FL:205
CMP $E4,x ;A:8AC0 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:eNvMXdizCHC:0966 VC:176 00 FL:205
PHP ;A:8AC0 X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizCHC:0996 VC:176 00 FL:205
LDA $1B ;A:8AC0 X:0009 Y:0001 D:0000 DB:01 S:01F0 P:envMXdizCHC:1018 VC:176 00 FL:205
LSR $00 ;A:8A00 X:0009 Y:0001 D:0000 DB:01 S:01F0 P:envMXdiZCHC:1042 VC:176 00 FL:205
ADC SPR_T15,y ;A:8A00 X:0009 Y:0001 D:0000 DB:01 S:01F0 P:envMXdizcHC:1080 VC:176 00 FL:205
PLP ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F0 P:eNvMXdizcHC:1112 VC:176 00 FL:205
SBC $14E0,x ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizCHC:1140 VC:176 00 FL:205
STA $00 ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F1 P:eNvMXdizCHC:1172 VC:176 00 FL:205
LSR $01 ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F1 P:eNvMXdizCHC:1196 VC:176 00 FL:205
BCC SPR_L31 ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdiZCHC:1234 VC:176 00 FL:205
EOR #$80 ;A:8AFF X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdiZCHC:1250 VC:176 00 FL:205
STA $00 ;A:8A7F X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizCHC:1266 VC:176 00 FL:205
SPR_L31: LDA $00 ;A:8A7F X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizCHC:1290 VC:176 00 FL:205
BPL RETURN_35 ;A:8A7F X:0009 Y:0001 D:0000 DB:01 S:01F1 P:envMXdizCHC:1314 VC:176 00 FL:205
ERASE_SPRITE: LDA $14C8,x ; \ if sprite status < 8, permanently erase sprite
CMP #$08 ; |
BCC KILL_SPRITE ; /
LDY $161A,x ;A:FF08 X:0007 Y:0001 D:0000 DB:01 S:01F3 P:envMXdiZCHC:1108 VC:059 00 FL:2878
CPY #$FF ;A:FF08 X:0007 Y:0000 D:0000 DB:01 S:01F3 P:envMXdiZCHC:1140 VC:059 00 FL:2878
BEQ KILL_SPRITE ;A:FF08 X:0007 Y:0000 D:0000 DB:01 S:01F3 P:envMXdizcHC:1156 VC:059 00 FL:2878
LDA #$00 ;A:FF08 X:0007 Y:0000 D:0000 DB:01 S:01F3 P:envMXdizcHC:1172 VC:059 00 FL:2878
STA $1938,y ;A:FF00 X:0007 Y:0000 D:0000 DB:01 S:01F3 P:envMXdiZcHC:1188 VC:059 00 FL:2878
KILL_SPRITE: STZ $14C8,x ; erase sprite
RETURN_35: RTS ; return

VERTICAL_LEVEL: LDA $167A,x ; \ if "process offscreen" flag is set, return
AND #$04 ; |
BNE RETURN_35 ; /
LDA $13 ; \
LSR A ; |
BCS RETURN_35 ; /
LDA $E4,x ; \
CMP #$00 ; | if the sprite has gone off the side of the level...
LDA $14E0,x ; |
SBC #$00 ; |
CMP #$02 ; |
BCS ERASE_SPRITE ; / ...erase the sprite
LDA $13 ;A:0000 X:0009 Y:00E4 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:1218 VC:250 00 FL:5379
LSR A ;A:0016 X:0009 Y:00E4 D:0000 DB:01 S:01F3 P:envMXdizcHC:1242 VC:250 00 FL:5379
AND #$01 ;A:000B X:0009 Y:00E4 D:0000 DB:01 S:01F3 P:envMXdizcHC:1256 VC:250 00 FL:5379
STA $01 ;A:0001 X:0009 Y:00E4 D:0000 DB:01 S:01F3 P:envMXdizcHC:1272 VC:250 00 FL:5379
TAY ;A:0001 X:0009 Y:00E4 D:0000 DB:01 S:01F3 P:envMXdizcHC:1296 VC:250 00 FL:5379
LDA $1C ;A:001A X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0052 VC:251 00 FL:5379
CLC ;A:00BD X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0076 VC:251 00 FL:5379
ADC SPR_T12,y ;A:00BD X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0090 VC:251 00 FL:5379
ROL $00 ;A:006D X:0009 Y:0001 D:0000 DB:01 S:01F3 P:enVMXdizCHC:0122 VC:251 00 FL:5379
CMP $D8,x ;A:006D X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNVMXdizcHC:0160 VC:251 00 FL:5379
PHP ;A:006D X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNVMXdizcHC:0190 VC:251 00 FL:5379
LDA $001D ;A:006D X:0009 Y:0001 D:0000 DB:01 S:01F2 P:eNVMXdizcHC:0212 VC:251 00 FL:5379
LSR $00 ;A:0000 X:0009 Y:0001 D:0000 DB:01 S:01F2 P:enVMXdiZcHC:0244 VC:251 00 FL:5379
ADC SPR_T13,y ;A:0000 X:0009 Y:0001 D:0000 DB:01 S:01F2 P:enVMXdizCHC:0282 VC:251 00 FL:5379
PLP ;A:0000 X:0009 Y:0001 D:0000 DB:01 S:01F2 P:envMXdiZCHC:0314 VC:251 00 FL:5379
SBC $14D4,x ;A:0000 X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNVMXdizcHC:0342 VC:251 00 FL:5379
STA $00 ;A:00FF X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0374 VC:251 00 FL:5379
LDY $01 ;A:00FF X:0009 Y:0001 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0398 VC:251 00 FL:5379
BEQ SPR_L38 ;A:00FF X:0009 Y:0001 D:0000 DB:01 S:01F3 P:envMXdizcHC:0422 VC:251 00 FL:5379
EOR #$80 ;A:00FF X:0009 Y:0001 D:0000 DB:01 S:01F3 P:envMXdizcHC:0438 VC:251 00 FL:5379
STA $00 ;A:007F X:0009 Y:0001 D:0000 DB:01 S:01F3 P:envMXdizcHC:0454 VC:251 00 FL:5379
SPR_L38: LDA $00 ;A:007F X:0009 Y:0001 D:0000 DB:01 S:01F3 P:envMXdizcHC:0478 VC:251 00 FL:5379
BPL RETURN_35 ;A:007F X:0009 Y:0001 D:0000 DB:01 S:01F3 P:envMXdizcHC:0502 VC:251 00 FL:5379
BMI ERASE_SPRITE ;A:8AFF X:0002 Y:0000 D:0000 DB:01 S:01F3 P:eNvMXdizcHC:0704 VC:184 00 FL:5490

SUB_IS_OFF_SCREEN: LDA $15A0,x ; \ if sprite is on screen, accumulator = 0
ORA $186C,x ; |
RTS ; / return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B817 - horizontal mario/sprite check - shared
; Y = 1 if mario left of sprite??
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B817

SUB_HORZ_POS: LDY #$00 ;A:25D0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1020 VC:097 00 FL:31642
LDA $94 ;A:25D0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZCHC:1036 VC:097 00 FL:31642
SEC ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1060 VC:097 00 FL:31642
SBC $E4,x ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1074 VC:097 00 FL:31642
STA $0F ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1104 VC:097 00 FL:31642
LDA $95 ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1128 VC:097 00 FL:31642
SBC $14E0,x ;A:2500 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZcHC:1152 VC:097 00 FL:31642
BPL LABEL16 ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1184 VC:097 00 FL:31642
INY ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1200 VC:097 00 FL:31642
LABEL16: RTS ;A:25FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:1214 VC:097 00 FL:31642
#
geschrieben am 08.11.2010 16:54:31
( Link )
Code

LDA #$FF ; \ set normal exit
STA $1493 ; /
LDA #$0B ; \ change music 0C for regular end, 0B for boss end
STA $1DFB ; /
STA $0DDA ; set music
DEC $13C6 ; prevent the player from walking


entfernen.
geschrieben am 08.11.2010 17:06:09
( Link )
hab ich entfernt. das ziel wird auch nicht mehr ausgelöst ;P aber ich hab den Blargg jetzt in einem raum mit dem teleporter sprite (also der dich teleportiert wenn alle sprites weg sind) in einen raum getan , wenn blargg tot ist , dann chillt mario in der luft und der teleporter wirkt nich :l
#
geschrieben am 08.11.2010 17:12:01
( Link )
Dann entferne den Teleporter-Sprite und ersetze

Code

LDA #$FF ; \ set normal exit
STA $1493 ; /
LDA #$0B ; \ change music 0C for regular end, 0B for boss end
STA $1DFB ; /
STA $0DDA ; set music
DEC $13C6 ; prevent the player from walking


durch

Code

LDA #$06
STA $71
STZ $88
STZ $89
geschrieben am 08.11.2010 17:17:23
( Link )
Klappt einwandfrei Danke
#