4 ; Parses validation strings for Sculptrix
6 ; © 1995-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sculptrix.
13 ; Sculptrix is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sculptrix is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sculptrix. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
34 [ :LNOT::DEF:vString__dfn
37 ; --- vString_read ---
39 ; On entry: R1 == pointer to an icon block
41 ; On exit: CS if there's a border, and
42 ; R0 == border info word
43 ; R2 == pointer to `inverted' flag byte
47 ; Use: Reads an icon's validation string, and extracts relevant
48 ; information. The border info word contains what sort of
49 ; graphics we have to plot around the icon, and any special
50 ; options thrown in. A string (for group borders etc.) is
51 ; copied into the misc buffer if one was found.
53 ; The syntax of a Sculptrix validation string is as follows:
55 ; `xb'<type>[<flags>][`,'<text>]
57 ; The <type> is a letter which determines what sort of border
58 ; is to be drawn. The <flags> modify the style of the border
59 ; slightly. Note that if the <type> is uppercase, then the
60 ; border is inverted. The <text> is only required for group
61 ; boxes (type `g'). An unknown <type> causes the icon to be
62 ; ignored. Unknown <flags> are ignored. If no text is
63 ; specified, a null string is assumed by default. Spaces
64 ; are allowed in various sensible places.
68 ; --- vString_find ---
70 ; On entry: R0 == character to find in block (not case-sensitive)
71 ; R1 == pointer to icon block
72 ; R2 == old pointer to search from, or 0
74 ; On exit: R0 == character forced to lower case
76 ; R2 points to command string
80 ; Use: Tries to find a validation string command in the given
85 ;----- Border codes and flags -----------------------------------------------
88 vsCode_simple # &0100 ;A simple border
89 vsCode_group # &0100 ;A group box border
90 vsCode_tns # &0100 ;Text+sprite icon
93 vsBrd_action # 1 ;Standard action button
94 vsBrd_default # 1 ;Default action button
95 vsBrd_ridge # 1 ;A ridge type border
96 vsBrd_write # 1 ;A writable border
97 vsBrd_offset # 1 ;Offset pressed-in border
99 vsFlag_invert EQU (1<<31) ;Icon border is inverted
100 vsFlag_fade EQU (1<<30) ;Icon border is faded
101 vsFlag_slab EQU (1<<29) ;Icon may be slabbed
105 ;----- That's all, folks ----------------------------------------------------