Jonathan G Rennison
86a6f63e2f
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/codeql.yml
# .github/workflows/commit-checker.yml
# .github/workflows/release-linux-legacy.yml
# .github/workflows/release-linux.yml
# .github/workflows/release-macos.yml
# .github/workflows/release-windows-store.yml
# .github/workflows/release-windows.yml
# .github/workflows/upload-cdn.yml
# .github/workflows/upload-gog.yml
# .github/workflows/upload-steam.yml
# src/console_cmds.cpp
# src/core/math_func.hpp
# src/fios.cpp
# src/fios.h
# src/intro_gui.cpp
# src/network/network_server.cpp
# src/openttd.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_table.cpp
# src/settings_type.h
# src/table/settings.h.preamble
# src/table/settings/company_settings.ini
# src/table/settings/currency_settings.ini
# src/table/settings/difficulty_settings.ini
# src/table/settings/economy_settings.ini
# src/table/settings/game_settings.ini
# src/table/settings/gui_settings.ini
# src/table/settings/linkgraph_settings.ini
# src/table/settings/locale_settings.ini
# src/table/settings/misc_settings.ini
# src/table/settings/multimedia_settings.ini
# src/table/settings/network_private_settings.ini
# src/table/settings/network_settings.ini
# src/table/settings/news_display_settings.ini
# src/table/settings/old_gameopt_settings.ini
# src/table/settings/pathfinding_settings.ini
# src/table/settings/script_settings.ini
# src/table/settings/win32_settings.ini
# src/table/settings/window_settings.ini
# src/table/settings/world_settings.ini
# src/viewport.cpp
# src/viewport_func.h
# src/window.cpp
2024-02-15 23:49:11 +00:00
Patric Stout
ea8c1d8597
Change: make for smooth-scrolling based on actual time
...
This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
2024-01-25 10:29:48 +01:00
Jonathan G Rennison
606d7cd814
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/airport_gui.cpp
# src/build_vehicle_gui.cpp
# src/direction_type.h
# src/gfx_type.h
# src/group_gui.cpp
# src/misc_gui.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/signs_gui.cpp
# src/slope_func.h
# src/smallmap_gui.cpp
# src/terraform_gui.cpp
# src/toolbar_gui.cpp
# src/town_gui.cpp
# src/town_type.h
# src/vehicle_type.h
# src/widget_type.h
2024-01-21 23:03:08 +00:00
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
Jonathan G Rennison
42c8f50551
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release-linux.yml
# .github/workflows/release-macos.yml
# .github/workflows/release-windows.yml
# .gitignore
# COMPILING.md
# src/company_gui.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/engine_func.h
# src/fileio.cpp
# src/linkgraph/linkgraph_gui.h
# src/newgrf_debug_gui.cpp
# src/newgrf_gui.cpp
# src/order_gui.cpp
# src/osk_gui.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/script/api/script_event_types.hpp
# src/sl/oldloader_sl.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/toolbar_gui.cpp
# src/town_gui.cpp
# src/transparency_gui.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/widget_type.h
# src/widgets/dropdown.cpp
# src/widgets/dropdown_func.h
# src/widgets/dropdown_type.h
# src/widgets/group_widget.h
# src/widgets/vehicle_widget.h
# src/window.cpp
# src/window_gui.h
# src/window_type.h
2024-01-02 14:44:33 +00:00
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Jonathan G Rennison
4fac6b295c
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/release-linux.yml
# src/base_consist.h
# src/blitter/32bpp_optimized.cpp
# src/blitter/32bpp_optimized.hpp
# src/blitter/32bpp_sse2.hpp
# src/blitter/8bpp_optimized.hpp
# src/gfx_func.h
# src/industry_cmd.cpp
# src/industrytype.h
# src/linkgraph/linkgraphjob.cpp
# src/mixer.cpp
# src/newgrf_callbacks.h
# src/openttd.cpp
# src/os/macosx/macos.mm
# src/os/windows/win32.cpp
# src/pathfinder/npf/npf.cpp
# src/road_cmd.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/saveload/vehicle_sl.cpp
# src/sound.cpp
# src/spritecache.cpp
# src/spriteloader/spriteloader.hpp
# src/station_map.h
# src/timetable_cmd.cpp
# src/timetable_cmd.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/vehicle_cmd.cpp
# src/vehicle_gui_base.h
# src/video/opengl.cpp
# src/video/opengl.h
# src/viewport.cpp
2023-12-17 23:00:46 +00:00
Jonathan G Rennison
5ae74ecf8e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/articulated_vehicles.cpp
# src/articulated_vehicles.h
# src/autoreplace_cmd.cpp
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/core/format.hpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/group_gui.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/misc/endian_buffer.hpp
# src/music/music_driver.hpp
# src/newgrf_gui.cpp
# src/rail_cmd.cpp
# src/road_gui.cpp
# src/settings_type.h
# src/strgen/strgen.cpp
# src/strings.cpp
# src/timetable_cmd.cpp
# src/town.h
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehicle_gui_base.h
# src/widget.cpp
# src/widgets/dropdown.cpp
# src/widgets/road_widget.h
2023-12-17 00:37:16 +00:00
Peter Nelson
4a5ab331e2
Change: Add extra padding to climate buttons to match pre-#11464. ( #11525 )
...
Padding used to be included in the SetMinimalSize() part which was removed, but also made it require specific sprite sizes.
This now adds padding on the already determined size, removing the need for hardcoding pixel dimensions and allowing the sprites to be any size.
2023-11-30 19:18:28 +00:00
Jonathan G Rennison
88670a230f
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/articulated_vehicles.cpp
# src/articulated_vehicles.h
# src/base_media_base.h
# src/base_media_func.h
# src/build_vehicle_gui.cpp
# src/dock_gui.cpp
# src/main_gui.cpp
# src/music_gui.cpp
# src/network/network_chat_gui.cpp
# src/network/network_content.cpp
# src/newgrf.cpp
# src/newgrf_roadstop.cpp
# src/os/windows/string_uniscribe.h
# src/os/windows/win32.cpp
# src/rail_gui.cpp
# src/road.cpp
# src/road_gui.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/smallmap_gui.cpp
# src/strings.cpp
# src/terraform_gui.cpp
# src/tests/test_script_admin.cpp
# src/tests/test_window_desc.cpp
# src/timer/timer_game_calendar.h
# src/vehicle.cpp
# src/vehicle_base.h
# src/viewport.cpp
# src/widget_type.h
# src/window.cpp
# src/window_gui.h
2023-11-29 20:42:29 +00:00
Peter Nelson
0d60dc0353
Fix 96d98d08
: Crash in text layouter due to trying to find height of string with zero-width.
...
96d98d08
removed the hardcoded minimum width in favour of all-calculated widths, however this does not work when determining multiline text sizes.
2023-11-20 23:09:20 +00:00
Jonathan G Rennison
0d4d4a9cac
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/3rdparty/squirrel/squirrel/sqclosure.h
# src/3rdparty/squirrel/squirrel/sqobject.h
# src/3rdparty/squirrel/squirrel/sqvm.h
# src/aircraft.h
# src/airport_gui.cpp
# src/blitter/32bpp_sse_func.hpp
# src/blitter/null.hpp
# src/bridge_gui.cpp
# src/build_vehicle_gui.cpp
# src/cargotype.h
# src/cheat_gui.cpp
# src/command.cpp
# src/command_func.h
# src/company_gui.cpp
# src/console_gui.cpp
# src/date_gui.cpp
# src/depot_gui.cpp
# src/dock_gui.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/fileio.cpp
# src/fios.cpp
# src/fios_gui.cpp
# src/fontcache/spritefontcache.h
# src/framerate_gui.cpp
# src/game/game_text.cpp
# src/gamelog.cpp
# src/genworld_gui.cpp
# src/gfx_layout_fallback.cpp
# src/group_gui.cpp
# src/highscore_gui.cpp
# src/hotkeys.cpp
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/landscape.cpp
# src/main_gui.cpp
# src/misc_cmd.cpp
# src/misc_gui.cpp
# src/network/core/tcp_game.cpp
# src/network/core/udp.cpp
# src/network/network_chat_gui.cpp
# src/network/network_content_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf_airport.cpp
# src/newgrf_airport.h
# src/newgrf_airporttiles.cpp
# src/newgrf_airporttiles.h
# src/newgrf_animation_base.h
# src/newgrf_canal.cpp
# src/newgrf_commons.h
# src/newgrf_config.cpp
# src/newgrf_debug_gui.cpp
# src/newgrf_engine.cpp
# src/newgrf_engine.h
# src/newgrf_generic.cpp
# src/newgrf_gui.cpp
# src/newgrf_house.cpp
# src/newgrf_house.h
# src/newgrf_industries.cpp
# src/newgrf_industries.h
# src/newgrf_industrytiles.cpp
# src/newgrf_industrytiles.h
# src/newgrf_object.cpp
# src/newgrf_object.h
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_roadstop.cpp
# src/newgrf_roadstop.h
# src/newgrf_roadtype.cpp
# src/newgrf_roadtype.h
# src/newgrf_spritegroup.cpp
# src/newgrf_spritegroup.h
# src/newgrf_station.cpp
# src/newgrf_station.h
# src/newgrf_town.cpp
# src/newgrf_town.h
# src/news_gui.cpp
# src/object_gui.cpp
# src/order_gui.cpp
# src/os/macosx/crashlog_osx.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/win32.cpp
# src/os/windows/win32_main.cpp
# src/pathfinder/npf/npf.cpp
# src/pathfinder/npf/queue.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/roadveh.h
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/script/api/script_text.hpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_table.cpp
# src/signs_cmd.cpp
# src/signs_gui.cpp
# src/smallmap_gui.cpp
# src/smallmap_gui.h
# src/spriteloader/grf.hpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/station_map.h
# src/statusbar_gui.cpp
# src/stdafx.h
# src/strgen/strgen.cpp
# src/table/newgrf_debug_data.h
# src/terraform_gui.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_window.cpp
# src/town.h
# src/town_cmd.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/transparency_gui.cpp
# src/vehicle_gui.cpp
# src/water_cmd.cpp
# src/waypoint_cmd.cpp
# src/widget.cpp
# src/widget_type.h
# src/widgets/dropdown.cpp
# src/widgets/rail_widget.h
# src/widgets/terraform_widget.h
# src/window.cpp
# src/window_gui.h
2023-11-20 22:27:05 +00:00
Peter Nelson
96d98d08c8
Change: Use sparse padding for main intro menu. ( #11475 )
2023-11-20 01:12:25 +00:00
Jonathan G Rennison
c929f7075e
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/SourceList.cmake
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/depot_base.h
# src/elrail.cpp
# src/network/core/udp.cpp
# src/network/network_admin.cpp
# src/network/network_chat_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/newgrf.cpp
# src/newgrf_engine.cpp
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_storage.h
# src/os/unix/crashlog_unix.cpp
# src/rail.h
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_cmd.cpp
# src/road_map.h
# src/saveload/labelmaps_sl.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/table/settings/world_settings.ini
# src/tests/test_script_admin.cpp
# src/textfile_gui.cpp
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/window.cpp
# src/window_gui.h
# src/window_type.h
2023-11-19 13:00:21 +00:00
Jonathan G Rennison
3436e0a781
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/error.h
# src/error_gui.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/misc_gui.cpp
# src/newgrf_gui.cpp
# src/news_gui.cpp
# src/rail_cmd.cpp
# src/saveload/gamelog_sl.cpp
# src/script/api/script_text.cpp
# src/script/script_instance.cpp
# src/statusbar_gui.cpp
# src/strings.cpp
# src/strings_func.h
# src/strings_internal.h
# src/table/settings/gui_settings.ini
# src/table/settings/linkgraph_settings.ini
# src/textbuf_gui.h
2023-11-09 01:55:23 +00:00
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Jonathan G Rennison
290822d150
Update viewport positions in two stages
2023-09-18 21:44:17 +01:00
Niels Martin Hansen
41de0d46f3
Feature: Help and manuals access window
2023-09-13 16:11:08 +02:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
merni-ns
fc9afb2d32
Fix #11115 : Focus the abandon game/exit game windows ( #11125 )
2023-07-14 13:57:45 +02:00
PeterN
f51f117b00
Change: Add window description flag to disallow interactive window closing. ( #11008 )
...
This replaces/simplifies testing for a closebox to allow closing a window with right-click, and testing for specific window classes when closing all windows by hotkey.
This allows right-click closing of dropdowns and the high-score window.
2023-06-14 17:24:14 +01:00
Patric Stout
7634553d22
Feature: opt-in survey when exiting a game
...
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.
When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU
All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
2023-05-14 23:22:02 +02:00
Rubidium
bcfe0fb076
Codechange: introduce GetMainWindow() to properly account for nullptr checks
...
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
2023-01-14 21:15:23 +01:00
Tyler Trahan
4ffe7e0477
Fix #10198 : Rearrange Intro GUI to make button rows narrower ( #10203 )
2022-12-25 13:26:26 -05:00
Artin Alavi
cbac243216
Feature: [UI] Split AI/Game Script configuration windows and add them to world gen window ( #10058 )
2022-11-10 21:39:09 +01:00
frosch
e8bff0ad03
Change: Suppress panning in intro game, while user is interacting with the GUI. ( #9645 )
2021-10-23 15:13:39 +02:00
Niels Martin Hansen
6bd3106681
Feature: Multiple rotating views on title screen
2021-09-12 19:46:48 +02:00
Owen Rudge
535e18b54e
Change: Don't display OS name when the user is exiting the game
2020-12-09 09:21:34 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
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.
2019-03-20 19:24:55 +01:00
Patric Stout
72c5f2b3ee
Remove: DOS support
...
In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.
Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.
Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.
By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.
Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
2019-03-19 23:22:51 +01:00
Patric Stout
f58db44ff2
Remove: BeOS support (deprecated by Haiku)
...
In 10 years there is no commit to change how BeOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).
With the arrival of SDL2 (and removal of SDL), BeOS is no longer
support. SDL2 suggests to use Haiku instead of BeOS.
2019-03-05 22:03:00 +01:00
Patric Stout
7784d77713
Remove: MorphOS / AmigaOS support
...
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).
With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.
If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
2019-03-05 22:03:00 +01:00
frosch
7b553d255e
(svn r27732) -Change: Turn the message about 'missing baseset sprites' from a popup into a static message that only shows in non-release versions, just like the 'missing translations' message.
2017-01-14 18:30:26 +00:00
alberth
0adfb1ac6f
(svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit.
2016-09-04 16:06:50 +00:00
alberth
88bdf482c0
(svn r27648) -Codechange: Remove remaining _saveload_mode usage.
2016-09-04 12:56:56 +00:00
frosch
33f4f0b464
(svn r26986) -Change: Rename 'Advanced Settings' to just 'Settings'.
2014-10-09 21:16:29 +00:00
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
2014-04-23 20:13:33 +00:00
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
2013-05-26 19:25:01 +00:00
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
2013-05-26 19:23:42 +00:00
frosch
ff6880f9dd
(svn r24791) -Remove: Difficulty settings window.
2012-12-05 19:37:15 +00:00
frosch
d1ab0f03bc
(svn r24790) -Remove: Classic difficulty profiles.
2012-12-05 19:36:41 +00:00
frosch
03736af2ae
(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.
2012-11-11 16:10:43 +00:00
truebrain
5718c2e2e3
(svn r23607) -Add: wire GameScript in all the GUIs
2011-12-19 20:56:06 +00:00
truebrain
05af1d176b
(svn r23536) -Codechange: document and rename widgets to be consistent and understandable
2011-12-16 16:49:53 +00:00
truebrain
2aa774e831
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
2011-12-15 22:22:55 +00:00
rubidium
420d358fef
(svn r23475) -Codechange: queue critical error messages, so when multiple happen you won't miss any
2011-12-10 15:14:11 +00:00