Advertisement
Guest User

Untitled

a guest
Jan 13th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function TBE_loadTileset (file as string) as integer
  2.    
  3.     static as short i, fh
  4.     static as string a
  5.    
  6.     i = -1
  7.     fh = freefile
  8.    
  9.     open file for input as #fh
  10.         if lof(fh) = 0 then TBE_loadTileset = false
  11.            
  12.         do until eof(fh)
  13.             i += 1
  14.             redim preserve tileset(i)
  15.             line input #fh, a
  16.             tileset(i) = imagecreate (TBE_TILESIZE, TBE_TILESIZE)
  17.             bload a, tileset(i)    
  18.         loop
  19.         numTiles = i
  20.     close #fh
  21.  
  22. end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement