aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-05-08 14:32:51 +0200
committeruruk2014-05-08 14:32:51 +0200
commitfbb1a8da93a1d4efcf75df3379c3ecaa3235672b (patch)
tree605ed31dd5826885ed169640a710b5ac6d6dd8dc /engines
parent42f3dd6d2b0adf0822066e5e1cf2c83e553094d5 (diff)
downloadscummvm-rg350-fbb1a8da93a1d4efcf75df3379c3ecaa3235672b.tar.gz
scummvm-rg350-fbb1a8da93a1d4efcf75df3379c3ecaa3235672b.tar.bz2
scummvm-rg350-fbb1a8da93a1d4efcf75df3379c3ecaa3235672b.zip
CGE2: Rework loadScript(), start implementation of loadSprite().
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/cge2.h2
-rw-r--r--engines/cge2/cge2_main.cpp25
2 files changed, 20 insertions, 7 deletions
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 01c38fa881..e4426433e4 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -65,7 +65,7 @@ public:
void movie(const char *ext);
void runGame();
void loadScript(const char *fname);
- void loadSprite(const char *fname, int ref, int scene, int col, int row, int pos);
+ void loadSprite(const char *fname, int ref, int scene, V3D &pos);
const ADGameDescription *_gameDescription;
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 4907dd3cd4..f5d694344b 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -30,11 +30,22 @@
#include "cge2/cge2.h"
#include "cge2/vga13h.h"
#include "cge2/text.h"
+#include "cge2/snail.h"
namespace CGE2 {
-void CGE2Engine::loadSprite(const char *fname, int ref, int scene, int col = 0, int row = 0, int pos = 0) {
- warning("STUB: CGE2Engine::loadSprite");
+void CGE2Engine::loadSprite(const char *fname, int ref, int scene, V3D &pos) {
+ char pat[kLineMax];
+ int shpcnt = 0;
+ int seqcnt = 0;
+ int cnt[kActions];
+ int section = idPHASE;
+ bool frnt = true;
+ bool east = false;
+ bool port = false;
+ bool tran = false;
+ warning("STUB: CGE2Engine::loadSprite()");
+
}
void CGE2Engine::loadScript(const char *fname) {
@@ -62,6 +73,8 @@ void CGE2Engine::loadScript(const char *fname) {
ok = false; // not OK if break
+ V3D P;
+
// sprite ident number
if ((p = EncryptedStream::token(tmpStr)) == NULL)
break;
@@ -80,17 +93,17 @@ void CGE2Engine::loadScript(const char *fname) {
// sprite column
if ((p = EncryptedStream::token(nullptr)) == NULL)
break;
- int SpX = EncryptedStream::number(p);
+ P._x = EncryptedStream::number(p);
// sprite row
if ((p = EncryptedStream::token(nullptr)) == NULL)
break;
- int SpY = EncryptedStream::number(p);
+ P._y = EncryptedStream::number(p);
// sprite Z pos
if ((p = EncryptedStream::token(nullptr)) == NULL)
break;
- int SpZ = EncryptedStream::number(p);
+ P._z = EncryptedStream::number(p);
// sprite life
if ((p = EncryptedStream::token(nullptr)) == NULL)
@@ -100,7 +113,7 @@ void CGE2Engine::loadScript(const char *fname) {
ok = true; // no break: OK
_sprite = NULL;
- loadSprite(SpN, SpI, SpA, SpX, SpY, SpZ);
+ loadSprite(SpN, SpI, SpA, P);
if (_sprite) {
warning("STUB: CGE2Engine::loadScript - SPARE:: thing");
if (BkG)