Language…
17 users online: Abstract, Bensalot,  Carld923, Chondontore, Cote de Boeuf, DasFueller, Green Jerry, GrenudoGames, HeitorPorfirio2006, Link13,  MarioFanGamer, RZRider, Saela, Supermanbart, underway, Yoshi Master, Zavok - Guests: 91 - Bots: 114
Users: 57,134 (2,268 active)
Latest user: Noslgiagamesofc

Independent Teleport Blocks v1.1

SMW Blocks → Independent Teleport Blocks v1.1

Submission Details

Name: Independent Teleport Blocks v1.1
Author: MolSno
Added:
Act As: 25
Includes GFX: No
Description: These blocks will teleport Mario to a specified secondary entrance, independent of any screen exits within the level. Exits are defined in a table within the block itself, so only one copy of each block needs to be inserted.

There are two variants included: a regular block and a door block. Additionally, a patch which stores the current level number to $010B, which is necessary for these blocks to function, is included in case the user hasn't inserted any other patches with that functionality.

This version contains a bugfix that enables functionality for large warp tables.
Tags: door lorom teleport warp
Comments: 4 (jump to comments)
Rating:
4.5 (4 ratings)
No rating
Download 3.44 KiB | 527 downloads

Comments (4)

SJandCharlieTheCat Link
Just a little note for those who might get tripped up:

When it describes how to input the x-coordinate of the block ($xxxx), it kinda gives a non-useful example: $0100, if the block is on the very first ($xx00) tile of screen 01.

To take a better example, if the block is on the fourth tile of screen 01, it should be $0130 (with this third tile/coordinate represented by $xx30) — not $0103, for example. Similarly, if it's on the sixth tile of screen 03, it'd be $0350, not $0305.
TheBiob Link
Originally posted by underway
Seem to not work with bigger secondary exit numbers (i.e. 14FF), chose a lower number and it worked.


The reason for this is that in order for LM to not break existing resources and probably it's own code as well it had to use the unused bits to fit the secondary exit number and couldn't rearrange the bits.

This means bits 9-12 of the secondary exit number had to be moved to the unused bits 13-16 which gives you 0xA0FF for the 0x14FF secondary entrance.

And just because why not, here's a quick function that should put the real number into the format LM expects:
Untested™
Code
function secondary_exit(num) = num&0x1FF|((num&0x1E00)<<3)


so
Code
LDA #secondary_exit($14FF)

should turn into
Code
LDA #$A0FF

automatically
 underway Link
Seem to not work with bigger secondary exit numbers (i.e. 14FF), chose a lower number and it worked.
Raggy Link
So I tried using these, and I THINK I'm following for directions right, but... it's taking me to level 0 anyway.

GPS changes 010B to 610B, so I sa-1 converted your patch as well, but it is STILL not working right...