Skip to content

Commit

Permalink
battle layer removed references to old style menu stuff, to be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoodspeed committed Nov 2, 2010
1 parent 4e5586b commit b3ebff7
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions lib/layers/battle_layer.rb
Expand Up @@ -17,10 +17,6 @@ def initialize(screen, game)
@battle_hud = BattleHud.new(@screen, @text_rendering_helper, @layer)

@cursor_helper = CursorHelper.new([20,20]) #TODO these constants should be extracted

# sections = [MenuSection.new("Exp",[EndBattleMenuAction.new("Confirm", self)]),
# MenuSection.new("Items", [EndBattleMenuAction.new("Confirm", self)])]
# @end_of_battle_menu_helper = MenuHelper.new(screen, @layer, @text_rendering_helper, sections, @@MENU_LINE_SPACING,@@MENU_LINE_SPACING)
make_magic_hooks({ClockTicked => :update})
end
def update( event )
Expand All @@ -44,11 +40,6 @@ def rebuild_menu
def start_battle(game, universe, player, monster)
@active = true
@battle = Battle.new(game, universe, player, monster, self)

# @menu_helper = BattleMenuHelper.new(@battle, @screen, @layer, @text_rendering_helper, [], @@MENU_LINE_SPACING,@@MENU_LINE_SPACING)

# sections = player.party.collect {|hero| HeroMenuSection.new(hero, [AttackMenuAction.new("Attack", self, @menu_helper), ItemMenuAction.new("Item", self, @menu_helper, @game)])}
# @menu_helper.replace_sections(sections)
end
def end_battle
@active = false
Expand Down Expand Up @@ -87,19 +78,21 @@ def draw()
@layer.fill(:orange)
if @battle.over?
if @battle.player_alive?
@end_of_battle_menu.draw(end_battle_menu_layer_config, @game)
@end_menu.draw(end_battle_menu_layer_config, @game)
else
puts "you died ... game should be over... whatever"
@end_of_battle_menu..draw(end_battle_menu_layer_config, @game)
@end_menu.draw(end_battle_menu_layer_config, @game)
end
else
@battle.monster.draw_to(@layer)
rebuild_menu
menu.draw(menu_layer_config, @cursor_helper.path, @cursor_helper.currently_selected)
@cursor_helper.draw_at_depth(@layer, menu_layer_config, @game, nil)
@layer.blit(@screen, menu_layer_config.layer_inset_on_screen)
@battle_hud.draw(menu_layer_config, @game, @battle)
end

@cursor_helper.draw_at_depth(@layer, menu_layer_config, @game, nil)
@layer.blit(@screen, menu_layer_config.layer_inset_on_screen)

end

def move_cursor_up(e)
Expand Down

0 comments on commit b3ebff7

Please sign in to comment.