Pages: 1
Posted on 09-13-11, 01:12 pm
Buster Beetle


Karma: 379
Posts: 264/464
Since: 06-29-11
Can these be added to the new revisions? I would think maybe a half brick image/half switch. Is this possible?
Posted on 09-13-11, 08:21 pm
Fuzzy
Full mod

Karma: 1183
Posts: 185/785
Since: 06-28-11
I was going to add these a while ago, but I of course wanted the brick to be displayed with the correct palette, and I couldn't figure out a way to get those graphics through the sprite class.
Maybe Dirbaio has an idea of how this could be done.
Posted on 09-14-11, 04:43 pm (rev. 2 by ImageBot on 11-21-16, 02:08 am)


Karma: 3752
Posts: 400/2112
Since: 06-28-11
You could make the editor check the Bottom BG ID.
Then it should check the Overlay files at the corresponding (depends on the ROM region) offset. (You can watch THIS thread for more info)

It could be done this disgusting way, but I think it is one of the only ones.
Posted on 09-14-11, 08:17 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 858/4457
Since: 06-08-11
Way easier to do that. The editor already has support for that, so you can use the already loaded NSMBTileset class for tileset 0.

First, it looks like there's no way to access tilesets from the sprite class so you can do the following:

-Add a field "NSMBGraphics GFX" to NSMBLevel.
-Save there the NSMBGraphics passed to NSMBLevel's constructoril

Then from the sprite you can use Level.GFX.Tilesets[0].Map16Graphics.

That's a Bitmap holding ALL the map16 tiles for Tileset 0. You'll have to only draw the required tile. Just give the correct parameters to DrawImage. See NSMBObject.render() for an example on how to do that

This way you'll get the correct palette for the level AND if the user edits Tileset 0, the edited graphics will be displayed. That's perfect
Posted on 09-14-11, 08:48 pm
Fuzzy
Full mod

Karma: 1183
Posts: 187/785
Since: 06-28-11
Thanks! It's added in r253.
Pages: 1