Commit Graph

130 Commits

Author SHA1 Message Date
Darkvater db03c5d5e8 (svn r3323) - Fix: automatically enable new AI when turning on the AI in multiplayer feature (it only works that way and we all know users don't read). 2005-12-20 21:24:50 +00:00
tron b06b3e2ca2 (svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
2005-12-18 12:10:46 +00:00
tron 2956b119b2 (svn r3311) Remove the unnecessary global variable _grffile_count: It's just the scroll count of a list and furthermore only used in one file 2005-12-18 08:01:05 +00:00
Darkvater 56998926e7 (svn r3294) - Fix: use INVALID_STRING_ID instead of -1.
- Fix: savegames only give back one message, show this by ignoring the first argument. Perhaps make the message more verbose in the future by adding STR_ equivalents next to the already existing debug messages.
2005-12-13 21:21:57 +00:00
peter1138 1c57091230 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
truelight 9a381f4d5d (svn r3238) -Fix: always save if you want GPMI-based AIs, this on request by
Darkvater, so we can, in the future, save patch options in savegames 
without any problems.
2005-11-26 16:18:15 +00:00
truelight 4927236912 (svn r3229) -Add: add more GPMI support. Now GPMI-based AIs can be loaded (doesn't change a thing if you didn't enable GPMI) 2005-11-22 22:32:42 +00:00
truelight 31f218fdf9 (svn r3224) -Add: Allow the NewAI to work in Multiplayer Games (switchable via patch
settings, off by defaut). An other step to AIScripts.
      WARNING: this is still highly experimental and has known bugs!
2005-11-21 14:28:31 +00:00
tron f2b344084a (svn r3222) -Feature: Right-Click-Scrolling optionally moves in the opposite direction (Requested by manx) 2005-11-19 12:37:28 +00:00
tron 3bf8d2ccbb (svn r3190) Turn some loops into canonical for loop form 2005-11-15 11:46:49 +00:00
tron b9729fb72e (svn r3185) const 2005-11-15 09:00:02 +00:00
tron f7abff5f96 (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
2005-11-14 19:48:04 +00:00
tron 4a14a586e2 (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
2005-11-13 14:54:09 +00:00
peter1138 350f0f2cdb (svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars. 2005-11-09 07:25:55 +00:00
tron 47137cefb7 (svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
2005-10-23 13:04:44 +00:00
tron 2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00
tron 6249dd46ad (svn r2994) Another small hack regarding currencies: add a #define to emulate a variable, that holds the current currency; again this should increase readability 2005-09-27 20:55:42 +00:00
peter1138 c02b1d555d (svn r2982) Newgrf: Added patch option for wagon speed limits. This is enabled by default. 2005-09-24 13:56:39 +00:00
Darkvater 5dad0588df (svn r2980) - Add some comments to some setting enums, and fix a 'const' warning.
- Add settings.h to VS.NET project.
2005-09-23 23:23:01 +00:00
tron 3f39db10d7 (svn r2831) Fix some potential and real buffer overflows 2005-08-07 14:18:17 +00:00
tron 14e80ca159 (svn r2830) Move CheckSwitchToEuro() to currency.[ch] and hide the truth about the custom currency behind a #define 2005-08-07 12:41:57 +00:00
bjarni ed8e2bac04 (svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
-This means that one company can only have one setting for renew and replacing
    more clients will not fight due to different settings anymore
  -This is a needed step in the line to fix autoreplacing dualheaded locomotives
  NOTE: savegame revision bump (peter1138 + me in coop)
2005-08-06 16:07:22 +00:00
tron baca040df0 (svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files 2005-08-06 14:59:54 +00:00
celestar 12b5dcb1b8 (svn r2751) -Fix: Disabled buttons in the patches and difficulty windows are now rendered properly again 2005-07-29 18:26:53 +00:00
tron a16418266e (svn r2717) Move _userstring to strings.[ch] 2005-07-26 19:04:19 +00:00
celestar 238e47cd42 (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
2005-07-24 15:56:31 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
tron ac66e3e28f (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read 2005-07-20 15:29:28 +00:00
ludde 3e97dda275 (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.
2005-07-19 11:42:40 +00:00
ludde a069876725 (svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
2005-07-15 15:09:52 +00:00
ludde 3e62457107 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
2005-07-14 09:43:59 +00:00
ludde f523be81d4 (svn r2553) - Fix: [pathfinding] Remove old-old train pathfinder. Enhanced old pathfinder.
- Penalties for red signals and for slopes. 
  - Increased the search depth to work better with large train networks.
2005-07-12 20:28:19 +00:00
hackykid 60ddaf95f0 (svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
- Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings.
 - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
2005-07-04 14:58:55 +00:00
hackykid 8607bbf06d (svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_) 2005-06-15 17:27:14 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
Darkvater 2aa94201dc (svn r2310) - Fix: Game would crash if you full-screened with the 'fullscreen' button than chose a resolution from the dropdown box that was no longer valid. Big thanks to DaleStan for track down the crashing bug.
- Fix: There would be duplicate entries in the resolutions dropdown box. Copy SDL method or removing duplicates and sort the list.
- Feature: in the settings menu, you don't have to click on the arrows anymore, clicking on the dropdown box itself has the same effect. Consistent with other dropdowns in the game
2005-05-14 21:01:57 +00:00
Darkvater d99dddc704 (svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;) 2005-05-14 19:34:59 +00:00
Darkvater fbb794d450 (svn r2307) - Fix (regression): it was not possible to change the drive-side in the intro-game.
- CodeChange: remove unused "CANT_DO_THIS" double-string.
2005-05-14 18:25:01 +00:00
Darkvater 033995ec6e (svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
- CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ()
- Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
2005-05-12 23:46:01 +00:00
Darkvater c626555f68 (svn r2298) - CodeChange: removed CmdAbuses: CmdSetTownNameType(), CmdStartNewGame(), CmdCreateScenario(), CmdSetNewLandscapeType() and CmdGenRandomNewGame().
- CodeChange: renamed CmdTrainGotoDepot() to CmdSendTrainToDepot() to be consistent with other depot commands.
- CodeChange: 'newgame' console command now calls the unabused GenRandomNewGame(). For the server it still creates a new game, a client quits the game and continues in SP.
- CodeChange: in the game-difficulty window, setup the disabled buttons on window creation, not every redraw.
2005-05-12 00:18:30 +00:00
Darkvater 2b96754673 (svn r2285) - Codechange: Fix up some of the missing things from server-checking; namely bridge-type, bridge-length, dragged end-tile (bridge/station), station_spread
- Fix: [ 1197256 ] max station spread patch < 7 does not work. Station spread was not taking into account when not using drag&drop. Fix this up, and add a callback to the settings window to immediately reflect the changes.
2005-05-09 13:26:15 +00:00
Darkvater b2efecd9b4 (svn r2263) - Fix: If the seperator string is empty for custom currencies, everything after that is cut off. Fix it by replacing nothing with ' '. Thanks for noticing peter1138 2005-05-03 22:05:34 +00:00
Darkvater 9b8aa4c101 (svn r2260) - Fix (regression): custom currency input works again ingame 2005-05-03 15:20:08 +00:00
Darkvater 57dbe50597 (svn r2245) - CodeChange: simplify the clamping of values for patch-settings by using clamp() 2005-05-02 16:01:53 +00:00
Darkvater d102d0c26d (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
- Some variables are really special and cannot be assigned normally, use their callback procedure for assignment/querying. This commit also obsoletes "[1172804] Console set command cleanup"
2005-05-02 15:52:19 +00:00
Darkvater de47d0935f (svn r2005) - Fix: fix previous commit. Using 'New Game (scenario)' will use YOUR difficulty settings but ingame options (eg townnames, currency). Also settings are correctly saved when closing the difficulty window now. 2005-03-13 11:47:04 +00:00
Darkvater 010d1a9be3 (svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
- Fix: [ 1153926 ] All my settings in vain... IGNORED!
- Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
2005-03-12 21:21:47 +00:00
tron 4bf173e9c1 (svn r1981) Typedef some structs and enums 2005-03-10 07:01:43 +00:00