| version 1.4 | | version 1.5 |
|---|
| | |
| * Routines for bitblt's. | | * Routines for bitblt's. |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.5 1999/09/30 23:02:26 donut |
| | | * opengl direct support for ingame and normal menus, fonts as textures, and automap support |
| | | * |
| * Revision 1.4 1999/09/21 07:28:58 donut | | * Revision 1.4 1999/09/21 07:28:58 donut |
| * fixed undefined variable, oops | | * fixed undefined variable, oops |
| * | | * |
| | |
| } | | } |
| } | | } |
| | | |
| #ifdef OGL | | |
| //kludge: for Function_mode and FMODE_GAME | | |
| #include "../main/inferno.h" | | |
| #endif | | |
| | | |
| void gr_ubitmap( int x, int y, grs_bitmap *bm ) | | void gr_ubitmap( int x, int y, grs_bitmap *bm ) |
| { int source, dest; | | { int source, dest; |
| | | |
| #ifdef OGL | | |
| if(Function_mode == FMODE_GAME){ | | |
| ogl_ubitmapm(x,y,bm); | | |
| return; | | |
| } | | |
| #endif | | |
| source = bm->bm_type; | | source = bm->bm_type; |
| dest = TYPE; | | dest = TYPE; |
| | | |
| | |
| else | | else |
| gr_ubitmap00( x, y, bm ); | | gr_ubitmap00( x, y, bm ); |
| return; | | return; |
| | | #ifdef OGL |
| | | case BM_OGL: |
| | | ogl_ubitmapm(x,y,bm); |
| | | return; |
| | | #endif |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| case BM_DIRECTX: | | case BM_DIRECTX: |
| Assert ((int)grd_curcanv->cv_bitmap.bm_data == BM_D3D_RENDER || (int)grd_curcanv->cv_bitmap.bm_data == BM_D3D_DISPLAY); | | Assert ((int)grd_curcanv->cv_bitmap.bm_data == BM_D3D_RENDER || (int)grd_curcanv->cv_bitmap.bm_data == BM_D3D_DISPLAY); |
| | |
| void gr_ubitmapm( int x, int y, grs_bitmap *bm ) | | void gr_ubitmapm( int x, int y, grs_bitmap *bm ) |
| { int source, dest; | | { int source, dest; |
| | | |
| #ifdef OGL | | |
| if(Function_mode == FMODE_GAME){ | | |
| ogl_ubitmapm(x,y,bm); | | |
| return; | | |
| } | | |
| #endif | | |
| | | |
| source = bm->bm_type; | | source = bm->bm_type; |
| dest = TYPE; | | dest = TYPE; |
| | |
| else | | else |
| gr_ubitmap00m( x, y, bm ); | | gr_ubitmap00m( x, y, bm ); |
| return; | | return; |
| | | #ifdef OGL |
| | | case BM_OGL: |
| | | ogl_ubitmapm(x,y,bm); |
| | | return; |
| | | #endif |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| case BM_DIRECTX: | | case BM_DIRECTX: |
| if (bm->bm_w < 35 && bm->bm_h < 35) { | | if (bm->bm_w < 35 && bm->bm_h < 35) { |
| | |
| return; | | return; |
| } | | } |
| | | |
| | | #ifdef OGL |
| | | if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_OGL )) |
| | | { |
| | | ogl_ubitblt(w, h, dx, dy, sx, sy, src, dest); |
| | | return; |
| | | } |
| | | if ( (src->bm_type == BM_OGL) && (dest->bm_type == BM_LINEAR )) |
| | | { |
| | | return; |
| | | } |
| | | if ( (src->bm_type == BM_OGL) && (dest->bm_type == BM_OGL )) |
| | | { |
| | | return; |
| | | } |
| | | #endif |
| | | |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_DIRECTX )) | | if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_DIRECTX )) |
| { | | { |
| | |
| register int x1, y1; | | register int x1, y1; |
| ubyte c; | | ubyte c; |
| | | |
| | | #ifdef OGL |
| | | if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_OGL )) |
| | | { |
| | | ogl_ubitblt(w, h, dx, dy, sx, sy, src, dest); |
| | | return; |
| | | } |
| | | if ( (src->bm_type == BM_OGL)) |
| | | return; |
| | | #endif |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_DIRECTX )) | | if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_DIRECTX )) |
| { | | { |