#ifndef MAPNODE_HEADER
#define MAPNODE_HEADER
-#include <iostream>
#include "irrlichttypes.h"
#include "light.h"
-#include "exceptions.h"
-#include "serialization.h"
-#ifndef SERVER
-#include "tile.h"
-#endif
class INodeDefManager;
// because this needs to override part of param2
setContent(content);
}
+
+ // Create directly from a nodename
+ // If name is unknown, sets CONTENT_IGNORE
+ MapNode(INodeDefManager *ndef, const std::string &name,
+ u8 a_param1=0, u8 a_param2=0);
bool operator==(const MapNode &other)
{
param2 |= (c&0x0f)<<4;
}
}
+ u8 getParam1() const
+ {
+ return param1;
+ }
+ void setParam1(u8 p)
+ {
+ param1 = p;
+ }
+ u8 getParam2() const
+ {
+ if(param0 < 0x80)
+ return param2;
+ else
+ return param2 & 0x0f;
+ }
+ void setParam2(u8 p)
+ {
+ if(param0 < 0x80)
+ param2 = p;
+ else{
+ param2 &= 0xf0;
+ param2 |= (p&0x0f);
+ }
+ }
void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);
u8 getLight(enum LightBank bank, INodeDefManager *nodemgr) const;
return mix;
}*/
- // In mapnode.cpp
-#ifndef SERVER
- /*
- Get tile of a face of the node.
- dir: direction of face
- Returns: TileSpec. Can contain miscellaneous texture coordinates,
- which must be obeyed so that the texture atlas can be used.
- */
- TileSpec getTile(v3s16 dir, ITextureSource *tsrc,
- INodeDefManager *nodemgr) const;
-#endif
-
/*
Gets mineral content of node, if there is any.
MINERAL_NONE if doesn't contain or isn't able to contain mineral.
static u32 serializedLength(u8 version);
void serialize(u8 *dest, u8 version);
- void deSerialize(u8 *source, u8 version, INodeDefManager *nodemgr);
+ void deSerialize(u8 *source, u8 version);
};