Commit Graph

64 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
2 weeks ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 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 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
5 months ago
Peter Nelson ddd609ce9b
Feature: Randomize direction of rail vehicle on build based on probability callback. (#11489)
This allows NewGRF authors to indicate that the game should randomly flip rail vehicles on build, without needing to use random bits nor duplicate sprites to handle it themselves.

To use this functionality, test for callback 162 (CBID_VEHICLE_BUILD_PROBABILITY)  and var10 = 0 (values other than 0 are reserved for future use), and return a value between 0 and 100 inclusive.

The return value is a percentage chance of reversing the vehicle. A value of 0 will always build a forward facing vehicle, and 100 will always build a reverse facing vehicle.
6 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 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
Jonathan G Rennison 5718730d68 VarAction2: Add support for more varaction2 types
Add CB failure and deterministic relative types
1 year ago
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
1 year ago
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 1 year ago
Jonathan G Rennison 33dc6c9688 Add NewGRF VarAction2 variable remapping infrastructure 2 years ago
Jonathan G Rennison 9e946d4c5d Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/command.cpp
#	src/console_cmds.cpp
#	src/group_gui.cpp
#	src/lang/catalan.txt
#	src/lang/czech.txt
#	src/lang/danish.txt
#	src/lang/greek.txt
#	src/lang/hungarian.txt
#	src/lang/irish.txt
#	src/lang/japanese.txt
#	src/lang/luxembourgish.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/romanian.txt
#	src/lang/russian.txt
#	src/lang/serbian.txt
#	src/lang/simplified_chinese.txt
#	src/lang/slovak.txt
#	src/lang/spanish_MX.txt
#	src/lang/swedish.txt
#	src/lang/tamil.txt
#	src/lang/traditional_chinese.txt
#	src/lang/turkish.txt
#	src/lang/ukrainian.txt
#	src/lang/vietnamese.txt
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_func.h
#	src/network/network_internal.h
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/saveload/afterload.cpp
#	src/saveload/newgrf_sl.cpp
#	src/saveload/saveload.h
#	src/script/script_instance.cpp
#	src/toolbar_gui.cpp
#	src/toolbar_gui.h
#	src/vehicle_gui.cpp
#	src/widgets/rail_widget.h
#	src/widgets/vehicle_widget.h
#	src/window.cpp
3 years ago
Jonathan G Rennison faf32200cf Merge tag '12.0-beta1' into jgrpp-beta
# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/build_vehicle_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/fios.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/network/core/game_info.cpp
#	src/network/core/game_info.h
#	src/network/core/tcp_game.cpp
#	src/network/core/tcp_game.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_coordinator.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf_engine.cpp
#	src/openttd.cpp
#	src/rev.cpp.in
#	src/settings_type.h
#	src/train.h
#	src/train_cmd.cpp
3 years ago
frosch 111a47af0d Codechange: rename 'info_view' to 'rotor_in_gui', because it is only used by helicopters. 3 years ago
frosch bc984d9af5 Codechange: remove redundant 'info_view' parameter, it can be derived from 'image_type'. 3 years ago
Jonathan G Rennison 2bd535e834 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/engine_base.h
#	src/gfxinit.cpp
#	src/graph_gui.cpp
#	src/lang/brazilian_portuguese.txt
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/korean.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/portuguese.txt
#	src/lang/russian.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/network/core/address.cpp
#	src/network/core/game_info.h
#	src/network/core/os_abstraction.h
#	src/network/core/udp.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_internal.h
#	src/newgrf_engine.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/string_func.h
#	src/town_gui.cpp
#	src/video/video_driver.cpp
#	src/widget_type.h
3 years ago
Vít Šefl 2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles (#9346) 3 years ago
PeterN 3dbd6475fe
Codechange: Use C++ features for train wagon overrides. (#9141)
This removes the need for C-style array management and allows use of iterators to perform wagon override lookups.
3 years ago
Jonathan G Rennison 810bfd276e Add several NewGRF variables to vehicle image callback whitelist
Add vehicle flags to control cached image invalidation

Various refactorings
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
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
frosch d9d669dcf8 (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 6 years ago
frosch 82ae414e8d (svn r27928) -Fix: [NewGRF] While executing random triggers, var 5F should include the new triggers.
-Fix: [NewGRF] Reset used random triggers only after all A123 chains have been resolved, so that all RA2 in all chains can test the shard triggers. This also includes multiple RA2 in the same A123 chain.
-Fix: [NewGRF] Industry random triggers are stored per tile, even when randomising the shared random bits of the parent industry.
7 years ago
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
frosch 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
alberth 33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 12 years ago
alberth 69e07c3e00 (svn r24691) -Codechange: Add resolver classes for vehicles. 12 years ago
frosch ed3c734d0a (svn r24332) -Change/Fix [FS#2553]: [NewGRF] Change the length of 8/8 roadvehicles in vehicle lists to 32 pixels; this is in fact the correct length as can be seen in corners for short articulated parts following each other. It also looks fine for most old GRFs, thus there is no need for a switch. 12 years ago
frosch 8ec00c4cc9 (svn r24321) -Change/Fix [FS#4254]: [NewGRF] Group vehicles in the purchase list properly by source GRF, but also consider engine GRFID overrides. 12 years ago
frosch 50b480b959 (svn r23174) -Codechange: Deduplicate code between GetEngineProperty() and GetVehicleProperty(). 13 years ago
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 13 years ago
frosch acc3c75951 (svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code. 13 years ago
rubidium 398418b8fa (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int 14 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
frosch f129634f52 (svn r16867) -Feature(ette): Turn variable 0E/8E (vertical offset for trains in depot) and variable 1E/9E bit 3 (wagon width in depot) into grf-local variables. 15 years ago
yexo 8bc9adde19 (svn r16648) -Codechange: move some more includes around 15 years ago
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 15 years ago
rubidium ada3067960 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 15 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
peter1138 e6a1f1c012 (svn r13761) -Codechange: Remove dependency on rail for altering purchase list position (mostly function renaming) 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
peter1138 3e0b6199c4 (svn r12932) -Fix [FS#1970]: Articulated engines ignored GRF engine overrides. 16 years ago
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 16 years ago
peter1138 f8612ad5b9 (svn r12872) -Codechange: Remove obsolete unused engine list order function 16 years ago
peter1138 ab8382c0db (svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
17 years ago