Advertisement
FlipelyFlip

for the new ziifee StateIcon

Feb 18th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.55 KB | None | 0 0
  1. def draw_actor_state(actor, x, y, dummy_width = 24)
  2.     clear_stateanime if @stateanime_new
  3.     icons = []
  4.     for state in actor.states
  5.       next if StateAnime::Exceptions.include?(state.id)
  6.       icons.push(state.icon_index) if state.icon_index > 0
  7.     end
  8.     icons.push(StateAnime::NOR) if icons.empty?
  9.     icons.uniq!
  10.     src_rect = Rect.new(x, y, 24, 24)
  11.     bitmap   = Bitmap.new(24, 24)
  12.     bitmap.blt(0, 0, self.contents, src_rect)
  13.     obj = StateIcons.new(icons, x, y, bitmap)
  14.     @stateanime_set.push(obj)
  15.     draw_stateanime(obj)
  16.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement