- int classic_dxsize = 100;
- int classic_dysize = 280;
- boolean classic_door_1_size = (DXSIZE == classic_dxsize &&
- DYSIZE == classic_dysize);
-
- if (door_1.anim_mode & ANIM_STATIC_PANEL)
- {
- BlitBitmap(bitmap_db_door, drawto,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1,
- DXSIZE, DYSIZE, DX, DY);
- }
- else if (x <= a)
- {
- BlitBitmap(bitmap_db_door, drawto,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1 + p / 2,
- DXSIZE, DYSIZE - p / 2, DX, DY);
-
-#if 1
- // printf("::: p == %d\n", p);
- ClearRectangle(drawto, DX, DY + DYSIZE - p / 2, DXSIZE, p / 2);
-#endif
- }
-
- if (door_1.anim_mode & ANIM_HORIZONTAL && x <= DXSIZE)
- {
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x + g_left->width - i;
- int src2_y = g_left->src_y;
- int dst1_x = DX + DXSIZE - i;
- int dst1_y = DY;
- int dst2_x = DX;
- int dst2_y = DY;
- int width = i;
- int height = DYSIZE;
-
- SetClipOrigin(bm_right, gc_right, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bm_right, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bm_left, gc_left, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bm_left, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#else
- int src1_x = DXSIZE, src1_y = DOOR_GFX_PAGEY1;
- int src2_x = DXSIZE - i, src2_y = DOOR_GFX_PAGEY1;
- int dst1_x = DX + DXSIZE - i, dst1_y = DY;
- int dst2_x = DX, dst2_y = DY;
- int width = i, height = DYSIZE;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bitmap, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bitmap, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#endif
- }
- else if (door_1.anim_mode & ANIM_VERTICAL && x <= DYSIZE)
- {
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x;
- int src2_y = g_left->src_y + g_left->height - i;
- int dst1_x = DX;
- int dst1_y = DY + DYSIZE - i;
- int dst2_x = DX;
- int dst2_y = DY;
- int width = DXSIZE;
- int height = i;
-
- SetClipOrigin(bm_right, gc_right, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bm_right, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bm_left, gc_left, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bm_left, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#else
- int src1_x = DXSIZE, src1_y = DOOR_GFX_PAGEY1;
- int src2_x = 0, src2_y = DOOR_GFX_PAGEY1 + DYSIZE - i;
- int dst1_x = DX, dst1_y = DY + DYSIZE - i;
- int dst2_x = DX, dst2_y = DY;
- int width = DXSIZE, height = i;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bitmap, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bitmap, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#endif
- }
- else if (classic_door_1_size && x <= DXSIZE) /* ANIM_DEFAULT */
- {
- int j = (door_1.anim_mode == ANIM_DEFAULT ? (DXSIZE - i) / 3 : 0);
-
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x + g_left->width - i;
- int src2_y = g_left->src_y;
- int dst1_x = DX + DXSIZE - i;
- int dst1_y = DY;
- int dst2_x = DX;
- int dst2_y = DY;
- int width = i;
- int height1 = 63, height2 = DYSIZE / 2 - height1;
- int ypos1 = 0, ypos2 = height2;
- int ypos3 = DYSIZE / 2, ypos4 = DYSIZE - height2;
-
- SetClipOrigin(bm_right, gc_right,
- dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos1, width, height2,
- dst1_x, dst1_y + ypos1 + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos3, width, height1,
- dst1_x, dst1_y + ypos3 + j);
- SetClipOrigin(bm_left, gc_left,
- dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos1 + j, width, height2 - j,
- dst2_x, dst2_y + ypos1);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos3, width, height1,
- dst2_x, dst2_y + ypos3 - j);
-
- SetClipOrigin(bm_left, gc_left,
- dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos2, width, height1,
- dst2_x, dst2_y + ypos2 - j);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos4, width, height2,
- dst2_x, dst2_y + ypos4 - j);
- SetClipOrigin(bm_right, gc_right,
- dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos2, width, height1,
- dst1_x, dst1_y + ypos2 + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos4, width, height2 - j,
- dst1_x, dst1_y + ypos4 + j);
-
-#else
- int src1_x = DXSIZE, src1_y = DOOR_GFX_PAGEY1;
- int src2_x = DXSIZE - i, src2_y = DOOR_GFX_PAGEY1;
- int dst1_x = DX + DXSIZE - i, dst1_y = DY;
- int dst2_x = DX, dst2_y = DY;
- int width = i, height = DYSIZE;
- int ypos1 = 63, ypos2 = 77, ypos3 = 140, ypos4 = 203;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y, width, ypos2,
- dst1_x, dst1_y + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y + ypos3, width, ypos1,
- dst1_x, dst1_y + ypos3 + j);
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + j, width, ypos2 - j,
- dst2_x, dst2_y);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + ypos3, width, ypos1,
- dst2_x, dst2_y + ypos3 - j);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + ypos2, width, ypos1,
- dst2_x, dst2_y + ypos2 - j);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + ypos4, width, ypos2,
- dst2_x, dst2_y + ypos4 - j);
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y + ypos2, width, ypos1,
- dst1_x, dst1_y + ypos2 + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y + ypos4, width, ypos2 - j,
- dst1_x, dst1_y + ypos4 + j);
-
- /*
- SetClipOrigin(bitmap, gc, DX - i, (DY + j) - DOOR_GFX_PAGEY1);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE, DOOR_GFX_PAGEY1, i, 77,
- DX + DXSIZE - i, DY + j);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE, DOOR_GFX_PAGEY1 + 140, i, 63,
- DX + DXSIZE - i, DY + 140 + j);
- SetClipOrigin(bitmap, gc, DX - DXSIZE + i,
- DY - (DOOR_GFX_PAGEY1 + j));
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE - i, DOOR_GFX_PAGEY1 + j, i, 77 - j,
- DX, DY);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE-i, DOOR_GFX_PAGEY1 + 140, i, 63,
- DX, DY + 140 - j);
-
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE - i, DOOR_GFX_PAGEY1 + 77, i, 63,
- DX, DY + 77 - j);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE - i, DOOR_GFX_PAGEY1 + 203, i, 77,
- DX, DY + 203 - j);
- SetClipOrigin(bitmap, gc, DX - i, (DY + j) - DOOR_GFX_PAGEY1);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE, DOOR_GFX_PAGEY1 + 77, i, 63,
- DX + DXSIZE - i, DY + 77 + j);
- BlitBitmapMasked(bitmap, drawto,
- DXSIZE, DOOR_GFX_PAGEY1 + 203, i, 77 - j,
- DX + DXSIZE - i, DY + 203 + j);
- */
-#endif
- }
-
- redraw_mask |= REDRAW_DOOR_1;
- door_1_done = (a == end);
- }
-
- if (door_state & DOOR_ACTION_2 &&
- x * door_2.step_offset <= door_size_2)
- {
- int a = MIN(x * door_2.step_offset, door_size);
- int p = (door_state & DOOR_OPEN_2 ? door_size - a : a);
- int i = p + door_skip;
-
-#if 1
- struct GraphicInfo *g_left = &graphic_info[IMG_DOOR_2_WING_LEFT];
- struct GraphicInfo *g_right = &graphic_info[IMG_DOOR_2_WING_RIGHT];
- Bitmap *bm_left = g_left->bitmap;
- Bitmap *bm_right = g_right->bitmap;
- GC gc_left = bm_left->stored_clip_gc;
- GC gc_right = bm_right->stored_clip_gc;
-#endif
-
- int classic_vxsize = 100;
- int classic_vysize = 100;
- boolean classic_door_2_size = (VXSIZE == classic_vxsize &&
- VYSIZE == classic_vysize);
-
- if (door_2.anim_mode & ANIM_STATIC_PANEL)
- {
- BlitBitmap(bitmap_db_door, drawto,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2,
- VXSIZE, VYSIZE, VX, VY);
- }
- else if (x <= VYSIZE)
- {
- BlitBitmap(bitmap_db_door, drawto,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2 + p / 2,
- VXSIZE, VYSIZE - p / 2, VX, VY);
-
- ClearRectangle(drawto, VX, VY + VYSIZE - p / 2, VXSIZE, p / 2);
- }
-
- if (door_2.anim_mode & ANIM_HORIZONTAL && x <= VXSIZE)
- {
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x + g_left->width - i;
- int src2_y = g_left->src_y;
- int dst1_x = VX + VXSIZE - i;
- int dst1_y = VY;
- int dst2_x = VX;
- int dst2_y = VY;
- int width = i;
- int height = VYSIZE;
-
- SetClipOrigin(bm_right, gc_right, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bm_right, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bm_left, gc_left, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bm_left, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#else
- int src1_x = VXSIZE, src1_y = DOOR_GFX_PAGEY2;
- int src2_x = VXSIZE - i, src2_y = DOOR_GFX_PAGEY2;
- int dst1_x = VX + VXSIZE - i, dst1_y = VY;
- int dst2_x = VX, dst2_y = VY;
- int width = i, height = VYSIZE;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bitmap, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bitmap, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#endif
- }
- else if (door_2.anim_mode & ANIM_VERTICAL && x <= VYSIZE)
- {
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x;
- int src2_y = g_left->src_y + g_left->height - i;
- int dst1_x = VX;
- int dst1_y = VY + VYSIZE - i;
- int dst2_x = VX;
- int dst2_y = VY;
- int width = VXSIZE;
- int height = i;
-
- SetClipOrigin(bm_right, gc_right, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bm_right, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bm_left, gc_left, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bm_left, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#else
- int src1_x = VXSIZE, src1_y = DOOR_GFX_PAGEY2;
- int src2_x = 0, src2_y = DOOR_GFX_PAGEY2 + VYSIZE - i;
- int dst1_x = VX, dst1_y = VY + VYSIZE - i;
- int dst2_x = VX, dst2_y = VY;
- int width = VXSIZE, height = i;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y);
- BlitBitmapMasked(bitmap, drawto, src1_x, src1_y, width, height,
- dst1_x, dst1_y);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src2_y);
- BlitBitmapMasked(bitmap, drawto, src2_x, src2_y, width, height,
- dst2_x, dst2_y);
-#endif
- }
- else if (classic_door_2_size && x <= VXSIZE) /* ANIM_DEFAULT */
- {
- int j = (door_2.anim_mode == ANIM_DEFAULT ? (VXSIZE - i) / 3 : 0);
-
-#if 1
- int src1_x = g_right->src_x;
- int src1_y = g_right->src_y;
- int src2_x = g_left->src_x + g_left->width - i;
- int src2_y = g_left->src_y;
- int dst1_x = VX + VXSIZE - i;
- int dst1_y = VY;
- int dst2_x = VX;
- int dst2_y = VY;
- int width = i;
- int height = VYSIZE / 2;
- int ypos1 = 0, ypos2 = VYSIZE / 2;
-
- SetClipOrigin(bm_right, gc_right,
- dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos1, width, height,
- dst1_x, dst1_y + ypos1 + j);
- SetClipOrigin(bm_left, gc_left,
- dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos1 + j, width, height - j,
- dst2_x, dst2_y + ypos1);
-
- SetClipOrigin(bm_left, gc_left,
- dst2_x - src2_x, dst2_y - src2_y - j);
- BlitBitmapMasked(bm_left, drawto,
- src2_x, src2_y + ypos2, width, height,
- dst2_x, dst2_y + ypos2 - j);
- SetClipOrigin(bm_right, gc_right,
- dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bm_right, drawto,
- src1_x, src1_y + ypos2, width, height - j,
- dst1_x, dst1_y + ypos2 + j);
-#else
- int src1_x = VXSIZE, src1_y = DOOR_GFX_PAGEY2;
- int src2_x = VXSIZE - i, src2_y = DOOR_GFX_PAGEY2;
- int dst1_x = VX + VXSIZE - i, dst1_y = VY;
- int dst2_x = VX, dst2_y = VY;
- int width = i, height = VYSIZE;
- int ypos = VYSIZE / 2;
-
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y, width, ypos,
- dst1_x, dst1_y + j);
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src1_y - j);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + j, width, ypos - j,
- dst2_x, dst2_y);
-
- SetClipOrigin(bitmap, gc, dst2_x - src2_x, dst2_y - src1_y - j);
- BlitBitmapMasked(bitmap, drawto,
- src2_x, src2_y + ypos, width, ypos,
- dst2_x, dst2_y + ypos - j);
- SetClipOrigin(bitmap, gc, dst1_x - src1_x, dst1_y - src1_y + j);
- BlitBitmapMasked(bitmap, drawto,
- src1_x, src1_y + ypos, width, ypos - j,
- dst1_x, dst1_y + ypos + j);
-
- /*
- SetClipOrigin(bitmap, gc, VX - i, (VY + j) - DOOR_GFX_PAGEY2);
- BlitBitmapMasked(bitmap, drawto,
- VXSIZE, DOOR_GFX_PAGEY2, i, VYSIZE / 2,
- VX + VXSIZE - i, VY + j);
- SetClipOrigin(bitmap, gc,
- VX - VXSIZE + i, VY - (DOOR_GFX_PAGEY2 + j));
- BlitBitmapMasked(bitmap, drawto,
- VXSIZE - i, DOOR_GFX_PAGEY2 + j, i, VYSIZE / 2 - j,
- VX, VY);
-
- BlitBitmapMasked(bitmap, drawto,
- VXSIZE - i, DOOR_GFX_PAGEY2 + VYSIZE / 2,
- i, VYSIZE / 2, VX, VY + VYSIZE / 2 - j);
- SetClipOrigin(bitmap, gc, VX - i, (VY + j) - DOOR_GFX_PAGEY2);
- BlitBitmapMasked(bitmap, drawto,
- VXSIZE, DOOR_GFX_PAGEY2 + VYSIZE / 2,
- i, VYSIZE / 2 - j,
- VX + VXSIZE - i, VY + VYSIZE / 2 + j);
- */
-#endif
- }
-
- redraw_mask |= REDRAW_DOOR_2;
- door_2_done = (a == VXSIZE);
- }
-
- if (!(door_state & DOOR_NO_DELAY))
- {
- BackToFront();
-
- if (game_status == GAME_MODE_MAIN)
- DoAnimation();
-
- WaitUntilDelayReached(&door_delay, door_delay_value);
- }
- }
- }
-
- if (door_state & DOOR_ACTION_1)
- door1 = door_state & DOOR_ACTION_1;
- if (door_state & DOOR_ACTION_2)
- door2 = door_state & DOOR_ACTION_2;
-
- return (door1 | door2);
-}
-
-#endif
-
-void DrawSpecialEditorDoor()
-{
-#if 1
- struct GraphicInfo *gfx1 = &graphic_info[IMG_DOOR_2_TOP_BORDER_CORRECTION];
- int top_border_width = gfx1->width;
- int top_border_height = gfx1->height;
- int outer_border = viewport.door_2[GAME_MODE_EDITOR].border_size;
- int ex = EX - outer_border;
- int ey = EY - outer_border;
- int vy = VY - outer_border;
- int exsize = EXSIZE + 2 * outer_border;
-
- CloseDoor(DOOR_CLOSE_2);
-
- /* draw bigger level editor toolbox window */
- BlitBitmap(gfx1->bitmap, drawto, gfx1->src_x, gfx1->src_y,
- top_border_width, top_border_height, ex, ey - top_border_height);
- BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, drawto, ex, vy,
- exsize, EYSIZE - VYSIZE + outer_border, ex, ey);
-#else
- /* draw bigger level editor toolbox window */
- BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
- DOOR_GFX_PAGEX7, 0, EXSIZE + 8, 8,
- EX - 4, EY - 12);
- BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, drawto,
- EX - 6, VY - 4, EXSIZE + 12, EYSIZE - VYSIZE + 4,
- EX - 6, EY - 4);
-#endif
-
- redraw_mask |= REDRAW_ALL;
-}
-
-void UndrawSpecialEditorDoor()
-{
-#if 1
- struct GraphicInfo *gfx1 = &graphic_info[IMG_DOOR_2_TOP_BORDER_CORRECTION];
- int top_border_width = gfx1->width;
- int top_border_height = gfx1->height;
- int outer_border = viewport.door_2[GAME_MODE_EDITOR].border_size;
- int ex = EX - outer_border;
- int ey = EY - outer_border;
- int ey_top = ey - top_border_height;
- int exsize = EXSIZE + 2 * outer_border;
- int eysize = EYSIZE + 2 * outer_border;
-
- /* draw normal tape recorder window */
- if (graphic_info[IMG_GLOBAL_BORDER].bitmap)
- {
- BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, drawto,
- ex, ey_top, top_border_width, top_border_height,
- ex, ey_top);
- BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, drawto,
- ex, ey, exsize, eysize, ex, ey);
- }
- else
- {
- // if screen background is set to "[NONE]", clear editor toolbox window
- ClearRectangle(drawto, ex, ey_top, top_border_width, top_border_height);
- ClearRectangle(drawto, ex, ey, exsize, eysize);
- }
-#else
- /* draw normal tape recorder window */
- BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, drawto,
- EX - 6, EY - 12, EXSIZE + 12, EYSIZE - VYSIZE + 12,
- EX - 6, EY - 12);
-#endif
-
- redraw_mask |= REDRAW_ALL;
-}
-
-
-/* ---------- new tool button stuff ---------------------------------------- */
-
-#if 1
-
-static struct
-{
- int graphic;
- struct TextPosInfo *pos;
- int gadget_id;
- char *infotext;
-} toolbutton_info[NUM_TOOL_BUTTONS] =
-{
- {
- IMG_REQUEST_BUTTON_GFX_YES, &request.button.yes,
- TOOL_CTRL_ID_YES, "yes"
- },
- {
- IMG_REQUEST_BUTTON_GFX_NO, &request.button.no,
- TOOL_CTRL_ID_NO, "no"
- },
- {
- IMG_REQUEST_BUTTON_GFX_CONFIRM, &request.button.confirm,
- TOOL_CTRL_ID_CONFIRM, "confirm"
- },
- {
- IMG_REQUEST_BUTTON_GFX_PLAYER_1, &request.button.player_1,
- TOOL_CTRL_ID_PLAYER_1, "player 1"
- },
- {
- IMG_REQUEST_BUTTON_GFX_PLAYER_2, &request.button.player_2,
- TOOL_CTRL_ID_PLAYER_2, "player 2"
- },
- {
- IMG_REQUEST_BUTTON_GFX_PLAYER_3, &request.button.player_3,
- TOOL_CTRL_ID_PLAYER_3, "player 3"
- },
- {
- IMG_REQUEST_BUTTON_GFX_PLAYER_4, &request.button.player_4,
- TOOL_CTRL_ID_PLAYER_4, "player 4"
- }
-};
-
-void CreateToolButtons()
-{
- int i;
-
- for (i = 0; i < NUM_TOOL_BUTTONS; i++)
- {
- struct GraphicInfo *gfx = &graphic_info[toolbutton_info[i].graphic];
- struct TextPosInfo *pos = toolbutton_info[i].pos;
- struct GadgetInfo *gi;
- Bitmap *deco_bitmap = None;
- int deco_x = 0, deco_y = 0, deco_xpos = 0, deco_ypos = 0;
- unsigned int event_mask = GD_EVENT_RELEASED;
- int dx = DX;
- int dy = DY;
- int gd_x = gfx->src_x;
- int gd_y = gfx->src_y;
- int gd_xp = gfx->src_x + gfx->pressed_xoffset;
- int gd_yp = gfx->src_y + gfx->pressed_yoffset;
- int id = i;
-
- if (global.use_envelope_request)
- setRequestPosition(&dx, &dy, TRUE);
-
- if (id >= TOOL_CTRL_ID_PLAYER_1 && id <= TOOL_CTRL_ID_PLAYER_4)
- {
- int player_nr = id - TOOL_CTRL_ID_PLAYER_1;
-
- getSizedGraphicSource(PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0,
- pos->size, &deco_bitmap, &deco_x, &deco_y);
- deco_xpos = (gfx->width - pos->size) / 2;
- deco_ypos = (gfx->height - pos->size) / 2;
- }