Prev: D1CC Up: Map Next: D1E6
D1D5: Script Routine: (42) Vat action
Slide the vat right when the space above is clear, then raise it.
Input
IX Address of complex state data for an entity
ScriptRoutine_VatIncXIfClearAboveThenRise D1D5 CALL Test_EntityAbove Call Test_EntityAbove to test whether a solid entity sits above.
D1D8 JR C,ScriptRoutine_VatIncXIfClearAboveThenRise_IncX Is the space above clear (carry set)? If so, jump to ScriptRoutine_VatIncXIfClearAboveThenRise_IncX to shift right.
D1DA CP $32 Is A less than 32? If not, jump to ScriptRoutine_VatIncY.
D1DC JR NC,ScriptRoutine_VatIncY
Shift the vat one character right when the space above is clear (or close), then rise.
ScriptRoutine_VatIncXIfClearAboveThenRise_IncX D1DE INC (IX+$07) Move this entity one character right.
D1E1 INC (IX+$08)
D1E4 JR ScriptRoutine_VatIncY Jump to ScriptRoutine_VatIncY to increase y / y-extent.
Prev: D1CC Up: Map Next: D1E6