X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/346a9b8e1fcfe30629f0d1ee4675e9e8f89890cf..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/pgu/tilevid.py diff --git a/src/pgu/tilevid.py b/src/pgu/tilevid.py deleted file mode 100644 index 00f730d..0000000 --- a/src/pgu/tilevid.py +++ /dev/null @@ -1,195 +0,0 @@ -"""Square tile based engine.""" - -from pgu.vid import * -import pygame - -class Tilevid(Vid): - """Based on [[vid]] -- see for reference.""" - def paint(self,s): - sw,sh = s.get_width(),s.get_height() - self.view.w,self.view.h = sw,sh - - tiles = self.tiles - tw,th = tiles[0].image.get_width(),tiles[0].image.get_height() - w,h = self.size - - if self.bounds != None: self.view.clamp_ip(self.bounds) - - ox,oy = self.view.x,self.view.y - tlayer = self.tlayer - blayer = self.blayer - alayer = self.alayer - sprites = self.sprites - - blit = s.blit - yy = - (self.view.y%th) - my = (oy+sh)/th - if (oy+sh)%th: my += 1 - - if blayer != None: - for y in xrange(oy/th,my): - if y >=0 and y < h: - trow = tlayer[y] - brow = blayer[y] - arow = alayer[y] - xx= - (self.view.x%tw) - mx = (ox+sw)/tw - #if (ox+sh)%tw: mx += 1 - for x in xrange(ox/tw,mx+1): - if x >=0and x=0 and y=0 and x