View previous topic :: View next topic |
Author |
Message |
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Tue Mar 17, 2009 1:51 am Post subject: resource as array |
|
|
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 |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Mar 18, 2009 11:41 am Post subject: |
|
|
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 |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Wed Mar 18, 2009 12:00 pm Post subject: |
|
|
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 |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Mar 18, 2009 12:05 pm Post subject: |
|
|
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 |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Wed Mar 18, 2009 12:20 pm Post subject: |
|
|
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 |
|
|
|