diff --git a/vacation.p8 b/vacation.p8 index 4f603a9..cf88e65 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -40,19 +40,6 @@ function hz(n) return t()*2*n&1~=0 end --- generate standard "overlay" --- constructor for type tt. --- if more is defined, generated --- new calls more(ret) after --- ret is definitely not nil --- before calling setmetatable. --- use to initialize mutables. --- --- if there was a previous new, --- it is invoked on the new --- object *after* more, because --- this works better with the --- `more` impls i use. function mknew(tt, more) local mt, oldnew={__index=tt},tt.new tt.new=function(ret) @@ -178,20 +165,6 @@ function pukeboard(item) puketh(item, "@clip") end -------------------------------- --- view -------------------------------- --- composits drawable items. --- add items to .views to --- composit them. x and y are --- relative reverse camera --- offsets. drawable items will --- observe appropriate incoming --- camera and clip state. --- clipping respects existing --- clipping so stacked views --- intersect. -------------------------------- view = { x=0, y=0, @@ -214,16 +187,10 @@ function view:draw() local oldcam, oldclip = $0x5f28, $0x5f20 poke2(0x5f28, %0x5f28-self.x) poke2(0x5f2a, %0x5f2a-self.y) - clip(-%0x5f28, -%0x5f2a, self.w, self.h, true) outer_or_each_opt(self.views, "draw") - poke4(0x5f20, oldclip) poke4(0x5f28, oldcam) end --- draws opaque rectangles. --- default bg is equivalent to --- clip-aware cls. --- restores prior fill pattern. bg = { x=0,y=0,w=128,h=128,fp=0,c=0 } @@ -322,7 +289,6 @@ end -->8 -- text rendering --- text colors for zonk mode: txtbox = { x=0, y=0,