diff --git a/index.html b/index.html
index 6068066..7994acd 100644
--- a/index.html
+++ b/index.html
@@ -45,6 +45,7 @@
+
请稍候...
@@ -142,7 +143,7 @@
-
+
diff --git a/libs/core.js b/libs/core.js
index 55d0bd2..9617d07 100644
--- a/libs/core.js
+++ b/libs/core.js
@@ -290,7 +290,8 @@ core.prototype.init = function (coreData, callback) {
core.canvas[name].canvas.height = (b ? core.__PIXELS__ : core._PY_);
}
}
-
+ core.dom.whole.width = b ? core.__PIXELS__ : core._PX_ + Math.round(core._PX_ / 3);
+ core.dom.whole.height = b ? core.__PIXELS__ : core._PY_;
core.loader._load(function () {
core.extensions._load(function () {
core._afterLoadResources(callback);
diff --git a/main.js b/main.js
index 96e1a2a..2d73fc0 100644
--- a/main.js
+++ b/main.js
@@ -75,6 +75,8 @@ function main () {
'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'),
'caidan1': document.getElementById('caidan1'),
'caidan1Ctx': document.getElementById('caidan1').getContext('2d'),
+ 'whole': document.getElementById('whole'),
+ 'wholeCtx': document.getElementById('whole').getContext('2d'),
'inputDiv': document.getElementById('inputDiv'),
'inputMessage': document.getElementById('inputMessage'),
'inputBox': document.getElementById('inputBox'),
diff --git a/project/floors/nandu.js b/project/floors/nandu.js
index 6052293..0af1343 100644
--- a/project/floors/nandu.js
+++ b/project/floors/nandu.js
@@ -9,8 +9,8 @@ main.floors.nandu=
"images": [
{
"name": "nanduxuanze.jpg",
- "canvas": "bg",
- "x": -80,
+ "canvas": "whole",
+ "x": 0,
"y": 0
}
],
@@ -22,6 +22,10 @@ main.floors.nandu=
1
],
"firstArrive": [
+ {
+ "type": "function",
+ "function": "function(){\ncontrol.prototype.hideStatusBar();\n}"
+ },
{
"type": "trigger",
"loc": [
@@ -70,59 +74,13 @@ main.floors.nandu=
"keep": true
},
{
- "type": "showImage",
- "code": 1,
- "image": "easy.png",
- "loc": [
- 0,
- 64
- ],
- "opacity": 1,
- "time": 0
+ "type": "setValue",
+ "name": "flag:hard",
+ "value": "1"
},
{
- "type": "showImage",
- "code": 2,
- "image": "anhard.png",
- "loc": [
- 0,
- 192
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 3,
- "image": "ancheating.png",
- "loc": [
- 0,
- 320
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 4,
- "image": "anhell.png",
- "loc": [
- 0,
- 256
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 5,
- "image": "annormal.png",
- "loc": [
- 0,
- 128
- ],
- "opacity": 1,
- "time": 0
+ "type": "function",
+ "function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n}"
},
{
"type": "showImage",
@@ -211,129 +169,8 @@ main.floors.nandu=
],
"false": [
{
- "type": "if",
- "condition": "((flag:x<=3)&&(flag:y==2))",
- "true": [
- {
- "type": "if",
- "condition": "(flag:hard==1)",
- "true": [
- {
- "type": "setValue",
- "name": "flag:xuanzhong",
- "value": "1"
- }
- ],
- "false": [
- {
- "type": "setValue",
- "name": "flag:hard",
- "value": "1"
- }
- ]
- }
- ],
- "false": []
- },
- {
- "type": "if",
- "condition": "((flag:x<=3)&&(flag:y==4))",
- "true": [
- {
- "type": "if",
- "condition": "(flag:hard==2)",
- "true": [
- {
- "type": "setValue",
- "name": "flag:xuanzhong",
- "value": "1"
- }
- ],
- "false": [
- {
- "type": "setValue",
- "name": "flag:hard",
- "value": "2"
- }
- ]
- }
- ],
- "false": []
- },
- {
- "type": "if",
- "condition": "((flag:x<=3)&&(flag:y==6))",
- "true": [
- {
- "type": "if",
- "condition": "(flag:hard==3)",
- "true": [
- {
- "type": "setValue",
- "name": "flag:xuanzhong",
- "value": "1"
- }
- ],
- "false": [
- {
- "type": "setValue",
- "name": "flag:hard",
- "value": "3"
- }
- ]
- }
- ],
- "false": []
- },
- {
- "type": "if",
- "condition": "((flag:x<=3)&&(flag:y==8))",
- "true": [
- {
- "type": "if",
- "condition": "(flag:hard==4)",
- "true": [
- {
- "type": "setValue",
- "name": "flag:xuanzhong",
- "value": "1"
- }
- ],
- "false": [
- {
- "type": "setValue",
- "name": "flag:hard",
- "value": "4"
- }
- ]
- }
- ],
- "false": []
- },
- {
- "type": "if",
- "condition": "((flag:x<=3)&&(flag:y==10))",
- "true": [
- {
- "type": "if",
- "condition": "(flag:hard==5)",
- "true": [
- {
- "type": "setValue",
- "name": "flag:xuanzhong",
- "value": "1"
- }
- ],
- "false": [
- {
- "type": "setValue",
- "name": "flag:hard",
- "value": "5"
- }
- ]
- }
- ],
- "false": []
+ "type": "function",
+ "function": "function(){\nvar h = -1;\nif (flags.px <= 160 && flags.py >= 46 && flags.py <= 430) h = Math.floor((flags.py - 46) / 77) + 1;\nif (h > 0) {\n\tif (h == flags.hard) flags.xuanzhong = 1;\n\telse flags.hard = h;\n}\n}"
}
]
},
@@ -367,219 +204,13 @@ main.floors.nandu=
"true": [
{
"type": "function",
- "function": "function(){\nswitch (core.getFlag(\"hard\")) {\ncase 1:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择简单难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\n\ncase 2:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择中等难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 3:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择困难难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 4:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择噩梦难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 5:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择作弊难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\n\tbreak;\n\n\n}\n}"
+ "function": "function(){\ncore.insertAction([{\n\t\"type\": \"choices\",\n\t\"text\": \"是否选择\" + [\"作弊\", \"简单\", \"中等\", \"困难\", \"噩梦\", \"作弊\"][flags.hard] + \"难度\",\n\t\"choices\": [{\n\t\t\t\"text\": \"是\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"break\" },\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"text\": \"否\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"setValue\", \"name\": \"fla\" + \"g:xuanzhong\", \"value\": \"0\" },\n\t\t\t]\n\t\t},\n\t]\n}, ])\n}"
}
],
"false": [
{
- "type": "hideImage",
- "code": 1,
- "time": 0
- },
- {
- "type": "if",
- "condition": "(flag:hard==1)",
- "true": [
- {
- "type": "showImage",
- "code": 6,
- "image": "0easy.png",
- "loc": [
- -160,
- 0
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 1,
- "image": "easy.png",
- "loc": [
- 0,
- 64
- ],
- "opacity": 1,
- "time": 0
- }
- ],
- "false": [
- {
- "type": "showImage",
- "code": 1,
- "image": "aneasy.png",
- "loc": [
- 0,
- 64
- ],
- "opacity": 1,
- "time": 0
- }
- ]
- },
- {
- "type": "if",
- "condition": "(flag:hard==2)",
- "true": [
- {
- "type": "showImage",
- "code": 6,
- "image": "0normal.png",
- "loc": [
- -160,
- 0
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 2,
- "image": "normal.png",
- "loc": [
- 0,
- 128
- ],
- "opacity": 1,
- "time": 0
- }
- ],
- "false": [
- {
- "type": "showImage",
- "code": 2,
- "image": "annormal.png",
- "loc": [
- 0,
- 128
- ],
- "opacity": 1,
- "time": 0
- }
- ]
- },
- {
- "type": "if",
- "condition": "(flag:hard==3)",
- "true": [
- {
- "type": "showImage",
- "code": 6,
- "image": "0hard.png",
- "loc": [
- -160,
- 0
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 3,
- "image": "hard.png",
- "loc": [
- 0,
- 192
- ],
- "opacity": 1,
- "time": 0
- }
- ],
- "false": [
- {
- "type": "showImage",
- "code": 3,
- "image": "anhard.png",
- "loc": [
- 0,
- 192
- ],
- "opacity": 1,
- "time": 0
- }
- ]
- },
- {
- "type": "if",
- "condition": "(flag:hard==4)",
- "true": [
- {
- "type": "showImage",
- "code": 6,
- "image": "0hell.png",
- "loc": [
- -160,
- 0
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 4,
- "image": "hell.png",
- "loc": [
- 0,
- 256
- ],
- "opacity": 1,
- "time": 0
- }
- ],
- "false": [
- {
- "type": "showImage",
- "code": 4,
- "image": "anhell.png",
- "loc": [
- 0,
- 256
- ],
- "opacity": 1,
- "time": 0
- }
- ]
- },
- {
- "type": "if",
- "condition": "(flag:hard==5)",
- "true": [
- {
- "type": "showImage",
- "code": 6,
- "image": "0cheating.png",
- "loc": [
- -160,
- 0
- ],
- "opacity": 1,
- "time": 0
- },
- {
- "type": "showImage",
- "code": 5,
- "image": "cheating.png",
- "loc": [
- 0,
- 320
- ],
- "opacity": 1,
- "time": 0
- }
- ],
- "false": [
- {
- "type": "showImage",
- "code": 5,
- "image": "ancheating.png",
- "loc": [
- 0,
- 320
- ],
- "opacity": 1,
- "time": 0
- }
- ]
+ "type": "function",
+ "function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n\ncore.insertAction({ \"type\": \"showImage\", \"code\": 6, \"image\": [\"0cheating.png\", \"0easy.png\", \"0normal.png\", \"0hard.png\", \"0hell.png\", \"0cheating.png\"][flags.hard], \"loc\": [-160, 0], \"opacity\": 1, \"time\": 0 })\n}"
}
]
}
@@ -596,31 +227,6 @@ main.floors.nandu=
"time": 0,
"keep": true
},
- {
- "type": "hideImage",
- "code": 1,
- "time": 0
- },
- {
- "type": "hideImage",
- "code": 2,
- "time": 0
- },
- {
- "type": "hideImage",
- "code": 3,
- "time": 0
- },
- {
- "type": "hideImage",
- "code": 4,
- "time": 0
- },
- {
- "type": "hideImage",
- "code": 5,
- "time": 0
- },
{
"type": "hideImage",
"code": 6,
@@ -633,149 +239,8 @@ main.floors.nandu=
"time": 20
},
{
- "type": "switch",
- "condition": "flag:hard",
- "caseList": [
- {
- "case": "1",
- "action": [
- {
- "type": "setGlobalAttribute",
- "name": "statusLeftBackground",
- "value": "url(project/images/heng1.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "setGlobalAttribute",
- "name": "toolsBackground",
- "value": "url(project/images/dibu1.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "update"
- },
- {
- "type": "setBlock",
- "number": "122",
- "loc": [
- [
- 5,
- 5
- ]
- ],
- "floorId": "MT0"
- }
- ]
- },
- {
- "case": "2",
- "action": [
- {
- "type": "setGlobalAttribute",
- "name": "statusLeftBackground",
- "value": "url(project/images/heng2.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "setGlobalAttribute",
- "name": "toolsBackground",
- "value": "url(project/images/dibu2.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "update"
- },
- {
- "type": "setBlock",
- "number": "122",
- "loc": [
- [
- 5,
- 5
- ]
- ],
- "floorId": "MT0"
- },
- {
- "type": "setBlock",
- "number": "122",
- "loc": [
- [
- 5,
- 4
- ]
- ],
- "floorId": "MT0"
- }
- ]
- },
- {
- "case": "3",
- "action": [
- {
- "type": "setGlobalAttribute",
- "name": "statusLeftBackground",
- "value": "url(project/images/heng3.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "setGlobalAttribute",
- "name": "toolsBackground",
- "value": "url(project/images/dibu3.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "update"
- }
- ]
- },
- {
- "case": "4",
- "action": [
- {
- "type": "setGlobalAttribute",
- "name": "statusLeftBackground",
- "value": "url(project/images/heng4.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "setGlobalAttribute",
- "name": "toolsBackground",
- "value": "url(project/images/dibu4.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "update"
- }
- ]
- },
- {
- "case": "5",
- "action": [
- {
- "type": "setGlobalAttribute",
- "name": "statusLeftBackground",
- "value": "url(project/images/heng5.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "setGlobalAttribute",
- "name": "toolsBackground",
- "value": "url(project/images/dibu5.png) 0 0/100% 100% no-repeat"
- },
- {
- "type": "update"
- },
- {
- "type": "setBlock",
- "number": "122",
- "loc": [
- [
- 5,
- 5
- ]
- ],
- "floorId": "MT0"
- },
- {
- "type": "setValue",
- "name": "status:mdef",
- "value": "800"
- }
- ]
- }
- ]
+ "type": "function",
+ "function": "function(){\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"statusLeftBackground\", \"value\": \"url(project/images/heng\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"toolsBackground\", \"value\": \"url(project/images/dibu\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"update\" });\nif (flags.hard != 3 && flags.hard != 4) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 5]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 2) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 4]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 0 || flags.hard == 5) core.status.hero.mdef += 800;\n}"
},
{
"type": "function",
diff --git a/project/functions.js b/project/functions.js
index 8d4c1b9..1fb856d 100644
--- a/project/functions.js
+++ b/project/functions.js
@@ -1651,7 +1651,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
fill(core.itemCount('redKey'), 130, 280 + 52, '#E9967A');
fill('黑钥匙', 55, 280 + 78, '#000000');
fill(core.itemCount('greenKey'), 130, 280 + 78, '#000000');
- core.drawImage(ctx, core.material.images.images[['00005.png','00001.png','00002.png','00003.png','00004.png','00005.png'][flags.hard || 0]], 0, 423);
+ core.drawImage(ctx, core.material.images.images[['00005.png','00001.png','00002.png','00003.png','00004.png','00005.png'][flags.hard || 0]], 0, 423 - [0,10,10,0,0,0][flags.hard || 0]);
if (flags.poison) fill("中毒", 5, 60, '#00CD00');
if (flags.weak) fill("衰弱", 50, 60, '#FF1493');
}
diff --git a/project/images/ancheating.png b/project/images/ancheating.png
index c80dd4f..bc732b9 100644
Binary files a/project/images/ancheating.png and b/project/images/ancheating.png differ
diff --git a/project/images/aneasy.png b/project/images/aneasy.png
index f1d7cd0..7c94004 100644
Binary files a/project/images/aneasy.png and b/project/images/aneasy.png differ
diff --git a/project/images/anhard.png b/project/images/anhard.png
index 0ae200f..6149d36 100644
Binary files a/project/images/anhard.png and b/project/images/anhard.png differ
diff --git a/project/images/anhell.png b/project/images/anhell.png
index a810e49..e3a16f1 100644
Binary files a/project/images/anhell.png and b/project/images/anhell.png differ
diff --git a/project/images/annormal.png b/project/images/annormal.png
index 2fac252..2ede0e6 100644
Binary files a/project/images/annormal.png and b/project/images/annormal.png differ
diff --git a/project/images/cheating.png b/project/images/cheating.png
index 41b7a39..a1ad1d9 100644
Binary files a/project/images/cheating.png and b/project/images/cheating.png differ
diff --git a/project/images/easy.png b/project/images/easy.png
index 96b2152..be52684 100644
Binary files a/project/images/easy.png and b/project/images/easy.png differ
diff --git a/project/images/hard.png b/project/images/hard.png
index 3512af9..1ba3cc5 100644
Binary files a/project/images/hard.png and b/project/images/hard.png differ
diff --git a/project/images/hell.png b/project/images/hell.png
index 138fe54..87a2ef1 100644
Binary files a/project/images/hell.png and b/project/images/hell.png differ
diff --git a/project/images/normal.png b/project/images/normal.png
index d467dad..ee2b569 100644
Binary files a/project/images/normal.png and b/project/images/normal.png differ
diff --git a/project/plugins.js b/project/plugins.js
index 69032cb..2f3d54a 100644
--- a/project/plugins.js
+++ b/project/plugins.js
@@ -117,6 +117,48 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.dom.statusCanvas.style.display = core.flags.statusCanvas && !obj.extendToolbar ? "block" : "none";
}
core.registerResize("statusBar", core.control._resize_statusBar);
+ core.control._resize_gameGroup = function (obj) {
+ var startBackground = core.domStyle.isVertical ? (main.styles.startVerticalBackground || main.styles.startBackground) : main.styles.startBackground;
+ if (main.dom.startBackground.getAttribute('__src__') != startBackground) {
+ main.dom.startBackground.setAttribute('__src__', startBackground);
+ main.dom.startBackground.src = startBackground;
+ }
+
+ var gameGroup = core.dom.gameGroup;
+ var totalWidth, totalHeight;
+ if (core.domStyle.isVertical) {
+ totalWidth = obj.outerWidth;
+ totalHeight = obj.outerHeight + obj.statusBarHeightInVertical + obj.toolbarHeightInVertical
+ }
+ else {
+ totalWidth = obj.outerWidth + obj.BAR_WIDTH * core.domStyle.scale + (obj.extendToolbar ? 0 : obj.BORDER);
+ totalHeight = obj.outerHeight + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT * core.domStyle.scale + obj.BORDER : 0);
+ }
+ gameGroup.style.width = totalWidth + "px";
+ gameGroup.style.height = totalHeight + "px";
+ gameGroup.style.left = (obj.clientWidth - totalWidth) / 2 + "px";
+ gameGroup.style.top = (obj.clientHeight - totalHeight) / 2 + "px";
+ var whole = core.dom.whole;
+ whole.style.width = totalWidth + "px";
+ whole.style.height = totalHeight + "px";
+ // floorMsgGroup
+ var floorMsgGroup = core.dom.floorMsgGroup;
+ floorMsgGroup.style = obj.globalAttribute.floorChangingStyle;
+ floorMsgGroup.style.width = obj.outerWidth - 2 * obj.BORDER + "px";
+ floorMsgGroup.style.height = totalHeight - 2 * obj.BORDER + "px";
+ floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + "px";
+ // startPanel
+ core.dom.startPanel.style.fontSize = 16 * core.domStyle.scale + "px";
+ // musicBtn
+ if (core.domStyle.isVertical || core.domStyle.scale < 1) {
+ core.dom.musicBtn.style.right = core.dom.musicBtn.style.bottom = "3px";
+ }
+ else {
+ core.dom.musicBtn.style.right = (obj.clientWidth - totalWidth) / 2 + "px";
+ core.dom.musicBtn.style.bottom = (obj.clientHeight - totalHeight) / 2 - 27 + "px";
+ }
+ }
+ core.registerResize("gameGroup", core.control._resize_gameGroup);
core.maps._drawThumbnail_realDrawTempCanvas = function (floorId, blocks, options) {
// 缩略图:背景
this.drawBg(floorId, options);
@@ -142,6 +184,45 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.control.updateDamage(floorId, options.ctx);
}
}
+ core.maps._drawMap_drawAll = function (floorId, config) {
+ floorId = floorId || core.status.floorId;
+ this.drawBg(floorId, config);
+ this.drawEvents(floorId);
+ this.drawFg(floorId, config);
+ if (floorId == "nandu") {
+ core.maps._drawFloorImages(floorId, core.dom.wholeCtx, 'whole', null, null, (config || {}).onMap);
+ }
+ else core.dom.wholeCtx.clearRect(0, 0, core.dom.whole.width, core.dom.whole.height);
+ }
+ core.control._animationFrame_globalAnimate = function (timestamp) {
+ if (timestamp - core.animateFrame.globalTime <= core.values.animateSpeed) return;
+ core.status.globalAnimateStatus++;
+ if (core.status.floorId) {
+ // Global Animate
+ core.status.globalAnimateObjs.forEach(function (block) {
+ core.drawBlock(block, core.status.globalAnimateStatus);
+ });
+
+ // Global floor images
+ core.maps._drawFloorImages(core.status.floorId, core.canvas.bg, 'bg', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
+ core.maps._drawFloorImages(core.status.floorId, core.canvas.fg, 'fg', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
+ core.maps._drawFloorImages(core.status.floorId, core.dom.wholeCtx, 'whole', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
+
+ // Global Autotile Animate
+ core.status.autotileAnimateObjs.forEach(function (block) {
+ core.maps._drawAutotileAnimate(block, core.status.globalAnimateStatus);
+ });
+
+ // Global hero animate
+ if ((core.status.hero || {}).animate && core.status.heroMoving == 0 && main.mode == 'play' && !core.status.preview.enabled) {
+ core.drawHero('stop', null, core.status.globalAnimateStatus);
+ }
+ }
+ // Box animate
+ core.drawBoxAnimate();
+ core.animateFrame.globalTime = timestamp;
+ }
+ core.control.registerAnimationFrame("globalAnimate", true, core.control._animationFrame_globalAnimate);
},
"drawLight": function () {
diff --git a/styles.css b/styles.css
index 40d8957..977db0d 100644
--- a/styles.css
+++ b/styles.css
@@ -1,4 +1,4 @@
-html, body {
+html, body {
margin: 0;
padding: 0;
width: 100%;
@@ -201,7 +201,7 @@
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
background: url(project/materials/ground.png) repeat;
- z-index: 185;
+ /*z-index: 185;*/
display: none;
top: 0;
left: 0;
@@ -296,7 +296,7 @@ p#name {
position: absolute;
background: #000000;
overflow: hidden;
- z-index: 185;
+ /*z-index: 185;*/
}
#bg {