Hiya all,
I''m currently reading through Tricks of the Windows Game Programming Gurus and got to the part where the author gives you a function for creating a Direct Draw clipper and getting it working.
I have a question about this (which I think looks ugly):
LPRGNDATA region_data;
region_data = (LPRGNDATA)malloc(sizeof(RGNDATAHEADER)+num_rects*sizeof(RECT));
What is the C++ way to do this?Because for a starters I''d like to know, and secondly I''m going to be re-writing all his functions he gives you for doing DirectDraw into classes and such. I''ve consulted my C++ book but it only gives at most
new int
, so on and so forth.
Thanks in advance! Oh, and Happy Christmas! (Unless you don''t celebrate in which case; Happy December! Heh)
-------
Spadge.