Commit Graph

3117 Commits

Author SHA1 Message Date
Darkvater
f83f192309 (svn r3720) - [2/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This second part gets rid of the old SettingDesc structures and updates them with the unified types. These new settings are heavily macro'd, which should make it easy to add/edit entries within sections.
- This unified structure merges the settings in settings.c (concerned with the ini file) and the ones in setting_gui., having to do with the GUI. I tried to give sensible min and maximum values to _patches that were not present in the GUI I hope they work out all right.
- All patch settings miss their callback function which have been temporarily reset to NULL
- Fixed a really small typo in a Doxygen comment in settings.h
- NOTE! When for example _patches are saved to the savegame (as are _gameopt_settings now), you cannot just blindly edit the struct. The same rules apply as to all the other SaveLoad structs. Eg correct CONDVAR's and only adding new entries at the end.
- NOTE! The game is not compilable after this commit.
2006-03-02 00:07:41 +00:00
Darkvater
1e247cab21 (svn r3719) - [1/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This first part rewrites the configuration section to use the SaveLoad VarType in general.
- This unified structure consists of a SaveLoad type which stores all data relevant about the variable internals such as type, mem/filesize, address, version-control. The SettingDesc type is concerned more about the representation. Things like default value, string-name, minimum/maximum values, gui-behaviour etc.
- The SaveLoad type has received a few flags controlling saving/loading. These are:
  SLF_SAVE_NO: the setting is not saved with the savegame, effectively making this setting player-based. Eg. it will NOT be overwritten when joining a network-game
  SLF_CONFIG_NO: the setting is not saved to the configuration file so you cannot overwrite it ingame.
  SLF_NETWORK_NO: the setting is not synchronised with the local settings when the game is loaded during network-play. Note that when SLF_SAVE_NO is set, SLF_NETWORK_NO is also set (which is logical), at least if the proper macros are used (in [2/4]).
- NOTE! The game is not compilable after this commit.
2006-03-01 23:53:20 +00:00
Darkvater
a98e66c2c0 (svn r3718) - Add proper Doxygen comments to some saveload-structs (using ///<) 2006-03-01 23:39:21 +00:00
peter1138
741fc26522 (svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour. 2006-03-01 23:14:03 +00:00
Darkvater
4367870b18 (svn r3716) - Move the option settings (_game_opt_desc) from misc.c into settings.c. This will be merged with SettingDesc misc_settings above as they are actually the same. No functionality has changed beside the fact that the settings are now in a different Chunkhandler. 2006-03-01 21:15:25 +00:00
tron
819d210acc (svn r3714) Add functions to turn tiles into water and shore tiles 2006-03-01 21:00:44 +00:00
Darkvater
e7e8466fb6 (svn r3713) - Fix up the cheats window a little. The cheats code is still abominable, but at least a bit more readable now.
Use the now generalized ReadValue/WriteValue functions as well as using general variable-types (SLE_VAR, instead of custom CE_ ones).
  Remove the CE_CLICK type and use a SLE_BOOL type instead with a flag of CE_CLICK.
  Remove stepsize from the struct. The stepsize is automatically calculated from the minimum and maximum values (in 20 steps).
2006-03-01 20:49:47 +00:00
Darkvater
6e9211fc5a (svn r3712) - Change the boolean assignment/reading from == 1 to != 0 as suggested by Tron. 2006-03-01 20:38:39 +00:00
Darkvater
01c371fe0e (svn r3711) - Extract the WriteValue() and ReadValue() parts of the saveload code to assign/read to/from a variable. Preparatory work to make this the general function type for such assignments 2006-03-01 20:34:51 +00:00
Darkvater
61b43672e9 (svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag. 2006-03-01 20:24:22 +00:00
bjarni
7a31bb6fb6 (svn r3707) -Fix: made the generated Finnish town names sound more Finnish (ln-)
note: <ln->     Bjarni: please go ahead and commit it, i'll take the responsibility if something should go wrong.
2006-03-01 19:20:35 +00:00
peter1138
24217d5c8d (svn r3701) [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions 2006-03-01 17:35:01 +00:00
tron
2e684c3537 (svn r3699) Replace some magic numbers for checking for a suitable slope for a level crossing by some less magic numbers 2006-03-01 15:03:47 +00:00
tron
3fc68907e3 (svn r3698) Add GetCrossingRailBits() and ComplementRoadBits(). Simplify the code by using them 2006-03-01 12:31:39 +00:00
tron
793613a286 (svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes 2006-03-01 09:40:34 +00:00
tron
b404072ccc (svn r3696) Add functions to turn a tile into a normal rail tile/depot/waypoint. This is just a tiny step, the rail code needs way more love and caring 2006-03-01 08:56:38 +00:00
tron
6c1576143b (svn r3695) Add 2 MarkTileByTile() which I forgot in r3689 (noticed by Belugas) 2006-03-01 06:39:04 +00:00
tron
0d044cabca (svn r3689) Add functions to turn a tile into either a normal road tile, a level crossing or a road depot 2006-02-28 21:19:50 +00:00
tron
530a44436c (svn r3687) Complete some bits I missed whenn adding accessor functions for road types and pieces 2006-02-28 13:18:14 +00:00
tron
03212c6488 (svn r3686) Dispel some strange magic regarding level crossings and foundations:
if a level crossing is on a sloped tile, it has to be on a level foundation
2006-02-28 11:49:12 +00:00
peter1138
5e05cd4098 (svn r3685) Include a file missed from r3684... 2006-02-28 08:16:00 +00:00
peter1138
56c3f42397 (svn r3684) - NewGRF: Support loading of miscellaneous flags (not used yet) 2006-02-28 08:13:15 +00:00
tron
673ce4e3e0 (svn r3683) Get rid of another FindLandscapeHeight() 2006-02-28 06:14:42 +00:00
bjarni
a21d7523d2 (svn r3682) -Fix: didn't write $ correct in G5_detector in r3673, which caused problems for tortoisesvn 2006-02-27 19:49:53 +00:00
peter1138
23b13d3f42 (svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType(). 2006-02-27 19:43:19 +00:00
tron
263741bf9b (svn r3680) Fix some magic numbers which got damaged in r1768
-Fix: Correctly restore the roadside after roadworks are finished
2006-02-27 17:24:31 +00:00
bjarni
3f60ef07b2 (svn r3679) -Fix: [OSX] fixed warning introduced in r3670 about permission denied in G5_detector.c when compiling without having Makefile.config 2006-02-27 16:58:26 +00:00
peter1138
d6cb4c82da (svn r3678) - NewGRF Codechange: remove redundant braces and temporary variables. 2006-02-27 15:35:22 +00:00
tron
13041aa545 (svn r3677) Remove the FindLandscapeHeightByTile()s from the default AI.
The corresponding TileInfos look like global variables at the first glance, but always get written to before reading in each function they are used in.
2006-02-27 08:08:10 +00:00
bjarni
5412b2db93 (svn r3676) -Change: [OSX] changed info about package to how to install the game
the package is long gone and people don't read a doc about a missing package when they don't expect to find one
	the doc is called install even though it's not a real install and have nothing to do with make install. People just read it the first time they see it when it's called install ;)
2006-02-26 19:02:09 +00:00
bjarni
3e2f13f8d1 (svn r3675) -Fix: [OSX] made the default gcc names for building universal binaries into the newest gcc for each target instead of hardcoding it for 4.0.0 2006-02-25 22:03:30 +00:00
bjarni
d09e66eef6 (svn r3674) -Feature: [OSX] Added support for tripple binaries (binaries optimised for G3, G5 and i686)
G4 have no problems using G3 code while G5 can, but really benefit from getting their own optimised code (Apple: G5 is not just a fast G4)
	Also changed FAT_BINARY to UNIVERSAL_BINARY since Apple removed most (all?) references to fat binaries on their homepage two days after I added FAT_BINARY
2006-02-25 21:25:23 +00:00
bjarni
4ff6b2a514 (svn r3673) -Codechange: [OSX] changed the makefile to autodetect if it compiles on G5 and then adds flags to optimise for G5
This will not interfere with crosscompiling or universal binaries
2006-02-25 18:11:11 +00:00
bjarni
51ece8d99a (svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed 2006-02-25 16:57:17 +00:00
bjarni
67fde581ab (svn r3671) -Code cleanup: fixed style and removed commented out code in video/cocoa_v.m 2006-02-24 22:12:11 +00:00
bjarni
181853aff9 (svn r3670) -Codechange: [OSX] rewrote a part of the cocoa video driver to speed it up by 1000% in fullscreen
rewrote QZ_DrawScreen to only redraw dirty rectangles (instead of everything)
	This reduce the OpenTTD time spent on this function from 75% to 6,7% (in main menu)
	Note: window mode is unaffected by this commit
	Note: the mouse pointer can now leave artefacts in debug mode
2006-02-24 22:05:20 +00:00
tron
494fd4ed34 (svn r3669) Really wipe all data when making a void tile
Thanks to Belugas, egladil and Rubidium for their inspiration and hard work, which all this stuff is based on
2006-02-24 20:52:32 +00:00
tron
00a16eedcc (svn r3668) Add a function to turn a tile into a tree tile 2006-02-24 20:38:08 +00:00
tron
8d983f1bb7 (svn r3667) Fix the cause of an assertion I triggered in r3665 2006-02-24 20:35:37 +00:00
peter1138
d1076fe973 (svn r3666) Fix up svn properties and add header files to Windows project files. 2006-02-24 20:09:50 +00:00
tron
f6d48379d8 (svn r3665) Add a function to turn a tile into a clear tile 2006-02-24 19:56:24 +00:00
tron
f369dcef51 (svn r3664) Add a function to turn a tile into a void tile 2006-02-24 19:52:26 +00:00
peter1138
af5a1d49c0 (svn r3663) - Fix: [Multistop] Check the status of the destination road stop instead of a station's first road stop. This only has effect with road vehicle queuing disabled. 2006-02-24 17:52:07 +00:00
Darkvater
2912d0e67b (svn r3662) Fix regression FS#58 with union, endiannes and static decleration problems. Removed the union. 2006-02-23 20:53:30 +00:00
bjarni
1c7df50f6c (svn r3661) -Fix [PPC computers] quick dirty fix for failure to start the game on BE CPUs
3626 broke the game on Big endian CPUs and this is a quick dirty fix
	so the nightly builds for OSX and MorphOS will work again
	the game will still fail on 64 bit BE CPUs
	note: the game runs in 32 bit mode on G5, so it will work on G5
	we need to make a better fix for this, but we also need the nightly builds to work
2006-02-23 18:52:13 +00:00
tron
6a74cb2787 (svn r3660) Convert further road bits and type references to the functions/enums 2006-02-23 12:24:19 +00:00
tron
c3c0afb902 (svn r3659) Add function to get the road bits of a level crossing 2006-02-23 11:53:48 +00:00
tron
df156dacb2 (svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces 2006-02-23 08:20:28 +00:00
tron
b79872366d (svn r3657) Fix indentation and remove now unused variable, which i forgot in r3655 2006-02-23 07:32:46 +00:00
tron
6f719ec50a (svn r3656) Simplify the overly complicated check for road pieces under a bridge 2006-02-23 07:31:36 +00:00