version 1.1 | | version 1.2 |
---|
| | |
* Graphical routines for setting a pixel. | | * Graphical routines for setting a pixel. |
* | | * |
* $Log$ | | * $Log$ |
* Revision 1.1 1999/06/14 21:57:32 donut | | * Revision 1.2 1999/09/30 23:02:27 donut |
* Initial revision | | * opengl direct support for ingame and normal menus, fonts as textures, and automap support |
| | * |
| | * Revision 1.1.1.1 1999/06/14 21:57:32 donut |
| | * Import of d1x 1.37 source. |
* | | * |
* Revision 1.5 1994/11/18 22:50:26 john | | * Revision 1.5 1994/11/18 22:50:26 john |
* Changed shorts to ints in parameters. | | * Changed shorts to ints in parameters. |
| | |
#ifndef D1XD3D | | #ifndef D1XD3D |
void gr_upixel( int x, int y ) | | void gr_upixel( int x, int y ) |
{ | | { |
#ifdef __MSDOS__ | | |
switch (TYPE) | | switch (TYPE) |
{ | | { |
case BM_LINEAR: | | #ifdef OGL |
| | case BM_OGL: |
| | ogl_upixelc(x,y,COLOR); |
| | return; |
#endif | | #endif |
| | case BM_LINEAR: |
DATA[ ROWSIZE*y+x ] = COLOR; | | DATA[ ROWSIZE*y+x ] = COLOR; |
return; | | return; |
#ifdef __MSDOS__ | | #ifdef __MSDOS__ |
| | |
case BM_SVGA: | | case BM_SVGA: |
gr_vesa_pixel( COLOR, (unsigned int)DATA + (unsigned int)ROWSIZE * y + x); | | gr_vesa_pixel( COLOR, (unsigned int)DATA + (unsigned int)ROWSIZE * y + x); |
return; | | return; |
} | | |
#endif | | #endif |
} | | } |
| | } |
#endif | | #endif |
| | |
void gr_pixel( int x, int y ) | | void gr_pixel( int x, int y ) |
| | |
#ifndef D1XD3D | | #ifndef D1XD3D |
inline void gr_bm_upixel( grs_bitmap * bm, int x, int y, unsigned char color ) | | inline void gr_bm_upixel( grs_bitmap * bm, int x, int y, unsigned char color ) |
{ | | { |
#ifdef __MSDOS__ | | |
switch (bm->bm_type) | | switch (bm->bm_type) |
{ | | { |
case BM_LINEAR: | | #ifdef OGL |
| | case BM_OGL: |
| | ogl_upixelc(bm->bm_x+x,bm->bm_y+y,color); |
| | return; |
#endif | | #endif |
| | case BM_LINEAR: |
bm->bm_data[ bm->bm_rowsize*y+x ] = color; | | bm->bm_data[ bm->bm_rowsize*y+x ] = color; |
return; | | return; |
#ifdef __MSDOS__ | | #ifdef __MSDOS__ |
| | |
case BM_SVGA: | | case BM_SVGA: |
gr_vesa_pixel(color,(unsigned int)bm->bm_data + (unsigned int)bm->bm_rowsize * y + x); | | gr_vesa_pixel(color,(unsigned int)bm->bm_data + (unsigned int)bm->bm_rowsize * y + x); |
return; | | return; |
} | | |
#endif | | #endif |
| | } |
} | | } |
#endif | | #endif |
| | |