One day delayed, but hopefully that won't be too much of a setback. The battle system is slowly coming together, all the data structures are in place now and testing the graphics loaders has begun. First run with the new code doesn't look so hot but it's a proof of concept:
Screenshot taken in mednafen, the emulator of choice for serious PCE developers.
Anyways, this verifies correct BAT and palette inclusion for the background, plus correct tile graphics offset. It also shows that further optimization is required for the backgrounds to reduce palette usage, as this one appears to be using all 16, which is a no-no since the font requires its own palette.
More updates later, time to dive back into the code.
EDIT: The prior problem was an overlay offset problem, it was reading 4096 bytes too deep into the overlay. Here's the image fixed, with the font coexisting nicely with the background:
In order to fit the font in, I moved the colors of the font to the top of the palette, then reorganized the background images to use as few colors as possible in palette 0xF, and finally, set the colors for the font manually using set_color() rather than load_palette(). My PCEpal app came in handy here.
EDIT2: Battle link is now complete, but the enemies don't show up just yet. Anyways, an early shot of the new battle system prototype working correctly:
Time for a rest...this stuff's pretty mentally draining.