-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor clean up, Improve tileset palette assignments #19
Conversation
JustRegularLuna
commented
Jan 30, 2024
•
edited
Loading
edited
- This stops Polished Map from breaking colors, since Polished Map automatically trims any "unnecessary" tilepal entries from the end of the file when saving your changes.
- Switched tileset palette sets and tilepal files to both be read from a pointer table, removing the need to INCLUDE them multiple times.
- Uses a constant for the number of tiles in a tileset, to make things easier if a person decides to expand tilesets.
- Fixes a hardcoded bank ID in oak_speech2.asm.
- Adds some missing asserts in easy-to-miss tables from the color code.
- This saves space by not having to include the same file 2 or 3 tiles for duplicate tilesetes. - This also saves space by not requiring each .asm file to be padded out to the same size for smaller tilesets. - This stops Polished Map from breaking colors, since it automatically trims any "unnecessary" tilepal entries from the end of the file when saving your changes. - Uses a constant to make things easier if a person decides to expand tilesets.
Actually hold off on merging this. My edited code only does $FF tiles and the original did $100. I'll fix that up tomorrow and update the PR. |
Ok, should be good now. |
There were a lot more duplicate Palette Sets than tilepal assignments, so I made those use a pointer table as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long. Hopefully I didn't count wrong on any of the tilepal comments.
; $60 bytes for each tileset. Each byte is the palette number for a tile. | ||
; Remaining $a0 tiles aren't part of the tileset and are set to 7 (text palette). | ||
; One byte for each tile in the tileset | ||
; Remaining tiles are set to 7 (text palette). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is a little bit ambiguous now. There are still only exactly $a0 tiles that are set to the text palette. And for tilesets which use fewer than $60 tiles, there is also now an uninitialized section between the tileset palettes and the $a0 text palettes, which is OK but not the impression that this comment gives.
@@ -110,47 +103,7 @@ MapPaletteSets: | |||
db INDOOR_LIGHT_BLUE | |||
db ALT_TEXTBOX_PAL ; Uses variant of textbox palette for skeleton pokemon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment now only applies to MuseumPalSet
and not GatePalSet
.
db INDOOR_YELLOW | ||
db INDOOR_BROWN | ||
db INDOOR_LIGHT_BLUE | ||
db ALT_TEXTBOX_PAL ; Uses variant of textbox palette for Articuno binoculars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gate's reason is Articuno)
@@ -3,6 +3,8 @@ INCLUDE "color/data/map_palette_sets.asm" | |||
INCLUDE "color/data/map_palette_assignments.asm" | |||
INCLUDE "color/data/roofpalettes.asm" | |||
|
|||
DEF TILESET_SIZE EQU $60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's MAP_TILESET_SIZE
but it's in engine/overworld/movement.asm oddly enough, and not a constants file.
It would be nice in pokered to move it to a constants file and then just use that constant here. But this is good until that happens.
The "one extra" entries in some tilesets was again because of polished map. Since it works off the gen 2 assumption that palettes are nybbles so it is trimming to an even number of tilepal entries |
Hm, okay, that's not a big deal then. Thanks. |
No problem. I'll double check if there's a way around that, maybe loading it with the priority tiles setting in polished map or something (pretty sure that setting is unintentionally supported by pokered-gbc anyway). |
Thanks :-) |