DREAMWEB: Remove unused 'openFile', merge duplicated 'getFilename'

This commit is contained in:
D G Turner 2011-12-05 21:38:31 +00:00
parent 3b5794890f
commit 887b5c8cdd
5 changed files with 4 additions and 19 deletions

View File

@ -377,6 +377,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'obtoinv', 'obtoinv',
'oldtonames', 'oldtonames',
'onedigit', 'onedigit',
'openfile',
'openforsave', 'openforsave',
'othersmoker', 'othersmoker',
'out22c', 'out22c',

View File

@ -821,7 +821,6 @@ public:
void useCardReader2(); void useCardReader2();
void useCardReader3(); void useCardReader3();
void useHandle(); void useHandle();
void openFile();
void showPuzText(); void showPuzText();
void incRyanPage(); void incRyanPage();
void edenInBath(); void edenInBath();

View File

@ -735,7 +735,7 @@ void DreamGenContext::switchRyanOff() {
data.byte(kRyanon) = 1; data.byte(kRyanon) = 1;
} }
static Common::String getFilename(Context &context) { Common::String DreamGenContext::getFilename(Context &context) {
const char *name = (const char *)context.cs.ptr(context.dx, 0); const char *name = (const char *)context.cs.ptr(context.dx, 0);
return Common::String(name); return Common::String(name);
} }
@ -865,14 +865,6 @@ void DreamGenContext::openFileFromC() {
openFileNoCheck(); openFileNoCheck();
} }
void DreamGenContext::openFile() {
Common::String name = getFilename(*this);
debug(1, "opening file: %s", name.c_str());
engine->openFile(name);
cs.word(kHandle) = 1; //only one handle
flags._c = false;
}
void DreamGenContext::createFile() { void DreamGenContext::createFile() {
::error("createfile"); ::error("createfile");
} }

View File

@ -463,5 +463,6 @@
void bibleQuote(); void bibleQuote();
void realCredits(); void realCredits();
void intro(); void intro();
Common::String getFilename(Context &context);
#endif #endif

View File

@ -21,6 +21,7 @@
*/ */
#include "dreamweb/dreamweb.h" #include "dreamweb/dreamweb.h"
#include "dreamweb/stubs.h"
#include "engines/util.h" #include "engines/util.h"
#include "graphics/surface.h" #include "graphics/surface.h"
@ -210,15 +211,6 @@ void DreamGenContext::setMode() {
initGraphics(320, 200, false); initGraphics(320, 200, false);
} }
static Common::String getFilename(Context &context) {
uint16 name_ptr = context.dx;
Common::String name;
uint8 c;
while((c = context.cs.byte(name_ptr++)) != 0)
name += (char)c;
return name;
}
void DreamGenContext::showPCX(const Common::String &name) { void DreamGenContext::showPCX(const Common::String &name) {
Common::File pcxFile; Common::File pcxFile;