summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-01 10:07:22 +0000
committerrubidium <rubidium@openttd.org>2009-09-01 10:07:22 +0000
commit07d2af338e237889ff453a3a774522b9b0021439 (patch)
tree373ccc2eecf1aa917f24008e4d25535413dc4eb2
parent5a3b2f0d02ddb7fedbca29a3e5e68dec28c887af (diff)
downloadopenttd-07d2af338e237889ff453a3a774522b9b0021439.tar.xz
(svn r17339) -Codechange: move thread related files to their own directory (like done for video, music, sound, etc)
-rw-r--r--Makefile.bundle.in4
-rw-r--r--projects/openttd_vs80.vcproj20
-rw-r--r--projects/openttd_vs90.vcproj20
-rw-r--r--source.list38
-rw-r--r--src/genworld.cpp2
-rw-r--r--src/genworld_gui.cpp2
-rw-r--r--src/gfx.cpp2
-rw-r--r--src/network/core/tcp_connect.cpp2
-rw-r--r--src/network/network_gamelist.cpp2
-rw-r--r--src/network/network_udp.cpp2
-rw-r--r--src/openttd.cpp2
-rw-r--r--src/saveload/saveload.cpp2
-rw-r--r--src/thread/thread.h (renamed from src/thread.h)0
-rw-r--r--src/thread/thread_morphos.cpp (renamed from src/thread_morphos.cpp)6
-rw-r--r--src/thread/thread_none.cpp (renamed from src/thread_none.cpp)2
-rw-r--r--src/thread/thread_os2.cpp (renamed from src/thread_os2.cpp)2
-rw-r--r--src/thread/thread_pthread.cpp (renamed from src/thread_pthread.cpp)2
-rw-r--r--src/thread/thread_win32.cpp (renamed from src/thread_win32.cpp)6
18 files changed, 63 insertions, 53 deletions
diff --git a/Makefile.bundle.in b/Makefile.bundle.in
index b7c8d2f8d..d9cf9467e 100644
--- a/Makefile.bundle.in
+++ b/Makefile.bundle.in
@@ -151,8 +151,8 @@ bundle_exe: all
@echo '[BUNDLE] Creating $(BUNDLE_NAME).exe'
$(Q)mkdir -p "$(BUNDLES_DIR)"
$(Q)unix2dos "$(ROOT_DIR)/docs/"* "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
- $(Q)cd $(ROOT_DIR)/os/win32/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
- $(Q)mv $(ROOT_DIR)/os/win32/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
+ $(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
+ $(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
ifdef OSXAPP
install:
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 566353e7b..a9d20174d 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -736,10 +736,6 @@
>
</File>
<File
- RelativePath=".\..\src\thread_win32.cpp"
- >
- </File>
- <File
RelativePath=".\..\src\tile_map.cpp"
>
</File>
@@ -1504,10 +1500,6 @@
>
</File>
<File
- RelativePath=".\..\src\thread.h"
- >
- </File>
- <File
RelativePath=".\..\src\tile_cmd.h"
>
</File>
@@ -3581,6 +3573,18 @@
</File>
</Filter>
<Filter
+ Name="Threading"
+ >
+ <File
+ RelativePath=".\..\src\thread\thread.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\thread\thread_win32.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
Name="64-bit Specific Files"
Filter="asm"
>
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index 310bc574e..9bf2eaeb6 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -733,10 +733,6 @@
>
</File>
<File
- RelativePath=".\..\src\thread_win32.cpp"
- >
- </File>
- <File
RelativePath=".\..\src\tile_map.cpp"
>
</File>
@@ -1501,10 +1497,6 @@
>
</File>
<File
- RelativePath=".\..\src\thread.h"
- >
- </File>
- <File
RelativePath=".\..\src\tile_cmd.h"
>
</File>
@@ -3578,6 +3570,18 @@
</File>
</Filter>
<Filter
+ Name="Threading"
+ >
+ <File
+ RelativePath=".\..\src\thread\thread.h"
+ >
+ </File>
+ <File
+ RelativePath=".\..\src\thread\thread_win32.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
Name="64-bit Specific Files"
Filter="asm"
>
diff --git a/source.list b/source.list
index 03186c07d..3dafee29f 100644
--- a/source.list
+++ b/source.list
@@ -76,23 +76,6 @@ strings.cpp
subsidy.cpp
texteff.cpp
tgp.cpp
-#if HAVE_THREAD
- #if WIN32
- thread_win32.cpp
- #else
- #if OS2
- thread_os2.cpp
- #else
- #if MORPHOS
- thread_morphos.cpp
- #else
- thread_pthread.cpp
- #end
- #end
- #end
-#else
- thread_none.cpp
-#end
tile_map.cpp
#if WIN32
#else
@@ -304,7 +287,6 @@ terraform_gui.h
textbuf_gui.h
texteff.hpp
tgp.h
-thread.h
tile_cmd.h
tile_type.h
tilehighlight_func.h
@@ -940,3 +922,23 @@ sound/null_s.cpp
os/macosx/splash.cpp
#end
#end
+
+# Threading
+thread/thread.h
+#if HAVE_THREAD
+ #if WIN32
+ thread/thread_win32.cpp
+ #else
+ #if OS2
+ thread/thread_os2.cpp
+ #else
+ #if MORPHOS
+ thread/thread_morphos.cpp
+ #else
+ thread/thread_pthread.cpp
+ #end
+ #end
+ #end
+#else
+ thread/thread_none.cpp
+#end
diff --git a/src/genworld.cpp b/src/genworld.cpp
index b7ca107fb..1018cac29 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -14,7 +14,7 @@
#include "landscape.h"
#include "company_func.h"
#include "variables.h"
-#include "thread.h"
+#include "thread/thread.h"
#include "command_func.h"
#include "genworld.h"
#include "gfxinit.h"
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 6e386cf86..76447ca70 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -32,7 +32,7 @@
#include "landscape_type.h"
#include "querystring_gui.h"
#include "town.h"
-#include "thread.h"
+#include "thread/thread.h"
#include "settings_func.h"
#include "table/strings.h"
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 0662c18c5..8d0add677 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -26,7 +26,7 @@
#include "landscape_type.h"
#include "network/network_func.h"
#include "core/smallvec_type.hpp"
-#include "thread.h"
+#include "thread/thread.h"
#include "window_func.h"
#include "table/palettes.h"
diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp
index bfc642c4b..5d5d2feba 100644
--- a/src/network/core/tcp_connect.cpp
+++ b/src/network/core/tcp_connect.cpp
@@ -16,7 +16,7 @@
#include "../../stdafx.h"
#include "../../debug.h"
#include "../../core/smallvec_type.hpp"
-#include "../../thread.h"
+#include "../../thread/thread.h"
#include "tcp.h"
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index a3f724487..b751fba34 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -17,7 +17,7 @@
#include "../stdafx.h"
#include "../debug.h"
#include "../core/alloc_func.hpp"
-#include "../thread.h"
+#include "../thread/thread.h"
#include "../string_func.h"
#include "network_internal.h"
#include "network_udp.h"
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp
index de11b6cb7..7785f635b 100644
--- a/src/network/network_udp.cpp
+++ b/src/network/network_udp.cpp
@@ -28,7 +28,7 @@
#include "../string_func.h"
#include "../company_base.h"
#include "../settings_type.h"
-#include "../thread.h"
+#include "../thread/thread.h"
#include "../rev.h"
#include "core/udp.h"
diff --git a/src/openttd.cpp b/src/openttd.cpp
index a99a735ec..a46a7a734 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -60,7 +60,7 @@
#include "elrail_func.h"
#include "rev.h"
#include "highscore.h"
-#include "thread.h"
+#include "thread/thread.h"
#include "station_base.h"
#include "newgrf_commons.h"
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 71e8b803f..65a1d2e8e 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -24,7 +24,7 @@
#include "../openttd.h"
#include "../debug.h"
#include "../station_base.h"
-#include "../thread.h"
+#include "../thread/thread.h"
#include "../town.h"
#include "../network/network.h"
#include "../variables.h"
diff --git a/src/thread.h b/src/thread/thread.h
index 22873bee5..22873bee5 100644
--- a/src/thread.h
+++ b/src/thread/thread.h
diff --git a/src/thread_morphos.cpp b/src/thread/thread_morphos.cpp
index 5248a7837..abf2cf0cc 100644
--- a/src/thread_morphos.cpp
+++ b/src/thread/thread_morphos.cpp
@@ -9,10 +9,10 @@
/** @file thread_morphos.cpp MorphOS implementation of Threads. */
-#include "stdafx.h"
+#include "../stdafx.h"
#include "thread.h"
-#include "debug.h"
-#include "core/alloc_func.hpp"
+#include "../debug.h"
+#include "../core/alloc_func.hpp"
#include <stdlib.h>
#include <unistd.h>
diff --git a/src/thread_none.cpp b/src/thread/thread_none.cpp
index 1893aebd2..861f2cfd6 100644
--- a/src/thread_none.cpp
+++ b/src/thread/thread_none.cpp
@@ -9,7 +9,7 @@
/** @file thread_none.cpp No-Threads-Available implementation of Threads */
-#include "stdafx.h"
+#include "../stdafx.h"
#include "thread.h"
/* static */ bool ThreadObject::New(OTTDThreadFunc proc, void *param, ThreadObject **thread)
diff --git a/src/thread_os2.cpp b/src/thread/thread_os2.cpp
index 18122fe15..1145e8e41 100644
--- a/src/thread_os2.cpp
+++ b/src/thread/thread_os2.cpp
@@ -9,7 +9,7 @@
/** @file thread_os2.cpp OS/2 implementation of Threads. */
-#include "stdafx.h"
+#include "../stdafx.h"
#include "thread.h"
#define INCL_DOS
diff --git a/src/thread_pthread.cpp b/src/thread/thread_pthread.cpp
index 9edfd4e14..483b71c0f 100644
--- a/src/thread_pthread.cpp
+++ b/src/thread/thread_pthread.cpp
@@ -9,7 +9,7 @@
/** @file thread_pthread.cpp POSIX pthread implementation of Threads. */
-#include "stdafx.h"
+#include "../stdafx.h"
#include "thread.h"
#include <pthread.h>
diff --git a/src/thread_win32.cpp b/src/thread/thread_win32.cpp
index 8b1d11544..e752de1ae 100644
--- a/src/thread_win32.cpp
+++ b/src/thread/thread_win32.cpp
@@ -9,10 +9,10 @@
/** @file thread_win32.cpp Win32 thread implementation of Threads. */
-#include "stdafx.h"
+#include "../stdafx.h"
#include "thread.h"
-#include "debug.h"
-#include "core/alloc_func.hpp"
+#include "../debug.h"
+#include "../core/alloc_func.hpp"
#include <stdlib.h>
#include <windows.h>
#include <process.h>