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

ragdog

It crashed here under Win7
loc_401405:                             ; CODE XREF: sub_401329+113j
                         fist    [ebp+var_58]
                         fadd    st, st(1)
                         cmp     [ebp+var_58], edx
                         jnb     short loc_40143E
                         push    eax
                         push    edx
                         push    ecx
                         add     eax, [ebp+var_58]
                         cmp     eax, [ebp+var_70]
                         jnb     short loc_401446
                         mov     ecx, [ebp+var_6C]
                         add     eax, ecx
                         mov     al, [eax] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


DS:[00000257]=???
AL=57 ('W')

hfheatherfox07

I was actually wondering what are the commands to make the scrolling text do that( appear to go off into the distance instead of up)....

qWord

In the attachment an quick (and dirty) example using gdi+, which is an adaption from this C# example. The magic function, that does the required matrix transformation, is GdipWarpPath().

qWord
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Thanks I will have a look at it....  :bg

hfheatherfox07

Also I found a collection in C++ for demo effects....Here:

http://demo-effects.sourceforge.net/

I would love to know how to do the "Jumping Scroller" and "Sine Scroller Variations" in MASM....

I have a sine scroll example in MASM but I do not like it http://comrade.ownz.com/sources/scroller.zip   :(

qWord

Using gdi+ path-objects, you can create such effect by placing and transforming characters path's on arbitrary curves. What you need is some basic knowledge on vector and matrix calculations.
Some years back I've played a bit with it, and create an function allowing to place an string on an given path. However, currently I cant share this code and is also a bit buggy -  maybe I will step in again and create an lib or dll these days.
In the attachment an application showing this function in action.
FPU in a trice: SmplMath
It's that simple!

dedndave

i have a question along a related line...
each time WM_PAINT is recieved, i am using the following functions:
SetTextColor
SetBkColor
SetBkMode
SetTextAlign
SelectObject (font)
i am wondering if i need to do them each time, or only of one changes

the problem is that i am lacking a strong understanding of exactly what a device context is
may it be a different handle on different passes ?
once a setting or an object is selected for a device context, does it stay the same ?
the MSDN documents are not very clear on this subject   :P

qWord

A DC is an structure that holds the current state of an drawing. So a DC have a current (selected) pen,brush,region,font,... and settings/attributes (BkColor,...)
The most importand member is the associated bitmap/display-area. For memory DC's (CreateDC/CompatibleDC) there is a bit map in what ever format - the DCs passed with WM_PAINT are mostly (according to the class style) so called display DCs, which represent a portion of screen.  There also printer and  information DC's.
AFAIK there is no guarantee, that the DC passed with WM_PAINT is allways the same. Also these DC is used by Windows, so that the configuration changes (selected objects). For memory DC's, which you own, you can select the objects once times.
Maybe also interesting in this context: Driver Development Part 6: Introduction to Display Drivers
FPU in a trice: SmplMath
It's that simple!

Siekmanski

Hi hfheatherfox07

Just found an example of a sinescroller i did some years ago.
If you want the sources let me know.
Give me a week or so to find my old MASM DirectX7 sources of this sinus scroller.


qWord

here some other very simple effect (GDI). It use BitBlt to move pixel-columns vertically from their original position according to current sine value.
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Quote from: Siekmanski on June 04, 2011, 05:15:15 AM
Hi hfheatherfox07

Just found an example of a sinescroller i did some years ago.
If you want the sources let me know.
Give me a week or so to find my old MASM DirectX7 sources of this sinus scroller.



Please...  :P

hfheatherfox07

Quote from: qWord on June 04, 2011, 10:44:17 AM
here some other very simple effect (GDI). It use BitBlt to move pixel-columns vertically from their original position according to current sine value.


I am trying to do examples that use rsrc.rc ....

any ways I was back on the Stanfield today... I got Starfield_rotation to work ... although you still need to define WindowH, and WindowW as numbers.... although if you have it as a secondary window (invoked off a button) ...it works perfect  :bg

I keep going back and forth between projects LOL....

I am starting SFX.EXE  I would like to create the same thing that Hutch used on his older versions of MASM installation.exe
I figured how to create .cab files using CABARC.EXE and CREATECAB.EXE but I can not create .cab file with actuall folders in it only .exe's and .dll's for some reason

I appreciate all these examples .... I will see how they work with rsrc.rc.....

Still no idea how to create the jumping sine .....


Siekmanski

YES !! found it...  :bg

Here are the complete sources of "HTMLencoder".
changed the music for a smaller piece else it wouldn't fit in the file.
Most of the labels are written in Dutch, if there's something you don't understand you can always ask me.
( Or you can take a course in dutch language, hahahahaha  :lol )

Veel plezier.

qWord

Quote from: hfheatherfox07 on June 04, 2011, 08:26:04 PMStill no idea how to create the jumping sine .....
what did you mean with jumping sine? (See the attachment).
Is your problem the mathematics or measuring and placement of characters (or both)?
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Quote from: Siekmanski on June 05, 2011, 03:45:04 PM
YES !! found it...  :bg

Here are the complete sources of "HTMLencoder".
changed the music for a smaller piece else it wouldn't fit in the file.
Most of the labels are written in Dutch, if there's something you don't understand you can always ask me.
( Or you can take a course in dutch language, hahahahaha  :lol )

Veel plezier.

Thank you .... I will have a look at it...

And I always use Google translate http://translate.google.com/#

I always find sources in other languages, and then I translate it  :U