push water tex

efd/v1
Dominik Madarász 2022-10-16 15:31:07 +02:00
parent 79caba208f
commit 20d35ad653
6 changed files with 3 additions and 5 deletions

BIN
art/gen/water0.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

BIN
art/gen/water1.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

BIN
art/gen/water2.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

View File

@ -7,9 +7,7 @@ Texture2D texgen_build_anim_fallback(asset_id id, int64_t counter) {
(void)counter;
switch (id) {
case ASSET_WATER: {
Image img = LoadImageEco("water");
ImageColorBrightness(&img, zpl_abs((counter % 64 - 32)*2));
return Image2TexEco(img);
return LoadTexEco(zpl_bprintf("%s%d", "water", counter%3));
}break;
default: return GenColorEco(PINK); break;

View File

@ -18,7 +18,7 @@ typedef struct {
#include "lists/assets_list.c"
#define ASSET_FRAME_RENDER_MS (1.0/5.0)
#define ASSET_FRAME_RENDER_MS (1.0/1.0)
#define ASSET_FRAME_SKIP 4
static int64_t assets_frame_counter = 1;
static double assets_frame_next_draw = 0.0;

View File

@ -60,7 +60,7 @@ int32_t worldgen_build(world_data *wld) {
// water
#if 1
for (int i=0; i<RAND_RANGE(58, 92); i++) {
world_fill_rect_anchor(world->data, 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_noise80);
world_fill_rect_anchor(world->outer_data, 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_noise80);
}
#endif