2022-10-21 03:43:01 +02:00
|
|
|
|
|
|
|
label splashscreen:
|
|
|
|
$ persistent.splashtype = random.randint(0,2000 - 1)
|
|
|
|
$ renpy.movie_cutscene("images/intros/CaveManonProductions.webm")
|
|
|
|
|
|
|
|
python:
|
|
|
|
import pygame
|
|
|
|
|
|
|
|
CACHE_PATH = config.basedir.replace("\\","/") + "/game/cache/"
|
|
|
|
|
|
|
|
if renpy.android:
|
|
|
|
CACHE_PATH = os.environ['ANDROID_PUBLIC'] + "/cache/"
|
|
|
|
|
|
|
|
# (src_image: FactorScale; name: string, ext: string) FactorScale refers to an image scaled using im.FactorScale()
|
|
|
|
def save_thumb(src_image, name, ext):
|
|
|
|
final = CACHE_PATH+"thmb_"+name+'.'+ext
|
|
|
|
|
|
|
|
if (os.path.exists(final)):
|
|
|
|
pass
|
|
|
|
else:
|
2022-10-21 11:51:52 +02:00
|
|
|
data = src_image.load() #Returns a pygame surface
|
2022-10-21 03:43:01 +02:00
|
|
|
pygame.image.save(data, final) #Saves the image to file
|
|
|
|
#print('O', final)
|
|
|
|
|
|
|
|
#save_thumb(NOT_UNLOCKED_COVER,"default","jpg")
|
|
|
|
|
|
|
|
path_testing = []
|
|
|
|
for x in (gallery_dic.items()):
|
|
|
|
key = x[0]
|
|
|
|
value = x[1]
|
|
|
|
|
|
|
|
#slow, roundabout but it works
|
|
|
|
if key in path_testing:
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
for c in CG_PATHS:
|
2022-10-21 11:51:52 +02:00
|
|
|
#print(c, os.path.basename(c['path']))
|
2022-10-21 03:43:01 +02:00
|
|
|
if (c['name'] == key):
|
|
|
|
final_dir = os.path.join(CACHE_PATH, "thmb_"+os.path.normpath(c['path']))
|
|
|
|
if (os.path.exists(final_dir)):
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
os.makedirs(final_dir)
|
|
|
|
|
|
|
|
path_testing.append(key)
|
|
|
|
|
|
|
|
for y in value:
|
2022-10-21 11:51:52 +02:00
|
|
|
#print(y['cg'])
|
2022-10-21 03:43:01 +02:00
|
|
|
if type(y['cg']) is Movie:
|
|
|
|
pass
|
|
|
|
else:
|
2022-10-27 08:25:15 +02:00
|
|
|
save_thumb(y['cg'], y['fn'], y['ext'])
|
2022-10-21 03:43:01 +02:00
|
|
|
|
|
|
|
pass
|
|
|
|
|
2022-10-27 08:25:15 +02:00
|
|
|
if persistent.autoup == 10000:
|
2022-10-21 03:43:01 +02:00
|
|
|
python:
|
|
|
|
UpdateCheck()
|
|
|
|
if persistent.updateresult != "No new version is available":
|
|
|
|
updater.update(persistent.updateWebServer, force=True)
|
|
|
|
|
|
|
|
stop sound
|
|
|
|
|
2022-10-27 08:25:15 +02:00
|
|
|
if (persistent.languaged_up == 10000):
|
2022-10-21 11:51:52 +02:00
|
|
|
call screen translator_popup
|
|
|
|
|
|
|
|
|
2022-10-21 03:43:01 +02:00
|
|
|
return
|
2022-10-21 11:51:52 +02:00
|
|
|
|