aboutsummaryrefslogtreecommitdiff
path: root/features/dungeonMap
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-15 13:47:44 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-15 13:47:44 +0800
commit62bb98cb9576f23c8cc2c06446b52ad4aa4a4884 (patch)
tree71b5ad63056fa05873594bbeb27656219bc34c8f /features/dungeonMap
parent7112c1e3da740b20857c6d9eefd2803632f3d248 (diff)
downloadSoopyV2-62bb98cb9576f23c8cc2c06446b52ad4aa4a4884.tar.gz
SoopyV2-62bb98cb9576f23c8cc2c06446b52ad4aa4a4884.tar.bz2
SoopyV2-62bb98cb9576f23c8cc2c06446b52ad4aa4a4884.zip
fix dungeon map
Diffstat (limited to 'features/dungeonMap')
-rw-r--r--features/dungeonMap/index.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js
index fd8b0a0..bdaaf23 100644
--- a/features/dungeonMap/index.js
+++ b/features/dungeonMap/index.js
@@ -482,7 +482,10 @@ class DungeonMap extends Feature {
let ry = 0
for (let x = 0; x < 128; x += 5) {
for (let y = 0; y < 128; y += 5) {
- if (bytes[x + y * 128] === 30) {
+ if (bytes[x + y * 128] === 30
+ && bytes[x + 1 + y * 128] === 30
+ && bytes[x + 2 + y * 128] === 30
+ && bytes[x + 3 + y * 128] === 30) {
rx = x
ry = y
while (bytes[(rx - 1) + ry * 128] === 30) {
@@ -508,6 +511,7 @@ class DungeonMap extends Feature {
roomWidth1++
}
let roomWidth = Math.floor(Math.max(roomWidth1, roomWidth2) * 5 / 4)
+ console.log(roomWidth)
this.mapScale = 32 / roomWidth
let mortLocationOnMap
roomOffsets = [rx % roomWidth - 3, ry % roomWidth - 3]
@@ -582,7 +586,6 @@ class DungeonMap extends Feature {
}
}
}
-
}
}