Advertisement
karelvysinka

test surface

Dec 29th, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. -- Loads Surface 2.
  2. local surface = dofile("surface")
  3.  
  4. -- Loads the color.bmp image.
  5. local surf = surface.load("home/color.bmp")
  6. -- Converts the colours from RGB to CC, with dithering.
  7. surf:toPalette(surface.palette.cc, true)
  8.  
  9. -- Creates the screen surface.
  10. local screen = surface.create(57, 19)
  11. -- Draws the image surface with smaller pixels.
  12. screen:drawSurfaceSmall(surf, 0, 0)
  13.  
  14. -- Outputs the screen surface.
  15. screen:output()
  16. -- Waits for a mouse click.
  17. os.pullEvent("mouse_click")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement