/[projet1]/users/barnsey123/LUNARCOM/main.c
Defence Force logotype

Contents of /users/barnsey123/LUNARCOM/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1108 - (show annotations)
Fri Feb 7 18:14:15 2014 UTC (6 years, 1 month ago) by barnsey123
File MIME type: text/plain
File size: 3241 byte(s)
MaxFrame and Disdain (OK) and Checkwatch (terrible)
1 /*
2 Tycho Blue
3 A Moon Adventure for the Oric Atmos by Neil Barnes
4 Chapter X. Introduction of Agents Green and Blue, the Agency Boss,
5 Blondie and the Rebel Commander
6
7 SCENES:
8
9 SceneA: Debrief of Agent Blue about the failed mission to protect the US Confederate
10 ambassador to UK and the disappearance of Agent Green. Who? Why? What?
11 SceneB: Thermal Imaging of both The Assasination , The Chase and the disappearance of
12 Agent Green near a mothballed US Air Base. Text of Blue's account.
13 SceneC: Agent Blue receives phone call from a shadowy figure known as the
14 Rebel Commander. "We have him. Don't get in our way"
15 SceneD: Flashback: Pyong Yang: Rescue of Blue by Green from the Chinese Army of
16 Occupation.
17
18 History
19 04/02/2014 Started work with first few vids and sorted out display routines
20 05/02/2014 added more vids
21 07/02/2014 New PlayChunk routine (more efficient), more vids
22 */
23 #include <lib.h>
24 #define BLACK 0
25 #define RED 1
26 #define GREEN 2
27 #define YELLOW 3
28 #define BLUE 4
29 #define MAGENTA 5
30 #define CYAN 6
31 #define WHITE 7
32 #define MAXFRAME 6
33 /* Definition of Global variables */
34 extern unsigned char Tears[]; // video talking
35 extern unsigned char LookRight[]; // video looking right
36 extern unsigned char Yabber[]; // video talking
37 extern unsigned char YouFuck[]; // video "you fuck"
38 extern unsigned char Whoops[]; // video whoops
39 extern unsigned char NodYes[]; // video nodding
40 extern unsigned char LeanForward[]; // video leaning forward
41 extern unsigned char Disdain[]; // video "don't care/not bothered"
42 extern unsigned char CheckWatch[]; // video check the watch
43 unsigned char Frame, MaxFrame; // Frame of video to play up to MaxFrame
44 int PauseTime,PauseCount; // amount of time to Pause
45 unsigned char* PtrGraphic; // pointer to byte values of loaded picture
46 unsigned char InkColor;
47 /* Listing of Functions */
48
49 void Pause(); // adds pause to video playback
50 void PlayChunk(unsigned char Chunk[]); // play part of video
51 void PlayVideo(); // play all video
52
53 /* Main Program */
54
55 void main(){
56 hires();
57 InkColor=CYAN; VideoInkLeft(); // set ink to right of video
58 PauseTime=900;
59 for(;;){
60 PlayVideo();
61 }
62 }
63
64
65 /* Definition of Functions */
66
67 void PlayVideo(){
68 MaxFrame=MAXFRAME; // this gets reset at end of PlayChunk so can be freely changed
69 PlayChunk(Yabber);PlayChunk(Yabber);
70 MaxFrame=4;PlayChunk(LookRight);
71 PlayChunk(Yabber);
72 PlayChunk(CheckWatch);
73 PlayChunk(Yabber);PlayChunk(Yabber);
74 MaxFrame=4;PlayChunk(YouFuck);
75 PlayChunk(Yabber);
76 PlayChunk(Tears);
77 //PlayChunk(LookRight);
78 PlayChunk(LeanForward);
79 PlayChunk(Yabber);PlayChunk(Yabber);
80 PlayChunk(Whoops);
81 MaxFrame=3;PlayChunk(LookRight);
82 PlayChunk(Yabber);
83 PlayChunk(NodYes);
84 PlayChunk(Yabber);PlayChunk(Yabber);
85 PlayChunk(Disdain);
86 PlayChunk(Yabber);
87 PlayChunk(CheckWatch);
88 PlayChunk(YouFuck);
89 }
90
91 void PlayChunk(unsigned char Chunk[]){
92 for (Frame=0;Frame<MaxFrame; Frame++){
93 PtrGraphic=Chunk;
94 DrawFrame();
95 Pause();
96 }
97 for (Frame=MaxFrame-1;Frame>0;Frame--){
98 PtrGraphic=Chunk;
99 DrawFrame();
100 Pause();
101 }
102 MaxFrame=MAXFRAME;
103 }
104
105 void Pause(){
106 for (PauseCount=0; PauseCount<PauseTime;PauseCount++){};
107 }
108
109

  ViewVC Help
Powered by ViewVC 1.1.26