/dports/games/astromenace/astromenace-1.4.1/src/game/ |
H A D | weapon_panel.cpp | 78 return (BarHeight * (sharedWeapon->AmmoStart - sharedWeapon->Ammo)) / sharedWeapon->AmmoStart; in WeaponAmmoProgress() 95 …static_cast<int>((BarHeight * (TimeLastUpdate - sharedWeapon->LastFireTime)) / sharedWeapon->NextF… in WeaponReloadProgress() 97 if ((sharedWeapon->InternalType == 17) && // swarm in WeaponReloadProgress() 195 if (sharedWeapon->CurrentEnergyAccumulated < sharedWeapon->EnergyUse) in DrawFlatWeaponPanel() 197 else if (sharedWeapon->Ammo == 0) in DrawFlatWeaponPanel() 249 if (sharedWeapon->CurrentEnergyAccumulated < sharedWeapon->EnergyUse) in DrawFullWeaponPanel() 251 else if (sharedWeapon->Ammo == 0) in DrawFullWeaponPanel() 287 sharedWeapon, sharedSpaceShip->TimeLastUpdate); in DrawLeftWeaponPanel() 296 sharedWeapon, sharedSpaceShip->TimeLastUpdate); in DrawLeftWeaponPanel() 303 sharedWeapon, sharedSpaceShip->TimeLastUpdate); in DrawLeftWeaponPanel() [all …]
|
H A D | game_player_ship.cpp | 263 sharedWeapon->Ammo = GameConfig().Profile[CurrentProfile].WeaponAmmo[i]; in InitGamePlayerShip() 540 if (auto sharedWeapon = tmpWeaponSlot.Weapon.lock()) { in GamePlayerShip() local 542 (sharedWeapon->Ammo <= 0) && in GamePlayerShip() 794 PrimTime += sharedWeapon->NextFireTime; in GamePlayerShip() 802 SecTime += sharedWeapon->NextFireTime; in GamePlayerShip() 1030 if (sharedWeapon->CurrentEnergyAccumulated < sharedWeapon->EnergyUse) { in GamePlayerShip() 1032 if (CurrentPlayerShipEnergy < sharedWeapon->EnergyUse) { in GamePlayerShip() 1034 sharedWeapon->LastFireTime += sharedPlayerFighter->TimeDelta; in GamePlayerShip() 1035 if (auto sharedFire = sharedWeapon->Fire.lock()) in GamePlayerShip() 1039 sharedWeapon->CurrentEnergyAccumulated = sharedWeapon->EnergyUse; in GamePlayerShip() [all …]
|
H A D | game.cpp | 379 if (auto sharedWeapon = sharedPlayerFighter->WeaponSlots[i].Weapon.lock()) { in ExitGameWithSave() local 381 if (sharedWeapon->ArmorCurrentStatus <= 0.0f) { in ExitGameWithSave() 386 ChangeGameConfig().Profile[CurrentProfile].WeaponAmmo[i] = sharedWeapon->Ammo; in ExitGameWithSave()
|
/dports/games/astromenace/astromenace-1.4.1/src/object3d/space_ship/ |
H A D | space_ship.cpp | 544 sharedWeapon->WeaponFire(Time); in Update() 917 sharedWeapon->WeaponFire(Time); in Update() 946 sharedWeapon->WeaponFire(Time); in Update() 971 sharedWeapon->WeaponFire(Time); in Update() 1000 sharedWeapon->WeaponFire(Time); in Update() 1111 sharedWeapon->SetRotation(sVECTOR3D{-sharedWeapon->Rotation.x - tmpNeedAngle.x, in Update() 1132 sharedWeapon->SetRotation(sVECTOR3D{-sharedWeapon->Rotation.x - tmpNeedAngle.x, in Update() 1211 sharedWeapon->SetRotation(sharedWeapon->Rotation ^ (-1)); in Update() 1260 … Location + WeaponSlots[i].Location + sharedWeapon->FireLocation, sharedWeapon->Rotation, in Update() 1267 sVECTOR3D{sharedWeapon->Rotation.x, WeaponSlots[i].YAngle, sharedWeapon->Rotation.z}, in Update() [all …]
|
H A D | alien_space_mothership.cpp | 570 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 573 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 576 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 579 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 582 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 585 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 588 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 591 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 898 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() 902 sharedWeapon->NextFireTime /= 2.0f; in cAlienSpaceMotherShip() [all …]
|
H A D | pirate_ship.cpp | 244 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cPirateShip() local 245 sharedWeapon->SFX = eGameSFX::none; in cPirateShip() 435 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cPirateShip() local 436 sharedWeapon->SetRotation(sVECTOR3D{0.0, 180.0, 0.0}); in cPirateShip() 475 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cPirateShip() local 476 sharedWeapon->SetRotation(sVECTOR3D{0.0f, 180.0f, 0.0f}); in cPirateShip() 479 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cPirateShip() local 480 sharedWeapon->SetRotation(sVECTOR3D{0.0f, 180.0f, 0.0f}); in cPirateShip()
|
H A D | alien_space_fighter.cpp | 345 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cAlienSpaceFighter() local 346 sharedWeapon->SFX = eGameSFX::none; in cAlienSpaceFighter() 348 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cAlienSpaceFighter() local 349 sharedWeapon->SFX = eGameSFX::none; in cAlienSpaceFighter() 351 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cAlienSpaceFighter() local 352 sharedWeapon->SFX = eGameSFX::none; in cAlienSpaceFighter() 502 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cAlienSpaceFighter() local 503 sharedWeapon->NextFireTime /= 4.0f; in cAlienSpaceFighter() 546 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cAlienSpaceFighter() local 547 sharedWeapon->NextFireTime /= 3.0f; in cAlienSpaceFighter()
|
H A D | earth_space_fighter.cpp | 160 auto sharedWeapon = sharedSpaceShip->WeaponSlots[WeaponSlot - 1].Weapon.lock(); in SetEarthSpaceFighterWeapon() local 161 if (!sharedWeapon) in SetEarthSpaceFighterWeapon() 164 if (sharedSpaceShip->WeaponSlots[WeaponSlot - 1].Type < sharedWeapon->WeaponLevel) { in SetEarthSpaceFighterWeapon() 169 sharedWeapon->SetLocation(sharedSpaceShip->WeaponSlots[WeaponSlot - 1].Location); in SetEarthSpaceFighterWeapon() 170 sharedWeapon->ObjectStatus = sharedSpaceShip->ObjectStatus; in SetEarthSpaceFighterWeapon()
|
/dports/games/astromenace/astromenace-1.4.1/src/menu/ |
H A D | menu_workshop_weaponry.cpp | 345 …int AmmoShow = (int)((56.0f*(sharedWeapon->AmmoStart-sharedWeapon->Ammo))/sharedWeapon->AmmoStart); in ShipSlotWeapon() 357 if (sharedWeapon->Ammo == 0) in ShipSlotWeapon() 408 sharedWeapon->Ammo, in ShipSlotWeapon() 506 sharedWeapon->Ammo, in ShipSlotWeapon() 625 << sharedWeapon->Ammo << "/" << sharedWeapon->AmmoStart; in ShipSlotSetupWeapon() 632 if (sharedWeapon->Ammo < sharedWeapon->AmmoStart) { in ShipSlotSetupWeapon() 645 sharedWeapon->Ammo, in ShipSlotSetupWeapon() 663 sharedWeapon->Ammo = sharedWeapon->AmmoStart; in ShipSlotSetupWeapon() 769 sharedWeapon->SetRotation(sharedWeapon->Rotation^(-1)); in ShipSlotSetupWeapon() 778 sharedWeapon->SetRotation(sharedWeapon->Rotation^(-1)); in ShipSlotSetupWeapon() [all …]
|
H A D | menu_workshop.cpp | 121 sharedWeapon->SetRotation(NeedAngle); in WorkshopCreateShip() 191 auto sharedWeapon = WorkshopNewWeapon.lock(); in WorkshopCreateNewWeapon() local 192 if (!sharedWeapon) in WorkshopCreateNewWeapon() 199 -(sharedWeapon->Height / 2.0f + sharedWeapon->AABB[6].y), in WorkshopCreateNewWeapon() 200 -(sharedWeapon->Length / 2.0f + sharedWeapon->AABB[6].z) - 0.5f}; in WorkshopCreateNewWeapon() 505 sharedWeapon->Draw(true); in WorkshopDrawShip() 518 sharedWeapon->Draw(false, ShadowMap); in WorkshopDrawShip() 563 sharedWeapon->Draw(true); in WorkshopDrawShip() 576 sharedWeapon->Draw(false, ShadowMap); in WorkshopDrawShip() 642 sharedWeapon->Draw(true); in WorkshopDrawShip() [all …]
|
H A D | menu_workshop_shipyard.cpp | 261 if (auto sharedWeapon = tmpWeaponSlot.Weapon.lock()) in GetWorkshopShipFullCost() local 262 ShipCost += GetWeaponCost(sharedWeapon->InternalType, in GetWorkshopShipFullCost() 263 sharedWeapon->Ammo, in GetWorkshopShipFullCost() 264 sharedWeapon->AmmoStart); in GetWorkshopShipFullCost() 329 if (auto sharedWeapon = tmpWeaponSlot.Weapon.lock()) { in WorkshopCreateBuyShip() local 330 ChangeGameConfig().Profile[CurrentProfile].Money += GetWeaponCost(sharedWeapon->InternalType, in WorkshopCreateBuyShip() 331 sharedWeapon->Ammo, in WorkshopCreateBuyShip() 332 sharedWeapon->AmmoStart); in WorkshopCreateBuyShip() 406 if (auto sharedWeapon = sharedWorkshopFighterGame->WeaponSlots[i].Weapon.lock()) { in WorkshopCreateBuyShip() local 407 if (auto sharedFire = sharedWeapon->Fire.lock()) in WorkshopCreateBuyShip() [all …]
|
H A D | menu_information.cpp | 329 -sharedWeapon->AABB[6].y, in CreateInfoObject() 330 -(sharedWeapon->Length/2.0f + sharedWeapon->AABB[6].z)}; in CreateInfoObject() 337 …(sharedWeapon->Length + sharedWeapon->Width + sharedWeapon->Height) * 0.3f + sharedWeapon->Height … in CreateInfoObject() 338 …-(sharedWeapon->Length + sharedWeapon->Width + sharedWeapon->Height) * 0.7f - sharedWeapon->Height… in CreateInfoObject() 339 InfoObjectWidth = sharedWeapon->Width; in CreateInfoObject() 340 InfoObjectLength = sharedWeapon->Length; in CreateInfoObject() 341 InfoObjectHeight = sharedWeapon->Height; in CreateInfoObject() 1734 sharedWeapon->SetLocation(TMPLocation); in InformationDrawObject() 1764 sharedWeapon->Draw(true); in InformationDrawObject() 1769 sharedWeapon->Draw(true); in InformationDrawObject() [all …]
|
/dports/games/astromenace/astromenace-1.4.1/src/object3d/ground_object/ |
H A D | military_building.cpp | 103 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cMilitaryBuilding() local 104 sharedWeapon->NextFireTime /= 3.0f; in cMilitaryBuilding() 125 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cMilitaryBuilding() local 126 sharedWeapon->NextFireTime /= 2.0f; in cMilitaryBuilding() 128 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cMilitaryBuilding() local 129 sharedWeapon->NextFireTime /= 2.0f; in cMilitaryBuilding() 144 sharedWeapon->NextFireTime /= 2.0f; in cMilitaryBuilding() 147 sharedWeapon->NextFireTime /= 2.0f; in cMilitaryBuilding() 171 sharedWeapon->NextFireTime /= 3.0f; in cMilitaryBuilding() 174 sharedWeapon->NextFireTime /= 3.0f; in cMilitaryBuilding() [all …]
|
H A D | ground_object.cpp | 210 if (auto sharedWeapon = tmpWeaponSlot.Weapon.lock()) in SetLocation() local 251 sharedWeapon->SetRotation(sharedWeapon->Rotation ^ (-1.0f)); in SetRotation() 252 sharedWeapon->SetRotation(RotationWeapon); in SetRotation() 293 WeapNum = sharedWeapon->InternalType; in Update() 425 sharedWeapon->SetRotation(sharedWeapon->Rotation ^ (-1.0f)); in Update() 426 sharedWeapon->SetRotation(RotationWeapon); in Update() 438 sharedWeapon->WeaponFire(Time); in Update() 451 PrimTime += sharedWeapon->NextFireTime; in Update() 468 sharedWeapon->WeaponFire(Time); in Update() 500 PrimTime += sharedWeapon->NextFireTime; in Update() [all …]
|
H A D | tracked.cpp | 336 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cTracked() local 337 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 369 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cTracked() local 370 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 433 if (auto sharedWeapon = WeaponSlots.back().Weapon.lock()) in cTracked() local 434 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 437 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 440 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 443 sharedWeapon->NextFireTime /= 2.0f; in cTracked() 476 sharedWeapon->NextFireTime /= 2.0f; in cTracked() [all …]
|
/dports/games/astromenace/astromenace-1.4.1/src/object3d/ |
H A D | object3d_collision.cpp | 580 if (auto sharedWeapon = tmpWeaponSlot.Weapon.lock()) { in DetectCollisionAllObject3D() local 583 if ((sharedWeapon->ArmorCurrentStatus > 0.0f) && in DetectCollisionAllObject3D() 584 …DetectProjectileCollision(*sharedWeapon, ObjectPieceNumWeapon, tmpProjectile, Damage, tmpShip.Spee… in DetectCollisionAllObject3D() 588 sharedWeapon->ArmorCurrentStatus -= Damage.Kinetic(); in DetectCollisionAllObject3D() 589 if (sharedWeapon->ArmorCurrentStatus <= 0.0f) { in DetectCollisionAllObject3D() 590 sharedWeapon->ArmorCurrentStatus = 0.0f; in DetectCollisionAllObject3D()
|