/[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 1105 - (show annotations)
Thu Feb 6 13:50:03 2014 UTC (6 years, 3 months ago) by barnsey123
File MIME type: text/plain
File size: 4771 byte(s)
more vids (need more efficient routines)
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 */
22 #include <lib.h>
23 #define BLACK 0
24 #define RED 1
25 #define GREEN 2
26 #define YELLOW 3
27 #define BLUE 4
28 #define MAGENTA 5
29 #define CYAN 6
30 #define WHITE 7
31 /* Definition of Global variables */
32 extern unsigned char Tears[]; // video talking
33 extern unsigned char LookRight[]; // video looking right
34 extern unsigned char Yabber[]; // video talking
35 extern unsigned char YouFuck[]; // video "you fuck"
36 extern unsigned char Whoops[]; // video whoops
37 extern unsigned char NodYes[]; // video nodding
38 extern unsigned char LeanForward[]; // video leaning forward
39 unsigned char Frame; // Frame of video to play
40 int PauseTime,p; // amount of time to Pause
41 unsigned char* PtrGraphic; // pointer to byte values of loaded picture
42 unsigned char InkColor;
43 /* Listing of Functions */
44
45 void Pause(); // adds pause to video playback
46 void PlayLeanForward(); // LeanForward
47 void PlayLeanForwardA();
48 void PlayLookRight(); // Look Right
49 void PlayLookRightA();
50 void PlayNodYes(); // Nod yes
51 void PlayNodYesA();
52 void PlayTears(); // Pretend Tears
53 void PlayTearsA();
54 void PlayYabber(); // general talking
55 void PlayYabberA();
56 void PlayYouFuck(); // Go away you nasty man
57 void PlayYouFuckA();
58 void PlayWhoops(); // Did I swear?
59 void PlayWhoopsA();
60 void PlayVideo(); // play all video
61
62 /* Main Program */
63
64 void main(){
65 hires();
66 InkColor=CYAN; VideoInkLeft(); // set ink to right of video
67 PauseTime=900;
68 for(;;){
69 PlayVideo();
70 }
71 }
72
73
74 /* Definition of Functions */
75
76 void PlayVideo() {
77 /*PtrGraphic=BlahBlah; // pointer to byte values of loaded video
78 for (Frame=0;Frame<12;Frame++){
79 DisplayFrame(); // print a frame
80 PauseTime=900; // define length of Pause
81 //Pause(); // add a pause
82 //getchar();
83 } */
84 // Look Right and back
85 // look right
86 PlayLookRight();
87 PlayYabber();PlayYabber();PlayYabber();
88 PlayTears();
89 PlayYouFuck();
90 PlayWhoops();
91 PlayYabber();PlayYabber();
92 PlayNodYes();
93 PlayLeanForward();
94
95 /*PlayTears();
96 PlayYouFuck();
97 PlayLookRight();
98 PlayLeanForward();
99 PlayWhoops();
100 PlayNodYes();*/
101
102 }
103 void Pause(){
104 for (p=0; p<PauseTime;p++){};
105 }
106 void PlayLeanForward(){
107 // look right
108 for (Frame=0;Frame<6;Frame++){
109 PlayLeanForwardA();
110 }
111 // look back
112 for (Frame=5;Frame>0;Frame--){
113 PlayLeanForwardA();
114 }
115 }
116 void PlayLeanForwardA(){
117 PtrGraphic=LeanForward;
118 DrawFrame();
119 Pause();
120 }
121
122 void PlayLookRight(){
123 // look right
124 for (Frame=0;Frame<6;Frame++){
125 PlayLookRightA();
126 }
127 // look back
128 for (Frame=5;Frame>0;Frame--){
129 PlayLookRightA();
130 }
131 }
132 void PlayLookRightA(){
133 PtrGraphic=LookRight;
134 DrawFrame();
135 Pause();
136 }
137
138 void PlayNodYes(){
139 // tears
140 for (Frame=0;Frame<6;Frame++){
141 PlayNodYesA();
142 }
143 // tears back
144 for (Frame=5;Frame>0;Frame--){
145 PlayNodYesA();
146 }
147 }
148 void PlayNodYesA(){
149 PtrGraphic=NodYes;
150 DrawFrame();
151 Pause();
152 }
153
154 void PlayTears(){
155 // tears
156 for (Frame=0;Frame<6;Frame++){
157 PlayTearsA();
158 }
159 // tears back
160 for (Frame=5;Frame>0;Frame--){
161 PlayTearsA();
162 }
163 }
164 void PlayTearsA(){
165 PtrGraphic=Tears;
166 DrawFrame();
167 Pause();
168 }
169
170 void PlayYabber(){
171 // tears
172 for (Frame=0;Frame<6;Frame++){
173 PlayYabberA();
174 }
175 // tears back
176 for (Frame=5;Frame>0;Frame--){
177 PlayYabberA();
178 }
179 }
180 void PlayYabberA(){
181 PtrGraphic=Yabber;
182 DrawFrame();
183 Pause();
184 }
185 void PlayYouFuck(){
186 // tears
187 for (Frame=0;Frame<6;Frame++){
188 PlayYouFuckA();
189 }
190 // tears back
191 for (Frame=5;Frame>0;Frame--){
192 PlayYouFuckA();
193 }
194 }
195 void PlayYouFuckA(){
196 PtrGraphic=YouFuck;
197 DrawFrame();
198 Pause();
199 }
200
201 void PlayWhoops(){
202 // tears
203 for (Frame=0;Frame<6;Frame++){
204 PlayWhoopsA();
205 }
206 // tears back
207 for (Frame=5;Frame>0;Frame--){
208 PlayWhoopsA();
209 }
210 }
211 void PlayWhoopsA(){
212 PtrGraphic=Whoops;
213 DrawFrame();
214 Pause();
215 }
216

  ViewVC Help
Powered by ViewVC 1.1.26