push water tex
parent
79caba208f
commit
20d35ad653
Binary file not shown.
After Width: | Height: | Size: 581 B |
Binary file not shown.
After Width: | Height: | Size: 624 B |
Binary file not shown.
After Width: | Height: | Size: 156 B |
|
@ -7,9 +7,7 @@ Texture2D texgen_build_anim_fallback(asset_id id, int64_t counter) {
|
||||||
(void)counter;
|
(void)counter;
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case ASSET_WATER: {
|
case ASSET_WATER: {
|
||||||
Image img = LoadImageEco("water");
|
return LoadTexEco(zpl_bprintf("%s%d", "water", counter%3));
|
||||||
ImageColorBrightness(&img, zpl_abs((counter % 64 - 32)*2));
|
|
||||||
return Image2TexEco(img);
|
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
default: return GenColorEco(PINK); break;
|
default: return GenColorEco(PINK); break;
|
||||||
|
|
|
@ -18,7 +18,7 @@ typedef struct {
|
||||||
|
|
||||||
#include "lists/assets_list.c"
|
#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
|
#define ASSET_FRAME_SKIP 4
|
||||||
static int64_t assets_frame_counter = 1;
|
static int64_t assets_frame_counter = 1;
|
||||||
static double assets_frame_next_draw = 0.0;
|
static double assets_frame_next_draw = 0.0;
|
||||||
|
|
|
@ -60,7 +60,7 @@ int32_t worldgen_build(world_data *wld) {
|
||||||
// water
|
// water
|
||||||
#if 1
|
#if 1
|
||||||
for (int i=0; i<RAND_RANGE(58, 92); i++) {
|
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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue