22 lines
565 B
Lua
22 lines
565 B
Lua
--Load and save the bmp formats used by DEFCON.
|
|
local t = {}
|
|
local love = assert( love )
|
|
local lfs = love.filesystem
|
|
|
|
--FFI bit-twiddling stuff.
|
|
local ffi = require 'ffi'
|
|
local bit = require 'bit'
|
|
|
|
function t.load( filename )
|
|
local imgd = love.image.newImageData( filename )
|
|
print( "LOADING BITMAP: ", filename, imgd:getSize(), imgd:getFormat(), imgd:getDimensions() )
|
|
local img = love.graphics.newImage( imgd )
|
|
img:setFilter( "nearest", "nearest" )
|
|
return img, imgd
|
|
end
|
|
|
|
function t.save( data, filename )
|
|
local w, h = data:getDimensions()
|
|
end
|
|
|
|
return t |