|
From: <cl...@us...> - 2007-08-17 03:35:49
|
Revision: 83
http://fortress.svn.sourceforge.net/fortress/?rev=83&view=rev
Author: clrg
Date: 2007-08-16 20:35:50 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Fix grass and make piece zoffset effective
Modified Paths:
--------------
trunk/client/src/net/sourceforge/fortress/isogrid.t
trunk/client/src/net/sourceforge/fortress/twoquarter.t
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/twoquarter.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/twoquarter.t 2007-08-17 03:25:55 UTC (rev 82)
+++ trunk/client/src/net/sourceforge/fortress/twoquarter.t 2007-08-17 03:35:50 UTC (rev 83)
@@ -22,9 +22,9 @@
// used to give the graphics a non-repeating feel
thisbox.seed = vexi.math.floor(vexi.math.random()*10);
// used to set the base fill of the tile
- thisbox.tile = "grass";
+ thisbox.base = "grass";
- var sync = function() { fill = .iso96[tile][tile+seed]; }
+ var sync = function() { fill = .iso96[base][base+seed]; }
sync();
thisbox.addPiece = function(type, top, left, zoffset)
@@ -32,15 +32,15 @@
type = type.split('.');
var z = static.zindex[type[0]];
if (z == null) throw "tried to add nonregistered type '"+type+"' from "+posx+", "+posy;
- // dont add null/undeclared to z
- z += zoffset ? zoffset : 0;
+ // static.z*zoffset allows us to place tiles untouchably infronts
+ z += static.z * (zoffset ? zoffset : 0);
var p;
var i = 0;
while (numchildren > i)
{
p = thisbox[i];
if (p.z == z and p.left == left and p.top == top)
- throw "tried to add a duplicate tile piece of type '"+type[0]+"' from "+posx+", "+posy;
+ throw "tried to add a duplicate piece '"+type[0]+"("+z+") ' from "+posx+", "+posy;
if (p.z > z) break;
i++;
}
@@ -66,8 +66,8 @@
{
var z = static.zindex[type];
if (z == null) throw "tried to add nonregistered type '"+type+"' from "+posx+", "+posy;
- // dont add null/undeclared to z
- z += zoffset ? zoffset : 0;
+ // static.z*zoffset allows us to place tiles untouchably infront
+ z += static.z * (zoffset ? zoffset : 0);
var p;
for (var i=0; numchildren>i; i++)
{
@@ -78,7 +78,7 @@
return;
}
}
- throw "tried to clear a non-existent piece of type '"+type+"' from "+posx+", "+posy;
+ throw "tried to clear a non-existent piece of type '"+type[0]+"' from "+posx+", "+posy;
}
thisbox.posx ++= static.posFunc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|