summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--ai/default/default.c (renamed from ai_old.c)40
-rw-r--r--ai/trolly/build.c (renamed from ai_build.c)22
-rw-r--r--ai/trolly/pathfinder.c (renamed from ai_pathfinder.c)20
-rw-r--r--ai/trolly/shared.c (renamed from ai_shared.c)12
-rw-r--r--ai/trolly/trolly.c (renamed from ai_new.c)59
-rw-r--r--ai/trolly/trolly.h (renamed from ai_new.h)12
-rw-r--r--players.c3
8 files changed, 91 insertions, 90 deletions
diff --git a/Makefile b/Makefile
index 1111964ea..bb1bb0a60 100644
--- a/Makefile
+++ b/Makefile
@@ -573,11 +573,6 @@ endif
### Sources
-C_SOURCES += ai_old.c
-C_SOURCES += ai_build.c
-C_SOURCES += ai_new.c
-C_SOURCES += ai_pathfinder.c
-C_SOURCES += ai_shared.c
C_SOURCES += aircraft_cmd.c
C_SOURCES += aircraft_gui.c
C_SOURCES += airport.c
@@ -686,6 +681,12 @@ C_SOURCES += sound/null_s.c
C_SOURCES += video/dedicated_v.c
C_SOURCES += video/null_v.c
+C_SOURCES += ai/default/default.c
+C_SOURCES += ai/trolly/trolly.c
+C_SOURCES += ai/trolly/build.c
+C_SOURCES += ai/trolly/pathfinder.c
+C_SOURCES += ai/trolly/shared.c
+
CXX_SOURCES =
OBJC_SOURCES =
@@ -988,7 +989,7 @@ upgradeconf: $(MAKE_CONFIG)
### Internal build rules
# This makes sure the .deps dir is always around.
-DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video .deps/os .deps/os/macosx)
+DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video .deps/os .deps/os/macosx .deps/ai/default .deps/ai/trolly)
# Introduce the dependencies
ifneq ($(MAKECMDGOALS), clean)
diff --git a/ai_old.c b/ai/default/default.c
index 40396159f..b8160d2bd 100644
--- a/ai_old.c
+++ b/ai/default/default.c
@@ -1,22 +1,22 @@
-/* $Id$ */
-
-#include "stdafx.h"
-#include "openttd.h"
-#include "functions.h"
-#include "map.h"
-#include "tile.h"
-#include "player.h"
-#include "vehicle.h"
-#include "engine.h"
-#include "command.h"
-#include "town.h"
-#include "industry.h"
-#include "station.h"
-#include "pathfind.h"
-#include "economy.h"
-#include "airport.h"
-#include "depot.h"
-#include "variables.h"
+/* $Id: ai_old.c 2701 2005-07-24 14:12:37Z tron $ */
+
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../functions.h"
+#include "../../map.h"
+#include "../../tile.h"
+#include "../../player.h"
+#include "../../vehicle.h"
+#include "../../engine.h"
+#include "../../command.h"
+#include "../../town.h"
+#include "../../industry.h"
+#include "../../station.h"
+#include "../../pathfind.h"
+#include "../../economy.h"
+#include "../../airport.h"
+#include "../../depot.h"
+#include "../../variables.h"
// remove some day perhaps?
static Player *_cur_ai_player;
@@ -52,7 +52,7 @@ enum {
};
-#include "table/ai_rail.h"
+#include "../../table/ai_rail.h"
static byte GetRailTrackStatus(TileIndex tile) {
uint32 r = GetTileTrackStatus(tile, TRANSPORT_RAIL);
diff --git a/ai_build.c b/ai/trolly/build.c
index 79ce510ff..80f0fdf1b 100644
--- a/ai_build.c
+++ b/ai/trolly/build.c
@@ -1,16 +1,16 @@
/* $Id$ */
-#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "functions.h"
-#include "map.h"
-#include "tile.h"
-#include "command.h"
-#include "ai_new.h"
-#include "engine.h"
-#include "station.h"
-#include "variables.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../debug.h"
+#include "../../functions.h"
+#include "../../map.h"
+#include "../../tile.h"
+#include "../../command.h"
+#include "trolly.h"
+#include "../../engine.h"
+#include "../../station.h"
+#include "../../variables.h"
// Build HQ
// Params:
diff --git a/ai_pathfinder.c b/ai/trolly/pathfinder.c
index d58cf9648..aa44014f9 100644
--- a/ai_pathfinder.c
+++ b/ai/trolly/pathfinder.c
@@ -1,15 +1,15 @@
/* $Id$ */
-#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "functions.h"
-#include "map.h"
-#include "tile.h"
-#include "command.h"
-#include "ai_new.h"
-#include "depot.h"
-#include "variables.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../debug.h"
+#include "../../functions.h"
+#include "../../map.h"
+#include "../../tile.h"
+#include "../../command.h"
+#include "trolly.h"
+#include "../../depot.h"
+#include "../../variables.h"
#define TEST_STATION_NO_DIR 0xFF
diff --git a/ai_shared.c b/ai/trolly/shared.c
index 8ce9df284..4b33a13a5 100644
--- a/ai_shared.c
+++ b/ai/trolly/shared.c
@@ -1,11 +1,11 @@
/* $Id$ */
-#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "map.h"
-#include "ai_new.h"
-#include "vehicle.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../debug.h"
+#include "../../map.h"
+#include "trolly.h"
+#include "../../vehicle.h"
int AiNew_GetRailDirection(TileIndex tile_a, TileIndex tile_b, TileIndex tile_c)
{
diff --git a/ai_new.c b/ai/trolly/trolly.c
index 9619c2194..5e16c51a9 100644
--- a/ai_new.c
+++ b/ai/trolly/trolly.c
@@ -1,37 +1,36 @@
-/* $Id$ */
+/* $Id: ai_new.c 2891 2005-08-26 20:26:34Z tron $ */
/*
- * Next part is in Dutch, and only here for me, TrueLight, the maker of this new AI
+ * This AI was created as a direct reaction to the big demand for some good AIs in OTTD.
+ * Too bad it never left alpha-stage, and it is considered dead in his current form.
+ * By the time of writing this, we, the creator of this AI and a good friend of mine,
+ * are designing a whole new AI-system that allows us to create AIs easier and without
+ * all the fuzz we encountered while I was working on this AI. By the time that system
+ * is finished, you can expect that this AI will dissapear, because it is pretty
+ * obselete and bad programmed.
+ *
+ * In the meanwhile I wish you all much fun with this AI; if you are interested as
+ * AI-developer in this AI, I advise you not stare too long to some code, some things in
+ * here really are... strange ;) But in either way: enjoy :)
+ *
+ * -- TrueLight :: 2005-09-01
*/
-// TODO: als iemand een vehicle stil zet op een weg waar de AI wil bouwen
-// doet de AI helemaal niets meer
-// TODO: depot rondjes rijden stom iets dingus
-// TODO: jezelf afvragen of competitor_intelligence op niveau 2 wel meer geld moet opleverne...
-// TODO: als er iets in path komt, bouwt AI gewoon verder :(
-// TODO: mail routes
-
-// FIXME: This code is horrible. Indisputably from the style POV, at least. --pasky
-
-/*
- * End of Dutch part
- */
-
-#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "functions.h"
-#include "table/strings.h"
-#include "map.h"
-#include "tile.h"
-#include "command.h"
-#include "ai_new.h"
-#include "town.h"
-#include "industry.h"
-#include "station.h"
-#include "engine.h"
-#include "gui.h"
-#include "depot.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../debug.h"
+#include "../../functions.h"
+#include "../../table/strings.h"
+#include "../../map.h"
+#include "../../tile.h"
+#include "../../command.h"
+#include "trolly.h"
+#include "../../town.h"
+#include "../../industry.h"
+#include "../../station.h"
+#include "../../engine.h"
+#include "../../gui.h"
+#include "../../depot.h"
// This function is called after StartUp. It is the init of an AI
static void AiNew_State_FirstTime(Player *p)
diff --git a/ai_new.h b/ai/trolly/trolly.h
index ce929a655..901448dde 100644
--- a/ai_new.h
+++ b/ai/trolly/trolly.h
@@ -1,10 +1,10 @@
-/* $Id$ */
+/* $Id: ai_new.h 2892 2005-08-26 20:56:48Z tron $ */
-#ifndef AI_NEW_H
-#define AI_NEW_H
+#ifndef AI_TROLLY_H
+#define AI_TROLLY_H
-#include "aystar.h"
-#include "player.h"
+#include "../../aystar.h"
+#include "../../player.h"
/*
* These defines can be altered to change the behavoir of the AI
@@ -258,4 +258,4 @@ int AiNew_PickVehicle(Player *p);
int AiNew_Build_Vehicle(Player *p, TileIndex tile, byte flag);
int AiNew_Build_Depot(Player *p, TileIndex tile, byte direction, byte flag);
-#endif /* AI_NEW_H */
+#endif /* AI_TROLLY_H */
diff --git a/players.c b/players.c
index 3502019bf..4b6800766 100644
--- a/players.c
+++ b/players.c
@@ -20,7 +20,6 @@
#include "news.h"
#include "saveload.h"
#include "command.h"
-#include "ai_new.h"
#include "sound.h"
#include "network.h"
#include "variables.h"
@@ -566,6 +565,8 @@ void OnTick_Players(void)
}
}
+extern void AiNewDoGameLoop(Player *p);
+
void RunOtherPlayersLoop(void)
{
Player *p;