From: <cl...@us...> - 2007-06-20 15:57:46
|
Revision: 10 http://fortress.svn.sourceforge.net/fortress/?rev=10&view=rev Author: clrg Date: 2007-06-20 08:57:46 -0700 (Wed, 20 Jun 2007) Log Message: ----------- Click on the grass to make mud roads :-) Modified Paths: -------------- trunk/Prototype/src/net/sourceforge/fortress/app.t trunk/Prototype/src/net/sourceforge/fortress/map.t trunk/Prototype/src/net/sourceforge/fortress/maptile.t trunk/Prototype/src/net/sourceforge/fortress/minimap.t trunk/Prototype/src/net/sourceforge/fortress/minimaptile.t Added Paths: ----------- trunk/Prototype/src/net/sourceforge/fortress/image/grass/ trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass0.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass1.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass2.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass3.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass4.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass5.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass6.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass7.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass8.png trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass9.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/Thumbs.db trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud____.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud___m.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__m_.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__mm.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m__.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m_m.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mm_.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mmm.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm___.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm__m.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_m_.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_mm.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm__.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm_m.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmm_.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmmm.png Removed Paths: ------------- trunk/Prototype/src/net/sourceforge/fortress/image/grass0.png trunk/Prototype/src/net/sourceforge/fortress/image/grass1.png trunk/Prototype/src/net/sourceforge/fortress/image/grass2.png trunk/Prototype/src/net/sourceforge/fortress/image/grass3.png trunk/Prototype/src/net/sourceforge/fortress/image/grass4.png trunk/Prototype/src/net/sourceforge/fortress/image/grass5.png trunk/Prototype/src/net/sourceforge/fortress/image/grass6.png trunk/Prototype/src/net/sourceforge/fortress/image/grass7.png trunk/Prototype/src/net/sourceforge/fortress/image/grass8.png trunk/Prototype/src/net/sourceforge/fortress/image/grass9.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_s.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_s_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_s.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_s_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_s.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_s_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_w_nw.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_ne_sw.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_nw_se.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_s.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_s_w.png trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_w.png Modified: trunk/Prototype/src/net/sourceforge/fortress/app.t =================================================================== --- trunk/Prototype/src/net/sourceforge/fortress/app.t 2007-06-20 14:35:39 UTC (rev 9) +++ trunk/Prototype/src/net/sourceforge/fortress/app.t 2007-06-20 15:57:46 UTC (rev 10) @@ -2,7 +2,7 @@ <vexi xmlns:ui="vexi://ui" xmlns="net.sourceforge.fortress" xmlns:role="org.vexi.lib.role"> <role:surface /> - <ui:box> + <ui:box titlebar="Fortress Prototype"> <ui:box cols="1" hshrink="true"> <minimap /> <ui:box fill="#888888" height="1" /> Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass0.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass0.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass1.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass2.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass3.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass4.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass5.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass5.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass6.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass6.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass7.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass7.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass8.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass8.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass9.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/grass/grass9.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass0.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass1.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass2.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass3.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass4.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass5.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass6.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass7.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass8.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/grass9.png =================================================================== (Binary files differ) Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/Thumbs.db =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud.png =================================================================== (Binary files differ) Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud____.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud____.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud___m.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud___m.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__m_.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__m_.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__mm.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud__mm.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_s.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_s_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_e_w.png =================================================================== (Binary files differ) Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m__.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m__.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m_m.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_m_m.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mm_.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mm_.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mmm.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_mmm.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_s.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_s_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_e_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_s.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_s_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_n_w_nw.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_ne_sw.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_nw_se.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_s.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_s_w.png =================================================================== (Binary files differ) Deleted: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mud_w.png =================================================================== (Binary files differ) Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm___.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm___.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm__m.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm__m.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_m_.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_m_.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_mm.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudm_mm.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm__.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm__.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm_m.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmm_m.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmm_.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmm_.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmmm.png =================================================================== (Binary files differ) Property changes on: trunk/Prototype/src/net/sourceforge/fortress/image/mud/mudmmmm.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Prototype/src/net/sourceforge/fortress/map.t =================================================================== --- trunk/Prototype/src/net/sourceforge/fortress/map.t 2007-06-20 14:35:39 UTC (rev 9) +++ trunk/Prototype/src/net/sourceforge/fortress/map.t 2007-06-20 15:57:46 UTC (rev 10) @@ -5,6 +5,61 @@ <ui:box id="map" align="topleft" cols="1" packed="false" shrink="true" /> <ui:box id="cur" align="topleft" fill="#88ffffff" display="false" packed="false" /> + //////// sample road creation ///////////////////////////////// + + thisbox.Press1 ++= function(v) + { + if (!activeTile) return; + createMudTile(activeTile); + } + + thisbox.createMudTile = function(tile) + { + if (tile.type == "mud") return; + var posx = tile.posx; + var posy = tile.posy; + var comp = ""; + if (posy > 0 and $map[posy-1][posx].type == "mud") + { + var nt = $map[posy-1][posx]; + nt.comp = nt.comp.substring(0, 2) + "m" + nt.comp.substring(3); + nt.sync(); + comp = comp + "m"; + } + else comp = comp + "_"; + if ($map[posy].numchildren > posx + 1 and $map[posy][posx+1].type == "mud") + { + var nt = $map[posy][posx+1]; + nt.comp = nt.comp.substring(0, 3) + "m"; + nt.sync(); + comp = comp + "m"; + } + else comp = comp + "_"; + if ($map.numchildren > posy + 1 and $map[posy+1][posx].type != "grass") + { + var nt = $map[posy+1][posx]; + nt.comp = "m" + nt.comp.substring(1); + nt.sync(); + comp = comp + "m"; + } + else comp = comp + "_"; + if (posx > 0 and $map[posy][posx-1].type != "grass") + { + var nt = $map[posy][posx-1]; + nt.comp = nt.comp.substring(0, 1) + "m" + nt.comp.substring(2); + nt.sync(); + comp = comp + "m"; + } + else comp = comp + "_"; + tile.seed = ""; + tile.type = "mud"; + tile.comp = comp; + tile.sync(); + surface.setMapTile(tile); + } + + //////// minimap interaction ////////////////////////////////// + var mapDim = function(v) { cascade = v; Modified: trunk/Prototype/src/net/sourceforge/fortress/maptile.t =================================================================== --- trunk/Prototype/src/net/sourceforge/fortress/maptile.t 2007-06-20 14:35:39 UTC (rev 9) +++ trunk/Prototype/src/net/sourceforge/fortress/maptile.t 2007-06-20 15:57:46 UTC (rev 10) @@ -3,10 +3,12 @@ <vexi xmlns:ui="vexi://ui" xmlns="net.sourceforge.fortress"> <ui:box shrink="true" width="20" height="20"> + thisbox.sync = function() { fill = .image[type][type+comp+seed]; } thisbox.type = "grass"; + thisbox.comp = ""; thisbox.seed = vexi.math.floor(vexi.math.random()*10); - fill = .image[type+seed]; + sync(); </ui:box> </vexi> \ No newline at end of file Modified: trunk/Prototype/src/net/sourceforge/fortress/minimap.t =================================================================== --- trunk/Prototype/src/net/sourceforge/fortress/minimap.t 2007-06-20 14:35:39 UTC (rev 9) +++ trunk/Prototype/src/net/sourceforge/fortress/minimap.t 2007-06-20 15:57:46 UTC (rev 10) @@ -70,6 +70,11 @@ } } } + + surface.setMapTile = function(t) + { + $minimap[t.posy][t.posx].setType(t.type, t.seed); + } } </ui:box> Modified: trunk/Prototype/src/net/sourceforge/fortress/minimaptile.t =================================================================== --- trunk/Prototype/src/net/sourceforge/fortress/minimaptile.t 2007-06-20 14:35:39 UTC (rev 9) +++ trunk/Prototype/src/net/sourceforge/fortress/minimaptile.t 2007-06-20 15:57:46 UTC (rev 10) @@ -7,16 +7,16 @@ { switch (s) { - case 0: return "90"; - case 1: return "98"; - case 2: return "A0"; - case 3: return "A8"; - case 4: return "B0"; - case 5: return "B8"; - case 6: return "C0"; - case 7: return "C8"; - case 8: return "D0"; - case 9: return "D8"; + case 0: return "70"; + case 1: return "78"; + case 2: return "80"; + case 3: return "88"; + case 4: return "90"; + case 5: return "98"; + case 6: return "A0"; + case 7: return "A8"; + case 8: return "B0"; + case 9: return "B8"; } return "FF"; } @@ -25,6 +25,9 @@ { switch (t) { + case "mud": + fill = "#5f2a07"; + break; case "grass": default: fill = "#00" + getFillHex(s) + "00"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |