Commit Graph

66 Commits (f034714559c65829dd159c3150e681defdc4b26b)

Author SHA1 Message Date
Jonathan G Rennison f034714559 Use StringBuilder for GetString/GetStringWithArgs, as per upstream
Update dependent code as required
5 months ago
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
7 months ago
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
9 months ago
Jonathan G Rennison 508f871c5f Use core/format.hpp for fmt includes 11 months ago
Rubidium af9b9327af Codechange: do not keep local variable for temporary string parameters 11 months ago
Rubidium 78f5d58dc6 Codechange: use std::string without const as return
Otherwise some compilers, e.g. MSVC, do not pick up that these are temporaries
and as such it will pass the temporaries to `const std::string &` instead of
the wanted `std::string &&`
11 months ago
Jonathan G Rennison d09b504bc5 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-source.yml
#	.github/workflows/release.yml
#	CMakeLists.txt
#	COMPILING.md
#	src/ai/ai_core.cpp
#	src/ai/ai_gui.cpp
#	src/bridge_gui.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/CMakeLists.txt
#	src/core/smallmap_type.hpp
#	src/disaster_vehicle.h
#	src/effectvehicle_base.h
#	src/fontcache.cpp
#	src/game/game_core.cpp
#	src/game/game_gui.cpp
#	src/gamelog.cpp
#	src/gamelog_internal.h
#	src/group_gui.cpp
#	src/linkgraph/linkgraph.h
#	src/misc.cpp
#	src/network/core/config.h
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_profiling.cpp
#	src/newgrf_profiling.h
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/openttd.h
#	src/order_gui.cpp
#	src/os/windows/font_win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_controller.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/script/script_config.cpp
#	src/script/script_config.hpp
#	src/script/script_instance.cpp
#	src/script/script_scanner.cpp
#	src/script/squirrel.cpp
#	src/script/squirrel_helper.hpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings/network_private_settings.ini
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/window_gui.h
11 months ago
Rubidium d4c2043294 Codechange: remove a number of unneeded c_str() calls 12 months ago
Loïc Guilloux 1cd49bf5e5
Fix ca1e34c: [Script] Wrong value printed for {RAW_STRING} (#11011) 12 months ago
Rubidium 2ae7367024 Codechange: replace StrMakeValidInPlace with StrValid 12 months ago
Rubidium ca1e34c121 Codechange: use std::string to build ScriptText's encoded text 1 year ago
Jonathan G Rennison 3a47b421b0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/core/overflowsafe_type.hpp
#	src/economy.cpp
#	src/engine_base.h
#	src/ground_vehicle.cpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/newgrf_commons.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_industries.cpp
#	src/newgrf_object.cpp
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/rail_gui.cpp
#	src/road_cmd.h
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/script/api/script_log.cpp
#	src/script/api/script_log.hpp
#	src/settings_gui.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/station_gui.cpp
#	src/strgen/strgen.cpp
#	src/string_func.h
#	src/string_type.h
#	src/table/settings/network_private_settings.ini
#	src/tests/math_func.cpp
#	src/textfile_gui.cpp
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
#	src/waypoint_cmd.h
#	src/widgets/dropdown.cpp
1 year ago
Rubidium 63d9bb93b8 Codechange: migrate from C-style GetString to C++-style GetString 1 year ago
Rubidium d9e93edc8b Codechange: replace 'const char *' script API parameters with std::string 1 year ago
Rubidium 8f24901843 Codechange: replace printf with PRINTF macros by fmt::format for scripts 1 year ago
Jonathan G Rennison 82803b98e0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/game/game_gui.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf.cpp
#	src/order_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_text.cpp
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/strings.cpp
#	src/table/settings/economy_settings.ini
#	src/table/settings/locale_settings.ini
#	src/timetable_gui.cpp
1 year ago
glx22 3a48d6e60f Fix 991a797: [Script] Allow STRINGN consumption to be different than expected 1 year ago
Jonathan G Rennison 29c451d1a8 Script: Only log each string parameter warning message once 1 year ago
Jonathan G Rennison a7efe91007 Script: More closely emulate old text param behaviour for 13 and below scripts 1 year ago
Jonathan G Rennison a6babb23d3 Script: Allow text param mismatches for scripts with 13 or below compatibility 1 year ago
Jonathan G Rennison faa77e2605 Merge branch 'master' into jgrpp
# Conflicts:
#	src/script/api/script_company.cpp
#	src/script/api/script_date.cpp
#	src/script/api/script_date.hpp
#	src/script/api/script_gamesettings.cpp
#	src/script/api/script_order.hpp
#	src/script/api/script_town.cpp
#	src/script/api/script_window.cpp
1 year ago
glx22 ce8cde3b8d Fix: [Script] Detect circular references in ScriptText 1 year ago
glx22 9a957f1d4b Change: [Script] Improve ScriptText validation error messages 1 year ago
Jonathan G Rennison 2ea1766677 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/league_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_object.hpp
#	src/script/squirrel_helper.hpp
#	src/settings_table.cpp
#	src/station_cmd.cpp
#	src/table/settings.h.preamble
#	src/tree_cmd.cpp
#	src/tree_map.h
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
1 year ago
Jonathan G Rennison ae7c86c49d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	src/industry_cmd.cpp
#	src/industry_cmd.h
#	src/network/core/http_curl.cpp
#	src/network/core/tcp_http.cpp
#	src/network/core/tcp_http.h
#	src/network/network_content.h
#	src/script/api/script_goal.cpp
#	src/script/api/script_industry.cpp
#	src/script/api/script_league.cpp
#	src/script/api/script_story_page.cpp
#	src/script/api/script_town.cpp
#	src/train.h
#	src/train_cmd.cpp
1 year ago
glx22 991a797e09 Change: [Script] Validate ScriptText parameters type and amount 1 year ago
Rubidium 728973859d Change: [Script] Automate the ScriptObject reference counting 1 year ago
glx22 a1fc4d5c0e Codechange: [Script] Merge the 3 ScriptText param arrays 1 year ago
glx22 3559576166 Codechange: [Script] Don't expose static buffers outside of ScriptText 1 year ago
glx22 e735370318 Change: [Script] A ScriptText with too many parameters is now a fatal error
It should never happen as adding/setting parameters already checks that anyway.
1 year ago
Jonathan G Rennison 62afd94b47 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/company_cmd.cpp
#	src/economy.cpp
#	src/lang/swedish.txt
#	src/network/network_command.cpp
#	src/news_gui.cpp
#	src/saveload/saveload.h
#	src/script/api/script_list.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/sdl2_v.cpp
3 years ago
Jonathan G Rennison 544da99102 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/cargopacket.h
#	src/lang/korean.txt
#	src/linkgraph/linkgraph.h
#	src/linkgraph/linkgraphjob.h
#	src/linkgraph/linkgraphschedule.h
#	src/network/network_admin.h
#	src/network/network_func.h
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/order_base.h
#	src/rail_cmd.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/depot_sl.cpp
#	src/saveload/economy_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/map_sl.cpp
#	src/saveload/newgrf_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/signs_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/subsidy_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_object.cpp
#	src/settings.cpp
#	src/string.cpp
#	src/string_func.h
#	src/table/CMakeLists.txt
#	src/table/settings/settings.ini
#	src/viewport_sprite_sorter_sse4.cpp
3 years ago
Rubidium 3237e97b35 Cleanup: [Script] Use nullptr instead of 0 or NULL 3 years ago
Patric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
3 years ago
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
3 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 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
cirdan e6122f5ce4 Remove ZeroedMemoryAllocator from ScriptText
Have ScriptText initialise all of its members on construction and
not derive from ZeroedMemoryAllocator.

(cherry picked from commit 3240126202d3437396004f2d5b0371783effb1ea)

Reorder ScriptText constructor initialisers.
8 years ago
rubidium 978d4e4eaa (svn r27102) -Fix [FS#6194]: money values would end up wrong in strings when outside of the bounds of a 32 bits integer 10 years ago
rubidium 730773f5f1 (svn r27102) -Fix [FS#6194]: money values would end up wrong in strings when outside of the bounds of a 32 bits integer 10 years ago
rubidium 65cab46a84 (svn r26774) -Cleanup [Squirrel]: remove _SC macro 10 years ago
rubidium 33ab505567 (svn r26774) -Cleanup [Squirrel]: remove _SC macro 10 years ago
rubidium 95549e6da5 (svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD 10 years ago
rubidium 7c4e9dd71d (svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD 10 years ago
rubidium 034735a54c (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 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