Commit Graph

63 Commits

Author SHA1 Message Date
rubidium 66bbf336c6 (svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make.
 - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
 - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
 - Proper support for OSX universal binaries.
 - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
 - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.

Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2007-01-02 19:19:48 +00:00
Darkvater 458eb02678 (svn r7548) -Codechange: Some MorphOS changes to get OpenTTD compiled, packaged (tokai) 2006-12-22 15:06:27 +00:00
Darkvater 4e71091137 (svn r7274) -Codechange [utf8]: Add input/output unicode support. This actually only changes win32
since it uses UTF16 for file access. To keep os-specific code to a minimum, OpenTTD
 uses UTF8 internally everywhere, converting to OS-type when needed (save/load/screenshot/etc.)
2006-11-28 14:42:31 +00:00
Darkvater 5471c1c50f (svn r7226) -Fix (r7200): [win32] Don't ask my why but I told the linker to ignore the multithreaded
library in for VS2005, resulting in unlinkable code for Release builds.
2006-11-21 13:03:06 +00:00
Darkvater c4d841dcdb (svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById
instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness
 in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c)
2006-11-18 00:14:43 +00:00
KUDr ecccf79c07 (svn r7146) -CodeChange: ST_CONST macro removed as it is no longer needed (Tron) 2006-11-14 12:02:36 +00:00
glx f70064e7aa (svn r6411) -Fix(r6410): forgot to update openttd*.sln (thx Darkvater and michi_cc :) )
-Cleanup: Removed UNITTEST preprocessor checks
2006-09-06 14:24:43 +00:00
truelight bd80b4fd19 (svn r6117) -Fix r6097: on mingw it is normal that both / as \ are accepted as input
-Fix r6096: detect for PATHSEP on WIN32 or WIN64, not UNIX
  (Windows compilers define either one, while other compilers don't define a thing)
2006-08-25 12:26:34 +00:00
truelight ff36e72422 (svn r5969) -Fix r5968: windows doesn't know strncasecmp, but called it strnicmp (michi_cc) 2006-08-20 11:18:46 +00:00
Darkvater 525a0ad4c0 (svn r5765) - Codechange: Fully unify the OS-specific FiosGet...List functions into fios.c, as well as FiosGetSavegameList and FiosGetScenarioList functions with the help of some callbacks. 2006-08-05 00:47:32 +00:00
Darkvater 9e69df03a7 (svn r5760) - Codechange: Use a define for case-string comparison in OS/2 instead of function. 2006-08-04 23:27:36 +00:00
tron 0a72639c2d (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
KUDr 5e73dce0e7 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 2006-05-27 16:12:16 +00:00
truelight 28ddc4e45f (svn r4522) -Fix: include stdio before stddef; some targets don't like the other way around. 2006-04-22 10:12:14 +00:00
KUDr 24ef4ce560 (svn r4470) -Fix: FS#97 — Possible bug in Win64 versions (by michi_cc)
Doesn't fix any known bug, but the code is now bit cleaner. The proper result of subtraction of two pointers is ptrdiff_t.
2006-04-18 18:02:52 +00:00
celestar 35a21d80fc (svn r4468) -Fix: (FS#45) correct declaration of NORETURN for gcc (egladil) 2006-04-18 13:55:11 +00:00
Darkvater a48a1807fe (svn r4003) - Minor codebeautifier@work 2006-03-21 23:18:43 +00:00
bjarni 235e72829e (svn r3596) -Codechange: [OSX] changed to use Apple's macros instead of OTTD macros for endian conversion
This increases the execution speed a lot since GCC can't detect the OTTD macro as an endian conversion
	while Apple's code uses the instruction to convert endian instead of a series of instructions to produce the same result

	Since we don't have that many endian conversions in the game, overall performance should not increase noteworthy
2006-02-12 14:31:33 +00:00
Darkvater 7f1cda519c (svn r3559) - CodeChange: simplify MKCOLOR(x) macro for smallmap_gui.c by adding a TO_LE32X() macro next to TO_BE32X(). The 'X' signifies them as macros and not-inline functions so they can be used in variable declarations. 2006-02-05 23:12:23 +00:00
bjarni a7273d95b8 (svn r3555) -Codechange: [Big Endian] removed defining OTTD_ALIGNMENT by default on Big Endian CPUs
this increased speed when reading unaligned data (like strings)
	test showed this to increase speed by 5,6% when drawing the mini map on PPC OSX

	the tradeoff is that now it will crash if a Big Endian computer don't support unaligned reading
	but it should easily fixable in stdafx.h if it turns out to be a problem
2006-02-05 14:18:28 +00:00
Darkvater 02c4e63fac (svn r3553) - Revert r3549 "Change the behaviour of OTTD_ALIGNMENT". Some tests showed that forcing aligned reads slowed down the code (drawing smallmap) by 14%. Change back to the old behaviour. 2006-02-05 11:10:31 +00:00
peter1138 cf414c1864 (svn r3551) Add directives to allow Visual Studio 2005 compilation. 2006-02-05 09:28:06 +00:00
Darkvater a9211aebf7 (svn r3549) - Change the behaviour of OTTD_ALIGNMENT. Force aligned reading as default, undefine it if unwanted/unneeded for some reason. I undeffed windows and watcom for now as they were like this. 2006-02-04 23:03:35 +00:00
Darkvater c5a669b39f (svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help) 2006-02-03 21:51:42 +00:00
Darkvater d16dea5859 (svn r3450) - Revert r3448 partly as some mingw's do have uint defined, others don't, so this needs more research 2006-01-27 09:45:44 +00:00
Darkvater a6756ccf21 (svn r3448) - Fix: wrap up some MinGW warnings 2006-01-26 22:09:25 +00:00
Darkvater c8a2c7ae94 (svn r3442) - Fix: Only windows has stricmp. So define strcasecmp to stricmp when using MSVC 2006-01-26 17:32:49 +00:00
bjarni 26a5e120e8 (svn r3276) reverted the last two commits. OSX 10.2 kept finding new stuff to prevent it from running OpenTTD, so now it's not supported anymore 2005-12-09 13:17:31 +00:00
bjarni 6cfdfcc4ba (svn r3275) -Fix: [OSX] removed libpng support and error dialogs from jaguar crosscompiles to fix crash 2005-12-09 13:07:21 +00:00
Darkvater 10ce514f59 (svn r3237) - CodeChange: remove silencing of some warnings. MSVC6 once again has some issues with enums, and other things as usual, so silence those still. 2005-11-26 13:23:16 +00:00
Darkvater 728aba9d7c (svn r3236) - Fix: warnings about 'CDECL must be used with ...' on VS6 2005-11-26 12:57:42 +00:00
tron f7abff5f96 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
Darkvater 01559c99b1 (svn r3011) Refix last revision's fix of VS6 which broke compilation on MinGW. Also beautify stdafx.h with nice indentation and comments after big #ifdef blocks. Hope it didn't break compilation on any OS's. 2005-10-03 22:16:30 +00:00
Darkvater b0a365ee67 (svn r3009) DIEEEEEEEEEEE VS6 (you good-for-nothing compiler) 2005-10-03 21:10:51 +00:00
Darkvater a3d40a29fc (svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)
Fix warning in graph_gui.c with const problem
2005-10-02 22:39:56 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
bjarni 30a5f299f8 (svn r2745) -Fix: [OSX] removed the assert window introduced in 2741 from strgen
- it appeared to cause problems and strgen don't need a GUI
  - renamed ottd to openttd in the app menu (Tobin)
2005-07-29 09:45:25 +00:00
bjarni a2a5593fcc (svn r2741) -Feature: [OSX] added a window to display asserts on OSX (Tobin) 2005-07-28 21:47:41 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
ludde 3e97dda275 (svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
- Benchmark shows that NTP is now around 10x faster than NPF.
  - Made IsTunnelTile macro to determine if a tile is a tunnel.
  - Added some useful debugging functions for making tiles red / getting accurate timestamps.
  - Remove old depot finding algorithm.
  - Disable warning for signed/unsigned comparisons.
2005-07-19 11:42:40 +00:00
Darkvater ff2662ebe7 (svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings 2005-07-17 18:11:17 +00:00
ludde 6013b327f7 (svn r2560) Fix: various minor code changes.
Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
2005-07-13 19:51:31 +00:00
Darkvater 55423efb06 (svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
2005-05-30 22:16:05 +00:00
Darkvater 6f06930ee3 (svn r2316) - Fix: [ 1154454 ] Fix BeOS build on Trunk (myob) 2005-05-14 23:48:39 +00:00
truelight facd3d1af1 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
on i386-linux for MacOSX should also work for the language-files (strgen issues)
2005-04-24 15:41:01 +00:00
tron b2ae5b197e (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 2005-02-06 13:41:02 +00:00
darkvater ef3b9161f8 (svn r1523) -Fix: somehow mousewheel was disabled on windows using SDL; reenabled again
-Fix: added missing CDECL to ellipsis functions and changed VS6 project file to use _cdecl calling conventions (thx tamlin)
2005-01-15 15:48:05 +00:00
tron 8b7c1e94e1 (svn r1402) Trim trailing whitespace 2005-01-06 18:45:28 +00:00
darkvater d317a93e0f (svn r1339) -Fix: compilation with networking works on MinGW32 again (thx orudge). 2005-01-03 14:33:59 +00:00
darkvater b249954538 (svn r1266) -Fix: fix some cygwin/mingw warnings
-Note: when compiling with MinGW (-mno-cygwin) __MINGW32__ is defined; when compiling without it __CYGWIN32__ is defined. You need to set either -mno-cygwin (MinGW) or -mwin32 (Cygwin) to have WIN32 defined
2004-12-23 22:31:46 +00:00