-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.js
More file actions
40 lines (35 loc) · 901 Bytes
/
map.js
File metadata and controls
40 lines (35 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
console.log("map.js loaded");
$(document).ready(function() {
$(document).on("contextmenu",function(e){
return false;
});
});
var RenderNewMap = function(rows, columns, isFull)
{
a = [];
for (let index = 0; index < rows; index++)
{
a.push(new Row(index, columns, isFull, false));
}
return a;
}
var RenderMapFromBinary = function(rows, columns, addrArr)
{
a = [];
if (columns != 128) columns = 32;
if (addrArr.length != rows) console.log("rows != adresy");
for (let index = 0; index < addrArr.length; index++)
{
a.push(new Row(index, columns, false, addrArr[index]));
}
return a;
}
window.mouseDown = [false, false, false, false, false, false];
document.body.onmousedown = function(evt)
{
window.mouseDown[evt.button] = true;
}
document.body.onmouseup = function(evt)
{
window.mouseDown[evt.button] = false;
}