Dynamic Tile Overlay (ZASM)

SubmittedDecember 14, 2016

0.0 rating

Featured Screenshot

Author

ZoriaRPG

Download Quest

[]

Download Script Package

DynamicTileOverlayZASM.zip

Description

OVERLAYTILE** is a ZASM instruction that through to ZC 2.50.2, has had no ZScript equivalent. It functions in the same manner as CopyTile(), so it's easy to make a script that uses CopyTile(), ( ZASM: COPYTILE** ) and drop in the ZASM instruction OVERLAYTILE** to change from a copy process, to an overlay process.

The overlay works exactly as the similar command in the tile editor.

This package contains the ZASM ffc script, that you may import and use, an example quest, and an updated version of zscript.txt that includes details on the instruction.

Script Setup Details

Unzip the package OverlayTIle.zip and drop the file FFC_OverlayTIle.txt into your ZQuest path.
In ZQuest, go to Menu->Quest->Scripts->Import ASM FFC Script.
Select an empty slot.
Name the slot OverlayTile.
When prompted, select the file 'FFC_OverlayTile.txt' in the dialogue box.
ZC will parse it, and add it to your ffc table. From this point onward, you will be able to select it as normal when placing ffcs on the screen.
Place an ffc on a screen, set its script to 'OverlayTile', and set its combo data to something other than '0'.
Script Args:

D0, D1: Base and overlay tile of first overlay set. D0 is the main tile, and we will overlay D1 over it.
D2, D3: Second set.
D4, D5: Third set.
D6, D7: Fourth set.

If any value in these sets is '0', no overlay for that set will occur.

See the demo quest for an example use.

This ZASM file is intended as a stopgap method to access this feature, until a future ZC version includes an instruction (e.g. void OverlayTIle(int src, int dest) ) for ZScript to do this.

Script Contents

PUSHR d0
PUSHR d1
PUSHR d2
PUSHR d3
PUSHR d4
PUSHR d5
PUSHR d6
PUSHR d7
SETV d2,0
SETR d3,REFFFC
PUSHR d3
SETR d4,SP
SETR d6,d4
ADDV d6,8
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,7
LOADI d2,d6
POP d3
COMPAREV d2,0
SETFALSE d2
COMPAREV d3,0
SETFALSE d3
ADDR d2,d3
COMPAREV d2,0.0002
SETMORE d2
COMPAREV d2,0
GOTOTRUE 43
PUSHR d4
SETV d2,42
PUSHR d2
SETR d6,d4
ADDV d6,8
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,7
LOADI d2,d6
PUSHR d2
GOTO 154
POP d4
SETV d2,0
SETR d6,d4
ADDV d6,6
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,5
LOADI d2,d6
POP d3
COMPAREV d2,0
SETFALSE d2
COMPAREV d3,0
SETFALSE d3
ADDR d2,d3
COMPAREV d2,0.0002
SETMORE d2
COMPAREV d2,0
GOTOTRUE 74
PUSHR d4
SETV d2,73
PUSHR d2
SETR d6,d4
ADDV d6,6
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,5
LOADI d2,d6
PUSHR d2
GOTO 154
POP d4
SETV d2,0
SETR d6,d4
ADDV d6,4
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,3
LOADI d2,d6
POP d3
COMPAREV d2,0
SETFALSE d2
COMPAREV d3,0
SETFALSE d3
ADDR d2,d3
COMPAREV d2,0.0002
SETMORE d2
COMPAREV d2,0
GOTOTRUE 105
PUSHR d4
SETV d2,104
PUSHR d2
SETR d6,d4
ADDV d6,4
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,3
LOADI d2,d6
PUSHR d2
GOTO 154
POP d4
SETV d2,0
SETR d6,d4
ADDV d6,2
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,1
LOADI d2,d6
POP d3
COMPAREV d2,0
SETFALSE d2
COMPAREV d3,0
SETFALSE d3
ADDR d2,d3
COMPAREV d2,0.0002
SETMORE d2
COMPAREV d2,0
GOTOTRUE 136
PUSHR d4
SETV d2,135
PUSHR d2
SETR d6,d4
ADDV d6,2
LOADI d2,d6
PUSHR d2
SETR d6,d4
ADDV d6,1
LOADI d2,d6
PUSHR d2
GOTO 154
POP d4
SETV d2,0
PUSHR d4
SETV d2,141
PUSHR d2
GOTO 152
POP d4
SETV d3,0
POP d3
POP d3
POP d3
POP d3
POP d3
POP d3
POP d3
POP d3
QUIT
POP d3
QUIT
POP d3
POP d2
OVERLAYTILERR d2,d3
POP d3
GOTOR d3

This entry has no reviews.