version 1.2 | | version 1.3 |
---|
| | |
| | |
/*** determine size to ask for ***/ | | /*** determine size to ask for ***/ |
if(self->crEdit.map) { | | if(self->crEdit.map) { |
request.width = self->crEdit.map->mapx * self->crEdit.fontSize; | | request.width = self->crEdit.map->map_object->x * self->crEdit.fontSize; |
request.height = self->crEdit.map->mapy * self->crEdit.fontSize; | | request.height = self->crEdit.map->map_object->y * self->crEdit.fontSize; |
} else { | | } else { |
request.width = self->crEdit.fontSize; | | request.width = self->crEdit.fontSize; |
request.height = self->crEdit.fontSize; | | request.height = self->crEdit.fontSize; |
| | |
| | |
if (!self->crEdit.map) return; | | if (!self->crEdit.map) return; |
for (j = area.x; | | for (j = area.x; |
j < area.x + area.width && j < self->crEdit.map->mapx; | | j < area.x + area.width && j < self->crEdit.map->map_object->x; |
j++) { | | j++) { |
for (i = area.y; | | for (i = area.y; |
i < area.y + area.height && i < self->crEdit.map->mapy; | | i < area.y + area.height && i < self->crEdit.map->map_object->y; |
i++) { | | i++) { |
UpdatePosition (w,j,i,inv); | | UpdatePosition (w,j,i,inv); |
} | | } |
| | |
x2 = abs(seg.x1 - seg.x2) + x1; | | x2 = abs(seg.x1 - seg.x2) + x1; |
y2 = abs(seg.y1 - seg.y2) + y1; | | y2 = abs(seg.y1 - seg.y2) + y1; |
| | |
if(x1 > self->crEdit.map->mapx || | | if(x1 > self->crEdit.map->map_object->x || |
x2 > self->crEdit.map->mapx || | | x2 > self->crEdit.map->map_object->x || |
y1 > self->crEdit.map->mapy || | | y1 > self->crEdit.map->map_object->y || |
y2 > self->crEdit.map->mapy) return; | | y2 > self->crEdit.map->map_object->y) return; |
| | |
if (inv) { | | if (inv) { |
XDrawRectangle (XtDisplay(w), XtWindow(w), | | XDrawRectangle (XtDisplay(w), XtWindow(w), |
| | |
x = event->xbutton.x / self->crEdit.fontSize; | | x = event->xbutton.x / self->crEdit.fontSize; |
y = event->xbutton.y / self->crEdit.fontSize; | | y = event->xbutton.y / self->crEdit.fontSize; |
| | |
if (x >= self->crEdit.map->mapx ) | | if (x >= self->crEdit.map->map_object->x ) |
x = self->crEdit.map->mapx - 1; | | x = self->crEdit.map->map_object->x - 1; |
if (x < 0) | | if (x < 0) |
x = 0; | | x = 0; |
| | |
if (y >= self->crEdit.map->mapy ) | | if (y >= self->crEdit.map->map_object->y ) |
y = self->crEdit.map->mapy - 1; | | y = self->crEdit.map->map_object->y - 1; |
if (y < 0) | | if (y < 0) |
y = 0; | | y = 0; |
| | |
| | |
| | |
debug2("SelectEndAc() %dx%d\n",x,y); | | debug2("SelectEndAc() %dx%d\n",x,y); |
| | |
if (x >= self->crEdit.map->mapx ) | | if (x >= self->crEdit.map->map_object->x ) |
x = self->crEdit.map->mapx - 1; | | x = self->crEdit.map->map_object->x - 1; |
if (x < 0) | | if (x < 0) |
x = 0; | | x = 0; |
| | |
if (y >= self->crEdit.map->mapy ) | | if (y >= self->crEdit.map->map_object->y ) |
y = self->crEdit.map->mapy - 1; | | y = self->crEdit.map->map_object->y - 1; |
if (y < 0) | | if (y < 0) |
y = 0; | | y = 0; |
| | |
| | |
call.map = self->crEdit.map; | | call.map = self->crEdit.map; |
call.rect.x = 0; | | call.rect.x = 0; |
call.rect.y = 0; | | call.rect.y = 0; |
call.rect.width = self->crEdit.map->mapx; | | call.rect.width = self->crEdit.map->map_object->x; |
call.rect.height = self->crEdit.map->mapy; | | call.rect.height = self->crEdit.map->map_object->y; |
call.z = 0; | | call.z = 0; |
if (argv) { | | if (argv) { |
if (!strcmp (argv[0], "right")) { | | if (!strcmp (argv[0], "right")) { |
| | |
call.map = self->crEdit.map; | | call.map = self->crEdit.map; |
call.rect.x = 0; | | call.rect.x = 0; |
call.rect.y = 0; | | call.rect.y = 0; |
call.rect.width = self->crEdit.map->mapx; | | call.rect.width = self->crEdit.map->map_object->x; |
call.rect.height = self->crEdit.map->mapy; | | call.rect.height = self->crEdit.map->map_object->y; |
call.z = 0; | | call.z = 0; |
| | |
/* | | /* |