[Scummvm-git-logs] scummvm master -> 567e37fba85f3a245727c91cfd47050502d0ed6e
dreammaster
paulfgilbert at gmail.com
Mon Aug 24 04:28:34 UTC 2020
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
446bd502f5 GLK: GLULX: Rename glulxe to glulx for subengine consistency
41f9917136 GLK: COMPREHEND: Fix loading v2 games
567e37fba8 GLK: GLULX: Add detection entries
Commit: 446bd502f5c4bf27744cc6d822e467bae7be076d
https://github.com/scummvm/scummvm/commit/446bd502f5c4bf27744cc6d822e467bae7be076d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-08-23T21:27:49-07:00
Commit Message:
GLK: GLULX: Rename glulxe to glulx for subengine consistency
Changed paths:
A engines/glk/glulx/accel.cpp
A engines/glk/glulx/detection.cpp
A engines/glk/glulx/detection.h
A engines/glk/glulx/detection_tables.h
A engines/glk/glulx/exec.cpp
A engines/glk/glulx/float.cpp
A engines/glk/glulx/float.h
A engines/glk/glulx/funcs.cpp
A engines/glk/glulx/gestalt.cpp
A engines/glk/glulx/glkop.cpp
A engines/glk/glulx/glulx.cpp
A engines/glk/glulx/glulx.h
A engines/glk/glulx/glulx_types.h
A engines/glk/glulx/heap.cpp
A engines/glk/glulx/operand.cpp
A engines/glk/glulx/search.cpp
A engines/glk/glulx/serial.cpp
A engines/glk/glulx/string.cpp
A engines/glk/glulx/vm.cpp
R engines/glk/glulxe/accel.cpp
R engines/glk/glulxe/detection.cpp
R engines/glk/glulxe/detection.h
R engines/glk/glulxe/detection_tables.h
R engines/glk/glulxe/exec.cpp
R engines/glk/glulxe/float.cpp
R engines/glk/glulxe/float.h
R engines/glk/glulxe/funcs.cpp
R engines/glk/glulxe/gestalt.cpp
R engines/glk/glulxe/glkop.cpp
R engines/glk/glulxe/glulxe.cpp
R engines/glk/glulxe/glulxe.h
R engines/glk/glulxe/glulxe_types.h
R engines/glk/glulxe/heap.cpp
R engines/glk/glulxe/operand.cpp
R engines/glk/glulxe/search.cpp
R engines/glk/glulxe/serial.cpp
R engines/glk/glulxe/string.cpp
R engines/glk/glulxe/vm.cpp
engines/glk/POTFILES
engines/glk/detection.cpp
engines/glk/module.mk
diff --git a/engines/glk/POTFILES b/engines/glk/POTFILES
index ef29a25887..541bec344a 100644
--- a/engines/glk/POTFILES
+++ b/engines/glk/POTFILES
@@ -7,6 +7,6 @@ engines/glk/advsys/vm.cpp
engines/glk/alan2/alan2.cpp
engines/glk/zcode/detection.cpp
engines/glk/zcode/zcode.cpp
-engines/glk/glulxe/glulxe.cpp
+engines/glk/glulx/glulx.cpp
engines/glk/magnetic/magnetic.cpp
engines/glk/scott/scott.cpp
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index 4c045f423b..15ab8fdc2f 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -39,8 +39,8 @@
#include "glk/comprehend/detection.h"
#include "glk/zcode/detection.h"
#include "glk/zcode/zcode.h"
-#include "glk/glulxe/detection.h"
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/detection.h"
+#include "glk/glulx/glulx.h"
#include "glk/hugo/detection.h"
#include "glk/hugo/hugo.h"
#include "glk/jacl/detection.h"
@@ -209,7 +209,7 @@ 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::Glulxe::GlulxeMetaEngine, Glk::Glulxe::Glulxe>(syst, gameDesc, *engine))) {}
+ else if ((create<Glk::Glulx::GlulxMetaEngine, Glk::Glulx::Glulx>(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))) {}
else if ((create<Glk::Level9::Level9MetaEngine, Glk::Level9::Level9>(syst, gameDesc, *engine))) {}
@@ -262,7 +262,7 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
Glk::Alan3::Alan3MetaEngine::getSupportedGames(list);
Glk::Archetype::ArchetypeMetaEngine::getSupportedGames(list);
Glk::Comprehend::ComprehendMetaEngine::getSupportedGames(list);
- Glk::Glulxe::GlulxeMetaEngine::getSupportedGames(list);
+ Glk::Glulx::GlulxMetaEngine::getSupportedGames(list);
Glk::Hugo::HugoMetaEngine::getSupportedGames(list);
Glk::JACL::JACLMetaEngine::getSupportedGames(list);
Glk::Level9::Level9MetaEngine::getSupportedGames(list);
@@ -287,7 +287,7 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
FIND_GAME(Alan3);
FIND_GAME(Archetype);
FIND_GAME(Comprehend);
- FIND_GAME(Glulxe);
+ FIND_GAME(Glulx);
FIND_GAME(Hugo);
FIND_GAME(JACL);
FIND_GAME(Level9);
@@ -314,7 +314,7 @@ 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::Glulxe::GlulxeMetaEngine::detectGames(fslist, detectedGames);
+ Glk::Glulx::GlulxMetaEngine::detectGames(fslist, detectedGames);
Glk::Hugo::HugoMetaEngine::detectGames(fslist, detectedGames);
Glk::JACL::JACLMetaEngine::detectGames(fslist, detectedGames);
Glk::Level9::Level9MetaEngine::detectGames(fslist, detectedGames);
@@ -336,7 +336,7 @@ void GlkMetaEngine::detectClashes() const {
Glk::Alan3::Alan3MetaEngine::detectClashes(map);
Glk::Archetype::ArchetypeMetaEngine::detectClashes(map);
Glk::Comprehend::ComprehendMetaEngine::detectClashes(map);
- Glk::Glulxe::GlulxeMetaEngine::detectClashes(map);
+ Glk::Glulx::GlulxMetaEngine::detectClashes(map);
Glk::Hugo::HugoMetaEngine::detectClashes(map);
Glk::JACL::JACLMetaEngine::detectClashes(map);
Glk::Level9::Level9MetaEngine::detectClashes(map);
diff --git a/engines/glk/glulxe/accel.cpp b/engines/glk/glulx/accel.cpp
similarity index 87%
rename from engines/glk/glulxe/accel.cpp
rename to engines/glk/glulx/accel.cpp
index 1d0b9e5db4..e86980c455 100644
--- a/engines/glk/glulxe/accel.cpp
+++ b/engines/glk/glulx/accel.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
/**
* Git passes along function arguments in reverse order. To make our lives more interesting
@@ -40,41 +40,41 @@ namespace Glulxe {
*/
#define ARG_IF_GIVEN(argv, argc, ix) ((argc > ix) ? (ARG(argv, argc, ix)) : 0)
-acceleration_func Glulxe::accel_find_func(uint index) {
+acceleration_func Glulx::accel_find_func(uint index) {
switch (index) {
case 0:
return nullptr; // 0 always means no acceleration
case 1:
- return &Glulxe::func_1_z__region;
+ return &Glulx::func_1_z__region;
case 2:
- return &Glulxe::func_2_cp__tab;
+ return &Glulx::func_2_cp__tab;
case 3:
- return &Glulxe::func_3_ra__pr;
+ return &Glulx::func_3_ra__pr;
case 4:
- return &Glulxe::func_4_rl__pr;
+ return &Glulx::func_4_rl__pr;
case 5:
- return &Glulxe::func_5_oc__cl;
+ return &Glulx::func_5_oc__cl;
case 6:
- return &Glulxe::func_6_rv__pr;
+ return &Glulx::func_6_rv__pr;
case 7:
- return &Glulxe::func_7_op__pr;
+ return &Glulx::func_7_op__pr;
case 8:
- return &Glulxe::func_8_cp__tab;
+ return &Glulx::func_8_cp__tab;
case 9:
- return &Glulxe::func_9_ra__pr;
+ return &Glulx::func_9_ra__pr;
case 10:
- return &Glulxe::func_10_rl__pr;
+ return &Glulx::func_10_rl__pr;
case 11:
- return &Glulxe::func_11_oc__cl;
+ return &Glulx::func_11_oc__cl;
case 12:
- return &Glulxe::func_12_rv__pr;
+ return &Glulx::func_12_rv__pr;
case 13:
- return &Glulxe::func_13_op__pr;
+ return &Glulx::func_13_op__pr;
}
return nullptr;
}
-acceleration_func Glulxe::accel_get_func(uint addr) {
+acceleration_func Glulx::accel_get_func(uint addr) {
int bucknum;
accelentry_t *ptr;
@@ -89,7 +89,7 @@ acceleration_func Glulxe::accel_get_func(uint addr) {
return nullptr;
}
-void Glulxe::accel_iterate_funcs(void (*func)(uint index, uint addr)) {
+void Glulx::accel_iterate_funcs(void (*func)(uint index, uint addr)) {
int bucknum;
accelentry_t *ptr;
@@ -105,7 +105,7 @@ void Glulxe::accel_iterate_funcs(void (*func)(uint index, uint addr)) {
}
}
-void Glulxe::accel_set_func(uint index, uint addr) {
+void Glulx::accel_set_func(uint index, uint addr) {
int bucknum;
accelentry_t *ptr;
int functype;
@@ -152,7 +152,7 @@ void Glulxe::accel_set_func(uint index, uint addr) {
ptr->func = new_func;
}
-void Glulxe::accel_set_param(uint index, uint val) {
+void Glulx::accel_set_param(uint index, uint val) {
switch (index) {
case 0:
classes_table = val;
@@ -184,11 +184,11 @@ void Glulxe::accel_set_param(uint index, uint val) {
}
}
-uint Glulxe::accel_get_param_count() const {
+uint Glulx::accel_get_param_count() const {
return 9;
}
-uint Glulxe::accel_get_param(uint index) const {
+uint Glulx::accel_get_param(uint index) const {
switch (index) {
case 0:
return classes_table;
@@ -213,18 +213,18 @@ uint Glulxe::accel_get_param(uint index) const {
}
}
-void Glulxe::accel_error(const char *msg) {
+void Glulx::accel_error(const char *msg) {
glk_put_char('\n');
glk_put_string(msg);
glk_put_char('\n');
}
-int Glulxe::obj_in_class(uint obj) {
+int Glulx::obj_in_class(uint obj) {
// This checks whether obj is contained in Class, not whether it is a member of Class
return (Mem4(obj + 13 + num_attr_bytes) == class_metaclass);
}
-uint Glulxe::get_prop(uint obj, uint id) {
+uint Glulx::get_prop(uint obj, uint id) {
uint cla = 0;
uint prop;
uint call_argv[2];
@@ -258,7 +258,7 @@ uint Glulxe::get_prop(uint obj, uint id) {
return prop;
}
-uint Glulxe::get_prop_new(uint obj, uint id) {
+uint Glulx::get_prop_new(uint obj, uint id) {
uint cla = 0;
uint prop;
uint call_argv[2];
@@ -292,7 +292,7 @@ uint Glulxe::get_prop_new(uint obj, uint id) {
return prop;
}
-uint Glulxe::func_1_z__region(uint argc, uint *argv) {
+uint Glulx::func_1_z__region(uint argc, uint *argv) {
uint addr;
uint tb;
@@ -318,7 +318,7 @@ uint Glulxe::func_1_z__region(uint argc, uint *argv) {
return 0;
}
-uint Glulxe::func_2_cp__tab(uint argc, uint *argv) {
+uint Glulx::func_2_cp__tab(uint argc, uint *argv) {
uint obj;
uint id;
uint otab, max;
@@ -341,7 +341,7 @@ uint Glulxe::func_2_cp__tab(uint argc, uint *argv) {
return binary_search(id, 2, otab, 10, max, 0, 0);
}
-uint Glulxe::func_3_ra__pr(uint argc, uint *argv) {
+uint Glulx::func_3_ra__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint prop;
@@ -356,7 +356,7 @@ uint Glulxe::func_3_ra__pr(uint argc, uint *argv) {
return Mem4(prop + 4);
}
-uint Glulxe::func_4_rl__pr(uint argc, uint *argv) {
+uint Glulx::func_4_rl__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint prop;
@@ -371,7 +371,7 @@ uint Glulxe::func_4_rl__pr(uint argc, uint *argv) {
return 4 * Mem2(prop + 2);
}
-uint Glulxe::func_5_oc__cl(uint argc, uint *argv) {
+uint Glulx::func_5_oc__cl(uint argc, uint *argv) {
uint obj;
uint cla;
uint zr, prop, inlist, inlistlen, jx;
@@ -437,7 +437,7 @@ uint Glulxe::func_5_oc__cl(uint argc, uint *argv) {
return 0;
}
-uint Glulxe::func_6_rv__pr(uint argc, uint *argv) {
+uint Glulx::func_6_rv__pr(uint argc, uint *argv) {
uint id;
uint addr;
@@ -456,7 +456,7 @@ uint Glulxe::func_6_rv__pr(uint argc, uint *argv) {
return Mem4(addr);
}
-uint Glulxe::func_7_op__pr(uint argc, uint *argv) {
+uint Glulx::func_7_op__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint zr;
@@ -489,7 +489,7 @@ uint Glulxe::func_7_op__pr(uint argc, uint *argv) {
return ((func_3_ra__pr(argc, argv)) ? 1 : 0);
}
-uint Glulxe::func_8_cp__tab(uint argc, uint *argv) {
+uint Glulx::func_8_cp__tab(uint argc, uint *argv) {
uint obj;
uint id;
uint otab, max;
@@ -512,7 +512,7 @@ uint Glulxe::func_8_cp__tab(uint argc, uint *argv) {
return binary_search(id, 2, otab, 10, max, 0, 0);
}
-uint Glulxe::func_9_ra__pr(uint argc, uint *argv) {
+uint Glulx::func_9_ra__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint prop;
@@ -527,7 +527,7 @@ uint Glulxe::func_9_ra__pr(uint argc, uint *argv) {
return Mem4(prop + 4);
}
-uint Glulxe::func_10_rl__pr(uint argc, uint *argv) {
+uint Glulx::func_10_rl__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint prop;
@@ -542,7 +542,7 @@ uint Glulxe::func_10_rl__pr(uint argc, uint *argv) {
return 4 * Mem2(prop + 2);
}
-uint Glulxe::func_11_oc__cl(uint argc, uint *argv) {
+uint Glulx::func_11_oc__cl(uint argc, uint *argv) {
uint obj;
uint cla;
uint zr, prop, inlist, inlistlen, jx;
@@ -608,7 +608,7 @@ uint Glulxe::func_11_oc__cl(uint argc, uint *argv) {
return 0;
}
-uint Glulxe::func_12_rv__pr(uint argc, uint *argv) {
+uint Glulx::func_12_rv__pr(uint argc, uint *argv) {
uint id;
uint addr;
@@ -627,7 +627,7 @@ uint Glulxe::func_12_rv__pr(uint argc, uint *argv) {
return Mem4(addr);
}
-uint Glulxe::func_13_op__pr(uint argc, uint *argv) {
+uint Glulx::func_13_op__pr(uint argc, uint *argv) {
uint obj;
uint id;
uint zr;
@@ -660,5 +660,5 @@ uint Glulxe::func_13_op__pr(uint argc, uint *argv) {
return ((func_9_ra__pr(argc, argv)) ? 1 : 0);
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/detection.cpp b/engines/glk/glulx/detection.cpp
similarity index 88%
rename from engines/glk/glulxe/detection.cpp
rename to engines/glk/glulx/detection.cpp
index 5a6ed68566..c36fef7ed2 100644
--- a/engines/glk/glulxe/detection.cpp
+++ b/engines/glk/glulx/detection.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "glk/glulxe/detection.h"
-#include "glk/glulxe/detection_tables.h"
+#include "glk/glulx/detection.h"
+#include "glk/glulx/detection_tables.h"
#include "glk/blorb.h"
#include "common/debug.h"
#include "common/file.h"
@@ -29,15 +29,15 @@
#include "engines/game.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void GlulxeMetaEngine::getSupportedGames(PlainGameList &games) {
+void GlulxMetaEngine::getSupportedGames(PlainGameList &games) {
for (const PlainGameDescriptor *pd = GLULXE_GAME_LIST; pd->gameId; ++pd) {
games.push_back(*pd);
}
}
-GameDescriptor GlulxeMetaEngine::findGame(const char *gameId) {
+GameDescriptor GlulxMetaEngine::findGame(const char *gameId) {
for (const PlainGameDescriptor *pd = GLULXE_GAME_LIST; pd->gameId; ++pd) {
if (!strcmp(gameId, pd->gameId)) {
GameDescriptor gd = *pd;
@@ -49,7 +49,7 @@ GameDescriptor GlulxeMetaEngine::findGame(const char *gameId) {
return GameDescriptor::empty();
}
-bool GlulxeMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
+bool GlulxMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
const char *const EXTENSIONS[] = { ".ulx", nullptr };
// Loop through the files of the folder
@@ -94,7 +94,7 @@ bool GlulxeMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &
return !gameList.empty();
}
-void GlulxeMetaEngine::detectClashes(Common::StringMap &map) {
+void GlulxMetaEngine::detectClashes(Common::StringMap &map) {
for (const PlainGameDescriptor *pd = GLULXE_GAME_LIST; pd->gameId; ++pd) {
if (map.contains(pd->gameId))
error("Duplicate game Id found - %s", pd->gameId);
@@ -102,5 +102,5 @@ void GlulxeMetaEngine::detectClashes(Common::StringMap &map) {
}
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/detection.h b/engines/glk/glulx/detection.h
similarity index 93%
rename from engines/glk/glulxe/detection.h
rename to engines/glk/glulx/detection.h
index 9c38354f98..5901e465ce 100644
--- a/engines/glk/glulxe/detection.h
+++ b/engines/glk/glulx/detection.h
@@ -29,12 +29,12 @@
#include "glk/detection.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
/**
- * Meta engine for Glulxe interpreter
+ * Meta engine for Glulx interpreter
*/
-class GlulxeMetaEngine {
+class GlulxMetaEngine {
public:
/**
* Get a list of supported games
@@ -57,7 +57,7 @@ public:
static void detectClashes(Common::StringMap &map);
};
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
#endif
diff --git a/engines/glk/glulxe/detection_tables.h b/engines/glk/glulx/detection_tables.h
similarity index 99%
rename from engines/glk/glulxe/detection_tables.h
rename to engines/glk/glulx/detection_tables.h
index aa7d503788..b31e952848 100644
--- a/engines/glk/glulxe/detection_tables.h
+++ b/engines/glk/glulx/detection_tables.h
@@ -25,7 +25,7 @@
#include "common/language.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
const PlainGameDescriptor GLULXE_GAME_LIST[] = {
{ "glulx", "Glulx Game" },
@@ -606,5 +606,5 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_END_MARKER
};
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/exec.cpp b/engines/glk/glulx/exec.cpp
similarity index 99%
rename from engines/glk/glulxe/exec.cpp
rename to engines/glk/glulx/exec.cpp
index 5540e1f72d..fc1d202aae 100644
--- a/engines/glk/glulxe/exec.cpp
+++ b/engines/glk/glulx/exec.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void Glulxe::execute_loop() {
+void Glulx::execute_loop() {
bool done_executing = false;
int ix;
uint opcode;
@@ -1055,5 +1055,5 @@ PerformJump: /* goto label for successful jumping... ironic, no? */
#endif /* VM_DEBUGGER */
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/float.cpp b/engines/glk/glulx/float.cpp
similarity index 94%
rename from engines/glk/glulxe/float.cpp
rename to engines/glk/glulx/float.cpp
index c978ef9c7f..cf53d3921c 100644
--- a/engines/glk/glulxe/float.cpp
+++ b/engines/glk/glulx/float.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-uint Glulxe::encode_float(gfloat32 val) {
+uint Glulx::encode_float(gfloat32 val) {
gfloat32 absval;
uint sign;
int expo;
@@ -85,7 +85,7 @@ uint Glulxe::encode_float(gfloat32 val) {
return (sign) | ((uint)(expo << 23)) | (fbits);
}
-gfloat32 Glulxe::decode_float(uint val) {
+gfloat32 Glulx::decode_float(uint val) {
int sign;
int expo;
uint mant;
@@ -119,5 +119,5 @@ gfloat32 Glulxe::decode_float(uint val) {
return (sign ? (-res) : (res));
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/float.h b/engines/glk/glulx/float.h
similarity index 95%
rename from engines/glk/glulxe/float.h
rename to engines/glk/glulx/float.h
index ed9d716764..5e18b2c354 100644
--- a/engines/glk/glulxe/float.h
+++ b/engines/glk/glulx/float.h
@@ -27,10 +27,10 @@
#include "glk/glk_api.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
#endif
diff --git a/engines/glk/glulxe/funcs.cpp b/engines/glk/glulx/funcs.cpp
similarity index 95%
rename from engines/glk/glulxe/funcs.cpp
rename to engines/glk/glulx/funcs.cpp
index a6ed1a1f99..4da0b8c516 100644
--- a/engines/glk/glulxe/funcs.cpp
+++ b/engines/glk/glulx/funcs.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void Glulxe::enter_function(uint funcaddr, uint argc, uint *argv) {
+void Glulx::enter_function(uint funcaddr, uint argc, uint *argv) {
uint ix, jx;
acceleration_func accelFunc;
int locallen;
@@ -196,12 +196,12 @@ void Glulxe::enter_function(uint funcaddr, uint argc, uint *argv) {
debugger_check_func_breakpoint(funcaddr);
}
-void Glulxe::leave_function() {
+void Glulx::leave_function() {
profile_out(stackptr);
stackptr = frameptr;
}
-void Glulxe::push_callstub(uint desttype, uint destaddr) {
+void Glulx::push_callstub(uint desttype, uint destaddr) {
if (stackptr + 16 > stacksize)
fatal_error("Stack overflow in callstub.");
StkW4(stackptr + 0, desttype);
@@ -211,7 +211,7 @@ void Glulxe::push_callstub(uint desttype, uint destaddr) {
stackptr += 16;
}
-void Glulxe::pop_callstub(uint returnvalue) {
+void Glulx::pop_callstub(uint returnvalue) {
uint desttype, destaddr;
uint newpc, newframeptr;
@@ -270,7 +270,7 @@ void Glulxe::pop_callstub(uint returnvalue) {
}
}
-uint Glulxe::pop_callstub_string(int *bitnum) {
+uint Glulx::pop_callstub_string(int *bitnum) {
uint desttype, destaddr, newpc;
if (stackptr < 16)
@@ -295,5 +295,5 @@ uint Glulxe::pop_callstub_string(int *bitnum) {
return 0;
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/gestalt.cpp b/engines/glk/glulx/gestalt.cpp
similarity index 93%
rename from engines/glk/glulxe/gestalt.cpp
rename to engines/glk/glulx/gestalt.cpp
index 18f9083b34..1300916090 100644
--- a/engines/glk/glulxe/gestalt.cpp
+++ b/engines/glk/glulx/gestalt.cpp
@@ -20,19 +20,19 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-uint Glulxe::do_gestalt(uint val, uint val2) {
+uint Glulx::do_gestalt(uint val, uint val2) {
switch (val) {
case gestulx_GlulxVersion:
return 0x00030102; /* Glulx spec version 3.1.2 */
case gestulx_TerpVersion:
- return 0x00000504; /* Glulxe version 0.5.4 */
+ return 0x00000504; /* Glulx version 0.5.4 */
case gestulx_ResizeMem:
#ifdef FIXED_MEMSIZE
@@ -97,5 +97,5 @@ uint Glulxe::do_gestalt(uint val, uint val2) {
}
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/glkop.cpp b/engines/glk/glulx/glkop.cpp
similarity index 90%
rename from engines/glk/glulxe/glkop.cpp
rename to engines/glk/glulx/glkop.cpp
index 70fb44b85e..136c57e0f4 100644
--- a/engines/glk/glulxe/glkop.cpp
+++ b/engines/glk/glulx/glkop.cpp
@@ -20,13 +20,13 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
/* This code is actually very general; it could work for almost any
- 32-bit VM which remotely resembles Glulxe or the Z-machine in design.
+ 32-bit VM which remotely resembles Glulx or the Z-machine in design.
To be precise, we make the following assumptions:
@@ -81,14 +81,14 @@ static void retained_unregister(void *array, uint len, const char *typecode, gid
g_vm->glulxe_retained_unregister(array, len, typecode, objrock);
}
-void Glulxe::glkopInit() {
+void Glulx::glkopInit() {
library_select_hook = nullptr;
arrays = nullptr;
num_classes = 0;
classes = nullptr;
}
-bool Glulxe::init_dispatch() {
+bool Glulx::init_dispatch() {
int ix;
/* Set up the game-ID hook. (This is ifdeffed because not all Glk
@@ -122,7 +122,7 @@ bool Glulxe::init_dispatch() {
return true;
}
-uint Glulxe::perform_glk(uint funcnum, uint numargs, uint *arglist) {
+uint Glulx::perform_glk(uint funcnum, uint numargs, uint *arglist) {
uint retval = 0;
switch (funcnum) {
@@ -200,7 +200,7 @@ FullDispatcher:
/* The work goes in four phases. First, we figure out how many
arguments we want, and allocate space for the Glk argument
- list. Then we go through the Glulxe arguments and load them
+ list. Then we go through the Glulx arguments and load them
into the Glk list. Then we call. Then we go through the
arguments again, unloading the data back into Glulx memory. */
@@ -229,7 +229,7 @@ FullDispatcher:
return retval;
}
-const char *Glulxe::read_prefix(const char *cx, int *isref, int *isarray, int *passin, int *passout,
+const char *Glulx::read_prefix(const char *cx, int *isref, int *isarray, int *passin, int *passout,
int *nullok, int *isretained, int *isreturn) {
*isref = false;
*passin = false;
@@ -268,7 +268,7 @@ const char *Glulxe::read_prefix(const char *cx, int *isref, int *isarray, int *p
return cx;
}
-void Glulxe::prepare_glk_args(const char *proto, dispatch_splot_t *splot) {
+void Glulx::prepare_glk_args(const char *proto, dispatch_splot_t *splot) {
static gluniversal_t *garglist = nullptr;
static int garglist_size = 0;
@@ -356,7 +356,7 @@ void Glulxe::prepare_glk_args(const char *proto, dispatch_splot_t *splot) {
splot->garglist = garglist;
}
-void Glulxe::parse_glk_args(dispatch_splot_t *splot, const char **proto, int depth, int *argnumptr,
+void Glulx::parse_glk_args(dispatch_splot_t *splot, const char **proto, int depth, int *argnumptr,
uint subaddress, int subpassin) {
const char *cx;
int ix, argx;
@@ -571,7 +571,7 @@ void Glulxe::parse_glk_args(dispatch_splot_t *splot, const char **proto, int dep
*argnumptr = gargnum;
}
-void Glulxe::unparse_glk_args(dispatch_splot_t *splot, const char **proto, int depth,
+void Glulx::unparse_glk_args(dispatch_splot_t *splot, const char **proto, int depth,
int *argnumptr, uint subaddress, int subpassout) {
const char *cx;
int ix, argx;
@@ -768,7 +768,7 @@ void Glulxe::unparse_glk_args(dispatch_splot_t *splot, const char **proto, int d
*argnumptr = gargnum;
}
-strid_t Glulxe::find_stream_by_id(uint objid) {
+strid_t Glulx::find_stream_by_id(uint objid) {
if (!objid)
return nullptr;
@@ -776,7 +776,7 @@ strid_t Glulxe::find_stream_by_id(uint objid) {
return (strid_t)classes_get(gidisp_Class_Stream, objid);
}
-uint Glulxe::find_id_for_window(winid_t win) {
+uint Glulx::find_id_for_window(winid_t win) {
gidispatch_rock_t objrock;
if (!win)
@@ -788,7 +788,7 @@ uint Glulxe::find_id_for_window(winid_t win) {
return ((classref_t *)objrock.ptr)->id;
}
-uint Glulxe::find_id_for_stream(strid_t str) {
+uint Glulx::find_id_for_stream(strid_t str) {
gidispatch_rock_t objrock;
if (!str)
@@ -800,7 +800,7 @@ uint Glulxe::find_id_for_stream(strid_t str) {
return ((classref_t *)objrock.ptr)->id;
}
-uint Glulxe::find_id_for_fileref(frefid_t fref) {
+uint Glulx::find_id_for_fileref(frefid_t fref) {
gidispatch_rock_t objrock;
if (!fref)
@@ -812,7 +812,7 @@ uint Glulxe::find_id_for_fileref(frefid_t fref) {
return ((classref_t *)objrock.ptr)->id;
}
-uint Glulxe::find_id_for_schannel(schanid_t schan) {
+uint Glulx::find_id_for_schannel(schanid_t schan) {
gidispatch_rock_t objrock;
if (!schan)
@@ -824,7 +824,7 @@ uint Glulxe::find_id_for_schannel(schanid_t schan) {
return ((classref_t *)objrock.ptr)->id;
}
-classtable_t *Glulxe::new_classtable(uint firstid) {
+classtable_t *Glulx::new_classtable(uint firstid) {
int ix;
classtable_t *ctab = (classtable_t *)glulx_malloc(sizeof(classtable_t));
if (!ctab)
@@ -838,7 +838,7 @@ classtable_t *Glulxe::new_classtable(uint firstid) {
return ctab;
}
-void *Glulxe::classes_get(int classid, uint objid) {
+void *Glulx::classes_get(int classid, uint objid) {
classtable_t *ctab;
classref_t *cref;
if (classid < 0 || classid >= num_classes)
@@ -852,7 +852,7 @@ void *Glulxe::classes_get(int classid, uint objid) {
return nullptr;
}
-classref_t *Glulxe::classes_put(int classid, void *obj, uint origid) {
+classref_t *Glulx::classes_put(int classid, void *obj, uint origid) {
int bucknum;
classtable_t *ctab;
classref_t *cref;
@@ -878,7 +878,7 @@ classref_t *Glulxe::classes_put(int classid, void *obj, uint origid) {
return cref;
}
-void Glulxe::classes_remove(int classid, void *obj) {
+void Glulx::classes_remove(int classid, void *obj) {
classtable_t *ctab;
classref_t *cref;
classref_t **crefp;
@@ -907,7 +907,7 @@ void Glulxe::classes_remove(int classid, void *obj) {
return;
}
-gidispatch_rock_t Glulxe::glulxe_classtable_register(void *obj, uint objclass) {
+gidispatch_rock_t Glulx::glulxe_classtable_register(void *obj, uint objclass) {
classref_t *cref;
gidispatch_rock_t objrock;
cref = classes_put(objclass, obj, 0);
@@ -915,12 +915,12 @@ gidispatch_rock_t Glulxe::glulxe_classtable_register(void *obj, uint objclass)
return objrock;
}
-void Glulxe::glulxe_classtable_unregister(void *obj, uint objclass,
+void Glulx::glulxe_classtable_unregister(void *obj, uint objclass,
gidispatch_rock_t objrock) {
classes_remove(objclass, obj);
}
-gidispatch_rock_t Glulxe::glulxe_classtable_register_existing(void *obj, uint objclass, uint dispid) {
+gidispatch_rock_t Glulx::glulxe_classtable_register_existing(void *obj, uint objclass, uint dispid) {
classref_t *cref;
gidispatch_rock_t objrock;
cref = classes_put(objclass, obj, dispid);
@@ -928,7 +928,7 @@ gidispatch_rock_t Glulxe::glulxe_classtable_register_existing(void *obj, uint ob
return objrock;
}
-char *Glulxe::grab_temp_c_array(uint addr, uint len, int passin) {
+char *Glulx::grab_temp_c_array(uint addr, uint len, int passin) {
arrayref_t *arref = nullptr;
char *arr = nullptr;
uint ix, addr2;
@@ -957,7 +957,7 @@ char *Glulxe::grab_temp_c_array(uint addr, uint len, int passin) {
return arr;
}
-void Glulxe::release_temp_c_array(char *arr, uint addr, uint len, int passout) {
+void Glulx::release_temp_c_array(char *arr, uint addr, uint len, int passout) {
arrayref_t *arref = nullptr;
arrayref_t **aptr;
uint ix, val, addr2;
@@ -991,7 +991,7 @@ void Glulxe::release_temp_c_array(char *arr, uint addr, uint len, int passout) {
}
}
-uint *Glulxe::grab_temp_i_array(uint addr, uint len, int passin) {
+uint *Glulx::grab_temp_i_array(uint addr, uint len, int passin) {
arrayref_t *arref = nullptr;
uint *arr = nullptr;
uint ix, addr2;
@@ -1020,7 +1020,7 @@ uint *Glulxe::grab_temp_i_array(uint addr, uint len, int passin) {
return arr;
}
-void Glulxe::release_temp_i_array(uint *arr, uint addr, uint len, int passout) {
+void Glulx::release_temp_i_array(uint *arr, uint addr, uint len, int passout) {
arrayref_t *arref = nullptr;
arrayref_t **aptr;
uint ix, val, addr2;
@@ -1054,7 +1054,7 @@ void Glulxe::release_temp_i_array(uint *arr, uint addr, uint len, int passout) {
}
}
-void **Glulxe::grab_temp_ptr_array(uint addr, uint len, int objclass, int passin) {
+void **Glulx::grab_temp_ptr_array(uint addr, uint len, int objclass, int passin) {
arrayref_t *arref = nullptr;
void **arr = nullptr;
uint ix, addr2;
@@ -1087,7 +1087,7 @@ void **Glulxe::grab_temp_ptr_array(uint addr, uint len, int objclass, int passin
return arr;
}
-void Glulxe::release_temp_ptr_array(void **arr, uint addr, uint len, int objclass, int passout) {
+void Glulx::release_temp_ptr_array(void **arr, uint addr, uint len, int objclass, int passout) {
arrayref_t *arref = nullptr;
arrayref_t **aptr;
uint ix, val, addr2;
@@ -1128,7 +1128,7 @@ void Glulxe::release_temp_ptr_array(void **arr, uint addr, uint len, int objclas
}
}
-gidispatch_rock_t Glulxe::glulxe_retained_register(void *array, uint len, const char *typecode) {
+gidispatch_rock_t Glulx::glulxe_retained_register(void *array, uint len, const char *typecode) {
gidispatch_rock_t rock;
arrayref_t *arref = nullptr;
arrayref_t **aptr;
@@ -1160,7 +1160,7 @@ gidispatch_rock_t Glulxe::glulxe_retained_register(void *array, uint len, const
return rock;
}
-void Glulxe::glulxe_retained_unregister(void *array, uint len, const char *typecode, gidispatch_rock_t objrock) {
+void Glulx::glulxe_retained_unregister(void *array, uint len, const char *typecode, gidispatch_rock_t objrock) {
arrayref_t *arref = nullptr;
arrayref_t **aptr;
uint ix, addr2, val;
@@ -1212,7 +1212,7 @@ void Glulxe::glulxe_retained_unregister(void *array, uint len, const char *type
glulx_free(arref);
}
-long Glulxe::glulxe_array_locate(void *array, uint len, char *typecode, gidispatch_rock_t objrock, int *elemsizeref) {
+long Glulx::glulxe_array_locate(void *array, uint len, char *typecode, gidispatch_rock_t objrock, int *elemsizeref) {
arrayref_t *arref = nullptr;
arrayref_t **aptr;
uint elemsize = 0;
@@ -1245,7 +1245,7 @@ long Glulxe::glulxe_array_locate(void *array, uint len, char *typecode, gidispat
return arref->addr;
}
-gidispatch_rock_t Glulxe::glulxe_array_restore(long bufkey, uint len, char *typecode, void **arrayref) {
+gidispatch_rock_t Glulx::glulxe_array_restore(long bufkey, uint len, char *typecode, void **arrayref) {
gidispatch_rock_t rock;
int elemsize = 0;
@@ -1273,11 +1273,11 @@ gidispatch_rock_t Glulxe::glulxe_array_restore(long bufkey, uint len, char *type
return rock;
}
-void Glulxe::set_library_select_hook(void (*func)(uint)) {
+void Glulx::set_library_select_hook(void (*func)(uint)) {
library_select_hook = func;
}
-char *Glulxe::get_game_id() {
+char *Glulx::get_game_id() {
/* This buffer gets rewritten on every call, but that's okay -- the caller
is supposed to copy out the result. */
static char buf[2 * 64 + 2];
@@ -1298,7 +1298,7 @@ char *Glulxe::get_game_id() {
return buf;
}
-uint Glulxe::ReadMemory(uint addr) {
+uint Glulx::ReadMemory(uint addr) {
if (addr == 0xffffffff) {
stackptr -= 4;
return Stk4(stackptr);
@@ -1307,7 +1307,7 @@ uint Glulxe::ReadMemory(uint addr) {
}
}
-void Glulxe::WriteMemory(uint addr, uint val) {
+void Glulx::WriteMemory(uint addr, uint val) {
if (addr == 0xffffffff) {
StkW4(stackptr, (val));
stackptr += 4;
@@ -1316,31 +1316,31 @@ void Glulxe::WriteMemory(uint addr, uint val) {
}
}
-char *Glulxe::CaptureCArray(uint addr, uint len, int passin) {
+char *Glulx::CaptureCArray(uint addr, uint len, int passin) {
return grab_temp_c_array(addr, len, passin);
}
-void Glulxe::ReleaseCArray(char *ptr, uint addr, uint len, int passout) {
+void Glulx::ReleaseCArray(char *ptr, uint addr, uint len, int passout) {
release_temp_c_array(ptr, addr, len, passout);
}
-uint *Glulxe::CaptureIArray(uint addr, uint len, int passin) {
+uint *Glulx::CaptureIArray(uint addr, uint len, int passin) {
return grab_temp_i_array(addr, len, passin);
}
-void Glulxe::ReleaseIArray(uint *ptr, uint addr, uint len, int passout) {
+void Glulx::ReleaseIArray(uint *ptr, uint addr, uint len, int passout) {
release_temp_i_array(ptr, addr, len, passout);
}
-void **Glulxe::CapturePtrArray(uint addr, uint len, int objclass, int passin) {
+void **Glulx::CapturePtrArray(uint addr, uint len, int objclass, int passin) {
return grab_temp_ptr_array(addr, len, objclass, passin);
}
-void Glulxe::ReleasePtrArray(void **ptr, uint addr, uint len, int objclass, int passout) {
+void Glulx::ReleasePtrArray(void **ptr, uint addr, uint len, int objclass, int passout) {
return release_temp_ptr_array(ptr, addr, len, objclass, passout);
}
-uint Glulxe::ReadStructField(uint addr, uint fieldnum) {
+uint Glulx::ReadStructField(uint addr, uint fieldnum) {
if (addr == 0xffffffff) {
stackptr -= 4;
return Stk4(stackptr);
@@ -1349,7 +1349,7 @@ uint Glulxe::ReadStructField(uint addr, uint fieldnum) {
}
}
-void Glulxe::WriteStructField(uint addr, uint fieldnum, uint val) {
+void Glulx::WriteStructField(uint addr, uint fieldnum, uint val) {
if (addr == 0xffffffff) {
StkW4(stackptr, val);
stackptr += 4;
@@ -1358,21 +1358,21 @@ void Glulxe::WriteStructField(uint addr, uint fieldnum, uint val) {
}
}
-char *Glulxe::DecodeVMString(uint addr) {
+char *Glulx::DecodeVMString(uint addr) {
return make_temp_string(addr);
}
-void Glulxe::ReleaseVMString(char *ptr) {
+void Glulx::ReleaseVMString(char *ptr) {
free_temp_string(ptr);
}
-uint32 *Glulxe::DecodeVMUstring(uint addr) {
+uint32 *Glulx::DecodeVMUstring(uint addr) {
return make_temp_ustring(addr);
}
-void Glulxe::ReleaseVMUstring(uint32 *ptr) {
+void Glulx::ReleaseVMUstring(uint32 *ptr) {
free_temp_ustring(ptr);
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/glulxe.cpp b/engines/glk/glulx/glulx.cpp
similarity index 83%
rename from engines/glk/glulxe/glulxe.cpp
rename to engines/glk/glulx/glulx.cpp
index ba67dea442..22630c5dbf 100644
--- a/engines/glk/glulxe/glulxe.cpp
+++ b/engines/glk/glulx/glulx.cpp
@@ -20,16 +20,16 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
#include "common/config-manager.h"
#include "common/translation.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-Glulxe *g_vm;
+Glulx *g_vm;
-Glulxe::Glulxe(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc),
+Glulx::Glulx(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc),
vm_exited_cleanly(false), gamefile_start(0), gamefile_len(0), memmap(nullptr), stack(nullptr),
ramstart(0), endgamefile(0), origendmem(0), stacksize(0), startfuncaddr(0), checksum(0),
stackptr(0), frameptr(0), pc(0), prevpc(0), origstringtable(0), stringtable(0), valstackbase(0),
@@ -52,7 +52,7 @@ Glulxe::Glulxe(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst,
glkopInit();
}
-void Glulxe::runGame() {
+void Glulx::runGame() {
if (!is_gamefile_valid())
return;
@@ -74,7 +74,7 @@ void Glulxe::runGame() {
profile_quit();
}
-bool Glulxe::is_gamefile_valid() {
+bool Glulx::is_gamefile_valid() {
if (_gameFile.size() < 8) {
GUIErrorMessage(_("This is too short to be a valid Glulx file."));
return false;
@@ -99,8 +99,8 @@ bool Glulxe::is_gamefile_valid() {
return true;
}
-void Glulxe::fatal_error_handler(const char *str, const char *arg, bool useVal, int val) {
- Common::String msg = Common::String::format("Glulxe fatal error: %s", str);
+void Glulx::fatal_error_handler(const char *str, const char *arg, bool useVal, int val) {
+ Common::String msg = Common::String::format("Glulx fatal error: %s", str);
if (arg || useVal) {
msg += " (";
@@ -118,8 +118,8 @@ void Glulxe::fatal_error_handler(const char *str, const char *arg, bool useVal,
error("%s", msg.c_str());
}
-void Glulxe::nonfatal_warning_handler(const char *str, const char *arg, bool useVal, int val) {
- Common::String msg = Common::String::format("Glulxe warning: %s", str);
+void Glulx::nonfatal_warning_handler(const char *str, const char *arg, bool useVal, int val) {
+ Common::String msg = Common::String::format("Glulx warning: %s", str);
if (arg || useVal) {
msg += " (";
@@ -137,9 +137,9 @@ void Glulxe::nonfatal_warning_handler(const char *str, const char *arg, bool use
warning("%s", msg.c_str());
}
-void Glulxe::glulx_sort(void *addr, int count, int size, int(*comparefunc)(const void *p1, const void *p2)) {
+void Glulx::glulx_sort(void *addr, int count, int size, int(*comparefunc)(const void *p1, const void *p2)) {
qsort(addr, count, size, comparefunc);
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/glulxe.h b/engines/glk/glulx/glulx.h
similarity index 98%
rename from engines/glk/glulxe/glulxe.h
rename to engines/glk/glulx/glulx.h
index c4252d8fe3..8406cace77 100644
--- a/engines/glk/glulxe/glulxe.h
+++ b/engines/glk/glulx/glulx.h
@@ -20,7 +20,7 @@
*
*/
-/* Based on Glulxe intrepreter version 0.5.4 */
+/* Based on Glulx intrepreter version 0.5.4 */
#ifndef GLK_GLULXE
#define GLK_GLULXE
@@ -28,19 +28,19 @@
#include "common/scummsys.h"
#include "common/random.h"
#include "glk/glk_api.h"
-#include "glk/glulxe/glulxe_types.h"
+#include "glk/glulx/glulx_types.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-class Glulxe;
-typedef void (Glulxe::*CharHandler)(unsigned char);
-typedef void (Glulxe::*UnicharHandler)(uint32);
+class Glulx;
+typedef void (Glulx::*CharHandler)(unsigned char);
+typedef void (Glulx::*UnicharHandler)(uint32);
/**
- * Glulxe game interpreter
+ * Glulx game interpreter
*/
-class Glulxe : public GlkAPI {
+class Glulx : public GlkAPI {
private:
/**
* \defgroup vm fields
@@ -396,7 +396,7 @@ public:
/**
* Constructor
*/
- Glulxe(OSystem *syst, const GlkGameDescription &gameDesc);
+ Glulx(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Run the game
@@ -898,9 +898,9 @@ public:
#ifdef FLOAT_SUPPORT
/* Uncomment this definition if your gfloat32 type is not a standard
- IEEE-754 single-precision (32-bit) format. Normally, Glulxe assumes
+ IEEE-754 single-precision (32-bit) format. Normally, Glulx assumes
that it can reinterpret-cast IEEE-754 int values into gfloat32
- values. If you uncomment this, Glulxe switches to lengthier
+ values. If you uncomment this, Glulx switches to lengthier
(but safer) encoding and decoding functions. */
/* #define FLOAT_NOT_NATIVE (1) */
@@ -999,7 +999,7 @@ public:
/**@}*/
};
-extern Glulxe *g_vm;
+extern Glulx *g_vm;
#define fatal_error(s) (fatal_error_handler((s), nullptr, false, 0))
#define fatal_error_2(s1, s2) (fatal_error_handler((s1), (s2), false, 0))
@@ -1008,7 +1008,7 @@ extern Glulxe *g_vm;
#define nonfatal_warning_2(s1, s2) (nonfatal_warning_handler((s1), (s2), false, 0))
#define nonfatal_warning_i(s, v) (nonfatal_warning_handler((s), nullptr, true, (v)))
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
#endif
diff --git a/engines/glk/glulxe/glulxe_types.h b/engines/glk/glulx/glulx_types.h
similarity index 98%
rename from engines/glk/glulxe/glulxe_types.h
rename to engines/glk/glulx/glulx_types.h
index 64987fa00e..0713947b79 100644
--- a/engines/glk/glulxe/glulxe_types.h
+++ b/engines/glk/glulx/glulx_types.h
@@ -26,9 +26,9 @@
#include "common/scummsys.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-class Glulxe;
+class Glulx;
/**
* Comment this definition to turn off memory-address checking. With verification on,
@@ -352,7 +352,7 @@ typedef oparg_struct oparg_t;
#define MAX_OPERANDS (8)
-typedef uint(Glulxe::*acceleration_func)(uint argc, uint *argv);
+typedef uint(Glulx::*acceleration_func)(uint argc, uint *argv);
struct accelentry_struct {
uint addr;
@@ -418,7 +418,7 @@ struct cacheblock_struct {
};
typedef cacheblock_struct cacheblock_t;
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
#endif
diff --git a/engines/glk/glulxe/heap.cpp b/engines/glk/glulx/heap.cpp
similarity index 94%
rename from engines/glk/glulxe/heap.cpp
rename to engines/glk/glulx/heap.cpp
index 86cd4439b8..89c3c68f51 100644
--- a/engines/glk/glulxe/heap.cpp
+++ b/engines/glk/glulx/heap.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void Glulxe::heap_clear() {
+void Glulx::heap_clear() {
while (heap_head) {
heapblock_t *blo = heap_head;
heap_head = blo->next;
@@ -47,15 +47,15 @@ void Glulxe::heap_clear() {
/* heap_sanity_check(); */
}
-int Glulxe::heap_is_active() const {
+int Glulx::heap_is_active() const {
return (heap_start != 0);
}
-uint Glulxe::heap_get_start() const {
+uint Glulx::heap_get_start() const {
return heap_start;
}
-uint Glulxe::heap_alloc(uint len) {
+uint Glulx::heap_alloc(uint len) {
heapblock_t *blo, *newblo;
#ifdef FIXED_MEMSIZE
@@ -190,7 +190,7 @@ uint Glulxe::heap_alloc(uint len) {
#endif /* FIXED_MEMSIZE */
}
-void Glulxe::heap_free(uint addr) {
+void Glulx::heap_free(uint addr) {
heapblock_t *blo;
for (blo = heap_head; blo; blo = blo->next) {
@@ -209,7 +209,7 @@ void Glulxe::heap_free(uint addr) {
/* heap_sanity_check(); */
}
-int Glulxe::heap_get_summary(uint *valcount, uint **summary) {
+int Glulx::heap_get_summary(uint *valcount, uint **summary) {
uint *arr, len, pos;
heapblock_t *blo;
@@ -243,7 +243,7 @@ int Glulxe::heap_get_summary(uint *valcount, uint **summary) {
return 0;
}
-int Glulxe::heap_apply_summary(uint valcount, uint *summary) {
+int Glulx::heap_apply_summary(uint valcount, uint *summary) {
uint lx, jx, lastend;
if (heap_start)
@@ -313,5 +313,5 @@ int Glulxe::heap_apply_summary(uint valcount, uint *summary) {
#endif /* FIXED_MEMSIZE */
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/operand.cpp b/engines/glk/glulx/operand.cpp
similarity index 96%
rename from engines/glk/glulxe/operand.cpp
rename to engines/glk/glulx/operand.cpp
index a880b74b51..4725b6a08c 100644
--- a/engines/glk/glulxe/operand.cpp
+++ b/engines/glk/glulx/operand.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
/**
* The actual immutable structures which lookup_operandlist() returns.
@@ -64,12 +64,12 @@ static const operandlist_t list_SS = { 2, 4, &array_SS[0] };
static const int array_LLSS[4] = { modeform_Load, modeform_Load, modeform_Store, modeform_Store };
static const operandlist_t list_LLSS = { 4, 4, &array_LLSS[0] };
-void Glulxe::init_operands() {
+void Glulx::init_operands() {
for (int ix = 0; ix < 0x80; ix++)
fast_operandlist[ix] = lookup_operandlist(ix);
}
-const operandlist_t *Glulxe::lookup_operandlist(uint opcode) {
+const operandlist_t *Glulx::lookup_operandlist(uint opcode) {
switch (opcode) {
case op_nop:
return &list_none;
@@ -280,7 +280,7 @@ const operandlist_t *Glulxe::lookup_operandlist(uint opcode) {
}
}
-void Glulxe::parse_operands(oparg_t *args, const operandlist_t *oplist) {
+void Glulx::parse_operands(oparg_t *args, const operandlist_t *oplist) {
int ix;
oparg_t *curarg;
int numops = oplist->num_ops;
@@ -517,7 +517,7 @@ WrLocalsAddr:
}
}
-void Glulxe::store_operand(uint desttype, uint destaddr, uint storeval) {
+void Glulx::store_operand(uint desttype, uint destaddr, uint storeval) {
switch (desttype) {
case 0: /* do nothing; discard the value. */
@@ -546,7 +546,7 @@ void Glulxe::store_operand(uint desttype, uint destaddr, uint storeval) {
}
}
-void Glulxe::store_operand_s(uint desttype, uint destaddr, uint storeval) {
+void Glulx::store_operand_s(uint desttype, uint destaddr, uint storeval) {
storeval &= 0xFFFF;
switch (desttype) {
@@ -577,7 +577,7 @@ void Glulxe::store_operand_s(uint desttype, uint destaddr, uint storeval) {
}
}
-void Glulxe::store_operand_b(uint desttype, uint destaddr, uint storeval) {
+void Glulx::store_operand_b(uint desttype, uint destaddr, uint storeval) {
storeval &= 0xFF;
switch (desttype) {
@@ -608,5 +608,5 @@ void Glulxe::store_operand_b(uint desttype, uint destaddr, uint storeval) {
}
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/search.cpp b/engines/glk/glulx/search.cpp
similarity index 89%
rename from engines/glk/glulxe/search.cpp
rename to engines/glk/glulx/search.cpp
index 1bbe8fa027..a62cccb724 100644
--- a/engines/glk/glulxe/search.cpp
+++ b/engines/glk/glulx/search.cpp
@@ -20,10 +20,10 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
enum serop {
serop_KeyIndirect = 0x01,
@@ -31,7 +31,7 @@ enum serop {
serop_ReturnIndex = 0x04
};
-uint Glulxe::linear_search(uint key, uint keysize, uint start, uint structsize, uint numstructs,
+uint Glulx::linear_search(uint key, uint keysize, uint start, uint structsize, uint numstructs,
uint keyoffset, uint options) {
unsigned char keybuf[4];
uint count;
@@ -81,7 +81,7 @@ uint Glulxe::linear_search(uint key, uint keysize, uint start, uint structsize,
}
-uint Glulxe::binary_search(uint key, uint keysize, uint start, uint structsize, uint numstructs,
+uint Glulx::binary_search(uint key, uint keysize, uint start, uint structsize, uint numstructs,
uint keyoffset, uint options) {
byte keybuf[4];
byte byte1, byte2;
@@ -138,7 +138,7 @@ uint Glulxe::binary_search(uint key, uint keysize, uint start, uint structsize,
return 0;
}
-uint Glulxe::linked_search(uint key, uint keysize, uint start, uint keyoffset, uint nextoffset, uint options) {
+uint Glulx::linked_search(uint key, uint keysize, uint start, uint keyoffset, uint nextoffset, uint options) {
unsigned char keybuf[4];
uint ix;
uint val;
@@ -182,7 +182,7 @@ uint Glulxe::linked_search(uint key, uint keysize, uint start, uint keyoffset,
return 0;
}
-void Glulxe::fetchkey(unsigned char *keybuf, uint key, uint keysize, uint options) {
+void Glulx::fetchkey(unsigned char *keybuf, uint key, uint keysize, uint options) {
uint ix;
if (options & serop_KeyIndirect) {
@@ -207,5 +207,5 @@ void Glulxe::fetchkey(unsigned char *keybuf, uint key, uint keysize, uint optio
}
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/serial.cpp b/engines/glk/glulx/serial.cpp
similarity index 93%
rename from engines/glk/glulxe/serial.cpp
rename to engines/glk/glulx/serial.cpp
index 10d7133efb..fca41e98c1 100644
--- a/engines/glk/glulxe/serial.cpp
+++ b/engines/glk/glulx/serial.cpp
@@ -20,14 +20,14 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
#define IFFID(c1, c2, c3, c4) MKTAG(c1, c2, c3, c4)
-bool Glulxe::init_serial() {
+bool Glulx::init_serial() {
undo_chain_num = 0;
undo_chain_size = max_undo_level;
undo_chain = (unsigned char **)glulx_malloc(sizeof(unsigned char *) * undo_chain_size);
@@ -52,7 +52,7 @@ bool Glulxe::init_serial() {
return true;
}
-void Glulxe::final_serial() {
+void Glulx::final_serial() {
if (undo_chain) {
int ix;
for (ix = 0; ix < undo_chain_num; ix++) {
@@ -72,7 +72,7 @@ void Glulxe::final_serial() {
#endif /* SERIALIZE_CACHE_RAM */
}
-uint Glulxe::perform_saveundo() {
+uint Glulx::perform_saveundo() {
dest_t dest;
uint res;
uint memstart = 0, memlen = 0, heapstart = 0, heaplen = 0;
@@ -164,7 +164,7 @@ uint Glulxe::perform_saveundo() {
return res;
}
-uint Glulxe::perform_restoreundo() {
+uint Glulx::perform_restoreundo() {
dest_t dest;
uint res, val = 0;
uint heapsumlen = 0;
@@ -225,7 +225,7 @@ uint Glulxe::perform_restoreundo() {
return res;
}
-Common::Error Glulxe::loadGameChunks(QuetzalReader &quetzal) {
+Common::Error Glulx::loadGameChunks(QuetzalReader &quetzal) {
uint res = 0;
uint heapsumlen = 0;
uint *heapsumarr = nullptr;
@@ -277,7 +277,7 @@ Common::Error Glulxe::loadGameChunks(QuetzalReader &quetzal) {
return res ? Common::kReadingFailed : Common::kNoError;
}
-Common::Error Glulxe::saveGameChunks(QuetzalWriter &quetzal) {
+Common::Error Glulx::saveGameChunks(QuetzalWriter &quetzal) {
uint res = 0;
// IFHd
@@ -315,7 +315,7 @@ Common::Error Glulxe::saveGameChunks(QuetzalWriter &quetzal) {
return res ? Common::kUnknownError : Common::kNoError;
}
-int Glulxe::reposition_write(dest_t *dest, uint pos) {
+int Glulx::reposition_write(dest_t *dest, uint pos) {
if (dest->_isMem) {
dest->_pos = pos;
} else {
@@ -325,7 +325,7 @@ int Glulxe::reposition_write(dest_t *dest, uint pos) {
return 0;
}
-int Glulxe::write_buffer(dest_t *dest, const byte *ptr, uint len) {
+int Glulx::write_buffer(dest_t *dest, const byte *ptr, uint len) {
if (dest->_isMem) {
if (dest->_pos + len > dest->_size) {
dest->_size = dest->_pos + len + 1024;
@@ -347,7 +347,7 @@ int Glulxe::write_buffer(dest_t *dest, const byte *ptr, uint len) {
return 0;
}
-int Glulxe::read_buffer(dest_t *dest, byte *ptr, uint len) {
+int Glulx::read_buffer(dest_t *dest, byte *ptr, uint len) {
uint newlen;
if (dest->_isMem) {
@@ -363,23 +363,23 @@ int Glulxe::read_buffer(dest_t *dest, byte *ptr, uint len) {
return 0;
}
-int Glulxe::write_long(dest_t *dest, uint val) {
+int Glulx::write_long(dest_t *dest, uint val) {
unsigned char buf[4];
Write4(buf, val);
return write_buffer(dest, buf, 4);
}
-int Glulxe::write_short(dest_t *dest, uint16 val) {
+int Glulx::write_short(dest_t *dest, uint16 val) {
unsigned char buf[2];
Write2(buf, val);
return write_buffer(dest, buf, 2);
}
-int Glulxe::write_byte(dest_t *dest, byte val) {
+int Glulx::write_byte(dest_t *dest, byte val) {
return write_buffer(dest, &val, 1);
}
-int Glulxe::read_long(dest_t *dest, uint *val) {
+int Glulx::read_long(dest_t *dest, uint *val) {
unsigned char buf[4];
int res = read_buffer(dest, buf, 4);
if (res)
@@ -388,7 +388,7 @@ int Glulxe::read_long(dest_t *dest, uint *val) {
return 0;
}
-int Glulxe::read_short(dest_t *dest, uint16 *val) {
+int Glulx::read_short(dest_t *dest, uint16 *val) {
unsigned char buf[2];
int res = read_buffer(dest, buf, 2);
if (res)
@@ -397,11 +397,11 @@ int Glulxe::read_short(dest_t *dest, uint16 *val) {
return 0;
}
-int Glulxe::read_byte(dest_t *dest, byte *val) {
+int Glulx::read_byte(dest_t *dest, byte *val) {
return read_buffer(dest, val, 1);
}
-uint Glulxe::write_memstate(dest_t *dest) {
+uint Glulx::write_memstate(dest_t *dest) {
uint res, pos;
int val;
int runlen;
@@ -464,7 +464,7 @@ uint Glulxe::write_memstate(dest_t *dest) {
return 0;
}
-uint Glulxe::read_memstate(dest_t *dest, uint chunklen) {
+uint Glulx::read_memstate(dest_t *dest, uint chunklen) {
uint chunkend = dest->_pos + chunklen;
uint newlen;
uint res, pos;
@@ -536,7 +536,7 @@ uint Glulxe::read_memstate(dest_t *dest, uint chunklen) {
return 0;
}
-uint Glulxe::write_heapstate(dest_t *dest, int portable) {
+uint Glulx::write_heapstate(dest_t *dest, int portable) {
uint res;
uint sumlen;
uint *sumarray;
@@ -554,7 +554,7 @@ uint Glulxe::write_heapstate(dest_t *dest, int portable) {
return res;
}
-uint Glulxe::write_heapstate_sub(uint sumlen, uint *sumarray, dest_t *dest, int portable) {
+uint Glulx::write_heapstate_sub(uint sumlen, uint *sumarray, dest_t *dest, int portable) {
uint res, lx;
/* If we're storing for the purpose of undo, we don't need to do any
@@ -575,7 +575,7 @@ uint Glulxe::write_heapstate_sub(uint sumlen, uint *sumarray, dest_t *dest, int
return 0;
}
-int Glulxe::sort_heap_summary(const void *p1, const void *p2) {
+int Glulx::sort_heap_summary(const void *p1, const void *p2) {
uint v1 = *(const uint *)p1;
uint v2 = *(const uint *)p2;
@@ -586,7 +586,7 @@ int Glulxe::sort_heap_summary(const void *p1, const void *p2) {
return 0;
}
-uint Glulxe::read_heapstate(dest_t *dest, uint chunklen, int portable, uint *sumlen, uint **summary) {
+uint Glulx::read_heapstate(dest_t *dest, uint chunklen, int portable, uint *sumlen, uint **summary) {
uint res, count, lx;
uint *arr;
@@ -631,7 +631,7 @@ uint Glulxe::read_heapstate(dest_t *dest, uint chunklen, int portable, uint *sum
return 0;
}
-uint Glulxe::write_stackstate(dest_t *dest, int portable) {
+uint Glulx::write_stackstate(dest_t *dest, int portable) {
uint res;
uint lx;
uint lastframe;
@@ -789,7 +789,7 @@ uint Glulxe::write_stackstate(dest_t *dest, int portable) {
return 0;
}
-uint Glulxe::read_stackstate(dest_t *dest, uint chunklen, int portable) {
+uint Glulx::read_stackstate(dest_t *dest, uint chunklen, int portable) {
uint res;
uint frameend, frm, frm2, frm3, locpos, frlen, numlocals;
@@ -920,7 +920,7 @@ uint Glulxe::read_stackstate(dest_t *dest, uint chunklen, int portable) {
return 0;
}
-uint Glulxe::perform_verify() {
+uint Glulx::perform_verify() {
uint len, chksum = 0, newlen;
unsigned char buf[4];
uint val, newsum, ix;
@@ -964,5 +964,5 @@ uint Glulxe::perform_verify() {
return 0;
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/string.cpp b/engines/glk/glulx/string.cpp
similarity index 92%
rename from engines/glk/glulxe/string.cpp
rename to engines/glk/glulx/string.cpp
index df7e505c3c..dd3df27f8f 100644
--- a/engines/glk/glulxe/string.cpp
+++ b/engines/glk/glulx/string.cpp
@@ -20,23 +20,23 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void Glulxe::stream_get_iosys(uint *mode, uint *rock) {
+void Glulx::stream_get_iosys(uint *mode, uint *rock) {
*mode = iosys_mode;
*rock = iosys_rock;
}
-void Glulxe::stream_setup_unichar() {
+void Glulx::stream_setup_unichar() {
#ifdef GLK_MODULE_UNICODE
if (glk_gestalt(gestalt_Unicode, 0))
- glkio_unichar_han_ptr = &Glulxe::glk_put_char_uni;
+ glkio_unichar_han_ptr = &Glulx::glk_put_char_uni;
else
- glkio_unichar_han_ptr = &Glulxe::glkio_unichar_nouni_han;
+ glkio_unichar_han_ptr = &Glulx::glkio_unichar_nouni_han;
#else /* GLK_MODULE_UNICODE */
@@ -45,25 +45,25 @@ void Glulxe::stream_setup_unichar() {
#endif /* GLK_MODULE_UNICODE */
}
-void Glulxe::stream_set_iosys(uint mode, uint rock) {
+void Glulx::stream_set_iosys(uint mode, uint rock) {
switch (mode) {
default:
mode = 0;
// fall through
case iosys_None:
rock = 0;
- stream_char_handler = &Glulxe::nopio_char_han;
- stream_unichar_handler = &Glulxe::nopio_unichar_han;
+ stream_char_handler = &Glulx::nopio_char_han;
+ stream_unichar_handler = &Glulx::nopio_unichar_han;
break;
case iosys_Filter:
- stream_char_handler = &Glulxe::filio_char_han;
- stream_unichar_handler = &Glulxe::filio_unichar_han;
+ stream_char_handler = &Glulx::filio_char_han;
+ stream_unichar_handler = &Glulx::filio_unichar_han;
break;
case iosys_Glk:
if (!glkio_unichar_han_ptr)
stream_setup_unichar();
rock = 0;
- stream_char_handler = &Glulxe::glk_put_char;
+ stream_char_handler = &Glulx::glk_put_char;
stream_unichar_handler = glkio_unichar_han_ptr;
break;
}
@@ -72,32 +72,32 @@ void Glulxe::stream_set_iosys(uint mode, uint rock) {
iosys_rock = rock;
}
-void Glulxe::nopio_char_han(unsigned char ch) {
+void Glulx::nopio_char_han(unsigned char ch) {
}
-void Glulxe::nopio_unichar_han(uint32 ch) {
+void Glulx::nopio_unichar_han(uint32 ch) {
}
-void Glulxe::filio_char_han(unsigned char ch) {
+void Glulx::filio_char_han(unsigned char ch) {
uint val = ch;
push_callstub(0, 0);
enter_function(iosys_rock, 1, &val);
}
-void Glulxe::filio_unichar_han(uint32 val) {
+void Glulx::filio_unichar_han(uint32 val) {
uint v = val;
push_callstub(0, 0);
enter_function(iosys_rock, 1, &v);
}
-void Glulxe::glkio_unichar_nouni_han(uint32 val) {
+void Glulx::glkio_unichar_nouni_han(uint32 val) {
/* Only used if the Glk library has no Unicode functions */
if (val > 0xFF)
val = '?';
glk_put_char(val);
}
-void Glulxe::stream_num(int val, int inmiddle, int charnum) {
+void Glulx::stream_num(int val, int inmiddle, int charnum) {
int ix = 0;
int res, jx;
char buf[16];
@@ -160,7 +160,7 @@ void Glulxe::stream_num(int val, int inmiddle, int charnum) {
}
}
-void Glulxe::stream_string(uint addr, int inmiddle, int bitnum) {
+void Glulx::stream_string(uint addr, int inmiddle, int bitnum) {
int ch;
int type;
int alldone = false;
@@ -611,11 +611,11 @@ void Glulxe::stream_string(uint addr, int inmiddle, int bitnum) {
}
}
-uint Glulxe::stream_get_table() {
+uint Glulx::stream_get_table() {
return stringtable;
}
-void Glulxe::stream_set_table(uint addr) {
+void Glulx::stream_set_table(uint addr) {
if (stringtable == addr)
return;
@@ -644,7 +644,7 @@ void Glulxe::stream_set_table(uint addr) {
}
}
-void Glulxe::buildcache(cacheblock_t *cablist, uint nodeaddr, int depth, int mask) {
+void Glulx::buildcache(cacheblock_t *cablist, uint nodeaddr, int depth, int mask) {
int ix, type;
type = Mem1(nodeaddr);
@@ -697,7 +697,7 @@ void Glulxe::buildcache(cacheblock_t *cablist, uint nodeaddr, int depth, int mas
#if 0
#include <stdio.h>
-void Glulxe::dumpcache(cacheblock_t *cablist, int count, int indent) {
+void Glulx::dumpcache(cacheblock_t *cablist, int count, int indent) {
int ix, jx;
for (ix = 0; ix < count; ix++) {
@@ -728,7 +728,7 @@ void Glulxe::dumpcache(cacheblock_t *cablist, int count, int indent) {
}
#endif /* 0 */
-void Glulxe::dropcache(cacheblock_t *cablist) {
+void Glulx::dropcache(cacheblock_t *cablist) {
int ix;
for (ix = 0; ix < CACHESIZE; ix++) {
cacheblock_t *cab = &(cablist[ix]);
@@ -740,7 +740,7 @@ void Glulxe::dropcache(cacheblock_t *cablist) {
glulx_free(cablist);
}
-char *Glulxe::make_temp_string(uint addr) {
+char *Glulx::make_temp_string(uint addr) {
int ix, len;
uint addr2;
char *res;
@@ -767,7 +767,7 @@ char *Glulxe::make_temp_string(uint addr) {
return res;
}
-uint32 *Glulxe::make_temp_ustring(uint addr) {
+uint32 *Glulx::make_temp_ustring(uint addr) {
int ix, len;
uint addr2;
uint32 *res;
@@ -794,15 +794,15 @@ uint32 *Glulxe::make_temp_ustring(uint addr) {
return res;
}
-void Glulxe::free_temp_string(char *str) {
+void Glulx::free_temp_string(char *str) {
if (str && str != temp_buf)
glulx_free(str);
}
-void Glulxe::free_temp_ustring(uint32 *str) {
+void Glulx::free_temp_ustring(uint32 *str) {
if (str && str != (uint32 *)temp_buf)
glulx_free(str);
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/glulxe/vm.cpp b/engines/glk/glulx/vm.cpp
similarity index 94%
rename from engines/glk/glulxe/vm.cpp
rename to engines/glk/glulx/vm.cpp
index c4d90ed688..6affdfec82 100644
--- a/engines/glk/glulxe/vm.cpp
+++ b/engines/glk/glulx/vm.cpp
@@ -20,12 +20,12 @@
*
*/
-#include "glk/glulxe/glulxe.h"
+#include "glk/glulx/glulx.h"
namespace Glk {
-namespace Glulxe {
+namespace Glulx {
-void Glulxe::setup_vm() {
+void Glulx::setup_vm() {
byte buf[4 * 7];
pc = 0; // Clear this, so that error messages are cleaner.
@@ -104,7 +104,7 @@ void Glulxe::setup_vm() {
debugger_setup_start_state();
}
-void Glulxe::finalize_vm() {
+void Glulx::finalize_vm() {
stream_set_table(0);
if (memmap) {
@@ -119,7 +119,7 @@ void Glulxe::finalize_vm() {
final_serial();
}
-void Glulxe::vm_restart() {
+void Glulx::vm_restart() {
uint lx;
int res;
int bufpos;
@@ -174,7 +174,7 @@ void Glulxe::vm_restart() {
/* We're now ready to execute. */
}
-uint Glulxe::change_memsize(uint newlen, bool internal) {
+uint Glulx::change_memsize(uint newlen, bool internal) {
uint lx;
unsigned char *newmemmap;
@@ -214,7 +214,7 @@ uint Glulxe::change_memsize(uint newlen, bool internal) {
#endif /* FIXED_MEMSIZE */
}
-uint *Glulxe::pop_arguments(uint count, uint addr) {
+uint *Glulx::pop_arguments(uint count, uint addr) {
uint ix;
uint argptr;
uint *array;
@@ -269,7 +269,7 @@ uint *Glulxe::pop_arguments(uint count, uint addr) {
return array;
}
-void Glulxe::verify_address(uint addr, uint count) {
+void Glulx::verify_address(uint addr, uint count) {
if (addr >= endmem)
fatal_error_i("Memory access out of range", addr);
if (count > 1) {
@@ -279,7 +279,7 @@ void Glulxe::verify_address(uint addr, uint count) {
}
}
-void Glulxe::verify_address_write(uint addr, uint count) {
+void Glulx::verify_address_write(uint addr, uint count) {
if (addr < ramstart)
fatal_error_i("Memory write to read-only address", addr);
if (addr >= endmem)
@@ -291,7 +291,7 @@ void Glulxe::verify_address_write(uint addr, uint count) {
}
}
-void Glulxe::verify_array_addresses(uint addr, uint count, uint size) {
+void Glulx::verify_array_addresses(uint addr, uint count, uint size) {
uint bytecount;
if (addr >= endmem)
fatal_error_i("Memory access out of range", addr);
@@ -313,5 +313,5 @@ void Glulxe::verify_array_addresses(uint addr, uint count, uint size) {
fatal_error_i("Memory access too long", addr);
}
-} // End of namespace Glulxe
+} // End of namespace Glulx
} // End of namespace Glk
diff --git a/engines/glk/module.mk b/engines/glk/module.mk
index c30b0bfb05..27b826a938 100644
--- a/engines/glk/module.mk
+++ b/engines/glk/module.mk
@@ -183,20 +183,20 @@ MODULE_OBJS := \
comprehend/game_tr.o \
comprehend/opcode_map.o \
comprehend/pics.o \
- glulxe/accel.o \
- glulxe/detection.o \
- glulxe/exec.o \
- glulxe/float.o \
- glulxe/funcs.o \
- glulxe/gestalt.o \
- glulxe/glkop.o \
- glulxe/glulxe.o \
- glulxe/heap.o \
- glulxe/operand.o \
- glulxe/search.o \
- glulxe/serial.o \
- glulxe/string.o \
- glulxe/vm.o \
+ glulx/accel.o \
+ glulx/detection.o \
+ glulx/exec.o \
+ glulx/float.o \
+ glulx/funcs.o \
+ glulx/gestalt.o \
+ glulx/glkop.o \
+ glulx/glulx.o \
+ glulx/heap.o \
+ glulx/operand.o \
+ glulx/search.o \
+ glulx/serial.o \
+ glulx/string.o \
+ glulx/vm.o \
hugo/detection.o \
hugo/heexpr.o \
hugo/heglk.o \
Commit: 41f99171366024f9c9b3178114b538e0679d081a
https://github.com/scummvm/scummvm/commit/41f99171366024f9c9b3178114b538e0679d081a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-08-23T21:27:49-07:00
Commit Message:
GLK: COMPREHEND: Fix loading v2 games
Changed paths:
engines/glk/comprehend/game_data.cpp
diff --git a/engines/glk/comprehend/game_data.cpp b/engines/glk/comprehend/game_data.cpp
index 5f655ca443..41dc465c5d 100644
--- a/engines/glk/comprehend/game_data.cpp
+++ b/engines/glk/comprehend/game_data.cpp
@@ -558,13 +558,8 @@ void GameData::parse_header(FileBuffer *fb) {
*
* Layout depends on the comprehend version.
*/
- if (_comprehendVersion == 1) {
- for (int idx = 0; idx < 7; ++idx)
- parse_header_le16(fb, &header->addr_actions[idx]);
- }
- if (_comprehendVersion >= 2) {
- error("TODO: loading action tables offsets");
- }
+ for (int idx = 0; idx < (_comprehendVersion == 1 ? 7 : 5); ++idx)
+ parse_header_le16(fb, &header->addr_actions[idx]);
parse_header_le16(fb, &header->addr_vm);
parse_header_le16(fb, &header->addr_dictionary);
Commit: 567e37fba85f3a245727c91cfd47050502d0ed6e
https://github.com/scummvm/scummvm/commit/567e37fba85f3a245727c91cfd47050502d0ed6e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-08-23T21:27:49-07:00
Commit Message:
GLK: GLULX: Add detection entries
Changed paths:
engines/glk/glulx/detection_tables.h
diff --git a/engines/glk/glulx/detection_tables.h b/engines/glk/glulx/detection_tables.h
index b31e952848..59e78aa408 100644
--- a/engines/glk/glulx/detection_tables.h
+++ b/engines/glk/glulx/detection_tables.h
@@ -58,6 +58,7 @@ const PlainGameDescriptor GLULXE_GAME_LIST[] = {
{ "becauseyouremine", "Because You're Mine" },
{ "beingthere", "Being There" },
{ "beyondglulx", "Beyond" },
+ { "blindhouse", "The Blind House" },
{ "bluelacuna", "Blue Lacuna" },
{ "bonehead", "Bonehead, a Regrettable and Mostly True Tale" },
{ "brainguzzlers", "Brain Guzzlers from Beyond!" },
@@ -128,6 +129,7 @@ const PlainGameDescriptor GLULXE_GAME_LIST[] = {
{ "hardpuzzle2", "Hard Puzzle 2: The Cow" },
{ "hardpuzzle3", "Hard Puzzle 3: Origins" },
{ "haroldnight2003", "Harold Night 2003" },
+ { "kerkerkruip", "Kerkerkruip" },
{ "killerheadache", "A Killer Headache" },
{ "herecomestreble", "Here Comes Treble" },
{ "hobbitglulx", "The Hobbit - The True Story" },
@@ -303,6 +305,7 @@ const PlainGameDescriptor GLULXE_GAME_LIST[] = {
const GlkDetectionEntry GLULXE_GAMES[] = {
// English games
DT_ENTRY0("aafn", "98c22f842ffadfb08a8e2a93d32c7495", 163328),
+ DT_ENTRY0("aafn", "07d590dc62f0be38f6f879763b6eb12c", 163072),
DT_ENTRY1("acg", "070501", "1a3eb782d28dd8ae8da40f21adb174f0", 817408),
DT_ENTRY1("adventglulx", "961209", "e1939485dc2d4aab637144fc842b479d", 195406),
DT_ENTRY1("adventglulx", "961209", "cf232df2a3364a6f0821a8ef631c81a1", 167424),
@@ -332,6 +335,7 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_ENTRY1("becauseyouremine", "161019", "643df12ae55ed54c9c1172753fc71d52", 648134),
DT_ENTRY0("beingthere", "6a7f51d6c09acca156e3ceadce7edcb9", 6005766),
DT_ENTRY0("beyondglulx", "64a351bc6757a58080b801a14d878fc2", 1303364),
+ DT_ENTRY0("blindhouse", "0d79dbb034056f655be3363a14d6986d", 2011166),
DT_ENTRY1("bluelacuna", "090304", "86c24b7fa879780038056d5e9a084a28", 5649260),
DT_ENTRY1("bonehead", "120229", "34563c2af093239b5a908a64031eedac", 1804252),
DT_ENTRY1("brainguzzlers", "160123", "23d22c7e8d7dff3660c436ef4951f4ae", 3210594),
@@ -396,9 +400,11 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_ENTRY1("fair", "161116", "eca63537d9198a10dd6a84bf51b097b6", 1190090),
DT_ENTRY1("farmquest", "111028", "e49e02b73047fb16427c8882035a4be6", 415940),
DT_ENTRY1("ferrousring", "1007276", "af11f50b1ef9ba444bd176de4ee22002", 432128),
+ DT_ENTRY0("ferrousring", "e3763b5e021f6ee2c6e383bae2b4bc8a", 450560),
DT_ENTRY1("finalproject", "140517", "9ace3f9fa908a3b96a6153afa0e30720", 738248),
DT_ENTRY1("flexiblesurvival", "110307", "0d225782edd27fffb7ab0e423e9bad4d", 860108),
DT_ENTRY1("followingastar", "034107", "fec0b3c288daa456c3feff5e10bced8a", 1172892),
+ DT_ENTRY0("followingastar", "4f88888ed4c75099e64ef8e05bd177cc", 1170332),
DT_ENTRY1("further", "150117", "227bf3da188ae42e43b8b88b66561252", 682770),
DT_ENTRY1("genesisquest", "140319", "c51f6d78e73aa0d846a2e38d4c187cfc", 1647616),
DT_ENTRY1("ghosteringtonnight", "150815", "29ee591bd93084b5a450f2324d47de3b", 1940030),
@@ -410,6 +416,7 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_ENTRY1("hardpuzzle2", "151209", "db2880a4bf6539b30b922c83d1f35877", 626752),
DT_ENTRY1("hardpuzzle3", "160107", "9dffb3f6fc8daf2bf4a27b4b43745b93", 796682),
DT_ENTRY1("haroldnight2003", "141007", "ac404358f94472c2e9c8bc07596995db", 949134),
+ DT_ENTRY0("kerkerkruip", "b4db28a5653a63fa389e37b65b078b57", 1306720),
DT_ENTRY1("killerheadache", "121231", "ab18f553a035242a15f5a39f16f03173", 1382924),
DT_ENTRY1("herecomestreble", "160619", "573a53ce59a78c09bdfcf4f09b5cfd60", 666278),
DT_ENTRY1("hobbitglulx", "010911", "87212129f54fd80c1f31104eee222f2c", 183642),
@@ -469,6 +476,7 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_ENTRY1("robinandorchid", "140602", "2561b2f1f0b9d3550e6052d6e5fa2ac3", 1210868),
DT_ENTRY1("rosewood", "131116", "c766929c3cc25a13b5a60f90b618d94e", 736304),
DT_ENTRY1("rover", "091116", "88249e5938448be487267a4b609a45e7", 1741574),
+ DT_ENTRY0("rover", "5a404fb92af606a86bdae9bbf91547c1", 1739014),
DT_ENTRY1("safe", "110109", "95af9e7de6e31fdeff6bd3cf7969434d", 648720),
DT_ENTRY1("sagebrushcactus", "100918", "de27a377b78387126b77552bccf0a085", 640246),
DT_ENTRY1("samfortunepi", "090510", "f177d973432b7a27302f1a79c8106f72", 706326),
@@ -480,8 +488,10 @@ const GlkDetectionEntry GLULXE_GAMES[] = {
DT_ENTRY1("shapes", "000001", "a011827749eeef8afe6f6b8d5bfb78db", 1254912),
DT_ENTRY1("sheephere", "160416", "1de700b758ef6f975150a6bd8926880d", 621466),
DT_ENTRY1("shufflingaround", "150328", "00b2a517ec539936b96e84fabb91e5db", 3208092),
+ DT_ENTRY0("shufflingaround", "31ce78bff3833e5d2224abc4e63e6923", 3091868),
DT_ENTRY1("signalerror", "111116", "739510541192f01467b319b70ed7bf1f", 2138394),
DT_ENTRY0("sittm", "4a2ba3c1b9574b6292cbe361fc49af40", 409344),
+ DT_ENTRY0("sittm", "0c3d40b0340df7ff459ff7751015183a", 408576),
DT_ENTRY1("six", "120805", "2705921eee09a568959584be1929b6b7", 8663464),
DT_ENTRY1("six", "170723", "2d1fdfe386c08fdacd620b7497bcd88f", 8661160),
DT_ENTRY0("smittenkittens", "c3402d5d8b94675af5e3e0069366d4fd", 1240942),
More information about the Scummvm-git-logs
mailing list