mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Split environment into forground and background.
This commit is contained in:
parent
f6201f1302
commit
2219b61920
|
@ -1921,7 +1921,7 @@ void render_world(float center_x, float center_y, float zoom)
|
||||||
mapscreen_to_world(center_x, center_y, zoom);
|
mapscreen_to_world(center_x, center_y, zoom);
|
||||||
//gfx_mapscreen(center_x-width/2, center_y-height/2, center_x+width/2, center_y+height/2);
|
//gfx_mapscreen(center_x-width/2, center_y-height/2, center_x+width/2, center_y+height/2);
|
||||||
|
|
||||||
// draw the sun
|
// render background environment
|
||||||
if(config.gfx_high_detail)
|
if(config.gfx_high_detail)
|
||||||
{
|
{
|
||||||
int id = 0;
|
int id = 0;
|
||||||
|
@ -1930,6 +1930,7 @@ void render_world(float center_x, float center_y, float zoom)
|
||||||
id = t->id;
|
id = t->id;
|
||||||
if(id == 1)
|
if(id == 1)
|
||||||
{
|
{
|
||||||
|
// Winter night
|
||||||
gfx_mapscreen(0,0,1,1);
|
gfx_mapscreen(0,0,1,1);
|
||||||
gfx_texture_set(-1);
|
gfx_texture_set(-1);
|
||||||
gfx_quads_begin();
|
gfx_quads_begin();
|
||||||
|
@ -1944,12 +1945,12 @@ void render_world(float center_x, float center_y, float zoom)
|
||||||
|
|
||||||
render_stars();
|
render_stars();
|
||||||
render_moon(20+center_x*0.6f, 20+center_y*0.6f);
|
render_moon(20+center_x*0.6f, 20+center_y*0.6f);
|
||||||
render_snow();
|
|
||||||
|
|
||||||
mapscreen_to_world(center_x, center_y, zoom);
|
mapscreen_to_world(center_x, center_y, zoom);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Summer day
|
||||||
render_sun(20+center_x*0.6f, 20+center_y*0.6f);
|
render_sun(20+center_x*0.6f, 20+center_y*0.6f);
|
||||||
|
|
||||||
// draw clouds
|
// draw clouds
|
||||||
|
@ -2043,6 +2044,19 @@ void render_world(float center_x, float center_y, float zoom)
|
||||||
|
|
||||||
// render foreground tilemaps
|
// render foreground tilemaps
|
||||||
tilemap_render(32.0f, 1);
|
tilemap_render(32.0f, 1);
|
||||||
|
|
||||||
|
// render front environment effects
|
||||||
|
if(config.gfx_high_detail)
|
||||||
|
{
|
||||||
|
int id = 0;
|
||||||
|
mapres_theme *t = (mapres_theme *)map_find_item(MAPRES_TEMP_THEME, 0);
|
||||||
|
if(t)
|
||||||
|
id = t->id;
|
||||||
|
if(id == 1)
|
||||||
|
{
|
||||||
|
render_snow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// render damage indications
|
// render damage indications
|
||||||
damageind.render();
|
damageind.render();
|
||||||
|
|
Loading…
Reference in a new issue