| version 1.3 | | version 1.4 |
|---|
| | |
| * Graphical routines for drawing fonts. | | * Graphical routines for drawing fonts. |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.4 1999/09/21 04:05:54 donut |
| | | * mostly complete OGL implementation (still needs bitmap handling (reticle), and door/fan textures are corrupt) |
| | | * |
| * Revision 1.3 1999/08/31 21:22:07 donut | | * Revision 1.3 1999/08/31 21:22:07 donut |
| * added variable colorization level, and colorization for kill/join/quit messages | | * added variable colorization level, and colorization for kill/join/quit messages |
| * | | * |
| | |
| | | |
| #define BITS_TO_BYTES(x) (((x)+7)>>3) | | #define BITS_TO_BYTES(x) (((x)+7)>>3) |
| | | |
| | | #ifdef OGL |
| | | #define FONT_USE_GRPIXEL |
| | | #endif |
| | | |
| | | |
| int gr_internal_string_clipped(int x, int y, char *s ); | | int gr_internal_string_clipped(int x, int y, char *s ); |
| int gr_internal_string_clipped_m(int x, int y, char *s ); | | int gr_internal_string_clipped_m(int x, int y, char *s ); |
| | | |
| | |
| | | |
| bits = 0; | | bits = 0; |
| | | |
| | | #ifdef FONT_USE_GRPIXEL |
| | | VideoOffset1 = x; |
| | | #else |
| VideoOffset1 = y * ROWSIZE + x; | | VideoOffset1 = y * ROWSIZE + x; |
| | | #endif |
| | | |
| next_row = s; | | next_row = s; |
| | | |
| | |
| | | |
| if (x==0x8000) { //centered | | if (x==0x8000) { //centered |
| int xx = get_centered_x(text_ptr1); | | int xx = get_centered_x(text_ptr1); |
| | | #ifdef FONT_USE_GRPIXEL |
| | | VideoOffset1 = xx; |
| | | #else |
| VideoOffset1 = y * ROWSIZE + xx; | | VideoOffset1 = y * ROWSIZE + xx; |
| | | #endif |
| } | | } |
| | | |
| for (r=0; r<FHEIGHT; r++) | | for (r=0; r<FHEIGHT; r++) |
| | |
| } | | } |
| | | |
| if (bits & BitMask) | | if (bits & BitMask) |
| | | #ifdef FONT_USE_GRPIXEL |
| | | gr_upixelc(VideoOffset++,y,FG_COLOR); |
| | | #else |
| DATA[VideoOffset++] = (unsigned char) FG_COLOR; | | DATA[VideoOffset++] = (unsigned char) FG_COLOR; |
| | | #endif |
| else | | else |
| VideoOffset++; | | VideoOffset++; |
| BitMask >>= 1; | | BitMask >>= 1; |
| | |
| VideoOffset += spacing-width; | | VideoOffset += spacing-width; |
| } | | } |
| | | |
| VideoOffset1 += ROWSIZE; y++; | | #ifndef FONT_USE_GRPIXEL |
| | | VideoOffset1 += ROWSIZE; |
| | | #endif |
| | | y++; |
| } | | } |
| } | | } |
| return 0; | | return 0; |