summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/misc.rpy9
-rw-r--r--game/script.rpy5
2 files changed, 14 insertions, 0 deletions
diff --git a/game/misc.rpy b/game/misc.rpy
index 68ac6f9..305f736 100644
--- a/game/misc.rpy
+++ b/game/misc.rpy
@@ -259,6 +259,15 @@ init python:
def readjust_status(lvl, val):
return val+int(val*(max(lvl-1, 0)/100.0))
+ def async_loader():
+ print("Now loading images to RAM...")
+ t = now()
+ for c in persistent.allfiles:
+ try:
+ show_img(c[0], False)
+ except:
+ print("Unable to load %s" % c)
+ print("Loaded %d images in %d seconds." % (len(persistent.allfiles), now() - t))
label add_server:
centered "This allows you to add a new custom server.\n\
diff --git a/game/script.rpy b/game/script.rpy
index 0b4fa11..619d532 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -32,6 +32,11 @@ label start:
$ stdout("Connection established!")
+ # FIXME: This be bad for old phones
+ # Load all downloaded images to RAM
+ # (For a smoother gameplay)
+ $ renpy.invoke_in_thread(async_loader)
+
# Open game
scene bg town with Dissolve(0.3)
pause 0.1