summaryrefslogtreecommitdiffstats
path: root/converter/cNBTData.h
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-30 09:04:40 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-30 09:04:40 +0100
commit5134805bd749e927afa2da16a98ddfb837477b92 (patch)
tree42a49a4e9e8067a1eacdbbfdb745c7ccf3abe723 /converter/cNBTData.h
parentAdded Long Tag. It'll now go through the entire NBT data without erroring out. I'm not sure that it's actually saving all tag 7 data though. (diff)
downloadcuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar.gz
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar.bz2
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar.lz
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar.xz
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.tar.zst
cuberite-5134805bd749e927afa2da16a98ddfb837477b92.zip
Diffstat (limited to 'converter/cNBTData.h')
-rw-r--r--converter/cNBTData.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/converter/cNBTData.h b/converter/cNBTData.h
index 4de9822d3..a0a40e68b 100644
--- a/converter/cNBTData.h
+++ b/converter/cNBTData.h
@@ -38,18 +38,18 @@ public:
void PutInteger( std::string Name, int Value ) { m_Integers[Name] = Value; }
void PutLong( std::string Name, long Value ) { m_Longs[Name] = Value; }
void PutString( std::string Name, std::string Value ) { m_Strings[Name] = Value; }
- void PutByteArray( std::string Name, std::string Value ) { m_ByteArrays[Name] = Value; }
+ void PutByteArray( std::string Name, char* ByteArray ) { m_ByteArrays[Name] = ByteArray; }
void PutCompound( std::string Name );
void PutList( std::string Name, ENUM_TAG Type );
- char GetByte( std::string Name ) { return m_Bytes[Name]; }
- short GetShort( std::string Name ) { return m_Shorts[Name]; }
- int GetInteger( std::string Name ) { return m_Integers[Name]; }
- long GetLong( std::string Name ) { return m_Longs[Name]; }
- std::string GetString( std::string Name ) { return m_Strings[Name]; }
- std::string GetByteArray( std::string Name ) { return m_ByteArrays[Name]; }
+ char GetByte( std::string Name ) { return m_Bytes[Name]; }
+ short GetShort( std::string Name ) { return m_Shorts[Name]; }
+ int GetInteger( std::string Name ) { return m_Integers[Name]; }
+ long GetLong( std::string Name ) { return m_Longs[Name]; }
+ std::string GetString( std::string Name ) { return m_Strings[Name]; }
+ char* GetByteArray( std::string Name ) { return m_ByteArrays[Name]; }
cNBTCompound* GetCompound( std::string Name );
- cNBTList* GetList( std::string Name ) { return m_Lists[Name]; }
+ cNBTList* GetList( std::string Name ) { return m_Lists[Name]; }
cNBTList* GetCurrentList() { return m_CurrentList; }
cNBTCompound* GetParentCompound() { return m_ParentCompound; }
@@ -72,7 +72,7 @@ private:
typedef std::map<std::string, int> IntegerMap;
typedef std::map<std::string, long> LongMap;
typedef std::map<std::string, std::string> StringMap;
- typedef std::map<std::string, std::string> ByteArrayMap;
+ typedef std::map<std::string, char*> ByteArrayMap;
typedef std::map<std::string, cNBTCompound*> CompoundMap;
typedef std::map<std::string, cNBTList*> ListMap;
ByteMap m_Bytes;
@@ -131,14 +131,14 @@ public:
void PutInteger( std::string Name, int Value ) { m_CurrentCompound->PutInteger( Name, Value ); }
void PutLong( std::string Name, long Value ) { m_CurrentCompound->PutLong( Name, Value ); }
void PutString( std::string Name, std::string Value ) { m_CurrentCompound->PutString(Name, Value); }
- void PutByteArray( std::string Name, std::string Value ) { m_CurrentCompound->PutByteArray( Name, Value ); }
+ void PutByteArray( std::string Name, char* ByteArray ) { m_CurrentCompound->PutByteArray( Name, ByteArray ); }
void PutCompound( std::string Name ) { m_CurrentCompound->PutCompound( Name ); }
void PutList( std::string Name, ENUM_TAG Type ) { m_CurrentCompound->PutList( Name, Type ); }
int GetInteger( std::string Name ) { return m_CurrentCompound->GetInteger(Name); }
long GetLong( std::string Name ) { return m_CurrentCompound->GetLong(Name); }
std::string GetString( std::string Name ) { return m_CurrentCompound->GetString(Name); }
- std::string GetByteArray( std::string Name ) { return m_CurrentCompound->GetByteArray(Name); }
+ char* GetByteArray( std::string Name ) { return m_CurrentCompound->GetByteArray(Name); }
cNBTCompound* GetCompound( std::string Name ) { return m_CurrentCompound->GetCompound(Name); }
cNBTList* GetList( std::string Name ) { return m_CurrentCompound->GetList(Name); }