Path: chuka.playstation.co.uk!news From: "pal" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Own BG with GsSPRITES Date: 20 Jul 2002 08:40:41 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 30 Message-ID: <01c22fc7$fedba4c0$5087933e@pal-s-omnibook> References: NNTP-Posting-Host: nas-cbv-2-62-147-135-80.dial.proxad.net X-Newsreader: Microsoft Internet News 4.70.1155 Cant find the bug. I'd suggest you post all files so that we can compile and experiment with the nasty code. A few comments anyway: - is it on purpose that CreateMiniMap is not called here? Also, the variable minimap in this function is initialised but never used. The only part of the function which has an effect is MoveImage(&src,576,0). - the line "mapcells.v = 16*0;" is commented out... so mapcells.v is not properly initialised (you may expect it to be zero but it's not guaranteed). - I'd recommend using named constants. 20 and 16 are evil, change them to MAP_W, MAP_H or whatever. - using a 1d array is as Chris pointed out confusing. I can't see where the trouble is with 2d arrays (see examples below), could you be more specific? init: u_short rik_map_array[16][20] = { {1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {2,10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7}, ... arg: myfunc(u_short[16][] array); or myfunc(u_short** array); access: a = rik_map_array[(20*j)+i]; becomes: a = rik_map_array[j][i];