diff --git a/EarthboundBattleBackgrounds/EarthboundBattleBackgrounds/main.cpp b/EarthboundBattleBackgrounds/EarthboundBattleBackgrounds/main.cpp index 3f4b99d..f6b146e 100644 --- a/EarthboundBattleBackgrounds/EarthboundBattleBackgrounds/main.cpp +++ b/EarthboundBattleBackgrounds/EarthboundBattleBackgrounds/main.cpp @@ -237,6 +237,7 @@ struct Rom{ std::vectorarrayGraphicsData; std::vectortiles; byte bpp; + private: void buildTiles(){ int n{int(graphicsData.size())/(8*bpp)}; for(int i{};i0)yOffset+=32; + + Clear(BLACK); + + DrawStringDecal({},std::format("Selected Palette: {}",selectedPalette)); + + if(GetKey(PGUP).bPressed)selectedPalette=std::clamp(int(selectedPalette)-1,0,int(rom.palettes.size()-1)); + if(GetKey(PGDN).bPressed)selectedPalette=std::clamp(int(selectedPalette)+1,0,int(rom.palettes.size()-1));; + Rom::BackgroundPalette&palette{rom.palettes[selectedPalette]}; + for(uint8_t index=0;Pixel&col:palette.colors){ + FillRectDecal(vf2d{index*8.f,8.f+yOffset+9},{8,8},col); + index++; + } + + for(uint8_t row=0;Rom::BackgroundGraphics&graphics:rom.graphics){ + for(uint8_t col=0;Rom::Tile&tile:graphics.tiles){ + for(int x{};x