void gr_upixel( int x, int y ) { gr_bm_upixel(&grdCurCanv->cv_bitmap, x, y, (unsigned char)COLOR); #if 0 grs_bitmap * bm = &grdCurCanv->cv_bitmap; Win32_Rect ( //x + bm->bm_props.x, y + bm->bm_props.y, //x + bm->bm_props.x, y + bm->bm_props.y, x, y, x, y, bm->bm_texBuf, COLOR); #endif }
void gr_rect(int left,int top,int right,int bot) { int i; #ifdef OGL if (TYPE == BM_OGL) { ogl_urect(left,top,right,bot); return; } #endif #ifdef D1XD3D if (TYPE == BM_DIRECTX) { if (left <= right && top <= bot) Win32_Rect (left, top, right, bot, grd_curcanv->cv_bitmap.bm_data, COLOR); return; } #endif for ( i=top; i<=bot; i++ ) gr_scanline( left, right, i ); }
void gr_bm_upixel( grs_bitmap * bm, int x, int y, unsigned char color ) { switch (bm->bm_props.type) { case BM_LINEAR: bm->bm_texBuf[ bm->bm_props.rowsize*y+x ] = color; break; case BM_DIRECTX: { unsigned char *p = gr_current_pal + color * 3; Win32_Rect ( x, y, x, y, //x + bm->bm_props.x, y + bm->bm_props.y, //x + bm->bm_props.x, y + bm->bm_props.y, (int)bm->bm_texBuf, color); } break; default: Assert (FALSE); break; } }