[Scummvm-git-logs] scummvm master -> 736913d4595682e139934c03be74b8f173b4acdc
dreammaster
paulfgilbert at gmail.com
Tue Jun 23 03:07:44 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
736913d459 GLK: ZCODE: Rename frotz/ to zocde/
Commit: 736913d4595682e139934c03be74b8f173b4acdc
https://github.com/scummvm/scummvm/commit/736913d4595682e139934c03be74b8f173b4acdc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-22T20:06:26-07:00
Commit Message:
GLK: ZCODE: Rename frotz/ to zocde/
All the other sub-engines use the engine or authoring system
name, not the name of particular interpreters. So I felt it
best to rename frotz to zcode for consistency
Changed paths:
A engines/glk/zcode/bitmap_font.cpp
A engines/glk/zcode/bitmap_font.h
A engines/glk/zcode/config.cpp
A engines/glk/zcode/config.h
A engines/glk/zcode/detection.cpp
A engines/glk/zcode/detection.h
A engines/glk/zcode/detection_tables.h
A engines/glk/zcode/frotz_types.h
A engines/glk/zcode/glk_interface.cpp
A engines/glk/zcode/glk_interface.h
A engines/glk/zcode/mem.cpp
A engines/glk/zcode/mem.h
A engines/glk/zcode/pics.cpp
A engines/glk/zcode/pics.h
A engines/glk/zcode/pics_decoder.cpp
A engines/glk/zcode/pics_decoder.h
A engines/glk/zcode/processor.cpp
A engines/glk/zcode/processor.h
A engines/glk/zcode/processor_buffer.cpp
A engines/glk/zcode/processor_input.cpp
A engines/glk/zcode/processor_maths.cpp
A engines/glk/zcode/processor_mem.cpp
A engines/glk/zcode/processor_objects.cpp
A engines/glk/zcode/processor_screen.cpp
A engines/glk/zcode/processor_streams.cpp
A engines/glk/zcode/processor_table.cpp
A engines/glk/zcode/processor_text.cpp
A engines/glk/zcode/processor_variables.cpp
A engines/glk/zcode/processor_windows.cpp
A engines/glk/zcode/quetzal.cpp
A engines/glk/zcode/quetzal.h
A engines/glk/zcode/screen.cpp
A engines/glk/zcode/screen.h
A engines/glk/zcode/sound_folder.cpp
A engines/glk/zcode/sound_folder.h
A engines/glk/zcode/windows.cpp
A engines/glk/zcode/windows.h
A engines/glk/zcode/zcode.cpp
A engines/glk/zcode/zcode.h
R engines/glk/frotz/bitmap_font.cpp
R engines/glk/frotz/bitmap_font.h
R engines/glk/frotz/config.cpp
R engines/glk/frotz/config.h
R engines/glk/frotz/detection.cpp
R engines/glk/frotz/detection.h
R engines/glk/frotz/detection_tables.h
R engines/glk/frotz/frotz.cpp
R engines/glk/frotz/frotz.h
R engines/glk/frotz/frotz_types.h
R engines/glk/frotz/glk_interface.cpp
R engines/glk/frotz/glk_interface.h
R engines/glk/frotz/mem.cpp
R engines/glk/frotz/mem.h
R engines/glk/frotz/pics.cpp
R engines/glk/frotz/pics.h
R engines/glk/frotz/pics_decoder.cpp
R engines/glk/frotz/pics_decoder.h
R engines/glk/frotz/processor.cpp
R engines/glk/frotz/processor.h
R engines/glk/frotz/processor_buffer.cpp
R engines/glk/frotz/processor_input.cpp
R engines/glk/frotz/processor_maths.cpp
R engines/glk/frotz/processor_mem.cpp
R engines/glk/frotz/processor_objects.cpp
R engines/glk/frotz/processor_screen.cpp
R engines/glk/frotz/processor_streams.cpp
R engines/glk/frotz/processor_table.cpp
R engines/glk/frotz/processor_text.cpp
R engines/glk/frotz/processor_variables.cpp
R engines/glk/frotz/processor_windows.cpp
R engines/glk/frotz/quetzal.cpp
R engines/glk/frotz/quetzal.h
R engines/glk/frotz/screen.cpp
R engines/glk/frotz/screen.h
R engines/glk/frotz/sound_folder.cpp
R engines/glk/frotz/sound_folder.h
R engines/glk/frotz/windows.cpp
R engines/glk/frotz/windows.h
engines/glk/detection.cpp
engines/glk/module.mk
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index 0f10e4463a..4b9024afe9 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -37,8 +37,8 @@
#include "glk/archetype/detection.h"
#include "glk/comprehend/comprehend.h"
#include "glk/comprehend/detection.h"
-#include "glk/frotz/detection.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/detection.h"
+#include "glk/zcode/zcode.h"
#include "glk/glulxe/detection.h"
#include "glk/glulxe/glulxe.h"
#include "glk/hugo/detection.h"
@@ -200,7 +200,6 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
else if ((create<Glk::Alan3::Alan3MetaEngine, Glk::Alan3::Alan3>(syst, gameDesc, *engine))) {}
else if ((create<Glk::Archetype::ArchetypeMetaEngine, Glk::Archetype::Archetype>(syst, gameDesc, *engine))) {}
else if ((create<Glk::Comprehend::ComprehendMetaEngine, Glk::Comprehend::Comprehend>(syst, gameDesc, *engine))) {}
- else if ((create<Glk::Frotz::FrotzMetaEngine, Glk::Frotz::Frotz>(syst, gameDesc, *engine))) {}
else if ((create<Glk::Glulxe::GlulxeMetaEngine, Glk::Glulxe::Glulxe>(syst, gameDesc, *engine))) {}
else if ((create<Glk::Hugo::HugoMetaEngine, Glk::Hugo::Hugo>(syst, gameDesc, *engine))) {}
else if ((create<Glk::JACL::JACLMetaEngine, Glk::JACL::JACL>(syst, gameDesc, *engine))) {}
@@ -215,6 +214,7 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
new Glk::TADS::TADS3::TADS3(syst, gameDesc);
else
new Glk::TADS::TADS2::TADS2(syst, gameDesc);
+ } else if ((create<Glk::ZCode::ZCodeMetaEngine, Glk::ZCode::ZCode>(syst, gameDesc, *engine))) {
} else {
return Common::kNoGameDataFoundError;
}
@@ -253,7 +253,6 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
Glk::Alan3::Alan3MetaEngine::getSupportedGames(list);
Glk::Archetype::ArchetypeMetaEngine::getSupportedGames(list);
Glk::Comprehend::ComprehendMetaEngine::getSupportedGames(list);
- Glk::Frotz::FrotzMetaEngine::getSupportedGames(list);
Glk::Glulxe::GlulxeMetaEngine::getSupportedGames(list);
Glk::Hugo::HugoMetaEngine::getSupportedGames(list);
Glk::JACL::JACLMetaEngine::getSupportedGames(list);
@@ -262,6 +261,7 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
Glk::Quest::QuestMetaEngine::getSupportedGames(list);
Glk::Scott::ScottMetaEngine::getSupportedGames(list);
Glk::TADS::TADSMetaEngine::getSupportedGames(list);
+ Glk::ZCode::ZCodeMetaEngine::getSupportedGames(list);
return list;
}
@@ -278,7 +278,6 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
FIND_GAME(Alan3);
FIND_GAME(Archetype);
FIND_GAME(Comprehend);
- FIND_GAME(Frotz);
FIND_GAME(Glulxe);
FIND_GAME(Hugo);
FIND_GAME(JACL);
@@ -287,6 +286,7 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
FIND_GAME(Quest);
FIND_GAME(Scott);
FIND_GAME(TADS);
+ FIND_GAME(ZCode);
return PlainGameDescriptor();
}
@@ -305,7 +305,6 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
Glk::Alan3::Alan3MetaEngine::detectGames(fslist, detectedGames);
Glk::Archetype::ArchetypeMetaEngine::detectGames(fslist, detectedGames);
Glk::Comprehend::ComprehendMetaEngine::detectGames(fslist, detectedGames);
- Glk::Frotz::FrotzMetaEngine::detectGames(fslist, detectedGames);
Glk::Glulxe::GlulxeMetaEngine::detectGames(fslist, detectedGames);
Glk::Hugo::HugoMetaEngine::detectGames(fslist, detectedGames);
Glk::JACL::JACLMetaEngine::detectGames(fslist, detectedGames);
@@ -314,6 +313,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
Glk::Quest::QuestMetaEngine::detectGames(fslist, detectedGames);
Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames);
Glk::TADS::TADSMetaEngine::detectGames(fslist, detectedGames);
+ Glk::ZCode::ZCodeMetaEngine::detectGames(fslist, detectedGames);
return detectedGames;
}
@@ -327,7 +327,6 @@ void GlkMetaEngine::detectClashes() const {
Glk::Alan3::Alan3MetaEngine::detectClashes(map);
Glk::Archetype::ArchetypeMetaEngine::detectClashes(map);
Glk::Comprehend::ComprehendMetaEngine::detectClashes(map);
- Glk::Frotz::FrotzMetaEngine::detectClashes(map);
Glk::Glulxe::GlulxeMetaEngine::detectClashes(map);
Glk::Hugo::HugoMetaEngine::detectClashes(map);
Glk::JACL::JACLMetaEngine::detectClashes(map);
@@ -336,6 +335,7 @@ void GlkMetaEngine::detectClashes() const {
Glk::Quest::QuestMetaEngine::detectClashes(map);
Glk::Scott::ScottMetaEngine::detectClashes(map);
Glk::TADS::TADSMetaEngine::detectClashes(map);
+ Glk::ZCode::ZCodeMetaEngine::detectClashes(map);
}
SaveStateList GlkMetaEngine::listSaves(const char *target) const {
diff --git a/engines/glk/module.mk b/engines/glk/module.mk
index dafed0a320..6c9871617d 100644
--- a/engines/glk/module.mk
+++ b/engines/glk/module.mk
@@ -182,30 +182,6 @@ MODULE_OBJS := \
comprehend/game_tr.o \
comprehend/opcode_map.o \
comprehend/pics.o \
- frotz/bitmap_font.o \
- frotz/config.o \
- frotz/detection.o \
- frotz/frotz.o \
- frotz/glk_interface.o \
- frotz/mem.o \
- frotz/pics.o \
- frotz/pics_decoder.o \
- frotz/processor.o \
- frotz/processor_buffer.o \
- frotz/processor_input.o \
- frotz/processor_maths.o \
- frotz/processor_mem.o \
- frotz/processor_objects.o \
- frotz/processor_screen.o \
- frotz/processor_streams.o \
- frotz/processor_table.o \
- frotz/processor_text.o \
- frotz/processor_variables.o \
- frotz/processor_windows.o \
- frotz/quetzal.o \
- frotz/screen.o \
- frotz/sound_folder.o \
- frotz/windows.o \
glulxe/accel.o \
glulxe/detection.o \
glulxe/exec.o \
@@ -310,7 +286,31 @@ MODULE_OBJS := \
tads/tads2/tokenizer_hash.o \
tads/tads2/vocabulary.o \
tads/tads2/vocabulary_parser.o \
- tads/tads3/tads3.o
+ tads/tads3/tads3.o \
+ zcode/bitmap_font.o \
+ zcode/config.o \
+ zcode/detection.o \
+ zcode/zcode.o \
+ zcode/glk_interface.o \
+ zcode/mem.o \
+ zcode/pics.o \
+ zcode/pics_decoder.o \
+ zcode/processor.o \
+ zcode/processor_buffer.o \
+ zcode/processor_input.o \
+ zcode/processor_maths.o \
+ zcode/processor_mem.o \
+ zcode/processor_objects.o \
+ zcode/processor_screen.o \
+ zcode/processor_streams.o \
+ zcode/processor_table.o \
+ zcode/processor_text.o \
+ zcode/processor_variables.o \
+ zcode/processor_windows.o \
+ zcode/quetzal.o \
+ zcode/screen.o \
+ zcode/sound_folder.o \
+ zcode/windows.o
# This module can be built as a plugin
ifeq ($(ENABLE_GLK), DYNAMIC_PLUGIN)
diff --git a/engines/glk/frotz/bitmap_font.cpp b/engines/glk/zcode/bitmap_font.cpp
similarity index 97%
rename from engines/glk/frotz/bitmap_font.cpp
rename to engines/glk/zcode/bitmap_font.cpp
index a5c9337d49..f7ee5a3358 100644
--- a/engines/glk/frotz/bitmap_font.cpp
+++ b/engines/glk/zcode/bitmap_font.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/bitmap_font.h"
+#include "glk/zcode/bitmap_font.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
BitmapFont::BitmapFont(const Graphics::Surface &src, const Common::Point &size,
uint srcWidth, uint srcHeight, unsigned char startingChar, bool isFixedWidth) :
@@ -84,5 +84,5 @@ int BitmapFont::getSourceCharacterWidth(uint charIndex, const Graphics::Surface
return maxWidth;
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/bitmap_font.h b/engines/glk/zcode/bitmap_font.h
similarity index 96%
rename from engines/glk/frotz/bitmap_font.h
rename to engines/glk/zcode/bitmap_font.h
index f39f99783e..e7ee26c278 100644
--- a/engines/glk/frotz/bitmap_font.h
+++ b/engines/glk/zcode/bitmap_font.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef GLK_FROTZ_BITMAP_FONT
-#define GLK_FROTZ_BITMAP_FONT
+#ifndef GLK_ZCODE_BITMAP_FONT
+#define GLK_ZCODE_BITMAP_FONT
#include "common/array.h"
#include "common/rect.h"
@@ -29,7 +29,7 @@
#include "graphics/managed_surface.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Implements a font stored as a grid on a passed surface
@@ -101,7 +101,7 @@ public:
BitmapFont(src, size, srcWidth, srcHeight, startingChar, false) {}
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/config.cpp b/engines/glk/zcode/config.cpp
similarity index 98%
rename from engines/glk/frotz/config.cpp
rename to engines/glk/zcode/config.cpp
index 8c7ca5ad72..5714495d7d 100644
--- a/engines/glk/frotz/config.cpp
+++ b/engines/glk/zcode/config.cpp
@@ -20,14 +20,14 @@
*
*/
-#include "glk/frotz/config.h"
-#include "glk/frotz/detection.h"
+#include "glk/zcode/config.h"
+#include "glk/zcode/detection.h"
#include "glk/glk.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
const Header::StoryEntry Header::RECORDS[26] = {
{ SHERLOCK, 21, "871214" },
@@ -184,5 +184,5 @@ bool UserOptions::isInfocom() const {
return g_vm->getOptions() & OPTION_INFOCOM;
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/config.h b/engines/glk/zcode/config.h
similarity index 98%
rename from engines/glk/frotz/config.h
rename to engines/glk/zcode/config.h
index 9f3dae5270..184f6a8e78 100644
--- a/engines/glk/frotz/config.h
+++ b/engines/glk/zcode/config.h
@@ -20,13 +20,13 @@
*
*/
-#ifndef GLK_FROTZ_CONFIG
-#define GLK_FROTZ_CONFIG
+#ifndef GLK_ZCODE_CONFIG
+#define GLK_ZCODE_CONFIG
-#include "glk/frotz/frotz_types.h"
+#include "glk/zcode/frotz_types.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Configuration flags
@@ -235,7 +235,7 @@ public:
void loadHeader(Common::SeekableReadStream &f);
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/zcode/detection.cpp
similarity index 92%
rename from engines/glk/frotz/detection.cpp
rename to engines/glk/zcode/detection.cpp
index a3b70ed305..bc24c9648e 100644
--- a/engines/glk/frotz/detection.cpp
+++ b/engines/glk/zcode/detection.cpp
@@ -20,9 +20,9 @@
*
*/
-#include "glk/frotz/detection.h"
-#include "glk/frotz/detection_tables.h"
-#include "glk/frotz/quetzal.h"
+#include "glk/zcode/detection.h"
+#include "glk/zcode/detection_tables.h"
+#include "glk/zcode/quetzal.h"
#include "glk/blorb.h"
#include "common/debug.h"
#include "common/file.h"
@@ -30,16 +30,16 @@
#include "common/translation.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
-void FrotzMetaEngine::getSupportedGames(PlainGameList &games) {
+void ZCodeMetaEngine::getSupportedGames(PlainGameList &games) {
for (const PlainGameDescriptor *pd = INFOCOM_GAME_LIST; pd->gameId; ++pd)
games.push_back(*pd);
for (const PlainGameDescriptor *pd = ZCODE_GAME_LIST; pd->gameId; ++pd)
games.push_back(*pd);
}
-GameDescriptor FrotzMetaEngine::findGame(const char *gameId) {
+GameDescriptor ZCodeMetaEngine::findGame(const char *gameId) {
for (const PlainGameDescriptor *pd = INFOCOM_GAME_LIST; pd->gameId; ++pd) {
if (!strcmp(gameId, pd->gameId)) {
GameDescriptor gd(*pd);
@@ -62,7 +62,7 @@ GameDescriptor FrotzMetaEngine::findGame(const char *gameId) {
return GameDescriptor::empty();
}
-bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
+bool ZCodeMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
const char *const EXTENSIONS[] = { ".z1", ".z2", ".z3", ".z4", ".z5", ".z6", ".z7", ".z8",
".dat", ".zip", nullptr };
@@ -141,7 +141,7 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
return !gameList.empty();
}
-void FrotzMetaEngine::detectClashes(Common::StringMap &map) {
+void ZCodeMetaEngine::detectClashes(Common::StringMap &map) {
for (int idx = 0; idx < 2; ++idx) {
for (const PlainGameDescriptor *pd = (idx == 0) ? INFOCOM_GAME_LIST : ZCODE_GAME_LIST; pd->gameId; ++pd) {
if (map.contains(pd->gameId))
@@ -151,5 +151,5 @@ void FrotzMetaEngine::detectClashes(Common::StringMap &map) {
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/detection.h b/engines/glk/zcode/detection.h
similarity index 93%
rename from engines/glk/frotz/detection.h
rename to engines/glk/zcode/detection.h
index 6e1643302c..95eac8a396 100644
--- a/engines/glk/frotz/detection.h
+++ b/engines/glk/zcode/detection.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef GLK_FROTZ_DETECTION
-#define GLK_FROTZ_DETECTION
+#ifndef GLK_ZCODE_DETECTION
+#define GLK_ZCODE_DETECTION
#include "common/fs.h"
#include "common/hash-str.h"
@@ -30,7 +30,7 @@
#include "glk/detection.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Game descriptor detection options
@@ -39,7 +39,7 @@ enum DetectionOption {
OPTION_INFOCOM = 1
};
-class FrotzMetaEngine {
+class ZCodeMetaEngine {
public:
/**
* Get a list of supported games
@@ -62,7 +62,7 @@ public:
static void detectClashes(Common::StringMap &map);
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/detection_tables.h b/engines/glk/zcode/detection_tables.h
similarity index 99%
rename from engines/glk/frotz/detection_tables.h
rename to engines/glk/zcode/detection_tables.h
index 769a173fe4..d9101e817f 100644
--- a/engines/glk/frotz/detection_tables.h
+++ b/engines/glk/zcode/detection_tables.h
@@ -25,7 +25,7 @@
#include "common/language.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Game descriptor for ZCode games
@@ -2078,5 +2078,5 @@ const FrotzGameDescription FROTZ_GAMES[] = {
FROTZ_TABLE_END_MARKER
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/frotz_types.h b/engines/glk/zcode/frotz_types.h
similarity index 98%
rename from engines/glk/frotz/frotz_types.h
rename to engines/glk/zcode/frotz_types.h
index 017cdee23e..e0477423cd 100644
--- a/engines/glk/frotz/frotz_types.h
+++ b/engines/glk/zcode/frotz_types.h
@@ -20,14 +20,14 @@
*
*/
-#ifndef GLK_FROTZ_FROTZ_TYPES
-#define GLK_FROTZ_FROTZ_TYPES
+#ifndef GLK_ZCODE_FROTZ_TYPES
+#define GLK_ZCODE_FROTZ_TYPES
#include "glk/glk_types.h"
#include "common/algorithm.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define MAX_UNDO_SLOTS 500
#define STACK_SIZE 32768
@@ -38,7 +38,7 @@ namespace Frotz {
/**
* Character codes
*/
-enum ZCode {
+enum ZCodeKey {
ZC_TIME_OUT = 0x00,
ZC_NEW_STYLE = 0x01,
ZC_NEW_FONT = 0x02,
@@ -218,7 +218,7 @@ struct Redirect {
_xSize(xSize), _table(table), _width(width), _total(total) {}
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/zcode/glk_interface.cpp
similarity index 99%
rename from engines/glk/frotz/glk_interface.cpp
rename to engines/glk/zcode/glk_interface.cpp
index e01e892846..3289d769fd 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/zcode/glk_interface.cpp
@@ -20,16 +20,16 @@
*
*/
-#include "glk/frotz/glk_interface.h"
-#include "glk/frotz/pics.h"
-#include "glk/frotz/sound_folder.h"
+#include "glk/zcode/glk_interface.h"
+#include "glk/zcode/pics.h"
+#include "glk/zcode/sound_folder.h"
#include "glk/conf.h"
#include "glk/screen.h"
#include "common/config-manager.h"
#include "common/unzip.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
GlkInterface::GlkInterface(OSystem *syst, const GlkGameDescription &gameDesc) :
GlkAPI(syst, gameDesc), _pics(nullptr), curr_status_ht(0), mach_status_ht(0), gos_status(nullptr),
@@ -683,5 +683,5 @@ uint GlkInterface::roundDiv(uint x, uint y) {
return quotient;
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/glk_interface.h b/engines/glk/zcode/glk_interface.h
similarity index 97%
rename from engines/glk/frotz/glk_interface.h
rename to engines/glk/zcode/glk_interface.h
index aa30c2e0ec..e6eb5d6ed9 100644
--- a/engines/glk/frotz/glk_interface.h
+++ b/engines/glk/zcode/glk_interface.h
@@ -20,15 +20,15 @@
*
*/
-#ifndef GLK_FROTZ_GLK_INTERFACE
-#define GLK_FROTZ_GLK_INTERFACE
+#ifndef GLK_ZCODE_GLK_INTERFACE
+#define GLK_ZCODE_GLK_INTERFACE
#include "glk/glk_api.h"
-#include "glk/frotz/mem.h"
-#include "glk/frotz/windows.h"
+#include "glk/zcode/mem.h"
+#include "glk/zcode/windows.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define zB(i) ((((i >> 10) & 0x1F) << 3) | (((i >> 10) & 0x1F) >> 2))
#define zG(i) ((((i >> 5) & 0x1F) << 3) | (((i >> 5) & 0x1F) >> 2))
@@ -254,7 +254,7 @@ public:
void initialize();
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/mem.cpp b/engines/glk/zcode/mem.cpp
similarity index 98%
rename from engines/glk/frotz/mem.cpp
rename to engines/glk/zcode/mem.cpp
index 57dc5b5d15..fa52006470 100644
--- a/engines/glk/frotz/mem.cpp
+++ b/engines/glk/zcode/mem.cpp
@@ -20,13 +20,13 @@
*
*/
-#include "glk/frotz/mem.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/mem.h"
+#include "glk/zcode/zcode.h"
#include "common/memstream.h"
#include "common/textconsole.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
Mem::Mem() : story_fp(nullptr), story_size(0), first_undo(nullptr), last_undo(nullptr),
curr_undo(nullptr), undo_mem(nullptr), zmp(nullptr), pcp(nullptr), prev_zmp(nullptr),
@@ -306,5 +306,5 @@ void Mem::mem_undiff(zbyte *diff, long diff_length, zbyte *dest) {
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/mem.h b/engines/glk/zcode/mem.h
similarity index 96%
rename from engines/glk/frotz/mem.h
rename to engines/glk/zcode/mem.h
index 3a927e25b4..8755614ebc 100644
--- a/engines/glk/frotz/mem.h
+++ b/engines/glk/zcode/mem.h
@@ -20,14 +20,14 @@
*
*/
-#ifndef GLK_FROTZ_MEM
-#define GLK_FROTZ_MEM
+#ifndef GLK_ZCODE_MEM
+#define GLK_ZCODE_MEM
-#include "glk/frotz/frotz_types.h"
-#include "glk/frotz/config.h"
+#include "glk/zcode/frotz_types.h"
+#include "glk/zcode/config.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define SET_WORD(addr,v) zmp[addr] = hi(v); zmp[addr+1] = lo(v)
#define LOW_WORD(addr,v) v = READ_BE_UINT16(&zmp[addr])
@@ -164,7 +164,7 @@ public:
void initialize();
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/pics.cpp b/engines/glk/zcode/pics.cpp
similarity index 97%
rename from engines/glk/frotz/pics.cpp
rename to engines/glk/zcode/pics.cpp
index 84ee050ae7..9a76a2c07c 100644
--- a/engines/glk/frotz/pics.cpp
+++ b/engines/glk/zcode/pics.cpp
@@ -20,14 +20,14 @@
*
*/
-#include "glk/frotz/pics.h"
-#include "glk/frotz/pics_decoder.h"
+#include "glk/zcode/pics.h"
+#include "glk/zcode/pics_decoder.h"
#include "glk/glk.h"
#include "common/algorithm.h"
#include "common/memstream.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
enum {
PIC_FILE_HEADER_FLAGS = 1,
@@ -185,5 +185,5 @@ void Pics::loadPalette(Common::File &f, const Entry &e, Common::Array<byte> &pal
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/pics.h b/engines/glk/zcode/pics.h
similarity index 97%
rename from engines/glk/frotz/pics.h
rename to engines/glk/zcode/pics.h
index 87bb1466ae..0d1e970d21 100644
--- a/engines/glk/frotz/pics.h
+++ b/engines/glk/zcode/pics.h
@@ -20,15 +20,15 @@
*
*/
-#ifndef GLK_FROTZ_PICS_H
-#define GLK_FROTZ_PICS_H
+#ifndef GLK_ZCODE_PICS_H
+#define GLK_ZCODE_PICS_H
#include "common/archive.h"
#include "common/array.h"
#include "common/file.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
enum PicturesMode {
kMONO = 0,
@@ -131,7 +131,7 @@ public:
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const override;
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/pics_decoder.cpp b/engines/glk/zcode/pics_decoder.cpp
similarity index 97%
rename from engines/glk/frotz/pics_decoder.cpp
rename to engines/glk/zcode/pics_decoder.cpp
index 375abf20a2..8f783868c2 100644
--- a/engines/glk/frotz/pics_decoder.cpp
+++ b/engines/glk/zcode/pics_decoder.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/frotz/pics_decoder.h"
-#include "glk/frotz/pics.h"
+#include "glk/zcode/pics_decoder.h"
+#include "glk/zcode/pics.h"
#include "common/memstream.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define MAX_BIT 512 /* Must be less than or equal to CODE_TABLE_SIZE */
#define CODE_SIZE 8
@@ -164,5 +164,5 @@ Common::SeekableReadStream *PictureDecoder::decode(Common::ReadStream &src, uint
return new Common::MemoryReadStream(out.getData(), out.size(), DisposeAfterUse::YES);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/pics_decoder.h b/engines/glk/zcode/pics_decoder.h
similarity index 93%
rename from engines/glk/frotz/pics_decoder.h
rename to engines/glk/zcode/pics_decoder.h
index 3d2165fc01..9243694966 100644
--- a/engines/glk/frotz/pics_decoder.h
+++ b/engines/glk/zcode/pics_decoder.h
@@ -20,14 +20,14 @@
*
*/
-#ifndef GLK_FROTZ_PICS_DECODER_H
-#define GLK_FROTZ_PICS_DECODER_H
+#ifndef GLK_ZCODE_PICS_DECODER_H
+#define GLK_ZCODE_PICS_DECODER_H
#include "common/stream.h"
#include "common/array.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Decodes an Infocom encoded picture into a raw pixel stream that the outer
@@ -55,7 +55,7 @@ public:
const Common::Array<byte> &palette, uint display, size_t width, size_t height);
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/zcode/processor.cpp
similarity index 99%
rename from engines/glk/frotz/processor.cpp
rename to engines/glk/zcode/processor.cpp
index 9e91bac566..cb2d9f97d9 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/zcode/processor.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/frotz/processor.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/processor.h"
+#include "glk/zcode/zcode.h"
#include "glk/conf.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
// TODO: Stubs to replace with actual code
zword save_undo() { return 0; }
@@ -666,5 +666,5 @@ void Processor::z_restore_undo(void) {
store((zword)restore_undo());
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor.h b/engines/glk/zcode/processor.h
similarity index 99%
rename from engines/glk/frotz/processor.h
rename to engines/glk/zcode/processor.h
index dd068f055d..6d16cb6571 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/zcode/processor.h
@@ -20,16 +20,16 @@
*
*/
-#ifndef GLK_FROTZ_PROCESSOR
-#define GLK_FROTZ_PROCESSOR
+#ifndef GLK_ZCODE_PROCESSOR
+#define GLK_ZCODE_PROCESSOR
-#include "glk/frotz/mem.h"
-#include "glk/frotz/glk_interface.h"
-#include "glk/frotz/frotz_types.h"
+#include "glk/zcode/mem.h"
+#include "glk/zcode/glk_interface.h"
+#include "glk/zcode/frotz_types.h"
#include "common/stack.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define TEXT_BUFFER_SIZE 200
@@ -1757,7 +1757,7 @@ public:
/**@}*/
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/processor_buffer.cpp b/engines/glk/zcode/processor_buffer.cpp
similarity index 98%
rename from engines/glk/frotz/processor_buffer.cpp
rename to engines/glk/zcode/processor_buffer.cpp
index 734a5309fc..00f51412d8 100644
--- a/engines/glk/frotz/processor_buffer.cpp
+++ b/engines/glk/zcode/processor_buffer.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
#include "common/algorithm.h"
#include "common/textconsole.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
const char *const Processor::ERR_MESSAGES[ERR_NUM_ERRORS] = {
"Text buffer overflow",
@@ -187,5 +187,5 @@ void Processor::runtimeError(ErrorCode errNum) {
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_input.cpp b/engines/glk/zcode/processor_input.cpp
similarity index 98%
rename from engines/glk/frotz/processor_input.cpp
rename to engines/glk/zcode/processor_input.cpp
index f9dc66f10b..e5dbe6cb74 100644
--- a/engines/glk/frotz/processor_input.cpp
+++ b/engines/glk/zcode/processor_input.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define INPUT_BUFFER_SIZE 200
@@ -219,5 +219,5 @@ void Processor::z_read_mouse() {
storew((zword)(zargs[0] + 6), menu_selected); // menu selection
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_maths.cpp b/engines/glk/zcode/processor_maths.cpp
similarity index 96%
rename from engines/glk/frotz/processor_maths.cpp
rename to engines/glk/zcode/processor_maths.cpp
index 635a9b596c..b640faa560 100644
--- a/engines/glk/frotz/processor_maths.cpp
+++ b/engines/glk/zcode/processor_maths.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void Processor::z_add() {
store((zword)((short)zargs[0] + (short)zargs[1]));
@@ -101,5 +101,5 @@ void Processor::z_test() {
branch((zargs[0] & zargs[1]) == zargs[1]);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_mem.cpp b/engines/glk/zcode/processor_mem.cpp
similarity index 98%
rename from engines/glk/frotz/processor_mem.cpp
rename to engines/glk/zcode/processor_mem.cpp
index e3bd59660f..31d7394544 100644
--- a/engines/glk/frotz/processor_mem.cpp
+++ b/engines/glk/zcode/processor_mem.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void Processor::flagsChanged(zbyte value) {
if (value & SCRIPTING_FLAG) {
@@ -214,5 +214,5 @@ void Processor::memory_close(void) {
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_objects.cpp b/engines/glk/zcode/processor_objects.cpp
similarity index 99%
rename from engines/glk/frotz/processor_objects.cpp
rename to engines/glk/zcode/processor_objects.cpp
index 9e71ba96f2..b03bfc733f 100644
--- a/engines/glk/frotz/processor_objects.cpp
+++ b/engines/glk/zcode/processor_objects.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#define MAX_OBJECT 2000
@@ -728,5 +728,5 @@ void Processor::z_test_attr() {
branch(value & (0x80 >> (zargs[1] & 7)));
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_screen.cpp b/engines/glk/zcode/processor_screen.cpp
similarity index 99%
rename from engines/glk/frotz/processor_screen.cpp
rename to engines/glk/zcode/processor_screen.cpp
index 1dcd78afa8..e05ac1a0ea 100644
--- a/engines/glk/frotz/processor_screen.cpp
+++ b/engines/glk/zcode/processor_screen.cpp
@@ -20,13 +20,13 @@
*
*/
-#include "glk/frotz/processor.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/processor.h"
+#include "glk/zcode/zcode.h"
#include "glk/conf.h"
#include "glk/events.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void Processor::screen_mssg_on() {
Window &w = _wp.currWin();
@@ -503,5 +503,5 @@ void Processor::z_split_window() {
split_window(zargs[0]);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_streams.cpp b/engines/glk/zcode/processor_streams.cpp
similarity index 99%
rename from engines/glk/frotz/processor_streams.cpp
rename to engines/glk/zcode/processor_streams.cpp
index 3b414afae8..91266c6bd0 100644
--- a/engines/glk/frotz/processor_streams.cpp
+++ b/engines/glk/zcode/processor_streams.cpp
@@ -20,11 +20,11 @@
*
*/
-#include "glk/frotz/processor.h"
-#include "glk/frotz/quetzal.h"
+#include "glk/zcode/processor.h"
+#include "glk/zcode/quetzal.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
zchar Processor::console_read_input(int max, zchar *buf, zword timeout, bool continued) {
return os_read_line(max, buf, timeout, max, continued);
@@ -622,5 +622,5 @@ void Processor::z_verify() {
branch(checksum == h_checksum);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_table.cpp b/engines/glk/zcode/processor_table.cpp
similarity index 96%
rename from engines/glk/frotz/processor_table.cpp
rename to engines/glk/zcode/processor_table.cpp
index c3c994a30c..ad139d0840 100644
--- a/engines/glk/frotz/processor_table.cpp
+++ b/engines/glk/zcode/processor_table.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void Processor::z_copy_table() {
zword addr;
@@ -116,5 +116,5 @@ void Processor::z_storew() {
storew((zword)(zargs[0] + 2 * zargs[1]), zargs[2]);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_text.cpp b/engines/glk/zcode/processor_text.cpp
similarity index 99%
rename from engines/glk/frotz/processor_text.cpp
rename to engines/glk/zcode/processor_text.cpp
index 22dc8851e3..0ae27d763b 100644
--- a/engines/glk/frotz/processor_text.cpp
+++ b/engines/glk/zcode/processor_text.cpp
@@ -20,11 +20,11 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
#include "common/ustr.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
zchar Processor::ZSCII_TO_LATIN1[] = {
0x0e4, 0x0f6, 0x0fc, 0x0c4, 0x0d6, 0x0dc, 0x0df, 0x0bb,
@@ -906,5 +906,5 @@ void Processor::z_tokenise() {
tokenise_line(zargs[0], zargs[1], zargs[2], zargs[3] != 0);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_variables.cpp b/engines/glk/zcode/processor_variables.cpp
similarity index 97%
rename from engines/glk/frotz/processor_variables.cpp
rename to engines/glk/zcode/processor_variables.cpp
index 875572d8da..c5283e299b 100644
--- a/engines/glk/frotz/processor_variables.cpp
+++ b/engines/glk/zcode/processor_variables.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void Processor::z_dec() {
zword value;
@@ -195,5 +195,5 @@ void Processor::z_store() {
}
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/processor_windows.cpp b/engines/glk/zcode/processor_windows.cpp
similarity index 98%
rename from engines/glk/frotz/processor_windows.cpp
rename to engines/glk/zcode/processor_windows.cpp
index 3508bca6fc..79549bbe5d 100644
--- a/engines/glk/frotz/processor_windows.cpp
+++ b/engines/glk/zcode/processor_windows.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
static struct {
Story story_id;
@@ -297,5 +297,5 @@ zword Processor::winarg2() {
return zargs[2];
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/quetzal.cpp b/engines/glk/zcode/quetzal.cpp
similarity index 99%
rename from engines/glk/frotz/quetzal.cpp
rename to engines/glk/zcode/quetzal.cpp
index 79747bde21..8d3d1b9f2b 100644
--- a/engines/glk/frotz/quetzal.cpp
+++ b/engines/glk/zcode/quetzal.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/frotz/quetzal.h"
-#include "glk/frotz/processor.h"
+#include "glk/zcode/quetzal.h"
+#include "glk/zcode/processor.h"
#include "common/memstream.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Various parsing states within restoration.
@@ -417,5 +417,5 @@ int Quetzal::restore(Common::SeekableReadStream *sv, Processor *proc) {
return (progress == GOT_ALL ? 2 : fatal);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/quetzal.h b/engines/glk/zcode/quetzal.h
similarity index 93%
rename from engines/glk/frotz/quetzal.h
rename to engines/glk/zcode/quetzal.h
index ee3f3b3205..d51acee914 100644
--- a/engines/glk/frotz/quetzal.h
+++ b/engines/glk/zcode/quetzal.h
@@ -20,15 +20,15 @@
*
*/
-#ifndef GLK_FROTZ_QUETZAL
-#define GLK_FROTZ_QUETZAL
+#ifndef GLK_ZCODE_QUETZAL
+#define GLK_ZCODE_QUETZAL
#include "glk/glk_types.h"
#include "glk/quetzal.h"
-#include "glk/frotz/frotz_types.h"
+#include "glk/zcode/frotz_types.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
class Processor;
@@ -63,7 +63,7 @@ public:
int restore(Common::SeekableReadStream *svf, Processor *proc);
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/zcode/screen.cpp
similarity index 96%
rename from engines/glk/frotz/screen.cpp
rename to engines/glk/zcode/screen.cpp
index 4a2eff677c..187cc0c8b6 100644
--- a/engines/glk/frotz/screen.cpp
+++ b/engines/glk/zcode/screen.cpp
@@ -20,16 +20,16 @@
*
*/
-#include "glk/frotz/screen.h"
-#include "glk/frotz/bitmap_font.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/screen.h"
+#include "glk/zcode/bitmap_font.h"
+#include "glk/zcode/zcode.h"
#include "glk/conf.h"
#include "common/file.h"
#include "graphics/fonts/ttf.h"
#include "image/bmp.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
FrotzScreen::FrotzScreen() : Glk::Screen() {
g_conf->_tStyles[style_User1].font = CUSTOM;
@@ -130,5 +130,5 @@ void FrotzScreen::loadExtraFonts(Common::Archive *archive) {
f.close();
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/screen.h b/engines/glk/zcode/screen.h
similarity index 94%
rename from engines/glk/frotz/screen.h
rename to engines/glk/zcode/screen.h
index dad05f997a..a41846efc9 100644
--- a/engines/glk/frotz/screen.h
+++ b/engines/glk/zcode/screen.h
@@ -20,13 +20,13 @@
*
*/
-#ifndef GLK_FROTZ_FONTS
-#define GLK_FROTZ_FONTS
+#ifndef GLK_ZCODE_FONTS
+#define GLK_ZCODE_FONTS
#include "glk/screen.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Derived screen class that adds in the Infocom character graphics font
@@ -54,7 +54,7 @@ public:
FrotzScreen();
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/sound_folder.cpp b/engines/glk/zcode/sound_folder.cpp
similarity index 98%
rename from engines/glk/frotz/sound_folder.cpp
rename to engines/glk/zcode/sound_folder.cpp
index 761978eaea..2543171890 100644
--- a/engines/glk/frotz/sound_folder.cpp
+++ b/engines/glk/zcode/sound_folder.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/frotz/sound_folder.h"
+#include "glk/zcode/sound_folder.h"
#include "common/file.h"
#include "common/unzip.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
void SoundSubfolder::check(const Common::FSNode &gameDir) {
Common::FSNode sound = gameDir.getChild("sound");
@@ -142,5 +142,5 @@ Common::SeekableReadStream *SoundZip::createReadStreamForMember(const Common::St
return _zip->createReadStreamForMember(_filenames[name]);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/sound_folder.h b/engines/glk/zcode/sound_folder.h
similarity index 96%
rename from engines/glk/frotz/sound_folder.h
rename to engines/glk/zcode/sound_folder.h
index 6ea198ddee..2da45c272c 100644
--- a/engines/glk/frotz/sound_folder.h
+++ b/engines/glk/zcode/sound_folder.h
@@ -20,16 +20,16 @@
*
*/
-#ifndef GLK_FROTZ_SOUND_FOLDER_H
-#define GLK_FROTZ_SOUND_FOLDER_H
+#ifndef GLK_ZCODE_SOUND_FOLDER_H
+#define GLK_ZCODE_SOUND_FOLDER_H
-#include "glk/frotz/frotz_types.h"
+#include "glk/zcode/frotz_types.h"
#include "common/archive.h"
#include "common/fs.h"
#include "common/hash-str.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
/**
* Acts as an interface to an Infocom sound subfolder for the Lurking Horror or
@@ -132,7 +132,7 @@ public:
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const override;
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/zcode/windows.cpp
similarity index 99%
rename from engines/glk/frotz/windows.cpp
rename to engines/glk/zcode/windows.cpp
index be65e8eb06..d00f8b66fd 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/zcode/windows.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "glk/frotz/windows.h"
-#include "glk/frotz/frotz.h"
+#include "glk/zcode/windows.h"
+#include "glk/zcode/zcode.h"
#include "glk/window_pair.h"
#include "glk/window_graphics.h"
#include "glk/window_text_buffer.h"
@@ -29,7 +29,7 @@
#include "glk/conf.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
Windows::Windows() : _lower(_windows[0]), _upper(_windows[1]), _background(nullptr), _cwin(0) {
}
@@ -441,5 +441,5 @@ bool Window::imageDrawScaled(uint image, int val1, int val2, uint width, uint he
return g_vm->glk_image_draw_scaled(_win, image, val1, val2, width, height);
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/windows.h b/engines/glk/zcode/windows.h
similarity index 97%
rename from engines/glk/frotz/windows.h
rename to engines/glk/zcode/windows.h
index 6c8ce703ac..99b0c62f6c 100644
--- a/engines/glk/frotz/windows.h
+++ b/engines/glk/zcode/windows.h
@@ -20,14 +20,14 @@
*
*/
-#ifndef GLK_FROTZ_WINDOWS
-#define GLK_FROTZ_WINDOWS
+#ifndef GLK_ZCODE_WINDOWS
+#define GLK_ZCODE_WINDOWS
#include "glk/windows.h"
-#include "glk/frotz/frotz_types.h"
+#include "glk/zcode/frotz_types.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
#include "glk/windows.h"
#include "glk/utils.h"
@@ -292,7 +292,7 @@ public:
void showTextWindows();
};
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
diff --git a/engines/glk/frotz/frotz.cpp b/engines/glk/zcode/zcode.cpp
similarity index 87%
rename from engines/glk/frotz/frotz.cpp
rename to engines/glk/zcode/zcode.cpp
index 34751b2641..66df44cb70 100644
--- a/engines/glk/frotz/frotz.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -20,29 +20,29 @@
*
*/
-#include "glk/frotz/frotz.h"
-#include "glk/frotz/frotz_types.h"
-#include "glk/frotz/screen.h"
-#include "glk/frotz/quetzal.h"
+#include "glk/zcode/zcode.h"
+#include "glk/zcode/frotz_types.h"
+#include "glk/zcode/screen.h"
+#include "glk/zcode/quetzal.h"
#include "engines/util.h"
#include "common/config-manager.h"
#include "common/translation.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
-Frotz *g_vm;
+ZCode *g_vm;
-Frotz::Frotz(OSystem *syst, const GlkGameDescription &gameDesc) :
+ZCode::ZCode(OSystem *syst, const GlkGameDescription &gameDesc) :
Processor(syst, gameDesc) {
g_vm = this;
}
-Frotz::~Frotz() {
+ZCode::~ZCode() {
reset_memory();
}
-void Frotz::initGraphicsMode() {
+void ZCode::initGraphicsMode() {
_gameFile.seek(0);
byte version = _gameFile.readByte();
@@ -55,11 +55,11 @@ void Frotz::initGraphicsMode() {
}
}
-Screen *Frotz::createScreen() {
+Screen *ZCode::createScreen() {
return new FrotzScreen();
}
-void Frotz::runGame() {
+void ZCode::runGame() {
story_fp = &_gameFile;
initialize();
@@ -83,7 +83,7 @@ void Frotz::runGame() {
}
}
-void Frotz::initialize() {
+void ZCode::initialize() {
// Call process initialization
Processor::initialize();
@@ -91,7 +91,7 @@ void Frotz::initialize() {
z_restart();
}
-Common::Error Frotz::loadGameState(int slot) {
+Common::Error ZCode::loadGameState(int slot) {
FileReference ref(slot, "", fileusage_SavedGame | fileusage_TextMode);
strid_t file = _streams->openFileStream(&ref, filemode_Read);
@@ -129,7 +129,7 @@ Common::Error Frotz::loadGameState(int slot) {
return Common::kNoError;
}
-Common::Error Frotz::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
+Common::Error ZCode::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
Common::String msg;
FileReference ref(slot, desc, fileusage_BinaryMode | fileusage_SavedGame);
@@ -147,5 +147,5 @@ Common::Error Frotz::saveGameState(int slot, const Common::String &desc, bool is
}
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
diff --git a/engines/glk/frotz/frotz.h b/engines/glk/zcode/zcode.h
similarity index 89%
rename from engines/glk/frotz/frotz.h
rename to engines/glk/zcode/zcode.h
index 87eb13e5d2..7fbc795ad2 100644
--- a/engines/glk/frotz/frotz.h
+++ b/engines/glk/zcode/zcode.h
@@ -20,20 +20,20 @@
*
*/
-#ifndef GLK_FROTZ_FROTZ
-#define GLK_FROTZ_FROTZ
+#ifndef GLK_ZCODE_ZCODE
+#define GLK_ZCODE_ZCODE
-#include "glk/frotz/processor.h"
+#include "glk/zcode/processor.h"
namespace Glk {
-namespace Frotz {
+namespace ZCode {
class FrotzScreen;
/**
* Frotz interpreter for Z-code games
*/
-class Frotz : public Processor {
+class ZCode : public Processor {
friend class FrotzScreen;
protected:
/**
@@ -49,12 +49,12 @@ public:
/**
* Constructor
*/
- Frotz(OSystem *syst, const GlkGameDescription &gameDesc);
+ ZCode(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Destructor
*/
- ~Frotz() override;
+ ~ZCode() override;
/**
* Initialization
@@ -93,9 +93,9 @@ public:
};
-extern Frotz *g_vm;
+extern ZCode *g_vm;
-} // End of namespace Frotz
+} // End of namespace ZCode
} // End of namespace Glk
#endif
More information about the Scummvm-git-logs
mailing list