I load a map from a file. I got it to work perfect thanks to Salem (^_^), that is the loading part works fine, and my game using the array works fine...... but only if I declare the array (it's global) like this:
if I declare it like this:Code:byte Map[800] = {0};
orCode:byte Map[800];
(and then create it using new and delete it properly, of course)Code:byte *Map = NULL;
then it doesn't work. What happens is that for some reason it has odd numbers in it. I don't think it has to do with the file loading code, because it loads the map fine if I add that = {0}; to the end.
What can I do to make the other two declarations work as well, and what's the main difference between byte Map[800] = {0}; and byte Map[800];? Even if I fill Map with zeros before loading it, it still creates problems...
sorry if this is a weird prob... thanks for any help...



LinkBack URL
About LinkBacks


