Commit Graph

117 Commits (jgrpp)

Author SHA1 Message Date
Peter Nelson be147651d4 Codechange: Replace GroupStatistics' num_engines with std::map. (#11849)
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.

(cherry picked from commit 8797cc7ef2)
4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 55d78a23be Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/include/squirrel.h
#	src/blitter/32bpp_sse_func.hpp
#	src/bridge_map.h
#	src/clear_map.h
#	src/company_manager_face.h
#	src/console_func.h
#	src/core/bitmath_func.hpp
#	src/core/endian_func.hpp
#	src/core/random_func.hpp
#	src/depot_map.h
#	src/elrail_func.h
#	src/fontcache.h
#	src/industry_map.h
#	src/map_func.h
#	src/newgrf_spritegroup.h
#	src/object_map.h
#	src/rail.h
#	src/rail_map.h
#	src/road_func.h
#	src/road_map.h
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/sl/oldloader.h
#	src/sprite.h
#	src/spritecache.h
#	src/station_func.h
#	src/station_map.h
#	src/story_base.h
#	src/strings_func.h
#	src/tile_cmd.h
#	src/tile_map.h
#	src/tile_type.h
#	src/town.h
#	src/town_map.h
#	src/tree_map.h
#	src/tunnel_map.h
#	src/tunnelbridge_map.h
#	src/vehicle_func.h
#	src/viewport_func.h
#	src/void_map.h
#	src/water.h
#	src/water_map.h
#	src/widget_type.h
4 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 5 months ago
Jonathan G Rennison ffff696b4e Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/cheat_gui.cpp
#	src/console_cmds.cpp
#	src/crashlog.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/group_cmd.cpp
#	src/landscape.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/saveload/afterload.cpp
#	src/script/api/script_date.cpp
#	src/sl/oldloader_sl.cpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/strings.cpp
#	src/subsidy_gui.cpp
#	src/survey.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_game_calendar.h
5 months ago
Peter Nelson bfb4254226 Fix: Changing default livery did not propagate to group liveries.
#11614 attempted to address this but did not handle 2CC properly, and changes to the default livery were not handled.
5 months ago
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
6 months ago
Peter Nelson 7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
7 months ago
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
10 months ago
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Jonathan G Rennison a9100e93cb Merge branch 'master' into jgrpp
# Conflicts:
#	src/group_cmd.cpp
#	src/lang/korean.txt
#	src/lang/simplified_chinese.txt
#	src/script/api/script_rail.cpp
#	src/tunnelbridge_cmd.cpp
1 year ago
SamuXarick b2a5ebcfc4
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI (#10227)
* Change: Store "all time" and "since minimum age" last year profits on groups

* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace

* Codechange: Refactor profit last year

* Change: Rename some group related items for clarity

* Change: Reorder the fields in GroupStatistics

That way less memory gets wasted.
1 year ago
Michael Lutz 57b82e2e99 Codechange: Don't use globals for story/goal/sign/group command proc return values. 2 years ago
Jonathan G Rennison 6c07758cc3 Do name generation at client, fix localisation
Use existing group creation command
3 years ago
Jonathan G Rennison 253772e9af Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	COMPILING.md
#	src/console.cpp
#	src/console_cmds.cpp
#	src/console_internal.h
#	src/rev.cpp.in
3 years ago
peter1138 a05bc04b63 Feature: Per-group wagon removal flag. 3 years ago
peter1138 c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 3 years ago
peter1138 27a956ba62 Codechange: Replace Group::replace_protection with Group::flags 3 years ago
Jonathan G Rennison f8d6e781ba Merge branch 'master' into jgrpp
# Conflicts:
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj.filters
#	src/base_consist.h
#	src/company_base.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/station_sl.cpp
#	src/settings.cpp
#	src/signs_base.h
#	src/string.cpp
#	src/string_func.h
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/null_v.cpp
4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 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
4 years ago
glx 4ae829cb27 Codechange: Replace FOR_ALL_GROUPS with range-based for loops 4 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 36eb4165b8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/bridge_map.h
#	src/crashlog.cpp
#	src/industry.h
#	src/linkgraph/linkgraph_type.h
#	src/order_type.h
#	src/saveload/afterload.cpp
#	src/settings.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/table/settings.h.preamble
#	src/train.h
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/viewport_func.h
#	src/widgets/station_widget.h
#	src/zoom_func.h
#	src/zoom_type.h
5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Charles Pigott 69a6c494bf Codechange: Set VehicleType's base type to byte instead of using VehicleTypeByte 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
Charles Pigott 49f7332b75 Feature #6053: Collapsible vehicle groups (3298) 5 years ago
Charles Pigott 8890436af1 Add #6189: Groups now count the total number of vehicles in subgroups (3298) 5 years ago
Jonathan G Rennison ddf31702a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/saveload/saveload.cpp
#	src/widgets/group_widget.h
5 years ago
PeterN 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
5 years ago
Jonathan G Rennison 6ec78ff4b0 Add UI setting to disable mass action buttons for top-level vehicle lists 6 years ago
peter1138 ed8f6f1a0f (svn r26450) -Feature: Hierarchical vehicle subgroups. 10 years ago
peter1138 567d0ff3a7 (svn r26450) -Feature: Hierarchical vehicle subgroups. 10 years ago
yexo 0ac47d4041 (svn r24541) -Cleanup [FS#5260]: remove unused function GetGroupArraySize (juanjo) 12 years ago
yexo b490d5ceab (svn r24541) -Cleanup [FS#5260]: remove unused function GetGroupArraySize (juanjo) 12 years ago
frosch 37301ea23d (svn r22985) -Feature: Display autoreplace status in group GUI. 13 years ago
frosch d071eefc54 (svn r22985) -Feature: Display autoreplace status in group GUI. 13 years ago
frosch f9f257ce4a (svn r22984) -Feature: Display profit icons for groups in the group GUI. 13 years ago
frosch 23a2f23eb3 (svn r22984) -Feature: Display profit icons for groups in the group GUI. 13 years ago
frosch f406385319 (svn r22981) -Add: GroupStatistics for the ALL_GROUP. 13 years ago
frosch dd74536bef (svn r22981) -Add: GroupStatistics for the ALL_GROUP. 13 years ago
frosch 3ecf9d424a (svn r22979) -Codechange: Add GroupStatistics::CountEngine(). 13 years ago
frosch fafa06e821 (svn r22979) -Codechange: Add GroupStatistics::CountEngine(). 13 years ago
frosch 3665b85c24 (svn r22978) -Codechange: Replace IncreaseGroupNumVehicle() and DecreaseGroupNumVehicle() with GroupStatistics::CountVehicle(). 13 years ago
frosch 68f969282e (svn r22978) -Codechange: Replace IncreaseGroupNumVehicle() and DecreaseGroupNumVehicle() with GroupStatistics::CountVehicle(). 13 years ago
frosch 4961cd06a9 (svn r22977) -Codechange: Rename SetCachedEngineCounts() to GroupStatistics::UpdateAfterLoad(). 13 years ago
frosch b78a459613 (svn r22977) -Codechange: Rename SetCachedEngineCounts() to GroupStatistics::UpdateAfterLoad(). 13 years ago
frosch c531453320 (svn r22976) -Codechange: Split group statistics into separate struct. 13 years ago