Views: 992,611,018
7 users online:  Anorakun, Infinity, IronFoxGaming, KaidenThelens, LouisDoucet, RenanSV, ShadowBoxer_Sandshrew - Guests: 61 - Bots: 164 Users: 54,445 (2,087 active)
Latest: sdpo123
Tip: A common level trope to avoid is "item babysitting". This involves forcing the player to carry P-Switches, springboards, or other items all around the level. Usually, this doesn't end up being very fun or engaging, so use another level gimmick if you can.
Not logged in.
Object data rendering
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Object data rendering
Pages: « 1 » Link
Back with another basic question - this time I'm trying to understand the object data described on the Level Data wiki page. It looks like some of the objects LM adds (e.g. 22/23) include the Map16 tile number, but the standard objects do not. How does the original game go from the object number to the tiles it should render?

For example in level 0x01, the first object defined is a "long ground ledge" with:
- New screen flag: 0
- Object number: 0x21
- Y position: 24
- X position: 0
- Width: 16

This object is rendered using tile 0x100 - how is that mapping between object 0x21 and tile 0x100 defined?
"Objects" like that are really just a piece code that runs during level load.

When the game loads a level it gets the object number and runs the code associated with that number then goes on to the next. In this case, 0x21 just runs code that places the ledge tiles based on x, y and width. Objects don't even need to place blocks and can instead do things like "set a screen exit". Lunar Magic adds a lot of non-block objects to bypass things.

The pointers for all the objects can be found in the ROM Map here
Makes sense - thanks!

So to close the loop: indexing into the table at 0x0DC19A by 0x20 (instead of 0x21 since object 0x00 is for extended objects) points at 0x0DB1C8, which is the creation code for 0x14 and 0x21.
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Object data rendering

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2022 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks