repo.or.cz
/
doom2d-restoration.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
install: add install sources and resources
[doom2d-restoration.git]
/
GAME
/
BMAP.C
blob
c04ea65896a4363c9a9b042568c3f33c80fced2e
1
#include "glob.h"
2
#include "view.h"
3
#include "bmap.h"
4
5
byte fld_need_remap=1;
6
7
byte bmap[FLDH/4][FLDW/4];
8
9
void BM_mark(obj_t *o,byte f) {
10
int x,y;
11
int xs,ys,xe,ye;
12
13
if((xs=(o->x-o->r)>>5)<0) xs=0;
14
if((xe=(o->x+o->r)>>5)>=FLDW/4) xe=FLDW/4-1;
15
if((ys=(o->y-o->h)>>5)<0) ys=0;
16
if((ye=o->y>>5)>=FLDH/4) ye=FLDH/4-1;
17
for(y=ys;y<=ye;++y)
18
for(x=xs;x<=xe;++x)
19
bmap[y][x]|=f;
20
}