From 53e22b11857fed62e2313d6d84d90f88ed412ffb Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 29 Jul 2013 12:13:03 +0100 Subject: Changed everyting to Unix line endings. --- Android/.classpath | 16 +- Android/.project | 66 +- Android/.settings/org.eclipse.jdt.core.prefs | 8 +- Android/AndroidManifest.xml | 52 +- Android/assets/basedir/Plugins/README.txt | 2 +- Android/assets/basedir/README.txt | 18 +- Android/gen/com/mcserver/R.java | 78 +- Android/jni/Android.mk | 92 +- Android/jni/ToJava.cpp | 4 +- Android/jni/ToJava.h | 116 +- Android/jni/app-android.cpp | 258 +- Android/res/layout/main.xml | 114 +- Android/res/values/strings.xml | 14 +- Android/src/com/mcserver/MCServerInstaller.java | 864 +- CryptoPP/authenc.cpp | 360 +- CryptoPP/authenc.h | 98 +- CryptoPP/ccm.cpp | 280 +- CryptoPP/ccm.h | 202 +- CryptoPP/cmac.cpp | 244 +- CryptoPP/cmac.h | 104 +- CryptoPP/eax.cpp | 118 +- CryptoPP/gcm.cpp | 1656 +-- CryptoPP/gcm.h | 212 +- CryptoPP/seed.cpp | 208 +- Install/Lua-LICENSE.txt | 42 +- Install/LuaSQLite3-LICENSE.txt | 54 +- Install/MersenneTwister-LICENSE.txt | 84 +- Install/Zip2008.list | 34 +- Install/Zip2008_PDBs.list | 14 +- Install/banned.example.ini | 6 +- Install/groups.example.ini | 32 +- Install/settings.example.ini | 62 +- Install/users.example.ini | 14 +- Install/webadmin.example.ini | 10 +- Install/whitelist.example.ini | 12 +- MCServer/Plugins/ChatLog/plugin.lua | 62 +- MCServer/Plugins/ChunkWorx/chunkworx_web.lua | 512 +- MCServer/Plugins/Debuggers/Debuggers.lua | 1488 +-- MCServer/Plugins/DiamondMover/DiamondMover.lua | 164 +- MCServer/Plugins/Handy/handy.lua | 54 +- MCServer/Plugins/Handy/handy_functions.lua | 708 +- MCServer/Plugins/HookNotify/HookNotify.lua | 808 +- MCServer/Plugins/MagicCarpet/objects.lua | 192 +- .../Plugins/ProtectionAreas/CommandHandlers.lua | 644 +- MCServer/Plugins/ProtectionAreas/CommandState.lua | 242 +- MCServer/Plugins/ProtectionAreas/Config.lua | 108 +- MCServer/Plugins/ProtectionAreas/CurrentLng.lua | 152 +- MCServer/Plugins/ProtectionAreas/HookHandlers.lua | 278 +- MCServer/Plugins/ProtectionAreas/LICENSE.txt | 14 +- MCServer/Plugins/ProtectionAreas/PlayerAreas.lua | 218 +- .../Plugins/ProtectionAreas/ProtectionAreas.lua | 142 +- MCServer/Plugins/ProtectionAreas/Storage.lua | 1036 +- MCServer/Plugins/SquirrelChatLog.nut | 26 +- MCServer/crafting.txt | 784 +- MCServer/furnace.txt | 150 +- MCServer/groups.ini | 32 +- MCServer/hg.supp | 44 +- MCServer/items.ini | 1086 +- MCServer/monsters.ini | 220 +- MCServer/settings.ini | 62 +- MCServer/terrain.ini | 16 +- MCServer/users.ini | 44 +- MCServer/webadmin.ini | 10 +- MCServer/webadmin/template.html | 290 +- Nightbuild2008.cmd | 290 +- Tests/NoiseTest/NoiseTest.cpp | 202 +- Tests/NoiseTest/NoiseTest.sln | 40 +- Tests/NoiseTest/NoiseTest.vcproj | 516 +- Tools/AnvilStats/AnvilStats.cpp | 138 +- Tools/AnvilStats/AnvilStats.sln | 68 +- Tools/AnvilStats/AnvilStats.txt | 54 +- Tools/AnvilStats/AnvilStats.vcproj | 904 +- Tools/AnvilStats/BiomeMap.cpp | 344 +- Tools/AnvilStats/BiomeMap.h | 138 +- Tools/AnvilStats/Callback.h | 330 +- Tools/AnvilStats/ChunkExtract.cpp | 206 +- Tools/AnvilStats/ChunkExtract.h | 132 +- Tools/AnvilStats/Globals.cpp | 20 +- Tools/AnvilStats/Globals.h | 456 +- Tools/AnvilStats/HeightMap.cpp | 530 +- Tools/AnvilStats/HeightMap.h | 162 +- Tools/AnvilStats/Processor.cpp | 1158 +-- Tools/AnvilStats/Processor.h | 154 +- Tools/AnvilStats/SpringStats.cpp | 558 +- Tools/AnvilStats/SpringStats.h | 204 +- Tools/AnvilStats/Statistics.cpp | 1046 +- Tools/AnvilStats/Statistics.h | 276 +- Tools/AnvilStats/Utils.cpp | 582 +- Tools/AnvilStats/Utils.h | 122 +- Tools/AnvilStats/profile_run.cmd | 140 +- Tools/BiomeVisualiser/BiomeCache.cpp | 666 +- Tools/BiomeVisualiser/BiomeCache.h | 192 +- Tools/BiomeVisualiser/BiomeRenderer.cpp | 294 +- Tools/BiomeVisualiser/BiomeRenderer.h | 100 +- Tools/BiomeVisualiser/BiomeSource.h | 74 +- Tools/BiomeVisualiser/BiomeViewWnd.cpp | 380 +- Tools/BiomeVisualiser/BiomeViewWnd.h | 92 +- Tools/BiomeVisualiser/BiomeVisualiser.cpp | 104 +- Tools/BiomeVisualiser/BiomeVisualiser.h | 62 +- Tools/BiomeVisualiser/BiomeVisualiser.sln | 46 +- Tools/BiomeVisualiser/BiomeVisualiser.vcproj | 966 +- Tools/BiomeVisualiser/GeneratorBiomeSource.h | 84 +- Tools/BiomeVisualiser/Pixmap.cpp | 240 +- Tools/BiomeVisualiser/Pixmap.h | 78 +- Tools/BiomeVisualiser/Timer.h | 80 +- Tools/BiomeVisualiser/WndProcThunk.h | 286 +- Tools/BiomeVisualiser/profile_run.cmd | 140 +- Tools/BlockZapper/BlockZapper.cpp | 194 +- Tools/BlockZapper/BlockZapper.sln | 68 +- Tools/BlockZapper/BlockZapper.txt | 38 +- Tools/BlockZapper/BlockZapper.vcproj | 626 +- Tools/BlockZapper/Globals.cpp | 20 +- Tools/BlockZapper/Globals.h | 28 +- Tools/BlockZapper/Regions.cpp | 334 +- Tools/BlockZapper/Regions.h | 116 +- Tools/BlockZapper/Zapper.cpp | 880 +- Tools/BlockZapper/Zapper.h | 160 +- Tools/MemDumpAnalysis/Globals.cpp | 20 +- Tools/MemDumpAnalysis/Globals.h | 70 +- Tools/MemDumpAnalysis/MemDumpAnalysis.cpp | 642 +- Tools/MemDumpAnalysis/MemDumpAnalysis.sln | 40 +- Tools/MemDumpAnalysis/MemDumpAnalysis.vcproj | 878 +- Tools/MemDumpAnalysis/MemDumpAnalysis.vcproj.user | 62 +- Tools/MemDumpAnalysis/targetver.h | 50 +- Tools/ProtoProxy/Connection.cpp | 5102 +++++----- Tools/ProtoProxy/Connection.h | 412 +- Tools/ProtoProxy/Globals.cpp | 20 +- Tools/ProtoProxy/Globals.h | 440 +- Tools/ProtoProxy/ProtoProxy.cpp | 64 +- Tools/ProtoProxy/ProtoProxy.sln | 58 +- Tools/ProtoProxy/ProtoProxy.txt | 62 +- Tools/ProtoProxy/ProtoProxy.vcproj | 534 +- Tools/ProtoProxy/Server.cpp | 164 +- Tools/ProtoProxy/Server.h | 76 +- Tools/ToLuaDoxy/Globals.cpp | 20 +- Tools/ToLuaDoxy/Globals.h | 202 +- Tools/ToLuaDoxy/ToLuaDoxy.cpp | 444 +- Tools/ToLuaDoxy/ToLuaDoxy.sln | 40 +- Tools/ToLuaDoxy/ToLuaDoxy.vcproj | 442 +- UpdateVersions.cmd | 76 +- VC2008/CryptoPP.vcproj | 10202 +++++++++---------- VC2008/GenerateBindings.cmd | 4 +- VC2008/JsonCpp.vcproj | 496 +- VC2008/Lua.vcproj | 874 +- VC2008/MCServer.rc | 34 +- VC2008/MCServer.sln | 186 +- VC2008/MCServer.vcproj | 5272 +++++----- VC2008/Squirrel3.vcproj | 768 +- VC2008/ToLua.vcproj | 496 +- VC2008/WebServer.vcproj | 608 +- VC2008/expat.vcproj | 454 +- VC2008/profile_run.cmd | 146 +- VC2008/resource_MCServer.h | 10 +- VC2008/zlib.vcproj | 648 +- WebServer/Events.h | 36 +- WebServer/Globals.h | 30 +- WebServer/Socket.h | 254 +- WebServer/StdHelpers.h | 128 +- WebServer/Tracer.h | 226 +- WebServer/UrlHelper.h | 84 +- WebServer/WebServer.h | 216 +- WebServer/base64.h | 8 +- clean.bat | 46 +- cloc-exclude.txt | 52 +- docs/API class inheritance - blockentities.gv | 28 +- docs/API class inheritance - entities.gv | 86 +- docs/Object ownership.gv | 56 +- docs/_files.txt | 14 +- nbt examples/single chunk NBT data.txt | 142 +- nbt examples/tile entities.txt | 216 +- source/AllToLua.bat | 6 +- source/BlockArea.cpp | 4248 ++++---- source/BlockArea.h | 620 +- source/BlockEntities/BlockEntityWithItems.h | 172 +- source/BlockEntities/DispenserEntity.cpp | 450 +- source/BlockEntities/DispenserEntity.h | 82 +- source/BlockEntities/DropSpenserEntity.cpp | 490 +- source/BlockEntities/DropSpenserEntity.h | 178 +- source/BlockEntities/DropperEntity.cpp | 84 +- source/BlockEntities/DropperEntity.h | 98 +- source/BlockEntities/HopperEntity.cpp | 1046 +- source/BlockEntities/HopperEntity.h | 204 +- source/BlockEntities/JukeboxEntity.cpp | 246 +- source/BlockEntities/JukeboxEntity.h | 86 +- source/BlockEntities/NoteEntity.cpp | 318 +- source/BlockEntities/NoteEntity.h | 104 +- source/Blocks/BlockBed.cpp | 170 +- source/Blocks/BlockBed.h | 146 +- source/Blocks/BlockBrewingStand.h | 64 +- source/Blocks/BlockCactus.h | 176 +- source/Blocks/BlockCauldron.h | 118 +- source/Blocks/BlockChest.h | 444 +- source/Blocks/BlockCloth.h | 68 +- source/Blocks/BlockCobWeb.h | 60 +- source/Blocks/BlockCrops.h | 216 +- source/Blocks/BlockDeadBush.h | 94 +- source/Blocks/BlockDirt.h | 176 +- source/Blocks/BlockDoor.cpp | 176 +- source/Blocks/BlockDoor.h | 210 +- source/Blocks/BlockDropSpenser.h | 78 +- source/Blocks/BlockEnderchest.h | 56 +- source/Blocks/BlockEntity.h | 62 +- source/Blocks/BlockFarmland.h | 198 +- source/Blocks/BlockFenceGate.h | 120 +- source/Blocks/BlockFire.h | 84 +- source/Blocks/BlockFlower.h | 106 +- source/Blocks/BlockFlowerPot.h | 210 +- source/Blocks/BlockFluid.h | 100 +- source/Blocks/BlockFurnace.h | 94 +- source/Blocks/BlockGlass.h | 52 +- source/Blocks/BlockGlowstone.h | 60 +- source/Blocks/BlockGravel.h | 54 +- source/Blocks/BlockHandler.cpp | 906 +- source/Blocks/BlockHandler.h | 316 +- source/Blocks/BlockHopper.h | 92 +- source/Blocks/BlockIce.h | 74 +- source/Blocks/BlockLadder.h | 230 +- source/Blocks/BlockLeaves.h | 368 +- source/Blocks/BlockLever.cpp | 96 +- source/Blocks/BlockLever.h | 122 +- source/Blocks/BlockMelon.h | 70 +- source/Blocks/BlockMushroom.h | 142 +- source/Blocks/BlockMycelium.h | 54 +- source/Blocks/BlockNote.h | 26 +- source/Blocks/BlockOre.h | 160 +- source/Blocks/BlockPiston.cpp | 138 +- source/Blocks/BlockPiston.h | 56 +- source/Blocks/BlockRail.h | 842 +- source/Blocks/BlockRedstone.cpp | 54 +- source/Blocks/BlockRedstone.h | 92 +- source/Blocks/BlockRedstoneRepeater.cpp | 94 +- source/Blocks/BlockRedstoneRepeater.h | 120 +- source/Blocks/BlockRedstoneTorch.h | 72 +- source/Blocks/BlockSand.h | 56 +- source/Blocks/BlockSapling.h | 138 +- source/Blocks/BlockSign.h | 146 +- source/Blocks/BlockSlab.h | 140 +- source/Blocks/BlockSnow.h | 104 +- source/Blocks/BlockStairs.h | 306 +- source/Blocks/BlockStems.h | 116 +- source/Blocks/BlockStone.h | 58 +- source/Blocks/BlockSugarcane.h | 192 +- source/Blocks/BlockTallGrass.h | 102 +- source/Blocks/BlockTorch.h | 518 +- source/Blocks/BlockVine.h | 400 +- source/Blocks/BlockWood.h | 54 +- source/Blocks/BlockWorkbench.h | 86 +- source/ByteBuffer.cpp | 1322 +-- source/ByteBuffer.h | 242 +- source/CommandOutput.cpp | 142 +- source/CommandOutput.h | 164 +- source/Enchantments.cpp | 596 +- source/Enchantments.h | 228 +- source/FallingBlock.cpp | 206 +- source/FallingBlock.h | 90 +- source/FastRandom.cpp | 348 +- source/FastRandom.h | 114 +- source/Generating/Caves.cpp | 1940 ++-- source/Generating/Caves.h | 204 +- source/Generating/ChunkDesc.cpp | 1156 +-- source/Generating/ComposableGenerator.cpp | 1048 +- source/Generating/ComposableGenerator.h | 350 +- source/Generating/DistortedHeightmap.cpp | 838 +- source/Generating/DistortedHeightmap.h | 204 +- source/Generating/EndGen.cpp | 434 +- source/Generating/EndGen.h | 138 +- source/Generating/MineShafts.cpp | 2846 +++--- source/Generating/MineShafts.h | 122 +- source/Generating/Noise3DGenerator.cpp | 1162 +-- source/Generating/Noise3DGenerator.h | 212 +- source/Generating/Ravines.cpp | 1062 +- source/Generating/Ravines.h | 92 +- source/ItemGrid.cpp | 1324 +-- source/ItemGrid.h | 382 +- source/Items/ItemBed.h | 112 +- source/Items/ItemBrewingStand.h | 82 +- source/Items/ItemBucket.h | 320 +- source/Items/ItemCauldron.h | 82 +- source/Items/ItemCloth.h | 46 +- source/Items/ItemDoor.h | 90 +- source/Items/ItemDye.h | 88 +- source/Items/ItemFlowerPot.h | 82 +- source/Items/ItemFood.h | 112 +- source/Items/ItemHandler.cpp | 1000 +- source/Items/ItemHandler.h | 192 +- source/Items/ItemHoe.h | 60 +- source/Items/ItemLeaves.h | 82 +- source/Items/ItemLighter.h | 112 +- source/Items/ItemMinecart.h | 160 +- source/Items/ItemPickaxe.h | 150 +- source/Items/ItemRedstoneDust.h | 76 +- source/Items/ItemRedstoneRepeater.h | 80 +- source/Items/ItemSapling.h | 84 +- source/Items/ItemSeeds.h | 130 +- source/Items/ItemShears.h | 126 +- source/Items/ItemShovel.h | 80 +- source/Items/ItemSign.h | 102 +- source/Items/ItemSlab.h | 104 +- source/Items/ItemSpawnEgg.h | 104 +- source/Items/ItemSugarcane.h | 78 +- source/Items/ItemSword.h | 40 +- source/Items/ItemWood.h | 44 +- source/LinearInterpolation.cpp | 502 +- source/LinearInterpolation.h | 120 +- source/LinearUpscale.h | 488 +- source/LuaWindow.cpp | 350 +- source/LuaWindow.h | 192 +- source/Minecart.cpp | 320 +- source/Minecart.h | 234 +- source/Mobs/Bat.h | 54 +- source/Mobs/Blaze.cpp | 54 +- source/Mobs/Blaze.h | 50 +- source/Mobs/Magmacube.cpp | 54 +- source/Mobs/Magmacube.h | 62 +- source/Mobs/Mooshroom.cpp | 66 +- source/Mobs/Mooshroom.h | 50 +- source/Mobs/Ocelot.h | 54 +- source/Mobs/Villager.cpp | 34 +- source/Mobs/Villager.h | 46 +- source/Mobs/Witch.cpp | 64 +- source/Mobs/Witch.h | 50 +- source/OSSupport/GZipFile.cpp | 214 +- source/OSSupport/GZipFile.h | 104 +- source/OSSupport/ListenThread.cpp | 462 +- source/OSSupport/ListenThread.h | 166 +- source/Player.cpp | 2846 +++--- source/Plugin_Squirrel.cpp | 818 +- source/Plugin_Squirrel.h | 138 +- source/ProbabDistrib.cpp | 284 +- source/ProbabDistrib.h | 148 +- source/Protocol/ChunkDataSerializer.cpp | 352 +- source/Protocol/ChunkDataSerializer.h | 96 +- source/Protocol/Protocol.h | 384 +- source/Protocol/Protocol125.cpp | 3272 +++--- source/Protocol/Protocol125.h | 304 +- source/Protocol/Protocol132.cpp | 1804 ++-- source/Protocol/Protocol132.h | 200 +- source/Protocol/Protocol14x.cpp | 506 +- source/Protocol/Protocol14x.h | 126 +- source/Protocol/Protocol15x.cpp | 274 +- source/Protocol/Protocol15x.h | 76 +- source/Protocol/Protocol16x.cpp | 490 +- source/Protocol/Protocol16x.h | 146 +- source/Protocol/ProtocolRecognizer.cpp | 1542 +-- source/Protocol/ProtocolRecognizer.h | 260 +- source/RCONServer.cpp | 664 +- source/RCONServer.h | 218 +- source/SQLite/urls.txt | 16 +- source/Simulator/DelayedFluidSimulator.cpp | 316 +- source/Simulator/DelayedFluidSimulator.h | 164 +- source/Simulator/FloodyFluidSimulator.cpp | 668 +- source/Simulator/FloodyFluidSimulator.h | 106 +- source/Simulator/NoopFluidSimulator.h | 72 +- source/Simulator/VaporizeFluidSimulator.cpp | 106 +- source/Simulator/VaporizeFluidSimulator.h | 68 +- source/SquirrelCommandBinder.cpp | 236 +- source/SquirrelCommandBinder.h | 102 +- source/TNTEntity.cpp | 144 +- source/TNTEntity.h | 68 +- source/UI/SlotArea.cpp | 1630 +-- source/UI/SlotArea.h | 606 +- source/WorldStorage/NBTChunkSerializer.cpp | 918 +- source/WorldStorage/NBTChunkSerializer.h | 220 +- source/XMLParser.h | 1402 +-- source/squirrelbindings/SquirrelArray.h | 112 +- source/squirrelbindings/SquirrelBaseClass.h | 132 +- source/squirrelbindings/SquirrelBindings.cpp | 390 +- source/squirrelbindings/SquirrelBindings.h | 64 +- source/squirrelbindings/SquirrelFunctions.cpp | 188 +- source/squirrelbindings/SquirrelFunctions.h | 56 +- source/squirrelbindings/SquirrelObject.h | 110 +- source/virtual_method_hooks.lua | 1012 +- squirrel_3_0_1_stable/sqstdlib/sqstdlib.dsp | 262 +- squirrel_3_0_1_stable/squirrel.dsw | 154 +- squirrel_3_0_1_stable/squirrel/squirrel.dsp | 604 +- tolua++-1.0.93/src/bin/lua/compat-5.1.lua | 114 +- tolua++-1.0.93/src/bin/lua/custom.lua | 90 +- tolua++-1.0.93/win32/tolualib/tolualib.vcproj | 394 +- .../tolualib/tolualib.vcproj.LAPTOPF.Kevin.user | 130 +- tolua++-1.0.93/win32/tolualib/tolualib.vcxproj | 158 +- .../win32/tolualib/tolualib.vcxproj.filters | 76 +- .../win32/tolualib/tolualib.vcxproj.user | 4 +- tolua++-1.0.93/win32/vc7/clean.bat | 30 +- tolua++-1.0.93/win32/vc7/toluapp.sln | 96 +- tolua++-1.0.93/win32/vc7/toluapp.vcproj | 878 +- .../win32/vc7/toluapp.vcproj.LAPTOPF.Kevin.user | 242 +- tolua++-1.0.93/win32/vc7/toluapp.vcxproj | 350 +- tolua++-1.0.93/win32/vc7/toluapp.vcxproj.filters | 88 +- tolua++-1.0.93/win32/vc7/toluapp.vcxproj.user | 4 +- 389 files changed, 66228 insertions(+), 66228 deletions(-) diff --git a/Android/.classpath b/Android/.classpath index a4f1e4054..a4763d1ee 100644 --- a/Android/.classpath +++ b/Android/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/Android/.project b/Android/.project index 34dd17184..ad960717b 100644 --- a/Android/.project +++ b/Android/.project @@ -1,33 +1,33 @@ - - - MCServer - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - + + + MCServer + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/Android/.settings/org.eclipse.jdt.core.prefs b/Android/.settings/org.eclipse.jdt.core.prefs index da5d06089..f77b31c2d 100644 --- a/Android/.settings/org.eclipse.jdt.core.prefs +++ b/Android/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.source=1.5 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/Android/AndroidManifest.xml b/Android/AndroidManifest.xml index 1de7d179a..0a2cc8380 100644 --- a/Android/AndroidManifest.xml +++ b/Android/AndroidManifest.xml @@ -1,27 +1,27 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Android/assets/basedir/Plugins/README.txt b/Android/assets/basedir/Plugins/README.txt index 06f28d0b6..1c8259eda 100644 --- a/Android/assets/basedir/Plugins/README.txt +++ b/Android/assets/basedir/Plugins/README.txt @@ -1,2 +1,2 @@ -Put all pre-packaged plugins in here such as Core. +Put all pre-packaged plugins in here such as Core. The user will be able to install each plugin in here separately. \ No newline at end of file diff --git a/Android/assets/basedir/README.txt b/Android/assets/basedir/README.txt index 082196c29..784d10fc7 100644 --- a/Android/assets/basedir/README.txt +++ b/Android/assets/basedir/README.txt @@ -1,10 +1,10 @@ -Put all pre-packaged settings/preferences and license files in here. -Such as: - -settings.example.ini -groups.example.ini -users.example.ini -webadmin.example.ini -Lua-LICENSE.txt -MersenneTwister-LICENSE.txt +Put all pre-packaged settings/preferences and license files in here. +Such as: + +settings.example.ini +groups.example.ini +users.example.ini +webadmin.example.ini +Lua-LICENSE.txt +MersenneTwister-LICENSE.txt etc.etc \ No newline at end of file diff --git a/Android/gen/com/mcserver/R.java b/Android/gen/com/mcserver/R.java index dd996a43f..cbb9e653a 100644 --- a/Android/gen/com/mcserver/R.java +++ b/Android/gen/com/mcserver/R.java @@ -1,39 +1,39 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.mcserver; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int ic_launcher=0x7f020000; - } - public static final class id { - public static final int configure_server=0x7f050003; - public static final int ip_address=0x7f050005; - public static final int listView1=0x7f050006; - public static final int server_status_text=0x7f050004; - public static final int start_server=0x7f050002; - public static final int stop_server=0x7f050001; - public static final int textView2=0x7f050000; - } - public static final class layout { - public static final int list_item=0x7f030000; - public static final int main=0x7f030001; - } - public static final class string { - public static final int app_name=0x7f040001; - public static final int configure=0x7f040007; - public static final int hello=0x7f040000; - public static final int mcserver_is_not_running=0x7f040005; - public static final int mcserver_is_running=0x7f040004; - public static final int start=0x7f040002; - public static final int stop=0x7f040003; - public static final int your_ip=0x7f040006; - } -} +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.mcserver; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int ic_launcher=0x7f020000; + } + public static final class id { + public static final int configure_server=0x7f050003; + public static final int ip_address=0x7f050005; + public static final int listView1=0x7f050006; + public static final int server_status_text=0x7f050004; + public static final int start_server=0x7f050002; + public static final int stop_server=0x7f050001; + public static final int textView2=0x7f050000; + } + public static final class layout { + public static final int list_item=0x7f030000; + public static final int main=0x7f030001; + } + public static final class string { + public static final int app_name=0x7f040001; + public static final int configure=0x7f040007; + public static final int hello=0x7f040000; + public static final int mcserver_is_not_running=0x7f040005; + public static final int mcserver_is_running=0x7f040004; + public static final int start=0x7f040002; + public static final int stop=0x7f040003; + public static final int your_ip=0x7f040006; + } +} diff --git a/Android/jni/Android.mk b/Android/jni/Android.mk index 764e57ee8..23488e359 100644 --- a/Android/jni/Android.mk +++ b/Android/jni/Android.mk @@ -1,46 +1,46 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := mcserver - - - -LOCAL_SRC_FILES := $(shell find ../CryptoPP ../lua-5.1.4 ../jsoncpp-src-0.5.0 ../zlib-1.2.7 ../source ../squirrel_3_0_1_stable ../tolua++-1.0.93 ../iniFile ../WebServer ../expat '(' -name '*.cpp' -o -name '*.c' ')') -LOCAL_SRC_FILES := $(filter-out %SquirrelFunctions.cpp %SquirrelBindings.cpp %cPlugin_Squirrel.cpp %cSquirrelCommandBinder.cpp %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(LOCAL_SRC_FILES)) -LOCAL_SRC_FILES := $(patsubst %.cpp,../%.cpp,$(LOCAL_SRC_FILES)) -LOCAL_SRC_FILES := $(patsubst %.c,../%.c,$(LOCAL_SRC_FILES)) -LOCAL_SRC_FILES += app-android.cpp ToJava.cpp - -LOCAL_CFLAGS := -DANDROID_NDK \ - -O3 \ - -funroll-loops \ - -mfloat-abi=softfp -mfpu=neon \ - -fexceptions \ - - -LOCAL_STATIC_LIBRARIES := cpufeatures - -LOCAL_C_INCLUDES := ../source \ - ../source/md5 \ - ../WebServer \ - ../source/packets \ - ../source/items \ - ../source/blocks \ - ../tolua++-1.0.93/src/lib \ - ../lua-5.1.4/src \ - ../zlib-1.2.7 \ - ../iniFile \ - ../tolua++-1.0.93/include \ - ../jsoncpp-src-0.5.0/include \ - ../jsoncpp-src-0.5.0/src/lib_json \ - ../squirrel_3_0_1_stable/include \ - ../squirrel_3_0_1_stable \ - ../squirrel_3_0_1_stable/sqrat \ - ../expat/ \ - .. \ - - -LOCAL_LDLIBS := -ldl -llog - -include $(BUILD_SHARED_LIBRARY) -$(call import-module,cpufeatures) +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := mcserver + + + +LOCAL_SRC_FILES := $(shell find ../CryptoPP ../lua-5.1.4 ../jsoncpp-src-0.5.0 ../zlib-1.2.7 ../source ../squirrel_3_0_1_stable ../tolua++-1.0.93 ../iniFile ../WebServer ../expat '(' -name '*.cpp' -o -name '*.c' ')') +LOCAL_SRC_FILES := $(filter-out %SquirrelFunctions.cpp %SquirrelBindings.cpp %cPlugin_Squirrel.cpp %cSquirrelCommandBinder.cpp %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(LOCAL_SRC_FILES)) +LOCAL_SRC_FILES := $(patsubst %.cpp,../%.cpp,$(LOCAL_SRC_FILES)) +LOCAL_SRC_FILES := $(patsubst %.c,../%.c,$(LOCAL_SRC_FILES)) +LOCAL_SRC_FILES += app-android.cpp ToJava.cpp + +LOCAL_CFLAGS := -DANDROID_NDK \ + -O3 \ + -funroll-loops \ + -mfloat-abi=softfp -mfpu=neon \ + -fexceptions \ + + +LOCAL_STATIC_LIBRARIES := cpufeatures + +LOCAL_C_INCLUDES := ../source \ + ../source/md5 \ + ../WebServer \ + ../source/packets \ + ../source/items \ + ../source/blocks \ + ../tolua++-1.0.93/src/lib \ + ../lua-5.1.4/src \ + ../zlib-1.2.7 \ + ../iniFile \ + ../tolua++-1.0.93/include \ + ../jsoncpp-src-0.5.0/include \ + ../jsoncpp-src-0.5.0/src/lib_json \ + ../squirrel_3_0_1_stable/include \ + ../squirrel_3_0_1_stable \ + ../squirrel_3_0_1_stable/sqrat \ + ../expat/ \ + .. \ + + +LOCAL_LDLIBS := -ldl -llog + +include $(BUILD_SHARED_LIBRARY) +$(call import-module,cpufeatures) diff --git a/Android/jni/ToJava.cpp b/Android/jni/ToJava.cpp index 10d4e84a0..8db22dd1d 100644 --- a/Android/jni/ToJava.cpp +++ b/Android/jni/ToJava.cpp @@ -1,3 +1,3 @@ -#include "Globals.h" - +#include "Globals.h" + #include "ToJava.h" \ No newline at end of file diff --git a/Android/jni/ToJava.h b/Android/jni/ToJava.h index bc10f01e3..11979c847 100644 --- a/Android/jni/ToJava.h +++ b/Android/jni/ToJava.h @@ -1,59 +1,59 @@ -#pragma once - -#include -#include -extern JNIEnv* g_CurrentJNIEnv; -extern JavaVM* g_JavaVM; -extern jobject g_JavaThread; -//extern jobject g_JavaActivity; - -//__android_log_vprint(ANDROID_LOG_ERROR,"MCServer", a_Format, argList); - -static void CallJavaFunction_Void_String( jobject a_Object, const std::string & a_FunctionName, const std::string & a_StringParam ) -{ - JNIEnv * oldEnv = g_CurrentJNIEnv; - int status = g_JavaVM->AttachCurrentThread(&g_CurrentJNIEnv, NULL); - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "STATUS: %i old: %p new: %p", status, oldEnv, g_CurrentJNIEnv ); - jstring str = g_CurrentJNIEnv->NewStringUTF( a_StringParam.c_str() ); - - - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "JNIEnv: %i Object: %i", g_CurrentJNIEnv, a_Object ); - jclass cls = g_CurrentJNIEnv->GetObjectClass( a_Object ); - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jclass: %i", cls ); - jmethodID mid = g_CurrentJNIEnv->GetMethodID( cls, a_FunctionName.c_str(), "(Ljava/lang/String;)V"); // void a_FunctionName( String ) - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jmethodID: %i", mid ); - if (mid != 0) - { - - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "Going to call right NOW! %s", a_FunctionName.c_str() ); - g_CurrentJNIEnv->CallVoidMethod( a_Object, mid, str ); - } - else - { - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "It was 0, derp" ); - } - - if( oldEnv != g_CurrentJNIEnv ) - { - g_JavaVM->DetachCurrentThread(); - } -} - - -static void CallJavaFunction_Void_Void( jobject a_Object, const std::string & a_FunctionName ) -{ - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "JNIEnv: %i Object: %i", g_CurrentJNIEnv, a_Object ); - jclass cls = g_CurrentJNIEnv->GetObjectClass( a_Object ); - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jclass: %i", cls ); - jmethodID mid = g_CurrentJNIEnv->GetMethodID( cls, a_FunctionName.c_str(), "()V"); // void a_FunctionName( String ) - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jmethodID: %i", mid ); - if (mid != 0) - { - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "Going to call right NOW! %s", a_FunctionName.c_str() ); - g_CurrentJNIEnv->CallVoidMethod( a_Object, mid ); - } - else - { - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "It was 0, derp" ); - } +#pragma once + +#include +#include +extern JNIEnv* g_CurrentJNIEnv; +extern JavaVM* g_JavaVM; +extern jobject g_JavaThread; +//extern jobject g_JavaActivity; + +//__android_log_vprint(ANDROID_LOG_ERROR,"MCServer", a_Format, argList); + +static void CallJavaFunction_Void_String( jobject a_Object, const std::string & a_FunctionName, const std::string & a_StringParam ) +{ + JNIEnv * oldEnv = g_CurrentJNIEnv; + int status = g_JavaVM->AttachCurrentThread(&g_CurrentJNIEnv, NULL); + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "STATUS: %i old: %p new: %p", status, oldEnv, g_CurrentJNIEnv ); + jstring str = g_CurrentJNIEnv->NewStringUTF( a_StringParam.c_str() ); + + + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "JNIEnv: %i Object: %i", g_CurrentJNIEnv, a_Object ); + jclass cls = g_CurrentJNIEnv->GetObjectClass( a_Object ); + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jclass: %i", cls ); + jmethodID mid = g_CurrentJNIEnv->GetMethodID( cls, a_FunctionName.c_str(), "(Ljava/lang/String;)V"); // void a_FunctionName( String ) + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jmethodID: %i", mid ); + if (mid != 0) + { + + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "Going to call right NOW! %s", a_FunctionName.c_str() ); + g_CurrentJNIEnv->CallVoidMethod( a_Object, mid, str ); + } + else + { + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "It was 0, derp" ); + } + + if( oldEnv != g_CurrentJNIEnv ) + { + g_JavaVM->DetachCurrentThread(); + } +} + + +static void CallJavaFunction_Void_Void( jobject a_Object, const std::string & a_FunctionName ) +{ + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "JNIEnv: %i Object: %i", g_CurrentJNIEnv, a_Object ); + jclass cls = g_CurrentJNIEnv->GetObjectClass( a_Object ); + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jclass: %i", cls ); + jmethodID mid = g_CurrentJNIEnv->GetMethodID( cls, a_FunctionName.c_str(), "()V"); // void a_FunctionName( String ) + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jmethodID: %i", mid ); + if (mid != 0) + { + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "Going to call right NOW! %s", a_FunctionName.c_str() ); + g_CurrentJNIEnv->CallVoidMethod( a_Object, mid ); + } + else + { + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "It was 0, derp" ); + } } \ No newline at end of file diff --git a/Android/jni/app-android.cpp b/Android/jni/app-android.cpp index b34207344..197df29c4 100644 --- a/Android/jni/app-android.cpp +++ b/Android/jni/app-android.cpp @@ -1,130 +1,130 @@ -#include "Globals.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "OSSupport/CriticalSection.h" -#include "OSSupport/MakeDir.h" -#include "ToJava.h" - -#include "Root.h" -#include "WebAdmin.h" - -#include - -#ifdef _WIN32 // For IntelliSense parsing -typedef void jobject; -typedef int jint; -typedef bool jboolean; -typedef void JavaVM; -typedef void JNIEnv; -#endif - -cCriticalSection g_CriticalSection; - -JNIEnv* g_CurrentJNIEnv = 0; -jobject g_JavaThread = 0; -JavaVM* g_JavaVM = 0; -//jobject g_JavaActivity = 0; - -cRoot * pRoot = NULL; - - -class cMainThread : - public cIsThread -{ -public: - cMainThread() : - cIsThread("cMainThread") - { - //Start(); - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "cMainThread"); - } - - void Stop(void) - { - m_ShouldTerminate = true; - Wait(); - } - -protected: - - virtual void Execute(void) override - { - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Execute"); - pRoot = new cRoot(); - pRoot->Start(); - delete pRoot; - } - -} ; - -cMainThread * pMainThread = NULL; - -jint JNI_OnLoad(JavaVM* vm, void* reserved) -{ - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "JNI_OnLoad JNI_OnLoad JNI_OnLoad JNI_OnLoad"); - g_JavaVM = vm; - return JNI_VERSION_1_4; -} - -/* Called when program/activity is created */ -extern "C" void Java_com_mcserver_MCServerActivity_NativeOnCreate( JNIEnv* env, jobject thiz ) -{ - g_CriticalSection.Lock(); - g_CurrentJNIEnv = env; - g_JavaThread = thiz; - //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Logging from C++!"); - g_CriticalSection.Unlock(); - - mkdir("/sdcard/mcserver", S_IRWXU | S_IRWXG | S_IRWXO); - - pRoot = new cRoot(); - pRoot->Start(); - delete pRoot; pRoot = NULL; -} - - - - - -extern "C" void Java_com_mcserver_MCServerActivity_NativeCleanUp( JNIEnv* env, jobject thiz ) -{ - g_CriticalSection.Lock(); - g_CurrentJNIEnv = env; - g_JavaThread = thiz; - g_CriticalSection.Unlock(); - - __android_log_print(ANDROID_LOG_ERROR,"MCServer", "pRoot: %p", pRoot); - if( pRoot != NULL ) - { - pRoot->ExecuteConsoleCommand("stop"); - } -} - - - - -extern "C" jboolean Java_com_mcserver_MCServerActivity_NativeIsServerRunning( JNIEnv* env, jobject thiz ) -{ - return pRoot != NULL; -} - - - - -extern "C" jint Java_com_mcserver_MCServerActivity_NativeGetWebAdminPort( JNIEnv* env, jobject thiz ) -{ - if( pRoot != NULL && pRoot->GetWebAdmin() != NULL ) - { - return pRoot->GetWebAdmin()->GetPort(); - } - return 0; +#include "Globals.h" + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "OSSupport/CriticalSection.h" +#include "OSSupport/MakeDir.h" +#include "ToJava.h" + +#include "Root.h" +#include "WebAdmin.h" + +#include + +#ifdef _WIN32 // For IntelliSense parsing +typedef void jobject; +typedef int jint; +typedef bool jboolean; +typedef void JavaVM; +typedef void JNIEnv; +#endif + +cCriticalSection g_CriticalSection; + +JNIEnv* g_CurrentJNIEnv = 0; +jobject g_JavaThread = 0; +JavaVM* g_JavaVM = 0; +//jobject g_JavaActivity = 0; + +cRoot * pRoot = NULL; + + +class cMainThread : + public cIsThread +{ +public: + cMainThread() : + cIsThread("cMainThread") + { + //Start(); + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "cMainThread"); + } + + void Stop(void) + { + m_ShouldTerminate = true; + Wait(); + } + +protected: + + virtual void Execute(void) override + { + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Execute"); + pRoot = new cRoot(); + pRoot->Start(); + delete pRoot; + } + +} ; + +cMainThread * pMainThread = NULL; + +jint JNI_OnLoad(JavaVM* vm, void* reserved) +{ + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "JNI_OnLoad JNI_OnLoad JNI_OnLoad JNI_OnLoad"); + g_JavaVM = vm; + return JNI_VERSION_1_4; +} + +/* Called when program/activity is created */ +extern "C" void Java_com_mcserver_MCServerActivity_NativeOnCreate( JNIEnv* env, jobject thiz ) +{ + g_CriticalSection.Lock(); + g_CurrentJNIEnv = env; + g_JavaThread = thiz; + //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Logging from C++!"); + g_CriticalSection.Unlock(); + + mkdir("/sdcard/mcserver", S_IRWXU | S_IRWXG | S_IRWXO); + + pRoot = new cRoot(); + pRoot->Start(); + delete pRoot; pRoot = NULL; +} + + + + + +extern "C" void Java_com_mcserver_MCServerActivity_NativeCleanUp( JNIEnv* env, jobject thiz ) +{ + g_CriticalSection.Lock(); + g_CurrentJNIEnv = env; + g_JavaThread = thiz; + g_CriticalSection.Unlock(); + + __android_log_print(ANDROID_LOG_ERROR,"MCServer", "pRoot: %p", pRoot); + if( pRoot != NULL ) + { + pRoot->ExecuteConsoleCommand("stop"); + } +} + + + + +extern "C" jboolean Java_com_mcserver_MCServerActivity_NativeIsServerRunning( JNIEnv* env, jobject thiz ) +{ + return pRoot != NULL; +} + + + + +extern "C" jint Java_com_mcserver_MCServerActivity_NativeGetWebAdminPort( JNIEnv* env, jobject thiz ) +{ + if( pRoot != NULL && pRoot->GetWebAdmin() != NULL ) + { + return pRoot->GetWebAdmin()->GetPort(); + } + return 0; } \ No newline at end of file diff --git a/Android/res/layout/main.xml b/Android/res/layout/main.xml index 1895e2752..4ff238d80 100644 --- a/Android/res/layout/main.xml +++ b/Android/res/layout/main.xml @@ -1,61 +1,61 @@ - - + + + + - + - - -