Page 1 of 1

&MOVE (CSBwin)

Posted: Wed Jun 22, 2005 10:49 pm
by Zyx
&MOVE on a missile (from a dungeon tile to a dungeon tile) crashes the game.

Posted: Thu Jun 23, 2005 2:43 am
by Paul Stevens
What are you doing, moving a missile? I'm suprised you
are not trying to move a Zo Spell from a Chest in some
Screamer's back pocket to your Quiver. Gad. What
will you think of next?

At any rate, it is too much of a pain to set up a test
of such a thing. Can you send me a dungeon and
instructions to make it happen?

Posted: Thu Jun 23, 2005 9:54 am
by Zyx
I will.

Posted: Thu Jun 23, 2005 3:53 pm
by Paul Stevens
When I saw the new post I figured you had tried to
put a door into a Shooter.

Posted: Thu Jun 23, 2005 9:20 pm
by Paul Stevens
9.8v53CGE10 attempts to fix this. But I cannot
test it because now your DSA dies with a stack underflow.

I am not sure what you are doing here. If you are
attempting to cycle the palette then this is an exceedingly
inefficient (albeit clever) way of getting it done.
A palette-modifying overlay would accomplish the whole
effect with a single word. Moreover, you would have
control of all of the colors with 16-bit color resolution.
Each palette-modifying overlay would have only 1K bytes
(16 bits for each of 512 colors). And you could fade the
palettes in and out.

Posted: Thu Jun 23, 2005 9:54 pm
by Zyx
I don't how to use overlays this way. Could you provide an example?

I think I get the same error when &moving a cloud.

Also, the stack underflow error is weird. I think it is due to the fact that I &moved a monster into the cell of a missile: the monster lost some hitpoints and the DSA got interrupted by a call to a monster movement filter. When CSBwin returned to the previous DSA execution, the stack was lost.

Posted: Thu Jun 23, 2005 11:33 pm
by Paul Stevens
DSA got interrupted by a call to a monster movement filter
Ouch. If so, that will not be fun to fix. Do you have an example?
I don't how to use overlays this way
Neither do I. It has never been implemented. But I have
always had it in the back of my head.
You would create a 512-word Overlay. Each word tells the
16-bit color to use for the corresponding Atari color. Then
your DSA would say something like
"Apply palette overlay with 50 percent". The existing palette
overlay would be updated to 50 percent old and 50 percent new.
Doing it twice would cause a 25 percent old/75 percent new.
Then 12/87. etc. Specifying a null overlay would reset
the palette overaly to the original Atari colors (identity palette).

Posted: Thu Jun 23, 2005 11:39 pm
by Zyx
For the example, the last savegame should do it: throw something at the worms. (that's what i understood from the trace)

Overlays: this is very interesting. So I could, for example, transform everything into an infravision mode? Besides, since there are more or less only 30 colors used in DM, most of the 512 words would be empty, right?

Posted: Thu Jun 23, 2005 11:53 pm
by Paul Stevens
most of the 512 words would be empty, right
512 is the number of physically possible colors on
the Atari. If only 30 are used then you can put whatever you
please in the rest.

Posted: Fri Jun 24, 2005 1:46 am
by Paul Stevens
DSA got interrupted by a call to a monster movement filter
You are exactly right. This will require some thought. A filter
can interrupt a DSA execution. Oh boy. Yukkkkk.
It is easy enough to make the thing re-entrant. But do we
know what side-effects that might have? Nope. Yukkkk. Again.

Posted: Fri Jun 24, 2005 4:00 am
by Paul Stevens
I made the DSA code reentrant. I think it must be this
way. It means that your DSA can cause another DSA
to start up and finish. Two (or more) DSAs can be running
at the same time. One DSA might put a coin on the floor
and expect it to stay there. But then if it &MOVEs a monster
and the monster lands on a pressure pad and the pressure pad
activates a teleporter and the teleporter moves the
coin then it will seem the coin mysteriously disappeared.

Or you might put a coint in the backpack and another
DSA would take it out. Onlu the 'filter' DSAs can interrupt
like this and probably only the monster movement filter.

Posted: Sat Jun 25, 2005 6:03 pm
by Paul Stevens
I posted:

http://dianneandpaul.net/CSBwin/OverlayDemo.zip

It domonstrates the use of an Overlay Palette.
If you resurrect a champion and avoid the pressure
pad that turns on the water overlay then the effect
of the Overlay Palette is more obvious.

Posted: Sun Jun 26, 2005 11:27 am
by Zyx
I saw this new overlay capacity and it's very interesting! However I don't know in which order appear the colours in the 512 words palette. Could you provide an identity palette, that leaves the DM palette as it?

Posted: Sun Jun 26, 2005 5:29 pm
by Paul Stevens
The Atari palette consists of RGB in 3-bit fields.
(A lie...but better for our purpose)
Bits 0-2 B
Bits 3-5 G
Bits 6-8 R
So the Overlay palette has
[0] ; R=0,G=0,B=0.
[1] ; R=0,G=0,B=1
. . .
[511] R=7, G=7, B=7

The entries in the Overlay Palette have three five-bit
fields in the same order.

OverlayDemo.zip now has an IdentityPalette.bin

Posted: Sun Jun 26, 2005 7:45 pm
by Zyx
IdentityPalette.bin has 512 bytes, it should be 1024, right?

Posted: Sun Jun 26, 2005 8:15 pm
by Paul Stevens
Ooops. Sorry. A typo. I should have typed '2' instead of '1'.
I'll put a new one in a few minutes.

OK. It is there. Strange, though, I tried the first
one and it worked pretty well! Must have been nothing
that needed a lot of Red.

Posted: Thu Jul 07, 2005 1:39 pm
by beowuuf
If you &MOVE a large creature then it is put on one of the four cell positions, so is made invisible unless you've got the 'draw a 4' flag enabled (in a flag enabled dungeon).

This is also true for &ADDing a large critter

Posted: Thu Jul 07, 2005 8:54 pm
by Paul Stevens
Using CSBwin9.8v62, I was able to &ADD and &MOVE a dragon,
two worms, and four gigglers.

Posted: Thu Jul 07, 2005 9:23 pm
by beowuuf
Cool, cheers!
I will check the moving thing once I've got this whole delay thing sorted... : )

Posted: Fri Jul 08, 2005 9:32 pm
by beowuuf
Checked the newest version against an older version, and &moves/ &adds work fine