Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [BETA] SCPic - Reduce the number of allocated pictures
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Bored




PostPosted: Thu Jan 25, 2007 11:57 pm   Post subject: [BETA] SCPic - Reduce the number of allocated pictures

In one of my current projects I came into the problem of having to use the same picture multiple times, but that allocated too many pictures. And so I came up with an idea to record used pictures. This resulted in SCPic, a module that replicates the Pic module, but does not create the same picture twice. At the simplest it really just records what pictures have been allocated, and then controls the allocation of new pictures. The glory of it is that it is almost fully compatable with Pic module, though I don't recommend intermixing as it can result in some unwanted results (i.e. Pic.Free will get rid of the entire reference to that picture, even those not wanted).

To use you simply need to add import SCPic in "SCPic.tu" and then use SCPic. instead of Pic., and use .DRAW instead of .Draw. Make sure SCPic.tu is in the same folder as your program or change the location accordingly. SCPic contains all the same functions and procedures as Pic, and thus use is the exact same. The current version is compatable with Turing 4.1, if you have an older version just remove functions not supported in that version, or give me a list of capabilities in the version and I will make a compatable version.

Notes:
- FileNewFrames currently only calls Pic.FileNewFrames. Working on implementing
- ID may still be used sometimes after calling SCPic.Free if other calls still use it (Will only cause problems when debugging)
- All calls to New will create a new picture
- Modify procedures (i.e. Blend, Rotate) will only create a new picture if new values are given

Please post any bugs, suggestions, questions, or comments on here, e-mail them to me at dlpkelly@hotmail.com, or PM me.



SCPic.tu
 Description:
SCPic Module

Download
 Filename:  SCPic.tu
 Filesize:  11.48 KB
 Downloaded:  87 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: