Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OMG.... SO angry Please Help (Graphics)
#1
ok so here is the deal. I have spent a decent amount of time on this program and it is the first one that i have ever done so this problem is upsetting me greatly. Anyway my character sprite when i use the PUT command and draw him on the screen starting with his mask first of course i'm getting a black line on the top and left side of the sprite. here is the code hope you can help.




Code:
DIM tile(195), grass(195), dirt(195)

DIM map1(21, 15)

DIM martian(195), martianshadow(195)

SCREEN 13

CLS

xlength = 15      'X size of pic

ylength = 13      'Y size of pic


guyx = 10
guyy = 10



'-----------------------------------------------------


FOR y = 1 TO ylength

FOR x = 1 TO xlength

  READ z

PSET (x, y), z

NEXT: NEXT

GET (0, 0)-(15, 13), tile

'-----------------------------------------------------

FOR y = 1 TO ylength

FOR x = 1 TO xlength

  READ z

PSET (x, y), z

NEXT: NEXT

GET (0, 0)-(15, 13), grass

'-----------------------------------------------------

FOR y = 1 TO ylength

FOR x = 1 TO xlength

  READ z

PSET (x, y), z

NEXT: NEXT

GET (0, 0)-(15, 13), dirt

'-----------------------------------------------------

FOR y = 1 TO 15

FOR x = 1 TO 21

READ map1(x, y)

NEXT: NEXT

'-----------------------------------------------------

FOR y = 1 TO ylength

FOR x = 1 TO xlength

  READ z

PSET (x, y), z

NEXT: NEXT

GET (0, 0)-(15, 13), martian

'-----------------------------------------------------

FOR y = 1 TO ylength

FOR x = 1 TO xlength

  READ z

PSET (x, y), z

NEXT: NEXT

GET (0, 0)-(15, 13), martianshadow


'-----------------------------------------------------

CLS


FOR y = 1 TO 15

FOR x = 1 TO 21

  IF map1(x, y) = 1 THEN PUT (x * 15 - 15, y * 13 - 13), tile
  IF map1(x, y) = 2 THEN PUT (x * 15 - 15, y * 13 - 13), grass
  IF map1(x, y) = 3 THEN PUT (x * 15 - 15, y * 13 - 13), dirt
  
NEXT: NEXT


PUT (guyx * 15 - 15, guyy * 13 - 13), martianshadow, AND
PUT (guyx * 15 - 15, guyy * 13 - 13), martian, OR




'-----------------------------------------------------------





'Tile Sprite

DATA 07,08,08,08,08,08,08,08,08,08,08,08,08,08,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,07,07,07,07,07,07,07,07,07,07,07,07,07,00
DATA 08,00,00,00,00,00,00,00,00,00,00,00,00,00,07



'Grass Sprite

DATA 02,02,02,02,02,02,02,02,02,02,02,02,02,02,02
DATA 02,10,10,10,10,02,10,10,10,02,02,10,10,10,02
DATA 02,10,02,10,02,07,10,10,10,10,02,10,02,10,02
DATA 02,10,10,10,10,10,10,10,10,10,10,10,02,10,02
DATA 02,10,10,10,02,10,10,10,02,10,10,10,10,10,02
DATA 02,10,02,02,02,10,10,02,10,02,02,10,10,10,02
DATA 02,10,10,02,10,02,02,10,10,10,02,10,02,10,02
DATA 02,10,10,02,10,02,02,02,10,10,02,10,10,02,02
DATA 02,10,10,02,10,10,10,10,02,10,10,10,10,10,02
DATA 02,10,02,10,02,10,10,10,10,02,10,10,02,10,02
DATA 02,10,02,10,10,02,10,10,10,10,10,10,10,10,02
DATA 02,10,02,10,10,10,10,10,10,10,10,10,10,10,02
DATA 02,02,02,02,02,02,02,02,02,02,02,02,02,02,02



'Dirt Sprite

DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,114,114,114,25,114,114,114,114,114,114,114,114
DATA 114,25,114,114,114,114,114,114,114,114,25,114,114,25,114
DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,25,114,114,114,114,114,114,114,25,114,114,114
DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,114,114,25,114,114,114,114,114,114,114,114,114
DATA 114,114,114,25,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,114,114,114,25,114,114,114,25,114,114,114,114
DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,114,114,25,114,114,114,114,25,114,114,114,114
DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114
DATA 114,114,114,114,114,114,114,114,114,114,114,114,114,114,114



'Map1 sprite

DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1
DATA 1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1



'Martian Sprite

DATA 0,0,0,2,0,0,2,2,2,0,0,2,0,0,0
DATA 0,0,0,0,2,2,2,2,2,2,2,0,0,0,0
DATA 0,0,0,2,2,2,2,2,2,2,2,2,0,0,0
DATA 0,0,0,2,2,2,15,2,15,2,2,2,0,0,0
DATA 0,0,0,2,2,2,4,2,4,2,2,2,0,0,0
DATA 0,0,0,0,2,2,2,2,2,2,2,0,0,0,0
DATA 0,0,0,0,0,2,2,0,2,2,0,0,0,0,0
DATA 0,0,0,0,0,0,3,3,3,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,2,0,0,0,0,0,0,0
DATA 0,0,0,0,2,2,15,15,15,2,2,0,0,0,0
DATA 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0
DATA 0,0,0,0,2,2,1,0,1,2,2,0,0,0,0


'Martian Mask Sprite

DATA 255,255,255,2,255,255,2,2,2,255,255,2,255,255,255
DATA 255,255,255,255,2,2,2,2,2,2,2,255,255,255,255
DATA 255,255,255,2,2,2,2,2,2,2,2,2,255,255,255
DATA 255,255,255,2,2,2,15,2,15,2,2,2,255,255,255
DATA 255,255,255,2,2,2,4,2,4,2,2,2,255,255,255
DATA 255,255,255,255,2,2,2,2,2,2,2,255,255,255,255
DATA 255,255,255,255,255,2,2,0,2,2,255,255,255,255,255
DATA 255,255,255,255,255,255,3,3,3,255,255,255,255,255,255
DATA 255,255,255,255,255,255,255,2,255,255,255,255,255,255,255
DATA 255,255,255,255,2,2,15,15,15,2,2,255,255,255,255
DATA 255,255,255,255,255,255,255,1,255,255,255,255,255,255,255
DATA 255,255,255,255,255,255,1,1,1,255,255,255,255,255,255
DATA 255,255,255,255,2,2,1,0,1,2,2,255,255,255,255
:barf: :barf:
Reply
#2
As far asI can remember, you should use 255 for all zeros and 0 for anything else.

http://rel.betterwebber.com/junk.php?id=16
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)