mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-06 10:37:32 +00:00
Dump additional state
This commit is contained in:
parent
9477cd1413
commit
a32b82dcd7
Binary file not shown.
@ -105,7 +105,7 @@ byte[3] gamut = 128, 128, 128 // Gamut
|
||||
byte gamma = 1 // Gamma correction
|
||||
var brightness = 0
|
||||
var saturation = 255 // 1.0
|
||||
var tint = 22 // 45/2 deg
|
||||
var tint = 22 // = 45/2 deg
|
||||
byte errDiv = 4
|
||||
byte flags = 0
|
||||
var rgbErr // Running color error array
|
||||
@ -386,18 +386,7 @@ def rgbInit#0
|
||||
res[t_i32] g32
|
||||
|
||||
if flags & DUMP_STATE
|
||||
puts("Err Div = "); puti(errDiv); putln
|
||||
puts("Gamma = "); puti(sext(gamma)); putln
|
||||
puts("Brightness = "); puti(brightness); putln
|
||||
puts("Saturation = "); puti(saturation); putln
|
||||
puts("Tint = "); puti(tint); putln
|
||||
puts("Red gamut = "); puti(gamut[RED]); putln
|
||||
puts("Green gamut = "); puti(gamut[GRN]); putln
|
||||
puts("Blue gamut = "); puti(gamut[BLU]); putln
|
||||
puts("Match = ")
|
||||
if flags & MATCH_NEXT; puts("Next\n")
|
||||
elsif flags & MATCH_CYCLE; puts("Current\n")
|
||||
else; puts("Prev\n"); fin
|
||||
fin
|
||||
when gamma
|
||||
is 255 // (i + 1 / i^2) / 2
|
||||
@ -487,6 +476,16 @@ def rgbInit#0
|
||||
fin
|
||||
calcChroma(tint)
|
||||
if flags & DUMP_STATE
|
||||
puts("Err Div = "); puti(errDiv); putln
|
||||
puts("Brightness = "); puti(brightness); putln
|
||||
puts("Tint = "); puti(tint); putln
|
||||
puts("Saturation = "); puti(saturation); putln
|
||||
puts("Gamut = ["); puti(gamut[RED]); putc(',')
|
||||
puti(gamut[GRN]); putc(','); puti(gamut[BLU]); puts("]\n")
|
||||
puts("Match = ")
|
||||
if flags & MATCH_NEXT; puts("Next\n")
|
||||
elsif flags & MATCH_CYCLE; puts("Current\n")
|
||||
else; puts("Prev\n"); fin
|
||||
puts("Chroma cycle RGB =\n")
|
||||
for i = 0 to 3
|
||||
putc('[')
|
||||
@ -568,14 +567,13 @@ def pnmReadElement(refnum, bufptr)#1
|
||||
until fileio:read(refnum, bufptr, 1) <> 1 or ^bufptr <= ' ' or ^lenptr > 32
|
||||
fin
|
||||
until ^lenptr and ^(lenptr + 1) <> '#' // Repeat until not comment
|
||||
if flags & DUMP_STATE
|
||||
puts(lenptr); putln
|
||||
fin
|
||||
if flags & DUMP_STATE; puts(lenptr); putc(' '); fin
|
||||
return lenptr
|
||||
end
|
||||
|
||||
def pnmVerifyHeader(refnum)#1
|
||||
byte[128] buf
|
||||
if flags & DUMP_STATE; puts("PNM = "); fin
|
||||
pnmReadElement(refnum, @buf)
|
||||
if buf[0] <> 2 and buf[1] <> 'P' and buf[2] <> '6'
|
||||
puts("Invalid PNM magic #: "); putc(buf[1]); putc(buf[2]); putln
|
||||
@ -593,6 +591,7 @@ def pnmVerifyHeader(refnum)#1
|
||||
puts("Depth not 255: "); puts(@buf); putln
|
||||
return FALSE
|
||||
fin
|
||||
if flags & DUMP_STATE; putln; fin
|
||||
return TRUE
|
||||
end
|
||||
|
||||
@ -704,7 +703,7 @@ def rgbImportExport(rgbfile, dhgrfile)#0
|
||||
fin
|
||||
end
|
||||
|
||||
puts("DHGR RGB converter 1.0\n")
|
||||
puts("DHGR RGB converter 1.1\n")
|
||||
arg = argNext(argFirst)
|
||||
if ^arg
|
||||
while ^(arg + 1) == '-'
|
||||
|
Loading…
x
Reference in New Issue
Block a user