For briefings, keep elementes of show_briefing_bitmap and show_animated_bitmap in correct aspect
This commit is contained in:
parent
c3d91ceeca
commit
75169a184a
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100619
|
||||
--------
|
||||
main/titles.c: For briefings, keep elementes of show_briefing_bitmap and show_animated_bitmap in correct aspect
|
||||
|
||||
20100618
|
||||
--------
|
||||
2d/bitblt.c, include/gr.h, main/game.c, main/gauges.c: Introducing gr_bitblt_find_transparent_area to dynamically detect boundaries of sub canvas used for CM_REAR_VIEW; On the way also allowing to create weapon box sub bitmaps from uncompressed cockpit bitmaps
|
||||
|
|
|
@ -739,6 +739,12 @@ void show_animated_bitmap(briefing *br)
|
|||
{
|
||||
grs_canvas *curcanv_save, *bitmap_canv=0;
|
||||
grs_bitmap *bitmap_ptr;
|
||||
float scale = 1.0;
|
||||
|
||||
if (((float)SWIDTH/320) < ((float)SHEIGHT/200))
|
||||
scale = ((float)SWIDTH/320);
|
||||
else
|
||||
scale = ((float)SHEIGHT/200);
|
||||
|
||||
// Only plot every nth frame.
|
||||
if (br->door_div_count) {
|
||||
|
@ -748,7 +754,7 @@ void show_animated_bitmap(briefing *br)
|
|||
bitmap_ptr = &GameBitmaps[bi.index];
|
||||
PIGGY_PAGE_IN( bi );
|
||||
#ifdef OGL
|
||||
ogl_ubitmapm_cs(rescale_x(220), rescale_y(45),(bitmap_ptr->bm_w*(SWIDTH/320)),(bitmap_ptr->bm_h*(SHEIGHT/200)),bitmap_ptr,255,F1_0);
|
||||
ogl_ubitmapm_cs(rescale_x(220), rescale_y(45),bitmap_ptr->bm_w*scale,bitmap_ptr->bm_h*scale,bitmap_ptr,255,F1_0);
|
||||
#else
|
||||
gr_bitmapm(rescale_x(220), rescale_y(45), bitmap_ptr);
|
||||
#endif
|
||||
|
@ -815,7 +821,7 @@ void show_animated_bitmap(briefing *br)
|
|||
bitmap_ptr = &GameBitmaps[bi.index];
|
||||
PIGGY_PAGE_IN( bi );
|
||||
#ifdef OGL
|
||||
ogl_ubitmapm_cs(0,0,(bitmap_ptr->bm_w*(SWIDTH/320)),(bitmap_ptr->bm_h*(SHEIGHT/200)),bitmap_ptr,255,F1_0);
|
||||
ogl_ubitmapm_cs(0,0,bitmap_ptr->bm_w*scale,bitmap_ptr->bm_h*scale,bitmap_ptr,255,F1_0);
|
||||
#else
|
||||
gr_bitmapm(0, 0, bitmap_ptr);
|
||||
#endif
|
||||
|
@ -842,12 +848,18 @@ void show_animated_bitmap(briefing *br)
|
|||
void show_briefing_bitmap(grs_bitmap *bmp)
|
||||
{
|
||||
grs_canvas *curcanv_save, *bitmap_canv;
|
||||
float scale = 1.0;
|
||||
|
||||
bitmap_canv = gr_create_sub_canvas(grd_curcanv, rescale_x(220), rescale_y(55), (bmp->bm_w*(SWIDTH/(HIRESMODE ? 640 : 320))),(bmp->bm_h*(SHEIGHT/(HIRESMODE ? 480 : 200))));
|
||||
curcanv_save = grd_curcanv;
|
||||
gr_set_current_canvas(bitmap_canv);
|
||||
|
||||
if (((float)SWIDTH/(HIRESMODE ? 640 : 320)) < ((float)SHEIGHT/(HIRESMODE ? 480 : 200)))
|
||||
scale = ((float)SWIDTH/(HIRESMODE ? 640 : 320));
|
||||
else
|
||||
scale = ((float)SHEIGHT/(HIRESMODE ? 480 : 200));
|
||||
#ifdef OGL
|
||||
ogl_ubitmapm_cs(0,0,(bmp->bm_w*(SWIDTH/(HIRESMODE ? 640 : 320))),(bmp->bm_h*(SHEIGHT/(HIRESMODE ? 480 : 200))),bmp,255,F1_0);
|
||||
ogl_ubitmapm_cs(0,0,bmp->bm_w*scale,bmp->bm_h*scale,bmp,255,F1_0);
|
||||
#else
|
||||
gr_bitmapm(0, 0, bmp);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue