1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

Remove ICON_KABOOM_EXTRA

I don't want it in the sources, and the "normal" icon kaboom
is good enough. And it was #undef'ined by default.
This commit is contained in:
Carlos R. Mafra
2010-01-07 15:38:41 +01:00
parent 0deb198b10
commit 8a2a0b6adc
2 changed files with 1 additions and 51 deletions

View File

@@ -50,10 +50,6 @@ void DoKaboom(WScreen * scr, Window win, int x, int y)
#define KAB_PRECISION 4 #define KAB_PRECISION 4
int px[PIECES]; int px[PIECES];
short py[PIECES]; short py[PIECES];
#ifdef ICON_KABOOM_EXTRA
short ptx[2][PIECES], pty[2][PIECES];
int ll;
#endif
char pvx[PIECES], pvy[PIECES]; char pvx[PIECES], pvy[PIECES];
/* in MkLinux/PPC gcc seems to think that char is unsigned? */ /* in MkLinux/PPC gcc seems to think that char is unsigned? */
signed char ax[PIECES], ay[PIECES]; signed char ax[PIECES], ay[PIECES];
@@ -86,12 +82,6 @@ void DoKaboom(WScreen * scr, Window win, int x, int y)
py[k] = y + j * ICON_KABOOM_PIECE_SIZE; py[k] = y + j * ICON_KABOOM_PIECE_SIZE;
pvx[k] = rand() % (1 << (KAB_PRECISION + 3)) - (1 << (KAB_PRECISION + 3)) / 2; pvx[k] = rand() % (1 << (KAB_PRECISION + 3)) - (1 << (KAB_PRECISION + 3)) / 2;
pvy[k] = -15 - rand() % 7; pvy[k] = -15 - rand() % 7;
#ifdef ICON_KABOOM_EXTRA
for (ll = 0; ll < 2; ll++) {
ptx[ll][k] = px[k];
pty[ll][k] = py[k];
}
#endif
k++; k++;
} else { } else {
ax[k] = -1; ax[k] = -1;
@@ -114,50 +104,15 @@ void DoKaboom(WScreen * scr, Window win, int x, int y)
for (i = 0; i < j; i++) { for (i = 0; i < j; i++) {
if (ax[i] >= 0) { if (ax[i] >= 0) {
int _px = px[i] >> KAB_PRECISION; int _px = px[i] >> KAB_PRECISION;
#ifdef ICON_KABOOM_EXTRA
XClearArea(dpy, scr->root_win, ptx[1][i], pty[1][i],
ICON_KABOOM_PIECE_SIZE, ICON_KABOOM_PIECE_SIZE, False);
ptx[1][i] = ptx[0][i];
pty[1][i] = pty[0][i];
ptx[0][i] = _px;
pty[0][i] = py[i];
#else
XClearArea(dpy, scr->root_win, _px, py[i], XClearArea(dpy, scr->root_win, _px, py[i],
ICON_KABOOM_PIECE_SIZE, ICON_KABOOM_PIECE_SIZE, False); ICON_KABOOM_PIECE_SIZE, ICON_KABOOM_PIECE_SIZE, False);
#endif
px[i] += pvx[i]; px[i] += pvx[i];
py[i] += pvy[i]; py[i] += pvy[i];
_px = px[i] >> KAB_PRECISION; _px = px[i] >> KAB_PRECISION;
pvy[i]++; pvy[i]++;
if (_px < -wPreferences.icon_size || _px > sw || py[i] >= sh) { if (_px < -wPreferences.icon_size || _px > sw || py[i] >= sh) {
#ifdef ICON_KABOOM_EXTRA
if (py[i] > sh && _px < sw && _px > 0) {
pvy[i] = -(pvy[i] / 2);
if (abs(pvy[i]) > 3) {
py[i] = sh - ICON_KABOOM_PIECE_SIZE;
XCopyArea(dpy, tmp, scr->root_win, scr->copy_gc,
ax[i] * ICON_KABOOM_PIECE_SIZE,
ay[i] * ICON_KABOOM_PIECE_SIZE,
ICON_KABOOM_PIECE_SIZE,
ICON_KABOOM_PIECE_SIZE, _px, py[i]);
} else {
ax[i] = -1;
}
} else {
ax[i] = -1;
}
if (ax[i] < 0) {
for (ll = 0; ll < 2; ll++)
XClearArea(dpy, scr->root_win, ptx[ll][i], pty[ll][i],
ICON_KABOOM_PIECE_SIZE,
ICON_KABOOM_PIECE_SIZE, False);
k--;
}
#else /* !ICON_KABOOM_EXTRA */
ax[i] = -1; ax[i] = -1;
k--; k--;
#endif /* !ICON_KABOOM_EXTRA */
} else { } else {
XCopyArea(dpy, tmp, scr->root_win, scr->copy_gc, XCopyArea(dpy, tmp, scr->root_win, scr->copy_gc,
ax[i] * ICON_KABOOM_PIECE_SIZE, ay[i] * ICON_KABOOM_PIECE_SIZE, ax[i] * ICON_KABOOM_PIECE_SIZE, ay[i] * ICON_KABOOM_PIECE_SIZE,

View File

@@ -123,11 +123,6 @@
#undef SHADOW_RESIZEBAR #undef SHADOW_RESIZEBAR
#define NORMAL_ICON_KABOOM #define NORMAL_ICON_KABOOM
/*
* Define ICON_KABOOM_EXTRA if you want extra fancy icon undocking
* explosion animation.
*/
#undef ICON_KABOOM_EXTRA
/* /*
* #define if you want the window creation animation when superfluous * #define if you want the window creation animation when superfluous