Commit Graph

216 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison e95216b59d Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
3 years ago
Jonathan G Rennison 15b99f2e7a
Fix: Whole status bar instead of money widget refreshed on money change (#8692)
This could result in the rest of the status bar being
redrawn unnecessarily frequently
3 years ago
Jonathan G Rennison b7ddd486cf Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/cargopacket.cpp
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/core/pool_func.hpp
#	src/date.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/ground_vehicle.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/mcf.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_station.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/station_kdtree.h
#	src/string_func.h
#	src/table/settings.ini
#	src/tgp.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/viewport_sprite_sorter_sse4.cpp
#	src/window.cpp
3 years ago
Patric Stout ef6b17baf7 Fix 2fd871e2af5: load correct ending-year for old (pre 0.7) savegames
Despite what it looked like, you could never really change the
ending-year (it was always reset to 2050 on start-up). See commit
683b65ee1 for details. As a side-effect, the variable that was
suppose to store the ending-year was just zero, never containing
a real ending-year.
3 years ago
Patric Stout a1987df96a Fix #8050: never show the highscore when disabled, not even if you start in year zero
Using zero as "never" value can have its drawbacks ;)
3 years ago
Jonathan G Rennison 5fe5884613 Debug: Add experimental command to switch baseset 4 years ago
Jonathan G Rennison 53f9fa139d Remove redundant year/month date globals 4 years ago
Jonathan G Rennison f5e9805b10 Store time display settings both in savegame and client, add setting 4 years ago
Jonathan G Rennison ca79a32890 Scheduled dispatch: Fixup start dates when changing game date 4 years ago
Jonathan G Rennison 57f490db2b Reduce unnecessary status bar redraws 4 years ago
Jonathan G Rennison 81a1094cc8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/date.cpp
#	src/economy.cpp
#	src/misc.cpp
#	src/newgrf_house.cpp
4 years ago
Niels Martin Hansen c8779fb311
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
4 years ago
Jonathan G Rennison 7960db35f2 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
5 years ago
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
5 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 5 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 1d5ba98932 Show time and in game date of game load in desync/crash logs 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
keldorkatarn 4955996b35 Remove costly recalculation of a date format we already have.
(cherry picked from commit 6aca18d18252f1c2f6d4a215999b7d7afb7df813)

See #36
6 years ago
Jonathan G Rennison e54a7189fd Add debug command line switch to quit after fixed number of days 7 years ago
Jonathan G Rennison 5282394b04 Do not attempt to perform viewport scrolling in game bootstrap mode.
Do not increase date in bootstrap mode
7 years ago
Jonathan G Rennison 375b069f82 Replace day length scaled tick macros with global variables.
This is to avoid needing to expensively re-calculate them all the time.
Instead update them by incrementing.
8 years ago
Jonathan G Rennison 012c842a90 Merge branch 'daily_script' into jgrpp 9 years ago
patch-import 2c3e58909f Import daily/monthly/yearly scripts patch.
Fix whitespace.

http://www.tt-forums.net/viewtopic.php?f=33&t=49595
9 years ago
patch-import d86a56cbef Import day length patch
Minor whitespace fixes.

http://www.tt-forums.net/viewtopic.php?p=1148227#p1148227
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
frosch 21cbb7acfe (svn r25333) -Fix: Potential signedness issue. 11 years ago
frosch 5bb1d01af9 (svn r25333) -Fix: Potential signedness issue. 11 years ago
rubidium e93a8e0943 (svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates 11 years ago
rubidium 0fbc7140c5 (svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates 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
frosch 85f8b026f8 (svn r24592) -Codechange [FS#5241]: Set up the new date completely before calling various daily or monthly processings. (dihedral) 12 years ago
frosch b5a485825b (svn r24592) -Codechange [FS#5241]: Set up the new date completely before calling various daily or monthly processings. (dihedral) 12 years ago
terkhen ad555a4cb2 (svn r23406) -Change: Run the monthly subsidy loop after cargo acceptance has been calculated. 13 years ago
terkhen 0e5f334315 (svn r23406) -Change: Run the monthly subsidy loop after cargo acceptance has been calculated. 13 years ago
rubidium 9fc2798baf (svn r22411) -Document: another bunch of bits 13 years ago
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 13 years ago
rubidium 2074b4ddce (svn r21512) -Change/Feature: make the delay of the chat messages timing out unrelated to the number of passed game days, i.e. don't stop aging chat messages when the server is paused 14 years ago
rubidium e68efb9e71 (svn r21512) -Change/Feature: make the delay of the chat messages timing out unrelated to the number of passed game days, i.e. don't stop aging chat messages when the server is paused 14 years ago
rubidium 72c85d1cdb (svn r20967) -Add: infrastructure to send information to remote admins at specific intervals (dihedral) 14 years ago
rubidium b4ce7fad7f (svn r20967) -Add: infrastructure to send information to remote admins at specific intervals (dihedral) 14 years ago
rubidium 360d6daf34 (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
rubidium 1f95317454 (svn r20592) -Fix (r2041): no (proper) savegame conversion was done when _date_fract got a new value range 14 years ago
rubidium 29e02728e1 (svn r20592) -Fix (r2041): no (proper) savegame conversion was done when _date_fract got a new value range 14 years ago
rubidium 0318ddc279 (svn r20591) -Codechange: make sure _date_fract is set when SetDate is called. Some places wouldn't reset _date_fract correctly at all 14 years ago
rubidium 56a263070f (svn r20591) -Codechange: make sure _date_fract is set when SetDate is called. Some places wouldn't reset _date_fract correctly at all 14 years ago
alberth e5b703ddf9 (svn r20279) -Doc: Doxygen additions/improvements. 14 years ago
alberth dc6ed2c2c0 (svn r20279) -Doc: Doxygen additions/improvements. 14 years ago
rubidium 9fd2afb147 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 14 years ago
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 14 years ago
rubidium 6ef7b78c8b (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 14 years ago
rubidium 644deff9d2 (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 14 years ago
frosch d12e364952 (svn r19937) -Codechange: Move some fios related prototypes to fios.h 14 years ago
frosch 13d43b8dab (svn r19937) -Codechange: Move some fios related prototypes to fios.h 14 years ago
rubidium a70fd540fc (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 14 years ago
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 14 years ago
rubidium e9f60d5d13 (svn r19592) -Fix: don't do the desync debug savegames mid-StateGameLoop; they're increadibly useless (or hard to load correctly) in that case 14 years ago
rubidium 12e75643af (svn r19592) -Fix: don't do the desync debug savegames mid-StateGameLoop; they're increadibly useless (or hard to load correctly) in that case 14 years ago
frosch 7c727d4c4c (svn r18433) -Codechange: Show different texts in town GUI when the town does not need food the whole year to grow. 15 years ago
frosch 9dd74395c8 (svn r18433) -Codechange: Show different texts in town GUI when the town does not need food the whole year to grow. 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 371a220960 (svn r18291) -Codechange: rework the calculation of the 'days till year' macro a bit so it can be properly reused and add a MAX_DAY 15 years ago
rubidium 1a8c203d6e (svn r18291) -Codechange: rework the calculation of the 'days till year' macro a bit so it can be properly reused and add a MAX_DAY 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
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
smatz 1fcdb149d3 (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 15 years ago
smatz 88a2d688da (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 15 years ago
smatz d7996f796d (svn r17088) -Codechange: split IncreaseDate() to more procedures 15 years ago
smatz 0ab39b52d0 (svn r17088) -Codechange: split IncreaseDate() to more procedures 15 years ago
rubidium 100cb17fa8 (svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
15 years ago
rubidium 68ead6b84f (svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
15 years ago
yexo d85adeeca5 (svn r16752) -Codechange: Remove most of the window-changing code from AirportPickerWindow::OnPaint 15 years ago
yexo 96201f1a41 (svn r16752) -Codechange: Remove most of the window-changing code from AirportPickerWindow::OnPaint 15 years ago
smatz 1eb48cdded (svn r16403) -Codechange: move code related to subsidies to separate file 15 years ago
smatz b2aed51f8e (svn r16403) -Codechange: move code related to subsidies to separate file 15 years ago
smatz 50624d5c0f (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
rubidium f1955333c9 (svn r16332) -Codechange: replace some -1 + 1 with 'nothing' or <= .. - 1 with < .. - 1 (both caused due to wrapper functions) 15 years ago
rubidium e7dedf4e1b (svn r16332) -Codechange: replace some -1 + 1 with 'nothing' or <= .. - 1 with < .. - 1 (both caused due to wrapper functions) 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
smatz ca45774160 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
16 years ago
smatz e00cf92f47 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
16 years ago
smatz ec7ebf2170 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 16 years ago
smatz 67bf6a0998 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 16 years ago
smatz 91233ea596 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
rubidium f16427fbe0 (svn r14823) -Document: some variables/structs (Alberth) 16 years ago
rubidium 702c372744 (svn r14823) -Document: some variables/structs (Alberth) 16 years ago