Просмотр исходного кода

chunk stuff

opengl-renderer-broken
Martin Dørum 4 лет назад
Родитель
Сommit
d44754b089
2 измененных файлов: 3 добавлений и 3 удалений
  1. 2
    2
      libswan/include/swan/common.h
  2. 1
    1
      libswan/src/World.cc

+ 2
- 2
libswan/include/swan/common.h Просмотреть файл



static constexpr int TILE_SIZE = 32; static constexpr int TILE_SIZE = 32;
static constexpr int TICK_RATE = 20; static constexpr int TICK_RATE = 20;
static constexpr int CHUNK_HEIGHT = 64;
static constexpr int CHUNK_WIDTH = 64;
static constexpr int CHUNK_HEIGHT = 20;
static constexpr int CHUNK_WIDTH = 32;
static constexpr int PLACEHOLDER_RED = 245; static constexpr int PLACEHOLDER_RED = 245;
static constexpr int PLACEHOLDER_GREEN = 66; static constexpr int PLACEHOLDER_GREEN = 66;
static constexpr int PLACEHOLDER_BLUE = 242; static constexpr int PLACEHOLDER_BLUE = 242;

+ 1
- 1
libswan/src/World.cc Просмотреть файл



// Don't blow our frame budget on generating chunks, // Don't blow our frame budget on generating chunks,
// but generate as many as possible within the budget // but generate as many as possible within the budget
if (clock.duration() > 0.01)
if (clock.duration() > 1 / 120.0)
return true; return true;
abspos += dir; abspos += dir;
} }

Загрузка…
Отмена
Сохранить