/[projet1]/users/chema/1337intro/main.c
Defence Force logotype

Contents of /users/chema/1337intro/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 387 - (show annotations)
Sun Sep 5 16:39:43 2010 UTC (9 years, 6 months ago) by Chema
File MIME type: text/plain
File size: 3654 byte(s)
more tweaks... removed starfield in 1337 logo :( so it looks better for the scroller
1 #include <stdio.h>
2 #include "oobj3d/obj3d.h"
3
4 #define A_FWBLACK 0
5 #define A_FWRED 1
6 #define A_FWGREEN 2
7 #define A_FWYELLOW 3
8 #define A_FWBLUE 4
9 #define A_FWMAGENTA 5
10 #define A_FWCYAN 6
11 #define A_FWWHITE 7
12 #define A_BGBLACK 16
13 #define A_BGRED 17
14 #define A_BGGREEN 18
15 #define A_BGYELLOW 19
16 #define A_BGBLUE 20
17 #define A_BGMAGENTA 21
18 #define A_BGCYAN 22
19 #define A_BGWHITE 23
20
21
22
23 // tables.s
24 void TablesInit();
25
26 // -------------
27
28 // Starwars.s
29
30 extern unsigned int position;
31
32 void RasterizeInitScanlineBuffer();
33 void RasterizeNextLineMapping();
34 void RasterizeScroller();
35
36 // -------------
37
38 extern unsigned char XIncTableLow[256];
39 extern unsigned char XIncTableHigh[256];
40
41 extern unsigned char EmptyTextureLine[16];
42
43
44
45 void ComputeDivTable()
46 {
47 int y;
48 unsigned char dst_w;
49 unsigned int x_inc;
50
51 dst_w=2;
52 for (y=1;y<128;y++)
53 {
54 x_inc=((((unsigned int)(128)<<8))/dst_w);
55
56 XIncTableLow[y] =(x_inc&255);
57 XIncTableHigh[y]=(x_inc>>8);
58
59 dst_w+=2;
60 }
61 }
62
63
64
65
66
67 /* Prototipes */
68
69 typedef struct t_obj
70 {
71 int CenterX,CenterY,CenterZ;
72 void * objp;
73 char ID;
74 char User;
75 char XRem, YRem, ZRem;
76 char orientation[18];
77 }t_obj;
78
79
80 extern t_obj * pointer;
81
82 extern void * LabelPictureFont;
83 extern void * BufferUnpack;
84 char X,Y,x,y;
85
86 char * p;
87
88
89 main()
90 {
91 switch_ovl();
92 InitIRQ();
93
94 DoubleBuffOff();
95 GenerateExtraTables();
96 SequenceDefenceForceLogo();
97 //Wait(8);
98
99 init_disk();
100 load_overlay();
101
102 InitIRQ();
103
104 DoubleBuffOn();
105 FontUnpack();
106 DoubleBuffOff();
107 FontInit();
108
109 CreditsElite();
110 Wait(15);
111
112 InitMusic();
113
114 clr_all();
115 p=(char *)(0xa000+40*49);
116 *p=A_BGBLUE;
117 p=(char *)(0xa000+40*151);
118 *p=A_BGBLUE;
119 DoubleBuffOn();
120 InitTestCode();
121 Test1337();
122 EmptyObj3D();
123 DoubleBuffOff();
124
125 SWTablesInit();
126 ComputeDivTable();
127 RasterizeInitScanlineBuffer();
128 position=0;
129 while (position<299 /*323*/)
130 {
131 RasterizeScroller();
132 position++;
133 }
134
135
136 /*
137 ShowStory();
138 Wait(20);
139 BurnText();
140 */
141
142 /*
143 ShowStory2();
144 Wait(20);
145 BurnText();
146 */
147
148 FontUnpack();
149
150 /*
151 clr_all();
152 p=(char *)(0xa000+40*49);
153 *p=A_BGBLUE;
154 p=(char *)(0xa000+40*151);
155 *p=A_BGBLUE;
156 */
157
158 FirstText();
159 Wait(8-1);
160
161 DoubleBuffOn();
162 InitTestCode();
163 clr_toparea();
164 FirstScene();
165 RotateThargoid();
166
167 DoubleBuffOff();
168 Dialogue1();
169 DoubleBuffOn();
170 RotateThargoid();
171 DoubleBuffOff();
172 Dialogue2();
173
174 DoubleBuffOn();
175 RotateThargoid();
176 ////RotateThargoid();
177
178 DoubleBuffOff();
179 ShowThargoid();
180 ////RotateThargoid();
181 Dialogue3();
182 Wait(15);
183 ////RotateThargoid();
184 Dialogue3b();
185 Wait(15);
186
187
188 ShowBadguy();
189 DoubleBuffOff();
190 Dialogue4();
191 Wait(25);
192 //Dialogue5();
193
194 ClearWideBuff();
195 Dialogue5();
196 DoubleBuffOn();
197 PutSun();
198 RotateThargoid();
199
200 DoubleBuffOff();
201 Dialogue6();
202
203 DoubleBuffOn();
204 RotateThargoid();
205 clr_bottomarea();
206 clr_toparea();
207 FinalScene();
208
209 FontUnpack();
210 DoubleBuffOff();
211
212 /*
213 ShowStory2();
214 Wait(20);
215 BurnText();
216 */
217 Credits1();
218 Wait(6-4);
219 BurnText();
220
221 /*
222 Credits2();
223 Wait(2);
224 BurnText();
225 Wait(3-1);
226 */
227 Credits3();
228 Wait(5-3);
229 BurnText();
230
231 Credits4();
232 Wait(5-1);
233 BurnText();
234
235 Credits5();
236 Wait(5-3);
237 BurnText();
238
239 CreditsEnd();
240 Wait(5-3);
241 BurnText();
242 clr_all();
243
244
245 ShowLogo();
246 Wait(10-5);//20);
247 BurnText();
248 clr_all();
249 //Wait(5);
250
251 launch_game();
252
253 }
254
255
256 void launch_game()
257 {
258
259 clr_all();
260 StopMusic();
261 Wait(2);
262
263 reboot_oric();
264 }
265
266

  ViewVC Help
Powered by ViewVC 1.1.26