-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathstage1.js
16 lines (15 loc) · 1.05 KB
/
stage1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var stage1 = new Uint8Array([72,129,236,8,16,0,0,186,0,16,0,0,72,137,230,191,1,0,1,0,72,184,65,65,65,65,65,65,65,65,255,208,72,133,192,117,15,72,184,1,0,0,0,0,0,255,255,233,159,0,0,0,72,255,200,72,137,225,72,1,193,199,1,120,46,100,121,199,65,4,108,105,98,0,184,5,0,0,2,72,137,231,186,237,1,0,0,190,2,6,0,0,15,5,115,12,72,184,2,0,0,0,0,0,255,255,235,103,72,137,199,72,190,66,66,66,66,66,66,66,66,73,184,67,67,67,67,67,67,67,67,76,137,194,184,4,0,0,2,15,5,115,12,72,184,3,0,0,0,0,0,255,255,235,56,73,41,192,72,1,198,77,133,192,117,221,72,49,246,72,137,231,72,184,68,68,68,68,68,68,68,68,255,208,72,133,192,117,12,72,184,4,0,0,0,0,0,255,255,235,10,72,184,0,0,0,0,0,0,255,255,72,129,196,8,16,0,0,195]);
stage1.replace = function(oldVal, newVal) {
for (var idx = 0; idx < this.length; idx++) {
var found = true;
for (var j = idx; j < idx + 8; j++) {
if (this[j] != oldVal.byteAt(j - idx)) {
found = false;
break;
}
}
if (found)
break;
}
this.set(newVal.bytes(), idx);
};