diff options
author | uruk | 2014-05-08 19:23:36 +0200 |
---|---|---|
committer | uruk | 2014-05-08 19:23:36 +0200 |
commit | b674ab2a09bec35b27583d8c463d137ded285e52 (patch) | |
tree | 0640ed98ba4bc2abc314b3c74a92bc0534e873d0 | |
parent | 9ffdff539203cf2774317bd274ae606a47148037 (diff) | |
download | scummvm-rg350-b674ab2a09bec35b27583d8c463d137ded285e52.tar.gz scummvm-rg350-b674ab2a09bec35b27583d8c463d137ded285e52.tar.bz2 scummvm-rg350-b674ab2a09bec35b27583d8c463d137ded285e52.zip |
CGE2: Further implement loadSprite(), fix compilation error.
-rw-r--r-- | engines/cge2/cge2_main.cpp | 24 | ||||
-rw-r--r-- | engines/cge2/snail.h | 37 |
2 files changed, 54 insertions, 7 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index f5d694344b..117385adf0 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -31,21 +31,34 @@ #include "cge2/vga13h.h" #include "cge2/text.h" #include "cge2/snail.h" +#include "cge2/hero.h" namespace CGE2 { 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; + for (int i = 0; i < kActions; i++) + cnt[i] = 0; + int section = kIdPhase; bool frnt = true; bool east = false; bool port = false; bool tran = false; + Hero *h; + + char tmpStr[kLineMax]; + mergeExt(tmpStr, fname, kSprExt); + + if (_resman->exist(tmpStr)) { // sprite description file exist + EncryptedStream sprf(this, tmpStr); + if (sprf.err()) + error("Bad SPR [%s]", tmpStr); + + } + warning("STUB: CGE2Engine::loadSprite()"); - } void CGE2Engine::loadScript(const char *fname) { @@ -60,10 +73,7 @@ void CGE2Engine::loadScript(const char *fname) { char tmpStr[kLineMax + 1]; Common::String line; - int lineNum = 0; for (line = scrf.readLine(); !scrf.eos(); line = scrf.readLine()) { - lineNum++; - char *p; lcnt++; @@ -122,7 +132,7 @@ void CGE2Engine::loadScript(const char *fname) { } if (!ok) - error("Bad INI line %d [%s]", lineNum, fname); // Counting starts from 0! + error("Bad INI line %d [%s]", scrf.getLineCount(), fname); } void CGE2Engine::movie(const char *ext) { diff --git a/engines/cge2/snail.h b/engines/cge2/snail.h new file mode 100644 index 0000000000..cc60882962 --- /dev/null +++ b/engines/cge2/snail.h @@ -0,0 +1,37 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* + * This code is based on original Sfinx source code + * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon + */ + +#ifndef CGE2_SNAIL_H +#define CGE2_SNAIL_H + +namespace CGE2 { + +enum Action { kNear, kMTake, kFTake, kActions }; + +} // End of namespace CGE2 + +#endif |