Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # clear_this_frame is a list of rectangles which have been drawn over
  2. # static_blits is a dict where keys are strings (for another purpose), value is a
  3. # (surface,rect) tuple. I want to redraw each surface in the area that each i in clear_this_frame
  4. # has overlapped with them.
  5. for i in clear_this_frame:
  6. b = background.subsurface(i)
  7. screen.blit(b, i)
  8. for surface,position in static_blits.itervalues():
  9. if position.colliderect(i):
  10. screen.blit(surface, position.clip(i))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement