summaryrefslogtreecommitdiff
path: root/functions.h
AgeCommit message (Collapse)Author
2006-11-16(svn r7182) -Feature: Merge utf8 branch. This brings us support for ↵peter1138
Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
2006-10-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-16(svn r6788) - Codechange: Add and use a function to test if a string ID is a ↵peter1138
custom name.
2006-10-14(svn r6775) -Codechange: Use some more proper types, especially Owner and ↵Darkvater
PlayerID as these are used intermixed often.
2006-10-12(svn r6757) -Fix (r6754): Remove double function declerations from ↵Darkvater
functions.h..Gaah local copy mess....
2006-10-12(svn r6753) -Codechange: Move some function declerations from functions.h ↵Darkvater
into network.h and let NetworkDisconnect handle all shutdown related operations.
2006-10-12(svn r6752) -Codechange: Move command functions from messy functions.h into ↵Darkvater
command.h
2006-10-07(svn r6680) -Codechange r6679: [train build window] only generate the list ↵bjarni
when the window data is invalidated or the window is generated, not on each redraw
2006-09-04(svn r6380) -Codechange: unify all ways to quit OTTD.rubidium
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.
2006-09-01(svn r6297) -Codechange: Disentangle the query window mess a bit: Move the ↵tron
network game password handling somewhere were it belongs to
2006-08-28(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and ↵rubidium
'/*' or '*/' in '//' style comments.
2006-08-19(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:truelight
- 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
2006-08-14(svn r5887) -Cleanup: move date related functions, defines and variables to ↵rubidium
date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-07(svn r5806) Inline FindLandscapeHeight() into its only remaining caller and ↵tron
remove the attribute "type" from struct TileInfo
2006-08-05(svn r5764) - Cleanup: - Cleanup: Move the now unified FiosAlloc, ↵Darkvater
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
2006-08-03(svn r5723) - Move the declaration of DrawRoadDepotSprite() out of ↵tron
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
2006-06-10(svn r5210) Many small changes which piled up: const, unsigned, variable ↵tron
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-05-09(svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to ↵tron
EnsureNoVehicleOnGround() to make more clear what it does
2006-04-23(svn r4541) Add a type for slopes and replace many magic numbers by the ↵tron
appropriate enums
2006-04-02(svn r4231) Remove ModifyTile(), it's not used anymore, yay!tron
2006-03-26(svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or ↵Darkvater
something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later.
2006-03-25(svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As ↵Darkvater
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.
2006-03-22(svn r4028) The last external user of FindLandscapeHeightByTile() is gone ↵tron
(r4027). Move its implementation into its only caller - FindLandscapeHeight() - and remove it
2006-03-07(svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its ↵tron
result and give it a less ambiguous name (IsTunnelInWay)
2006-03-06(svn r3773) Shove some semantics down ottd's throat by replacing ints and ↵tron
magic numbers by enums and some related changes
2006-03-03(svn r3748) Remove bubblesort(), it's unusedtron
2006-03-02(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.Darkvater
- 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
2006-01-05(svn r3365) Staticise 36 functionstron
2006-01-05(svn r3364) Remove 3 unused functions (ScrollWindowToTile, ↵tron
AllocateWindowAutoPlace, AllocateWindowAutoPlace2)
2005-12-25(svn r3342) Remove some crufttron
2005-12-24(svn r3336) byte -> WindowClass, uint16 -> WindowNumbertron
2005-11-14(svn r3181) -Bracingtron
-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-10-16(svn r3049) Replace byte/int/uint by RailType where appropriatetron
2005-10-02(svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)Darkvater
Fix warning in graph_gui.c with const problem
2005-09-30(svn r3001) s/Player*/const Player*/tron
s/byte/PlayerID/ s/int/PlayerID/ and related changes
2005-09-29(svn r2997) -Codechange: Split road drawing code off from DrawTile_Road into ↵peter1138
a separate function to be used elsewhere.
2005-09-18(svn r2962) - const correctness for all Get* functions and most Draw* ↵Darkvater
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-02(svn r2906) Fix some threaded saving problems. Now the thread only ↵Darkvater
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.
2005-08-07(svn r2830) Move CheckSwitchToEuro() to currency.[ch] and hide the truth ↵tron
about the custom currency behind a #define
2005-08-05(svn r2809) Implement more generic threading functions, which allow more ↵tron
than one thread
2005-08-05(svn r2807) Fix two major bugs in the threaded save code:tron
- 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
2005-08-01(svn r2781) Fix some of the issues with variables in .h files.ludde
2005-07-29(svn r2754) Move str_fmt into string.[ch]tron
2005-07-28(svn r2738) Small bit fiddling cleanuptron
2005-07-27(svn r2728) -Fix/Feature: Change the driver probing algorithmtron
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.
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2672) Move saving/loading related declarations to saveload.htron
2005-07-19(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* ↵ludde
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-17(svn r2601) Fix: Added TIC,TOC macros do be able to do profiling easier.ludde
2005-07-16(svn r2588) Codechange: Remove PLAYER_SEED_RANDOMludde