From: R. H. G. <luv...@un...> - 1998-08-04 03:26:02
|
On Mon, 3 Aug 1998, Jeff W. wrote: > At 07:10 AM 8/3/98 -0600, you wrote: > >mapx and mapy are the variables you want to increment to move around the > >map, tilesize in this case is 16, map_image is a bitmap with pixels > >arranged where the tiles should go, and tiles_image is a bitmap full of > >tiles in 16-tile-wide rows. Obviously, if you're using something else > >(like a double array) instead of a map_image, you just have to change z. > >Hope this helps! > > > >---------- -------- > >R. Hunter Gough luv...@un... > > OK, so let me get this straight: map_image is just a bitmap the size of the > screen with, in this case, a single pixel plotted every 16 pixels? Wrong!! :)X map_image is like a shrunk version of the whole map with pixels instead of tiles. i.e. this in map_image: XOX OXO would draw this to the screen: XXXXOOOOXXXX XXXXOOOOXXXX XXXXOOOOXXXX OOOOXXXXOOOO OOOOXXXXOOOO OOOOXXXXOOOO (more or less) the z variable reads the pixel at a point on the map_image by color, and translates that into a tile to be drawn to the screen. For instance, if the color at 5,3 were color #19, z=getpixel(map_image,x,y) would return 19, which would tell the function to use tile #19 when it draws that tile to the screen. Dig it? > matter what color pixel? Tiles_image is another bitmap that holds every > different type of tile used in the game, correct? Andddddddddd, mapx, mapy > are just variables to keep track of the position on the map. Yep. ----- -------- R. Hunter Gough luv...@un... ----- -------- "We've replaced their gourmet coffee with multipurpose deodorizing disinfectant. Let's see how they react..." |