Re: [DM-dev] DM status update
Brought to you by:
acdalton,
henningsen
From: Stephan B. <ste...@ei...> - 2001-08-31 13:46:48
|
On Friday 31 August 2001 02:27, you wrote: > >Sorry, I meant when reading data from a file. For example, read one line > >which says "room=x,y,w,h,..." and then draw it to the grid immediately. > > You mean the data is entered in the map-array, right? Not actually rendered > to the screen, eh? right - rendered to the grid. render-as-we-read saves us from having to store the data in a separate structure. It's the simplest approach. And, as the Extreme Programming book challenges me to ask, "what is the simplest thing which will get the job done." > >> Saving a dungeon back to "dungeon data" format is not what we want to > >> do. > > > >Yeah, I've given up on that for now. > > Heureka! ROFL! You can thank the Extreme Programming book for that ;). I'm trying a new approach (but it's so HARD to not always think, "but what if a user wants to do that... I need to add this function...") > Very smart move. According to my book, you can also use the FSF's "checker" > program to check for memory leaks, though I hevn't tried it myself. I downloaded some great mem leak detection code which works be replacing new() and delete() with custom copies to make sure you always have a delete() for all of your new()s. It won't work with QUB because some of it's macros conflict with stuff defined in Qt. Since Qt does it's own memory management internally, too, the leak detector code doesn't see the delete() calls, and therefor thinks that all Qt objects are leaking. (In Qt, at least with widgets, you typically create them with new(), but only delete the top-most one, which takes care of deleting all children). So... until I have a great way of checking for leaks, I do it with cerr. I'm sure I'm missing some still, but I'll eventually get them all (I hope). ----- stephan Generic Universal Computer Guy st...@ei... - http://www.einsurance.de Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67 "Perhaps, as has often been said, the trouble with people is not so much with their ignorance as it is with their knowing so many things that are not so....." - William A. White |