Compare commits

..

13 Commits
gouv-5 ... main

Author SHA1 Message Date
8b127a25b4 Merge branch 'refs/heads/dev' 2024-04-08 15:53:40 +01:00
e295fbb791 PixelateMask Shader 2024-04-08 15:48:23 +01:00
5c4ce667a5 Replace unneccesary eval 2024-04-03 12:38:48 +01:00
0dc071261b Unlock Luna's favours in developer skip 2024-04-02 16:31:14 +01:00
61da56b6c8 Partially revert #7ca17b7 (Breaks dev debug) 2024-04-02 16:21:13 +01:00
9aff807593 Bug fixes
* Fixed inconsistent spacing
* Fixed inconsistent state var access
2024-04-02 16:18:18 +01:00
908beae5d3 Maintain access convention within save compat 2024-04-02 14:19:59 +01:00
d8751d73b9 Remove nonsense calls of getattr
(cherry picked from commit 7ca17b7ba7)
2024-04-02 13:53:55 +01:00
224194754f Avoid using unnecessary screens 2024-04-02 13:44:04 +01:00
e3c5fb609d Avoid python statement
(cherry picked from commit 22348f0901)
2024-04-02 13:41:44 +01:00
e04fd221dd Flag unreachable code
(cherry picked from commit 25820e002a)
2024-04-02 13:37:20 +01:00
ef97c273db Linting dynamic
(cherry picked from commit 60244e258a)
2024-04-02 13:36:59 +01:00
01126edc4e Update README 2023-08-02 22:00:18 +01:00
26 changed files with 149 additions and 82 deletions

View File

@ -18,7 +18,7 @@ init python:
renpy.show_screen(controller, focused) renpy.show_screen(controller, focused)
screen cho_dual_cg(focused, _layer="screens", bubble_="cho_handjob_bubble", mask="cho_handjob_bubble_mask"): screen cho_dual_cg(focused, _layer="screens", bubble="cho_handjob_bubble", mask="cho_handjob_bubble_mask"):
tag switcher tag switcher
zorder 300 zorder 300
@ -27,7 +27,7 @@ screen cho_dual_cg(focused, _layer="screens", bubble_="cho_handjob_bubble", mask
if d: if d:
$ btn = AlphaMask(Fixed(Transform(d, align=( (1.0, 0.05) if flip else (0.0, 0.05) ), zoom=0.5, xzoom=flip)), Transform(mask, zoom=0.25)) $ btn = AlphaMask(Fixed(Transform(d, align=( (1.0, 0.05) if flip else (0.0, 0.05) ), zoom=0.5, xzoom=flip)), Transform(mask, zoom=0.25))
$ btn = Fixed(Transform(bubble_, zoom=0.25), btn) $ btn = Fixed(Transform(bubble, zoom=0.25), btn)
imagebutton: imagebutton:
idle Transform(btn, alpha=0.75) idle Transform(btn, alpha=0.75)

View File

@ -50,10 +50,10 @@ label ast_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return return
# Screens # Screens
screen ast_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet. screen ast_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
tag ast_cloth_pile tag ast_cloth_pile
zorder astoria_chibi.zorder zorder astoria_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5 add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
# Chibi definition # Chibi definition
default astoria_chibi = Chibi("astoria", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_astoria_chibi) default astoria_chibi = Chibi("astoria", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_astoria_chibi)

View File

@ -50,10 +50,10 @@ label cho_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return return
# Screens # Screens
screen cho_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet. screen cho_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
tag cho_cloth_pile tag cho_cloth_pile
zorder cho_chibi.zorder zorder cho_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5 add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
# Chibi definition # Chibi definition
default cho_chibi = Chibi("cho", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_cho_chibi) default cho_chibi = Chibi("cho", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_cho_chibi)

View File

@ -910,7 +910,7 @@ label cc_pf_strip_T2_intro_E3:
hide screen bld1 hide screen bld1
hide screen blkfade hide screen blkfade
with d3 with d3
call teleport(position_="cho", effect=False) call teleport(position="cho", effect=False)
pause .5 pause .5
call bld call bld
@ -1239,3 +1239,4 @@ label cc_pf_strip_T2_E3_fail_repeat:
call cho_walk(action="leave") call cho_walk(action="leave")
jump end_cho_event jump end_cho_event

View File

@ -101,7 +101,7 @@ label hufflepuff_match:
with d3 with d3
call gen_chibi("stand", "door", "base") call gen_chibi("stand", "door", "base")
call teleport(position_="genie", effect=False) call teleport(position="genie", effect=False)
pause .5 pause .5
call gen_chibi("stand", "door", "base", flip=False) call gen_chibi("stand", "door", "base", flip=False)

View File

@ -1680,7 +1680,7 @@ label cho_quid_E14:
play sound "sounds/kick.ogg" play sound "sounds/kick.ogg"
call gen_chibi("stand", 430, "base") call gen_chibi("stand", 430, "base")
call teleport(position_="genie", effect=False) call teleport(position="genie", effect=False)
cho @ cheeks blush "Whoa! I didn't know you could apparate at Hogwarts!" ("angry", "narrow", "base", "mid") cho @ cheeks blush "Whoa! I didn't know you could apparate at Hogwarts!" ("angry", "narrow", "base", "mid")
gen "Appa--{w=0.4} What?" ("base", xpos="far_left", ypos="base") gen "Appa--{w=0.4} What?" ("base", xpos="far_left", ypos="base")

View File

@ -31,9 +31,9 @@ style meter_text:
align (0.0, 0.5) align (0.0, 0.5)
xoffset 5 xoffset 5
screen swear_bubble(kind): screen swear_bubble(type):
tag bubble tag bubble
zorder 30 zorder 30
add "interface/meter/bubble/[kind].webp" ypos 100 xpos 100 add "interface/meter/bubble/"+str(type)+".webp" ypos 100 xpos 100
timer 1.0 action Hide("swear_bubble") timer 1.0 action Hide("swear_bubble")

View File

@ -146,7 +146,7 @@ label slytherin_match:
with d3 with d3
call gen_chibi("stand", "door", "base") call gen_chibi("stand", "door", "base")
call teleport(position_="genie", effect=False) call teleport(position="genie", effect=False)
pause .2 pause .2
call ton_chibi("stand", "desk", "base", flip=True) call ton_chibi("stand", "desk", "base", flip=True)

View File

@ -1,3 +1,5 @@
### Hermione Blowjob ### ### Hermione Blowjob ###
label start_hg_pf_blowjob: label start_hg_pf_blowjob:
@ -821,10 +823,10 @@ label hg_pf_hidden_blowjob:
jump hg_hidden_blowjob_luna jump hg_hidden_blowjob_luna
random: random:
block: block if states.her.ev.suck_it.snape_encounter:
jump hg_hidden_blowjob_snape jump hg_hidden_blowjob_snape
block: block if states.her.ev.suck_it.tonks_encounter:
jump hg_hidden_blowjob_tonks jump hg_hidden_blowjob_tonks
block if states.her.ev.suck_it.luna_encounter: block if states.her.ev.suck_it.luna_encounter:

View File

@ -50,10 +50,10 @@ label ton_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return return
# Screens # Screens
screen ton_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet. screen ton_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
tag ton_cloth_pile tag ton_cloth_pile
zorder tonks_chibi.zorder zorder tonks_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5 add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
label ton_sit(xpos=nxpos, ypos=nypos, flip=None, chair=True): # TODO: replace this with the regular chibi call and add a sitting pose/action -- call ton_chibi("sit", chair=False) label ton_sit(xpos=nxpos, ypos=nypos, flip=None, chair=True): # TODO: replace this with the regular chibi call and add a sitting pose/action -- call ton_chibi("sit", chair=False)

View File

@ -5,8 +5,8 @@ transform combine_transforms(one, two):
one one
two two
transform chibi_base(pos, flip, scale): transform chibi_base(position, flip, scale):
pos pos pos position
anchor (0.0, 1.0) anchor (0.0, 1.0)
xzoom (-1 if flip else 1) xzoom (-1 if flip else 1)
zoom (0.5 * scale) zoom (0.5 * scale)

View File

@ -211,11 +211,9 @@ init 5 python:
self.set_pose(pose or self.walk) self.set_pose(pose or self.walk)
# Note: Warper names and their count can change over time,
# so it's easier to just evaluate the input.
# List of available warpers: # List of available warpers:
# https://www.renpy.org/doc/html/atl.html?#warpers # https://www.renpy.org/doc/html/atl.html?#warpers
warper = eval(f"_warper.{warper}") warper = getattr(_warper, warper, _warper.linear)
distances = [] distances = []
times = [] times = []

View File

@ -103,33 +103,34 @@ label increase_house_points(house, points):
return return
#TODO Check and fix teleport/heal effect position (chibis are now anchored bottom-left) #TODO Check and fix teleport/heal effect position (chibis are now anchored bottom-left)
label teleport(position_=None, effect=True, poof_label=None): label teleport(position=None,effect=True,poof_label=None):
if position_ == "genie": python:
dynamic: if position == "genie":
teleport_pos = (genie_chibi.pos[0]+75, genie_chibi.pos[1]) teleport_xpos = genie_chibi.pos[0]+75
teleport_ypos = genie_chibi.pos[1]
teleport_zorder = 3 teleport_zorder = 3
elif position_ == "hermione": elif position == "hermione":
dynamic: teleport_xpos = hermione_chibi.pos[0]+45
teleport_pos = (hermione_chibi.pos[0]+45, hermione_chibi.pos[1]) teleport_ypos = hermione_chibi.pos[1]
teleport_zorder = 3 teleport_zorder = 3
elif position_ == "cho": elif position == "cho":
dynamic: teleport_xpos = cho_chibi.pos[0]+45
teleport_pos = (cho_chibi.pos[0]+45, cho_chibi.pos[1]) teleport_ypos = cho_chibi.pos[1]
teleport_zorder = 3 teleport_zorder = 3
elif position_ == "astoria": elif position == "astoria":
dynamic: teleport_xpos = astoria_chibi.pos[0]+45
teleport_pos = (astoria_chibi.pos[0]+45, astoria_chibi.pos[1]) teleport_ypos = astoria_chibi.pos[1]
teleport_zorder = 3 teleport_zorder = 3
elif position_ == "desk": elif position == "desk":
dynamic: teleport_xpos = 320
teleport_pos = (320, 450) teleport_ypos = 450
teleport_zorder = 5 teleport_zorder = 5
else: else:
dynamic: teleport_xpos = position[0]
teleport_pos = position_ teleport_ypos = position[1]
teleport_zorder = 2 teleport_zorder = 2
if effect: if effect == True:
play sound "sounds/magic4.ogg" play sound "sounds/magic4.ogg"
show screen whitefade show screen whitefade
with d1 with d1
@ -161,7 +162,7 @@ label teleport(position_=None, effect=True, poof_label=None):
hide teleport_animation onlayer screens hide teleport_animation onlayer screens
with d5 with d5
if effect: if effect == True:
pause 1 pause 1
return return

View File

@ -156,8 +156,8 @@ init -1 python:
if config.developer: if config.developer:
def __setattr__(self, attr, value): def __setattr__(self, attr, value):
if getattr(self, attr, value) != value: if hasattr(self, attr) and getattr(self, attr) != value:
id = self.id id = getattr(self, "id")
rollback = f"{stdcol.UNDERLINE}(Rollback){stdcol.END} " if renpy.in_rollback() else "" rollback = f"{stdcol.UNDERLINE}(Rollback){stdcol.END} " if renpy.in_rollback() else ""
caller_id = renpy.get_filename_line() caller_id = renpy.get_filename_line()

View File

@ -426,7 +426,7 @@ label not_so_great_escape:
play sound "sounds/magic4.ogg" play sound "sounds/magic4.ogg"
call gen_chibi("stand", 370, 295) call gen_chibi("stand", 370, 295)
call teleport(position_="genie", effect=False) call teleport(position="genie", effect=False)
stop music fadeout 3 stop music fadeout 3
gen "You'll never catch me alive!" ("angry", xpos="far_left", ypos="head") gen "You'll never catch me alive!" ("angry", xpos="far_left", ypos="head")

View File

@ -75,12 +75,20 @@ label start_dev:
states.cho.ev.intro.e1_complete = True states.cho.ev.intro.e1_complete = True
states.cho.ev.intro.e2_complete = True states.cho.ev.intro.e2_complete = True
states.cho.ev.intro.e4_complete = True states.cho.ev.intro.e4_complete = True
states.sna.ev.hangouts.cho_e1 = True states.sna.ev.hangouts.cho_e1 = True
states.paperwork_unlocked = True states.paperwork_unlocked = True
store.states.lun.ev.intro.e1_complete = True states.lun.ev.intro.e1_complete = True
store.states.lun.ev.intro.e2_complete = True states.lun.ev.intro.e2_complete = True
states.lun.ev.quibbler.stocked = True
thequibbler_ITEM.used = True
states.lun.ev.spectrespecs.e1_complete = True
states.lun.ev.spectrespecs.e2_complete = True
states.lun.ev.spectrespecs.e3_complete = True
states.lun.ev.spectrespecs.e4_complete = True
states.lun.favors_unlocked = True
for i in mirror.items: for i in mirror.items:
i.unlocked = True i.unlocked = True

View File

@ -34,6 +34,63 @@ init python:
gl_FragColor = vec4(mix(gl_FragColor.xyz, gl_FragColor.xyz * ctemp2rgb(ctemp), u_strength), 1.0); gl_FragColor = vec4(mix(gl_FragColor.xyz, gl_FragColor.xyz * ctemp2rgb(ctemp), u_strength), 1.0);
""") """)
renpy.register_shader("pixelatemaskshader", variables="""
uniform sampler2D tex0;
uniform sampler2D tex1;
uniform vec2 res0;
uniform float u_step;
uniform float u_lod_bias;
attribute vec2 a_tex_coord;
varying vec2 v_tex_coord;
""", vertex_600="""
v_tex_coord = a_tex_coord;
""", fragment_functions="""
vec2 CalculateNewUV(vec2 uv, vec2 size, float step) {
float dx = (step / size.x);
float dy = (step / size.y);
return vec2(dx*(floor(uv.x/dx) + 0.5), dy*(floor(uv.y/dy) + 0.5));
}
vec4 PixelateMask(sampler2D source, float alpha, vec2 size, vec2 uv, float step, float lod) {
if (alpha > 0.0) {
vec2 new_uv = CalculateNewUV(uv, size, step);
vec4 old = vec4(texture2D(source, uv, lod).rgb, 1.0);
vec4 new = vec4(texture2D(source, new_uv, lod).rgb, 1.0);
return mix(old, new, alpha);
}
return texture2D(source, uv, lod);
}
""", fragment_600="""
float alpha = texture2D(tex1, v_tex_coord).a;
gl_FragColor = PixelateMask(tex0, alpha, res0, v_tex_coord, u_step, u_lod_bias);
""")
class PixelateMask(renpy.Displayable, NoRollback):
def __init__(self, child, mask, step=1.0, **kwargs):
super().__init__(**kwargs)
self.child = renpy.displayable(child)
self.mask = renpy.displayable(mask)
self.step = step
def render(self, width, height, st, at):
child = renpy.display.render.render(self.child, width, height, st, at)
mask = renpy.display.render.render(self.mask, width, height, st, at)
rv = renpy.display.render.Render(width, height)
if renpy.display.render.models:
rv.mesh = True
rv.add_shader("pixelatemaskshader")
rv.add_uniform("u_step", self.step)
rv.blit(child, (0, 0))
rv.blit(mask, (0, 0))
renpy.redraw(self, 0)
return rv
transform color_temperature(factor=1.0, strength=1.0): transform color_temperature(factor=1.0, strength=1.0):
mesh True mesh True
shader "color_temperature_shader" shader "color_temperature_shader"

View File

@ -215,10 +215,10 @@ init python:
store.ton_accessory_office.zorder = 235 store.ton_accessory_office.zorder = 235
if current < 1.462: if current < 1.462:
lun_ev_blowjob_t4_e1.enqueue() store.lun_ev_blowjob_t4_e1.enqueue()
lun_ev_blowjob_t4_e2.enqueue() store.lun_ev_blowjob_t4_e2.enqueue()
lun_ev_blowjob_t4_e3.enqueue() store.lun_ev_blowjob_t4_e3.enqueue()
lun_ev_blowjob_t4_e4.enqueue() store.lun_ev_blowjob_t4_e4.enqueue()
if current > latest: if current > latest:
raise Exception(f"Loaded save file is incompatible. (Save Version: {current}, Game Version: {latest})") raise Exception(f"Loaded save file is incompatible. (Save Version: {current}, Game Version: {latest})")