~ubuntu-branches/ubuntu/karmic/gravitywars/karmic

« back to all changes in this revision

Viewing changes to init.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2003-06-12 13:31:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20030612133100-unu8ek7z4109neyb
Tags: 1.102-27
* debian/control:
  + Build-depend on libsdl1.2-dev (>= 1.2.5-8) because 1.2.5-7 had a broken
    shlibs file.
  + Removed the build-dependency on dpkg-dev since it is in build-essential.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/* GravityWars 1.1,  (C) Sami Niemi -95 */
3
3
 
 
4
#ifdef USE_SDL
 
5
#include "vgastubs.h"
 
6
#else
4
7
#include <vga.h>
5
8
#include <vgagl.h>
 
9
#include <asm/io.h>
 
10
#endif
6
11
#include <math.h>
7
 
#include <asm/io.h>
8
12
#include "memory.h"
9
13
 
10
14
/*--------------------------------------------------------------- initScreen */
13
17
  short n,ptr;
14
18
  uchar reg;
15
19
 
16
 
        /* This modification for debian lets it stay sgid games, so it can write to
17
 
         * the high score file. */
18
 
        setgid(getegid());
 
20
  /* This modification for debian lets it stay sgid games, so it can write to
 
21
   * the high score file. */
 
22
#ifndef USE_SDL
 
23
  setgid(getegid());
 
24
#endif
19
25
 
20
26
  vga_init();
21
27
  vga_setmode(G640x480x256);
27
33
  gl_setpalette(p0); 
28
34
 
29
35
  /* Split Screen (sl=SplitScreenLine)   */
 
36
#ifdef USE_SDL
 
37
  vga_setsplitline(464);
 
38
#else
30
39
  outb(0x18,0x3d4);       /* LineCompare */
31
40
  outb(208,0x3d5);        /* sl&255      */
32
41
  outb(7,0x3d4);          /* Overflow    */
35
44
  outb(9,0x3d4);          /* Maximum Scanline */
36
45
  reg=inb(0x3d5);          
37
46
  outb(reg&191,0x3d5);    /* outb(reg|((sl&512)>>3),0x3d5) */
38
 
  
 
47
#endif
39
48
}                                       
40
49
 
41
50
/*--------------------------------------------------------------- initParams */
493
502
    exit(1);
494
503
  }
495
504
 
 
505
  hs[0]='\0';
496
506
  strcpy(filename,"/var/games/gravitywars/hscore.gw");
497
507
  if ( ( fileptr=fopen(filename,"r") )!=NULL) {
498
508
    fscanf(fileptr,"%s",hs);