You wouldn't call that routine, as that routine is meant to be called from the sprite's side. The Thwomp already calls that on its own, though, so you don't have to add that part.
Instead, inside the block, find the "Sprite" label; that label is run whenever a sprite is interacting with the block, with the index of that sprite in X. So you can check the sprite's ID in
$9E for if it's a Thwomp, and, if so, call the block's routine for activating the switch (PSwitchMain). A code to do that would look like this:
CodeSprite:
if !SpritePassable
LDY #$00
LDA #$25
STA $1693|!addr
endif
LDA !9E,x
CMP #$26 ; the ID of the Thwomp
BEQ PSwitchMain
Return:
RTL
That said, it is worth noting that though the Thwomp spans two tiles horizontally, it only by-default interacts with the tile on its left side. So make sure you put the P-Switch block there (or use
this patch to fix it).
Professional frame-by-frame time wizard.
YouTube -
Twitter -
SMW Glitch List -
SMW Randomizer