You can subscribe to this list here.
| 2007 | Jan | Feb | Mar | Apr | May | Jun (23) | Jul (31) | Aug (13) | Sep | Oct (9) | Nov | Dec (2) | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 | Jan | Feb | Mar (1) | Apr | May | Jun | Jul (4) | Aug | Sep | Oct | Nov | Dec | 
| 2009 | Jan | Feb | Mar (8) | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 
| 
      
      
      From: <cl...@us...> - 2007-08-17 03:25:59
      
     | 
| Revision: 82
          http://fortress.svn.sourceforge.net/fortress/?rev=82&view=rev
Author:   clrg
Date:     2007-08-16 20:25:55 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Some refactoring
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/isogrid.t
    trunk/client/src/net/sourceforge/fortress/preloadimages.t
    trunk/client/src/net/sourceforge/fortress/twoquarter.t
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top1.png
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top2.png
Added: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top1.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top1.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top2.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top2.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/preloadimages.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/twoquarter.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-08-16 15:55:48 UTC (rev 81)
+++ trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-08-17 03:25:55 UTC (rev 82)
@@ -22,28 +22,34 @@
         // 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.type = "grass";
+        thisbox.tile = "grass";
         
-        var sync = function() { fill = .image[type][type+seed]; }
+        var sync = function() { fill = .iso96[tile][tile+seed]; }
         sync();
         
-        thisbox.addPiece = function(type, top, left)
+        thisbox.addPiece = function(type, top, left, zoffset)
         {
-            var z = static.zindex[type];
+            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;
+            var p;
             var i = 0;
-            var p;
             while (numchildren > i)
             {
                 p = thisbox[i];
-                if (p.type == type and p.left == left and p.top == top)
-                    throw "tried to add a duplicate tile piece of type '"+type+"' from "+posx+", "+posy;
+                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;
                 if (p.z > z) break;
                 i++;
             }
             
+            var r = .iso96;
+            for (var i=0; type.length>i; i++)
+                r = r[type[i]];
             var b = vexi.box;
-            b.fill = .image[static.tileset][type];
+            b.fill = r;
             b.left = left;
             b.top = top;
             b.shrink = true;
@@ -56,13 +62,17 @@
             return b;
         }
         
-        thisbox.delPiece = function(type, top, left)
+        thisbox.delPiece = function(type, top, left, zoffset)
         {
+            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;
             var p;
             for (var i=0; numchildren>i; i++)
             {
                 p = thisbox[i];
-                if (p.type == type and p.left == left and p.top == top)
+                if (p.z == z and p.left == left and p.top == top)
                 {
                     thisbox[i] = null;
                     return;
@@ -103,9 +113,7 @@
     {
         register("highlight");
         register("grid");
-        register("towerbase");
-        register("towerstem");
-        register("towertop");
+        register("squaretower");
     }
     
     { init(); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-16 15:55:50
      
     | 
| Revision: 81
          http://fortress.svn.sourceforge.net/fortress/?rev=81&view=rev
Author:   dizzutch
Date:     2007-08-16 08:55:48 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
dramatic speed improvement
Modified Paths:
--------------
    trunk/mapgen/MapGenerator.java
Modified: trunk/mapgen/MapGenerator.java
===================================================================
--- trunk/mapgen/MapGenerator.java	2007-08-16 14:54:16 UTC (rev 80)
+++ trunk/mapgen/MapGenerator.java	2007-08-16 15:55:48 UTC (rev 81)
@@ -47,14 +47,19 @@
             int y1 = rand.nextInt(this.width);
             //generate random radius
             int radius = rand.nextInt(this.width/4) + 1;
-            //for each point on the map, calculate height
-            for (int x2 = 0; x2 < this.height; x2++)
-                for (int y2 = 0; y2 < this.width; y2++) {
+            //for each point in the surrounding box, calculate height
+            int boxx = (x1-radius-1 < 0) ? 0 : (x1-radius-1);
+            int boxy = (y1-radius-1 < 0) ? 0 : (y1-radius-1);
+            int boxx2 = (x1+radius+1 > this.height) ? this.height : (x1+radius+1);
+            int boxy2 = (y1+radius+1 > this.width) ? this.width : (y1+radius+1);
+            for (int x2 = boxx; x2 < boxx2; x2++) {
+                for (int y2 = boxy; y2 < boxy2; y2++) {
                     double value = Math.pow(radius, 2) - (Math.pow((y2-y1),2) + Math.pow((x2-x1),2));
                     //drop negative values
                     if (value > 0)
                         map[x2][y2].setHeight(value + map[x2][y2].getHeight());
                 }
+            }
         }
         //find min and max for normalization
         double min = map[0][0].getHeight();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-16 14:54:15
      
     | 
| Revision: 80
          http://fortress.svn.sourceforge.net/fortress/?rev=80&view=rev
Author:   dizzutch
Date:     2007-08-16 07:54:16 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
made some fixes
Modified Paths:
--------------
    trunk/mapgen/MapGenApp.java
    trunk/mapgen/MapGenerator.java
Modified: trunk/mapgen/MapGenApp.java
===================================================================
--- trunk/mapgen/MapGenApp.java	2007-08-15 23:21:11 UTC (rev 79)
+++ trunk/mapgen/MapGenApp.java	2007-08-16 14:54:16 UTC (rev 80)
@@ -12,7 +12,12 @@
             for(int w = 0; w < map.getWidth(); w++) {
                 double c = map.getMapSection(h,w).getHeight();
                 float nc = 1 - (float)c;
-                g2d.setColor(new Color(nc,nc,nc));
+                try {
+                    g2d.setColor(new Color(nc,nc,nc));
+                } catch (java.lang.IllegalArgumentException e) {
+                    System.out.println(h + " " + w + " " + nc);
+                    g2d.setColor(new Color(255,0,0));
+                }
                 g2d.draw(new Ellipse2D.Double((double)h,(double)w,1.0,1.0));
             }
         }
@@ -24,8 +29,9 @@
     
     public static void main(String[] args) {
         MapGenApp app = new MapGenApp();
+        int iterations = new Integer(args[0]);
         app.map = new MapGenerator(600,600);
-        app.map.generateMap_HillAlgorithm(1000);
+        app.map.generateMap_HillAlgorithm(iterations);
         JFrame frame = new JFrame("mapgen");
         frame.setBackground(Color.white);
         app.setBackground(Color.white);
Modified: trunk/mapgen/MapGenerator.java
===================================================================
--- trunk/mapgen/MapGenerator.java	2007-08-15 23:21:11 UTC (rev 79)
+++ trunk/mapgen/MapGenerator.java	2007-08-16 14:54:16 UTC (rev 80)
@@ -1,4 +1,5 @@
 import java.util.Random;
+import java.lang.Math;
 
 public class MapGenerator {
     private MapSection[][] map;
@@ -40,51 +41,32 @@
 
     public void generateMap_HillAlgorithm(int iterations) {
         Random rand = new Random();
-        for (int i = 0; i < iterations; i++) {
+        for (int i = iterations; i > 0; i--) {
             //generate random centerpoint
             int x1 = rand.nextInt(this.height);
             int y1 = rand.nextInt(this.width);
             //generate random radius
             int radius = rand.nextInt(this.width/4) + 1;
-            double radius2 = java.lang.Math.pow(radius, 2);
             //for each point on the map, calculate height
-            for (int x2 = 0; x2 < this.height; x2++) {
+            for (int x2 = 0; x2 < this.height; x2++)
                 for (int y2 = 0; y2 < this.width; y2++) {
-                    double left = java.lang.Math.pow((x2-x1),2);
-                    double right = java.lang.Math.pow((y2-y1),2);
-                    double value = radius2 - (left + right);
-                    if (value > 0) {
-                        double h = map[x2][y2].getHeight();
-                        map[x2][y2].setHeight(value + h);
-                    }
+                    double value = Math.pow(radius, 2) - (Math.pow((y2-y1),2) + Math.pow((x2-x1),2));
+                    //drop negative values
+                    if (value > 0)
+                        map[x2][y2].setHeight(value + map[x2][y2].getHeight());
                 }
-            }
         }
-        //normalize
-        //find min and max
+        //find min and max for normalization
         double min = map[0][0].getHeight();
         double max = map[0][0].getHeight();
-        for (int x = 0; x < this.height; x++) {
+        for (int x = 0; x < this.height; x++)
             for (int y = 0; y < this.width; y++) {
-            	min = (map[x][y].getHeight() < min) ? map[x][y].getHeight() : min;
-            	max = (map[x][y].getHeight() > max) ? map[x][y].getHeight() : max;
+                min = (map[x][y].getHeight() < min) ? map[x][y].getHeight() : min;
+                max = (map[x][y].getHeight() > max) ? map[x][y].getHeight() : max;
             }
-        }
-        System.out.println("max : "+ max);
-        System.out.println("min : "+ min);
-        double nmin = 0;
-        double nmax = 0;
-        for (int x = 0; x < this.height; x++) {
-             for (int y = 0; y < this.width; y++) {
-                 double h = map[x][y].getHeight();
-                 double value = (h - min) / (max - min);
-                 nmin = (value < nmin) ? value : nmin;
-                 nmax = (value > nmax) ? value : nmax;
-                 //System.out.println(x + " " + y + " " + map[x][y].getHeight() + " " + value);
-                 map[x][y].setHeight(value);
-             }
-        }
-        System.out.println("nmax : "+ nmax);
-        System.out.println("nmin : "+ nmin);
+        //normalize
+        for (int x = 0; x < this.height; x++)
+             for (int y = 0; y < this.width; y++)
+                 map[x][y].setHeight((map[x][y].getHeight() - min) / (max - min));
     }
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-08-15 23:21:08
      
     | 
| Revision: 79
          http://fortress.svn.sourceforge.net/fortress/?rev=79&view=rev
Author:   clrg
Date:     2007-08-15 16:21:11 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Delete crappy test tower
Removed Paths:
-------------
    trunk/client/src/net/sourceforge/fortress/iso96/towerbase.png
    trunk/client/src/net/sourceforge/fortress/iso96/towerstem.png
    trunk/client/src/net/sourceforge/fortress/iso96/towertop.png
Deleted: trunk/client/src/net/sourceforge/fortress/iso96/towerbase.png
===================================================================
(Binary files differ)
Deleted: trunk/client/src/net/sourceforge/fortress/iso96/towerstem.png
===================================================================
(Binary files differ)
Deleted: trunk/client/src/net/sourceforge/fortress/iso96/towertop.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-08-15 23:20:34
      
     | 
| Revision: 78
          http://fortress.svn.sourceforge.net/fortress/?rev=78&view=rev
Author:   clrg
Date:     2007-08-15 16:20:37 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Import tornado's square tower
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/base.png
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/stem.png
    trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top.png
Added: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/base.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/base.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/stem.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/stem.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/iso96/squaretower/top.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-08-15 23:14:56
      
     | 
| Revision: 77
          http://fortress.svn.sourceforge.net/fortress/?rev=77&view=rev
Author:   clrg
Date:     2007-08-15 16:14:59 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Move remotely
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/iso96/grass/
Removed Paths:
-------------
    trunk/client/src/net/sourceforge/fortress/image/grass/
Copied: trunk/client/src/net/sourceforge/fortress/iso96/grass (from rev 76, trunk/client/src/net/sourceforge/fortress/image/grass)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-08-15 23:13:18
      
     | 
| Revision: 76
          http://fortress.svn.sourceforge.net/fortress/?rev=76&view=rev
Author:   clrg
Date:     2007-08-15 16:13:20 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Move remotely
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/iso96/
Removed Paths:
-------------
    trunk/client/src/net/sourceforge/fortress/image/iso96/
Copied: trunk/client/src/net/sourceforge/fortress/iso96 (from rev 75, trunk/client/src/net/sourceforge/fortress/image/iso96)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-15 15:12:07
      
     | 
| Revision: 75
          http://fortress.svn.sourceforge.net/fortress/?rev=75&view=rev
Author:   dizzutch
Date:     2007-08-15 08:12:08 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
fixed normalization
Modified Paths:
--------------
    trunk/mapgen/MapGenApp.java
    trunk/mapgen/MapGenerator.java
Modified: trunk/mapgen/MapGenApp.java
===================================================================
--- trunk/mapgen/MapGenApp.java	2007-08-15 12:19:54 UTC (rev 74)
+++ trunk/mapgen/MapGenApp.java	2007-08-15 15:12:08 UTC (rev 75)
@@ -25,7 +25,7 @@
     public static void main(String[] args) {
         MapGenApp app = new MapGenApp();
         app.map = new MapGenerator(600,600);
-        app.map.generateMap_HillAlgorithm(5);
+        app.map.generateMap_HillAlgorithm(1000);
         JFrame frame = new JFrame("mapgen");
         frame.setBackground(Color.white);
         app.setBackground(Color.white);
Modified: trunk/mapgen/MapGenerator.java
===================================================================
--- trunk/mapgen/MapGenerator.java	2007-08-15 12:19:54 UTC (rev 74)
+++ trunk/mapgen/MapGenerator.java	2007-08-15 15:12:08 UTC (rev 75)
@@ -40,14 +40,12 @@
 
     public void generateMap_HillAlgorithm(int iterations) {
         Random rand = new Random();
-        double min = 0;
-        double max = 0;
         for (int i = 0; i < iterations; i++) {
             //generate random centerpoint
             int x1 = rand.nextInt(this.height);
             int y1 = rand.nextInt(this.width);
             //generate random radius
-            int radius = rand.nextInt(this.width/2) + 1;
+            int radius = rand.nextInt(this.width/4) + 1;
             double radius2 = java.lang.Math.pow(radius, 2);
             //for each point on the map, calculate height
             for (int x2 = 0; x2 < this.height; x2++) {
@@ -55,9 +53,7 @@
                     double left = java.lang.Math.pow((x2-x1),2);
                     double right = java.lang.Math.pow((y2-y1),2);
                     double value = radius2 - (left + right);
-                    if (value >= 0) {
-                        min = (value < min) ? value : min;
-                        max = (value > max) ? value : max;
+                    if (value > 0) {
                         double h = map[x2][y2].getHeight();
                         map[x2][y2].setHeight(value + h);
                     }
@@ -65,6 +61,15 @@
             }
         }
         //normalize
+        //find min and max
+        double min = map[0][0].getHeight();
+        double max = map[0][0].getHeight();
+        for (int x = 0; x < this.height; x++) {
+            for (int y = 0; y < this.width; y++) {
+            	min = (map[x][y].getHeight() < min) ? map[x][y].getHeight() : min;
+            	max = (map[x][y].getHeight() > max) ? map[x][y].getHeight() : max;
+            }
+        }
         System.out.println("max : "+ max);
         System.out.println("min : "+ min);
         double nmin = 0;
@@ -72,13 +77,14 @@
         for (int x = 0; x < this.height; x++) {
              for (int y = 0; y < this.width; y++) {
                  double h = map[x][y].getHeight();
-                 double value = ((h - min) / (max - min));
+                 double value = (h - min) / (max - min);
                  nmin = (value < nmin) ? value : nmin;
                  nmax = (value > nmax) ? value : nmax;
+                 //System.out.println(x + " " + y + " " + map[x][y].getHeight() + " " + value);
                  map[x][y].setHeight(value);
              }
         }
         System.out.println("nmax : "+ nmax);
         System.out.println("nmin : "+ nmin);
     }
-}
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-15 12:27:03
      
     | 
| Revision: 74
          http://fortress.svn.sourceforge.net/fortress/?rev=74&view=rev
Author:   dizzutch
Date:     2007-08-15 05:19:54 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
added ExitListener
Added Paths:
-----------
    trunk/mapgen/ExitListener.java
Added: trunk/mapgen/ExitListener.java
===================================================================
--- trunk/mapgen/ExitListener.java	                        (rev 0)
+++ trunk/mapgen/ExitListener.java	2007-08-15 12:19:54 UTC (rev 74)
@@ -0,0 +1,6 @@
+import java.awt.event.*;
+public class ExitListener extends WindowAdapter {
+    public void windowClosing(WindowEvent event) {
+        System.exit(0);
+    }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-14 21:56:36
      
     | 
| Revision: 73
          http://fortress.svn.sourceforge.net/fortress/?rev=73&view=rev
Author:   dizzutch
Date:     2007-08-14 14:56:35 -0700 (Tue, 14 Aug 2007)
Log Message:
-----------
Added Application, there are some normalization errors, but I will work on those later.
Modified Paths:
--------------
    trunk/mapgen/MapGenerator.java
    trunk/mapgen/MapSection.java
    trunk/mapgen/Test.java
Added Paths:
-----------
    trunk/mapgen/MapGenApp.java
Added: trunk/mapgen/MapGenApp.java
===================================================================
--- trunk/mapgen/MapGenApp.java	                        (rev 0)
+++ trunk/mapgen/MapGenApp.java	2007-08-14 21:56:35 UTC (rev 73)
@@ -0,0 +1,37 @@
+import java.awt.*;
+import java.awt.geom.*;
+import javax.swing.*;
+
+public class MapGenApp extends JPanel {
+    private MapGenerator map;
+
+    public void paintComponent(Graphics g) {
+        clear(g);
+        Graphics2D g2d = (Graphics2D)g;
+        for(int h = 0; h < map.getHeight(); h++) {
+            for(int w = 0; w < map.getWidth(); w++) {
+                double c = map.getMapSection(h,w).getHeight();
+                float nc = 1 - (float)c;
+                g2d.setColor(new Color(nc,nc,nc));
+                g2d.draw(new Ellipse2D.Double((double)h,(double)w,1.0,1.0));
+            }
+        }
+    }
+    
+    protected void clear(Graphics g) {
+        super.paintComponent(g);
+    }
+    
+    public static void main(String[] args) {
+        MapGenApp app = new MapGenApp();
+        app.map = new MapGenerator(600,600);
+        app.map.generateMap_HillAlgorithm(5);
+        JFrame frame = new JFrame("mapgen");
+        frame.setBackground(Color.white);
+        app.setBackground(Color.white);
+        frame.setSize(600,600);
+        frame.setContentPane(app);
+        frame.addWindowListener(new ExitListener());
+        frame.setVisible(true);
+    }
+}
Modified: trunk/mapgen/MapGenerator.java
===================================================================
--- trunk/mapgen/MapGenerator.java	2007-08-14 20:14:09 UTC (rev 72)
+++ trunk/mapgen/MapGenerator.java	2007-08-14 21:56:35 UTC (rev 73)
@@ -38,20 +38,47 @@
         }
     }
 
-    public void generateMap_HillAlgorithm() {
+    public void generateMap_HillAlgorithm(int iterations) {
         Random rand = new Random();
-        for (int i = 0; i < 1; i++) {
+        double min = 0;
+        double max = 0;
+        for (int i = 0; i < iterations; i++) {
             //generate random centerpoint
             int x1 = rand.nextInt(this.height);
             int y1 = rand.nextInt(this.width);
             //generate random radius
-            int radius = rand.nextInt(this.width/2);
+            int radius = rand.nextInt(this.width/2) + 1;
+            double radius2 = java.lang.Math.pow(radius, 2);
             //for each point on the map, calculate height
             for (int x2 = 0; x2 < this.height; x2++) {
                 for (int y2 = 0; y2 < this.width; y2++) {
-                    map[x2][y2].setHeight((float)java.lang.Math.pow(radius, 2) - ((float)java.lang.Math.pow(x2-x1,2)) + ((float)java.lang.Math.pow(y2-y1,2)));
+                    double left = java.lang.Math.pow((x2-x1),2);
+                    double right = java.lang.Math.pow((y2-y1),2);
+                    double value = radius2 - (left + right);
+                    if (value >= 0) {
+                        min = (value < min) ? value : min;
+                        max = (value > max) ? value : max;
+                        double h = map[x2][y2].getHeight();
+                        map[x2][y2].setHeight(value + h);
+                    }
                 }
             }
         }
+        //normalize
+        System.out.println("max : "+ max);
+        System.out.println("min : "+ min);
+        double nmin = 0;
+        double nmax = 0;
+        for (int x = 0; x < this.height; x++) {
+             for (int y = 0; y < this.width; y++) {
+                 double h = map[x][y].getHeight();
+                 double value = ((h - min) / (max - min));
+                 nmin = (value < nmin) ? value : nmin;
+                 nmax = (value > nmax) ? value : nmax;
+                 map[x][y].setHeight(value);
+             }
+        }
+        System.out.println("nmax : "+ nmax);
+        System.out.println("nmin : "+ nmin);
     }
 }
Modified: trunk/mapgen/MapSection.java
===================================================================
--- trunk/mapgen/MapSection.java	2007-08-14 20:14:09 UTC (rev 72)
+++ trunk/mapgen/MapSection.java	2007-08-14 21:56:35 UTC (rev 73)
@@ -1,5 +1,5 @@
 public class MapSection {
-    private float height;
+    private double height;
     private int type;
 
     //Constructor
@@ -8,7 +8,7 @@
         this.type = 0;
     }
 
-    public float getHeight() {
+    public double getHeight() {
         return this.height;
     }
     
@@ -16,7 +16,7 @@
         return this.type;
     }
 
-    public void setHeight(float new_height) {
+    public void setHeight(double new_height) {
         this.height = new_height;
     }
 
Modified: trunk/mapgen/Test.java
===================================================================
--- trunk/mapgen/Test.java	2007-08-14 20:14:09 UTC (rev 72)
+++ trunk/mapgen/Test.java	2007-08-14 21:56:35 UTC (rev 73)
@@ -1,8 +1,7 @@
 public class Test {
     public static void main(String argv[]) {
-        MapGenerator mg = new MapGenerator(10,10);
+        MapGenerator mg = new MapGenerator(20,20);
+        mg.generateMap_HillAlgorithm(1);
         mg.printMap();
-        mg.generateMap_HillAlgorithm();
-        mg.printMap();
     }
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-14 20:14:06
      
     | 
| Revision: 72
          http://fortress.svn.sourceforge.net/fortress/?rev=72&view=rev
Author:   dizzutch
Date:     2007-08-14 13:14:09 -0700 (Tue, 14 Aug 2007)
Log Message:
-----------
removing vim swp files (silly me for committing them)
Removed Paths:
-------------
    trunk/mapgen/.MapGenerator.java.swp
    trunk/mapgen/.MapSection.java.swp
    trunk/mapgen/.Test.java.swp
Deleted: trunk/mapgen/.MapGenerator.java.swp
===================================================================
(Binary files differ)
Deleted: trunk/mapgen/.MapSection.java.swp
===================================================================
(Binary files differ)
Deleted: trunk/mapgen/.Test.java.swp
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-08-14 20:13:18
      
     | 
| Revision: 71
          http://fortress.svn.sourceforge.net/fortress/?rev=71&view=rev
Author:   dizzutch
Date:     2007-08-14 13:13:13 -0700 (Tue, 14 Aug 2007)
Log Message:
-----------
adding first steps of mapgeneration tool/api
Added Paths:
-----------
    trunk/mapgen/
    trunk/mapgen/.MapGenerator.java.swp
    trunk/mapgen/.MapSection.java.swp
    trunk/mapgen/.Test.java.swp
    trunk/mapgen/MapGenerator.java
    trunk/mapgen/MapSection.java
    trunk/mapgen/Test.java
Added: trunk/mapgen/.MapGenerator.java.swp
===================================================================
(Binary files differ)
Property changes on: trunk/mapgen/.MapGenerator.java.swp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/mapgen/.MapSection.java.swp
===================================================================
(Binary files differ)
Property changes on: trunk/mapgen/.MapSection.java.swp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/mapgen/.Test.java.swp
===================================================================
(Binary files differ)
Property changes on: trunk/mapgen/.Test.java.swp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/mapgen/MapGenerator.java
===================================================================
--- trunk/mapgen/MapGenerator.java	                        (rev 0)
+++ trunk/mapgen/MapGenerator.java	2007-08-14 20:13:13 UTC (rev 71)
@@ -0,0 +1,57 @@
+import java.util.Random;
+
+public class MapGenerator {
+    private MapSection[][] map;
+    private int width;
+    private int height;
+
+    public int getWidth() {
+        return this.width;
+    }
+    
+    public int getHeight() {
+        return this.height;
+    }
+    
+    public MapSection getMapSection(int height, int width) {
+        return map[height][width];
+    }
+
+    //Constructor
+    public MapGenerator(int width, int height) {
+        this.width = width;
+        this.height = height;
+        this.map = new MapSection[this.width][this.height];
+        for(int h = 0; h < height; h++) {
+            for(int w = 0; w < width; w++) {
+                this.map[h][w] = new MapSection();
+            }
+        }
+    }
+
+    public void printMap() {
+        for(int h = 0; h < this.height; h++) {
+            for (int w = 0; w < this.width; w++) {
+                System.out.print(this.map[h][w].getHeight() + " "); 
+            }
+            System.out.println();
+        }
+    }
+
+    public void generateMap_HillAlgorithm() {
+        Random rand = new Random();
+        for (int i = 0; i < 1; i++) {
+            //generate random centerpoint
+            int x1 = rand.nextInt(this.height);
+            int y1 = rand.nextInt(this.width);
+            //generate random radius
+            int radius = rand.nextInt(this.width/2);
+            //for each point on the map, calculate height
+            for (int x2 = 0; x2 < this.height; x2++) {
+                for (int y2 = 0; y2 < this.width; y2++) {
+                    map[x2][y2].setHeight((float)java.lang.Math.pow(radius, 2) - ((float)java.lang.Math.pow(x2-x1,2)) + ((float)java.lang.Math.pow(y2-y1,2)));
+                }
+            }
+        }
+    }
+}
Added: trunk/mapgen/MapSection.java
===================================================================
--- trunk/mapgen/MapSection.java	                        (rev 0)
+++ trunk/mapgen/MapSection.java	2007-08-14 20:13:13 UTC (rev 71)
@@ -0,0 +1,26 @@
+public class MapSection {
+    private float height;
+    private int type;
+
+    //Constructor
+    public MapSection () {
+        this.height = 0;
+        this.type = 0;
+    }
+
+    public float getHeight() {
+        return this.height;
+    }
+    
+    public int getType() {
+        return this.type;
+    }
+
+    public void setHeight(float new_height) {
+        this.height = new_height;
+    }
+
+    public void setType(int new_type) {
+        this.type = new_type;
+    }
+}
Added: trunk/mapgen/Test.java
===================================================================
--- trunk/mapgen/Test.java	                        (rev 0)
+++ trunk/mapgen/Test.java	2007-08-14 20:13:13 UTC (rev 71)
@@ -0,0 +1,8 @@
+public class Test {
+    public static void main(String argv[]) {
+        MapGenerator mg = new MapGenerator(10,10);
+        mg.printMap();
+        mg.generateMap_HillAlgorithm();
+        mg.printMap();
+    }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 22:40:44
      
     | 
| Revision: 68
          http://fortress.svn.sourceforge.net/fortress/?rev=68&view=rev
Author:   clrg
Date:     2007-07-17 15:34:07 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Register tower components (forgot to commit previously)
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/twoquarter.t
Modified: trunk/client/src/net/sourceforge/fortress/twoquarter.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-07-17 22:11:09 UTC (rev 67)
+++ trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-07-17 22:34:07 UTC (rev 68)
@@ -103,6 +103,9 @@
     {
         register("highlight");
         register("grid");
+        register("towerbase");
+        register("towerstem");
+        register("towertop");
     }
     
     { init(); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 22:11:11
      
     | 
| Revision: 67
          http://fortress.svn.sourceforge.net/fortress/?rev=67&view=rev
Author:   clrg
Date:     2007-07-17 15:11:09 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Now you can place towers
- implements addPiece/delPiece local functions
- highlight now uses addPiece/delPience
- tower creation temporarily assigned to Press1
- still some z issues to resolve
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/isogrid.t
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 22:09:13
      
     | 
| Revision: 66
          http://fortress.svn.sourceforge.net/fortress/?rev=66&view=rev
Author:   clrg
Date:     2007-07-17 15:09:15 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Nice bg to the empty box (which will gain uses later on in development)
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/game.t
Modified: trunk/client/src/net/sourceforge/fortress/game.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 21:28:24 UTC (rev 65)
+++ trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 22:09:15 UTC (rev 66)
@@ -37,7 +37,9 @@
                -->
             </ui:box>
             <layout:border border="#ffcc00" depth="1" shrink="true">
-                <ui:box width="100" height="100" />
+                <ui:box width="100" height="100" layout="place">
+                    <ui:box fill=".image.logo_white" />
+                </ui:box>
             </layout:border>
         </panel>
         
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 21:28:24
      
     | 
| Revision: 65
          http://fortress.svn.sourceforge.net/fortress/?rev=65&view=rev
Author:   clrg
Date:     2007-07-17 14:28:24 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Be more efficient with showGrid() - don't needlessly loop through grid
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/isogrid.t
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 21:19:24
      
     | 
| Revision: 64
          http://fortress.svn.sourceforge.net/fortress/?rev=64&view=rev
Author:   clrg
Date:     2007-07-17 14:19:25 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Keyboard shortcuts
- alt-g to toggle grid
- alt-i to toggle mouse inversion
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/isogrid.t
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 20:39:57
      
     | 
| Revision: 63
          http://fortress.svn.sourceforge.net/fortress/?rev=63&view=rev
Author:   clrg
Date:     2007-07-17 13:39:16 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Now if we change menu options elsewhere the menu is still current
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/appitem.t
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/appitem.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 19:08:18
      
     | 
| Revision: 62
          http://fortress.svn.sourceforge.net/fortress/?rev=62&view=rev
Author:   clrg
Date:     2007-07-17 12:08:20 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Nicer menu
- white logo
- logo on the left
- grid option is 'show grid' by default
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/image/logo_white.png
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Added: trunk/client/src/net/sourceforge/fortress/image/logo_white.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/image/logo_white.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 19:03:32
      
     | 
| Revision: 61
          http://fortress.svn.sourceforge.net/fortress/?rev=61&view=rev
Author:   clrg
Date:     2007-07-17 12:03:34 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Remove tabs and make options representative (they were inverse)
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/appitem.t
    trunk/client/src/net/sourceforge/fortress/game.t
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/appitem.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/game.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 17:24:15 UTC (rev 60)
+++ trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 19:03:34 UTC (rev 61)
@@ -2,9 +2,11 @@
 
 <vexi xmlns:ui="vexi://ui" xmlns:layout="vexi.layout" xmlns:widget="vexi.widget"
     xmlns="net.sourceforge.fortress">
-    <preloadimages />
+    
     static.invertmouse = false;
     static.showgrid = true;
+    
+    <preloadimages />
     <ui:box orient="vertical">
         <panel id="top" padding="10" vshrink="true">
             <shadowtext text="Fortress Prototype v2" />
@@ -31,8 +33,8 @@
                 <ui:box height="10" />
                 <widget:check id="invert" cursor="hand" focusable="false" selected="false">
                     <shadowtext text="Invert Mouse" />
-            	</widget:check>
-           	-->
+                </widget:check>
+               -->
             </ui:box>
             <layout:border border="#ffcc00" depth="1" shrink="true">
                 <ui:box width="100" height="100" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-07-17 17:24:13
      
     | 
| Revision: 60
          http://fortress.svn.sourceforge.net/fortress/?rev=60&view=rev
Author:   dizzutch
Date:     2007-07-17 10:24:15 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Options to invert mouse and hide or show grid are now in the options menu.
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/isogrid.t
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-07-17 16:00:07
      
     | 
| Revision: 59
          http://fortress.svn.sourceforge.net/fortress/?rev=59&view=rev
Author:   dizzutch
Date:     2007-07-17 08:59:59 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
-Added logo to preloadimages
-Starting implementing options menu
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/game.t
    trunk/client/src/net/sourceforge/fortress/preloadimages.t
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/game.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 13:48:19 UTC (rev 58)
+++ trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 15:59:59 UTC (rev 59)
@@ -3,6 +3,8 @@
 <vexi xmlns:ui="vexi://ui" xmlns:layout="vexi.layout" xmlns:widget="vexi.widget"
     xmlns="net.sourceforge.fortress">
     <preloadimages />
+    static.invertmouse = false;
+    static.showgrid = true;
     <ui:box orient="vertical">
         <panel id="top" padding="10" vshrink="true">
             <shadowtext text="Fortress Prototype v2" />
@@ -21,14 +23,16 @@
                 <minimap id="minimap" />
             </layout:border>
             <ui:box orient="vertical" vshrink="true">
-                <ui:box height="10" />
+            <!--
+            <ui:box height="10" />
                 <widget:check id="gridon" cursor="hand" focusable="false" selected="true">
                     <shadowtext text="Toggle Grid" />
                 </widget:check>
                 <ui:box height="10" />
                 <widget:check id="invert" cursor="hand" focusable="false" selected="false">
                     <shadowtext text="Invert Mouse" />
-                </widget:check>
+            	</widget:check>
+           	-->
             </ui:box>
             <layout:border border="#ffcc00" depth="1" shrink="true">
                 <ui:box width="100" height="100" />
@@ -39,9 +43,9 @@
         
         //// Map / Sidebar Interaction ////////////////////////////////
         
-        $gridon.selected ++= function(v) { cascade = v; $map.gridon = v; }
-        $invert.selected ++= function(v) { cascade = v; $map.invert = v; }
-        
+        static.showgrid ++= function(v) { cascade = v; $map.gridon = v; }
+        static.invertmouse ++= function(v) { cascade = v; $map.invert = v; }
+       
         //// Panel Layout /////////////////////////////////////////////
         
         $top.height ++= function(v)
Modified: trunk/client/src/net/sourceforge/fortress/preloadimages.t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <diz...@us...> - 2007-07-17 13:48:18
      
     | 
| Revision: 58
          http://fortress.svn.sourceforge.net/fortress/?rev=58&view=rev
Author:   dizzutch
Date:     2007-07-17 06:48:19 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
- Added Logo to Main Menu (to be changed in near future, but placeholder is there)
- Made the cursor disable on disabled menu items
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/appitem.t
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/image/logo.png
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/appitem.t
===================================================================
(Binary files differ)
Added: trunk/client/src/net/sourceforge/fortress/image/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/image/logo.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 10:52:18
      
     | 
| Revision: 57
          http://fortress.svn.sourceforge.net/fortress/?rev=57&view=rev
Author:   clrg
Date:     2007-07-17 03:52:21 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Replace black busy animation with white one
Modified Paths:
--------------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/image/process.png
Modified: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/image/process.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
      
      
      From: <cl...@us...> - 2007-07-17 10:50:17
      
     | 
| Revision: 56
          http://fortress.svn.sourceforge.net/fortress/?rev=56&view=rev
Author:   clrg
Date:     2007-07-17 03:50:19 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Major UI updates
- add menu for starting game
- add loading screen / animation
- move minimap + elements to bottom of game screen
Modified Paths:
--------------
    trunk/client/src/main.t
    trunk/client/src/net/sourceforge/fortress/game.t
    trunk/client/src/net/sourceforge/fortress/isogrid.t
    trunk/client/src/net/sourceforge/fortress/minimap.t
    trunk/client/src/net/sourceforge/fortress/panel.t
    trunk/client/src/net/sourceforge/fortress/shadowtext.t
    trunk/client/src/net/sourceforge/fortress/twoquarter.t
Added Paths:
-----------
    trunk/client/src/net/sourceforge/fortress/app.t
    trunk/client/src/net/sourceforge/fortress/appitem.t
    trunk/client/src/net/sourceforge/fortress/busy.t
    trunk/client/src/net/sourceforge/fortress/image/process.png
Modified: trunk/client/src/main.t
===================================================================
--- trunk/client/src/main.t	2007-07-16 00:30:20 UTC (rev 55)
+++ trunk/client/src/main.t	2007-07-17 10:50:19 UTC (rev 56)
@@ -1,5 +1,5 @@
 <!-- Copyright 2007 licensed under GPL v3 -->
 
 <vexi xmlns:ui="vexi://ui" xmlns="net.sourceforge.fortress">
-    <game />
+    <app />
 </vexi>
Added: trunk/client/src/net/sourceforge/fortress/app.t
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/app.t
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/client/src/net/sourceforge/fortress/appitem.t
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/appitem.t
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Added: trunk/client/src/net/sourceforge/fortress/busy.t
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/busy.t
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/client/src/net/sourceforge/fortress/game.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/game.t	2007-07-16 00:30:20 UTC (rev 55)
+++ trunk/client/src/net/sourceforge/fortress/game.t	2007-07-17 10:50:19 UTC (rev 56)
@@ -2,39 +2,40 @@
 
 <vexi xmlns:ui="vexi://ui" xmlns:layout="vexi.layout" xmlns:widget="vexi.widget"
     xmlns="net.sourceforge.fortress">
-    <widget:surface />
     <preloadimages />
-    <ui:box orient="vertical" titlebar="Fortress Prototype">
+    <ui:box orient="vertical">
         <panel id="top" padding="10" vshrink="true">
             <shadowtext text="Fortress Prototype v2" />
             <ui:box />
             <shadowtext text="Map Size 100 x 100" shrink="true" />
         </panel>
         <ui:box>
-            <panel id="left" hshrink="true" orient="vertical" padding="0 10">
-                <layout:border border="#ffcc00" depth="1" shrink="true">
-                    <minimap id="minimap" />
-                </layout:border>
-                <ui:box orient="vertical" vshrink="true">
-                    <ui:box height="10" />
-                    <widget:check id="gridon" cursor="hand" focusable="false" selected="true">
-                        <shadowtext text="Toggle Grid" />
-                    </widget:check>
-                    <ui:box height="10" />
-                    <widget:check id="invert" cursor="hand" focusable="false" selected="false">
-                        <shadowtext text="Invert Mouse" />
-                    </widget:check>
-                </ui:box>
-                <ui:box />
-            </panel>
+            <panel id="left" hshrink="true" orient="vertical" padding="5" />
             <layout:border border="#ffcc00" depth="1">
                 <isogrid id="map" />
             </layout:border>
-            <panel id="right" hshrink="true" padding="5" />
+            <panel id="right" hshrink="true" orient="vertical" padding="5" />
         </ui:box>
-        <panel id="bottom" vshrink="true" padding="5" />
+        <panel id="bottom" vshrink="true" padding="10">
+            <layout:border border="#ffcc00" depth="1" shrink="true">
+                <minimap id="minimap" />
+            </layout:border>
+            <ui:box orient="vertical" vshrink="true">
+                <ui:box height="10" />
+                <widget:check id="gridon" cursor="hand" focusable="false" selected="true">
+                    <shadowtext text="Toggle Grid" />
+                </widget:check>
+                <ui:box height="10" />
+                <widget:check id="invert" cursor="hand" focusable="false" selected="false">
+                    <shadowtext text="Invert Mouse" />
+                </widget:check>
+            </ui:box>
+            <layout:border border="#ffcc00" depth="1" shrink="true">
+                <ui:box width="100" height="100" />
+            </layout:border>
+        </panel>
         
-        vexi.ui.frame = thisbox;
+        thisbox.init = $map.init;
         
         //// Map / Sidebar Interaction ////////////////////////////////
         
@@ -46,6 +47,7 @@
         $top.height ++= function(v)
         {
             cascade = v;
+            if (!display) return;
             $left.bgy = -v;
             $right.bgy = -v;
         }
@@ -53,6 +55,7 @@
         $map.height ++= function(v)
         {
             cascade = v;
+            if (!display) return;
             $bottom.bgy = -((v + $top.height)%256);
             surface.setMapView(vexi.math.floor($map.width / 48), vexi.math.floor(v / 24));
         }
@@ -60,6 +63,7 @@
         $map.width ++= function(v)
         {
             cascade = v;
+            if (!display) return;
             $right.bgx = -((v + $left.width)%256);
             surface.setMapView(vexi.math.floor(v / 48), vexi.math.floor($map.height / 24));
         }
Added: trunk/client/src/net/sourceforge/fortress/image/process.png
===================================================================
(Binary files differ)
Property changes on: trunk/client/src/net/sourceforge/fortress/image/process.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream
Modified: trunk/client/src/net/sourceforge/fortress/isogrid.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/minimap.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/minimap.t	2007-07-16 00:30:20 UTC (rev 55)
+++ trunk/client/src/net/sourceforge/fortress/minimap.t	2007-07-17 10:50:19 UTC (rev 56)
@@ -1,8 +1,8 @@
 <!-- Copyright 2007 licensed under GPL v3 -->
 
 <vexi xmlns:ui="vexi://ui" xmlns="net.sourceforge.fortress">
-    <ui:box height="100" width="100" layout="absolute">
-        <ui:box layout="absolute">
+    <ui:box height="100" width="100" layout="place">
+        <ui:box layout="place">
             $minimap.width ++= function(v) { cascade = v; width = v; }
             $minimap.height ++= function(v) { cascade = v; height = v; }
             <ui:box id="minimap" shrink="true" />
@@ -27,10 +27,10 @@
         /** synchronizes the viewbox with the map */
         var syncView = function()
         {
-            $viewbox.width = $minimap.width * (view_w / map_w) + 1;
-            $viewbox.height = $minimap.height * (view_h / map_h) + 1;
-            $viewbox.x = $minimap.width * (-map_x / map_w);
-            $viewbox.y = $minimap.height * (-map_y / map_h);
+            $viewbox.width = $minimap.width * (view_w / map_w) + 2;
+            $viewbox.height = $minimap.height * (view_h / map_h) + 2;
+            $viewbox.x = $minimap.width * (-map_x / map_w) - 1;
+            $viewbox.y = $minimap.height * (-map_y / map_h) - 1;
         }
         
         var mx, my;
Modified: trunk/client/src/net/sourceforge/fortress/panel.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/shadowtext.t
===================================================================
(Binary files differ)
Modified: trunk/client/src/net/sourceforge/fortress/twoquarter.t
===================================================================
--- trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-07-16 00:30:20 UTC (rev 55)
+++ trunk/client/src/net/sourceforge/fortress/twoquarter.t	2007-07-17 10:50:19 UTC (rev 56)
@@ -15,7 +15,7 @@
         </usage>
     </meta:doc>
     
-    <ui:box layout="absolute" shrink="true" width="48" height="24">
+    <ui:box layout="place" shrink="true" width="48" height="24">
         
         // top-left vs bottom-left
         thisbox.forward;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |