/dports/emulators/frodo/Frodo-4.1b/Src/ |
H A D | FixPoint.i | 176 FixPoint operator=(FixPoint y); 178 FixPoint operator+(FixPoint y); 180 FixPoint operator-(FixPoint y); 182 FixPoint operator/(FixPoint y); 184 FixPoint operator*(FixPoint y); 186 FixPoint operator+=(FixPoint y); 188 FixPoint operator-=(FixPoint y); 190 FixPoint operator*=(FixPoint y); 192 FixPoint operator/=(FixPoint y); 224 FixPoint::FixPoint(void) {x = 0;} in FixPoint() function [all …]
|
/dports/games/dunelegacy/dunelegacy-0.96.4/src/ |
H A D | mmath.cpp | 55 FixPoint diffX = p2.x - p1.x; in destinationAngleRad() 56 FixPoint diffY = -(p2.y - p1.y); // flip y in destinationAngleRad() 62 FixPoint destAngle = FixPoint::atan2(diffY, diffX); in destinationAngleRad() 72 FixPoint distanceFrom(const Coord& p1, const Coord& p2) in distanceFrom() 74 FixPoint first = (p1.x - p2.x); in distanceFrom() 75 FixPoint second = (p1.y - p2.y); in distanceFrom() 77 FixPoint z = FixPoint::sqrt(first*first + second*second); in distanceFrom() 82 FixPoint distanceFrom(FixPoint x, FixPoint y, FixPoint to_x, FixPoint to_y) in distanceFrom() 84 FixPoint first = (x - to_x); in distanceFrom() 85 FixPoint second = (y - to_y); in distanceFrom() [all …]
|
H A D | Bullet.cpp | 67 FixPoint square_root = FixPoint::sqrt(diffX*diffX + diffY*diffY); in Bullet() 68 FixPoint ratio = (weaponrange*TILESIZE)/square_root; in Bullet() 78 destination.x += lround(FixPoint::cos(randAngle) * radius); in Bullet() 79 destination.y -= lround(FixPoint::sin(randAngle) * radius); in Bullet() 94 xSpeed = speed * FixPoint::cos(angleRad); in Bullet() 95 ySpeed = speed * -FixPoint::sin(angleRad); in Bullet() 329 FixPoint angleDiff = angleToDestination - angle; in update() 336 static const FixPoint turnSpeed = FixPt(4,5); in update() 352 xSpeed = speed * FixPoint::cos(Deg256ToRad(angle)); in update() 353 ySpeed = speed * -FixPoint::sin(Deg256ToRad(angle)); in update() [all …]
|
H A D | AStarSearch.cpp | 31 …FixPoint rotationSpeed = FixPt(1,0)/(currentGame->objectData.data[pUnit->getItemID()][pUnit->getOr… in AStarSearch() 41 FixPoint heuristic = blockDistance(start, destination); in AStarSearch() 42 FixPoint smallestHeuristic = FixPt_MAX; in AStarSearch() 74 FixPoint g = getMapData(currentCoord).g; in AStarSearch() 78 …g += FixPt_SQRT2*(pUnit->isAFlyingUnit() ? FixPoint(1) : pUnit->getTerrainDifficulty((TERRAINTYPE)… in AStarSearch() 80 …g += (pUnit->isAFlyingUnit() ? FixPoint(1) : pUnit->getTerrainDifficulty((TERRAINTYPE) nextTile.ge… in AStarSearch() 89 FixPoint h = blockDistance(nextCoord, destination); in AStarSearch()
|
H A D | ObjectBase.cpp | 221 FixPoint newHealth = getHealth(); in handleDamage() 264 void ObjectBase::setHealth(FixPoint newHealth) { in setHealth() 356 FixPoint healthPercent = health/getMaxHealth(); in getHealthColor() 373 FixPoint closestDistance = FixPt_MAX; in findClosestTargetStructure() 395 FixPoint closestDistance = FixPt_MAX; in findClosestTargetUnit() 399 FixPoint unitDistance = blockDistance(getLocation(), closestPoint); in findClosestTargetUnit() 413 FixPoint closestDistance = FixPt_MAX; in findClosestTarget() 433 FixPoint unitDistance = blockDistance(getLocation(), closestPoint); in findClosestTarget() 486 FixPoint closestTargetDistance = FixPt_MAX; in findTarget() 496 FixPoint targetDistance = blockDistance(location, coord); in findTarget() [all …]
|
/dports/games/dunelegacy/dunelegacy-0.96.4/include/ |
H A D | mmath.h | 32 FixPoint destinationAngleRad(const Coord& p1, const Coord& p2); 34 inline FixPoint RadToDeg256(FixPoint angleRad) { return (angleRad << 7)/FixPt_PI; } // angleRad*256… in RadToDeg256() 36 inline FixPoint Deg256ToRad(FixPoint angle) { return (angle*FixPt_PI) >> 7; } // angle*2*FixPt_PI… in Deg256ToRad() 50 inline int angleToDrawnAngle(FixPoint angle) { return lround(angle >> 5) & 0x7; } // lround(angl… in angleToDrawnAngle() 56 FixPoint distanceFrom(const Coord& p1, const Coord& p2); 57 FixPoint distanceFrom(FixPoint x, FixPoint y, FixPoint to_x, FixPoint to_y); 75 inline FixPoint blockDistance(const Coord& p1, const Coord& p2) { in blockDistance()
|
H A D | Bullet.h | 49 inline FixPoint getRealX() const { return realX; } in getRealX() 50 inline FixPoint getRealY() const { return realY; } in getRealY() 56 FixPoint speed; ///< The speed of this bullet 70 …FixPoint realX; ///< the x-coordinate of the current position (in world coord… 71 …FixPoint realY; ///< the y-coordinate of the current position (in world coord… 73 FixPoint xSpeed; ///< Speed in x direction 74 FixPoint ySpeed; ///< Speed in x direction 76 FixPoint angle; ///< the angle of the bullet
|
H A D | AStarSearch.h | 61 FixPoint g; 62 FixPoint h; 63 FixPoint f; 73 FixPoint newf = getMapData(bottom).f; in trickleUp() 92 … void putOnOpenListIfBetter(const Coord& coord, const Coord& parentCoord, FixPoint g, FixPoint h) { in putOnOpenListIfBetter() 93 FixPoint f = g + h; in putOnOpenListIfBetter() 132 FixPoint topf = getMapData(top).f; in extractMin() 140 FixPoint smallerChildf; in extractMin() 142 FixPoint leftf = getMapData(openList[leftChild]).f; in extractMin() 143 FixPoint rightf = getMapData(openList[rightChild]).f; in extractMin()
|
H A D | House.h | 95 inline FixPoint getHarvestedSpice() const { return harvestedSpice; } in getHarvestedSpice() 130 inline FixPoint getStartingCredits() const { return startingCredits; } in getStartingCredits() 131 inline FixPoint getStoredCredits() const { return storedCredits; } in getStoredCredits() 133 void addCredits(FixPoint newCredits, bool wasRefined = false); 134 void returnCredits(FixPoint newCredits); 135 FixPoint takeCredits(FixPoint amount); 197 FixPoint storedCredits; ///< current number of credits that are stored in refineries/silos 198 FixPoint startingCredits; ///< number of starting credits this player still has 219 FixPoint harvestedSpice;
|
H A D | ObjectBase.h | 93 virtual void setHealth(FixPoint newHealth); 155 inline FixPoint getHealth() const { return health; } in getHealth() 166 inline FixPoint getRealX() const { return realX; } in getRealX() 167 inline FixPoint getRealY() const { return realY; } in getRealY() 208 FixPoint realX; ///< The x-coordinate of this object in world coordinates 209 FixPoint realY; ///< The y-coordinate of this object in world coordinates 211 FixPoint angle; ///< The current angle of this unit/structure 235 FixPoint health; ///< The health of this object
|
H A D | ObjectData.h | 101 … FixPoint maxspeed; ///< how fast can this unit move? 102 …FixPoint turnspeed; ///< how fast can this unit turn aro… 117 …FixPoint loadFixPointValue(const INIFile& objectDataFile, const std::string& section, const std::s…
|
H A D | Tile.h | 327 FixPoint harvestSpice(); 328 void setSpice(FixPoint newSpice); 440 inline FixPoint getSpice() const { return spice; } in getSpice() 442 inline FixPoint getSpiceRemaining() { return spice; } in getSpiceRemaining() 479 FixPoint spice; ///< how much spice on this particular tile is left
|
/dports/games/dunelegacy/dunelegacy-0.96.4/src/units/ |
H A D | UnitBase.cpp | 554 FixPoint fromDistanceX; in move() 555 FixPoint fromDistanceY; in move() 556 FixPoint toDistanceX; in move() 557 FixPoint toDistanceY; in move() 615 void UnitBase::bumpyMovementOnRock(FixPoint fromDistanceX, FixPoint fromDistanceY, FixPoint toDista… in bumpyMovementOnRock() 624 const FixPoint absXSpeed = FixPoint::abs(xSpeed); in bumpyMovementOnRock() 625 const FixPoint absYSpeed = FixPoint::abs(ySpeed); in bumpyMovementOnRock() 1163 FixPoint UnitBase::getMaxSpeed() const { in getMaxSpeed() 1168 FixPoint speed = getMaxSpeed(); in setSpeeds() 1271 FixPoint angleLeft = 0; in turn() [all …]
|
H A D | InfantryBase.cpp | 205 FixPoint capturedSpice = 0; in checkPos() 373 FixPoint fromDistanceX; in move() 374 FixPoint fromDistanceY; in move() 375 FixPoint toDistanceX; in move() 376 FixPoint toDistanceY; in move() 378 const FixPoint epsilon = FixPt(3,75); in move() 381 …FixPoint abstractDistanceX = FixPoint::abs(location.x*TILESIZE + TILESIZE/2 - (realX-bumpyOffsetX)… in move() 382 …FixPoint abstractDistanceY = FixPoint::abs(location.y*TILESIZE + TILESIZE/2 - (realY-bumpyOffsetY)… in move() 409 … if( (FixPoint::abs(wantedReal.x - (realX-bumpyOffsetX)) <= FixPoint::abs(xSpeed)/2 + epsilon) in move() 410 … && (FixPoint::abs(wantedReal.y - (realY-bumpyOffsetY)) <= FixPoint::abs(ySpeed)/2 + epsilon) ) { in move() [all …]
|
H A D | TankBase.cpp | 147 FixPoint closeTargetDistance = blockDistance(location, targetLocation); in engageTarget() 178 FixPoint angleLeft = 0; in turn() 179 FixPoint angleRight = 0; in turn() 185 angleLeft = FixPoint::abs(8-angle) + nextSpotAngle; in turn() 187 angleRight = FixPoint::abs(8-nextSpotAngle) + angle; in turn() 202 angleLeft = FixPoint::abs(8-turretAngle) + targetAngle; in turn() 204 angleRight = FixPoint::abs(8-targetAngle) + turretAngle; in turn()
|
H A D | Harvester.cpp | 189 FixPoint closestLeastBookedRefineryDistance = FixPt32_MAX; in checkPos() 196 FixPoint refineryDistance = blockDistance(location, closestPoint); in checkPos() 266 FixPoint spiceSpreaded = spice * FixPt(0,75); in destroy() 367 void Harvester::setAmountOfSpice(FixPoint newSpice) in setAmountOfSpice() 477 FixPoint Harvester::extractSpice(FixPoint extractionSpeed) in extractSpice() 479 FixPoint oldSpice = spice; in extractSpice() 492 FixPoint speed = getMaxSpeed(); in setSpeeds() 498 FixPoint percentFull = spice/HARVESTERMAXSPICE; in setSpeeds()
|
H A D | Carryall.cpp | 125 const FixPoint& maxSpeed = currentGame->objectData.data[itemID][originalHouseID].maxspeed; in update() 127 …FixPoint dist = distanceFrom( location.x*TILESIZE + TILESIZE/2, location.y*TILESIZE + TILESIZE/2, in update() 157 FixPoint Carryall::getMaxSpeed() const { in getMaxSpeed() 203 FixPoint angle = 2 * FixPt_PI * currentGame->randomGen.randFixPoint(); in checkPos() 205 …Coord dropCoord = location + Coord( lround(r*FixPoint::sin(angle)), lround(-r*FixPoint::cos(angle)… in checkPos() 532 FixPoint closestConstructionYardDistance = FixPt_MAX; in findConstYard() 540 FixPoint constructionYardDistance = distanceFrom(location, closestPoint); in findConstYard()
|
/dports/games/dunelegacy/dunelegacy-0.96.4/include/units/ |
H A D | UnitBase.h | 206 virtual FixPoint getTerrainDifficulty(TERRAINTYPE terrainType) const { return 1; } in getTerrainDifficulty() 210 virtual FixPoint getMaxSpeed() const; 244 …virtual void bumpyMovementOnRock(FixPoint fromDistanceX, FixPoint fromDistanceY, FixPoint toDistan… 284 FixPoint xSpeed; ///< Speed in x direction 285 FixPoint ySpeed; ///< Speed in y direction 286 …FixPoint bumpyOffsetX; ///< The bumpy offset in x direction which is already included in… 287 …FixPoint bumpyOffsetY; ///< The bumpy offset in y direction which is already included in… 289 FixPoint targetDistance; ///< Distance to the destination
|
H A D | Harvester.h | 50 void setAmountOfSpice(FixPoint newSpice); 60 FixPoint extractSpice(FixPoint extractionSpeed); 62 inline FixPoint getAmountOfSpice() const { return spice; } in getAmountOfSpice() 73 FixPoint spice; ///< loaded spice
|
H A D | TankBase.h | 55 FixPoint turretTurnSpeed; ///< How fast can we turn the turret 58 FixPoint turretAngle; ///< The angle of the turret
|
H A D | Carryall.h | 41 virtual FixPoint getMaxSpeed() const; 90 FixPoint currentMaxSpeed; ///< The current maximum allowed speed
|
/dports/games/dunelegacy/dunelegacy-0.96.4/src/structures/ |
H A D | BuilderBase.cpp | 212 FixPoint oldProgress = productionProgress; in updateProductionProgress() 215 …FixPoint totalBuildCosts = currentGame->objectData.data[currentProducedItem][originalHouseID].pric… in updateProductionProgress() 216 FixPoint buildCosts = totalBuildCosts - productionProgress; in updateProductionProgress() 221 FixPoint buildSpeed = getHealth() / getMaxHealth(); in updateProductionProgress() 222 …FixPoint totalBuildCosts = currentGame->objectData.data[currentProducedItem][originalHouseID].pric… in updateProductionProgress() 223 …FixPoint totalBuildGameTicks = currentGame->objectData.data[currentProducedItem][originalHouseID].… in updateProductionProgress() 224 FixPoint buildCosts = totalBuildCosts / totalBuildGameTicks; in updateProductionProgress() 406 FixPoint totalUpgradePrice = getUpgradeCost(); in update() 409 FixPoint upgradePriceLeft = totalUpgradePrice - upgradeProgress; in update() 412 FixPoint totalUpgradeGameTicks = 30 * 100 / 5; in update()
|
H A D | TurretBase.cpp | 79 FixPoint angleLeft = 0; in updateStructureSpecificStuff() 80 FixPoint angleRight = 0; in updateStructureSpecificStuff() 84 angleLeft = FixPoint::abs(NUM_ANGLES-angle)+wantedAngle; in updateStructureSpecificStuff() 87 angleRight = FixPoint::abs(NUM_ANGLES-wantedAngle) + angle; in updateStructureSpecificStuff()
|
/dports/games/dunelegacy/dunelegacy-0.96.4/include/structures/ |
H A D | BuilderBase.h | 174 inline FixPoint getUpgradeProgress() const { return upgradeProgress; }; in getUpgradeProgress() 180 inline FixPoint getProductionProgress() const { return productionProgress; }; in getProductionProgress() 221 …FixPoint upgradeProgress; ///< The current state of the upgrade progress (measured in money… 226 …FixPoint productionProgress; ///< The current state of the production progress (measured in mo…
|
/dports/games/dunelegacy/dunelegacy-0.96.4/src/players/ |
H A D | QuantBot.cpp | 772 …FixPoint dlrTank = getHouse()->getNumItemDamageInflicted(Unit_Tank) / FixPoint((1 + getHouse()->ge… in build() 773 …FixPoint dlrSiege = getHouse()->getNumItemDamageInflicted(Unit_SiegeTank) / FixPoint((1 + getHouse… in build() 779 …FixPoint dlrSpecial = FixPoint(numSpecialUnitsDamageInflicted) / FixPoint(weightedNumLostSpecialUn… in build() 780 …FixPoint dlrLauncher = getHouse()->getNumItemDamageInflicted(Unit_Launcher) / FixPoint((1 + getHou… in build() 781 …FixPoint dlrOrnithopter = getHouse()->getNumItemDamageInflicted(Unit_Ornithopter) / FixPoint((1 + … in build() 813 FixPoint launcherPercent = dlrLauncher / dlrTotal; in build() 814 FixPoint specialPercent = dlrSpecial / dlrTotal; in build() 815 FixPoint siegePercent = dlrSiege / dlrTotal; in build() 816 FixPoint ornithopterPercent = dlrOrnithopter / dlrTotal; in build() 817 FixPoint tankPercent = dlrTank / dlrTotal; in build() [all …]
|