Last change
on this file since 6318 was
6318,
checked in by stefalie, 18 years ago
|
added some controls for movie_player
|
File size:
1.3 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 | |
---|
23 | MoviePlayer* movie_player; |
---|
24 | |
---|
25 | void Framework::moduleInit(int argc, char** argv) |
---|
26 | { |
---|
27 | movie_player = new MoviePlayer(argv[1]); |
---|
28 | |
---|
29 | movie_player->printInformation(); |
---|
30 | } |
---|
31 | |
---|
32 | void Framework::moduleEventHandler(SDL_Event* event) |
---|
33 | { |
---|
34 | switch (event->type) |
---|
35 | { |
---|
36 | case SDL_KEYDOWN: |
---|
37 | switch (event->key.keysym.sym) |
---|
38 | { |
---|
39 | case SDLK_1: |
---|
40 | movie_player->resume(); |
---|
41 | PRINTF(0)("Play-/Resuming\n"); |
---|
42 | break; |
---|
43 | case SDLK_2: |
---|
44 | movie_player->pause(); |
---|
45 | PRINTF(0)("Pause\n"); |
---|
46 | break; |
---|
47 | case SDLK_3: |
---|
48 | movie_player->stop(); |
---|
49 | PRINTF(0)("Stopped\n"); |
---|
50 | break; |
---|
51 | } |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | void Framework::moduleTick(float dt) |
---|
56 | { |
---|
57 | movie_player->tick(dt); |
---|
58 | } |
---|
59 | |
---|
60 | void Framework::moduleDraw(void) const |
---|
61 | { |
---|
62 | movie_player->draw(); |
---|
63 | } |
---|
64 | |
---|
65 | |
---|
66 | void Framework::moduleHelp(void) const |
---|
67 | { |
---|
68 | |
---|
69 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.