A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.h 655B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. // We want every file to be able to easily add Tracy zones
  3. #include <tracy/Tracy.hpp>
  4. #include "Vector2.h"
  5. namespace Swan {
  6. static constexpr int TILE_SIZE = 32;
  7. static constexpr int TICK_RATE = 20;
  8. static constexpr int CHUNK_HEIGHT = 32;
  9. static constexpr int CHUNK_WIDTH = 32;
  10. static constexpr int PLACEHOLDER_RED = 245;
  11. static constexpr int PLACEHOLDER_GREEN = 66;
  12. static constexpr int PLACEHOLDER_BLUE = 242;
  13. using TilePos = Vec2i;
  14. using ChunkPos = Vec2i;
  15. class Game;
  16. class World;
  17. class WorldPlane;
  18. class Win;
  19. class ResourceManager;
  20. struct Context {
  21. Game &game;
  22. World &world;
  23. WorldPlane &plane;
  24. ResourceManager &resources;
  25. };
  26. }