Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
having problem with get and put
#1
i am working with a ending screen! my teacher requires to use get and put, but i can't do it.
following is my ending screen:

rem use get and put to make a ending screen
cls
screen 7
randomize timer
top:x=int(rnd*300)+10
y=int(rnd*200)+10
for a=1 to 1000
print " the end"
pset (150,200), int(rnd*16)+1
for r=0 to 360
draw "ta" + str$® + "nr100"
rem for dd=1 to 100000:next dd
next r,a
Reply
#2
this ( Smile ), but here goes. First, why are you doing

PSET(150,200)... ?

The maximum vertical pixel position you can use in mode 7 is 199. The screen dimensions are 320 x 200 and positions are 0-based.

Continuing, after you have your picture on your screen, you save it to an array using GET. You first need to define the array. It needs to have 32,004 bytes. That's 16,002 INTEGER elements or 8,001 LONG ones. Using LONG ones might help avoid having to make the array dynamic (not that it matters):


DIM MYPICT(1 TO 8001) AS LONG


Now copy the video data to the array MYPICT:


GET (0,0) - (319,199), MYPICT


You can now clear your screen, switch video modes, whatever. To redisplay the picture, reset the video mode (if necessary) and use PUT:


SCREEN 7
PUT (0,0), MYPICT, PSET


(If the screen's clear, you don't need the PSET "action verb.") Look up GET and PUT in the on-line help (press ALT-H from within the IDE) for more general uses of GET and PUT to work with smaller portions of the screen and position smaller pictures anywhere you want, not necessarily with their upper lefthand corner at the upper lefthand corner of the screen.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)