Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface/screen bindings merge + more sprite bindings #16

Merged
merged 6 commits into from
Jan 28, 2023
Merged
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
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ set(PROJECT_SOURCE
lua-bindings/vec2.cpp
lua-bindings/vec3.cpp
lua-bindings/rect.cpp
lua-bindings/sprites.cpp
lua-bindings/timer.cpp
lua-bindings/palette.cpp
lua-bindings/surface.cpp
lua-bindings/input.cpp
lua-bindings/screen.cpp)
)

set(PROJECT_DISTRIBS
LICENSE
Expand Down
13 changes: 7 additions & 6 deletions examples/sprite-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ function init()
-- Draw a heart rotated 90, 180 and 270 degrees
screen.pen = Pen(40, 60, 80)
screen.rectangle(Rect(50, 80, 8, 8))
--screen.sprite(Point(0, 4), Point(50, 80), SpriteTransform::R90)
screen.sprite(Point(0, 4), Point(50, 80), SpriteTransform.R90)
screen.rectangle(Rect(60, 80, 8, 8))
--screen.sprite(Point(0, 4), Point(60, 80), SpriteTransform::R180)
screen.sprite(Point(0, 4), Point(60, 80), SpriteTransform.R180)
screen.rectangle(Rect(70, 80, 8, 8))
--screen.sprite(Point(0, 4), Point(70, 80), SpriteTransform::R270)
screen.sprite(Point(0, 4), Point(70, 80), SpriteTransform.R270)

-- Draw a heart flipped horiontally and vertically
screen.rectangle(Rect(50, 100, 8, 8))
--screen.sprite(Point(0, 4), Point(50, 100), SpriteTransform::HORIZONTAL)
screen.sprite(Point(0, 4), Point(50, 100), SpriteTransform.HORIZONTAL)
screen.rectangle(Rect(60, 100, 8, 8))
--screen.sprite(Point(0, 4), Point(60, 100), SpriteTransform::VERTICAL)
screen.sprite(Point(0, 4), Point(60, 100), SpriteTransform.VERTICAL)


-- Right examples
Expand All @@ -83,6 +83,7 @@ function init()
Rect(130, 16, 16, 16)
)
]]
screen.sprite(1, Point(130, 16), Point(0, 0), 2.0)


local ms_end = blit.now()
Expand All @@ -106,4 +107,4 @@ function init()
end

function update(time)
end
end
295 changes: 0 additions & 295 deletions lua-bindings/screen.cpp

This file was deleted.

Loading