aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/resource.cpp7
-rw-r--r--engines/sci/resource.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index f64d3acdab..54484698d6 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -147,6 +147,13 @@ const char *getResourceTypeName(ResourceType restype) {
return "invalid";
}
+const char *getResourceTypeExtension(ResourceType restype) {
+ if (restype < ARRAYSIZE(s_resourceTypeSuffixes))
+ return s_resourceTypeSuffixes[restype];
+ else
+ return "";
+}
+
static const ResourceType s_resTypeMapSci0[] = {
kResourceTypeView, kResourceTypePic, kResourceTypeScript, kResourceTypeText, // 0x00-0x03
kResourceTypeSound, kResourceTypeMemory, kResourceTypeVocab, kResourceTypeFont, // 0x04-0x07
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 830fe997e6..e9eaa6761e 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -129,6 +129,7 @@ enum ResourceType {
};
const char *getResourceTypeName(ResourceType restype);
+const char *getResourceTypeExtension(ResourceType restype);
enum ResVersion {
kResVersionUnknown,