Commit Graph

254 Commits (jgrpp)

Author SHA1 Message Date
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison ba34ec7ade Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Jonathan G Rennison 631a18fb07 Merge branch 'send_money_company' into jgrpp 7 years ago
Jonathan G Rennison 86bea16c60 Fix sending money to companies in single-player mode 7 years ago
Jonathan G Rennison c6854afcef Pause the game instead of blocking when link graph jobs lag.
Check if the job is still running one date fract tick before it
is due to join and if so pause the game until its done.
This avoids the main thread being blocked on a thread join.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
9 years ago
rubidium 2be4215f43 (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
zuu c7620a1ea7 (svn r25788) -Feature: [Script] Game Scripts can now charge fees and give money to companies 11 years ago
zuu ab69c6c2a0 (svn r25788) -Feature: [Script] Game Scripts can now charge fees and give money to companies 11 years ago
zuu d30caad43f (svn r25787) -Doc: Doxygen comment was wrong 11 years ago
zuu 01dea4ec37 (svn r25787) -Doc: Doxygen comment was wrong 11 years ago
planetmaker f00d9976f9 (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
zuu ac3d609377 (svn r24552) -Fix (r24537): Unpause do no longer continue scripts 12 years ago
zuu d219fdb875 (svn r24552) -Fix (r24537): Unpause do no longer continue scripts 12 years ago
truebrain 3a799f1145 (svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only) 13 years ago
truebrain 55de5d336c (svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only) 13 years ago
frosch 42623e1084 (svn r22621) -Fix: When asking the user to confirm an unsafe unpausing, there is no need to execute a command if 'no' is choosed. This also prevents crashing when clicking unpause while the confirm window is shown. 13 years ago
frosch 7bf8b1d96e (svn r22621) -Fix: When asking the user to confirm an unsafe unpausing, there is no need to execute a command if 'no' is choosed. This also prevents crashing when clicking unpause while the confirm window is shown. 13 years ago
rubidium 1b7adfc484 (svn r22028) -Cleanup: remove traces of a debugging "feature" that got disabled a long time ago 14 years ago
rubidium 5286de116b (svn r22028) -Cleanup: remove traces of a debugging "feature" that got disabled a long time ago 14 years ago
rubidium 8183922813 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 14 years ago
rubidium 1d0d7635e0 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 14 years ago
frosch 5b86c79fce (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
frosch a5bea603ea (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 14 years ago
frosch 1d3adb2b66 (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 14 years ago
frosch 60fb3bb9a5 (svn r19930) -Codechange: Deduplicate magic command parameter casts. (rubidium) 14 years ago
frosch 406c2a9865 (svn r19930) -Codechange: Deduplicate magic command parameter casts. (rubidium) 14 years ago
frosch ee53807e51 (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 14 years ago
frosch 9db3cde73a (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 14 years ago
yexo 451fcefde7 (svn r19684) -Fix [FS#3779]: don't show an error message when trying to give another client an amount of 0 money 14 years ago
yexo 879057de25 (svn r19684) -Fix [FS#3779]: don't show an error message when trying to give another client an amount of 0 money 14 years ago
frosch 5b481e6f4a (svn r19658) -Fix: One could turn transport companies into credit banks. 14 years ago
frosch 77486ee8d2 (svn r19658) -Fix: One could turn transport companies into credit banks. 14 years ago
yexo cdfe7f7834 (svn r19544) -Feature [FS#3496]: add an input box to the AI Debug window where you can input a break string (patch by Zuu) 14 years ago
yexo 8165737939 (svn r19544) -Feature [FS#3496]: add an input box to the AI Debug window where you can input a break string (patch by Zuu) 14 years ago
alberth 8109a0ad7f (svn r19483) -Codechange: Code layout fixes, and parentheses reduction. 14 years ago
alberth f05a8635fd (svn r19483) -Codechange: Code layout fixes, and parentheses reduction. 14 years ago
rubidium 6ce5fe41f8 (svn r18732) -Codechange: move the company related commands of misc_cmd.cpp to company_cmd.cpp 15 years ago
rubidium 74ffe8647f (svn r18732) -Codechange: move the company related commands of misc_cmd.cpp to company_cmd.cpp 15 years ago
rubidium da30e736ca (svn r18330) -Cleanup: remove some unneeded includes 15 years ago
rubidium b00a5f1069 (svn r18330) -Cleanup: remove some unneeded includes 15 years ago
rubidium a0840ee58b (svn r18052) -Codechange/Fix: make the 'pause' chat message when actually executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state doesn't change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are. 15 years ago
rubidium 2a1cab4d46 (svn r18052) -Codechange/Fix: make the 'pause' chat message when actually executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state doesn't change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are. 15 years ago
rubidium 0c20992c5b (svn r18051) -Codechange: make the active clients pause use a separate bit in the pause mode 15 years ago
rubidium 934e6a295d (svn r18051) -Codechange: make the active clients pause use a separate bit in the pause mode 15 years ago
rubidium 7d2d49cb9b (svn r18050) -Codechange: disallow 'pause on join' paused when not in a network game 15 years ago
rubidium 3f2dce581e (svn r18050) -Codechange: disallow 'pause on join' paused when not in a network game 15 years ago
rubidium 982b8ee5fc (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium 06e490fadc (svn r17567) -Fix: some doxygen warnings 15 years ago
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 15 years ago
frosch 0e36260337 (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium d61be2637e (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
frosch 6e06b592ad (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 15 years ago
frosch 9853c0dc22 (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 15 years ago
rubidium cd382b28a3 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 15 years ago
rubidium 6237fe1462 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 15 years ago
smatz 0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
rubidium 241af768f0 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
15 years ago
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
15 years ago
rubidium 5c5b357043 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
smatz 4c6afbbbe2 (svn r15704) -Cleanup: remove further includes from recently split files 15 years ago
smatz 40745dc0d9 (svn r15704) -Cleanup: remove further includes from recently split files 15 years ago
rubidium b9aa5e17f2 (svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often. 15 years ago
rubidium c0d71b84f9 (svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often. 15 years ago
rubidium 5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium 89e1afdaa0 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium 66cb1fe1ff (svn r15423) -Codechange: split widget related types to their own header and add a bit of type strictness. 16 years ago
rubidium 9907742a0f (svn r15423) -Codechange: split widget related types to their own header and add a bit of type strictness. 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
truebrain c2406cd42d (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
smatz c5db2ea181 (svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
16 years ago
smatz 0cd41d1dc6 (svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
16 years ago
rubidium e83cca7d13 (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
rubidium 96156a8ab1 (svn r14423) -Codechange: also do r14221 for the strings. 16 years ago
rubidium c9a82ac3e7 (svn r14423) -Codechange: also do r14221 for the strings. 16 years ago
rubidium e589c7e580 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium f56e630e5c (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
smatz aef674d858 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 16 years ago
smatz 5f4ff33ce3 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 16 years ago
smatz e543181b12 (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 16 years ago
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 16 years ago