Page 1 of 1
Need help with making a picture screensaver
Posted: Thu Jun 03, 2004 12:53 pm
by GeoTrail
I want to make a screensaver with pictures in it.
Is there a way I can add lots of pictures in a folder to the exe?
I know about including data, but can it be done with lots of files?
And I would also like to make a way to configure the screensaver and have a preview.
Could anyone help me with this?
All files are jpg and have random names and numbers if that helps.
Posted: Thu Jun 03, 2004 3:07 pm
by The seperator
IncludeBinary ";picture name + path;" will include a picture in your exe.
if you want to make a screensaver u can use the 2d drawing functions but
there are lot's of other possebillety's
you can start by using OpenScreen() command and use sprites to display
them. You can load your pictures directly from the executable into the
video memmory. But study the manual first before you write your code.
If you have more speciffic questions post them. I'm sure you'll get more
help.

Posted: Thu Jun 03, 2004 3:12 pm
by The seperator
Also when you have a lot of pictures you'll have a big executable so its
better to directly load the pictures from a path so your app can load
pictures which you can select from eg. an options pannel (which you have
to write also).
Posted: Thu Jun 03, 2004 3:22 pm
by LarsG
if you want to display all pics in a certain directory, then this might help you abit on your way..
It makes a list of all your files (or using a file-pattern) in a dir:
Code: Select all
; make a list of strings.. :)
NewList files.s()
; set the directory
dir.s = "c:\temp"
ExamineDirectory(0,dir,"*.*")
Repeat
result = NextDirectoryEntry()
If result = 1 ; 1 is a file, 2 is a directory
name.s = DirectoryEntryName()
; add a new item to our list
AddElement(files())
; name the item
files() = name.s
EndIf
Until result = 0
; now list it
OpenConsole()
ResetList(files())
While NextElement(files())
PrintN(files())
Wend
; wait for return
Input()
CloseConsole()
ClearList(files())
End