def initial_fade_in(self): if self.alpha == 255: # -- display "Adonthell v0.3" self.bag_t.set_visible(1) self.wait_time = 35 self.draw_func = self.wait else: # -- fade in self.alpha = self.alpha + adonthell.gametime_frames_to_skip() + 1 if self.alpha > 255: self.alpha = 255 self.bag_c.set_alpha(self.alpha)
def initial_fade_in (self): if self.alpha == 255: # -- display "Adonthell v0.3" self.bag_t.set_visible (1) self.wait_time = 35 self.draw_func = self.wait else: # -- fade in self.alpha = self.alpha + adonthell.gametime_frames_to_skip() + 1 if self.alpha > 255: self.alpha = 255 self.bag_c.set_alpha (self.alpha)
def fade_to_open(self): if self.alpha == 255: # -- Those pics are no longer needed self.bag_t.set_visible(0) self.bag_c.set_visible(0) # -- Add the menu self.draw_func = None self.show_menu(0, 0) else: # -- fade in self.alpha = self.alpha + adonthell.gametime_frames_to_skip() if self.alpha > 255: self.alpha = 255 self.bag_o.set_alpha(self.alpha)
def fade_to_open (self): if self.alpha == 255: # -- Those pics are no longer needed self.bag_t.set_visible (0) self.bag_c.set_visible (0) # -- Add the menu self.draw_func = None self.show_menu (0, 0) else: # -- fade in self.alpha = self.alpha + adonthell.gametime_frames_to_skip() if self.alpha > 255: self.alpha = 255 self.bag_o.set_alpha (self.alpha)
def fade_to_forest(self): # -- drawing area self.da = adonthell.drawing_area() self.da.resize(adonthell.screen_length(), adonthell.screen_height()) self.da.move(0, 0) # -- load images self.wood1 = adonthell.image() self.wood1.load_raw("gfx/cutscene/forest3.img") self.wood2 = adonthell.image() self.wood2.load_raw("gfx/cutscene/forest2.img") self.wood2.set_mask(1) self.wood3 = adonthell.image() self.wood3.load_raw("gfx/cutscene/forest1.img") self.wood3.set_mask(1) self.alek_run = adonthell.animation() self.alek_run.load("gfx/cutscene/running_alek.anim") self.alek_run.play() self.black = adonthell.win_image() self.black.resize(320, 240) self.black.fillrect(0, 0, 320, 240, 0) self.black.thisown = 0 self.black.pack() # -- label self.label = adonthell.win_label() self.label.set_font(adonthell.win_manager_get_font("white")) self.label.resize(240, 90) self.label.move(40, 30) self.label.thisown = 0 self.label.pack() # -- window self.window = adonthell.win_container() self.window.move(0, 0) self.window.resize(320, 240) self.window.set_visible_border(0) self.window.set_trans_background(1) self.window.add(self.black) self.window.add(self.label) self.window.set_activate(1) self.window.set_visible_all(1) # -- audio adonthell.audio_fade_out_background(500) # -- misc stuff self.step = 0 # -- for the extro control self.a1 = 0 self.a2 = 0 self.a3 = 0 # -- for the forest animation control self.index = 0 # -- index in the typeover array self.delay = 0 # -- delay before adding new text self.cursor = 0 # -- cursor in the typeover text self.x = [0, 0, 0] # -- offsets of the 3 forest pics and Alek adonthell.gamedata_engine().set_update_map(0) self.letsexit = 0 adonthell.gametime_update() while self.letsexit != 1: for i in range(0, adonthell.gametime_frames_to_skip()): self.forest_animation() self.alek_run.update() self.window.update() adonthell.gametime_update() if self.letsexit != 1: self.window.draw() adonthell.screen_show() adonthell.gamedata_engine().main(self.window, 'fmv') # -- quit! adonthell.audio_fade_out_background(500) adonthell.gamedata_engine().main_quit()
def fade_to_forest (self): # -- drawing area self.da = adonthell.drawing_area () self.da.resize (adonthell.screen_length (), adonthell.screen_height ()) self.da.move (0, 0) # -- load images self.wood1 = adonthell.image () self.wood1.load_raw ("gfx/cutscene/forest3.img") self.wood2 = adonthell.image () self.wood2.load_raw ("gfx/cutscene/forest2.img") self.wood2.set_mask (1) self.wood3 = adonthell.image () self.wood3.load_raw ("gfx/cutscene/forest1.img") self.wood3.set_mask (1) self.alek_run = adonthell.animation () self.alek_run.load ("gfx/cutscene/running_alek.anim") self.alek_run.play () self.black = adonthell.win_image () self.black.resize (320, 240) self.black.fillrect (0, 0, 320, 240, 0) self.black.thisown = 0 self.black.pack () # -- label self.label = adonthell.win_label () self.label.set_font (adonthell.win_manager_get_font ("white")) self.label.resize (240, 90) self.label.move (40, 30) self.label.thisown = 0 self.label.pack () # -- window self.window = adonthell.win_container () self.window.move (0, 0) self.window.resize (320, 240) self.window.set_visible_border (0) self.window.set_trans_background (1) self.window.add (self.black) self.window.add (self.label) self.window.set_activate (1) self.window.set_visible_all (1) # -- audio adonthell.audio_fade_out_background (500) # -- misc stuff self.step = 0 # -- for the extro control self.a1 = 0 self.a2 = 0 self.a3 = 0 # -- for the forest animation control self.index = 0 # -- index in the typeover array self.delay = 0 # -- delay before adding new text self.cursor = 0 # -- cursor in the typeover text self.x = [0, 0, 0] # -- offsets of the 3 forest pics and Alek adonthell.gamedata_engine ().set_update_map (0) self.letsexit = 0 adonthell.gametime_update () while self.letsexit != 1: for i in range (0, adonthell.gametime_frames_to_skip ()): self.forest_animation () self.alek_run.update () self.window.update () adonthell.gametime_update () if self.letsexit != 1: self.window.draw () adonthell.screen_show () adonthell.gamedata_engine ().main (self.window, 'fmv') # -- quit! adonthell.audio_fade_out_background (500) adonthell.gamedata_engine ().main_quit ()