Commit Graph

181 Commits (f9f6b5f341b8b296e58fa33a719bfd1ede5ebd05)

Author SHA1 Message Date
peter1138 1ba264866a (svn r7357) -Codechange: new NewGRF set up window which allows modification of NewGRF settings. 18 years ago
peter1138 acac44820b (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros) 18 years ago
peter1138 180019aa40 (svn r7269) -Feature: Add freight trains patch option. This option is a multiplier for the weight of cargo on freight trains, to simulate longer heavier trains. The default value of 1 behaves as before. 18 years ago
Darkvater fc5ad19258 (svn r7231) -Codechange: rename ini_get_variable to GetVariableAddress for use both in settings.c
and saveload.c
18 years ago
KUDr ff7e46f378 (svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
(original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
18 years ago
KUDr af8ecdd8f3 (svn r7190) -Fix: If the non-player-based _patches setting was changed on the server during MP game, the callback function was:
1. Called only on the server but not on its clients.
 2. Was called before the setting change occurred (usually with no effect)
 3. Received old 'p1' argument value intead of new one
It could cause some MP desyncs in the future.
18 years ago
Darkvater 1b0e95539f (svn r7179) -Codechange (r7173): Actually "prefer" team chat through the patch setting instead of
always sending to teammate if the patch is on even if you do not have any allies. So
 with setting off you always send to 'all players', with setting on you send to teammates
 if you have any, otherwise to all players.
18 years ago
Darkvater da2d221337 (svn r7173) -Codechange (r6824): Allow the user to change the chat-destination when chatting with <ENTER> or 'T' instead of the game choosing one for you automatically. 18 years ago
peter1138 37294114c3 (svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval 18 years ago
tron 88b78bb5e8 (svn r7065) Use simple assignment instead of memcpy() 18 years ago
Darkvater 02a6df391d (svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
18 years ago
KUDr 13f8fa8ba9 (svn r6800) -Feature change: [train is lost] message is now generated immediately when pathfinder can't find the path. (thanks MeusH, peter1138 and Brianetta for ideas and help). 18 years ago
Darkvater f2fd789cc6 (svn r6758) -Feature: Add a measurement tool that will show dimensions and height
differences of various draggable tools (inspiration, concept and double
 checking by MeusH).
18 years ago
belugas 3319eb0b3f (svn r6639) -CodeChange : Conversion of SetWidgetLoweredState to SetWindowWidgetLoweredState, in order to follow pre-established standard 18 years ago
belugas 688da1d940 (svn r6631) -Codechange: Use accessors for click_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas cf210fdf6b (svn r6619) -Codechange: Use accessors for disabled_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas 98ba395277 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct 18 years ago
peter1138 c474ba5fd1 (svn r6474) - Add a patch option to control display of liveries, allowing none, your
own, or all companies.
18 years ago
glx 0abece8805 (svn r6387) Fix: removed OSX specific warning 18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
tron f4aea06f8b (svn r6273) Clean up the custom currency window handler a bit 18 years ago
tron dae76ce67e (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear
Also add the names of colour the gradients as enum
18 years ago
tron c0bf201984 (svn r6209) Move DrawFrameRect() out of gfx.[ch], because it uses data (_color_list) which the renderer shouldn't have know about 18 years ago
rubidium 6bf2aba697 (svn r6186) -Fix [FS#309]: add an override system to the dynamically determined size of steps for numeric patch settings in the 'Configure patches' GUI.
The size of these steps normally about (max - min) / 50, which results in steps of 100 000 years for the start year, end year, network restart year and the year of introduction of coloured newspapers.
18 years ago
belugas 473885c615 (svn r6108) -NewGRF Feature: Implement currencies replacment via grf file.
All properties can now be modified i.e:
Introduction date for euro conversion
Currency name, decimal separator, currency symbol (before or after amount)
and the rate compared to the base currency, the british pound
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 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
truelight d3f2180438 (svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
18 years ago
rubidium c55962f8a2 (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
18 years ago
rubidium dc54e608e3 (svn r5915) -Cleanup: some variables were named *_date while they were only holding years; rename these variables to match this. 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
miham 5f18b6792a (svn r5714) Backport from branches/TGP (r5701 and r5711)
-Fix: < > boxes in patch-settings didn't grey out when they hit the limit of their range
 -Codechange: while at it, prettyfied DrawArrowButtons() a bit
 -Fix: < > boxes in industry production window (when cheat enabled) had a minor glitch
18 years ago
Darkvater 08bcbf5d04 (svn r5656) -Fix [SF 1296259]: Autosave override. Changing autosave interval ingame should also change the default interval. 18 years ago
KUDr 308f27a3de (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 18 years ago
rubidium a6fc0e521d (svn r4944) Codechange: make _patches_newgame available via settings.h and remove instances of extern Patches _patches_newgame in .c files 18 years ago
Darkvater 40dd3b2061 (svn r4654) - Fix [NewGRF]: Properly read in the GRFID. This fixes GRFID checking and activation/deactivation. Do swap the GRFID for displaying purposes. 18 years ago
peter1138 28eec97d8f (svn r4487) - Codechange: replace the custom currency magic number 23 with a define 18 years ago
celestar 65f759cbac (svn r4463) -Codechange. Include vehicle.h directly instead of implicitly via station.h in a number of source files 18 years ago
tron 35e93e451f (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
18 years ago
peter1138 67bc818bbe (svn r4126) - Feature: A new multi-lingual multi-measuring-unit system:
- Replace miles/kilometres game option with a general measuring units option.
  - Add {POWER}, {WEIGHT}, {WEIGHT_S} and {VOLUME_S} (_S for short) tags to the language/string system.
  - Add SI as option for measuring units.
  Language file updates to use the system will come soon.
19 years ago
Darkvater 40e49f25d6 (svn r3930) - [Patches] Change the GUI-patch options from indeces to string representations. Not only makes this the part more humanly readable, but saves us from rewriting the whole index when a patch is added/removed/changed 19 years ago
Darkvater 5642bbb91d (svn r3874) - Codechange: move the extern decleration of _patches_newgame inside the WE_CREATE event because it is only used there. 19 years ago
Darkvater eeb2b7cd11 (svn r3746) - [7/7] Moving the callback functions for the setting-changes from settings_gui.c to settings.c. Also enable the callback functionality through the console.
- Fix a nasty bug with improper counter addition. (*i)++ and NOT *i++ when setting a patch value through the console.
19 years ago
Darkvater d1a6223365 (svn r3732) - Fix two warnings. Stupid MSVC didn't even complain :s (Thank Tron and peter1138)
- NOTE! There are a few warnings left in settings_gui because tha callback functions are disabled. I still need a good place for them.
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
Darkvater 12948b995b (svn r3723) - [5/6] Move over the console commands from settings_gui to settings where they rather belong.
- Remove the restriction that the 'patch' console command can only be run from network games.
19 years ago
Darkvater 2269685c23 (svn r3722) - [4/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. The last part finishes the transition with the merging of the settings_gui table(s).
- Because patches are (will be in a few commits) saved, you cannot specify the order of the GUI-items in the SettingDesc tables themselves. Doing so would mean messing around with the savegame-version, or doing expensive lookups. So the GUI-tables are now just simple indeces into the original table. No more is needed since that table contains all information
- The only change in functionality is that the stepsize has been automated. It is calculated from the minimum and maximum values such that within 50 clicks you will have gone from one end to the other if scrolling.
- The GUI has kept its flags intact. These are:
  SGF_0ISDISABLED: the variable might have a domain higher than zero, but a special value of nul is used as telling that feature is disabled.
  SGF_NOCOMMA: represent the number without any thousand-seperators
  SGF_MULTISTRING: internally the variable is a number, but its representation is a string based on a simple offset.
  SGF_NETWORK_ONLY: this setting can only be changed during network games
  SGF_CURRENCY: the variable represents money and will be shown in the local currency
- - NOTE! The game is not compilable after this commit (because console hooks have not been updated)
19 years ago
Darkvater b4794ddc3b (svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag. 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
Darkvater 4014e36aec (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
19 years ago