Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare sub puttile overload (tilename as string="pndxpike", x as integer = 0, y as integer = 0 , PColor as integer = 15)
- declare sub puttile overload (destination as any ptr = NULL, tilename as string="pndxpike", x as integer = 0, y as integer = 0 , PColor as integer = 15)
- sub puttile overload (tilename as string="pndxpike", x as integer = 0, y as integer = 0 , PColor as integer = 15)
- puttile NULL, tilename, x, y, PColor
- end sub
- sub puttile overload (destination as any ptr = NULL, tilename as string="pndxpike", x as integer = 0, y as integer = 0 , PColor as integer = 15)
- dim as string a_filename, o_filename
- a_filename = space(0)
- o_filename = space(0)
- dim as integer a_colspan=0, a_rowspan=0
- dim as integer o_colspan=0, o_rowspan=0
- dim as any ptr a, o
- select case lcase( left( tilename, 4 ) )
- case "lttr":
- o_filename = ".\bitmaps\fonts\rgb\" + tilename + ".bmp"
- a_filename = ".\bitmaps\fonts\mask\" + tilename + ".bmp"
- case else:
- o_filename = ".\bitmaps\tiles\rgb\" + tilename + ".bmp"
- a_filename = ".\bitmaps\tiles\mask\" + tilename + ".bmp"
- end select
- if ( fileexists( o_filename ) = 0 ) or ( fileexists( a_filename ) = 0 ) then
- o_filename = ".\bitmaps\logos\rgb\" + tilename + ".bmp"
- a_filename = ".\bitmaps\logos\mask\" + tilename + ".bmp"
- endif
- if not( len( a_filename ) = 0 ) then
- a = NULL
- a = loadBMP( a_filename )
- Imageinfo ( @a, a_colspan, a_rowspan)
- if not( a = NULL ) then
- if destination = NULL then
- put( x, y ), a, and
- else
- put destination,( x, y ), a, and
- end if
- imageDestroy( a )
- end if
- end if
- if not( len( o_filename ) = 0 ) then
- o = NULL
- o = loadBMP( o_filename )
- Imageinfo ( @o, o_colspan, o_rowspan)
- if not( o = NULL ) then
- if destination = NULL then
- put( x, y ), o, or
- else
- put destination, ( x, y ), o, or
- end if
- imageDestroy( o )
- end if
- end if
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement