Update of /cvsroot/qb2c/goengine/src/engine
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18293/src/engine
Modified Files:
engineglobals.cpp engineglobals.h fileinput.cpp render.cpp
Log Message:
Engine/Editor Updates
added
- door opening animation
- brightness control for polies in editor
- 'h' key can only affect selected polies in editor
- camera hotspots / camera auto angling
Index: fileinput.cpp
===================================================================
RCS file: /cvsroot/qb2c/goengine/src/engine/fileinput.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** fileinput.cpp 8 Nov 2004 14:17:36 -0000 1.8
--- fileinput.cpp 8 Nov 2004 16:28:27 -0000 1.9
***************
*** 25,31 ****
BITMAP *temppcx;
! sprintf(mapfile, "data/maps/%s.dtl", rfile);
! fp = fopen(mapfile, "r");
fscanf(fp, "%d", &c);
--- 25,32 ----
BITMAP *temppcx;
! sprintf(mapfile, "%s", rfile);
! sprintf(tmp, "data/maps/%s.dtl", mapfile);
! fp = fopen(tmp, "r");
fscanf(fp, "%d", &c);
***************
*** 48,52 ****
//win (0, lx, ly, rx + 6, ry);
! updscreen();
int bluec = makecol(64, 255, 64);
--- 49,53 ----
//win (0, lx, ly, rx + 6, ry);
! //updscreen();
int bluec = makecol(64, 255, 64);
***************
*** 57,70 ****
//drawing_mode(DRAW_MODE_TRANS, NULL, 0, 0);
! win (0, lx-4, ly, rx + 10, ry + 20);
for (c = 0; c <= endplane; c++)
{
! sprintf(tmp, "Loading...");
textout(offscreen, font, tmp, lx + 2, ly + 2, whitec);
rect (offscreen, lx, ly + 16, lx + w , ly + h + 16, whitec);
rectfill (offscreen, lx + 2, ly + 16 + 2, lx + (w - 4) * (float)c / endplane, ly + h + 16 - 2, bluec);
! updscreen();
fscanf(fp, "%d", &d);
--- 58,71 ----
//drawing_mode(DRAW_MODE_TRANS, NULL, 0, 0);
! //win (0, lx-4, ly, rx + 10, ry + 20);
for (c = 0; c <= endplane; c++)
{
! /*sprintf(tmp, "Loading...");
textout(offscreen, font, tmp, lx + 2, ly + 2, whitec);
rect (offscreen, lx, ly + 16, lx + w , ly + h + 16, whitec);
rectfill (offscreen, lx + 2, ly + 16 + 2, lx + (w - 4) * (float)c / endplane, ly + h + 16 - 2, bluec);
! updscreen();*/
fscanf(fp, "%d", &d);
***************
*** 154,158 ****
fclose(fp);
! updscreen();
/*int a;
--- 155,159 ----
fclose(fp);
! //updscreen();
/*int a;
Index: render.cpp
===================================================================
RCS file: /cvsroot/qb2c/goengine/src/engine/render.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** render.cpp 8 Nov 2004 14:17:36 -0000 1.16
--- render.cpp 8 Nov 2004 16:28:27 -0000 1.17
***************
*** 1,26 ****
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #include <math.h>
!
! #include "engineglobals.h"
#include "render.h"
#include "fileinput.h"
!
!
! void calcpoints()
! {
! short sleft, sright, sup, sdown;
! float nsx, nsy, nsz, sx, sy, sz;
! float psx, psy, psz, wsx, wsy, wsz, d, xx, yy, zz;
unsigned int i;
--- 1,26 ----
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #include <math.h>
!
! #include "engineglobals.h"
#include "render.h"
#include "fileinput.h"
!
!
! void calcpoints()
! {
! short sleft, sright, sup, sdown;
! float nsx, nsy, nsz, sx, sy, sz;
! float psx, psy, psz, wsx, wsy, wsz, d, xx, yy, zz;
unsigned int i;
***************
*** 36,43 ****
scy = scrny;
! sleft = -xc;
! sright = xr + xc;
sup = -yc;
! sdown = yr + yc;
npoints = 0;
--- 36,43 ----
scy = scrny;
! sleft = -xr * 2;
! sright = xr * 3;
sup = -yc;
! sdown = yr * 5;
npoints = 0;
***************
*** 63,71 ****
psy = nsx * prexy + nsy * preyy + nsz * prezy;
psz = nsx * prexz + nsy * preyz + nsz * prezz;
!
! for (i = 0; i != pointinfo.size(); i++)
{
if (!pointinfo[i].active) continue;
!
wsx = 0;
wsy = 0;
--- 63,71 ----
psy = nsx * prexy + nsy * preyy + nsz * prezy;
psz = nsx * prexz + nsy * preyz + nsz * prezz;
!
! for (i = 0; i != pointinfo.size(); i++)
{
if (!pointinfo[i].active) continue;
!
wsx = 0;
wsy = 0;
***************
*** 103,109 ****
! nsx = pointinfo[i].nsx;
! nsy = pointinfo[i].nsy;
! nsz = pointinfo[i].nsz;
sx = nsx + wsx + psx - camx;
--- 103,109 ----
! nsx = pointinfo[i].nsx;
! nsy = pointinfo[i].nsy;
! nsz = pointinfo[i].nsz;
sx = nsx + wsx + psx - camx;
***************
*** 116,125 ****
pointinfo[i].psy = sy + vdist;
pointinfo[i].psz = sz + vdist;
!
! pointinfo[i].flag = 1;
!
! if (sz == 0) sz = -.1;
!
! if (sz > -.5 && !generating_radiosity) continue;
if (sz > -.5 && generating_radiosity) continue;
--- 116,125 ----
pointinfo[i].psy = sy + vdist;
pointinfo[i].psz = sz + vdist;
!
! pointinfo[i].flag = 1;
!
! if (sz == 0) sz = -.1;
!
! //if (sz > -.5 && !generating_radiosity) continue;
if (sz > -.5 && generating_radiosity) continue;
***************
*** 129,158 ****
if (!generating_radiosity)
{
! if (pointinfo[i].x < sleft || pointinfo[i].x > sright) continue;
if (pointinfo[i].y < sup || pointinfo[i].y > sdown) continue;
}
!
! pointinfo[i].scale = -sz * 75;
!
pointinfo[i].flag = 0;
! npoints++;
! }
! }
!
!
!
!
! void calcsteps()
! {
! // Rel's performance addition to the QB engine (which seems to be unnecessary given
! // this post (http://forum.qbasicnews.com/viewtopic.php?p=46965#46965) by syn9)
! //Rotmatrix(camrx, camry, camrz);
!
float stpc = stp;
//if (generating_radiosity) stp = 2 * stp;
! rotpnt(-stp, 0, 0, 0, camry, 0, &prexx, &prexy, &prexz);
! rotpnt( 0, stp, 0, 0, camry, 0, &preyx, &preyy, &preyz);
rotpnt( 0, 0, stp, 0, camry, 0, &prezx, &prezy, &prezz);
--- 129,158 ----
if (!generating_radiosity)
{
! if (pointinfo[i].x < sleft || pointinfo[i].x > sright) continue;
if (pointinfo[i].y < sup || pointinfo[i].y > sdown) continue;
}
!
! pointinfo[i].scale = -sz * 75;
!
pointinfo[i].flag = 0;
! npoints++;
! }
! }
!
!
!
!
! void calcsteps()
! {
! // Rel's performance addition to the QB engine (which seems to be unnecessary given
! // this post (http://forum.qbasicnews.com/viewtopic.php?p=46965#46965) by syn9)
! //Rotmatrix(camrx, camry, camrz);
!
float stpc = stp;
//if (generating_radiosity) stp = 2 * stp;
! rotpnt(-stp, 0, 0, 0, camry, 0, &prexx, &prexy, &prexz);
! rotpnt( 0, stp, 0, 0, camry, 0, &preyx, &preyy, &preyz);
rotpnt( 0, 0, stp, 0, camry, 0, &prezx, &prezy, &prezz);
***************
*** 161,198 ****
rotpnt(prezx, prezy, prezz, camrx, 0, 0, &prezx, &prezy, &prezz);
! stp = stpc;
! }
!
!
!
!
! // Update the fading state of the screen if necessary
! void fade()
! {
! if (current_fade_level != target_fade_level)
! {
! if (current_fade_level > target_fade_level)
! {
! // Fade out
! current_fade_level -= fade_speed;
! if (current_fade_level < target_fade_level)
! current_fade_level = target_fade_level;
! }
! else if (current_fade_level < target_fade_level)
! {
! // Fade in
! current_fade_level += fade_speed;
! if (current_fade_level > target_fade_level)
! current_fade_level = target_fade_level;
! }
! }
!
! if (current_fade_level < 1.0 && current_fade_level >= 0.0)
! {
! set_trans_blender(0,0,0, 255 - int(current_fade_level * 255));
! drawing_mode(DRAW_MODE_TRANS, NULL, 0, 0);
! rectfill(offscreen, 0, 0, SCREEN_W, SCREEN_H, 0);
! drawing_mode(DRAW_MODE_SOLID, NULL, 0, 0);
! }
}
--- 161,198 ----
rotpnt(prezx, prezy, prezz, camrx, 0, 0, &prezx, &prezy, &prezz);
! stp = stpc;
! }
!
!
!
!
! // Update the fading state of the screen if necessary
! void fade()
! {
! if (current_fade_level != target_fade_level)
! {
! if (current_fade_level > target_fade_level)
! {
! // Fade out
! current_fade_level -= fade_speed;
! if (current_fade_level < target_fade_level)
! current_fade_level = target_fade_level;
! }
! else if (current_fade_level < target_fade_level)
! {
! // Fade in
! current_fade_level += fade_speed;
! if (current_fade_level > target_fade_level)
! current_fade_level = target_fade_level;
! }
! }
!
! if (current_fade_level < 1.0 && current_fade_level >= 0.0)
! {
! set_trans_blender(0,0,0, 255 - int(current_fade_level * 255));
! drawing_mode(DRAW_MODE_TRANS, NULL, 0, 0);
! rectfill(offscreen, 0, 0, SCREEN_W, SCREEN_H, 0);
! drawing_mode(DRAW_MODE_SOLID, NULL, 0, 0);
! }
}
***************
*** 257,261 ****
return (d - scrny);
! }
void initialize(short bits, short mode, short xsize, short ysize)
--- 257,261 ----
return (d - scrny);
! }
void initialize(short bits, short mode, short xsize, short ysize)
***************
*** 271,279 ****
int gfx_mode;
! if (mode == 0) {
! gfx_mode = GFX_AUTODETECT_WINDOWED;
! } else {
! gfx_mode = GFX_AUTODETECT_FULLSCREEN;
! }
xcenter = xres / 2;
--- 271,279 ----
int gfx_mode;
! if (mode == 0) {
! gfx_mode = GFX_AUTODETECT_WINDOWED;
! } else {
! gfx_mode = GFX_AUTODETECT_FULLSCREEN;
! }
xcenter = xres / 2;
***************
*** 349,354 ****
camrz = 0;
- sgamma = 1;
-
scrny = short(-12 * xres / 320);
--- 349,352 ----
***************
*** 361,396 ****
}
!
! // Rel's performance additions to the QB engine
! void Rotmatrix(float AngleX, float AngleY, float AngleZ)
! {
! float rAnglex, rAngley, rAnglez, cx, cy, cz, sx, sy, sz;
!
! rAnglex = AngleX * rad;
! rAngley = AngleY * rad;
! rAnglez = AngleZ * rad;
!
! //Precalculate the SIN and COS of each angle
! cx = cos(rAnglex);
! sx = sin(rAnglex);
! cy = cos(rAngley);
! sy = sin(rAngley);
! cz = cos(rAnglez);
! sz = sin(rAnglez);
!
! //Transformation matrix formula
!
! tx1 = cy * cz;
! tx2 = cy * sz;
! tx3 = -sy;
! ty1 = cx * -sz + sx * sy * cz;
! ty2 = cx * cz + sx * sy * sz;
! ty3 = sx * cy;
! tz1 = -sx * -sz + cx * sy * cz;
! tz2 = -sx * cz + cz * sy * sz;
! tz3 = cx * cy;
! }
!
! void rotpnt(float px, float py, float pz, float xr, float yr, float zr, float* newx, float* newy, float* newz)
{
--- 359,394 ----
}
!
! // Rel's performance additions to the QB engine
! void Rotmatrix(float AngleX, float AngleY, float AngleZ)
! {
! float rAnglex, rAngley, rAnglez, cx, cy, cz, sx, sy, sz;
!
! rAnglex = AngleX * rad;
! rAngley = AngleY * rad;
! rAnglez = AngleZ * rad;
!
! //Precalculate the SIN and COS of each angle
! cx = cos(rAnglex);
! sx = sin(rAnglex);
! cy = cos(rAngley);
! sy = sin(rAngley);
! cz = cos(rAnglez);
! sz = sin(rAnglez);
!
! //Transformation matrix formula
!
! tx1 = cy * cz;
! tx2 = cy * sz;
! tx3 = -sy;
! ty1 = cx * -sz + sx * sy * cz;
! ty2 = cx * cz + sx * sy * sz;
! ty3 = sx * cy;
! tz1 = -sx * -sz + cx * sy * cz;
! tz2 = -sx * cz + cz * sy * sz;
! tz3 = cx * cy;
! }
!
! void rotpnt(float px, float py, float pz, float xr, float yr, float zr, float* newx, float* newy, float* newz)
{
***************
*** 411,458 ****
ry3 = ry2;
! *newx = rx3;
! *newy = ry3;
! *newz = rz3;
! }
!
! void sortpolys()
! {
! int i = 0, p1, p2, p3;
! float nsx, nsy, nsz, psx, psy, psz;
! short x1, y1, x2, y2, x3, y3;
! float znormal;
!
! nsx = -focusofs[0];
! nsy = -focusofs[1];
! nsz = -focusofs[2];
!
! psx = nsx * prexx + nsy * preyx + nsz * prezx;
! psy = nsx * prexy + nsy * preyy + nsz * prezy;
! psz = nsx * prexz + nsy * preyz + nsz * prezz;
!
!
! for(std::vector<poly_t>::const_iterator itr = polyinfo.begin(); itr != polyinfo.end(); ++itr, ++i)
! {
! bool b = pointinfo[ itr->p1].flag | pointinfo[ itr->p2].flag | pointinfo[ itr->p3].flag;
!
! if(!b)
! {
! p1 = polyinfo[i].p1;
! p2 = polyinfo[i].p2;
p3 = polyinfo[i].p3;
!
!
if (bfc)
{
! x1 = short(pointinfo[p1].x);
! y1 = short(pointinfo[p1].y);
! x2 = short(pointinfo[p2].x);
! y2 = short(pointinfo[p2].y);
! x3 = short(pointinfo[p3].x);
! y3 = short(pointinfo[p3].y);
!
znormal = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
if (znormal < 0) continue;
! }
if (generating_radiosity && (pointinfo[p1].sz > 0 && pointinfo[p2].sz > 0 && pointinfo[p3].sz > 0)) continue;
--- 409,456 ----
ry3 = ry2;
! *newx = rx3;
! *newy = ry3;
! *newz = rz3;
! }
!
! void sortpolys()
! {
! int i = 0, p1, p2, p3;
! float nsx, nsy, nsz, psx, psy, psz;
! short x1, y1, x2, y2, x3, y3;
! float znormal;
!
! nsx = -focusofs[0];
! nsy = -focusofs[1];
! nsz = -focusofs[2];
!
! psx = nsx * prexx + nsy * preyx + nsz * prezx;
! psy = nsx * prexy + nsy * preyy + nsz * prezy;
! psz = nsx * prexz + nsy * preyz + nsz * prezz;
!
!
! for(std::vector<poly_t>::const_iterator itr = polyinfo.begin(); itr != polyinfo.end(); ++itr, ++i)
! {
! bool b = pointinfo[ itr->p1].flag | pointinfo[ itr->p2].flag | pointinfo[ itr->p3].flag;
!
! if(!b)
! {
! p1 = polyinfo[i].p1;
! p2 = polyinfo[i].p2;
p3 = polyinfo[i].p3;
!
!
if (bfc)
{
! x1 = short(pointinfo[p1].x);
! y1 = short(pointinfo[p1].y);
! x2 = short(pointinfo[p2].x);
! y2 = short(pointinfo[p2].y);
! x3 = short(pointinfo[p3].x);
! y3 = short(pointinfo[p3].y);
!
znormal = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
if (znormal < 0) continue;
! }
if (generating_radiosity && (pointinfo[p1].sz > 0 && pointinfo[p2].sz > 0 && pointinfo[p3].sz > 0)) continue;
***************
*** 462,488 ****
if (generating_radiosity && (pointinfo[p1].y > yres && pointinfo[p2].y > yres && pointinfo[p3].y > yres)) continue;
!
! int ind = (int)(pointinfo[ itr->p1].scale + pointinfo[ itr->p2].scale + pointinfo[ itr->p3].scale) / 3;
!
! for(;;)
! {
! if (ind > vdist || ind < 0)
! break;
!
! if (dbuffer[ind] > 0)
! ind = ind + 1;
! if (dbuffer[ind] == 0)
! {
! dbuffer[ind] = i + 100;
!
! if (ind < start)
! start = ind;
! if (ind > depth)
! depth = ind;
! break;
! }
! }
! }
! }
}
--- 460,486 ----
if (generating_radiosity && (pointinfo[p1].y > yres && pointinfo[p2].y > yres && pointinfo[p3].y > yres)) continue;
!
! int ind = (int)(pointinfo[ itr->p1].scale + pointinfo[ itr->p2].scale + pointinfo[ itr->p3].scale) / 3;
!
! for(;;)
! {
! if (ind > vdist || ind < 0)
! break;
!
! if (dbuffer[ind] > 0)
! ind = ind + 1;
! if (dbuffer[ind] == 0)
! {
! dbuffer[ind] = i + 100;
!
! if (ind < start)
! start = ind;
! if (ind > depth)
! depth = ind;
! break;
! }
! }
! }
! }
}
***************
*** 499,503 ****
return(d);
}
!
void updscreen()
{
--- 497,501 ----
return(d);
}
!
void updscreen()
{
***************
*** 516,520 ****
blit(offscreen, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);
show_mouse(NULL);
! }
short valid(short x, short y)
--- 514,518 ----
blit(offscreen, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);
show_mouse(NULL);
! }
short valid(short x, short y)
***************
*** 529,536 ****
else
return(0);
! }
!
! void win(short l, short x1, short y1, short x2, short y2)
! {
int mgreyc, lgreyc;
--- 527,534 ----
else
return(0);
! }
!
! void win(short l, short x1, short y1, short x2, short y2)
! {
int mgreyc, lgreyc;
***************
*** 564,569 ****
}
}
!
! }
--- 562,567 ----
}
}
!
! }
Index: engineglobals.cpp
===================================================================
RCS file: /cvsroot/qb2c/goengine/src/engine/engineglobals.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** engineglobals.cpp 8 Nov 2004 14:17:36 -0000 1.6
--- engineglobals.cpp 8 Nov 2004 16:28:27 -0000 1.7
***************
*** 1,80 ****
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #include "engineglobals.h"
!
!
! std::vector<point_t> pointinfo;
! std::vector<poly_t> polyinfo;
!
plane_t planeinfo[max_planes];
light_t lightinfo[max_lights];
short lights[max_lights][2];
int vdist, zm;
! char textureset[100], mapfile[100];
!
! float camx, camy, camz, sgamma;
short scrny;
! int lightres;
!
! float tx1, tx2, tx3;
! float ty1, ty2, ty3;
! float tz1, tz2, tz3;
! float stp;
!
! float rx0, rx1, rx2, rx3;
! float ry0, ry1, ry2, ry3;
float rz0, rz1, rz2, rz3;
float prexx, preyx, prezx;
float prexy, preyy, prezy;
! float prexz, preyz, prezz;
!
! float camrx, camry, camrz;
!
! float basescrny;
!
! short bvsync = 1;
!
! short start, depth;
!
! short dbuffer[viewdist+1];
!
bool bfc, sound;
! short trigger[100];
short FPS = 0, fp, mapx, mapz, vispolys, npolies, npoints, refreshrate, nplanes, endplane, lastlight;
! double globaltime, timer, freeze;
!
short nvtx;
! short vtx[256][6];
! float fpsr, ripplex, ripplez, rippleamp, ripplefalloff, ripplewash;
!
! float current_fade_level = 1.0; // 0.0 = black; 1.0 = normal;
! float target_fade_level = 1.0; // the fade level we want to fade to
! float fade_speed = 0.04; // change per frame (should become per second)
!
! float fightfocus[3], focusofs[3];
!
! BITMAP *textures[300];
! BITMAP *sprites[128];
! BITMAP *offscreen, *temp, *temp2;
!
! PALETTE pal;
! COLOR_MAP trans_table;
!
! int xres, xcenter, yres, ycenter, wideheight;
! float xzoomratio, yzoomratio;
! bool generating_radiosity, view_updated, use_joy;
--- 1,82 ----
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #include "engineglobals.h"
!
!
! std::vector<point_t> pointinfo;
! std::vector<poly_t> polyinfo;
!
plane_t planeinfo[max_planes];
light_t lightinfo[max_lights];
+ plane_t camera[9];
+
short lights[max_lights][2];
int vdist, zm;
! char textureset[100], mapfile[100];
!
! float camx, camy, camz;
short scrny;
! int lightres;
!
! float tx1, tx2, tx3;
! float ty1, ty2, ty3;
! float tz1, tz2, tz3;
! float stp;
!
! float rx0, rx1, rx2, rx3;
! float ry0, ry1, ry2, ry3;
float rz0, rz1, rz2, rz3;
float prexx, preyx, prezx;
float prexy, preyy, prezy;
! float prexz, preyz, prezz;
!
! float camrx, camry, camrz;
!
! float basescrny;
!
! short bvsync = 1;
!
! short start, depth;
!
! short dbuffer[viewdist+1];
!
bool bfc, sound;
! short trigger[100];
short FPS = 0, fp, mapx, mapz, vispolys, npolies, npoints, refreshrate, nplanes, endplane, lastlight;
! double globaltime, timer, freeze;
!
short nvtx;
! short vtx[256][6];
! float fpsr, ripplex, ripplez, rippleamp, ripplefalloff, ripplewash;
! float current_fade_level = 1.0; // 0.0 = black; 1.0 = normal;
! float target_fade_level = 1.0; // the fade level we want to fade to
! float fade_speed = 0.04; // change per frame (should become per second)
!
! float fightfocus[3], focusofs[3];
!
! BITMAP *textures[300];
! BITMAP *sprites[128];
! BITMAP *offscreen, *temp, *temp2;
!
! PALETTE pal;
! COLOR_MAP trans_table;
!
! int xres, xcenter, yres, ycenter, wideheight;
! float xzoomratio, yzoomratio;
!
! bool generating_radiosity;
Index: engineglobals.h
===================================================================
RCS file: /cvsroot/qb2c/goengine/src/engine/engineglobals.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** engineglobals.h 8 Nov 2004 14:17:36 -0000 1.6
--- engineglobals.h 8 Nov 2004 16:28:27 -0000 1.7
***************
*** 1,24 ****
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #ifndef INCLUDED_ENGINEGLOBALS_HEADER
! #define INCLUDED_ENGINEGLOBALS_HEADER
!
! // The size of this file is exponentionaly propotional to the need of
! // refactoring
!
!
! #define pi 3.141592
! #define rad pi / 180
!
#define viewdist 22999
#define yes 1
--- 1,24 ----
! /*
! Generation Olympia Engine - C++ Port
! Project Home: http://www.sourceforge.net/projects/qb2c/
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! $Id$
! */
!
! #ifndef INCLUDED_ENGINEGLOBALS_HEADER
! #define INCLUDED_ENGINEGLOBALS_HEADER
!
! // The size of this file is exponentionaly propotional to the need of
! // refactoring
!
!
! #define pi 3.141592
! #define rad pi / 180
!
#define viewdist 22999
#define yes 1
***************
*** 28,32 ****
#define left 2
#define right 3
!
#define max_planes 200
#define max_polies 2200
--- 28,32 ----
#define left 2
#define right 3
!
#define max_planes 200
#define max_polies 2200
***************
*** 34,62 ****
#define max_lights 200
! #include <allegro.h>
! #include <vector>
!
! struct point_t
! {
float nsx, nsy, nsz;
float sz;
! float psx, psy, psz;
float x, y;
! float xx, yy, zz, ybase;
! float scale;//guessing
bool flag;
bool active;
! int plane, point, water;
! };
!
! struct poly_t
! {
! int p1, p2, p3;
int tx;
! short u[3], v[3];
float nx, ny, nz;
! int plane, poly, clipped, trigger;
! };
!
extern std::vector<point_t> pointinfo;
extern std::vector<poly_t> polyinfo;
--- 34,62 ----
#define max_lights 200
! #include <allegro.h>
! #include <vector>
!
! struct point_t
! {
float nsx, nsy, nsz;
float sz;
! float psx, psy, psz;
float x, y;
! float xx, yy, zz, ybase;
! float scale;//guessing
bool flag;
bool active;
! int plane, point, water;
! };
!
! struct poly_t
! {
! int p1, p2, p3;
int tx;
! short u[3], v[3];
float nx, ny, nz;
! int plane, poly, clipped, trigger;
! };
!
extern std::vector<point_t> pointinfo;
extern std::vector<poly_t> polyinfo;
***************
*** 89,92 ****
--- 89,94 ----
extern light_t lightinfo[max_lights];
+ extern plane_t camera[9];
+
extern short lights[max_lights][2];
extern int vdist, zm;
***************
*** 94,98 ****
extern char textureset[100], mapfile[100];
! extern float camx, camy, camz, sgamma;
extern short scrny;
extern int lightres;
--- 96,100 ----
extern char textureset[100], mapfile[100];
! extern float camx, camy, camz;
extern short scrny;
extern int lightres;
***************
*** 146,150 ****
extern float xzoomratio, yzoomratio;
! extern bool generating_radiosity, view_updated, use_joy;
!
! #endif
--- 148,152 ----
extern float xzoomratio, yzoomratio;
! extern bool generating_radiosity;
!
! #endif
|