Migration scripts for converting BWAPI 3 source to BWAPI 4 source
TODO:
-
"Unit *" -> "Unit "
-
"UnitTypes::getType" -> "UnitType::getType"
-
Position, TilePosition, and the new WalkPosition now all share the same class template: Point.
-
x, y members now public; x(), y() functions removed -
Convert derived sets: Unitset, Playerset, Regionset, Bulletset, Forceset, e.g. "std::set<Unit*>" -> "BWAPI::Unitset"
-
Interface overhead has been reduced by making some member functions with alternative parameters non-virtual
-
Some function parameters re-arranged so that default parameters can be used
-
getClientInfo, setClientInfo now available to all Interface classes
-
Type::set (Example: UnitType::set)
-
Type enumerations now available for switch case usage, accessed by Types::Enum (Example: UnitTypes::Enum::Terran_Marine)
-
TechType::energyUsed renamed to energyCost. -
UnitTypes::getUnit, Races::getRace, etc. replaced with static Type::getType. (Example: Races::getRace doesn't exist, use Race::getType)
-
canBuildHere, canMake, canResearch, and canUpgrade parameters rearranged
-
getUnits_ functions now return a Unitset copy instead of a reference, and also now takes a function predicate.
-
Removed getScreenBuffer, setReplayVision(use setVision for replays too), changeRace, and startGame
-
Using Special_Start_Location in canBuildHere will ignore units that are occupying the space while still checking for resource distance.
-
Some functions now take an Enum type instead of an int.
-
groundWeaponMaxRange and airWeaponMaxRange replaced with weaponMaxRange -
getTextColor now returns a char instead of an int
-
Unit count functions now take a default parameter of AllUnits.
-
groundWeaponDamageCooldown renamed to weaponDamageCooldown -
build parameters rearranged
-
getUpgradeLevel removed -
Unit commands more strict
-
getResources changed -
isWalkable renamed to isAccessible