gzdoom-gles/wadsrc/static/zscript/hexen
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
..
baseweapons.txt - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
bats.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
bishop.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
blastradius.txt - another bunch of Hexen actors converted. 2016-10-18 15:15:06 +02:00
boostarmor.txt - another bunch of Hexen actors converted. 2016-10-18 15:15:06 +02:00
centaur.txt - scriptified Hexen's Centaur. 2016-11-12 17:21:11 +01:00
clericboss.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
clericflame.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
clericholy.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
clericmace.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
clericplayer.txt - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
clericstaff.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
demons.txt - scriptified Hexen's Centaur. 2016-11-12 17:21:11 +01:00
dragon.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
ettin.txt - another batch of Hexen items converted. 2016-10-18 10:09:02 +02:00
fighteraxe.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
fighterboss.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
fighterfist.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
fighterhammer.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
fighterplayer.txt - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
fighterquietus.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
firedemon.txt - scriptified Hexen's Firedemon. 2016-11-12 19:16:47 +01:00
flame.txt - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
flechette.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
flies.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
fog.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
healingradius.txt - converted the remaining Hexen actors. 2016-10-18 18:11:13 +02:00
heresiarch.txt - made the bounce flags accessible after verifying that the code works for 16 bit variables. 2016-10-25 11:38:02 +02:00
hexenarmor.txt - more Hexen conversions. 2016-10-18 00:49:13 +02:00
hexendecorations.txt - more Hexen conversions. 2016-10-18 00:49:13 +02:00
hexenkeys.txt - more Hexen conversions. 2016-10-18 00:49:13 +02:00
hexenspecialdecs.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
iceguy.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
korax.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
mageboss.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
magecone.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
magelightning.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
mageplayer.txt - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
magestaff.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
magewand.txt - converted the remaining Hexen actors. 2016-10-18 18:11:13 +02:00
mana.txt - another batch of Hexen items converted. 2016-10-18 10:09:02 +02:00
pig.txt - fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'. 2016-11-13 14:20:30 +01:00
puzzleitems.txt - another batch of Hexen items converted. 2016-10-18 10:09:02 +02:00
scriptprojectiles.txt - another batch of Hexen items converted. 2016-10-18 10:09:02 +02:00
serpent.txt - fixed: Hexen's serpent was still using "None" for 'no state', which in ZScript is done with null. 2016-11-07 20:12:06 +01:00
speedboots.txt - another batch of Hexen items converted. 2016-10-18 10:09:02 +02:00
spike.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
summon.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
teleportother.txt - turned everything I could into non-action functions. 2016-10-22 17:49:08 +02:00
wraith.txt - use the function defaults from the script instead of explicitly setting them again in the code. This is a needless cause of potential errors and since the values are readily available now it's better to use them in the functions. 2016-10-27 15:53:53 +02:00