Skip to content

Commit

Permalink
render lower levels correctly even if shadows.png not found
Browse files Browse the repository at this point in the history
  • Loading branch information
pronvit committed Jan 15, 2016
1 parent 628298f commit 61b3f88
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dungeonmode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ struct dungeonmode_hook : public df::viewscreen_dungeonmodest
gps->clipx[1] = r->gdimx-1;
gps->clipy[1] = r->gdimy;

if (maxlevels && shadowsloaded)
if (maxlevels)
patch_rendering(false);

// if (maxlevels && shadowsloaded)
// if (maxlevels)
// (*df::global::window_z)+=1;

render_map();

if (maxlevels && shadowsloaded)
if (maxlevels)
{
multi_rendered = false;

Expand Down
4 changes: 2 additions & 2 deletions dwarfmode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ struct dwarfmode_hook : public df::viewscreen_dwarfmodest
gps->clipx[1] = r->gdimx;
gps->clipy[1] = r->gdimy;

if (maxlevels && shadowsloaded)
if (maxlevels)
patch_rendering(false);

render_map();

if (maxlevels && shadowsloaded)
if (maxlevels)
{
multi_rendered = false;

Expand Down
2 changes: 1 addition & 1 deletion legacy/twbt_legacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct dwarfmode_hook_legacy : public df::viewscreen_dwarfmodest
//clock_t c1 = clock();
INTERPOSE_NEXT(render)();

if (shadowsloaded && maxlevels)
if (maxlevels)
render_more_layers();

//clock_t c2 = clock();
Expand Down
2 changes: 1 addition & 1 deletion renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void renderer_cool::draw(int vertex_count)
}

// Prepare and render shadows
if (multi_rendered)
if (multi_rendered && shadowsloaded)
{
int elemcnt = 0;
//TODO: don't do this if view not moved and tiles with shadows not changed
Expand Down

0 comments on commit 61b3f88

Please sign in to comment.