File: fixing-image-transparency-loss-due-to-transition-to-pygame2.patch

package info (click to toggle)
solarwolf 1.5%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,656 kB
  • sloc: python: 5,353; ansic: 159; makefile: 102; pascal: 50; sh: 27
file content (31 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Author: Judit Foglszinger <urbec@debian.org>
Description: Fixing image transparency loss due to transition to pygame2
 Adding convert_alpha() to load of powerup symbols
 and bullet time effect.
 This fixes missing transparency of powerup images/bullet time effect with pygame2.
Bug-Debian: https://bugs.debian.org/1008771
Forwarded: no
Last-Update: 2022-04-02

--- solarwolf-1.5+dfsg1.orig/code/objpowerup.py
+++ solarwolf-1.5+dfsg1/code/objpowerup.py
@@ -12,7 +12,7 @@ symbols = []
 def load_game_resources():
     global images, symbols
     images = gfx.animstrip(gfx.load('powerup.png'))
-    symbols = gfx.animstrip(gfx.load('powereffects.png'))
+    symbols = gfx.animstrip(gfx.load('powereffects.png').convert_alpha())
     snd.preload('select_choose')
 
 
--- solarwolf-1.5+dfsg1.orig/code/objship.py
+++ solarwolf-1.5+dfsg1/code/objship.py
@@ -32,7 +32,7 @@ def load_game_resources():
     shipimages.extend(zip(*anim))
 
     shieldbg = gfx.animstrip(gfx.load('bonus-shield.png'))
-    bulletbg = gfx.animstrip(gfx.load('bonus-bullet.png'))
+    bulletbg = gfx.animstrip(gfx.load('bonus-bullet.png').convert_alpha())
 
 
 class Ship: