chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / _colSelect / vars
1 ;
2 ; _cs.vars.sh
3 ;
4 ; Colour selector variables and workspace
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
13 ; Sapphire 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)
16 ; any later version.
17 ;
18 ; Sapphire 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.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire.  If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ;   None.
32
33 ;----- Internal event codes -------------------------------------------------
34
35 csEvent__close  EQU     &C0000001               ;Kernel wants to close pane
36 csEvent__newRes EQU     &C0000002               ;User changed diag resolution
37 csEvent__reset  EQU     &C0000003               ;Reset pane from cs__colour
38 csEvent__read   EQU     &C0000004               ;Write data to cs__colour
39
40 ;----- Data structures ------------------------------------------------------
41
42                 ^       0
43 col_rgb         #       4                       ;RGB palette entry for colour
44 col_model       #       4                       ;Colour model for colour
45 col_data        #       4                       ;Colour data for model
46 col_size        #       0
47
48 ;----- Workspace layout -----------------------------------------------------
49
50                 ^       0,R10
51 cs__dStart      #       0
52
53                 ; --- Colour selector kernel ---
54
55 cs__frameDb     #       4                       ;Main colour selector dbox
56 cs__modelDb     #       4                       ;Current model pane dbox
57 cs__resolution  #       4                       ;Current display resolution
58 cs__address     #       4                       ;The address of his colour
59 cs__colour      #       col_size                ;The actual colour (packed)
60
61                 ; --- Colour selector model data ---
62
63 cs__modelData   #       52                      ;Working data for models
64
65 cs__dSize       EQU     {VAR}-cs__dStart
66
67
68                 ; --- RGB model data ---
69
70                 ^       :INDEX: cs__modelData,R10
71
72 rgb__sl1Val     #       8                       ;Value/colour of x slider
73 rgb__xPos       #       4                       ;Cached x position
74 rgb__sl2Val     #       8                       ;Value/colour of y slider
75 rgb__yPos       #       4                       ;Cached y position
76 rgb__sl3Val     #       8                       ;Value/colour of z slider
77 rgb__zPos       #       4                       ;Cached z position
78
79 rgb__mapping    #       4                       ;The current mapping
80 rgb__red        #       4                       ;Address of red value
81 rgb__green      #       4                       ;Address of green value
82 rgb__blue       #       4                       ;Address of blue value
83
84 ;----- That's all, folks ----------------------------------------------------
85
86                 END