samples_2.4 => samples

This commit is contained in:
Thomas Bernard
2018-12-05 15:20:42 +01:00
committed by Adrien Destugues
parent 428235636a
commit 0a38b78a9c
62 changed files with 28 additions and 37 deletions

View File

@@ -0,0 +1,27 @@
-- ostro_zx.lua : converts a color image into a
-- Oric image (8+8 fixed colors with color clash)
-- using Ostromoukhov's error diffusion algorithm.
--
-- Version: 03/21/2017
--
-- Copyright 2016-2017 by Samuel Devulder
--
-- This program is free software; you can redistribute
-- it and/or modify it under the terms of the GNU
-- General Public License as published by the Free
-- Software Foundation; version 2 of the License.
-- See <http://www.gnu.org/licenses/>
run('lib/ostro_other.lua')
OtherDither:new{
width=240,
height=200,
clash_size=6,
pal={0x000,0x00F,0x0F0,0x0FF,0xF00,0xF0F,0xFF0,0xFFF},
pset=function(self,x,y,c)
if x<6 then c=0 end
if c<0 then c=-c-1 end
self.screen[x+y*self.width] = c
end
}:dither()