~ubuntu-branches/ubuntu/hardy/gravitywars/hardy

« back to all changes in this revision

Viewing changes to introutro.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2004-07-11 11:48:51 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040711114851-2xcl09fhx9o65ojb
Tags: 1.102-28
* debian/control:
  + Set policy to 3.6.1.1.
* moveship.c:
  + Fixed build with gcc-3.4, thanks to Andreas Jochens (Closes: #258737).
  + Fixed other warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GravityWars 1.1,  (C) Sami Niemi -95 */
2
2
 
 
3
#ifdef USE_SDL
 
4
#include "vgastubs.h"
 
5
#else
3
6
#include <vgakeyboard.h>
4
 
#include <math.h>
5
7
#include <vga.h>
6
8
#include <asm/io.h>
 
9
#endif
 
10
#include <math.h>
7
11
#include "memory.h"
8
12
 
9
13
void intro() {
122
126
 
123
127
 
124
128
  /* Split Screen (sl=SplitScreenLine)   */
 
129
#ifdef USE_SDL
 
130
  vga_setsplitline(480);
 
131
#else
125
132
  outb(0x18,0x3d4);       /* LineCompare */
126
133
  outb(0,0x3d5);        /* sl&255      */
127
134
  outb(7,0x3d4);          /* Overflow    */
130
137
  outb(9,0x3d4);          /* Maximum Scanline */
131
138
  reg=inb(0x3d5);          
132
139
  outb(reg&191,0x3d5);    /* outb(reg|((sl&512)>>3),0x3d5) */
133
 
  
 
140
#endif
134
141
 
135
142
 
136
143
 
141
148
      p1[pal_m]=((((long)pal[pal_m])*pal_n)>>10);
142
149
    vga_waitretrace();
143
150
    gl_setpalette(p1);
 
151
    if(keyboard_update()) goto exitfade;
144
152
  }
145
153
  gl_setpalette(pal);
146
154
 
159
167
  while(keyboard_update()==0) {
160
168
 
161
169
 
162
 
 
163
170
    for(nnn=64; nnn<=192; nnn++) {
164
171
      sn1=bigsin[nnn];
165
172
      sn2=bigsin[(nnn+128) & 255];
199
206
  }
200
207
 exitfade:
201
208
 
202
 
  if (*(scans+SCANCODE_ESCAPE))
 
209
  if (*(scans+SCANCODE_ESCAPE)) {
203
210
    escape=TRUE;
204
 
    
 
211
    return;
 
212
  }
205
213
 
206
214
  for(pal_n=1024; pal_n>=0; pal_n-=16) {
207
215
    for (pal_m=0; pal_m<=767; pal_m++)
212
220
  gl_setpalette(p0);
213
221
 
214
222
  /* Split Screen (sl=SplitScreenLine)   */
 
223
#ifdef USE_SDL
 
224
  vga_setsplitline(464);
 
225
#else
215
226
  outb(0x18,0x3d4);       /* LineCompare */
216
227
  outb(208,0x3d5);        /* sl&255      */
217
228
  outb(7,0x3d4);          /* Overflow    */
220
231
  outb(9,0x3d4);          /* Maximum Scanline */
221
232
  reg=inb(0x3d5);          
222
233
  outb(reg&191,0x3d5);    /* outb(reg|((sl&512)>>3),0x3d5) */
223
 
  
 
234
#endif
224
235
 
225
 
  
226
236
}
227
237
 
228
238