battle::Resources battleRes;
- SDL_Surface *swapCursorImg(IMG_Load("test-data/swap-cursor.png"));
- Sprite swapCursorSprite(swapCursorImg, 32, 32);
- battleRes.swapCursor = &swapCursorSprite;
- SDL_Surface *attackIconsImg(IMG_Load("test-data/attack-type-icons.png"));
- Sprite attackIconsSprite(attackIconsImg, 32, 32);
- battleRes.attackIcons = &attackIconsSprite;
- SDL_Surface *attackChoiceIconsImg(IMG_Load("test-data/attack-choice-icons.png"));
- Sprite attackChoiceIconsSprite(attackChoiceIconsImg, 16, 16);
- battleRes.attackChoiceIcons = &attackChoiceIconsSprite;
- SDL_Surface *moveIconsImg(IMG_Load("test-data/move-icons.png"));
- Sprite moveIconsSprite(moveIconsImg, 32, 32);
- battleRes.moveIcons = &moveIconsSprite;
+ battleRes.swapCursor = intp.GetSprite("swapCursor");
+ battleRes.attackIcons = intp.GetSprite("attackIcons");
+ battleRes.attackChoiceIcons = intp.GetSprite("attackChoiceIcons");
+ battleRes.moveIcons = intp.GetSprite("moveIcons");
SDL_Surface *titleFrameImg(IMG_Load("test-data/title-frame.png"));
Frame titleFrame(titleFrameImg, 16, 16);
Font largeFont(&largeFontSprite, 0, -2);
battleRes.titleFont = &largeFont;
- ComplexAnimation numberAnimationPrototype(0, framerate);
- numberAnimationPrototype.AddFrame(0, 0);
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -26));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -42));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -48));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -42));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -26));
- numberAnimationPrototype.AddFrame(0, 0);
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -12));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -20));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -24));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -20));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -12));
- numberAnimationPrototype.AddFrame(0, 0);
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -6));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -10));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -12));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -10));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -6));
- numberAnimationPrototype.AddFrames(0, 0, Vector<int>(), 14);
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -36));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -32));
- numberAnimationPrototype.AddFrame(0, 0, Vector<int>(0, -18));
- battleRes.numberAnimationPrototype = &numberAnimationPrototype;
-
- SDL_Surface *bigNumbersImg(IMG_Load("test-data/big-numbers.png"));
- Sprite bigNumbersSprite(bigNumbersImg, 16, 32);
- battleRes.bigNumberSprite = &bigNumbersSprite;
- SDL_Surface *bigGreenNumbersImg(IMG_Load("test-data/big-green-numbers.png"));
- Sprite bigGreenNumbersSprite(bigGreenNumbersImg, 16, 32);
- battleRes.greenNumberSprite = &bigGreenNumbersSprite;
-
- SDL_Surface *heroTagImg(IMG_Load("test-data/hero-tag-sprites.png"));
- Sprite heroTagSprite(heroTagImg, 32, 16);
- battleRes.heroTagLabels = &heroTagSprite;
+ battleRes.numberAnimationPrototype = intp.GetAnimation("numberAnimationPrototype");
+ battleRes.bigNumberSprite = intp.GetSprite("bigNumbers");
+ battleRes.greenNumberSprite = intp.GetSprite("bigGreenNumbers");
+
+ battleRes.heroTagLabels = intp.GetSprite("heroTagLabels");
battleRes.levelLabelCol = 0;
battleRes.levelLabelRow = 0;
battleRes.healthLabelCol = 0;
framecount: 4
}
}
+
+export Sprite swapCursor {
+ image: "test-data/swap-cursor.png",
+ size: <32,32>
+}
+export Sprite attackIcons {
+ image: "test-data/attack-type-icons.png",
+ size: <32,32>
+}
+export Sprite attackChoiceIcons {
+ image: "test-data/attack-choice-icons.png",
+ size: <16,16>
+}
+export Sprite moveIcons {
+ image: "test-data/move-icons.png",
+ size: <32,32>
+}
+
+export ComplexAnimation numberAnimationPrototype {
+ frametime: frameTime,
+ repeat: false,
+ frames: [
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-26> },
+ { column: 0, row: 0, disposition: < 0,-42> },
+ { column: 0, row: 0, disposition: < 0,-48> },
+ { column: 0, row: 0, disposition: < 0,-42> },
+ { column: 0, row: 0, disposition: < 0,-26> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0,-20> },
+ { column: 0, row: 0, disposition: < 0,-24> },
+ { column: 0, row: 0, disposition: < 0,-20> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, -6> },
+ { column: 0, row: 0, disposition: < 0,-10> },
+ { column: 0, row: 0, disposition: < 0,-12> },
+ { column: 0, row: 0, disposition: < 0,-10> },
+ { column: 0, row: 0, disposition: < 0, -6> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0, 0> },
+ { column: 0, row: 0, disposition: < 0,-36> },
+ { column: 0, row: 0, disposition: < 0,-32> },
+ { column: 0, row: 0, disposition: < 0,-18> }
+ ]
+}
+export Sprite bigNumbers {
+ image: "test-data/big-numbers.png",
+ size: <16,32>
+}
+export Sprite bigGreenNumbers {
+ image: "test-data/big-green-numbers.png",
+ size: <16,32>
+}
+
+export Sprite heroTagLabels {
+ image: "test-data/hero-tag-sprites.png",
+ size: <32,16>
+}