Android tests
Actually it seems to screw up after the Biome data

	a_Writer.BeginCompound("Level");
	a_Writer.AddInt("xPos", a_Chunk.m_ChunkX);
	a_Writer.AddInt("zPos", a_Chunk.m_ChunkZ);
	cNBTChunkSerializer Serializer(a_Writer);
	if (!m_World->GetChunkData(a_Chunk.m_ChunkX, a_Chunk.m_ChunkY, a_Chunk.m_ChunkZ, Serializer))
	{
		return false;
	}
	Serializer.Finish();  // Close NBT tags

	a_Writer.AddString("TestString1", "o hai I'm string");
	a_Writer.AddDouble("TestDouble1", 1.23);
	a_Writer.AddFloat("TestFloat1", 1.23f);
	a_Writer.AddInt("TestInt1", 2);
	a_Writer.AddLong("TestLong1", 1234);
	a_Writer.AddShort("TestShort1", 1234);
	a_Writer.AddByte("TestByte1", 34);

	// Save biomes, both MCS (IntArray) and MC-vanilla (ByteArray):
	if (Serializer.m_BiomesAreValid)
	{
		a_Writer.AddByteArray("Biomes",    (const char *)(Serializer.m_VanillaBiomes), ARRAYCOUNT(Serializer.m_VanillaBiomes));
		a_Writer.AddIntArray ("MCSBiomes", (const int *)(Serializer.m_Biomes),         ARRAYCOUNT(Serializer.m_Biomes));
	}

	a_Writer.AddString("TestString2", "o hai I'm string");
	a_Writer.AddDouble("TestDouble2", 1.23);
	a_Writer.AddFloat("TestFloat2", 1.23f);
	a_Writer.AddInt("TestInt2", 2);
	a_Writer.AddLong("TestLong2", 1234);
	a_Writer.AddShort("TestShort2", 1234);
	a_Writer.AddByte("TestByte2", 34);

	a_Writer.AddIntArray("TestIntArray", (const int *)Serializer.m_Biomes, 2);
	// Save blockdata:
	a_Writer.BeginList("Sections", TAG_Compound);
	int SliceSizeBlock  = cChunkDef::Width * cChunkDef::Width * 16;
	int SliceSizeNibble = SliceSizeBlock / 2;
	const char * BlockTypes    = (const char *)(Serializer.m_BlockTypes);
	const char * BlockMetas    = (const char *)(Serializer.m_BlockMetas);
	const char * BlockLight    = (const char *)(Serializer.m_BlockLight);
	const char * BlockSkyLight = (const char *)(Serializer.m_BlockSkyLight);
	a_Writer.AddIntArray("TestIntArray2", (const int *)Serializer.m_Biomes, 2);
	for (int Y = 0; Y < 16; Y++)
	{
		a_Writer.BeginCompound("");
		a_Writer.AddByteArray("Blocks",     BlockTypes    + Y * SliceSizeBlock,  SliceSizeBlock);
		a_Writer.AddByteArray("Data",       BlockMetas    + Y * SliceSizeNibble, SliceSizeNibble);
		a_Writer.AddByteArray("SkyLight",   BlockSkyLight + Y * SliceSizeNibble, SliceSizeNibble);
		a_Writer.AddByteArray("BlockLight", BlockLight    + Y * SliceSizeNibble, SliceSizeNibble);
		a_Writer.AddByte("Y", (unsigned char)Y);
		a_Writer.EndCompound();
	}
	a_Writer.EndList();  // "Sections"

	a_Writer.AddIntArray("TestIntArray3", (const int *)Serializer.m_Biomes, 2);

	a_Writer.AddString("TestString3", "o hai I'm string");
	a_Writer.AddDouble("TestDouble3", 1.23);
	a_Writer.AddFloat("TestFloat3", 1.23f);
	a_Writer.AddInt("TestInt3", 2);
	a_Writer.AddLong("TestLong3", 1234);
	a_Writer.AddShort("TestShort3", 1234);
	a_Writer.AddByte("TestByte3", 34);

	// Store the information that the lighting is valid. 
	// For compatibility reason, the default is "invalid" (missing) - this means older data is re-lighted upon loading.
	if (Serializer.IsLightValid())
	{
		a_Writer.AddByte("MCSIsLightValid", 1);
	}
	
	a_Writer.EndCompound();  // "Level"

Gives this:
[Image: ruxiyc.png]
Reply
Thanks given by:


Messages In This Thread
Android tests - by xoft - 08-16-2012, 03:58 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 04:37 AM
RE: Android tests - by xoft - 08-16-2012, 04:40 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 04:47 AM
RE: Android tests - by xoft - 08-16-2012, 04:58 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 05:05 AM
RE: Android tests - by FakeTruth - 08-16-2012, 05:18 AM
RE: Android tests - by FakeTruth - 08-16-2012, 06:45 AM
RE: Android tests - by FakeTruth - 08-16-2012, 07:00 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 07:37 AM
RE: Android tests - by FakeTruth - 08-16-2012, 08:24 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 08:43 AM
RE: Android tests - by NiLSPACE - 08-16-2012, 07:39 PM
RE: Android tests - by FakeTruth - 08-16-2012, 10:30 PM
RE: Android tests - by NiLSPACE - 08-16-2012, 10:36 PM
RE: Android tests - by FakeTruth - 08-17-2012, 05:32 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 05:49 AM
RE: Android tests - by FakeTruth - 08-17-2012, 05:50 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 05:54 AM
RE: Android tests - by FakeTruth - 08-17-2012, 05:55 AM
RE: Android tests - by xoft - 08-17-2012, 05:56 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 05:56 AM
RE: Android tests - by FakeTruth - 08-17-2012, 05:56 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 05:58 AM
RE: Android tests - by xoft - 08-17-2012, 06:00 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 06:14 AM
RE: Android tests - by xoft - 08-17-2012, 06:18 AM
RE: Android tests - by FakeTruth - 08-17-2012, 06:29 AM
RE: Android tests - by NiLSPACE - 08-17-2012, 06:38 AM
RE: Android tests - by xoft - 08-17-2012, 05:54 PM
RE: Android tests - by xoft - 08-18-2012, 12:46 AM
RE: Android tests - by FakeTruth - 08-18-2012, 01:23 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 01:28 AM
RE: Android tests - by FakeTruth - 08-18-2012, 01:49 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 01:55 AM
RE: Android tests - by xoft - 08-18-2012, 01:57 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 02:00 AM
RE: Android tests - by xoft - 08-18-2012, 02:03 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 02:06 AM
RE: Android tests - by xoft - 08-18-2012, 04:28 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 04:31 AM
RE: Android tests - by xoft - 08-18-2012, 04:44 AM
RE: Android tests - by FakeTruth - 08-18-2012, 07:15 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 04:54 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 07:23 AM
RE: Android tests - by FakeTruth - 08-18-2012, 07:33 AM
RE: Android tests - by NiLSPACE - 08-18-2012, 08:45 AM
RE: Android tests - by xoft - 08-18-2012, 05:58 PM
RE: Android tests - by NiLSPACE - 08-18-2012, 06:06 PM
RE: Android tests - by FakeTruth - 08-18-2012, 09:27 AM
RE: Android tests - by xoft - 08-18-2012, 07:51 PM
RE: Android tests - by FakeTruth - 08-18-2012, 09:04 PM
RE: Android tests - by bearbin - 08-18-2012, 08:51 PM
RE: Android tests - by FakeTruth - 08-19-2012, 07:08 AM
RE: Android tests - by ThuGie - 08-19-2012, 08:16 AM
RE: Android tests - by FakeTruth - 08-19-2012, 08:27 AM
RE: Android tests - by FakeTruth - 08-19-2012, 10:36 AM
RE: Android tests - by xoft - 08-19-2012, 06:08 PM
RE: Android tests - by NiLSPACE - 08-19-2012, 07:27 PM
RE: Android tests - by xoft - 08-19-2012, 08:55 PM
RE: Android tests - by NiLSPACE - 08-19-2012, 09:01 PM
RE: Android tests - by Lapayo - 08-19-2012, 09:05 PM
RE: Android tests - by xoft - 08-19-2012, 09:48 PM
RE: Android tests - by FakeTruth - 08-20-2012, 02:13 AM
RE: Android tests - by NiLSPACE - 08-20-2012, 02:18 AM
RE: Android tests - by FakeTruth - 08-20-2012, 02:19 AM
RE: Android tests - by FakeTruth - 08-20-2012, 02:54 AM
RE: Android tests - by NiLSPACE - 08-20-2012, 12:43 AM
RE: Android tests - by xoft - 08-20-2012, 06:59 PM
RE: Android tests - by FakeTruth - 08-20-2012, 08:38 PM
RE: Android tests - by xoft - 08-20-2012, 09:30 PM
RE: Android tests - by FakeTruth - 08-20-2012, 09:58 PM
RE: Android tests - by xoft - 08-21-2012, 12:07 AM
RE: Android tests - by Taugeshtu - 08-21-2012, 11:02 PM
RE: Android tests - by xoft - 08-22-2012, 12:05 AM
RE: Android tests - by FakeTruth - 08-22-2012, 12:26 AM
RE: Android tests - by Taugeshtu - 08-22-2012, 10:52 PM
RE: Android tests - by FakeTruth - 08-22-2012, 10:54 PM
RE: Android tests - by NiLSPACE - 08-22-2012, 11:15 PM
RE: Android tests - by Taugeshtu - 08-22-2012, 11:22 PM
RE: Android tests - by FakeTruth - 08-23-2012, 05:57 AM
RE: Android tests - by NiLSPACE - 09-22-2012, 09:47 PM
RE: Android tests - by FakeTruth - 09-23-2012, 12:05 AM
RE: Android tests - by FakeTruth - 09-26-2012, 10:33 PM
RE: Android tests - by FakeTruth - 09-27-2012, 01:19 AM
RE: Android tests - by NiLSPACE - 09-29-2012, 12:04 AM
RE: Android tests - by FakeTruth - 09-29-2012, 12:39 AM
RE: Android tests - by l0udPL - 09-29-2012, 04:58 AM
RE: Android tests - by NiLSPACE - 09-29-2012, 08:29 PM
RE: Android tests - by NiLSPACE - 09-30-2012, 04:11 AM
RE: Android tests - by FakeTruth - 09-30-2012, 04:25 AM
RE: Android tests - by NiLSPACE - 09-30-2012, 04:28 AM
RE: Android tests - by NiLSPACE - 10-01-2012, 07:08 PM
RE: Android tests - by ThuGie - 10-02-2012, 03:16 AM
RE: Android tests - by FakeTruth - 11-12-2012, 06:41 AM
RE: Android tests - by FakeTruth - 11-12-2012, 06:49 AM
RE: Android tests - by xoft - 11-12-2012, 07:18 AM
RE: Android tests - by FakeTruth - 11-12-2012, 07:25 AM
RE: Android tests - by FakeTruth - 11-12-2012, 07:28 AM
RE: Android tests - by FakeTruth - 11-12-2012, 07:49 AM
RE: Android tests - by FakeTruth - 11-12-2012, 08:36 AM
RE: Android tests - by xoft - 11-12-2012, 08:42 PM
RE: Android tests - by FakeTruth - 11-17-2012, 12:42 AM
RE: Android tests - by xoft - 11-17-2012, 01:43 AM
RE: Android tests - by FakeTruth - 11-17-2012, 02:20 AM
RE: Android tests - by xoft - 11-17-2012, 02:49 AM
RE: Android tests - by FakeTruth - 11-17-2012, 07:18 AM
RE: Android tests - by FakeTruth - 11-17-2012, 08:26 AM
RE: Android tests - by NiLSPACE - 11-17-2012, 08:51 AM
RE: Android tests - by FakeTruth - 11-17-2012, 09:19 AM
RE: Android tests - by NiLSPACE - 11-17-2012, 07:43 PM
RE: Android tests - by FakeTruth - 11-17-2012, 09:37 PM
RE: Android tests - by NiLSPACE - 11-17-2012, 09:50 PM
RE: Android tests - by FakeTruth - 11-17-2012, 11:07 PM
RE: Android tests - by NiLSPACE - 11-18-2012, 02:41 AM
RE: Android tests - by FakeTruth - 11-18-2012, 06:08 AM
RE: Android tests - by NiLSPACE - 11-23-2012, 06:01 AM
RE: Android tests - by xoft - 11-23-2012, 06:24 AM
RE: Android tests - by cardfire - 12-23-2012, 12:22 PM
RE: Android tests - by xoft - 12-23-2012, 01:58 PM
RE: Android tests - by cardfire - 12-26-2012, 06:11 PM
RE: Android tests - by xoft - 12-27-2012, 04:36 PM
RE: Android tests - by FakeTruth - 01-03-2013, 10:29 PM
RE: Android tests - by NiLSPACE - 01-03-2013, 11:46 PM
RE: Android tests - by FakeTruth - 01-04-2013, 12:07 AM
RE: Android tests - by LordKitsuna - 02-06-2013, 04:53 PM
RE: Android tests - by bearbin - 02-06-2013, 05:24 PM
RE: Android tests - by Mkvarner - 02-07-2013, 06:28 PM
RE: Android tests - by cardfire - 02-10-2013, 03:11 AM
RE: Android tests - by xoft - 02-10-2013, 06:40 AM
RE: Android tests - by Garmael - 02-20-2013, 08:20 PM
RE: Android tests - by NiLSPACE - 02-20-2013, 08:37 PM
RE: Android tests - by Garmael - 02-20-2013, 08:45 PM
RE: Android tests - by NiLSPACE - 02-20-2013, 08:50 PM
RE: Android tests - by Garmael - 02-20-2013, 08:55 PM
RE: Android tests - by Garmael - 02-20-2013, 10:28 PM
RE: Android tests - by NiLSPACE - 02-20-2013, 10:54 PM
RE: Android tests - by Garmael - 02-20-2013, 11:56 PM
RE: Android tests - by xoft - 02-21-2013, 12:00 AM
RE: Android tests - by Garmael - 02-21-2013, 01:36 AM
RE: Android tests - by cardfire - 02-27-2013, 04:48 AM
RE: Android tests - by FakeTruth - 02-21-2013, 05:28 AM
RE: Android tests - by NiLSPACE - 03-24-2013, 10:14 PM
RE: Android tests - by cardfire - 03-25-2013, 12:51 AM
RE: Android tests - by NiLSPACE - 04-10-2013, 01:21 AM
RE: Android tests - by FakeTruth - 04-10-2013, 04:55 AM
RE: Android tests - by NiLSPACE - 05-12-2013, 12:12 AM
RE: Android tests - by FakeTruth - 05-12-2013, 05:54 AM
RE: Android tests - by LordKitsuna - 05-13-2013, 12:13 AM
RE: Android tests - by NiLSPACE - 06-12-2013, 11:55 PM
RE: Android tests - by NiLSPACE - 06-26-2013, 01:43 AM
RE: Android tests - by DrkCodeman - 06-29-2013, 04:59 AM
RE: Android tests - by xoft - 06-29-2013, 05:04 AM
RE: Android tests - by DrkCodeman - 06-29-2013, 05:29 AM
RE: Android tests - by tonibm19 - 06-29-2013, 05:41 AM
RE: Android tests - by NiLSPACE - 06-29-2013, 05:43 AM
RE: Android tests - by DrkCodeman - 06-29-2013, 06:00 AM
RE: Android tests - by NiLSPACE - 08-29-2013, 02:35 AM
RE: Android tests - by tonibm19 - 09-30-2013, 04:42 AM
RE: Android tests - by NiLSPACE - 12-23-2013, 11:54 PM
RE: Android tests - by FakeTruth - 12-24-2013, 12:49 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 12:53 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 02:01 AM
RE: Android tests - by FakeTruth - 12-24-2013, 03:03 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 03:23 AM
RE: Android tests - by FakeTruth - 12-24-2013, 03:33 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 04:03 AM
RE: Android tests - by FakeTruth - 12-24-2013, 04:54 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 04:59 AM
RE: Android tests - by FakeTruth - 12-24-2013, 06:36 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 06:39 AM
RE: Android tests - by tigerw - 12-24-2013, 06:49 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 06:54 AM
RE: Android tests - by FakeTruth - 12-24-2013, 06:55 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 06:59 AM
RE: Android tests - by bearbin - 12-24-2013, 07:45 AM
RE: Android tests - by FakeTruth - 12-24-2013, 07:46 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 07:47 AM
RE: Android tests - by NiLSPACE - 12-24-2013, 08:09 PM
RE: Android tests - by xoft - 12-24-2013, 08:26 PM
RE: Android tests - by NiLSPACE - 12-24-2013, 08:45 PM
RE: Android tests - by NiLSPACE - 12-24-2013, 10:46 PM
RE: Android tests - by tigerw - 12-25-2013, 03:32 AM
RE: Android tests - by bearbin - 12-25-2013, 08:08 AM
RE: Android tests - by tigerw - 12-25-2013, 09:37 AM
RE: Android tests - by FakeTruth - 12-25-2013, 10:07 AM
RE: Android tests - by NiLSPACE - 06-08-2014, 08:13 AM
RE: Android tests - by bearbin - 06-08-2014, 04:52 PM
RE: Android tests - by NiLSPACE - 06-08-2014, 07:30 PM
RE: Android tests - by xoft - 06-10-2014, 01:11 AM
RE: Android tests - by worktycho - 06-10-2014, 01:48 AM
RE: Android tests - by NiLSPACE - 10-30-2014, 06:05 AM
RE: Android tests - by FakeTruth - 10-30-2014, 08:10 AM
RE: Android tests - by NiLSPACE - 10-31-2014, 06:05 AM
RE: Android tests - by tonibm19 - 12-04-2014, 12:01 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 12:55 AM
RE: Android tests - by tonibm19 - 12-29-2014, 01:07 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 03:41 AM
RE: Android tests - by tonibm19 - 12-29-2014, 04:21 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 05:17 AM
RE: Android tests - by LO1ZB - 12-29-2014, 05:26 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 05:48 AM
RE: Android tests - by tigerw - 12-29-2014, 07:51 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 07:59 AM
RE: Android tests - by LO1ZB - 12-29-2014, 09:28 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 09:50 AM
RE: Android tests - by LO1ZB - 12-29-2014, 09:53 AM
RE: Android tests - by NiLSPACE - 12-29-2014, 10:20 AM
RE: Android tests - by LO1ZB - 12-30-2014, 08:17 AM
RE: Android tests - by NiLSPACE - 12-30-2014, 08:30 AM
RE: Android tests - by tigerw - 04-16-2015, 10:06 AM
RE: Android tests - by worktycho - 04-16-2015, 10:40 AM
RE: Android tests - by tigerw - 04-16-2015, 08:58 PM
RE: Android tests - by worktycho - 04-16-2015, 10:09 PM
RE: Android tests - by tigerw - 08-27-2015, 08:54 AM
RE: Android tests - by worktycho - 08-27-2015, 09:00 AM
RE: Android tests - by tigerw - 08-28-2015, 11:13 PM
RE: Android tests - by worktycho - 08-29-2015, 01:53 AM
RE: Android tests - by xoft - 08-30-2015, 09:23 AM
RE: Android tests - by worktycho - 08-30-2015, 09:38 AM
RE: Android tests - by tigerw - 08-31-2015, 08:12 AM
RE: Android tests - by worktycho - 08-31-2015, 08:50 AM
RE: Android tests - by NiLSPACE - 08-31-2015, 03:28 PM
RE: Android tests - by tonibm19 - 08-31-2015, 06:31 PM
RE: Android tests - by NiLSPACE - 08-31-2015, 07:28 PM
RE: Android tests - by tonibm19 - 08-31-2015, 09:51 PM
RE: Android tests - by NiLSPACE - 08-31-2015, 09:58 PM
RE: Android tests - by tigerw - 09-01-2015, 01:55 AM
RE: Android tests - by NiLSPACE - 09-01-2015, 02:38 AM
RE: Android tests - by tonibm19 - 09-01-2015, 03:35 AM
RE: Android tests - by NiLSPACE - 09-18-2015, 04:37 PM
RE: Android tests - by tonibm19 - 09-18-2015, 11:34 PM
RE: Android tests - by worktycho - 09-18-2015, 11:49 PM
RE: Android tests - by NiLSPACE - 09-18-2015, 11:55 PM
RE: Android tests - by worktycho - 09-19-2015, 12:06 AM
RE: Android tests - by NiLSPACE - 10-06-2015, 04:42 AM



Users browsing this thread: 48 Guest(s)