aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2009-09-01 13:02:47 +0000
committerMax Horn2009-09-01 13:02:47 +0000
commit8e28469f1f8aa1c3b7ade6bcba9bef1d6dec3b8c (patch)
tree3b789e98c685476c606b049e38053c43a671ad60 /engines/sci
parent2ed53f98b478854c1df3ed43a46103bfb35596d5 (diff)
downloadscummvm-rg350-8e28469f1f8aa1c3b7ade6bcba9bef1d6dec3b8c.tar.gz
scummvm-rg350-8e28469f1f8aa1c3b7ade6bcba9bef1d6dec3b8c.tar.bz2
scummvm-rg350-8e28469f1f8aa1c3b7ade6bcba9bef1d6dec3b8c.zip
Coding best practice: Always use enums instead of #defines to define integer constants (for many good reasons)
svn-id: r43881
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/resource.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index d7aa5d954b..c6ae2ed1ab 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -69,7 +69,9 @@ enum {
/* the first critical error number */
};
-#define MAX_OPENED_VOLUMES 5 // Max number of simultaneously opened volumes
+enum {
+ MAX_OPENED_VOLUMES = 5 // Max number of simultaneously opened volumes
+};
enum ResSourceType {
kSourceDirectory = 0,
@@ -81,9 +83,11 @@ enum ResSourceType {
kSourceExtAudioMap
};
-#define SCI0_RESMAP_ENTRIES_SIZE 6
-#define SCI1_RESMAP_ENTRIES_SIZE 6
-#define SCI11_RESMAP_ENTRIES_SIZE 5
+enum {
+ SCI0_RESMAP_ENTRIES_SIZE = 6,
+ SCI1_RESMAP_ENTRIES_SIZE = 6,
+ SCI11_RESMAP_ENTRIES_SIZE = 5
+};
enum ResourceType {
kResourceTypeView = 0,
@@ -278,7 +282,9 @@ protected:
// Note: maxMemory will not be interpreted as a hard limit, only as a restriction
// for resources which are not explicitly locked. However, a warning will be
// issued whenever this limit is exceeded.
- #define MAX_MEMORY 256 * 1024 // 256KB
+ enum {
+ MAX_MEMORY = 256 * 1024 // 256KB
+ };
ViewType _viewType; // Used to determine if the game has EGA or VGA graphics
Common::List<ResourceSource *> _sources;