From c9bed906b7bc72f4694cfb5a0a2335483d03cf41 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Mar 19 2018 21:27:00 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6565f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/safetyblanket-1.01.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index deac4bb..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# safetyblanket - -The safetyblanket package \ No newline at end of file diff --git a/safetyblanket-1.01-love0.10.2.patch b/safetyblanket-1.01-love0.10.2.patch new file mode 100644 index 0000000..b8e54f9 --- /dev/null +++ b/safetyblanket-1.01-love0.10.2.patch @@ -0,0 +1,187 @@ +From 6cac89f4282880e7f7e875658fa90b25f6a8c192 Mon Sep 17 00:00:00 2001 +From: Mystro256 +Date: Sun, 18 Mar 2018 18:57:45 -0400 +Subject: [PATCH] Love 0.10.2 support + +--- + blanket.lua | 4 ++-- + conf.lua | 4 ++-- + gameover.lua | 4 ++-- + ingame.lua | 2 +- + introduction.lua | 4 ++-- + main.lua | 6 ++---- + title.lua | 4 ++-- + winscreen.lua | 4 ++-- + 8 files changed, 15 insertions(+), 17 deletions(-) + +diff --git a/blanket.lua b/blanket.lua +index d128a9d..dab319e 100644 +--- a/blanket.lua ++++ b/blanket.lua +@@ -99,7 +99,7 @@ function Blanket:draw() + end + + function Blanket:mousepressed(x, y, button) +- if button ~= "l" then return end ++ if button ~= 1 then return end + + if self.mousejoint then + self.mousejoint:destroy() +@@ -126,7 +126,7 @@ function Blanket:mousepressed(x, y, button) + end + + function Blanket:mousereleased(x, y, button) +- if button ~= "l" or self.mousejoint == nil then return end ++ if button ~= 1 or self.mousejoint == nil then return end + + self.mousejoint:destroy() + self.mousejoint = nil +diff --git a/conf.lua b/conf.lua +index 91a954b..9f2b8bf 100644 +--- a/conf.lua ++++ b/conf.lua +@@ -1,6 +1,6 @@ + function love.conf(t) + t.identity = "safetyblanket" +- t.version = "0.9.2" ++ t.version = "0.10.2" + t.console = false + + t.window.title = "Safety Blanket" +@@ -12,7 +12,7 @@ function love.conf(t) + t.window.minwidth = 1 + t.window.minheight = 1 + t.window.fullscreen = false +- t.window.fullscreentype = "normal" ++ t.window.fullscreentype = "desktop" + t.window.vsync = true + t.window.fsaa = 0 + t.window.display = 1 +diff --git a/gameover.lua b/gameover.lua +index b490cfc..603a227 100644 +--- a/gameover.lua ++++ b/gameover.lua +@@ -55,7 +55,7 @@ function GameOver:draw() + end + + local mx, my = love.mouse.getPosition() +- if love.mouse.isDown("l") then ++ if love.mouse.isDown(1) then + love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12) + else + love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12) +@@ -70,7 +70,7 @@ function GameOver:mousepressed(x, y, button) + end + + function GameOver:mousereleased(x, y, button) +- if button == "l" and self.state == GameOver.STATE_FADEIN and self.fade < 0.5 then ++ if button == 1 and self.state == GameOver.STATE_FADEIN and self.fade < 0.5 then + self.state = GameOver.STATE_FADEOUT + self.fade = math.max(0, self.fade) + ResMgr.playSound("pageturn.wav") +diff --git a/ingame.lua b/ingame.lua +index 2f1426b..9bc365c 100644 +--- a/ingame.lua ++++ b/ingame.lua +@@ -117,7 +117,7 @@ function Ingame:draw() + end + + local mx, my = love.mouse.getPosition() +- if love.mouse.isDown("l") then ++ if love.mouse.isDown(1) then + love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12) + else + love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12) +diff --git a/introduction.lua b/introduction.lua +index d3ac5ea..da8ac46 100644 +--- a/introduction.lua ++++ b/introduction.lua +@@ -51,7 +51,7 @@ function Introduction:draw() + end + + local mx, my = love.mouse.getPosition() +- if love.mouse.isDown("l") then ++ if love.mouse.isDown(1) then + love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12) + else + love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12) +@@ -73,7 +73,7 @@ function Introduction:mousepressed(x, y, button) + end + + function Introduction:mousereleased(x, y, button) +- if button == "l" then ++ if button == 1 then + if self.state == Introduction.STATE_FADEIN then + self.state = Introduction.STATE_FADEOUT + self.fade = math.max(self.fade, 0) +diff --git a/main.lua b/main.lua +index ffdf413..3707bcb 100644 +--- a/main.lua ++++ b/main.lua +@@ -24,9 +24,7 @@ function love.load() + love.graphics.setLineStyle("rough") + love.mouse.setVisible(false) + +- if love.graphics.isSupported("canvas") then +- canvas = love.graphics.newCanvas(WIDTH, HEIGHT) +- end ++ canvas = love.graphics.newCanvas(WIDTH, HEIGHT) + + switchState(Title) + end +@@ -42,7 +40,7 @@ end + function love.draw() + love.graphics.push() + +- canvas:clear() ++ love.graphics.clear() + love.graphics.setCanvas(canvas) + state:draw() + love.graphics.scale(SCALE, SCALE) +diff --git a/title.lua b/title.lua +index 1842920..4bd3876 100644 +--- a/title.lua ++++ b/title.lua +@@ -82,7 +82,7 @@ function Title:draw() + love.graphics.setColor(255, 255, 255, 255) + end + +- if love.mouse.isDown("l") then ++ if love.mouse.isDown(1) then + love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12) + else + love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12) +@@ -119,7 +119,7 @@ function Title:mousepressed(x, y, button) + end + + function Title:mousereleased(x, y, button) +- if button == "l" then ++ if button == 1 then + if self.state == Title.STATE_FADEIN then + if self.hasInf == true and x >= 208 and x <= 249 and y >= 7 and y <= 30 then + self.state = Title.STATE_FADEINF +diff --git a/winscreen.lua b/winscreen.lua +index 7ca185d..f1ae6d1 100644 +--- a/winscreen.lua ++++ b/winscreen.lua +@@ -47,7 +47,7 @@ function Winscreen:draw() + end + + local mx, my = love.mouse.getPosition() +- if love.mouse.isDown("l") then ++ if love.mouse.isDown(1) then + love.graphics.draw(self.imgCursorPinch, mx, my, 0, 1, 1, 4, 12) + else + love.graphics.draw(self.imgCursorNormal, mx, my, 0, 1, 1, 4, 12) +@@ -63,7 +63,7 @@ function Winscreen:mousepressed(x, y, button) + end + + function Winscreen:mousereleased(x, y, button) +- if button == "l" then ++ if button == 1 then + if self.state == Winscreen.STATE_FADEIN then + self.state = Winscreen.STATE_FADEOUT + self.fade = math.max(self.fade, 0) +-- +2.14.3 + diff --git a/safetyblanket-appdata.patch b/safetyblanket-appdata.patch new file mode 100644 index 0000000..e86bbec --- /dev/null +++ b/safetyblanket-appdata.patch @@ -0,0 +1,86 @@ +--- a/appdata/safetyblanket ++++ b/appdata/safetyblanket +@@ -0,0 +1,13 @@ ++#!/bin/sh ++if [ $# -ne 0 ] ++then ++ if [ "$1" == "-h" ]||[ "$1" == "--help" ] ++ then ++ man 6 safetyblanket ++ exit ++ fi ++ echo "Invalid option(s): $*" 1>&2 ++ echo Usage: `basename $0` [-h] 1>&2 ++ exit 1 ++fi ++love /usr/share/safetyblanket/safetyblanket.love +--- a/appdata/safetyblanket.6 ++++ b/appdata/safetyblanket.6 +@@ -0,0 +1,19 @@ ++.TH safetyblanket 6 "VERSION" "Safety Blanket" ++.SH NAME ++safetyblanket - Safety Blanket v VERSION ++.SH SYNOPSIS ++Creepy blanket simulator ++.SH DESCRIPTION ++Safety Blanket was developed in 48 hours for the Ludum Dare 29 game jam. ++It’s bed time, the monsters are out to get you, and your blanket is just too ++small to cover your body! ++Cover your exposed limbs to fend off the approaching tentacles. ++The tentacles will only go for your feet, hands and head. ++If the tentacles reach you it’s game over! ++This game is made with LOVE. You can find more games and ++information about the author(s) at http://tangramgames.dk/ ++.SH OPTIONS ++.BR \-h ", " \-\-help ++Show manpage. ++.SH SEE ALSO ++.BR love(6) +--- a/appdata/safetyblanket.appdata.xml ++++ b/appdata/safetyblanket.appdata.xml +@@ -0,0 +1,34 @@ ++ ++ ++ safetyblanket.desktop ++ CC-BY-SA ++ zlib ++ Safety Blanket ++ Creepy blanket simulator ++ ++

++ Safety Blanket was developed in 48 hours for the Ludum Dare 29 game jam. ++ It’s bed time, the monsters are out to get you, and your blanket is just too ++ small to cover your body! ++ Cover your exposed limbs to fend off the approaching tentacles. ++ The tentacles will only go for your feet, hands and head. ++ If the tentacles reach you it’s game over! ++

++
++ ++ ++ http://tangramgames.dk/games/safetyblanket/images/1.png ++ Example gameplay 1 ++ ++ ++ http://tangramgames.dk/games/safetyblanket/images/2.png ++ Example gameplay 2 ++ ++ ++ http://tangramgames.dk/games/safetyblanket/images/3.png ++ Example gameplay 3 ++ ++ ++ http://tangramgames.dk/games/safetyblanket/ ++ https://github.com/SimonLarsen/safetyblanket/issues ++
+--- a/appdata/safetyblanket.desktop ++++ b/appdata/safetyblanket.desktop +@@ -0,0 +1,8 @@ ++[Desktop Entry] ++Name=Safety Blanket ++Comment=Creepy blanket simulator ++Exec=safetyblanket ++Type=Application ++Categories=Game;ArcadeGame; ++Terminal=false ++Icon=safetyblanket diff --git a/safetyblanket.spec b/safetyblanket.spec new file mode 100644 index 0000000..e45309d --- /dev/null +++ b/safetyblanket.spec @@ -0,0 +1,73 @@ +Name: safetyblanket +Version: 1.01 +Release: 1%{?dist} +Summary: Creepy blanket simulator + +#See LICENSE.txt file in source for details +#All code is zlib excluding slam.lua and AnAL.lua, which is MIT +#All assets are CC-BY 4.0, excluding font, which is CC-BY 3.0 +License: zlib and MIT and CC-BY +URL: http://tangramgames.dk/games/safetyblanket/ +Source0: https://github.com/SimonLarsen/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +#Patch for appdata, manpage, execution script, and desktop file +Patch0: %{name}-appdata.patch +#Patch for LOVE v0.10.2 +#https://github.com/SimonLarsen/safetyblanket/pull/2 +Patch1: %{name}-%{version}-love0.10.2.patch + +BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib +BuildArch: noarch +Requires: love + +#From the website (see URL above) +%description +Safety Blanket was developed in 48 hours for the Ludum Dare 29 game jam. +It’s bed time, the monsters are out to get you, and your blanket is just too +small to cover your body! +Cover your exposed limbs to fend off the approaching tentacles. +The tentacles will only go for your feet, hands and head. +If the tentacles reach you it’s game over! + +%prep +%autosetup -p1 +sed -i 's/VERSION/%{version}/g' appdata/%{name}.6 + +%build +#love "binary" files are just zipped sources, but should exclude appdata/docs +zip -r %{name}.love . -x appdata -x LICENSE.txt + +%install +#Install love file +install -p -D -m 0644 %{name}.love \ + %{buildroot}/%{_datadir}/%{name}/%{name}.love +#Install execution script +install -p -D -m 0755 appdata/%{name} \ + %{buildroot}/%{_bindir}/%{name} +#Install manpage +install -p -D -m 0644 appdata/%{name}.6 \ + %{buildroot}/%{_mandir}/man6/%{name}.6 +#Install appdata.xml and verify +install -p -D -m 0644 appdata/%{name}.appdata.xml \ + %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml +appstream-util validate-relax --nonet \ + %{buildroot}/%{_datadir}/appdata/*.appdata.xml +#Install desktop, icon: +desktop-file-install \ + --dir %{buildroot}%{_datadir}/applications \ + appdata/%{name}.desktop +install -p -D -m 0644 res/gfx/title_text1.png \ + %{buildroot}/%{_datadir}/pixmaps/%{name}.png + +%files +%license LICENSE.txt +%{_mandir}/man6/%{name}.* +%{_bindir}/%{name} +%{_datadir}/%{name}/ +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop +%{_datadir}/appdata/*.appdata.xml + +%changelog +* Sun Mar 18 2018 Jeremy Newton - 1.01-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..3a3eca8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (safetyblanket-1.01.tar.gz) = 85216552e7cc9e9ac79220dd9324148a85358c3f6028da3b741ec17881e5bba8cafd07c227088ee0a2dc4a292db4f536836efa82ee534cbd961d3ca878c58378