http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating maps for scrolling............



Hello,

I am trying to write a routine which combines all the images data of x 
amount of images, and combines them into one large image. That way, I can 
create another function which pans over the large image. Here is a bit of 
code:

byte *
LoadMap(image * padtMapList , byte * pfcDestinationMap , magnitude_var 
iNumberOfMaps)
{
  byte * video = (byte *)0xA0000000L;

  try
  {
    pfcDestinationMap = new byte[RESOLUTION * iNumberOfMaps];
  }

  catch(xalloc error)
  {
    TerminateGraphics();
    printf("Unable to load map!!\n");
    exit(1);
  }

for(long_var iTotalIndex = 0,iMapNumber = 0;iMapNumber < iNumberOfMaps; 
iMapNumber++)
{

for(long_var iIndex = 0;iIndex < RESOLUTION;iIndex++,iTotalIndex++)
{
pfcDestinationMap[iTotalIndex] = 
(byte)padtMapList[iMapNumber].buffer[iIndex];
}
}

return pfcDestinationMap; // <- this points to the beggining of the newly 
initalized map
}

If anyone sees anything that I may have missed, please let me know...

  Josiah

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html