From 5683f076331d2831eb4720b65bb53e8d01ca33ee Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Sat, 21 Jul 2012 18:19:07 +0200
Subject: WINTERMUTE: Rename CamelCased filenames to
 prefixed_under_score-filenames

This is mostly a lead-up to namespacing the Ad/Base folders, and then
possibly removing the prefixes from the files, it also has the added
benefit of getting rid of the odd case-typos that makes for issues
on platforms that don't ignore case.
---
 engines/wintermute/base/base_parser.h | 89 +++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 engines/wintermute/base/base_parser.h

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
new file mode 100644
index 0000000000..53a02c0f68
--- /dev/null
+++ b/engines/wintermute/base/base_parser.h
@@ -0,0 +1,89 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_BPARSER_H
+#define WINTERMUTE_BPARSER_H
+
+
+#define TOKEN_DEF_START         \
+	enum                  \
+	{                 \
+		TOKEN_NONE = 0,
+#define TOKEN_DEF(name)         \
+	TOKEN_ ## name,
+#define TOKEN_DEF_END           \
+	TOKEN_TOTAL_COUNT           \
+	};
+#define TOKEN_TABLE_START(name)     \
+	static CBParser::TokenDesc name [] =      \
+	        {
+#define TOKEN_TABLE(name)       \
+	{ TOKEN_ ## name, #name },
+#define TOKEN_TABLE_END         \
+	{ 0, 0 }                \
+	};
+
+#define PARSERR_GENERIC         -3
+#define PARSERR_EOF             -2
+#define PARSERR_TOKENNOTFOUND   -1
+
+#include "engines/wintermute/base/base.h"
+#include "engines/wintermute/coll_templ.h"
+
+namespace WinterMute {
+
+class CBParser : public CBBase {
+public:
+	struct TokenDesc {
+		int32	id;
+		const char *token;
+	};
+
+public:
+	int scanStr(const char *in, const char *format, ...);
+	int32 getCommand(char **buf, TokenDesc *tokens, char **params);
+	CBParser(CBGame *inGame = NULL);
+	virtual ~CBParser();
+private:
+	char *getLastOffender();
+	void skipToken(char **buf, char *tok, char *msg = NULL);
+	int getTokenInt(char **buf);
+	float getTokenFloat(char **buf);
+	char *getToken(char **buf);
+	char *getAssignmentText(char **buf);
+	char *getSubText(char **buf, char open, char close);
+	void skipCharacters(char **buf, const char *toSkip);
+	int32 getObject(char **buf, TokenDesc *tokens, char **name, char **data);
+	int _parserLine;
+	char _lastOffender[255];
+	char *_whiteSpace;
+};
+
+} // end of namespace WinterMute
+
+#endif
-- 
cgit v1.2.3


From b5a07fef8ebf29f7f44b15d9b34799c7e115fdad Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Sat, 21 Jul 2012 21:01:47 +0200
Subject: WINTERMUTE: Get rid of the C-prefix for class-definitions.

---
 engines/wintermute/base/base_parser.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 53a02c0f68..a5c55ceb41 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -40,7 +40,7 @@
 	TOKEN_TOTAL_COUNT           \
 	};
 #define TOKEN_TABLE_START(name)     \
-	static CBParser::TokenDesc name [] =      \
+	static BaseParser::TokenDesc name [] =      \
 	        {
 #define TOKEN_TABLE(name)       \
 	{ TOKEN_ ## name, #name },
@@ -57,7 +57,7 @@
 
 namespace WinterMute {
 
-class CBParser : public CBBase {
+class BaseParser : public BaseClass {
 public:
 	struct TokenDesc {
 		int32	id;
@@ -67,8 +67,8 @@ public:
 public:
 	int scanStr(const char *in, const char *format, ...);
 	int32 getCommand(char **buf, TokenDesc *tokens, char **params);
-	CBParser(CBGame *inGame = NULL);
-	virtual ~CBParser();
+	BaseParser(BaseGame *inGame = NULL);
+	virtual ~BaseParser();
 private:
 	char *getLastOffender();
 	void skipToken(char **buf, char *tok, char *msg = NULL);
-- 
cgit v1.2.3


From 38507fa9895620639d8733dbb4e085dfb2282a33 Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Thu, 26 Jul 2012 04:12:58 +0200
Subject: WINTERMUTE: AStyle-formatting.

---
 engines/wintermute/base/base_parser.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index a5c55ceb41..03ca71b48d 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -60,7 +60,7 @@ namespace WinterMute {
 class BaseParser : public BaseClass {
 public:
 	struct TokenDesc {
-		int32	id;
+		int32   id;
 		const char *token;
 	};
 
-- 
cgit v1.2.3


From 9b5cf8f1bafd5aa0dba9194a8f04e58724652891 Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Sun, 29 Jul 2012 02:30:26 +0200
Subject: WINTERMUTE: Introduce a Singleton-class for holding
 registry/filemanager.

---
 engines/wintermute/base/base_parser.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 03ca71b48d..3b1979efa1 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -52,12 +52,11 @@
 #define PARSERR_EOF             -2
 #define PARSERR_TOKENNOTFOUND   -1
 
-#include "engines/wintermute/base/base.h"
 #include "engines/wintermute/coll_templ.h"
 
 namespace WinterMute {
 
-class BaseParser : public BaseClass {
+class BaseParser {
 public:
 	struct TokenDesc {
 		int32   id;
@@ -67,7 +66,7 @@ public:
 public:
 	int scanStr(const char *in, const char *format, ...);
 	int32 getCommand(char **buf, TokenDesc *tokens, char **params);
-	BaseParser(BaseGame *inGame = NULL);
+	BaseParser();
 	virtual ~BaseParser();
 private:
 	char *getLastOffender();
-- 
cgit v1.2.3


From 6b07218eb24e91865eee277758112e5bb4fecd97 Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Sun, 29 Jul 2012 18:22:10 +0200
Subject: WINTERMUTE: Remove statics and silence spam in debug console.

---
 engines/wintermute/base/base_parser.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 3b1979efa1..34266bd5bd 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -40,7 +40,7 @@
 	TOKEN_TOTAL_COUNT           \
 	};
 #define TOKEN_TABLE_START(name)     \
-	static BaseParser::TokenDesc name [] =      \
+	static const BaseParser::TokenDesc name [] =      \
 	        {
 #define TOKEN_TABLE(name)       \
 	{ TOKEN_ ## name, #name },
@@ -65,7 +65,7 @@ public:
 
 public:
 	int scanStr(const char *in, const char *format, ...);
-	int32 getCommand(char **buf, TokenDesc *tokens, char **params);
+	int32 getCommand(char **buf, const TokenDesc *tokens, char **params);
 	BaseParser();
 	virtual ~BaseParser();
 private:
@@ -73,11 +73,11 @@ private:
 	void skipToken(char **buf, char *tok, char *msg = NULL);
 	int getTokenInt(char **buf);
 	float getTokenFloat(char **buf);
-	char *getToken(char **buf);
+	Common::String getToken(char **buf);
 	char *getAssignmentText(char **buf);
 	char *getSubText(char **buf, char open, char close);
 	void skipCharacters(char **buf, const char *toSkip);
-	int32 getObject(char **buf, TokenDesc *tokens, char **name, char **data);
+	int32 getObject(char **buf, const TokenDesc *tokens, char **name, char **data);
 	int _parserLine;
 	char _lastOffender[255];
 	char *_whiteSpace;
-- 
cgit v1.2.3


From fed19cb66ae5b56dd7dc81b90edd5a0d15986678 Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Mon, 13 Aug 2012 03:42:30 +0200
Subject: WINTERMUTE: WinterMute -> Wintermute

---
 engines/wintermute/base/base_parser.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 34266bd5bd..3d63668059 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -54,7 +54,7 @@
 
 #include "engines/wintermute/coll_templ.h"
 
-namespace WinterMute {
+namespace Wintermute {
 
 class BaseParser {
 public:
@@ -83,6 +83,6 @@ private:
 	char *_whiteSpace;
 };
 
-} // end of namespace WinterMute
+} // end of namespace Wintermute
 
 #endif
-- 
cgit v1.2.3


From 07c27b775c8d3997bf40891c2772ae8859eb534d Mon Sep 17 00:00:00 2001
From: Einar Johan Trøan Sømåen
Date: Fri, 31 Aug 2012 19:35:49 +0200
Subject: WINTERMUTE: Cleanup the header-guards.

---
 engines/wintermute/base/base_parser.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 3d63668059..6b4f733d74 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -26,8 +26,8 @@
  * Copyright (c) 2011 Jan Nedoma
  */
 
-#ifndef WINTERMUTE_BPARSER_H
-#define WINTERMUTE_BPARSER_H
+#ifndef WINTERMUTE_BASE_PARSER_H
+#define WINTERMUTE_BASE_PARSER_H
 
 
 #define TOKEN_DEF_START         \
-- 
cgit v1.2.3


From b4090ead4d4334e08725323ff72fd355c93b63d5 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn
Date: Tue, 4 Sep 2012 22:17:23 +0200
Subject: WINTERMUTE: Convert CRLF to LF

---
 engines/wintermute/base/base_parser.h | 176 +++++++++++++++++-----------------
 1 file changed, 88 insertions(+), 88 deletions(-)

(limited to 'engines/wintermute/base/base_parser.h')

diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 6b4f733d74..76ca8ea856 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -1,88 +1,88 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This file is based on WME Lite.
- * http://dead-code.org/redir.php?target=wmelite
- * Copyright (c) 2011 Jan Nedoma
- */
-
-#ifndef WINTERMUTE_BASE_PARSER_H
-#define WINTERMUTE_BASE_PARSER_H
-
-
-#define TOKEN_DEF_START         \
-	enum                  \
-	{                 \
-		TOKEN_NONE = 0,
-#define TOKEN_DEF(name)         \
-	TOKEN_ ## name,
-#define TOKEN_DEF_END           \
-	TOKEN_TOTAL_COUNT           \
-	};
-#define TOKEN_TABLE_START(name)     \
-	static const BaseParser::TokenDesc name [] =      \
-	        {
-#define TOKEN_TABLE(name)       \
-	{ TOKEN_ ## name, #name },
-#define TOKEN_TABLE_END         \
-	{ 0, 0 }                \
-	};
-
-#define PARSERR_GENERIC         -3
-#define PARSERR_EOF             -2
-#define PARSERR_TOKENNOTFOUND   -1
-
-#include "engines/wintermute/coll_templ.h"
-
-namespace Wintermute {
-
-class BaseParser {
-public:
-	struct TokenDesc {
-		int32   id;
-		const char *token;
-	};
-
-public:
-	int scanStr(const char *in, const char *format, ...);
-	int32 getCommand(char **buf, const TokenDesc *tokens, char **params);
-	BaseParser();
-	virtual ~BaseParser();
-private:
-	char *getLastOffender();
-	void skipToken(char **buf, char *tok, char *msg = NULL);
-	int getTokenInt(char **buf);
-	float getTokenFloat(char **buf);
-	Common::String getToken(char **buf);
-	char *getAssignmentText(char **buf);
-	char *getSubText(char **buf, char open, char close);
-	void skipCharacters(char **buf, const char *toSkip);
-	int32 getObject(char **buf, const TokenDesc *tokens, char **name, char **data);
-	int _parserLine;
-	char _lastOffender[255];
-	char *_whiteSpace;
-};
-
-} // end of namespace Wintermute
-
-#endif
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_BASE_PARSER_H
+#define WINTERMUTE_BASE_PARSER_H
+
+
+#define TOKEN_DEF_START         \
+	enum                  \
+	{                 \
+		TOKEN_NONE = 0,
+#define TOKEN_DEF(name)         \
+	TOKEN_ ## name,
+#define TOKEN_DEF_END           \
+	TOKEN_TOTAL_COUNT           \
+	};
+#define TOKEN_TABLE_START(name)     \
+	static const BaseParser::TokenDesc name [] =      \
+	        {
+#define TOKEN_TABLE(name)       \
+	{ TOKEN_ ## name, #name },
+#define TOKEN_TABLE_END         \
+	{ 0, 0 }                \
+	};
+
+#define PARSERR_GENERIC         -3
+#define PARSERR_EOF             -2
+#define PARSERR_TOKENNOTFOUND   -1
+
+#include "engines/wintermute/coll_templ.h"
+
+namespace Wintermute {
+
+class BaseParser {
+public:
+	struct TokenDesc {
+		int32   id;
+		const char *token;
+	};
+
+public:
+	int scanStr(const char *in, const char *format, ...);
+	int32 getCommand(char **buf, const TokenDesc *tokens, char **params);
+	BaseParser();
+	virtual ~BaseParser();
+private:
+	char *getLastOffender();
+	void skipToken(char **buf, char *tok, char *msg = NULL);
+	int getTokenInt(char **buf);
+	float getTokenFloat(char **buf);
+	Common::String getToken(char **buf);
+	char *getAssignmentText(char **buf);
+	char *getSubText(char **buf, char open, char close);
+	void skipCharacters(char **buf, const char *toSkip);
+	int32 getObject(char **buf, const TokenDesc *tokens, char **name, char **data);
+	int _parserLine;
+	char _lastOffender[255];
+	char *_whiteSpace;
+};
+
+} // end of namespace Wintermute
+
+#endif
-- 
cgit v1.2.3