Age | Commit message (Collapse) | Author |
|
michi_cc :) )
-Cleanup: Removed UNITTEST preprocessor checks
|
|
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)
|
|
strnicmp (michi_cc)
|
|
functions into fios.c, as well as FiosGetSavegameList and FiosGetScenarioList functions with the help of some callbacks.
|
|
instead of function.
|
|
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
|
|
support and users for testing.
|
|
other way around.
|
|
Doesn't fix any known bug, but the code is now bit cleaner. The proper result of subtraction of two pointers is ptrdiff_t.
|
|
|
|
|
|
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
|
|
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.
|
|
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
|
|
tests showed that forcing aligned reads slowed down the code (drawing smallmap) by 14%. Change back to the old behaviour.
|
|
|
|
as default, undefine it if unwanted/unneeded for some reason. I undeffed windows and watcom for now as they were like this.
|
|
alignment issues (thanks Tron for the help)
|
|
others don't, so this needs more research
|
|
|
|
when using MSVC
|
|
to prevent it from running OpenTTD, so now it's not supported anymore
|
|
crosscompiles to fix crash
|
|
again has some issues with enums, and other things as usual, so silence those still.
|
|
|
|
-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
|
|
MinGW. Also beautify stdafx.h with nice indentation and comments after big #ifdef blocks. Hope it didn't break compilation on any OS's.
|
|
|
|
Fix warning in graph_gui.c with const problem
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
- it appeared to cause problems and strgen don't need a GUI
- renamed ottd to openttd in the app menu (Tobin)
|
|
|
|
|
|
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.
|
|
signed/unsigned warnings
|
|
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.
|
|
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.
|
|
|
|
cross-compiling
on i386-linux for MacOSX should also work for the language-files (strgen issues)
|
|
introduce stre{cpy,cat}, see string.h for their semantics
|
|
reenabled again
-Fix: added missing CDECL to ellipsis functions and changed VS6 project file to use _cdecl calling conventions (thx tamlin)
|
|
|
|
orudge).
|
|
-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
|
|
Works fine, beside some minor stuff:
- Network is not working yet
- Keyboard is not working
- No MIDI support
- 'A few file selector bugs involving drives'
|
|
MorphOS: cleaned up the code telling the difference between AmigaOS and MorphOS (tokai)
|
|
get a port, since MorphOS also have the flag __AMIGA__ defined (Tokai)
|
|
|
|
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
|
|
|