This list is closed, nobody may subscribe to it.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(19) |
Aug
(4) |
Sep
(20) |
Oct
(42) |
Nov
(80) |
Dec
(19) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(29) |
Feb
(100) |
Mar
(297) |
Apr
(115) |
May
(66) |
Jun
(145) |
Jul
(139) |
Aug
(19) |
Sep
(45) |
Oct
(53) |
Nov
(46) |
Dec
(148) |
| 2003 |
Jan
(277) |
Feb
(91) |
Mar
(17) |
Apr
(20) |
May
(63) |
Jun
(786) |
Jul
(1737) |
Aug
(740) |
Sep
(635) |
Oct
(538) |
Nov
(345) |
Dec
(652) |
| 2004 |
Jan
(1101) |
Feb
(557) |
Mar
(460) |
Apr
(154) |
May
(366) |
Jun
(296) |
Jul
(457) |
Aug
(582) |
Sep
(682) |
Oct
(515) |
Nov
(482) |
Dec
(711) |
| 2005 |
Jan
(819) |
Feb
(215) |
Mar
(398) |
Apr
(183) |
May
(459) |
Jun
(226) |
Jul
(303) |
Aug
(509) |
Sep
(566) |
Oct
(766) |
Nov
(294) |
Dec
(149) |
| 2006 |
Jan
(330) |
Feb
(192) |
Mar
(155) |
Apr
(633) |
May
(207) |
Jun
(51) |
Jul
(197) |
Aug
(121) |
Sep
(18) |
Oct
(54) |
Nov
(159) |
Dec
(134) |
| 2007 |
Jan
(341) |
Feb
(179) |
Mar
(220) |
Apr
(221) |
May
(71) |
Jun
(194) |
Jul
(283) |
Aug
(872) |
Sep
(406) |
Oct
(154) |
Nov
(103) |
Dec
(118) |
| 2008 |
Jan
(82) |
Feb
(192) |
Mar
(232) |
Apr
(215) |
May
(248) |
Jun
(604) |
Jul
(305) |
Aug
(228) |
Sep
(188) |
Oct
(195) |
Nov
(129) |
Dec
(110) |
| 2009 |
Jan
(182) |
Feb
(120) |
Mar
(150) |
Apr
(195) |
May
(74) |
Jun
(190) |
Jul
(339) |
Aug
(212) |
Sep
(101) |
Oct
(6) |
Nov
(7) |
Dec
(15) |
| 2010 |
Jan
(49) |
Feb
(127) |
Mar
(100) |
Apr
(60) |
May
(165) |
Jun
(41) |
Jul
(9) |
Aug
(32) |
Sep
(40) |
Oct
|
Nov
(7) |
Dec
(9) |
| 2011 |
Jan
(8) |
Feb
(8) |
Mar
(1) |
Apr
(6) |
May
(389) |
Jun
(278) |
Jul
(65) |
Aug
(10) |
Sep
(23) |
Oct
(67) |
Nov
(22) |
Dec
(96) |
| 2012 |
Jan
(30) |
Feb
(33) |
Mar
(54) |
Apr
(32) |
May
(3) |
Jun
(16) |
Jul
(44) |
Aug
(8) |
Sep
(4) |
Oct
(3) |
Nov
(4) |
Dec
(25) |
| 2013 |
Jan
(72) |
Feb
(23) |
Mar
(53) |
Apr
(16) |
May
(51) |
Jun
(37) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(1) |
2
(35) |
3
(13) |
4
(10) |
|
5
(25) |
6
(13) |
7
(16) |
8
(6) |
9
(24) |
10
(12) |
11
(36) |
|
12
(36) |
13
(55) |
14
(50) |
15
(18) |
16
(22) |
17
(1) |
18
(14) |
|
19
(22) |
20
(28) |
21
(34) |
22
(22) |
23
(18) |
24
(13) |
25
(19) |
|
26
(24) |
27
(22) |
28
(29) |
29
(35) |
30
(29) |
|
|
|
From: Dave R. <tr...@us...> - 2004-09-30 23:46:45
|
Update of /cvsroot/bzflag/bzflag/src/bzfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27264 Modified Files: bzfs.cxx Log Message: fix for TimeKeeper::timestamp() transient data problem Index: bzfs.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzfs/bzfs.cxx,v retrieving revision 1.888 retrieving revision 1.889 diff -w -u -r1.888 -r1.889 --- bzfs.cxx 29 Sep 2004 19:34:41 -0000 1.888 +++ bzfs.cxx 30 Sep 2004 23:46:33 -0000 1.889 @@ -2115,11 +2115,10 @@ } // status message + std::string timeStamp = TimeKeeper::timestamp(); DEBUG1("Player %s [%d] removed at %s: %s\n", playerData->player.getCallSign(), - playerIndex, - TimeKeeper::timestamp(), - reason); + playerIndex, timeStamp.c_str(), reason); bool wasPlaying = playerData->player.isPlaying(); playerData->netHandler->closing(); |
|
From: Tupone A. <at...@us...> - 2004-09-30 23:10:50
|
Update of /cvsroot/bzflag/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19598 Modified Files: ChangeLog Log Message: Buffering UDP Index: ChangeLog =================================================================== RCS file: /cvsroot/bzflag/bzflag/ChangeLog,v retrieving revision 1.262 retrieving revision 1.263 diff -w -u -r1.262 -r1.263 --- ChangeLog 30 Sep 2004 22:44:05 -0000 1.262 +++ ChangeLog 30 Sep 2004 23:10:37 -0000 1.263 @@ -5,6 +5,7 @@ --------------------------- * Adding ability to load world from url (http, ftp, file) - Alfredo Tupone +* Reduce network load by buffering UDP packet (no delay) - Alfredo Tupone * Allow server to control lat and long (-synclocation) - Daniel Remenak * Added tank spawn expansion effect - Dave Rodgers * Added tank squishiness - Dave Rodgers, Dave Brosius |
|
From: Tupone A. <at...@us...> - 2004-09-30 22:44:15
|
Update of /cvsroot/bzflag/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12341 Modified Files: ChangeLog Log Message: bzgirl should be named, staying in 80 columns, and adding url world loading Index: ChangeLog =================================================================== RCS file: /cvsroot/bzflag/bzflag/ChangeLog,v retrieving revision 1.261 retrieving revision 1.262 diff -w -u -r1.261 -r1.262 --- ChangeLog 29 Sep 2004 21:52:51 -0000 1.261 +++ ChangeLog 30 Sep 2004 22:44:05 -0000 1.262 @@ -4,7 +4,8 @@ BZFlag 1.12.0 (was 1.11.x) --------------------------- -* Allow server to control latitude and longitude (-synclocation) - Daniel Remenak +* Adding ability to load world from url (http, ftp, file) - Alfredo Tupone +* Allow server to control lat and long (-synclocation) - Daniel Remenak * Added tank spawn expansion effect - Dave Rodgers * Added tank squishiness - Dave Rodgers, Dave Brosius * Added animated effects for T, N, TH, O, and CL flags - Dave Rodgers @@ -25,7 +26,7 @@ * Added user specified dynamic colors - Dave Rodgers * Added user specified texture matrices - Dave Rodgers * Improved BSP splitting algorithm - Dave Rodgers -* Added /part command for disconnecting from server - bzgirl +* Added /part command for disconnecting from server - Angelina Carlton * Show status while trying to connect & download world - Daniel Remenak * Update old configs to avoid broken keybindings - Daniel Remenak * Config files are stored per-version, using older when needed - Jeff Myers |
|
From: Dave R. <tr...@us...> - 2004-09-30 22:44:00
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12503 Modified Files: GUIOptionsMenu.cxx Log Message: hack the DEBUG_RENDERING conditional out of showTreads for the moment Index: GUIOptionsMenu.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/GUIOptionsMenu.cxx,v retrieving revision 1.13 retrieving revision 1.14 diff -w -u -r1.13 -r1.14 --- GUIOptionsMenu.cxx 29 Sep 2004 21:43:09 -0000 1.13 +++ GUIOptionsMenu.cxx 30 Sep 2004 22:43:50 -0000 1.14 @@ -225,7 +225,7 @@ option->createSlider(9); option->update(); list.push_back(option); -#if defined(DEBUG_RENDERING) +//#if defined(DEBUG_RENDERING) // Display Treads option = new HUDuiList; option->setFontFace(fontFace); @@ -236,7 +236,7 @@ options->push_back(std::string("On")); option->update(); list.push_back(option); -#endif // DEBUG_RENDERING +//#endif // DEBUG_RENDERING initNavigation(list, 1, list.size()-1); } @@ -312,9 +312,9 @@ ((HUDuiList*)list[i++])->setIndex(static_cast<int>(BZDB.eval("killerhighlight"))); ((HUDuiList*)list[i++])->setIndex(static_cast<int>(BZDB.eval("pulseRate") * 5) - 1); ((HUDuiList*)list[i++])->setIndex(static_cast<int>(BZDB.eval("pulseDepth") * 10) - 1); -#if defined(DEBUG_RENDERING) +//#if defined(DEBUG_RENDERING) ((HUDuiList*)list[i++])->setIndex(BZDB.isTrue("showTreads") ? 1 : 0); -#endif +//#endif } } @@ -424,13 +424,13 @@ BZDB.set("pulseDepth", string_util::format("%f", (float)(list->getIndex() + 1) / 10.0f)); break; } -#if defined(DEBUG_RENDERING) +//#if defined(DEBUG_RENDERING) case 'T': { BZDB.set("showTreads", list->getIndex() ? "1" : "0"); break; } -#endif +//#endif } } |
|
From: Tupone A. <at...@us...> - 2004-09-30 22:40:38
|
Update of /cvsroot/bzflag/bzflag/src/bzfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11420 Modified Files: BZWReader.cxx Log Message: Adding ftp: and file: urls Index: BZWReader.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzfs/BZWReader.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -w -u -r1.24 -r1.25 --- BZWReader.cxx 30 Sep 2004 22:16:01 -0000 1.24 +++ BZWReader.cxx 30 Sep 2004 22:40:29 -0000 1.25 @@ -39,16 +39,21 @@ #include "CustomSphere.h" #include "CustomWaterLevel.h" -static const std::string urlProtocol("http://"); - BZWReader::BZWReader(std::string filename) : location(filename), input(NULL) { + static const std::string httpProtocol("http://"); + static const std::string ftpProtocol("ftp://"); + static const std::string fileProtocol("file:/"); + errorHandler = new BZWError(location); - if (filename.substr(0, urlProtocol.size()) != urlProtocol) { - input = new std::ifstream(filename.c_str(), std::ios::in); - } else { + + if ((filename.substr(0, httpProtocol.size()) == httpProtocol) + || (filename.substr(0, ftpProtocol.size()) == ftpProtocol) + || (filename.substr(0, fileProtocol.size()) == fileProtocol)) { URLManager::instance().getURL(location, httpData); input = new std::istringstream(httpData); + } else { + input = new std::ifstream(filename.c_str(), std::ios::in); } if (input->peek() == EOF) { |
|
From: Tupone A. <at...@us...> - 2004-09-30 22:29:35
|
Update of /cvsroot/bzflag/bzflag/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9114 Modified Files: version.h Log Message: should have done before. Udp buffering change protocol in some way Index: version.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/include/version.h,v retrieving revision 1.59 retrieving revision 1.60 diff -w -u -r1.59 -r1.60 --- version.h 13 Sep 2004 06:44:54 -0000 1.59 +++ version.h 30 Sep 2004 22:29:26 -0000 1.60 @@ -25,7 +25,7 @@ * broke it */ #ifndef BZ_PROTO_VERSION -#define BZ_PROTO_VERSION "0004" +#define BZ_PROTO_VERSION "0005" #endif #ifndef BZ_MAJOR_VERSION @@ -37,7 +37,7 @@ #endif #ifndef BZ_REV -#define BZ_REV 14 +#define BZ_REV 15 #endif #ifndef BZ_CONFIG_DIR_VERSION |
|
From: Tupone A. <at...@us...> - 2004-09-30 22:16:10
|
Update of /cvsroot/bzflag/bzflag/src/bzfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6136 Modified Files: BZWReader.cxx Log Message: Reverse checking the http:// Index: BZWReader.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzfs/BZWReader.cxx,v retrieving revision 1.23 retrieving revision 1.24 diff -w -u -r1.23 -r1.24 --- BZWReader.cxx 30 Sep 2004 14:35:41 -0000 1.23 +++ BZWReader.cxx 30 Sep 2004 22:16:01 -0000 1.24 @@ -44,7 +44,7 @@ BZWReader::BZWReader(std::string filename) : location(filename), input(NULL) { errorHandler = new BZWError(location); - if (filename.substr(0, urlProtocol.size()) == urlProtocol) { + if (filename.substr(0, urlProtocol.size()) != urlProtocol) { input = new std::ifstream(filename.c_str(), std::ios::in); } else { URLManager::instance().getURL(location, httpData); |
|
From: Dave R. <tr...@us...> - 2004-09-30 22:12:47
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5518 Modified Files: playing.cxx Log Message: minor observer view change Index: playing.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/playing.cxx,v retrieving revision 1.665 retrieving revision 1.666 diff -w -u -r1.665 -r1.666 --- playing.cxx 30 Sep 2004 20:35:34 -0000 1.665 +++ playing.cxx 30 Sep 2004 22:12:29 -0000 1.666 @@ -4163,7 +4163,7 @@ else if (roamView == roamViewFP) { eyePoint[0] = target->getPosition()[0]; eyePoint[1] = target->getPosition()[1]; - eyePoint[2] = target->getPosition()[2] + muzzleHeight; + eyePoint[2] = target->getPosition()[2] + target->getMuzzleHeight(); targetPoint[0] = eyePoint[0] + targetTankDir[0]; targetPoint[1] = eyePoint[1] + targetTankDir[1]; targetPoint[2] = eyePoint[2] + targetTankDir[2]; |
|
From: Sean M. <br...@us...> - 2004-09-30 21:27:32
|
Update of /cvsroot/bzflag/bzflag/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28423/src/common Modified Files: Makefile.am Log Message: lets not link against libregex for symbol resolution and say we didn't. Index: Makefile.am =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/common/Makefile.am,v retrieving revision 1.31 retrieving revision 1.32 diff -w -u -r1.31 -r1.32 --- Makefile.am 29 Sep 2004 21:38:14 -0000 1.31 +++ Makefile.am 30 Sep 2004 21:27:23 -0000 1.32 @@ -34,11 +34,6 @@ md5.cxx \ URLManager.cxx -if BUILD_REGEX -libCommon_a_LIBADD = \ - ../regex/libregex.a -endif - MAINTAINERCLEANFILES = \ Makefile.in |
|
From: Daniel R. <dtr...@us...> - 2004-09-30 21:22:30
|
Update of /cvsroot/bzflag/bzflag/src/geometry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27321 Modified Files: TankGeometryMgr.cxx Log Message: braindead compiler warning Index: TankGeometryMgr.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankGeometryMgr.cxx,v retrieving revision 1.11 retrieving revision 1.12 diff -w -u -r1.11 -r1.12 |
|
From: Dave R. <tr...@us...> - 2004-09-30 20:35:44
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17169 Modified Files: playing.cxx Log Message: change near clipping plane from 1.1 to 0.5, and use const variables instead of numbers Index: playing.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/playing.cxx,v retrieving revision 1.664 retrieving revision 1.665 diff -w -u -r1.664 -r1.665 --- playing.cxx 30 Sep 2004 11:08:44 -0000 1.664 +++ playing.cxx 30 Sep 2004 20:35:34 -0000 1.665 @@ -166,6 +166,10 @@ extern void doAutoPilot(float &rotation, float &speed); extern void teachAutoPilot( FlagType *, int ); +// Far and Near Frustum clipping planes +const float NearPlane = 0.5f; +const float FarPlaneScale = 1.5f; // gets multiplied by BZDB_WORLDSIZE + enum BlowedUpReason { GotKilledMsg, GotShot, @@ -3810,8 +3814,10 @@ targetPoint[1] = eyePoint[1] + 0.0f; targetPoint[2] = eyePoint[2] + 0.0f; sceneRenderer->getViewFrustum().setProjection(60.0f * M_PI / 180.0f, - 1.1f, 1.5f * worldSize, mainWindow->getWidth(), - mainWindow->getHeight(), mainWindow->getViewHeight()); + NearPlane, FarPlaneScale * worldSize, + mainWindow->getWidth(), + mainWindow->getHeight(), + mainWindow->getViewHeight()); sceneRenderer->getViewFrustum().setView(eyePoint, targetPoint); // reset some flags @@ -4199,7 +4205,7 @@ } float worldSize = BZDB.eval(StateDatabase::BZDB_WORLDSIZE); sceneRenderer->getViewFrustum().setProjection(fov, - 1.1f, 1.5f * worldSize, + NearPlane, FarPlaneScale * worldSize, mainWindow->getWidth(), mainWindow->getHeight(), mainWindow->getViewHeight()); @@ -4490,7 +4496,9 @@ const int w = mainWindow->getWidth(); const int h = mainWindow->getHeight(); const int vh = mainWindow->getViewHeight(); - sceneRenderer->getViewFrustum().setProjection(fov, 1.1f, 1.5f * worldSize, w, h, vh); + sceneRenderer->getViewFrustum().setProjection(fov, NearPlane, + FarPlaneScale * worldSize, + w, h, vh); sceneRenderer->render(); // set entire window @@ -5159,7 +5167,7 @@ static const GLfloat targetPoint[3] = { 0.0f, 10.0f, muzzleHeight }; float worldSize = BZDB.eval(StateDatabase::BZDB_WORLDSIZE); sceneRenderer->getViewFrustum().setProjection(45.0f * M_PI / 180.0f, - 1.1f, 1.5f * worldSize, + NearPlane, FarPlaneScale * worldSize, mainWindow->getWidth(), mainWindow->getHeight(), mainWindow->getViewHeight()); |
|
From: Dave R. <tr...@us...> - 2004-09-30 20:15:28
|
Update of /cvsroot/bzflag/bzflag/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12522 Modified Files: bzfgl.h Log Message: temporary testing hack Index: bzfgl.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/include/bzfgl.h,v retrieving revision 1.20 retrieving revision 1.21 diff -w -u -r1.20 -r1.21 --- bzfgl.h 25 Jan 2004 07:13:35 -0000 1.20 +++ bzfgl.h 30 Sep 2004 20:15:08 -0000 1.21 @@ -49,6 +49,15 @@ #define _GL_INVALID_ID 0xFFFFFFFF +// The following are temporary until a +// proper context manager is in place. +#ifndef glDeleteLists +# define glDeleteLists(base,count) +#endif +#ifndef glDeleteTextures +# define glDeleteTextures(count,textures) +#endif + #endif /* __BZFGL_H__ */ |
|
From: Frank T. <ch...@us...> - 2004-09-30 18:30:25
|
Update of /cvsroot/bzflag/bzflag/src/platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25109/src/platform Modified Files: SDLDisplay.cxx Log Message: cosmetic changes Index: SDLDisplay.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/platform/SDLDisplay.cxx,v retrieving revision 1.40 retrieving revision 1.41 diff -w -u -r1.40 -r1.41 --- SDLDisplay.cxx 20 Sep 2004 22:32:08 -0000 1.40 +++ SDLDisplay.cxx 30 Sep 2004 18:30:16 -0000 1.41 @@ -603,10 +603,10 @@ Gamedev list, March 4, 2000. */ float sum = 0.0; - int i, count = 0; + int count = 0; float gamma = 1.0; - for (i = 1; i < 256; ++i) { + for (int i = 1; i < 256; ++i) { if ((ramp[i] != 0) && (ramp[i] != 65535)) { double B = (double)i / 256.0; double A = ramp[i] / 65535.0; @@ -624,17 +624,14 @@ Uint16 redRamp[256]; Uint16 greenRamp[256]; Uint16 blueRamp[256]; - float red; - float green; - float blue; float gamma = 1.0; int result = SDL_GetGammaRamp(redRamp, greenRamp, blueRamp); if (result == -1) { printf("Could not get Gamma: %s.\n", SDL_GetError()); } else { - red = CalculateGammaFromRamp(redRamp); - green = CalculateGammaFromRamp(greenRamp); - blue = CalculateGammaFromRamp(blueRamp); + float red = CalculateGammaFromRamp(redRamp); + float green = CalculateGammaFromRamp(greenRamp); + float blue = CalculateGammaFromRamp(blueRamp); gamma = (red + green + blue) / 3.0; } return gamma; |
|
From: Frank T. <ch...@us...> - 2004-09-30 14:35:51
|
Update of /cvsroot/bzflag/bzflag/src/bzfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9916/src/bzfs Modified Files: BZWReader.cxx Log Message: gcc 2.95 obviously does not have the standard function to compare a substring to another string; rewrote it using a temporary substring Index: BZWReader.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzfs/BZWReader.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -w -u -r1.22 -r1.23 --- BZWReader.cxx 29 Sep 2004 19:34:41 -0000 1.22 +++ BZWReader.cxx 30 Sep 2004 14:35:41 -0000 1.23 @@ -44,7 +44,7 @@ BZWReader::BZWReader(std::string filename) : location(filename), input(NULL) { errorHandler = new BZWError(location); - if (filename.compare(0, urlProtocol.size(), urlProtocol)) { + if (filename.substr(0, urlProtocol.size()) == urlProtocol) { input = new std::ifstream(filename.c_str(), std::ios::in); } else { URLManager::instance().getURL(location, httpData); |
|
From: Dave R. <tr...@us...> - 2004-09-30 13:53:02
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1292 Modified Files: Player.cxx Player.h Log Message: update flag effect during explosions, even if observing Index: Player.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/Player.cxx,v retrieving revision 1.125 retrieving revision 1.126 diff -w -u -r1.125 -r1.126 --- Player.cxx 30 Sep 2004 13:28:51 -0000 1.125 +++ Player.cxx 30 Sep 2004 13:52:53 -0000 1.126 @@ -211,6 +211,7 @@ setStatus((getStatus() | short(PlayerState::Exploding) | short(PlayerState::Falling)) & ~(short(PlayerState::Alive) | short(PlayerState::Paused))); tankNode->rebuildExplosion(); + updateFlagEffect(Flags::Null); } void Player::setTeleport(const TimeKeeper& t, @@ -338,7 +339,12 @@ { // set the type flagType = _flag; + updateFlagEffect(flagType); + return; +} +void Player::updateFlagEffect(FlagType* effectFlag) +{ float FlagEffectTime = BZDB.eval(StateDatabase::BZDB_FLAGEFFECTTIME); if (FlagEffectTime <= 0.0f) { FlagEffectTime = 0.001f; // safety @@ -348,22 +354,22 @@ dimensionsTarget[0] = 1.0f; dimensionsTarget[1] = 1.0f; dimensionsTarget[2] = 1.0f; - if (flagType == Flags::Obesity) { + if (effectFlag == Flags::Obesity) { const float factor = BZDB.eval(StateDatabase::BZDB_OBESEFACTOR); dimensionsTarget[0] = factor; dimensionsTarget[1] = factor; } - else if (flagType == Flags::Tiny) { + else if (effectFlag == Flags::Tiny) { const float factor = BZDB.eval(StateDatabase::BZDB_TINYFACTOR); dimensionsTarget[0] = factor; dimensionsTarget[1] = factor; } - else if (flagType == Flags::Thief) { + else if (effectFlag == Flags::Thief) { const float factor = BZDB.eval(StateDatabase::BZDB_THIEFTINYFACTOR); dimensionsTarget[0] = factor; dimensionsTarget[1] = factor; } - else if (flagType == Flags::Narrow) { + else if (effectFlag == Flags::Narrow) { dimensionsTarget[1] = 0.001f; } @@ -376,7 +382,7 @@ } // set the alpha target - if (flagType == Flags::Cloaking) { + if (effectFlag == Flags::Cloaking) { alphaTarget = 0.0f; } else { alphaTarget = 1.0f; Index: Player.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/Player.h,v retrieving revision 1.71 retrieving revision 1.72 diff -w -u -r1.71 -r1.72 --- Player.h 29 Sep 2004 20:52:40 -0000 1.71 +++ Player.h 30 Sep 2004 13:52:53 -0000 1.72 @@ -150,6 +150,7 @@ float* predictedVel) const; void setVisualTeam (TeamColor team ); void setupTreads(float dt); + void updateFlagEffect(FlagType* flag); private: // data not communicated with other players bool notResponding; |
|
From: Dave R. <tr...@us...> - 2004-09-30 13:29:16
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29090/src/bzflag Modified Files: Player.cxx Log Message: re-randomize explosions Index: Player.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/Player.cxx,v retrieving revision 1.124 retrieving revision 1.125 diff -w -u -r1.124 -r1.125 --- Player.cxx 29 Sep 2004 20:52:40 -0000 1.124 +++ Player.cxx 30 Sep 2004 13:28:51 -0000 1.125 @@ -210,6 +210,7 @@ explodeTime = t; setStatus((getStatus() | short(PlayerState::Exploding) | short(PlayerState::Falling)) & ~(short(PlayerState::Alive) | short(PlayerState::Paused))); + tankNode->rebuildExplosion(); } void Player::setTeleport(const TimeKeeper& t, |
|
From: Dave R. <tr...@us...> - 2004-09-30 13:29:16
|
Update of /cvsroot/bzflag/bzflag/src/geometry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29090/src/geometry Modified Files: TankGeometryMgr.cxx TankSceneNode.cxx Log Message: re-randomize explosions Index: TankGeometryMgr.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankGeometryMgr.cxx,v retrieving revision 1.10 retrieving revision 1.11 diff -w -u -r1.10 -r1.11 --- TankGeometryMgr.cxx 30 Sep 2004 10:42:38 -0000 1.10 +++ TankGeometryMgr.cxx 30 Sep 2004 13:28:52 -0000 1.11 @@ -140,8 +140,8 @@ "tried to delete an invalid list (%i)\n", list); } else { glDeleteLists(list, 1); - list = InvalidList; } + list = InvalidList; } } } Index: TankSceneNode.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankSceneNode.cxx,v retrieving revision 1.62 retrieving revision 1.63 diff -w -u -r1.62 -r1.63 --- TankSceneNode.cxx 30 Sep 2004 10:42:38 -0000 1.62 +++ TankSceneNode.cxx 30 Sep 2004 13:28:52 -0000 1.63 @@ -59,6 +59,8 @@ setColor(1.0f, 1.0f, 1.0f); setExplodeFraction(0.0f); + rebuildExplosion(); + shadowRenderNode.setShadow(); shadowRenderNode.setTankLOD(LowTankLOD); } @@ -330,6 +332,33 @@ } +void TankSceneNode::rebuildExplosion() +{ + // prepare explosion rotations and translations + for (int i = 0; i < LastTankPart; i++) { + // pick an unbiased rotation vector + GLfloat d; + do { + spin[i][0] = (float)bzfrand() - 0.5f; + spin[i][1] = (float)bzfrand() - 0.5f; + spin[i][2] = (float)bzfrand() - 0.5f; + d = hypotf(spin[i][0], hypotf(spin[i][1], spin[i][2])); + } while (d < 0.001f || d > 0.5f); + spin[i][0] /= d; + spin[i][1] /= d; + spin[i][2] /= d; + + // now an angular velocity -- make sure we get at least 2 complete turns + spin[i][3] = 360.0f * (5.0f * (float)bzfrand() + 2.0f); + + // make arbitrary 2d translation + vel[i][0] = 80.0f * ((float)bzfrand() - 0.5f); + vel[i][1] = 80.0f * ((float)bzfrand() - 0.5f); + } + return; +} + + // // TankIDLSceneNode // @@ -608,28 +637,6 @@ sceneNode(_sceneNode), isShadow(false), above(false), towards(false) { - // prepare explosion rotations and translations - for (int i = 0; i < LastTankPart; i++) { - // pick an unbiased rotation vector - GLfloat d; - do { - spin[i][0] = (float)bzfrand() - 0.5f; - spin[i][1] = (float)bzfrand() - 0.5f; - spin[i][2] = (float)bzfrand() - 0.5f; - d = hypotf(spin[i][0], hypotf(spin[i][1], spin[i][2])); - } while (d < 0.001f || d > 0.5f); - spin[i][0] /= d; - spin[i][1] /= d; - spin[i][2] /= d; - - // now an angular velocity -- make sure we get at least 2 complete turns - spin[i][3] = 360.0f * (5.0f * (float)bzfrand() + 2.0f); - - // make arbitrary 2d translation - vel[i][0] = 80.0f * ((float)bzfrand() - 0.5f); - vel[i][1] = 80.0f * ((float)bzfrand() - 0.5f); - } - drawLOD = LowTankLOD; drawSize = Normal; } @@ -824,14 +831,14 @@ // apply explosion transform if (isExploding) { glPushMatrix(); - glTranslatef(centerOfGravity[part][0] + explodeFraction * vel[part][0], - centerOfGravity[part][1] + explodeFraction * vel[part][1], - centerOfGravity[part][2]); - glRotatef(spin[part][3] * explodeFraction, - spin[part][0], spin[part][1], spin[part][2]); - glTranslatef(-centerOfGravity[part][0], - -centerOfGravity[part][1], - -centerOfGravity[part][2]); + const float* vel = sceneNode->vel[part]; + const float* spin = sceneNode->spin[part]; + const float* cog = centerOfGravity[part]; + glTranslatef(cog[0] + (explodeFraction * vel[0]), + cog[1] + (explodeFraction * vel[1]), + cog[2]); + glRotatef(spin[3] * explodeFraction, spin[0], spin[1], spin[2]); + glTranslatef(-cog[0], -cog[1], -cog[2]); } // setup the animation texture matrix |
|
From: Dave R. <tr...@us...> - 2004-09-30 13:29:00
|
Update of /cvsroot/bzflag/bzflag/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29090/include Modified Files: TankSceneNode.h Log Message: re-randomize explosions Index: TankSceneNode.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/include/TankSceneNode.h,v retrieving revision 1.31 retrieving revision 1.32 diff -w -u -r1.31 -r1.32 --- TankSceneNode.h 30 Sep 2004 10:42:36 -0000 1.31 +++ TankSceneNode.h 30 Sep 2004 13:28:50 -0000 1.32 @@ -92,9 +92,10 @@ void setTiny(); void setNarrow(); void setThief(); - void setExplodeFraction(float t); void setClipPlane(const GLfloat* plane); void setDrawClose(bool close); + void setExplodeFraction(float t); + void rebuildExplosion(); void addTreadOffsets(float left, float right); @@ -136,8 +137,6 @@ bool towards; bool isExploding; GLfloat explodeFraction; - GLfloat vel[TankGeometryEnums::LastTankPart][2]; - GLfloat spin[TankGeometryEnums::LastTankPart][4]; static const GLfloat centerOfGravity[TankGeometryEnums::LastTankPart][3]; }; friend class TankRenderNode; @@ -164,6 +163,8 @@ TankRenderNode tankRenderNode; TankRenderNode shadowRenderNode; TankGeometryEnums::TankSize tankSize; + GLfloat vel[TankGeometryEnums::LastTankPart][2]; + GLfloat spin[TankGeometryEnums::LastTankPart][4]; static int maxLevel; static const int numLOD; |
|
From: Dave R. <tr...@us...> - 2004-09-30 11:09:02
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28422 Modified Files: playing.cxx Log Message: fix for the CB flag Index: playing.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/playing.cxx,v retrieving revision 1.663 retrieving revision 1.664 diff -w -u -r1.663 -r1.664 --- playing.cxx 30 Sep 2004 10:42:36 -0000 1.663 +++ playing.cxx 30 Sep 2004 11:08:44 -0000 1.664 @@ -4229,21 +4229,23 @@ // add flags world->addFlags(scene); - TeamColor overrideTeam = RogueTeam; - const bool colorblind = (myTank->getFlag() == Flags::Colorblindness); // add other tanks and shells for (i = 0; i < curMaxPlayers; i++) { if (player[i]) { + const bool colorblind = (myTank->getFlag() == Flags::Colorblindness); player[i]->addShots(scene, colorblind); - overrideTeam = RogueTeam; + + TeamColor effectiveTeam = RogueTeam; if (!colorblind){ if ((player[i]->getFlag() == Flags::Masquerade) && (myTank->getFlag() != Flags::Seer) - && (myTank->getTeam() != ObserverTeam)) - overrideTeam = myTank->getTeam(); - else - overrideTeam = player[i]->getTeam(); + && (myTank->getTeam() != ObserverTeam)) { + effectiveTeam = myTank->getTeam(); + } + else { + effectiveTeam = player[i]->getTeam(); + } } const bool cloaked = (player[i]->getFlag() == Flags::Cloaking) && @@ -4254,7 +4256,7 @@ // add player tank if required if (player[i]->needsToBeRendered(cloaked, showPlayer)) { - player[i]->addToScene(scene, player[i]->getTeam(), false); + player[i]->addToScene(scene, effectiveTeam, false); } } } |
|
From: Dave R. <tr...@us...> - 2004-09-30 10:42:58
|
Update of /cvsroot/bzflag/bzflag/src/geometry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22361/src/geometry Modified Files: AnimatedTreads.cxx TankGeometryMgr.cxx TankSceneNode.cxx Log Message: - converted TankGeometryMgr into a namespace with static data members - threw some DEBUG3's into TankGeometryMgr - re-added the contextInitializer test key with shift-alt-X (when DEBUG_RENDERING is defined) Index: AnimatedTreads.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/AnimatedTreads.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -w -u -r1.5 -r1.6 --- AnimatedTreads.cxx 29 Sep 2004 14:20:13 -0000 1.5 +++ AnimatedTreads.cxx 30 Sep 2004 10:42:38 -0000 1.6 @@ -64,7 +64,7 @@ } -static void buildCasing(float Yoffset, int /*divisions*/) +static void buildCasing(float Yoffset) { const float yLeft = Yoffset + (0.5f * casingWidth); const float yRight = Yoffset - (0.5f * casingWidth); @@ -419,15 +419,15 @@ } -void TankGeometryUtils::buildHighLCasing(int divs) +void TankGeometryUtils::buildHighLCasing() { - buildCasing(+treadYCenter, divs); + buildCasing(+treadYCenter); return; } -void TankGeometryUtils::buildHighRCasing(int divs) +void TankGeometryUtils::buildHighRCasing() { - buildCasing(-treadYCenter, divs); + buildCasing(-treadYCenter); return; } Index: TankGeometryMgr.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankGeometryMgr.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- TankGeometryMgr.cxx 30 Sep 2004 00:36:03 -0000 1.9 +++ TankGeometryMgr.cxx 30 Sep 2004 10:42:38 -0000 1.10 @@ -16,38 +16,45 @@ #include <string> #include "common.h" #include "global.h" +#include "TankGeometryMgr.h" #include "StateDatabase.h" #include "BZDBCache.h" -#include "TankGeometryMgr.h" #include "OpenGLGState.h" -// the one and only -TankGeometryMgr TANKGEOMMGR; +// use the namespaces +using namespace TankGeometryMgr; +using namespace TankGeometryEnums; +using namespace TankGeometryUtils; + + +// Local Variables +// --------------- // handy dandy casted value static const GLuint InvalidList = (GLuint) -1; -// use the namespaces -using namespace TankGeometryEnums; -using namespace TankGeometryUtils; +// the display lists +static GLuint displayLists[LastTankShadow][LastTankLOD] + [LastTankSize][LastTankPart]; -GLfloat TankGeometryMgr::scaleFactors[LastTankSize][3] = { +// the scaling factors +static GLfloat scaleFactors[LastTankSize][3] = { {1.0f, 1.0f, 1.0f}, // Normal {1.0f, 1.0f, 1.0f}, // Obese {1.0f, 1.0f, 1.0f}, // Tiny {1.0f, 0.001f, 1.0f}, // Narrow {1.0f, 1.0f, 1.0f} // Thief }; -const float* TankGeometryMgr::scaleFactor = scaleFactors[Normal]; +// the current scaling factors +static const float* currentScaleFactor = scaleFactors[Normal]; -TankShadow TankGeometryMgr::shadowMode = ShadowOn; +// the current shadow mode (used to remove glNormal3f and glTexcoord2f calls) +static TankShadow shadowMode = ShadowOn; -GLuint TankGeometryMgr::displayLists - [LastTankShadow][LastTankLOD][LastTankSize][LastTankPart]; - -const TankGeometryMgr::PartFunction - TankGeometryMgr::partFunctions[LastTankLOD][BasicTankParts] = { +// arrays of functions to avoid large switch statements +typedef void (*partFunction)(void); +static const partFunction partFunctions[LastTankLOD][BasicTankParts] = { { buildLowBody, buildLowBarrel, buildLowTurret, @@ -63,13 +70,27 @@ { buildHighBody, buildHighBarrel, buildHighTurret, - buildHighLCasingOld, - buildHighRCasingOld + buildHighLCasing, + buildHighRCasing } }; -TankGeometryMgr::TankGeometryMgr() +// Local Function Prototypes +// ------------------------- + +static void setupScales(); +static void initContext(void *data); +static void bzdbCallback(const std::string& str, void *data); + + +/****************************************************************************/ + +// TankGeometryMgr Functions +// ------------------------- + + +void TankGeometryMgr::init() { // initialize the lists to invalid for (int shadow = 0; shadow < LastTankShadow; shadow++) { @@ -81,22 +102,26 @@ } } } - callbacksInstalled = false; - OpenGLGState::registerContextInitializer (initContext, (void*)this); + + // install the BZDB callbacks + // This MUST be done after BZDB has been initialized in main() + BZDB.addCallback (StateDatabase::BZDB_OBESEFACTOR, bzdbCallback, NULL); + BZDB.addCallback (StateDatabase::BZDB_TINYFACTOR, bzdbCallback, NULL); + BZDB.addCallback (StateDatabase::BZDB_THIEFTINYFACTOR, bzdbCallback, NULL); + + // install the context initializer + OpenGLGState::registerContextInitializer (initContext, NULL); + + // setup the scaleFactors + setupScales(); return; } -TankGeometryMgr::~TankGeometryMgr() +void TankGeometryMgr::kill() { - // FIXME: do we still have GL? - deleteLists(); - - // FIXME: really worth doing? - if (callbacksInstalled) { - OpenGLGState::unregisterContextInitializer(initContext, (void*)this); - } + OpenGLGState::unregisterContextInitializer(initContext, NULL); return; } @@ -108,8 +133,12 @@ for (int lod = 0; lod < LastTankLOD; lod++) { for (int size = 0; size < LastTankSize; size++) { for (int part = 0; part < LastTankPart; part++) { - GLuint list = displayLists[shadow][lod][size][part]; + GLuint& list = displayLists[shadow][lod][size][part]; if (list != InvalidList) { + if (glIsList(list) == GL_FALSE) { + DEBUG3("TankGeometryMgr: " + "tried to delete an invalid list (%i)\n", list); + } else { glDeleteLists(list, 1); list = InvalidList; } @@ -117,86 +146,16 @@ } } } - return; } - - -void TankGeometryMgr::setupScales(const std::string& /*name*/, void * /*data*/) -{ - float scale; - - scaleFactors[Normal][0] = BZDB.eval(StateDatabase::BZDB_TANKLENGTH); - scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKLENGTH).c_str()); - scaleFactors[Normal][0] /= scale; - - scaleFactors[Normal][1] = BZDB.eval(StateDatabase::BZDB_TANKWIDTH); - scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKWIDTH).c_str()); - scaleFactors[Normal][1] /= scale; - - scaleFactors[Normal][2] = BZDB.eval(StateDatabase::BZDB_TANKHEIGHT); - scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKHEIGHT).c_str()); - scaleFactors[Normal][2] /= scale; - - scale = BZDB.eval(StateDatabase::BZDB_OBESEFACTOR); - scaleFactors[Obese][0] = scale * scaleFactors[Normal][0]; - scaleFactors[Obese][1] = scale * scaleFactors[Normal][1]; - scaleFactors[Obese][2] = scaleFactors[Normal][2]; - - scale = BZDB.eval(StateDatabase::BZDB_TINYFACTOR); - scaleFactors[Tiny][0] = scale * scaleFactors[Normal][0]; - scaleFactors[Tiny][1] = scale * scaleFactors[Normal][1]; - scaleFactors[Tiny][2] = scaleFactors[Normal][2]; - - scale = BZDB.eval(StateDatabase::BZDB_THIEFTINYFACTOR); - scaleFactors[Thief][0] = scale * scaleFactors[Normal][0]; - scaleFactors[Thief][1] = scale * scaleFactors[Normal][1]; - scaleFactors[Thief][2] = scaleFactors[Normal][2]; - - scaleFactors[Narrow][0] = scaleFactors[Normal][0]; - scaleFactors[Narrow][1] = 0.001f; - scaleFactors[Narrow][2] = scaleFactors[Normal][2]; - return; } -void TankGeometryMgr::initContext(void * /*data*/) +void TankGeometryMgr::buildLists() { - // initialize the lists to invalid - for (int shadow = 0; shadow < LastTankShadow; shadow++) { - for (int lod = 0; lod < LastTankLOD; lod++) { - for (int size = 0; size < LastTankSize; size++) { - for (int part = 0; part < LastTankPart; part++) { - displayLists[shadow][lod][size][part] = InvalidList; - } - } - } - } - TANKGEOMMGR.rebuildLists(); - return; -} - - -void TankGeometryMgr::rebuildLists() -{ - // install the calllbacks - if (!callbacksInstalled) { - // the BZDB callbacks (at least), cannot be installed at - // global statup because BZDB is not initialized until - // main() is called - BZDB.addCallback (StateDatabase::BZDB_OBESEFACTOR, setupScales, NULL); - BZDB.addCallback (StateDatabase::BZDB_TINYFACTOR, setupScales, NULL); - BZDB.addCallback (StateDatabase::BZDB_THIEFTINYFACTOR, setupScales, NULL); - callbacksInstalled = true; - } - // setup the scale factors - std::string junk; - setupScales(junk, NULL); - scaleFactor = scaleFactors[Normal]; - - // delete any old lists - deleteLists(); + setupScales(); + currentScaleFactor = scaleFactors[Normal]; for (int shadow = 0; shadow < LastTankShadow; shadow++) { for (int lod = 0; lod < LastTankLOD; lod++) { @@ -219,23 +178,11 @@ glNewList(list, GL_COMPILE); // setup the scale factor - scaleFactor = scaleFactors[size]; + currentScaleFactor = scaleFactors[size]; if (part < MedTankParts) { // the basic parts - if (!(lod == HighTankLOD)) { partFunctions[lod][part](); - } else { - if (part == LeftCasing) { - buildHighLCasing(30); - } - else if (part == RightCasing) { - buildHighRCasing(30); - } - else { - partFunctions[lod][part](); - } - } } else { // the animated parts @@ -279,9 +226,93 @@ } +GLuint TankGeometryMgr::getPartList(TankGeometryEnums::TankShadow shadow, + TankGeometryEnums::TankPart part, + TankGeometryEnums::TankSize size, + TankGeometryEnums::TankLOD lod) +{ + return displayLists[shadow][lod][size][part]; +} + + +const float* TankGeometryMgr::getScaleFactor(TankSize size) +{ + return scaleFactors[size]; +} + + +/****************************************************************************/ + +// Local Functions +// --------------- + + +static void bzdbCallback(const std::string& name, void */*data*/) +{ + deleteLists(); + buildLists(); + DEBUG3 ("TankGeometryMgr bzdbCallback(%s)\n", name.c_str()); + return; +} + + +static void initContext(void * /*data*/) +{ + // we have to assume that the lists can not be deleted + buildLists(); + DEBUG3 ("TankGeometryMgr initContext()\n"); + return; +} + + +static void setupScales() +{ + float scale; + + scaleFactors[Normal][0] = BZDB.eval(StateDatabase::BZDB_TANKLENGTH); + scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKLENGTH).c_str()); + scaleFactors[Normal][0] /= scale; + + scaleFactors[Normal][1] = BZDB.eval(StateDatabase::BZDB_TANKWIDTH); + scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKWIDTH).c_str()); + scaleFactors[Normal][1] /= scale; + + scaleFactors[Normal][2] = BZDB.eval(StateDatabase::BZDB_TANKHEIGHT); + scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKHEIGHT).c_str()); + scaleFactors[Normal][2] /= scale; + + scale = BZDB.eval(StateDatabase::BZDB_OBESEFACTOR); + scaleFactors[Obese][0] = scale * scaleFactors[Normal][0]; + scaleFactors[Obese][1] = scale * scaleFactors[Normal][1]; + scaleFactors[Obese][2] = scaleFactors[Normal][2]; + + scale = BZDB.eval(StateDatabase::BZDB_TINYFACTOR); + scaleFactors[Tiny][0] = scale * scaleFactors[Normal][0]; + scaleFactors[Tiny][1] = scale * scaleFactors[Normal][1]; + scaleFactors[Tiny][2] = scaleFactors[Normal][2]; + + scale = BZDB.eval(StateDatabase::BZDB_THIEFTINYFACTOR); + scaleFactors[Thief][0] = scale * scaleFactors[Normal][0]; + scaleFactors[Thief][1] = scale * scaleFactors[Normal][1]; + scaleFactors[Thief][2] = scaleFactors[Normal][2]; + + scaleFactors[Narrow][0] = scaleFactors[Normal][0]; + scaleFactors[Narrow][1] = 0.001f; + scaleFactors[Narrow][2] = scaleFactors[Normal][2]; + + return; +} + + +/****************************************************************************/ + +// TankGeometryUtils Functions +// --------------------------- + + void TankGeometryUtils::doVertex3f(GLfloat x, GLfloat y, GLfloat z) { - const float* scale = TankGeometryMgr::currentScaleFactor(); + const float* scale = currentScaleFactor; x = x * scale[0]; y = y * scale[1]; z = z * scale[2]; @@ -292,10 +323,10 @@ void TankGeometryUtils::doNormal3f(GLfloat x, GLfloat y, GLfloat z) { - if (TankGeometryMgr::getShadowMode() == ShadowOn) { + if (shadowMode == ShadowOn) { return; } - const float* scale = TankGeometryMgr::currentScaleFactor(); + const float* scale = currentScaleFactor; GLfloat sx = x * scale[0]; GLfloat sy = y * scale[1]; GLfloat sz = z * scale[2]; @@ -312,7 +343,7 @@ void TankGeometryUtils::doTexCoord2f(GLfloat x, GLfloat y) { - if (TankGeometryMgr::getShadowMode() == ShadowOn) { + if (shadowMode == ShadowOn) { return; } glTexCoord2f(x, y); Index: TankSceneNode.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankSceneNode.cxx,v retrieving revision 1.61 retrieving revision 1.62 diff -w -u -r1.61 -r1.62 --- TankSceneNode.cxx 29 Sep 2004 18:04:09 -0000 1.61 +++ TankSceneNode.cxx 30 Sep 2004 10:42:38 -0000 1.62 @@ -848,7 +848,7 @@ // get the list GLuint list; TankShadow shadow = isShadow ? ShadowOn : ShadowOff; - list = TANKGEOMMGR.getPartList(shadow, part, drawSize, drawLOD); + list = TankGeometryMgr::getPartList(shadow, part, drawSize, drawLOD); // draw the part glCallList(list); @@ -988,7 +988,7 @@ glBegin(GL_POINTS); { - const float* scale = TANKGEOMMGR.getScaleFactor(sceneNode->tankSize); + const float* scale = TankGeometryMgr::getScaleFactor(sceneNode->tankSize); myColor3fv(lights[0]); glVertex3f(lights[0][3] * scale[0], lights[0][4] * scale[1], |
|
From: Dave R. <tr...@us...> - 2004-09-30 10:42:57
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22361/src/bzflag Modified Files: playing.cxx Log Message: - converted TankGeometryMgr into a namespace with static data members - threw some DEBUG3's into TankGeometryMgr - re-added the contextInitializer test key with shift-alt-X (when DEBUG_RENDERING is defined) Index: playing.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/playing.cxx,v retrieving revision 1.662 retrieving revision 1.663 diff -w -u -r1.662 -r1.663 --- playing.cxx 29 Sep 2004 21:52:53 -0000 1.662 +++ playing.cxx 30 Sep 2004 10:42:36 -0000 1.663 @@ -693,9 +693,10 @@ } return true; - /* XXX -- for testing forced recreation of OpenGL context - case 'o': - if (pressed) { + // for testing forced recreation of OpenGL context +#if defined(DEBUG_RENDERING) + case 'X': + if (pressed && ((shiftKeyStatus & BzfKeyEvent::AltKey) != 0)) { // destroy OpenGL context getMainWindow()->getWindow()->freeContext(); @@ -711,8 +712,8 @@ // reload display lists and textures and initialize other state OpenGLGState::initContext(); } - break; - */ + return true; +#endif // DEBUG_RENDERING case ']': case '}': @@ -4595,8 +4596,6 @@ TimeKeeper::setTick(); updateDaylight(epochOffset, *sceneRenderer); - // rebuild the tank display lists - TANKGEOMMGR.rebuildLists(); // main loop while (!CommandsStandard::isQuit()) { @@ -5429,6 +5428,10 @@ sceneBuilder = new SceneDatabaseBuilder(sceneRenderer); World::init(); + // initialize and build the tank display lists + TankGeometryMgr::init(); + TankGeometryMgr::buildLists(); + // prepare dialogs mainMenu = new MainMenu; |
|
From: Dave R. <tr...@us...> - 2004-09-30 10:42:53
|
Update of /cvsroot/bzflag/bzflag/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22361/include Modified Files: TankGeometryMgr.h TankSceneNode.h Log Message: - converted TankGeometryMgr into a namespace with static data members - threw some DEBUG3's into TankGeometryMgr - re-added the contextInitializer test key with shift-alt-X (when DEBUG_RENDERING is defined) Index: TankGeometryMgr.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/include/TankGeometryMgr.h,v retrieving revision 1.4 retrieving revision 1.5 diff -w -u -r1.4 -r1.5 --- TankGeometryMgr.h 29 Sep 2004 14:20:11 -0000 1.4 +++ TankGeometryMgr.h 30 Sep 2004 10:42:36 -0000 1.5 @@ -21,9 +21,6 @@ #include "SceneNode.h" -extern class TankGeometryMgr TANKGEOMMGR; - - namespace TankGeometryEnums { enum TankShadow { @@ -75,89 +72,21 @@ } -class TankGeometryMgr { - - public: - TankGeometryMgr(); - ~TankGeometryMgr(); +namespace TankGeometryMgr { - // rebuild the display lists - void rebuildLists(); - - // grab a list, make dem graphics - GLuint getPartList(TankGeometryEnums::TankShadow shadow, - TankGeometryEnums::TankPart part, - TankGeometryEnums::TankSize size, - TankGeometryEnums::TankLOD lod) const; - - // for doVertex3f(), doNormal3f(), and doTexCoord2f() - static TankGeometryEnums::TankShadow getShadowMode(); // const - static const float* currentScaleFactor(); // const - static const float* getScaleFactor( - TankGeometryEnums::TankSize size); // const - - - private: - // delete the display lists + void init(); + void kill(); + void buildLists(); void deleteLists(); - // setup the scaling factors, and a callback BZDB - static void setupScales(const std::string& name, void *data); - - // for the OpenGLGState callback - static void initContext(void*); - - private: - // display lists for drawing each part at different - // sizes and at different Levels Of Detail - static GLuint displayLists[TankGeometryEnums::LastTankShadow] - [TankGeometryEnums::LastTankLOD] - [TankGeometryEnums::LastTankSize] - [TankGeometryEnums::LastTankPart]; - - // scaling factors for the different sizes - static GLfloat scaleFactors[TankGeometryEnums::LastTankSize][3]; - - // for currentVertexScale() and currentNormalScale() - static const float* scaleFactor; - - // shadow mode - static TankGeometryEnums::TankShadow shadowMode; - - // functions that make the basic tank parts - typedef void (*PartFunction)(void); - static const PartFunction partFunctions[TankGeometryEnums::LastTankLOD] - [TankGeometryEnums::BasicTankParts]; - - // BZDB callback status - bool callbacksInstalled; -}; - -inline GLuint TankGeometryMgr::getPartList(TankGeometryEnums::TankShadow shadow, + GLuint getPartList(TankGeometryEnums::TankShadow shadow, TankGeometryEnums::TankPart part, TankGeometryEnums::TankSize size, - TankGeometryEnums::TankLOD lod) const -{ - return displayLists[shadow][lod][size][part]; -} + TankGeometryEnums::TankLOD lod); -inline TankGeometryEnums::TankShadow TankGeometryMgr::getShadowMode() -{ - return shadowMode; + const float* getScaleFactor(TankGeometryEnums::TankSize size); } -inline const float* TankGeometryMgr::getScaleFactor( - TankGeometryEnums::TankSize size) -{ - return scaleFactors[size]; -} - -inline const float* TankGeometryMgr::currentScaleFactor() -{ - return scaleFactor; -} - - namespace TankGeometryUtils { @@ -191,8 +120,8 @@ void buildHighBody (void); void buildHighBarrel (void); void buildHighTurret (void); - void buildHighLCasing (int divs); - void buildHighRCasing (int divs); + void buildHighLCasing (void); + void buildHighRCasing (void); void buildHighLTread (int divs); void buildHighRTread (int divs); Index: TankSceneNode.h =================================================================== RCS file: /cvsroot/bzflag/bzflag/include/TankSceneNode.h,v retrieving revision 1.30 retrieving revision 1.31 diff -w -u -r1.30 -r1.31 --- TankSceneNode.h 29 Sep 2004 14:20:11 -0000 1.30 +++ TankSceneNode.h 30 Sep 2004 10:42:36 -0000 1.31 @@ -94,14 +94,15 @@ void setThief(); void setExplodeFraction(float t); void setClipPlane(const GLfloat* plane); + void setDrawClose(bool close); void addTreadOffsets(float left, float right); // hidden still renders shadow (turns off cloaked) - void setHidden(bool hidden = true); + void setHidden(bool hidden); // cloaked renders nothing if color[3] = 0.0f (turns off hidden) - void setCloaked(bool cloaked = true); + void setCloaked(bool cloaked); static void setMaxLOD(int maxLevel); @@ -154,6 +155,7 @@ bool transparent, sort; float explodeFraction; bool clip; + bool drawClose; GLfloat colorOverride[4]; GLfloat color[4]; GLdouble clipPlane[4]; |
|
From: Tim R. <tim...@us...> - 2004-09-30 02:17:37
|
Update of /cvsroot/bzflag/bzflag/src/bzadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29166/src/bzadmin Modified Files: BZAdminClient.cxx Log Message: ws, \n after error Index: BZAdminClient.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzadmin/BZAdminClient.cxx,v retrieving revision 1.59 retrieving revision 1.60 diff -w -u -r1.59 -r1.60 --- BZAdminClient.cxx 22 Sep 2004 01:16:40 -0000 1.59 +++ BZAdminClient.cxx 30 Sep 2004 02:17:20 -0000 1.60 @@ -63,6 +63,7 @@ std::cout << "Internal error connecting to server."; break; } + std::cout << std::endl; return; } sLink.sendEnter(TankPlayer, myTeam, callsign.c_str(), ""); |
|
From: Dave R. <tr...@us...> - 2004-09-30 00:36:15
|
Update of /cvsroot/bzflag/bzflag/src/geometry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11232 Modified Files: TankGeometryMgr.cxx Log Message: revert Index: TankGeometryMgr.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankGeometryMgr.cxx,v retrieving revision 1.8 retrieving revision 1.9 diff -w -u -r1.8 -r1.9 --- TankGeometryMgr.cxx 30 Sep 2004 00:32:04 -0000 1.8 +++ TankGeometryMgr.cxx 30 Sep 2004 00:36:03 -0000 1.9 @@ -125,13 +125,6 @@ { float scale; - for (int i = 0; i < LastTankSize; i++) { - scaleFactors[i][0] = 1.0f; - scaleFactors[i][1] = 1.0f; - scaleFactors[i][2] = 1.0f; - } - return; - scaleFactors[Normal][0] = BZDB.eval(StateDatabase::BZDB_TANKLENGTH); scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKLENGTH).c_str()); scaleFactors[Normal][0] /= scale; |
|
From: Dave R. <tr...@us...> - 2004-09-30 00:32:18
|
Update of /cvsroot/bzflag/bzflag/src/geometry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10586 Modified Files: TankGeometryMgr.cxx Log Message: temporary test Index: TankGeometryMgr.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/geometry/TankGeometryMgr.cxx,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- TankGeometryMgr.cxx 30 Sep 2004 00:03:06 -0000 1.7 +++ TankGeometryMgr.cxx 30 Sep 2004 00:32:04 -0000 1.8 @@ -103,7 +103,7 @@ void TankGeometryMgr::deleteLists() { - // delete the list that have been aquired + // delete the lists that have been aquired for (int shadow = 0; shadow < LastTankShadow; shadow++) { for (int lod = 0; lod < LastTankLOD; lod++) { for (int size = 0; size < LastTankSize; size++) { @@ -125,6 +125,13 @@ { float scale; + for (int i = 0; i < LastTankSize; i++) { + scaleFactors[i][0] = 1.0f; + scaleFactors[i][1] = 1.0f; + scaleFactors[i][2] = 1.0f; + } + return; + scaleFactors[Normal][0] = BZDB.eval(StateDatabase::BZDB_TANKLENGTH); scale = (float)atof(BZDB.getDefault(StateDatabase::BZDB_TANKLENGTH).c_str()); scaleFactors[Normal][0] /= scale; |