News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Scrolling text flickers?

Started by hfheatherfox07, May 18, 2011, 09:04:04 PM

Previous topic - Next topic

hfheatherfox07

Thank you Siekmanski ....and I really appreciate the time that you took to explain this to me.... but what I was asking is were do you put the order of the font pictures???

it is not going to look like the ASCII table .... If you look at my previous post on the same page you will see a fonts.zip , the fonts pictures are 10 rows by 6 columns , and others are different again.... you can not calculate that... were is the order ???

http://www.masm32.com/board/index.php?action=dlattach;topic=16710.0;id=9383

Siekmanski

As I told you, I don't put the order of the font pictures anyware.
You have to rearrange your fontpicture according to the "ASCII TABLE"
( cut and paste your font order in a paint program to the ASCII order )

Or make a look up table of the offsets in your fontpicture and make your own orders.

PICTURE THIS !!!  :bg

hfheatherfox07

Quote from: Siekmanski on June 28, 2011, 11:15:25 AM

You have to rearrange your fontpicture according to the "ASCII TABLE"
( cut and paste your font order in a paint program to the ASCII order )


OK thank you....

hfheatherfox07

Quote from: qWord on May 22, 2011, 10:30:43 PM
there are several methods of solving your problem. However, in the attachment you will find the best solution (IMO) for displaying different animations in one graphic: it creates three memory DCs, where one is used for drawing the text and one for drawing the stars (=this is our background). This two layers are merged in the third DC using Alpha/Transparent blt. This DC is then copyed to the screen. Using this technique allows to quickly combine differently timed animations - However, as you surly can see, it need more system resources (not really hard for nowadays systems/graphic-cards)


I have a quick question..... I love your idea with the layers, it is the best ..... does it have to be only 2 layers or can you add more for a bitmap for example?

Here we merge 2 layers .... are more possible or is there a limit?

;/* merge layer 1 & 2 */
;/* copy stars to main-buffer */
invoke BitBlt,hmainDC,ps.rcPaint.left,ps.rcPaint.top,esi,edi,hLayerDC2,ps.rcPaint.left,ps.rcPaint.top,SRCCOPY
 

qWord

Quote from: hfheatherfox07 on July 03, 2011, 05:00:12 PMdoes it have to be only 2 layers or can you add more for a bitmap for example?

Here we merge 2 layers .... are more possible or is there a limit?
the number of layers is limit by available memory. However, each additional layer increase the time, needed for merging the final image. Also, if there are many animations, you should think about a strategy where and when to merge the layers. The simplyest would be to merge the corresponding region immediately before copying to the screen, but this increase the CPU usage. An other technique is to merge the final image using an timer e.g. 100 timers per second (this may also required to record all regions that need to be update/merge).
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

I will give it a try, I want to add image by loading it to a different layer ....

Siekmanski

Why don't you do it all with Direct3D or OpenGL ?
You can switch between 2D and 3D in a snap ( or only use it for 2D ), paint everything in a backbuffer at once and then present it all in the frontbuffer.
You can make use of all the tricks then such as Alpha, Depth buffer etc.
And it's as difficult as you make it yourself ......

hfheatherfox07

@ Siekmanski

Now I remember when I was asking you about font structure were I saw it ... It goes like this ....

fTable db ' ABCDEFGHIJKLMNOPQRSTUVWXYZ'
       DB '0123456789:;/-().,?!"',27H,'#@',0
t_sz =$-fTable 


I realized Today while looking through my codes that I had this LOL  :dazzled:


Do you think your sine scroller  would work like this ( I have not tried yet)? here is a text scroller....
Check this out....


Twister


hfheatherfox07

Quote from: Horton on July 06, 2011, 02:24:45 AM
Use Triple Buffering!

http://www.anandtech.com/show/2794


Never seen a Triple buffering example used this way....never even seen a triple buffering example

Siekmanski

Yes, you can make my routine working with a font table but,
why use a lookup table and a parser if the fonts have the same height and width ?

hfheatherfox07

Quote from: qWord on June 06, 2011, 03:25:07 AM
in the attachment an lib holding the function JmpSine(). A short description can be found in the include file.
(take care of used data types  :U)

qWord


HI, I just realized , did you make the LibSinText.lib and LibSinText.inc your self?

do you have the asm?

qWord

Quote from: hfheatherfox07 on July 17, 2011, 12:47:36 AMdid you make the LibSinText.lib and LibSinText.inc your self?
yes
Quote from: hfheatherfox07 on July 17, 2011, 12:47:36 AMdo you have the asm?
you won't be happy with it, because I used my own macros for the mathematics. (I'm currently working on realeasing them here)
FPU in a trice: SmplMath
It's that simple!

qWord

source attached - as said, I'm currently working on a release of the macros, which will come the next days (or weeks).
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Quote from: qWord on May 22, 2011, 10:30:43 PM
there are several methods of solving your problem. However, in the attachment you will find the best solution (IMO) for displaying different animations in one graphic: it creates three memory DCs, where one is used for drawing the text and one for drawing the stars (=this is our background). This two layers are merged in the third DC using Alpha/Transparent blt. This DC is then copyed to the screen. Using this technique allows to quickly combine differently timed animations - However, as you surly can see, it need more system resources (not really hard for nowadays systems/graphic-cards)


I like your idea and I have being using it since on different stuff .... here is one that I am stuck with .... inside TEMPORARY.zip

you will find 5 folder ... in the one called TEMPORARY WORK... if you run that you will find that the scrolling text only works if you hold the cursor down on the window frame???  :'(

example 4 the scrolling text works but the rest freezes ???

any ideas???? :(