Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/roflbalt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ def char rx, ry, ticks
' @ ',
'\+/',
' \\\\',
][ry][rx]
][ry][rx..rx]
elsif !@walking
[
' O/',
'/| ',
'/ >',
][ry][rx]
][ry][rx..rx]
else
[
[
Expand All @@ -346,7 +346,7 @@ def char rx, ry, ticks
',|\\',
' >\\',
],
][ticks / 4 % 2][ry][rx]
][ticks / 4 % 2][ry][rx..rx]
end
end
def acceleration
Expand Down Expand Up @@ -410,7 +410,7 @@ def template
]
end
def pixel x, y, rx, ry, ticks
Pixel.new template[ry][rx], 244, 234
Pixel.new template[ry][rx..rx], 244, 234
end
end

Expand All @@ -430,7 +430,7 @@ def template
]
end
def pixel x, y, rx, ry, ticks
Pixel.new template[ry][rx], FG, BG
Pixel.new template[ry][rx..rx], FG, BG
end
end

Expand Down Expand Up @@ -470,7 +470,7 @@ def pixel x, y, rx, ry, ticks
Pixel.new char(rx, ry, ticks), 246, @background.color(x, y)
end
def char rx, ry, ticks
@frames[ticks % 2][ry][rx] || " "
@frames[ticks % 2][ry][rx..rx] || " "
rescue
" " # Roflcopter crashes from time to time..
end
Expand Down
Empty file added test/.gitkeep
Empty file.