File: config.cpp

package info (click to toggle)
matrem 1.0-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 788 kB
  • ctags: 928
  • sloc: cpp: 3,133; makefile: 77
file content (33 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (4)
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
#include "config.h"

unsigned char* p[MAPWIDTH];
// creature* r[MAPWIDTH];

unsigned int number_of[N_OF_SPECIES], number_of_dead[N_OF_SPECIES],
  atterrain[16],atdiet[16];
int dx[4],dy[4];
unsigned long turn;
int pop[POPMEM][N_OF_SPECIES];
int seedrand;

void itostr(int n, char* s)
{
 int j,d;
 if (n<0) {
  s[0]='-';
  n=-n;
 }
 else
  s[0]=' ';
 s[11]=NULL;
 d=1;
 for (j=0;j<10;j++) {
  s[10-j]='0'+(n/d)%10;
  d*=10;
 }
 for (j=1;j<10;j++)
  if (s[j]=='0')
   s[j]=' ';
  else break;
}