restore include paths for cross-platform builds because i messed absolutely every #include up. dont worry that everything is modified, all i did was normalize line endings because CLRF snuck into the repo and this prevents fake diffs

This commit is contained in:
2026-03-24 19:07:55 -04:00
parent 7d485fdcd7
commit bfecad40be
1340 changed files with 264990 additions and 264996 deletions

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="gen"/>
<classpathentry excluding="*.svn|.svn|com/mojang/minecraftpe/MainActivity.java|com/mojang/minecraftpe/Minecraft_Verizon.java" kind="src" path="src_linked"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="gen"/>
<classpathentry excluding="*.svn|.svn|com/mojang/minecraftpe/MainActivity.java|com/mojang/minecraftpe/Minecraft_Verizon.java" kind="src" path="src_linked"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@@ -1,40 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MinecraftPocketEdition_java</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>src_linked</name>
<type>2</type>
<location>C:/dev/subversion/mojang/minecraftcpp/trunk/handheld/project/android/src</location>
</link>
</linkedResources>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MinecraftPocketEdition_java</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>src_linked</name>
<type>2</type>
<location>C:/dev/subversion/mojang/minecraftcpp/trunk/handheld/project/android/src</location>
</link>
</linkedResources>
</projectDescription>

View File

@@ -1,13 +1,13 @@
<!-- Verizon VCAST -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.START_BACKGROUND_SERVICE"/>
<uses-permission android:name="com.verizon.vcast.apps.VCAST_APPS_LICENSE_SERVICE"/>
android:debuggable="true"
<!-- Android MARKET -->
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<!-- Google Analytics -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Verizon VCAST -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.START_BACKGROUND_SERVICE"/>
<uses-permission android:name="com.verizon.vcast.apps.VCAST_APPS_LICENSE_SERVICE"/>
android:debuggable="true"
<!-- Android MARKET -->
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<!-- Google Analytics -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

File diff suppressed because it is too large Load Diff

View File

@@ -1,250 +1,250 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := minecraftpe
LOCAL_SRC_FILES := ../../../src/main.cpp \
../../../src/main_android_java.cpp \
../../../src/platform/input/Controller.cpp \
../../../src/platform/input/Keyboard.cpp \
../../../src/platform/input/Mouse.cpp \
../../../src/platform/input/Multitouch.cpp \
../../../src/platform/time.cpp \
../../../src/platform/CThread.cpp \
../../../src/NinecraftApp.cpp \
../../../src/Performance.cpp \
../../../src/SharedConstants.cpp \
../../../src/client/IConfigListener.cpp \
../../../src/client/Minecraft.cpp \
../../../src/client/MouseHandler.cpp \
../../../src/client/Options.cpp \
../../../src/client/OptionStrings.cpp \
../../../src/client/gamemode/GameMode.cpp \
../../../src/client/gamemode/CreativeMode.cpp \
../../../src/client/gamemode/SurvivalMode.cpp \
../../../src/client/gui/components/Button.cpp \
../../../src/client/gui/components/ImageButton.cpp \
../../../src/client/gui/components/ItemPane.cpp \
../../../src/client/gui/components/InventoryPane.cpp \
../../../src/client/gui/components/LargeImageButton.cpp \
../../../src/client/gui/components/RolledSelectionListH.cpp \
../../../src/client/gui/components/RolledSelectionListV.cpp \
../../../src/client/gui/components/ScrolledSelectionList.cpp \
../../../src/client/gui/components/ScrollingPane.cpp \
../../../src/client/gui/components/SmallButton.cpp \
../../../src/client/gui/Font.cpp \
../../../src/client/gui/Gui.cpp \
../../../src/client/gui/GuiComponent.cpp \
../../../src/client/gui/Screen.cpp \
../../../src/client/gui/screens/ScreenChooser.cpp \
../../../src/client/gui/screens/ChatScreen.cpp \
../../../src/client/gui/screens/ChestScreen.cpp \
../../../src/client/gui/screens/ConfirmScreen.cpp \
../../../src/client/gui/screens/DeathScreen.cpp \
../../../src/client/gui/screens/FurnaceScreen.cpp \
../../../src/client/gui/screens/InBedScreen.cpp \
../../../src/client/gui/screens/IngameBlockSelectionScreen.cpp \
../../../src/client/gui/screens/JoinGameScreen.cpp \
../../../src/client/gui/screens/OptionsScreen.cpp \
../../../src/client/gui/screens/PauseScreen.cpp \
../../../src/client/gui/screens/ProgressScreen.cpp \
../../../src/client/gui/screens/RenameMPLevelScreen.cpp \
../../../src/client/gui/screens/SelectWorldScreen.cpp \
../../../src/client/gui/screens/StartMenuScreen.cpp \
../../../src/client/gui/screens/TextEditScreen.cpp \
../../../src/client/gui/screens/touch/TouchIngameBlockSelectionScreen.cpp \
../../../src/client/gui/screens/touch/TouchJoinGameScreen.cpp \
../../../src/client/gui/screens/touch/TouchSelectWorldScreen.cpp \
../../../src/client/gui/screens/touch/TouchStartMenuScreen.cpp \
../../../src/client/gui/screens/UploadPhotoScreen.cpp \
../../../src/client/gui/screens/crafting/PaneCraftingScreen.cpp \
../../../src/client/gui/screens/crafting/WorkbenchScreen.cpp \
../../../src/client/model/ChickenModel.cpp \
../../../src/client/model/CowModel.cpp \
../../../src/client/model/HumanoidModel.cpp \
../../../src/client/model/PigModel.cpp \
../../../src/client/model/SheepFurModel.cpp \
../../../src/client/model/SheepModel.cpp \
../../../src/client/model/QuadrupedModel.cpp \
../../../src/client/model/geom/Cube.cpp \
../../../src/client/model/geom/ModelPart.cpp \
../../../src/client/model/geom/Polygon.cpp \
../../../src/client/particle/Particle.cpp \
../../../src/client/particle/ParticleEngine.cpp \
../../../src/client/player/LocalPlayer.cpp \
../../../src/client/player/RemotePlayer.cpp \
../../../src/client/player/input/KeyboardInput.cpp \
../../../src/client/player/input/touchscreen/TouchscreenInput.cpp \
../../../src/client/renderer/Chunk.cpp \
../../../src/client/renderer/EntityTileRenderer.cpp \
../../../src/client/renderer/GameRenderer.cpp \
../../../src/client/renderer/ItemInHandRenderer.cpp \
../../../src/client/renderer/LevelRenderer.cpp \
../../../src/client/renderer/RenderChunk.cpp \
../../../src/client/renderer/RenderList.cpp \
../../../src/client/renderer/Tesselator.cpp \
../../../src/client/renderer/Textures.cpp \
../../../src/client/renderer/TileRenderer.cpp \
../../../src/client/renderer/gles.cpp \
../../../src/client/renderer/culling/Frustum.cpp \
../../../src/client/renderer/entity/ArrowRenderer.cpp \
../../../src/client/renderer/entity/ChickenRenderer.cpp \
../../../src/client/renderer/entity/EntityRenderDispatcher.cpp \
../../../src/client/renderer/entity/EntityRenderer.cpp \
../../../src/client/renderer/entity/HumanoidMobRenderer.cpp \
../../../src/client/renderer/entity/ItemRenderer.cpp \
../../../src/client/renderer/entity/ItemSpriteRenderer.cpp \
../../../src/client/renderer/entity/MobRenderer.cpp \
../../../src/client/renderer/entity/PaintingRenderer.cpp \
../../../src/client/renderer/entity/PlayerRenderer.cpp \
../../../src/client/renderer/entity/SheepRenderer.cpp \
../../../src/client/renderer/entity/TntRenderer.cpp \
../../../src/client/renderer/entity/TripodCameraRenderer.cpp \
../../../src/client/renderer/ptexture/DynamicTexture.cpp \
../../../src/client/renderer/tileentity/ChestRenderer.cpp \
../../../src/client/renderer/tileentity/SignRenderer.cpp \
../../../src/client/renderer/tileentity/TileEntityRenderDispatcher.cpp \
../../../src/client/renderer/tileentity/TileEntityRenderer.cpp \
../../../src/client/sound/Sound.cpp \
../../../src/client/sound/SoundEngine.cpp \
../../../src/locale/I18n.cpp \
../../../src/nbt/Tag.cpp \
../../../src/network/command/CommandServer.cpp \
../../../src/network/ClientSideNetworkHandler.cpp \
../../../src/network/NetEventCallback.cpp \
../../../src/network/Packet.cpp \
../../../src/network/RakNetInstance.cpp \
../../../src/network/ServerSideNetworkHandler.cpp \
../../../src/server/ServerLevel.cpp \
../../../src/server/ServerPlayer.cpp \
../../../src/util/DataIO.cpp \
../../../src/util/Mth.cpp \
../../../src/util/StringUtils.cpp \
../../../src/util/PerfTimer.cpp \
../../../src/util/PerfRenderer.cpp \
../../../src/world/Direction.cpp \
../../../src/world/entity/AgableMob.cpp \
../../../src/world/entity/Entity.cpp \
../../../src/world/entity/EntityFactory.cpp \
../../../src/world/entity/FlyingMob.cpp \
../../../src/world/entity/HangingEntity.cpp \
../../../src/world/entity/Mob.cpp \
../../../src/world/entity/MobCategory.cpp \
../../../src/world/entity/Motive.cpp \
../../../src/world/entity/Painting.cpp \
../../../src/world/entity/PathfinderMob.cpp \
../../../src/world/entity/SynchedEntityData.cpp \
../../../src/world/entity/ai/control/MoveControl.cpp \
../../../src/world/entity/animal/Animal.cpp \
../../../src/world/entity/animal/Chicken.cpp \
../../../src/world/entity/animal/Cow.cpp \
../../../src/world/entity/animal/Pig.cpp \
../../../src/world/entity/animal/Sheep.cpp \
../../../src/world/entity/animal/WaterAnimal.cpp \
../../../src/world/entity/item/FallingTile.cpp \
../../../src/world/entity/item/ItemEntity.cpp \
../../../src/world/entity/item/PrimedTnt.cpp \
../../../src/world/entity/item/TripodCamera.cpp \
../../../src/world/entity/monster/Creeper.cpp \
../../../src/world/entity/monster/Monster.cpp \
../../../src/world/entity/monster/PigZombie.cpp \
../../../src/world/entity/monster/Skeleton.cpp \
../../../src/world/entity/monster/Spider.cpp \
../../../src/world/entity/monster/Zombie.cpp \
../../../src/world/entity/projectile/Arrow.cpp \
../../../src/world/entity/projectile/Throwable.cpp \
../../../src/world/entity/player/Inventory.cpp \
../../../src/world/entity/player/Player.cpp \
../../../src/world/food/SimpleFoodData.cpp \
../../../src/world/inventory/BaseContainerMenu.cpp \
../../../src/world/inventory/ContainerMenu.cpp \
../../../src/world/inventory/FillingContainer.cpp \
../../../src/world/inventory/FurnaceMenu.cpp \
../../../src/world/item/BedItem.cpp \
../../../src/world/item/DyePowderItem.cpp \
../../../src/world/item/Item.cpp \
../../../src/world/item/ItemInstance.cpp \
../../../src/world/item/HangingEntityItem.cpp \
../../../src/world/item/HatchetItem.cpp \
../../../src/world/item/HoeItem.cpp \
../../../src/world/item/PickaxeItem.cpp \
../../../src/world/item/ShovelItem.cpp \
../../../src/world/item/crafting/Recipe.cpp \
../../../src/world/item/crafting/Recipes.cpp \
../../../src/world/item/crafting/FurnaceRecipes.cpp \
../../../src/world/item/crafting/OreRecipes.cpp \
../../../src/world/item/crafting/StructureRecipes.cpp \
../../../src/world/item/crafting/ToolRecipes.cpp \
../../../src/world/item/crafting/WeaponRecipes.cpp \
../../../src/world/level/Explosion.cpp \
../../../src/world/level/Level.cpp \
../../../src/world/level/LightLayer.cpp \
../../../src/world/level/LightUpdate.cpp \
../../../src/world/level/MobSpawner.cpp \
../../../src/world/level/Region.cpp \
../../../src/world/level/TickNextTickData.cpp \
../../../src/world/level/biome/Biome.cpp \
../../../src/world/level/biome/BiomeSource.cpp \
../../../src/world/level/chunk/LevelChunk.cpp \
../../../src/world/level/dimension/Dimension.cpp \
../../../src/world/level/levelgen/CanyonFeature.cpp \
../../../src/world/level/levelgen/DungeonFeature.cpp \
../../../src/world/level/levelgen/LargeCaveFeature.cpp \
../../../src/world/level/levelgen/LargeFeature.cpp \
../../../src/world/level/levelgen/RandomLevelSource.cpp \
../../../src/world/level/levelgen/feature/Feature.cpp \
../../../src/world/level/levelgen/synth/ImprovedNoise.cpp \
../../../src/world/level/levelgen/synth/PerlinNoise.cpp \
../../../src/world/level/levelgen/synth/Synth.cpp \
../../../src/world/level/material/Material.cpp \
../../../src/world/level/pathfinder/Path.cpp \
../../../src/world/level/storage/ExternalFileLevelStorage.cpp \
../../../src/world/level/storage/ExternalFileLevelStorageSource.cpp \
../../../src/world/level/storage/FolderMethods.cpp \
../../../src/world/level/storage/LevelData.cpp \
../../../src/world/level/storage/LevelStorageSource.cpp \
../../../src/world/level/storage/RegionFile.cpp \
../../../src/world/level/tile/BedTile.cpp \
../../../src/world/level/tile/ChestTile.cpp \
../../../src/world/level/tile/CropTile.cpp \
../../../src/world/level/tile/DoorTile.cpp \
../../../src/world/level/tile/EntityTile.cpp \
../../../src/world/level/tile/FurnaceTile.cpp \
../../../src/world/level/tile/GrassTile.cpp \
../../../src/world/level/tile/LightGemTile.cpp \
../../../src/world/level/tile/MelonTile.cpp \
../../../src/world/level/tile/Mushroom.cpp \
../../../src/world/level/tile/NetherReactor.cpp \
../../../src/world/level/tile/NetherReactorPattern.cpp \
../../../src/world/level/tile/SandTile.cpp \
../../../src/world/level/tile/StemTile.cpp \
../../../src/world/level/tile/StoneSlabTile.cpp \
../../../src/world/level/tile/TallGrass.cpp \
../../../src/world/level/tile/Tile.cpp \
../../../src/world/level/tile/TrapDoorTile.cpp \
../../../src/world/level/tile/entity/ChestTileEntity.cpp \
../../../src/world/level/tile/entity/NetherReactorTileEntity.cpp \
../../../src/world/level/tile/entity/SignTileEntity.cpp \
../../../src/world/level/tile/entity/TileEntity.cpp \
../../../src/world/level/tile/entity/FurnaceTileEntity.cpp \
../../../src/world/phys/HitResult.cpp
LOCAL_CFLAGS := -Wno-psabi $(LOCAL_CFLAGS)
LOCAL_CFLAGS := -DPRE_ANDROID23 -DANDROID_PUBLISH $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 -DANDROID_PUBLISH -DDEMO_MODE $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 -DDEMO_MODE $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 $(LOCAL_CFLAGS)
LOCAL_LDLIBS := -llog -lEGL -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := RakNet
TARGET_ARCH_ABI := armeabi-v7a
include $(BUILD_SHARED_LIBRARY)
# NOTE: environment var NDK_MODULE_PATH needs to point to lib_projects folder
$(call import-module, raknet/jni)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := minecraftpe
LOCAL_SRC_FILES := ../../../src/main.cpp \
../../../src/main_android_java.cpp \
../../../src/platform/input/Controller.cpp \
../../../src/platform/input/Keyboard.cpp \
../../../src/platform/input/Mouse.cpp \
../../../src/platform/input/Multitouch.cpp \
../../../src/platform/time.cpp \
../../../src/platform/CThread.cpp \
../../../src/NinecraftApp.cpp \
../../../src/Performance.cpp \
../../../src/SharedConstants.cpp \
../../../src/client/IConfigListener.cpp \
../../../src/client/Minecraft.cpp \
../../../src/client/MouseHandler.cpp \
../../../src/client/Options.cpp \
../../../src/client/OptionStrings.cpp \
../../../src/client/gamemode/GameMode.cpp \
../../../src/client/gamemode/CreativeMode.cpp \
../../../src/client/gamemode/SurvivalMode.cpp \
../../../src/client/gui/components/Button.cpp \
../../../src/client/gui/components/ImageButton.cpp \
../../../src/client/gui/components/ItemPane.cpp \
../../../src/client/gui/components/InventoryPane.cpp \
../../../src/client/gui/components/LargeImageButton.cpp \
../../../src/client/gui/components/RolledSelectionListH.cpp \
../../../src/client/gui/components/RolledSelectionListV.cpp \
../../../src/client/gui/components/ScrolledSelectionList.cpp \
../../../src/client/gui/components/ScrollingPane.cpp \
../../../src/client/gui/components/SmallButton.cpp \
../../../src/client/gui/Font.cpp \
../../../src/client/gui/Gui.cpp \
../../../src/client/gui/GuiComponent.cpp \
../../../src/client/gui/Screen.cpp \
../../../src/client/gui/screens/ScreenChooser.cpp \
../../../src/client/gui/screens/ChatScreen.cpp \
../../../src/client/gui/screens/ChestScreen.cpp \
../../../src/client/gui/screens/ConfirmScreen.cpp \
../../../src/client/gui/screens/DeathScreen.cpp \
../../../src/client/gui/screens/FurnaceScreen.cpp \
../../../src/client/gui/screens/InBedScreen.cpp \
../../../src/client/gui/screens/IngameBlockSelectionScreen.cpp \
../../../src/client/gui/screens/JoinGameScreen.cpp \
../../../src/client/gui/screens/OptionsScreen.cpp \
../../../src/client/gui/screens/PauseScreen.cpp \
../../../src/client/gui/screens/ProgressScreen.cpp \
../../../src/client/gui/screens/RenameMPLevelScreen.cpp \
../../../src/client/gui/screens/SelectWorldScreen.cpp \
../../../src/client/gui/screens/StartMenuScreen.cpp \
../../../src/client/gui/screens/TextEditScreen.cpp \
../../../src/client/gui/screens/touch/TouchIngameBlockSelectionScreen.cpp \
../../../src/client/gui/screens/touch/TouchJoinGameScreen.cpp \
../../../src/client/gui/screens/touch/TouchSelectWorldScreen.cpp \
../../../src/client/gui/screens/touch/TouchStartMenuScreen.cpp \
../../../src/client/gui/screens/UploadPhotoScreen.cpp \
../../../src/client/gui/screens/crafting/PaneCraftingScreen.cpp \
../../../src/client/gui/screens/crafting/WorkbenchScreen.cpp \
../../../src/client/model/ChickenModel.cpp \
../../../src/client/model/CowModel.cpp \
../../../src/client/model/HumanoidModel.cpp \
../../../src/client/model/PigModel.cpp \
../../../src/client/model/SheepFurModel.cpp \
../../../src/client/model/SheepModel.cpp \
../../../src/client/model/QuadrupedModel.cpp \
../../../src/client/model/geom/Cube.cpp \
../../../src/client/model/geom/ModelPart.cpp \
../../../src/client/model/geom/Polygon.cpp \
../../../src/client/particle/Particle.cpp \
../../../src/client/particle/ParticleEngine.cpp \
../../../src/client/player/LocalPlayer.cpp \
../../../src/client/player/RemotePlayer.cpp \
../../../src/client/player/input/KeyboardInput.cpp \
../../../src/client/player/input/touchscreen/TouchscreenInput.cpp \
../../../src/client/renderer/Chunk.cpp \
../../../src/client/renderer/EntityTileRenderer.cpp \
../../../src/client/renderer/GameRenderer.cpp \
../../../src/client/renderer/ItemInHandRenderer.cpp \
../../../src/client/renderer/LevelRenderer.cpp \
../../../src/client/renderer/RenderChunk.cpp \
../../../src/client/renderer/RenderList.cpp \
../../../src/client/renderer/Tesselator.cpp \
../../../src/client/renderer/Textures.cpp \
../../../src/client/renderer/TileRenderer.cpp \
../../../src/client/renderer/gles.cpp \
../../../src/client/renderer/culling/Frustum.cpp \
../../../src/client/renderer/entity/ArrowRenderer.cpp \
../../../src/client/renderer/entity/ChickenRenderer.cpp \
../../../src/client/renderer/entity/EntityRenderDispatcher.cpp \
../../../src/client/renderer/entity/EntityRenderer.cpp \
../../../src/client/renderer/entity/HumanoidMobRenderer.cpp \
../../../src/client/renderer/entity/ItemRenderer.cpp \
../../../src/client/renderer/entity/ItemSpriteRenderer.cpp \
../../../src/client/renderer/entity/MobRenderer.cpp \
../../../src/client/renderer/entity/PaintingRenderer.cpp \
../../../src/client/renderer/entity/PlayerRenderer.cpp \
../../../src/client/renderer/entity/SheepRenderer.cpp \
../../../src/client/renderer/entity/TntRenderer.cpp \
../../../src/client/renderer/entity/TripodCameraRenderer.cpp \
../../../src/client/renderer/ptexture/DynamicTexture.cpp \
../../../src/client/renderer/tileentity/ChestRenderer.cpp \
../../../src/client/renderer/tileentity/SignRenderer.cpp \
../../../src/client/renderer/tileentity/TileEntityRenderDispatcher.cpp \
../../../src/client/renderer/tileentity/TileEntityRenderer.cpp \
../../../src/client/sound/Sound.cpp \
../../../src/client/sound/SoundEngine.cpp \
../../../src/locale/I18n.cpp \
../../../src/nbt/Tag.cpp \
../../../src/network/command/CommandServer.cpp \
../../../src/network/ClientSideNetworkHandler.cpp \
../../../src/network/NetEventCallback.cpp \
../../../src/network/Packet.cpp \
../../../src/network/RakNetInstance.cpp \
../../../src/network/ServerSideNetworkHandler.cpp \
../../../src/server/ServerLevel.cpp \
../../../src/server/ServerPlayer.cpp \
../../../src/util/DataIO.cpp \
../../../src/util/Mth.cpp \
../../../src/util/StringUtils.cpp \
../../../src/util/PerfTimer.cpp \
../../../src/util/PerfRenderer.cpp \
../../../src/world/Direction.cpp \
../../../src/world/entity/AgableMob.cpp \
../../../src/world/entity/Entity.cpp \
../../../src/world/entity/EntityFactory.cpp \
../../../src/world/entity/FlyingMob.cpp \
../../../src/world/entity/HangingEntity.cpp \
../../../src/world/entity/Mob.cpp \
../../../src/world/entity/MobCategory.cpp \
../../../src/world/entity/Motive.cpp \
../../../src/world/entity/Painting.cpp \
../../../src/world/entity/PathfinderMob.cpp \
../../../src/world/entity/SynchedEntityData.cpp \
../../../src/world/entity/ai/control/MoveControl.cpp \
../../../src/world/entity/animal/Animal.cpp \
../../../src/world/entity/animal/Chicken.cpp \
../../../src/world/entity/animal/Cow.cpp \
../../../src/world/entity/animal/Pig.cpp \
../../../src/world/entity/animal/Sheep.cpp \
../../../src/world/entity/animal/WaterAnimal.cpp \
../../../src/world/entity/item/FallingTile.cpp \
../../../src/world/entity/item/ItemEntity.cpp \
../../../src/world/entity/item/PrimedTnt.cpp \
../../../src/world/entity/item/TripodCamera.cpp \
../../../src/world/entity/monster/Creeper.cpp \
../../../src/world/entity/monster/Monster.cpp \
../../../src/world/entity/monster/PigZombie.cpp \
../../../src/world/entity/monster/Skeleton.cpp \
../../../src/world/entity/monster/Spider.cpp \
../../../src/world/entity/monster/Zombie.cpp \
../../../src/world/entity/projectile/Arrow.cpp \
../../../src/world/entity/projectile/Throwable.cpp \
../../../src/world/entity/player/Inventory.cpp \
../../../src/world/entity/player/Player.cpp \
../../../src/world/food/SimpleFoodData.cpp \
../../../src/world/inventory/BaseContainerMenu.cpp \
../../../src/world/inventory/ContainerMenu.cpp \
../../../src/world/inventory/FillingContainer.cpp \
../../../src/world/inventory/FurnaceMenu.cpp \
../../../src/world/item/BedItem.cpp \
../../../src/world/item/DyePowderItem.cpp \
../../../src/world/item/Item.cpp \
../../../src/world/item/ItemInstance.cpp \
../../../src/world/item/HangingEntityItem.cpp \
../../../src/world/item/HatchetItem.cpp \
../../../src/world/item/HoeItem.cpp \
../../../src/world/item/PickaxeItem.cpp \
../../../src/world/item/ShovelItem.cpp \
../../../src/world/item/crafting/Recipe.cpp \
../../../src/world/item/crafting/Recipes.cpp \
../../../src/world/item/crafting/FurnaceRecipes.cpp \
../../../src/world/item/crafting/OreRecipes.cpp \
../../../src/world/item/crafting/StructureRecipes.cpp \
../../../src/world/item/crafting/ToolRecipes.cpp \
../../../src/world/item/crafting/WeaponRecipes.cpp \
../../../src/world/level/Explosion.cpp \
../../../src/world/level/Level.cpp \
../../../src/world/level/LightLayer.cpp \
../../../src/world/level/LightUpdate.cpp \
../../../src/world/level/MobSpawner.cpp \
../../../src/world/level/Region.cpp \
../../../src/world/level/TickNextTickData.cpp \
../../../src/world/level/biome/Biome.cpp \
../../../src/world/level/biome/BiomeSource.cpp \
../../../src/world/level/chunk/LevelChunk.cpp \
../../../src/world/level/dimension/Dimension.cpp \
../../../src/world/level/levelgen/CanyonFeature.cpp \
../../../src/world/level/levelgen/DungeonFeature.cpp \
../../../src/world/level/levelgen/LargeCaveFeature.cpp \
../../../src/world/level/levelgen/LargeFeature.cpp \
../../../src/world/level/levelgen/RandomLevelSource.cpp \
../../../src/world/level/levelgen/feature/Feature.cpp \
../../../src/world/level/levelgen/synth/ImprovedNoise.cpp \
../../../src/world/level/levelgen/synth/PerlinNoise.cpp \
../../../src/world/level/levelgen/synth/Synth.cpp \
../../../src/world/level/material/Material.cpp \
../../../src/world/level/pathfinder/Path.cpp \
../../../src/world/level/storage/ExternalFileLevelStorage.cpp \
../../../src/world/level/storage/ExternalFileLevelStorageSource.cpp \
../../../src/world/level/storage/FolderMethods.cpp \
../../../src/world/level/storage/LevelData.cpp \
../../../src/world/level/storage/LevelStorageSource.cpp \
../../../src/world/level/storage/RegionFile.cpp \
../../../src/world/level/tile/BedTile.cpp \
../../../src/world/level/tile/ChestTile.cpp \
../../../src/world/level/tile/CropTile.cpp \
../../../src/world/level/tile/DoorTile.cpp \
../../../src/world/level/tile/EntityTile.cpp \
../../../src/world/level/tile/FurnaceTile.cpp \
../../../src/world/level/tile/GrassTile.cpp \
../../../src/world/level/tile/LightGemTile.cpp \
../../../src/world/level/tile/MelonTile.cpp \
../../../src/world/level/tile/Mushroom.cpp \
../../../src/world/level/tile/NetherReactor.cpp \
../../../src/world/level/tile/NetherReactorPattern.cpp \
../../../src/world/level/tile/SandTile.cpp \
../../../src/world/level/tile/StemTile.cpp \
../../../src/world/level/tile/StoneSlabTile.cpp \
../../../src/world/level/tile/TallGrass.cpp \
../../../src/world/level/tile/Tile.cpp \
../../../src/world/level/tile/TrapDoorTile.cpp \
../../../src/world/level/tile/entity/ChestTileEntity.cpp \
../../../src/world/level/tile/entity/NetherReactorTileEntity.cpp \
../../../src/world/level/tile/entity/SignTileEntity.cpp \
../../../src/world/level/tile/entity/TileEntity.cpp \
../../../src/world/level/tile/entity/FurnaceTileEntity.cpp \
../../../src/world/phys/HitResult.cpp
LOCAL_CFLAGS := -Wno-psabi $(LOCAL_CFLAGS)
LOCAL_CFLAGS := -DPRE_ANDROID23 -DANDROID_PUBLISH $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 -DANDROID_PUBLISH -DDEMO_MODE $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 -DDEMO_MODE $(LOCAL_CFLAGS)
#LOCAL_CFLAGS := -DPRE_ANDROID23 $(LOCAL_CFLAGS)
LOCAL_LDLIBS := -llog -lEGL -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := RakNet
TARGET_ARCH_ABI := armeabi-v7a
include $(BUILD_SHARED_LIBRARY)
# NOTE: environment var NDK_MODULE_PATH needs to point to lib_projects folder
$(call import-module, raknet/jni)

View File

@@ -1,66 +1,66 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class com.mojang.minecraftpe.GameModeButton
-keep public class com.mojang.android.StringValue
-keep public class * extends android.app.Activity
-keep public class * extends com.mojang.minecraftpe.MainActivity
-keep public class * extends MainActivity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keep,allowobfuscation class com.mojang.** { *** *(...); }
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class * extends android.app.Activity {
static public void saveScreenshot(java.lang.String, int, int, int[]);
public int[] getImageData(java.lang.String);
public byte[] getFileDataBytes(java.lang.String);
public java.lang.String getPlatformStringVar(int);
public int getScreenWidth();
public int getScreenHeight();
public float getPixelsPerMillimeter();
public int checkLicense();
public boolean isNetworkEnabled(boolean);
public java.lang.String getDateString(int);
public boolean hasBuyButtonWhenInvalidLicense();
public void postScreenshotToFacebook(java.lang.String, int, int, int[]);
public void quit();
public void displayDialog(int);
public void tick();
public java.lang.String[] getOptionStrings();
public void buyGame();
public void playSound(java.lang.String, float, float);
public boolean isTouchscreen();
public void setIsPowerVR(boolean);
public void initiateUserInput(int);
public int getUserInputStatus();
public java.lang.String[] getUserInputString();
public void vibrate(int);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class com.mojang.minecraftpe.GameModeButton
-keep public class com.mojang.android.StringValue
-keep public class * extends android.app.Activity
-keep public class * extends com.mojang.minecraftpe.MainActivity
-keep public class * extends MainActivity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keep,allowobfuscation class com.mojang.** { *** *(...); }
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class * extends android.app.Activity {
static public void saveScreenshot(java.lang.String, int, int, int[]);
public int[] getImageData(java.lang.String);
public byte[] getFileDataBytes(java.lang.String);
public java.lang.String getPlatformStringVar(int);
public int getScreenWidth();
public int getScreenHeight();
public float getPixelsPerMillimeter();
public int checkLicense();
public boolean isNetworkEnabled(boolean);
public java.lang.String getDateString(int);
public boolean hasBuyButtonWhenInvalidLicense();
public void postScreenshotToFacebook(java.lang.String, int, int, int[]);
public void quit();
public void displayDialog(int);
public void tick();
public java.lang.String[] getOptionStrings();
public void buyGame();
public void playSound(java.lang.String, float, float);
public boolean isTouchscreen();
public void setIsPowerVR(boolean);
public void initiateUserInput(int);
public int getUserInputStatus();
public java.lang.String[] getUserInputString();
public void vibrate(int);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

View File

@@ -1,4 +1,4 @@
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg32"
android:tileMode="repeat"
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg32"
android:tileMode="repeat"
android:dither="false" />

View File

@@ -1,5 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/cancel_1_3" />
<item android:drawable="@drawable/cancel_0_3" />
</selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/cancel_1_3" />
<item android:drawable="@drawable/cancel_0_3" />
</selector>

View File

@@ -1,5 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/create_1_3" />
<item android:drawable="@drawable/create_0_3" />
</selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/create_1_3" />
<item android:drawable="@drawable/create_0_3" />
</selector>

View File

@@ -1,5 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/creative_3" />
<item android:drawable="@drawable/survival_3" />
</selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/creative_3" />
<item android:drawable="@drawable/survival_3" />
</selector>

View File

@@ -1,177 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" android:background="@drawable/bgtiled">
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="18"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_weight="0" >
<ImageButton
android:id="@+id/button_createworld_cancel"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="3"
android:background="@drawable/btn_nw_cancel" />
<ImageButton
android:id="@+id/header_createworld_worldname"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="7"
android:background="@drawable/worldname_3" />
<ImageButton
android:id="@+id/button_createworld_create"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="3"
android:background="@drawable/btn_nw_create" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" android:layout_marginBottom="20dp">
<View
android:id="@+id/View01"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
<com.mojang.android.EditTextAscii
android:id="@+id/editText_worldName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.50"
android:gravity="center_horizontal"
android:text="@string/createworld_new_world"
android:typeface="monospace" >
<requestFocus />
</com.mojang.android.EditTextAscii>
<View
android:id="@+id/view1"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:gravity="center_horizontal">
<com.mojang.minecraftpe.GameModeButton
android:id="@+id/button_gameMode"
android:layout_width="173dp"
android:layout_height="46dp"
android:background="@drawable/btngamemode"
android:text="Button" android:textOff=" " android:textOn=" "/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingBottom="20dp" >
<TextView
android:id="@+id/labelGameModeDesc"
android:text="@string/gamemode_survival_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="monospace"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createworld_seed" android:typeface="monospace"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<View
android:id="@+id/View03"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
<EditText
android:id="@+id/editText_worldSeed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:singleLine="true"
android:typeface="monospace" android:gravity="center_horizontal"/>
<View
android:id="@+id/View02"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createworld_seed_info" android:typeface="monospace"/>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" android:background="@drawable/bgtiled">
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="18"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_weight="0" >
<ImageButton
android:id="@+id/button_createworld_cancel"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="3"
android:background="@drawable/btn_nw_cancel" />
<ImageButton
android:id="@+id/header_createworld_worldname"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="7"
android:background="@drawable/worldname_3" />
<ImageButton
android:id="@+id/button_createworld_create"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="3"
android:background="@drawable/btn_nw_create" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" android:layout_marginBottom="20dp">
<View
android:id="@+id/View01"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
<com.mojang.android.EditTextAscii
android:id="@+id/editText_worldName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.50"
android:gravity="center_horizontal"
android:text="@string/createworld_new_world"
android:typeface="monospace" >
<requestFocus />
</com.mojang.android.EditTextAscii>
<View
android:id="@+id/view1"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:gravity="center_horizontal">
<com.mojang.minecraftpe.GameModeButton
android:id="@+id/button_gameMode"
android:layout_width="173dp"
android:layout_height="46dp"
android:background="@drawable/btngamemode"
android:text="Button" android:textOff=" " android:textOn=" "/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingBottom="20dp" >
<TextView
android:id="@+id/labelGameModeDesc"
android:text="@string/gamemode_survival_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="monospace"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createworld_seed" android:typeface="monospace"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<View
android:id="@+id/View03"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
<EditText
android:id="@+id/editText_worldSeed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:singleLine="true"
android:typeface="monospace" android:gravity="center_horizontal"/>
<View
android:id="@+id/View02"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.25" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createworld_seed_info" android:typeface="monospace"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bgtiled"
android:tileMode="repeat" >
<TextView android:text="Multiplayer username"
android:layout_width="540px"
android:layout_height="24dp" />
<EditText android:id="@+id/editText_options_mpusername"
android:text=""
android:layout_width="fill_parent"
android:layout_height="48dp"
android:singleLine="true">
</EditText>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bgtiled"
android:tileMode="repeat" >
<TextView android:text="Multiplayer username"
android:layout_width="540px"
android:layout_height="24dp" />
<EditText android:id="@+id/editText_options_mpusername"
android:text=""
android:layout_width="fill_parent"
android:layout_height="48dp"
android:singleLine="true">
</EditText>
</LinearLayout>

View File

@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bgtiled"
android:tileMode="repeat"
android:gravity="center_horizontal"
>
<TextView android:text = "@string/renameworld_title"
android:layout_width="360dp"
android:layout_height="24dp"
android:typeface="monospace"
/>
<com.mojang.android.EditTextAscii
android:id="@+id/editText_worldNameRename"
android:text="@string/renameworld_saved_world"
android:layout_width="360dp"
android:layout_height="48dp"
android:singleLine="true"
android:typeface="monospace"
android:maxLength="64"
android:imeActionLabel="Ok"
android:imeOptions="actionDone" />
<View
android:layout_width="360dp"
android:layout_height="10px" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bgtiled"
android:tileMode="repeat"
android:gravity="center_horizontal"
>
<TextView android:text = "@string/renameworld_title"
android:layout_width="360dp"
android:layout_height="24dp"
android:typeface="monospace"
/>
<com.mojang.android.EditTextAscii
android:id="@+id/editText_worldNameRename"
android:text="@string/renameworld_saved_world"
android:layout_width="360dp"
android:layout_height="48dp"
android:singleLine="true"
android:typeface="monospace"
android:maxLength="64"
android:imeActionLabel="Ok"
android:imeOptions="actionDone" />
<View
android:layout_width="360dp"
android:layout_height="10px" />
</LinearLayout>

View File

@@ -1,40 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Minecraft - Pocket Edition</string>
<string name="app_name_demo">Minecraft - Pocket Edition Demo</string>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Minecraft - Pocket Edition</string>
<string name="app_name_demo">Minecraft - Pocket Edition Demo</string>
<string name="xperiaplayoptimized_content">true</string>
<string name="app_name_short">Minecraft PE</string>
<string name="app_name_short_demo">Minecraft PE Demo</string>
<!-- CREATE NEW WORLD -->
<string name="createworld_name">World name</string>
<string name="createworld_new_world">Unnamed world</string>
<string name="createworld_seed">Seed for the World Generator</string>
<string name="createworld_seed_info">Leave blank for random seed</string>
<string name="gamemode_survival_summary">Mobs, health and gather resources</string>
<string name="gamemode_creative_summary">Unlimited resources and flying</string>
<!-- RENAME WORLD -->
<string name="renameworld_title">Save world as</string>
<string name="renameworld_saved_world">Saved World</string>
<!-- MAIN MENU OPTIONS -->
<string name="mmoptions_mp_username_title">Username</string>
<string name="mmoptions_mp_username_dialog">Enter your username</string>
<string name="mmoptions_mp_server_visible_default_title">Server visible by default</string>
<string name="mmoptions_ctrl_sensitivity_title">Sensitivity</string>
<string name="mmoptions_ctrl_invertmouse_title">Invert Y-axis</string>
<string name="mmoptions_ctrl_islefthanded_title">Lefty</string>
<string name="mmoptions_ctrl_usetouchscreen_title">Use touch screen</string>
<string name="mmoptions_ctrl_usetouchjoypad_title">Split touch controls</string>
<string name="mmoptions_feedback_vibration_title">Vibration</string>
<string name="mmoptions_feedback_vibration_summary">Slight vibration when blocks are destroyed</string>
<string name="mmoptions_gfx_fancygraphics_title">Fancy graphics</string>
<string name="mmoptions_gfx_fancygraphics_summary"></string>
<string name="mmoptions_gfx_fancygraphics_summary_powervr"></string>
<string name="mmoptions_gfx_lowquality_title">Lower graphics quality</string>
<string name="mmoptions_gfx_lowquality_summary">Shorter view distance and disables fancy rendering</string>
<string name="mmoptions_game_difficultypeaceful_title">Peaceful mode</string>
<string name="mmoptions_game_difficultypeaceful_summary">No hostile mobs, heal automatically</string>
</resources>
<string name="app_name_short">Minecraft PE</string>
<string name="app_name_short_demo">Minecraft PE Demo</string>
<!-- CREATE NEW WORLD -->
<string name="createworld_name">World name</string>
<string name="createworld_new_world">Unnamed world</string>
<string name="createworld_seed">Seed for the World Generator</string>
<string name="createworld_seed_info">Leave blank for random seed</string>
<string name="gamemode_survival_summary">Mobs, health and gather resources</string>
<string name="gamemode_creative_summary">Unlimited resources and flying</string>
<!-- RENAME WORLD -->
<string name="renameworld_title">Save world as</string>
<string name="renameworld_saved_world">Saved World</string>
<!-- MAIN MENU OPTIONS -->
<string name="mmoptions_mp_username_title">Username</string>
<string name="mmoptions_mp_username_dialog">Enter your username</string>
<string name="mmoptions_mp_server_visible_default_title">Server visible by default</string>
<string name="mmoptions_ctrl_sensitivity_title">Sensitivity</string>
<string name="mmoptions_ctrl_invertmouse_title">Invert Y-axis</string>
<string name="mmoptions_ctrl_islefthanded_title">Lefty</string>
<string name="mmoptions_ctrl_usetouchscreen_title">Use touch screen</string>
<string name="mmoptions_ctrl_usetouchjoypad_title">Split touch controls</string>
<string name="mmoptions_feedback_vibration_title">Vibration</string>
<string name="mmoptions_feedback_vibration_summary">Slight vibration when blocks are destroyed</string>
<string name="mmoptions_gfx_fancygraphics_title">Fancy graphics</string>
<string name="mmoptions_gfx_fancygraphics_summary"></string>
<string name="mmoptions_gfx_fancygraphics_summary_powervr"></string>
<string name="mmoptions_gfx_lowquality_title">Lower graphics quality</string>
<string name="mmoptions_gfx_lowquality_summary">Shorter view distance and disables fancy rendering</string>
<string name="mmoptions_game_difficultypeaceful_title">Peaceful mode</string>
<string name="mmoptions_game_difficultypeaceful_summary">No hostile mobs, heal automatically</string>
</resources>

View File

@@ -1,105 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Multiplayer">
<EditTextPreference
android:key="mp_username"
android:title="@string/mmoptions_mp_username_title"
android:summary=""
android:dialogTitle="@string/mmoptions_mp_username_dialog"
android:defaultValue="Steve"
android:singleLine="true" />
<CheckBoxPreference
android:key="mp_server_visible_default"
android:title="@string/mmoptions_mp_server_visible_default_title"
android:summary=""
android:defaultValue="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:key="category_graphics"
android:title="Graphics">
<CheckBoxPreference
android:key="gfx_fancygraphics"
android:title="@string/mmoptions_gfx_fancygraphics_title"
android:summary="@string/mmoptions_gfx_fancygraphics_summary"
android:defaultValue="false"
/>
<CheckBoxPreference
android:key="gfx_lowquality"
android:title="@string/mmoptions_gfx_lowquality_title"
android:summary="@string/mmoptions_gfx_lowquality_summary"
android:defaultValue="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Controls">
<com.mojang.android.preferences.SliderPreference
android:key="ctrl_sensitivity"
android:title="@string/mmoptions_ctrl_sensitivity_title"
android:max="100"
android:summary=""
android:defaultValue="50"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_invertmouse"
android:title="@string/mmoptions_ctrl_invertmouse_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_islefthanded"
android:title="@string/mmoptions_ctrl_islefthanded_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_usetouchscreen"
android:title="@string/mmoptions_ctrl_usetouchscreen_title"
android:summary=""
android:defaultValue="true"
android:enabled="false"
/>
<CheckBoxPreference
android:key="ctrl_usetouchjoypad"
android:title="@string/mmoptions_ctrl_usetouchjoypad_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Feedback">
<CheckBoxPreference
android:key="feedback_vibration"
android:title="@string/mmoptions_feedback_vibration_title"
android:summary="@string/mmoptions_feedback_vibration_summary"
android:defaultValue="true"
android:enabled="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Game">
<CheckBoxPreference
android:key="game_difficultypeaceful"
android:title="@string/mmoptions_game_difficultypeaceful_title"
android:summary="@string/mmoptions_game_difficultypeaceful_summary"
android:defaultValue="false"
/>
</PreferenceCategory>
</PreferenceScreen>
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Multiplayer">
<EditTextPreference
android:key="mp_username"
android:title="@string/mmoptions_mp_username_title"
android:summary=""
android:dialogTitle="@string/mmoptions_mp_username_dialog"
android:defaultValue="Steve"
android:singleLine="true" />
<CheckBoxPreference
android:key="mp_server_visible_default"
android:title="@string/mmoptions_mp_server_visible_default_title"
android:summary=""
android:defaultValue="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:key="category_graphics"
android:title="Graphics">
<CheckBoxPreference
android:key="gfx_fancygraphics"
android:title="@string/mmoptions_gfx_fancygraphics_title"
android:summary="@string/mmoptions_gfx_fancygraphics_summary"
android:defaultValue="false"
/>
<CheckBoxPreference
android:key="gfx_lowquality"
android:title="@string/mmoptions_gfx_lowquality_title"
android:summary="@string/mmoptions_gfx_lowquality_summary"
android:defaultValue="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Controls">
<com.mojang.android.preferences.SliderPreference
android:key="ctrl_sensitivity"
android:title="@string/mmoptions_ctrl_sensitivity_title"
android:max="100"
android:summary=""
android:defaultValue="50"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_invertmouse"
android:title="@string/mmoptions_ctrl_invertmouse_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_islefthanded"
android:title="@string/mmoptions_ctrl_islefthanded_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
<CheckBoxPreference
android:key="ctrl_usetouchscreen"
android:title="@string/mmoptions_ctrl_usetouchscreen_title"
android:summary=""
android:defaultValue="true"
android:enabled="false"
/>
<CheckBoxPreference
android:key="ctrl_usetouchjoypad"
android:title="@string/mmoptions_ctrl_usetouchjoypad_title"
android:summary=""
android:defaultValue="false"
android:enabled="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Feedback">
<CheckBoxPreference
android:key="feedback_vibration"
android:title="@string/mmoptions_feedback_vibration_title"
android:summary="@string/mmoptions_feedback_vibration_summary"
android:defaultValue="true"
android:enabled="true"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Game">
<CheckBoxPreference
android:key="game_difficultypeaceful"
android:title="@string/mmoptions_game_difficultypeaceful_title"
android:summary="@string/mmoptions_game_difficultypeaceful_summary"
android:defaultValue="false"
/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -1,221 +1,221 @@
package com.mojang.minecraftpe.sound;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import android.content.Context;
import android.media.SoundPool;
import com.mojang.minecraftpe.R;
public class SoundPlayer
{
public SoundPlayer(Context c, int streamType) {
_context = c;
_stream = streamType;
_random = new Random();
_pool = new SoundPool(4, _stream, 0);
_init();
}
private void _init() {
// Sounds that needs to be preloaded (although asynchronous :p)
SoundId[] preLoaded = {
new SoundId(R.raw.click, "random.click"),
new SoundId(R.raw.explode, "random.explode"),
new SoundId(R.raw.splash, "random.splash"),
new SoundId(R.raw.hurt, "random.hurt"),
new SoundId(R.raw.pop, "random.pop"),
new SoundId(R.raw.door_open, "random.door_open"),
new SoundId(R.raw.door_close, "random.door_close"),
new SoundId(R.raw.cloth1, "step.cloth"),
new SoundId(R.raw.cloth2, "step.cloth"),
new SoundId(R.raw.cloth3, "step.cloth"),
new SoundId(R.raw.cloth4, "step.cloth"),
new SoundId(R.raw.glass1, "random.glass"),
new SoundId(R.raw.glass2, "random.glass"),
new SoundId(R.raw.glass3, "random.glass"),
new SoundId(R.raw.grass1, "step.grass"),
new SoundId(R.raw.grass2, "step.grass"),
new SoundId(R.raw.grass3, "step.grass"),
new SoundId(R.raw.grass4, "step.grass"),
//new SoundId(R.raw.gravel1, "step.gravel"),
new SoundId(R.raw.gravel2, "step.gravel"),
new SoundId(R.raw.gravel3, "step.gravel"),
new SoundId(R.raw.gravel4, "step.gravel"),
new SoundId(R.raw.sand1, "step.sand"),
new SoundId(R.raw.sand2, "step.sand"),
new SoundId(R.raw.sand3, "step.sand"),
new SoundId(R.raw.sand4, "step.sand"),
new SoundId(R.raw.stone1, "step.stone"),
new SoundId(R.raw.stone2, "step.stone"),
new SoundId(R.raw.stone3, "step.stone"),
new SoundId(R.raw.stone4, "step.stone"),
new SoundId(R.raw.wood1, "step.wood"),
new SoundId(R.raw.wood2, "step.wood"),
new SoundId(R.raw.wood3, "step.wood"),
new SoundId(R.raw.wood4, "step.wood"),
new SoundId(R.raw.sheep1, "mob.sheep"),
new SoundId(R.raw.sheep2, "mob.sheep"),
new SoundId(R.raw.sheep3, "mob.sheep"),
new SoundId(R.raw.chicken2, "mob.chicken"),
new SoundId(R.raw.chicken3, "mob.chicken"),
new SoundId(R.raw.chickenhurt1, "mob.chickenhurt"),
new SoundId(R.raw.chickenhurt2, "mob.chickenhurt"),
new SoundId(R.raw.cow1, "mob.cow"),
new SoundId(R.raw.cow2, "mob.cow"),
new SoundId(R.raw.cow3, "mob.cow"),
new SoundId(R.raw.cow4, "mob.cow"),
new SoundId(R.raw.cowhurt1, "mob.cowhurt"),
new SoundId(R.raw.cowhurt2, "mob.cowhurt"),
new SoundId(R.raw.pig1, "mob.pig"),
new SoundId(R.raw.pig2, "mob.pig"),
new SoundId(R.raw.pig3, "mob.pig"),
new SoundId(R.raw.pigdeath, "mob.pigdeath"),
new SoundId(R.raw.zombie1, "mob.zombie"),
new SoundId(R.raw.zombie2, "mob.zombie"),
new SoundId(R.raw.zombie3, "mob.zombie"),
new SoundId(R.raw.zombiedeath, "mob.zombiedeath"),
new SoundId(R.raw.zombiehurt1, "mob.zombiehurt"),
new SoundId(R.raw.zombiehurt2, "mob.zombiehurt"),
new SoundId(R.raw.skeleton1, "mob.skeleton"),
new SoundId(R.raw.skeleton2, "mob.skeleton"),
new SoundId(R.raw.skeleton3, "mob.skeleton"),
new SoundId(R.raw.skeletonhurt1, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt2, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt3, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt4, "mob.skeletonhurt"),
new SoundId(R.raw.spider1, "mob.spider"),
new SoundId(R.raw.spider2, "mob.spider"),
new SoundId(R.raw.spider3, "mob.spider"),
new SoundId(R.raw.spider4, "mob.spider"),
new SoundId(R.raw.spiderdeath, "mob.spiderdeath"),
new SoundId(R.raw.fallbig1, "damage.fallbig"),
new SoundId(R.raw.fallbig2, "damage.fallbig"),
new SoundId(R.raw.fallsmall, "damage.fallsmall"),
new SoundId(R.raw.bow, "random.bow"),
new SoundId(R.raw.bowhit1, "random.bowhit"),
new SoundId(R.raw.bowhit2, "random.bowhit"),
new SoundId(R.raw.bowhit3, "random.bowhit"),
new SoundId(R.raw.bowhit4, "random.bowhit"),
new SoundId(R.raw.creeper1, "mob.creeper"),
new SoundId(R.raw.creeper2, "mob.creeper"),
new SoundId(R.raw.creeper3, "mob.creeper"),
new SoundId(R.raw.creeper4, "mob.creeper"),
new SoundId(R.raw.creeperdeath, "mob.creeperdeath"),
new SoundId(R.raw.eat1, "random.eat"),
new SoundId(R.raw.eat2, "random.eat"),
new SoundId(R.raw.eat3, "random.eat"),
new SoundId(R.raw.fuse, "random.fuse"),
new SoundId(R.raw.zpig1, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig2, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig3, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig4, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpigangry1, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry2, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry3, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry4, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigdeath, "mob.zombiepig.zpigdeath"),
new SoundId(R.raw.zpighurt1, "mob.zombiepig.zpighurt"),
new SoundId(R.raw.zpighurt2, "mob.zombiepig.zpighurt"),
};
for (SoundId s: preLoaded) {
load(s.name, s.soundId);
}
// Sounds that are loaded in a separate thread
}
// public void loadWithAlias(String filename, String alias) {
// int id = loadRaw(filename);
// addRaw(new SoundId(id, alias));
// }
public void play(String s, float volume, float pitch) {
SoundId sound = get(s);//load(s);
if (sound != null) {
volume *= getCurrentStreamVolume();
//System.out.println("playing sound id: " + sound.soundId);
if (s.equals("step.sand") || s.equals("step.gravel")) volume *= 0.5f;
_pool.play(sound.soundId, volume, volume, 0, 0, pitch);
}
}
private SoundId get(String s) {
List<SoundId> sounds = _sounds.get( s );
if (sounds == null) return null;
return sounds.get(_random.nextInt(sounds.size()));
}
public float getCurrentStreamVolume() {
return 2.5f;
//AudioManager mgr = (AudioManager)_context.getSystemService(Context.AUDIO_SERVICE);
//return ((float)mgr.getStreamVolume(_stream)) / mgr.getStreamMaxVolume(_stream);
}
synchronized public SoundId load(String id, int resId) {
if (id == null)
return null;
List<SoundId> sounds = _sounds.get(id);
SoundId soundId = null;
if (sounds == null) {
sounds = new ArrayList<SoundId>();
_sounds.put(id, sounds);
}
for (SoundId sid : sounds)
if (sid.soundId == resId)
return sid;
int snd = _pool.load(_context, resId, DefaultPriority);
soundId = new SoundId(snd, id);
sounds.add(soundId);
return soundId;
}
private Context _context;
private Random _random;
private int _stream;
private SoundPool _pool;
private Map<String, List<SoundId>> _sounds = new HashMap<String, List<SoundId>>();
static private final int DefaultPriority = 1;
public class SoundId {
SoundId(int soundId, String name) {
this.soundId = soundId;
this.name = name;
}
int soundId;
String name;
}
}
package com.mojang.minecraftpe.sound;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import android.content.Context;
import android.media.SoundPool;
import com.mojang.minecraftpe.R;
public class SoundPlayer
{
public SoundPlayer(Context c, int streamType) {
_context = c;
_stream = streamType;
_random = new Random();
_pool = new SoundPool(4, _stream, 0);
_init();
}
private void _init() {
// Sounds that needs to be preloaded (although asynchronous :p)
SoundId[] preLoaded = {
new SoundId(R.raw.click, "random.click"),
new SoundId(R.raw.explode, "random.explode"),
new SoundId(R.raw.splash, "random.splash"),
new SoundId(R.raw.hurt, "random.hurt"),
new SoundId(R.raw.pop, "random.pop"),
new SoundId(R.raw.door_open, "random.door_open"),
new SoundId(R.raw.door_close, "random.door_close"),
new SoundId(R.raw.cloth1, "step.cloth"),
new SoundId(R.raw.cloth2, "step.cloth"),
new SoundId(R.raw.cloth3, "step.cloth"),
new SoundId(R.raw.cloth4, "step.cloth"),
new SoundId(R.raw.glass1, "random.glass"),
new SoundId(R.raw.glass2, "random.glass"),
new SoundId(R.raw.glass3, "random.glass"),
new SoundId(R.raw.grass1, "step.grass"),
new SoundId(R.raw.grass2, "step.grass"),
new SoundId(R.raw.grass3, "step.grass"),
new SoundId(R.raw.grass4, "step.grass"),
//new SoundId(R.raw.gravel1, "step.gravel"),
new SoundId(R.raw.gravel2, "step.gravel"),
new SoundId(R.raw.gravel3, "step.gravel"),
new SoundId(R.raw.gravel4, "step.gravel"),
new SoundId(R.raw.sand1, "step.sand"),
new SoundId(R.raw.sand2, "step.sand"),
new SoundId(R.raw.sand3, "step.sand"),
new SoundId(R.raw.sand4, "step.sand"),
new SoundId(R.raw.stone1, "step.stone"),
new SoundId(R.raw.stone2, "step.stone"),
new SoundId(R.raw.stone3, "step.stone"),
new SoundId(R.raw.stone4, "step.stone"),
new SoundId(R.raw.wood1, "step.wood"),
new SoundId(R.raw.wood2, "step.wood"),
new SoundId(R.raw.wood3, "step.wood"),
new SoundId(R.raw.wood4, "step.wood"),
new SoundId(R.raw.sheep1, "mob.sheep"),
new SoundId(R.raw.sheep2, "mob.sheep"),
new SoundId(R.raw.sheep3, "mob.sheep"),
new SoundId(R.raw.chicken2, "mob.chicken"),
new SoundId(R.raw.chicken3, "mob.chicken"),
new SoundId(R.raw.chickenhurt1, "mob.chickenhurt"),
new SoundId(R.raw.chickenhurt2, "mob.chickenhurt"),
new SoundId(R.raw.cow1, "mob.cow"),
new SoundId(R.raw.cow2, "mob.cow"),
new SoundId(R.raw.cow3, "mob.cow"),
new SoundId(R.raw.cow4, "mob.cow"),
new SoundId(R.raw.cowhurt1, "mob.cowhurt"),
new SoundId(R.raw.cowhurt2, "mob.cowhurt"),
new SoundId(R.raw.pig1, "mob.pig"),
new SoundId(R.raw.pig2, "mob.pig"),
new SoundId(R.raw.pig3, "mob.pig"),
new SoundId(R.raw.pigdeath, "mob.pigdeath"),
new SoundId(R.raw.zombie1, "mob.zombie"),
new SoundId(R.raw.zombie2, "mob.zombie"),
new SoundId(R.raw.zombie3, "mob.zombie"),
new SoundId(R.raw.zombiedeath, "mob.zombiedeath"),
new SoundId(R.raw.zombiehurt1, "mob.zombiehurt"),
new SoundId(R.raw.zombiehurt2, "mob.zombiehurt"),
new SoundId(R.raw.skeleton1, "mob.skeleton"),
new SoundId(R.raw.skeleton2, "mob.skeleton"),
new SoundId(R.raw.skeleton3, "mob.skeleton"),
new SoundId(R.raw.skeletonhurt1, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt2, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt3, "mob.skeletonhurt"),
new SoundId(R.raw.skeletonhurt4, "mob.skeletonhurt"),
new SoundId(R.raw.spider1, "mob.spider"),
new SoundId(R.raw.spider2, "mob.spider"),
new SoundId(R.raw.spider3, "mob.spider"),
new SoundId(R.raw.spider4, "mob.spider"),
new SoundId(R.raw.spiderdeath, "mob.spiderdeath"),
new SoundId(R.raw.fallbig1, "damage.fallbig"),
new SoundId(R.raw.fallbig2, "damage.fallbig"),
new SoundId(R.raw.fallsmall, "damage.fallsmall"),
new SoundId(R.raw.bow, "random.bow"),
new SoundId(R.raw.bowhit1, "random.bowhit"),
new SoundId(R.raw.bowhit2, "random.bowhit"),
new SoundId(R.raw.bowhit3, "random.bowhit"),
new SoundId(R.raw.bowhit4, "random.bowhit"),
new SoundId(R.raw.creeper1, "mob.creeper"),
new SoundId(R.raw.creeper2, "mob.creeper"),
new SoundId(R.raw.creeper3, "mob.creeper"),
new SoundId(R.raw.creeper4, "mob.creeper"),
new SoundId(R.raw.creeperdeath, "mob.creeperdeath"),
new SoundId(R.raw.eat1, "random.eat"),
new SoundId(R.raw.eat2, "random.eat"),
new SoundId(R.raw.eat3, "random.eat"),
new SoundId(R.raw.fuse, "random.fuse"),
new SoundId(R.raw.zpig1, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig2, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig3, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpig4, "mob.zombiepig.zpig"),
new SoundId(R.raw.zpigangry1, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry2, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry3, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigangry4, "mob.zombiepig.zpigangry"),
new SoundId(R.raw.zpigdeath, "mob.zombiepig.zpigdeath"),
new SoundId(R.raw.zpighurt1, "mob.zombiepig.zpighurt"),
new SoundId(R.raw.zpighurt2, "mob.zombiepig.zpighurt"),
};
for (SoundId s: preLoaded) {
load(s.name, s.soundId);
}
// Sounds that are loaded in a separate thread
}
// public void loadWithAlias(String filename, String alias) {
// int id = loadRaw(filename);
// addRaw(new SoundId(id, alias));
// }
public void play(String s, float volume, float pitch) {
SoundId sound = get(s);//load(s);
if (sound != null) {
volume *= getCurrentStreamVolume();
//System.out.println("playing sound id: " + sound.soundId);
if (s.equals("step.sand") || s.equals("step.gravel")) volume *= 0.5f;
_pool.play(sound.soundId, volume, volume, 0, 0, pitch);
}
}
private SoundId get(String s) {
List<SoundId> sounds = _sounds.get( s );
if (sounds == null) return null;
return sounds.get(_random.nextInt(sounds.size()));
}
public float getCurrentStreamVolume() {
return 2.5f;
//AudioManager mgr = (AudioManager)_context.getSystemService(Context.AUDIO_SERVICE);
//return ((float)mgr.getStreamVolume(_stream)) / mgr.getStreamMaxVolume(_stream);
}
synchronized public SoundId load(String id, int resId) {
if (id == null)
return null;
List<SoundId> sounds = _sounds.get(id);
SoundId soundId = null;
if (sounds == null) {
sounds = new ArrayList<SoundId>();
_sounds.put(id, sounds);
}
for (SoundId sid : sounds)
if (sid.soundId == resId)
return sid;
int snd = _pool.load(_context, resId, DefaultPriority);
soundId = new SoundId(snd, id);
sounds.add(soundId);
return soundId;
}
private Context _context;
private Random _random;
private int _stream;
private SoundPool _pool;
private Map<String, List<SoundId>> _sounds = new HashMap<String, List<SoundId>>();
static private final int DefaultPriority = 1;
public class SoundId {
SoundId(int soundId, String name) {
this.soundId = soundId;
this.name = name;
}
int soundId;
String name;
}
}