File: util.cc

package info (click to toggle)
enemylines3 1.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,380 kB
  • ctags: 1,444
  • sloc: cpp: 16,323; makefile: 74; sh: 52
file content (27 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (6)
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
#include "util.h"

void rect(el3::Mapbase *m,int x1,int y1,int x2,int y2,el3::e_tiletype t) {
   for (int x=x1;x<=x2;x++) {
      for (int y=y1;y<=y2;y++) {
         if (!m->inside(C3(x,y,0))) continue;
         m->set(C3(x,y,0),t);
      }
   }
}


void outline(el3::Mapbase *m,int x1,int y1,int x2,int y2,el3::e_tiletype t) {
   for (int x=x1;x<=x2;x++) {
      m->set(C3(x,y1,0),t);
      m->set(C3(x,y2,0),t);
   }
   for (int y=y1;y<=y2;y++) {
      m->set(C3(x1,y,0),t);
      m->set(C3(x2,y,0),t);
   }
}


void lower(el3::Mapbase *m,C3 p) {
	m->lower(p);
}