Commit Graph

305 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 81a1094cc8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/date.cpp
#	src/economy.cpp
#	src/misc.cpp
#	src/newgrf_house.cpp
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
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
Jonathan G Rennison e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
6 years ago
frosch 18ca3e8660 Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits. 6 years ago
Charles Pigott b5028efc1f Fix: Protect against a few out of bounds or uninitialised usage errors 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Jonathan G Rennison 385a2552e9 Merge branch 'enhanced_viewport_overlay' into jgrpp 6 years ago
frosch 55a503e6f2 (svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:
- nvar=0 is meant to return the calculated result.
  - Missing references resolve to NULL and got identified with the default result.
  - Missing 'break' broke overlapping cases.
  - Splitting into non-overlapping cases could result in more than 256 cases.
6 years ago
frosch a537fd5d0e (svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:
- nvar=0 is meant to return the calculated result.
  - Missing references resolve to NULL and got identified with the default result.
  - Missing 'break' broke overlapping cases.
  - Splitting into non-overlapping cases could result in more than 256 cases.
6 years ago
frosch 07d841d0ef (svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges, sort them and resolve them using binary search. Speedup sprite resolving by about 7 percent. 6 years ago
frosch 30f73d907a (svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges, sort them and resolve them using binary search. Speedup sprite resolving by about 7 percent. 6 years ago
frosch d9d669dcf8 (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 6 years ago
frosch 29dca1be3b (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 6 years ago
frosch 7c406f0d9d (svn r27983) -Codechange: Reduce complexity of VA2 add-div/mod adjustments 6 years ago
frosch 2a3d0cea50 (svn r27983) -Codechange: Reduce complexity of VA2 add-div/mod adjustments 6 years ago
frosch 4fc178aebd (svn r27982) -Codechange: Reduce invocations of GetGlobalVariable. Speedup sprite resolving by about 3 percent. 6 years ago
frosch aee8ffc73b (svn r27982) -Codechange: Reduce invocations of GetGlobalVariable. Speedup sprite resolving by about 3 percent. 6 years ago
Jonathan G Rennison 740e4543c3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/industry_cmd.cpp
7 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 ffdcbb8f21 (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
Jonathan G Rennison d733955d33 Add road vehicle state to UpdateViewport()->GetImage() var whitelist.
Minor refactoring of var check.
8 years ago
Jonathan G Rennison 7b56097f50 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	src/linkgraph/demands.cpp
#	src/linkgraph/mcf.cpp
#	src/linkgraph/refresh.cpp
#	src/linkgraph/refresh.h
#	src/smallmap_gui.cpp
8 years ago
Jonathan G Rennison 3ac94e97c8 Cache the result of GetImage() in Vehicle::UpdateViewport() where possible.
Sprite number is not cached if callback is made, or a variable access
outside a whitelist occurs.
Invalidate cached sprite number when direction or cargo changes,
or vehicle is marked dirty.
8 years ago
frosch 2782993dd7 (svn r27600) -Fix: [NewGRF] shift-and-add-divide/modulo varadjusts use signed division/modulo. 8 years ago
frosch a073b276ba (svn r27600) -Fix: [NewGRF] shift-and-add-divide/modulo varadjusts use signed division/modulo. 8 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
rubidium 101b982263 (svn r26475) -Fix: potentially undefined shifts in NewGRF code 10 years ago
rubidium bbed2ff956 (svn r26475) -Fix: potentially undefined shifts in NewGRF code 10 years ago
frosch ce92faf682 (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch cefdd69748 (svn r26173) -Change: [NewGRF] Reset the temporary storage registers for every sprite resolving. 11 years ago
frosch a9e8d7a361 (svn r26173) -Change: [NewGRF] Reset the temporary storage registers for every sprite resolving. 11 years ago
frosch badbd2f894 (svn r26172) -Codechange: Make SpriteGroup::Resolve aware of nested calls. 11 years ago
frosch 3eea1befa7 (svn r26172) -Codechange: Make SpriteGroup::Resolve aware of nested calls. 11 years ago
frosch 6c63c98d7f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
planetmaker f00d9976f9 (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch f5131bd588 (svn r24695) -Fix/Cleanup: Remove remaining (incorrect) usages of ResolverObject::scope and count. 12 years ago
frosch b65ece1ea9 (svn r24695) -Fix/Cleanup: Remove remaining (incorrect) usages of ResolverObject::scope and count. 12 years ago
alberth 6c1ff5f772 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 12 years ago
alberth 33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 12 years ago
alberth 8a297ca5f1 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 12 years ago
alberth 4c9bea2a71 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 12 years ago
alberth 818332f3e8 (svn r24679) -Codechange: Add resolver classes for towns. 12 years ago
alberth b985c4c0f8 (svn r24679) -Codechange: Add resolver classes for towns. 12 years ago
alberth 6a619b40d5 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 12 years ago
alberth 438495b433 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 12 years ago
rubidium d5eeab43b7 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 33d71b45fe (svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free 13 years ago
rubidium 7fd1e1df81 (svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free 13 years ago
frosch 8bfc1ebf9f (svn r23153) -Change: [NewGRF v8] Use heightlevel units in variable 20/A0. 13 years ago
frosch 5aaecae6e2 (svn r23153) -Change: [NewGRF v8] Use heightlevel units in variable 20/A0. 13 years ago
frosch 46e77ee24f (svn r23138) -Feature: [NewGRF] Allow passing 32bit parameters to 60+x variables (using var 7B). Currently most useful for vehicle var 60. 13 years ago
frosch 1ad7239247 (svn r23138) -Feature: [NewGRF] Allow passing 32bit parameters to 60+x variables (using var 7B). Currently most useful for vehicle var 60. 13 years ago
frosch 6eb0ebf7df (svn r23136) -Change: [NewGRF v8] Deprecate old-style callback results 0xFF??. 13 years ago
frosch e08a227b53 (svn r23136) -Change: [NewGRF v8] Deprecate old-style callback results 0xFF??. 13 years ago
frosch bf664cd68d (svn r22924) -Codechange: Enhance NewGRFSpriteLayout for drawing construction stages in spritelayouts with inconsistent number of sprites per spriteset. 13 years ago
frosch 7f228d6909 (svn r22924) -Codechange: Enhance NewGRFSpriteLayout for drawing construction stages in spritelayouts with inconsistent number of sprites per spriteset. 13 years ago
frosch bd696a6288 (svn r22923) -Codechange: Move application of the construction stage into TileLayoutSpriteGroup::ProcessRegisters(). 13 years ago
frosch de27360549 (svn r22923) -Codechange: Move application of the construction stage into TileLayoutSpriteGroup::ProcessRegisters(). 13 years ago
frosch 0f8065fef4 (svn r22635) -Fix: Correctly reseed random bits of industries and industry tiles. 13 years ago
frosch 8930337aae (svn r22635) -Fix: Correctly reseed random bits of industries and industry tiles. 13 years ago
terkhen 3d96adb03f (svn r22564) -Codechange: Rename Get and Store persistent storage functions to GetValue and StoreValue. 13 years ago
terkhen 0749c65d74 (svn r22564) -Codechange: Rename Get and Store persistent storage functions to GetValue and StoreValue. 13 years ago
terkhen ac4f4447e0 (svn r22563) -Codechange: Use a function for storing values inside the persistent storage. 13 years ago
terkhen dc6218aa49 (svn r22563) -Codechange: Use a function for storing values inside the persistent storage. 13 years ago
frosch becf6c823f (svn r22518) -Feature: [NewGRF] Advanced sprite layouts with register modifiers. 13 years ago
frosch a241a4ce97 (svn r22518) -Feature: [NewGRF] Advanced sprite layouts with register modifiers. 13 years ago
frosch 5ca3ac41f0 (svn r22457) -Codechange: Make the NewGRFSpriteLayout a direct member of TileLayoutSpriteGroup instead of allocating it separately. 13 years ago
frosch e55f849a29 (svn r22457) -Codechange: Make the NewGRFSpriteLayout a direct member of TileLayoutSpriteGroup instead of allocating it separately. 13 years ago
frosch 90337d88dd (svn r22456) -Codechange: Derive NewGRFSpriteLayout from DrawTileSprites for spritelayouts allocated on the heap, and make use of constructors and destructors. 13 years ago
frosch 7415b9cca2 (svn r22456) -Codechange: Derive NewGRFSpriteLayout from DrawTileSprites for spritelayouts allocated on the heap, and make use of constructors and destructors. 13 years ago
frosch 3de71010d6 (svn r21604) -Add: Variable 7B for accessing 60+x variables while taking the parameter from the accumulator. 14 years ago
frosch 256fe89b38 (svn r21604) -Add: Variable 7B for accessing 60+x variables while taking the parameter from the accumulator. 14 years ago
rubidium 878a06dd9a (svn r21198) -Fix: don't call variables properties in debug messages 14 years ago
rubidium a6a2fbd937 (svn r21198) -Fix: don't call variables properties in debug messages 14 years ago
rubidium 360d6daf34 (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
frosch f273f2a656 (svn r20333) -Fix (r20332): Mask second operand to 5 bits to avoid differences between platforms. 14 years ago
frosch 1a9d5ae076 (svn r20333) -Fix (r20332): Mask second operand to 5 bits to avoid differences between platforms. 14 years ago
frosch 253fd969fd (svn r20332) -Add: [NewGRF] AdvVarAct2 operators for SHL, SHR and SAR. 14 years ago
frosch 0e5c562da4 (svn r20332) -Add: [NewGRF] AdvVarAct2 operators for SHL, SHR and SAR. 14 years ago
frosch d006eff7a9 (svn r19497) -Fix: [NewGRF] Bytes and words get sign-extended for temporary/persistent storage. (Spotted by yexo) 14 years ago
frosch c049bf3f38 (svn r19497) -Fix: [NewGRF] Bytes and words get sign-extended for temporary/persistent storage. (Spotted by yexo) 14 years ago
rubidium 9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 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 0e39e68794 (svn r18699) -Fix [FS#PlanetAndy]: GRF parameters were not properly initialised to zero, and not always checked for valid range. 15 years ago
frosch 666c856457 (svn r18699) -Fix [FS#PlanetAndy]: GRF parameters were not properly initialised to zero, and not always checked for valid range. 15 years ago
frosch 01737c0a52 (svn r17672) -Revert (r8081): 'last_value' and 'reseed' are shared between procedure and main chain.
-Fix (r8075): 'scope' and 'count' are not.
15 years ago
frosch 2fa312aab9 (svn r17672) -Revert (r8081): 'last_value' and 'reseed' are shared between procedure and main chain.
-Fix (r8075): 'scope' and 'count' are not.
15 years ago
frosch 7903e2be91 (svn r17670) -Cleanup (r12819): ResolverObject::procedure_call is not used anymore. 15 years ago
frosch d8eec0ebf0 (svn r17670) -Cleanup (r12819): ResolverObject::procedure_call is not used anymore. 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium d39f442bd0 (svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED) 15 years ago
rubidium e3c5bc8d2e (svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED) 15 years ago
rubidium c496a3e014 (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
rubidium 846382a0f3 (svn r16402) -Codechange: make Resolve a function of SpriteGroup 15 years ago
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 15 years ago
rubidium 730b411878 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 15 years ago
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 15 years ago
smatz 50624d5c0f (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
rubidium b27adec700 (svn r16336) -Codechange: make the SpriteGroup pool more like the 'normal' pools 15 years ago
rubidium 10ea72a08e (svn r16336) -Codechange: make the SpriteGroup pool more like the 'normal' pools 15 years ago
rubidium f3e0fd7416 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 15 years ago
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 15 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
frosch d54d8bf295 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 16 years ago
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 16 years ago
peter1138 ea965c21e1 (svn r13544) -Codechange: Add support for NewGRF varaction2 variable 5F. 16 years ago
peter1138 26879ce24a (svn r13544) -Codechange: Add support for NewGRF varaction2 variable 5F. 16 years ago
rubidium 1ce0b03bf0 (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
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
glx 5b1e423889 (svn r12947) -Fix: keep only first 15 bits for non failed callback results 16 years ago
glx 9eb498eb53 (svn r12947) -Fix: keep only first 15 bits for non failed callback results 16 years ago
rubidium e947fde701 (svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits. 16 years ago
rubidium 5ef8c01ce7 (svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits. 16 years ago
belugas d2b55e7afd (svn r12760) -Fix(r12759): Remove a now useless comment 16 years ago
belugas 6daaf0fc55 (svn r12760) -Fix(r12759): Remove a now useless comment 16 years ago
glx 90616adcb0 (svn r12452) -Feature: [NewGRF] Add random action 2 type 84. For vehicles only. 16 years ago
glx bbdb831301 (svn r12452) -Feature: [NewGRF] Add random action 2 type 84. For vehicles only. 16 years ago
maedhros 7d2a1e5a69 (svn r12388) -Fix (r12352): Callback 14 (station sprite layout) is a 15-bit callback. 16 years ago
maedhros 9dffdaca0d (svn r12388) -Fix (r12352): Callback 14 (station sprite layout) is a 15-bit callback. 16 years ago
frosch 3eaf7af980 (svn r12358) -Fix: Callback 2F returns 15 bit results starting from grf version 7. 16 years ago
frosch ec59843136 (svn r12358) -Fix: Callback 2F returns 15 bit results starting from grf version 7. 16 years ago
frosch c9c870b768 (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
Var 0x7E procedure-results are always 15 bit.
  Callbacks 0x2A, 0x2C, 0x36 (sometimes), 0x39 and 0x145 are 15 bit.
  Non-varaction2-calculated callback-results are also affected by the 8bit masking.
17 years ago
frosch 51bbf0c84f (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
Var 0x7E procedure-results are always 15 bit.
  Callbacks 0x2A, 0x2C, 0x36 (sometimes), 0x39 and 0x145 are 15 bit.
  Non-varaction2-calculated callback-results are also affected by the 8bit masking.
17 years ago
peter1138 be47b47507 (svn r12139) -Fix (r12124): The global variable value should be returned, not the variable. 17 years ago
peter1138 859d768bb7 (svn r12139) -Fix (r12124): The global variable value should be returned, not the variable. 17 years ago
frosch 0aece5ed6b (svn r12124) -Codechange: Move newgrf-variables that are common to VarAction2 and Action7/9/D to their own function.
-Fix: Add some variables that were missing in one or both cases.
17 years ago
frosch c2bad6d22c (svn r12124) -Codechange: Move newgrf-variables that are common to VarAction2 and Action7/9/D to their own function.
-Fix: Add some variables that were missing in one or both cases.
17 years ago
belugas e5de785e1d (svn r12045) -Feature-ette(newGRF): Add support for var 12, Variational Action 2 17 years ago
belugas 90973cdcef (svn r12045) -Feature-ette(newGRF): Add support for var 12, Variational Action 2 17 years ago
rubidium 9c0c798dd8 (svn r11834) -Codechange: only include settings_type.h if needed. 17 years ago
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 17 years ago
rubidium db73addb43 (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium 8ebdfb258f (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
skidd13 98f66552be (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 17 years ago