[Scummvm-cvs-logs] SF.net SVN: scummvm:[46399] tools/branches/gsoc2009-gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Dec 17 00:58:45 CET 2009
Revision: 46399
http://scummvm.svn.sourceforge.net/scummvm/?rev=46399&view=rev
Author: fingolfin
Date: 2009-12-16 23:58:44 +0000 (Wed, 16 Dec 2009)
Log Message:
-----------
Avoid including util.h in several source files
Modified Paths:
--------------
tools/branches/gsoc2009-gui/common/md5.cpp
tools/branches/gsoc2009-gui/common/md5.h
tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
tools/branches/gsoc2009-gui/compress_scumm_san.cpp
tools/branches/gsoc2009-gui/compress_sword1.cpp
tools/branches/gsoc2009-gui/decine.cpp
tools/branches/gsoc2009-gui/dekyra.cpp
tools/branches/gsoc2009-gui/dekyra.h
tools/branches/gsoc2009-gui/dekyra_v1.cpp
tools/branches/gsoc2009-gui/descumm-common.cpp
tools/branches/gsoc2009-gui/descumm-tool.cpp
tools/branches/gsoc2009-gui/descumm.cpp
tools/branches/gsoc2009-gui/descumm.h
tools/branches/gsoc2009-gui/descumm6.cpp
tools/branches/gsoc2009-gui/extract_cine.cpp
tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
tools/branches/gsoc2009-gui/kyra_ins.cpp
tools/branches/gsoc2009-gui/kyra_ins.h
tools/branches/gsoc2009-gui/kyra_pak.cpp
tools/branches/gsoc2009-gui/kyra_pak.h
tools/branches/gsoc2009-gui/tool.h
tools/branches/gsoc2009-gui/utils/audiostream.cpp
tools/branches/gsoc2009-gui/utils/audiostream.h
tools/branches/gsoc2009-gui/utils/voc.cpp
tools/branches/gsoc2009-gui/utils/voc.h
Modified: tools/branches/gsoc2009-gui/common/md5.cpp
===================================================================
--- tools/branches/gsoc2009-gui/common/md5.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/common/md5.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -20,8 +20,11 @@
*
*/
-#include "md5.h"
+#include "common/md5.h"
+#include "common/endian.h"
+#include <stdio.h>
+
namespace Common {
#define GET_UINT32(n, b, i) (n) = READ_LE_UINT32(b + i)
Modified: tools/branches/gsoc2009-gui/common/md5.h
===================================================================
--- tools/branches/gsoc2009-gui/common/md5.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/common/md5.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,7 +23,7 @@
#ifndef COMMON_MD5_H
#define COMMON_MD5_H
-#include "../util.h"
+#include "common/scummsys.h"
namespace Common {
Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -21,6 +21,7 @@
*/
#include "compress_scumm_bun.h"
+#include "common/endian.h"
/*
* The "IMC" codec below (see cases 13 & 15 in decompressCodec) is actually a
Modified: tools/branches/gsoc2009-gui/compress_scumm_san.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -21,8 +21,10 @@
*/
#include "compress_scumm_san.h"
-#include "zlib.h"
+#include "common/endian.h"
+#include <zlib.h>
+
void CompressScummSan::encodeSanWaveWithOgg(char *filename) {
char fbuf[2048];
char fbuf2[2048];
Modified: tools/branches/gsoc2009-gui/compress_sword1.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -22,8 +22,7 @@
#include "compress_sword1.h"
-#define READ_BE_UINT32(x) \
- ((((uint8*)(x))[0] << 24) | (((uint8*)(x))[1] << 16) | (((uint8*)(x))[2] << 8) | (((uint8*)(x))[3] << 0))
+#include "common/endian.h"
#define TOTAL_TUNES 269
Modified: tools/branches/gsoc2009-gui/decine.cpp
===================================================================
--- tools/branches/gsoc2009-gui/decine.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/decine.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -31,8 +31,13 @@
* FIXME: Make this code endian safe.
*/
-#include "util.h"
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/util.h"
+#include <assert.h>
+#include <stdio.h>
+
static const uint8 *_baseScriptData, *_scriptData;
static uint8 fetchScriptByte() {
Modified: tools/branches/gsoc2009-gui/dekyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/dekyra.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/dekyra.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -22,7 +22,9 @@
*/
#include "dekyra.h"
+#include "common/endian.h"
#include "common/file.h"
+#include "common/util.h"
#include <stdio.h>
Modified: tools/branches/gsoc2009-gui/dekyra.h
===================================================================
--- tools/branches/gsoc2009-gui/dekyra.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/dekyra.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -24,7 +24,7 @@
#ifndef DEKYRA_H
#define DEKYRA_H
-#include "util.h"
+#include "common/scummsys.h"
typedef unsigned int uint;
Modified: tools/branches/gsoc2009-gui/dekyra_v1.cpp
===================================================================
--- tools/branches/gsoc2009-gui/dekyra_v1.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/dekyra_v1.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -21,6 +21,9 @@
*/
#include "dekyra.h"
+#include "common/endian.h"
+#include "common/util.h"
+#include <stdio.h>
extern FILE *outputFile;
Modified: tools/branches/gsoc2009-gui/descumm-common.cpp
===================================================================
--- tools/branches/gsoc2009-gui/descumm-common.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/descumm-common.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,7 +23,10 @@
#include "descumm.h"
+#include "common/endian.h"
+#include <stdio.h>
+
BlockStack g_blockStack;
bool pendingElse, haveElse;
Modified: tools/branches/gsoc2009-gui/descumm-tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/descumm-tool.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/descumm-tool.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,6 +23,12 @@
#include "descumm.h"
+#include "common/endian.h"
+#include "common/util.h"
+
+#include <ctype.h>
+#include <stdio.h>
+
// 200kb limit on the input file (we just read it all at once into memory).
// Should be no problem, the biggest scripts I have seen were in COMI and
// went up to 180kb (script-457).
Modified: tools/branches/gsoc2009-gui/descumm.cpp
===================================================================
--- tools/branches/gsoc2009-gui/descumm.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/descumm.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,6 +23,10 @@
#include "descumm.h"
+#include "common/util.h"
+
+#include <stdio.h>
+
/*
Similar to the code that detects "head" while loops like this:
while(Condition) {
Modified: tools/branches/gsoc2009-gui/descumm.h
===================================================================
--- tools/branches/gsoc2009-gui/descumm.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/descumm.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -24,8 +24,9 @@
#ifndef DESCUMM_H
#define DESCUMM_H
-#include "util.h"
+#include "common/scummsys.h"
+#include <assert.h>
typedef unsigned int uint;
Modified: tools/branches/gsoc2009-gui/descumm6.cpp
===================================================================
--- tools/branches/gsoc2009-gui/descumm6.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/descumm6.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,6 +23,10 @@
#include "descumm.h"
+#include "common/util.h"
+
+#include <stdio.h>
+
/*
switch/case statements have a pattern that look as follows (they were probably
generated by some Scumm script compiler):
Modified: tools/branches/gsoc2009-gui/extract_cine.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_cine.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/extract_cine.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -34,6 +34,7 @@
*/
#include "extract_cine.h"
+#include "common/endian.h"
#include <algorithm>
Modified: tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_t7g_mac.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/extract_t7g_mac.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -25,8 +25,10 @@
#include "extract_t7g_mac.h"
+#include "common/endian.h"
+
#define offsetResFork 128
-uint32 offsetResourceData;
+static uint32 offsetResourceData;
ExtractT7GMac::ExtractT7GMac(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) {
Modified: tools/branches/gsoc2009-gui/kyra_ins.cpp
===================================================================
--- tools/branches/gsoc2009-gui/kyra_ins.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/kyra_ins.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -22,6 +22,9 @@
#include "kyra_ins.h"
+#include "common/endian.h"
+#include "common/util.h"
+
class FileExpanderSource {
public:
FileExpanderSource(const uint8 *data, int dataSize) : _dataPtr(data), _endofBuffer(data + dataSize), _bitsLeft(8), _key(0), _index(0) {}
Modified: tools/branches/gsoc2009-gui/kyra_ins.h
===================================================================
--- tools/branches/gsoc2009-gui/kyra_ins.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/kyra_ins.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -24,7 +24,6 @@
#define KYRA_INS_H
#include "extract_kyra.h"
-#include "util.h"
class HoFInstaller : public Extractor {
public:
Modified: tools/branches/gsoc2009-gui/kyra_pak.cpp
===================================================================
--- tools/branches/gsoc2009-gui/kyra_pak.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/kyra_pak.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -22,6 +22,9 @@
#include "kyra_pak.h"
+#include "common/endian.h"
+#include "common/util.h"
+
bool PAKFile::isPakFile(const char *filename) {
File f(filename, "rb");
Modified: tools/branches/gsoc2009-gui/kyra_pak.h
===================================================================
--- tools/branches/gsoc2009-gui/kyra_pak.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/kyra_pak.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -24,7 +24,6 @@
#define KYRA_PAK_H
#include "extract_kyra.h"
-#include "util.h"
class PAKFile : public Extractor {
public:
Modified: tools/branches/gsoc2009-gui/tool.h
===================================================================
--- tools/branches/gsoc2009-gui/tool.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/tool.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -27,7 +27,6 @@
#include <deque>
#include <string>
-#include "util.h"
#include "common/file.h"
/**
Modified: tools/branches/gsoc2009-gui/utils/audiostream.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/audiostream.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/utils/audiostream.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -22,7 +22,11 @@
#include "audiostream.h"
+#include "common/endian.h"
+#include <assert.h>
+#include <stdio.h>
+
namespace Audio {
struct StreamFileFormat {
Modified: tools/branches/gsoc2009-gui/utils/audiostream.h
===================================================================
--- tools/branches/gsoc2009-gui/utils/audiostream.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/utils/audiostream.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,8 +23,8 @@
#ifndef SOUND_AUDIOSTREAM_H
#define SOUND_AUDIOSTREAM_H
-#include "../util.h"
-#include "util.h"
+#include "common/scummsys.h"
+#include "common/util.h"
namespace Audio {
Modified: tools/branches/gsoc2009-gui/utils/voc.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/voc.cpp 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/utils/voc.cpp 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,7 +23,9 @@
#include "voc.h"
#include "audiostream.h"
+#include "common/endian.h"
+
namespace Audio {
int getSampleRateFromVOCRate(int vocSR) {
Modified: tools/branches/gsoc2009-gui/utils/voc.h
===================================================================
--- tools/branches/gsoc2009-gui/utils/voc.h 2009-12-16 23:42:52 UTC (rev 46398)
+++ tools/branches/gsoc2009-gui/utils/voc.h 2009-12-16 23:58:44 UTC (rev 46399)
@@ -23,7 +23,7 @@
#ifndef SOUND_VOC_H
#define SOUND_VOC_H
-#include "../util.h"
+#include "common/scummsys.h"
#include "common/file.h"
namespace Audio {
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