| version 1.2 | | version 1.3 |
|---|
| | |
| * Graphical routines for manipulating grs_bitmaps. | | * Graphical routines for manipulating grs_bitmaps. |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.3 1999/09/21 04:05:54 donut |
| | | * mostly complete OGL implementation (still needs bitmap handling (reticle), and door/fan textures are corrupt) |
| | | * |
| * Revision 1.2 1999/08/05 22:53:40 sekmu | | * Revision 1.2 1999/08/05 22:53:40 sekmu |
| * | | * |
| * D3D patch(es) from ADB | | * D3D patch(es) from ADB |
| | |
| | | |
| void gr_set_bitmap_data (grs_bitmap *bm, unsigned char *data) | | void gr_set_bitmap_data (grs_bitmap *bm, unsigned char *data) |
| { | | { |
| | | #ifdef OGL |
| | | // if (bm->bm_data!=data) |
| | | bm->gltexture=-1; |
| | | #endif |
| bm->bm_data = data; | | bm->bm_data = data; |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| Assert (bm->iMagic == BM_MAGIC_NUMBER); | | Assert (bm->iMagic == BM_MAGIC_NUMBER); |
| | |
| #ifdef D1XD3D | | #ifdef D1XD3D |
| Win32_CreateTexture (bm); | | Win32_CreateTexture (bm); |
| #endif | | #endif |
| | | #ifdef OGL |
| | | bm->gltexture=-1; |
| | | #endif |
| | | |
| // if (data != 0) | | // if (data != 0) |
| gr_set_bitmap_data (bm, data); | | gr_set_bitmap_data (bm, data); |
| | |
| bm->iMagic = BM_MAGIC_NUMBER; | | bm->iMagic = BM_MAGIC_NUMBER; |
| bm->pvSurface = NULL; | | bm->pvSurface = NULL; |
| #endif | | #endif |
| | | #ifdef OGL |
| | | bm->gltexture=-1; |
| | | #endif |
| } | | } |
| | | |
| void gr_free_bitmap(grs_bitmap *bm ) | | void gr_free_bitmap(grs_bitmap *bm ) |
| | |
| bm->iMagic = 0; | | bm->iMagic = 0; |
| if (bm->bm_data == BM_D3D_RENDER) | | if (bm->bm_data == BM_D3D_RENDER) |
| bm->bm_data = NULL; | | bm->bm_data = NULL; |
| | | #endif |
| | | #ifdef OGL |
| | | ogl_freebmtexture(bm); |
| #endif | | #endif |
| if (bm->bm_data != NULL) | | if (bm->bm_data != NULL) |
| free (bm->bm_data); | | free (bm->bm_data); |