aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-06-02 14:37:41 +0200
committeruruk2014-06-02 14:37:41 +0200
commit21513b448fe7061ffa0c0ed92465386ffacfb3b6 (patch)
tree4a6ac54d6d0e9b6991a872880695ec3e6b92589e /engines
parent0e62716038ec5ba108cbc272b1b06b49a608b11b (diff)
downloadscummvm-rg350-21513b448fe7061ffa0c0ed92465386ffacfb3b6.tar.gz
scummvm-rg350-21513b448fe7061ffa0c0ed92465386ffacfb3b6.tar.bz2
scummvm-rg350-21513b448fe7061ffa0c0ed92465386ffacfb3b6.zip
CGE2: Partially implement and use loadGame().
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/cge2.h1
-rw-r--r--engines/cge2/cge2_main.cpp41
2 files changed, 42 insertions, 0 deletions
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 925cb67f50..b51ae2750d 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -112,6 +112,7 @@ public:
void inf(const char *text, bool wideSpace = false);
void movie(const char *ext);
void runGame();
+ void loadGame();
void loadScript(const char *fname);
void loadSprite(const char *fname, int ref, int scene, V3D &pos);
void badLab(const char *fn);
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 532836186c..78d743596b 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -561,9 +561,50 @@ void CGE2Engine::loadUser() {
warning("STUB: CGE2Engine::loadUser()");
// Missing loading from file. TODO: Implement it with the saving/loading!
loadScript("CGE.INI");
+ loadGame();
loadPos();
}
+void CGE2Engine::loadGame() {
+ warning("STUB: CGE2Engine::loadGame()");
+
+ // load sprites & pocket
+
+ Sprite *s;
+ Hero *h;
+
+ // initialize Andzia
+ s = _spare->take(142);
+ if (s) {
+ h = new Hero(this);
+ *(Sprite*)h = *s;
+ delete s;
+ h->expand();
+ _spare->update(h);
+ }
+ _heroTab[0]->_ptr = h;
+ s = _spare->take(152);
+ _vga->_showQ->insert(s);
+ _heroTab[0]->_face = s;
+
+ // initialize Wacek
+ s = _spare->take(141);
+ if (s) {
+ h = new Hero(this);
+ *(Sprite*)h = *s;
+ delete s;
+ h->expand();
+ _spare->update(h);
+ }
+ _heroTab[1]->_ptr = h;
+ s = _spare->take(151);
+ _vga->_showQ->insert(s);
+ _heroTab[1]->_face = s;
+
+ //--- start!
+ switchHero(_sex);
+}
+
void CGE2Engine::loadPos() {
if (_resman->exist("CGE.HXY")) {
for (int cav = 0; cav < kCaveMax; cav++)