Re: ZDCode II - The pretty language that compiles to DECORAT

I am in the process of adding a condition system, where one can use AND, OR and NOT to check conditions (which are state action templates that jump a given number of states only in the desired condition). Those are special macros that can be used as components in conditions (in statements like while, if, etc.).
ZDCode will internally use offset jumps to compute these conditions in the generated DECORATE output.
What exactly do you mean frame information?
Also, a complete specification & documentation of the language is still in the todo list. I haven't gotten to do it yet.
- Code: Select all • Expand view
class FrogBoots extends Inventory {
set Inventory.MaxAmount to 1;
}
class Tired extends Inventory {
set Inventory.MaxAmount to 3;
}
class FrogZombie extends ZombieMan replaces ZombieMan {
condition<Offset> C_HasInventory(InventoryName, Amount = 1) {
TNT1 A 0 A_JumpIfInventory(InventoryName, Amount, Offset);
}
condition<Offset> C_Closer(Distance) {
A_JumpIfCloser(Distance, Offset);
}
condition<Offset> C_OnFloor() {
A_JumpIf(z < floor + 1, Offset);
}
label Spawn {
TNT1 A 0;
TNT1 A 0 A_Give("FrogBoots");
goto Super.Spawn;
}
macro Jump {
TNT1 A 0 {
A_FaceTarget();
ThrustThingZ(0, 30, 0, 0);
ThrustThing(angle * 256 / 360, 25, 1, 0);
}
}
label See {
if (HasInventory("Tired")) POSS ABCD 10 A_Chase;
else POSS ABCD 4 A_Chase;
sometimes 15 if (C_HasInventory("FrogBoots") && !C_Closer(128) && !C_HasInventory("Tired", 3) && C_OnFloor()) {
TNT1 A 0 {
A_Give("Tired", 1);
inject Jump;
};
}
sometimes 20 TNT1 A 0 A_Take("Tired", 1);
loop;
}
}
ZDCode will internally use offset jumps to compute these conditions in the generated DECORATE output.
CBM wrote:anything in zcode II that will make generation of actors based soly on frame information very easy?
What exactly do you mean frame information?
Also, a complete specification & documentation of the language is still in the todo list. I haven't gotten to do it yet.