Surprise :
Le code :
Code : Tout sélectionner
#GWL_EXSTYLE = -20
#GWL_STYLE = -16
#WS_EX_LAYERED = 524288
#LWA_ALPHA = 2
#LWA_COLORKEY = 1
Prototype.i Proto_SetWindowLong_(hWnd,nIndex.i, NewLong.l)
Prototype.b Proto_SetLayeredWindowAttributes_(hWnd,ColorKey,Alpha.b,Flags.w)
Prototype.l Proto_LoadCursorFromFile_(*lpFileName)
If OpenLibrary(1,"user32.dll")
Global SetWindowLong_.Proto_SetWindowLong_ = GetFunction(1,"SetWindowLongW") ;on charge la fonction
Global SetLayeredWindowAttributes_.Proto_SetLayeredWindowAttributes_ = GetFunction(1,"SetLayeredWindowAttributes")
Global LoadCursorFromFile_.Proto_LoadCursorFromFile_ = GetFunction(1,"LoadCursorFromFileW")
Else
MessageRequester("Erreur","Erreur d'accés a user32.dll.",16)
EndIf
;#################################################################################################################################
InitSound()
UsePNGImageDecoder()
Enumeration Objects
#Window
#MLG_Zone
#MLG_Illuminati
#MLG_SampleText
#MLG_Font
#MLG_IlluImage
#MLG_TrayIcon
#MLG_wasted
EndEnumeration
Enumeration Time
#RedrawTime = 5
#ColorRefrestTimer = 1000
#ActuatePosTimer
EndEnumeration
Enumeration Colors
#Yellow = $00FDFF
#Green = $00760B
#Blue = $FF0000
#LightBlue = $FFF200
#Red = $0000FF
#Pink = $FF00FD
#Brown = $155550
#White = $FFFFFF
#Magenta = $A01C72
EndEnumeration
Structure sIlluminati
size.i
EndStructure
Structure sSampleText
Text.s
Color.i
EndStructure
Structure sMLG
Type.i
x.i
y.i
rot.i
dep_y.i
dep_x.i
illuData.sIlluminati
textData.sSampleText
EndStructure
Global NewList MLGObjects.sMLG()
Global bContinue = 1, bState = 1
Global gSampleTexts.s = "sample text|OOOOOH!!!!|dank meme|xD|666 illuminati|Illuminati !!|dat boi|Loomynarty Confim3d !!1|OMG|OOOOOH NOOOO|NOSCOOOOPE!|Itz a tripel|mum get teh comm'ra|mom get the camera|NUUUKE|BLAZE IT|blaze it blaze it blaze it !|Ook!Ook.Ook?Ook.Ook.Ook!|--++>-[>++<-]++|LOOOOOOL|lol|lel \o/|:D|dank memes everywhere!!!|illu42|420!!!!|420|42|E=MLG²|JOHN CEEEENA|MEGAFAGGIT|fgt|Nazi Zombi|W33D|DANKBUNTU|666 JAVA 666| $$$|weedows xp|azerty|+-[----->+<]>+.--.|W33D|brainfuck 420|kthxby|42+0=420 illu|JOHN CEENA|Smoke weed|53sdf43dsf|Illuminati|Illuminati|Illu powaaa|POWAAA|GOTO++|666 illu|The Answer is still 42|wat?|sample text 2|FOURTY TWO YEAH|sample text 42|FOURTY TWO YEAH|FAGGOT|FAGGIT|FGT|fgt|faggit|E=MLG²|That's a complot !|illuminatis everywhere|ILLU|DANK MEME|420|Illuminati Confirmed.|C0NF1RM3D 11|tru fact 42|sample text|SEGFAULT|GET REKT|Segmentation Error : Illuminati inside|Get Rekt|Get Rekt Biach !|REKT!!!|OMG|OMG THIS NOSCOPE|NOSCOPE!!!|FATAL ERROR|faggit|illu 420|ILLUMINATI|420|42|omg 42|weed|Dank MLG powa !!|E = MLG²|360 noscope master|360 NOSCOOOPE OMG|COD MLG MASTER|FABB3RT 3ST31N|31NST3IN|E=MLG²|6+6+6=666|4+2=420|dat shet|SPOOKY+SCARY=SKELETON|SPOOKY DANKNESS|level 420|best than u|noscoper 4 harvard|MLG DANK MIT NOSCOPER 420|420 MLG|parebola|h4x0r|+420 score XTRA|dank harvard|kinda h4x0r|DARTH NOSCOPOR|illu trump|illu putin|MLG|U FUKIN WOT M8|fukin mlg app|dank bluskreen|w1nd0wz mlg|M1Kr050FT D00R xP|KR0$$0FT M4C|l1n^x dankbuntu|GNU MLG DANKNESS|free mlg memes|u cant read all|d34d m4us|le deux neuf|DANK NAZI|p4nz3r|TRIANGLE !|DORITOS|blaze it 420|illuminati|Illuminati 420|ILLU|loomynarty c0nf1rm3d 1|Illuminati !|ILLU IN P4NZ3R"
Declare MLG_Init()
Declare MLG_Draw(param)
Declare MLG_UpdateColor()
Declare MLG_RandomColor()
Declare.s MLG_RandomText()
Declare MLG_Fade()
Declare MLG_UnFade()
Declare MLG_wasted()
Declare MLG_LoadBank(File$)
MLGmusic$ = "illu"+Str(Random(1))+".wav" ;TODO : musiques
;MLGmusic$ = "illu0.wav"
LoadFont(#MLG_Font,"Impact",16)
LoadImage(#MLG_IlluImage,"illuminati.bmp")
LoadImage(#MLG_TrayIcon,"illuminati.ico")
LoadImage(#MLG_wasted,"wasted.png")
ResizeImage(#MLG_IlluImage,64,64)
LoadSound(1,MLGmusic$)
PlaySound(1,#PB_Sound_Loop)
Global gFreq = GetSoundFrequency(1)
OpenWindow(#Window,0,0,420,420,"MLG",#PB_Window_Maximize | #PB_Window_BorderLess)
CanvasGadget(#MLG_Zone,0,0,WindowWidth(#Window), WindowHeight(#Window))
StartDrawing(CanvasOutput(#MLG_Zone))
Box(0,0,OutputWidth(),OutputHeight(),RGB(220,220,220))
StopDrawing()
SetWindowLong_(WindowID(#Window),#GWL_EXSTYLE, #WS_EX_LAYERED)
SetLayeredWindowAttributes_(WindowID(#Window), RGB(20,20,20),220,#LWA_ALPHA | #LWA_COLORKEY)
StickyWindow(#Window,1)
AddKeyboardShortcut(#Window,#PB_Shortcut_Control | #PB_Shortcut_I,42)
AddSysTrayIcon(#MLG_TrayIcon,WindowID(#Window),ImageID(#MLG_TrayIcon))
If Not CountProgramParameters()
MLG_LoadBank("meme_bank.mlg")
Else
MLG_LoadBank(ProgramParameter())
EndIf
MLG_Init()
thMLG = CreateThread(@MLG_Draw(),1)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Menu
If EventMenu() = 42
MLG_Fade()
StopSound(1)
bContinue = 0
WaitThread(thMLG,1000)
MLG_wasted()
CloseWindow(#Window)
End
EndIf
Case #PB_Event_SysTray
If bState
MLG_Fade()
PauseSound(1)
bState = 0
Else
ResumeSound(1)
MLG_UnFade()
bState = 1
EndIf
EndSelect
Until event = #PB_Event_CloseWindow
bContinue = 0
Procedure MLG_Init()
randNb = Random(64,42)
deskWidth = WindowWidth(#Window)
deskHeight = WindowHeight(#Window)
For i=0 To randNb
AddElement(MLGObjects())
With MLGObjects()
\x = Random(deskWidth-10)
\y = Random(deskHeight-5)
\dep_x = Random(3)
\dep_y = Random(2)
\rot = Random(90)-45
If Random(100) < 20
\Type = #MLG_Illuminati
\illuData\size = Random(420,42)
Else
\Type = #MLG_SampleText
\textData\Color = MLG_RandomColor()
\textData\Text = MLG_RandomText()
EndIf
EndWith
Next
SortStructuredList(MLGObjects(),#PB_Sort_Ascending,OffsetOf(sMLG\Type),TypeOf(sMLG\Type))
EndProcedure
Procedure MLG_Draw(param)
Repeat
tmp_start = ElapsedMilliseconds()
MLG_UpdateColor()
tmp_drawstart = ElapsedMilliseconds()
StartDrawing(CanvasOutput(#MLG_Zone))
Box(0,0,OutputWidth(),OutputHeight(),RGB(20,20,20))
DrawingMode(#PB_2DDrawing_Transparent)
DrawingFont(FontID(#MLG_Font))
ForEach MLGObjects()
With MLGObjects()
Select \Type
Case #MLG_Illuminati
;DrawText(\x, \y, "illu here", #Red)
DrawImage(ImageID(#MLG_IlluImage),\x ,\y); ,\illuData\size,\illuData\size)
Case #MLG_SampleText
DrawRotatedText(\x+1, \y+1, \textData\Text, \rot,0)
DrawRotatedText(\x, \y, \textData\Text, \rot, \textData\Color)
EndSelect
EndWith
Next
StopDrawing()
Debug "Drawing time : " + Str(ElapsedMilliseconds()- tmp_drawstart) + ", updated in "+Str(tmp_start-tmp_drawstart)
Delay(#RedrawTime)
Debug "Total rendering time : "+Str(ElapsedMilliseconds() - tmp_start)
Until bContinue = 0
EndProcedure
Procedure MLG_UpdateColor()
ForEach MLGObjects()
With MLGObjects()
If \Type = #MLG_SampleText
\textData\Color = MLG_RandomColor()
EndIf
\x + Random(4)-2
\y + Random(4)-2
EndWith
Next
EndProcedure
Procedure.s MLG_RandomText()
Protected text$, rand
rand = Random(CountString(gSampleTexts,"|"),1)
Debug rand
text$ = StringField(gSampleTexts,rand,"|")
Debug text$
ProcedureReturn text$
EndProcedure
Procedure MLG_RandomColor()
id = Random(8)
Select id
Case 0
clr = #Yellow
Case 1
clr = #Red
Case 2
clr = #Green
Case 3
clr = #Blue
Case 4
clr = #LightBlue
Case 5
clr = #Yellow
Case 6
clr = #Brown
Case 7
clr= #Pink
Case 8
clr = #Magenta
EndSelect
ProcedureReturn clr
EndProcedure
Procedure MLG_Fade()
For i=255 To 0 Step -1
SetLayeredWindowAttributes_(WindowID(#Window), RGB(20,20,20),i,#LWA_ALPHA | #LWA_COLORKEY)
SetSoundFrequency(1,(i*gFreq)/255)
Delay(2)
Next
EndProcedure
Procedure MLG_UnFade()
For i=0 To 255
SetLayeredWindowAttributes_(WindowID(#Window), RGB(20,20,20),i,#LWA_ALPHA | #LWA_COLORKEY)
SetSoundFrequency(1,(i*gFreq)/255)
Delay(2)
Next
SetSoundFrequency(1,gFreq)
EndProcedure
Procedure MLG_wasted()
StartDrawing(CanvasOutput(#MLG_Zone))
Box(0,0,OutputWidth(),OutputHeight(),RGB(20,20,20))
DrawImage(ImageID(#MLG_wasted), OutputWidth()/2-ImageWidth(#MLG_wasted)/2, OutputHeight()/2-ImageHeight(#MLG_wasted)/2)
StopDrawing()
For i=0 To 255
SetLayeredWindowAttributes_(WindowID(#Window), RGB(20,20,20),i,#LWA_ALPHA | #LWA_COLORKEY)
Delay(2)
Next
Delay(1000)
For i=255 To 0 Step -1
SetLayeredWindowAttributes_(WindowID(#Window), RGB(20,20,20),i,#LWA_ALPHA | #LWA_COLORKEY)
Delay(2)
Next
EndProcedure
Procedure MLG_LoadBank(File$)
If FileSize(File$)
ReadFile(1,File$,#PB_File_SharedRead)
gSampleTexts = ReadString(1,#PB_File_IgnoreEOL)
CloseFile(1)
Else
MessageRequester("MLG DANK ERROR","Le fichier "+File$+" n'est pas une base de données Illuminatie ou ne peut être ouvert. Ceci EST un complot Illuminati, mais l'application va quand même démarrer en utilisant les memes par défaut.",#PB_MessageRequester_Error)
EndIf
EndProcedure
C'est par ici le téléchargment de la Vérité
Le mode d'emploi Illuminati a écrit :
- Quitter : Ctrl + I
- Mettre en pause (avec fondu) : Icone illuminati dans le systray
- Reprendre : pareil
- Tout fichier en .mlg ouvert avec l'application Illu MLG et contenant des memes séparés par des "|" remplacera les memes par défaut A vous de personnaliser vos memes (par défaut dans "meme_bank.mlg")
- Chaque Illuminati et chaque meme a un comportement indépendant, se déplace, et change de couleur aléatoirement.
- L'application consomme pas mal de CPU à cause du fond transparent