diff --git a/src/projectzombie/display/DisplayLighting.java b/src/projectzombie/display/DisplayLighting.java index f6778c0..bd8a585 100755 --- a/src/projectzombie/display/DisplayLighting.java +++ b/src/projectzombie/display/DisplayLighting.java @@ -325,7 +325,7 @@ public class DisplayLighting for(int x2=0;x2 0.5) { - chunk.setBackTile(Tiles.DIRT.getDefaultState(), pos.toInt()); + chunk.setBackTile(Tiles.SAND.getDefaultState(), pos.toInt()); + rock_type = (byte)2; + + if(rand.nextDouble() > 0.98) { + chunk.setFrontTile(Tiles.CACTUS.getDefaultState(), pos.toInt()); + } } else { chunk.setBackTile(Tiles.GRASS.getDefaultState(), pos.toInt()); + + if(rand.nextDouble() > 0.95) { + chunk.setFrontTile(Tiles.TREE.getDefaultState(), pos.toInt()); + } + } + + if(rand.nextDouble() > 0.92) { + chunk.setFrontTile(new TileState(Tiles.ROCK, rock_type), pos.toInt()); } } } diff --git a/src/resources/shader/environmentRenderer.fsh b/src/resources/shader/environmentRenderer.fsh index 5941631..739f50a 100644 --- a/src/resources/shader/environmentRenderer.fsh +++ b/src/resources/shader/environmentRenderer.fsh @@ -20,8 +20,8 @@ uniform vec2 lightmap_size; uniform vec2 tex_cut; uniform vec4 color; -uniform vec3 color_grass_min; -uniform vec3 color_grass_max; +vec3 color_grass_min = vec3(0.05, 0.8, 0); +vec3 color_grass_max = vec3(1, 0.6, 0); float map(float x, float in_min, float in_max, float out_min, float out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; @@ -41,6 +41,10 @@ float scaleLight(float level) { return pow(level, 1.5); } +float smoothStep(float a) { + return a * a * (3 - 2 * a); +} + void main() { vec4 light = texture(lightmap, vec2( @@ -51,9 +55,9 @@ void main() vec3 light_src = vec3(1, 1, 1) * (scaleLight(light.g) - abs(pLightMapPos.y) * 0.1); vec4 color_white = vec4(1, 1, 1, 1); - vec4 color_grass = vec4(mapVec(light.b, 0, 1, color_grass_min, color_grass_max), 1); + vec4 color_grass = vec4(mapVec(smoothStep(light.b), 0, 1, color_grass_min, color_grass_max), 1); - FragColor = texture(atlas, pTexture) * (mod(pFlags >> 2, 1) == 1 ? color_grass : color_white) * + FragColor = texture(atlas, pTexture) * (mod(int(pFlags / 4), 2) == 1 ? color_grass : color_white) * color * vec4(biggest(light_day, light_src), 1); discard(FragColor.a == 0 || (pPos.x > tex_cut.y && tex_cut.x > 0.5)); diff --git a/src/resources/texture/list.txt b/src/resources/texture/list.txt index 32f5b65..7ce9d58 100644 --- a/src/resources/texture/list.txt +++ b/src/resources/texture/list.txt @@ -1,149 +1,157 @@ -./tile/rock.png -./tile/ladder.png -./tile/tree.png -./tile/water.png -./tile/ladder_up.png -./tile/dirt.png -./tile/wall.png -./tile/tunnel_down.png -./tile/stone.png -./tile/boss_portal.png -./tile/sand.png -./tile/lantern.png -./tile/chest.png -./tile/lava.png -./tile/lava_flow.png -./tile/grass.png +./text/char_question.png +./text/char_l_a.png +./text/char_u_j.png +./text/char_l_u.png +./text/char_u_s.png +./text/char_l_s.png +./text/char_plus.png +./text/char_l_e.png +./text/char_7.png +./text/char_minus.png +./text/char_u_r.png +./text/char_u_l.png +./text/char_obracket.png +./text/char_u_m.png +./text/char_l_t.png +./text/char_percent.png +./text/char_l_y.png +./text/char_0.png +./text/char_4.png +./text/char_l_r.png +./text/char_l_m.png +./text/char_cbracket.png +./text/char_u_g.png +./text/char_u_q.png +./text/char_u_i.png +./text/char_l_w.png +./text/char_l_v.png +./text/char_fslash.png +./text/char_u_p.png +./text/char_gthan.png +./text/char_8.png +./text/char_unknown.png +./text/char_u_n.png +./text/char_l_i.png +./text/char_u_y.png +./text/char_l_p.png +./text/char_lthan.png +./text/char_l_g.png +./text/char_bslash.png +./text/char_1.png +./text/char_u_z.png +./text/char_l_f.png +./text/char_u_w.png +./text/char_9.png +./text/char_l_x.png +./text/char_l_o.png +./text/char_equals.png +./text/char_l_d.png +./text/char_dollar.png +./text/char_hashtag.png +./text/char_l_q.png +./text/char_u_o.png +./text/char_6.png +./text/char_u_d.png +./text/char_u_e.png +./text/char_exclamation.png +./text/char_vertical.png +./text/char_u_k.png +./text/char_u_c.png +./text/char_l_n.png +./text/char_u_b.png +./text/char_u_f.png +./text/char_l_h.png +./text/char_l_k.png +./text/char_u_t.png +./text/char_3.png +./text/char_u_v.png +./text/char_u_h.png +./text/char_u_a.png +./text/char_l_b.png +./text/char_underscore.png +./text/char_u_x.png +./text/char_comma.png +./text/char_l_l.png +./text/char_5.png +./text/char_colon.png +./text/char_l_z.png +./text/char_space.png +./text/char_2.png +./text/char_l_j.png +./text/char_fullstop.png +./text/char_l_c.png +./text/char_u_u.png ./list.txt -./item/rock.png -./item/ammo_box.png -./item/shield_upgrade.png -./item/grappling_hook.png -./item/health_potion.png -./item/gun_upgrade.png +./player/player_white_front_moving.png +./player/player_white_back_moving.png +./player/player_black_back_moving.png +./player/player_black_back_still.png ./player/player_white_back_still.png ./player/player_white_front_still.png ./player/player_black_front_moving.png ./player/player_black_front_still.png -./player/player_black_back_moving.png -./player/player_black_back_still.png -./player/player_white_back_moving.png -./player/player_white_front_moving.png -./gui/gun.png +./particle/smoke_trail.png +./particle/water.png +./particle/smoke_0.png +./particle/smoke_1.png +./particle/blood.png +./particle/lava.png +./particle/bullet.png +./particle/smoke_2.png +./particle/smoke_4.png +./particle/smoke_3.png +./particle/smoke_5.png ./gui/health_empty.png -./gui/hotbar_selected.png -./gui/health_full.png -./gui/hotbar.png -./gui/button_normal.png -./gui/shield.png ./gui/button_hover.png -./text/char_bslash.png -./text/char_dollar.png -./text/char_l_w.png -./text/char_u_d.png -./text/char_u_t.png -./text/char_space.png -./text/char_l_x.png -./text/char_l_k.png -./text/char_6.png -./text/char_unknown.png -./text/char_comma.png -./text/char_obracket.png -./text/char_u_w.png -./text/char_7.png -./text/char_l_f.png -./text/char_vertical.png -./text/char_plus.png -./text/char_u_a.png -./text/char_9.png -./text/char_u_k.png -./text/char_u_n.png -./text/char_percent.png -./text/char_u_m.png -./text/char_exclamation.png -./text/char_1.png -./text/char_l_q.png -./text/char_l_z.png -./text/char_l_h.png -./text/char_u_c.png -./text/char_l_g.png -./text/char_l_s.png -./text/char_fullstop.png -./text/char_u_j.png -./text/char_l_m.png -./text/char_l_t.png -./text/char_u_v.png -./text/char_colon.png -./text/char_l_i.png -./text/char_l_y.png -./text/char_u_l.png -./text/char_u_e.png -./text/char_5.png -./text/char_2.png -./text/char_3.png -./text/char_l_p.png -./text/char_fslash.png -./text/char_l_u.png -./text/char_u_f.png -./text/char_u_u.png -./text/char_l_e.png -./text/char_l_l.png -./text/char_u_g.png -./text/char_u_q.png -./text/char_u_b.png -./text/char_l_o.png -./text/char_minus.png -./text/char_l_v.png -./text/char_lthan.png -./text/char_u_s.png -./text/char_equals.png -./text/char_8.png -./text/char_underscore.png -./text/char_u_x.png -./text/char_0.png -./text/char_l_d.png -./text/char_l_c.png -./text/char_l_j.png -./text/char_u_z.png -./text/char_u_h.png -./text/char_hashtag.png -./text/char_gthan.png -./text/char_cbracket.png -./text/char_u_i.png -./text/char_question.png -./text/char_u_o.png -./text/char_u_y.png -./text/char_l_r.png -./text/char_l_b.png -./text/char_l_a.png -./text/char_l_n.png -./text/char_u_p.png -./text/char_u_r.png -./text/char_4.png -./entity/armored_zombie_back_moving.png -./entity/zombie_front_still.png -./entity/tnt.png +./gui/button_normal.png +./gui/hotbar.png +./gui/health_full.png +./gui/hotbar_selected.png +./gui/shield.png +./gui/gun.png +./tile/cactus4.png +./tile/dirt.png +./tile/lantern.png +./tile/wall.png +./tile/cactus2.png +./tile/rock.png +./tile/water.png +./tile/stone.png +./tile/tree_leaves.png +./tile/ladder_up.png +./tile/lava_flow.png +./tile/grass.png +./tile/chest.png +./tile/lava.png +./tile/snow.png +./tile/rock_sandstone.png +./tile/cactus1.png +./tile/tunnel_down.png +./tile/snow_pile.png +./tile/boss_portal.png +./tile/ladder.png +./tile/sand.png +./tile/tree_base.png +./tile/cactus3.png ./entity/flare.png -./entity/boss1/boss_walking.png +./entity/grappling_hook.png +./entity/zombie_back_moving.png +./entity/tnt.png +./entity/armored_zombie_back_moving.png +./entity/armored_zombie_front_moving.png +./entity/dummy.png +./entity/armored_zombie_front_still.png +./entity/armored_zombie_back_still.png +./entity/zombie_front_moving.png +./entity/boss1/boss_walking_firing.png ./entity/boss1/boss_firing.png ./entity/boss1/boss_still.png -./entity/boss1/boss_walking_firing.png -./entity/armored_zombie_back_still.png -./entity/armored_zombie_front_moving.png -./entity/grappling_hook.png +./entity/boss1/boss_walking.png ./entity/zombie_back_still.png -./entity/dummy.png -./entity/zombie_back_moving.png -./entity/armored_zombie_front_still.png -./entity/zombie_front_moving.png -./particle/smoke_1.png -./particle/water.png -./particle/blood.png -./particle/smoke_3.png -./particle/smoke_4.png -./particle/smoke_2.png -./particle/smoke_0.png -./particle/bullet.png -./particle/lava.png -./particle/smoke_trail.png -./particle/smoke_5.png +./entity/zombie_front_still.png +./item/grappling_hook.png +./item/gun_upgrade.png +./item/shield_upgrade.png +./item/rock.png +./item/ammo_box.png +./item/health_potion.png diff --git a/src/resources/texture/tile/cactus1.png b/src/resources/texture/tile/cactus1.png new file mode 100644 index 0000000..c9d1411 Binary files /dev/null and b/src/resources/texture/tile/cactus1.png differ diff --git a/src/resources/texture/tile/cactus2.png b/src/resources/texture/tile/cactus2.png new file mode 100644 index 0000000..c6a769d Binary files /dev/null and b/src/resources/texture/tile/cactus2.png differ diff --git a/src/resources/texture/tile/cactus3.png b/src/resources/texture/tile/cactus3.png new file mode 100644 index 0000000..bca17f5 Binary files /dev/null and b/src/resources/texture/tile/cactus3.png differ diff --git a/src/resources/texture/tile/cactus4.png b/src/resources/texture/tile/cactus4.png new file mode 100644 index 0000000..927fea4 Binary files /dev/null and b/src/resources/texture/tile/cactus4.png differ diff --git a/src/resources/texture/tile/grass.png b/src/resources/texture/tile/grass.png index a3c8e8a..cbcc06b 100644 Binary files a/src/resources/texture/tile/grass.png and b/src/resources/texture/tile/grass.png differ diff --git a/src/resources/texture/tile/rock_sandstone.png b/src/resources/texture/tile/rock_sandstone.png new file mode 100644 index 0000000..63a58b6 Binary files /dev/null and b/src/resources/texture/tile/rock_sandstone.png differ diff --git a/src/resources/texture/tile/snow.png b/src/resources/texture/tile/snow.png new file mode 100644 index 0000000..8dd6d69 Binary files /dev/null and b/src/resources/texture/tile/snow.png differ diff --git a/src/resources/texture/tile/snow_pile.png b/src/resources/texture/tile/snow_pile.png new file mode 100644 index 0000000..efd25f6 Binary files /dev/null and b/src/resources/texture/tile/snow_pile.png differ diff --git a/src/resources/texture/tile/tree.png b/src/resources/texture/tile/tree.png deleted file mode 100644 index e53c5d0..0000000 Binary files a/src/resources/texture/tile/tree.png and /dev/null differ diff --git a/src/resources/texture/tile/tree_base.png b/src/resources/texture/tile/tree_base.png new file mode 100644 index 0000000..451534c Binary files /dev/null and b/src/resources/texture/tile/tree_base.png differ diff --git a/src/resources/texture/tile/tree_leaves.png b/src/resources/texture/tile/tree_leaves.png new file mode 100644 index 0000000..adf77cc Binary files /dev/null and b/src/resources/texture/tile/tree_leaves.png differ