Example #1
0
 def __init__(self):
     import image
     self.colors = image.random_color_scheme("personal")
     print self.colors
     self.sprites = [image.get("cha_f_mechanic.png", self.colors, (64*(i%4), 64*(i//4), 64, 64)) for i in range(8)]
     self.orientation = 0
     self.map = None
     self.coords = (0,0)
Example #2
0
    @property
    def opaque(self):
        return self._opaque
        
    def __getstate__(self):
        d = self.__dict__.copy()
        del d['_sprite']
        return d
    def __setstate__(self,d):
        self.__dict__ = d
        self._sprite = None

#some default thinwalls
twfile = "SharkD_Wall_FlatTechy_b_sheet_a.png"
twls = {}
colors = image.random_color_scheme('mecha')
#ThinWall, Corner: Right and Down
twls[u'┌'] = Feature("tw-crd", u"┌", (twfile, colors, (0,288,64,96)), False, True)
twls[u'┐'] = Feature("tw-cld", u"┐", (twfile, colors, (64,192,64,96)), False, True)
twls[u'└'] = Feature("tw-cru", u"└", (twfile, colors, (64*2,96,64,96)), False, True)
twls[u'┘'] = Feature("tw-clu", u"┘", (twfile, colors, (64*3,0,64,96)), False, True)
twls[u'─'] = Feature("tw-h",   u"─", (twfile, colors, (64,96,64,96)), False, True)
twls[u'│'] = Feature("tw-v",   u"│", (twfile, colors, (64*2,96*2,64,96)), False, True)
twls[u'┬'] = Feature("tw-jd",  u"┬", (twfile, colors, (64, 96*3, 64,96)), False, True)
twls[u'┴'] = Feature("tw-ju",  u"┴", (twfile, colors, (64*3, 96, 64,96)), False, True)
twls[u'├'] = Feature("tw-jr",  u"├", (twfile, colors, (64*2, 96*3, 64,96)), False, True)
twls[u'┤'] = Feature("tw-jl",  u"┤", (twfile, colors, (64*3, 96*2, 64,96)), False, True)
twls[u'┼'] = Feature("tw-jx",  u"┼", (twfile, colors, (64*3, 96*3, 64,96)), False, True)


def load_ascii_map(f):