[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] remove_sdl1_2 26039dc 28/29: ADDED abilit
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] remove_sdl1_2 26039dc 28/29: ADDED abilitiy to skip forest sequence and credits |
Date: |
Mon, 25 Jul 2016 18:16:09 +0000 (UTC) |
tag: remove_sdl1_2
commit 26039dc7711dcf885d82724116b82780a5afb57e
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>
ADDED abilitiy to skip forest sequence and credits
---
scripts/schedules/mapcharacters/extro.py | 34 ++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/scripts/schedules/mapcharacters/extro.py
b/scripts/schedules/mapcharacters/extro.py
index 763b4d8..71080cf 100644
--- a/scripts/schedules/mapcharacters/extro.py
+++ b/scripts/schedules/mapcharacters/extro.py
@@ -212,6 +212,8 @@ class extro(object):
self.bjarn.load_raw ('gfx/cutscene/extro_bjarn.img')
self.bjarn.pack ()
self.bjarn.thisown = 0
+
+ self.skipping = False
# -- set new audio schedule and play extro music
adonthell.audio_load_background (0, "audio/at-demo-9.ogg")
@@ -558,6 +560,8 @@ class extro(object):
adonthell.gametime_update ()
while self.letsexit != 1:
+ adonthell.input_update ()
+
for i in range (0, adonthell.gametime_frames_to_skip ()):
self.forest_animation ()
if self.a3 == 1:
@@ -576,6 +580,24 @@ class extro(object):
adonthell.gamedata_engine ().main_quit ()
def forest_animation (self):
+ # -- allow skipping forest animation
+ if adonthell.input_has_been_pushed (adonthell.SDLK_ESCAPE) or \
+ adonthell.input_has_been_pushed (adonthell.SDLK_SPACE) and \
+ self.skipping == False:
+ self.skipping = True
+ adonthell.audio_fade_out_background (2000)
+ self.window.add (self.black)
+
+ # -- gently fade out forest if skipping
+ if self.skipping:
+ alpha = self.black.alpha () + 2
+ if alpha <= 255:
+ self.black.set_alpha (alpha)
+ return
+ else:
+ self.step = 3
+ self.skipping = False
+
# -- animate
if self.a1 >= 4:
self.x[0] = self.update_wood (self.wood1, self.x[0])
@@ -726,6 +748,18 @@ class extro(object):
self.anim = self.anim + 1
if self.anim % 3 != 0: return
+ # -- allow skipping credits
+ if (adonthell.input_has_been_pushed (adonthell.SDLK_ESCAPE) or \
+ adonthell.input_has_been_pushed (adonthell.SDLK_SPACE)) and \
+ self.skipping == False:
+ adonthell.audio_fade_out_background (2000)
+ self.skipping = True
+
+ # -- gently fade out music when skipping, then quit
+ if self.skipping and adonthell.audio_is_background_finished():
+ adonthell.gamedata_engine ().main_quit ()
+ return
+
if self.step == 0:
idx = 0
- [adonthell-wastesedge-commits] remove_sdl1_2 3c0a585 08/29: FIXED deprecated Copyright keyword (Thanks Mathieu!), (continued)
- [adonthell-wastesedge-commits] remove_sdl1_2 3c0a585 08/29: FIXED deprecated Copyright keyword (Thanks Mathieu!), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 3c8ad19 25/29: UPDATED README and assorted files, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 8aa7e16 01/29: UPDATED installer script for Waste's Edge v0.3.4 and NSIS 2.x, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 8f52c98 04/29: FIXED compile error (thanks Clément Plantier), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 b673eec 07/29: UPDATED for adonthell version 0.3.5, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 bca7c91 10/29: UPDATED configure.in to use sed instead of more (Thanks Mathieu!), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 c27acc3 09/29: ADDED wastesedge.desktop file (Thanks Mathieu!), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 98147de 27/29: FIXED extro cutscene not running smoothly and not quite in sync with music, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 7a67abf 18/29: FIXED running with Python 2.x, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 89bc14a 17/29: ADDED settings screen to toggle Fullscreen/Window mode, Music Volume and Language, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 26039dc 28/29: ADDED abilitiy to skip forest sequence and credits,
Kai Sterker <=
- [adonthell-wastesedge-commits] remove_sdl1_2 172fa18 13/29: FIXED typo in dialogue (thanks Joe!), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] remove_sdl1_2 8d0eadc 26/29: FIXED Erek potentially getting stuck in cellar hallway (hopefully!), Kai Sterker, 2016/07/25