Need help with making a picture screensaver

Just starting out? Need help? Post your questions and find answers here.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Need help with making a picture screensaver

Post 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.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
The seperator
User
User
Posts: 17
Joined: Sun Apr 25, 2004 9:12 pm
Location: Europe, Belgium

Post 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.

:wink:
The seperator
User
User
Posts: 17
Joined: Sun Apr 25, 2004 9:12 pm
Location: Europe, Belgium

Post 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).
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post 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

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Post Reply