Skip to content

Commit 9134eff

Browse files
author
rdagger
committed
Update sprite frame buffer demo.
1 parent 869f22e commit 9134eff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

demo_sprite_framebuffer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
class SpriteFrameBuffer(object):
1313
"""Sprite Frame Buffer."""
1414

15-
def __init__(self, sprite_path, background_image,
15+
def __init__(self, sprite_path, background_path,
1616
w, h, speed, display):
1717
"""Initialize sprite.
1818
1919
Args:
2020
sprite_path (string): Path of sprite image.
21-
background_image (string): Path of background image.
21+
background_path (string): Path of background image.
2222
w, h (int): Width and height of sprite.
2323
speed(int): Initial XY-Speed of sprite.
2424
display (SSD1351): OLED display object.
@@ -39,7 +39,7 @@ def __init__(self, sprite_path, background_image,
3939
self.screen_height, RGB565)
4040
# Load background and convert to bytearray for framebuf compatiblility
4141
background = bytearray(
42-
display.load_sprite(background_image, self.screen_width,
42+
display.load_sprite(background_path, self.screen_width,
4343
self.screen_height))
4444
# Create frame buffer for background
4545
self.background_fb = FrameBuffer(background, self.screen_width,

0 commit comments

Comments
 (0)