リンクをつけときました。
http://hirohirosystem.com/003_cargame/cargameSV061.html
INTSECDATA = [
"1,420,090,150,20,010,7,13",
"2,560,100,010,20,020,7,13",
"3,400,100,010,20,020,7,13",
"4,400,120,200,25,025,7,13"
];
ib_draw();
ib_next();
ib_keisan();
gameover1 += 1
if(intbl[0].tszy<400){
setTimeout("mmain()", sec_time*10);
}
:
:
function ib_keisan(){
for(i=0; i<4; i++){
//"1,300,240,400,20,040,7,13",
//"2,740,340,100,20,200,7,13",
//"3,160,340,100,20,200,7,13",
cid = intbl[i].tcid;
szx = intbl[i].tszx;
szy = intbl[i].tszy;
kuw = intbl[i].tkuw;
hlw = intbl[i].thlw;
hw = intbl[i].thw;
hlsu1 = intbl[i].thlsu1;
hlsu2 = intbl[i].thlsu2;
if((cid === "1")||(cid === "4")){
cnline = parseInt(szx+kuw/2);
yow = parseInt((kuw-parseInt(kuw/hlsu2)*hlsu2)/2);
hkuw = parseInt(kuw/hlsu2);
cnsu = Math.round(hlsu1/2)-1;
ulx = szx + yow;
uly = szy;
urx = ulx + hkuw;
ury = uly;
shkuw = hw*0.8/(hlsu2+1)*2;
drx = parseInt(urx - hw*0.83 +shkuw);
dry = ury + hw;
dlx = parseInt(ulx - hw*0.83);
dly = dry;
ib_xy[i][0][0*2] = ulx;
ib_xy[i][0][0*2+1] = uly;
ib_xy[i][0][1*2] = urx;
ib_xy[i][0][1*2+1] = ury;
ib_xy[i][0][2*2] = drx;
ib_xy[i][0][2*2+1] = dry;
ib_xy[i][0][3*2] = dlx;
ib_xy[i][0][3*2+1] = dly;
for(j=1;j<JSU;j++){
ulx = urx + hkuw;
uly = szy;
urx = ulx + hkuw;
ury = uly;
if(j < cnsu){
dlx = parseInt(ulx - hw*0.83 + shkuw + shkuw*j);
}else{
if(j === cnsu){
//dlx = parseInt(ulx - shkuw*(j-1));
dlx = parseInt(ulx - shkuw*(j-2));
}else{
//dlx = parseInt(ulx + hw*0.8 - shkuw*(5-j) - shkuw*(8-j));
dlx = parseInt(ulx + hw*0.83 - shkuw*(hlsu2-2*j));
//dlx = parseInt(ulx + hw*0.8 + shkuw*((3-j)-6));
if(j === hlsu1-1){
dlx = ulx +hw*0.83 -shkuw;
}
}
}
dly = uly + hw;
if(j < cnsu){
drx = parseInt(dlx + hkuw + shkuw*j);
}else{
if(j===cnsu){
//drx = parseInt(urx + shkuw*(j-1));
drx = parseInt(urx + shkuw*(j-2));
}else{
drx = parseInt(dlx + hkuw + shkuw*(hlsu1-1-j));
if(j===hlsu1-1){
drx = urx + hw*0.83;
}
}
}
dry = dly;
ib_xy[i][j][0*2] = ulx;
ib_xy[i][j][0*2+1] = uly;
ib_xy[i][j][1*2] = urx;
ib_xy[i][j][1*2+1] = ury;
ib_xy[i][j][2*2] = drx;
ib_xy[i][j][2*2+1] = dry;
ib_xy[i][j][3*2] = dlx;
ib_xy[i][j][3*2+1] = dly;
}
}
if((cid === "2") || (cid === "3")){
//余白を求める
yow = parseInt((hw-parseInt(hw/hlsu2)*hlsu2)/2);
hkuw = hw*0.3/hlsu2;
ahkuw =hw*0.4/hlsu2;
ulx = szx;
uly = szy + yow;
urx = ulx + kuw;
ury = uly;
hhw = parseInt(hw/hlsu2);
ahhw = hw/hlsu2;
if(cid === "2"){
//drx = parseInt(urx + hhw*0.83) + (dry-szy-yow)*0.3;
drx = parseInt(urx + ahhw*0.83 + ahkuw);
}else{
drx = parseInt(urx - hhw*0.8);
}
dry = ury + hhw;
if(cid === "2"){
//dlx = parseInt(ulx + hhw*0.83) + (dry-szy-yow)*0.3;
dlx = parseInt(ulx + ahhw*0.83);
}else{
//dlx = parseInt(ulx - hhw*0.83) - (dry-szy-yow)*0.3;
dlx = parseInt(ulx - hhw*0.8 - hkuw);
}
dly = dry;
ib_xy[i][0][0*2] = ulx;
ib_xy[i][0][0*2+1] = uly;
ib_xy[i][0][1*2] = urx;
ib_xy[i][0][1*2+1] = ury;
ib_xy[i][0][2*2] = drx;
ib_xy[i][0][2*2+1] = dry;
ib_xy[i][0][3*2] = dlx;
ib_xy[i][0][3*2+1] = dly;
for(j=1;j<JSU;j++){
uly = dly + hhw;
if(cid === "2"){
//@@@@@@@
ulx = parseInt(dlx + ahhw*0.9);
//ulx = parseInt(dlx + hkuw);
}else{
//ulx = parseInt(dlx - hhw*0.83) - (uly-szy-yow)*0.3;
ulx = parseInt(dlx - hhw*0.8 - hkuw);
}
urx = ulx + kuw;
if(cid === "2"){
//urx = parseInt(drx + hhw*0.8) + (uly-szy-yow)*0.3;
urx = parseInt(drx + ahhw*0.9 + ahkuw);
}else{
urx = parseInt(drx - hhw*0.8);
}
ury = uly;
if(cid === "2"){
//drx = parseInt(urx + hhw*0.8) + (dry-szy-yow)*0.3;
drx = parseInt(urx + ahhw*0.9 + ahkuw);
}else{
drx = parseInt(urx - hhw*0.8);
}
dry = uly + hhw;
if(cid === "2"){
dlx = parseInt(ulx + ahhw*0.9);
}else{
//dlx = parseInt(ulx - hhw*0.8) - (dry-szy-yow)*0.3;
dlx = parseInt(ulx - hhw*0.8 - hkuw);
}
dly = dry;
ib_xy[i][j][0*2] = ulx;
ib_xy[i][j][0*2+1] = uly;
ib_xy[i][j][1*2] = urx;
ib_xy[i][j][1*2+1] = ury;
ib_xy[i][j][2*2] = drx;
ib_xy[i][j][2*2+1] = dry;
ib_xy[i][j][3*2] = dlx;
ib_xy[i][j][3*2+1] = dly;
}
}
}
}
function ib_next(){
intbl[0].tcid = intbl[0].tcid;
intbl[0].tszx = intbl[0].tszx - tspd*20/30;
intbl[0].tszy = intbl[0].tszy + tspd;
intbl[0].tkuw = intbl[0].tkuw + tspd*20*2/30;
intbl[0].thlw = intbl[0].thlw;
intbl[0].thw = intbl[0].thw + tspd*5/30;
intbl[0].thlsu1 = intbl[0].thlsu1;
intbl[0].thlsu2 = intbl[0].thlsu2;
intbl[0].tthhw = intbl[0].tthhw + tspd;
intbl[3].tcid = intbl[3].tcid;
intbl[3].tszx = intbl[0].tszx - intbl[0].tthhw*20/30;
intbl[3].tszy = intbl[0].tszy + intbl[0].tthhw;
intbl[3].tkuw = intbl[0].tkuw + intbl[0].tthhw*20*2/30;
intbl[3].thlw = intbl[3].thlw;
intbl[3].thw = intbl[3].thw + tspd*2*5/30;
intbl[3].thlsu1 = intbl[3].thlsu1;
intbl[3].thlsu2 = intbl[3].thlsu2;
intbl[1].tcid = intbl[1].tcid;
intbl[1].tszx = intbl[0].tszx + intbl[0].tkuw + intbl[0].thw*1;
intbl[1].tszy = intbl[0].tszy + intbl[0].thw*1;
intbl[1].tkuw = intbl[1].tkuw + tspd*5/30;
intbl[1].thlw = intbl[1].thlw;
intbl[1].thw = intbl[3].tszy - intbl[0].tszy - intbl[0].thw;
intbl[1].thlsu1 = intbl[1].thlsu1;
intbl[1].thlsu2 = intbl[1].thlsu2;
intbl[2].tcid = intbl[2].tcid;
intbl[2].tszx = intbl[0].tszx - intbl[0].thw*1 - intbl[1].tkuw;
intbl[2].tszy = intbl[0].tszy + intbl[0].thw*1;
intbl[2].tkuw = intbl[1].tkuw;
intbl[2].thlw = intbl[2].thlw;
intbl[2].thw = intbl[1].thw;
intbl[2].thlsu1 = intbl[1].thlsu1;
intbl[2].thlsu2 = intbl[1].thlsu2;
intbl[0].tthhw = intbl[3].tszy - intbl[0].tszy;
intbl[3].tthhw = intbl[0].tszy - intbl[3].tszy;
intbl[1].tthhw = intbl[1].szx - intbl[2].szx;
intbl[2].tthhw = intbl[2].szx - intbl[1].szx;
}