[06 Mar 2008] Another,another problem :D

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
Andrea

[06 Mar 2008] Another,another problem :D

Post 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
Andrea

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

Post 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?
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

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

Post 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
I'm on registered MorphOS using FlowStudio.
Andrea

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

Post 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
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

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

Post 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)
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

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

Post 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().
Andrea

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

Post 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
Andrea

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

Post 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
Locked