[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: 2 Player mode



Heh, missed this and there are unanswered questions.  :)

> On 09.10.2006 20:48, Dave Fancella wrote:
> > Doesn't string have something like string::c_str() or something that
> > gives access to the underlying char*?
>
> Yeah. Only for read access, though.
>
> > Failing that, you could rip the tList class out of Armagetron Advanced. 
> > Or maybe it's tArray you want, one of the two.
>
> Those look like simplified recreations of the STL containers. Why didn't
> they just use those? For our purposes they are probably a little over the
> top.

At the time they were written, STL wasn't predictably supported on all the 
compilers that can build it.  We're transitioning to STL now.  Recently, 
tString was made to inherit std::string, and I expect that eventually tList 
and tArray will inherit std::deque and/or std::vector, depending on what's 
needed.  Anyway, that's because of the age of the game.  New code is using 
the stl containers, so only old code uses that stuff.

Dave