Advertisement
Ham62

Untitled

Jan 31st, 2017
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.60 KB | None | 0 0
  1. CreateImage 4, GroundLevel - 1, PipeImg(PipeNum), PipeImgBuff(PipeNum)
  2.  
  3. DEF SEG = PipeImg(0).Image.Segment
  4. POKE PipeImg(0).Image.Address + 5, 1
  5. PRINT PipeImgBuff(0)  'Empty string
  6.  
  7. DEF SEG = SSEG(PipeImgBuff(0))
  8. POKE SADD(PipeImgBuff(0)) + 5, 1
  9. PRINT PipeImgBuff(0)  'String with face character in it
  10.  
  11. SUB CreateImage (Wid AS INTEGER, Hei AS INTEGER, NewImgData AS TxtGFX, NewImg AS STRING)
  12.     NewImgData.Size = Wid * Hei * 2
  13.     NewImgData.Wid = Wid
  14.     NewImgData.Hei = Hei
  15.  
  16.     NewImg = SPACE$(NewImgData.Size)
  17.  
  18.     NewImgData.Image.Segment = SSEG(NewImg)
  19.     NewImgData.Image.Address = SADD(NewImg)
  20. END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement