-<!DOCTYPE html>
-<html>
-<head>
-<meta http-equiv="X-UA-Compatible" content="IE=9">
-<meta charset="UTF-8">
-<title>HTML5Test</title>
-<style type="text/css">
- h1, h2, h3 {
- margin:0px;
- }
- body, textarea {
- font-family: Consolas, 'Courier New', Courier, Monaco, monospace;
- font-size: 11px;
- line-height: 1.2;
- }
-</style>
-<script type="text/javascript" src="./editor/include/jquery.js" charset="UTF-8"></script>
-<script type="text/javascript" src="./corelib/header.js" charset="UTF-8"></script>
-<script type="text/javascript">
-
-var mainManager = null;
-var dbg = null;
-onload = function()
-{
- var val = localStorage.getItem("savedat");
- if(val)
- {
- document.getElementById("stageCode").value = val;
- }
-
- //ゲームマネージャー初期化
- //mainManager = new GameManager();
- mainManager = document.getElementById('MainArea').InitGameManager();
- dbg = mainManager.debugText;
- //最初はグローバルデバッグモードはオフ
- mainManager.debugText = null;
-
- //コールバック指定
- mainManager.stageStartedEvent = function(stage)
- {
- document.getElementById('MainArea').style.visibility = 'visible';
- };
- mainManager.stageStoppedEvent = function(stage)
- {
- document.getElementById('MainArea').style.visibility = 'hidden';
- };
-
- var prev;
- if(prev = localStorage.getItem("previewStage"))
- {
- localStorage.removeItem("previewStage");
- document.getElementById('stageCode').value = (prev);
- run();
- }else
- {
- location.href="editor/index.html";
- }
-
-};
-
-var run = function(){
-
- var stage = document.getElementById("stageCode").value;
- mainManager.loadStageFromLocal(stage);
-};
-
-function stop(){
- mainManager.stopStage();
-}
-
-function switchDebug()
-{
- if(mainManager.debugText == null)
- {
- mainManager.debugText = dbg;
- mainManager.runningStage.debugMode = true;
- mainManager.debugOut("Debug enabled.\n");
- } else{
- mainManager.debugOut("Debug disabled.\n");
- mainManager.debugText = null;
- mainManager.runningStage.debugMode = false
- }
-}
-
-function reload()
-{
- localStorage.setItem("previewStage", document.getElementById('stageCode').value);
- location.reload();
-}
-
-function localModeLoadHandler(stgName)
-{
- $('#stageCode').text("xx");
- $('#stageCode').load("./stage/" + stgName + ".js");
- for(;$('#stageCode').text() == "xx";){ }
- return $('#stageCode').text();
-}
-
-</script>
-</head>
-<body>
- <div id="MainArea" style="width: 640px; height: 480px; visibility: hidden"></div>
- <div id="Resources"></div>
- <div style="z-index: 1;">
- <form><textarea id="DebugText" rows="8" cols="64"></textarea></form>
- <input type="button" onclick="run(); return false;" value="ステージの実行/再実行"><input type="button" onclick="stop(); return false;" value="ステージの停止"><input type="button" onclick="switchDebug(); return false;" value="デバッグの有効/無効"><input type="button" onclick="reload(); return false;" value="ページの再読み込み">
- </div>
- <div style="display: none;"><form><textarea id="stageCode"></textarea></form></div>
-</body>
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+<meta http-equiv="X-UA-Compatible" content="IE=9">\r
+<meta charset="UTF-8">\r
+<title>HTML5Test</title>\r
+<style type="text/css">\r
+ h1, h2, h3 {\r
+ margin:0px;\r
+ }\r
+ body, textarea {\r
+ font-family: Consolas, 'Courier New', Courier, Monaco, monospace;\r
+ font-size: 11px;\r
+ line-height: 1.2;\r
+ }\r
+</style>\r
+<script type="text/javascript" src="./editor/include/jquery.js" charset="UTF-8"></script>\r
+<script type="text/javascript" src="./corelib/header.js" charset="UTF-8"></script>\r
+<script type="text/javascript">\r
+\r
+var mainManager = null;\r
+var dbg = null;\r
+onload = function()\r
+{\r
+ var val = localStorage.getItem("savedat");\r
+ if(val)\r
+ {\r
+ document.getElementById("stageCode").value = val;\r
+ }\r
+ \r
+ //ゲームマネージャー初期化\r
+ //mainManager = new GameManager();\r
+ mainManager = document.getElementById('MainArea').InitGameManager();\r
+ dbg = mainManager.debugText;\r
+ //最初はグローバルデバッグモードはオフ\r
+ mainManager.debugText = null;\r
+ \r
+ //コールバック指定\r
+ mainManager.stageStartedEvent = function(stage)\r
+ {\r
+ document.getElementById('MainArea').style.visibility = 'visible';\r
+ };\r
+ mainManager.stageStoppedEvent = function(stage)\r
+ {\r
+ document.getElementById('MainArea').style.visibility = 'hidden';\r
+ };\r
+ \r
+ var prev;\r
+ if(prev = localStorage.getItem("previewStage"))\r
+ {\r
+ localStorage.removeItem("previewStage");\r
+ document.getElementById('stageCode').value = (prev);\r
+ run();\r
+ }else\r
+ {\r
+ location.href="editor/index.html";\r
+ }\r
+ \r
+};\r
+\r
+var run = function(){\r
+\r
+ var stage = document.getElementById("stageCode").value;\r
+ mainManager.loadStageFromLocal(stage);\r
+};\r
+\r
+function stop(){\r
+ mainManager.stopStage();\r
+}\r
+\r
+function switchDebug()\r
+{\r
+ if(mainManager.debugText == null)\r
+ {\r
+ mainManager.debugText = dbg;\r
+ mainManager.runningStage.debugMode = true;\r
+ mainManager.debugOut("Debug enabled.\n");\r
+ } else{\r
+ mainManager.debugOut("Debug disabled.\n");\r
+ mainManager.debugText = null;\r
+ mainManager.runningStage.debugMode = false\r
+ }\r
+}\r
+\r
+function reload()\r
+{\r
+ localStorage.setItem("previewStage", document.getElementById('stageCode').value);\r
+ location.reload();\r
+}\r
+\r
+function localModeLoadHandler(stgName)\r
+{\r
+ $('#stageCode').text("xx");\r
+ $('#stageCode').load("./stage/" + stgName + ".js");\r
+ for(;$('#stageCode').text() == "xx";){ }\r
+ return $('#stageCode').text();\r
+}\r
+\r
+</script>\r
+</head>\r
+<body>\r
+ <div id="MainArea" style="width: 640px; height: 480px; visibility: hidden"></div>\r
+ <div id="Resources"></div>\r
+ <div style="z-index: 1;">\r
+ <form><textarea id="DebugText" rows="8" cols="64"></textarea></form>\r
+ <input type="button" onclick="run(); return false;" value="ステージの実行/再実行"><input type="button" onclick="stop(); return false;" value="ステージの停止"><input type="button" onclick="switchDebug(); return false;" value="デバッグの有効/無効"><input type="button" onclick="reload(); return false;" value="ページの再読み込み">\r
+ </div>\r
+ <div style="display: none;"><form><textarea id="stageCode"></textarea></form></div>\r
+</body>\r
</html>
\ No newline at end of file