def make_credits (self): # -- audio adonthell.audio_load_background (0, "audio/at-demo-8.ogg") adonthell.audio_play_background (0) # -- window self.window = adonthell.win_container () self.window.move (0, 30) self.window.resize (320, 180) self.window.set_visible_border (0) self.window.set_trans_background (1) self.window.set_activate (1) self.window.set_visible (1) # -- list of visible credit lines self.labels = [] self.step = 0 self.index = 0 self.anim = 0 # -- first label self.make_credit_label (190) self.window.py_signal_connect (self.on_draw, adonthell.win_event_UPDATE) return self.window
def make_credits(self): # -- audio adonthell.audio_load_background(0, "audio/at-demo-8.ogg") adonthell.audio_play_background(0) # -- window self.window = adonthell.win_container() self.window.move(0, 30) self.window.resize(320, 180) self.window.set_visible_border(0) self.window.set_trans_background(1) self.window.set_activate(1) self.window.set_visible(1) # -- list of visible credit lines self.labels = [] self.step = 0 self.index = 0 self.anim = 0 # -- first label self.make_credit_label(190) self.window.py_signal_connect(self.on_draw, adonthell.win_event_UPDATE) return self.window
def zoom_to_chest(self): self.window = adonthell.win_container() self.window.move(0, 0) self.window.resize(320, 240) self.window.set_visible_border(0) self.window.add(self.wall) self.window.add(self.chest) self.window.set_activate(1) self.window.set_visible_all(1) self.window.py_signal_connect(self.on_draw, adonthell.win_event_UPDATE) self.draw_func = self.move_chest self.step = 0 self.done = 1 if self.bubble != None: adonthell.win_manager_get_active().remove(self.bubble) self.bubble = None adonthell.gamedata_engine().main(self.window, 'fmv')
def zoom_to_chest (self): self.window = adonthell.win_container () self.window.move (0, 0) self.window.resize (320, 240) self.window.set_visible_border (0) self.window.add (self.wall) self.window.add (self.chest) self.window.set_activate (1) self.window.set_visible_all (1) self.window.py_signal_connect (self.on_draw, adonthell.win_event_UPDATE) self.draw_func = self.move_chest self.step = 0 self.done = 1 if self.bubble != None: adonthell.win_manager_get_active ().remove (self.bubble) self.bubble = None adonthell.gamedata_engine ().main (self.window, 'fmv')
def enable_veranda_hack (self): self.wnd = adonthell.win_container () self.wnd.set_visible (0) self.wnd.thisown = 0 self.wnd.py_signal_connect (self.on_draw, adonthell.win_event_DRAW, self.myself) adonthell.win_manager_get_active ().add (self.wnd)
def __init__(self): # -- load our music adonthell.audio_load_background(0, "audio/at-demo-1.ogg") # -- The themes and fonts we'll use adonthell.win_manager_add_theme("original") adonthell.win_manager_add_theme("silverleaf") adonthell.win_manager_add_font("yellow") adonthell.win_manager_add_font("red") adonthell.win_manager_add_font("violet") adonthell.win_manager_add_font("blue") adonthell.win_manager_add_font("green") adonthell.win_manager_add_font("white") adonthell.win_manager_add_font("original") adonthell.win_manager_add_font("silverleaf") # -- load our images self.bag_o = adonthell.win_image() self.bag_o.load_raw("gfx/cutscene/jewelbag_open.img") self.bag_o.set_alpha(0) self.bag_o.move(0, 0) self.bag_o.pack() self.bag_o.set_visible(0) self.bag_c = adonthell.win_image() self.bag_c.load_raw("gfx/cutscene/jewelbag_closed.img") self.bag_c.set_visible(1) self.bag_c.set_alpha(0) self.bag_c.move(0, 0) self.bag_c.pack() self.bag_t = adonthell.win_image() self.bag_t.load_raw("gfx/cutscene/adonthell_03.img") self.bag_t.move(33, 86) self.bag_t.pack() self.bag_t.set_visible(0) # -- create the window self.window = adonthell.win_container() self.window.move(0, 0) self.window.resize(320, 240) self.window.set_visible_border(0) # -- the order here is essential self.window.add(self.bag_c) self.window.add(self.bag_t) self.window.add(self.bag_o) self.window.set_activate(1) self.window.set_visible(1) self.window.py_signal_connect(self.on_update, adonthell.win_event_UPDATE) self.window.py_signal_connect(self.on_draw, adonthell.win_event_DRAW) self.draw_func = self.initial_fade_in self.alpha = 0 adonthell.audio_play_background(0) # -- launch the engine adonthell.gametime_start_action() adonthell.gamedata_engine().main(self.window, "title_sequence")
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 ()
def __init__ (self): # -- load our music adonthell.audio_load_background (0, "audio/at-demo-1.ogg") # -- The themes and fonts we'll use adonthell.win_manager_add_theme ("original") adonthell.win_manager_add_theme ("silverleaf") adonthell.win_manager_add_font ("yellow") adonthell.win_manager_add_font ("red") adonthell.win_manager_add_font ("violet") adonthell.win_manager_add_font ("blue") adonthell.win_manager_add_font ("green") adonthell.win_manager_add_font ("white") adonthell.win_manager_add_font ("original") adonthell.win_manager_add_font ("silverleaf") # -- load our images self.bag_o = adonthell.win_image () self.bag_o.load_raw ("gfx/cutscene/jewelbag_open.img") self.bag_o.set_alpha (0) self.bag_o.move (0, 0) self.bag_o.pack () self.bag_o.set_visible (0) self.bag_c = adonthell.win_image () self.bag_c.load_raw ("gfx/cutscene/jewelbag_closed.img") self.bag_c.set_visible (1) self.bag_c.set_alpha (0) self.bag_c.move (0, 0) self.bag_c.pack () self.bag_t = adonthell.win_image () self.bag_t.load_raw ("gfx/cutscene/adonthell_03.img") self.bag_t.move (33, 86) self.bag_t.pack () self.bag_t.set_visible (0) # -- create the window self.window = adonthell.win_container () self.window.move (0, 0) self.window.resize (320, 240) self.window.set_visible_border (0) # -- the order here is essential self.window.add (self.bag_c) self.window.add (self.bag_t) self.window.add (self.bag_o) self.window.set_activate (1) self.window.set_visible (1) self.window.py_signal_connect (self.on_update, adonthell.win_event_UPDATE) self.window.py_signal_connect (self.on_draw, adonthell.win_event_DRAW) self.draw_func = self.initial_fade_in self.alpha = 0 adonthell.audio_play_background (0) # -- launch the engine adonthell.gametime_start_action () adonthell.gamedata_engine ().main (self.window, "title_sequence")