forums

TNT Basic Forums > Programming Q&A
Drawing sprites
< Last Thread     Next Thread >
Author
Thread        Post A Reply

03-20-2002 19:44

Posted by:
Chofritz

Find more posts by Chofritz

What is wrong with this piece of code? When I run it I only get the filled rectangel and nothing else, :(


------Start of code----------
Procedure Box (int x1, int y1, int x2, int y2, int r, int g, int b)
repeat

int color
color = make color(r, g, b)
set pen color color
fill rect x1+10, y1+10 to x2-10, y2-10

Set image bank 1, 901
sprite 5, x1, y1, 0
sprite 6, x2-18, 1
sprite 7, x2-18, y2-18, 2
sprite 8, x1, y2-18, 3

int i
For i=1 to (y2-y1)/18-1
sprite 9, 0, y1+i*18
Next i
sprite 9, 0, y2-36

draw frame


until pressed(12)
end proc
----------end of code----------

I need help asap!

03-22-2002 23:01

Posted by:
Mark Tully

Find more posts by Mark Tully

I think your problem might be that you set the image bank for sprite 1, but not for the other sprites?

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.