Pass canvas to draw_cloaked_object
This commit is contained in:
parent
25c36d4b0e
commit
8cf1082ce6
|
@ -219,7 +219,7 @@ void draw_object_tmap_rod(grs_canvas &canvas, const vcobjptridx_t obj, const bit
|
|||
#define CLOAK_FADEOUT_DURATION_ROBOT F1_0
|
||||
|
||||
//do special cloaked render
|
||||
static void draw_cloaked_object(const vcobjptr_t obj, const g3s_lrgb light, glow_values_t glow, const fix64 cloak_start_time, const fix total_cloaked_time, const fix Cloak_fadein_duration, const fix Cloak_fadeout_duration)
|
||||
static void draw_cloaked_object(grs_canvas &canvas, const vcobjptr_t obj, const g3s_lrgb light, glow_values_t glow, const fix64 cloak_start_time, const fix total_cloaked_time, const fix Cloak_fadein_duration, const fix Cloak_fadeout_duration)
|
||||
{
|
||||
fix cloak_delta_time;
|
||||
fix light_scale=F1_0;
|
||||
|
@ -303,7 +303,7 @@ static void draw_cloaked_object(const vcobjptr_t obj, const g3s_lrgb light, glow
|
|||
new_light.g = fixmul(light.g,light_scale);
|
||||
new_light.b = fixmul(light.b,light_scale);
|
||||
glow[0] = fixmul(glow[0],light_scale);
|
||||
draw_polygon_model(*grd_curcanv, obj->pos,
|
||||
draw_polygon_model(canvas, obj->pos,
|
||||
&obj->orient,
|
||||
obj->rtype.pobj_info.anim_angles,
|
||||
obj->rtype.pobj_info.model_num,obj->rtype.pobj_info.subobj_flags,
|
||||
|
@ -312,9 +312,9 @@ static void draw_cloaked_object(const vcobjptr_t obj, const g3s_lrgb light, glow
|
|||
alt_textures );
|
||||
}
|
||||
else {
|
||||
gr_settransblend(*grd_curcanv, cloak_value, GR_BLEND_NORMAL);
|
||||
gr_settransblend(canvas, cloak_value, GR_BLEND_NORMAL);
|
||||
g3_set_special_render(draw_tmap_flat); //use special flat drawer
|
||||
draw_polygon_model(*grd_curcanv, obj->pos,
|
||||
draw_polygon_model(canvas, obj->pos,
|
||||
&obj->orient,
|
||||
obj->rtype.pobj_info.anim_angles,
|
||||
obj->rtype.pobj_info.model_num,obj->rtype.pobj_info.subobj_flags,
|
||||
|
@ -322,7 +322,7 @@ static void draw_cloaked_object(const vcobjptr_t obj, const g3s_lrgb light, glow
|
|||
&glow,
|
||||
alt_textures );
|
||||
g3_set_special_render(draw_tmap);
|
||||
gr_settransblend(*grd_curcanv, GR_FADE_OFF, GR_BLEND_NORMAL);
|
||||
gr_settransblend(canvas, GR_FADE_OFF, GR_BLEND_NORMAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ static void draw_polygon_object(const vobjptridx_t obj)
|
|||
}
|
||||
return;
|
||||
}
|
||||
draw_cloaked_object(obj, light, engine_glow_value, cloak_duration.first, cloak_duration.second, cloak_fade.first, cloak_fade.second);
|
||||
draw_cloaked_object(*grd_curcanv, obj, light, engine_glow_value, cloak_duration.first, cloak_duration.second, cloak_fade.first, cloak_fade.second);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue