Skip to content

Commit

Permalink
Fixes to character shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
geneotech committed Nov 26, 2023
1 parent 9d59bc9 commit 8cdd921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/view/rendering_scripts/draw_entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,12 +672,10 @@ FORCE_INLINE void draw_neon_map(
});
}

template <class F = default_customize_input>
FORCE_INLINE void draw_color_highlight(
const const_entity_handle& handle,
const rgba color,
const draw_renderable_input& in,
F&& customize_input = default_customize_input()
const draw_renderable_input& in
) {
handle.constrained_dispatch<entities_with_renderables>([&in, color](const auto typed_handle) {
specific_draw_color_highlight(typed_handle, color, in);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,11 @@ void enqueue_illuminated_rendering_jobs(

const rgba SHADOW_COLOR = rgba(0, 0, 0, 80);
const auto shadow_input_customizer =
[](const sprite_drawing_input& original_input) -> const sprite_drawing_input& {
const vec2 SHADOW_OFFSET = vec2(5, 5);
std::optional<sprite_drawing_input> modified_input;
modified_input.emplace(original_input);
modified_input->renderable_transform += SHADOW_OFFSET;
return *modified_input;
[](const sprite_drawing_input& original_input) {
const vec2 SHADOW_OFFSET = vec2(7, 7);
auto modified_input = original_input;
modified_input.renderable_transform += SHADOW_OFFSET;
return modified_input;
};

if (is_local || (!ffa && typed_handle.get_official_faction() == fow_faction)) {
Expand Down

0 comments on commit 8cdd921

Please sign in to comment.