I made some modifications for the file Fddraw.
The speed of execution of Direct Draw is sharply increased.
I have create a supplementary surface lpDDS1 situated only in memory video.
This surface is filled with a thorough decoration before the appeal in the main loop
She is of use then of surface of refreshment to the surface of drawing lpDDSBack.
It is faster than to go for a complete screen in the surface lpDDSPicture which has to be in big part in the memory system.
For the same program written with Masm, Fasm work more fast and so one can put more drawings before the slowing down!

lpDDS1 dd 0
; ------------------------------------------------------
; Creation of a surface lpDDS1 in memory video
; ------------------------------------------------------
mov [ddsd.dwSize],ddsd.end-ddsd
mov [ddsd.ddsCaps.dwCaps],DDSCAPS_OFFSCREENPLAIN
mov [ddsd.dwWidth],L_ECRAN
mov [ddsd.dwHeight],H_ECRAN
comcall [lpDD],IDirectDraw.CreateSurface,ddsd,lpDDS1,0
or eax,eax
jnz ddraw_error

call remplirfond ;Here drawing of lpDDSPicture = > lpDDS1

jmp paint

; -------------------------------------
; Here lpDDS1 = > lpDDSBack
; -------------------------------------
mov [rect.top],0
mov [rect.bottom],H_ECRAN
mov [rect.left],0
mov [rect.right],L_ECRAN
comcall [lpDDSBack],IDirectDrawSurface.BltFast,0,0,\

Posted on 2002-07-24 11:22:48 by Asmgges
Hi !:)
Tomasz, working on a program with Fasm and Fddraw, I have some difficulties with GetDC.
Several times stake in the screen of the chain makes correctly the other times not.
Popular principle:
To put in the screen a text under Fddraw by stopping the progress of the program during some seconds to leave time with the user to read a message.
Before I did not use GetDC but a text stored in lpDDSPicture which I called with BltFast and there everything worked well .
Shape db would save me of the place for the current texts.
Here is incriminated code:

titre1 db 'Welcome under Fasm',0
stdcall [GetDC],[newhwnd]
mov ebx,eax
stdcall [GetSysColor],COLOR_HIGHLIGHT
stdcall [SetBkColor],ebx,eax
stdcall [SetTextColor],ebx,eax
mov [rect.left],200
mov [rect.right],560
mov [rect.top],580
mov [rect.bottom],598
stdcall [DrawText],ebx,titre1,18,rect,\
stdcall [ReleaseDC],ebx
comcall [lpDDSPrimary],IDirectDrawSurface.Flip,0,0
pause 30 ; macro of wait

Posted on 2002-07-27 07:00:49 by Asmgges
Hi Asmgges, sorry I can't help you with your problem. I don't know enough about DD

But could you post your improved code for ffdraw, I like to have it, but can't seem to get it compile by copying and pasting the bits from here. :(

Posted on 2002-07-28 07:41:14 by Eóin
Hi ! Eoin:)

Thank you for your answer.
File in the size .txt joined

Posted on 2002-07-28 09:49:18 by Asmgges