finished BWAPI4 conversion

This commit is contained in:
vjurenka 2015-02-09 22:40:11 +01:00
parent 14e4e5aaef
commit 1e64116ff9
79 changed files with 6806 additions and 1181 deletions

BIN
BWAPI4.exp Normal file

Binary file not shown.

View file

@ -9,6 +9,10 @@ import java.util.List;
public class BulletType {
public String toString() {
return toString_native(pointer);
}
public static BulletType Melee;
public static BulletType Fusion_Cutter_Hit;
@ -104,5 +108,7 @@ public class BulletType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -9,6 +9,10 @@ import java.util.List;
public class DamageType {
public String toString() {
return toString_native(pointer);
}
public static DamageType Independent;
public static DamageType Explosive;
@ -44,5 +48,7 @@ public class DamageType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -9,6 +9,10 @@ import java.util.List;
public class Error {
public String toString() {
return toString_native(pointer);
}
public static Error Unit_Does_Not_Exist;
public static Error Unit_Not_Visible;
@ -86,5 +90,7 @@ public class Error {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -9,6 +9,10 @@ import java.util.List;
public class ExplosionType {
public String toString() {
return toString_native(pointer);
}
public static ExplosionType None;
public static ExplosionType Normal;
@ -80,5 +84,7 @@ public class ExplosionType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -813,6 +813,10 @@ public class Game {
return countdownTimer_native(pointer);
}
public List<Region> getAllRegions() {
return getAllRegions_native(pointer);
}
public Region getRegionAt(int x, int y) {
return getRegionAt_native(pointer, x, y);
}
@ -1292,6 +1296,8 @@ public class Game {
private native int countdownTimer_native(long pointer);
private native List<Region> getAllRegions_native(long pointer);
private native Region getRegionAt_native(long pointer, int x, int y);
private native Region getRegionAt_native(long pointer, Position position);

View file

@ -9,6 +9,10 @@ import java.util.List;
public class GameType {
public String toString() {
return toString_native(pointer);
}
public static GameType Melee;
public static GameType Free_For_All;
@ -60,5 +64,7 @@ public class GameType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -60,7 +60,7 @@ public class Mirror {
static {
String arch = System.getProperty("os.arch");
String dllNames[] = {"BWAPI4.dll", "gmp-vc90-mt", "mpfr-vc90-mt"};
String dllNames[] = {"BWAPI4", "gmp-vc90-mt", "mpfr-vc90-mt"};
if(!arch.equals("x86")){
throw new UnsupportedOperationException("BWMirror API supports only x86 architecture.");
}

View file

@ -17,6 +17,10 @@ public class Player {
return getName_native(pointer);
}
public List<Unit> getUnits() {
return getUnits_native(pointer);
}
public Race getRace() {
return getRace_native(pointer);
}
@ -274,6 +278,8 @@ public class Player {
private native String getName_native(long pointer);
private native List<Unit> getUnits_native(long pointer);
private native Race getRace_native(long pointer);
private native PlayerType getType_native(long pointer);

View file

@ -9,6 +9,18 @@ import java.util.List;
public class PlayerType {
public String toString() {
return toString_native(pointer);
}
public boolean isLobbyType() {
return isLobbyType_native(pointer);
}
public boolean isGameType() {
return isGameType_native(pointer);
}
public static PlayerType None;
public static PlayerType Computer;
@ -52,5 +64,11 @@ public class PlayerType {
private long pointer;
private native String toString_native(long pointer);
private native boolean isLobbyType_native(long pointer);
private native boolean isGameType_native(long pointer);
}

View file

@ -9,6 +9,30 @@ import java.util.List;
public class Race {
public String toString() {
return toString_native(pointer);
}
public UnitType getWorker() {
return getWorker_native(pointer);
}
public UnitType getCenter() {
return getCenter_native(pointer);
}
public UnitType getRefinery() {
return getRefinery_native(pointer);
}
public UnitType getTransport() {
return getTransport_native(pointer);
}
public UnitType getSupplyProvider() {
return getSupplyProvider_native(pointer);
}
public static Race Zerg;
public static Race Terran;
@ -42,5 +66,17 @@ public class Race {
private long pointer;
private native String toString_native(long pointer);
private native UnitType getWorker_native(long pointer);
private native UnitType getCenter_native(long pointer);
private native UnitType getRefinery_native(long pointer);
private native UnitType getTransport_native(long pointer);
private native UnitType getSupplyProvider_native(long pointer);
}

View file

@ -35,6 +35,10 @@ public class Region extends CenteredObject
return isAccessible_native(pointer);
}
public List<Region> getNeighbors() {
return getNeighbors_native(pointer);
}
public int getBoundsLeft() {
return getBoundsLeft_native(pointer);
}
@ -96,6 +100,8 @@ public class Region extends CenteredObject
private native boolean isAccessible_native(long pointer);
private native List<Region> getNeighbors_native(long pointer);
private native int getBoundsLeft_native(long pointer);
private native int getBoundsTop_native(long pointer);

View file

@ -9,6 +9,50 @@ import java.util.List;
public class TechType {
public String toString() {
return toString_native(pointer);
}
public Race getRace() {
return getRace_native(pointer);
}
public int mineralPrice() {
return mineralPrice_native(pointer);
}
public int gasPrice() {
return gasPrice_native(pointer);
}
public int researchTime() {
return researchTime_native(pointer);
}
public int energyCost() {
return energyCost_native(pointer);
}
public UnitType whatResearches() {
return whatResearches_native(pointer);
}
public WeaponType getWeapon() {
return getWeapon_native(pointer);
}
public boolean targetsUnit() {
return targetsUnit_native(pointer);
}
public boolean targetsPosition() {
return targetsPosition_native(pointer);
}
public Order getOrder() {
return getOrder_native(pointer);
}
public static TechType Stim_Packs;
public static TechType Lockdown;
@ -102,5 +146,27 @@ public class TechType {
private long pointer;
private native String toString_native(long pointer);
private native Race getRace_native(long pointer);
private native int mineralPrice_native(long pointer);
private native int gasPrice_native(long pointer);
private native int researchTime_native(long pointer);
private native int energyCost_native(long pointer);
private native UnitType whatResearches_native(long pointer);
private native WeaponType getWeapon_native(long pointer);
private native boolean targetsUnit_native(long pointer);
private native boolean targetsPosition_native(long pointer);
private native Order getOrder_native(long pointer);
}

View file

@ -1,11 +1,114 @@
package bwapi4;
import bwapi.UnitCommandType;
import java.lang.Override;
public class UnitCommand {
public static native UnitCommand attack(Unit unit, PositionOrUnit target);
public static native UnitCommand attack(Unit unit, PositionOrUnit target, boolean shiftQueueCommand);
public static native UnitCommand build(Unit unit, TilePosition target, UnitType type);
public static native UnitCommand buildAddon(Unit unit, UnitType type);
public static native UnitCommand train(Unit unit, UnitType type);
public static native UnitCommand morph(Unit unit, UnitType type);
public static native UnitCommand research(Unit unit, TechType tech);
public static native UnitCommand upgrade(Unit unit, UpgradeType upgrade);
public static native UnitCommand setRallyPoint(Unit unit, PositionOrUnit target);
public static native UnitCommand move(Unit unit, Position target);
public static native UnitCommand move(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand patrol(Unit unit, Position target);
public static native UnitCommand patrol(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand holdPosition(Unit unit);
public static native UnitCommand holdPosition(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand stop(Unit unit);
public static native UnitCommand stop(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand follow(Unit unit, Unit target);
public static native UnitCommand follow(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand gather(Unit unit, Unit target);
public static native UnitCommand gather(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand returnCargo(Unit unit);
public static native UnitCommand returnCargo(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand repair(Unit unit, Unit target);
public static native UnitCommand repair(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand burrow(Unit unit);
public static native UnitCommand unburrow(Unit unit);
public static native UnitCommand cloak(Unit unit);
public static native UnitCommand decloak(Unit unit);
public static native UnitCommand siege(Unit unit);
public static native UnitCommand unsiege(Unit unit);
public static native UnitCommand lift(Unit unit);
public static native UnitCommand land(Unit unit, TilePosition target);
public static native UnitCommand load(Unit unit, Unit target);
public static native UnitCommand load(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand unload(Unit unit, Unit target);
public static native UnitCommand unloadAll(Unit unit);
public static native UnitCommand unloadAll(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand unloadAll(Unit unit, Position target);
public static native UnitCommand unloadAll(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand rightClick(Unit unit, PositionOrUnit target);
public static native UnitCommand rightClick(Unit unit, PositionOrUnit target, boolean shiftQueueCommand);
public static native UnitCommand haltConstruction(Unit unit);
public static native UnitCommand cancelConstruction(Unit unit);
public static native UnitCommand cancelAddon(Unit unit);
public static native UnitCommand cancelTrain(Unit unit);
public static native UnitCommand cancelTrain(Unit unit, int slot);
public static native UnitCommand cancelMorph(Unit unit);
public static native UnitCommand cancelResearch(Unit unit);
public static native UnitCommand cancelUpgrade(Unit unit);
public static native UnitCommand useTech(Unit unit, TechType tech);
public static native UnitCommand useTech(Unit unit, TechType tech, PositionOrUnit target);
public static native UnitCommand placeCOP(Unit unit, TilePosition target);
private Unit unit;
private UnitCommandType unitCommandType;
@ -16,7 +119,7 @@ public class UnitCommand {
private int extra;
public UnitCommand(Unit unit, UnitCommandType unitCommandType, Unit target, int x, int y, int extra) {
private UnitCommand(Unit unit, UnitCommandType unitCommandType, Unit target, int x, int y, int extra) {
this.unit = unit;
this.unitCommandType = unitCommandType;
this.target = target;

View file

@ -9,6 +9,10 @@ import java.util.List;
public class UnitCommandType {
public String toString() {
return toString_native(pointer);
}
public static UnitCommandType Attack_Move;
public static UnitCommandType Attack_Unit;
@ -122,5 +126,7 @@ public class UnitCommandType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -9,6 +9,10 @@ import java.util.List;
public class UnitSizeType {
public String toString() {
return toString_native(pointer);
}
public static UnitSizeType Independent;
public static UnitSizeType Small;
@ -42,5 +46,7 @@ public class UnitSizeType {
private long pointer;
private native String toString_native(long pointer);
}

View file

@ -9,6 +9,298 @@ import java.util.List;
public class UnitType {
public String toString() {
return toString_native(pointer);
}
public Race getRace() {
return getRace_native(pointer);
}
public TechType requiredTech() {
return requiredTech_native(pointer);
}
public TechType cloakingTech() {
return cloakingTech_native(pointer);
}
public UpgradeType armorUpgrade() {
return armorUpgrade_native(pointer);
}
public int maxHitPoints() {
return maxHitPoints_native(pointer);
}
public int maxShields() {
return maxShields_native(pointer);
}
public int maxEnergy() {
return maxEnergy_native(pointer);
}
public int armor() {
return armor_native(pointer);
}
public int mineralPrice() {
return mineralPrice_native(pointer);
}
public int gasPrice() {
return gasPrice_native(pointer);
}
public int buildTime() {
return buildTime_native(pointer);
}
public int supplyRequired() {
return supplyRequired_native(pointer);
}
public int supplyProvided() {
return supplyProvided_native(pointer);
}
public int spaceRequired() {
return spaceRequired_native(pointer);
}
public int spaceProvided() {
return spaceProvided_native(pointer);
}
public int buildScore() {
return buildScore_native(pointer);
}
public int destroyScore() {
return destroyScore_native(pointer);
}
public UnitSizeType size() {
return size_native(pointer);
}
public int tileWidth() {
return tileWidth_native(pointer);
}
public int tileHeight() {
return tileHeight_native(pointer);
}
public TilePosition tileSize() {
return tileSize_native(pointer);
}
public int dimensionLeft() {
return dimensionLeft_native(pointer);
}
public int dimensionUp() {
return dimensionUp_native(pointer);
}
public int dimensionRight() {
return dimensionRight_native(pointer);
}
public int dimensionDown() {
return dimensionDown_native(pointer);
}
public int width() {
return width_native(pointer);
}
public int height() {
return height_native(pointer);
}
public int seekRange() {
return seekRange_native(pointer);
}
public int sightRange() {
return sightRange_native(pointer);
}
public WeaponType groundWeapon() {
return groundWeapon_native(pointer);
}
public int maxGroundHits() {
return maxGroundHits_native(pointer);
}
public WeaponType airWeapon() {
return airWeapon_native(pointer);
}
public int maxAirHits() {
return maxAirHits_native(pointer);
}
public double topSpeed() {
return topSpeed_native(pointer);
}
public int acceleration() {
return acceleration_native(pointer);
}
public int haltDistance() {
return haltDistance_native(pointer);
}
public int turnRadius() {
return turnRadius_native(pointer);
}
public boolean canProduce() {
return canProduce_native(pointer);
}
public boolean canAttack() {
return canAttack_native(pointer);
}
public boolean canMove() {
return canMove_native(pointer);
}
public boolean isFlyer() {
return isFlyer_native(pointer);
}
public boolean regeneratesHP() {
return regeneratesHP_native(pointer);
}
public boolean isSpellcaster() {
return isSpellcaster_native(pointer);
}
public boolean hasPermanentCloak() {
return hasPermanentCloak_native(pointer);
}
public boolean isInvincible() {
return isInvincible_native(pointer);
}
public boolean isOrganic() {
return isOrganic_native(pointer);
}
public boolean isMechanical() {
return isMechanical_native(pointer);
}
public boolean isRobotic() {
return isRobotic_native(pointer);
}
public boolean isDetector() {
return isDetector_native(pointer);
}
public boolean isResourceContainer() {
return isResourceContainer_native(pointer);
}
public boolean isResourceDepot() {
return isResourceDepot_native(pointer);
}
public boolean isRefinery() {
return isRefinery_native(pointer);
}
public boolean isWorker() {
return isWorker_native(pointer);
}
public boolean requiresPsi() {
return requiresPsi_native(pointer);
}
public boolean requiresCreep() {
return requiresCreep_native(pointer);
}
public boolean isTwoUnitsInOneEgg() {
return isTwoUnitsInOneEgg_native(pointer);
}
public boolean isBurrowable() {
return isBurrowable_native(pointer);
}
public boolean isCloakable() {
return isCloakable_native(pointer);
}
public boolean isBuilding() {
return isBuilding_native(pointer);
}
public boolean isAddon() {
return isAddon_native(pointer);
}
public boolean isFlyingBuilding() {
return isFlyingBuilding_native(pointer);
}
public boolean isNeutral() {
return isNeutral_native(pointer);
}
public boolean isHero() {
return isHero_native(pointer);
}
public boolean isPowerup() {
return isPowerup_native(pointer);
}
public boolean isBeacon() {
return isBeacon_native(pointer);
}
public boolean isFlagBeacon() {
return isFlagBeacon_native(pointer);
}
public boolean isSpecialBuilding() {
return isSpecialBuilding_native(pointer);
}
public boolean isSpell() {
return isSpell_native(pointer);
}
public boolean producesLarva() {
return producesLarva_native(pointer);
}
public boolean isMineralField() {
return isMineralField_native(pointer);
}
public boolean isCritter() {
return isCritter_native(pointer);
}
public boolean canBuildAddon() {
return canBuildAddon_native(pointer);
}
public static UnitType Terran_Marine;
public static UnitType Terran_Ghost;
@ -452,5 +744,151 @@ public class UnitType {
private long pointer;
private native String toString_native(long pointer);
private native Race getRace_native(long pointer);
private native TechType requiredTech_native(long pointer);
private native TechType cloakingTech_native(long pointer);
private native UpgradeType armorUpgrade_native(long pointer);
private native int maxHitPoints_native(long pointer);
private native int maxShields_native(long pointer);
private native int maxEnergy_native(long pointer);
private native int armor_native(long pointer);
private native int mineralPrice_native(long pointer);
private native int gasPrice_native(long pointer);
private native int buildTime_native(long pointer);
private native int supplyRequired_native(long pointer);
private native int supplyProvided_native(long pointer);
private native int spaceRequired_native(long pointer);
private native int spaceProvided_native(long pointer);
private native int buildScore_native(long pointer);
private native int destroyScore_native(long pointer);
private native UnitSizeType size_native(long pointer);
private native int tileWidth_native(long pointer);
private native int tileHeight_native(long pointer);
private native TilePosition tileSize_native(long pointer);
private native int dimensionLeft_native(long pointer);
private native int dimensionUp_native(long pointer);
private native int dimensionRight_native(long pointer);
private native int dimensionDown_native(long pointer);
private native int width_native(long pointer);
private native int height_native(long pointer);
private native int seekRange_native(long pointer);
private native int sightRange_native(long pointer);
private native WeaponType groundWeapon_native(long pointer);
private native int maxGroundHits_native(long pointer);
private native WeaponType airWeapon_native(long pointer);
private native int maxAirHits_native(long pointer);
private native double topSpeed_native(long pointer);
private native int acceleration_native(long pointer);
private native int haltDistance_native(long pointer);
private native int turnRadius_native(long pointer);
private native boolean canProduce_native(long pointer);
private native boolean canAttack_native(long pointer);
private native boolean canMove_native(long pointer);
private native boolean isFlyer_native(long pointer);
private native boolean regeneratesHP_native(long pointer);
private native boolean isSpellcaster_native(long pointer);
private native boolean hasPermanentCloak_native(long pointer);
private native boolean isInvincible_native(long pointer);
private native boolean isOrganic_native(long pointer);
private native boolean isMechanical_native(long pointer);
private native boolean isRobotic_native(long pointer);
private native boolean isDetector_native(long pointer);
private native boolean isResourceContainer_native(long pointer);
private native boolean isResourceDepot_native(long pointer);
private native boolean isRefinery_native(long pointer);
private native boolean isWorker_native(long pointer);
private native boolean requiresPsi_native(long pointer);
private native boolean requiresCreep_native(long pointer);
private native boolean isTwoUnitsInOneEgg_native(long pointer);
private native boolean isBurrowable_native(long pointer);
private native boolean isCloakable_native(long pointer);
private native boolean isBuilding_native(long pointer);
private native boolean isAddon_native(long pointer);
private native boolean isFlyingBuilding_native(long pointer);
private native boolean isNeutral_native(long pointer);
private native boolean isHero_native(long pointer);
private native boolean isPowerup_native(long pointer);
private native boolean isBeacon_native(long pointer);
private native boolean isFlagBeacon_native(long pointer);
private native boolean isSpecialBuilding_native(long pointer);
private native boolean isSpell_native(long pointer);
private native boolean producesLarva_native(long pointer);
private native boolean isMineralField_native(long pointer);
private native boolean isCritter_native(long pointer);
private native boolean canBuildAddon_native(long pointer);
}

View file

@ -9,6 +9,66 @@ import java.util.List;
public class UpgradeType {
public String toString() {
return toString_native(pointer);
}
public Race getRace() {
return getRace_native(pointer);
}
public int mineralPrice() {
return mineralPrice_native(pointer);
}
public int mineralPrice(int level) {
return mineralPrice_native(pointer, level);
}
public int mineralPriceFactor() {
return mineralPriceFactor_native(pointer);
}
public int gasPrice() {
return gasPrice_native(pointer);
}
public int gasPrice(int level) {
return gasPrice_native(pointer, level);
}
public int gasPriceFactor() {
return gasPriceFactor_native(pointer);
}
public int upgradeTime() {
return upgradeTime_native(pointer);
}
public int upgradeTime(int level) {
return upgradeTime_native(pointer, level);
}
public int upgradeTimeFactor() {
return upgradeTimeFactor_native(pointer);
}
public int maxRepeats() {
return maxRepeats_native(pointer);
}
public UnitType whatUpgrades() {
return whatUpgrades_native(pointer);
}
public UnitType whatsRequired() {
return whatsRequired_native(pointer);
}
public UnitType whatsRequired(int level) {
return whatsRequired_native(pointer, level);
}
public static UpgradeType Terran_Infantry_Armor;
public static UpgradeType Terran_Vehicle_Plating;
@ -136,5 +196,35 @@ public class UpgradeType {
private long pointer;
private native String toString_native(long pointer);
private native Race getRace_native(long pointer);
private native int mineralPrice_native(long pointer);
private native int mineralPrice_native(long pointer, int level);
private native int mineralPriceFactor_native(long pointer);
private native int gasPrice_native(long pointer);
private native int gasPrice_native(long pointer, int level);
private native int gasPriceFactor_native(long pointer);
private native int upgradeTime_native(long pointer);
private native int upgradeTime_native(long pointer, int level);
private native int upgradeTimeFactor_native(long pointer);
private native int maxRepeats_native(long pointer);
private native UnitType whatUpgrades_native(long pointer);
private native UnitType whatsRequired_native(long pointer);
private native UnitType whatsRequired_native(long pointer, int level);
}

View file

@ -9,6 +9,102 @@ import java.util.List;
public class WeaponType {
public String toString() {
return toString_native(pointer);
}
public TechType getTech() {
return getTech_native(pointer);
}
public UnitType whatUses() {
return whatUses_native(pointer);
}
public int damageAmount() {
return damageAmount_native(pointer);
}
public int damageBonus() {
return damageBonus_native(pointer);
}
public int damageCooldown() {
return damageCooldown_native(pointer);
}
public int damageFactor() {
return damageFactor_native(pointer);
}
public UpgradeType upgradeType() {
return upgradeType_native(pointer);
}
public DamageType damageType() {
return damageType_native(pointer);
}
public ExplosionType explosionType() {
return explosionType_native(pointer);
}
public int minRange() {
return minRange_native(pointer);
}
public int maxRange() {
return maxRange_native(pointer);
}
public int innerSplashRadius() {
return innerSplashRadius_native(pointer);
}
public int medianSplashRadius() {
return medianSplashRadius_native(pointer);
}
public int outerSplashRadius() {
return outerSplashRadius_native(pointer);
}
public boolean targetsAir() {
return targetsAir_native(pointer);
}
public boolean targetsGround() {
return targetsGround_native(pointer);
}
public boolean targetsMechanical() {
return targetsMechanical_native(pointer);
}
public boolean targetsOrganic() {
return targetsOrganic_native(pointer);
}
public boolean targetsNonBuilding() {
return targetsNonBuilding_native(pointer);
}
public boolean targetsNonRobotic() {
return targetsNonRobotic_native(pointer);
}
public boolean targetsTerrain() {
return targetsTerrain_native(pointer);
}
public boolean targetsOrgOrMech() {
return targetsOrgOrMech_native(pointer);
}
public boolean targetsOwn() {
return targetsOwn_native(pointer);
}
public static WeaponType Gauss_Rifle;
public static WeaponType Gauss_Rifle_Jim_Raynor;
@ -234,5 +330,53 @@ public class WeaponType {
private long pointer;
private native String toString_native(long pointer);
private native TechType getTech_native(long pointer);
private native UnitType whatUses_native(long pointer);
private native int damageAmount_native(long pointer);
private native int damageBonus_native(long pointer);
private native int damageCooldown_native(long pointer);
private native int damageFactor_native(long pointer);
private native UpgradeType upgradeType_native(long pointer);
private native DamageType damageType_native(long pointer);
private native ExplosionType explosionType_native(long pointer);
private native int minRange_native(long pointer);
private native int maxRange_native(long pointer);
private native int innerSplashRadius_native(long pointer);
private native int medianSplashRadius_native(long pointer);
private native int outerSplashRadius_native(long pointer);
private native boolean targetsAir_native(long pointer);
private native boolean targetsGround_native(long pointer);
private native boolean targetsMechanical_native(long pointer);
private native boolean targetsOrganic_native(long pointer);
private native boolean targetsNonBuilding_native(long pointer);
private native boolean targetsNonRobotic_native(long pointer);
private native boolean targetsTerrain_native(long pointer);
private native boolean targetsOrgOrMech_native(long pointer);
private native boolean targetsOwn_native(long pointer);
}

BIN
bwmirror_v2_0.jar Normal file

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_BulletType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_BulletType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_DamageType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_DamageType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_Error
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_Error_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_ExplosionType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_ExplosionType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -1615,6 +1615,14 @@ JNIEXPORT void JNICALL Java_bwapi4_Game_setCommandOptimizationLevel_1native
JNIEXPORT jint JNICALL Java_bwapi4_Game_countdownTimer_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Game
* Method: getAllRegions_native
* Signature: (J)Ljava/util/List;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Game_getAllRegions_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Game
* Method: getRegionAt_native

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_GameType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_GameType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -23,6 +23,14 @@ JNIEXPORT jint JNICALL Java_bwapi4_Player_getID_1native
JNIEXPORT jstring JNICALL Java_bwapi4_Player_getName_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Player
* Method: getUnits_native
* Signature: (J)Ljava/util/List;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Player_getUnits_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Player
* Method: getRace_native

View file

@ -7,6 +7,30 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_PlayerType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_PlayerType_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_PlayerType
* Method: isLobbyType_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_PlayerType_isLobbyType_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_PlayerType
* Method: isGameType_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_PlayerType_isGameType_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,54 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_Race
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_Race_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Race
* Method: getWorker_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Race_getWorker_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Race
* Method: getCenter_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Race_getCenter_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Race
* Method: getRefinery_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Race_getRefinery_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Race
* Method: getTransport_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Race_getTransport_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Race
* Method: getSupplyProvider_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Race_getSupplyProvider_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -55,6 +55,14 @@ JNIEXPORT jint JNICALL Java_bwapi4_Region_getDefensePriority_1native
JNIEXPORT jboolean JNICALL Java_bwapi4_Region_isAccessible_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Region
* Method: getNeighbors_native
* Signature: (J)Ljava/util/List;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_Region_getNeighbors_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_Region
* Method: getBoundsLeft_native

View file

@ -7,6 +7,94 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_TechType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_TechType_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: getRace_native
* Signature: (J)Lbwapi4/Race;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_TechType_getRace_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: mineralPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_TechType_mineralPrice_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: gasPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_TechType_gasPrice_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: researchTime_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_TechType_researchTime_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: energyCost_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_TechType_energyCost_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: whatResearches_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_TechType_whatResearches_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: getWeapon_native
* Signature: (J)Lbwapi4/WeaponType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_TechType_getWeapon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: targetsUnit_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_TechType_targetsUnit_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: targetsPosition_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_TechType_targetsPosition_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_TechType
* Method: getOrder_native
* Signature: (J)Lbwapi4/Order;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_TechType_getOrder_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,430 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_UnitCommand
* Method: attack
* Signature: (Lbwapi4/Unit;Lbwapi4/PositionOrUnit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_attack__Lbwapi4_Unit_2Lbwapi4_PositionOrUnit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: attack
* Signature: (Lbwapi4/Unit;Lbwapi4/PositionOrUnit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_attack__Lbwapi4_Unit_2Lbwapi4_PositionOrUnit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: build
* Signature: (Lbwapi4/Unit;Lbwapi4/TilePosition;Lbwapi4/UnitType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_build
(JNIEnv *, jclass, jobject, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: buildAddon
* Signature: (Lbwapi4/Unit;Lbwapi4/UnitType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_buildAddon
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: train
* Signature: (Lbwapi4/Unit;Lbwapi4/UnitType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_train
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: morph
* Signature: (Lbwapi4/Unit;Lbwapi4/UnitType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_morph
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: research
* Signature: (Lbwapi4/Unit;Lbwapi4/TechType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_research
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: upgrade
* Signature: (Lbwapi4/Unit;Lbwapi4/UpgradeType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_upgrade
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: setRallyPoint
* Signature: (Lbwapi4/Unit;Lbwapi4/PositionOrUnit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_setRallyPoint
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: move
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_move__Lbwapi4_Unit_2Lbwapi4_Position_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: move
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_move__Lbwapi4_Unit_2Lbwapi4_Position_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: patrol
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_patrol__Lbwapi4_Unit_2Lbwapi4_Position_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: patrol
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_patrol__Lbwapi4_Unit_2Lbwapi4_Position_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: holdPosition
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_holdPosition__Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: holdPosition
* Signature: (Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_holdPosition__Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: stop
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_stop__Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: stop
* Signature: (Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_stop__Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: follow
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_follow__Lbwapi4_Unit_2Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: follow
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_follow__Lbwapi4_Unit_2Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: gather
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_gather__Lbwapi4_Unit_2Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: gather
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_gather__Lbwapi4_Unit_2Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: returnCargo
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_returnCargo__Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: returnCargo
* Signature: (Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_returnCargo__Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: repair
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_repair__Lbwapi4_Unit_2Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: repair
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_repair__Lbwapi4_Unit_2Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: burrow
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_burrow
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: unburrow
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unburrow
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cloak
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cloak
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: decloak
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_decloak
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: siege
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_siege
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: unsiege
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unsiege
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: lift
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_lift
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: land
* Signature: (Lbwapi4/Unit;Lbwapi4/TilePosition;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_land
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: load
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_load__Lbwapi4_Unit_2Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: load
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_load__Lbwapi4_Unit_2Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: unload
* Signature: (Lbwapi4/Unit;Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unload
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: unloadAll
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unloadAll__Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: unloadAll
* Signature: (Lbwapi4/Unit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unloadAll__Lbwapi4_Unit_2Z
(JNIEnv *, jclass, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: unloadAll
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unloadAll__Lbwapi4_Unit_2Lbwapi4_Position_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: unloadAll
* Signature: (Lbwapi4/Unit;Lbwapi4/Position;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_unloadAll__Lbwapi4_Unit_2Lbwapi4_Position_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: rightClick
* Signature: (Lbwapi4/Unit;Lbwapi4/PositionOrUnit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_rightClick__Lbwapi4_Unit_2Lbwapi4_PositionOrUnit_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: rightClick
* Signature: (Lbwapi4/Unit;Lbwapi4/PositionOrUnit;Z)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_rightClick__Lbwapi4_Unit_2Lbwapi4_PositionOrUnit_2Z
(JNIEnv *, jclass, jobject, jobject, jboolean);
/*
* Class: bwapi4_UnitCommand
* Method: haltConstruction
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_haltConstruction
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelConstruction
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelConstruction
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelAddon
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelAddon
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelTrain
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelTrain__Lbwapi4_Unit_2
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelTrain
* Signature: (Lbwapi4/Unit;I)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelTrain__Lbwapi4_Unit_2I
(JNIEnv *, jclass, jobject, jint);
/*
* Class: bwapi4_UnitCommand
* Method: cancelMorph
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelMorph
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelResearch
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelResearch
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: cancelUpgrade
* Signature: (Lbwapi4/Unit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_cancelUpgrade
(JNIEnv *, jclass, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: useTech
* Signature: (Lbwapi4/Unit;Lbwapi4/TechType;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_useTech__Lbwapi4_Unit_2Lbwapi4_TechType_2
(JNIEnv *, jclass, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: useTech
* Signature: (Lbwapi4/Unit;Lbwapi4/TechType;Lbwapi4/PositionOrUnit;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_useTech__Lbwapi4_Unit_2Lbwapi4_TechType_2Lbwapi4_PositionOrUnit_2
(JNIEnv *, jclass, jobject, jobject, jobject);
/*
* Class: bwapi4_UnitCommand
* Method: placeCOP
* Signature: (Lbwapi4/Unit;Lbwapi4/TilePosition;)Lbwapi4/UnitCommand;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitCommand_placeCOP
(JNIEnv *, jclass, jobject, jobject);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_UnitCommandType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_UnitCommandType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_UnitSizeType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_UnitSizeType_toString_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,590 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_UnitType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_UnitType_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: getRace_native
* Signature: (J)Lbwapi4/Race;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_getRace_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: requiredTech_native
* Signature: (J)Lbwapi4/TechType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_requiredTech_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: cloakingTech_native
* Signature: (J)Lbwapi4/TechType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_cloakingTech_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: armorUpgrade_native
* Signature: (J)Lbwapi4/UpgradeType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_armorUpgrade_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: maxHitPoints_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_maxHitPoints_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: maxShields_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_maxShields_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: maxEnergy_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_maxEnergy_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: armor_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_armor_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: mineralPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_mineralPrice_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: gasPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_gasPrice_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: buildTime_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_buildTime_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: supplyRequired_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_supplyRequired_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: supplyProvided_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_supplyProvided_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: spaceRequired_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_spaceRequired_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: spaceProvided_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_spaceProvided_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: buildScore_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_buildScore_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: destroyScore_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_destroyScore_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: size_native
* Signature: (J)Lbwapi4/UnitSizeType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_size_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: tileWidth_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_tileWidth_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: tileHeight_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_tileHeight_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: tileSize_native
* Signature: (J)Lbwapi4/TilePosition;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_tileSize_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: dimensionLeft_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_dimensionLeft_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: dimensionUp_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_dimensionUp_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: dimensionRight_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_dimensionRight_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: dimensionDown_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_dimensionDown_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: width_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_width_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: height_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_height_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: seekRange_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_seekRange_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: sightRange_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_sightRange_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: groundWeapon_native
* Signature: (J)Lbwapi4/WeaponType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_groundWeapon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: maxGroundHits_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_maxGroundHits_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: airWeapon_native
* Signature: (J)Lbwapi4/WeaponType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UnitType_airWeapon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: maxAirHits_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_maxAirHits_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: topSpeed_native
* Signature: (J)D
*/
JNIEXPORT jdouble JNICALL Java_bwapi4_UnitType_topSpeed_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: acceleration_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_acceleration_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: haltDistance_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_haltDistance_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: turnRadius_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UnitType_turnRadius_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: canProduce_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_canProduce_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: canAttack_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_canAttack_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: canMove_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_canMove_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isFlyer_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isFlyer_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: regeneratesHP_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_regeneratesHP_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isSpellcaster_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isSpellcaster_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: hasPermanentCloak_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_hasPermanentCloak_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isInvincible_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isInvincible_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isOrganic_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isOrganic_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isMechanical_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isMechanical_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isRobotic_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isRobotic_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isDetector_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isDetector_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isResourceContainer_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isResourceContainer_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isResourceDepot_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isResourceDepot_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isRefinery_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isRefinery_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isWorker_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isWorker_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: requiresPsi_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_requiresPsi_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: requiresCreep_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_requiresCreep_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isTwoUnitsInOneEgg_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isTwoUnitsInOneEgg_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isBurrowable_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isBurrowable_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isCloakable_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isCloakable_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isBuilding_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isBuilding_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isAddon_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isAddon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isFlyingBuilding_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isFlyingBuilding_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isNeutral_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isNeutral_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isHero_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isHero_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isPowerup_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isPowerup_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isBeacon_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isBeacon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isFlagBeacon_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isFlagBeacon_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isSpecialBuilding_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isSpecialBuilding_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isSpell_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isSpell_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: producesLarva_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_producesLarva_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isMineralField_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isMineralField_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: isCritter_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_isCritter_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UnitType
* Method: canBuildAddon_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_UnitType_canBuildAddon_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,126 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_UpgradeType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_UpgradeType_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: getRace_native
* Signature: (J)Lbwapi4/Race;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UpgradeType_getRace_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: mineralPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_mineralPrice_1native__J
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: mineralPrice_native
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_mineralPrice_1native__JI
(JNIEnv *, jobject, jlong, jint);
/*
* Class: bwapi4_UpgradeType
* Method: mineralPriceFactor_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_mineralPriceFactor_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: gasPrice_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_gasPrice_1native__J
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: gasPrice_native
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_gasPrice_1native__JI
(JNIEnv *, jobject, jlong, jint);
/*
* Class: bwapi4_UpgradeType
* Method: gasPriceFactor_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_gasPriceFactor_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: upgradeTime_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_upgradeTime_1native__J
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: upgradeTime_native
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_upgradeTime_1native__JI
(JNIEnv *, jobject, jlong, jint);
/*
* Class: bwapi4_UpgradeType
* Method: upgradeTimeFactor_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_upgradeTimeFactor_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: maxRepeats_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_UpgradeType_maxRepeats_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: whatUpgrades_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UpgradeType_whatUpgrades_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: whatsRequired_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UpgradeType_whatsRequired_1native__J
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_UpgradeType
* Method: whatsRequired_native
* Signature: (JI)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_UpgradeType_whatsRequired_1native__JI
(JNIEnv *, jobject, jlong, jint);
#ifdef __cplusplus
}
#endif

View file

@ -7,6 +7,198 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: bwapi4_WeaponType
* Method: toString_native
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_bwapi4_WeaponType_toString_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: getTech_native
* Signature: (J)Lbwapi4/TechType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_WeaponType_getTech_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: whatUses_native
* Signature: (J)Lbwapi4/UnitType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_WeaponType_whatUses_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: damageAmount_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_damageAmount_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: damageBonus_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_damageBonus_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: damageCooldown_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_damageCooldown_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: damageFactor_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_damageFactor_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: upgradeType_native
* Signature: (J)Lbwapi4/UpgradeType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_WeaponType_upgradeType_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: damageType_native
* Signature: (J)Lbwapi4/DamageType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_WeaponType_damageType_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: explosionType_native
* Signature: (J)Lbwapi4/ExplosionType;
*/
JNIEXPORT jobject JNICALL Java_bwapi4_WeaponType_explosionType_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: minRange_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_minRange_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: maxRange_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_maxRange_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: innerSplashRadius_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_innerSplashRadius_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: medianSplashRadius_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_medianSplashRadius_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: outerSplashRadius_native
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_bwapi4_WeaponType_outerSplashRadius_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsAir_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsAir_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsGround_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsGround_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsMechanical_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsMechanical_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsOrganic_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsOrganic_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsNonBuilding_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsNonBuilding_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsNonRobotic_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsNonRobotic_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsTerrain_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsTerrain_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsOrgOrMech_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsOrgOrMech_1native
(JNIEnv *, jobject, jlong);
/*
* Class: bwapi4_WeaponType
* Method: targetsOwn_native
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_bwapi4_WeaponType_targetsOwn_1native
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View file

@ -60,7 +60,7 @@ public class Mirror {
static {
String arch = System.getProperty("os.arch");
String dllNames[] = {"BWAPI4.dll", "gmp-vc90-mt", "mpfr-vc90-mt"};
String dllNames[] = {"BWAPI4", "gmp-vc90-mt", "mpfr-vc90-mt"};
if(!arch.equals("x86")){
throw new UnsupportedOperationException("BWMirror API supports only x86 architecture.");
}

View file

@ -1,11 +1,114 @@
package bwapi4;
import bwapi.UnitCommandType;
import java.lang.Override;
public class UnitCommand {
public static native UnitCommand attack(Unit unit, PositionOrUnit target);
public static native UnitCommand attack(Unit unit, PositionOrUnit target, boolean shiftQueueCommand);
public static native UnitCommand build(Unit unit, TilePosition target, UnitType type);
public static native UnitCommand buildAddon(Unit unit, UnitType type);
public static native UnitCommand train(Unit unit, UnitType type);
public static native UnitCommand morph(Unit unit, UnitType type);
public static native UnitCommand research(Unit unit, TechType tech);
public static native UnitCommand upgrade(Unit unit, UpgradeType upgrade);
public static native UnitCommand setRallyPoint(Unit unit, PositionOrUnit target);
public static native UnitCommand move(Unit unit, Position target);
public static native UnitCommand move(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand patrol(Unit unit, Position target);
public static native UnitCommand patrol(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand holdPosition(Unit unit);
public static native UnitCommand holdPosition(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand stop(Unit unit);
public static native UnitCommand stop(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand follow(Unit unit, Unit target);
public static native UnitCommand follow(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand gather(Unit unit, Unit target);
public static native UnitCommand gather(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand returnCargo(Unit unit);
public static native UnitCommand returnCargo(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand repair(Unit unit, Unit target);
public static native UnitCommand repair(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand burrow(Unit unit);
public static native UnitCommand unburrow(Unit unit);
public static native UnitCommand cloak(Unit unit);
public static native UnitCommand decloak(Unit unit);
public static native UnitCommand siege(Unit unit);
public static native UnitCommand unsiege(Unit unit);
public static native UnitCommand lift(Unit unit);
public static native UnitCommand land(Unit unit, TilePosition target);
public static native UnitCommand load(Unit unit, Unit target);
public static native UnitCommand load(Unit unit, Unit target, boolean shiftQueueCommand);
public static native UnitCommand unload(Unit unit, Unit target);
public static native UnitCommand unloadAll(Unit unit);
public static native UnitCommand unloadAll(Unit unit, boolean shiftQueueCommand);
public static native UnitCommand unloadAll(Unit unit, Position target);
public static native UnitCommand unloadAll(Unit unit, Position target, boolean shiftQueueCommand);
public static native UnitCommand rightClick(Unit unit, PositionOrUnit target);
public static native UnitCommand rightClick(Unit unit, PositionOrUnit target, boolean shiftQueueCommand);
public static native UnitCommand haltConstruction(Unit unit);
public static native UnitCommand cancelConstruction(Unit unit);
public static native UnitCommand cancelAddon(Unit unit);
public static native UnitCommand cancelTrain(Unit unit);
public static native UnitCommand cancelTrain(Unit unit, int slot);
public static native UnitCommand cancelMorph(Unit unit);
public static native UnitCommand cancelResearch(Unit unit);
public static native UnitCommand cancelUpgrade(Unit unit);
public static native UnitCommand useTech(Unit unit, TechType tech);
public static native UnitCommand useTech(Unit unit, TechType tech, PositionOrUnit target);
public static native UnitCommand placeCOP(Unit unit, TilePosition target);
private Unit unit;
private UnitCommandType unitCommandType;

View file

@ -215,7 +215,7 @@ public class CJavaPipeline {
* Bind constants together and create initialisation function
*/
Bind bind = new Bind();
Bind bind = new Bind(javaContext);
bind.setOut(out);
bind.implementBind(allDecs);

View file

@ -16,7 +16,7 @@ public class JavaContext {
private List<String> valueTypes = Arrays.asList("Position", "TilePosition", "WalkPosition", "Color", "BWTA::RectangleArray<double>", "PositionOrUnit", "Point", "UnitCommand");
private List<String> constantTypes = Arrays.asList("UnitType", "TechType", "UpgradeType", "Race", "UnitCommand", "WeaponType", "Order", "GameType", "Error");
private List<String> constantTypes = Arrays.asList("UnitType", "TechType", "UpgradeType", "Race", "UnitCommand", "WeaponType", "Order", "GameType", "Error", "PlayerType", "UnitCommandType");
private List<String> enumTypes = Arrays.asList("MouseButton", "Key", "bwapi4.Text.Size.Enum", "bwapi4.CoordinateType.Enum", "Text::Size::Enum", "CoordinateType::Enum");
@ -27,6 +27,8 @@ public class JavaContext {
private String packageName = "bwapi";
public JavaContext() {
javaToCType.put("long", "jlong");
javaToCType.put("int", "jint");
@ -40,7 +42,7 @@ public class JavaContext {
}
public String getPackageName(String javaRetType) {
if (javaRetType.equals("Position") || javaRetType.equals("TilePosition")) {
if (packageName.equals("bwta") && (javaRetType.equals("Position") || javaRetType.equals("TilePosition"))) {
return "bwapi";
}
return packageName;
@ -52,11 +54,11 @@ public class JavaContext {
public String toCType(String javaType) {
String result = javaToCType.get(javaType);
return result != null ? result : "PTR";
return result != null ? result : "REF";
}
public boolean isPointer(String javaType) {
return javaType.equals("PTR");
public boolean isReference(String javaType) {
return javaType.equals("REF");
}
public boolean isValueType(String javaType) {
@ -185,11 +187,11 @@ public class JavaContext {
", " + fieldName + ".blue()";
case "UnitCommand":
return
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/Unit\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/Unit\"), \"get\", \"(J)Lbwapi4/Unit;\"), " +fieldName+ ".getUnit())" +
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/UnitCommandType\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/UnitCommandType\"), \"get\", \"(J)Lbwapi4/UnitCommandType;\"), "+fieldName+".getType())" +
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/Unit\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/Unit\"), \"get\", \"(J)Lbwapi4/Unit;\"), "+fieldName+".getTarget())" +
", "+ fieldName +".getTargetPosition().x " +
", "+ fieldName +".getTargetPosition().y " +
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/Unit\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/Unit\"), \"get\", \"(J)Lbwapi4/Unit;\"), " +fieldName+ ".getUnit())\n" +
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/UnitCommandType\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/UnitCommandType\"), \"get\", \"(J)Lbwapi4/UnitCommandType;\"), (jlong)tableUnitCommandType.find("+fieldName+".getType().getID())->second )\n" +
", env->CallStaticObjectMethod(FindCachedClass(env, \"" + packageName + "/Unit\"), FindCachedMethodStatic(env, FindCachedClass(env, \"" + packageName + "/Unit\"), \"get\", \"(J)Lbwapi4/Unit;\"), "+fieldName+".getTarget())\n" +
", "+ fieldName +".getTargetPosition().x \n" +
", "+ fieldName +".getTargetPosition().y \n" +
", resolveUnitCommandExtra("+fieldName+")";
default:
throw new UnsupportedOperationException();

View file

@ -27,6 +27,12 @@ public class Bind {
this.out = out;
}
private JavaContext context;
public Bind(JavaContext context) {
this.context = context;
}
private void implementBWAPIInit() {
out.println("println(\"Attempting to init BWAPI...\");");
out.println("\t\tBWAPI_init();");
@ -48,7 +54,7 @@ public class Bind {
" }\n" +
"\n");
} else {
out.println("\t\t\t\tprintln(\"Waiting...\");" +
out.println("\t\t\t\tprintln(\"Waiting...\");\n" +
"while ( !Broodwar->isInGame() )\n" +
" {\n" +
" BWAPI::BWAPIClient.update();\n" +
@ -68,14 +74,14 @@ public class Bind {
"\t\tprintln(\"Connection successful, starting match...\");\n" +
"\n" +
"\t\tcls = env->GetObjectClass(obj);\n" +
"\t\tjclass gamecls = env->FindClass(\"Lbwapi/Game;\");\n" +
"\t\tjclass unitCls = env->FindClass(\"Lbwapi/Unit;\");\n" +
"\t\tjclass playerCls = env->FindClass(\"Lbwapi/Player;\");\n" +
"\t\tjclass posCls = env->FindClass(\"Lbwapi/Position;\");\n" +
"\t\tjobject moduleObj = env->GetObjectField(obj, env->GetFieldID(cls, \"module\", \"Lbwapi/AIModule;\"));\n" +
"\t\tjclass gamecls = env->FindClass(\"L" + context.getPackageName() + "/Game;\");\n" +
"\t\tjclass unitCls = env->FindClass(\"L" + context.getPackageName() + "/Unit;\");\n" +
"\t\tjclass playerCls = env->FindClass(\"L" + context.getPackageName() + "/Player;\");\n" +
"\t\tjclass posCls = env->FindClass(\"L" + context.getPackageName() + "/Position;\");\n" +
"\t\tjobject moduleObj = env->GetObjectField(obj, env->GetFieldID(cls, \"module\", \"L" + context.getPackageName() + "/AIModule;\"));\n" +
"\t\tjclass moduleCls = env->GetObjectClass(moduleObj);\n" +
"\t\tenv->SetObjectField(obj, env->GetFieldID(cls, \"game\", \"Lbwapi/Game;\"), " +
"env->CallStaticObjectMethod(gamecls, env->GetStaticMethodID(gamecls, \"get\", \"(J)Lbwapi/Game;\"), (long)" + (CJavaPipeline.isBWAPI3() ? "" : "&") + "Broodwar));\n" +
"\t\tenv->SetObjectField(obj, env->GetFieldID(cls, \"game\", \"L" + context.getPackageName() + "/Game;\"), " +
"env->CallStaticObjectMethod(gamecls, env->GetStaticMethodID(gamecls, \"get\", \"(J)L" + context.getPackageName() + "/Game;\"), (long)Broodwar" + (CJavaPipeline.isBWAPI3() ? "" : "Ptr")+"));\n" +
"\n" +
"\t\tjmethodID updateMethodID = env->GetMethodID(env->GetObjectClass(obj), \"update\", \"()V\");");
@ -83,20 +89,20 @@ public class Bind {
"\t\tjmethodID matchEndCallback = env->GetMethodID(moduleCls, \"onEnd\", \"(Z)V\");\n" +
"\t\tjmethodID matchFrameCallback = env->GetMethodID(moduleCls, \"onFrame\", \"()V\");\n" +
"\t\tjmethodID sendTextCallback = env->GetMethodID(moduleCls, \"onSendText\", \"(Ljava/lang/String;)V\");\n" +
"\t\tjmethodID receiveTextCallback = env->GetMethodID(moduleCls, \"onReceiveText\", \"(Lbwapi/Player;Ljava/lang/String;)V\");\n" +
"\t\tjmethodID playerLeftCallback = env->GetMethodID(moduleCls, \"onPlayerLeft\", \"(Lbwapi/Player;)V\");\n" +
"\t\tjmethodID nukeDetectCallback = env->GetMethodID(moduleCls, \"onNukeDetect\", \"(Lbwapi/Position;)V\");\n" +
"\t\tjmethodID unitDiscoverCallback = env->GetMethodID(moduleCls, \"onUnitDiscover\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitEvadeCallback = env->GetMethodID(moduleCls, \"onUnitEvade\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitShowCallback = env->GetMethodID(moduleCls, \"onUnitShow\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitHideCallback = env->GetMethodID(moduleCls, \"onUnitHide\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitCreateCallback = env->GetMethodID(moduleCls, \"onUnitCreate\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitDestroyCallback = env->GetMethodID(moduleCls, \"onUnitDestroy\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitMorphCallback = env->GetMethodID(moduleCls, \"onUnitMorph\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID unitRenegadeCallback = env->GetMethodID(moduleCls, \"onUnitRenegade\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID receiveTextCallback = env->GetMethodID(moduleCls, \"onReceiveText\", \"(L" + context.getPackageName() + "/Player;Ljava/lang/String;)V\");\n" +
"\t\tjmethodID playerLeftCallback = env->GetMethodID(moduleCls, \"onPlayerLeft\", \"(L" + context.getPackageName() + "/Player;)V\");\n" +
"\t\tjmethodID nukeDetectCallback = env->GetMethodID(moduleCls, \"onNukeDetect\", \"(L" + context.getPackageName() + "/Position;)V\");\n" +
"\t\tjmethodID unitDiscoverCallback = env->GetMethodID(moduleCls, \"onUnitDiscover\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitEvadeCallback = env->GetMethodID(moduleCls, \"onUnitEvade\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitShowCallback = env->GetMethodID(moduleCls, \"onUnitShow\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitHideCallback = env->GetMethodID(moduleCls, \"onUnitHide\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitCreateCallback = env->GetMethodID(moduleCls, \"onUnitCreate\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitDestroyCallback = env->GetMethodID(moduleCls, \"onUnitDestroy\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitMorphCallback = env->GetMethodID(moduleCls, \"onUnitMorph\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID unitRenegadeCallback = env->GetMethodID(moduleCls, \"onUnitRenegade\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID saveGameCallback = env->GetMethodID(moduleCls, \"onSaveGame\", \"(Ljava/lang/String;)V\");\n" +
"\t\tjmethodID unitCompleteCallback = env->GetMethodID(moduleCls, \"onUnitComplete\", \"(Lbwapi/Unit;)V\");\n" +
"\t\tjmethodID playerDroppedCallback = env->GetMethodID(moduleCls, \"onPlayerDropped\", \"(Lbwapi/Player;)V\");");
"\t\tjmethodID unitCompleteCallback = env->GetMethodID(moduleCls, \"onUnitComplete\", \"(L" + context.getPackageName() + "/Unit;)V\");\n" +
"\t\tjmethodID playerDroppedCallback = env->GetMethodID(moduleCls, \"onPlayerDropped\", \"(L" + context.getPackageName() + "/Player;)V\");");
out.println("\t\twhile (true) {\n");
implementConnectionRoutine();
@ -129,47 +135,47 @@ public class Bind {
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, sendTextCallback, env->NewStringUTF(it->getText().c_str()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::ReceiveText:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, receiveTextCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)Lbwapi/Player;\"), (jlong)it->getPlayer()), env->NewStringUTF(it->getText().c_str()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, receiveTextCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)L" + context.getPackageName() + "/Player;\"), (jlong)it->getPlayer()), env->NewStringUTF(it->getText().c_str()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::PlayerLeft:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, playerLeftCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)Lbwapi/Player;\"), (jlong)it->getPlayer()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, playerLeftCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)L" + context.getPackageName() + "/Player;\"), (jlong)it->getPlayer()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::NukeDetect:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, nukeDetectCallback, env->NewObject(posCls, env->GetMethodID(posCls,\"<init>\", \"(II)V\"), it->getPosition().x" + checkBWAPI3brackets() + ", it->getPosition().y" + checkBWAPI3brackets() + "));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitDiscover:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitDiscoverCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitDiscoverCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitEvade:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitEvadeCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitEvadeCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitShow:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitShowCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitShowCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitHide:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitHideCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitHideCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitCreate:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitCreateCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitCreateCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitDestroy:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitDestroyCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitDestroyCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitMorph:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitMorphCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitMorphCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitRenegade:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitRenegadeCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitRenegadeCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::SaveGame:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, saveGameCallback, env->NewStringUTF(it->getText().c_str()));\n" +
"\t\t\t\t\t\t break;\n" +
"\t\t\t\t\t\t case EventType::UnitComplete:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitCompleteCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)Lbwapi/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, unitCompleteCallback, env->CallStaticObjectMethod(unitCls, env->GetStaticMethodID(unitCls, \"get\", \"(J)L" + context.getPackageName() + "/Unit;\"), (jlong)it->getUnit()));\n" +
"\t\t\t\t\t\t break;\n" +
(CJavaPipeline.isBWAPI3() ?
"\t\t\t\t\t\t case EventType::PlayerDropped:\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, playerDroppedCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)Lbwapi/Player;\")));\n" +
"\t\t\t\t\t\t\t env->CallVoidMethod(moduleObj, playerDroppedCallback, env->CallStaticObjectMethod(playerCls, env->GetStaticMethodID(playerCls, \"get\", \"(J)L" + context.getPackageName() + "/Player;\")));\n" +
"\t\t\t\t\t\t break;\n"
: "") +
"\n" +
@ -181,8 +187,8 @@ public class Bind {
"\t\t\t\t\t\tprintln(\"Reconnecting...\");\n" +
"\t\t\t\t\t\treconnect();\n" +
"\t\t\t\t}\n" +
(CJavaPipeline.isBWAPI3() ? "" : "println(\"Match ended.\");") +
"\t\t\t}\n" +
(CJavaPipeline.isBWAPI3() ? "" : "println(\"Match ended.\");") +
"\t\t}");
}
@ -222,7 +228,7 @@ public class Bind {
private void implementMirrorInit(List<CDeclaration> declarationList) {
implementHelpers();
out.println("JNIEXPORT void JNICALL Java_bwapi_Mirror_startGame(JNIEnv * env, jobject obj){");
out.println("JNIEXPORT void JNICALL Java_" + context.getPackageName() + "_Mirror_startGame(JNIEnv * env, jobject obj){");
if (CJavaPipeline.isBWAPI3()) {
implementBWAPIInit();
}
@ -247,11 +253,11 @@ public class Bind {
for (Field field : cClass.getFields()) {
if (field.getDeclType().equals(DeclarationType.VARIABLE)) {
if (!printedIntro) {
out.println("cls = env->FindClass(\"Lbwapi/" + cClass.getName() + ";\");");
out.println("cls = env->FindClass(\"L" + context.getPackageName() + "/" + cClass.getName() + ";\");");
if (cClass.getName().equals("Color")) {
out.println("getId = env->GetMethodID(cls,\"<init>\", \"(III)V\");");
} else {
out.println("getId = env->GetStaticMethodID(cls, \"get\", \"(J)Lbwapi/" + cClass.getName() + ";\");");
out.println("getId = env->GetStaticMethodID(cls, \"get\", \"(J)L" + context.getPackageName() + "/" + cClass.getName() + ";\");");
}
printedIntro = true;
}
@ -267,14 +273,14 @@ public class Bind {
if (cClass.getName().equals("Color")) {
out.println(
"env->SetStaticObjectField(cls, " +
"env->GetStaticFieldID(cls, \"" + classVariable.getName() + "\", \"Lbwapi/" + classVariable.getType() + ";\"), " +
"env->GetStaticFieldID(cls, \"" + classVariable.getName() + "\", \"L" + context.getPackageName() + "/" + classVariable.getType() + ";\"), " +
"env->NewObject(cls, getId, " + cValue + ".red(), " + cValue + ".green(), " + cValue + ".blue())" +
");");
return;
}
out.println(
"env->SetStaticObjectField(cls, " +
"env->GetStaticFieldID(cls, \"" + classVariable.getName() + "\", \"Lbwapi/" + classVariable.getType() + ";\"), " +
"env->GetStaticFieldID(cls, \"" + classVariable.getName() + "\", \"L" + context.getPackageName() + "/" + classVariable.getType() + ";\"), " +
"env->CallStaticObjectMethod(cls, getId, (jlong)&" + cValue + ")" +
");");
if (cClass.getName().equals("Position") || cClass.getName().equals("TilePosition") || cClass.getName().equals("WalkPosition") || cClass.getName().equals("Point")) {

View file

@ -50,7 +50,7 @@ public class CallImplementer {
public void setOut(PrintStream out) {
this.out = out;
out.print("#include \"../concat_header.h\"\n" +
out.print("#include \"../concat_header" + (CJavaPipeline.isBWAPI3() ? "" : "4")+ ".h\"\n" +
"#include <BWAPI.h>\n" +
"#include <BWAPI/Client.h>\n" +
(CJavaPipeline.isBWAPI3() ? "#include <BWTA.h>\n" : "#include <thread>\n" + "#include <chrono>\n") +
@ -72,7 +72,7 @@ public class CallImplementer {
private void implementAccessObjectsParams(List<Param> params) {
for (Param param : params) {
if (javaContext.isPointer(param.first)) {
if (javaContext.isReference(param.first)) {
if (javaContext.isValueType(param.third)) {
out.println(javaContext.copyJavaObjectToC(param.third, param.second));
continue;
@ -113,7 +113,7 @@ public class CallImplementer {
private void implementMethodParams(List<Param> params) {
for (Param param : params) {
if (javaContext.isPointer(param.first)) {
if (javaContext.isReference(param.first)) {
out.print("," + SPACE + javaContext.ptrCType() + SPACE + javaContext.ptrPrefix() + param.second);
} else {
out.print("," + SPACE + param.first + SPACE + param.second);
@ -419,14 +419,15 @@ public class CallImplementer {
"\tjobject targetObj = env->CallObjectMethod(obj, FindCachedMethod(env, clz, \"getTarget\", \"()L" + javaContext.getPackageName() + "/Unit;\"));\n" +
"\tUnit target = (Unit)env->GetLongField(targetObj, FindCachedField(env, env->GetObjectClass(targetObj), \"pointer\", \"J\"));\n" +
"\tjobject typeObj = env->CallObjectMethod(obj, FindCachedMethod(env, clz, \"getType\", \"()L" + javaContext.getPackageName() + "/UnitCommandType;\"));\n" +
"\tUnitCommandType type = (UnitCommandType)env->GetIntField(typeObj, FindCachedField(env, env->GetObjectClass(typeObj), \"value\", \"I\"));\n" +
"\tjobject typeObj = env->CallObjectMethod(obj, FindCachedMethod(env, clz, \"getUnitCommandType\", \"()L" + javaContext.getPackageName() + "/UnitCommandType;\"));\n" +
"\tUnitCommandType type = *(UnitCommandType*)env->GetLongField(typeObj, FindCachedField(env, env->GetObjectClass(typeObj), \"pointer\", \"J\"));\n" +
"\tint extra = (int)env->GetIntField(obj, FindCachedField(env, clz, \"extra\", \"I\"));\n" +
"\tjobject posObj = env->CallObjectMethod(obj, FindCachedMethod(env, clz, \"getPosition\", \"()L" + javaContext.getPackageName() + "/Position;\"));\n" +
"\t" + javaContext.copyJavaObjectToC("Position", "position", "posObj") + "\n" +
"\treturn UnitCommand(unit, UnitCommandType(type), target, position.x, position.y, extra);\n" +
"\tint x = (int)env->GetIntField(obj, FindCachedField(env, clz, \"x\", \"I\"));\n" +
"\tint y = (int)env->GetIntField(obj, FindCachedField(env, clz, \"y\", \"I\"));\n" +
"\treturn UnitCommand(unit, type, target, x, y, extra);\n" +
"}\n\n");
out.println("int resolveUnitCommandExtra(UnitCommand& command){\n" +

View file

@ -43,7 +43,7 @@ public class CApiParser {
//String FUNC_REGEX = "^(\\s*)(virtual)?\\s(BWAPI::)?([\\w\\*]+)\\s([\\w\\*]+)\\((.*)\\)((\\sconst)?\\s=\\s0;)?";
//String FUNC_REGEX = "^(\\s*)(virtual)?\\s((BWAPI)|(std)::)?([\\w\\*]+)\\s([\\w\\*]+)\\((.*)\\)((\\sconst)?\\s=\\s0;)?";
// 1 2 3 4 56 7 89 10 11 12 13 14,15 15,17
String FUNC_REGEX = "^(\\s*)(virtual)?\\s(const\\s)?(static\\s)?((BWAPI::)|(std)::)?((set<(\\s*(BWAPI::)?\\w+\\*?\\s*)>)|([\\w\\*]+))&?\\s+([\\w\\*]+)\\((.*)\\)((\\sconst)?\\s=\\s0;)?\\s*";
public static final String FUNC_REGEX = "^(\\s*)(virtual)?\\s(const\\s)?(static\\s)?((BWAPI::)|(std)::)?((set<(\\s*(BWAPI::)?\\w+\\*?\\s*)>)|([\\w\\*]+))&?\\s+(&?[\\w\\*]+)\\((.*)\\)(\\s*const)?(\\s*=\\s0)?(;)?\\s*";
static final int F_REGEX_STATIC = 4;
static final int F_REGEX_RETURN_TYPE = 8;
@ -102,9 +102,7 @@ public class CApiParser {
currentNamespace = line;
}
if (line.endsWith("Types")) {
return LineState.END;
}
if (line.equals("Errors")) {
return LineState.END;
}
@ -114,10 +112,15 @@ public class CApiParser {
if (line.equals("Orders")) {
return LineState.END;
}
if(CJavaPipeline.isBWAPI3()) {
if (line.endsWith("Types")) {
return LineState.END;
}
if (line.equals("Races")) {
return LineState.END;
}
}
return LineState.SKIP;
}
@ -230,6 +233,9 @@ public class CApiParser {
Function function = new Function();
function.returnType = matcher.group(F_REGEX_RETURN_TYPE);
function.name = matcher.group(F_REGEX_NAME);
if(function.name.startsWith("&")){
function.name = function.name.substring(1);
}
if (function.returnType.equals("operator")) {
return null;
}
@ -268,6 +274,16 @@ public class CApiParser {
return null;
}
if(function.name.equals("maxUnitWidth")){
System.err.println("function skipped - BWAPI4 (" + function.name + ")");
return null;
}
if(function.name.equals("maxUnitHeight")){
System.err.println("function skipped - BWAPI4 (" + function.name + ")");
return null;
}
if(matcher.group(F_REGEX_STATIC) != null){
function.setStatic(true);
}
@ -482,6 +498,16 @@ public class CApiParser {
clazzName = clazzName.substring(0, clazzName.length() - "Interface".length());
}
Clazz clz = new Clazz(clazzName);
if(!CJavaPipeline.isBWAPI3()){
if(clazzName.endsWith("Type") || clazzName.equals("Error") || clazzName.equals("Race")){
Function function = new Function();
function.name = "toString";
function.returnType = "string";
clz.fields.add(function);
}
}
if (javadoc != null) {
clz.setJavadoc(javadoc);
javadoc = null;

View file

@ -33,6 +33,7 @@ public class Function implements Method {
f.name = name;
f.returnType = returnType;
f.args.addAll(args);
f.isStatic = isStatic;
return f;
}

View file

@ -1,5 +1,7 @@
package test;
import impl.CApiParser;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -12,13 +14,13 @@ public class FunctionRegexTest {
// 1 2 3 4 56 7 89 10 11 12,13 14,15
//String FUNC_REGEX = "^(\\s*)(virtual)?\\s(const\\s)?((BWAPI::)|(std::))?((set<(\\w+\\*?)>)|([\\w\\*]+))&?\\s([\\w\\*]+)\\((.*)\\)((\\sconst)?\\s*=\\s*0;)?";
String FUNC_REGEX = "^(\\s*)(virtual)?\\s(const\\s)?((BWAPI::)|(std)::)?((set<(\\s*(BWAPI::)?\\w+\\*?\\s*)>)|([\\w\\*]+))&?\\s([\\w\\*]+)\\((.*)\\)((\\sconst)?\\s=\\s0;)?\\s*";
String FUNC_REGEX = "^(\\s*)(virtual)?\\s(const\\s)?(static\\s)?((BWAPI::)|(std)::)?((set<(\\s*(BWAPI::)?\\w+\\*?\\s*)>)|([\\w\\*]+))&?\\s+(&?[\\w\\*]+)\\((.*)\\)(\\s*const)?(\\s*=\\s0)?(;)?\\s*";
String ENUM_VALUE_REGEX = "^(\\s*)(\\w+)(\\s*=\\s*(0x)?([0-9A-Fa-f]+))?\\s*[\\,;]";
Pattern funcPattern = Pattern.compile(FUNC_REGEX);
Pattern funcPattern = Pattern.compile(CApiParser.FUNC_REGEX);
public void run() {
Matcher matcher = funcPattern.matcher(" virtual void drawText(int ctype, int x, int y, const char *format, ...) = 0; ");
Matcher matcher = funcPattern.matcher(" static UnitCommand repair(Unit unit, Unit target, bool shiftQueueCommand = false);");
if (matcher.matches()) {
System.out.println("match");
}

View file

@ -1,7 +1,6 @@
package test.api;
import bwapi4.*;
import bwapi4.Text.Size.*;
import bwapi4.Text.Size.Enum;
/**
@ -37,15 +36,15 @@ public class TestBot1 {
game.drawBoxScreen(0, 0, 100, 100, Color.Red, true);
game.setTextSize(Enum.Small);
game.setTextSize(Enum.Large);
game.drawTextScreen(10, 10, "Playing as " + self.getName() + " - " + self.getRace());
StringBuilder units = new StringBuilder("My units:\n");
/*
for (Player player : game.getPlayers()) {
System.out.println(player.getName());
for(Unit enemyUnit: player.()){
System.out.println(enemyUnit.getType());
// System.out.println(player.getName());
for (Unit enemyUnit : player.getUnits()) {
// System.out.println(enemyUnit.getType());
}
}
@ -62,7 +61,7 @@ public class TestBot1 {
for (Unit neutralUnit : game.neutral().getUnits()) {
if (neutralUnit.getType().isMineralField()) {
if (closestMineral == null || myUnit.getDistance(neutralUnit) < myUnit.getDistance(closestMineral)) {
if (closestMineral == null || myUnit.distanceTo(neutralUnit) < myUnit.distanceTo(closestMineral)) {
closestMineral = neutralUnit;
}
}
@ -70,15 +69,18 @@ public class TestBot1 {
if (closestMineral != null) {
myUnit.gather(closestMineral, false);
//myUnit.gather(closestMineral, false);
//game.issueCommand(UnitCommand.gather(myUnit, closestMineral, false));
UnitCommand uc = UnitCommand.gather(myUnit, closestMineral);
myUnit.issueCommand(uc);
}
}
}
*/
//draw my units on screen
game.drawTextScreen(10, 25, Utils.formatText("hello world", Utils.Blue));
//game.drawTextScreen(10, 25, Utils.formatText("hello world", Utils.Blue));
game.drawTextScreen(10, 25, Utils.formatText(units.toString(), Utils.Blue));
}
});
/*

View file

@ -12,10 +12,10 @@ import java.util.List;
*/
public class PointerTest {
private static final List<String> BWAPI4_INTERFACES = Arrays.asList("Client", "Game", "AIModule" ,"Event");
private static final List<String> BWAPI4_INTERFACES = Arrays.asList("Client", "Game", "AIModule" ,"Event", "Race", "Error");
private static boolean testCls(String cls){
return BWAPI4_INTERFACES.contains(cls) || cls.endsWith("set");
return BWAPI4_INTERFACES.contains(cls) || cls.endsWith("set") || cls.endsWith("Type");
}
public static String test(String cls) {