gcblue-commits Mailing List for Global Conflict Blue (Page 30)
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: Dewitt C. <ddc...@us...> - 2005-03-29 00:13:04
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/scripts Modified Files: AI.py Menu.py UnitCommands.py Log Message: 0.7.0 release snapshot Index: AI.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/AI.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AI.py 10 Mar 2005 03:28:27 -0000 1.20 --- AI.py 29 Mar 2005 00:12:25 -0000 1.21 *************** *** 195,199 **** --- 195,239 ---- + # warn if non-friendly missiles nearby + def MissileWarning(TI): + UI = TI.GetPlatformInterface() + BB = TI.GetBlackboardInterface() + + iteration = TI.GetMemoryValue(1) # will return 0 first time + if (iteration == 0): # do initialization + TI.SetMemoryText('Description', 'Warn if missiles nearby') + TI.SetMemoryValue(2, 0.0) # last warning time + + iteration = iteration + 1 + TI.SetMemoryValue(1, iteration) + + closest_id, closest_range = ClosestOfType(UI, 0x0040, 60) + + if (closest_id == -1): + BB.Erase('MissileWarning') + TI.SetUpdateInterval(30.0) + return + elif (closest_range > 40): + # missiles between 40 km and 60 km, increase update rate + BB.Erase('MissileWarning') + TI.SetUpdateInterval(5.0) + return + + TI.SetUpdateInterval(5.0) + + + BB.Write('MissileWarning', '%.0f' % closest_range) + + current_time = UI.GetTime() + last_warning = TI.GetMemoryValue(2) + + if (UI.IsPlayerControlled() and (current_time - last_warning > 30.0)): + TI.SetMemoryValue(2, current_time) + UI.PlaySound('Alarm') + UI.DisplayPopupMessage('Missile alert') + + + # shoot hostiles and unknowns within range, but do not intercept. *************** *** 221,225 **** if (engage_mode == 0): # searching - TI.SetUpdateInterval(30) best_target, best_launcher = GetImmediateTarget(UI) if (best_target != -1): --- 261,264 ---- *************** *** 236,241 **** else: TI.SetMemoryValue(2, 0) ! #else: ! #UI.DisplayMessage('%s: no targets' % UI.GetName()) if (engage_mode == 1): # turn to target --- 275,285 ---- else: TI.SetMemoryValue(2, 0) ! else: ! # check for nearby missiles ! closest_id, closest_range = ClosestOfType(UI, 0x0040, 60) ! if (closest_id == -1): ! TI.SetUpdateInterval(30) ! else: ! TI.SetUpdateInterval(5) if (engage_mode == 1): # turn to target *************** *** 267,271 **** --- 311,337 ---- + # gets info on closest (known) enemy or unknown platform within search range + def ClosestOfType(UI, class_mask, search_range_km): + track_list = UI.GetTrackList(class_mask, search_range_km, 3) + current_time = UI.GetTime() + nTracks = track_list.Size() + closest_range = 1e6 + closest_id = -1 + + for n in range(0, nTracks): + track_info = track_list.GetTrack(n) + track_id = track_info.ID + staleness = current_time - track_info.Time + range_km = UI.GetRangeToTrack(track_info) + + if ((staleness <= 15.0) and (range_km < closest_range)): + closest_range = range_km + closest_id = track_id + + return (closest_id, closest_range) + + + # returns id of closest target that is in-range, engageable, not already *************** *** 893,897 **** UI.Launch(launcher, launch_qty) UI.SetActionText('Datum launch') ! elif launch_mode == 1: # handoff to active seeker target_accepted = UI.HandoffTargetToLauncher(launcher) if (target_accepted): --- 959,963 ---- UI.Launch(launcher, launch_qty) UI.SetActionText('Datum launch') ! else: # handoff to active seeker target_accepted = UI.HandoffTargetToLauncher(launcher) if (target_accepted): Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** UnitCommands.py 10 Mar 2005 03:28:28 -0000 1.15 --- UnitCommands.py 29 Mar 2005 00:12:25 -0000 1.16 *************** *** 47,50 **** --- 47,53 ---- BB.Write('LandingTarget', dest_name) + def AddMissileWarnTask(UI): + UI.AddTask('MissileWarning', 0.0) + def ClearTasksGroup(GI): Index: Menu.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/Menu.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Menu.py 2 Mar 2005 22:28:41 -0000 1.11 --- Menu.py 29 Mar 2005 00:12:25 -0000 1.12 *************** *** 86,89 **** --- 86,90 ---- UnitMenu.AddItemUI('Add waypoint', 'AddWaypointOrder', 'Datum') UnitMenu.AddItem('EngageAll', 'AddEngageAllOrder') + UnitMenu.AddItem('Missile alert', 'AddMissileWarnTask') UnitMenu.AddItem('Clear waypoints','ClearWaypoints') UnitMenu.AddItem('Clear all tasks','ClearTasks') |
|
From: Dewitt C. <ddc...@us...> - 2005-03-29 00:13:03
|
Update of /cvsroot/gcblue/gcb_wx/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/database Modified Files: database.db Log Message: 0.7.0 release snapshot Index: database.db =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/database/database.db,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsCozL4c and /tmp/cvsuGezpY differ |
|
From: Dewitt C. <ddc...@us...> - 2005-03-29 00:13:03
|
Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/include/scriptinterface Modified Files: tcPlatformInterface.h Log Message: 0.7.0 release snapshot Index: tcPlatformInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcPlatformInterface.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcPlatformInterface.h 10 Mar 2005 03:28:27 -0000 1.36 --- tcPlatformInterface.h 29 Mar 2005 00:12:23 -0000 1.37 *************** *** 303,310 **** double GetTime() const; void GetUserInput(std::string callback, std::string uitype); bool IsValid() const; void SendCommand(std::string command); /// display text message in user console ! void DisplayMessage(std::string text); /// play sound effect void PlaySound(const std::string& effect); --- 303,314 ---- double GetTime() const; void GetUserInput(std::string callback, std::string uitype); + /// @return true if platform is under local player control + bool IsPlayerControlled() const; bool IsValid() const; void SendCommand(std::string command); /// display text message in user console ! void DisplayMessage(const std::string& text); ! /// popup text message ! void DisplayPopupMessage(const std::string& text); /// play sound effect void PlaySound(const std::string& effect); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-29 00:13:03
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/include/graphics Modified Files: tcMessageCenter.h tcMessageInterface.h Log Message: 0.7.0 release snapshot Index: tcMessageCenter.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMessageCenter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMessageCenter.h 2 Dec 2004 04:17:23 -0000 1.2 --- tcMessageCenter.h 29 Mar 2005 00:12:23 -0000 1.3 *************** *** 36,40 **** class tcMessageChannel; ! /** * --- 36,40 ---- class tcMessageChannel; ! class tcSoundConsole; /** * *************** *** 44,51 **** public: void AddMessage(const std::string& channel, const std::string& msg); void PopupMessage(const std::string& msg); void Clear(); virtual void Draw(); ! tcMessageCenter(wxWindow *parent, --- 44,52 ---- public: void AddMessage(const std::string& channel, const std::string& msg); + void ConsoleMessage(const std::string& msg); void PopupMessage(const std::string& msg); void Clear(); virtual void Draw(); ! void AttachConsole(tcSoundConsole* console_); tcMessageCenter(wxWindow *parent, *************** *** 61,64 **** --- 62,66 ---- wxPoint popupBase; unsigned int popupCount; + tcSoundConsole* console; tcMessageChannel* GetChannel(const std::string& channelName); Index: tcMessageInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMessageInterface.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMessageInterface.h 2 Dec 2004 04:17:23 -0000 1.2 --- tcMessageInterface.h 29 Mar 2005 00:12:23 -0000 1.3 *************** *** 41,44 **** --- 41,45 ---- public: void ChannelMessage(const std::string& channelName, const std::string& msg); + void ConsoleMessage(const std::string& msg); void PopupMessage(const std::string& msg); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-29 00:13:03
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/include/database Modified Files: tcMissileDBObject.h Log Message: 0.7.0 release snapshot Index: tcMissileDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcMissileDBObject.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcMissileDBObject.h 25 Mar 2005 03:48:06 -0000 1.17 --- tcMissileDBObject.h 29 Mar 2005 00:12:22 -0000 1.18 *************** *** 134,138 **** bool IsLeaf() const; ///< returns true if db obj is a leaf obj teWeaponLaunchMode GetLaunchMode(); ! tnPoolIndex GetPrimarySeekerKey(); bool HasAllEmitters(std::vector<long>& emitters); virtual void PrintToFile(tcFile& file); --- 134,138 ---- bool IsLeaf() const; ///< returns true if db obj is a leaf obj teWeaponLaunchMode GetLaunchMode(); ! long GetPrimarySeekerKey(); bool HasAllEmitters(std::vector<long>& emitters); virtual void PrintToFile(tcFile& file); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:18
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/src/sim Modified Files: tcBallisticWeapon.cpp tcGameObject.cpp tcLauncher.cpp tcSimState.cpp tcWeaponObject.cpp Log Message: OpenAL++ updates, added point defense Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** tcSimState.cpp 10 Mar 2005 03:28:29 -0000 1.72 --- tcSimState.cpp 25 Mar 2005 03:48:08 -0000 1.73 *************** *** 547,550 **** --- 547,590 ---- /** + * Temporary special case for point defense ballistic weaps + */ + void tcSimState::EvaluatePointDefenseWeaponHit(tcWeaponObject* weapon) + { + wxASSERT(weapon); + + tcGameObject* target = GetObject(weapon->GetIntendedTarget()); + if (target == 0) return; + + float dx, dy, dz, tclosest; + tclosest = target->mcKin.CalculateCollisionPoint(weapon->mcKin, dx, dy, dz); + + if (tclosest > 0.03) return; // defer until future time step + + float trueRange2 = dx*dx + dy*dy + dz*dz; + if (trueRange2 < 2500.0f) // 50.0 m range + { + float fDamage = weapon->GetDamage(); + float fDamageFract = GetFractionalDamage(fDamage, target); + target->mfDamageLevel += fDamageFract; + weapon->mfDamageLevel += 1.0f; // destroys itself on impact + + if (fDamageFract > 0) + { + if (mpUserInfo->IsOwnAlliance(target->mnAlliance)) + { + ReportDamage(target); + } + else + { + tcSound::Get()->PlayEffect("Explosion2"); + } + } + } + + } + + + + /** * JUL2004 This was modified to use EvaluateGuidedMissileHit and * EvaluateImpactMissileHit. *************** *** 591,600 **** else if (tcWeaponObject* weapon = dynamic_cast<tcWeaponObject*>(obj)) { ! if ((weapon->mcKin.mfAlt_m < weapon->mcTerrain.mfHeight_m + 200.0) ! || (weapon->mcKin.mfAlt_m < 100.0)) ! { ! EvaluateImpactWeaponHit(weapon); ! } ! } } --- 631,644 ---- else if (tcWeaponObject* weapon = dynamic_cast<tcWeaponObject*>(obj)) { ! if (weapon->IsGroundFused()) ! { ! bool evaluate = (weapon->mcKin.mfAlt_m < weapon->mcTerrain.mfHeight_m + 200.0) || ! (weapon->mcKin.mfAlt_m < 100.0); ! if (evaluate) EvaluateImpactWeaponHit(weapon); ! } ! else ! { ! EvaluatePointDefenseWeaponHit(weapon); ! } } } *************** *** 1534,1537 **** --- 1578,1585 ---- tcSound::Get()->PlayEffect("NavalGun1"); } + else if (ballistic->IsPointDefense()) + { + tcSound::Get()->PlayEffect("Gatling"); + } } } *************** *** 2236,2239 **** --- 2284,2345 ---- /** + * Populates <track> with track from sensor map or truth data + * if <id> is own-alliance. + * @param alliance alliance of requesting entity + * @return true if successful, false if id not found + */ + bool tcSimState::GetTrack(long id, unsigned alliance, tcSensorMapTrack& track) + { + tcGameObject* obj = GetObject(id); + if (obj == 0) return false; // target not found + + // return truth data if own alliance + if (alliance == obj->mnAlliance) + { + tcKinematics *kin = &obj->mcKin; + track.mfAlt_m = kin->mfAlt_m; + track.mfHeading_rad = kin->mfHeading_rad; + track.mfLat_rad = (float)kin->mfLat_rad; + track.mfLon_rad = (float)kin->mfLon_rad; + track.mfSpeed_kts = kin->mfSpeed_kts; + track.mnClassification = obj->mpDBObject->mnType; + track.mnID = obj->mnID; + track.mnAffiliation = FRIENDLY; + } + else + { + tcSensorMapTrack *pTrack = + mcSensorMap.GetSensorMapTrack(obj->mnID, alliance); + if (pTrack) track = *pTrack; + } + + return true; + } + + + /** + * Populates <track> with truth data + * @return true if successful, false if id not found + */ + bool tcSimState::GetTruthTrack(long id, tcTrack& track) + { + tcGameObject* obj = GetObject(id); + if (obj == 0) return false; // target not found + + tcKinematics *kin = &obj->mcKin; + track.mfAlt_m = kin->mfAlt_m; + track.mfHeading_rad = kin->mfHeading_rad; + track.mfClimbAngle_rad = kin->mfClimbAngle_rad; + track.mfLat_rad = (float)kin->mfLat_rad; + track.mfLon_rad = (float)kin->mfLon_rad; + track.mfSpeed_kts = kin->mfSpeed_kts; + track.mnClassification = obj->mpDBObject->mnType; + track.mnID = obj->mnID; + track.mnAffiliation = FRIENDLY; + + return true; + } + + /** * @return true if valid scenario is loaded */ Index: tcWeaponObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcWeaponObject.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcWeaponObject.cpp 5 Dec 2004 02:49:48 -0000 1.10 --- tcWeaponObject.cpp 25 Mar 2005 03:48:08 -0000 1.11 *************** *** 88,91 **** --- 88,96 ---- } + bool tcWeaponObject::IsGroundFused() const + { + return (fuseMode == FuseMode::GROUND_FUSE); + } + bool tcWeaponObject::IsIntendedTarget(long id) { *************** *** 99,102 **** --- 104,112 ---- } + void tcWeaponObject::SetFuseMode(FuseMode mode) + { + fuseMode = mode; + } + void tcWeaponObject::SetIntendedTarget(long targetId) { *************** *** 123,127 **** tcWeaponObject::tcWeaponObject() : fuseHasTriggered(false), fuseDelay(0), intendedTarget(-1), ! mpDBObject(0) { --- 133,138 ---- tcWeaponObject::tcWeaponObject() : fuseHasTriggered(false), fuseDelay(0), intendedTarget(-1), ! mpDBObject(0), ! fuseMode(FuseMode::GROUND_FUSE) { *************** *** 142,146 **** : tcGameObject(obj), fuseHasTriggered(false), fuseDelay(0), intendedTarget(-1), ! mpDBObject(obj) { wxASSERT(simState); --- 153,158 ---- : tcGameObject(obj), fuseHasTriggered(false), fuseDelay(0), intendedTarget(-1), ! mpDBObject(obj), ! fuseMode(FuseMode::GROUND_FUSE) { wxASSERT(simState); Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** tcGameObject.cpp 10 Mar 2005 03:28:29 -0000 1.31 --- tcGameObject.cpp 25 Mar 2005 03:48:07 -0000 1.32 *************** *** 80,83 **** --- 80,91 ---- /** + * Call to destroy object as name suggests + */ + void tcGameObject::SelfDestruct() + { + mfDamageLevel += 1.0f; + } + + /** * */ Index: tcBallisticWeapon.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcBallisticWeapon.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcBallisticWeapon.cpp 10 Mar 2005 03:28:29 -0000 1.10 --- tcBallisticWeapon.cpp 25 Mar 2005 03:48:07 -0000 1.11 *************** *** 98,101 **** --- 98,103 ---- mcKin.mfPitch_rad += pLauncher->pointingElevation; + distFromLaunch_m = 0; + // For gun round, set az and el to intercept target datum if (mpDBObject->IsGunRound()) *************** *** 119,124 **** range_m, mpDBObject->launchSpeed_mps); */ - } wxString s = wxString::Format("Ball %d-%d", obj->mnID, rand() % 1000); --- 121,146 ---- range_m, mpDBObject->launchSpeed_mps); */ } + else if (mpDBObject->IsPointDefense()) + { + mcKin.mfSpeed_kts = C_MPSTOKTS * mpDBObject->launchSpeed_mps; + + /* get intercept az and el to target, if target is bad then launch + ** at 0 deg az, 45 deg el, and write error */ + tcTrack targetTrack; + float launchAz_rad = 0; + float launchEl_rad = 1.0f; + float tti_s; + float range_km; + if (simState->GetTruthTrack(pLauncher->mnTargetID, targetTrack)) + { + mcKin.GetInterceptData3D(targetTrack, launchAz_rad, launchEl_rad, tti_s, range_km); + } + mcKin.mfHeading_rad = launchAz_rad; + mcKin.mfPitch_rad = launchEl_rad; + mcKin.mfClimbAngle_rad = launchEl_rad; + + SetFuseMode(FuseMode::TARGET_FUSE); + } wxString s = wxString::Format("Ball %d-%d", obj->mnID, rand() % 1000); *************** *** 135,140 **** SetIntendedTarget(pLauncher->mnTargetID); - - } --- 157,160 ---- *************** *** 163,173 **** } ! vz_mps += -C_G * dt_s; ! float dist = C_MTORAD * dt_s * vxy_mps; float dlon = dist * sinf(mcKin.mfHeading_rad) / cosf(mcKin.mfLat_rad); float dlat = dist * cosf(mcKin.mfHeading_rad); mcKin.mfLon_rad += dlon; mcKin.mfLat_rad += dlat; --- 183,200 ---- } ! // point defense rounds magically defy gravity ! if (!IsPointDefense()) ! { ! vz_mps += -C_G * dt_s; ! } ! float distxy_m = dt_s * vxy_mps; ! float dist = C_MTORAD * distxy_m; float dlon = dist * sinf(mcKin.mfHeading_rad) / cosf(mcKin.mfLat_rad); float dlat = dist * cosf(mcKin.mfHeading_rad); + distFromLaunch_m += distxy_m; + mcKin.mfLon_rad += dlon; mcKin.mfLat_rad += dlat; *************** *** 178,199 **** mcKin.mfSpeed_kts = C_MPSTOKTS * sqrtf(vxy_mps*vxy_mps + vz_mps*vz_mps); if (clientMode) return; ! /*** check for impact ***/ ! float terrainHeight_m = mcTerrain.mfHeight_m; ! if (terrainHeight_m < 0) terrainHeight_m = 0; ! float dz = terrainHeight_m - mcKin.mfAlt_m; // height above ground or sea level ! float t_impact = dz / vz_mps; ! if ((vz_mps < 0)&&(t_impact <= 0.03f)) ! { ! Detonate(t_impact); ! } } /** --- 205,265 ---- mcKin.mfSpeed_kts = C_MPSTOKTS * sqrtf(vxy_mps*vxy_mps + vz_mps*vz_mps); + if ((mpDBObject->maxRange_km > 0) && + (distFromLaunch_m > 1000.0f * mpDBObject->maxRange_km)) + { + SelfDestruct(); + } + if (clientMode) return; ! /*** check for impact ***/ ! if (IsPointDefense()) ! { ! UpdateTargetFuse(); ! } ! else ! { ! UpdateGroundFuse(); ! } ! } ! void tcBallisticWeapon::UpdateGroundFuse() ! { ! // check for impact with ground ! float terrainHeight_m = mcTerrain.mfHeight_m; ! if (terrainHeight_m < 0) terrainHeight_m = 0; ! float dz = terrainHeight_m - mcKin.mfAlt_m; // height above ground or sea level ! float t_impact = dz / vz_mps; ! ! if ((vz_mps < 0)&&(t_impact <= 0.03f)) ! { ! Detonate(t_impact); ! } } + void tcBallisticWeapon::UpdateTargetFuse() + { + const float checkInterceptRange = 0.2f; + + if (tcGameObject* target = simState->GetObject(intendedTarget)) + { + float range_km = mcKin.RangeToKmAlt(target->mcKin); + if (range_km <= checkInterceptRange) + { + Detonate(0); // not really a detonation, but a signal for simstate to check for hit + } + else + { + fuseHasTriggered = false; + } + } + else + { + } + } /** *************** *** 206,209 **** --- 272,276 ---- vz_mps = 0; vxy_mps = 0; + distFromLaunch_m = 0; } *************** *** 262,265 **** --- 329,337 ---- } + bool tcBallisticWeapon::IsPointDefense() const + { + return mpDBObject->IsPointDefense(); + } + /** * *************** *** 284,287 **** --- 356,360 ---- vz_mps = o.vz_mps; vxy_mps = o.vxy_mps; + distFromLaunch_m = o.distFromLaunch_m; } *************** *** 292,296 **** : tcWeaponObject(obj), vz_mps(0), ! vxy_mps(0) { mnModelType = MTYPE_BALLISTIC; --- 365,370 ---- : tcWeaponObject(obj), vz_mps(0), ! vxy_mps(0), ! distFromLaunch_m(0) { mnModelType = MTYPE_BALLISTIC; Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcLauncher.cpp 10 Mar 2005 03:28:29 -0000 1.13 --- tcLauncher.cpp 25 Mar 2005 03:48:08 -0000 1.14 *************** *** 22,25 **** --- 22,26 ---- #include "tcLauncher.h" #include "tcDatabase.h" + #include "tcBallisticDBObject.h" #include "tcGenericDBObject.h" #include "tcLauncherDBObject.h" *************** *** 254,257 **** --- 255,260 ---- } + bool hasTarget = (mnTargetID != NULL_INDEX); + if (meLaunchMode == DATUM_ONLY) // needs a datum programmed to launch { *************** *** 265,270 **** } } ! ! --- 268,283 ---- } } ! else if (meLaunchMode == TARGET_ONLY) ! { ! if (hasTarget) ! { ! return LAUNCHER_READY; ! } ! else ! { ! return NO_TARGET; ! } ! } ! *************** *** 273,277 **** { bool hasDatum = (msDatum.mfLat_rad != 0) || (msDatum.mfLon_rad != 0); - bool hasTarget = (mnTargetID == NULL_INDEX); if ((!hasDatum) && (!hasTarget)) { --- 286,289 ---- *************** *** 384,387 **** --- 396,401 ---- } + bool hasTarget = (mnTargetID != NULL_INDEX); + if (meLaunchMode == DATUM_ONLY) // needs a datum programmed to launch { *************** *** 395,399 **** } } ! --- 409,423 ---- } } ! else if (meLaunchMode == TARGET_ONLY) ! { ! if (hasTarget) ! { ! return LAUNCHER_READY; ! } ! else ! { ! return NO_TARGET; ! } ! } *************** *** 403,407 **** { bool hasDatum = (msDatum.mfLat_rad != 0) || (msDatum.mfLon_rad != 0); ! bool hasTarget = (mnTargetID == NULL_INDEX); if ((!hasDatum) && (!hasTarget)) { --- 427,431 ---- { bool hasDatum = (msDatum.mfLat_rad != 0) || (msDatum.mfLon_rad != 0); ! if ((!hasDatum) && (!hasTarget)) { *************** *** 614,621 **** } ! else // assume ballistic vs. land (TODO rework this) { ! meLaunchMode = DATUM_ONLY; ! mnTargetFlags = SURFACE_TARGET | LAND_TARGET; } --- 638,657 ---- } ! else if (tcBallisticDBObject* ballisticDBObj = ! dynamic_cast<tcBallisticDBObject*>(mpChildDBObj)) { ! if (ballisticDBObj->IsPointDefense()) ! { ! meLaunchMode = TARGET_ONLY; ! } ! else ! { ! meLaunchMode = DATUM_ONLY; ! } ! mnTargetFlags = ballisticDBObj->targetFlags; ! } ! else // sonobuoy ! { ! meLaunchMode = DATUM_ONLY; } |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:17
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/include/sim Modified Files: tcBallisticWeapon.h tcGameObject.h tcSimState.h tcWeaponObject.h Log Message: OpenAL++ updates, added point defense Index: tcWeaponObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcWeaponObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcWeaponObject.h 17 Aug 2004 02:22:56 -0000 1.7 --- tcWeaponObject.h 25 Mar 2005 03:48:06 -0000 1.8 *************** *** 51,54 **** --- 51,56 ---- bool IsDetonated(); + bool IsGroundFused() const; + /// returns true if id is intended target of this weapon bool IsIntendedTarget(long id); *************** *** 69,72 **** --- 71,80 ---- */ float fuseDelay; + enum FuseMode + { + GROUND_FUSE = 0, ///< detonate on hitting ground + TARGET_FUSE = 1 ///< detonate when near target (used for point defense ballistics) + }; + FuseMode fuseMode; virtual tcUpdateStream& operator<<(tcUpdateStream& stream); *************** *** 74,77 **** --- 82,86 ---- void Detonate(float delay_s = 0); + void SetFuseMode(FuseMode mode); tcWeaponObject(); *************** *** 80,82 **** ~tcWeaponObject(); }; ! #endif \ No newline at end of file --- 89,92 ---- ~tcWeaponObject(); }; ! ! #endif Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** tcSimState.h 8 Mar 2005 00:41:47 -0000 1.35 --- tcSimState.h 25 Mar 2005 03:48:06 -0000 1.36 *************** *** 156,159 **** --- 156,162 ---- double GetTime() {return mfSimTime;} long GetTimeAcceleration() const; + bool GetTrack(long id, unsigned alliance, tcSensorMapTrack& track); + bool GetTruthTrack(long id, tcTrack& track); + bool IsLauncherReady(tcGameObject *apGameObj, unsigned anLauncher); bool IsLauncherReady(tnPoolIndex anKey, unsigned anLauncher); *************** *** 201,204 **** --- 204,209 ---- void EvaluateGuidedMissileHit(tcMissileObject* missile, tcGameObject* target); void EvaluateImpactWeaponHit(tcWeaponObject* weapon); + void EvaluatePointDefenseWeaponHit(tcWeaponObject* weapon); + void EvaluateTorpedoHit(tcTorpedoObject* torp, tcGameObject* target); float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** tcGameObject.h 10 Mar 2005 03:28:27 -0000 1.33 --- tcGameObject.h 25 Mar 2005 03:48:06 -0000 1.34 *************** *** 111,115 **** tcKinematics mcKin; ///< position, motion, etc parameters tcTerrainInfo mcTerrain; ///< ground height ASL, water depth ! float mfDamageLevel; ///< 0 is no damage, up to toughness amount float RangeTo(tcGameObject& p) const; --- 111,115 ---- tcKinematics mcKin; ///< position, motion, etc parameters tcTerrainInfo mcTerrain; ///< ground height ASL, water depth ! float mfDamageLevel; ///< 0 is no damage, 1 is fully damaged float RangeTo(tcGameObject& p) const; *************** *** 183,186 **** --- 183,187 ---- bool IsHooked() const; + void SelfDestruct(); }; #endif \ No newline at end of file Index: tcBallisticWeapon.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcBallisticWeapon.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcBallisticWeapon.h 31 Jan 2005 01:32:36 -0000 1.5 --- tcBallisticWeapon.h 25 Mar 2005 03:48:06 -0000 1.6 *************** *** 52,55 **** --- 52,56 ---- bool IsGravityBomb() const; bool IsGunRound() const; + bool IsPointDefense() const; void PrintToFile(tcFile&); *************** *** 68,71 **** --- 69,76 ---- float vz_mps; ///< vertical velocity [m/s] float vxy_mps; ///< lateral velocity [m/s] + float distFromLaunch_m; ///< horizontal distance from launch point [m] + + void UpdateGroundFuse(); + void UpdateTargetFuse(); }; |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:16
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/src/common Modified Files: tcOggStreamer.cpp tcSound.cpp Log Message: OpenAL++ updates, added point defense Index: tcOggStreamer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOggStreamer.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcOggStreamer.cpp 19 Mar 2005 15:31:08 -0000 1.16 --- tcOggStreamer.cpp 25 Mar 2005 03:48:07 -0000 1.17 *************** *** 53,56 **** --- 53,59 ---- void tcOggStreamer::Seek(double seekTime) { + wxASSERT(source.valid()); + + source->seek(seekTime); } Index: tcSound.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSound.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcSound.cpp 15 Mar 2005 00:36:37 -0000 1.27 --- tcSound.cpp 25 Mar 2005 03:48:07 -0000 1.28 *************** *** 106,111 **** effectMap["torpedo_launch"] = LoadSample("torpedo_launch.wav"); effectMap["shishding"] = LoadSample("shishding.wav"); ! ! SetMusicVolume(0.5f); --- 106,111 ---- effectMap["torpedo_launch"] = LoadSample("torpedo_launch.wav"); effectMap["shishding"] = LoadSample("shishding.wav"); ! effectMap["Gatling"] = LoadSample("gatling.wav"); ! SetMusicVolume(0.5f); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:16
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/src/database Modified Files: tcBallisticDBObject.cpp Log Message: OpenAL++ updates, added point defense Index: tcBallisticDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcBallisticDBObject.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcBallisticDBObject.cpp 31 Jan 2005 01:33:07 -0000 1.9 --- tcBallisticDBObject.cpp 25 Mar 2005 03:48:07 -0000 1.10 *************** *** 133,136 **** --- 133,141 ---- } + bool tcBallisticDBObject::IsPointDefense() const + { + return (ballisticType == POINT_DEFENSE); + } + void tcBallisticDBObject::PrintToFile(tcFile& file) { *************** *** 177,184 **** wxASSERT(node); ! //TiXmlElement* localNode = ! node->InsertEndChild(TiXmlElement("ballistic"))->ToElement(); ! //localNode->SetAttribute("maxRange_km" ,mfMaxRange_km); tcWeaponDBObject::SerializeXml(node, load); --- 182,189 ---- wxASSERT(node); ! TiXmlElement* localNode = ! node->InsertEndChild(TiXmlElement("ballistic"))->ToElement(); ! localNode->SetAttribute("maxRange_km", maxRange_km); tcWeaponDBObject::SerializeXml(node, load); *************** *** 204,208 **** columnString += ","; ! columnString += "BallisticType number(5)"; } --- 209,214 ---- columnString += ","; ! columnString += "BallisticType number(5),"; ! columnString += "MaxRange_km number(4)"; } *************** *** 212,215 **** --- 218,222 ---- ballisticType = entry.GetInt("BallisticType"); + maxRange_km = entry.GetDouble("MaxRange_km"); } *************** *** 222,226 **** s << ","; ! s << ballisticType; valueString += s.str(); --- 229,234 ---- s << ","; ! s << ballisticType << ","; ! s << maxRange_km; valueString += s.str(); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:16
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/src/scriptinterface Modified Files: tcPlatformInterface.cpp Log Message: OpenAL++ updates, added point defense Index: tcPlatformInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** tcPlatformInterface.cpp 10 Mar 2005 03:28:29 -0000 1.39 --- tcPlatformInterface.cpp 25 Mar 2005 03:48:07 -0000 1.40 *************** *** 987,1014 **** tcSensorMapTrack track; ! tcGameObject* obj = mpSimState->GetObject(id); ! if (obj == NULL) return track; // target not found ! // return truth data if own alliance ! if (mpSimState->mpUserInfo->IsOwnAlliance(obj->mnAlliance)) ! { ! tcKinematics *kin = &obj->mcKin; ! track.mfAlt_m = kin->mfAlt_m; ! track.mfHeading_rad = kin->mfHeading_rad; ! track.mfLat_rad = (float)kin->mfLat_rad; ! track.mfLon_rad = (float)kin->mfLon_rad; ! track.mfSpeed_kts = kin->mfSpeed_kts; ! track.mnClassification = obj->mpDBObject->mnType; ! track.mnID = obj->mnID; ! track.mnAffiliation = FRIENDLY; ! return track; ! } ! else ! { ! tcSensorMapTrack *pTrack = ! mpSimState->mcSensorMap.GetSensorMapTrack(obj->mnID, mpPlatformObj->mnAlliance); ! if (pTrack) track = *pTrack; ! return track; ! } } --- 987,993 ---- tcSensorMapTrack track; ! bool found = mpSimState->GetTrack(id, mpPlatformObj->mnAlliance, track); ! return track; } *************** *** 1098,1102 **** { tcGameObject* obj = mpSimState->GetObjectByName(unitName); ! if ((obj == 0) || !mpSimState->mpUserInfo->IsOwnAlliance(obj->mnAlliance)) { return -1; --- 1077,1083 ---- { tcGameObject* obj = mpSimState->GetObjectByName(unitName); ! bool isOwnAlliance = mpPlatformObj->mnAlliance == obj->mnAlliance; ! ! if ((obj == 0) || !isOwnAlliance) { return -1; |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:16
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/src/graphics Modified Files: tc3DViewer.cpp Log Message: OpenAL++ updates, added point defense Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DViewer.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tc3DViewer.cpp 11 Mar 2005 02:34:57 -0000 1.13 --- tc3DViewer.cpp 25 Mar 2005 03:48:07 -0000 1.14 *************** *** 1026,1031 **** cameraTarget = cameraPosition*m; } // limit min camera altitude unless surface or subsurface obj ! if ((obj->mpDBObject->mnType & (PTYPE_SUBSURFACE | PTYPE_SURFACE)) != 0) { if (cameraPosition._v[2] < -480.0) cameraPosition._v[2] = -480.0; --- 1026,1034 ---- cameraTarget = cameraPosition*m; } + // limit min camera altitude unless surface or subsurface obj ! const unsigned int limitMask = (~PTYPE_FIXED) & 0xFFF0; ! ! if ((obj->mpDBObject->mnType & limitMask) != 0) { if (cameraPosition._v[2] < -480.0) cameraPosition._v[2] = -480.0; |
|
From: Dewitt C. <ddc...@us...> - 2005-03-25 03:48:16
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv349/include/database Modified Files: tcBallisticDBObject.h tcMissileDBObject.h Log Message: OpenAL++ updates, added point defense Index: tcBallisticDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcBallisticDBObject.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcBallisticDBObject.h 31 Jan 2005 01:32:35 -0000 1.6 --- tcBallisticDBObject.h 25 Mar 2005 03:48:06 -0000 1.7 *************** *** 38,43 **** { public: ! enum {GUN_ROUND = 0, GRAVITY_BOMB = 1}; int ballisticType; float GetGunneryElevation(float range_m, float dz_m, float& tti_s); --- 38,44 ---- { public: ! enum {GUN_ROUND = 0, GRAVITY_BOMB = 1, POINT_DEFENSE = 2}; int ballisticType; + float maxRange_km; ///< maximum effective range float GetGunneryElevation(float range_m, float dz_m, float& tti_s); *************** *** 45,48 **** --- 46,50 ---- bool IsGravityBomb() const; bool IsGunRound() const; + bool IsPointDefense() const; virtual const char* GetClassName() {return "Ballistic";} ///< returns class name of database object Index: tcMissileDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcMissileDBObject.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcMissileDBObject.h 7 Dec 2004 03:59:07 -0000 1.16 --- tcMissileDBObject.h 25 Mar 2005 03:48:06 -0000 1.17 *************** *** 94,98 **** FC_TRACK, ///< needs a fire-control track (launching platform) to launch, semi-active or command guidance SEEKER_TRACK, ///< needs seeker track and FC track to launch ! AUTO ///< will launch and either proceed unguided or autonomously search out target }; --- 94,99 ---- FC_TRACK, ///< needs a fire-control track (launching platform) to launch, semi-active or command guidance SEEKER_TRACK, ///< needs seeker track and FC track to launch ! AUTO, ///< will launch and either proceed unguided or autonomously search out target ! TARGET_ONLY ///< needs a target (no track requirements) }; |
|
From: Dewitt C. <ddc...@us...> - 2005-03-19 15:31:21
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8388/src/sim Modified Files: Game.cpp Log Message: OpenAL++ issues, fixed minimization of world map, shift+left click now changes theater on world map Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** Game.cpp 10 Mar 2005 03:28:29 -0000 1.123 --- Game.cpp 19 Mar 2005 15:31:09 -0000 1.124 *************** *** 1433,1437 **** if (!musicStarted && (tcOptions::Get()->mbPlayMusic)) { ! tcSound::Get()->PlayMusic("gcb_theme2"); musicStarted = true; } --- 1433,1437 ---- if (!musicStarted && (tcOptions::Get()->mbPlayMusic)) { ! tcSound::Get()->PlayMusic("groove"); musicStarted = true; } |
|
From: Dewitt C. <ddc...@us...> - 2005-03-19 15:31:21
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8388/include/graphics Modified Files: tcMapView.h tcTerrainView.h Log Message: OpenAL++ issues, fixed minimization of world map, shift+left click now changes theater on world map Index: tcTerrainView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcTerrainView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcTerrainView.h 20 Feb 2005 21:54:32 -0000 1.2 --- tcTerrainView.h 19 Mar 2005 15:31:08 -0000 1.3 *************** *** 70,73 **** --- 70,74 ---- int LoadHighResSurface(); int LoadLowResSurface(); + void Maximize(); void Minimize(); int RefreshSurfaces(); ///< reloads terrain data to map view Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapView.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcMapView.h 5 Mar 2005 22:37:51 -0000 1.15 --- tcMapView.h 19 Mar 2005 15:31:08 -0000 1.16 *************** *** 403,406 **** --- 403,407 ---- void DrawGrid(); void DrawTheaterBox(); + void OnChar(wxKeyEvent& event); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-19 15:31:21
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8388/src/graphics Modified Files: tcMapView.cpp tcStartView.cpp tcTerrainView.cpp Log Message: OpenAL++ issues, fixed minimization of world map, shift+left click now changes theater on world map Index: tcStartView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcStartView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcStartView.cpp 11 Mar 2005 02:34:57 -0000 1.7 --- tcStartView.cpp 19 Mar 2005 15:31:09 -0000 1.8 *************** *** 95,99 **** color._v[3] = alpha; ! DrawTextR("March 10, 2005 Build", 85.0, 150.0, GetDefaultFont(), color, 24.0, LEFT_BASE_LINE); --- 95,102 ---- color._v[3] = alpha; ! ! wxString s = wxString::Format("%s Limited Release Build", __DATE__); ! ! DrawTextR(s.c_str(), 85.0, 150.0, GetDefaultFont(), color, 24.0, LEFT_BASE_LINE); Index: tcTerrainView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcTerrainView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcTerrainView.cpp 11 Mar 2005 02:34:57 -0000 1.4 --- tcTerrainView.cpp 19 Mar 2005 15:31:09 -0000 1.5 *************** *** 43,46 **** --- 43,47 ---- { if (!redraw) return; + DrawZoomedImage(mapImage.get(), 0, 0, (float)mnWidth, (float)mnHeight, displayRegion, ALIGN_BOTTOM_LEFT); *************** *** 191,200 **** /** ! * call tcWindow::SetActive(false) on Minimize() */ void tcTerrainView::Minimize() { ! tc3DWindow::SetActive(false); tc3DWindow::Minimize(); } --- 192,212 ---- /** ! * ! */ ! void tcTerrainView::Maximize() ! { ! tc3DWindow::Maximize(); ! redraw = true; ! } ! ! ! /** ! * */ void tcTerrainView::Minimize() { ! // tc3DWindow::SetActive(false); tc3DWindow::Minimize(); + redraw = true; } Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapView.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** tcMapView.cpp 10 Mar 2005 03:28:28 -0000 1.20 --- tcMapView.cpp 19 Mar 2005 15:31:08 -0000 1.21 *************** *** 611,615 **** tcMapView::Thaw(); // unfreeze every Draw() call, works with Freeze() to stop resize flicker ! if (mnScrollState >= SCROLL_DELAY) { ScrollMap(mfScrollDirection); --- 611,615 ---- tcMapView::Thaw(); // unfreeze every Draw() call, works with Freeze() to stop resize flicker ! if ((mnScrollState >= SCROLL_DELAY) && (mnScrollState % 2 == 0)) { ScrollMap(mfScrollDirection); *************** *** 2728,2736 **** } /***********************************************************************************/ void tcWorldMapView::OnLButtonDown(wxMouseEvent& event) { wxPoint point = event.GetPosition(); ! if (event.ControlDown() && event.ShiftDown()) { tcSound::Get()->PlayEffect("Beep2"); --- 2728,2740 ---- } + void tcWorldMapView::OnChar(wxKeyEvent& event) + { + } + /***********************************************************************************/ void tcWorldMapView::OnLButtonDown(wxMouseEvent& event) { wxPoint point = event.GetPosition(); ! if (event.ShiftDown()) { tcSound::Get()->PlayEffect("Beep2"); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-19 15:31:21
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8388/src/common Modified Files: tcOggStreamer.cpp Log Message: OpenAL++ issues, fixed minimization of world map, shift+left click now changes theater on world map Index: tcOggStreamer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOggStreamer.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcOggStreamer.cpp 15 Mar 2005 00:36:32 -0000 1.15 --- tcOggStreamer.cpp 19 Mar 2005 15:31:08 -0000 1.16 *************** *** 156,162 **** (sourceState == openalpp::Initial)) { ! stream = new openalpp::FileStream(queuedSong); ! source->setSound(stream.get()); // crashes this way ! //source->setSound(new openalpp::FileStream(queuedSong)); // big memory leaks this way source->play(); queuedSong = ""; --- 156,164 ---- (sourceState == openalpp::Initial)) { ! source = new openalpp::Source; ! source->setAmbient(); ! source->setGain(volume); ! source->setSound(new openalpp::FileStream(queuedSong)); ! source->play(); queuedSong = ""; |
|
From: Dewitt C. <ddc...@us...> - 2005-03-19 15:31:20
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8388 Modified Files: GCblue.vcproj Log Message: OpenAL++ issues, fixed minimization of world map, shift+left click now changes theater on world map Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** GCblue.vcproj 11 Mar 2005 02:34:57 -0000 1.89 --- GCblue.vcproj 19 Mar 2005 15:31:07 -0000 1.90 *************** *** 89,93 **** FavorSizeOrSpeed="0" OmitFramePointers="TRUE" ! OptimizeForProcessor="0" OptimizeForWindowsApplication="TRUE" AdditionalIncludeDirectories="include;include/sim;include/scriptinterface;include/common;include/graphics;"C:\wxWindows-2.4.1\lib\msw";include\database" --- 89,93 ---- FavorSizeOrSpeed="0" OmitFramePointers="TRUE" ! OptimizeForProcessor="2" OptimizeForWindowsApplication="TRUE" AdditionalIncludeDirectories="include;include/sim;include/scriptinterface;include/common;include/graphics;"C:\wxWindows-2.4.1\lib\msw";include\database" *************** *** 1101,1104 **** --- 1101,1107 ---- Filter="h;hpp;hxx;hm;inl;inc"> <File + RelativePath=".\res\resource.h"> + </File> + <File RelativePath="include\stdwx.h"> </File> |
|
From: Dewitt C. <ddc...@us...> - 2005-03-15 00:36:47
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2989/src/common Modified Files: tcSound.cpp Log Message: Index: tcSound.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSound.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** tcSound.cpp 4 Mar 2005 00:46:16 -0000 1.26 --- tcSound.cpp 15 Mar 2005 00:36:37 -0000 1.27 *************** *** 173,176 **** --- 173,177 ---- if (!mbInitialized) return; if (!oggStreamer) return; + std::string musicPath = OGG_PATH; musicPath += song; *************** *** 178,183 **** meMusicState = MS_WAIT; oggStreamer->Open(musicPath); // oggStreamer->Display(); // uncomment to log ogg info to stdout ! oggStreamer->Play(); oggStreamer->SetPause(false); } --- 179,185 ---- meMusicState = MS_WAIT; oggStreamer->Open(musicPath); + // oggStreamer->Display(); // uncomment to log ogg info to stdout ! //oggStreamer->Play(); oggStreamer->SetPause(false); } *************** *** 260,270 **** if (meMusicState == MS_STOPPED) return; ! if (!oggStreamer->IsPlaying()) { oggStreamer->Play(); } // bool isPlaying = oggStreamer->IsPlaying(); ! if (oggStreamer->IsSongQueued()) return; ! QueueRandomMusic(); // oggStreamer->Playback(); --- 262,277 ---- if (meMusicState == MS_STOPPED) return; ! ! if (oggStreamer->IsPaused()) { oggStreamer->Play(); } // bool isPlaying = oggStreamer->IsPlaying(); ! if (!oggStreamer->IsSongQueued()) ! { ! QueueRandomMusic(); ! } ! ! oggStreamer->Update(); // oggStreamer->Playback(); |
|
From: Dewitt C. <ddc...@us...> - 2005-03-15 00:36:44
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2966/src/common Modified Files: tcOggStreamer.cpp Log Message: Index: tcOggStreamer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOggStreamer.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcOggStreamer.cpp 24 Feb 2005 22:19:15 -0000 1.14 --- tcOggStreamer.cpp 15 Mar 2005 00:36:32 -0000 1.15 *************** *** 36,57 **** * oggfile to open. */ ! void tcOggStreamer::Open(std::string path) { ! return; ! if (source.valid()) ! { ! stream.get()->unref(); ! } ! else ! { ! source = new openalpp::Source; ! source->setAmbient(); ! source->setGain(volume); ! } ! ! stream = new openalpp::FileStream(path); ! source->setSound(stream.get()); ! source->play(); } --- 36,44 ---- * oggfile to open. */ ! void tcOggStreamer::Open(const std::string& path) { ! Queue(path); ! Stop(); } *************** *** 76,94 **** { volume = vol; ! if (source.valid()) ! { ! source->setGain(volume); ! } } /** ! * Stop playing and clear/unload ogg file. */ void tcOggStreamer::Stop() { ! if (source.valid()) ! { ! source->stop(); ! } } --- 63,80 ---- { volume = vol; ! ! wxASSERT(source.valid()); ! ! source->setGain(volume); } /** ! * */ void tcOggStreamer::Stop() { ! wxASSERT(source.valid()); ! ! source->stop(); } *************** *** 101,145 **** /** ! * Loads and queues all buffers if not playing. ! * This needs to be called at least once to start ! * the music. ! * Also will unpause. */ ! bool tcOggStreamer::Play() { ! if (!source.valid()) return false; ! paused = false; ! ! ! ! if (IsPlaying()) return true; ! if (IsStopped()) { ! } - - return IsPlaying(); } ! void tcOggStreamer::Queue(std::string path) { ! if ( (!source.valid()) || (!IsPlaying())) ! { ! Open(path); ! Play(); ! } ! else { ! queuedSong = path; } } bool tcOggStreamer::IsPaused() { return (source->getState() == openalpp::Paused); } --- 87,125 ---- /** ! * */ ! void tcOggStreamer::Play() { ! wxASSERT(source.valid()); ! paused = false; ! if (!IsPlaying()) { ! source->play(); } } ! void tcOggStreamer::Queue(const std::string& path) { ! wxASSERT(source.valid()); ! ! #ifdef _DEBUG ! if (queuedSong.size() > 0) { ! fprintf(stderr, "Warning - tcOggStreamer::Queue - Replacing " ! "previously queued audio file (%s)\n", queuedSong.c_str()); } + #endif + queuedSong = path; } bool tcOggStreamer::IsPaused() { + wxASSERT(source.valid()); + return (source->getState() == openalpp::Paused); } *************** *** 148,152 **** bool tcOggStreamer::IsPlaying() { ! if (!source.valid()) return false; return (source->getState() == openalpp::Playing); --- 128,132 ---- bool tcOggStreamer::IsPlaying() { ! wxASSERT(source.valid()); return (source->getState() == openalpp::Playing); *************** *** 155,168 **** bool tcOggStreamer::IsStopped() { return (source->getState() == openalpp::Stopped); } tcOggStreamer::tcOggStreamer() : volume(0.2f), queuedSong(""), ! paused(false) { } --- 135,177 ---- bool tcOggStreamer::IsStopped() { + wxASSERT(source.valid()); + return (source->getState() == openalpp::Stopped); } + void tcOggStreamer::Update() + { + if (queuedSong.size() == 0) return; + openalpp::SourceState sourceState = source->getState(); + + if (sourceState == openalpp::Playing) + { + initializingStream = false; + } + + if (initializingStream) return; + + if ((sourceState == openalpp::Stopped) || + (sourceState == openalpp::Initial)) + { + stream = new openalpp::FileStream(queuedSong); + source->setSound(stream.get()); // crashes this way + //source->setSound(new openalpp::FileStream(queuedSong)); // big memory leaks this way + source->play(); + queuedSong = ""; + initializingStream = true; + } + } tcOggStreamer::tcOggStreamer() : volume(0.2f), queuedSong(""), ! paused(false), ! initializingStream(false) { + source = new openalpp::Source; + source->setAmbient(); + source->setGain(volume); } *************** *** 173,176 **** --- 182,187 ---- source->stop(); } + //wxUSleep(500); + // wxMilliSleep(500); // 2.5 and above } |
|
From: Dewitt C. <ddc...@us...> - 2005-03-15 00:36:35
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2912/include/common Modified Files: tcOggStreamer.h Log Message: Index: tcOggStreamer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcOggStreamer.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcOggStreamer.h 24 Feb 2005 22:19:13 -0000 1.8 --- tcOggStreamer.h 15 Mar 2005 00:36:23 -0000 1.9 *************** *** 48,61 **** bool IsPaused(); bool IsPlaying(); ! bool IsSongQueued() {return queuedSong.size() > 1;} bool IsStopped(); float GetVolume() const {return volume;} ! void Open(std::string path); ! bool Play(); ! void Queue(std::string path); void Seek(double seekTime); void SetPause(bool state) {paused = state;} void SetVolume(float vol); void Stop(); tcOggStreamer(); --- 48,62 ---- bool IsPaused(); bool IsPlaying(); ! bool IsSongQueued() {return queuedSong.size() > 0;} bool IsStopped(); float GetVolume() const {return volume;} ! void Open(const std::string& path); ! void Play(); ! void Queue(const std::string& path); void Seek(double seekTime); void SetPause(bool state) {paused = state;} void SetVolume(float vol); void Stop(); + void Update(); tcOggStreamer(); *************** *** 69,72 **** --- 70,74 ---- std::string queuedSong; ///< complete file path of song to queue bool paused; + bool initializingStream; ///< true when stream is initializing, cleared once playing }; |
Update of /cvsroot/gcblue/gcb_wx/3d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27671/3d Added Files: 5-inch.xml 65-76.xml aim-9.xml am-39.xml buoy.xml charlie-i.xml e2c.xml harrier-gr3.xml hermes.xml mig-29.xml mirage-50.xml mirage-f1.xml mk-46.xml mk-82.xml mk-84.xml mm-38.xml oscar-ii.xml pg-84.xml rah-66.xml rapier-sam.xml rapier-towed.xml roland-sam.xml roland2-site.xml s-2g.xml s-70.xml set-65.xml ss-n-16.xml stanley-field.xml tu-142.xml tu-95.xml type-42.xml type-45.xml Log Message: --- NEW FILE: tu-95.xml --- <Model File="tu-95.ive"/> <Info Author="Guido Militello" Notes=""/> <Animation Object="Prop1_2" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="9"/> <Animation Object="Prop3_4" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="9"/> <Animation Object="Prop5_6" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-9"/> <Animation Object="Prop7_8" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-9"/> --- NEW FILE: type-45.xml --- <Model File="type-45.ive"/> <Info Author="Marcelo Caceres" Notes=""/> <Animation Object="nav_radar1" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="nav_radar2" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="nav_radar3" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="prop_l" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> <Animation Object="prop_r" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> --- NEW FILE: mk-46.xml --- <Model File="mk-46.ive"/> <Info Author="Guido Militello" Notes=""/> <Animation Object="prop" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="6"/> <Animation Object="prop1" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="6"/> <Smoke X="0.0" Y="-3.6" Z="0.0"/> --- NEW FILE: roland2-site.xml --- <Model File="roland2-site.ive"/> <Info Author="Marcelo Caceres" Notes="Roland2 SAM site model (rotate the roland group for animation?)"/> <Animation Object="roland" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> --- NEW FILE: s-2g.xml --- <Model File="s-2g.ive"/> <Info Author="Guido Militello" Notes="S-2G Tracker (1970s)"/> <Animation Object="helice_izq" Type="Propeller" AxisX="0" AxisY="0" AxisZ="1" AngleRate="9"/> <Animation Object="helice_der" Type="Propeller" AxisX="0" AxisY="0" AxisZ="1" AngleRate="-9"/> --- NEW FILE: hermes.xml --- <Model File="hermes.ive"/> <Info Author="Marcelo Caceres" Notes="Missing hermesa.bmp texture"/> <Animation Object="nav_radar1" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="nav_radar2" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="nav_radar3" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="prop_l" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> <Animation Object="prop_r" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> --- NEW FILE: ss-n-16.xml --- <Model File="ss-n-16.ive"/> <Info Author="TLAM-Strike" Notes=""/> <Smoke X="0.0" Y="-4.0" Z="0.0"/> --- NEW FILE: rapier-towed.xml --- <Model File="rapier-towed.ive"/> <Info Author="Marcelo Caceres" Notes="Rapier SAM towed unit, BAe"/> <Animation Object="rapier" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> --- NEW FILE: buoy.xml --- <Model File="buoy.ive"/> <Info Author="Dewitt Colclough" Notes="Stand in"/> --- NEW FILE: e2c.xml --- <Model File="e2c.ive"/> <Info Author="Guido Militello" Notes="Adapted from Rick Sasala's model at www.surclaro.com"/> <Animation Object="helice_der" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="9"/> <Animation Object="helice_izq" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-9"/> <Animation Object="radar" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> --- NEW FILE: 65-76.xml --- <Model File="65-76.ive"/> <Info Author="TLAM-Strike" Notes="Needs separate propeller object for animation"/> <Smoke X="0.0" Y="-5.2" Z="0.0"/> --- NEW FILE: am-39.xml --- <Model File="am-39.ive"/> <Info Author="Marcelo Caceres" Notes="Air-launched Exocet"/> <Smoke X="0.0" Y="-2.5" Z="0.0"/> --- NEW FILE: mirage-f1.xml --- <Model File="mirage-f1.ive"/> <Info Author="Marcelo Caceres" Notes="Mirage F1"/> <Smoke X="0.0" Y="-6.5" Z="0.0"/> <Launcher X="0.0" Y="-0.5" Z="-1.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> --- NEW FILE: type-42.xml --- <Model File="type-42b1ar1.ive"/> <Info Author="Marcelo Caceres" Notes="Type 42 Batch 1 model"/> <Animation Object="nav_radar1" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="nav_radar2" Type="Sensor" SensorIndex="1" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="996_radar" Type="Sensor" SensorIndex="2" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="prop_l" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> <Animation Object="prop_r" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> <Launcher X="0.0" Y="38.2" Z="8.8" Az="0" Comment="Seadart"/> <Launcher X="0.0" Y="48.9" Z="8.3" Az="0" Comment="Mk8 gun"/> <Launcher X="-7.5" Y="-9.7" Z="8.4" Az="0" Comment="Port torp"/> <Launcher X="7.5" Y="-9.7" Z="8.4" Az="0" Comment="Stbd torp"/> --- NEW FILE: mig-29.xml --- <Model File="mig-29.ive"/> <Info Author="Guido Militello" Notes=""/> <Smoke X="0.85" Y="-6.8" Z="0.0"/> <Smoke X="-0.85" Y="-6.8" Z="0.0"/> --- NEW FILE: set-65.xml --- <Model File="set-65.ive"/> <Info Author="TLAM-Strike" Notes="Needs separate propeller object for animation"/> <Smoke X="0.0" Y="-3.6" Z="0.0"/> --- NEW FILE: mm-38.xml --- <Model File="mm-38.ive"/> <Info Author="Marcelo Caceres" Notes="Surface-launched Exocet"/> <Smoke X="0.0" Y="-2.9" Z="0.0"/> --- NEW FILE: tu-142.xml --- <Model File="tu-142.ive"/> <Info Author="Guido Militello" Notes=""/> <Animation Object="Prop1_2" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="9"/> <Animation Object="Prop3_4" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="9"/> <Animation Object="Prop5_6" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-9"/> <Animation Object="Prop7_8" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-9"/> --- NEW FILE: mk-82.xml --- <Model File="mk-82.ive"/> <Info Author="Marcelo Caceres" Notes="Mk-82 gravity bomb"/> --- NEW FILE: s-70.xml --- <Model File="s-70.ive"/> <Info Author="Guido Militello" Notes=""/> <Animation Object="rotor" Type="Rotor" AxisX="0.0" AxisY="0" AxisZ="1" AngleRate="9.0"/> <Animation Object="rotorb" Type="Rotor" AxisX="0.0" AxisY="1.0" AxisZ="0" AngleRate="9.0"/> --- NEW FILE: aim-9.xml --- <Model File="aim-9b.ive"/> <Info Author="Marcelo Caceres" Notes="AIM-9* model"/> <Smoke X="0.0" Y="-1.6" Z="0.0"/> --- NEW FILE: oscar-ii.xml --- <Model File="oscar-ii.ive"/> <Info Author="Jason Simpson" Notes=""/> <Animation Object="Prop01" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="0.3"/> <Animation Object="Prop02" Type="Propeller" AxisX="0" AxisY="1" AxisZ="0" AngleRate="-0.3"/> <Smoke X="-5.0" Y="-77.0" Z="-3.2"/> <Smoke X="5.0" Y="-77.0" Z="-3.2"/> <Launcher X="0" Y="-2.3" Z="0" Az="0"/> <Launcher X="3.4" Y="62.0" Z="-2.8" Az="0"/> <Launcher X="1.2" Y="62.0" Z="-2.8" Az="0"/> <Launcher X="-1.2" Y="62.0" Z="-2.8" Az="0"/> <Launcher X="-3.4" Y="62.0" Z="-2.8" Az="0"/> <Launcher X="3.4" Y="62.0" Z="-1.3" Az="0"/> <Launcher X="-3.4" Y="62.0" Z="-1.3" Az="0"/> --- NEW FILE: charlie-i.xml --- <Model File="charlie-i.ive"/> <Info Author="TLAM-Strike" Notes=""/> <Smoke X="0.0" Y="-58.0" Z="0.0"/> --- NEW FILE: 5-inch.xml --- <Model File="5-inch.ive"/> <Info Author="Marcelo Caceres" Notes="Gun round"/> --- NEW FILE: pg-84.xml --- <Model File="pg-84.ive"/> <Info Author="Marcelo Caceres" Notes="Test of xml model wrapper"/> <Animation Object="nav_radar" Type="Sensor" SensorIndex="0" AxisX="0" AxisY="0" AxisZ="1" AngleRate="0.2"/> <Animation Object="prop_l" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> <Animation Object="prop_r" Type="Propeller" AxisX="0.0" AxisY="1" AxisZ="0" AngleRate="1.0"/> --- NEW FILE: stanley-field.xml --- <Model File="stanley-field.ive"/> <Info Author="Marcelo Caceres" Notes="Stanley airfield model"/> --- NEW FILE: harrier-gr3.xml --- <Model File="harrier-gr3.ive"/> <Info Author="Marcelo Caceres" Notes="Harrier GR3 (UK colors)"/> <Smoke X="0.0" Y="-6.5" Z="0.0"/> <Launcher X="0.0" Y="-0.5" Z="-1.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="-1.9" Y="-1.5" Z="-0.2" Az="0"/> <Launcher X="1.9" Y="-1.5" Z="-0.2" Az="0"/> --- NEW FILE: rah-66.xml --- <Model File="rah-66.ive"/> <Info Author="Marcelo Caceres" Notes="RAH-66 Comanche Helicopter, missing PILOTBOD.bmp texture"/> <Animation Object="rotor" Type="Rotor" AxisX="0.0" AxisY="0" AxisZ="1" AngleRate="9.0"/> --- NEW FILE: mk-84.xml --- <Model File="mk-84.ive"/> <Info Author="Marcelo Caceres" Notes="Mk-84 gravity bomb"/> --- NEW FILE: roland-sam.xml --- <Model File="roland-sam.ive"/> <Info Author="Marcelo Caceres" Notes="Roland SAM model"/> <Smoke X="0.0" Y="-1.4" Z="0.0"/> --- NEW FILE: mirage-50.xml --- <Model File="mirage-50.ive"/> <Info Author="Marcelo Caceres" Notes="Mirage 50 Columbian Colors (lots others available)"/> <Smoke X="0.0" Y="-6.4" Z="0.0"/> --- NEW FILE: rapier-sam.xml --- <Model File="rapier-sam.ive"/> <Info Author="Marcelo Caceres" Notes="Rapier SAM missile model"/> <Smoke X="0.0" Y="-0.9" Z="0.0"/> |
|
From: Dewitt C. <ddc...@us...> - 2005-03-11 02:47:15
|
Update of /cvsroot/gcblue/gcb_wx/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27284/database Modified Files: database.db Log Message: Index: database.db =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/database/database.db,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsn4tD1l and /tmp/cvsm0fCpe differ |
|
From: Dewitt C. <ddc...@us...> - 2005-03-11 02:47:15
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27284/include/sim Modified Files: tcAeroAirObject.h Log Message: Index: tcAeroAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAeroAirObject.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcAeroAirObject.h 10 Mar 2005 03:28:27 -0000 1.8 --- tcAeroAirObject.h 11 Mar 2005 02:46:46 -0000 1.9 *************** *** 44,48 **** virtual void ApplyRestrictions(); virtual void Clear(void); - virtual bool IsDestroyed(); virtual void RandInitNear(float afLon_deg, float afLat_deg); --- 44,47 ---- |
|
From: Dewitt C. <ddc...@us...> - 2005-03-11 02:47:15
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27284/src/sim Modified Files: tcAeroAirObject.cpp tcSensorMap.cpp Log Message: Index: tcSensorMap.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcSensorMap.cpp 5 Mar 2005 22:38:03 -0000 1.16 --- tcSensorMap.cpp 11 Mar 2005 02:46:47 -0000 1.17 *************** *** 856,859 **** --- 856,860 ---- maTrack.GetNextAssoc(cmappos,nKey,psmtrack); bool bAgedReport = false; + bool freshReport = false; // true if at least one report isn't stale for(int n=0;(n<psmtrack->mnContributors)&&(!bAgedReport);n++) { *************** *** 866,870 **** else if (timeSinceUpdate >= staleTime) { ! psmtrack->MarkStale(); if (psmtrack->IsDestroyed() && (timeSinceUpdate >= staleTime + 3.0)) { --- 867,871 ---- else if (timeSinceUpdate >= staleTime) { ! if (!freshReport) psmtrack->MarkStale(); if (psmtrack->IsDestroyed() && (timeSinceUpdate >= staleTime + 3.0)) { *************** *** 876,879 **** --- 877,881 ---- { psmtrack->ClearStale(); + freshReport = true; } } Index: tcAeroAirObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAeroAirObject.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcAeroAirObject.cpp 10 Mar 2005 03:28:29 -0000 1.10 --- tcAeroAirObject.cpp 11 Mar 2005 02:46:47 -0000 1.11 *************** *** 45,52 **** } - bool tcAeroAirObject::IsDestroyed() - { - return mfDamageLevel >= 1.0f; - } void tcAeroAirObject::RandInitNear(float afLon_deg, float afLat_deg) --- 45,48 ---- *************** *** 110,113 **** --- 106,113 ---- } + + + + void tcAeroAirObject::UpdateEffects() { *************** *** 148,151 **** --- 148,158 ---- UpdateEffects(); + if (mfDamageLevel >= 1.0f) + { + UpdateDestroyed(afStatusTime); + mfStatusTime = afStatusTime; + return; + } + UpdateFormationGuidance(); // formation heading/speed calculation |
|
From: Dewitt C. <ddc...@us...> - 2005-03-11 02:35:08
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24340/src/sim Modified Files: tcMapData.cpp tcObjectControl.cpp Log Message: Index: tcMapData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapData.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcMapData.cpp 24 Feb 2005 22:19:16 -0000 1.17 --- tcMapData.cpp 11 Mar 2005 02:34:58 -0000 1.18 *************** *** 1178,1185 **** for(n=0;n<N;n++) { ! pval = (anMapID==0) ? maGlobal[m][n] : maTheater[m][n]; nPaletteIndex = (pval/10) + 100; ! if (nPaletteIndex > 1023) {nPaletteIndex = 1023;} ! if (nPaletteIndex < 0) {nPaletteIndex = 0;} if (pval == MISSING_DATA_VAL) --- 1178,1191 ---- for(n=0;n<N;n++) { ! pval = (anMapID==0) ? maGlobal[m][n] : maTheater[m][n]; // TODO: move out of loop somehow nPaletteIndex = (pval/10) + 100; ! if (nPaletteIndex > 147) // TODO bug here that needs fixing, higher values distort on texture ! { ! nPaletteIndex = 147; ! } ! else if (nPaletteIndex < 0) ! { ! nPaletteIndex = 0; ! } if (pval == MISSING_DATA_VAL) *************** *** 1190,1195 **** { pval = maPalette1[nPaletteIndex]; ! apData[(M-1-m)*N + n] = pval + nAlphaOffset; } //apWindow->SetPixel(n,M-1-m,pval + nAlphaOffset); } --- 1196,1202 ---- { pval = maPalette1[nPaletteIndex]; ! apData[(M-1-m)*N + n] = (0x00FFFFFF & pval) + nAlphaOffset; } + //apWindow->SetPixel(n,M-1-m,pval + nAlphaOffset); } Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** tcObjectControl.cpp 2 Mar 2005 22:28:45 -0000 1.32 --- tcObjectControl.cpp 11 Mar 2005 02:34:58 -0000 1.33 *************** *** 165,169 **** mastrCaption[i][4] = "L-AUT"; } ! mstrTitle = "WEAPON STATUS"; break; case 1: // sensor --- 165,169 ---- mastrCaption[i][4] = "L-AUT"; } ! mstrTitle = "MOUNT STATUS"; break; case 1: // sensor |