db $42 JMP MarioAbove : JMP MarioBelow : JMP MarioSides : JMP SpriteX : JMP SpriteY : JMP MarioCape : JMP MarioFireball JMP Corners : JMP BodyIn : JMP HeadIn ;;;;;;; ACT AS TILE 25 OR TILE 130! ;;;;;;;;;;;; BodyIn: ; If Mario's body is in the block...(only works with db $42) MarioAbove: ; If Mario is on top of the block... MarioBelow: ; If Mario is at the bottom of the block... MarioSides: ; If Mario hits either side of the block... Corners: ; What do the corners do? (only works with db $42) HeadIn: ; If Mario's head is in the block... (only works with db $42) ; Sorry that I could never get a regular block to work (Since SMW just won't let you take items through doors) and I ; wasn't able to find a Subroutine to JSL to that made it act as a pipe exit. So instead, I created this: Three pipe ; tiles that will act as actual pipes if you are carrying an item. You might want to use like ExGFX or something to ; tell the player that the pipe is exit-enabled when carrying an item. I have three blocks in this one file, meaning ; that you just need to check one (literally this time) of which part of the pipe it is, copy the file, and then ; uncheck that, and check another. OR, you can get away with editing this file alone and then inserting it again with ; BTSD and MAKE SURE NOT TO REINSERT THE BLOCKS or else they will all act as one thing. But yeah, I save you some time ; by using only one ASM file so you only have to insert one file three times, leaving you 39 other BTSD slots available ; (There are 40). Enough bickering; let's get to the code. ; Ignore me LDY #$01 LDA #$30 STA $1693 LDA $1470 ;NOTE: IF YOU WANT TO ENTER THE PIPE NO MATTER WHAT (Which would be pointless) REMOVE BEQ Return ;THESE TWO LINES ; Ignore me ;============================================================= ;Which pipe is it? ;============================================================= ;If pipe is on, write in _CHECK. If off, write in _UNCHECK JSL HORIZONTAL ;If on, write JSL HORIZONTAL_CHECK, or ON1, if off, HORIZONTAL_UNCHECK, or OFF1 JSL VERTICAL_RIGHT ;If on, write JSL VERTICAL_RIGHT_CHECK, or ON2, if off, VERTICAL_RIGHT_UNCHECK, or OFF2 JSL VERTICAL_LEFT ;If on, write JSL VERTICAL_LEFT_CHECK, or ON3, if off, VERTICAL_LEFT_UNCHECK, or OFF3 RTL ;============================================================= ;End of jump codes ;============================================================= Return: SpriteX: ; If a sprite hits it from the left or right... SpriteY: ; If a sprite hits it from the bottom or top... MarioCape: ; If Mario's cape hits it... MarioFireball: ; If a fireball hits it... LDY #$01 LDA #$30 STA $1693 RTL ;============================================================= ;Defines: ;============================================================= HORIZONTAL_CHECK: ;This is the bottom-most part of an exit-enabled horizontal pipe, ON ON1: LDA #$3F STA $1693 LDY #$01 HORIZONTAL_UNCHECK: ;This is the bottom-most part of an exit-enabled horizontal pipe, OFF OFF1: RTL VERTICAL_RIGHT_CHECK: ;This is the left side of an exit-enabled vertical pipe, ON ON2: LDA #$38 STA $1693 LDY #$01 VERTICAL_RIGHT_UNCHECK: ;This is the left side of an exit-enabled vertical pipe, OFF OFF2: RTL VERTICAL_LEFT_CHECK: ;This is the right side of an exit-enabled vertical pipe, ON ON3: LDA #$37 STA $1693 LDY #$01 VERTICAL_LEFT_UNCHECK: ;This is the right side of an exit-enabled vertical pipe, OFF OFF3: RTL