There are many things making it impossible to build the 0.8beta1, among which the fact that the release manager hasn't tested enough the tarball he released.

So I'm concentrating on problems only related to a mingw build, with patches relative to the svn version.

First, the fact that ERROR is already defined by windows API, conflicting with an enum value in DistantComputer::state_t
cpustate.diff does therefore the following change:
state_t DistantComputer::* -> DistantComputer::STATE_*

Second, Polygon is also already defined by the windows GDI API. This requires quite a wider change. polygon.diff change every use of Polygon with WPolygon and renames some relative classes for consistency.

Third, as I mentioned more than one year ago, doc/license is required for building the win32 installer. 0.8beta1 also requires tools/index_server among other things.

Fourth, isnan should be used with the std:: scope in src/object/physical_obj.cpp, as done with isnan.diff

Last, src/wormux.ico has been changed and also breaks installer. To avoid this kind of mishap, I have updated the installer script (see installer.tar.bz2). Changes can be summed up as:
- use some bashism to reduce script code
- as make install already checks that the build of other parts is up-to-date, the test has been removed from the script
- include vorbis and libcurl stuff
- use tools/win32_setup/install.ico instead of src/wormux.ico

This script may however be insufficient due to SDL_image lib; it now loads symbols from libpng12.dll and jpeg.dll, which are not the same names than the typical gtk SDK. SDL_image must therefore be recompiled to force the use of those.
Index: src/include/action_handler.cpp
===================================================================
--- src/include/action_handler.cpp      (revision 2667)
+++ src/include/action_handler.cpp      (working copy)
@@ -83,12 +83,12 @@
     switch (Network::GetInstance()->GetState())
     {
     case Network::NO_NETWORK:
-      a->creator->SetState(DistantComputer::INITIALIZED);
+      a->creator->SetState(DistantComputer::STATE_INITIALIZED);
       ASSERT(client_state == Network::NETWORK_MENU_OK);
       break;
 
     case Network::NETWORK_LOADING_DATA:
-      a->creator->SetState(DistantComputer::READY);
+      a->creator->SetState(DistantComputer::STATE_READY);
       ASSERT(client_state == Network::NETWORK_READY_TO_PLAY);
       break;
 
Index: src/network/distant_cpu.cpp
===================================================================
--- src/network/distant_cpu.cpp (revision 2667)
+++ src/network/distant_cpu.cpp (working copy)
@@ -36,7 +36,7 @@
   sock_lock(SDL_CreateMutex()),
   sock(new_sock),
   owned_teams(),
-  state(DistantComputer::ERROR),
+  state(DistantComputer::STATE_ERROR),
   version_checked(false),
   force_disconnect(false),
   nickname("this is not initialized")
Index: src/network/network_server.cpp
===================================================================
--- src/network/network_server.cpp      (revision 2667)
+++ src/network/network_server.cpp      (working copy)
@@ -225,7 +225,7 @@
   for (std::list<DistantComputer*>::const_iterator client = cpu.begin();
        client != cpu.end();
        client++) {
-    if ((*client)->GetState() == DistantComputer::INITIALIZED)
+    if ((*client)->GetState() == DistantComputer::STATE_INITIALIZED)
       r++;
   }
 
@@ -239,7 +239,7 @@
   for (std::list<DistantComputer*>::const_iterator client = cpu.begin();
        client != cpu.end();
        client++) {    
-    if ((*client)->GetState() == DistantComputer::READY)
+    if ((*client)->GetState() == DistantComputer::STATE_READY)
       r++;
   }
   
Index: src/network/distant_cpu.h
===================================================================
--- src/network/distant_cpu.h   (revision 2667)
+++ src/network/distant_cpu.h   (working copy)
@@ -37,9 +37,9 @@
 {
  public:
   typedef enum {
-    ERROR,
-    INITIALIZED,
-    READY
+    STATE_ERROR,
+    STATE_INITIALIZED,
+    STATE_READY
   } state_t;
 
  private:
Index: src/object/physical_obj.cpp
===================================================================
--- src/object/physical_obj.cpp (revision 2667)
+++ src/object/physical_obj.cpp (working copy)
@@ -335,7 +335,7 @@
 
     if (ContactPoint(cx, cy)) {
       ground_angle = world.ground.Tangent(cx, cy);
-      if(!isnan(ground_angle)) {
+      if(!std::isnan(ground_angle)) {
         contactPos.x = (double)cx / PIXEL_PER_METER;
         contactPos.y = (double)cy / PIXEL_PER_METER;
       } else {
Index: src/interface/weapon_menu.h
===================================================================
--- src/interface/weapon_menu.h (revision 2667)
+++ src/interface/weapon_menu.h (working copy)
@@ -31,7 +31,7 @@
 #include <vector>
 #include <sstream>
 
-class WeaponMenuItem : public PolygonItem {
+class WeaponMenuItem : public WPolygonItem {
   WeaponMenuItem(const WeaponMenuItem&);
   const WeaponMenuItem& operator=(const WeaponMenuItem&);
   bool zoom;
@@ -55,9 +55,9 @@
   static const int MAX_NUMBER_OF_WEAPON;
 
  private:
-  Polygon * weapons_menu;
-  Polygon * tools_menu;
-  Polygon * help;
+  WPolygon * weapons_menu;
+  WPolygon * tools_menu;
+  WPolygon * help;
   WeaponMenuItem * current_overfly_item;
   AffineTransform2D position;
   AffineTransform2D shear;
@@ -89,7 +89,7 @@
   bool ActionClic(const Point2i &mouse_pos);
   Sprite * GetInfiniteSymbol() const;
   Sprite * GetCrossSymbol() const;
-  Weapon * UpdateCurrentOverflyItem(Polygon * poly);
+  Weapon * UpdateCurrentOverflyItem(WPolygon * poly);
 };
 
 #endif
Index: src/interface/weapon_menu.cpp
===================================================================
--- src/interface/weapon_menu.cpp       (revision 2667)
+++ src/interface/weapon_menu.cpp       (working copy)
@@ -58,7 +58,7 @@
 
 
 WeaponMenuItem::WeaponMenuItem(Weapon * new_weapon, const Point2d & position) :
-  PolygonItem(),
+  WPolygonItem(),
   zoom(false),
   weapon(new_weapon),
   zoom_start_time(0)
@@ -112,7 +112,7 @@
     }
   }
   item->Scale(scale, scale);
-  PolygonItem::Draw(dest);
+  WPolygonItem::Draw(dest);
   int nb_bullets = ActiveTeam().ReadNbAmmos(weapon->GetType());
   Point2i tmp = GetOffsetAlignment() + Point2i(0, item->GetWidth() - 10);
   if(nb_bullets ==  INFINITE_AMMO) {
@@ -151,11 +151,11 @@
   Profile *res = resource_manager.LoadXMLProfile("graphism.xml", false);
   infinite = new Sprite(resource_manager.LoadImage(res, "interface/infinite"));
   cross = new Sprite(resource_manager.LoadImage(res, "interface/cross"));
-  // Polygon Size
+  // WPolygon Size
   Point2i size = resource_manager.LoadPoint2i(res, 
"interface/weapons_interface_size");
-  weapons_menu = PolygonGenerator::GenerateRoundedRectangle(size.x, size.y, 
20);
+  weapons_menu = WPolygonGenerator::GenerateRoundedRectangle(size.x, size.y, 
20);
   size = resource_manager.LoadPoint2i(res, "interface/tools_interface_size");
-  tools_menu = PolygonGenerator::GenerateRoundedRectangle(size.x, size.y, 20);
+  tools_menu = WPolygonGenerator::GenerateRoundedRectangle(size.x, size.y, 20);
   help = NULL;
   // Setting colors
   Color plane_color = resource_manager.LoadColor(res, 
"interface/background_color");
@@ -167,9 +167,9 @@
 
   // Adding label
   weapons_menu->AddItem(new Sprite(Font::GenerateSurface(_("Weapons"), 
gray_color, Font::FONT_BIG)),
-                        weapons_menu->GetMin() + Point2d(20, 20), 
PolygonItem::LEFT, PolygonItem::TOP);
+                        weapons_menu->GetMin() + Point2d(20, 20), 
WPolygonItem::LEFT, WPolygonItem::TOP);
   tools_menu->AddItem(new Sprite(Font::GenerateSurface(_("Tools"), gray_color, 
Font::FONT_BIG)),
-                        tools_menu->GetMin() + Point2d(20, 20), 
PolygonItem::LEFT, PolygonItem::TOP);
+                        tools_menu->GetMin() + Point2d(20, 20), 
WPolygonItem::LEFT, WPolygonItem::TOP);
 
   resource_manager.UnLoadXMLProfile(res);
 }
@@ -246,9 +246,9 @@
   weapons_menu->ResetTransformation();
   tools_menu->ResetTransformation();
   // Refreshing Weapons menu
-  std::vector<PolygonItem *> items = weapons_menu->GetItem();
-  std::vector<PolygonItem *>::iterator item = items.begin();
-  PolygonItem * tmp = (*item); item++;
+  std::vector<WPolygonItem *> items = weapons_menu->GetItem();
+  std::vector<WPolygonItem *>::iterator item = items.begin();
+  WPolygonItem * tmp = (*item); item++;
   for(; item != items.end(); item++) {
     delete (*item);
   }
@@ -345,12 +345,12 @@
 {
 }
 
-Weapon * WeaponsMenu::UpdateCurrentOverflyItem(Polygon * poly)
+Weapon * WeaponsMenu::UpdateCurrentOverflyItem(WPolygon * poly)
 {
-  std::vector<PolygonItem *> items = poly->GetItem();
+  std::vector<WPolygonItem *> items = poly->GetItem();
   WeaponMenuItem * tmp;
   Interface::GetInstance()->SetCurrentOverflyWeapon(NULL);
-  std::vector<PolygonItem *>::iterator item = items.begin();
+  std::vector<WPolygonItem *>::iterator item = items.begin();
   ++item; // Skeeping first item which is a text label
   for(; item != items.end(); item++) {
     tmp = (WeaponMenuItem *)(*item);
Index: src/graphic/polygon_generator.h
===================================================================
--- src/graphic/polygon_generator.h     (revision 2667)
+++ src/graphic/polygon_generator.h     (working copy)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Polygon class. Store point of a polygon and handle affine transformation
+ * WPolygon class. Store point of a polygon and handle affine transformation
  *****************************************************************************/
 
 #ifndef POLYGON_GENERATOR_H
@@ -24,18 +24,18 @@
 
 #include "polygon.h"
 
-class PolygonGenerator {
+class WPolygonGenerator {
  public:
    static const int MIN_SPACE_BETWEEN_POINT;
-   static Polygon * GenerateCircle(double diameter, int nb_point);
-   static Polygon * GenerateDentedCircle(double diameter, int nb_point, double 
rand_offset);
-   static Polygon * GenerateRectangle(double width, double height);
-   static Polygon * GenerateRectangle(const Rectanglei & rectangle);
-   static Polygon * GenerateRectangle(const Point2d & orig, const Point2d & 
size);
-   static Polygon * GenerateRectangle(const Point2i & orig, const Point2i & 
size);
-   static Polygon * GenerateRoundedRectangle(double width, double height, 
double edge);
-   static Polygon * GenerateRandomShape();
-   static Polygon * GenerateRandomTrapeze(const double width, const double 
height,
+   static WPolygon * GenerateCircle(double diameter, int nb_point);
+   static WPolygon * GenerateDentedCircle(double diameter, int nb_point, 
double rand_offset);
+   static WPolygon * GenerateRectangle(double width, double height);
+   static WPolygon * GenerateRectangle(const Rectanglei & rectangle);
+   static WPolygon * GenerateRectangle(const Point2d & orig, const Point2d & 
size);
+   static WPolygon * GenerateRectangle(const Point2i & orig, const Point2i & 
size);
+   static WPolygon * GenerateRoundedRectangle(double width, double height, 
double edge);
+   static WPolygon * GenerateRandomShape();
+   static WPolygon * GenerateRandomTrapeze(const double width, const double 
height,
                                           const double x_rand_offset, const 
double y_rand_offset,
                                           const double coef);
 };
Index: src/graphic/composite_shape.cpp
===================================================================
--- src/graphic/composite_shape.cpp     (revision 2667)
+++ src/graphic/composite_shape.cpp     (working copy)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Composite Shape. Use Polygon and Sprite to draw a shape.
+ * Composite Shape. Use WPolygon and Sprite to draw a shape.
  *****************************************************************************/
 
 #include "composite_shape.h"
@@ -28,27 +28,27 @@
   layers.clear();
 }
 
-void CompositeShape::AddLayer(Polygon * poly)
+void CompositeShape::AddLayer(WPolygon * poly)
 {
   layers.push_back(poly);
 }
 
 void CompositeShape::ApplyTransformation(const AffineTransform2D & trans)
 {
-  for(std::vector<Polygon *>::iterator poly = layers.begin();
+  for(std::vector<WPolygon *>::iterator poly = layers.begin();
       poly != layers.end(); poly++) {
     (*poly)->ApplyTransformation(trans);
   }
 }
 
-std::vector<Polygon *> CompositeShape::GetLayer() const
+std::vector<WPolygon *> CompositeShape::GetLayer() const
 {
   return layers;
 }
 
 void CompositeShape::Draw(Surface * dest)
 {
-  for(std::vector<Polygon *>::iterator poly = layers.begin();
+  for(std::vector<WPolygon *>::iterator poly = layers.begin();
       poly != layers.end(); poly++) {
     (*poly)->Draw(dest);
   }
@@ -59,7 +59,7 @@
   Point2d min, max;
   Point2i tmp;
   int i = 0;
-  for(std::vector<Polygon *>::iterator poly = layers.begin();
+  for(std::vector<WPolygon *>::iterator poly = layers.begin();
       poly != layers.end(); poly++, i++) {
     (*poly)->Draw(&AppWormux::GetInstance()->video.window);
     if(i == 0) {
Index: src/graphic/polygon.cpp
===================================================================
--- src/graphic/polygon.cpp     (revision 2667)
+++ src/graphic/polygon.cpp     (working copy)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Polygon class. Store point of a polygon and handle affine transformation
+ * WPolygon class. Store point of a polygon and handle affine transformation
  *****************************************************************************/
 
 #include "polygon.h"
@@ -29,7 +29,7 @@
 // In affine transformation, never transform directly the original point !
 // If you do it, your point will becoming dented.
 
-PolygonBuffer::PolygonBuffer()
+WPolygonBuffer::WPolygonBuffer()
 {
   // Start with at least 32 points buffer
   array_size = 32;
@@ -38,18 +38,18 @@
   buffer_size = 0;
 }
 
-PolygonBuffer::~PolygonBuffer()
+WPolygonBuffer::~WPolygonBuffer()
 {
   delete[] vx;
   delete[] vy;
 }
 
-int PolygonBuffer::GetSize() const
+int WPolygonBuffer::GetSize() const
 {
   return buffer_size;
 }
 
-void PolygonBuffer::SetSize(const int size)
+void WPolygonBuffer::SetSize(const int size)
 {
   if(array_size > size) {
     buffer_size = size;
@@ -74,78 +74,78 @@
 //=========== POLYGON ITEM ============ //
 // Use this structure to draw item
 
-PolygonItem::PolygonItem()
+WPolygonItem::WPolygonItem()
 {
   transformed_position = position = Point2d(0, 0);
   SetSprite(NULL);
   SetAlignment(H_CENTERED, V_CENTERED);
 }
 
-PolygonItem::PolygonItem(Sprite * sprite, const Point2d & pos, H_align h_a, 
V_align v_a)
+WPolygonItem::WPolygonItem(Sprite * sprite, const Point2d & pos, H_align h_a, 
V_align v_a)
 {
   SetPosition(pos);
   SetSprite(sprite);
   SetAlignment(h_a, v_a);
 }
 
-PolygonItem::~PolygonItem()
+WPolygonItem::~WPolygonItem()
 {
 }
 
-void PolygonItem::SetPosition(const Point2d & pos)
+void WPolygonItem::SetPosition(const Point2d & pos)
 {
   transformed_position = position = pos;
 }
 
-void PolygonItem::SetAlignment(H_align h_a, V_align v_a)
+void WPolygonItem::SetAlignment(H_align h_a, V_align v_a)
 {
   h_align = h_a;
   v_align = v_a;
 }
 
-const Point2d & PolygonItem::GetPosition() const
+const Point2d & WPolygonItem::GetPosition() const
 {
   return position;
 }
 
-const Point2d & PolygonItem::GetTransformedPosition() const
+const Point2d & WPolygonItem::GetTransformedPosition() const
 {
   return transformed_position;
 }
 
-Point2i PolygonItem::GetIntTransformedPosition() const
+Point2i WPolygonItem::GetIntTransformedPosition() const
 {
   return Point2i((int)transformed_position.x, (int)transformed_position.y);
 }
 
-void PolygonItem::SetSprite(Sprite * sprite)
+void WPolygonItem::SetSprite(Sprite * sprite)
 {
   item = sprite;
 }
 
-const Sprite * PolygonItem::GetSprite()
+const Sprite * WPolygonItem::GetSprite()
 {
   return item;
 }
 
-void PolygonItem::ApplyTransformation(const AffineTransform2D & trans)
+void WPolygonItem::ApplyTransformation(const AffineTransform2D & trans)
 {
   transformed_position = trans * position;
 }
 
-void PolygonItem::Draw(Surface * dest)
+void WPolygonItem::Draw(Surface * dest)
 {
   if(item == NULL)
     return;
   item->Blit(*dest, GetOffsetAlignment());
 }
 
-bool PolygonItem::Contains(const Point2d & p) const
+bool WPolygonItem::Contains(const Point2d & p) const
 {
   return Rectanglei(GetOffsetAlignment(), 
item->GetSize()).Contains(Point2i((int)p.x, (int)p.y));
 }
 
-Point2i PolygonItem::GetOffsetAlignment() const
+Point2i WPolygonItem::GetOffsetAlignment() const
 {
   Point2i offset;
   switch(v_align) {
@@ -165,19 +165,19 @@
 // Store a vector of point and handle affine transformation,
 // Bezier interpolation handling etc.
 
-Polygon::Polygon()
+WPolygon::WPolygon()
 {
   Init();
 }
 
-Polygon::Polygon(const std::vector<Point2d> shape)
+WPolygon::WPolygon(const std::vector<Point2d> shape)
 {
   Init();
   transformed_shape = original_shape = shape;
   shape_buffer->SetSize(original_shape.size());
 }
 
-Polygon::Polygon(const Polygon & poly)
+WPolygon::WPolygon(const WPolygon & poly)
 {
   Init();
   texture = poly.texture;
@@ -191,9 +191,9 @@
   shape_buffer->SetSize(original_shape.size());
 }
 
-Polygon::~Polygon()
+WPolygon::~WPolygon()
 {
-  for(std::vector<PolygonItem *>::iterator item = items.begin();
+  for(std::vector<WPolygonItem *>::iterator item = items.begin();
       item != items.end(); item++) {
     delete (*item);
   }
@@ -208,7 +208,7 @@
   texture = NULL;
 }
 
-void Polygon::Init()
+void WPolygon::Init()
 {
   is_closed = true;
   texture = NULL;
@@ -217,11 +217,11 @@
   original_shape.clear();
   transformed_shape.clear();
   items.clear();
-  shape_buffer = new PolygonBuffer();
+  shape_buffer = new WPolygonBuffer();
   min = max = Point2d(0.0, 0.0);
 }
 
-void Polygon::ApplyTransformation(const AffineTransform2D & trans, bool 
save_transformation)
+void WPolygon::ApplyTransformation(const AffineTransform2D & trans, bool 
save_transformation)
 {
   int i = 0;
   for(std::vector<Point2d>::iterator point = original_shape.begin();
@@ -238,14 +238,14 @@
       min = min.min(transformed_shape[i]);
     }
   }
-  for(std::vector<PolygonItem *>::iterator item = items.begin();
+  for(std::vector<WPolygonItem *>::iterator item = items.begin();
       item != items.end(); item++) {
     (*item)->ApplyTransformation(trans);
   }
 }
 
 // Reset the point
-void Polygon::ResetTransformation()
+void WPolygon::ResetTransformation()
 {
   for(int i = 0; i < (int)original_shape.size(); i++) {
     transformed_shape[i] = original_shape[i];
@@ -261,7 +261,7 @@
 }
 
 // Applying definitively the transformation
-void Polygon::SaveTransformation(const AffineTransform2D & trans)
+void WPolygon::SaveTransformation(const AffineTransform2D & trans)
 {
   ApplyTransformation(trans, true);
 }
@@ -269,7 +269,7 @@
 // Check if a point is inside the polygon using Jordan curve theorem (amen).
 // For better explanation : 
http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
 // Note : Compile but not tested yet !
-bool Polygon::IsInsidePolygon(const Point2d & p) const
+bool WPolygon::IsInsideWPolygon(const Point2d & p) const
 {
   int i, j;
   bool c = false;
@@ -283,16 +283,16 @@
 }
 
 // Not accurate at 100% but sufficent for the moment
-bool Polygon::IsOverlapping(const Polygon & poly) const
+bool WPolygon::IsOverlapping(const WPolygon & poly) const
 {
   for(int i = 0; i < GetNbOfPoint(); i++) {
-    if(poly.IsInsidePolygon(transformed_shape[i]))
+    if(poly.IsInsideWPolygon(transformed_shape[i]))
       return true;
   }
   return false;
 }
 
-void Polygon::AddPoint(const Point2d & p)
+void WPolygon::AddPoint(const Point2d & p)
 {
   original_shape.push_back(p);
   transformed_shape.push_back(p);
@@ -303,7 +303,7 @@
   min = p.min(min);
 }
 
-void Polygon::InsertPoint(int index, const Point2d & p)
+void WPolygon::InsertPoint(int index, const Point2d & p)
 {
   if(index == GetNbOfPoint()) {
     AddPoint(p);
@@ -336,7 +336,7 @@
   transformed_shape = original_shape = vector_tmp;
 }
 
-void Polygon::DeletePoint(int index)
+void WPolygon::DeletePoint(int index)
 {
   std::vector<Point2d> vector_tmp;
   Point2d tmp;
@@ -355,22 +355,22 @@
   transformed_shape = original_shape = vector_tmp;
 }
 
-void Polygon::AddItem(Sprite * sprite, const Point2d & pos, 
PolygonItem::H_align h_a, PolygonItem::V_align v_a)
+void WPolygon::AddItem(Sprite * sprite, const Point2d & pos, 
WPolygonItem::H_align h_a, WPolygonItem::V_align v_a)
 {
-  items.push_back(new PolygonItem(sprite, pos, h_a, v_a));
+  items.push_back(new WPolygonItem(sprite, pos, h_a, v_a));
 }
 
-void Polygon::AddItem(PolygonItem * item)
+void WPolygon::AddItem(WPolygonItem * item)
 {
   items.push_back(item);
 }
 
-void Polygon::DelItem(int index)
+void WPolygon::DelItem(int index)
 {
-  std::vector<PolygonItem *> vector_tmp;
+  std::vector<WPolygonItem *> vector_tmp;
   Point2d tmp;
   int i = 0;
-  for(std::vector<PolygonItem *>::iterator item = items.begin();
+  for(std::vector<WPolygonItem *>::iterator item = items.begin();
       item != items.end(); item++, i++) {
     if(i == index) continue; // Skip point to remove
     vector_tmp.push_back(*item);
@@ -378,62 +378,62 @@
   items = vector_tmp;
 }
 
-std::vector<PolygonItem *> Polygon::GetItem() const
+std::vector<WPolygonItem *> WPolygon::GetItem() const
 {
   return items;
 }
 
-void Polygon::ClearItem()
+void WPolygon::ClearItem()
 {
   items.clear();
 }
 
-double Polygon::GetWidth() const
+double WPolygon::GetWidth() const
 {
   return max.x - min.x;
 }
 
-double Polygon::GetHeight() const
+double WPolygon::GetHeight() const
 {
   return max.y - min.y;
 }
 
-Point2d Polygon::GetSize() const
+Point2d WPolygon::GetSize() const
 {
   return max - min;
 }
 
-Point2i Polygon::GetIntSize() const
+Point2i WPolygon::GetIntSize() const
 {
   return GetIntMax() - GetIntMin() + Point2i(1, 1);
 }
 
-Point2d Polygon::GetMin() const
+Point2d WPolygon::GetMin() const
 {
   return min;
 }
 
-Point2i Polygon::GetIntMin() const
+Point2i WPolygon::GetIntMin() const
 {
   return Point2i((int)min.x, (int)min.y);
 }
 
-Point2d Polygon::GetMax() const
+Point2d WPolygon::GetMax() const
 {
   return max;
 }
 
-Point2i Polygon::GetIntMax() const
+Point2i WPolygon::GetIntMax() const
 {
   return Point2i((int)max.x, (int)max.y);
 }
 
-Rectanglei Polygon::GetRectangleToRefresh() const
+Rectanglei WPolygon::GetRectangleToRefresh() const
 {
   return Rectanglei(GetIntMin(), GetIntSize());
 }
 
-Point2d Polygon::GetRandomUpperPoint()
+Point2d WPolygon::GetRandomUpperPoint()
 {
   std::vector<Point2d>::iterator point = transformed_shape.begin();
   Point2d tmp, previous;
@@ -453,14 +453,14 @@
   return Point2d();
 }
 
-int Polygon::GetNbOfPoint() const
+int WPolygon::GetNbOfPoint() const
 {
   return (int)original_shape.size();
 }
 
 // And the famous Bezier curve. And this algorithme is that simple ? I'm so 
disappointed !
 // But now you can say to the world wormux is using Bezier curve.
-void Polygon::AddBezierCurve(const Point2d anchor1, const Point2d control1,
+void WPolygon::AddBezierCurve(const Point2d anchor1, const Point2d control1,
                              const Point2d control2, const Point2d anchor2,
                              const int num_steps, const bool add_first_point,
                              const bool add_last_point)
@@ -480,7 +480,7 @@
 }
 
 // Generate random point between 2 points
-void Polygon::AddRandomCurve(const Point2d start, const Point2d end,
+void WPolygon::AddRandomCurve(const Point2d start, const Point2d end,
                              const double x_random_offset, const double 
y_random_offset,
                              const int num_steps, const bool add_first_point,
                              const bool add_last_point)
@@ -498,10 +498,10 @@
 }
 
 // Generate a new polygon with Bezier interpolation
-Polygon * Polygon::GetBezierInterpolation(double smooth_value, int num_steps, 
double rand)
+WPolygon * WPolygon::GetBezierInterpolation(double smooth_value, int 
num_steps, double rand)
 {
   Point2d p0, p1, p2, p3, c0, c1, c2, v1, v2;
-  Polygon * shape = new Polygon();
+  WPolygon * shape = new WPolygon();
   double l1, l2, l3;
   AffineTransform2D trans = AffineTransform2D();
   for(int index_p1 = 0; index_p1 < (int)original_shape.size(); index_p1++) {
@@ -537,13 +537,13 @@
   return shape;
 }
 
-PolygonBuffer * Polygon::GetPolygonBuffer() const
+WPolygonBuffer * WPolygon::GetWPolygonBuffer() const
 {
   return shape_buffer;
 }
 
 // expand the polygon (to draw a little border for example)
-void Polygon::Expand(const double expand_value)
+void WPolygon::Expand(const double expand_value)
 {
   if(original_shape.size() < 2) return;
   std::vector<Point2d> tmp_shape;
@@ -573,59 +573,59 @@
   transformed_shape = original_shape = tmp_shape;
 }
 
-// Get information about Polygon
-bool Polygon::IsTextured() const
+// Get information about WPolygon
+bool WPolygon::IsTextured() const
 {
   return texture != NULL;
 }
 
-bool Polygon::IsPlaneColor() const
+bool WPolygon::IsPlaneColor() const
 {
   return plane_color != NULL;
 }
 
-bool Polygon::IsBordered() const
+bool WPolygon::IsBordered() const
 {
   return border_color != NULL;
 }
 
 // Texture handling
-Surface * Polygon::GetTexture() const
+Surface * WPolygon::GetTexture() const
 {
   return texture;
 }
 
-void Polygon::SetTexture(Surface * texture_surface)
+void WPolygon::SetTexture(Surface * texture_surface)
 {
   texture = texture_surface;
 }
 
 // Color handling
-void Polygon::SetBorderColor(const Color & color)
+void WPolygon::SetBorderColor(const Color & color)
 {
   if(border_color == NULL)
     border_color = new Color();
   *border_color = color;
 }
 
-void Polygon::SetPlaneColor(const Color & color)
+void WPolygon::SetPlaneColor(const Color & color)
 {
   if(plane_color == NULL)
     plane_color = new Color();
   *plane_color = color;
 }
 
-const Color & Polygon::GetBorderColor() const
+const Color & WPolygon::GetBorderColor() const
 {
   return *border_color;
 }
 
-const Color & Polygon::GetPlaneColor() const
+const Color & WPolygon::GetPlaneColor() const
 {
   return *plane_color;
 }
 
-void Polygon::Draw(Surface * dest)
+void WPolygon::Draw(Surface * dest)
 {
   // Draw polygon
   if(is_closed) {
@@ -649,13 +649,13 @@
     }
   }
   // Draw Item
-  for(std::vector<PolygonItem *>::iterator item = items.begin();
+  for(std::vector<WPolygonItem *>::iterator item = items.begin();
       item != items.end(); item++) {
     (*item)->Draw(dest);
   }
 }
 
-void Polygon::DrawOnScreen()
+void WPolygon::DrawOnScreen()
 {
   Draw(&AppWormux::GetInstance()->video.window);
   world.ToRedrawOnScreen(GetRectangleToRefresh());
Index: src/graphic/polygon_generator.cpp
===================================================================
--- src/graphic/polygon_generator.cpp   (revision 2667)
+++ src/graphic/polygon_generator.cpp   (working copy)
@@ -16,23 +16,23 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Polygon Generator. Generate various polygon shape on demand (including 
random one).
+ * WPolygon Generator. Generate various polygon shape on demand (including 
random one).
  *****************************************************************************/
 
 #include <stdlib.h>
 #include "polygon_generator.h"
 #include "tool/random.h"
 
-const int PolygonGenerator::MIN_SPACE_BETWEEN_POINT = 50;
+const int WPolygonGenerator::MIN_SPACE_BETWEEN_POINT = 50;
 
-Polygon * PolygonGenerator::GenerateCircle(double diameter, int nb_point)
+WPolygon * WPolygonGenerator::GenerateCircle(double diameter, int nb_point)
 {
-  return PolygonGenerator::GenerateDentedCircle(diameter, nb_point, 0.0);
+  return WPolygonGenerator::GenerateDentedCircle(diameter, nb_point, 0.0);
 }
 
-Polygon * PolygonGenerator::GenerateRectangle(double width, double height)
+WPolygon * WPolygonGenerator::GenerateRectangle(double width, double height)
 {
-  Polygon * tmp = new Polygon();
+  WPolygon * tmp = new WPolygon();
   tmp->AddPoint(Point2d( width / 2.0,  height / 2.0));
   tmp->AddPoint(Point2d( width / 2.0, -height / 2.0));
   tmp->AddPoint(Point2d(-width / 2.0, -height / 2.0));
@@ -40,9 +40,9 @@
   return tmp;
 }
 
-Polygon * PolygonGenerator::GenerateRectangle(const Point2d & orig, const 
Point2d & size)
+WPolygon * WPolygonGenerator::GenerateRectangle(const Point2d & orig, const 
Point2d & size)
 {
-  Polygon * tmp = new Polygon();
+  WPolygon * tmp = new WPolygon();
   tmp->AddPoint(Point2d(orig.x + size.x, orig.y + size.y));
   tmp->AddPoint(Point2d(orig.x + size.x, orig.y));
   tmp->AddPoint(Point2d(orig.x,          orig.y));
@@ -50,21 +50,21 @@
   return tmp;
 }
 
-Polygon * PolygonGenerator::GenerateRectangle(const Rectanglei & r)
+WPolygon * WPolygonGenerator::GenerateRectangle(const Rectanglei & r)
 {
-  return 
PolygonGenerator::GenerateRectangle(POINT2I_2_POINT2D(r.GetPosition()),
+  return 
WPolygonGenerator::GenerateRectangle(POINT2I_2_POINT2D(r.GetPosition()),
                                              POINT2I_2_POINT2D(r.GetSize()));
 }
 
-Polygon * PolygonGenerator::GenerateRectangle(const Point2i & orig, const 
Point2i & size)
+WPolygon * WPolygonGenerator::GenerateRectangle(const Point2i & orig, const 
Point2i & size)
 {
-  return PolygonGenerator::GenerateRectangle(POINT2I_2_POINT2D(orig),
+  return WPolygonGenerator::GenerateRectangle(POINT2I_2_POINT2D(orig),
                                              POINT2I_2_POINT2D(size));
 }
 
-Polygon * PolygonGenerator::GenerateDentedCircle(double diameter, int 
nb_point, double rand_offset)
+WPolygon * WPolygonGenerator::GenerateDentedCircle(double diameter, int 
nb_point, double rand_offset)
 {
-  Polygon * tmp = new Polygon();
+  WPolygon * tmp = new WPolygon();
   AffineTransform2D trans = AffineTransform2D();
   Point2d top;
   for(int i = 0; i < nb_point; i++) {
@@ -75,9 +75,9 @@
   return tmp;
 }
 
-Polygon * PolygonGenerator::GenerateRoundedRectangle(double width, double 
height, double edge)
+WPolygon * WPolygonGenerator::GenerateRoundedRectangle(double width, double 
height, double edge)
 {
-  Polygon * tmp = new Polygon();
+  WPolygon * tmp = new WPolygon();
   double edge_vector = edge / 2.0;
   tmp->AddBezierCurve(Point2d(-width / 2 + edge, -height / 2),
                       Point2d(-edge_vector, 0),
@@ -98,7 +98,7 @@
   return tmp;
 }
 
-Polygon * PolygonGenerator::GenerateRandomShape()
+WPolygon * WPolygonGenerator::GenerateRandomShape()
 {
   double height = Random::GetDouble(400.0, 600.0);
   double width  = Random::GetDouble(400.0, 2000.0);
@@ -106,13 +106,13 @@
                                Random::GetSign() * Random::GetDouble(0.5, 
1.0));
 }
 
-Polygon * PolygonGenerator::GenerateRandomTrapeze(const double width, const 
double height,
+WPolygon * WPolygonGenerator::GenerateRandomTrapeze(const double width, const 
double height,
                                                   const double x_rand_offset, 
const double y_rand_offset,
                                                   const double coef)
 {
   double upper_width, lower_width, upper_offset, lower_offset;
   int number_of_bottom_point, number_of_upper_point, number_of_side_point;
-  Polygon * tmp = new Polygon();
+  WPolygon * tmp = new WPolygon();
   number_of_side_point = 1 + (int)Random::GetDouble((height * 0.25) / 
MIN_SPACE_BETWEEN_POINT,
                                      height / MIN_SPACE_BETWEEN_POINT);
   if(coef > 0.0) {
Index: src/graphic/composite_shape.h
===================================================================
--- src/graphic/composite_shape.h       (revision 2667)
+++ src/graphic/composite_shape.h       (working copy)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Composite Shape. Use Polygon and Sprite to draw a shape.
+ * Composite Shape. Use WPolygon and Sprite to draw a shape.
  *****************************************************************************/
 
 #ifndef COMPOSITE_SHAPE_H
@@ -29,12 +29,12 @@
 
 class CompositeShape {
  protected:
-  std::vector<Polygon *> layers;
+  std::vector<WPolygon *> layers;
  public:
   CompositeShape();
-  void AddLayer(Polygon * poly);
+  void AddLayer(WPolygon * poly);
   void ApplyTransformation(const AffineTransform2D & trans);
-  std::vector<Polygon *> GetLayer() const;
+  std::vector<WPolygon *> GetLayer() const;
   // Drawing
   void Draw(Surface * dest);
   void DrawOnScreen();
Index: src/graphic/polygon.h
===================================================================
--- src/graphic/polygon.h       (revision 2667)
+++ src/graphic/polygon.h       (working copy)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  ******************************************************************************
- * Polygon class. Store point of a polygon and handle affine transformation
+ * WPolygon class. Store point of a polygon and handle affine transformation
  *****************************************************************************/
 
 #ifndef POLYGON_H
@@ -31,10 +31,10 @@
 class Sprite;
 
 /** Use to draw the polygon */
-class PolygonBuffer {
+class WPolygonBuffer {
   /* if you need that, implement it (correctly)*/
-  PolygonBuffer(const PolygonBuffer&);
-  PolygonBuffer operator=(const PolygonBuffer&);
+  WPolygonBuffer(const WPolygonBuffer&);
+  WPolygonBuffer operator=(const WPolygonBuffer&);
   /*********************************************/
 
  public:
@@ -42,18 +42,18 @@
   Sint16 * vy;
   int buffer_size;
   int array_size;
-  PolygonBuffer();
-  ~PolygonBuffer();
+  WPolygonBuffer();
+  ~WPolygonBuffer();
   int GetSize() const;
   void SetSize(const int size);
 };
 
 /** Store information about a item (sprite) of the polygon */
-class PolygonItem {
+class WPolygonItem {
 
   /* if you need that, implement it (correctly)*/
-  PolygonItem(const PolygonItem&);
-  PolygonItem operator=(const PolygonItem&);
+  WPolygonItem(const WPolygonItem&);
+  WPolygonItem operator=(const WPolygonItem&);
   /*********************************************/
 
  public:
@@ -68,9 +68,9 @@
  protected:
   virtual Point2i GetOffsetAlignment() const;
  public:
-  PolygonItem();
-  PolygonItem(Sprite * sprite, const Point2d & pos, H_align h_a = H_CENTERED, 
V_align v_a = V_CENTERED);
-  virtual ~PolygonItem();
+  WPolygonItem();
+  WPolygonItem(Sprite * sprite, const Point2d & pos, H_align h_a = H_CENTERED, 
V_align v_a = V_CENTERED);
+  virtual ~WPolygonItem();
   void SetPosition(const Point2d & pos);
   void SetAlignment(H_align h_a = H_CENTERED, V_align v_a = V_CENTERED);
   const Point2d & GetPosition() const;
@@ -84,7 +84,7 @@
 };
 
 /** Store information about a simple shape */
-class Polygon {
+class WPolygon {
  private:
   void Init();
 
@@ -99,16 +99,16 @@
   std::vector<Point2d> original_shape;
   std::vector<Point2d> transformed_shape;
   // Vector of icons
-  std::vector<PolygonItem *> items;
+  std::vector<WPolygonItem *> items;
   // Shape position after an affine transformation
-  PolygonBuffer * shape_buffer;
+  WPolygonBuffer * shape_buffer;
  private:
-  Polygon operator=(const Polygon&);
+  WPolygon operator=(const WPolygon&);
  public:
-  Polygon();
-  Polygon(const std::vector<Point2d> shape);
-  Polygon(const Polygon & poly);
-  virtual ~Polygon();
+  WPolygon();
+  WPolygon(const std::vector<Point2d> shape);
+  WPolygon(const WPolygon & poly);
+  virtual ~WPolygon();
   // Point handling
   void AddPoint(const Point2d & p);
   void InsertPoint(int index, const Point2d & p);
@@ -118,8 +118,8 @@
   void SaveTransformation(const AffineTransform2D & trans);
 
   // Test
-  bool IsInsidePolygon(const Point2d & point) const;
-  bool IsOverlapping(const Polygon & poly) const;
+  bool IsInsideWPolygon(const Point2d & point) const;
+  bool IsOverlapping(const WPolygon & poly) const;
 
   // Use to randomize a construction
   Point2d GetRandomUpperPoint();
@@ -134,7 +134,7 @@
                       const double x_random_offset, const double 
y_random_offset,
                       const int num_steps, const bool add_first_point = true,
                       const bool add_last_point = true);
-  Polygon * GetBezierInterpolation(double smooth_value = 1.0, int num_steps = 
20, double rand = 0.0);
+  WPolygon * GetBezierInterpolation(double smooth_value = 1.0, int num_steps = 
20, double rand = 0.0);
   void Expand(const double expand_value);
 
   // Size information
@@ -150,7 +150,7 @@
   Rectanglei GetRectangleToRefresh() const;
 
   // Buffer of transformed point
-  PolygonBuffer * GetPolygonBuffer() const;
+  WPolygonBuffer * GetWPolygonBuffer() const;
 
   // Type of the polygon
   bool IsTextured() const;
@@ -176,11 +176,11 @@
 
   // Item management
   void AddItem(Sprite * sprite, const Point2d & pos,
-               PolygonItem::H_align h_a = PolygonItem::H_CENTERED,
-               PolygonItem::V_align v_a = PolygonItem::V_CENTERED);
-  void AddItem(PolygonItem * item);
+               WPolygonItem::H_align h_a = WPolygonItem::H_CENTERED,
+               WPolygonItem::V_align v_a = WPolygonItem::V_CENTERED);
+  void AddItem(WPolygonItem * item);
   void DelItem(int index);
-  std::vector<PolygonItem *> GetItem() const;
+  std::vector<WPolygonItem *> GetItem() const;
   void ClearItem();
 };
 
Index: src/map/random_map.cpp
===================================================================
--- src/map/random_map.cpp      (revision 2668)
+++ src/map/random_map.cpp      (working copy)
@@ -177,22 +177,22 @@
     case DENTED_CIRCLE:
       nb_of_point = Random::GetInt(5, 20);
       x_rand_offset = width / Random::GetDouble(2.0, 15.0);
-      random_shape = PolygonGenerator::GenerateDentedCircle(width, 
nb_of_point, x_rand_offset);
+      random_shape = WPolygonGenerator::GenerateDentedCircle(width, 
nb_of_point, x_rand_offset);
       break;
     case ROUNDED_RECTANGLE:
-      random_shape = PolygonGenerator::GenerateRectangle(width, height);
+      random_shape = WPolygonGenerator::GenerateRectangle(width, height);
       break;
     default: case DENTED_TRAPEZE:
       x_rand_offset = Random::GetDouble(10.0, 15.0);
       y_rand_offset = Random::GetDouble(10.0, 15.0);
       coef = Random::GetSign() * Random::GetDouble(0.5, 1.0);
-      random_shape = PolygonGenerator::GenerateRandomTrapeze(width, height, 
x_rand_offset, y_rand_offset, coef);
+      random_shape = WPolygonGenerator::GenerateRandomTrapeze(width, height, 
x_rand_offset, y_rand_offset, coef);
       break;
   }
   if(random_shape->GetNbOfPoint() < 4)
     return false;
   bezier_shape = random_shape->GetBezierInterpolation(1.0, 20, 1.5);
-  expanded_bezier_shape = new Polygon(*bezier_shape);
+  expanded_bezier_shape = new WPolygon(*bezier_shape);
   // Expand the random, bezier shape !
   expanded_bezier_shape->Expand(border_size);
   // Setting texture and border color
Index: src/map/random_map.h
===================================================================
--- src/map/random_map.h        (revision 2668)
+++ src/map/random_map.h        (working copy)
@@ -60,9 +60,9 @@
    int height;
 
    // Shape used to generate island
-   Polygon * random_shape;
-   Polygon * bezier_shape;
-   Polygon * expanded_bezier_shape;
+   WPolygon * random_shape;
+   WPolygon * bezier_shape;
+   WPolygon * expanded_bezier_shape;
 
    // Internal parameters
    Profile *profile;
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à