Page 1 of 1

[06 Mar 2008] Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 06 Mar 2008 16:02:26 +0100

sorry for spamming this mailing list with my errors, but i need another little help

here my code

Code: Select all

@BRUSH 9, "shot7.jpg"
@DISPLAY {Title = "Test", X = #CENTER, Y = #CENTER, Width = 288, Height = 516}

Function p_Shake()
DisplayBrush(9, 16, 16)
MoveBrush(9,16,16,26,26,1)
MoveBrush(9,26,26,16,16,1)
EndFunction

p_Shake()

Repeat
    WaitEvent
Forever
when i move around the brush the bkg screen isn't cleared. i can't use doublebuffer because the movebrush function uses many cycles to perform, so what i can use ?

i use hollywood 2 on winuae

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 06 Mar 2008 16:10:19 +0100

edit , if i use the sprite command it works fine.

But my image is static, why i must use sprites instead of brushes ?

And now another problem arise :D i want to use a brush because i can display it with many effects (like DisplayBrushFX ), and then move the brush around This effects are available only for brushes. so the question is : why when i move around a brush the bkg isn't cleared?

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by SamuraiCrow
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 6 Mar 2008 07:14:03 -0800 (PST)

Hello Andrea,

Think about this: In a paint program a brush is plotted then stays there. If you preserved the background for that kind of brush it would just waste memory. A sprite preserves the background because that is the only difference between a sprite/bob and a brush.

--Sam

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 06 Mar 2008 16:21:06 +0100

Yes i can understand,but now i want the fancy display modes for the sprites too :D :D or i can convert the brush in a layer and move around this layer maybe

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 6 Mar 2008 08:01:47 -0800 (PST)

What do you mean that the background is not cleared?

If you want to remove the brush, you could use Undo(#BRUSH,9)

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 6 Mar 2008 08:05:46 -0800 (PST)

If you enable Layers, and display the brush, it will be a layer automatically. And if your sample code is all that you have, its layer ID will be 1.

If you want to insert the brush as a layer in a specific depth among other layers, you can use InsertLayer().

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 06 Mar 2008 18:22:20 +0100
What do you mean that the background is not cleared?
Yes
If you want to remove the brush, you could use Undo(#BRUSH,9)
I don't want to remove it, i want only to "shake" it diagonally (so i move the brush diagonally ahead and back )

here is the applet :D

[06 Mar 2008] Re: Another,another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 06 Mar 2008 18:23:48 +0100

yes i've understood the layer thing , so i must convert my proggy to use layer :D