Ejemplo n.º 1
0
 def __init__(self, parent, id, title):
     wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.DefaultSize)
     tile_map = [
         ("road", [0x70]),
         ("trees", range(0x80, 0x96), range(0x01, 0x16)),
         ("buildings", range(0x96, 0x9F), range(0x16, 0x1F), range(0x41, 0x51), range(0x5D, 0x60)),
         ("people", range(0xF1, 0xF4), range(0x71, 0x74)),
         ("water", range(0x2E, 0x41)),
         ("bridges", range(0x69, 0x6D)),
         ("vehicles", range(0x51, 0x59)),
         ("airport", range(0x60, 0x68), [0x5F], range(0x59, 0x5D), range(0xD9, 0xDD)),
         ("golf", range(0xA9, 0xAE)),
         ("other", [0x20, 0x25, 0x26]),
         ("special", range(0x21, 0x25), range(0x74, 0x76)),
     ]
     color_converter = colors.gtia_ntsc_to_rgb
     highlight_color = (100, 200, 230)
     unfocused_cursor_color = (128, 128, 128)
     background_color = (255, 255, 255)
     match_background_color = (255, 255, 180)
     comment_background_color = (255, 180, 200)
     antic_font = fonts.AnticFont(
         fonts.A8DefaultFont,
         4,
         colors.powerup_colors(),
         highlight_color,
         match_background_color,
         comment_background_color,
         color_converter,
     )
     editor = Wrapper(antic_font=antic_font, antic_tile_map=tile_map, highlight_color=highlight_color)
     task = Wrapper(active_editor=editor)
     panel = TileWrapControl(self, task)
     panel.recalc_view()
Ejemplo n.º 2
0
 def update_colors(self, c):
     baseline = list(colors.powerup_colors())
     # need to operate on a copy of the colors to make sure we're not
     # changing some global value. Also force as python int so we're not
     # mixing numpy and python values.
     if len(c) == 5:
         baseline[4:9] = [int(i) for i in c]
     else:
         baseline[0:len(c)] = [int(i) for i in c]
     self.antic_color_registers = baseline
     self.color_registers = self.get_color_registers()
     self.bitmap_color_change_event = True
Ejemplo n.º 3
0
 def update_colors(self, c):
     baseline = list(colors.powerup_colors())
     # need to operate on a copy of the colors to make sure we're not
     # changing some global value. Also force as python int so we're not
     # mixing numpy and python values.
     if len(c) == 5:
         baseline[4:9] = [int(i) for i in c]
     else:
         baseline[0:len(c)] = [int(i) for i in c]
     self.antic_color_registers = baseline
     self.color_registers = self.get_color_registers()
     self.color_registers_highlight = self.get_blended_color_registers(self.color_registers, self.highlight_color)
     self.color_registers_match = self.get_blended_color_registers(self.color_registers, self.match_background_color)
     self.color_registers_comment = self.get_blended_color_registers(self.color_registers, self.comment_background_color)
     self.set_font()
     self.bitmap_color_change_event = True
Ejemplo n.º 4
0
 def _antic_color_registers_default(self):
     return list(colors.powerup_colors())
Ejemplo n.º 5
0
 def _antic_color_registers_default(self):
     return list(colors.powerup_colors())