Fixed misuse of gr_bitblt_find_transparent_area() caused rear view to be shifted on some cockpits
This commit is contained in:
parent
0df7146226
commit
80e69421d8
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20110925
|
||||||
|
--------
|
||||||
|
main/game.c: Fixed misuse of gr_bitblt_find_transparent_area() caused rear view to be shifted on some cockpits
|
||||||
|
|
||||||
20110924
|
20110924
|
||||||
--------
|
--------
|
||||||
main/fvi.c, main/gameseg.c, main/object.c: Consistency check for segment number in find_vector_intersection() and obj_create(); Added more debug output for invalid segment numberin get_seg_masks()
|
main/fvi.c, main/gameseg.c, main/object.c: Consistency check for segment number in find_vector_intersection() and obj_create(); Added more debug output for invalid segment numberin get_seg_masks()
|
||||||
|
|
|
@ -213,13 +213,14 @@ void init_cockpit()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CM_REAR_VIEW:
|
case CM_REAR_VIEW:
|
||||||
{ int x = 0, y = 0, w = SWIDTH, h = (SHEIGHT*2)/3;
|
{
|
||||||
|
int x1 = 0, y1 = 0, x2 = SWIDTH, y2 = (SHEIGHT*2)/3;
|
||||||
grs_bitmap *bm;
|
grs_bitmap *bm;
|
||||||
|
|
||||||
PIGGY_PAGE_IN(cockpit_bitmap[PlayerCfg.CockpitMode[1]]);
|
PIGGY_PAGE_IN(cockpit_bitmap[PlayerCfg.CockpitMode[1]]);
|
||||||
bm = &GameBitmaps[cockpit_bitmap[PlayerCfg.CockpitMode[1]].index];
|
bm = &GameBitmaps[cockpit_bitmap[PlayerCfg.CockpitMode[1]].index];
|
||||||
gr_bitblt_find_transparent_area(bm, &x, &y, &w, &h);
|
gr_bitblt_find_transparent_area(bm, &x1, &y1, &x2, &y2);
|
||||||
game_init_render_sub_buffers(x*((float)SWIDTH/bm->bm_w), y*((float)SHEIGHT/bm->bm_h), w*((float)SWIDTH/bm->bm_w), h*((float)SHEIGHT/bm->bm_h));
|
game_init_render_sub_buffers(x1*((float)SWIDTH/bm->bm_w), y1*((float)SHEIGHT/bm->bm_h), (x2-x1+1)*((float)SWIDTH/bm->bm_w), (y2-y1+2)*((float)SHEIGHT/bm->bm_h));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CM_FULL_SCREEN:
|
case CM_FULL_SCREEN:
|
||||||
|
|
Loading…
Reference in a new issue