[Qb2c-cvs] goengine/src/editor mapedit.cpp,1.11,1.12
Brought to you by:
b_lindeijer,
syn9
|
From: <b_l...@us...> - 2004-01-20 15:06:32
|
Update of /cvsroot/qb2c/goengine/src/editor
In directory sc8-pr-cvs1:/tmp/cvs-serv17380/src/editor
Modified Files:
mapedit.cpp
Log Message:
Warning fixes and editor now compiles ('or' appears to be a reserved keyword)
Index: mapedit.cpp
===================================================================
RCS file: /cvsroot/qb2c/goengine/src/editor/mapedit.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** mapedit.cpp 20 Jan 2004 11:23:34 -0000 1.11
--- mapedit.cpp 20 Jan 2004 15:06:29 -0000 1.12
***************
*** 2750,2754 ****
{
! short x, y, i, an, j, pl, po, plane, poly, nx, ny, p, or, og, ob, nr, ng, nb, lightr, lightg, lightb, p1, p2, p3;
short ambientr, ambientg, ambientb, spanr, spang, spanb, focusstep, l, a, b;
float xr, yr, zr, dist, intense, strength, xx, yy, zz;
--- 2750,2754 ----
{
! short x, y, i, an, j, pl, po, plane, poly, nx, ny, p, nr, ng, nb, lightr, lightg, lightb, p1, p2, p3;
short ambientr, ambientg, ambientb, spanr, spang, spanb, focusstep, l, a, b;
float xr, yr, zr, dist, intense, strength, xx, yy, zz;
***************
*** 2756,2760 ****
float ax, ay, az, bx, by, bz, ii, jj, kk, d, d1, d2, normalx, normaly, normalz;
! int cgrey = makecol(128,128,128), whitec = makecol(192,192,192);
char tmp[100];
--- 2756,2760 ----
float ax, ay, az, bx, by, bz, ii, jj, kk, d, d1, d2, normalx, normaly, normalz;
! int cgrey = makecol(128,128,128);
char tmp[100];
***************
*** 3110,3113 ****
--- 3110,3115 ----
for (y = 0; y < 16; y++)
{
+ short old_r, old_g, old_b;
+
nr = 0;
ng = 0;
***************
*** 3115,3121 ****
c = getpixel(planeinfo[i].radiosity[j], x, y);
! or = getr(c);
! og = getg(c);
! ob = getb(c);
p = 0;
--- 3117,3123 ----
c = getpixel(planeinfo[i].radiosity[j], x, y);
! old_r = getr(c);
! old_g = getg(c);
! old_b = getb(c);
p = 0;
***************
*** 3148,3154 ****
if (nb > 255) nb = 255;
! if (nr < or) nr = or;
! if (ng < og) ng = og;
! if (nb < ob) nb = ob;
putpixel(planeinfo[i].radiosity[j], x, y, makecol(nr, ng, nb));
--- 3150,3156 ----
if (nb > 255) nb = 255;
! if (nr < old_r) nr = old_r;
! if (ng < old_g) ng = old_g;
! if (nb < old_b) nb = old_b;
putpixel(planeinfo[i].radiosity[j], x, y, makecol(nr, ng, nb));
***************
*** 3219,3223 ****
camry = bk_camry;
camrz = bk_camrz;
! scrny = bk_scrny;
gridbase = bk_gridbase;
xzoomratio = bk_xzoomratio;
--- 3221,3225 ----
camry = bk_camry;
camrz = bk_camrz;
! scrny = short(bk_scrny);
gridbase = bk_gridbase;
xzoomratio = bk_xzoomratio;
***************
*** 3318,3336 ****
for (b = x + 1; b <= xx; b++)
{
! vtx[i][0] = x * sx;
! vtx[i][1] = y * sy;
! vtx[i][2] = x * sx;
! vtx[i][3] = a * sy;
! vtx[i][4] = b * sx;
! vtx[i][5] = y * sy;
i++;
! vtx[i][0] = b * sx;
! vtx[i][1] = a * sy;
! vtx[i][2] = b * sx;
! vtx[i][3] = y * sy;
! vtx[i][4] = x * sx;
! vtx[i][5] = a * sy;
i++;
--- 3320,3338 ----
for (b = x + 1; b <= xx; b++)
{
! vtx[i][0] = short(x * sx);
! vtx[i][1] = short(y * sy);
! vtx[i][2] = short(x * sx);
! vtx[i][3] = short(a * sy);
! vtx[i][4] = short(b * sx);
! vtx[i][5] = short(y * sy);
i++;
! vtx[i][0] = short(b * sx);
! vtx[i][1] = short(a * sy);
! vtx[i][2] = short(b * sx);
! vtx[i][3] = short(y * sy);
! vtx[i][4] = short(x * sx);
! vtx[i][5] = short(a * sy);
i++;
***************
*** 3348,3366 ****
for (b = x + 1; b <= xx; b++)
{
! vtx[i][0] = x * sx;
! vtx[i][1] = a * sy;
! vtx[i][2] = b * sx;
! vtx[i][3] = a * sy;
! vtx[i][4] = x * sx;
! vtx[i][5] = y * sy;
i++;
! vtx[i][0] = b * sx;
! vtx[i][1] = y * sy;
! vtx[i][2] = x * sx;
! vtx[i][3] = y * sy;
! vtx[i][4] = b * sx;
! vtx[i][5] = a * sy;
i++;
--- 3350,3368 ----
for (b = x + 1; b <= xx; b++)
{
! vtx[i][0] = short(x * sx);
! vtx[i][1] = short(a * sy);
! vtx[i][2] = short(b * sx);
! vtx[i][3] = short(a * sy);
! vtx[i][4] = short(x * sx);
! vtx[i][5] = short(y * sy);
i++;
! vtx[i][0] = short(b * sx);
! vtx[i][1] = short(y * sy);
! vtx[i][2] = short(x * sx);
! vtx[i][3] = short(y * sy);
! vtx[i][4] = short(b * sx);
! vtx[i][5] = short(a * sy);
i++;
***************
*** 3447,3451 ****
}
} else {
! p = selpoint[c][3];
}
--- 3449,3453 ----
}
} else {
! p = int(selpoint[c][3]);
}
***************
*** 3605,3610 ****
if (planeinfo[c].pointinfo[a][9] > 0 && planeinfo[c].pointinfo[a][10] == 0)
{
! lightnum = planeinfo[c].pointinfo[a][9] - 1;
! lights[nlights][0] = planeinfo[c].pointinfo[a][6];
lights[nlights][1] = lightnum;
nlights++;
--- 3607,3612 ----
if (planeinfo[c].pointinfo[a][9] > 0 && planeinfo[c].pointinfo[a][10] == 0)
{
! lightnum = int(planeinfo[c].pointinfo[a][9]) - 1;
! lights[nlights][0] = short(planeinfo[c].pointinfo[a][6]);
lights[nlights][1] = lightnum;
nlights++;
***************
*** 3618,3624 ****
if (planeinfo[c].polyinfo[a][6] < 2)
{
! tpoly.p1 = planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][0]][6];
! tpoly.p2 = planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][1]][6];
! tpoly.p3 = planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][2]][6];
tpoly.tx = planeinfo[c].polyinfo[a][3];
tpoly.u[0] = planeinfo[c].polyvtx[a][0];
--- 3620,3626 ----
if (planeinfo[c].polyinfo[a][6] < 2)
{
! tpoly.p1 = int(planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][0]][6]);
! tpoly.p2 = int(planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][1]][6]);
! tpoly.p3 = int(planeinfo[c].pointinfo[planeinfo[c].polyinfo[a][2]][6]);
tpoly.tx = planeinfo[c].polyinfo[a][3];
tpoly.u[0] = planeinfo[c].polyvtx[a][0];
|