TIC-80
TIC-80 copied to clipboard
Poking the palette index doesn't affect `circ()` anymore
I noticed that in 1.0, my palette cycling functions don't work anymore for circ
calls as they did in 0.9. rect
in comparison works fine.
0.90.1723:
1.0.2164:
Here's the code to replicate the issue.
function pal(c0,c1)--replace c0 with c1
if(c0==nil and c1==nil)then for i=0,15 do poke4(0x3FF0*2+i,i)end
else poke4(0x3FF0*2+c0,c1) end
end
function palcycl(T,cols,cols2)--cycle palette
T=T or 0
if cols and cols2 then
for i,v in ipairs(cols)do
local col2=cols2[(i-1+T//1)%#cols2+1]
pal(v,col2)
end
else
for i=0,15 do pal(i,(i+T)%16)end
end
return retcol
end
t=0
x=120
y=60
palette={{1,2,6,8,10,14,15},{1,2,6,8,10,14,15}}
function TIC()
cls(13)
palcycl(t//8,palette[1],palette[2])
circ(x,y,10,6)
rect(x,y+20,10,10,6)
palcycl()
t=t+1
end
Also, a circle with zero radius shouldn't draw anything (now draws a 1px dot).
i actually prefer circ with 0 radius drawing a single pixel , lot of my carts work that way
i actually prefer circ with 0 radius drawing a single pixel , lot of my carts work that way
I don't know how to please everyone, one says he doesn't want to see anything with zero radius, the other wants to see a 1px dot :)
Also, a circle with zero radius shouldn't draw anything (now draws a 1px dot).
@nesbox Why would this be bad? I mean technically a circle with a radius 0 would be a point, not a circle, but what is the harm if it renders as a point? If someone doesn't want to draw anything they shouldn't call a drawing function... I'm not sure there is a 100% right or wrong here but I don't see any problem with a 0px radius circle drawing a point/pixel.
i'm fine either way. Maybe leaning towards "0 radius drawing 1px dot", only because that's how it has worked previously, and changing the behaviour would change how some old cartridges look.
Closing this as resolved by #1960. If we want to continue the 0 vs 1 pixel radius discussion we should open a separate issue.
yeah good call as if was fixed in d23ffe1daebf33780f6b8f7bc6d7c83c2716af0c.