Page 1 of 1

Programming a graphics manager.

PostPosted: Jan 21, 2004 @ 7:25am
by wyrd
When I programmed one in C#, I simply used XML and read in the values, then accessed the graphics via a hashtable; Graphic player_graphic = GraphicsMngr["Player"];

I'm not quite sure how to handle this in C++. The first problem is that I have no clue how to program an XML parser, although I suppose I could try and find a 3rd party one. Hmm, anyway...

Regardless of all this, how are *REAL* graphic managers programmed?

PostPosted: Jan 21, 2004 @ 3:24pm
by mlepage
You can write the exact same code in C++ by writing your own GraphicsMgr class, overloading the [] operator to take a string, and looking up your graphics in a map.

So this is a library issue, not a language issue.

Like all code, you are going to have to decide upon your data structures. In C#, it sounds like that decision has been made for you. In C++, you will have to make that decision yourself, unless you find a library you wish to use.

MS has an XML parser, it is available on the Pocket PC.

PostPosted: Jan 21, 2004 @ 6:39pm
by wyrd

PostPosted: Jan 21, 2004 @ 7:22pm
by Pejo Software - Per
MSXML

PostPosted: Jan 21, 2004 @ 7:57pm
by mlepage

PostPosted: Jan 21, 2004 @ 8:34pm
by wyrd

PostPosted: Jan 21, 2004 @ 9:17pm
by mlepage

PostPosted: Jan 21, 2004 @ 11:46pm
by wyrd