FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

resource as array

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
Boscop



Joined: 26 Feb 2009
Posts: 29

PostPosted: Tue Mar 17, 2009 1:51 am    Post subject: resource as array Reply with quote

Can I use a resource (texture etc.) with arclib's functions that is stored as an array in my source with bintod?
_________________
A programmer is just a tool to convert coffeine into code!
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed Mar 18, 2009 11:41 am    Post subject: Reply with quote

I'm not exactly sure what you are asking. Can you explain in more detail? I don't have experience with bintod. Thanks.
Back to top
View user's profile Send private message AIM Address
Boscop



Joined: 26 Feb 2009
Posts: 29

PostPosted: Wed Mar 18, 2009 12:00 pm    Post subject: Reply with quote

bindtod simply converts any file into an array that can be compiled with d source. Like images or level files etc. So can I load a Texture (or any other resource, e.g. sound) with arclib from a given address (the array)?
_________________
A programmer is just a tool to convert coffeine into code!
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed Mar 18, 2009 12:05 pm    Post subject: Reply with quote

You are going to have to figure out how to load up an SDL_image* based off of bintod.

If you can figure this out, then you can use arclib's

Texture t = Texture();
t.setSDLSurface() feature.
Back to top
View user's profile Send private message AIM Address
Boscop



Joined: 26 Feb 2009
Posts: 29

PostPosted: Wed Mar 18, 2009 12:20 pm    Post subject: Reply with quote

Isn't there an interface with stream so that I can pass a stream to my array instead of a file? That way would reduce effort because all kinds of resource are handled the same way. Otherwise I had to write some wrapper functions for each kind.
_________________
A programmer is just a tool to convert coffeine into code!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group