Commit Graph

113 Commits (71642d464bdd28ffc07eca9293043fa45f0fa659)

Author SHA1 Message Date
peter1138 f660d48e6a (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come. 18 years ago
Darkvater 494c56475f (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
18 years ago
peter1138 aa42711a59 (svn r6788) - Codechange: Add and use a function to test if a string ID is a custom name. 18 years ago
Darkvater 2380bb56cd (svn r6775) -Codechange: Use some more proper types, especially Owner and PlayerID as
these are used intermixed often.
18 years ago
Darkvater 36ca1d9c87 (svn r6757) -Fix (r6754): Remove double function declerations from functions.h..Gaah
local copy mess....
18 years ago
Darkvater b38ef09afc (svn r6753) -Codechange: Move some function declerations from functions.h into network.h
and let NetworkDisconnect handle all shutdown related operations.
18 years ago
Darkvater 02d291232e (svn r6752) -Codechange: Move command functions from messy functions.h into command.h 18 years ago
bjarni bc1070654a (svn r6680) -Codechange r6679: [train build window] only generate the list when the window data is invalidated or the window is generated, not on each redraw 18 years ago
rubidium ca9ec81fd1 (svn r6380) -Codechange: unify all ways to quit OTTD.
This means that in the intro menu the 'Quit' button immediatelly quits
  and the 'Quit' in the menu of the normal game and scenario editor
  immediatelly quits when the 'autosave_on_exit' patch is turned on.
  This is the same way as the OS/window manager initiated quits, like
  alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
18 years ago
tron 0d6fa61e9f (svn r6297) -Codechange: Disentangle the query window mess a bit: Move the network game password handling somewhere were it belongs to 18 years ago
rubidium 0ce4de99dc (svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments. 18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
tron 82ccd01914 (svn r5806) Inline FindLandscapeHeight() into its only remaining caller and remove the attribute "type" from struct TileInfo 18 years ago
Darkvater 48ea9fde32 (svn r5764) - Cleanup: - Cleanup: Move the now unified FiosAlloc, compare_FiosItems, FiosFreeSavegameList, FiosMakeSavegameName, FiosDelete and FileExists to newly created file fios.c where it belongs.
- Fix: forgot to remove GetLanguageList from functions.h in previous commit
18 years ago
tron ed26c5e14c (svn r5723) - Move the declaration of DrawRoadDepotSprite() out of functions.h (but I'm not too happy with the new header)
- Use DiagDirection instead of plain int for the orientation of the depot graphics
- Rename the associated data tables with sprites to something more meaningful
18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
tron 1be0d9926e (svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to EnsureNoVehicleOnGround() to make more clear what it does 18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
tron dd688cecdd (svn r4231) Remove ModifyTile(), it's not used anymore, yay! 19 years ago
Darkvater c9bf9b7553 (svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later. 19 years ago
Darkvater e3685faad0 (svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
19 years ago
tron c712f65e4f (svn r4028) The last external user of FindLandscapeHeightByTile() is gone (r4027).
Move its implementation into its only caller - FindLandscapeHeight() - and remove it
19 years ago
tron 3027b8673e (svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its result and give it a less ambiguous name (IsTunnelInWay) 19 years ago
tron 03254940a4 (svn r3773) Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes 19 years ago
tron 9261a179c9 (svn r3748) Remove bubblesort(), it's unused 19 years ago
Darkvater 40405368d5 (svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed
- The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences.
- The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions.
- The savegame version has been increased to 22.
- The last 6 orso patches close the following reports:
  [ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console.
  [ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values.
  [ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer.
  [ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron e588f86bb3 (svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2) 19 years ago
tron 05ed2a8d8c (svn r3342) Remove some cruft 19 years ago
tron 849fff602d (svn r3336) byte -> WindowClass, uint16 -> WindowNumber 19 years ago
tron 9d0e7b6458 (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
19 years ago
tron e3d1e43559 (svn r3049) Replace byte/int/uint by RailType where appropriate 19 years ago
Darkvater e1acd38bc5 (svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)
Fix warning in graph_gui.c with const problem
19 years ago
tron 980808dac2 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
19 years ago
peter1138 d11e5bf7fb (svn r2997) -Codechange: Split road drawing code off from DrawTile_Road into a separate function to be used elsewhere. 19 years ago
Darkvater 4a58250cb9 (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
19 years ago
Darkvater a948fcb605 (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop. 19 years ago
tron 3f162fc49a (svn r2830) Move CheckSwitchToEuro() to currency.[ch] and hide the truth about the custom currency behind a #define 19 years ago
tron f315c95fa1 (svn r2809) Implement more generic threading functions, which allow more than one thread 19 years ago
tron 484fae74a2 (svn r2807) Fix two major bugs in the threaded save code:
- Do not dereference a local variable which no longer exists; this lead to random crashes when saving
- (Win32) Do not close a handle before it is used last
There are still many major problems (race conditions and resulting memory corruption/crashes) left
19 years ago
ludde 9a060a0f24 (svn r2781) Fix some of the issues with variables in .h files. 19 years ago
tron e91cb150a4 (svn r2754) Move str_fmt into string.[ch] 19 years ago
tron 0e64dc50b6 (svn r2738) Small bit fiddling cleanup 19 years ago
tron 5fd69294ee (svn r2728) -Fix/Feature: Change the driver probing algorithm
Instead of trying to start a single driver and bailing out if that fails, try to initialise one by one and use the first one which succeeds.
This should fix problems on machines with no sound card, where -s null had to be specified manually.
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron a4ec4da221 (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago
ludde 08725cd6df (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.
19 years ago
ludde 9f4e400b86 (svn r2601) Fix: Added TIC,TOC macros do be able to do profiling easier. 19 years ago
ludde 04e45dac34 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM 19 years ago