From 917d320342f4ce5fdbcabb6231f9d3d6654afbb2 Mon Sep 17 00:00:00 2001
From: Mathew <mathewvq@gmail.com>
Date: Thu, 26 Nov 2015 18:11:08 -0500
Subject: [PATCH] Linked  to debugMode option, gutted RTP config

---
 binding-mri/binding-mri.cpp | 3 +++
 scripts/Main.rb             | 3 ---
 src/config.cpp              | 3 ---
 src/config.h                | 1 -
 src/sharedstate.cpp         | 3 ---
 5 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp
index d4dbcba..1b87284 100644
--- a/binding-mri/binding-mri.cpp
+++ b/binding-mri/binding-mri.cpp
@@ -404,6 +404,9 @@ static void runRMXPScripts(BacktraceData &btData)
 		return;
 	}
 
+	/* Set the debug flag */
+	rb_gv_set("$DEBUG", conf.debugMode ? Qtrue : Qfalse);
+
 	rb_gv_set("$RGSS_SCRIPTS", scriptArray);
 
 	long scriptCount = RARRAY_LEN(scriptArray);
diff --git a/scripts/Main.rb b/scripts/Main.rb
index 1a82e2b..3423cb6 100644
--- a/scripts/Main.rb
+++ b/scripts/Main.rb
@@ -5,9 +5,6 @@
 #==============================================================================
 
 begin
-  $DEBUG = true
-  $DEMO = false
-
   Graphics.frame_rate = 60
   Font.default_size = 20
 
diff --git a/src/config.cpp b/src/config.cpp
index 15514ed..c417b42 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -170,7 +170,6 @@ void Config::read(int argc, char *argv[])
 	podesc.add_options()
 	        PO_DESC_ALL
 	        ("preloadScript", po::value<StringVec>()->composing())
-	        ("RTP", po::value<StringVec>()->composing())
 	        ("fontSub", po::value<StringVec>()->composing())
 	        ("rubyLoadpath", po::value<StringVec>()->composing())
 	        ;
@@ -212,8 +211,6 @@ void Config::read(int argc, char *argv[])
 
 	GUARD_ALL( preloadScripts = vm["preloadScript"].as<StringVec>(); );
 
-	GUARD_ALL( rtps = vm["RTP"].as<StringVec>(); );
-
 	GUARD_ALL( fontSubs = vm["fontSub"].as<StringVec>(); );
 
 	GUARD_ALL( rubyLoadpaths = vm["rubyLoadpath"].as<StringVec>(); );
diff --git a/src/config.h b/src/config.h
index 391b896..49e0b24 100644
--- a/src/config.h
+++ b/src/config.h
@@ -69,7 +69,6 @@ struct Config
 	} SE;
 
 	std::vector<std::string> preloadScripts;
-	std::vector<std::string> rtps;
 
 	std::vector<std::string> fontSubs;
 
diff --git a/src/sharedstate.cpp b/src/sharedstate.cpp
index 1142598..a66447b 100644
--- a/src/sharedstate.cpp
+++ b/src/sharedstate.cpp
@@ -132,9 +132,6 @@ struct SharedStatePrivate
 
 		fileSystem.addPath(".");
 
-		for (size_t i = 0; i < config.rtps.size(); ++i)
-			fileSystem.addPath(config.rtps[i].c_str());
-
 		if (config.pathCache)
 			fileSystem.createPathCache();