This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Programming a graphics manager.


Programming a graphics manager.

Postby wyrd » Jan 21, 2004 @ 7:25am

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?
wyrd
pm Member
 
Posts: 125
Joined: Jan 2, 2004 @ 10:19pm


Postby mlepage » Jan 21, 2004 @ 3:24pm

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.
www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby wyrd » Jan 21, 2004 @ 6:39pm

wyrd
pm Member
 
Posts: 125
Joined: Jan 2, 2004 @ 10:19pm


Postby Pejo Software - Per » Jan 21, 2004 @ 7:22pm

MSXML
User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby mlepage » Jan 21, 2004 @ 7:57pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby wyrd » Jan 21, 2004 @ 8:34pm

wyrd
pm Member
 
Posts: 125
Joined: Jan 2, 2004 @ 10:19pm


Postby mlepage » Jan 21, 2004 @ 9:17pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby wyrd » Jan 21, 2004 @ 11:46pm

wyrd
pm Member
 
Posts: 125
Joined: Jan 2, 2004 @ 10:19pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

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 post attachments in this forum

cron