diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-03 19:58:02 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-03 19:58:02 -0400 |
| commit | 268ae8bf201e46449079f5f419de5cc24288fed9 (patch) | |
| tree | 7ae8252d050aa6e569530b9af15d37a0531da347 | |
| parent | 57843d454fef2296c9f5699f1ccc89fb6789d701 (diff) | |
Spoiler
| -rw-r--r-- | Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md b/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md index b21aed2..551ab6d 100644 --- a/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md +++ b/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md @@ -1,6 +1,6 @@ Maps in pokecrystal are designed with blocks, not tiles, where each block (aka "metatile") is a 4x4 square of tiles. Each 8x8-pixel tile always has the same appearance in every block. But the GameBoy hardware is capable of more. The same tile graphic can be reused with different attributes—not just color, but X and Y flip, as well as "priority" to appear above sprites. -This tutorial will show you how to create and use **\*_attributes.bin** files, which assign attributes to the individual tiles of each block. +This tutorial will show you how to create and use **\*_attributes.bin** files, which assign attributes to the individual tiles of each block. Spoiler: you'll be able to make maps like [this](screenshots/polished-map-redplusplus-goldenrod-city.png). ## Contents @@ -488,7 +488,7 @@ Anyway, `LoadMapPart` calls `LoadMetatiles` to load certain data from the \*_met This routine copies data from \*_metatiles.bin (pointed to by `[wTilesetBlocksAddress]`) into `wSurroundingTiles`. We've made two small changes to it. -One, [the bug that only allowed 128 blocks](../blob/master/docs/bugs_and_glitches.md#loadmetatiles-wraps-around-past-128-blocks) is fixed, since you'll probably need 256 to take advantage of the full tile attribute system. +One, [the bug that only allowed 128 blocks](../blob/master/docs/bugs_and_glitches.md#loadmetatiles-wraps-around-past-128-blocks) is fixed, since you'll probably need 256 to take advantage of this block attribute system. Two, tile IDs in \*_metatiles.bin have their high bit masked out. That used to be done with `res 7` in `SwapTextboxPalettes` and `ScrollBGMapPalettes`, but we deleted those. @@ -1034,3 +1034,5 @@ The downside to this is that editing attributes will be a pain in the neck. You If your hex editor supports coloring by value, that can make editing a lot easier. For example, here's Hex Workshop (not a free program) using eight background colors for the different tile colors, eight more for flipped tiles, and yellow foreground text for priority tiles: [](screenshots/hex-edit-attributes.png) + +Of course, that's still not as convenient as a map editor that directly supports block attributes, so you can always write one of those and publish it for the community. ;) |
