From bbdc5a9314f0f0e90517b3a513ba49db06e30260 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 24 Jan 2008 18:47:05 +0000 Subject: (svn r11979) -Codechange: drop MSVC 2003 support because MSVC 2003 is broken in such a manner that it triggers an internal compiler error without any clue what of the code is wrong. Even trying to bisect the problem does not give a single line of code that causes the trouble. --- docs/Readme_Windows_MSVC.txt | 28 +- projects/generate | 48 +- projects/langs.vcproj | 538 --------- projects/langs.vcproj.in | 44 - projects/openttd.sln | 43 - projects/openttd.tgt | 2667 ------------------------------------------ projects/openttd.vcproj | 1429 ---------------------- projects/openttd.vcproj.in | 177 --- projects/strgen.vcproj | 101 -- src/debug.cpp | 50 +- src/debug.h | 38 +- src/graph_gui.cpp | 2 +- src/stdafx.h | 24 +- 13 files changed, 53 insertions(+), 5136 deletions(-) delete mode 100644 projects/langs.vcproj delete mode 100644 projects/langs.vcproj.in delete mode 100644 projects/openttd.sln delete mode 100644 projects/openttd.tgt delete mode 100644 projects/openttd.vcproj delete mode 100644 projects/openttd.vcproj.in delete mode 100644 projects/strgen.vcproj diff --git a/docs/Readme_Windows_MSVC.txt b/docs/Readme_Windows_MSVC.txt index 92e8b56d5..1d5a9fe59 100644 --- a/docs/Readme_Windows_MSVC.txt +++ b/docs/Readme_Windows_MSVC.txt @@ -6,11 +6,11 @@ PLEASE READ THE ENTIRE DOCUMENT BEFORE DOING ANY ACTUAL CHANGES!! SUPPORTED MSVC COMPILERS ------------------------ -OpenTTD includes projects for MSVC 2003.NET and MSVC 2005.NET. Both will +OpenTTD includes projects for MSVC 2005.NET and MSVC 2008.NET. Both will compile out of the box, providing you have the required libraries/headers; -which ones, see below. There is no support for VS6, you are therefore -strongly encouraged to either upgrade to MSVC 2005 Express (free) or use GCC. -MSVC 2002 probably works as well, but it has not been tested. +which ones, see below. There is no support for VS6 or MSVC 2002, or +MSVC 2003.NET. You are therefore strongly encouraged to either upgrade to +MSVC 2005 Express (free) or use GCC. 1) REQUIRED FILES @@ -74,20 +74,6 @@ NOTE: make sure that the directory for the DirectX SDK is the first one in the list, above all others, otherwise compilation will most likely fail!! -2.3) DEBUGGING - WORKING DIRECTORY (MSVC 2003 ONLY!) ----------------------------------------------------- -The very first time you check out and compile OpenTTD with Visual Studio 2003, running -the binary will complain about missing files. You need to go into and change a setting - -OpenTTD > Project > Properties > Configuration (All Configurations) > ... - Configuration Properties > Debugging > - - * Working Directory: ..\bin - -VS 2005 works out of the box because Microsoft allowed a user to supply a humanly- -readable defaults file (openttd_vs80.vcproj.user), whereas 2003 is braindead. - - 3) TTD GRAPHICS FILES --------------------- Copy the following files from Transport Tycoon Deluxe to the bin/data folder @@ -102,12 +88,12 @@ Copy the following files from Transport Tycoon Deluxe to the bin/data folder 4) COMPILING ------------ -Open trunk/openttd[_vs80].sln +Open trunk/openttd_vs[89]0.sln Set the build mode to 'Release' in Build > Configuration manager > Active solution configuration > select "Release" Compile... -If everything works well the binary should be in trunk/objs/[Win32]/Release/openttd.exe +If everything works well the binary should be in trunk/objs/Win[32|64]/Release/openttd.exe 5) EDITING, CHANGING SOURCE CODE @@ -126,4 +112,4 @@ to ask about reasons; or just wait. The problem will most likely solve itself within a few days as the problem is noticed and fixed. An up-to-date version of this README can be found on the wiki: -http://wiki.openttd.org/index.php/MicrosoftVisualCExpress \ No newline at end of file +http://wiki.openttd.org/index.php/MicrosoftVisualCExpress diff --git a/projects/generate b/projects/generate index 35ff065dc..cdc29bf40 100755 --- a/projects/generate +++ b/projects/generate @@ -25,13 +25,6 @@ fi # langs_vs80.vcproj is for MSVC 2005 # strgen_vs80.vcproj is for MSVC 2005 -# openttd.sln is for MSVC 2003 -# openttd.vcproj is for MSVC 2003 -# langs.vcproj is for MSVC 2003 -# strgen.vcproj is for MSVC 2003 - -# openttd.tgt is for WatCom - # First, collect the list of Windows files @@ -110,7 +103,7 @@ load_main_data() { print " "; + print " >"; } next; @@ -121,7 +114,8 @@ load_main_data() { gsub(" ", "", $0); gsub("/", "\\\\", $0); print " "; + print " RelativePath=\\".\\\\'$file_prefix'"$0"\\""; + print " >"; print " "; } } @@ -138,15 +132,18 @@ load_lang_data() { i=`basename $i | sed s/.txt$//g` RES="$RES + RelativePath=\"..\\src\\lang\\"$i".txt\" + > + Name=\"Debug|Win32\" + > + Outputs=\"..\\bin\\lang\\"$i".lng\" + /> " done @@ -165,22 +162,7 @@ generate() { } ' > "$ROOT_DIR/projects/$2" - # The files-list - echo "$1" | awk -v type="$3" ' - / / { - if (type == "msvc2003") gsub(" ", "\n", $0); - } - /Filter="">/ { - if (type == "msvc2005") gsub("Filter=\"\">", ">", $0); - } - /"\/>/ { - if (type == "msvc2005") gsub("/>", "\n" substr($0, 1, index($0, $1) - 2) "/>", $0); - } - /">/ { - if (type == "msvc2005") gsub(">", "\n" substr($0, 1, index($0, $1) - 1) ">", $0); - } - { print $0 } - ' >> "$ROOT_DIR/projects/$2" + echo "$1" >> "$ROOT_DIR/projects/$2" # Everything below the !!FILES!! marker cat "$ROOT_DIR/projects/$2".in | tr '\r' '\n' | awk ' @@ -199,9 +181,7 @@ safety_check "$ROOT_DIR/source.list" load_main_data "$ROOT_DIR/source.list" openttd load_lang_data "$ROOT_DIR/src/lang/*.txt" lang -generate "$openttd" "openttd.vcproj" "msvc2003" -generate "$openttd" "openttd_vs80.vcproj" "msvc2005" -generate "$openttd" "openttd_vs90.vcproj" "msvc2005" -generate "$lang" "langs.vcproj" "msvc2003" -generate "$lang" "langs_vs80.vcproj" "msvc2005" -generate "$lang" "langs_vs90.vcproj" "msvc2005" +generate "$openttd" "openttd_vs80.vcproj" +generate "$openttd" "openttd_vs90.vcproj" +generate "$lang" "langs_vs80.vcproj" +generate "$lang" "langs_vs90.vcproj" diff --git a/projects/langs.vcproj b/projects/langs.vcproj deleted file mode 100644 index bdc8d380c..000000000 --- a/projects/langs.vcproj +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/langs.vcproj.in b/projects/langs.vcproj.in deleted file mode 100644 index e1bcf36d5..000000000 --- a/projects/langs.vcproj.in +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - -!!FILES!! - - - - diff --git a/projects/openttd.sln b/projects/openttd.sln deleted file mode 100644 index 81e7bd6a3..000000000 --- a/projects/openttd.sln +++ /dev/null @@ -1,43 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd.vcproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" - ProjectSection(ProjectDependencies) = postProject - {0F066B23-18DF-4284-8265-F4A5E7E3B966} = {0F066B23-18DF-4284-8265-F4A5E7E3B966} - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs.vcproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}" - ProjectSection(ProjectDependencies) = postProject - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug.ActiveCfg = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug.Build.0 = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release.ActiveCfg = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release.Build.0 = Release|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug.ActiveCfg = Release|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug.Build.0 = Release|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release.ActiveCfg = Release|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release.Build.0 = Release|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/projects/openttd.tgt b/projects/openttd.tgt deleted file mode 100644 index dc2c11089..000000000 --- a/projects/openttd.tgt +++ /dev/null @@ -1,2667 +0,0 @@ -40 -targetIdent -0 -MProject -1 -MComponent -0 -2 -WString -4 -OEXE -3 -WString -5 -op2en -1 -0 -0 -4 -MCommand -0 -5 -MCommand -0 -6 -MItem -11 -openttd.exe -7 -WString -4 -OEXE -8 -WVList -8 -9 -MRState -10 -WString -7 -OS2LINK -11 -WString -25 -?????No debug information -1 -1 -12 -MRState -13 -WString -7 -OS2LINK -14 -WString -14 -?????Debug All -1 -0 -15 -MVState -16 -WString -7 -OS2LINK -17 -WString -11 -?????Stack: -1 -18 -WString -7 -2097152 -0 -19 -MVState -20 -WString -7 -OS2LINK -21 -WString -18 -?????Libraries(,): -1 -22 -WString -24 -png.lib zlib.lib sdl.lib -0 -23 -MCState -24 -WString -7 -OS2LINK -25 -WString -13 -?????Map file -0 -0 -26 -MVState -27 -WString -7 -OS2LINK -28 -WString -11 -?????Stack: -0 -29 -WString -7 -4194304 -0 -30 -MVState -31 -WString -7 -OS2LINK -32 -WString -18 -?????Libraries(,): -0 -33 -WString -34 -mmpm2.lib png.lib zlib.lib sdl.lib -0 -34 -MVState -35 -WString -7 -OS2LINK -36 -WString -17 -o????Description: -0 -37 -WString -7 -OpenTTD -0 -38 -WVList -3 -39 -ActionStates -40 -WString -5 -&Make -41 -WVList -0 -42 -ActionStates -43 -WString -4 -&Run -44 -WVList -0 -45 -ActionStates -46 -WString -7 -Sam&ple -47 -WVList -0 --1 -1 -1 -0 -48 -WPickList -127 -49 -MItem -3 -*.c -50 -WString -4 -COBJ -51 -WVList -14 -52 -MVState -53 -WString -3 -WCC -54 -WString -28 -?????Disable Warning message -1 -55 -WString -3 -202 -0 -56 -MVState -57 -WString -3 -WCC -58 -WString -23 -?????Macro definitions: -1 -59 -WString -50 -ENABLE_NETWORK=1 WITH_ZLIB=1 WITH_PNG=1 WITH_SDL=1 -0 -60 -MRState -61 -WString -3 -WCC -62 -WString -21 -?????4 byte alignment -1 -1 -63 -MRState -64 -WString -3 -WCC -65 -WString -21 -?????No optimizations -1 -0 -66 -MRState -67 -WString -3 -WCC -68 -WString -24 -?????Space optimizations -1 -1 -69 -MRState -70 -WString -3 -WCC -71 -WString -29 -?????No debugging information -1 -1 -72 -MRState -73 -WString -3 -WCC -74 -WString -24 -?????Full debugging info -1 -0 -75 -MVState -76 -WString -3 -WCC -77 -WString -28 -?????Disable Warning message -0 -78 -WString -3 -202 -0 -79 -MVState -80 -WString -3 -WCC -81 -WString -23 -?????Macro definitions: -0 -82 -WString -61 -ENABLE_NETWORK=1 WITH_ZLIB=1 WITH_PNG=1 WITH_SDL=1 WITH_REV=1 -0 -83 -MCState -84 -WString -3 -WCC -85 -WString -31 -?????Force enums to be type int -0 -1 -86 -MRState -87 -WString -3 -WCC -88 -WString -29 -?????No debugging information -0 -1 -89 -MRState -90 -WString -3 -WCC -91 -WString -28 -?????Line number information -0 -0 -92 -MRState -93 -WString -3 -WCC -94 -WString -39 -??2??Pentium Pro Register based calling -0 -0 -95 -MRState -96 -WString -3 -WCC -97 -WString -36 -??2??Pentium Pro Stack based calling -0 -1 -98 -WVList -0 --1 -1 -1 -0 -99 -MItem -7 -ai\ai.c -100 -WString -4 -COBJ -101 -WVList -0 -102 -WVList -0 -49 -1 -1 -0 -103 -MItem -20 -ai\default\default.c -104 -WString -4 -COBJ -105 -WVList -0 -106 -WVList -0 -49 -1 -1 -0 -107 -MItem -17 -ai\trolly\build.c -108 -WString -4 -COBJ -109 -WVList -0 -110 -WVList -0 -49 -1 -1 -0 -111 -MItem -22 -ai\trolly\pathfinder.c -112 -WString -4 -COBJ -113 -WVList -0 -114 -WVList -0 -49 -1 -1 -0 -115 -MItem -18 -ai\trolly\shared.c -116 -WString -4 -COBJ -117 -WVList -0 -118 -WVList -0 -49 -1 -1 -0 -119 -MItem -18 -ai\trolly\trolly.c -120 -WString -4 -COBJ -121 -WVList -0 -122 -WVList -0 -49 -1 -1 -0 -123 -MItem -14 -aircraft_cmd.c -124 -WString -4 -COBJ -125 -WVList -0 -126 -WVList -0 -49 -1 -1 -0 -127 -MItem -14 -aircraft_gui.c -128 -WString -4 -COBJ -129 -WVList -0 -130 -WVList -0 -49 -1 -1 -0 -131 -MItem -9 -airport.c -132 -WString -4 -COBJ -133 -WVList -0 -134 -WVList -0 -49 -1 -1 -0 -135 -MItem -13 -airport_gui.c -136 -WString -4 -COBJ -137 -WVList -0 -138 -WVList -0 -49 -1 -1 -0 -139 -MItem -8 -aystar.c -140 -WString -4 -COBJ -141 -WVList -0 -142 -WVList -0 -49 -1 -1 -0 -143 -MItem -12 -bridge_gui.c -144 -WString -4 -COBJ -145 -WVList -0 -146 -WVList -0 -49 -1 -1 -0 -147 -MItem -12 -bridge_map.c -148 -WString -4 -COBJ -149 -WVList -0 -150 -WVList -0 -49 -1 -1 -0 -151 -MItem -16 -callback_table.c -152 -WString -4 -COBJ -153 -WVList -0 -154 -WVList -0 -49 -1 -1 -0 -155 -MItem -11 -clear_cmd.c -156 -WString -4 -COBJ -157 -WVList -0 -158 -WVList -0 -49 -1 -1 -0 -159 -MItem -9 -command.c -160 -WString -4 -COBJ -161 -WVList -0 -162 -WVList -0 -49 -1 -1 -0 -163 -MItem -9 -console.c -164 -WString -4 -COBJ -165 -WVList -0 -166 -WVList -0 -49 -1 -1 -0 -167 -MItem -14 -console_cmds.c -168 -WString -4 -COBJ -169 -WVList -0 -170 -WVList -0 -49 -1 -1 -0 -171 -MItem -10 -currency.c -172 -WString -4 -COBJ -173 -WVList -0 -174 -WVList -0 -49 -1 -1 -0 -175 -MItem -7 -debug.c -176 -WString -4 -COBJ -177 -WVList -0 -178 -WVList -0 -49 -1 -1 -0 -179 -MItem -11 -dedicated.c -180 -WString -4 -COBJ -181 -WVList -0 -182 -WVList -0 -49 -1 -1 -0 -183 -MItem -7 -depot.c -184 -WString -4 -COBJ -185 -WVList -0 -186 -WVList -0 -49 -1 -1 -0 -187 -MItem -14 -disaster_cmd.c -188 -WString -4 -COBJ -189 -WVList -0 -190 -WVList -0 -49 -1 -1 -0 -191 -MItem -10 -dock_gui.c -192 -WString -4 -COBJ -193 -WVList -0 -194 -WVList -0 -49 -1 -1 -0 -195 -MItem -8 -driver.c -196 -WString -4 -COBJ -197 -WVList -0 -198 -WVList -0 -49 -1 -1 -0 -199 -MItem -12 -dummy_land.c -200 -WString -4 -COBJ -201 -WVList -0 -202 -WVList -0 -49 -1 -1 -0 -203 -MItem -9 -economy.c -204 -WString -4 -COBJ -205 -WVList -0 -206 -WVList -0 -49 -1 -1 -0 -207 -MItem -8 -elrail.c -208 -WString -4 -COBJ -209 -WVList -0 -210 -WVList -0 -49 -1 -1 -0 -211 -MItem -8 -engine.c -212 -WString -4 -COBJ -213 -WVList -0 -214 -WVList -0 -49 -1 -1 -0 -215 -MItem -12 -engine_gui.c -216 -WString -4 -COBJ -217 -WVList -0 -218 -WVList -0 -49 -1 -1 -0 -219 -MItem -8 -fileio.c -220 -WString -4 -COBJ -221 -WVList -0 -222 -WVList -0 -49 -1 -1 -0 -223 -MItem -5 -gfx.c -224 -WString -4 -COBJ -225 -WVList -0 -226 -WVList -0 -49 -1 -1 -0 -227 -MItem -9 -gfxinit.c -228 -WString -4 -COBJ -229 -WVList -0 -230 -WVList -0 -49 -1 -1 -0 -231 -MItem -11 -graph_gui.c -232 -WString -4 -COBJ -233 -WVList -0 -234 -WVList -0 -49 -1 -1 -0 -235 -MItem -14 -industry_cmd.c -236 -WString -4 -COBJ -237 -WVList -0 -238 -WVList -0 -49 -1 -1 -0 -239 -MItem -14 -industry_gui.c -240 -WString -4 -COBJ -241 -WVList -0 -242 -WVList -0 -49 -1 -1 -0 -243 -MItem -11 -intro_gui.c -244 -WString -4 -COBJ -245 -WVList -0 -246 -WVList -0 -49 -1 -1 -0 -247 -MItem -11 -landscape.c -248 -WString -4 -COBJ -249 -WVList -0 -250 -WVList -0 -49 -1 -1 -0 -251 -MItem -10 -main_gui.c -252 -WString -4 -COBJ -253 -WVList -0 -254 -WVList -0 -49 -1 -1 -0 -255 -MItem -5 -map.c -256 -WString -4 -COBJ -257 -WVList -0 -258 -WVList -0 -49 -1 -1 -0 -259 -MItem -5 -md5.c -260 -WString -4 -COBJ -261 -WVList -0 -262 -WVList -0 -49 -1 -1 -0 -263 -MItem -10 -mersenne.c -264 -WString -4 -COBJ -265 -WVList -0 -266 -WVList -0 -49 -1 -1 -0 -267 -MItem -9 -minilzo.c -268 -WString -4 -COBJ -269 -WVList -0 -270 -WVList -0 -49 -1 -1 -0 -271 -MItem -6 -misc.c -272 -WString -4 -COBJ -273 -WVList -0 -274 -WVList -0 -49 -1 -1 -0 -275 -MItem -10 -misc_cmd.c -276 -WString -4 -COBJ -277 -WVList -0 -278 -WVList -0 -49 -1 -1 -0 -279 -MItem -10 -misc_gui.c -280 -WString -4 -COBJ -281 -WVList -0 -282 -WVList -0 -49 -1 -1 -0 -283 -MItem -7 -mixer.c -284 -WString -4 -COBJ -285 -WVList -0 -286 -WVList -0 -49 -1 -1 -0 -287 -MItem -14 -music\null_m.c -288 -WString -4 -COBJ -289 -WVList -0 -290 -WVList -0 -49 -1 -1 -0 -291 -MItem -13 -music\os2_m.c -292 -WString -4 -COBJ -293 -WVList -0 -294 -WVList -0 -49 -1 -1 -0 -295 -MItem -11 -music_gui.c -296 -WString -4 -COBJ -297 -WVList -0 -298 -WVList -0 -49 -1 -1 -0 -299 -MItem -9 -namegen.c -300 -WString -4 -COBJ -301 -WVList -0 -302 -WVList -0 -49 -1 -1 -0 -303 -MItem -9 -network.c -304 -WString -4 -COBJ -305 -WVList -0 -306 -WVList -0 -49 -1 -1 -0 -307 -MItem -16 -network_client.c -308 -WString -4 -COBJ -309 -WVList -0 -310 -WVList -0 -49 -1 -1 -0 -311 -MItem -14 -network_data.c -312 -WString -4 -COBJ -313 -WVList -0 -314 -WVList -0 -49 -1 -1 -0 -315 -MItem -18 -network_gamelist.c -316 -WString -4 -COBJ -317 -WVList -0 -318 -WVList -0 -49 -1 -1 -0 -319 -MItem -13 -network_gui.c -320 -WString -4 -COBJ -321 -WVList -0 -322 -WVList -0 -49 -1 -1 -0 -323 -MItem -16 -network_server.c -324 -WString -4 -COBJ -325 -WVList -0 -326 -WVList -0 -49 -1 -1 -0 -327 -MItem -13 -network_udp.c -328 -WString -4 -COBJ -329 -WVList -0 -330 -WVList -0 -49 -1 -1 -0 -331 -MItem -8 -newgrf.c -332 -WString -4 -COBJ -333 -WVList -0 -334 -WVList -0 -49 -1 -1 -0 -335 -MItem -15 -newgrf_engine.c -336 -WString -4 -COBJ -337 -WVList -0 -338 -WVList -0 -49 -1 -1 -0 -339 -MItem -16 -newgrf_station.c -340 -WString -4 -COBJ -341 -WVList -0 -342 -WVList -0 -49 -1 -1 -0 -343 -MItem -10 -news_gui.c -344 -WString -4 -COBJ -345 -WVList -0 -346 -WVList -0 -49 -1 -1 -0 -347 -MItem -5 -npf.c -348 -WString -4 -COBJ -349 -WVList -0 -350 -WVList -0 -49 -1 -1 -0 -351 -MItem -11 -oldloader.c -352 -WString -4 -COBJ -353 -WVList -0 -354 -WVList -0 -49 -1 -1 -0 -355 -MItem -9 -openttd.c -356 -WString -4 -COBJ -357 -WVList -0 -358 -WVList -0 -49 -1 -1 -0 -359 -MItem -11 -order_cmd.c -360 -WString -4 -COBJ -361 -WVList -0 -362 -WVList -0 -49 -1 -1 -0 -363 -MItem -11 -order_gui.c -364 -WString -4 -COBJ -365 -WVList -0 -366 -WVList -0 -49 -1 -1 -0 -367 -MItem -5 -os2.c -368 -WString -4 -COBJ -369 -WVList -0 -370 -WVList -0 -49 -1 -1 -0 -371 -MItem -10 -os_timer.c -372 -WString -4 -COBJ -373 -WVList -0 -374 -WVList -0 -49 -1 -1 -0 -375 -MItem -10 -pathfind.c -376 -WString -4 -COBJ -377 -WVList -0 -378 -WVList -0 -49 -1 -1 -0 -379 -MItem -12 -player_gui.c -380 -WString -4 -COBJ -381 -WVList -0 -382 -WVList -0 -49 -1 -1 -0 -383 -MItem -9 -players.c -384 -WString -4 -COBJ -385 -WVList -0 -386 -WVList -0 -49 -1 -1 -0 -387 -MItem -6 -oldpool.c -388 -WString -4 -COBJ -389 -WVList -0 -390 -WVList -0 -49 -1 -1 -0 -391 -MItem -7 -queue.c -392 -WString -4 -COBJ -393 -WVList -0 -394 -WVList -0 -49 -1 -1 -0 -395 -MItem -6 -rail.c -396 -WString -4 -COBJ -397 -WVList -0 -398 -WVList -0 -49 -1 -1 -0 -399 -MItem -10 -rail_cmd.c -400 -WString -4 -COBJ -401 -WVList -0 -402 -WVList -0 -49 -1 -1 -0 -403 -MItem -10 -rail_gui.c -404 -WString -4 -COBJ -405 -WVList -0 -406 -WVList -0 -49 -1 -1 -0 -407 -MItem -5 -rev.c -408 -WString -4 -COBJ -409 -WVList -0 -410 -WVList -1 -411 -ActionStates -412 -WString -5 -&Make -413 -WVList -0 -49 -1 -1 -0 -414 -MItem -10 -road_cmd.c -415 -WString -4 -COBJ -416 -WVList -0 -417 -WVList -0 -49 -1 -1 -0 -418 -MItem -10 -road_gui.c -419 -WString -4 -COBJ -420 -WVList -0 -421 -WVList -0 -49 -1 -1 -0 -422 -MItem -10 -road_map.c -423 -WString -4 -COBJ -424 -WVList -0 -425 -WVList -0 -49 -1 -1 -0 -426 -MItem -13 -roadveh_cmd.c -427 -WString -4 -COBJ -428 -WVList -0 -429 -WVList -0 -49 -1 -1 -0 -430 -MItem -13 -roadveh_gui.c -431 -WString -4 -COBJ -432 -WVList -0 -433 -WVList -0 -49 -1 -1 -0 -434 -MItem -10 -saveload.c -435 -WString -4 -COBJ -436 -WVList -0 -437 -WVList -0 -49 -1 -1 -0 -438 -MItem -12 -screenshot.c -439 -WString -4 -COBJ -440 -WVList -0 -441 -WVList -0 -49 -1 -1 -0 -442 -MItem -5 -sdl.c -443 -WString -4 -COBJ -444 -WVList -0 -445 -WVList -0 -49 -1 -1 -0 -446 -MItem -10 -settings.c -447 -WString -4 -COBJ -448 -WVList -0 -449 -WVList -0 -49 -1 -1 -0 -450 -MItem -14 -settings_gui.c -451 -WString -4 -COBJ -452 -WVList -0 -453 -WVList -0 -49 -1 -1 -0 -454 -MItem -10 -ship_cmd.c -455 -WString -4 -COBJ -456 -WVList -0 -457 -WVList -0 -49 -1 -1 -0 -458 -MItem -10 -ship_gui.c -459 -WString -4 -COBJ -460 -WVList -0 -461 -WVList -0 -49 -1 -1 -0 -462 -MItem -7 -signs.c -463 -WString -4 -COBJ -464 -WVList -0 -465 -WVList -0 -49 -1 -1 -0 -466 -MItem -14 -smallmap_gui.c -467 -WString -4 -COBJ -468 -WVList -0 -469 -WVList -0 -49 -1 -1 -0 -470 -MItem -7 -sound.c -471 -WString -4 -COBJ -472 -WVList -0 -473 -WVList -0 -49 -1 -1 -0 -474 -MItem -14 -sound\null_s.c -475 -WString -4 -COBJ -476 -WVList -0 -477 -WVList -0 -49 -1 -1 -0 -478 -MItem -13 -sound\sdl_s.c -479 -WString -4 -COBJ -480 -WVList -0 -481 -WVList -0 -49 -1 -1 -0 -482 -MItem -8 -sprite.c -483 -WString -4 -COBJ -484 -WVList -0 -485 -WVList -0 -49 -1 -1 -0 -486 -MItem -13 -spritecache.c -487 -WString -4 -COBJ -488 -WVList -0 -489 -WVList -0 -49 -1 -1 -0 -490 -MItem -13 -station_cmd.c -491 -WString -4 -COBJ -492 -WVList -0 -493 -WVList -0 -49 -1 -1 -0 -494 -MItem -13 -station_gui.c -495 -WString -4 -COBJ -496 -WVList -0 -497 -WVList -0 -49 -1 -1 -0 -498 -MItem -13 -station_map.c -499 -WString -4 -COBJ -500 -WVList -0 -501 -WVList -0 -49 -1 -1 -0 -502 -MItem -8 -StdAfx.c -503 -WString -4 -COBJ -504 -WVList -0 -505 -WVList -0 -49 -1 -1 -0 -506 -MItem -8 -string.c -507 -WString -4 -COBJ -508 -WVList -0 -509 -WVList -0 -49 -1 -1 -0 -510 -MItem -9 -strings.c -511 -WString -4 -COBJ -512 -WVList -0 -513 -WVList -0 -49 -1 -1 -0 -514 -MItem -13 -subsidy_gui.c -515 -WString -4 -COBJ -516 -WVList -0 -517 -WVList -0 -49 -1 -1 -0 -518 -MItem -15 -terraform_gui.c -519 -WString -4 -COBJ -520 -WVList -0 -521 -WVList -0 -49 -1 -1 -0 -522 -MItem -9 -texteff.c -523 -WString -4 -COBJ -524 -WVList -0 -525 -WVList -0 -49 -1 -1 -0 -526 -MItem -8 -thread.c -527 -WString -4 -COBJ -528 -WVList -0 -529 -WVList -0 -49 -1 -1 -0 -530 -MItem -6 -tile.c -531 -WString -4 -COBJ -532 -WVList -0 -533 -WVList -0 -49 -1 -1 -0 -534 -MItem -10 -town_cmd.c -535 -WString -4 -COBJ -536 -WVList -0 -537 -WVList -0 -49 -1 -1 -0 -538 -MItem -10 -town_gui.c -539 -WString -4 -COBJ -540 -WVList -0 -541 -WVList -0 -49 -1 -1 -0 -542 -MItem -11 -train_cmd.c -543 -WString -4 -COBJ -544 -WVList -0 -545 -WVList -0 -49 -1 -1 -0 -546 -MItem -11 -train_gui.c -547 -WString -4 -COBJ -548 -WVList -0 -549 -WVList -0 -49 -1 -1 -0 -550 -MItem -10 -tree_cmd.c -551 -WString -4 -COBJ -552 -WVList -0 -553 -WVList -0 -49 -1 -1 -0 -554 -MItem -12 -tunnel_map.c -555 -WString -4 -COBJ -556 -WVList -0 -557 -WVList -0 -49 -1 -1 -0 -558 -MItem -18 -tunnelbridge_cmd.c -559 -WString -4 -COBJ -560 -WVList -0 -561 -WVList -0 -49 -1 -1 -0 -562 -MItem -15 -unmovable_cmd.c -563 -WString -4 -COBJ -564 -WVList -0 -565 -WVList -0 -49 -1 -1 -0 -566 -MItem -9 -vehicle.c -567 -WString -4 -COBJ -568 -WVList -0 -569 -WVList -0 -49 -1 -1 -0 -570 -MItem -13 -vehicle_gui.c -571 -WString -4 -COBJ -572 -WVList -0 -573 -WVList -0 -49 -1 -1 -0 -574 -MItem -19 -video\dedicated_v.c -575 -WString -4 -COBJ -576 -WVList -0 -577 -WVList -0 -49 -1 -1 -0 -578 -MItem -14 -video\null_v.c -579 -WString -4 -COBJ -580 -WVList -0 -581 -WVList -0 -49 -1 -1 -0 -582 -MItem -13 -video\sdl_v.c -583 -WString -4 -COBJ -584 -WVList -0 -585 -WVList -0 -49 -1 -1 -0 -586 -MItem -10 -viewport.c -587 -WString -4 -COBJ -588 -WVList -0 -589 -WVList -0 -49 -1 -1 -0 -590 -MItem -11 -water_cmd.c -591 -WString -4 -COBJ -592 -WVList -0 -593 -WVList -0 -49 -1 -1 -0 -594 -MItem -10 -waypoint.c -595 -WString -4 -COBJ -596 -WVList -0 -597 -WVList -0 -49 -1 -1 -0 -598 -MItem -8 -widget.c -599 -WString -4 -COBJ -600 -WVList -0 -601 -WVList -0 -49 -1 -1 -0 -602 -MItem -8 -window.c -603 -WString -4 -COBJ -604 -WVList -0 -605 -WVList -0 -49 -1 -1 -0 diff --git a/projects/openttd.vcproj b/projects/openttd.vcproj deleted file mode 100644 index 45d91cc32..000000000 --- a/projects/openttd.vcproj +++ /dev/null @@ -1,1429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/openttd.vcproj.in b/projects/openttd.vcproj.in deleted file mode 100644 index afdac3331..000000000 --- a/projects/openttd.vcproj.in +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -!!FILES!! - - - - - - - - - - diff --git a/projects/strgen.vcproj b/projects/strgen.vcproj deleted file mode 100644 index ec0407af0..000000000 --- a/projects/strgen.vcproj +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debug.cpp b/src/debug.cpp index d6104f9b0..aefa0a64b 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -59,50 +59,34 @@ struct DebugLevel { #if !defined(NO_DEBUG_MESSAGES) -/** Functionized DEBUG macro for compilers that don't support - * variadic macros (__VA_ARGS__) such as...yes MSVC2003 and lower */ -#if defined(NO_VARARG_MACRO) -void CDECL DEBUG(int name, int level, ...) -{ - va_list va; - const char *dbg; - const DebugLevel *dl = &debug_level[name]; - - if (level != 0 && *dl->level < level) return; - dbg = dl->name; - va_start(va, level); -#else void CDECL debug(const char *dbg, ...) { va_list va; va_start(va, dbg); -#endif /* NO_VARARG_MACRO */ - { - const char *s; - char buf[1024]; + const char *s; + char buf[1024]; - s = va_arg(va, const char*); - vsnprintf(buf, lengthof(buf), s, va); - va_end(va); + s = va_arg(va, const char*); + vsnprintf(buf, lengthof(buf), s, va); + va_end(va); #if defined(ENABLE_NETWORK) - if (_debug_socket != INVALID_SOCKET) { - char buf2[lengthof(buf) + 32]; + if (_debug_socket != INVALID_SOCKET) { + char buf2[lengthof(buf) + 32]; - snprintf(buf2, lengthof(buf2), "dbg: [%s] %s\n", dbg, buf); - send(_debug_socket, buf2, strlen(buf2), 0); - } else + snprintf(buf2, lengthof(buf2), "dbg: [%s] %s\n", dbg, buf); + send(_debug_socket, buf2, strlen(buf2), 0); + } else #endif /* ENABLE_NETWORK */ - { + { #if defined(WINCE) - /* We need to do OTTD2FS twice, but as it uses a static buffer, we need to store one temporary */ - TCHAR tbuf[512]; - _sntprintf(tbuf, sizeof(tbuf), _T("%s"), OTTD2FS(dbg)); - NKDbgPrintfW(_T("dbg: [%s] %s\n"), tbuf, OTTD2FS(buf)); + /* We need to do OTTD2FS twice, but as it uses a static buffer, we need to store one temporary */ + TCHAR tbuf[512]; + _sntprintf(tbuf, sizeof(tbuf), _T("%s"), OTTD2FS(dbg)); + NKDbgPrintfW(_T("dbg: [%s] %s\n"), tbuf, OTTD2FS(buf)); #else - fprintf(stderr, "dbg: [%s] %s\n", dbg, buf); + fprintf(stderr, "dbg: [%s] %s\n", dbg, buf); #endif - IConsoleDebug(dbg, buf); - } + IConsoleDebug(dbg, buf); } } #endif /* NO_DEBUG_MESSAGES */ diff --git a/src/debug.h b/src/debug.h index 4432a5666..5df7bfae8 100644 --- a/src/debug.h +++ b/src/debug.h @@ -19,44 +19,14 @@ * 6.. - extremely detailed spamming */ -/* Of course MSVC 2003 and lower has no support for variadic macros - * so we need to work around this... *sigh* */ -#if defined(_MSC_VER) && (_MSC_VER < 1400) - #define NO_VARARG_MACRO -#endif - -#if defined(NO_VARARG_MACRO) - enum DebugLevelType { - ai, - driver, - grf, - map, - misc, - ms, - net, - sprite, - oldloader, - ntp, - npf, - yapf, - freetype, - sl, - station, - }; -#endif /* NO_VARARG_MACRO */ - #ifdef NO_DEBUG_MESSAGES - #if defined(NO_VARARG_MACRO) - static inline void DEBUG(int name, int level, ...) {} - #elif defined(__GNUC__) && (__GNUC__ < 3) + #if defined(__GNUC__) && (__GNUC__ < 3) #define DEBUG(name, level, args...) #else #define DEBUG(name, level, ...) #endif #else /* NO_DEBUG_MESSAGES */ - #if defined(NO_VARARG_MACRO) - void CDECL DEBUG(int name, int level, ...); - #elif defined(__GNUC__) && (__GNUC__ < 3) + #if defined(__GNUC__) && (__GNUC__ < 3) #define DEBUG(name, level, args...) if ((level == 0) || ( _debug_ ## name ## _level >= level)) debug(#name, args) #else #define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__) @@ -78,9 +48,7 @@ extern int _debug_sl_level; extern int _debug_station_level; - #if !defined(NO_VARARG_MACRO) - void CDECL debug(const char *dbg, ...); - #endif /* NO_VARARG_MACRO */ + void CDECL debug(const char *dbg, ...); #endif /* NO_DEBUG_MESSAGES */ void SetDebugString(const char *s); diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 3c69e19d5..45c31a1c6 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -43,7 +43,7 @@ enum { }; /* Apparently these don't play well with enums. */ -static const OverflowSafeInt64 INVALID_DATAPOINT = INT64_MAX; // Value used for a datapoint that shouldn't be drawn. +static const OverflowSafeInt64 INVALID_DATAPOINT(INT64_MAX); // Value used for a datapoint that shouldn't be drawn. static const uint INVALID_DATAPOINT_POS = UINT_MAX; // Used to determine if the previous point was drawn. struct GraphDrawer { diff --git a/src/stdafx.h b/src/stdafx.h index 6ce5a0066..0e9a6d3c6 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -156,19 +156,17 @@ #pragma warning(disable: 4761) // integral size mismatch in argument : conversion supplied #pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union - #if (_MSC_VER >= 1400) // MSVC 2005 safety checks - #pragma warning(disable: 4996) // 'strdup' was declared deprecated - #define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions - #pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked - #pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001 - #pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant - #pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile' - #pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead - #pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ... - #else /* _MSC_VER >= 1400 ( <1400 for MSVC2003) */ - #pragma warning(disable: 4288) // nonstandard extension used : 'y' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope - #pragma warning(disable: 4292) // compiler limit : terminating debug information emission for enum 'StringIdEnum' with member 'STR_801D_COAL_CAR' - #endif /* _MSC_VER >= 1400 */ + #if (_MSC_VER < 1400) // MSVC 2005 safety checks + #error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not!. Upgrade your compiler." + #endif /* (_MSC_VER < 1400) */ + #pragma warning(disable: 4996) // 'strdup' was declared deprecated + #define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions + #pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked + #pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001 + #pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant + #pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile' + #pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead + #pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ... #include // alloca() #define NORETURN __declspec(noreturn) -- cgit v1.2.3-70-g09d2