gzdoom/wadsrc/static/zscript/shared
Christoph Oelckers ac86a535e7 - fixed: State labels were resolved in the calling function's context instead of the called function one's.
This could cause problems with functions that take states as parameters but use them to set them internally instead of passing them through the A_Jump interface back to the caller, like A_Chase or A_LookEx.
This required some quite significant refactoring because the entire state resolution logic had been baked into the compiler which turned out to be a major maintenance problem.
Fixed this by adding a new builtin type 'statelabel'. This is an opaque identifier representing a state, with the actual data either directly encoded into the number for single label state or an index into a state information table.
The state resolution is now the task of the called function as it should always have remained. Note, that this required giving back the 'action' qualifier to most state jumping functions.

- refactored most A_Jump checkers to a two stage setup with a pure checker that returns a boolean and a scripted A_Jump wrapper, for some simpler checks the checker function was entirely omitted and calculated inline in the A_Jump function. It is strongly recommended to use the boolean checkers unless using an inline function invocation in a state as they lead to vastly clearer code and offer more flexibility.

- let Min() and Max() use the OP_MIN and OP_MAX opcodes. Although these were present, these function were implemented using some grossly inefficient branching tests.
- the DECORATE 'state' cast kludge will now actually call ResolveState because a state label is not a state and needs conversion.
2016-11-14 14:12:27 +01:00
..
blood.txt - converted a few more DECORATE files. 2016-10-14 00:40:20 +02:00
botstuff.txt - converted a few more DECORATE files. 2016-10-14 00:40:20 +02:00
bridge.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
camera.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
debris.txt - converted a few more DECORATE files. 2016-10-14 00:40:20 +02:00
decal.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
dog.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
fountain.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
hatetarget.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
ice.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
inventory.txt - fixed: State labels were resolved in the calling function's context instead of the called function one's. 2016-11-14 14:12:27 +01:00
mapmarker.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
morph.txt - converted a few more DECORATE files. 2016-10-14 00:40:20 +02:00
movingcamera.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
pickups.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
player.txt Merge branch 'master' of https://github.com/rheit/zdoom into zscript 2016-10-21 19:31:08 +02:00
secrettrigger.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
sectoraction.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
setcolor.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
sharedmisc.txt - converted a few more DECORATE files. 2016-10-14 00:40:20 +02:00
skies.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
soundenvironment.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
soundsequence.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
spark.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
specialspot.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
splashes.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
teleport.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00
waterzone.txt - converted the rest of actors/shared. 2016-10-14 10:46:15 +02:00