pixels: Change how tilesets are handled #2

Open gen.nyble.dev
Open opened by gen.nyble.dev

So right now we have 4 tilemaps that we use: Background, Sprite1, Sprite2, Overlay. They are tied to their respective use-cases, but should they be?

I believe I did it that way to more accurately mimic the GBA, but that was on assumption on how it worked as I am not entirely sure the tilemaps are directly tied to specific sets.

And it's not like allowing the user to say what tilemap is what lifts any restrictions. It still only allows 256 tiles with the Background and Overlay. I guess, however, a clever user--once I figure out how i want to do line-based rendering (and if)--could change tileset mid-frame.

However, that is Cool and Valid.

I'll allow changing what they do. Probably like this:

  • Ppu::set_layer_ilemap(&self, layer: Layer, tilemap: Tilemap)

Where Tilemap, or maybe TilemapIndex, is an enum that has just four values.

Sign up or Sign in to add to the discussion.