Pass g3_draw_bitmap pos by const &
This commit is contained in:
parent
35529bacd6
commit
2434b20445
|
@ -124,11 +124,11 @@ void g3_draw_rod_tmap(grs_bitmap *bitmap,g3s_point *bot_point,fix bot_width,g3s_
|
|||
#ifndef OGL
|
||||
//draws a bitmap with the specified 3d width & height
|
||||
//returns 1 if off screen, 0 if drew
|
||||
bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm)
|
||||
bool g3_draw_bitmap(const vms_vector &pos,fix width,fix height,grs_bitmap *bm)
|
||||
{
|
||||
g3s_point pnt;
|
||||
fix w,h;
|
||||
if (g3_rotate_point(pnt,*pos) & CC_BEHIND)
|
||||
if (g3_rotate_point(pnt,pos) & CC_BEHIND)
|
||||
return 1;
|
||||
g3_project_point(&pnt);
|
||||
if (pnt.p3_flags & PF_OVERFLOW)
|
||||
|
|
|
@ -252,7 +252,7 @@ void g3_draw_rod_tmap(grs_bitmap *bitmap,g3s_point *bot_point,fix bot_width,g3s_
|
|||
|
||||
//draws a bitmap with the specified 3d width & height
|
||||
//returns 1 if off screen, 0 if drew
|
||||
bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm);
|
||||
bool g3_draw_bitmap(const vms_vector &pos,fix width,fix height,grs_bitmap *bm);
|
||||
|
||||
//specifies 2d drawing routines to use instead of defaults. Passing
|
||||
//NULL for either or both restores defaults
|
||||
|
|
|
@ -998,7 +998,7 @@ void _g3_draw_tmap_2(unsigned nv, g3s_point **pointlist, const g3s_uvl *uvl_list
|
|||
/*
|
||||
* 2d Sprites (Fireaballs, powerups, explosions). NOT hostages
|
||||
*/
|
||||
bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm)
|
||||
bool g3_draw_bitmap(const vms_vector &pos,fix width,fix height,grs_bitmap *bm)
|
||||
{
|
||||
vms_vector pv,v1;
|
||||
int i;
|
||||
|
@ -1018,7 +1018,7 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm)
|
|||
width = fixmul(width,Matrix_scale.x);
|
||||
height = fixmul(height,Matrix_scale.y);
|
||||
for (i=0;i<4;i++){
|
||||
vm_vec_sub(v1,*pos,View_position);
|
||||
vm_vec_sub(v1,pos,View_position);
|
||||
vm_vec_rotate(pv,v1,View_matrix);
|
||||
switch (i){
|
||||
case 0:
|
||||
|
|
|
@ -202,9 +202,9 @@ void draw_object_blob(object &obj,bitmap_index bmi)
|
|||
}
|
||||
|
||||
if (bm->bm_w > bm->bm_h)
|
||||
g3_draw_bitmap(&pos,obj.size,fixmuldiv(obj.size,bm->bm_h,bm->bm_w),bm);
|
||||
g3_draw_bitmap(pos,obj.size,fixmuldiv(obj.size,bm->bm_h,bm->bm_w),bm);
|
||||
else
|
||||
g3_draw_bitmap(&pos,fixmuldiv(obj.size,bm->bm_w,bm->bm_h),obj.size,bm);
|
||||
g3_draw_bitmap(pos,fixmuldiv(obj.size,bm->bm_w,bm->bm_h),obj.size,bm);
|
||||
}
|
||||
|
||||
//draw an object that is a texture-mapped rod
|
||||
|
|
Loading…
Reference in a new issue