arm and animated sprites for all bosses
277
NS.py
|
@ -269,7 +269,7 @@ class NS(Game, Animation):
|
|||
try:
|
||||
transmission = self.serial_reader.readline().strip()
|
||||
print(transmission)
|
||||
except SerialException:
|
||||
except:
|
||||
print("Serial not ready... passing...")
|
||||
transmission = ""
|
||||
if len(transmission) == 4:
|
||||
|
@ -1722,9 +1722,9 @@ class Chemtrails(Sprite):
|
|||
if boss.level_index == 0:
|
||||
boss.health.decrease(4)
|
||||
elif boss.level_index == 1:
|
||||
boss.health.decrease(4)
|
||||
boss.health.decrease(3)
|
||||
elif boss.level_index == 2:
|
||||
boss.health.decrease(4)
|
||||
boss.health.decrease(2)
|
||||
self.queue_index += 1
|
||||
boss.last_attack = self.orientation
|
||||
boss.sword.block()
|
||||
|
@ -1875,25 +1875,83 @@ class Boss(Animation):
|
|||
self.kool_man.load_from_path("Kool_man_waah.png", True)
|
||||
self.spoopy = Sprite(self)
|
||||
self.spoopy.load_from_path("Spoopy.png", True)
|
||||
# Set up alien sprite with boil and hurt animations
|
||||
self.visitor = BossSprite(self, 42)
|
||||
self.visitor.add_frameset(name="normal", switch=True)
|
||||
self.visitor.load_from_path("alienAnimations/alienBoil", True)
|
||||
self.visitor.add_frameset(name="hurt", switch=True)
|
||||
self.visitor.load_from_path("alienAnimations/alienHit", True)
|
||||
self.visitor.add_frameset(name="entrance", switch=True)
|
||||
self.visitor.load_from_path("alienAnimations/alienIntro", True)
|
||||
for sprite in self.kool_man, self.visitor, self.spoopy:
|
||||
sprite.location.topleft = 207, 10
|
||||
# Set up sprites with boil and hurt animations
|
||||
self.boss_sprites = []
|
||||
self.boss_sprite_arms = []
|
||||
for path in (pathlib.Path(self.get_resource("koolManAnimations")), pathlib.Path(self.get_resource("alienAnimations")),
|
||||
pathlib.Path(self.get_resource("spoopyAnimations"))):
|
||||
self.boss_sprites.append(BossSprite(self, 42))
|
||||
self.boss_sprites[-1].add_frameset(name="normal", switch=True)
|
||||
self.boss_sprites[-1].load_from_path(path.joinpath("alienBoil"), True)
|
||||
self.boss_sprites[-1].add_frameset(name="hurt", switch=True)
|
||||
self.boss_sprites[-1].load_from_path(path.joinpath("alienHit"), True)
|
||||
self.boss_sprites[-1].add_frameset(name="entrance", switch=True)
|
||||
self.boss_sprites[-1].load_from_path(path.joinpath("alienIntro"), True)
|
||||
self.boss_sprites[-1].location.topleft = 207, 10
|
||||
# Set the arm to its own sprite
|
||||
self.boss_sprite_arms.append(Sprite(self, 42))
|
||||
# Map the strings used to indicate direction in the animations directory to the IDs defined in the script
|
||||
name_map = {
|
||||
"U": NS.N,
|
||||
"DR": NS.NE,
|
||||
"R": NS.E,
|
||||
"DL": NS.NW,
|
||||
"D": NS.S,
|
||||
"L": NS.W,
|
||||
}
|
||||
# Set static frames for arms, one for each of the 6 board orientations
|
||||
root = path.joinpath("alienArms/Moving")
|
||||
static_arm_frame_map = {
|
||||
"UtoDR/*05.png": NS.N,
|
||||
"UtoDR/*10.png": NS.NE,
|
||||
"RtoDL/*05.png": NS.E,
|
||||
"RtoDL/*10.png": NS.NW,
|
||||
"DtoL/*05.png": NS.S,
|
||||
"DtoL/*10.png": NS.W
|
||||
}
|
||||
orientation_frame_indices = {}
|
||||
for arm_frame_path, orientation in static_arm_frame_map.items():
|
||||
base = pygame.image.load(str(list(root.glob(arm_frame_path))[0]))
|
||||
colorkeyed = fill_colorkey(base)
|
||||
self.boss_sprite_arms[-1].add_frame(colorkeyed)
|
||||
frame_index = len(self.boss_sprite_arms[-1].frames) - 1
|
||||
self.boss_sprite_arms[-1].add_frameset([frame_index], name=str(orientation))
|
||||
orientation_frame_indices[orientation] = frame_index
|
||||
# Add sword smear animations to the alien's arm, one for each of the 30 possible combinations of 6 board orientations
|
||||
for directory in path.joinpath("alienArms/Moving").iterdir():
|
||||
if directory.is_dir():
|
||||
frame_paths = list(sorted(directory.iterdir()))
|
||||
# Extract board orientation IDs from the directory name
|
||||
orientation_1, orientation_2 = [name_map[orientation] for orientation in directory.name.split("to")]
|
||||
# Alien arm sprite frame indices for each orientation
|
||||
frame_index_orientation_1 = orientation_frame_indices[orientation_1]
|
||||
frame_index_orientation_2 = orientation_frame_indices[orientation_2]
|
||||
# Add orientation_1 -> orientation_2 animation
|
||||
frame_order = [frame_index_orientation_1]
|
||||
for frame_path in frame_paths[5:9]:
|
||||
self.boss_sprite_arms[-1].load_from_path(frame_path, True)
|
||||
frame_order.append(len(self.boss_sprite_arms[-1].frames) - 1)
|
||||
frame_order.append(frame_index_orientation_2)
|
||||
self.boss_sprite_arms[-1].add_frameset(frame_order, name=f"{orientation_1}_{orientation_2}")
|
||||
# Add orientation_2 -> orientation_1 animation
|
||||
frame_order = [frame_index_orientation_2]
|
||||
for frame_path in frame_paths[0:4]:
|
||||
self.boss_sprite_arms[-1].load_from_path(frame_path, True)
|
||||
frame_order.append(len(self.boss_sprite_arms[-1].frames) - 1)
|
||||
frame_order.append(frame_index_orientation_1)
|
||||
self.boss_sprite_arms[-1].add_frameset(frame_order, name=f"{orientation_2}_{orientation_1}")
|
||||
self.boss_sprite_arms[-1].location.center = self.boss_sprites[-1].location.center
|
||||
self.boss_sprite_arms[-1].hide()
|
||||
# Boss sprite aliases
|
||||
self.kool_man, self.alien, self.spoopy = self.boss_sprites
|
||||
self.kool_man_arms, self.alien_arms, self.spoopy_arms = self.boss_sprite_arms
|
||||
self.health = Health(self)
|
||||
self.sword = Sword(self)
|
||||
self.register(self.brandish, self.cancel_flash, self.show_introduction_dialogue, self.show_end_dialogue, self.end_dialogue,
|
||||
self.end_player_damage, self.end_hit_animation, self.warning, self.enter_boss)
|
||||
self.register(self.flash_player_damage, interval=100)
|
||||
self.kool_man.add_frameset([0], name="normal", switch=True)
|
||||
self.spoopy.add_frameset([0], name="normal", switch=True)
|
||||
self.kool_man_avatar = load(self.get_resource("Kool_man_avatar.png")).convert()
|
||||
self.visitor_avatar = load(self.get_resource("Visitor_avatar.png")).convert()
|
||||
self.alien_avatar = load(self.get_resource("Alien_avatar.png")).convert()
|
||||
self.spoopy_avatar = load(self.get_resource("Spoopy_avatar.png")).convert()
|
||||
self.advance_prompt = AdvancePrompt(self)
|
||||
self.backgrounds = [Sprite(self), Sprite(self), Sprite(self)]
|
||||
|
@ -1927,68 +1985,9 @@ class Boss(Animation):
|
|||
background.add_frame(frame)
|
||||
background.set_frameset("normal")
|
||||
self.countdown = Countdown(self)
|
||||
# Set the alien's arm to its own sprite
|
||||
self.alien_arm = Sprite(self, 42)
|
||||
# Map the strings used to indicate direction in the animations directory to the IDs defined in the script
|
||||
name_map = {
|
||||
"U": NS.N,
|
||||
"DR": NS.NE,
|
||||
"R": NS.E,
|
||||
"DL": NS.NW,
|
||||
"D": NS.S,
|
||||
"L": NS.W,
|
||||
}
|
||||
# Set static frames for alien arms, one for each of the 6 board orientations
|
||||
root = pathlib.Path(self.get_resource("alienAnimations/alienArms/Moving"))
|
||||
static_arm_frame_map = {
|
||||
"UtoDR/*05.png": NS.N,
|
||||
"UtoDR/*10.png": NS.NE,
|
||||
"RtoDL/*05.png": NS.E,
|
||||
"RtoDL/*10.png": NS.NW,
|
||||
"DtoL/*05.png": NS.S,
|
||||
"DtoL/*10.png": NS.W
|
||||
}
|
||||
orientation_frame_indices = {}
|
||||
for path, orientation in static_arm_frame_map.items():
|
||||
base = pygame.image.load(str(list(root.glob(path))[0]))
|
||||
colorkeyed = fill_colorkey(base)
|
||||
self.alien_arm.add_frame(colorkeyed)
|
||||
frame_index = len(self.alien_arm.frames) - 1
|
||||
self.alien_arm.add_frameset([frame_index], name=str(orientation))
|
||||
orientation_frame_indices[orientation] = frame_index
|
||||
# Add sword smear animations to the alien's arm, one for each of the 30 possible combinations of 6 board orientations
|
||||
for directory in pathlib.Path(self.get_resource("alienAnimations/alienArms/Moving")).iterdir():
|
||||
if directory.is_dir():
|
||||
frame_paths = list(sorted(directory.iterdir()))
|
||||
# Extract board orientation IDs from the directory name
|
||||
orientation_1, orientation_2 = [name_map[orientation] for orientation in directory.name.split("to")]
|
||||
# Alien arm sprite frame indices for each orientation
|
||||
frame_index_orientation_1 = orientation_frame_indices[orientation_1]
|
||||
frame_index_orientation_2 = orientation_frame_indices[orientation_2]
|
||||
# Add orientation_1 -> orientation_2 animation
|
||||
frame_order = [frame_index_orientation_1]
|
||||
for path in frame_paths[5:9]:
|
||||
self.alien_arm.load_from_path(path, True)
|
||||
frame_order.append(len(self.alien_arm.frames) - 1)
|
||||
frame_order.append(frame_index_orientation_2)
|
||||
self.alien_arm.add_frameset(frame_order, name=f"{orientation_1}_{orientation_2}")
|
||||
# Add orientation_2 -> orientation_1 animation
|
||||
frame_order = [frame_index_orientation_2]
|
||||
for path in frame_paths[0:4]:
|
||||
self.alien_arm.load_from_path(path, True)
|
||||
frame_order.append(len(self.alien_arm.frames) - 1)
|
||||
frame_order.append(frame_index_orientation_1)
|
||||
self.alien_arm.add_frameset(frame_order, name=f"{orientation_2}_{orientation_1}")
|
||||
self.alien_arm.location.center = self.visitor.location.center
|
||||
self.alien_arm.hide()
|
||||
|
||||
def cancel_flash(self):
|
||||
if self.level_index == 0:
|
||||
self.kool_man.set_frameset("normal")
|
||||
# elif self.level_index == 1:
|
||||
# self.visitor.set_frameset("normal")
|
||||
elif self.level_index == 2:
|
||||
self.spoopy.set_frameset("normal")
|
||||
pass
|
||||
|
||||
def start_level(self, index):
|
||||
self.level_index = index
|
||||
|
@ -2003,18 +2002,16 @@ class Boss(Animation):
|
|||
if index == 0:
|
||||
dialogue.set_avatar(self.kool_man_avatar)
|
||||
dialogue.set_name("Kool Man")
|
||||
self.kool_man.unhide()
|
||||
self.kool_man.set_frameset("normal")
|
||||
self.kool_man.hide()
|
||||
elif index == 1:
|
||||
dialogue.set_avatar(self.visitor_avatar)
|
||||
dialogue.set_name("Visitor")
|
||||
self.visitor.hide()
|
||||
self.play(self.enter_boss, play_once=True, delay=1500)
|
||||
dialogue.set_avatar(self.alien_avatar)
|
||||
dialogue.set_name("Alien")
|
||||
self.alien.hide()
|
||||
elif index == 2:
|
||||
dialogue.set_avatar(self.spoopy_avatar)
|
||||
dialogue.set_name("Spoopy")
|
||||
self.spoopy.unhide()
|
||||
self.spoopy.set_frameset("normal")
|
||||
self.spoopy.hide()
|
||||
self.play(self.enter_boss, play_once=True, delay=1500)
|
||||
self.get_audio().play_bgm(f"level_{index}")
|
||||
self.play(self.show_introduction_dialogue, delay=3000, play_once=True)
|
||||
self.get_game().platform.activate()
|
||||
|
@ -2238,8 +2235,8 @@ class Boss(Animation):
|
|||
self.get_game().chemtrails.challenge()
|
||||
self.backgrounds[self.level_index].set_frameset("charging")
|
||||
# Set each boss to its normal frameset
|
||||
for boss in (self.kool_man, self.visitor, self.spoopy):
|
||||
boss.set_frameset("normal")
|
||||
for sprite in self.boss_sprites:
|
||||
sprite.set_frameset("normal")
|
||||
|
||||
def choose_new_edge(self, edges):
|
||||
while True:
|
||||
|
@ -2258,18 +2255,15 @@ class Boss(Animation):
|
|||
self.queue = []
|
||||
self.brandish_complete = True
|
||||
if win:
|
||||
self.level_sprite().set_frameset("hurt")
|
||||
if self.get_configuration("system", "enable-level-select"):
|
||||
self.get_game().add_time_to_scores(self.time_elapsed, self.level_index)
|
||||
if self.level_index == 0:
|
||||
self.kool_man.set_frameset(0)
|
||||
elif self.level_index == 1:
|
||||
self.visitor.set_frameset("hurt")
|
||||
elif self.level_index == 2:
|
||||
self.spoopy.set_frameset(0)
|
||||
if not self.get_configuration("system", "enable-level-select"):
|
||||
self.get_game().add_time_to_scores(self.time_elapsed)
|
||||
self.backgrounds[self.level_index].set_frameset("shining")
|
||||
else:
|
||||
self.level_sprite().set_frameset("normal")
|
||||
self.play(self.flash_player_damage)
|
||||
self.player_defeated = not win
|
||||
self.kills += not win
|
||||
|
@ -2340,12 +2334,7 @@ class Boss(Animation):
|
|||
self.get_game().reset(True)
|
||||
|
||||
def damage(self):
|
||||
if self.level_index == 0:
|
||||
self.kool_man.set_frameset(0)
|
||||
# elif self.level_index == 1:
|
||||
# self.visitor.set_frameset("normal")
|
||||
elif self.level_index == 2:
|
||||
self.spoopy.set_frameset(0)
|
||||
pass
|
||||
|
||||
def start_player_damage(self):
|
||||
"""
|
||||
|
@ -2376,7 +2365,7 @@ class Boss(Animation):
|
|||
Return boss's animation to normal
|
||||
"""
|
||||
if not self.battle_finished:
|
||||
for boss in (self.kool_man, self.visitor, self.spoopy):
|
||||
for boss in (self.kool_man, self.alien, self.spoopy):
|
||||
boss.set_frameset("normal")
|
||||
|
||||
def warning(self):
|
||||
|
@ -2399,23 +2388,40 @@ class Boss(Animation):
|
|||
self.play(self.warning, play_once=True, delay=time_left / warning_threshold * 400)
|
||||
|
||||
def enter_boss(self):
|
||||
self.visitor.unhide()
|
||||
self.visitor.get_current_frameset().reset()
|
||||
self.visitor.set_frameset("entrance")
|
||||
self.level_sprite().unhide()
|
||||
self.level_sprite().get_current_frameset().reset()
|
||||
self.level_sprite().set_frameset("entrance")
|
||||
|
||||
def level_sprite(self, level_index):
|
||||
def level_sprite(self, level_index=None):
|
||||
"""
|
||||
Return the boss sprite associated with this the given level index.
|
||||
Return the boss sprite associated with this the given level index. If level index is not given, use the value in `self.level_index`.
|
||||
|
||||
@param level_index index of the level of the requested sprite
|
||||
"""
|
||||
if level_index is None:
|
||||
level_index = self.level_index
|
||||
if level_index == 0:
|
||||
return self.kool_man
|
||||
elif level_index == 1:
|
||||
return self.visitor
|
||||
return self.alien
|
||||
else:
|
||||
return self.spoopy
|
||||
|
||||
def level_sprite_arm(self, level_index=None):
|
||||
"""
|
||||
Return the boss arm sprite associated with the given index. If index is not given, use the value in `self.level_index`.
|
||||
|
||||
@param level_index index of the level of the requested sprite
|
||||
"""
|
||||
if level_index is None:
|
||||
level_index = self.level_index
|
||||
if level_index == 0:
|
||||
return self.kool_man_arms
|
||||
elif level_index == 1:
|
||||
return self.alien_arms
|
||||
else:
|
||||
return self.spoopy_arms
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
Update graphics
|
||||
|
@ -2442,25 +2448,22 @@ class Boss(Animation):
|
|||
self.time_elapsed += self.get_game().time_filter.get_last_frame_duration()
|
||||
Animation.update(self)
|
||||
# Update boss sprite
|
||||
if self.level_index == 0:
|
||||
self.kool_man.update()
|
||||
elif self.level_index == 1:
|
||||
self.visitor.update()
|
||||
if self.brandish_complete:
|
||||
if self.queue is not None:
|
||||
# Draw ghosts of the upcoming moves fading more as the move goes futher back in the queue
|
||||
self.alien_arm.unhide()
|
||||
remaining_positions = list(reversed(self.queue[self.get_game().chemtrails.queue_index:]))
|
||||
for ii, position in enumerate(remaining_positions):
|
||||
alpha = int((ii + 1) / len(remaining_positions) * 255)
|
||||
self.alien_arm.set_frameset(str(position))
|
||||
self.alien_arm.get_current_frame().set_alpha(alpha)
|
||||
self.alien_arm.update()
|
||||
self.alien_arm.get_current_frame().set_alpha(255)
|
||||
else:
|
||||
self.alien_arm.update()
|
||||
elif self.level_index == 2:
|
||||
self.spoopy.update()
|
||||
boss_sprite = self.level_sprite()
|
||||
boss_sprite_arm = self.level_sprite_arm()
|
||||
boss_sprite.update()
|
||||
if self.brandish_complete:
|
||||
if self.queue is not None:
|
||||
# Draw ghosts of the upcoming moves fading more as the move goes futher back in the queue
|
||||
boss_sprite_arm.unhide()
|
||||
remaining_positions = list(reversed(self.queue[self.get_game().chemtrails.queue_index:]))
|
||||
for ii, position in enumerate(remaining_positions):
|
||||
alpha = int((ii + 1) / len(remaining_positions) * 255)
|
||||
boss_sprite_arm.set_frameset(str(position))
|
||||
boss_sprite_arm.get_current_frame().set_alpha(alpha)
|
||||
boss_sprite_arm.update()
|
||||
boss_sprite_arm.get_current_frame().set_alpha(255)
|
||||
else:
|
||||
boss_sprite_arm.update()
|
||||
self.sword.update()
|
||||
self.health.update()
|
||||
self.countdown.update()
|
||||
|
@ -2571,7 +2574,7 @@ class Sword(Animation):
|
|||
surface.fill(colors[0], (0, 0, rect.w, rect.h / 2), BLEND_RGBA_MIN)
|
||||
surface.fill(colors[1], (0, rect.centery, rect.w, rect.h / 2), BLEND_RGBA_MIN)
|
||||
# Open a folder of sword frames for each boss
|
||||
for root in "Sword_kool_man/", "local/test/", "Sword_spoopy/":
|
||||
for root in "local/test/", "local/test/", "local/test/":
|
||||
# Create a list of lists of sword frames, each list of sword frames corresponds to an orientation on the platform
|
||||
self.swords.append([[], [], [], [], [], []])
|
||||
self.spinning_swords.append([[], [], [], [], [], []])
|
||||
|
@ -2674,18 +2677,16 @@ class Sword(Animation):
|
|||
if len(self.parent.unbrandished) > 0:
|
||||
self.play(self.brandish, delay=self.get_configuration("time", "sword-delay"), play_once=True)
|
||||
# Trigger boss's sword swab animation on a delay
|
||||
if level_index == 1:
|
||||
self.parent.alien_arm.unhide()
|
||||
self.parent.alien_arm.set_frameset(str(position))
|
||||
if len(self.parent.unbrandished) > 0:
|
||||
self.play(self.swab, delay=self.get_configuration("time", "sword-delay") - 42 * 4, play_once=True, position=position)
|
||||
self.parent.level_sprite_arm().unhide()
|
||||
self.parent.level_sprite_arm().set_frameset(str(position))
|
||||
if len(self.parent.unbrandished) > 0:
|
||||
self.play(self.swab, delay=self.get_configuration("time", "sword-delay") - 42 * 4, play_once=True, position=position)
|
||||
|
||||
def swab(self, position):
|
||||
"""
|
||||
Activate boss's sword swab animation
|
||||
"""
|
||||
if self.parent.level_index == 1:
|
||||
self.parent.alien_arm.set_frameset(f"{position}_{self.parent.unbrandished[0]}")
|
||||
self.parent.level_sprite_arm().set_frameset(f"{position}_{self.parent.unbrandished[0]}")
|
||||
|
||||
def lower(self):
|
||||
"""
|
||||
|
@ -2694,8 +2695,7 @@ class Sword(Animation):
|
|||
if len(self.parent.unbrandished) == 0:
|
||||
self.parent.brandish_complete = True
|
||||
self.parent.backgrounds[self.parent.level_index].set_frameset("normal")
|
||||
if self.parent.level_index == 1:
|
||||
self.parent.alien_arm.hide()
|
||||
self.parent.level_sprite_arm().hide()
|
||||
|
||||
def block(self):
|
||||
"""
|
||||
|
@ -2729,7 +2729,7 @@ class Sword(Animation):
|
|||
end = self.get_game().platform.view.location.center
|
||||
else:
|
||||
scale = 0.95
|
||||
end = self.get_game().boss.visitor.location.center
|
||||
end = self.get_game().boss.alien.location.center
|
||||
for frame_index in sprite.get_current_frameset().order:
|
||||
width, height = sprite.frames[frame_index].get_size()
|
||||
if width < 800 and height < 800:
|
||||
|
@ -2745,11 +2745,10 @@ class Sword(Animation):
|
|||
sprite.set_frameset("explode")
|
||||
sprite.location.center = center_save
|
||||
self.get_audio().play_sfx("explode", x=sprite.location.centerx)
|
||||
if self.parent.level_index == 1:
|
||||
if self.parent.is_playing(self.parent.end_hit_animation, include_delay=True):
|
||||
self.parent.halt(self.parent.end_hit_animation)
|
||||
self.parent.visitor.set_frameset("hurt")
|
||||
self.parent.play(self.parent.end_hit_animation, play_once=True, delay=500)
|
||||
if self.parent.is_playing(self.parent.end_hit_animation, include_delay=True):
|
||||
self.parent.halt(self.parent.end_hit_animation)
|
||||
self.parent.level_sprite().set_frameset("hurt")
|
||||
self.parent.play(self.parent.end_hit_animation, play_once=True, delay=500)
|
||||
else:
|
||||
center_save = sprite.location.center
|
||||
sprite.get_current_frameset().measure_rect()
|
||||
|
|
2
config
|
@ -30,7 +30,7 @@ effects = yes
|
|||
|
||||
[system]
|
||||
# will force set display->effects to off
|
||||
minimize-load-time = yes
|
||||
minimize-load-time = no
|
||||
enable-level-select = yes
|
||||
lives-boss-rush-mode = 3
|
||||
lives-level-select-mode = 1
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import argparse, pygame, pathlib, os
|
||||
from lib.pgfw.pgfw import extension
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("input_path", type=pathlib.Path)
|
||||
parser.add_argument("output_path", type=pathlib.Path)
|
||||
parser.add_argument("shift", type=int)
|
||||
arguments = parser.parse_args()
|
||||
pygame.display.set_mode((200, 100))
|
||||
pygame.init()
|
||||
for root, dirs, files in os.walk(arguments.input_path):
|
||||
for name in files:
|
||||
if name.endswith(".png"):
|
||||
input_file_path = os.path.join(root, name)
|
||||
shifted = extension.get_hue_shifted_surface(pygame.image.load(input_file_path).convert_alpha(), arguments.shift)
|
||||
output_file_path = pathlib.Path(input_file_path.replace(str(arguments.input_path), str(arguments.output_path)))
|
||||
os.makedirs(output_file_path.parent, exist_ok=True)
|
||||
pygame.image.save(shifted, str(output_file_path))
|
||||
print(f"saved hue shifted {input_file_path} to {output_file_path}")
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.2 KiB |