summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian A. Weber <chris@gna.ch>2020-06-22 17:22:17 +0000
committerChristian A. Weber <chris@gna.ch>2020-06-22 17:22:17 +0000
commit82c4383ae7cc27c1d2508d94dedf71deff9dd5e3 (patch)
treeb70a39555aed15ac1b807f07bdca02eae443d249
parent8f2111ae0b373fd7bda9184fed2ce08b0ab43a81 (diff)
downloadbobi-82c4383ae7cc27c1d2508d94dedf71deff9dd5e3.tar.gz
bobi-82c4383ae7cc27c1d2508d94dedf71deff9dd5e3.tar.bz2
bobi-82c4383ae7cc27c1d2508d94dedf71deff9dd5e3.zip
limit clip origin to IFF screen size, add WaitBlit()
-rw-r--r--Get.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/Get.c b/Get.c
index d99ca13..af3eaea 100644
--- a/Get.c
+++ b/Get.c
@@ -71,16 +71,8 @@ static BOOL CutBob(BOOL multiflag)
else /* Muss MOUSEMOVE sein */
{
DrawCross(picturescreen,x1,y1);
- x1 = msg->MouseX;
- if(x1>=picturescreen->Width) x1=picturescreen->Width-1;
- y1 = msg->MouseY;
- if(x0>=0)
- {
- /* if((x1-x0) > MAXBOBWIDTH) x1=x0+MAXBOBWIDTH;
- if((x0-x1) > MAXBOBWIDTH) x1=x0-MAXBOBWIDTH;
- if((y1-y0) > MAXBOBHEIGHT) y1=y0+MAXBOBHEIGHT;
- if((y0-y1) > MAXBOBHEIGHT) y1=y0-MAXBOBHEIGHT;
- */ }
+ x1 = MIN(msg->MouseX, picturescreen->Width-1);
+ y1 = MIN(msg->MouseY, picturescreen->Height-1);
DrawCross(picturescreen,x1,y1);
}
ReplyMsg((struct Message *)msg);
@@ -190,6 +182,7 @@ BOOL GetBob(int x,int y,int w,int h)
struct MyBob *bob;
BltBitMap(&(picturescreen->BitMap),x,y,tmpmap,0,0,w,h,0xc0,0xff,0);
+ WaitBlit();
if(bob=BitMapToBob(BobTable[actbobnum],tmpmap,w))
{
if(numbobs<MAXNUMBOBS)