summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tools/sprite_dumper/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/sprite_dumper/main.cpp b/tools/sprite_dumper/main.cpp index 46599e5..79e3df0 100644 --- a/tools/sprite_dumper/main.cpp +++ b/tools/sprite_dumper/main.cpp
@@ -266,6 +266,7 @@ struct Sprite {
266}; 266};
267 267
268struct SpriteSheet { 268struct SpriteSheet {
269 int spriteindex = 0;
269 int gfxPtr; 270 int gfxPtr;
270 std::vector<Sprite> sprites; 271 std::vector<Sprite> sprites;
271 272
@@ -274,8 +275,8 @@ struct SpriteSheet {
274 int maxHeight = 0; 275 int maxHeight = 0;
275 std::vector<FrameOutput> frames; 276 std::vector<FrameOutput> frames;
276 277
278 const Palette& palette = palettes.GetPalette(spriteindex);
277 for (int i=0; i<sprites.size(); i++) { 279 for (int i=0; i<sprites.size(); i++) {
278 const Palette& palette = palettes.GetPalette(i);
279 FrameOutput f = sprites[i].render(m3, palette, gfxPtr); 280 FrameOutput f = sprites[i].render(m3, palette, gfxPtr);
280 281
281 if (f.width > maxWidth) maxWidth = f.width; 282 if (f.width > maxWidth) maxWidth = f.width;
@@ -324,6 +325,7 @@ public:
324 if (sheetAddr == -1) continue; 325 if (sheetAddr == -1) continue;
325 326
326 SpriteSheet ss; 327 SpriteSheet ss;
328 ss.spriteindex = i;
327 ss.gfxPtr = GetGfxPointer(m3, i); 329 ss.gfxPtr = GetGfxPointer(m3, i);
328 330
329 m3.Seek(sheetAddr); 331 m3.Seek(sheetAddr);