Pointers or copies?
Orgoton
orgoton at mindless.com
Wed Dec 20 14:36:43 PST 2006
I haven't finished it yet. Well, each frame, the main engine will cycle through
all the pointers on the queue with something like
for (i=0; i<queue.size; i++) queue.next().draw();
Or, to save up the callings
queue.drawall()
where all pointers would be called.
I'm used to C++, sorry for the question about pointers and copies. That means I
can just make something like
objct objts[];
and use it just like a pointer...
void add (in objct target)
{ objts[objts.lenght-1]=target; }
(on objct)
this
{queue.add(this);}
and it'l work just fine without creating copies of the objects? (and spare me of
memory problems along the way :P)
More information about the Digitalmars-d
mailing list