diff --git a/90-Second-Portraits-1.01b-love11.patch b/90-Second-Portraits-1.01b-love11.patch deleted file mode 100644 index 73784c0..0000000 --- a/90-Second-Portraits-1.01b-love11.patch +++ /dev/null @@ -1,364 +0,0 @@ -From 0ae7ba046f14cef9857fd6c05d9072455097441f Mon Sep 17 00:00:00 2001 -From: Mystro256 -Date: Tue, 12 Jun 2018 10:06:50 -0400 -Subject: [PATCH] Love 11 support - ---- - Canvas.lua | 8 ++++---- - ColorMixer.lua | 22 +++++++++++----------- - CreditsController.lua | 4 ++-- - GalleryController.lua | 4 ++-- - GameController.lua | 2 +- - ImageTools.lua | 6 +++--- - Palette.lua | 16 ++++++++-------- - Preferences.lua | 2 +- - Sound.lua | 2 +- - TitleController.lua | 6 +++--- - conf.lua | 2 +- - main.lua | 2 +- - mymath.lua | 15 ++++++--------- - 13 files changed, 44 insertions(+), 47 deletions(-) - -diff --git a/Canvas.lua b/Canvas.lua -index f7db8ec..38fd430 100644 ---- a/Canvas.lua -+++ b/Canvas.lua -@@ -11,7 +11,7 @@ function Canvas:initialize() - - self.tool = 2 - self.brush_dir = 1 -- self.color = { 224, 24, 24, 255 } -+ self.color = { 0.878, 0.094, 0.094, 1 } - self.width = 120 - self.height = 160 - -@@ -39,7 +39,7 @@ function Canvas:reset() - - local c = love.graphics.getCanvas() - love.graphics.setCanvas(self.canvas) -- love.graphics.clear(241, 232, 199, 255) -+ love.graphics.clear(0.945, 0.910, 0.780, 1) - love.graphics.setCanvas(c) - end - -@@ -117,7 +117,7 @@ function Canvas:update(dt) - self.brush_dir = 1 - end - -- love.graphics.setColor(255, 255, 255, 255) -+ love.graphics.setColor(1, 1, 1, 1) - love.graphics.setCanvas(oldCanvas) - end - -@@ -164,7 +164,7 @@ function Canvas:gui() - end - end - -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - end - - function Canvas:swap() -diff --git a/ColorMixer.lua b/ColorMixer.lua -index fca17a9..79bbd31 100644 ---- a/ColorMixer.lua -+++ b/ColorMixer.lua -@@ -1,10 +1,10 @@ - local ColorMixer = class("ColorMixer", Entity) - - ColorMixer.static.COLORS = { -- { 255, 255, 255 }, { 0, 0, 0 }, -- { 192,0,0 }, { 255,160,0 }, -- { 255,255,0 }, { 0,128,0 }, -- { 0,0,192 }, { 128,0,128 } -+ { 1, 1, 1 }, { 0, 0, 0 }, -+ { 0.75,0,0 }, { 1,0.625,0 }, -+ { 1,1,0 }, { 0,0.5,0 }, -+ { 0,0,0.75 }, { 0.5,0,0.5 } - } - - function ColorMixer:initialize(slot, color) -@@ -13,7 +13,7 @@ function ColorMixer:initialize(slot, color) - self.slot = slot - self:reset() - -- local h, s, v = math.rgbtohsv(color[1], color[2], color[3], 255) -+ local h, s, v = math.rgbtohsv(color[1], color[2], color[3], 1) - local hasHue = false - if s > 0 then hasHue = true end - self:updateColor(color, hasHue) -@@ -47,8 +47,8 @@ function ColorMixer:updateColor(color, hasHue) - return - end - -- local oh, os, ov = math.rgbtohsv(self.mycolor[1], self.mycolor[2], self.mycolor[3], 255) -- local nh, ns, nv = math.rgbtohsv(color[1], color[2], color[3], 255) -+ local oh, os, ov = math.rgbtohsv(self.mycolor[1], self.mycolor[2], self.mycolor[3], 1) -+ local nh, ns, nv = math.rgbtohsv(color[1], color[2], color[3], 1) - - local h, s, v - if self.hasHue and hasHue then -@@ -63,7 +63,7 @@ function ColorMixer:updateColor(color, hasHue) - s = (2*os + ns) / 3 - v = (2*ov + nv) / 3 - -- local r, g, b = math.hsvtorgb(h, s, v, 255) -+ local r, g, b = math.hsvtorgb(h, s, v, 1) - self.mycolor = { r, g, b } - self.hasHue = self.hasHue or hasHue - end -@@ -123,13 +123,13 @@ end - function ColorMixer:gui() - local mx, my = Mouse.static:getPosition() - -- love.graphics.setColor(0, 0, 0, 200) -+ love.graphics.setColor(0, 0, 0, 0.784) - love.graphics.rectangle("fill", 0, 0, 180, HEIGHT) - love.graphics.rectangle("fill", 300, 0, 180, HEIGHT) - love.graphics.rectangle("fill", 180, 0, 120, 10) - love.graphics.rectangle("fill", 180, 170, 120, HEIGHT-170) - -- love.graphics.setColor(255, 255, 255, 255) -+ love.graphics.setColor(1, 1, 1, 1) - for i=1, #ColorMixer.static.COLORS do - local x = (i % 4) * 40 - local y = math.floor((i-1) / 4) * 64 -@@ -155,7 +155,7 @@ function ColorMixer:gui() - end - end - -- love.graphics.setColor(255, 255, 255, 255) -+ love.graphics.setColor(1, 1, 1, 1) - - love.graphics.draw(self.reset_button, 115, 215, 0, 1, 1, 16, 16) - love.graphics.draw(self.submit_button, 201, 202) -diff --git a/CreditsController.lua b/CreditsController.lua -index b5152ad..25ce41f 100644 ---- a/CreditsController.lua -+++ b/CreditsController.lua -@@ -71,9 +71,9 @@ function CreditsController:gui() - local mx, my = Mouse.static:getPosition() - local offset = math.cos(self.time*10)*2 - -- love.graphics.setColor(53, 30, 24) -+ love.graphics.setColor(0.208, 0.118, 0.094) - love.graphics.rectangle("fill", 0, 0, WIDTH, HEIGHT) -- love.graphics.setColor(255, 255, 255, 255) -+ love.graphics.setColor(1, 1, 1, 1) - - love.graphics.push() - love.graphics.translate(0, -self.scroll) -diff --git a/GalleryController.lua b/GalleryController.lua -index 0941dcb..35dd180 100644 ---- a/GalleryController.lua -+++ b/GalleryController.lua -@@ -111,9 +111,9 @@ function GalleryController:gui() - - local offset = math.cos(self.time*10)*2 - -- love.graphics.setColor(53, 30, 24) -+ love.graphics.setColor(0.208, 0.118, 0.094) - love.graphics.rectangle("fill", 0, 0, WIDTH, HEIGHT) -- love.graphics.setColor(255, 255, 255, 255) -+ love.graphics.setColor(1, 1, 1, 1) - - love.graphics.push() - love.graphics.translate(0, -self.scroll) -diff --git a/GameController.lua b/GameController.lua -index 5063d5a..a4ebd34 100644 ---- a/GameController.lua -+++ b/GameController.lua -@@ -135,7 +135,7 @@ function GameController:getCustomerImage() - local canvas = love.graphics.newCanvas(120, 160) - local c = love.graphics.getCanvas() - love.graphics.setCanvas(canvas) -- love.graphics.clear(241, 232, 199, 255) -+ love.graphics.clear(0.945, 0.910, 0.780, 1) - love.graphics.setCanvas(c) - - local w, h = self.customer.image:getDimensions() -diff --git a/ImageTools.lua b/ImageTools.lua -index b985e05..a04ec90 100644 ---- a/ImageTools.lua -+++ b/ImageTools.lua -@@ -20,9 +20,9 @@ function ImageTools.histogram(data, steps) - for iy = 0, h-1 do - for ix = 0, w-1 do - local r, g, b = data:getPixel(ix, iy) -- local ir = math.floor(r / 256 * steps) -- local ig = math.floor(g / 256 * steps) -- local ib = math.floor(b / 256 * steps) -+ local ir = math.floor(r * steps) -+ local ig = math.floor(g * steps) -+ local ib = math.floor(b * steps) - hist[ir][ig][ib] = hist[ir][ig][ib] + 1 - end - end -diff --git a/Palette.lua b/Palette.lua -index d4afd6b..e7cad36 100644 ---- a/Palette.lua -+++ b/Palette.lua -@@ -8,10 +8,10 @@ function Palette:initialize(x, y) - Entity.initialize(self, x, y, 2) - - self.colors = { -- {255, 255, 255}, -- {48, 213, 48}, -- {63, 127, 193}, -- {224, 54, 54} -+ {1, 1, 1}, -+ {48/255, 213/255, 48/255}, -+ {63/255, 127/255, 193/255}, -+ {224/255, 54/255, 54/255} - } - - self.selection = 1 -@@ -88,7 +88,7 @@ function Palette:gui() - love.graphics.draw(self.image_mix, self.x+35, self.y+20) - - if self.state == 2 then -- love.graphics.setColor(0, 0, 0, 200) -+ love.graphics.setColor(0, 0, 0, 0.784) - love.graphics.rectangle("fill", 0, 0, WIDTH, HEIGHT) - end - -@@ -96,9 +96,9 @@ function Palette:gui() - local x = self.x + Palette.static.PAINT_POS[i][1] - local y = self.y + Palette.static.PAINT_POS[i][2] - -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - if i == self.selection then -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - love.graphics.draw(self.paint_highlights._image, self.paint_highlights._quads[i], x-1, y) - end - -@@ -106,7 +106,7 @@ function Palette:gui() - love.graphics.draw(self.paint._image, self.paint._quads[i], x, y) - end - -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - end - - return Palette -diff --git a/Preferences.lua b/Preferences.lua -index 9ab61b2..12b802d 100644 ---- a/Preferences.lua -+++ b/Preferences.lua -@@ -6,7 +6,7 @@ Preferences.static.path = "preferences" - - function Preferences.static:load() - self.data = {} -- if love.filesystem.exists(self.path) == false then -+ if love.filesystem.getInfo(self.path) == nil then - print("Preference file \"".. self.path .. "\" not found") - return - end -diff --git a/Sound.lua b/Sound.lua -index a800c26..4e8cc88 100644 ---- a/Sound.lua -+++ b/Sound.lua -@@ -12,7 +12,7 @@ function Sound.music(name) - if music ~= nil then - music:stop() - end -- music = love.audio.newSource("data/music/" .. name) -+ music = love.audio.newSource("data/music/" .. name, "stream") - music:setVolume(0.5) - music:setLooping(true) - love.audio.play(music) -diff --git a/TitleController.lua b/TitleController.lua -index 4a0413a..b7bd4f9 100644 ---- a/TitleController.lua -+++ b/TitleController.lua -@@ -80,12 +80,12 @@ function TitleController:gui() - love.graphics.print(v, 32+self.offsets[i], 22+i*28) - - if self.active[i] then -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - love.graphics.print(v, 32+self.offsets[i], 20+i*28) - else -- love.graphics.setColor(128, 128, 128) -+ love.graphics.setColor(0.5, 0.5, 0.5) - love.graphics.print(v, 32+self.offsets[i], 20+i*28) -- love.graphics.setColor(255, 255, 255) -+ love.graphics.setColor(1, 1, 1) - end - end - -diff --git a/conf.lua b/conf.lua -index dc26893..98e45e0 100644 ---- a/conf.lua -+++ b/conf.lua -@@ -1,6 +1,6 @@ - function love.conf(t) - t.identity = "dk.tangramgames.90secondportraits" -- t.version = "0.10.0" -+ t.version = "11.0" - t.console = false - t.accelerometerjoystick = false - t.gammacorrect = false -diff --git a/main.lua b/main.lua -index e513605..a54f067 100644 ---- a/main.lua -+++ b/main.lua -@@ -116,7 +116,7 @@ function love.run() - Mouse.static:clear() - Keyboard.static:clear() - -- if love.window and love.graphics and love.window.isCreated() then -+ if love.window and love.graphics and love.window.isOpen() then - love.graphics.clear() - love.graphics.origin() - love.graphics.push() -diff --git a/mymath.lua b/mymath.lua -index 999ee74..84c6de0 100644 ---- a/mymath.lua -+++ b/mymath.lua -@@ -17,7 +17,7 @@ function math.gauss() - end - - function math.rgbtohsv(r, g, b, a) -- r, g, b, a = r / 255, g / 255, b / 255, a / 255 -+ r, g, b, a = r, g, b, a - local max, min = math.max(r, g, b), math.min(r, g, b) - local h, s, v - v = max -@@ -58,7 +58,7 @@ function math.hsvtorgb(h, s, v, a) - elseif i == 5 then r, g, b = v, p, q - end - -- return r * 255, g * 255, b * 255, a * 255 -+ return r, g, b, a - end - - function math.huemid(a, b) -@@ -91,9 +91,6 @@ function math.subset(t, n) - end - - function math.rgbtoyuv(r, g, b) -- r = r / 255 -- g = g / 255 -- b = b / 255 - - local y = 0.299 * r + 0.587 * g + 0.114 * b - local u = 0.492 * (b - y) -@@ -104,8 +101,8 @@ end - - function math.rgbdistance(r1, g1, b1, r2, g2, b2) - local rmean = (r1 + r2) / 2 -- local r = r1 - r2 -- local g = g1 - g2 -- local b = b1 - b2 -- return math.sqrt((2 + rmean/256) * r^2 + 4*g^2 + (2 + (255 - rmean)/256)*b^2) -+ local r = r1*255 - r2*255 -+ local g = g1*255 - g2*255 -+ local b = b1*255 - b2*255 -+ return math.sqrt((2 + rmean) * r^2 + 4*g^2 + (2 + (1 - rmean))*b^2) - end --- -2.14.4 - diff --git a/90-Second-Portraits.spec b/90-Second-Portraits.spec index 1a551d3..fc10cd0 100644 --- a/90-Second-Portraits.spec +++ b/90-Second-Portraits.spec @@ -1,31 +1,24 @@ Name: 90-Second-Portraits Version: 1.01b -Release: 27%{?dist} +Release: 3%{?dist} Summary: Frantic street painting game -# Zlib: Main package -# CC-BY-SA-4.0: assets by Tangram Games -# CC-BY-3.0: data/music/monkeys.ogg -# OFL-1.1: data/fonts/neuton.ttf -# MIT: middleclass/ -# X11: slam.lua and hump/ -License: Zlib AND CC-BY-SA-4.0 AND CC-BY-3.0 AND OFL-1.1 AND MIT AND X11 +#See LICENSE file in source for details +#All code is zlib excluding slam.lua, which is MIT +#All assets are CC-BY-SA 4.0, excluding music, which is CC-BY 3.0 +License: zlib and MIT and CC-BY-SA and CC-BY URL: http://tangramgames.dk/games/90secondportraits/ Source0: https://github.com/SimonLarsen/%{name}/releases/download/%{version}/90secondportraits-%{version}.love#/%{name}-%{version}.zip #Patch for appdata, manpage, execution script, and desktop file Patch0: %{name}-appdata.patch -%if 0%{?fedora} > 28 -#https://github.com/SimonLarsen/90-Second-Portraits/pull/6 -Patch2: %{name}-%{version}-love11.patch -%endif BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildArch: noarch Requires: love -# List the arches that love builds on -ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le riscv64 +# List the arches that love builds on epel7 +ExclusiveArch: noarch %{arm} %{ix86} x86_64 aarch64 #From the website (see URL above) %description @@ -38,9 +31,6 @@ Your work day ends after 5 customers! %prep %autosetup -c -p1 sed -i 's/VERSION/%{version}/g' appdata/%{name}.6 -#Remove non-free font and replace with existing font: -rm data/fonts/yb.ttf -sed -i "s/yb.ttf/neuton.ttf/" *.lua %build #love "binary" files are just zipped sources, but should exclude appdata/docs @@ -70,7 +60,7 @@ install -p -D -m 0644 data/images/title_background.png \ %files %doc README.md CREDITS.txt -%license LICENSE.txt middleclass/MIT-LICENSE.txt +%license LICENSE.txt %{_mandir}/man6/%{name}.* %{_bindir}/%{name} %{_datadir}/%{name}/ @@ -79,81 +69,6 @@ install -p -D -m 0644 data/images/title_background.png \ %{_datadir}/appdata/*.appdata.xml %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 1.01b-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Wed Jul 23 2025 Fedora Release Engineering - 1.01b-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jan 20 2025 Fedora Release Engineering - 1.01b-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Jan 16 2025 Fedora Release Engineering - 1.01b-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 17 2024 Fedora Release Engineering - 1.01b-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Feb 23 2024 Songsong Zhang - 1.01b-22 -- Add riscv64 support - -* Mon Jan 29 2024 Fedora Release Engineering - 1.01b-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 1.01b-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.01b-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jan 18 2024 Fedora Release Engineering - 1.01b-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Aug 23 2023 Jeremy Newton - 1.01b-17 -- Migrate to SPDX license -- Fix license breakdown -- Add MIT license file to license macro -- Remove non-free font - -* Wed Jul 19 2023 Fedora Release Engineering - 1.01b-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jan 18 2023 Fedora Release Engineering - 1.01b-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jul 20 2022 Fedora Release Engineering - 1.01b-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 1.01b-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 21 2021 Fedora Release Engineering - 1.01b-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jan 25 2021 Fedora Release Engineering - 1.01b-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 1.01b-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Mar 12 2020 Jeremy Newton - 1.01b-9 -- Rebuilt for correct exclusive arch - -* Tue Jan 28 2020 Fedora Release Engineering - 1.01b-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jul 24 2019 Fedora Release Engineering - 1.01b-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Jan 31 2019 Fedora Release Engineering - 1.01b-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jul 12 2018 Fedora Release Engineering - 1.01b-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 12 2018 Jeremy Newton - 1.01b-4 -- Add love 11 support - * Sat Mar 17 2018 Jeremy Newton - 1.01b-3 - Prepare backport to all fedora branches - Properly exclude appdata folder from binary