Commit Graph

23009 Commits

Author SHA1 Message Date
Jonathan G Rennison
4722c81e88 Merge branch 'crashlog_improvements' into jgrpp 2016-02-25 22:27:55 +00:00
Jonathan G Rennison
cbc35e8aae Try to make scope info logging more robust.
Add checks for validity of Vehicle ptrs in scope_dumper::VehicleInfo.
In Unix mode, try to handle SIGSEGVs when dumping scope info.
2016-02-25 19:21:06 +00:00
Jonathan G Rennison
0062881a46 Avoid using malloc in scope guard logger.
Use a temporary object with its own buffer, which lives on the stack.

Reformat SCOPE_INFO_FMT to not be all on one line.
Other minor reformatting.
2016-02-25 00:20:31 +00:00
Jonathan G Rennison
d08b162119 Merge branch 'signal_tunnels_bridges-sx' into jgrpp
# Conflicts:
#	src/saveload/afterload.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/signal.cpp
#	src/train_cmd.cpp
2016-02-21 12:16:11 +00:00
Jonathan G Rennison
83f6463a6f Bump version, set semaphore/pbs/exit sig state on upgrade. 2016-02-21 12:11:25 +00:00
Jonathan G Rennison
ab071f93b1 Merge branch 'signal_tunnels_bridges' into signal_tunnels_bridges-sx 2016-02-21 12:11:22 +00:00
Jonathan G Rennison
891fd08e9d Handle case where a non-PBS tun/bridge exit is followed by a PBS signal.
Prevent the entrance being reserved if an attempt is made to reverse
on the exit tile.
2016-02-21 12:09:50 +00:00
Jonathan G Rennison
7e4898ad42 Fix PBS reservation from bridge/tunnel exit when next tile not a junction. 2016-02-21 02:00:52 +00:00
Jonathan G Rennison
35b93a42ac Enable bridge/tunnel exit signals to be one-way PBS.
Add signal conversion support.
2016-02-20 23:49:06 +00:00
Jonathan G Rennison
69c2cf352e Fix drag-convert not updating bridge/tunnel direction correctly. 2016-02-20 23:45:21 +00:00
Jonathan G Rennison
1a2b5e5172 Also draw signals for tunnel exits. 2016-02-20 23:45:07 +00:00
Jonathan G Rennison
3861968765 Enable setting semaphore/electric type of signals on bridges/tunnels. 2016-02-20 23:44:21 +00:00
Jonathan G Rennison
2b4dbf582a Show tunnel/bridge exit signal facing correct way with correct colour. 2016-02-20 23:38:33 +00:00
Jonathan G Rennison
a25ac7a161 Enable signals on bridges/tunnels to work with PBS. 2016-02-20 23:34:06 +00:00
Jonathan G Rennison
1e9ab8e64e Template replacement usage of scope guard logging. 2016-02-17 22:56:36 +00:00
Jonathan G Rennison
5dba89c783 Merge branch 'crashlog_improvements' into jgrpp
# Conflicts:
#	source.list
#	src/openttd.cpp
#	src/stdafx.h
#	src/vehicle.cpp
2016-02-17 22:56:15 +00:00
Jonathan G Rennison
ae6e43c5fa Initial uses of scope guard logging. 2016-02-17 22:52:57 +00:00
Jonathan G Rennison
5cf2b04f6a Initial implementation of scope guard logging for including in crash logs.
This adds a mechanism to create scope guards with an associated std::function
which is called to output diagnostic info in the event of a crash.
Add a macro to make it easy to efficiently capture variables on the stack
and output a formatted message.
Requires C++11, #ifdefed out for legacy compilers.
2016-02-17 22:41:07 +00:00
Jonathan G Rennison
e89efa8581 Add a function to test whether the current thread is the main thread. 2016-02-17 22:41:07 +00:00
Jonathan G Rennison
48e4c35fdc Add support for verbose asserts.
Use for test/exec DoCommand mismatches.
2016-02-17 22:41:07 +00:00
Jonathan G Rennison
f86b5c58cb Merge branch 'master' into crashlog_improvements 2016-02-17 22:40:40 +00:00
Jonathan G Rennison
ead72b7753 Strip colour codes when writing debug msgs to terminal. 2016-02-16 21:10:26 +00:00
Jonathan G Rennison
199c04fb44 Enable build and refit for template virtual trains. 2016-02-16 21:09:39 +00:00
Jonathan G Rennison
0779c7b7a9 Merge branch 'template_train_replacement-sx' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/saveload/afterload.cpp
2016-02-16 21:08:21 +00:00
Jonathan G Rennison
f3e01f4c6d Merge branch 'template_train_replacement' into template_train_replacement-sx 2016-02-16 21:06:57 +00:00
Jonathan G Rennison
4f052d3cad Fix clone template from vehicle validation for artic vehicles. 2016-02-16 21:02:53 +00:00
Jonathan G Rennison
d688039a42 TBTR: Update template veh sprite IDs when loading savegame/GRFs. 2016-02-15 23:19:41 +00:00
Jonathan G Rennison
77ca326997 TBTR: Fix main window in double scale mode, and misc alignment issues. 2016-02-15 20:36:17 +00:00
Jonathan G Rennison
89aeb973f8 TBTR: Fix create window not being redrawn when selling vehs in MP. 2016-02-15 19:29:00 +00:00
Jonathan G Rennison
5b6560b73b TBTR: Handle template being deleted during edit. 2016-02-15 19:28:14 +00:00
Jonathan G Rennison
98fc4493c8 TBTR: Delete duplicated build vehicle window.
Add a virtual train mode to the existing build vehicle window.
Simplify some of the inter-window notify logic.
Disable all buttons when a new template/edit is in progress.
2016-02-15 19:17:30 +00:00
Jonathan G Rennison
9132707eb9 TBTR: Fix refitting of template vehicles failing.
Fix from KeldorKatarn's tree.
2016-02-15 02:32:13 +00:00
Jonathan G Rennison
5850bcf699 TBTR: Fix crash and issues when using a no longer available engine type.
Show error messages when cloning a vehicle to a template
or virtual vehicle fails.
Handle failed clones gracefully.
Bypass engine availability check when doing a template edit action.
Show correct error message if template replacement fails for
a non-money reason.
2016-02-15 02:31:26 +00:00
Jonathan G Rennison
d9a48a2b5e TBTR: Raise clone buttons when vehicle pick aborted. 2016-02-15 00:24:02 +00:00
Jonathan G Rennison
b87957c9db Fix crash when attempting to refit template vehicle.
This is due to infra sharing tile ownership tests.
2016-02-15 00:12:51 +00:00
Jonathan G Rennison
580b2f7584 Merge branch 'template_train_replacement-sx' into jgrpp
Remove a duplicated declaration.

# Conflicts:
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	source.list
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/network/network_command.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/extended_ver_sl.h
#	src/saveload/saveload.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/window_type.h
2016-02-14 17:55:51 +00:00
Jonathan G Rennison
99509acd1d Extended version info for TBTR. 2016-02-14 17:42:10 +00:00
Jonathan G Rennison
671c12999e Merge branch 'template_train_replacement' into template_train_replacement-sx
# Conflicts:
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	source.list
2016-02-14 17:40:39 +00:00
Jonathan G Rennison
de7f1c1168 Show cost text effect and failure advice messages for TBTR replacement.
Minor whitespace/formatting changes.
2016-02-14 17:39:36 +00:00
Jonathan G Rennison
7ae0c6de5a Remove TBTR replace all files, they are not used. 2016-02-14 17:39:36 +00:00
Jonathan G Rennison
a1d6c3ad64 Merge branch 'master' into save_ext 2016-02-14 17:13:55 +00:00
Jonathan G Rennison
2258fdac3f Disable new template refit button when no train. 2016-02-14 13:33:13 +00:00
Jonathan G Rennison
a92268a25c Attach reuse/refit/etc text to right edge of TBTR main window. 2016-02-14 13:33:13 +00:00
Jonathan G Rennison
e8301b1bb1 Disable/enable buttons as selections change in TBTR main window. 2016-02-14 13:33:13 +00:00
Jonathan G Rennison
b74790187a Fix tbtr refit button crashing if new template window is empty. 2016-02-14 13:33:13 +00:00
Jonathan G Rennison
faa72e9615 Only show template replacement menu item where sensible.
Fix drop-down not being sized for template replacement item to fit.
2016-02-14 13:33:13 +00:00
Jonathan G Rennison
1ebd0af2c6 Only include TBTR debug functions when debugging enabled.
Add an initial prefix for clarity.
Fix log print format codes.
2016-02-14 13:33:13 +00:00
Jonathan G Rennison
a31e7ac87d Initial whitespace, formatting, file headers and NULL usage fixes. 2016-02-14 13:32:58 +00:00
Jonathan G Rennison
6be2efc084 Update from KeldorKatarn branch
This approximately corresponds to 971ba4928a5c7c7916fea55d91a3b6dd5bba140c,
excluding the different virtual train build GUI, but including the basic
changes to the original train build GUI for multiplayer to work.

Fixup
2016-02-14 03:32:42 +00:00
Jonathan G Rennison
1f5535c0b1 Merge branch 'infrastructure_sharing-sx' into jgrpp
# Conflicts:
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/table/company_settings.ini
2016-02-13 22:14:47 +00:00