Xref: news2.mv.net comp.os.msdos.djgpp:5362 From: nmarrone AT smartlink DOT net (Nicholas Marrone) Newsgroups: comp.os.msdos.djgpp Subject: Allegro - tile graphics Date: Tue, 25 Jun 1996 15:08:26 GMT Organization: SmartLink.net Premier ISP 805-294-1273 Lines: 41 Message-ID: <4qp09n$75t@frodo.smartlink.net> NNTP-Posting-Host: pm42-52.smartlink.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hullo, Yesterday I started to make a small tile graphics scroller, and I got to the point where I could display the tiles in a virtual screen and scroll around the virtual screen smoothly along with keypresses. Unfortunately, I'm having 2 problems. I'm running the program in 320x240 mode X right now. 1) When viewing the screen, there is a 1 pixel black line between the first and second tile rows, and also one between the 1rst and 2nd columns. They cross at the bottom right corner of the top left tile. I can't understand where this comes from. Here's the code displaying it to the screen. Each tile is 20x20 right now, as this is just a test. // Display all of the map data onto the virtual screen for (ver = 0; ver < 20; ver++) { for (hor = 0; hor < 20; hor++) { blit(data[map[ver][hor]].dat, screen, 0, 0, hor * 20, ver * 20, hor * 20 + 19, ver * 20 + 19); } } 2) Although I'm sure my video card has enough memory, I cannot make a virtual screen that is 640x480 wide! The largest I can get is 640x409, and I can get my card to display 1024x768. It is an old Trident card. Here's the code changing graphics modes. Note that the virtual screen is only being set to 400x400, so I can see if the rest of the code works! // Set graphics mode and check the virtual screen set_gfx_mode(GFX_MODEX, 320, 240, 400, 400); if (VIRTUAL_W < 400 || VIRTUAL_H < 400) { printf("\nError making the proper size virtual screen!"); printf("\nWidth: %d\nHeight: %d", VIRTUAL_W, VIRTUAL_H); exit(1); Thank you for any help you can offer! nicholas