[PLUGIN] Resource Access

Completed plugins, behaviors and effects.

Post » Sun May 16, 2010 7:14 am

Resource Plug-in
NEW version 1.1
What's New:
An action to load fonts. So now you can include and use fonts in your cap regardless if those fonts are installed on your system.

Download: http://dl.dropbox.com/u/5426011/res%20plug/ResourcePlugin1.1.zip
Examples:http://dl.dropbox.com/u/5426011/res%20plug/ResExamples.zip
old:http://dl.dropbox.com/u/5426011/res%20plug/Resource%20Plugin%201.0.zip

The Problem:
Construct already has the feature to add files to include when building an executable, But only the Xauido2 plug-in has the ability to access those files.

The solution:
This plug-in provides access to those files to any plug-in that can load files.


Here's an example that plays a "mod" file that's in the "EXE":download

Actions:
- Extract Resource
- Load Font (new in 1.1)
Expressions:
- Get Resource
- Get Temp Dir

Note:
The plugin works by copying the files from the program's resources to a temp directory. The temp files are removed when the object is destroyed.R0J0hound2011-07-23 18:23:45
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Sun May 16, 2010 7:27 am

Bless you.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Sun May 16, 2010 6:39 pm

Nice, nice, and nice!
Will come in very useful.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon May 17, 2010 5:34 am

Ooh nice
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Tue May 18, 2010 4:33 pm

great ! Really, really great :)
B
2
S
1
G
2
Posts: 23
Reputation: 846

Post » Tue May 18, 2010 5:16 pm

Holy shit it actually works very nicely! May I ask where it does that tmp file and are they hidden? Just to be sure that everything is made harder for those who want to do foulgaming ^^

+1 Respect
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Tue May 18, 2010 7:05 pm

Use the "get temp Dir" expression to see what directory is being used. When the files are extracted they use the extracted name you choose. The only protection the plug-in currently provides is the files are deleted when your program closes.
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Tue May 18, 2010 8:19 pm

I'm just wondering where it extracts it as I didn't see dir in where I wanted to extract it? It gets the file just right but don't see it while searching folders for it. Just curious you know nothing else ^^
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Tue May 18, 2010 8:31 pm

You could add some randomization for even more security.

[code:swtu8vx5]+ System: Start of layout
-> System: Set global variable 'Global 1' to random(2000)
-> Resource: Extract Resource "anim01.png" as global('Global 1')&"sprite.png"
-> Sprite: Load frame from Resource (global('Global 1')&"sprite.png")
[/code:swtu8vx5]
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Wed May 19, 2010 12:11 pm

Would be huge amount of work for doing with sprites but as well I use it only for one ini so I could actually try that extra security...
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Next

Return to Completed addons

Who is online

Users browsing this forum: No registered users and 0 guests