1234567891011121314151617181920212223242526272829303132333435 |
- #include "StaticRegistry.h"
- #include "BlockType.h"
- #include "ItemType.h"
- int count_DimensionGenerator = 0;
- int count_ItemType = 0;
- int count_BlockType = 0;
- int count_WorldUpdateType = 0;
- int count_EntityType = 0;
- #undef REGISTER
- #define REGISTER(c, typ) \
- const int c::ID = count_##typ++; \
- int registry_initializer_##c##_##typ = StaticRegistry<typ>::INSTANCE.getCount(); \
- const c *c::INSTANCE = new c(); \
- bool initialized_##c##_##typ = StaticRegistry<typ>::INSTANCE.info(c::ID);
- // order of includes determines the ids
- // block types
- #include "NoBlock.h" // must be first
- #include "BasicBlocks.h"
- // dimensions
- #include "OverworldDimension.h"
- // entities
- #include "Player.h"
- #include "ItemEntity.h"
- // item skills
- #include "PlayerHand.h"
- #include "StoneTool.h"
- #include "BasicItems.h"
- // world updates
- #include "AddEntityUpdate.h"
- #include "EntityRemovedUpdate.h"
- #include "LightSources.h"
|