Sign in to follow this  
Followers 0
minxomat

A few simple BitBlt effects (melt your screen etc.)

8 posts in this topic

As it says on the box (in the title). Choose the effect by changing the effect number. Disable Blt acceleration if needed.

3d.au3

3 people like this

I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites



My favorite is 11 - Crazy Smoke.

Good work!

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

My favorite is 11 - Crazy Smoke.

You called? lol

Anyway, Vista didn't like it, it's all distorted with $bAndyMode true or false, and have to use task manager to kill it (add a hotkey to exit ;) ).

But I'm going to leave it running on the borrowed PC I'm on anyway... can't wait to see the owners faces  :lmao:

1 person likes this

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Better say "11 - Crazy SmOke_N". ;)

Br,

UEZ

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

it's all distorted

That's the point, Kind of :P


I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I modified the code a little bit to get a triggering on 11 - Crazy SmOke_N effect:

 

#include <ScreenCapture.au3>

_GDIPlus_Startup()
; Animation from 0 to 21
Local $iAnimation = 11

; ATTENTION!
; This enables GDI acceleration. Disable this if the script does Not
; run as expected (i.e. too slow)
Local $bAndyMode = True

; m1, m2, k1, k2, z1, z2
Local $aAnimations[23][6] = [ _
        [2, 2, 128, 128, 1, 1], _           ; 0 - Melt (Good)
        [20, 20, 128, 128, 1, 1], _         ; 1 - Powder Blow
        [9, 9, 128, 128, 1, 1], _           ; 2 - Powder
        [0, 0, 128, 128, 1, 1], _           ; 3 - Evaporate
        [3, 3, 128, 128, 1, 1], _           ; 4 - Water Color
        [5, 5, 128, 128, 1, 1], _           ; 5 - Accumulate
        [10000, 10000, 128, 128, 1, 1], _   ; 6 - Checks
        [1000, 1000, 128, 128, 1, 1], _     ; 7 - Extreme Checks (Fast)
        [10, 2, 128, 128, 1, 1], _          ; 8 - Wind Blow (Good)
        [2, 10, 128, 128, 1, 1], _          ; 9 - Pour Down (Quite)
        [10, 10, 128, 128, 1, 1], _         ; 10 - Running
        [20, 10, 128, 128, 10, 10], _       ; 11 - Crazy Smoke (Good)
        [2, 2, 128, 128, -100, 2], _        ; 12 - Super Fast Stream (Good)
        [2, 2, 100, 10, 1, 1], _            ; 13 - Moving Water (Good)
        [10, 8, 100, 10, 1, 1], _           ; 14 - Sort of Powder & Water
        [50, 10, 1, 25, 80, 10], _          ; 15 - Dissolve
        [2, 10, 12, 1, 5, 10], _            ; 16 - Blinds
        [1, 1, 1, 1, -2, 10], _             ; 17 - Stars
        [5, 5, 8, 4, -2, 10], _             ; 18 - Arrows (sort of.)
        [2, 10, 200, 4, -2, 10], _          ; 19 - Fire
        [30, 30, 10, 10, 10, 10], _         ; 20 - Grained
        [25, 25, 25, 255, 250, 25], _       ; 21 - Shake
        [Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1)]]
If $iAnimation = 22 Then ConsoleWrite($aAnimations[$iAnimation][0] & "," & $aAnimations[$iAnimation][1] & "," & $aAnimations[$iAnimation][2] & "," & $aAnimations[$iAnimation][3] & "," & $aAnimations[$iAnimation][4] & "," & $aAnimations[$iAnimation][5] & @CRLF)

Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
Global $sChkAero = DllStructCreate("int;")
DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
Global $aero = DllStructGetData($sChkAero, 1)
If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", False)
;Sleep(500)
Opt("GUIOnEventMode", 1)
Local $c = b(0), $a = @DesktopWidth, $b = @DesktopHeight
_ScreenCapture_Capture("m.bmp", 0, 0, -1, -1, False)
$d = GUICreate(0, $a, $b, 0, 0, 0x80000000)
GUISetOnEvent(-3, "a")
GUICtrlCreatePic("m.bmp", 0, 0, $a, $b)

$e = b($d)

$g_hDC = _WinAPI_GetDC($d)
$g_hDC_Backbuffer = _WinAPI_CreateCompatibleDC($g_hDC)
$g_hBITMAP = _GDIPlus_ImageLoadFromFile("m.bmp")
$g_hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($g_hBITMAP)
$g_oDC_Obj = _WinAPI_SelectObject($g_hDC_Backbuffer, $g_hHBITMAP)
$g_hGfxCtxt = _GDIPlus_GraphicsCreateFromHDC($g_hDC_Backbuffer)

GUISetState()
$t = TimerInit()
$r = Random(0.5, 1.5)
While 1;.
    $f = ($a - $aAnimations[$iAnimation][2]) * Random(0, 1)
    $g = ($b - $aAnimations[$iAnimation][3]) * Random(0, 1)
    $h = $aAnimations[$iAnimation][0] * Random(0, 1) - $aAnimations[$iAnimation][4]
    $i = $aAnimations[$iAnimation][1] * Random(0, 1) - $aAnimations[$iAnimation][5]
    If Not $bAndyMode Then
        DllCall("gdi32.dll", "bool", "BitBlt", "handle", $e, "int", $f + $h, "int", $g + $i, "int", $aAnimations[$iAnimation][2], "int", $aAnimations[$iAnimation][3], "handle", $c, "int", $f, "int", $g, "dword", 0x00CC0020);
    Else
        DllCall("gdi32.dll", "bool", "BitBlt", "handle", $e, "int", Int($f + $h), "int", Int($g + $i), "int", 128, "int", 128, "handle", $e, "int", Int($f), "int", Int($g), "dword", 0x00CC0020) ;Andy's Variante
    EndIf
    If TimerDiff($t) > 1500 * $r Then
        DllCall("gdi32.dll", "bool", "BitBlt", "handle", $g_hDC, "int", 0, "int", @DesktopHeight - 50, "int", @DesktopWidth, "int", 50, "handle", $g_hDC_Backbuffer, "int", 0, "int", @DesktopHeight - 50, "dword", 0x00CC0020)
        $r = Random(0.5, 1.5)
        $t = TimerInit()
    EndIf
WEnd;

Func a();
    If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", True)
    DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $d, "handle", $e)
    DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "handle", $c)
    _WinAPI_SelectObject($g_hDC_Backbuffer, $g_oDC_Obj)
    _GDIPlus_GraphicsDispose($g_hGfxCtxt)
    _WinAPI_DeleteObject($g_hHBITMAP)
    _WinAPI_ReleaseDC($d, $g_hDC)
    _GDIPlus_ImageDispose($g_hBITMAP)
    _GDIPlus_Shutdown()
    Exit;
EndFunc   ;==>a

Func b($j);
    Return DllCall("user32.dll", "handle", "GetDC", "hwnd", $j)[0];
EndFunc   ;==>b
This effect probably makes sense only for this effect! For the other effect it has to be disabled or modified appropriately.

 

Br,

UEZ

Edited by UEZ
2 people like this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

-snip-

 

Nice, liking the random effect ;)


I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
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
Sign in to follow this  
Followers 0