Commit f12016dd authored by Alexander Shabarshin's avatar Alexander Shabarshin

initial online version

parent 8906700d
<HTML>
<HEAD>
<HEAD><TITLE>Circuits.CC</TITLE>
<META HTTP-EQUIV="Content-Language" content="en">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8">
<SCRIPT type="text/javascript" src="/webitable.js"></SCRIPT>
</HEAD>
<BODY BGCOLOR=#000000 TEXT=#00AA00 LINK=#00AAAA>
<p id="tut" align=center>test</p>
<p id="tut" align=center>to create circuits here you probably need a newer web browser...</p>
<p align=center>
<font size=-2>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />
<font size=-4>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a>
<br />Content on this site is licensed under a<br />
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
<br />But libraries <a href="/webitable.js">webitable.js</a> and <a href="/weberta.js">weberta.js</a> are licensed under LGPL v2.1
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />
<br />JavaScript libraries <a href="/webitable.js">webitable.js</a> and <a href="/weberta.js">weberta.js</a> are licensed under <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL v2.1</a>.
<br />Client side source code written in Roberta programming language is licensed under <a href="http://www.gnu.org/licenses/gpl.html">GPLv3</a>.
<br />Server side source code written in <a href="http://www.hopelog.com">Hope programming language</a> is considered a public domain.
<br />All source codes to make your own Circuits.CC clone are freely available on <a href="https://github.com/shaos/circuits_cc">GitHub</a>.
<br />Brought to you by <a href="http://nedocon.com">NEDOCON</a>.
Check out our <a href="http://www.nedopc.org/forum/viewforum.php?f=46">Russian forum</a> or <a href="http://www.nedopc.org/forum/viewforum.php?f=62">English forum</a> for support...
</font>
</p>
</BODY>
......@@ -38,8 +43,15 @@ function rob_sets(x,y,s,o) {
return x+i;
}
var chx = 0;
var chy = 0;
var id = 1;
function rob_id(s) {
id = parseInt(s);
rob_sets(100-s.length,0,s,1);
}
var chx = 16;
var chy = 18;
var chs = -1;
function tab_blink() {
......@@ -47,7 +59,7 @@ function tab_blink() {
{
if(chs<0) {
chs = ((chy-3)<<4)|(chx-1);
rob_set(chx,chy,0x1DB);
rob_set(chx,chy,0x3DB);
} else {
rob_set(chx,chy,chs);
chs = -1;
......@@ -67,28 +79,39 @@ function tab_act(x,y) {
chx = x;
chy = y;
}
else if(x>16 && y>1) {
else if(y>18 || (x>16 && y>1)) {
if(chx==0 && chy==0) {
alert('['+x+','+y+']');
} else {
var c = ((chy-3)<<4)|(chx-1);
if(c>=0 && c<256) rob_set(x,y,c);
if(c>=0 && c<256)
{
rob_set(x,y,c);
$__(function(s){
$map(s.split("\n"),function(s){
if(s!=""){
var c=s.split(",");
rob_set(parseInt(c[0]),parseInt(c[1]),parseInt(c[2]));
rob_id(c[3]);
}
});
},"/cgi-bin/pcb0.hop?id="+id+"&col="+x+"&row="+y+"&sym="+c);
}
}
}
}
window.setInterval(function(){tab_blink()},500);
if($W.table('tut',43,80,'tab','<img src=/pcb/0010.gif>')>0) {
if($W.table('tut',75,100,'tab','<img src=/pcb/0010.gif>')>0) {
var i,j,k=0;
for(i=0;i<80;i++) rob_set(i,0,0x20);
for(i=0;i<80;i++) rob_set(i,1,0x1CD);
for(i=0;i<100;i++) rob_set(i,0,0x20);
for(i=0;i<100;i++) rob_set(i,1,0x1CD);
rob_sets(0,0,'CIRCUITS.CC',1);
rob_sets(37,0,'SANDBOX',1);
rob_set(79,0,0x130);
rob_sets(47,0,'SANDBOX',1);
rob_sets(0,2,'\\0123456789ABCDEF',1);
rob_setc(0,3,'0',1);
......@@ -117,11 +140,28 @@ for(i=0;i<16;i++){
$map($$('tab.*.*'),function(e){
var a = e.id.split('.');
var x = a[2];
var y = a[1];
e.setAttribute('onClick','tab_act('+x+','+y+')');
e.onclick = function(){tab_act(parseInt(a[2]),parseInt(a[1]))};
});
$__(function(s){
var si = "0";
$map(s.split("\n"),function(s){
var c=s.split(",");
var x=parseInt(c[0]);
var y=parseInt(c[1]);
var s=parseInt(c[2]);
var i=parseInt(c[3]);
if(y>18 || (y>1 && x>16)) {
rob_set(x,y,s);
if(i>id) {
id = i;
si = c[3];
}
}
});
rob_id(si);
tab_act(99,74);
},"/cgi-bin/pcb0.hop?id=0");
}
</script>
......
......@@ -99,8 +99,8 @@ $W.table = function(p,h,w,s) {
$(p).innerHTML = "";
var r = this.create(p,"table",ts);
var t = $(ts);
t.setAttribute("cellpadding","0");
t.setAttribute("cellspacing","0");
t.setAttribute("cellPadding","0");
t.setAttribute("cellSpacing","0");
t.setAttribute("border","0");
r += this.create(ts,"tbody",s);
var i,j;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment