aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/cge.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-05 21:39:14 +1000
committerPaul Gilbert2011-07-05 21:39:14 +1000
commitc676f88da02f56a8b7caecb83bcf9e1a9f7e663c (patch)
tree12af9072709be8a847479d40c7a0580ef670db7a /engines/cge/cge.cpp
parent24fa551a71453dd712b5cb0223b2ff85026a2894 (diff)
downloadscummvm-rg350-c676f88da02f56a8b7caecb83bcf9e1a9f7e663c.tar.gz
scummvm-rg350-c676f88da02f56a8b7caecb83bcf9e1a9f7e663c.tar.bz2
scummvm-rg350-c676f88da02f56a8b7caecb83bcf9e1a9f7e663c.zip
CGE: Rearrange engine setup so sprite arrays are setup before they're needed
Diffstat (limited to 'engines/cge/cge.cpp')
-rw-r--r--engines/cge/cge.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index df40db55e6..eee359b74c 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -69,21 +69,7 @@ void CGEEngine::setup() {
Bitmap::init();
Talk::init();
- // Initialise engine objects
- _text = new Text(this, progName(), 128);
- _vga = new Vga(M13H);
- _heart = new Heart;
- _sys = new System(this);
- _pocLight = new Sprite(this, LI);
- for (int i = 0; i < POCKET_NX; i++)
- _pocket[i] = new Sprite(this, NULL);
- _sprite = new Sprite(this, NULL);
- _miniCave = new Sprite(this, NULL);
- _shadow = new Sprite(this, NULL);
- _horzLine = new Sprite(this, HL);
- _infoLine = new InfoLine(this, INFO_W);
- _cavLight = new Sprite(this, PR);
- _debugLine = new InfoLine(this, SCR_WID);
+ // Initialise sprite arrays used by game objects
MB[0] = new Bitmap("BRICK", true);
MB[1] = NULL;
HL[0] = new Bitmap("HLINE", true);
@@ -101,6 +87,22 @@ void CGEEngine::setup() {
LI[2] = new Bitmap("LITE2", true);
LI[3] = new Bitmap("LITE3", true);
LI[4] = NULL;
+
+ // Initialise engine objects
+ _text = new Text(this, progName(), 128);
+ _vga = new Vga(M13H);
+ _heart = new Heart;
+ _sys = new System(this);
+ _pocLight = new Sprite(this, LI);
+ for (int i = 0; i < POCKET_NX; i++)
+ _pocket[i] = new Sprite(this, NULL);
+ _sprite = new Sprite(this, NULL);
+ _miniCave = new Sprite(this, NULL);
+ _shadow = new Sprite(this, NULL);
+ _horzLine = new Sprite(this, HL);
+ _infoLine = new InfoLine(this, INFO_W);
+ _cavLight = new Sprite(this, PR);
+ _debugLine = new InfoLine(this, SCR_WID);
_snail = new Snail(this, false);
_snail_ = new Snail(this, true);