TonyTebby wrote:
> He started getting more into the concept of GD2 !!
>
> How can anyone do this - has this man a brain the size of a planet?
> I can't understand it and I wrote it!

I just said I'm getting more into it. Not how much :-)
I gather information here and there and it's often enough to do some
changes (like the new buffer-less background colour code or the 16bit
shadow), but that's it. I wouldn't even dare thinking about other
proposals from the list, like background redrawing.

> If I remember right, the sprite cache routines check the address of
> the sprite (which is likeley to be re-used either if you are editing
> the sprite or if you are loading the sprite into the chank of
> memory) and the sprite cache version number (pto_vcch in the sprite
> header)

Argh, I have totally overlooked that you introduced a cache version
(so much for my knowledge). Of course, this way it's easy. And it even
works! Thanks for the hint.

> WMAN should really be updated to GD2 - any volunteers?

That'd be me again, then... In fact I'm almost done. Since yesterday
all routines accept the new colour word definition, only a few more
lines for the system palette are needed. And some sensible defaults
for that palette (which'll probably be the hardest task).

While I'm at it: last call for comments! I'll attach below the new
WMAN specification the way I did implement it. Any suggestions for
changes should be done exactly NOW before it gets official!

> Until then would someone like to modify the WMAN scroll sprite
> generation code to use a new cache version number instead of 0 each
> time? There must surely be a byte spare somewhere in the (a2) block
> to store the last value used.

Yes, there is, I called it ws_scach. And yes, I'm not good at names.

> Will this open source software idea ever catch on?

I hope so. I want to tie up some lose ends like this WMAN thing before
concentrating on the university project. After that I hope others are
sufficiently familiar with the code to start contributing, too (it's
BTW not only SMSQ/E. EasyPtr should be updated as well, for example.
Any volunteers?).

Marcel

-----

|                                                                             |
|  Vector $7C                                                   WM.SETSP      |
|                                                                             |
|       Set system palette entries                                            |
|                                                                             |
|  Call parameters                      Return parameters                     |
|                                                                             |
|  D1.w start index                     D1   preserved                        |
|  D2.w number of elements              D2   preserved                        |
|                                       D3+  all preserved                    |
|                                                                             |
|  A0                                   A0   preserved                        |
|  A1   pointer to palette entries / 0  A1   preserved                        |
|  A2                                   A2   preserved                        |
|  A3                                   A3   preserved                        |
|  A4                                   A4   preserved                        |
|  A5   not used by any routine                                               |
|  A6   not used by any routine                                               |
|                                                                             |
|  Error returns:                                                             |
|       IPAR    Illegal index number / invalid number of elements             |
|                                                                             |

Set the entries of the system palette to the values in the buffer, beginning
with the index in D1 (counting from 0) and ending with the index D1 + D2 - 1.

If A1 = 0 then the entries are taken out of the default table. Otherwise
the buffer must hold an array of words with the colour values of the
different items. The colour format is the standard WMAN colour format as
described elsewhere.


|                                                                             |
|  Vector $80                                                   WM.GETSP      |
|                                                                             |
|       Read system palette entries                                           |
|                                                                             |
|  Call parameters                      Return parameters                     |
|                                                                             |
|  D1.w start index / -1                D1.w preserved / item count           |
|  D2.w number of elements              D2   preserved                        |
|                                       D3+  all preserved                    |
|                                                                             |
|  A0                                   A0   preserved                        |
|  A1   pointer to entry buffer         A1   preserved                        |
|  A2                                   A2   preserved                        |
|  A3                                   A3   preserved                        |
|  A4                                   A4   preserved                        |
|  A5   not used by any routine                                               |
|  A6   not used by any routine                                               |
|                                                                             |
|  Error returns:                                                             |
|       IPAR    Illegal index number / invalid number of elements             |
|                                                                             |

Copies entries of the system palette into the given buffer, beginning with
the index in D1 (counting from 0) and ending with the index D1 + D2 - 1. The
buffer must be big enough to hold all requested entries.

If D1 is given as -1 the function just returns the number of items held in
the system palette. This can increase when more items get defined in new
WMAN version. This is guaranteed to be below 256.

---
New colour format:

        %00000000cccccccc       exactly as before
        %00000001pppppppp       palette
        %00000010pppppppp       system palette
        %00000011gggggggg       gray scale
        %01ssxxxxxxyyyyyy       palette stipple. see below
        %1rrrrrgggggbbbbb       15 bit RGB

Stipple format (as proposed by George Gwilt):
   s = stipple code (0 = dot, 1 = horizontal, 2 = vertical, 3 = checkers)
   x = stipple colour
   y = main colour

As x and y can only hold 6 bit only the first 64 entries of the palette can
be used for stippling.  Due to the design of the palette those entries
alone still cover the whole colour range quite well.

---
System palette entries

Index  Meaning
-------------------------------------
$00    Window background
$01    Window foreground
$02    Window border
$03    Subwindow background
$04    Subwindow foreground
$05    Subwindow border
$06    Title bar background
$07    Title bar foreground
$08    Button available background
$09    Button available foreground
$0a    Button selected background
$0b    Button selected foreground
$0c    Button unavailable background
$0d    Button unavailable foreground
$0e    Button border
$0f    3D object background
$10    3D object foreground
$11    Pan/scroll bar
$12    Pan/scroll bar section
$13    Pan/scroll bar arrow
$14    Hint background
$15    Hint foreground
$16    Hint border

Reply via email to