#15085 - Dreamer - Fri Jan 16, 2004 10:51 pm
I am about ten seconds from tearing off my own head. I've spent hours trying to figure out this problem I'm having with my code. I've been fiddling with sources and tutorials, and after a long time spent working in Mode 1 I discovered (unless I'm mistaken) that I didn't know how to show full screen images, so I had to switch to Mode 4, where I had examples.
So I've been working in it just fine until I tried to work on my Tetris game again (for practice). I have a strip of images for blocks and their 'animated' (read: blinking) frames, and I load two of them into memory and store them separately. I then made it so that if you press A they show their respective second frame, if you press B, their first. This is just to get them ready for slight blinking animation, so I marked the tiles to distinguish frames one and two.
However, while they both start out just fine, pressing the A button displays the second block's second frame for both blocks, instead of their own second frames, and pressing B shows the second block's first frame. I've been staring at this for hours trying to fix things and make sense of it, but no matter what I do it seems like the second block overwrites the data for the first block somehow, and I don't know how to fix it.
Here's a URL to the source (fairly simple), and I would greatly appreciate any insight. The sprite creation is in Functionality\Sprites.h and .c, and it is called from Main.c.
http://jhunix.hcf.jhu.edu/~prt2/Test/Test.zip
So I've been working in it just fine until I tried to work on my Tetris game again (for practice). I have a strip of images for blocks and their 'animated' (read: blinking) frames, and I load two of them into memory and store them separately. I then made it so that if you press A they show their respective second frame, if you press B, their first. This is just to get them ready for slight blinking animation, so I marked the tiles to distinguish frames one and two.
However, while they both start out just fine, pressing the A button displays the second block's second frame for both blocks, instead of their own second frames, and pressing B shows the second block's first frame. I've been staring at this for hours trying to fix things and make sense of it, but no matter what I do it seems like the second block overwrites the data for the first block somehow, and I don't know how to fix it.
Here's a URL to the source (fairly simple), and I would greatly appreciate any insight. The sprite creation is in Functionality\Sprites.h and .c, and it is called from Main.c.
http://jhunix.hcf.jhu.edu/~prt2/Test/Test.zip