gcblue-commits Mailing List for Global Conflict Blue (Page 70)
Status: Alpha
Brought to you by:
ddcforge
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(112) |
Feb
(106) |
Mar
(88) |
Apr
(111) |
May
(53) |
Jun
(60) |
Jul
(58) |
Aug
(61) |
Sep
(45) |
Oct
(31) |
Nov
(71) |
Dec
(70) |
2005 |
Jan
(33) |
Feb
(57) |
Mar
(98) |
Apr
(47) |
May
(53) |
Jun
(79) |
Jul
(79) |
Aug
|
Sep
(33) |
Oct
(1) |
Nov
(20) |
Dec
(64) |
2006 |
Jan
(20) |
Feb
(1) |
Mar
(43) |
Apr
(11) |
May
(8) |
Jun
(23) |
Jul
|
Aug
(28) |
Sep
(58) |
Oct
(25) |
Nov
(47) |
Dec
(70) |
From: <ddc...@us...> - 2004-01-04 22:24:56
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1:/tmp/cvs-serv2798/src/sim Modified Files: Game.cpp tcCarrierObject.cpp tcESMSensorState.cpp tcFlightPort.cpp tcLauncherState.cpp tcMissileObject.cpp tcObjectControl.cpp tcPlatformObject.cpp tcPopupControl.cpp tcRadarSensorState.cpp tcSensorState.cpp tcSimState.cpp Log Message: Added database class for flightports Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Game.cpp 3 Jan 2004 03:51:17 -0000 1.48 --- Game.cpp 4 Jan 2004 22:24:52 -0000 1.49 *************** *** 1,2 **** --- 1,3 ---- + /** @file Game.cpp main application class */ /** * Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) *************** *** 333,337 **** mcDatabase.LoadDBCSV(); ! //mcDatabase.SaveDBCSV(); tcGameObject::SetGameObjectDatabase(&mcDatabase); // added to allow objects to init themselves --- 334,341 ---- mcDatabase.LoadDBCSV(); ! // uncomment the SaveDBCSV line to save copy of database to _out suffix, ! // warning, this erroneously puts a copy of air DB objects into the generic file ! // need to fix DB obj structure so that only leaf classes are used by game objects ! //mcDatabase.SaveDBCSV("_out"); tcGameObject::SetGameObjectDatabase(&mcDatabase); // added to allow objects to init themselves *************** *** 1569,1573 **** else { ! //* ProcessCommand(cmd_info.meCmd,cmd_info.mfData,cmd_info.mnData,cmd_info.mnData2); } } --- 1573,1581 ---- else { ! if (cmd_info.meCmd == GC_QUIT) // a hack for now ! { ! mbQuit = true; ! } ! // ProcessCommand(cmd_info.meCmd,cmd_info.mfData,cmd_info.mnData,cmd_info.mnData2); } } *************** *** 1855,1861 **** switch (aeCmd) { ! case GC_NULL: ! WTL("tcGame::ProcessCommand GC_NULL"); ! break; case GC_TOGGLEEDIT: mbScenarioEdit = !mbScenarioEdit; --- 1863,1867 ---- switch (aeCmd) { ! /* case GC_TOGGLEEDIT: mbScenarioEdit = !mbScenarioEdit; *************** *** 1870,1877 **** mbPaused = true; break; case GC_QUIT: WTL("tcGame::ProcessCommand GC_QUIT"); ! PostMessage(WM_QUIT, 0, 0); break; case GC_RESETMAP: WTL("tcGame::ProcessCommand GC_RESETMAP"); --- 1876,1885 ---- mbPaused = true; break; + */ case GC_QUIT: WTL("tcGame::ProcessCommand GC_QUIT"); ! mbQuit = true; break; + /* case GC_RESETMAP: WTL("tcGame::ProcessCommand GC_RESETMAP"); *************** *** 2006,2009 **** --- 2014,2018 ---- mcObjectControl.SetHookID(NULL_INDEX); break; + */ default: WTL("tcGame::ProcessCommand unrecognized game command"); Index: tcCarrierObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcCarrierObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcCarrierObject.cpp 8 Dec 2003 03:06:36 -0000 1.4 --- tcCarrierObject.cpp 4 Jan 2004 22:24:52 -0000 1.5 *************** *** 22,26 **** #include "tcAeroAirObject.h" #include "tcAirDBObject.h" ! /******************************************************************************/ --- 22,26 ---- #include "tcAeroAirObject.h" #include "tcAirDBObject.h" ! #include "tcFlightportDBObject.h" /******************************************************************************/ *************** *** 73,76 **** --- 73,97 ---- mcGS.SetAltitude(mcKin.mfAlt_m); + int nAircraft = flight_deck.GetHangarCapacity(); + for(int i=0;i<nAircraft;i++) + { + // add FW air child for test + tcDatabaseObject *dbObj = database->GetRandomOfType(MTYPE_FIXEDWINGX); + tcAirDBObject *airDBObj = dynamic_cast<tcAirDBObject*>(dbObj); + tcAeroAirObject *child = NULL; + if (airDBObj) child = new tcAeroAirObject(airDBObj); + wxASSERT(child); + if (child != NULL) + { + child->mzUnit = "AIRX_"; + child->mzUnit.AssignRandomSuffix(); + float z = -20.0f + (float)i * 18.0f; + child->SetRelativePosition(7.5,12.0,z); + child->SetRelativeOrientation(0,0,0); + AddChild(child); + flight_deck.AddObject(child, LAUNCH); + } + } + } *************** *** 146,150 **** Clear(); ! SetFlightportDefaults(); mpDBObject = NULL; --- 167,171 ---- Clear(); ! //SetFlightportDefaults(); mpDBObject = NULL; *************** *** 168,193 **** : tcSurfaceObject(obj) { mpDBObject = obj; ! SetFlightportDefaults(); ! ! for(int i=0;i<8;i++) { ! // add FW air child for test ! tcDatabaseObject *dbObj = database->GetRandomOfType(MTYPE_FIXEDWINGX); ! tcAirDBObject *airDBObj = dynamic_cast<tcAirDBObject*>(dbObj); ! tcAeroAirObject *child = NULL; ! if (airDBObj) child = new tcAeroAirObject(airDBObj); ! if (child != NULL) ! { ! child->mzUnit = "AIRX_"; ! child->mzUnit.AssignRandomSuffix(); ! float z = -20.0f + (float)i * 18.0f; ! child->SetRelativePosition(7.5,12.0,z); ! child->SetRelativeOrientation(0,0,0); ! AddChild(child); ! flight_deck.AddObject(child, LAUNCH); ! } } } /******************************************************************************/ --- 189,207 ---- : tcSurfaceObject(obj) { + wxASSERT(database); mpDBObject = obj; ! ! tcFlightportDBObject* flightportDBObj = dynamic_cast<tcFlightportDBObject*> ! (database->GetObject(obj->flightportClass.mz)); ! wxASSERT(flightportDBObj); ! if (flightportDBObj == NULL) { ! std::cerr << "Flightport database obj not found for carrier obj: "; ! std::cerr << mzUnit.mz << "\n"; ! return; } + + flight_deck.InitFromDatabase(flightportDBObj); } /******************************************************************************/ Index: tcESMSensorState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcESMSensorState.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcESMSensorState.cpp 4 Dec 2003 05:15:22 -0000 1.1 --- tcESMSensorState.cpp 4 Jan 2004 22:24:53 -0000 1.2 *************** *** 25,31 **** * */ ! bool tcESMSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey) { ! tcSensorState::InitFromDB(apDatabase, anKey); mpDBObj = dynamic_cast<tcESMDBObject*>(apDatabase->GetObject(anKey)); --- 25,31 ---- * */ ! bool tcESMSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad) { ! tcSensorState::InitFromDB(apDatabase, anKey, mountAzimuth_rad); mpDBObj = dynamic_cast<tcESMDBObject*>(apDatabase->GetObject(anKey)); Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcFlightPort.cpp 30 Oct 2003 01:21:46 -0000 1.3 --- tcFlightPort.cpp 4 Jan 2004 22:24:53 -0000 1.4 *************** *** 1,8 **** ! #ifdef WX_PRECOMP ! #include "stdwx.h" #endif #include "tcFlightPort.h" #include "tcAirObject.h" --- 1,34 ---- ! /** @file tcFlightport.cpp */ ! /** ! * Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ! * All rights reserved. ! * ! * This file is part of the Global Conflict Blue (GCB) program. ! * GCB is free software; you can redistribute it and/or modify ! * it under the terms of version 2 of the GNU General Public License as ! * published by the Free Software Foundation. ! * ! * GCB is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with GCB; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! ! #include "stdwx.h" // precompiled header file ! ! #ifndef WX_PRECOMP ! #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions ! #endif #endif #include "tcFlightPort.h" #include "tcAirObject.h" + #include "tcFlightportDBObject.h" *************** *** 312,315 **** --- 338,364 ---- } } + + /** + * Initialize flightport using data in dbObj. + */ + void tcFlightPort::InitFromDatabase(Database::tcFlightportDBObject *dbObj) + { + wxASSERT(dbObj); + + Clear(); + hangarCapacity = dbObj->hangarCapacity; + inHangarCount = 0; + + size_t nSpots = dbObj->spotInfo.size(); + for(size_t spot=0;spot<nSpots;spot++) + { + tcFlightportDBObject::spotDBInfo info = dbObj->spotInfo[spot]; + + teLocation loc = (info.isLaunch) ? LAUNCH : READY; + AddSpot(loc, info.x, info.y, info.z, C_PIOVER180*info.orientation_deg, info.length); + } + + } + /** * Set unit position and orientation to match that of current spot. Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcLauncherState.cpp 4 Dec 2003 05:15:22 -0000 1.1 --- tcLauncherState.cpp 4 Jan 2004 22:24:53 -0000 1.2 *************** *** 25,29 **** * */ ! void tcLauncherState::AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey) { tcLauncherDBObject *ldata; --- 25,29 ---- * */ ! void tcLauncherState::AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey, float azimuth_rad) { tcLauncherDBObject *ldata; *************** *** 68,71 **** --- 68,72 ---- ma[mnCount].meLaunchMode = AUTO; ma[mnCount].mnPending = 0; + ma[mnCount].pointingAngle = azimuth_rad; // set detailed launch mode if missile tcMissileDBObject* pMissileDBObj = dynamic_cast<tcMissileDBObject*>(pDatabase->GetObject(nChildKey)); Index: tcMissileObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMissileObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcMissileObject.cpp 14 Dec 2003 20:58:47 -0000 1.3 --- tcMissileObject.cpp 4 Jan 2004 22:24:53 -0000 1.4 *************** *** 407,411 **** // init sensors, only one sensor (primary) supported in this version tnPoolIndex nSensorKey = database->GetKey(obj->maSensorClass[0]); ! mcSensorState.InitFromDB(database,nSensorKey); } --- 407,411 ---- // init sensors, only one sensor (primary) supported in this version tnPoolIndex nSensorKey = database->GetKey(obj->maSensorClass[0]); ! mcSensorState.InitFromDB(database,nSensorKey, 0); // missile seeker always points forward } Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcObjectControl.cpp 8 Dec 2003 03:06:36 -0000 1.8 --- tcObjectControl.cpp 4 Jan 2004 22:24:53 -0000 1.9 *************** *** 1501,1505 **** msOCSymbolList.maSymbol[k].mfLatExtent_rad = fRangeY_rad; msOCSymbolList.maSymbol[k].mfLonExtent_rad = fRangeX_rad; ! msOCSymbolList.maSymbol[k].mfArcCenter_deg = mpHookedGameObj->mcKin.mfHeading_rad*C_180OVERPI; msOCSymbolList.maSymbol[k].mfArcLength_deg = pRadarSS->mpDBObj->mfFieldOfView_deg; if (msOCSymbolList.maSymbol[k].mfArcLength_deg < 360.0f) --- 1501,1507 ---- msOCSymbolList.maSymbol[k].mfLatExtent_rad = fRangeY_rad; msOCSymbolList.maSymbol[k].mfLonExtent_rad = fRangeX_rad; ! float sensorAz_deg = (mpHookedGameObj->mcKin.mfHeading_rad + pRadarSS->mountAz_rad) ! * C_180OVERPI; ! msOCSymbolList.maSymbol[k].mfArcCenter_deg = sensorAz_deg; // wrt North msOCSymbolList.maSymbol[k].mfArcLength_deg = pRadarSS->mpDBObj->mfFieldOfView_deg; if (msOCSymbolList.maSymbol[k].mfArcLength_deg < 360.0f) Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcPlatformObject.cpp 8 Dec 2003 03:06:36 -0000 1.7 --- tcPlatformObject.cpp 4 Jan 2004 22:24:53 -0000 1.8 *************** *** 411,415 **** { tnPoolIndex nLauncherKey = database->GetKey(mpDBObject->maLauncherClass[nLauncher]); ! mcLauncherState.AddFullLauncher(database,nLauncherKey); } --- 411,416 ---- { tnPoolIndex nLauncherKey = database->GetKey(mpDBObject->maLauncherClass[nLauncher]); ! float launcherAz_deg = mpDBObject->launcherAz[nLauncher]; ! mcLauncherState.AddFullLauncher(database, nLauncherKey, C_PIOVER180*launcherAz_deg); } *************** *** 425,432 **** tnPoolIndex nSensorKey = database->GetKey(mpDBObject->maSensorClass[i]); tcDatabaseObject *pDBObj = database->GetObject(nSensorKey); if (tcRadarDBObject *pRadarDBObj = dynamic_cast<tcRadarDBObject*>(pDBObj)) { tcRadarSensorState *pRadarSS = new tcRadarSensorState; ! pRadarSS->InitFromDB(database,nSensorKey); pRadarSS->mpDBObj = pRadarDBObj; pSensorState = pRadarSS; --- 426,435 ---- tnPoolIndex nSensorKey = database->GetKey(mpDBObject->maSensorClass[i]); tcDatabaseObject *pDBObj = database->GetObject(nSensorKey); + float lookAz_rad = C_PIOVER180 * mpDBObject->sensorAz[i]; + if (tcRadarDBObject *pRadarDBObj = dynamic_cast<tcRadarDBObject*>(pDBObj)) { tcRadarSensorState *pRadarSS = new tcRadarSensorState; ! pRadarSS->InitFromDB(database, nSensorKey, lookAz_rad); pRadarSS->mpDBObj = pRadarDBObj; pSensorState = pRadarSS; *************** *** 435,439 **** { tcESMSensorState *pESMSS = new tcESMSensorState; ! pESMSS->InitFromDB(database,nSensorKey); pESMSS->mpDBObj = pESMDBObj; pSensorState = pESMSS; --- 438,442 ---- { tcESMSensorState *pESMSS = new tcESMSensorState; ! pESMSS->InitFromDB(database, nSensorKey, lookAz_rad); pESMSS->mpDBObj = pESMDBObj; pSensorState = pESMSS; Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPopupControl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcPopupControl.cpp 30 Nov 2003 17:23:52 -0000 1.4 --- tcPopupControl.cpp 4 Jan 2004 22:24:53 -0000 1.5 *************** *** 96,107 **** mcGameMenu.Clear(); ! mcGameMenu.AddItem("Switch to scenedit mode", GC_TOGGLEEDIT); ! mcGameMenu.AddItem("File", 0); ! mcGameMenu.BeginSubMenu(); ! mcGameMenu.AddItem("Save scenario", GC_SAVESCEN); ! mcGameMenu.AddItem("Load scenario", GC_LOADSCEN); mcGameMenu.AddItem("Quit", GC_QUIT); ! mcGameMenu.EndSubMenu(); mcPlatformMenu.Clear(); --- 96,107 ---- mcGameMenu.Clear(); ! //mcGameMenu.AddItem("Switch to scenedit mode", GC_TOGGLEEDIT); ! //mcGameMenu.AddItem("File", 0); ! // mcGameMenu.BeginSubMenu(); ! //mcGameMenu.AddItem("Save scenario", GC_SAVESCEN); ! //mcGameMenu.AddItem("Load scenario", GC_LOADSCEN); mcGameMenu.AddItem("Quit", GC_QUIT); ! //mcGameMenu.EndSubMenu(); mcPlatformMenu.Clear(); Index: tcRadarSensorState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcRadarSensorState.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcRadarSensorState.cpp 4 Dec 2003 05:15:22 -0000 1.1 --- tcRadarSensorState.cpp 4 Jan 2004 22:24:53 -0000 1.2 *************** *** 25,31 **** * */ ! bool tcRadarSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey) { ! tcSensorState::InitFromDB(apDatabase, anKey); mpDBObj = dynamic_cast<tcRadarDBObject*>(apDatabase->GetObject(anKey)); --- 25,31 ---- * */ ! bool tcRadarSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad) { ! tcSensorState::InitFromDB(apDatabase, anKey, mountAzimuth_rad); mpDBObj = dynamic_cast<tcRadarDBObject*>(apDatabase->GetObject(anKey)); Index: tcSensorState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorState.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorState.cpp 4 Dec 2003 05:15:22 -0000 1.1 --- tcSensorState.cpp 4 Jan 2004 22:24:53 -0000 1.2 *************** *** 38,42 **** /** ! * */ void tcSensorState::UpdateCoverage(tsGeoPoint p,float az_rad) --- 38,45 ---- /** ! * may want to change this to use a pointer to the platform ! * to get platform info vs. passing this information with ! * methods like this. ! * @param az_rad platform heading */ void tcSensorState::UpdateCoverage(tsGeoPoint p,float az_rad) *************** *** 44,55 **** msCurrentPos.mfLon_rad = p.mfLon_rad; msCurrentPos.mfLat_rad = p.mfLat_rad; ! mfLookAz_rad = az_rad; msCurrentPos.mfAlt_m = p.mfAlt_m + mfSensorHeight_m; } /** ! * */ ! bool tcSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey) { mpDBObj = dynamic_cast<tcSensorDBObject*>(apDatabase->GetObject(anKey)); --- 47,58 ---- msCurrentPos.mfLon_rad = p.mfLon_rad; msCurrentPos.mfLat_rad = p.mfLat_rad; ! mfLookAz_rad = az_rad + mountAz_rad; msCurrentPos.mfAlt_m = p.mfAlt_m + mfSensorHeight_m; } /** ! * @param lookAz_rad azimuth of center of coverage in radians, 0 points forward */ ! bool tcSensorState::InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad) { mpDBObj = dynamic_cast<tcSensorDBObject*>(apDatabase->GetObject(anKey)); *************** *** 64,67 **** --- 67,71 ---- mfCurrentScanPeriod_s = mpDBObj->mfScanPeriod_s; mfSensorHeight_m = 0; + mountAz_rad = mountAzimuth_rad; return true; } *************** *** 80,83 **** --- 84,88 ---- file.Read(&mfLastScan,sizeof(mfLastScan)); file.Read(&mfLookAz_rad,sizeof(mfLookAz_rad)); + file.Read(&mountAz_rad,sizeof(mountAz_rad)); file.Read(&mfSensorHeight_m,sizeof(mfSensorHeight_m)); file.Read(&mnMode,sizeof(mnMode)); *************** *** 91,94 **** --- 96,100 ---- file.Write(&mfLastScan,sizeof(mfLastScan)); file.Write(&mfLookAz_rad,sizeof(mfLookAz_rad)); + file.Write(&mountAz_rad,sizeof(mountAz_rad)); file.Write(&mfSensorHeight_m,sizeof(mfSensorHeight_m)); file.Write(&mnMode,sizeof(mnMode)); *************** *** 127,130 **** --- 133,137 ---- mfLastScan = ss.mfLastScan; mfLookAz_rad = ss.mfLookAz_rad; + mountAz_rad = ss.mountAz_rad; mfSensorHeight_m =ss.mfSensorHeight_m; mnDBKey = ss.mnDBKey; Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** tcSimState.cpp 1 Jan 2004 23:44:47 -0000 1.20 --- tcSimState.cpp 4 Jan 2004 22:24:53 -0000 1.21 *************** *** 116,125 **** } /********************************************************************/ ! bool tcSimState::RadarCanDetect(tnPoolIndex anSensorKey, const tsRadarTargetInfo& asRTI, tsGeoPoint asSensorLocation, float afSensorAz) { float fRange_km; ! if (mcDefaultRadar.InitFromDB(mpDatabase,anSensorKey)==false) {return false;} mcDefaultRadar.UpdateCoverage(asSensorLocation,afSensorAz); return mcDefaultRadar.IsDetected(asRTI,fRange_km); --- 116,133 ---- } /********************************************************************/ ! /** ! * This method is not named well. The intent is to use this to check if ! * a target is detectable with a radar that does not exist yet. So e.g. ! * to simulate a missile seeker locking on before launch. This allows a ! * detection test without creating the object. ! * Since normal use is with missiles, the sensor az is assumed to be 0. ! * If this is used with a non forward looking radar, it will not work ! * correctly. ! */ bool tcSimState::RadarCanDetect(tnPoolIndex anSensorKey, const tsRadarTargetInfo& asRTI, tsGeoPoint asSensorLocation, float afSensorAz) { float fRange_km; ! if (mcDefaultRadar.InitFromDB(mpDatabase,anSensorKey,0)==false) {return false;} mcDefaultRadar.UpdateCoverage(asSensorLocation,afSensorAz); return mcDefaultRadar.IsDetected(asRTI,fRange_km); |
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1:/tmp/cvs-serv2798/src/database Modified Files: tcAirDBObject.cpp tcDatabase.cpp tcESMDBObject.cpp tcFixedDBObject.cpp tcGenericDBObject.cpp tcRadarDBObject.cpp Added Files: tcFlightportDBObject.cpp Log Message: Added database class for flightports --- NEW FILE: tcFlightportDBObject.cpp --- /* ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "stdwx.h" #pragma warning(disable:4786) // suppress warning for STL bug in VC6, see Q167355 in the MSDN Library. #include "tcFlightportDBObject.h" #include "math_constants.h" #include "randfn.h" #include "CsvTranslator.h" using namespace std; namespace Database { void tcFlightportDBObject::RandInit() { static int bSeedRand = 1; if (bSeedRand) { SYSTEMTIME stime; GetSystemTime(&stime); srand(60*stime.wMinute + stime.wSecond); bSeedRand = 0; } } int tcFlightportDBObject::SerializeCSV(Database::CsvTranslator *csv, bool mbLoad) { tcDatabaseObject::SerializeCSV(csv, mbLoad); if (mbLoad) { std::string s; *csv >> heloOnly; ///< set non-zero for helo-only flight port *csv >> hangarCapacity; spotInfo.clear(); int i; for(i=0;i<MAX_DB_SPOTS;i++) { spotDBInfo info; *csv >> info.isLaunch; *csv >> info.x; *csv >> info.y; // y and z swapped in header due to OSG coord change *csv >> info.z; *csv >> info.orientation_deg; *csv >> info.length; bool isValid = (info.x != 0)||(info.y !=0)||(info.z != 0); if (isValid) { spotInfo.push_back(info); } } } else { *csv << (long)heloOnly; ///< set non-zero for helo-only flight port *csv << (long)hangarCapacity; size_t numSpots = spotInfo.size(); size_t i; for(i=0;i<MAX_DB_SPOTS;i++) { if (i<numSpots) { spotDBInfo info = spotInfo[i]; *csv << (long)info.isLaunch; *csv << info.x; *csv << info.y; // y and z swapped in header due to OSG coord change *csv << info.z; *csv << info.orientation_deg; *csv << info.length; } else { *csv << ""; *csv << ""; *csv << ""; *csv << ""; *csv << ""; *csv << ""; } } csv->WriteLine(); } return 1; } int tcFlightportDBObject::WriteCSVHeader(Database::CsvTranslator *csv) { tcDatabaseObject::WriteCSVHeader(csv); *csv << "Helo only?"; *csv << "Hangar capacity"; int i; for(i=0;i<MAX_DB_SPOTS;i++) { tcString s; s.Format("S%d-Launch",i+1); *csv << s.GetBuffer(); s.Format("S%d-x[m]",i+1); *csv << s.GetBuffer(); s.Format("S%d-z",i+1); // y and z swapped due to OSG coord change *csv << s.GetBuffer(); s.Format("S%d-y",i+1); *csv << s.GetBuffer(); s.Format("S%d-orientation[deg]",i+1); *csv << s.GetBuffer(); s.Format("S%d-length[m]",i+1); *csv << s.GetBuffer(); } csv->WriteLine(); return 1; } tcFlightportDBObject::tcFlightportDBObject() : tcDatabaseObject() { mnClassID = DTYPE_FLIGHTPORT; mnModelType = MTYPE_OBJECT; heloOnly = 0; ///< set non-zero for helo-only flight port hangarCapacity = 0; spotInfo.clear(); } tcFlightportDBObject::tcFlightportDBObject(tcFlightportDBObject& obj) : tcDatabaseObject(obj) { heloOnly = obj.heloOnly; hangarCapacity = obj.hangarCapacity; spotInfo.clear(); size_t nSpots = obj.spotInfo.size(); for(size_t i=0;i<nSpots;i++) { spotInfo.push_back(obj.spotInfo[i]); } } tcFlightportDBObject::~tcFlightportDBObject() { } } Index: tcAirDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcAirDBObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcAirDBObject.cpp 8 Dec 2003 03:06:36 -0000 1.4 --- tcAirDBObject.cpp 4 Jan 2004 22:24:52 -0000 1.5 *************** *** 108,111 **** --- 108,112 ---- : tcGenericDBObject(obj) { + mnClassID = DTYPE_AIR; mfAfterburnFuelRate_kgps = obj.mfAfterburnFuelRate_kgps; mfAfterburnThrust_N = obj.mfAfterburnThrust_N; Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcDatabase.cpp 8 Dec 2003 03:06:36 -0000 1.4 --- tcDatabase.cpp 4 Jan 2004 22:24:52 -0000 1.5 *************** *** 41,45 **** #include "tcFixedDBObject.h" #include "tcAirDBObject.h" ! using namespace std; --- 41,45 ---- #include "tcFixedDBObject.h" #include "tcAirDBObject.h" ! #include "tcFlightportDBObject.h" using namespace std; *************** *** 68,71 **** --- 68,72 ---- std::string esmFileName = path + string("esm") + suffix + ".csv"; std::string airFileName = path + string("air") + suffix + ".csv"; + std::string flightportFileName = path + string("flightport") + suffix + ".csv"; if (mbLoad) *************** *** 102,105 **** --- 103,111 ---- serializer.LoadCsv(); } + // tcFlightportDBObject + { + tcDBObjSerializer<tcFlightportDBObject> serializer(flightportFileName, this); + serializer.LoadCsv(); + } } else *************** *** 134,137 **** --- 140,148 ---- { tcDBObjSerializer<tcAirDBObject> serializer(airFileName, this); + serializer.SaveCsv(); + } + // tcFlightportDBObject + { + tcDBObjSerializer<tcFlightportDBObject> serializer(flightportFileName, this); serializer.SaveCsv(); } Index: tcESMDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcESMDBObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcESMDBObject.cpp 7 Dec 2003 01:53:36 -0000 1.2 --- tcESMDBObject.cpp 4 Jan 2004 22:24:52 -0000 1.3 *************** *** 86,89 **** --- 86,90 ---- : tcSensorDBObject(obj) { + mnClassID = DTYPE_ESM; } Index: tcFixedDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcFixedDBObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcFixedDBObject.cpp 7 Dec 2003 01:53:36 -0000 1.2 --- tcFixedDBObject.cpp 4 Jan 2004 22:24:52 -0000 1.3 *************** *** 80,84 **** : tcDatabaseObject(obj) { ! } --- 80,84 ---- : tcDatabaseObject(obj) { ! mnClassID = DTYPE_FIXED; } Index: tcGenericDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcGenericDBObject.cpp 7 Dec 2003 14:29:32 -0000 1.3 --- tcGenericDBObject.cpp 4 Jan 2004 22:24:52 -0000 1.4 *************** *** 68,71 **** --- 68,72 ---- mnNumLaunchers = 0; mnNumSensors = 0; + flightportClass = ""; } *************** *** 172,187 **** *csv >> mfMaxThrust_N; *csv >> mfRange_km; int i; mnNumLaunchers = 0; for(i=0;i<MAXLAUNCHERS;i++) { *csv >> s; ! if (s.size() > 0) maLauncherClass[mnNumLaunchers++] = s.c_str(); } mnNumSensors = 0; for(i=0;i<MAXSENSORS;i++) { *csv >> s; ! if (s.size() > 0) maSensorClass[mnNumSensors++] = s.c_str(); } } --- 173,203 ---- *csv >> mfMaxThrust_N; *csv >> mfRange_km; + *csv >> s; + flightportClass = s.c_str(); + int i; mnNumLaunchers = 0; for(i=0;i<MAXLAUNCHERS;i++) { + float az; *csv >> s; ! *csv >> az; ! if (s.size() > 0) ! { ! maLauncherClass[mnNumLaunchers] = s.c_str(); ! launcherAz[mnNumLaunchers++] = az; ! } } mnNumSensors = 0; for(i=0;i<MAXSENSORS;i++) { + float az; *csv >> s; ! *csv >> az; ! if (s.size() > 0) ! { ! maSensorClass[mnNumSensors] = s.c_str(); ! sensorAz[mnNumSensors++] = az; ! } } } *************** *** 202,215 **** *csv << mfMaxThrust_N; *csv << mfRange_km; int i; for(i=0;i<MAXLAUNCHERS;i++) { ! if (i<mnNumLaunchers) *csv << string(maLauncherClass[i].mz); ! else *csv << ""; } for(i=0;i<MAXSENSORS;i++) { ! if (i<mnNumSensors) *csv << string(maSensorClass[i].mz); ! else *csv << ""; } csv->WriteLine(); --- 218,249 ---- *csv << mfMaxThrust_N; *csv << mfRange_km; + *csv << flightportClass.mz; + int i; for(i=0;i<MAXLAUNCHERS;i++) { ! if (i<mnNumLaunchers) ! { ! *csv << string(maLauncherClass[i].mz); ! *csv << launcherAz[i]; ! } ! else ! { ! *csv << ""; ! *csv << ""; ! } } for(i=0;i<MAXSENSORS;i++) { ! if (i<mnNumSensors) ! { ! *csv << string(maSensorClass[i].mz); ! *csv << sensorAz[i]; ! } ! else ! { ! *csv << ""; ! *csv << ""; ! } } csv->WriteLine(); *************** *** 235,238 **** --- 269,273 ---- *csv << "MaxThrust[N]"; *csv << "Range_km"; + *csv << "Flightport Class"; int i; for(i=0;i<MAXLAUNCHERS;i++) *************** *** 241,244 **** --- 276,281 ---- s.Format("Launcher%d",i+1); *csv << s.GetBuffer(); + s.Format("Launcher%d-angle",i+1); + *csv << s.GetBuffer(); } for(i=0;i<MAXSENSORS;i++) *************** *** 247,250 **** --- 284,289 ---- s.Format("Sensor%d",i+1); *csv << s.GetBuffer(); + s.Format("Sensor%d-angle",i+1); + *csv << s.GetBuffer(); } csv->WriteLine(); *************** *** 272,275 **** --- 311,315 ---- mnNumLaunchers = 0; mnNumSensors = 0; + flightportClass = ""; } *************** *** 277,280 **** --- 317,321 ---- : tcDatabaseObject(obj) { + mnClassID = DTYPE_GENERIC; mfRcs_dbsm = obj.mfRcs_dbsm; mfMaxSpeed_kts = obj.mfMaxSpeed_kts; *************** *** 298,306 **** --- 339,350 ---- { maLauncherClass[i] = obj.maLauncherClass[i]; + launcherAz[i] = obj.launcherAz[i]; } for(i=0;i<MAXSENSORS;i++) { maSensorClass[i] = obj.maSensorClass[i]; + sensorAz[i] = obj.sensorAz[i]; } + flightportClass = obj.flightportClass; } Index: tcRadarDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcRadarDBObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcRadarDBObject.cpp 7 Dec 2003 01:53:36 -0000 1.2 --- tcRadarDBObject.cpp 4 Jan 2004 22:24:52 -0000 1.3 *************** *** 159,162 **** --- 159,163 ---- : tcSensorDBObject(obj) { + mnClassID = DTYPE_RADAR; mfMinRange_km = obj.mfMinRange_km; mfERP_dBW = obj.mfERP_dBW; |
From: <ddc...@us...> - 2004-01-04 22:24:56
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1:/tmp/cvs-serv2798/include/sim Modified Files: tcESMSensorState.h tcFlightPort.h tcLauncherState.h tcRadarSensorState.h tcSensorState.h Log Message: Added database class for flightports Index: tcESMSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcESMSensorState.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcESMSensorState.h 4 Dec 2003 05:15:22 -0000 1.1 --- tcESMSensorState.h 4 Jan 2004 22:24:52 -0000 1.2 *************** *** 50,54 **** tcESMDBObject *mpDBObj; ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey); bool IsDetected(const tsESMTargetInfo& asETI, float& rfAz_rad); void Serialize(tcFile& file, bool mbLoad); --- 50,54 ---- tcESMDBObject *mpDBObj; ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); bool IsDetected(const tsESMTargetInfo& asETI, float& rfAz_rad); void Serialize(tcFile& file, bool mbLoad); Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcFlightPort.h 11 Nov 2003 11:42:43 -0000 1.3 --- tcFlightPort.h 4 Jan 2004 22:24:52 -0000 1.4 *************** *** 27,30 **** --- 27,34 ---- #include "tcGameObject.h" + namespace Database + { + class tcFlightportDBObject; + } /** Location info for air unit in flightport. *************** *** 33,41 **** enum teLocation { ! NOWHERE, ! HANGAR, //< longer term storage or repair ! READY, //< out of hangar ! LAUNCH, //< ready to take off ! TRANSIT //< moving }; enum teOperation --- 37,45 ---- enum teLocation { ! NOWHERE = 0, ! HANGAR = 1, ///< longer term storage or repair ! READY = 2, ///< out of hangar ! LAUNCH = 3, ///< ready to take off ! TRANSIT = 4 ///< moving }; enum teOperation *************** *** 44,54 **** OP_TRANSIT, OP_UNLOAD, ! OP_LOAD, // or refuel OP_REPAIR, OP_CHECK }; ! /* state info for units in the flightport ! ** This state info is unique info particular to flightport operations */ class tcAirState --- 48,59 ---- OP_TRANSIT, OP_UNLOAD, ! OP_LOAD, ///< or refuel OP_REPAIR, OP_CHECK }; ! /** ! * state info for units in the flightport ! * This state info is unique info particular to flightport operations */ class tcAirState *************** *** 101,105 **** --- 106,112 ---- size_t GetCount(void) {return units.size();} tsSpotInfo* GetCurrentSpotInfo(tcAirState *airstate); + unsigned GetHangarCapacity() const {return hangarCapacity;} std::vector<tsSpotInfo>* GetLocVector(teLocation loc); + void InitFromDatabase(Database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); int Launch(int runway); // order unit on runway to take off Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcLauncherState.h 4 Dec 2003 05:15:22 -0000 1.1 --- tcLauncherState.h 4 Jan 2004 22:24:52 -0000 1.2 *************** *** 35,41 **** * State for individual launcher. */ ! typedef struct _ldata { int mbActive; ! long mnDBKey; // key in launcher database tcLauncherDBObject *mpLauncherDBObj; long mnChildDBKey; --- 35,42 ---- * State for individual launcher. */ ! struct tsLData ! { int mbActive; ! long mnDBKey; ///< key in launcher database tcLauncherDBObject *mpLauncherDBObj; long mnChildDBKey; *************** *** 43,52 **** float mfTimeToReady; unsigned int mnCurrent; ! tsGeoPoint msDatum; // datum to pass to weapon nav guidance ! tnPoolIndex mnTargetID; // track that seeker can acquire teWeaponLaunchMode meLaunchMode; ! int mnTargetFlags; // 0x01 - surface, 0x02 - air, 0x03 - land unsigned int mnPending; ! } tsLData; /** --- 44,54 ---- float mfTimeToReady; unsigned int mnCurrent; ! tsGeoPoint msDatum; ///< datum to pass to weapon nav guidance ! tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; ! int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land unsigned int mnPending; ! float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow ! }; /** *************** *** 60,64 **** static tcDatabase *mpDatabase; ! void AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey); int GetLauncherQuantity(unsigned anLauncher) { if ((int)anLauncher > mnCount) {return -1;} --- 62,66 ---- static tcDatabase *mpDatabase; ! void AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey, float azimuth_rad); int GetLauncherQuantity(unsigned anLauncher) { if ((int)anLauncher > mnCount) {return -1;} Index: tcRadarSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadarSensorState.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcRadarSensorState.h 4 Dec 2003 05:15:22 -0000 1.1 --- tcRadarSensorState.h 4 Jan 2004 22:24:52 -0000 1.2 *************** *** 47,51 **** tcRadarDBObject *mpDBObj; ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey); bool IsDetected(const tsRadarTargetInfo& asRTI, float& rfRange_km); void Serialize(tcFile& file, bool mbLoad); --- 47,51 ---- tcRadarDBObject *mpDBObj; ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); bool IsDetected(const tsRadarTargetInfo& asRTI, float& rfRange_km); void Serialize(tcFile& file, bool mbLoad); Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorState.h 4 Dec 2003 05:15:22 -0000 1.1 --- tcSensorState.h 4 Jan 2004 22:24:52 -0000 1.2 *************** *** 50,59 **** int mnMode; tcTrack mcTrack; ! tsGeoPoint msCurrentPos; // current true position of sensor ! float mfLookAz_rad; // azimuth of center of coverage ! float mfSensorHeight_m; // additional height for sensor over platform altitude void GetTestArea(tcRect& region); ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey); void Serialize(tcFile& file, bool mbLoad); void UpdateCoverage(tsGeoPoint p,float az_rad); --- 50,60 ---- int mnMode; tcTrack mcTrack; ! tsGeoPoint msCurrentPos; ///< current true position of sensor ! float mfLookAz_rad; ///< azimuth of center of coverage relative to north ! float mountAz_rad; ///< mounted azimuth of boresight relative to nose/bow of platform ! float mfSensorHeight_m; ///< height of sensor relative to platform altitude void GetTestArea(tcRect& region); ! bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); void Serialize(tcFile& file, bool mbLoad); void UpdateCoverage(tsGeoPoint p,float az_rad); |
From: <ddc...@us...> - 2004-01-04 22:24:55
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1:/tmp/cvs-serv2798/include/database Modified Files: tcDatabaseObject.h tcGenericDBObject.h Added Files: tcFlightportDBObject.h Log Message: Added database class for flightports --- NEW FILE: tcFlightportDBObject.h --- /** @file tcFlightportDBObject.h */ /* ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _FLIGHTPORTDBOBJECT_H_ #define _FLIGHTPORTDBOBJECT_H_ #pragma once #include "tcDatabaseObject.h" #include <vector> namespace Database { /** * Data for flightport model. */ class tcFlightportDBObject : public tcDatabaseObject { public: struct spotDBInfo { int isLaunch; ///< 1 - if launch/land spot, 0 - if ready spot float x; ///< location of spot relative to parent float y; float z; float orientation_deg; ///< orientation for runway, 0 is along -z axis (heading axis for ships) float length; }; enum { MAX_DB_SPOTS = 16 ///< max spots in database--can be increased if needed }; int heloOnly; ///< set non-zero for helo-only flight port unsigned int hangarCapacity; std::vector<spotDBInfo> spotInfo; void RandInit(); int Serialize(tcFile& file, bool mbLoad, UINT32 anVersion); int SerializeCSV(CsvTranslator* csv, bool mbLoad); ///< CSV serialization static int WriteCSVHeader(CsvTranslator* csv); ///< writes column headings tcFlightportDBObject(); tcFlightportDBObject(tcFlightportDBObject& obj); ///< copy constructor virtual ~tcFlightportDBObject(); }; } #endif Index: tcDatabaseObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcDatabaseObject.h 8 Dec 2003 03:06:36 -0000 1.4 --- tcDatabaseObject.h 4 Jan 2004 22:24:52 -0000 1.5 *************** *** 94,97 **** --- 94,98 ---- #define DTYPE_FIXED 7 #define DTYPE_AIR 8 + #define DTYPE_FLIGHTPORT 9 #define DTYPE_NULL 0xFFFFFFFF Index: tcGenericDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcGenericDBObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcGenericDBObject.h 7 Dec 2003 14:29:32 -0000 1.3 --- tcGenericDBObject.h 4 Jan 2004 22:24:52 -0000 1.4 *************** *** 62,65 **** --- 62,68 ---- tcDBString maLauncherClass[MAXLAUNCHERS]; tcDBString maSensorClass[MAXSENSORS]; + float launcherAz[MAXLAUNCHERS]; ///< pointing angles of launchers in degrees + float sensorAz[MAXSENSORS]; ///< pointing angles of sensors in degrees + tcDBString flightportClass; ///< database class name of flightport (or empty if none) void RandInit(); |
From: <ddc...@us...> - 2004-01-04 22:24:55
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1:/tmp/cvs-serv2798 Modified Files: GCblue.vcproj Log Message: Added database class for flightports Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** GCblue.vcproj 3 Jan 2004 00:45:12 -0000 1.31 --- GCblue.vcproj 4 Jan 2004 22:24:52 -0000 1.32 *************** *** 430,433 **** --- 430,436 ---- </File> <File + RelativePath="src\database\tcFlightportDBObject.cpp"> + </File> + <File RelativePath="src\database\tcGenericDBObject.cpp"> </File> *************** *** 752,755 **** --- 755,761 ---- <File RelativePath="include\database\tcFixedDBObject.h"> + </File> + <File + RelativePath="include\database\tcFlightportDBObject.h"> </File> <File |
From: <ddc...@us...> - 2004-01-03 03:51:20
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv28745/src/graphics Modified Files: tcButton.cpp Log Message: Index: tcButton.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcButton.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcButton.cpp 3 Jan 2004 00:45:12 -0000 1.1 --- tcButton.cpp 3 Jan 2004 03:51:16 -0000 1.2 *************** *** 32,36 **** #include <iostream> ! using namespace Gdiplus; --- 32,39 ---- #include <iostream> ! Gdiplus::Pen* tcButton::pen = NULL; ! Gdiplus::SolidBrush* tcButton::brush = NULL; ! Gdiplus::Font* tcButton::font = NULL; ! unsigned tcButton::ref_count = 0; using namespace Gdiplus; *************** *** 68,71 **** --- 71,77 ---- brush->SetColor(textColor); + pen->SetColor(textColor); + + graphics->DrawRectangle(pen, buttonRect); tcWindow::DrawTextInRect(graphics, font, brush, caption.c_str(), buttonRect); *************** *** 128,149 **** fontSize = 16.0f; ! // init Gdiplus objects ! pen = new Pen(Color(255,100,255,100),2); ! if (pen == NULL) throw "tcObjectControl - mpPen creation failed\n"; ! FontFamily ff(L"Arial"); ! font = new Font(&ff,10,FontStyleBold,UnitPixel); ! if (font == NULL) throw "tcObjectControl - mpFont creation failed\n"; ! brush = new SolidBrush(Color(254,100,255,100)); ! if (brush == NULL) throw "tcObjectControl - mpBrush creation failed\n"; } tcButton::~tcButton() { ! if (pen) delete pen; ! if (brush) delete brush; ! if (font) delete font; } --- 134,188 ---- fontSize = 16.0f; ! // init static Gdiplus objects if necessary ! if (pen == NULL) ! { ! pen = new Pen(Color(255,100,255,100),1); ! if (pen == NULL) throw "tcButton - mpPen creation failed\n"; ! } ! if (font == NULL) ! { ! FontFamily ff(L"Arial"); ! font = new Font(&ff,10,FontStyleBold,UnitPixel); ! if (font == NULL) throw "tcButton - mpFont creation failed\n"; ! } ! if (brush == NULL) ! { ! brush = new SolidBrush(Color(254,100,255,100)); ! if (brush == NULL) throw "tcButton - mpBrush creation failed\n"; ! } + ref_count++; } tcButton::~tcButton() { ! wxASSERT(ref_count); ! ! ref_count--; ! ! // check if last button is being deleted ! // and delete Gdiplus objects if so ! if (ref_count == 0) ! { ! if (pen) ! { ! delete pen; ! pen = NULL; ! } ! ! if (brush) ! { ! delete brush; ! brush = NULL; ! } ! ! if (font) ! { ! delete font; ! font = NULL; ! } ! } } |
From: <ddc...@us...> - 2004-01-03 03:51:20
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1:/tmp/cvs-serv28745/src/sim Modified Files: Game.cpp Log Message: Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Game.cpp 3 Jan 2004 00:45:13 -0000 1.47 --- Game.cpp 3 Jan 2004 03:51:17 -0000 1.48 *************** *** 498,502 **** briefingConsoleLeft->Print(" "); // need this to get it to display // add buttons ! briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,10), ID_SKIPBRIEFING, "SKIP"); briefingConsoleBottom = new tcSoundConsole(this, wxPoint(0,mnHeight-mnBottomMargin), --- 498,502 ---- briefingConsoleLeft->Print(" "); // need this to get it to display // add buttons ! briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,12), ID_SKIPBRIEFING, "SKIP"); briefingConsoleBottom = new tcSoundConsole(this, wxPoint(0,mnHeight-mnBottomMargin), |
From: <ddc...@us...> - 2004-01-03 03:51:20
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv28745/include/graphics Modified Files: tcButton.h Log Message: Index: tcButton.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcButton.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcButton.h 3 Jan 2004 00:45:12 -0000 1.1 --- tcButton.h 3 Jan 2004 03:51:16 -0000 1.2 *************** *** 61,67 **** int soundEffect; float fontSize; ! Gdiplus::Pen *pen; ! Gdiplus::SolidBrush *brush; ! Gdiplus::Font *font; virtual void OnEnterWindow(wxMouseEvent& event); --- 61,68 ---- int soundEffect; float fontSize; ! static Gdiplus::Pen *pen; ! static Gdiplus::SolidBrush *brush; ! static Gdiplus::Font *font; ! static unsigned ref_count; virtual void OnEnterWindow(wxMouseEvent& event); |
From: <ddc...@us...> - 2004-01-03 00:45:18
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1:/tmp/cvs-serv548/src/common Modified Files: tcConsole.cpp tcSoundConsole.cpp Log Message: briefing camera features Index: tcConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcConsole.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcConsole.cpp 22 Dec 2003 02:32:37 -0000 1.5 --- tcConsole.cpp 3 Jan 2004 00:45:12 -0000 1.6 *************** *** 87,90 **** --- 87,91 ---- /** * Draw console using GDI+ (default). + * @return 1 if Draw was performed, 0 otherwise */ int tcConsole::Draw() *************** *** 98,102 **** UpdateCursor(); // update cursor position for delayed draw effect ! if (mbRedraw || mbCloned) { if (!GetGraphics(pGraphics)) --- 99,103 ---- UpdateCursor(); // update cursor position for delayed draw effect ! if (mbRedraw || mbCloned || mbForceRedraw) { if (!GetGraphics(pGraphics)) *************** *** 149,156 **** ReleaseGraphics(pGraphics); DrawBorder(); ! //SetOpaque(); ! //mbRedraw = false; } - return 1; } --- 150,160 ---- ReleaseGraphics(pGraphics); DrawBorder(); ! mbForceRedraw = false; ! return 1; ! } ! else ! { ! return 0; } } *************** *** 265,268 **** --- 269,273 ---- mbRedraw = true; + mbForceRedraw = true; useDelayedTextEffect = false; nlinespace = 15; Index: tcSoundConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSoundConsole.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSoundConsole.cpp 21 Dec 2003 00:40:00 -0000 1.4 --- tcSoundConsole.cpp 3 Jan 2004 00:45:12 -0000 1.5 *************** *** 1,5 **** /* - ** tcSoundConsole.cpp - ** ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. --- 1,4 ---- + /** @file tcSoundConsole.cpp */ /* ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. *************** *** 20,27 **** */ ! #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include "tcSoundConsole.h" int tcSoundConsole::Draw() --- 19,37 ---- */ + #include "stdwx.h" // precompiled header file ! #ifndef WX_PRECOMP ! #include "wx/wx.h" ! #ifdef WIN32 #include "wx/msw/private.h" // for MS Windows specific definitions + #endif + #endif + #include "tcSoundConsole.h" + #include "tcSound.h" + + #ifdef _DEBUG + #define new DEBUG_NEW + #endif int tcSoundConsole::Draw() |
From: <ddc...@us...> - 2004-01-03 00:45:18
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv548/src/graphics Modified Files: tc2DGraphicsSurface.cpp tcwindow.cpp Added Files: tcButton.cpp tcButtonConsole.cpp Log Message: briefing camera features --- NEW FILE: tcButton.cpp --- /** * Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) * All rights reserved. * * This file is part of the Global Conflict Blue (GCB) program. * GCB is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * GCB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GCB; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** @file tcButton.cpp */ #include "stdwx.h" // precompiled header file #ifndef WX_PRECOMP #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" // for MS Windows specific definitions #endif #endif #include "tcButton.h" #include "wxcommands.h" #include <iostream> using namespace Gdiplus; int tcButton::Draw() { Graphics *graphics; if (!mbActive) return 1; if (!GetGraphics(graphics)) { std::cerr << "Failed to get Graphics in DHookInfo::Draw()\n"; return 0; } UINT32 backgroundColor; UINT32 textColor; if (isMouseOver) { backgroundColor = 0xFFFFFFFF; textColor = 0xFE000000; } else { backgroundColor = 0xFF000000; textColor = 0xFEFFFFFF; } brush->SetColor(backgroundColor); RectF buttonRect(mrectWindow.left,mrectWindow.top,mrectWindow.right-mrectWindow.left, mrectWindow.bottom-mrectWindow.top); graphics->FillRectangle(brush,buttonRect); brush->SetColor(textColor); tcWindow::DrawTextInRect(graphics, font, brush, caption.c_str(), buttonRect); ReleaseGraphics(graphics); return 1; } void tcButton::OnEnterWindow(wxMouseEvent& event) { isMouseOver = true; // switch back to start view if no buttons clicked (for now) // send ID_BUTTONREDRAW message to force parent redraw wxCommandEvent cmd(wxEVT_COMMAND_BUTTON_CLICKED, ID_BUTTONREDRAW) ; cmd.SetEventObject(this); AddPendingEvent(cmd); } void tcButton::OnLButtonDown(wxMouseEvent& event) { // send command event wxCommandEvent cmd(wxEVT_COMMAND_BUTTON_CLICKED, command) ; cmd.SetEventObject(this); AddPendingEvent(cmd); } void tcButton::OnLButtonUp(wxMouseEvent& event) { event.Skip(); } void tcButton::OnLeaveWindow(wxMouseEvent& event) { isMouseOver = false; // send ID_BUTTONREDRAW message to force parent redraw wxCommandEvent cmd(wxEVT_COMMAND_BUTTON_CLICKED, ID_BUTTONREDRAW) ; cmd.SetEventObject(this); AddPendingEvent(cmd); } tcButton::tcButton(tcWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name) : tcWindow(parent, pos, size, name) { tc2DGraphicsSurface *sharedSurface = parent->GetSurface(); mbCloned = true; mp2DSurface = sharedSurface; // parent's CreateSurfaces must be called before using this constructor wxASSERT(sharedSurface); caption = "NULL"; command = -1; isMouseOver = false; sound = NULL; soundEffect = -1; fontSize = 16.0f; // init Gdiplus objects pen = new Pen(Color(255,100,255,100),2); if (pen == NULL) throw "tcObjectControl - mpPen creation failed\n"; FontFamily ff(L"Arial"); font = new Font(&ff,10,FontStyleBold,UnitPixel); if (font == NULL) throw "tcObjectControl - mpFont creation failed\n"; brush = new SolidBrush(Color(254,100,255,100)); if (brush == NULL) throw "tcObjectControl - mpBrush creation failed\n"; } tcButton::~tcButton() { if (pen) delete pen; if (brush) delete brush; if (font) delete font; } --- NEW FILE: tcButtonConsole.cpp --- /** @file tcButtonConsole.cpp */ /* ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "stdwx.h" // precompiled header file #ifndef WX_PRECOMP #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" // for MS Windows specific definitions #endif #endif #include "tcButtonConsole.h" #include "tcButton.h" #include "wxcommands.h" #ifdef _DEBUG #define new DEBUG_NEW #endif BEGIN_EVENT_TABLE(tcButtonConsole, wxWindow) EVT_COMMAND(ID_BUTTONREDRAW, wxEVT_COMMAND_BUTTON_CLICKED, tcButtonConsole::ButtonRequestedRedraw) END_EVENT_TABLE() void tcButtonConsole::AddButton(wxRect bounds, long command, std::string caption) { wxSize buttonSize = bounds.GetSize(); wxPoint buttonPosition = bounds.GetPosition(); tcButton *buttonToAdd = new tcButton(this, buttonPosition, buttonSize); buttonToAdd->SetCaption(caption); buttonToAdd->SetCommand(command); buttons.push_back(buttonToAdd); } void tcButtonConsole::ButtonRequestedRedraw(wxCommandEvent& event) { tcConsole::ForceRedraw(); } int tcButtonConsole::Draw() { if (tcSoundConsole::Draw()) { size_t nButtons = buttons.size(); for(size_t n=0;n<nButtons;n++) { buttons[n]->Draw(); } return 1; } else { return 0; } } /** * Override to call SetActive of child button windows */ void tcButtonConsole::SetActive(bool abActive) { tcWindow::SetActive(abActive); size_t nButtons = buttons.size(); for(size_t n=0;n<nButtons;n++) { buttons[n]->SetActive(abActive); } } /********************************************************************/ tcButtonConsole::tcButtonConsole(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name) : tcSoundConsole(parent, pos, size, name) { buttons.clear(); nyzero = mnHeight - 50; // margin for buttons at bottom } /********************************************************************/ tcButtonConsole::~tcButtonConsole() { } Index: tc2DGraphicsSurface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc2DGraphicsSurface.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tc2DGraphicsSurface.cpp 22 Dec 2003 02:32:37 -0000 1.6 --- tc2DGraphicsSurface.cpp 3 Jan 2004 00:45:12 -0000 1.7 *************** *** 187,191 **** } ! void tc2DGraphicsSurface::DrawBorder() { UINT32 nColor; --- 187,195 ---- } ! void tc2DGraphicsSurface::DrawBorder() ! { ! bool drawExtraRows = (mnHeight > 500); // hacks to fix strange cutoff border problem ! bool drawExtraCols = (mnWidth > 500); ! UINT32 nColor; *************** *** 193,200 **** memset(maBits,nColor,mnWidth*sizeof(UINT32)); memset(maBits+(mnHeight-1)*mnWidth,nColor,mnWidth*sizeof(UINT32)); ! for(int nRow=0;nRow<mnHeight;nRow++) { *(maBits + (nRow*mnWidth)) = nColor; *(maBits + (nRow*mnWidth) + mnWidth - 1) = nColor; } } --- 197,223 ---- memset(maBits,nColor,mnWidth*sizeof(UINT32)); memset(maBits+(mnHeight-1)*mnWidth,nColor,mnWidth*sizeof(UINT32)); ! ! for(int nRow=0;nRow<mnHeight;nRow++) ! { *(maBits + (nRow*mnWidth)) = nColor; *(maBits + (nRow*mnWidth) + mnWidth - 1) = nColor; } + + if (drawExtraRows) + { + memset(maBits+(1)*mnWidth,nColor,mnWidth*sizeof(UINT32)); + //memset(maBits+(2)*mnWidth,nColor,mnWidth*sizeof(UINT32)); + memset(maBits+(mnHeight-3)*mnWidth,nColor,mnWidth*sizeof(UINT32)); + memset(maBits+(mnHeight-2)*mnWidth,nColor,mnWidth*sizeof(UINT32)); + } + if (drawExtraCols) + { + for(int nRow=0;nRow<mnHeight;nRow++) + { + *(maBits + (nRow*mnWidth) + mnWidth - 2) = nColor; + *(maBits + (nRow*mnWidth) + mnWidth - 3) = nColor; + } + } + } Index: tcwindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcwindow.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcwindow.cpp 22 Dec 2003 02:32:37 -0000 1.13 --- tcwindow.cpp 3 Jan 2004 00:45:12 -0000 1.14 *************** *** 287,290 **** --- 287,292 ---- int tcWindow::CreateSurfaces(tcGraphicsEngine* apGraphicsEngine) { + wxASSERT(!mbCloned); // error, parent will create surface + // check if surface has already been created if (mp2DSurface) *************** *** 314,317 **** --- 316,320 ---- int tcWindow::DeleteSurfaces(tcGraphicsEngine* apGraphicsEngine) { + wxASSERT(!mbCloned); // error, parent window will delete surface if (apGraphicsEngine->Delete2DSurface(mp2DSurface) == false) {return false;} mp2DSurface = NULL; *************** *** 331,334 **** --- 334,340 ---- } + /** + * @return 1 if Draw was performed, 0 otherwise. + */ int tcWindow::Draw() { |
From: <ddc...@us...> - 2004-01-03 00:45:18
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1:/tmp/cvs-serv548/src/sim Modified Files: Game.cpp tc3DViewer.cpp tcDirectorEvent.cpp tcMapView.cpp Log Message: briefing camera features Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Game.cpp 31 Dec 2003 00:23:23 -0000 1.46 --- Game.cpp 3 Jan 2004 00:45:13 -0000 1.47 *************** *** 77,80 **** --- 77,81 ---- EVT_COMMAND(ID_SETPAUSE, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::SetPauseMode) EVT_COMMAND(ID_SET3D, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::Set3D) + EVT_COMMAND(ID_SKIPBRIEFING, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::SkipBriefing) END_EVENT_TABLE() *************** *** 120,123 **** --- 121,125 ---- mbSwitchToPlay = false; gameTime = 0; + directorTime = 0; mnBriefingWidth = 350; *************** *** 181,184 **** --- 183,198 ---- } + /** + * Skips to the end of the briefing and starts game + */ + void tcGame::SkipBriefing(wxCommandEvent& event) + { + if (meScreenMode != TACTICALBRIEF) return; // ignore if not in tactical briefing mode + directorTime = 1e10; // set directorTime to large value to skip to end + + // deactivate delayed text so that briefing text is quickly available + briefingConsoleLeft->SetDelayedTextEffect(false); + } + void tcGame::StartGame(wxCommandEvent& event) { *************** *** 271,275 **** r.height = mnHeight; } ! viewer->SetSize(r); } --- 285,289 ---- r.height = mnHeight; } ! viewer->Freeze(); viewer->SetSize(r); } *************** *** 460,465 **** void tcGame::InitializeBriefingConsoles() { ! briefingConsoleLeft = new tcSoundConsole(this, wxPoint(0,0), ! wxSize(mnBriefingWidth,mnHeight-mnBottomMargin)); if (!briefingConsoleLeft) { --- 474,480 ---- void tcGame::InitializeBriefingConsoles() { ! int leftConsoleHeight = mnHeight-mnBottomMargin; ! briefingConsoleLeft = new tcButtonConsole(this, wxPoint(0,0), ! wxSize(mnBriefingWidth,leftConsoleHeight)); if (!briefingConsoleLeft) { *************** *** 482,485 **** --- 497,502 ---- briefingConsoleLeft->LoadBackgroundImage("briefing_left.jpg"); briefingConsoleLeft->Print(" "); // need this to get it to display + // add buttons + briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,10), ID_SKIPBRIEFING, "SKIP"); briefingConsoleBottom = new tcSoundConsole(this, wxPoint(0,mnHeight-mnBottomMargin), *************** *** 916,920 **** if (mapSize == tacticalMapSize) return; int w = (mapSize == TM_MEDIUM) ? mnBriefingWidth : mnLeftMargin; ! tacticalMap->SetSize(wxRect(w,0,mnWidth-w,mnHeight-mnBottomMargin)); tacticalMapSize = mapSize; --- 933,938 ---- if (mapSize == tacticalMapSize) return; int w = (mapSize == TM_MEDIUM) ? mnBriefingWidth : mnLeftMargin; ! ! tacticalMap->Freeze(); // call Freeze() to prevent flicker on resize tacticalMap->SetSize(wxRect(w,0,mnWidth-w,mnHeight-mnBottomMargin)); tacticalMapSize = mapSize; *************** *** 1126,1130 **** const float dateZuluScale = 1.0f; // for testing sky effects static std::string dateTimeString = "---"; - static double directorTime = 0; // kind of a hack to keep director going during pause tcTime::Update(); --- 1144,1147 ---- *************** *** 1264,1268 **** wxMessageBox("pre Frame()\n"); } ! viewer->Frame(); --- 1281,1285 ---- wxMessageBox("pre Frame()\n"); } ! viewer->Frame(); *************** *** 1464,1469 **** { meScreenMode = TACTICALBRIEF; ! briefingConsoleLeft->Print("BRIEFING INIT via key 1234567890123456789012345678901234567890"); ! briefingConsoleBottom->Print(" "); } else if (meScreenMode == TACTICALBRIEF) --- 1481,1486 ---- { meScreenMode = TACTICALBRIEF; ! // briefingConsoleLeft->Print("BRIEFING VIEW via F5"); ! // briefingConsoleBottom->Print(" "); } else if (meScreenMode == TACTICALBRIEF) Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tc3DViewer.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** tc3DViewer.cpp 1 Jan 2004 23:44:47 -0000 1.23 --- tc3DViewer.cpp 3 Jan 2004 00:45:13 -0000 1.24 *************** *** 447,450 **** --- 447,455 ---- void tc3DViewer::Frame() { + if (isFrozen) + { + wxWindow::Thaw(); + isFrozen = false; + } if (isActive && camera_group.valid()) // if (isActive && camera_group) *************** *** 460,463 **** --- 465,480 ---- /** + * Override of wxWindow::Freeze. + * Call before size event to prevent flicker. + * viewer is thawed automatically in Frame() method + */ + void tc3DViewer::Freeze() + { + if (isFrozen) return; // already frozen, return + isFrozen = true; + wxWindow::Freeze(); + } + + /** * Loads OSG model for object, setting obj->model field. */ *************** *** 872,875 **** --- 889,893 ---- isMouseDown = false; isActive = true; + isFrozen = false; viewWireframe = false; useRelativeChildPos = true; Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcDirectorEvent.cpp 1 Jan 2004 23:44:47 -0000 1.4 --- tcDirectorEvent.cpp 3 Jan 2004 00:45:13 -0000 1.5 *************** *** 432,441 **** if (viewerText->getNumParents() == 0) { - wxSize viewerSize = viewer->GetSize(); - float x = textx * (float)viewerSize.GetWidth(); - float y = texty * (float)viewerSize.GetHeight(); - viewerText->setPosition(osg::Vec3(x,y,0.0f)); viewer->AddText(viewerText.get()); } if (effectCode == 1) // alpha blend { --- 432,443 ---- if (viewerText->getNumParents() == 0) { viewer->AddText(viewerText.get()); } + + wxSize viewerSize = viewer->GetSize(); + float x = textx * (float)viewerSize.GetWidth(); + float y = texty * (float)viewerSize.GetHeight(); + viewerText->setPosition(osg::Vec3(x,y,0.0f)); + if (effectCode == 1) // alpha blend { Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapView.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcMapView.cpp 22 Dec 2003 02:32:37 -0000 1.12 --- tcMapView.cpp 3 Jan 2004 00:45:13 -0000 1.13 *************** *** 101,104 **** --- 101,115 ---- // if(mpDDS_Terrain!=NULL) mpMapData->UpdateSurface(mpDDS_Terrain,mrectCurrentView); } + /** + * Works with Thaw to prevent flicker on resize + * @see tcMapView::Thaw + * @see tcWindow::Thaw + */ + void tcMapView::Freeze() + { + tcWindow::Freeze(); + terrainView->Freeze(); + } + /***********************************************************************************/ tcPoint tcMapView::GeoToScreen(tcPoint pgeo) { *************** *** 135,138 **** --- 146,158 ---- /** + * Works with Freeze to prevent flicker on resize + */ + void tcMapView::Thaw() + { + tcWindow::Thaw(); + terrainView->Thaw(); + } + + /** * Call OnSize for base class and for terrainView */ *************** *** 464,467 **** --- 484,489 ---- Graphics *pGraphics; int i; + + tcMapView::Thaw(); // unfreeze every Draw() call, works with Freeze() to stop resize flicker if (mnScrollState >= SCROLL_DELAY) { |
From: <ddc...@us...> - 2004-01-03 00:45:18
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1:/tmp/cvs-serv548/include/sim Modified Files: Game.h tc3DViewer.h tcMapView.h Log Message: briefing camera features Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Game.h 29 Dec 2003 01:10:25 -0000 1.20 --- Game.h 3 Jan 2004 00:45:12 -0000 1.21 *************** *** 28,31 **** --- 28,32 ---- #include "tcMapView.h" #include "tcSoundConsole.h" + #include "tcButtonConsole.h" #include "commandlist.h" #include "tcDatabase.h" *************** *** 112,115 **** --- 113,117 ---- public: double gameTime; + double directorTime; // kind of a hack to keep director going during pause DateZulu gameDateZulu; ///< object combining date and time wxDateTime startTime; *************** *** 138,142 **** int mnBottomMargin; // height of bottom aux windows tcSoundConsole *infoConsole; ///< console object for info messages ! tcSoundConsole *briefingConsoleLeft; ///< console object for briefing text tcSoundConsole *briefingConsoleBottom; ///< to fill space at bottom for now tcTacticalMapView *tacticalMap; ///< tactical map object --- 140,144 ---- int mnBottomMargin; // height of bottom aux windows tcSoundConsole *infoConsole; ///< console object for info messages ! tcButtonConsole *briefingConsoleLeft; ///< console object for briefing text tcSoundConsole *briefingConsoleBottom; ///< to fill space at bottom for now tcTacticalMapView *tacticalMap; ///< tactical map object *************** *** 228,231 **** --- 230,234 ---- void SetTacticalMapSize(teTacticalMapSize mapSize); void ShiftTime(float delta_s); ///< shifts time for sky/environment updates + void SkipBriefing(wxCommandEvent& event); void StartGame(wxCommandEvent& event); void SwitchToCredit(wxCommandEvent& event); Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tc3DViewer.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tc3DViewer.h 1 Jan 2004 23:44:46 -0000 1.17 --- tc3DViewer.h 3 Jan 2004 00:45:12 -0000 1.18 *************** *** 105,108 **** --- 105,109 ---- void DirtyAll(); void Frame(); + void Freeze(); Producer::Vec3 GetCameraPosition(); Producer::Vec3 GetObjectPosition(tcGameObject *obj); *************** *** 133,136 **** --- 134,138 ---- private: + bool isFrozen; ///< set true if window has been frozen bool isActive; bool viewWireframe; Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMapView.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcMapView.h 22 Dec 2003 02:32:37 -0000 1.10 --- tcMapView.h 3 Jan 2004 00:45:12 -0000 1.11 *************** *** 177,180 **** --- 177,181 ---- void CalcViewParameters(void); virtual int CreateSurfaces(tcGraphicsEngine* apGraphicsEngine); + virtual void Freeze(); tcPoint GeoToScreen(tcPoint pgeo); tcPoint GeoToScreen(float afLon, float afLat); *************** *** 200,203 **** --- 201,205 ---- terrainView->SetYMirror(y); } + virtual void Thaw(); tcMapView(wxWindow *parent, |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1:/tmp/cvs-serv548/include/common Modified Files: simmath.h tcConsole.h tcSoundConsole.h wxcommands.h Log Message: briefing camera features Index: simmath.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/simmath.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** simmath.h 19 Nov 2003 01:36:14 -0000 1.4 --- simmath.h 3 Jan 2004 00:45:12 -0000 1.5 *************** *** 30,33 **** --- 30,34 ---- #include "tcString.h" #include "gctypes.h" + #include "tcDatabaseObject.h" #ifndef UINT8 *************** *** 109,112 **** --- 110,116 ---- mnPassivePlatformID = -1; } + bool IsAir() {return ((mnClassification & PTYPE_AIR) != 0);} + bool IsMissile() {return ((mnClassification & PTYPE_MISSILE) != 0);} + bool IsSurface() {return ((mnClassification & PTYPE_SURFACE) != 0);} bool IsValid() {return mnID != -1;} void SetAllValid() {mnFlags |= 0x0F;} Index: tcConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcConsole.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcConsole.h 22 Dec 2003 02:32:37 -0000 1.5 --- tcConsole.h 3 Jan 2004 00:45:12 -0000 1.6 *************** *** 56,59 **** --- 56,60 ---- virtual int Draw(); ///< draw using GDI+ int DrawGdi(void); ///< draw using GDI + void ForceRedraw() {mbForceRedraw = true;} void InitGdi(float afFontSize, UINT32 anColor); bool IsCurrentLineEmpty(); *************** *** 69,73 **** private: int useDelayedTextEffect; ! int mbRedraw; Gdiplus::Pen *mpPen; Gdiplus::SolidBrush *mpBrush; --- 70,75 ---- private: int useDelayedTextEffect; ! int mbRedraw; ///< redraw based on cursor update state ! bool mbForceRedraw; ///< a workaround to force redraw when button state changes Gdiplus::Pen *mpPen; Gdiplus::SolidBrush *mpBrush; Index: tcSoundConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcSoundConsole.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSoundConsole.h 21 Dec 2003 00:40:00 -0000 1.4 --- tcSoundConsole.h 3 Jan 2004 00:45:12 -0000 1.5 *************** *** 31,35 **** #include "wx/msw/private.h" // for MS Windows specific definitions #include "tcConsole.h" ! #include "tcSound.h" class tcSoundConsole : public tcConsole --- 31,36 ---- #include "wx/msw/private.h" // for MS Windows specific definitions #include "tcConsole.h" ! ! class tcSound; class tcSoundConsole : public tcConsole Index: wxcommands.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/wxcommands.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxcommands.h 22 Dec 2003 02:32:37 -0000 1.5 --- wxcommands.h 3 Jan 2004 00:45:12 -0000 1.6 *************** *** 40,43 **** --- 40,45 ---- ID_SETPAUSE, ///< enable/disable game pause ID_SET3D, ///< set 3D window size + ID_SKIPBRIEFING, ///< skip tactical briefing + ID_BUTTONREDRAW, ///< posted by button to force parent to redraw }; |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv548/scripts Modified Files: AI.py UnitCommands.py Log Message: briefing camera features Index: AI.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/AI.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AI.py 2 Nov 2003 20:04:01 -0000 1.4 --- AI.py 3 Jan 2004 00:45:12 -0000 1.5 *************** *** 1,5 **** from UnitCommands import * ! # test AI script def Update(UnitInfo): if (UnitInfo.HasOrders()): --- 1,5 ---- from UnitCommands import * ! # test AI script, these need a lot of work def Update(UnitInfo): if (UnitInfo.HasOrders()): *************** *** 102,111 **** # 2nd param is affiliation, 3 is hostile, 0 (unknown) automatically included in search track = UI.GetClosestAirTrack(150,3) ! else: ! track = UI.GetClosestAirTrack(50,3) # surface only considers close air tracks if (track.IsValid()): return track.ID; else: ! track = UI.GetClosestSurfaceTrack(150,3) if (track.IsValid()): return track.ID; --- 102,111 ---- # 2nd param is affiliation, 3 is hostile, 0 (unknown) automatically included in search track = UI.GetClosestAirTrack(150,3) ! else: # surface ! track = UI.GetClosestAirTrack(50,3) # surface first considers close air tracks if (track.IsValid()): return track.ID; else: ! track = UI.GetClosestSurfaceTrack(200,3) if (track.IsValid()): return track.ID; *************** *** 131,136 **** if targetid == 0xFFFFFFFF: return targetrange = UI.GetRangeToTarget() ! if (targetrange > 50.0): TTI = UI.SetHeadingToInterceptTarget() UI.SetSpeedToMax() --- 131,147 ---- if targetid == 0xFFFFFFFF: return + + target_info = UI.GetTargetTrackInfo() + # check if effective weapon is available + launcher_info = UI.GetBestLauncher() + launcher = launcher_info.Launcher + if (launcher == -1): # if (no effective launcher is available) + UI.SetTarget(-1) # clear target + return + + # use weapon if in range + launch_range = launcher_info.Range_km # reference max range, use for launch decision targetrange = UI.GetRangeToTarget() ! if (targetrange > launch_range): TTI = UI.SetHeadingToInterceptTarget() UI.SetSpeedToMax() *************** *** 142,178 **** if (wait_count < 12): UI.SetVar(1,wait_count+1) # increment wait count - SetHeadingOffTarget(UI, 30.0) # set heading 30 deg from current target bearing UI.SetActionText('Atk-wait') ! SetFractionalSpeed(UI,0.5) return else: UI.SetVar(0,0) # re-engage target UI.SetVar(1,0) ! SetFractionalSpeed(UI,0.9) # attack target range_km = 0.0 ! launcher_info = UI.GetBestLauncher() ! launcher = launcher_info.Launcher ! if (launcher == -1): ! UI.SetTarget(-1) # clear target ! return launch_mode = launcher_info.LaunchMode # 0 - datum, 1 - seeker, 2 - other ! launch_range = launcher_info.Range_km ! if (targetrange <= launch_range): ! if launch_mode == 0: # datum launch ! track_info = UI.GetTargetTrackInfo() ! lat = track_info.Lat ! lon = track_info.Lon ! UI.SendDatumToLauncher(lon,lat,launcher) ! UI.Launch(launcher) UI.SetVar(0,1) ! UI.SetActionText('Datum launch') ! elif launch_mode == 1: # handoff to active seeker ! target_accepted = UI.HandoffTargetToLauncher(launcher) ! if (target_accepted): ! UI.Launch(launcher) ! UI.SetVar(0,1) ! UI.SetActionText('Handoff launch') else: TTI = UI.SetHeadingToInterceptTarget() --- 153,194 ---- if (wait_count < 12): UI.SetVar(1,wait_count+1) # increment wait count UI.SetActionText('Atk-wait') ! if UI.IsAir(): ! SetHeadingOffTarget(UI, 30.0) # set heading 30 deg from current target bearing ! SetFractionalSpeed(UI,0.5) return else: UI.SetVar(0,0) # re-engage target UI.SetVar(1,0) ! if UI.IsAir(): ! SetFractionalSpeed(UI,1.0) # attack target range_km = 0.0 ! launch_mode = launcher_info.LaunchMode # 0 - datum, 1 - seeker, 2 - other ! ! if target_info.IsAir(): ! launch_qty = 1 ! elif target_info.IsMissile(): ! launch_qty = 2 ! elif target_info.IsSurface(): ! launch_qty = 4 ! else: ! launch_qty = 0 ! ! if launch_mode == 0: # datum launch ! lat = target_info.Lat ! lon = target_info.Lon ! UI.SendDatumToLauncher(lon,lat,launcher) ! UI.Launch(launcher, launch_qty) ! UI.SetVar(0,1) ! UI.SetActionText('Datum launch') ! elif launch_mode == 1: # handoff to active seeker ! target_accepted = UI.HandoffTargetToLauncher(launcher) ! if (target_accepted): ! UI.Launch(launcher, launch_qty) UI.SetVar(0,1) ! UI.SetActionText('Handoff launch') else: TTI = UI.SetHeadingToInterceptTarget() Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UnitCommands.py 9 Dec 2003 00:36:03 -0000 1.4 --- UnitCommands.py 3 Jan 2004 00:45:12 -0000 1.5 *************** *** 28,32 **** def LaunchDatum(UI, lon, lat, launcher_num): UI.SendDatumToLauncher(lon,lat,launcher_num) ! UI.Launch(launcher_num) def TargetAndEngageWith(UI, target_id, launcher): --- 28,32 ---- def LaunchDatum(UI, lon, lat, launcher_num): UI.SendDatumToLauncher(lon,lat,launcher_num) ! UI.Launch(launcher_num, 1) def TargetAndEngageWith(UI, target_id, launcher): *************** *** 47,55 **** lon = track_info.Lon UI.SendDatumToLauncher(lon,lat,launcher) ! UI.Launch(launcher) else: # handoff to active seeker target_accepted = UI.HandoffTargetToLauncher(launcher) if (target_accepted): ! UI.Launch(launcher) else: UI.DisplayMessage('Handoff failed, may not be in seeker coverage.') --- 47,55 ---- lon = track_info.Lon UI.SendDatumToLauncher(lon,lat,launcher) ! UI.Launch(launcher,1) else: # handoff to active seeker target_accepted = UI.HandoffTargetToLauncher(launcher) if (target_accepted): ! UI.Launch(launcher,1) else: UI.DisplayMessage('Handoff failed, may not be in seeker coverage.') |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface In directory sc8-pr-cvs1:/tmp/cvs-serv548/include/scriptinterface Modified Files: tcPlatformInterface.h Log Message: briefing camera features Index: tcPlatformInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcPlatformInterface.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcPlatformInterface.h 8 Dec 2003 03:06:36 -0000 1.8 --- tcPlatformInterface.h 3 Jan 2004 00:45:12 -0000 1.9 *************** *** 123,127 **** void SendDatumToLauncher(float afLon_rad, float afLat_rad, int anLauncher); bool HandoffTargetToLauncher(int anLauncher); ! void Launch(int anLauncher); std::string GetLauncherWeaponName(int anLauncher); int GetLauncherQuantity(int anLauncher); --- 123,127 ---- void SendDatumToLauncher(float afLon_rad, float afLat_rad, int anLauncher); bool HandoffTargetToLauncher(int anLauncher); ! void Launch(int anLauncher, int quantity); std::string GetLauncherWeaponName(int anLauncher); int GetLauncherQuantity(int anLauncher); |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1:/tmp/cvs-serv548 Modified Files: GCblue.vcproj Log Message: briefing camera features Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** GCblue.vcproj 21 Dec 2003 00:40:00 -0000 1.30 --- GCblue.vcproj 3 Jan 2004 00:45:12 -0000 1.31 *************** *** 217,220 **** --- 217,226 ---- </File> <File + RelativePath="src\graphics\tcButton.cpp"> + </File> + <File + RelativePath="src\graphics\tcButtonConsole.cpp"> + </File> + <File RelativePath="src\graphics\tcFIFO.cpp"> </File> *************** *** 524,527 **** --- 530,539 ---- <File RelativePath="include\graphics\tc3DTerrain.h"> + </File> + <File + RelativePath="include\graphics\tcButton.h"> + </File> + <File + RelativePath="include\graphics\tcButtonConsole.h"> </File> <File |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1:/tmp/cvs-serv548/src/scriptinterface Modified Files: tcPlatformInterface.cpp tcPlatformInterfaceExtension.cpp Log Message: briefing camera features Index: tcPlatformInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcPlatformInterface.cpp 8 Dec 2003 03:06:36 -0000 1.10 --- tcPlatformInterface.cpp 3 Jan 2004 00:45:13 -0000 1.11 *************** *** 379,384 **** } ! void tcPlatformInterface::Launch(int anLauncher) { ! mpPlatformObj->SetLaunch(anLauncher, 1); } --- 379,385 ---- } ! void tcPlatformInterface::Launch(int anLauncher, int quantity) ! { ! mpPlatformObj->SetLaunch(anLauncher, quantity); } Index: tcPlatformInterfaceExtension.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtension.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcPlatformInterfaceExtension.cpp 26 Nov 2003 20:39:14 -0000 1.4 --- tcPlatformInterfaceExtension.cpp 3 Jan 2004 00:45:13 -0000 1.5 *************** *** 50,53 **** --- 50,56 ---- .def_readonly("Affiliation",&tcTrack::mnAffiliation) .def_readonly("ID",&tcTrack::mnID) + .def("IsAir", &tcTrack::IsAir) + .def("IsMissile", &tcTrack::IsMissile) + .def("IsSurface", &tcTrack::IsSurface) .def("IsValid", &tcTrack::IsValid) .def("Offset", &tcTrack::Offset) |
From: <ddc...@us...> - 2004-01-03 00:45:17
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv548/include/graphics Modified Files: tcwindow.h Added Files: tcButton.h tcButtonConsole.h Log Message: briefing camera features --- NEW FILE: tcButton.h --- /* ** tcButton.h ** ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** @file tcButton.h */ #ifndef _TCBUTTON_H_ #define _TCBUTTON_H_ #pragma once #include "tcWindow.h" #include <string> class tcSound; /** * Push button class derived from tcWindow. * This class uses the parent window's tc2DSurface so * CreateSurfaces() and DeleteSurfaces() should not be called. * tcButton must be constructed AFTER the parent's surfaces have * been created. */ class tcButton : public tcWindow { public: void AttachSound(tcSound *soundInterface) {sound = soundInterface;} virtual int Draw(); std::string GetCaption() const {return caption;} void SetCaption(std::string s) {caption = s;} void SetCommand(long cmd) {command = cmd;} void SetSoundEffect(int effect) {soundEffect = effect;} tcButton(tcWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "PushButton"); virtual ~tcButton(); protected: std::string caption; long command; bool isMouseOver; tcSound *sound; int soundEffect; float fontSize; Gdiplus::Pen *pen; Gdiplus::SolidBrush *brush; Gdiplus::Font *font; virtual void OnEnterWindow(wxMouseEvent& event); virtual void OnLButtonDown(wxMouseEvent& event); virtual void OnLButtonUp(wxMouseEvent& event); virtual void OnLeaveWindow(wxMouseEvent& event); }; #endif --- NEW FILE: tcButtonConsole.h --- /* ** tcButtonConsole.h ** ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _BUTTONCONSOLE_H_ #define _BUTTONCONSOLE_H_ #pragma once #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include "tcSoundConsole.h" #include <vector> class tcButton; /** * Adds push buttons to tcSoundConsole */ class tcButtonConsole : public tcSoundConsole { public: virtual void AddButton(wxRect bounds, long command, std::string caption); void ButtonRequestedRedraw(wxCommandEvent& event); virtual int Draw(); virtual void SetActive(bool abActive); tcButtonConsole(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "ButtonConsole"); virtual ~tcButtonConsole(); private: std::vector<tcButton*> buttons; DECLARE_EVENT_TABLE() }; #endif Index: tcwindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcwindow.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcwindow.h 22 Dec 2003 02:32:37 -0000 1.12 --- tcwindow.h 3 Jan 2004 00:45:12 -0000 1.13 *************** *** 61,65 **** void Erase(void); void EraseOpaque(void); ! void Freeze(); wxBitmap* GetBitmap(); bool IsSurfaceModified(); --- 61,65 ---- void Erase(void); void EraseOpaque(void); ! virtual void Freeze(); wxBitmap* GetBitmap(); bool IsSurfaceModified(); *************** *** 75,78 **** --- 75,79 ---- void GetWindow(RECT& r) {r = mrectWindow;} void SetDisplayRegion(Gdiplus::RectF r); + tc2DGraphicsSurface* GetSurface() const {return mp2DSurface;} void MoveWindow(int ax, int ay); bool GetDrawDC(HDC& hdc); *************** *** 81,90 **** bool GetLowQualityGraphics(Gdiplus::Graphics*& rpGraphics); // GDI+ bool ReleaseGraphics(Gdiplus::Graphics* apGraphics); // GDI+ ! void SetActive(bool abActive); void SetRenderTexture(bool abState); void SetResizeable2D(bool abState) {resizeable2DSurface = abState;} ///< @see tcWindow::OnSize void SetSkipCount(unsigned skipCount); virtual void SetYMirror(int y) {yMirror = y;} ! void Thaw(); Gdiplus::RectF mrectDisplay; tcWindow(wxWindow *parent, --- 82,91 ---- bool GetLowQualityGraphics(Gdiplus::Graphics*& rpGraphics); // GDI+ bool ReleaseGraphics(Gdiplus::Graphics* apGraphics); // GDI+ ! virtual void SetActive(bool abActive); void SetRenderTexture(bool abState); void SetResizeable2D(bool abState) {resizeable2DSurface = abState;} ///< @see tcWindow::OnSize void SetSkipCount(unsigned skipCount); virtual void SetYMirror(int y) {yMirror = y;} ! virtual void Thaw(); Gdiplus::RectF mrectDisplay; tcWindow(wxWindow *parent, |
From: <ddc...@us...> - 2004-01-02 15:04:57
|
Update of /cvsroot/gcblue/gcb_data/sound In directory sc8-pr-cvs1:/tmp/cvs-serv19292/sound Added Files: LICENSE.txt Log Message: --- NEW FILE: LICENSE.txt --- Sound and music files Copyright (C) 2002-2003 Dewitt Colclough unless otherwise noted. Sound and music files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |
From: <ddc...@us...> - 2004-01-02 15:04:57
|
Update of /cvsroot/gcblue/gcb_data/maps In directory sc8-pr-cvs1:/tmp/cvs-serv19292/maps Added Files: LICENSE.txt Log Message: --- NEW FILE: LICENSE.txt --- Map files copyright (C) 2002-2003 Dewitt Colclough unless otherwise noted. Map source data based on GLOBE project data. Map files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |
From: <ddc...@us...> - 2004-01-02 15:04:57
|
Update of /cvsroot/gcblue/gcb_data/images In directory sc8-pr-cvs1:/tmp/cvs-serv19292/images Added Files: LICENSE.txt Log Message: --- NEW FILE: LICENSE.txt --- Image files copyright (C) 2002-2003 Dewitt Colclough unless otherwise noted. Some images were taken from U.S. Navy Photos archives. Image files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |
From: <ddc...@us...> - 2004-01-02 15:04:57
|
Update of /cvsroot/gcblue/gcb_data/3d In directory sc8-pr-cvs1:/tmp/cvs-serv19292/3d Added Files: LICENSE.txt m50_co.bmp Log Message: --- NEW FILE: LICENSE.txt --- 3D Model and texture files Copyright (C) 2002-2003 Marcelo Caceres unless otherwise noted. 3D Model and texture files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS --- NEW FILE: m50_co.bmp --- (This appears to be a binary file; contents omitted.) |
From: <ddc...@us...> - 2004-01-02 15:04:56
|
Update of /cvsroot/gcblue/gcb_data In directory sc8-pr-cvs1:/tmp/cvs-serv19292 Added Files: GCB_DATA _LICENSE.txt Log Message: --- NEW FILE: GCB_DATA _LICENSE.txt --- ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |
From: <ddc...@us...> - 2004-01-02 15:04:56
|
Update of /cvsroot/gcblue/gcb_data/database In directory sc8-pr-cvs1:/tmp/cvs-serv19292/database Added Files: LICENSE.txt Log Message: --- NEW FILE: LICENSE.txt --- Database files Copyright (C) 2002-2003 Dewitt Colclough unless otherwise noted. Database files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |
From: <ddc...@us...> - 2004-01-02 15:03:32
|
Update of /cvsroot/gcblue/gcb_wx/sound In directory sc8-pr-cvs1:/tmp/cvs-serv19093/sound Added Files: LICENSE.txt Log Message: --- NEW FILE: LICENSE.txt --- Sound and music files Copyright (C) 2002-2003 Dewitt Colclough unless otherwise noted. Sound and music files may be distributed under the terms of the GCB Data License v1.0. ------------------------------------------------------------------------------------- GCB Data License v1.0 For the purpose of identifying the copyright holders, this license defines the "GCB Team" as the following people: * Global Conflict Blue (GCB) Project Manager * Global Conflict Blue Members The names and e-mails of those people are listed in the GCB site at the address: http://www.gcblue.com Material to which this license applies may include the following: * Texts * Scenario Files * 3D Models * Images * Sounds * Musics TERMS AND CONDITIONS FOR USAGE, COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any material or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this GCB Data License. 1. Terms defined in this Article 1, and parenthetically elsewhere, shall throughout this License have the meanings here and there provided. Defined terms may be used in the singular or plural. Definitions: * The "Material", below, refers to any such material or work, and a "work based on the Material" means either the Material or any Derivative Work under copyright law. * "Derivative Work" shall mean a work containing the Material or a portion of it, such as a revision, modification, enhancement, adaptation, translation (including compilation or recompilation by computer), abridgement, condensation, expansion, or any other form in which such preexisting works may be recast, transformed, or adapted, and that, if prepared without authorization of the owner of the copyright in such preexisting work, would constitute a copyright infringement. * Each licensee is addressed as "you". 2. You may not copy, modify, publish, transmit, sell, participate in the transfer or sale or reproduce, create Derivative Works from, distribute, perform, display or in any way exploit any of the Material released under this License unless expressly permitted by the GCB Team. 3. You may use the provided Material, for personal use only, in conjunction with GCB software directly distributed by the GCB Team. NO WARRANTY 4. THERE IS NO WARRANTY FOR THE MATERIAL PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE MATERIAL IS WITH YOU. 5. IN NO EVENT SHALL THE GCB TEAM BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL. END OF TERMS AND CONDITIONS |