[Scummvm-cvs-logs] SF.net SVN: scummvm:[38779] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Feb 22 05:22:53 CET 2009
Revision: 38779
http://scummvm.svn.sourceforge.net/scummvm/?rev=38779&view=rev
Author: fingolfin
Date: 2009-02-22 04:22:53 +0000 (Sun, 22 Feb 2009)
Log Message:
-----------
SCI: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/include/sciresource.h
scummvm/trunk/engines/sci/scicore/resource.cpp
Modified: scummvm/trunk/engines/sci/include/sciresource.h
===================================================================
--- scummvm/trunk/engines/sci/include/sciresource.h 2009-02-22 04:04:33 UTC (rev 38778)
+++ scummvm/trunk/engines/sci/include/sciresource.h 2009-02-22 04:22:53 UTC (rev 38779)
@@ -84,11 +84,14 @@
#define SCI_VERSION_1 SCI_VERSION_1_EARLY
-#define RESSOURCE_TYPE_DIRECTORY 0
-#define RESSOURCE_TYPE_VOLUME 2
-#define RESSOURCE_TYPE_EXTERNAL_MAP 3
-#define RESSOURCE_TYPE_INTERNAL_MAP 4
-#define RESSOURCE_TYPE_MASK 127
+enum ResourceType {
+ RESSOURCE_TYPE_DIRECTORY = 0,
+ RESSOURCE_TYPE_VOLUME = 2,
+ RESSOURCE_TYPE_EXTERNAL_MAP = 3,
+ RESSOURCE_TYPE_INTERNAL_MAP = 4,
+ RESSOURCE_TYPE_MASK = 127
+};
+
#define RESSOURCE_ADDRESSING_BASIC 0
#define RESSOURCE_ADDRESSING_EXTENDED 128
#define RESSOURCE_ADDRESSING_MASK 128
@@ -121,7 +124,7 @@
typedef struct resource_index_struct resource_index_t;
struct ResourceSource {
- int source_type;
+ ResourceType source_type;
bool scanned;
Common::String location_name; // FIXME: Replace by FSNode ?
Common::String location_dir_name; // FIXME: Get rid of this again, only a temporary HACK!
Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-22 04:04:33 UTC (rev 38778)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-22 04:22:53 UTC (rev 38779)
@@ -309,8 +309,10 @@
compression = sci0_get_compression_method(file);
file.close();
- if (compression == 3)
- return (mgr->sci_version = SCI_VERSION_01_VGA);
+ if (compression == 3) {
+ mgr->sci_version = SCI_VERSION_01_VGA;
+ return mgr->sci_version;
+ }
}
// Try the same thing with pics
@@ -332,8 +334,10 @@
compression = sci0_get_compression_method(file);
file.close();
- if (compression == 3)
- return (mgr->sci_version = SCI_VERSION_01_VGA);
+ if (compression == 3) {
+ mgr->sci_version = SCI_VERSION_01_VGA;
+ return mgr->sci_version;
+ }
}
return mgr->sci_version;
@@ -428,6 +432,8 @@
mgr->sci_version = *detected_version;
break;
+ default:
+ break;
}
qsort(mgr->_resources, mgr->_resourcesNr, sizeof(resource_t), resourcecmp); // Sort resources
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list