ref: 3d91225b38e4e1a87b60e065c2f02c16ea0a8c1e
parent: 694039a3792bd62ac8e086ac710dddd553333bb6
author: qwx <qwx@sciops.net>
date: Thu Feb 25 18:21:07 EST 2021
drw: oops, revert useless change
--- a/drw.c
+++ b/drw.c
@@ -18,7 +18,7 @@
static Mobj **visbuf;
static int nvisbuf, nvis;
-int
+void
dopan(Point p)
{
pan.x -= p.x;
@@ -31,23 +31,21 @@
pan.y = 0;
else if(pan.y > panmax.y)
pan.y = panmax.y;
- return 1;
}
-int
+void
select(Point p)
{
int i;
if(!ptinrect(p, selr))
- return 0;
+ return;
p = divpt(subpt(p, selr.min), scale);
i = fbvis[p.y * fbw + p.x];
selected[0] = i == -1 ? nil : visbuf[i];
- return 1;
}
-int
+void
move(Point p)
{
int i;
@@ -55,19 +53,18 @@
Mobj *mo;
if(!ptinrect(p, selr) || selected[0] == nil)
- return 0;
+ return;
vp = divpt(subpt(p, selr.min), scale);
i = fbvis[vp.y * fbw + vp.x];
mo = i == -1 ? nil : visbuf[i];
if(mo == selected[0]){
dprint("select: %#p not moving to itself\n", visbuf[i]);
- return 0;
+ return;
}
p = divpt(addpt(subpt(p, selr.min), pan), scale);
p.x /= Tlsubwidth;
p.y /= Tlsubheight;
moveone(p, selected[0], mo);
- return 1;
}
static void
--- a/fns.h
+++ b/fns.h
@@ -10,9 +10,9 @@
void stepnet(void);
void joinnet(char*);
void listennet(void);
-int dopan(Point);
-int select(Point);
-int move(Point);
+void dopan(Point);
+void select(Point);
+void move(Point);
void compose(int, int, u32int);
void redraw(void);
void updatefb(void);