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
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
Jonathan G Rennison
2a31095118
Merge branch 'master' into jgrpp
...
# Conflicts:
# regression/regression/result.txt
# src/aircraft_cmd.cpp
# src/airport_gui.cpp
# src/articulated_vehicles.cpp
# src/console_cmds.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/genworld_gui.cpp
# src/gfx_layout_fallback.cpp
# src/group_gui.cpp
# src/hotkeys.cpp
# src/network/core/tcp_connect.cpp
# src/network/core/tcp_listen.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_engine.cpp
# src/newgrf_gui.cpp
# src/newgrf_station.cpp
# src/openttd.cpp
# src/order_gui.cpp
# src/os/macosx/osx_main.cpp
# src/pathfinder/yapf/yapf_node_rail.hpp
# src/rail_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/cargopacket_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/station_sl.cpp
# src/script/api/script_industrytype.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_table.cpp
# src/settingsgen/settingsgen.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_game_calendar.h
# src/timer/timer_manager.h
# src/timer/timer_window.cpp
# src/timetable_cmd.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/vehicle_cmd.h
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_func.h
# src/window_gui.h
2023-11-25 13:30:06 +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
frosch
de3f29d7b2
Add: store base graphics parameters in openttd.cfg.
2023-10-31 01:41:50 +01:00
frosch
0b7ecf6102
Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg.
2023-10-31 01:41:50 +01:00
frosch
97df27e41f
Codechange: Store base graphics settings in a separate section in openttd.cfg.
2023-10-31 01:41:50 +01:00
Peter Nelson
69e20e79ab
Codechange: Add const versions of GetItem/GetGroup, and sprinkle liberally.
...
Non-const version of GetItem is not needed.
2023-10-20 18:37:27 +01:00
Peter Nelson
233aac567b
Codechange: Use std::list instead of C-linked list for ini files.
...
This removes self-management of memory with new/delete and allows simpler iteration.
2023-10-20 18:37:27 +01:00
Peter Nelson
1fecbeff76
Codechange: Remove create parameter from IniLoadFile::GetGroup.
...
GetGroup now only returns nullptr if the group does not exist.
Use GetOrCreateGroup to create a group.
This avoids creating groups while reading ini files.
2023-10-20 18:37:27 +01:00
Peter Nelson
0c85ce29ea
Codechange: Pass ini file by reference and prefer automatic storage.
...
This avoids new/delete operations, and (not) checking for nullptr.
2023-10-20 18:37:27 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Jonathan G Rennison
c8817d7f4e
Merge branch 'master' into jgrpp
...
# Conflicts:
# os/macosx/notarize.sh
# src/3rdparty/CMakeLists.txt
# src/3rdparty/squirrel/squirrel/sqcompiler.cpp
# src/3rdparty/squirrel/squirrel/sqdebug.cpp
# src/3rdparty/squirrel/squirrel/sqvm.cpp
# src/console_cmds.cpp
# src/core/span_type.hpp
# src/crashlog.cpp
# src/currency.h
# src/date_gui.cpp
# src/driver.cpp
# src/fios.cpp
# src/genworld_gui.cpp
# src/hotkeys.cpp
# src/misc_gui.cpp
# src/music/os2_m.cpp
# src/network/core/os_abstraction.h
# src/network/network_server.cpp
# src/newgrf.cpp
# src/newgrf_config.h
# src/newgrf_text.cpp
# src/openttd.cpp
# src/os/macosx/font_osx.cpp
# src/os/macosx/misc_osx.cpp
# src/os/os2/CMakeLists.txt
# src/os/os2/os2.cpp
# src/os/unix/CMakeLists.txt
# src/os/windows/font_win32.cpp
# src/os/windows/win32_main.cpp
# src/saveload/saveload.cpp
# src/script/api/script_text.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/stdafx.h
# src/strings.cpp
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_cmd.cpp
# src/video/dedicated_v.cpp
# src/video/video_driver.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/waypoint_gui.cpp
# src/widgets/dropdown_type.h
# src/window.cpp
# src/window_gui.h
2023-09-12 20:06:47 +01:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Jonathan G Rennison
ead18b2af2
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/3rdparty/md5/md5.h
# src/3rdparty/squirrel/squirrel/squtils.h
# src/animated_tile.cpp
# src/console_func.h
# src/core/CMakeLists.txt
# src/core/container_func.hpp
# src/core/smallstack_type.hpp
# src/crashlog.cpp
# src/crashlog.h
# src/debug.h
# src/economy.cpp
# src/gamelog.cpp
# src/industry_gui.cpp
# src/lang/catalan.txt
# src/misc_gui.cpp
# src/network/network_content.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/newgrf_gui.cpp
# src/os/unix/font_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/rail_cmd.cpp
# src/saveload/animated_tile_sl.cpp
# src/script/api/script_tilelist.cpp
# src/settings.cpp
# src/settingsgen/settingsgen.cpp
# src/sl/oldloader_sl.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/strgen/strgen.cpp
# src/strgen/strgen_base.cpp
# src/table/settings/gui_settings.ini
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_cmd.cpp
# src/vehicle_gui_base.h
# src/viewport_sprite_sorter.h
2023-07-02 12:02:36 +01:00
PeterN
64d6ad50f9
Codechange: Split GetItem with GetOrCreateItem. ( #10952 )
...
`IniGroup::GetItem()` returns nullptr if the item does not exist, but does not if the create parameter is set to true. Resolve CodeQL warnings with `GetOrCreateItem()` which returns a reference to the item instead.
2023-06-05 18:29:52 +00:00
Jonathan G Rennison
b381a30d2d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/base_media_func.h
# src/cargopacket.h
# src/gfxinit.cpp
# src/industry_cmd.cpp
# src/window_gui.h
2023-05-26 20:08:05 +01:00
Rubidium
07860e67e2
Codechange: use fmt::format_to to format the help message
2023-05-20 16:50:03 +02:00
Rubidium
d9a04ba446
Codechange: make the MD5 hash/digest/checksum variables a std::array
2023-05-19 11:24:44 +02:00
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
2023-04-25 17:55:09 +02:00
Rubidium
43c65a3fec
Codechange: use std::string for base media filename/warning storage
2023-04-25 15:01:08 +02:00
Jonathan G Rennison
ae9b416684
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/ai/ai_core.cpp
# src/ai/ai_gui.cpp
# src/ai/ai_instance.cpp
# src/console_cmds.cpp
# src/engine_type.h
# src/game/game_gui.cpp
# src/game/game_instance.cpp
# src/goal.cpp
# src/goal_cmd.h
# src/lang/english.txt
# src/lang/estonian.txt
# src/network/network_client.cpp
# src/newgrf.cpp
# src/newgrf_generic.h
# src/openttd.cpp
# src/saveload/saveload.h
# src/script/api/script_log.cpp
# src/script/api/script_town.cpp
# src/settings_table.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/station_map.h
# src/strings.cpp
# src/table/settings/difficulty_settings.ini
# src/table/settings/gui_settings.ini
# src/tbtr_template_gui_main.h
# src/timetable_cmd.cpp
# src/timetable_cmd.h
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/water_cmd.cpp
2023-02-11 23:05:22 +00:00
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2023-02-10 17:19:35 +00:00
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
2023-01-29 20:28:45 +01:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
2021-06-13 12:45:45 +02:00
rubidium42
8c2e3a004e
Codechange: [Network] Do not leak os_abstraction.h via base_media_func.h
2021-04-27 18:17:34 +01:00
Michael Lutz
b408fe77f7
Codechange: Use std::string in file scanners.
2020-12-27 13:19:25 +01:00
Michael Lutz
dd138fc460
Codechange: Stringify config file paths.
2020-12-27 13:19:25 +01:00
frosch
cc1679e317
Codechange: Apple LLVM fails to implement std::optional::value() also on pretty recent version. Use operator* instead.
2020-12-14 23:50:50 +01:00
Michael Lutz
a49fdb7ebb
Codechange: Store base set related texts in std::strings.
2020-05-21 20:02:34 +02:00
Michael Lutz
715aa67a9c
Codechange: Use std::string in INI file parsing.
2020-05-21 20:02:34 +02:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Berbe
04c74355ba
Fix: IniLoadFile::LoadFromDisk expects filename but BaseMedia::AddFile provided full path ( #7348 )
2019-05-01 18:57:23 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02: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
Charles Pigott
5f86e1a390
Codechange: Silence -Wclass-memaccess warnings with GCC8
2018-06-27 22:54:46 +02:00
Alberth
1a5a95aa49
Fix: Make switch on MD5File::ChecksumResult complete to avoid compiler warning
2018-06-23 14:00:41 +02:00
Niels Martin Hansen
5ab06ef8a3
Fix: Don't complain if CAT music files are missing entirely
...
Just complain if an index into a CAT file that exists is invalid.
2018-06-15 23:09:17 +02:00
Charles Pigott
5c5267726f
Fix: Warning about base set template instantiations with clang
2018-04-21 16:28:50 +02:00
rubidium
29c2e73ba6
(svn r26637) -Fix [FS#6038]: segmentation fault when encountering a .obg/.obs/.obm with empty string/zero length/ MD5 checksums
2014-06-09 17:43:59 +00:00
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
2014-04-25 15:40:32 +00:00
rubidium
d336bf65df
(svn r26073) -Cleanup: unneeded check against NULL
2013-11-23 18:13:46 +00:00
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
2013-01-08 22:46:42 +00:00
rubidium
945469f993
(svn r24870) -Change: make the duplicate base set message slightly more verbose, and mention files with wrong md5 checksums or files that are missing explicitly
2012-12-29 10:35:33 +00:00
frosch
c9bcc42aa6
(svn r24496) -Fix [FS#5276]: Make sure all template functions are instantiated by at least one compilation unit.
2012-08-23 18:30:46 +00:00
yexo
fe31aa28c4
(svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro)
2012-08-20 21:01:40 +00:00
michi_cc
a9b6c5cd86
(svn r23886) -Codechange: Allow limiting the MD5 file hash to the first x bytes of the file.
2012-02-04 13:29:00 +00:00
rubidium
2b897b4fa0
(svn r23219) -Change: different directories for basesets and newgrfs. So data to baseset or newgrf, and gm to baseset
2011-11-14 21:34:27 +00:00
rubidium
15f671279d
(svn r23214) -Codechange: for base media sets pass the "search in tars" parameter to determine what to do
2011-11-14 19:24:22 +00:00