Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Thank you for answering so quickly. If you don't mind me asking when will v0.7 be out? Not so soon. But maybe I'll release v0.6.5 with this feature at the end of september. For now you need to store your Texture in e.g. a Texture manager.

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 13:22:43 UTC, Namespace wrote: Edit: Basically my code is: //Texman.d// Class TextureManager { //variables void addSprite(string sprite_file, string name) { Surface wiki_img =

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Note that Texture is (in constrast to Sprite) a struct and not a class, so it is a value type. Dgame tries to use as many value types as possible to reduce the amount of garbage.

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Namespace via Digitalmars-d-learn
Edit: Basically my code is: //Texman.d// Class TextureManager { //variables void addSprite(string sprite_file, string name) { Surface wiki_img = Surface(sprite_file); Texture wiki_tex = Text

Re: [Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 12:50:50 UTC, Jack wrote: So I've been using Dgame to learn about game development and I'm having an error when I'm trying to set a sprite's position initialized and stored in another class. Basically my code is: //Texman.d// C

[Dgame] Sprite loading and setting position in another class

2015-08-25 Thread Jack via Digitalmars-d-learn
So I've been using Dgame to learn about game development and I'm having an error when I'm trying to set a sprite's position initialized and stored in another class. Basically my code is: //Texman.d// Class Texman { //variables void addSprite(strin