was muss ich machen das das nicht mehr so blinkt?
hoffe mir kann jemand helfen die prospeed ist drangehängt.
Spoiler anzeigen
;#NoTrayIcon
#include "prospeed30.au3"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
;(1400/2.5)/(2400/2.5))
;270000
;20385
;13905
;7560 -> 4725
;MsgBox(0,"",1179 - 1178*0.93)
;Exit
$tot = 0
$player1x = 100
$player1y = 600
$player2x = 200
$player2y = 600
$richtung_bild = -1
$player1_bild = 0
$player2_bild = 0
$schuss1_x2 = 0
$schuss1_y2 = 0
$schuss2_x2 = 0
$schuss2_y2 = 0
$schussx1 = 0
$schussy1 = 0
$schussx2 = 0
$schussy2 = 0
$schuss1_1 = "frei"
$schuss1_2 = "frei"
$schuss1_1g = 10
$schuss1_2g = 50
$schuss2_1g = 10
$schuss2_2g = 50
$schusstimeout1 = 0
Dim $player1[4]
Dim $player2[4]
$schuss = ""
InitPixelEffects()
$Fenster = GUICreate("",@DesktopWidth,@DesktopHeight, 0, 0, $WS_POPUP)
GUISetState()
_GDIPlus_Startup()
$schliessen = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\schliessen.gif")
For $sad = 0 To 3
$richtung_bild = $richtung_bild + 1
$player1[$richtung_bild] = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\player1_" & $richtung_bild & ".gif")
$player2[$richtung_bild] = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\player2_" & $richtung_bild & ".gif")
Next
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Fenster)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(@DesktopWidth, @DesktopHeight, $hGraphic)
$hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hDC = GetHDC()
$createbitmap = CreateImage(@DesktopWidth,@DesktopHeight) ;create empty bitmap (default = black)
CreateBuffer(@DesktopWidth, @DesktopHeight) ;create buffer 800x600 for WM_PAINT
PaintImage($hDC,0,0,@DesktopWidth, @DesktopHeight,$createbitmap,0,0,0) ;copy empty bitmap to window
Stars(0,0,@DesktopWidth,@DesktopHeight,200,64,0)
While 1
$maus = GUIGetCursorInfo()
If Not($maus = "") Then
If _IsPressed(01) And $maus[0] >= @DesktopHeight - 25 And $maus[0] >= @DesktopWidth -24 And $maus[1] <= 25 And $maus[1] <= @DesktopWidth Then _Exit()
EndIf
$hbrushschwarz = _GDIPlus_BrushCreateSolid(0xFF000000)
$hbrushblau = _GDIPlus_BrushCreateSolid(0xFF0000FF)
_GDIPlus_GraphicsFillRect($hbuffer,0,0,@DesktopWidth,@DesktopHeight,$hbrushschwarz)
_GDIPlus_GraphicsFillRect($hbuffer,$player1x - 20,$player1y -20,200,220,$hbrushschwarz)
_GDIPlus_GraphicsFillRect($hbuffer,$player1x - 20,$player1y -20,120,120,$hbrushschwarz)
_GDIPlus_GraphicsFillRect($hbuffer,$schussx1,$schussy1,$schuss1_1g,$schuss1_2g,$hbrushblau)
_GDIPlus_GraphicsFillRect($hbuffer,$schussx2,$schussy2,$schuss2_1g,$schuss2_2g,$hbrushblau)
_GDIPlus_GraphicsDrawImageRect($hbuffer,$player1[$player1_bild],$player1x,$player1y,80,110)
_GDIPlus_GraphicsDrawImageRect($hbuffer,$player2[$player2_bild],$player2x,$player2y,80,110)
_GDIPlus_GraphicsDrawImageRect($hbuffer,$schliessen,@DesktopWidth -24,-1,25,25)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, @DesktopWidth, @DesktopHeight)
;SetBuffer($createbitmap) ;fill buffer with empty bitmap
;SetPixelEffect(500, 500, 0x0000ff, 7, 16, 2, 100, 1, 50)
;player1
If _IsPressed(26) Then
$player1_bild = 0
$player1y = $player1y - 15
EndIf
If _IsPressed(27) Then
$player1_bild = 1
$player1x = $player1x + 15
EndIf
If _IsPressed(25) Then
$player1_bild = 3
$player1x = $player1x -15
EndIf
If _IsPressed(28) Then
$player1_bild = 2
$player1y = $player1y + 15
EndIf
If _IsPressed("0D") Then
If $schuss1_1 = "frei" Then
If $player1_bild = 0 Then
$schuss1_y1 = -30
$schuss1_x1 = 0
$schuss1_1g = 10
$schuss1_2g = 50
EndIf
If $player1_bild = 1 Then
$schuss1_y1 = 0
$schuss1_x1 = 30
$schuss1_1g = 50
$schuss1_2g = 10
EndIf
If $player1_bild = 2 Then
$schuss1_y1 = 30
$schuss1_x1 = 0
$schuss1_1g = 10
$schuss1_2g = 50
EndIf
If $player1_bild = 3 Then
$schuss1_y1 = 0
$schuss1_x1 = -30
$schuss1_1g = 50
$schuss1_2g = 10
EndIf
$schussx1 = $player1x
$schussy1 = $player1y
$schuss1_1 = "besetzt"
$schuss = "exist"
$schusstimeout1 = 0
EndIf
If $schuss1_2 = "frei" And $schusstimeout1 >= 14 Then
If $player1_bild = 0 Then
$schuss1_y2 = -30
$schuss1_x2 = 0
$schuss2_1g = 10
$schuss2_2g = 50
$schussx2 = $player1x + 68
$schussy2 = $player1y
EndIf
If $player1_bild = 1 Then
$schuss1_y2 = 0
$schuss1_x2 = 30
$schuss2_1g = 50
$schuss2_2g = 10
$schussx2 = $player1x
$schussy2 = $player1y+97
EndIf
If $player1_bild = 2 Then
$schuss1_y2 = 30
$schuss1_x2 = 0
$schuss2_1g = 10
$schuss2_2g = 50
$schussx2 = $player1x +68
$schussy2 = $player1y
EndIf
If $player1_bild = 3 Then
$schuss1_y2 = 0
$schuss1_x2 = -30
$schuss2_1g = 50
$schuss2_2g = 10
$schussx2 = $player1x
$schussy2 = $player1y+97
EndIf
$schuss1_2 = "besetzt"
$schuss = "exist"
EndIf
EndIf
;player2
If _IsPressed(57) Then
$player2_bild = 0
$player2y = $player2y - 15
EndIf
If _IsPressed(44) Then
$player2_bild = 1
$player2x = $player2x + 15
EndIf
If _IsPressed(41) Then
$player2_bild = 3
$player2x = $player2x -15
EndIf
If _IsPressed(53) Then
$player2_bild = 2
$player2y = $player2y + 15
EndIf
$schusstimeout1 = $schusstimeout1 + 1
If $schussy1 <=-200 Or $schussx1 >= @DesktopWidth + 200 Or $schussy1 >= @DesktopHeight +200 Or $schussx1 <= -200 Then $schuss1_1 = "frei"
If $schussy2 <=-200 Or $schussx2 >= @DesktopWidth + 200 Or $schussy2 >= @DesktopHeight +200 Or $schussx2 <= -200 Then $schuss1_2 = "frei"
If $schuss = "exist" Then
$schussx1 = $schussx1 + $schuss1_x1
$schussy1 = $schussy1 + $schuss1_y1
$schussx2 = $schussx2 + $schuss1_x2
$schussy2 = $schussy2 + $schuss1_y2
EndIf
_GDIPlus_GraphicsFillRect($hbuffer,$player1x,$player1y,220,220,$hbrushschwarz)
Sleep(10)
WEnd
Func _exit()
DeInitPixelEffects()
_GDIPlus_BrushDispose($hbrushschwarz)
_GDIPlus_BrushDispose($hbrushblau)
_GDIPlus_GraphicsDispose($hgraphic)
_GDIPlus_GraphicsDispose($hbuffer)
_GDIPlus_BitmapDispose($hbitmap)
_GDIPlus_Shutdown()
Exit
EndFunc