stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src action/action_build.c action/acti...


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src action/action_build.c action/acti...
Date: 21 Jan 2004 05:42:06 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/21 05:42:04

Modified files:
        src/action     : action_build.c action_move.c command.c 
        src/game       : game.c loadgame.c 
        src/include    : map.h pathfinder.h unit.h 
        src/map        : map.c map_draw.c map_fog.c map_wall.c 
                         map_wood.c 
        src/pathfinder : Module.make script_pathfinder.c 
        src/stratagus  : mainloop.c stratagus.c 
        src/unit       : unit.c 
Removed files:
        src/pathfinder : DESIGN TODO floodfill.c hierarchical.c 
                         hierarchical.h pf_goal.c pf_goal.h 
                         pf_high_open.c pf_high_open.h pf_highlevel.c 
                         pf_highlevel.h pf_low_open.c pf_low_open.h 
                         pf_lowlevel.c pf_lowlevel.h regid.c regid.h 
                         region.c region.h region_groups.c 
                         region_groups.h region_set.c region_set.h 
                         types.h 

Log message:
        Removed old pathfinder. Shoot me.

Patches:
Index: stratagus/src/action/action_build.c
diff -u stratagus/src/action/action_build.c:1.109 
stratagus/src/action/action_build.c:1.110
--- stratagus/src/action/action_build.c:1.109   Mon Jan 19 09:36:22 2004
+++ stratagus/src/action/action_build.c Wed Jan 21 05:41:57 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: action_build.c,v 1.109 2004/01/18 22:36:22 nobody_ Exp $
+//      $Id: action_build.c,v 1.110 2004/01/20 18:41:57 nobody_ Exp $
 
 //@{
 
@@ -240,14 +240,6 @@
                        DebugCheck(1);
                }
        }
-
-/* Done by PlaceUnit now
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierMapChangedCallback (build->X, build->Y,
-               build->X + build->Type->TileWidth - 1,
-               build->Y + build->Type->TileHeight - 1);
-#endif
-*/
 
        // HACK: the building is not ready yet
        build->Player->UnitTypesCount[type->Slot]--;
Index: stratagus/src/action/action_move.c
diff -u stratagus/src/action/action_move.c:1.79 
stratagus/src/action/action_move.c:1.80
--- stratagus/src/action/action_move.c:1.79     Thu Jan 15 09:31:01 2004
+++ stratagus/src/action/action_move.c  Wed Jan 21 05:41:57 2004
@@ -21,7 +21,7 @@
 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //      GNU General Public License for more details.
 //
-//      $Id: action_move.c,v 1.79 2004/01/14 22:31:01 nobody_ Exp $
+//      $Id: action_move.c,v 1.80 2004/01/20 18:41:57 nobody_ Exp $
 
 //@{
 
@@ -84,23 +84,7 @@
                // FIXME: So units flying up and down are not affected.
                unit->IX = unit->IY = 0;
 
-#ifdef HIERARCHIC_PATHFINDER
-               d = PfHierComputePath(unit, &xd, &yd);
-
-#if 0
-               {
-               int ts0;
-               int ts1;
-               ts0 = rdtsc();
-               NextPathElement(unit, &xd, &yd);
-               ts1 = rdtsc();
-               printf("old pathfinder: %d cycles\n", ts1 - ts0);
-               }
-#endif
-               switch (d) {
-#else /* HIERARCHIC_PATHFINDER */
                switch (d = NextPathElement(unit, &xd, &yd)) {
-#endif /* HIERARCHIC_PATHFINDER */
                        case PF_UNREACHABLE: // Can't reach, stop
                                        if (unit->Player->AiEnabled) {
                                        AiCanNotMove(unit);
Index: stratagus/src/action/command.c
diff -u stratagus/src/action/command.c:1.126 
stratagus/src/action/command.c:1.127
--- stratagus/src/action/command.c:1.126        Mon Jan 19 09:36:22 2004
+++ stratagus/src/action/command.c      Wed Jan 21 05:41:57 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: command.c,v 1.126 2004/01/18 22:36:22 nobody_ Exp $
+//      $Id: command.c,v 1.127 2004/01/20 18:41:57 nobody_ Exp $
 
 //@{
 
@@ -151,9 +151,6 @@
        order->Arg1 = NULL;
        ReleaseOrder(&unit->SavedOrder);
        ReleaseOrder(&unit->NewOrder);
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierReleaseData(unit);
-#endif
        unit->SavedOrder = unit->NewOrder = *order;
 }
 
@@ -323,17 +320,6 @@
                order->Range = 0;
                order->Type = NULL;
                order->Arg1 = NULL;
-#ifdef HIERARCHIC_PATHFINDER
-               /*
-                * EXPERIMENTAL: This indicates this unit's intent to move.
-                * unit->Moving is finally set in ActionMoveGeneric() after the
-                * pathfinder is run, according to its return status. Setting
-                * unit->Moving here is preliminary and is done to hint the 
pathfinder
-                * that this unit intents to move asap.
-                */
-               unit->Moving = 1;
-               PfHierReleaseData(unit);
-#endif
        }
        ClearSavedAction(unit);
 }
Index: stratagus/src/game/game.c
diff -u stratagus/src/game/game.c:1.127 stratagus/src/game/game.c:1.128
--- stratagus/src/game/game.c:1.127     Sat Jan 17 10:45:16 2004
+++ stratagus/src/game/game.c   Wed Jan 21 05:41:58 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: game.c,v 1.127 2004/01/16 23:45:16 wizzard Exp $
+//      $Id: game.c,v 1.128 2004/01/20 18:41:58 nobody_ Exp $
 
 //@{
 
@@ -512,9 +512,6 @@
        //
        // FIXME: must be done after map is loaded
        InitAStar();
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierInitialize();
-#endif // HIERARCHIC_PATHFINDER
 #ifdef MAP_REGIONS
        MapSplitterInit();
 #endif
Index: stratagus/src/game/loadgame.c
diff -u stratagus/src/game/loadgame.c:1.80 stratagus/src/game/loadgame.c:1.81
--- stratagus/src/game/loadgame.c:1.80  Sat Jan 17 10:45:16 2004
+++ stratagus/src/game/loadgame.c       Wed Jan 21 05:41:58 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: loadgame.c,v 1.80 2004/01/16 23:45:16 wizzard Exp $
+//      $Id: loadgame.c,v 1.81 2004/01/20 18:41:58 nobody_ Exp $
 
 //@{
 
@@ -106,9 +106,6 @@
        CleanCclCredits();
        CleanSpells();
        FreeVisionTable();
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierClean ();
-#endif
 #ifdef MAP_REGIONS
        MapSplitterClean();
 #endif
@@ -155,9 +152,6 @@
 
        InitAiModule();
 
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierInitialize();
-#endif
        InitMap();
        InitMapFogOfWar(); // build tables for fog of war
 }
Index: stratagus/src/include/map.h
diff -u stratagus/src/include/map.h:1.116 stratagus/src/include/map.h:1.117
--- stratagus/src/include/map.h:1.116   Fri Jan 16 02:15:07 2004
+++ stratagus/src/include/map.h Wed Jan 21 05:41:58 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: map.h,v 1.116 2004/01/15 15:15:07 nobody_ Exp $
+//      $Id: map.h,v 1.117 2004/01/20 18:41:58 nobody_ Exp $
 
 #ifndef __MAP_H__
 #define __MAP_H__
@@ -220,21 +220,6 @@
 #ifdef NEW_UNIT_CACHE
        UnitListItem*      UnitCache;  /// An unit on the map field
 #endif
-#ifdef HIERARCHIC_PATHFINDER
-       unsigned short RegId;  /// Region to which the field belongs
-       // FIXME: Johns: this values can't be placed in the map field,
-       //                        this needs too much memory.
-       unsigned short f, g;  /// A* parameters (no need to store h)
-       unsigned short h;     ///stored only for BestSoFar computation
-#define HIER_LOW_OPEN   0
-#define HIER_LOW_CLOSED 1
-       unsigned int Set:1;  /// Open/Closed
-       unsigned int Goal:1;
-       // FIXME perhaps the previous 2 one-bit fields should be crammed into 
e.g.
-       // g? There's potentially a *lot* of MapFields in this game and every 
byte
-       // saved here could translate into 1 MB saved overall for max sized map.
-       char Traceback;  /// The field through which we arrived to this one
-#endif
 } MapField;
 
 // Not used until now:
@@ -501,15 +486,6 @@
 
        /// Returns true, if rock on the map tile field
 extern int RockOnMap(int x, int y);
-
-#ifdef HIERARCHIC_PATHFINDER
-       /// FIXME: docu
-extern inline unsigned short MapFieldGetRegId(int, int);
-       /// FIXME: docu
-extern inline void MapFieldSetRegId(int, int, unsigned short);
-       /// FIXME: docu
-extern inline int MapFieldPassable(int, int, int);
-#endif
 
        /// Returns true, if the unit-type(mask can enter field with bounds 
check
 extern int CheckedCanMoveToMask(int x, int y, int mask);
Index: stratagus/src/include/pathfinder.h
diff -u stratagus/src/include/pathfinder.h:1.38 
stratagus/src/include/pathfinder.h:1.39
--- stratagus/src/include/pathfinder.h:1.38     Mon Dec 22 16:52:33 2003
+++ stratagus/src/include/pathfinder.h  Wed Jan 21 05:41:58 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: pathfinder.h,v 1.38 2003/12/22 05:52:33 wizzard Exp $
+//      $Id: pathfinder.h,v 1.39 2004/01/20 18:41:58 nobody_ Exp $
 
 #ifndef __PATH_FINDER_H__
 #define __PATH_FINDER_H__
@@ -123,10 +123,6 @@
 extern void PathfinderCclRegister(void);
 
 //@}
-
-#ifdef HIERARCHIC_PATHFINDER
-#include "../pathfinder/hierarchical.h"
-#endif /* HIERARCHIC_PATHFINDER */
 
 #ifdef MAP_REGIONS
 #include "../pathfinder/splitter.h"
Index: stratagus/src/include/unit.h
diff -u stratagus/src/include/unit.h:1.248 stratagus/src/include/unit.h:1.249
--- stratagus/src/include/unit.h:1.248  Sat Jan 17 11:34:04 2004
+++ stratagus/src/include/unit.h        Wed Jan 21 05:41:58 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: unit.h,v 1.248 2004/01/17 00:34:04 nobody_ Exp $
+//      $Id: unit.h,v 1.249 2004/01/20 18:41:58 nobody_ Exp $
 
 #ifndef __UNIT_H__
 #define __UNIT_H__
@@ -638,14 +638,6 @@
 
        Unit*           Goal;                                           /// 
Generic goal pointer
 
-#ifdef HIERARCHIC_PATHFINDER
-#define UNIT_CLEAN                             0               /// FIXME: 
comment missing
-#define UNIT_RETREATING                                1               /// 
FIXME: comment missing
-#define UNIT_WINNING                           2               /// FIXME: 
comment missing
-       unsigned                Retreating:2;                           /// 
FIXME: comment what is this?
-       void *PfHierData;
-#endif         // HIERARCHIC_PATHFINDER
-
 #ifdef NEW_DECODRAW
        Deco*  Decoration;                 /// Decoration when visible on screen
 #endif
@@ -811,10 +803,6 @@
        /// FIXME: more docu
 extern void GetUnitMapArea(const Unit* unit, int *sx, int *sy,
        int *ex, int *ey);
-#ifdef HIERARCHIC_PATHFINDER
-       /// FIXME: more docu
-extern int UnitGetNextPathSegment(const Unit*, int*, int*);
-#endif
        /// Check for rescue each second
 extern void RescueUnits(void);
        /// Change owner of unit
Index: stratagus/src/map/map.c
diff -u stratagus/src/map/map.c:1.75 stratagus/src/map/map.c:1.76
--- stratagus/src/map/map.c:1.75        Sat Jan 17 11:34:05 2004
+++ stratagus/src/map/map.c     Wed Jan 21 05:41:59 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: map.c,v 1.75 2004/01/17 00:34:05 nobody_ Exp $
+//     $Id: map.c,v 1.76 2004/01/20 18:41:59 nobody_ Exp $
 
 //@{
 
@@ -365,35 +365,6 @@
 
        return TheMap.Fields[tx + ty * TheMap.Width].Flags & MapFieldRocks;
 }
-
-#ifdef HIERARCHIC_PATHFINDER
-
-/**
-**             FIXME: write the description of this function.
-*/
-global inline unsigned short MapFieldGetRegId(int tx, int ty)
-{
-       return TheMap.Fields[ty * TheMap.Width + tx].RegId;
-}
-
-/**
-**             FIXME: write the description of this function.
-*/
-global inline void MapFieldSetRegId(int tx, int ty, unsigned short regid)
-{
-       TheMap.Fields[ty * TheMap.Width + tx].RegId = regid;
-}
-
-/**
-**             FIXME: write the description of this function.
-**             @todo FIXME: convert to a macro
-*/
-global inline int MapFieldPassable(int tx, int ty, int mask)
-{
-       return !(TheMap.Fields[ty * TheMap.Width + tx].Flags & mask);
-}
-
-#endif // HIERARCHIC_PATHFINDER
 
 /**
 **             Can move to this point, applying mask.
Index: stratagus/src/map/map_draw.c
diff -u stratagus/src/map/map_draw.c:1.61 stratagus/src/map/map_draw.c:1.62
--- stratagus/src/map/map_draw.c:1.61   Thu Jan 15 17:44:25 2004
+++ stratagus/src/map/map_draw.c        Wed Jan 21 05:41:59 2004
@@ -29,7 +29,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//             $Id: map_draw.c,v 1.61 2004/01/15 06:44:25 jsalmon3 Exp $
+//             $Id: map_draw.c,v 1.62 2004/01/20 18:41:59 nobody_ Exp $
 
 //@{
 
@@ -1892,30 +1892,6 @@
                sy += TheMap.Width;
                dy += TileSizeY;
        }
-
-#if defined(HIERARCHIC_PATHFINDER) && defined(GRID)
-       {
-       int xmax = x + (vp->EndX - vp->X) / TileSizeX;
-       int xmin = x;
-       int ymax = y + (vp->EndY - vp->Y) / TileSizeY;
-       int ymin = y;
-       int AreaWidth = AreaGetWidth();
-       int AreaHeight = AreaGetHeight();
-       for (; x <= xmax; ++x)  {
-               if (x % AreaWidth == 0) {
-                       int             xx = vp->X + TileSizeX * (x - xmin) - 1;
-                       VideoDrawLineClip(ColorRed, xx, vp->Y, xx, vp->EndY);
-               }
-       }
-       for (; y <= ymax; ++y)  {
-               if (y % AreaHeight == 0) {
-                       int             yy = vp->Y + TileSizeY * (y - ymin) - 1;
-                       VideoDrawLineClip(ColorRed, vp->X, yy, vp->EndX, yy);
-               }
-       }
-
-       }
-#endif
 
 #ifdef TIMEIT
        ev = rdtsc();
Index: stratagus/src/map/map_fog.c
diff -u stratagus/src/map/map_fog.c:1.145 stratagus/src/map/map_fog.c:1.146
--- stratagus/src/map/map_fog.c:1.145   Fri Jan 16 15:36:33 2004
+++ stratagus/src/map/map_fog.c Wed Jan 21 05:41:59 2004
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: map_fog.c,v 1.145 2004/01/16 04:36:33 jsalmon3 Exp $
+//      $Id: map_fog.c,v 1.146 2004/01/20 18:41:59 nobody_ Exp $
 
 //@{
 
@@ -831,12 +831,6 @@
 #undef IsMapFieldVisibleTable
 }
 
-#ifdef HIERARCHIC_PATHFINDER
-#include "pathfinder.h"
-// hack
-#include "../pathfinder/region_set.h"
-#endif         // HIERARCHIC_PATHFINDER
-
 /**
 **             Draw the map fog of war.
 **
@@ -921,7 +915,7 @@
 #endif
 
 // Used to debug NEW_FOW problems
-#if !defined(HIERARCHIC_PATHFINDER) && defined(DEBUG_FOG_OF_WAR)
+#if defined(DEBUG_FOG_OF_WAR)
 extern int VideoDrawText(int x, int y, unsigned font, const unsigned char* 
text);
 #define GameFont 1
                                        {
@@ -950,32 +944,6 @@
 #endif
                                        }
 #endif
-#if defined(HIERARCHIC_PATHFINDER) && defined(DEBUG) && 0
-                                       {
-                                               char regidstr[8];
-                                               char groupstr[8];
-                                               int regid;
-extern int VideoDrawText(int x, int y, unsigned font, const unsigned char* 
text);
-#define GameFont 1
-
-                                               if (PfHierShowRegIds || 
PfHierShowGroupIds) {
-                                                       regid = 
MapFieldGetRegId (
-                                                               (dx - vp->X) / 
TileSizeX + vp->MapX,
-                                                               (dy - vp->Y) / 
TileSizeY + vp->MapY);
-                                                       if (regid) {
-                                                               Region* r = 
RegionSetFind(regid);
-                                                               if 
(PfHierShowRegIds) {
-                                                                       
snprintf(regidstr, 8, "%d", regid);
-                                                                       
VideoDrawText(dx, dy, GameFont, regidstr);
-                                                               }
-                                                               if 
(PfHierShowGroupIds) {
-                                                                       
snprintf(groupstr, 8, "%d", r->GroupId);
-                                                                       
VideoDrawText(dx, dy + 19, GameFont, groupstr);
-                                                               }
-                                                       }
-                                               }
-                                       }
-#endif         // HIERARCHIC_PATHFINDER
                                }
                                ++redraw_tile;
                                ++sx;
Index: stratagus/src/map/map_wall.c
diff -u stratagus/src/map/map_wall.c:1.28 stratagus/src/map/map_wall.c:1.29
--- stratagus/src/map/map_wall.c:1.28   Sat Dec 20 16:33:32 2003
+++ stratagus/src/map/map_wall.c        Wed Jan 21 05:42:00 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: map_wall.c,v 1.28 2003/12/20 05:33:32 jsalmon3 Exp $
+//     $Id: map_wall.c,v 1.29 2004/01/20 18:42:00 nobody_ Exp $
 
 //@{
 
@@ -40,9 +40,9 @@
 #include "map.h"
 #include "minimap.h"
 #include "player.h"
-#if defined(HIERARCHIC_PATHFINDER) || defined(MAP_REGIONS)
+#if defined(MAP_REGIONS)
 #include "pathfinder.h"
-#endif // HIERARCHIC_PATHFINDER
+#endif
 
 /*----------------------------------------------------------------------------
 --             Declarations
@@ -367,9 +367,6 @@
        if( v <= damage ) {
                TheMap.Fields[x + y * TheMap.Width].Value = 0;
                MapRemoveWall(x, y);
-#ifdef HIERARCHIC_PATHFINDER
-               PfHierMapChangedCallback (x, y, x, y);
-#endif
 #ifdef MAP_REGIONS
                MapSplitterTilesCleared(x, y, x, y);
 #endif
Index: stratagus/src/map/map_wood.c
diff -u stratagus/src/map/map_wood.c:1.30 stratagus/src/map/map_wood.c:1.31
--- stratagus/src/map/map_wood.c:1.30   Sat Dec 20 16:33:32 2003
+++ stratagus/src/map/map_wood.c        Wed Jan 21 05:42:00 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: map_wood.c,v 1.30 2003/12/20 05:33:32 jsalmon3 Exp $
+//     $Id: map_wood.c,v 1.31 2004/01/20 18:42:00 nobody_ Exp $
 
 //@{
 
@@ -47,7 +47,7 @@
 #include "minimap.h"
 #include "player.h"
 #include "editor.h"
-#if defined(HIERARCHIC_PATHFINDER) || defined(MAP_REGIONS)
+#if defined(MAP_REGIONS)
 #include "pathfinder.h"
 #endif
 
@@ -346,9 +346,6 @@
                MarkDrawPosMap(x, y);
                MustRedraw |= RedrawMinimap;
        }
-#ifdef HIERARCHIC_PATHFINDER
-       PfHierMapChangedCallback (x, y, x, y);
-#endif
 #ifdef MAP_REGIONS
        MapSplitterTilesCleared(x, y, x, y);
 #endif
Index: stratagus/src/pathfinder/Module.make
diff -u stratagus/src/pathfinder/Module.make:1.4 
stratagus/src/pathfinder/Module.make:1.5
--- stratagus/src/pathfinder/Module.make:1.4    Sat Jan 17 01:26:42 2004
+++ stratagus/src/pathfinder/Module.make        Wed Jan 21 05:42:00 2004
@@ -1,3 +1,18 @@
-SRC += src/pathfinder/astar.c src/pathfinder/avl_tree.c 
src/pathfinder/script_pathfinder.c src/pathfinder/floodfill.c 
src/pathfinder/hierarchical.c src/pathfinder/pathfinder.c 
src/pathfinder/pf_goal.c src/pathfinder/pf_high_open.c 
src/pathfinder/pf_highlevel.c src/pathfinder/pf_low_open.c 
src/pathfinder/pf_lowlevel.c src/pathfinder/regid.c src/pathfinder/region.c 
src/pathfinder/region_groups.c src/pathfinder/region_set.c 
src/pathfinder/splitter.c src/pathfinder/splitter_debug.c 
src/pathfinder/splitter_lowlevel.c src/pathfinder/splitter_zoneset.c
-HDRS += src/pathfinder/avl_tree.h src/pathfinder/hierarchical.h 
src/pathfinder/pf_goal.h src/pathfinder/pf_high_open.h 
src/pathfinder/pf_highlevel.h src/pathfinder/pf_low_open.h 
src/pathfinder/pf_lowlevel.h src/pathfinder/regid.h src/pathfinder/region.h 
src/pathfinder/region_groups.h src/pathfinder/region_set.h 
src/pathfinder/splitter.h src/pathfinder/splitter_local.h src/pathfinder/types.h
-OBJ += src/pathfinder/$(OBJDIR)/astar.o src/pathfinder/$(OBJDIR)/avl_tree.o 
src/pathfinder/$(OBJDIR)/script_pathfinder.o 
src/pathfinder/$(OBJDIR)/floodfill.o src/pathfinder/$(OBJDIR)/hierarchical.o 
src/pathfinder/$(OBJDIR)/pathfinder.o src/pathfinder/$(OBJDIR)/pf_goal.o 
src/pathfinder/$(OBJDIR)/pf_high_open.o src/pathfinder/$(OBJDIR)/pf_highlevel.o 
src/pathfinder/$(OBJDIR)/pf_low_open.o src/pathfinder/$(OBJDIR)/pf_lowlevel.o 
src/pathfinder/$(OBJDIR)/regid.o src/pathfinder/$(OBJDIR)/region.o 
src/pathfinder/$(OBJDIR)/region_groups.o src/pathfinder/$(OBJDIR)/region_set.o 
src/pathfinder/$(OBJDIR)/splitter.o src/pathfinder/$(OBJDIR)/splitter_debug.o 
src/pathfinder/$(OBJDIR)/splitter_lowlevel.o 
src/pathfinder/$(OBJDIR)/splitter_zoneset.o
+SRC += src/pathfinder/astar.c \
+       src/pathfinder/script_pathfinder.c \
+       src/pathfinder/pathfinder.c \
+       src/pathfinder/splitter.c \
+       src/pathfinder/splitter_debug.c \
+       src/pathfinder/splitter_lowlevel.c \
+       src/pathfinder/splitter_zoneset.c
+
+HDRS += src/pathfinder/splitter.h \
+       src/pathfinder/splitter_local.h
+
+OBJ += src/pathfinder/$(OBJDIR)/astar.o \
+       src/pathfinder/$(OBJDIR)/script_pathfinder.o \
+       src/pathfinder/$(OBJDIR)/pathfinder.o \
+       src/pathfinder/$(OBJDIR)/splitter.o \
+       src/pathfinder/$(OBJDIR)/splitter_debug.o \
+       src/pathfinder/$(OBJDIR)/splitter_lowlevel.o \
+       src/pathfinder/$(OBJDIR)/splitter_zoneset.o
Index: stratagus/src/pathfinder/script_pathfinder.c
diff -u stratagus/src/pathfinder/script_pathfinder.c:1.30 
stratagus/src/pathfinder/script_pathfinder.c:1.31
--- stratagus/src/pathfinder/script_pathfinder.c:1.30   Sat Jan 17 02:17:28 2004
+++ stratagus/src/pathfinder/script_pathfinder.c        Wed Jan 21 05:42:01 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: script_pathfinder.c,v 1.30 2004/01/16 15:17:28 wizzard Exp $
+//     $Id: script_pathfinder.c,v 1.31 2004/01/20 18:42:01 nobody_ Exp $
 
 //@{
 
@@ -107,37 +107,6 @@
        return 0;
 }
 
-#ifdef HIERARCHIC_PATHFINDER
-local int CclPfHierShowRegIds(lua_State* l)
-{
-       if (lua_gettop(l) != 1) {
-               lua_pushstring(l, "incorrect argument");
-               lua_error(l);
-       }
-       PfHierShowRegIds = LuaToBoolean(l, 1);
-       return 0;
-}
-
-local int CclPfHierShowGroupIds(lua_State* l)
-{
-       if (lua_gettop(l) != 1) {
-               lua_pushstring(l, "incorrect argument");
-               lua_error(l);
-       }
-       PfHierShowGroupIds = LuaToBoolean(l, 1);
-       return 0;
-}
-#else
-local int CclPfHierShowRegIds(lua_State* l)
-{
-       return 0;
-}
-
-local int CclPfHierShowGroupIds(lua_State* l)
-{
-       return 0;
-}
-
 #ifdef MAP_REGIONS
 global void MapSplitterDebug(void);
 
@@ -148,9 +117,6 @@
 }
 #endif // MAP_REGIONS
 
-#endif
-
-
 /**
 **             Register CCL features for pathfinder.
 */
@@ -160,8 +126,6 @@
 #ifdef MAP_REGIONS
        lua_register(Lua, "DebugRegions", CclDebugRegions);
 #endif // MAP_REGIONS
-       lua_register(Lua, "PfShowRegids", CclPfHierShowRegIds);
-       lua_register(Lua, "PfShowGroupids", CclPfHierShowGroupIds);
 }
 
 //@}
Index: stratagus/src/stratagus/mainloop.c
diff -u stratagus/src/stratagus/mainloop.c:1.181 
stratagus/src/stratagus/mainloop.c:1.182
--- stratagus/src/stratagus/mainloop.c:1.181    Sat Jan 17 06:22:16 2004
+++ stratagus/src/stratagus/mainloop.c  Wed Jan 21 05:42:02 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: mainloop.c,v 1.181 2004/01/16 19:22:16 wizzard Exp $
+//      $Id: mainloop.c,v 1.182 2004/01/20 18:42:02 nobody_ Exp $
 
 //@{
 
@@ -37,7 +37,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(DEBUG) && defined(HIERARCHIC_PATHFINDER)
+#if defined(DEBUG)
 #include <setjmp.h>
 #endif
 
@@ -84,7 +84,7 @@
        /// variable set when we are scrolling via mouse
 global enum _scroll_state_ MouseScrollState = ScrollNone;
 
-#if defined(DEBUG) && defined(HIERARCHIC_PATHFINDER)
+#if defined(DEBUG)
 global jmp_buf MainLoopJmpBuf;                         /// Hierarchic 
pathfinder error exit.
 #endif
 
@@ -787,7 +787,7 @@
 
        while (GameRunning) {
 
-#if defined(DEBUG) && defined(HIERARCHIC_PATHFINDER)
+#if defined(DEBUG)
                if (setjmp(MainLoopJmpBuf)) {
                        GamePaused = 1;
                }
Index: stratagus/src/stratagus/stratagus.c
diff -u stratagus/src/stratagus/stratagus.c:1.252 
stratagus/src/stratagus/stratagus.c:1.253
--- stratagus/src/stratagus/stratagus.c:1.252   Wed Jan 21 04:08:18 2004
+++ stratagus/src/stratagus/stratagus.c Wed Jan 21 05:42:02 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: stratagus.c,v 1.252 2004/01/20 17:08:18 jsalmon3 Exp $
+//      $Id: stratagus.c,v 1.253 2004/01/20 18:42:02 nobody_ Exp $
 
 //@{
 
@@ -941,9 +941,6 @@
 #endif
 #ifdef NEW_MAPDRAW
                "NEW-MAPDRAW "
-#endif
-#ifdef HIERARCHIC_PATHFINDER
-               "HIERARCHIC-PATHFINDER "
 #endif
 #ifdef MAP_REGIONS
                "MAP-REGIONS "
Index: stratagus/src/unit/unit.c
diff -u stratagus/src/unit/unit.c:1.366 stratagus/src/unit/unit.c:1.367
--- stratagus/src/unit/unit.c:1.366     Mon Jan 19 09:36:31 2004
+++ stratagus/src/unit/unit.c   Wed Jan 21 05:42:03 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: unit.c,v 1.366 2004/01/18 22:36:31 nobody_ Exp $
+//      $Id: unit.c,v 1.367 2004/01/20 18:42:03 nobody_ Exp $
 
 //@{
 
@@ -198,9 +198,6 @@
                //
                unit->Destroyed = 1;                            // mark as 
destroyed
 
-#ifdef HIERARCHIC_PATHFINDER
-               PfHierReleaseData(unit);
-#endif
                if (--unit->Refs > 0) {
                        DebugLevel2Fn("%lu:More references of %d #%d\n" _C_ 
GameCycle _C_
                        UnitNumber(unit) _C_ unit->Refs);
@@ -463,16 +460,6 @@
                }
        }
 
-#ifdef not_needed_JOHNS_HIERARCHIC_PATHFINDER
-       //
-       //              Update hierarchic pathfinder structures.
-       //
-       if (type->Building) {
-               PfHierMapChangedCallback(x, y,
-                       x + type->TileWidth - 1, y + type->TileHeight - 1);
-       }
-#endif
-
 #ifdef MAP_REGIONS
        if (type->Building &&
                        (type->FieldFlags &
@@ -645,15 +632,6 @@
                        TheMap.Fields[unit->X + w + (unit->Y + h) * 
TheMap.Width].Flags &= flags;
                }
        }
-#ifdef HIERARCHIC_PATHFINDER
-       //
-       //              Update hierarchic pathfinder structures.
-       //
-       if (type->Building) {
-               PfHierMapChangedCallback(unit->X, unit->Y,
-                       unit->X + type->TileWidth - 1, unit->Y + 
type->TileHeight - 1);
-       }
-#endif
 
 #ifdef MAP_REGIONS
        //
@@ -1468,35 +1446,6 @@
        return 0;
 }
 
-#ifdef HIERARCHIC_PATHFINDER           // {
-
-// hack
-#include "../pathfinder/pf_lowlevel.h"
-
-/**
-**             FIXME: Docu
-*/
-global int UnitGetNextPathSegment(const Unit* unit, int* dx, int* dy)
-{
-       int segment;
-       int shift;
-       int neighbor;
-
-       if (unit->Data.Move.Length <= 0) {
-               return 0;
-               // *dx and *dy returned to the caller are invalid
-       }
-
-       segment = unit->Data.Move.Length - 1;
-       shift = segment % 2 ? 4 : 0;
-       neighbor = (unit->Data.Move.Path[segment / 2] >> shift) & 0xf;
-       *dx = Neighbor[neighbor].dx;
-       *dy = Neighbor[neighbor].dy;
-       return 1;
-}
-
-#endif // } HIERARCHIC_PATHFINDER
-
 /**
 **             Change the unit's owner
 **
@@ -3790,7 +3739,7 @@
        int j;
 
        CLprintf(file, "\n--- -----------------------------------------\n");
-       CLprintf(file, "--- MODULE: units $Id: unit.c,v 1.366 2004/01/18 
22:36:31 nobody_ Exp $\n\n");
+       CLprintf(file, "--- MODULE: units $Id: unit.c,v 1.367 2004/01/20 
18:42:03 nobody_ Exp $\n\n");
 
 #if 0
        //




reply via email to

[Prev in Thread] Current Thread [Next in Thread]