StaticInitializerOrder.cpp 554 B

1234567891011121314151617181920212223
  1. #define _REGISTRY
  2. #include "Registries.h"
  3. int count_ItemType = 0;
  4. int count_BlockType = 0;
  5. int count_WorldUpdateType = 0;
  6. int count_EntityType = 0;
  7. #undef REGISTER
  8. #define REGISTER(c, typ) \
  9. const int c::ID = count_##typ++; \
  10. const c *c::INSTANCE = new c();
  11. // order of includes determines the ids
  12. #include "NoBlock.h" // must be first
  13. #include "BasicBlocks.h"
  14. //#include "OverworldDimension.h"
  15. #include "AddChunkUpdate.h"
  16. //#include "Player.h"
  17. #include "PlaceBlockUpdate.h"
  18. #include "BlockChangedUpdate.h"