summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tools/sprite_dumper/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/sprite_dumper/main.cpp b/tools/sprite_dumper/main.cpp index c87f544..46599e5 100644 --- a/tools/sprite_dumper/main.cpp +++ b/tools/sprite_dumper/main.cpp
@@ -358,12 +358,12 @@ public:
358 ss.sprites.push_back(std::move(sprite)); 358 ss.sprites.push_back(std::move(sprite));
359 } 359 }
360 360
361 spritesheets_.push_back(std::move(ss)); 361 spritesheets_[i] = std::move(ss);
362 if (i == 1) return; 362 if (i == 2) return;
363 } 363 }
364 } 364 }
365 365
366 const std::vector<SpriteSheet>& SpriteSheets() const { return spritesheets_; } 366 const std::map<int, SpriteSheet>& SpriteSheets() const { return spritesheets_; }
367 367
368private: 368private:
369 369
@@ -379,7 +379,7 @@ private:
379 379
380 int baseAddr_; 380 int baseAddr_;
381 int gfxAddr_; 381 int gfxAddr_;
382 std::vector<SpriteSheet> spritesheets_; 382 std::map<int, SpriteSheet> spritesheets_;
383}; 383};
384 384
385int main(int argc, char** argv) { 385int main(int argc, char** argv) {
@@ -394,7 +394,7 @@ int main(int argc, char** argv) {
394 PaletteSet palettes(m3); 394 PaletteSet palettes(m3);
395 //const int banks[] = {0x1A442A4, 0x1AE0638, 0x1AEE4C4, 0x1AF1ED0}; 395 //const int banks[] = {0x1A442A4, 0x1AE0638, 0x1AEE4C4, 0x1AF1ED0};
396 Bank b1(m3, 0x1A442A4, 0x14383E4); 396 Bank b1(m3, 0x1A442A4, 0x14383E4);
397 Magick::Image im = b1.SpriteSheets()[1].render(m3, palettes); 397 Magick::Image im = b1.SpriteSheets().at(1).render(m3, palettes);
398 im.magick("png"); 398 im.magick("png");
399 im.write("out.png"); 399 im.write("out.png");
400 400