Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - How do the block tool offsets work? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 225/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 03-21-05 05:15 AM Link | Quote
Hey!

I was wondering how someone would be able to figure out all of the offsets needed for a block? I looked at the different blocks that came with it, and they all have so many different offsets. I am going to be making some complicated blocks (with subroutines and that), so I will need to know that kind of stuff.
Escherial

Shyguy
Level: 17

Posts: 84/90
EXP: 20866
For next: 3877

Since: 03-15-04
From: Pasadena, CA

Since last post: 202 days
Last activity: 38 days
Posted on 03-21-05 09:09 AM Link | Quote
The non-reloc offsets tell the block inserter code where to jump to in your code when the event they correspond to occurs. I.e. the "sprite interaction" offset would specify the "line" to jump to in your code when a sprite collides with your custom block -- the standard practice of giving 0 as the offset means that the block inserter code should jump to the first "line" of your code (-1 means that your block does not support that action and not to jump to your block code at all). This is useful if you want your block to react in different ways to different events -- i.e. you could have a block that would hurt Mario if he touched it, but break when hit by a fireball or a shell.

The Reloc Offsets simply list jump locations in your code, so that block inserter can fix them to point to the right places when your code is put into some place in the ROM. In other words, your code assumes that position 0 is the start of your code and all offsets in your code are relative to that -- when your code is implanted into a larger codebase (the ROM, namely), those offsets must be shifted upwards or they'll point to places at the beginning of the ROM and not your code in specific.

I hope that makes sense
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 236/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 03-21-05 09:14 AM Link | Quote
OK. Thanks. That means I have coded my blocks way wierd, because the only offsets that work in the three-line code are 1 and 3.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - How do the block tool offsets work? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.011 seconds.