aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaweł Kołodziejski2008-02-28 22:53:51 +0000
committerPaweł Kołodziejski2008-02-28 22:53:51 +0000
commit57be6b5a2eeefe201e74c4cebe50ce454f09b076 (patch)
tree9716ce9346f50880aa90c442467ce461792375bc /engines
parent61f7594866c2c8393c969a592398dbcc700c3e8b (diff)
downloadscummvm-rg350-57be6b5a2eeefe201e74c4cebe50ce454f09b076.tar.gz
scummvm-rg350-57be6b5a2eeefe201e74c4cebe50ce454f09b076.tar.bz2
scummvm-rg350-57be6b5a2eeefe201e74c4cebe50ce454f09b076.zip
get rid canal_p really silly code (that was encode/decode game data !)
svn-id: r30994
Diffstat (limited to 'engines')
-rw-r--r--engines/drascula/drascula.cpp49
-rw-r--r--engines/drascula/drascula.h1
2 files changed, 3 insertions, 47 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index c5615f0872..53a5b92671 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -1410,13 +1410,13 @@ void DrasculaEngine::para_cargar(char nom_game[]) {
}
static char *getLine(Common::File *fp, char *buf, int len) {
- int c;
+ byte c;
char *b;
for (;;) {
b = buf;
while (!fp->eos()) {
- c = fp->readByte() ^ 0xff;
+ c = ~fp->readByte();
if (c == '\r')
continue;
if (c == '\n')
@@ -1444,7 +1444,6 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
hay_nombre = 0;
strcpy(para_codificar, nom_fich);
- canal_p(para_codificar);
strcpy(datos_actuales, nom_fich);
buffer_teclado();
@@ -1455,7 +1454,6 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
error("missing data file");
}
int size = ald->size();
-
getLine(ald, buffer, size);
sscanf(buffer, "%s", num_room);
strcat(num_room, ".alg");
@@ -1561,7 +1559,6 @@ martini:
}
delete ald;
ald = NULL;
- canal_p(para_codificar);
if (num_ejec == 2) {
if (martin == 0) {
@@ -3461,14 +3458,12 @@ void DrasculaEngine::carga_partida(const char *nom_game) {
int l, n_ejec2;
Common::InSaveFile *sav;
- canal_p(nom_game);
- if (!(sav = _saveFileMan->openForLoading("nom_game"))) {
+ if (!(sav = _saveFileMan->openForLoading(nom_game))) {
error("missing savegame file");
}
n_ejec2 = sav->readSint32LE();
if (n_ejec2 != num_ejec) {
- canal_p(nom_game);
strcpy(nom_partida, nom_game);
error("TODO");
salir_al_dos(n_ejec2);
@@ -3488,41 +3483,6 @@ void DrasculaEngine::carga_partida(const char *nom_game) {
lleva_objeto = sav->readSint32LE();
objeto_que_lleva = sav->readSint32LE();
-
- canal_p(nom_game);
-}
-
-void DrasculaEngine::canal_p(const char *fich){
- return;
- // TODO
-
- Common::File ald2, ald3;
-
- char fich2[13];
- char car;
-
- strcpy(fich2, "top");
-
- ald3.open(fich);
- if (!ald3.isOpen()) {
- error("no puedo abrir el archivo codificado");
- }
-
- ald2.open(fich2, Common::File::kFileWriteMode);
- if (!ald2.isOpen()) {
- error("no puedo abrir el archivo destino");
- }
-
- car = ald3.readByte();
- while (!ald3.eos()) {
- ald2.writeByte(codifica(car));
- car = ald3.readByte();
- }
-
- ald2.close();
- ald3.close();
- //remove(fich); // FIXME: Not portable
- //rename(fich2, fich); // FIXME: Not portable
}
void DrasculaEngine::puertas_cerradas(int l) {
@@ -5177,7 +5137,6 @@ void DrasculaEngine::graba_partida(char nom_game[]) {
warning("Can't write file '%s'. (Disk full?)", nom_game);
delete out;
- canal_p(nom_game);
}
void DrasculaEngine::aumenta_num_frame() {
@@ -5450,7 +5409,6 @@ void DrasculaEngine::conversa(const char *nom_fich) {
rompo_y_salgo = 0;
strcpy(para_codificar, nom_fich);
- canal_p(para_codificar);
if (num_ejec == 5)
sin_verbo();
@@ -5486,7 +5444,6 @@ void DrasculaEngine::conversa(const char *nom_fich) {
sscanf(buffer, "%d", &respuesta3);
delete ald;
ald = NULL;
- canal_p(para_codificar);
if (num_ejec == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
strcpy(frase3, TEXT405);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index df581b1700..bbe48df911 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -625,7 +625,6 @@ public:
int music_status();
void refresca_pantalla();
void carga_partida(const char *);
- void canal_p(const char *);
void puertas_cerradas(int);
void animafin_sound_corte();
void color_hare();