forked from e16/e16
1
0
Fork 0
SVN revision: 31984
This commit is contained in:
Kim Woelders 2007-10-06 06:38:41 +00:00
parent 9980a3d94a
commit 18c9eea067
1 changed files with 11 additions and 6 deletions

View File

@ -318,17 +318,22 @@ SceneDraw1(double t, EWin ** ewins, int num)
w = EobjGetW(GLWin.eo);
h = EobjGetH(GLWin.eo);
w = (3 * w) / 4;
DrawBackground(texture[sel_bg], w, h);
i = sqrt(w * h / (1.5 * num));
ny = h / i;
nx = num / ny;
i = sqrt(w * h / (1.0 * num));
nx = (w + i - 1) / i;
if (nx <= 0)
nx = 1;
ny = (num + nx - 1) / nx;
if (ny <= 0)
ny = 1;
#if 0
Eprintf("wxh=%fx%f num=%d nx,ny=%d,%d\n", w, h, num, nx, ny);
#endif
w /= nx;
h /= ny;
w = EobjGetW(GLWin.eo) / nx;
h = EobjGetH(GLWin.eo) / ny;
k = 0;
for (j = 0; j < ny; j++)
@ -344,7 +349,7 @@ SceneDraw1(double t, EWin ** ewins, int num)
dx = (fabs(dx) < 1.0) ? 0. : dx * sin(5. * t);
dy = 100.0f * exp(-t);
dy = (fabs(dy) < 1.0) ? 0. : dy * cos(5. * t);
sz = (k == sel_ewin) ? 1.0f : 0.5f;
sz = (k == sel_ewin) ? 0.6f : 0.5f;
DrawQube(EobjGetTexture(eo),
dx + (0.5f + i) * w, dy + (0.5f + j) * h, 500.0f,
sz * EobjGetW(eo), sz * EobjGetH(eo), rot_x, rot_y);