File: makepic.c

package info (click to toggle)
gravitywars 1.102-34
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid, stretch
  • size: 2,468 kB
  • ctags: 553
  • sloc: ansic: 3,938; makefile: 52; sh: 52
file content (76 lines) | stat: -rw-r--r-- 1,258 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* GravityWars 1.1,  (C) Sami Niemi -95 */

#include "memory.h"
 
/*---------------------------------------------------------- drawSplitScreen */
void drawSplitScreen() {
  
  static long adr;
  static int mask,xx,yy;
  static char *dp;

  vga_setpage(0);
  mask=adr=0;

  for (yy=0; yy<=15; yy++) {
    for (xx=0; xx<=639; xx++) {
      if (adr>65535) {
	adr=0;
	mask++;
	vga_setpage(mask);
      }
      *(vga_ptr+adr++)=0;
    }
  }
  
}


/*--------------------------------------------------------------- drawScreen */
int drawScreen() {

  static short x,y,xx,yy,blk;
  static char *address;
  static char *gfx;
  static long ptr;

/*---- ScreenShot-----
  static long adr;
  static int mask;
---------------------*/
 
  
  for(yy=y=0; y<=44; y++,yy+=32) {
    for(xx=x=0; x<=19; x++,xx+=32) {
      putbox(xx,yy, block[level[x+y*20]]);
    }
  }

  drawSplitScreen();

  wipe.active=255; /* Not Active */

/* This routine writes the screen to stdout to produce
 * a screen shot.. */
/* SCREEN SHOT
  vga_setpage(0);
  mask=adr=0;

  putchar('*');
  for (yy=0; yy<=1439; yy++) {
    for (xx=0; xx<=639; xx++) {
      if (adr>65535) {
        adr=0;
        mask++;
        vga_setpage(mask);
      }
      putchar(*(vga_ptr+adr++));
    }
  }
*/

}