Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ~Ar-S~

Pages: 1 [2] 3
21
Purebasic / PB 5.60 beta 8 on the place
« on: January 28, 2017 »
Heyheyhey,
PB 5.60 beta 2 is out..
Lot's of interresting news !

Quote
- Added: GIF decoder support
- Added: SetImageFrame(), GetImageFrame(), ImageFrameCount(), AddImageFrame(), RemoveImageFrame()
- Added: UserAgent support to ReceiveHTTPMemory(), ReceiveHTTPFile() and GetHTTPHeaders()
- Added: #PB_Http_NoRedirect support for GetHTTPHeaders()
- Added: "Joe Doe <joe.doe@domain.com>" email format support for SendMail()
- Added: HTTPProxy() for Http related commands proxy support
- Added: Compression level support for CreatePack() and CompressMemory()
- Added: Large icons and text support to ToolBar library
- Added: GetUserDirectory() to get user specific directories
- Added: more flexibility to Base64Decoder to handle non padded input
- Added: Base64Encoder() and Base64Decoder() which takes string as input/output for easier use
- Added: color constants like #Black, #Blue etc. for all OS
- Added: Event() to get the current event (mainly useful from callback)
- Added: #PB_Canvas_Container support to have a container behaviour for canvas
- Added: #PB_EventType_Resize support for PanelGadget(), ContainerGadget(), CanvasGadget() and ScrollAreaGadget()
- Added: #PB_ListIcon_ColumnCount to GetGadgetAttribute() for ListIconGadget() to get the column count
- Added: #PB_All support to RemoveGadgetColumn() to remove all the columns
- Added: (IDE) templates are now saved when created to prevent lost if the IDE is not properly closed
- Added: (IDE) jump to a procedure now automatically unfold it if it was folded
- Added: (IDE) new specific popup menu for file tab to ease source file management
- Added: (IDE) find previous (reverse find)

- Changed: ToolBar, Menu and StatusBar are now excluded from inner window area for all OS
- Changed: MenuHeight(), StatusBarHeight() and ToolBarHeight() are now deprecated (all returns 0)
- Changed: renamed Base64Encoder() to Base64EncoderBuffer()
- Changed: renamed Base64Decoder() to Base64DecoderBuffer()
- Changed: removed 'define.b' syntax to change default type as it could create hard to find bugs.

Here is an exemple to use GIF picture with "Frame" included lib

EnJoY  :||

Code: [Select]
; Ar-S // PB 5.60 beta1
; Gif viewer and animate with frame

Enumeration
  #WIN
  #GAD_IMAGE
  #T
  #IMAGEGIF
EndEnumeration

UseGIFImageDecoder()

Declare CatchImage_Net(Adr$)
Declare Count()
Declare ChangeFrame()
Declare exit()

Global Nbrframe

;LoadImage(#IMAGEGIF,"VOTREFICHIERGIF")
; OU BIEN
InitNetwork()
adr$ = "http://share.ldvmultimedia.com/boules.gif"
Image=CatchImage_Net(adr$)  ;Modifie cela par le chemin de ton image

If Image <> 0
  NbrFrame = ImageFrameCount(#IMAGEGIF)
Else
  Debug "erreur de chargement de l'image"
  End
EndIf

Procedure CatchImage_Net(Adr$)
  InitNetwork()
  Protected image
  ; By Ar-S
  *Buffer = ReceiveHTTPMemory(Adr$)
  If *Buffer
    Image = CatchImage(#IMAGEGIF, *Buffer, MemorySize(*Buffer) )
    FreeMemory(*Buffer)
    ProcedureReturn Image
  Else
    ProcedureReturn #False   
  EndIf
EndProcedure
;;; End OR


Procedure Count()
  ProcedureReturn NbrFrame
EndProcedure


Procedure ChangeFrame()
  Static Frame
  Frame + 1
  If Frame = NbrFrame
    Frame = 0
  EndIf
  Debug "Frame : " + Frame
  ; Affichage
  SetImageFrame(#IMAGEGIF, Frame)
  SetGadgetState(#GAD_IMAGE, ImageID(#IMAGEGIF))
EndProcedure


Procedure exit()
  End
EndProcedure




If OpenWindow(#WIN, 0, 0, 150, 113, "Gif...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
 
  ImageGadget(#GAD_IMAGE,0,0,150,113,ImageID(#IMAGEGIF))
  AddWindowTimer(#WIN,3,80)
 
  BindEvent(#PB_Event_CloseWindow, @exit())
  BindEvent(#PB_Event_Timer, @ChangeFrame())
 
  Repeat : WaitWindowEvent() : ForEver
 
EndIf


22
Purebasic / [DEMO] Tiny OldSchool Demo N1
« on: October 28, 2016 »
Hello,

Here is my first PB demo.
I use to want remebering some Amiga good times :)
It's a 1min demo witch using some effects i found in DBF and others Forums
I made music with  "Rytmik Ultimate"

Compiled with PB 5.50 x86
in the 7zp CODE + DATAS + EXE

I hope you will enjoy.

23
Purebasic / Re: intros/demos sound Vumeter
« on: August 03, 2016 »
Please Add d3dx9_43.dll to your zip

24
Purebasic / Re: White = transparent
« on: July 20, 2016 »
GuillyGuilly please share your picture.

25
Purebasic / Re: intros/demos sound Vumeter
« on: July 20, 2016 »
here is a pretty good exemple from Dobro to  make a good spectrum with Fmodex Dll.
i use it to make my (pretty good) webradio player.
http://ldvmultimedia.com/telecharger_ars_stream_radio.php

EnJoY

Code: [Select]
;***********************************************
;Titre  :*test_fmodex
;Auteur  : Dobro
;Date  :24/10/2013
;Heure  :17:22:14
;Version Purebasic :  PureBasic 5.20 LTS (Windows - x86)
; Libairies necessaire : Fmodex.pbi
;***********************************************


Enumeration
#window
#image
EndEnumeration


XIncludeFile "E:\MULTIMEDIA\PUREBASIC\5.20\_Fmodex_5_20\fmodex.pbi"


Declare    Oscillo(sound)


; **************** initialisation Sprite des 512 niveaux************
Global Dim Arr.F(512) ; tableau pour les 512 niveaux
If InitSprite() = 0
MessageRequester("Erreur", "Impossible d'ouvrir l'écran & l'environnement nécessaire aux sprites !", 0)
End
EndIf
Structure sprite
x.l
y.l
EndStructure
Global Dim sprite.sprite(512)
; creation de la fenetre d'affichage des niveau

If OpenWindow(#window, pos_x, pos_y, 300, 55, "Pure Radio", #PB_Window_SystemMenu)

If OpenWindowedScreen(WindowID(#window), 4, 4,290,50,0,0,0 )
ClearScreen(RGB($0,$0,$0))
FlipBuffers()

For i=1 To 512 Step 4
CreateSprite(i,2,32):CreateImage(#image,2,32,32)
sprite(i)\x=i
sprite(i)\y=50
StartDrawing ( ImageOutput (#image))
DrawingMode ( #PB_2DDrawing_Gradient )
;
BackColor($0000FF)
GradientColor(0.4, $00FFFF)
GradientColor(0.6, $FFFF00)
FrontColor($FF0000)
LinearGradient(0, 0, 2, 32)

Box(0, 0, 2, 32)
StopDrawing ()

StartDrawing ( SpriteOutput (i))
DrawImage(ImageID(#image),0,0)
StopDrawing()

Next i

EndIf
EndIf
; *******************************************



url$="http://50.7.98.106:8398/"

; ************init ****************************
FMOD_System_Create(@fmodsystem)
FMOD_System_Init(fmodsystem, 32, 0, 0)
; ***************************************


FMOD_System_CreateStream(fmodsystem, @url$, #FMOD_CREATESTREAM, 0, @sound)

FMOD_System_PlaySound(fmodsystem, 0, sound, 0, @channel) ; joue l'url



;str.s = OpenFileRequester("Choose a soundfile", "c:", "*.*|*.*", 0)
If str.s<>"" ; on charge le fichier
;FMOD_System_CreateStream(fmodsystem, @str, #FMOD_SOFTWARE, 0, @sound) ; creer le stream
;FMOD_Sound_GetLength(sound, @longueur, #FMOD_TIMEUNIT_MS) ; recupe la taille du son dans longueur
; FMOD_System_PlaySound(fmodsystem, 0, sound, 0, @channel) ; joue
EndIf

Repeat
Evenement.l= WaitWindowEvent(2)


FMOD_Channel_GetSpectrum(channel, Arr(), 512, 0, 0 ) ; recuperere les 512 niveaux des frequences
Oscillo(sound) ; le graph au centre ecran graphique


Select EventWindow()
;-evenement window


EndSelect

FlipBuffers()
ClearScreen(0)
Until Evenement = #PB_Event_CloseWindow

Procedure Oscillo(sound)
Static compteur.F,compteur2.F
compteur.F=compteur.F+1
compteur2.F=compteur2.F+10
largeur=290 :hauteur=50


If state=0 And play=1
For spr=1 To 512 Step 4
variation=25* Sin(compteur2*#PI/180)
sprite(spr)\x=spr
sprite(spr)\y= variation* Sin(spr*#PI/180)
DisplaySprite(spr,sprite(spr)\x+compteur.F,sprite(spr)\y)
sprite(spr)\y=50 ; remet le sprite en bas
If sprite(spr)\x+compteur.F>512
compteur.F=0
sprite(spr)\x=0
EndIf

Next spr

Else
For spr=1 To 512 Step 4
sprite(spr)\y=sprite(spr)\y-Arr(spr)*32*spr
DisplaySprite(spr,sprite(spr)\x,sprite(spr)\y)
sprite(spr)\y=50 ; remet le sprite en bas
Next spr
EndIf

EndProcedure



26
Purebasic / Re: My first intro!
« on: April 09, 2016 »
 :carrot: Very nice !  :carrot:

27
Purebasic / Re: Lexicos intro source
« on: April 09, 2016 »
 :clap:Nice and proper :)

28
Fun :)
Thanks for sharing. Nice swf trick  :cheers:

29
Purebasic / Re: PB vs The World (15'years PB contest)
« on: December 05, 2015 »
I win this contest  :updance:

30
My bad  :boxer:

31
I missed the vote, but congrats to everyone ! :clap: :clap:
I hope i'll note miss the next contest ^^

32
Space do not launch weapon.. But it's so great to see and listen this great 'n famous game.
You earn my vote  :clap:

33
Nice Glowing effect dude.  :||

34
Purebasic / Re: [SOLVED] Transparency issues
« on: November 11, 2015 »
Hi, that's strange, i don't see any differences between buildsprite frome netmaestro and a classic drawing sprite.

Code: [Select]
Global a
Global moveflag
Global c64


Procedure _Startup()
  UsePNGImageDecoder()
  UseJPEGImageDecoder()
      InitSprite()
      xres=800
      yres=600
      InitKeyboard()
      a=0
      moveflag = 0
      windows=  OpenScreen(xres,yres,32,"(C) Omnikam 2015")
      LoadImage(sun,"sun.png")
      c64 =  LoadSprite(#PB_Any, "c64.jpg")
;       BuildSprite(sun,ball,#PB_Sprite_AlphaBlending)
      LoadSprite(sun,"sun.png",#PB_Sprite_AlphaBlending) ; <= why don't you use that ?
    EndProcedure
    Procedure Fader()
        If moveflag=0
        a=a+10
        If a>254
           moveflag = 1
        EndIf
     EndIf
     If moveflag=1
        a=a-10
        If a< 10
           moveflag = 0
        EndIf
      EndIf
    EndProcedure
    Procedure Draw_All()
   
    DisplaySprite(c64,0,0)
    ;ZoomSprite(c64,800,600)
    ;RotateSprite(sun,a,#PB_Relative)
    DisplayTransparentSprite(sun,300,a,a)
    EndProcedure
    _Startup()
   
   
    Repeat 
    Draw_All()
    FlipBuffers()
    Fader()

 ExamineKeyboard()
 Until KeyboardPushed (#PB_Key_Escape)

35
Purebasic / Re: Second Demo
« on: November 11, 2015 »
Quote
Did you know, Ive only been programing for about a month?
Great work !

36
Purebasic / Re: Second Demo
« on: November 10, 2015 »
Except the transparancy, that's pretty fun, i prefer piratsound. I don't like the first blacklines on the first demo (to big)

37
Purebasic / Re: [SOLVED]Sprite Clipping Issue??
« on: November 10, 2015 »
It's strange you're wright.

Anyway, I prefer to use GrabSprite anyway the free the original "big" sprite.

Code: [Select]
UsePNGImageDecoder()

Enumeration
  #C64
  #BALL
  #SHIP
  #HAPPYDAYS
EndEnumeration

InitSprite() : InitKeyboard()
xres=1280
yres=768

If OpenScreen(xres,yres,32,"(C) Omnikam 2015")

LoadSprite(#C64, "pirate.png",#PB_Sprite_AlphaBlending )
CopySprite(#C64,#BALL,#PB_Sprite_AlphaBlending)
CopySprite(#C64,#SHIP,#PB_Sprite_AlphaBlending)
CopySprite(#C64,#HAPPYDAYS,#PB_Sprite_AlphaBlending)

GrabSprite(#BALL,   17, 15, 477, 477,#PB_Sprite_AlphaBlending)
GrabSprite(#SHIP,   500, 17, 500, 420,#PB_Sprite_AlphaBlending)
GrabSprite(#HAPPYDAYS,   0, 500, 486 ,480,#PB_Sprite_AlphaBlending)

Debug #BALL
Debug #SHIP
Debug #HAPPYDAYS

FreeSprite(#C64)
x = 1280

Repeat
  ExamineKeyboard()
  ClearScreen(0)
  x-4
  DisplayTransparentSprite(#ball,     x     , 50,255)
  DisplayTransparentSprite(#ship,     30 + x, 50,255)
  DisplayTransparentSprite(#happydays,80 + x, 50,255)
 
  If x < -500
    x = 1280
  EndIf
 
  FlipBuffers()
Until KeyboardPushed (#PB_Key_Escape)

EndIf


38
Purebasic / Re: Worms Intro by emook
« on: October 16, 2015 »
That is amazing !

39
Purebasic / PURE BASIC 5.40 LTS is out
« on: October 16, 2015 »
This is a LTS version (Long Term Support), which will be supported for bug fixes for 2 years, until october 2017. The previous LTS (5.24) is now deprecated and won't receive any new fixes.

Here is the final list of changes:
Quote
- Added: new Vector 2D library
- Added: new CGI library with standard and FastCGI support
- Added: Literal string escape support with the '~' operator (ex: a$ = ~"Hello\nWorld\n")
- Added: EscapeString()/UnescapeString() function to allow escaping operation on any strings (variables etc.)
- Added: EnumerationBinary to create bitmask enumeration automatically
- Added: database parameter binding to ease request construction
- Added: SetDatabaseBlob(), SetDatabaseFloat(), SetDatabaseDouble(), SetDatabaseLong()
- Added: SetDatabaseQuad(), SetDatabaseString(), SetDatabaseNull()
- Added: SHA2 and SHA3 (224/256/384/512-bit) support to Cipher library
- Added: StringFingerprint()
- Added: CRC32 support for StartFingerprint()
- Added: ReceiveHTTPMemory(), IsJoint()
- Added: RefreshDialog() to recalc dimension after a text change or similar
- Added: "group" XML attribute for 'option' dialog gadget, to specify explicitly a group
- Added: HTTPS and simple auth support for ReceiveHTTPFile() and GetHTTPHeaders()
- Added: Auto redirect support for ReceiveHTTPFile() and ReceiveHTTPMemory()
- Added: ASynchronous mode for ReceiveHTTPFile() and ReceiveHTTPMemory()
- Added: HTTPProgress(), AbortHTTP() and FinishHTTP() to control async mode
- Added: HTTPS/TLS support for SendMail()
- Added: FlushPreferenceBuffers()
- Added: CopyDebugOutput() to copy the debug output to the clipboard from code
- Added: 7z archive creation
- Added: tar (gz and bzip2) archive support for creation and decompression
- Added: Full path in IDE recent files menu
- Added: #PB_ProgressBar_Unknown for SetGadgetState() to indicate unknown progress
- Added: #PB_UTF8/Ascii/Unicode support to ReadCharacter() and WriteCharacter()
- Added: #PB_UTF8 support to URLEncoder() and URLDecoder (now the default mode)
- Added: Windows 8.1/10 and OS X 10.9/10/11 support to OSVersion()
- Added: #PB_Editor_xxx constants when using the 'Version' info on Windows
- Added: #PB_Program_Ascii/Unicode/UTF8 support to RunProgram()
- Added: linux/osx style flags for the commandline compiler on Windows to ease cross-platform scripts
- Added: #PB_File_SharedWrite support to ReadFile() and CreateFile()
- Added: 'IMPORTLIST' compiler interface to get all the predefined API functions
- Added: #Null$ special string constant to affect a real null value to a string (to free it completely). It can be used as well for API function which sometimes accept NULL instead of a string address.
- Added: #Empty$ constant
- Added: #PB_ByteLength support to MemoryStringLength()
- Added: #PB_Ascii, #PB_UTF8 and #PB_Unicode support to Create/Open/ReadFile() to set the default write/read mode
- Added: #PB_ByteLength flag for PeekS() and #PB_UTF8 (only)
- Added: CreateCone(), CameraCustomParameter(), ResizeCamera()
- Added: #PB_Entity_DisableContactResponse and #PB_Entity_EnableContactResponse for SetEntityAttribute()
- Added: #PB_Entity_ConeBody, #PB_Entity_PlaneBody
- Added: FreeEntityBody(), FreeTerrainBody()
- Added: ApplyEntityTorque(), ApplyEntityTorqueImpulse()
- Added: Added 'CollisionGroup' and 'CollisionMask' parameter for RayCollide()
- Added: Migration help page, to have a step by step migration guide between old on new PureBasic.
- Added: User guide in german (thanks to Andre and Vera)

- Updated: the Linux printer lib to use native GtkPrint instead of GnomePrint
- Updated: the Windows compiler to VC++ 2013 for better code generation
- Updated: SQLite to 3.8.10.2

- Fixed: Zip archive support
- Fixed: send mail and http request issues
- Fixed: 'CONSTANTLIST' compiler interface, now string constants are returned as escaped strings.

- Changed: The default GTK version is now GTK3 on Linux. A gtk2 subsystem has been added for backward compatibility.
- Changed: The default string format for RunProgram() read/writestring is not UTF8 instead of Unicode
- Changed: the Cipher lib to be modular (now UseMD5Fingerprint() and such commands needs to be used)
- Changed: ExamineFingerprint() to StartFingerprint()
- Changed: NextFingerprint() to AddFingerprintBuffer()
- Changed: EntityPhysicBody() to CreateEntityBody()
- Changed: TerrainPhysicBody() to CreateTerrainBody()
- Changed: the SendMail() 'Asynchronous' parameter has been replaced by the #PB_Mail_Asynchronous flag.
- Changed: DLLImporter has been removed and .pbl files are no more supported. New 'import library' files can be created using the '/IMPORT' switch of the pbcompiler.

- Removed: RemovePackFile()
- Removed: #PB_Packer_CompressedSize support for ZIP and 7z archives with PackerEntrySize()
- Removed: AvailableScreenMemory()

EnJoY

http://www.purebasic.com/download.php

40
 :clap: :clap: :clap: I remember too ! This startro is EPIC !
Thanks for sharing it

Pages: 1 [2] 3