#18088 - darknet - Sat Mar 20, 2004 5:20 am
I am in the midst of making a breakout clone and am just at the stage of displaying the multiple sprites on screen.
Right now, I have one brick, the paddle and the ball. The conversion tool used was gifs2sprites (its the only program that remotely gives me a good conversion) and both the paddle and ball come out fine, yet the brick's right side looks like someone took a bite out of it.
I am thinking it might have something to do with my attribute 2 settings, because it was messing with those that got the other two to show up properly. The dimensions for all of the gifs used are as follows (And each is 256 colors):
ball: 8x8
paddle: 32x8
brick: 16x8
and in the conversion file the array sizes are as follows:
palette: 34
paddle: 128
ball: 32
brick: 64
and below is my code:
I have already tried changing the TALL/WIDE/etc portions of the attributes. With that code, as I mentioned, the ball and paddle show up fine, but the brick shows up 85% okay with the right side looking like someone ripped a chunk off of it.
Any help would be greatly appreciated, thanks so much for your time,
-Mike
Right now, I have one brick, the paddle and the ball. The conversion tool used was gifs2sprites (its the only program that remotely gives me a good conversion) and both the paddle and ball come out fine, yet the brick's right side looks like someone took a bite out of it.
I am thinking it might have something to do with my attribute 2 settings, because it was messing with those that got the other two to show up properly. The dimensions for all of the gifs used are as follows (And each is 256 colors):
ball: 8x8
paddle: 32x8
brick: 16x8
and in the conversion file the array sizes are as follows:
palette: 34
paddle: 128
ball: 32
brick: 64
and below is my code:
Code: |
setMode(MODE_1 | OBJ_MAP_1D | OBJ_ENABLE); int xOne = INIT_BALL_X; int yOne = INIT_BALL_Y; int xTwo = INIT_PADDLE_X; int yTwo = INIT_PADDLE_Y; int xThree = 50; int yThree = 70; for(int x=0; x<34; x++) { SpritePal[x] = palette[x]; } initalizeSprites(); sprites[0].attr0 = COLOR_256 | SQUARE | yOne; sprites[0].attr1 = SIZE_8 | xOne; sprites[0].attr2 = 0; for(int i = 0; i<32; i++) { SpriteData[i] = ball[i]; } sprites[1].attr0 = COLOR_256 | TALL | yTwo; sprites[1].attr1 = SIZE_16 | xTwo; sprites[1].attr2 = 2; for(int j = 32; j<160; j++) { SpriteData[j] = paddle[j-32]; } sprites[2].attr0 = COLOR_256 | TALL | yThree; sprites[2].attr1 = SIZE_8 | xThree; sprites[2].attr2 = 10; for(int k = 160; k < 224; k++) { SpriteData[k] = brick[k-160]; } |
I have already tried changing the TALL/WIDE/etc portions of the attributes. With that code, as I mentioned, the ball and paddle show up fine, but the brick shows up 85% okay with the right side looking like someone ripped a chunk off of it.
Any help would be greatly appreciated, thanks so much for your time,
-Mike