Compare commits

...

10 Commits

Author SHA1 Message Date
8b6627f588 Improve ATL syntax
use the dedicated xycenter property
avoid setting the previous end-interpolation values before starting the new one, to avoid a jump if the player advances too quickly (also shortens the code)
add subpixel True, even though it doesn't seem very effective
prepare improvement in next renpy version
2023-11-15 20:44:48 +01:00
40ddb29185 Simplify generic CG code 2023-11-15 20:44:46 +01:00
aa95f701dc Better animation 2023-11-15 20:44:44 +01:00
641893217e Simplify some code 2023-11-15 20:44:42 +01:00
3a429070fc Reform genie layeredimage 2023-11-15 20:44:39 +01:00
15e3e240fc Repr instead of adding quotes 2023-11-15 20:44:36 +01:00
9c274bee6f Simplify hide/show expression 2023-11-15 20:44:35 +01:00
eeb68cb6c6 Fix test call
it raised an exception in my case, and I'm fairly sure this is how it's supposed to work
also adds a complimentary hidden reset at the end
2023-11-15 20:44:33 +01:00
5460ec2572 Remove now-unused reset_variables relying on implem details
It is used in a txt draft which I didn't change, it can be done if deemed necessary
I think this function should be kept off, as it is both more dangerous and slower than the workarounds
2023-11-15 20:44:30 +01:00
2e17dd2582 Avoid using reset_variables 2023-11-15 20:43:34 +01:00
25 changed files with 129 additions and 164 deletions

Binary file not shown.

View File

@ -1,4 +1,3 @@
init 5 python: init 5 python:
def her_cg_doll(st, at): def her_cg_doll(st, at):
return hermione.image, None return hermione.image, None
@ -25,35 +24,21 @@ image CG cho_doll = DynamicDisplayable(cho_cg_doll)
image CG ast_doll = DynamicDisplayable(ast_cg_doll) image CG ast_doll = DynamicDisplayable(ast_cg_doll)
image CG sus_doll = DynamicDisplayable(sus_cg_doll) image CG sus_doll = DynamicDisplayable(sus_cg_doll)
image CG luna = Fixed( transform CG_masker(child):
"images/CG/common/bg.webp", contains:
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG lun_doll", zoom=1.2)), "images/CG/common/mask.webp"), "images/CG/common/bg.webp"
contains:
AlphaMask(
Fixed(Transform(child, zoom=1.2, pos=(880, -180)), xfit=True, yfit=True),
"images/CG/common/mask.webp",
) )
image CG hermione = Fixed( image CG luna = At("CG lun_doll", CG_masker)
"images/CG/common/bg.webp", image CG hermione = At("CG her_doll", CG_masker)
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG her_doll", zoom=1.2)), "images/CG/common/mask.webp"), image CG tonks = At("CG ton_doll", CG_masker)
) image CG cho = At("CG cho_doll", CG_masker)
image CG astoria = At("CG ast_doll", CG_masker)
image CG tonks = Fixed( image CG susan = At("CG sus_doll", CG_masker)
"images/CG/common/bg.webp",
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG ton_doll", zoom=1.2)), "images/CG/common/mask.webp"),
)
image CG cho = Fixed(
"images/CG/common/bg.webp",
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG cho_doll", zoom=1.2)), "images/CG/common/mask.webp"),
)
image CG astoria = Fixed(
"images/CG/common/bg.webp",
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG ast_doll", zoom=1.2)), "images/CG/common/mask.webp"),
)
image CG susan = Fixed(
"images/CG/common/bg.webp",
AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG sus_doll", zoom=1.2)), "images/CG/common/mask.webp"),
)
# Snape CG # Snape CG
screen snape_groping(): screen snape_groping():

View File

@ -10,9 +10,9 @@ init python:
layeredimage genie_stats: layeredimage genie_stats:
anchor (0.0, 1.0) anchor (0.0, 1.0)
always "characters/genie/base.webp" always "genie_bbase"
always "characters/genie/outfits/robes.webp" always "genie_outfit_robes"
always "characters/genie/outfits/robes_beard.webp" always "genie_robes"
# TODO: Add outfit support; Low priority # TODO: Add outfit support; Low priority
@ -20,31 +20,28 @@ layeredimage genie:
anchor (0.0, 1.0) anchor (0.0, 1.0)
group outfit: group outfit:
attribute robes default null attribute nude
attribute nude "characters/genie/hair.webp"
always "characters/genie/base.webp" attribute bbase default
group face: group face:
attribute base default null attribute base default null
attribute grin "characters/genie/grin.webp" attribute grin
attribute angry "characters/genie/angry.webp" attribute angry
attribute smile "characters/genie/smile.webp" attribute smile
attribute open "characters/genie/open.webp" attribute open
group outfit: group outfit:
attribute robes default "characters/genie/outfits/robes.webp" attribute robes default
attribute nude null attribute santa
attribute santa "characters/genie/outfits/santa.webp"
group face multiple: attribute goatee default if_any ("robes", "nude")
attribute robes default "characters/genie/outfits/robes_beard.webp" if_all ["robes"] group _ multiple variant "santa_beard" if_any "santa":
attribute nude "characters/genie/beard.webp" if_all ["nude"] attribute base
attribute base "characters/genie/outfits/santa_beard_base.webp" if_all ["santa", "base"] attribute grin
attribute grin "characters/genie/outfits/santa_beard_grin.webp" if_all ["santa", "grin"] attribute angry
attribute angry "characters/genie/outfits/santa_beard_angry.webp" if_all ["santa", "angry"] attribute smile
attribute smile "characters/genie/outfits/santa_beard_smile.webp" if_all ["santa", "smile"] attribute open
attribute open "characters/genie/outfits/santa_beard_open.webp" if_all ["santa", "open"]
at Transform(function=genie_transform) at Transform(function=genie_transform)

View File

@ -536,6 +536,7 @@ label hg_sex_1:
show her_sex_personal lean_back as cg: show her_sex_personal lean_back as cg:
transform_anchor True transform_anchor True
subpixel True
anchor (0.0, 0.0) anchor (0.0, 0.0)
offset (0, 0) offset (0, 0)
zoom 1.0 zoom 1.0

View File

@ -71,24 +71,21 @@ label luna_intro_E1:
$ luna.set_face(mouth="soft", eyes="closed", eyebrows="low", pupils="mid") $ luna.set_face(mouth="soft", eyes="closed", eyebrows="low", pupils="mid")
show CG luna as cg zorder 17: show CG luna as cg zorder 17:
align (0.5, 0.5) xycenter (-520, -300)
pos (-520, -300)
with fade with fade
gen "Who is--" gen "Who is--"
show CG luna as cg zorder 17: show CG luna as cg zorder 17:
align (0.5, 0.5) subpixel True
pos (-520, -300)
easein_quad 5.0 pos (-520, 150) easein_quad 5.0 pos (-520, 150)
gen "... A girl?" gen "... A girl?"
lun "*Mmh*" lun "*Mmh*"
show CG luna as cg zorder 17: show CG luna as cg zorder 17:
subpixel True
zoom 1.0 zoom 1.0
align (0.5, 0.5) easein_quad 3.0 align (.0, .0) pos (0, 0) zoom 0.5 # pos (0, 0) not necessary in next renpy version
pos (-520, 150)
easein_quad 3.0 align (0.0, 0.0) pos (0, 0) zoom 0.5
gen "What are you doing in my office?" gen "What are you doing in my office?"
gen "Did Snape send you here? Surely--" gen "Did Snape send you here? Surely--"

View File

@ -42,10 +42,10 @@ init python:
def use(self): def use(self):
if not self.usable: if not self.usable:
raise Exception("Item '{}' is not usable as it does not have any function or a label.".format(self.name)) raise Exception("Item {!r} is not usable as it does not have any function or a label.".format(self.name))
if self.owned == 0: if self.owned == 0:
raise Exception("Item '{}' owned count is equal to zero.".format(self.name)) raise Exception("Item {!r} owned count is equal to zero.".format(self.name))
if not self.type == "quest": if not self.type == "quest":
# Quest items require manual triggers, it's more convenient. # Quest items require manual triggers, it's more convenient.
@ -62,10 +62,10 @@ init python:
def give(self, who): def give(self, who):
if not self.givable: if not self.givable:
raise Exception("Item '{}' is not marked as givable.".format(self.name)) raise Exception("Item {!r} is not marked as givable.".format(self.name))
if self.owned == 0: if self.owned == 0:
raise Exception("Item '{}' owned count is equal to zero.".format(self.name)) raise Exception("Item {!r} owned count is equal to zero.".format(self.name))
if not self.type == "quest": if not self.type == "quest":
# Quest items require manual triggers, it's more convenient. # Quest items require manual triggers, it's more convenient.
@ -119,7 +119,7 @@ init python:
def use(self): def use(self):
if self.owned == 0: if self.owned == 0:
raise Exception("Decoration '{}' owned count is equal to zero.".format(self.name)) raise Exception("Decoration {!r} owned count is equal to zero.".format(self.name))
achievements.unlock("decorator") achievements.unlock("decorator")
@ -155,7 +155,7 @@ init python:
self.usable = bool( renpy.has_label("{}_use".format(self.label)) ) self.usable = bool( renpy.has_label("{}_use".format(self.label)) )
if self.recipe is None: if self.recipe is None:
raise Exception("Potion '{}' recipe is empty!".format(self.name)) raise Exception("Potion {!r} recipe is empty!".format(self.name))
def has_ingredients(self): def has_ingredients(self):
return all(x.owned > 0 for x in self.recipe) return all(x.owned > 0 for x in self.recipe)
@ -163,7 +163,7 @@ init python:
def set_active(self, who): def set_active(self, who):
"""Marks the event as 'in progress' and will trigger a return event in the morning/evening.""" """Marks the event as 'in progress' and will trigger a return event in the morning/evening."""
if not who in list(self.in_progress.keys()): if not who in list(self.in_progress.keys()):
raise Exception("Potion '{}' is not marked as usable on '{}'.".format(self.name, who)) raise Exception("Potion {!r} is not marked as usable on {!r}.".format(self.name, who))
self.in_progress[who] = True self.in_progress[who] = True
@ -195,13 +195,13 @@ init python:
check_label = "{}_potion_check".format(who[:3]) check_label = "{}_potion_check".format(who[:3])
if not renpy.has_label(give_label): if not renpy.has_label(give_label):
raise Exception("Potion '{}' give label doesn't exist.".format(self.name)) raise Exception("Potion {!r} give label doesn't exist.".format(self.name))
if not renpy.has_label(check_label): if not renpy.has_label(check_label):
raise Exception("Potion '{}' check label doesn't exist for '{}'.".format(self.name, who)) raise Exception("Potion {!r} check label doesn't exist for {!r}.".format(self.name, who))
if self.owned == 0: if self.owned == 0:
raise Exception("Potion '{}' owned count is equal to zero.".format(self.name)) raise Exception("Potion {!r} owned count is equal to zero.".format(self.name))
if not self.check_progression(who): if not self.check_progression(who):
self.jump(check_label) self.jump(check_label)
@ -215,10 +215,10 @@ init python:
label = "{}_use".format(self.label) label = "{}_use".format(self.label)
if not renpy.has_label(label): if not renpy.has_label(label):
raise Exception("Potion '{}' has no use label.".format(self.name)) raise Exception("Potion {!r} has no use label.".format(self.name))
if self.owned == 0: if self.owned == 0:
raise Exception("Potion '{}' owned count is equal to zero.".format(self.name)) raise Exception("Potion {!r} owned count is equal to zero.".format(self.name))
self.owned -= 1 self.owned -= 1
self.jump(label) self.jump(label)
@ -227,12 +227,12 @@ init python:
"""Play the return event for <girl>""" """Play the return event for <girl>"""
if not self.in_progress[who]: if not self.in_progress[who]:
raise Exception("Potion '{}' is not marked as in progress.".format(self.name)) raise Exception("Potion {!r} is not marked as in progress.".format(self.name))
label = "{}_{}_return".format(who[:3], self.label) label = "{}_{}_return".format(who[:3], self.label)
if not renpy.has_label(label): if not renpy.has_label(label):
raise Exception("Potion '{}' has no return label.".format(self.name)) raise Exception("Potion {!r} has no return label.".format(self.name))
self.in_progress[who] = False self.in_progress[who] = False
self.jump(label) self.jump(label)

Some files were not shown because too many files have changed in this diff Show More