aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2003-12-02 06:23:05 +0000
committerTravis Howell2003-12-02 06:23:05 +0000
commit13db38223cf2d9eb9292d2bda1fcf6b8df13552a (patch)
tree8cdc34dae37123b76a35d06fa280766b15318ad2
parentbde45d4335063b12aa5c3de6aaf4951c031662a6 (diff)
downloadscummvm-rg350-13db38223cf2d9eb9292d2bda1fcf6b8df13552a.tar.gz
scummvm-rg350-13db38223cf2d9eb9292d2bda1fcf6b8df13552a.tar.bz2
scummvm-rg350-13db38223cf2d9eb9292d2bda1fcf6b8df13552a.zip
Cleanup
svn-id: r11456
-rw-r--r--simon/intern.h21
-rw-r--r--simon/simon.cpp17
2 files changed, 20 insertions, 18 deletions
diff --git a/simon/intern.h b/simon/intern.h
index fbceb3a538..b8962a543d 100644
--- a/simon/intern.h
+++ b/simon/intern.h
@@ -141,25 +141,26 @@ struct GameSpecificSettings {
} // End of namespace Simon
enum {
- GF_SIMON2 = 1 << 0,
- GF_WIN = 1 << 1,
- GF_TALKIE = 1 << 2,
- GF_DEMO = 1 << 3,
- GF_MAC = 1 << 4,
- GF_AMIGA = 1 << 5,
- GF_ACORN = 1 << 6
+ GF_SIMON2 = 1 << 0,
+ GF_WIN = 1 << 1,
+ GF_TALKIE = 1 << 2,
+ GF_DEMO = 1 << 3,
+ GF_MAC = 1 << 4,
+ GF_AMIGA = 1 << 5,
+ GF_ACORN = 1 << 6,
+ GF_OLD_BUNDLE = 1 << 7
};
enum {
- GAME_SIMON1DOS = 0,
+ GAME_SIMON1DOS = GF_OLD_BUNDLE,
GAME_SIMON2DOS = GF_SIMON2,
GAME_SIMON1TALKIE = GF_TALKIE,
GAME_SIMON2TALKIE = GF_SIMON2 | GF_TALKIE,
GAME_SIMON1WIN = GF_WIN | GF_TALKIE,
GAME_SIMON2WIN = GF_SIMON2 | GF_WIN | GF_TALKIE,
- GAME_SIMON1DEMO = GF_DEMO,
+ GAME_SIMON1DEMO = GF_DEMO | GF_OLD_BUNDLE,
GAME_SIMON2MAC = GF_SIMON2 | GF_WIN | GF_TALKIE | GF_MAC,
- GAME_SIMON1AMIGA = GF_AMIGA,
+ GAME_SIMON1AMIGA = GF_AMIGA | GF_OLD_BUNDLE,
GAME_SIMON1CD32 = GF_TALKIE | GF_AMIGA,
GAME_SIMON1ACORN = GF_TALKIE | GF_ACORN
};
diff --git a/simon/simon.cpp b/simon/simon.cpp
index b5fb49ef95..b8a8b02f48 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1226,21 +1226,21 @@ File *SimonEngine::openTablesFile_simon1(const char *filename) {
}
uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
- if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+ if (_game & GF_OLD_BUNDLE)
return loadTextFile_simon1(filename, dst);
else
return loadTextFile_gme(filename, dst);
}
File *SimonEngine::openTablesFile(const char *filename) {
- if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+ if (_game & GF_OLD_BUNDLE)
return openTablesFile_simon1(filename);
else
return openTablesFile_gme(filename);
}
void SimonEngine::closeTablesFile(File *in) {
- if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+ if (_game & GF_OLD_BUNDLE) {
in->close();
delete in;
}
@@ -3294,7 +3294,8 @@ void SimonEngine::fcs_unk1(uint fcs_index) {
if (fcs->fcs_data->unk4 != -1) {
delete_hitarea_by_index(fcs->fcs_data->unk4);
- fcs_unk_5(fcs, fcs_index);
+ if (!(_game & GF_SIMON2))
+ fcs_unk_5(fcs, fcs_index);
}
free(fcs->fcs_data);
@@ -3308,7 +3309,7 @@ void SimonEngine::fcs_unk1(uint fcs_index) {
void SimonEngine::fcs_unk_5(FillOrCopyStruct *fcs, uint fcs_index) {
if (_game == GAME_SIMON1WIN) {
o_kill_sprite_simon1(0x80);
- } else if (!(_game & GF_SIMON2)) {
+ } else {
o_kill_sprite_simon1(0x81);
start_vga_code(0, 1, 0x81, 0, 0, 0xE);
}
@@ -4362,7 +4363,7 @@ static bool decrunch_file_amiga (byte *src, byte *dst, uint32 size) {
#undef SD_TYPE_MATCH
void SimonEngine::read_vga_from_datfile_1(uint vga_id) {
- if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+ if (_game & GF_OLD_BUNDLE) {
File in;
char buf[50];
uint32 size;
@@ -4404,7 +4405,7 @@ void SimonEngine::read_vga_from_datfile_1(uint vga_id) {
}
byte *SimonEngine::read_vga_from_datfile_2(uint id) {
- if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+ if (_game & GF_OLD_BUNDLE) {
File in;
char buf[50];
uint32 size;
@@ -4456,7 +4457,7 @@ void SimonEngine::resfile_read(void *dst, uint32 offs, uint32 size) {
}
void SimonEngine::openGameFile() {
- if (!(_game & GF_AMIGA) && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) {
+ if (!(_game & GF_OLD_BUNDLE)) {
_game_file = new File();
_game_file->open(gss->gme_filename, _gameDataPath);