Jump to content

Prospeed help needed


 Share

Recommended Posts

Still exactly the same output whith whatever sleep() values I put and wherever I put them, moreover PNG transparency seem not to work even though I used IrfanView to make sure that the sprite has the good transparency colour(noticeable when sprites are close to each other, some get absorbed by the others)

EDIT:Too bad prospeed doesn't handle drawing lines or else the problem of the buggy sprites would already be solved T_T

post-24989-1211875197_thumb.png

Edited by eleria
Link to comment
Share on other sites

have the sprites another function exept drawing to the screen.

in your loop u use the SpriteToHDC() function, they become part of the background

and after the loop u use DeleteAllSprites()

so in my opinion you only use the sprites to draw the picture to the screen.

mybe copy pictures to the screen is alot better and faster !

#include <Prospeed30.au3>

Opt("GUIOnEventMode", 1)
HotKeySet("{Esc}","_Exit")
GUICreate("Sprite FX", 600, 400)
GUISetOnEvent(-3, "_exit")
GUISetState()

$back = Background("", 0, 0, 600, 400)

$Pic = LoadFileImage("msg-24989-1211826305.png")
$fx  = InitFx($Pic)

$total = 800

dim $drawx[$total], $drawy[$total], $sprite[$total]
For $g = 0 TO ($total-1)
    
    $seedR = random(55,255,1)
    $seedG = random(55,255,1)
    $seedB = random(55,255,1)   
    
    $drawx[$g] = Random(50,500,1)
    $drawy[$g] = Random(50,300,1)

    ExchangeRgb($Pic,0,0,$fx,$seedR,$seedG,$seedB)
    PaintImage($hdc,$drawx[$g],$drawy[$g],8,8,$Pic,0,0,-1)
    ExchangeRgb($Pic,0,0,$fx,"-"&$seedR,"-"&$seedG,"-"&$seedB)
Next

While 1
    Sleep(500)
WEnd

Func _exit()
    FreeAllImages()
    FreeFx($fx)
    Exit
EndFunc
Link to comment
Share on other sites

Assuming I have this:

$hdc = GetHDC()
CreateBuffer($guiwidth, $guiheight)
$IMG_bg = CreateImage(1232, 727)oÝ÷ Øz0q©È±«ÞÓ~0fàsÍú+«b¶ÇÊ'*h²ÆânW­¢Æ¯z)í óF~º&iül¢Øb²ÈhºWp¢¹ºÚ"µÍÚ[ÛYH    ÔÜÜYYÌ]LÉÝÂÜ
    ][ÝÑÕRSÛ][[ÙI][ÝËJBÝÙ^TÙ]
    ][ÝÞÑØßI][ÝË ][Ý×Ñ^]  ][ÝÊBÕRPÜX]J    ][ÝÔÜ]H  ][ÝË


BÕRTÙ]Û][
LË ][Ý×Ù^]  ][ÝÊBÕRTÙ]Ý]J
BÌÍØXÚÈHXÚÙÜÝ[
    ][ÝÉ][ÝË


BÌÍÔXÈH[ÜÊ    ][ÝÜÜÉ][ÝÊBÌÍÙH[]
    ÌÍÔXÊBÌÍÝÝ[H[H  ÌÍÙ]ÞÉÌÍÝÝ[K   ÌÍÙ]ÞVÉÌÍÝÝ[K  ÌÍÜÜ]VÉÌÍÝÝ[BÜ    ÌÍÙÈHÈ
    ÌÍÝÝ[LJB    ÌÍÜÙYYH[ÛJ
MKMKJB  ÌÍÜÙYYÈH[ÛJ
MKMKJB  ÌÍÜÙYYH[ÛJ
MKMKJH  ÌÍÙ]ÞÉÌÍÙ×HH[ÛJ
L
LJB ÌÍÙ]ÞVÉÌÍÙ×HH[ÛJ
LÌJB^Ú[ÙTØ  ÌÍÔXË   ÌÍÙ  ÌÍÜÙYY  ÌÍÜÙYYË    ÌÍÜÙYYBZ[[XYÙJ ÌÍÚË    ÌÍÙ]ÞÉÌÍÙ×K    ÌÍÙ]ÞVÉÌÍÙ×K   ÌÍÔXËLJB^Ú[ÙTØ   ÌÍÔXË   ÌÍÙ  ][ÝËI][ÝÉ[ÉÌÍÜÙYY  ][ÝËI][ÝÉ[ÉÌÍÜÙYYË    ][ÝËI][ÝÉ[ÉÌÍÜÙYYB^Ø]Q
    ÌÍÙ  ][ÝÐKÉ][ÝÊBÚ[HBÛY
L
BÑ[[ÈÙ^]

BYP[[XYÙÊ
BYQ
    ÌÍÙ
B^][[

But it doesn't o.o

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...