English
Forum

Starpaint/Endpaint in the program in a nProc of XPSE unterbringen....there were something ?

 

funkheld
Hello, good day.
How can I Please The Starpaint/Endpaint in my Program in a nProc of XPSE unterbringen ?

here would like I tappt im dunkeln Please mere having:
nProc drawhPicRotated(long hPic,dc,x,y,xx,yy,w,r)

these:
startpaint vordergrpic&
drawpic hintergrpic&,0,0;0
drawpic bpic1&,dx!,dy!;-1,$ff00ff
endpaint

and if it too goes these, which from the keyboard gesteuert go:

startpaint bpic1&
drawhPicRotated(bpicbmp&,hDC,50,50,50,50,winkel&,verh&)
endpaint

the means i want only:
drawhPicRotated(bpicbmp&,hDC,50,50,50,50,winkel&,verh&)
aufrufenvon the keyboard and the others should in the nProc worn out go.

somewhere I had here time red, the so etws made watts.

Thank you.
greeting
 {$cleq}
declare bpic&, bpic1&,bpicbmp&,ende&,winkel&,hintergrpic&,vordergrpic&
declare x1!,y1!,dx!,dy!,verh&
ende&=1
bpic& = create("HPIC",-1,"data\\car.bmp")
Window 20,20-800,600
Cls RGB(220,220,220)
bpicbmp& = create("hNewPic", 100,100,rgb(255,0,255))
bpic1& = create("hNewPic", 100,100,rgb(255,0,255))
hintergrpic& = create("hNewPic", 500,500,rgb(255,255,0))
vordergrpic& = create("hNewPic", 500,500,rgb(255,255,0))
startpaint bpicbmp&
drawpic bpic&,18,18;-1,$ff00ff
EndPaint
startpaint hintergrpic&
USEP 0,1,Rgb(,128,255)
usebrush 1,rgb(0,128,255)
ellipsis 200,200-250,250
endpaint
verh&=75
dx!=60
dy!=60
startpaint bpic1&
drawhPicRotated(bpicbmp&,hDC,50,50,50,50,winkel&,verh&)
endpaint

WHILE ende&

    if isKey(83)

        y1!=Sin((winkel&/1000)/180.0*pi())*0.2
        x1!=Cos((winkel&/1000)/180.0*pi())*0.2
        dx!=dx!-x1!
        dy!=dy!-y1!

    endif

    if isKey(87)

        y1!=Sin((winkel&/1000)/180.0*pi())*0.2
        x1!=Cos((winkel&/1000)/180.0*pi())*0.2
        dx!=dx!+x1!
        dy!=dy!+y1!

    endif

    if isKey(81)

        winkel&=winkel&-1000
        startpaint bpic1&
        drawhPicRotated(bpicbmp&,hDC,50,50,50,50,winkel&,verh&)
        endpaint

    endif

    if isKey(69)

        winkel&=winkel&+1000
        startpaint bpic1&
        drawhPicRotated(bpicbmp&,hDC,50,50,50,50,winkel&,verh&)
        endpaint

    endif

    startpaint vordergrpic&
    drawpic hintergrpic&,0,0;0
    drawpic bpic1&,dx!,dy!;-1,$ff00ff
    endpaint
    drawpic vordergrpic&,10,10;0

ENDWHILE

end

nProc getCircP(long r,w)

    return long(sin(0.0174532925199433*float(w)/1000.0)*float(r))

endproc

nProc angleByLine(long x,y,xx,yy)

    sub y,yy
    sub x,xx

    if x

        xx=int(57295.77951 * arctan(float(y)/float(x)))
        case x>0 : return 270000 + xx
        return 90000 + xx

    endif

    case y<0 : return 180000
    return 0

endproc

nProc drawhPicRotated(long hPic,dc,x,y,xx,yy,w,r)

    long hDCBits=createCompatibleDC(hDC)
    selectObject(hDCBits, hPic)
    long pts=dim(24)
    long w1=angleByLine(xx,yy,0,0)
    Long w2=abs(w1-360000)
    Long w3=abs(w1-540000)
    casenot r : r=long(sqrt(float(xx*xx+yy*yy)))\2
    long pts&,0=x+getcircp(r,w1+w)
    long pts&,4=y+getcircp(r,w1-90000+w)
    long pts&,8=x+getcircp(r,w2+w)
    long pts&,12=y+getcircp(r,w2-90000+w)
    long pts&,16=x+getcircp(r,w3+w)
    long pts&,20=y+getcircp(r,w3-90000+w)
    plgBlt(dc,pts,hDCBits,0,0,100,100,0,0,0)
    deleteDC(hDCBits)
    dispose(pts)

endproc

 
04/16/16  
 



Look you time helicopter - 2D Heli Proto  [...]  on,

for very something like I had these functions Yes written and there z.B. umgesetzt.

Ergänzend moreover I had whom GameFuller prepares:  [...] 

in the 2D Heli Proto see You too keyboard-Sprite Control.
 
04/16/16  
 




funkheld
Thank you.

but these Error Message comes.

greeting

16 kB
Hochgeladen:04/16/16
Downloadcounter171
Download
16 kB
Hochgeladen:04/16/16
Downloadcounter203
Download
 
04/16/16  
 




funkheld
there find I no Startpaint for a nProc.
somehow there were The still times for a nProc ...? or not ?

Thank you.
greeting
 
04/16/16  
 



The informations are so alike, must you einarbeiten.

StartPaint in nProcs yield sooner little sense, there one Yes The DCs as Parameter commit. Perhaps helps you this to know:

within StartPaint means hDC whom gestartpainteten DC supply whom one against in nProcs uses for DC-operation.
 
04/16/16  
 




funkheld
Yes thanks.
now have I it geschnallt.

I thought, I had time such a thing here red, the it such a thing for XPSE given.

greeting
 
04/16/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.780 Views

Untitledvor 0 min.
RudiB.01/15/22
p.specht08/02/18
Torsten Rümker05/10/16
Ernst05/07/16
More...

Themeninformationen

this Topic has 2 subscriber:

funkheld (4x)
iF (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie