Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def Init_Storms():
# This is rather slow.
global storm_graphics
storm_graphics = particle.Make_Particle_Effect(particle.Storm_Particle)
global storm_sound
storm_sound = sound.Persisting_Sound("stormdmg", "stormbeeps")
self.blink = 0xff
self.screen_rect = Rect(0, 0, width, height)
img = resource.Load_Image("back.jpg").convert()
# (convert destroys a-channel)
# Although there is only one base image, it is flipped and
# rotated on startup to create one of eight possible backdrops.
img = pygame.transform.rotate(img, 90 * (bg_number & 3))
if bg_number & 4:
img = pygame.transform.flip(img, True, False)
self.background = pygame.transform.scale(img, (width, height))
self.steam_effect = particle.Make_Particle_Effect(
particle.Steam_Particle)
self.steam_effect_frame = 0