Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/avi_play/src/subprojects/importer/movie_player_test.cc @ 6323

Last change on this file since 6323 was 6323, checked in by hdavid, 18 years ago

branches\avi_play: some fixes

File size: 1.5 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: David Hasenfratz
13   co-programmer: ...
14
15   this file extends the framework file, so it renders what i want.
16*/
17
18#include <stdlib.h>
19
20#include "framework.h"
21#include "movie_player.h"
22
23MoviePlayer* movie_player;
24
25void Framework::moduleInit(int argc, char** argv)
26{
27  movie_player = new MoviePlayer(argv[1]);
28
29  movie_player->printInformation();
30
31  movie_player->start(0);
32}
33
34void Framework::moduleEventHandler(SDL_Event* event)
35{
36  switch (event->type)
37  {
38    case SDL_KEYDOWN:
39      switch (event->key.keysym.sym)
40      {
41        case SDLK_1:
42          movie_player->start(0);
43          PRINTF(0)("Start\n");
44          break;
45        case SDLK_2:
46          movie_player->resume();
47          PRINTF(0)("Play-/Resuming\n");
48          break;
49        case SDLK_3:
50          movie_player->pause();
51          PRINTF(0)("Pause\n");
52          break;
53        case SDLK_4:
54          movie_player->stop();
55          PRINTF(0)("Stopped\n");
56          break;
57      }
58  }
59}
60
61void Framework::moduleTick(float dt)
62{
63  movie_player->tick(dt);
64}
65
66void Framework::moduleDraw(void) const
67{
68  movie_player->draw();
69}
70
71
72void Framework::moduleHelp(void) const
73{
74
75}
Note: See TracBrowser for help on using the repository browser.