Пример #1
0
    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")
Пример #2
0
    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")
Пример #3
0
        del self.bag_o
        del self.bag_c
        del self.bag_t

        adonthell.audio_fade_out_background(500)
        adonthell.audio_unload_background(0)

    def play_intro(self):
        # -- Launches the intro

        import intro

        # -- start the mapengine
        adonthell.gamedata_engine().mapview_start()
        adonthell.gametime_update()
        adonthell.gamedata_engine().fade_in()


# -- Main --
adonthell.audio_load_wave(0, "audio/select.wav")
adonthell.audio_load_wave(1, "audio/switch.wav")
adonthell.audio_load_wave(2, "audio/unselect.wav")

if adonthell.gamedata_load_newest() == 0:
    title = title_screen()
else:
    # -- Quick-load
    adonthell.gamedata_player().set_schedule_active(1)
    adonthell.gametime_start_action()
    adonthell.gamedata_engine().main()
Пример #4
0
        del self.bag_o
        del self.bag_c
        del self.bag_t

        adonthell.audio_fade_out_background (500)
        adonthell.audio_unload_background (0)


    def play_intro (self):
        # -- Launches the intro

        import intro

        # -- start the mapengine
        adonthell.gamedata_engine ().mapview_start ()
        adonthell.gametime_update ()
        adonthell.gamedata_engine ().fade_in ()

# -- Main --
adonthell.audio_load_wave (0, "audio/select.wav")
adonthell.audio_load_wave (1, "audio/switch.wav")
adonthell.audio_load_wave (2, "audio/unselect.wav")

if adonthell.gamedata_load_newest () == 0:
    title = title_screen ()
else:
    # -- Quick-load
    adonthell.gamedata_player ().set_schedule_active (1)
    adonthell.gametime_start_action ()
    adonthell.gamedata_engine ().main ()