worldgen: disable few features

isolation_bkp/dynres
Dominik Madarász 2021-07-18 21:06:21 +02:00
parent 85f840875f
commit 513f05f18e
2 changed files with 6 additions and 16 deletions

View File

@ -168,23 +168,9 @@ void DEBUG_draw_ground(uint64_t key, entity_view * data) {
float x = data->x * size + offset;
float y = data->y * size + offset;
//DrawRectangleEco(x, y, size-offset, size-offset, ColorAlpha(LIME, data->tran_time));
Texture2D tex = GetChunkTexture(key);
DrawTextureEx(tex, (Vector2){x, y}, 0.0f, 1.0f, ColorAlpha(WHITE, data->tran_time));
#if 0
float block_size = view->block_size*0.70f;
int16_t chunk_size = view->chunk_size;
float block_spacing = (float)block_size * (size/(float)(chunk_size*block_size));
float block_offset = size - block_spacing*chunk_size;
for (uint16_t i = 0; i < chunk_size*chunk_size; i++) {
int32_t bx = (float)(i % chunk_size) * block_spacing + (int16_t)x + block_offset;
int32_t by = (float)(i / chunk_size) * block_spacing + (int16_t)y + block_offset;
DrawRectangleEco(bx, by, block_size, block_size, GREEN);
}
#endif
if (zoom_overlay_tran > 0.02f) {
DrawRectangleEco(x, y, size-offset, size-offset, ColorAlpha(ColorFromHSV(key*x, 0.13f, 0.89f), data->tran_time*zoom_overlay_tran*0.75f));

View File

@ -124,19 +124,23 @@ int32_t worldgen_test(world_data *wld) {
// ground
world_fill_rect(grnd_id, 1, 1, world->dim-2, world->dim-2, NULL);
world_fill_rect(dirt_id, 1, 1, world->dim-2, world->dim-2, shaper_noise33);
world_fill_rect(dirt_id, 1, 1, world->dim-2, world->dim-2, shaper_noise50);
// water
#if 0
for (int i=0; i<RAND_RANGE(0, 12); i++) {
world_fill_rect_anchor(watr_id, RAND_RANGE(0, world->dim), RAND_RANGE(0, world->dim), 4+RAND_RANGE(0,3), 4+RAND_RANGE(0,3), 0.5f, 0.5f, shaper_noise33);
}
#endif
const uint32_t HILLS_SIZE = 44;
// hills
#if 0
const uint32_t HILLS_SIZE = 44;
for (int i=0; i<RAND_RANGE(32, 224); i++) {
world_fill_rect_anchor(wall_id, RAND_RANGE(0, world->dim), RAND_RANGE(0, world->dim), RAND_RANGE(0,HILLS_SIZE), RAND_RANGE(0,HILLS_SIZE), 0.5f, 0.5f, shaper_noise33);
}
#endif
return WORLD_ERROR_NONE;
}