Wow good stuff! That makes a lot more sense now.
So basically you have a std::map of std::maps. The outer is a map of groups, and the inner is a map of textures. That makes sense.
I can't even begin to imagine how you model things like those typedefs in UML.
STL seems to be very powerful. I think I will need to look around for some more reading material on it. Koshmaar: Are there any other web resources that find to be very useful?
Thanks.
EDIT:
Why: typedef std :: map < std :: string , TextureHandle > TextureGroup;
Instead of: typedef std :: map < std :: string , TextureHandle* > TextureGroup;
?
Design help needed (UML overview)
Quote:
I can't even begin to imagine how you model things like those typedefs in UML.
Typedefs aren't modeled in UML :-) AFAIK when you want to have typedef in UML (so that users will be aware of it) you can write that typedef directly in comment, class definition etc.
Quote:
STL seems to be very powerful. I think I will need to look around for some more reading material on it. Koshmaar: Are there any other web resources that find to be very useful?
Yup, Google and C/C++ reference are nice :-) And remember to read those from my last post, they're really great (I learned from them).
Quote:
Why: typedef std :: map < std :: string , TextureHandle > TextureGroup;
Instead of: typedef std :: map < std :: string , TextureHandle* > TextureGroup;
?
TextureHandle have only few integers inside, so it would be overoptimization to keep pointer to TextureHandle allocated on heap. Also, it's more error-prone, less safe, you have to check for nulls (ie. from new) etc.
Thanks for all the help Koshmaar.
I managed to get a little program slapped together using a texture manager similar to the way you do it (although no groups, and no directories)
Here is my little demo tiles.zip
So how do i join your team? lol :)
I managed to get a little program slapped together using a texture manager similar to the way you do it (although no groups, and no directories)
Here is my little demo tiles.zip
So how do i join your team? lol :)
No prob :-)
Nice demo, but why sources aren't included? You know, there's nothing to lose when even Carmack releases sources of Quake3 :-)
My team? I don't have any team ;-) some time ago there were 2 people in "team", but their help limited to sending mails etc. And sorry, now I'm one-man orchestra, no help needed :-)
Nice demo, but why sources aren't included? You know, there's nothing to lose when even Carmack releases sources of Quake3 :-)
Quote:
So how do i join your team? lol :)
My team? I don't have any team ;-) some time ago there were 2 people in "team", but their help limited to sending mails etc. And sorry, now I'm one-man orchestra, no help needed :-)
lol. I didn't include the source because.. well at the end I got a little lazy. (I hard coded a few contants where a few constants ought not to be hard coded.)
So basically I was a little embarassed by my code. Seeing some of the code that gets pasted around here, I am feeling a little outclassed (no pun intended) :)
So basically I was a little embarassed by my code. Seeing some of the code that gets pasted around here, I am feeling a little outclassed (no pun intended) :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement