From f11edf81ae3103e31f31c6065769db5c0a888ffd Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Sat, 30 Jul 2005 01:52:17 +0000 Subject: [PATCH] remove all the redundant Polygon Acceleration stuff (include/pa_enabl.h) --- 2d/2dsline.c | 69 +------------ 2d/bitblt.c | 190 +---------------------------------- 2d/bitmap.c | 43 +------- 2d/font.c | 240 +------------------------------------------- 2d/ibitblt.c | 190 +---------------------------------- 2d/palette.c | 6 +- 2d/pcx.c | 57 +---------- 2d/rle.c | 18 +--- ChangeLog | 14 +++ include/gr.h | 10 +- main/automap.c | 203 +------------------------------------ main/config.c | 24 +---- main/credits.c | 35 ++----- main/escort.c | 9 +- main/game.c | 57 +---------- main/gamecntl.c | 43 +------- main/gamepal.c | 11 +- main/gamerend.c | 252 +--------------------------------------------- main/gameseq.c | 48 +-------- main/gauges.c | 259 +----------------------------------------------- main/hud.c | 18 +--- main/inferno.c | 33 +----- main/kconfig.c | 18 +--- main/kmatrix.c | 33 +----- main/menu.c | 143 ++------------------------ main/movie.c | 8 +- main/newmenu.c | 41 +------- main/object.c | 7 +- main/playsave.c | 40 +------- main/polyobj.c | 16 +-- main/render.c | 11 +- main/state.c | 142 ++------------------------ main/texmerge.c | 37 +------ main/titles.c | 22 +--- 34 files changed, 87 insertions(+), 2260 deletions(-) diff --git a/2d/2dsline.c b/2d/2dsline.c index 0b0f25c9..10cfa67c 100644 --- a/2d/2dsline.c +++ b/2d/2dsline.c @@ -1,4 +1,4 @@ -/* $Id: 2dsline.c,v 1.11 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: 2dsline.c,v 1.12 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -35,10 +35,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "vesa.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - int Gr_scanline_darkening_level = GR_FADE_LEVELS; #if !defined(NO_ASM) && defined(__WATCOMC__) @@ -132,49 +128,6 @@ void gr_linear_stosd( ubyte * dest, unsigned char color, unsigned int nbytes) { #endif #endif -#if defined(POLY_ACC) -//$$ Note that this code WAS a virtual clone of the mac code and any changes to mac should be reflected here. -void gr_linear15_darken( short * dest, int darkening_level, int count, ubyte * fade_table ) -{ - //$$ this routine is a prime candidate for using the alpha blender. - int i; - unsigned short rt[32], gt[32], bt[32]; - unsigned long level, int_level, dlevel; - - dlevel = (darkening_level << 16) / GR_FADE_LEVELS; - level = int_level = 0; - for(i = 0; i != 32; ++i) - { - rt[i] = int_level << 10; - gt[i] = int_level << 5; - bt[i] = int_level; - - level += dlevel; - int_level = level >> 16; - } - - pa_flush(); - for (i=0; i> 10) & 0x1f)] | - gt[((*dest >> 5) & 0x1f)] | - bt[((*dest >> 0) & 0x1f)] | - 0x8000; - dest++; - } -} - -void gr_linear15_stosd( short * dest, ubyte color, unsigned short count ) -{ - //$$ this routine is a prime candidate for using the alpha blender. - short c = pa_clut[color]; - pa_flush(); - while(count--) - *dest++ = c; -} -#endif - void gr_uscanline( int x1, int x2, int y ) { if (Gr_scanline_darkening_level >= GR_FADE_LEVELS ) { @@ -193,11 +146,6 @@ void gr_uscanline( int x1, int x2, int y ) case BM_SVGA: gr_vesa_scanline( x1+XOFFSET, x2+XOFFSET, y+YOFFSET, COLOR ); break; -#endif -#if defined(POLY_ACC) - case BM_LINEAR15: - gr_linear15_stosd( (short *)(DATA + ROWSIZE*y + x1 * PA_BPP), COLOR, x2-x1+1); - break; #endif } } else { @@ -238,11 +186,6 @@ void gr_uscanline( int x1, int x2, int y ) gr_vesa_scanline( x1+XOFFSET, x2+XOFFSET, y+YOFFSET, COLOR ); #endif break; -#endif -#if defined(POLY_ACC) - case BM_LINEAR15: - gr_linear15_darken( (short *)(DATA + ROWSIZE*y + x1 * PA_BPP), Gr_scanline_darkening_level, x2-x1+1, gr_fade_table); - break; #endif } } @@ -276,11 +219,6 @@ void gr_scanline( int x1, int x2, int y ) case BM_SVGA: gr_vesa_scanline( x1+XOFFSET, x2+XOFFSET, y+YOFFSET, COLOR ); break; -#endif -#if defined(POLY_ACC) - case BM_LINEAR15: - gr_linear15_stosd( (short *)(DATA + ROWSIZE*y + x1 * PA_BPP), COLOR, x2-x1+1); - break; #endif } } else { @@ -321,11 +259,6 @@ void gr_scanline( int x1, int x2, int y ) gr_vesa_scanline( x1+XOFFSET, x2+XOFFSET, y+YOFFSET, COLOR ); #endif break; -#endif -#if defined(POLY_ACC) - case BM_LINEAR15: - gr_linear15_darken( (short *)(DATA + ROWSIZE*y + x1 * PA_BPP), Gr_scanline_darkening_level, x2-x1+1, gr_fade_table); - break; #endif } } diff --git a/2d/bitblt.c b/2d/bitblt.c index 6425be21..e8baad54 100644 --- a/2d/bitblt.c +++ b/2d/bitblt.c @@ -1,4 +1,4 @@ -/* $Id: bitblt.c,v 1.17 2004-11-26 09:50:32 btb Exp $ */ +/* $Id: bitblt.c,v 1.18 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -22,7 +22,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#include "pa_enabl.h" //$$POLY_ACC #include "u_mem.h" #include "gr.h" #include "grdef.h" @@ -35,10 +34,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ogl_init.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - int gr_bitblt_dest_step_shift = 0; int gr_bitblt_double = 0; ubyte *gr_bitblt_fade_table=NULL; @@ -908,116 +903,6 @@ void gr_ubitmap012m( int x, int y, grs_bitmap *bm ) } } -#if defined(POLY_ACC) -void gr_ubitmap05( int x, int y, grs_bitmap *bm ) -{ - register int x1, y1; - unsigned char *src; - short *dst; - int mod; - - pa_flush(); - src = bm->bm_data; - dst = (short *)(DATA + y * ROWSIZE + x * PA_BPP); - mod = ROWSIZE / 2 - bm->bm_w; - - for (y1=y; y1 < (y+bm->bm_h); y1++ ) { - for (x1=x; x1 < (x+bm->bm_w); x1++ ) { - *dst++ = pa_clut[*src++]; - } - dst += mod; - } -} - -void gr_ubitmap05m( int x, int y, grs_bitmap *bm ) -{ - register int x1, y1; - unsigned char *src; - short *dst; - int mod; - - pa_flush(); - src = bm->bm_data; - dst = (short *)(DATA + y * ROWSIZE + x * PA_BPP); - mod = ROWSIZE / 2 - bm->bm_w; - - for (y1=y; y1 < (y+bm->bm_h); y1++ ) { - for (x1=x; x1 < (x+bm->bm_w); x1++ ) { - if ( *src != TRANSPARENCY_COLOR ) { - *dst = pa_clut[*src]; - } - src++; - ++dst; - } - dst += mod; - } -} - -void gr_bm_ubitblt05_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest) -{ - unsigned short * dbits; - unsigned char * sbits, scanline[640]; - int i, data_offset, j, nextrow; - - pa_flush(); - nextrow=dest->bm_rowsize/PA_BPP; - - data_offset = 1; - if (src->bm_flags & BM_FLAG_RLE_BIG) - data_offset = 2; - - sbits = &src->bm_data[4 + (src->bm_h*data_offset)]; - for (i=0; ibm_data[4+(i*data_offset)])); - - dbits = (unsigned short *)(dest->bm_data + (dest->bm_rowsize * dy) + dx*PA_BPP); - - // No interlacing, copy the whole buffer. - for (i=0; i < h; i++ ) { - gr_rle_expand_scanline( scanline, sbits, sx, sx+w-1 ); - for(j = 0; j != w; ++j) - dbits[j] = pa_clut[scanline[j]]; - if ( src->bm_flags & BM_FLAG_RLE_BIG ) - sbits += (int)INTEL_SHORT(*((short *)&(src->bm_data[4+((i+sy)*data_offset)]))); - else - sbits += (int)(src->bm_data[4+i+sy]); - dbits += nextrow; - } -} - -void gr_bm_ubitblt05m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest) -{ - unsigned short * dbits; - unsigned char * sbits, scanline[640]; - int i, data_offset, j, nextrow; - - pa_flush(); - nextrow=dest->bm_rowsize/PA_BPP; - data_offset = 1; - if (src->bm_flags & BM_FLAG_RLE_BIG) - data_offset = 2; - - sbits = &src->bm_data[4 + (src->bm_h*data_offset)]; - for (i=0; ibm_data[4+(i*data_offset)])); - - dbits = (unsigned short *)(dest->bm_data + (dest->bm_rowsize * dy) + dx*PA_BPP); - - // No interlacing, copy the whole buffer. - for (i=0; i < h; i++ ) { - gr_rle_expand_scanline( scanline, sbits, sx, sx+w-1 ); - for(j = 0; j != w; ++j) - if(scanline[j] != TRANSPARENCY_COLOR) - dbits[j] = pa_clut[scanline[j]]; - if ( src->bm_flags & BM_FLAG_RLE_BIG ) - sbits += (int)INTEL_SHORT(*((short *)&(src->bm_data[4+((i+sy)*data_offset)]))); - else - sbits += (int)(src->bm_data[4+i+sy]); - dbits += nextrow; - } -} -#endif - void gr_ubitmapGENERIC(int x, int y, grs_bitmap * bm) { register int x1, y1; @@ -1709,30 +1594,6 @@ void gr_bm_ubitblt(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * sr } #endif -#if defined(POLY_ACC) - if ( (src->bm_type == BM_LINEAR) && (dest->bm_type == BM_LINEAR15 )) - { - ubyte *s = src->bm_data + sy * src->bm_rowsize + sx; - ushort *t = (ushort *)(dest->bm_data + dy * dest->bm_rowsize + dx * PA_BPP); - int x; - pa_flush(); - for(;h--;) - { - for(x = 0; x < w; x++) - t[x] = pa_clut[s[x]]; - s += src->bm_rowsize; - t += dest->bm_rowsize / PA_BPP; - } - return; - } - - if ( (src->bm_type == BM_LINEAR15) && (dest->bm_type == BM_LINEAR15 )) - { - pa_blit(dest, dx, dy, src, sx, sy, w, h); - return; - } -#endif - for (y1=0; y1 < h; y1++ ) { for (x1=0; x1 < w; x1++ ) { gr_bm_pixel( dest, dx+x1, dy+y1, gr_gpixel(src,sx+x1,sy+y1) ); @@ -1812,15 +1673,6 @@ void gr_ubitmap( int x, int y, grs_bitmap *bm ) case BM_MODEX: gr_bm_ubitblt01(bm->bm_w, bm->bm_h, x+XOFFSET, y+YOFFSET, 0, 0, bm, &grd_curcanv->cv_bitmap); return; -#endif -#if defined(POLY_ACC) - case BM_LINEAR15: - if ( bm->bm_flags & BM_FLAG_RLE ) - gr_bm_ubitblt05_rle(bm->bm_w, bm->bm_h, x, y, 0, 0, bm, &grd_curcanv->cv_bitmap ); - else - gr_ubitmap05( x, y, bm); - return; - #endif default: gr_ubitmap012( x, y, bm ); @@ -1891,14 +1743,6 @@ void gr_ubitmapm( int x, int y, grs_bitmap *bm ) gr_bm_ubitblt01m(bm->bm_w, bm->bm_h, x+XOFFSET, y+YOFFSET, 0, 0, bm, &grd_curcanv->cv_bitmap); return; #endif -#if defined(POLY_ACC) - case BM_LINEAR15: - if ( bm->bm_flags & BM_FLAG_RLE ) - gr_bm_ubitblt05m_rle(bm->bm_w, bm->bm_h, x, y, 0, 0, bm, &grd_curcanv->cv_bitmap ); - else - gr_ubitmap05m( x, y, bm ); - return; -#endif default: gr_ubitmap012m( x, y, bm ); @@ -1981,38 +1825,6 @@ void gr_bm_ubitbltm(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * s return; } #endif -#if defined(POLY_ACC) - if(src->bm_type == BM_LINEAR && dest->bm_type == BM_LINEAR15) - { - ubyte *s; - ushort *d; - ushort u; - int smod, dmod; - - pa_flush(); - s = (ubyte *)(src->bm_data + src->bm_rowsize * sy + sx); - smod = src->bm_rowsize - w; - d = (ushort *)(dest->bm_data + dest->bm_rowsize * dy + dx * PA_BPP); - dmod = dest->bm_rowsize / PA_BPP - w; - for (; h--;) { - for (x1=w; x1--; ) { - if ((u = *s) != TRANSPARENCY_COLOR) - *d = pa_clut[u]; - ++s; - ++d; - } - s += smod; - d += dmod; - } - } - - if(src->bm_type == BM_LINEAR15) - { - Assert(src->bm_type == dest->bm_type); // I don't support 15 to 8 yet. - pa_blit_transparent(dest, dx, dy, src, sx, sy, w, h); - return; - } -#endif for (y1=0; y1 < h; y1++ ) { for (x1=0; x1 < w; x1++ ) { diff --git a/2d/bitmap.c b/2d/bitmap.c index 1fe76e14..cd755519 100644 --- a/2d/bitmap.c +++ b/2d/bitmap.c @@ -1,4 +1,4 @@ -/* $Id: bitmap.c,v 1.7 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: bitmap.c,v 1.8 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -33,10 +33,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_dpmi.h" #include "error.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef OGL #include "ogl_init.h" #endif @@ -70,43 +66,6 @@ grs_bitmap *gr_create_bitmap_raw(int w, int h, unsigned char * raw_data ) } -#if defined(POLY_ACC) -// -// Creates a bitmap of the requested size and type. -// w, and h are in pixels. -// type is a BM_... and is used to set the rowsize. -// if data is NULL, memory is allocated, otherwise data is used for bm_data. -// -// This function is used only by the polygon accelerator code to handle the mixture of 15bit and -// 8bit bitmaps. -// -grs_bitmap *gr_create_bitmap2(int w, int h, int type, void *data ) -{ - grs_bitmap *new; - - new = (grs_bitmap *)malloc( sizeof(grs_bitmap) ); - new->bm_x = 0; - new->bm_y = 0; - new->bm_w = w; - new->bm_h = h; - new->bm_flags = 0; - new->bm_type = type; - switch(type) - { - case BM_LINEAR: new->bm_rowsize = w; break; - case BM_LINEAR15: new->bm_rowsize = w*PA_BPP; break; - default: Int3(); // unsupported type. - } - if(data) - new->bm_data = data; - else - new->bm_data = malloc(new->bm_rowsize * new->bm_h); - new->bm_handle = 0; - - return new; -} -#endif - void gr_init_bitmap( grs_bitmap *bm, int mode, int x, int y, int w, int h, int bytesperline, unsigned char * data ) // TODO: virtualize { #ifdef D1XD3D diff --git a/2d/font.c b/2d/font.c index a7fdab03..dc1375ad 100644 --- a/2d/font.c +++ b/2d/font.c @@ -1,4 +1,4 @@ -/* $Id: font.c,v 1.37 2005-07-29 03:51:28 chris Exp $ */ +/* $Id: font.c,v 1.38 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -32,7 +32,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#include "pa_enabl.h" //$$POLY_ACC #include "u_mem.h" #include "gr.h" @@ -44,10 +43,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "byteswap.h" #include "bitmap.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #include "makesig.h" #define MAX_OPEN_FONTS 50 @@ -801,232 +796,6 @@ int gr_internal_string2m(int x, int y, char *s ) #endif // __MSDOS__ -#if defined(POLY_ACC) -int gr_internal_string5(int x, int y, char *s ) -{ - unsigned char * fp; - ubyte * text_ptr, * next_row, * text_ptr1; - int r, BitMask, i, bits, width, spacing, letter, underline; - int skip_lines = 0; - - unsigned int VideoOffset, VideoOffset1; - - pa_flush(); - VideoOffset1 = y * ROWSIZE + x * PA_BPP; - - next_row = s; - - while (next_row != NULL ) - { - text_ptr1 = next_row; - next_row = NULL; - - if (x==0x8000) { //centered - int xx = get_centered_x(text_ptr1); - VideoOffset1 = y * ROWSIZE + xx * PA_BPP; - } - - for (r=0; r>= 1; - } - } - - VideoOffset += PA_BPP * (spacing-width); //for kerning - - text_ptr++; - } - - VideoOffset1 += ROWSIZE; y++; - } - - y += skip_lines; - VideoOffset1 += ROWSIZE * skip_lines; - skip_lines = 0; - } - return 0; -} - -int gr_internal_string5m(int x, int y, char *s ) -{ - unsigned char * fp; - ubyte * text_ptr, * next_row, * text_ptr1; - int r, BitMask, i, bits, width, spacing, letter, underline; - int skip_lines = 0; - - unsigned int VideoOffset, VideoOffset1; - - pa_flush(); - VideoOffset1 = y * ROWSIZE + x * PA_BPP; - - next_row = s; - - while (next_row != NULL ) - { - text_ptr1 = next_row; - next_row = NULL; - - if (x==0x8000) { //centered - int xx = get_centered_x(text_ptr1); - VideoOffset1 = y * ROWSIZE + xx * PA_BPP; - } - - for (r=0; r>= 1; - } - } - text_ptr++; - - VideoOffset += PA_BPP * (spacing-width); - } - - VideoOffset1 += ROWSIZE; y++; - } - y += skip_lines; - VideoOffset1 += ROWSIZE * skip_lines; - skip_lines = 0; - } - return 0; -} -#endif - #ifndef OGL //a bitmap for the character grs_bitmap char_bm = { @@ -1440,13 +1209,6 @@ int gr_ustring(int x, int y, char *s ) else return gr_internal_string2(x,y,s); #endif // __MSDOS__ -#if defined(POLY_ACC) - case BM_LINEAR15: - if ( BG_COLOR == -1) - return gr_internal_string5m(x,y,s); - else - return gr_internal_string5(x,y,s); -#endif } return 0; } diff --git a/2d/ibitblt.c b/2d/ibitblt.c index 9d6c4d5a..c2c9eba0 100644 --- a/2d/ibitblt.c +++ b/2d/ibitblt.c @@ -1,4 +1,4 @@ -/* $Id: ibitblt.c,v 1.10 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: ibitblt.c,v 1.11 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -31,7 +31,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: ibitblt.c,v 1.10 2004-08-28 23:17:45 schaffner Exp $"; +static char rcsid[] = "$Id: ibitblt.c,v 1.11 2005-07-30 01:51:42 chris Exp $"; #endif #ifdef __MSDOS__ //ndef MACINTOSH @@ -42,7 +42,6 @@ static char rcsid[] = "$Id: ibitblt.c,v 1.10 2004-08-28 23:17:45 schaffner Exp $ #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "types.h" #include "gr.h" #include "mem.h" @@ -50,10 +49,6 @@ static char rcsid[] = "$Id: ibitblt.c,v 1.10 2004-08-28 23:17:45 schaffner Exp $ #include "ibitblt.h" #include "grdef.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #define MODE_NONE 0 #define MODE_SKIP 1 #define MODE_DRAW 2 @@ -497,65 +492,10 @@ ubyte *gr_ibitblt_create_mask( grs_bitmap * mask_bmp, int sx, int sy, int sw, return gr_ibitblt_create_mask_sub( mask_bmp, sx, sy, sw, sh, srowsize, BM_LINEAR ); } -#if defined(POLY_ACC) -unsigned long *pa_emit_blit(int gencode, unsigned long *buf, int w, int h, int sx, int sy, int dx, int dy) -{ - if(w == 0 || h == 0) - return buf; - - if(gencode) - { - buf[0] = (w << 16) | h; - buf[1] = (sx << 16) | sy; - buf[2] = (dx << 16) | dy; - } - return buf + 3; -} - -ubyte *gr_ibitblt_create_mask_pa( grs_bitmap * mask_bmp, int sx, int sy, int sw, int sh, int srowsize ) -{ - unsigned long *ret, *code = 0; - int pass, x, y, n; - ushort *s; - - Assert(mask_bmp->bm_type == BM_LINEAR15); - - srowsize /= PA_BPP; - - pa_flush(); - - // make two passes, first pass gets size of output block, second actually creates data. - for(pass = 0; pass != 2; ++pass) - { - for (y = sy; y < sy + sh; y++ ) - { - // first byte of interest in mask - s = (ushort *)(mask_bmp->bm_data + y * mask_bmp->bm_rowsize + sx * PA_BPP); - for ( x=0; x < sw; ) - { - for(; x != sw && (s[x] & 0x8000); ++x) // while opaque... - ; - for(n = 0; x != sw && !(s[x] & 0x8000); ++n, ++x) // while transparent... - ; - code = pa_emit_blit(pass, code, n, 1, x - n, y - sy, x + sx - n, y); - } - } - if(pass == 0) - { - ret = malloc((int)code + sizeof(unsigned long)); - ret[0] = (int)code / sizeof(unsigned long); // store num unsigned longs in list. - code = ret + 1; - } - } - return (ubyte *)ret; -} - -#else ubyte *gr_ibitblt_create_mask_svga( grs_bitmap * mask_bmp, int sx, int sy, int sw, int sh, int srowsize ) { return gr_ibitblt_create_mask_sub( mask_bmp, sx, sy, sw, sh, srowsize, BM_SVGA ); } -#endif void gr_ibitblt_do_asm(char *start_si, char *start_di, ubyte * code); @@ -568,32 +508,18 @@ void gr_ibitblt_do_asm(char *start_si, char *start_di, ubyte * code); void gr_ibitblt(grs_bitmap * source_bmp, grs_bitmap * dest_bmp, ubyte * mask ) { -#if defined(POLY_ACC) - Assert(source_bmp->bm_type == BM_LINEAR15); - pa_ibitblt(source_bmp->bm_data, dest_bmp->bm_data, mask); -#else if (mask != NULL ) gr_ibitblt_do_asm( source_bmp->bm_data, dest_bmp->bm_data, mask ); -#endif } void gr_ibitblt_find_hole_size( grs_bitmap * mask_bmp, int *minx, int *miny, int *maxx, int *maxy ) { int x, y, count=0; -#if defined(POLY_ACC) - short c; -#else ubyte c; -#endif Assert( (!(mask_bmp->bm_flags&BM_FLAG_RLE)) ); -#if defined(POLY_ACC) - Assert(mask_bmp->bm_type == BM_LINEAR15); - pa_flush(); -#endif - *minx = mask_bmp->bm_w-1; *maxx = 0; *miny = mask_bmp->bm_h-1; @@ -601,13 +527,8 @@ void gr_ibitblt_find_hole_size( grs_bitmap * mask_bmp, int *minx, int *miny, for ( y=0; ybm_h; y++ ) for ( x=0; xbm_w; x++ ) { -#if defined(POLY_ACC) - c = *(short *)(mask_bmp->bm_data + mask_bmp->bm_rowsize * y + x * PA_BPP); - if (c >= 0) { // hi true means opaque. -#else c = mask_bmp->bm_data[mask_bmp->bm_rowsize*y+x]; if (c == 255 ) { -#endif if ( x < *minx ) *minx = x; if ( y < *miny ) *miny = y; if ( x > *maxx ) *maxx = x; @@ -623,7 +544,6 @@ void gr_ibitblt_find_hole_size( grs_bitmap * mask_bmp, int *minx, int *miny, #else /* __MSDOS__ */ // was: /* !MACINTOSH */ -#include "pa_enabl.h" #include "pstypes.h" #include "gr.h" #include "ibitblt.h" @@ -631,10 +551,6 @@ void gr_ibitblt_find_hole_size( grs_bitmap * mask_bmp, int *minx, int *miny, #include "u_mem.h" #include "grdef.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #define FIND_START 1 #define FIND_STOP 2 @@ -654,11 +570,6 @@ void gr_ibitblt(grs_bitmap *src_bmp, grs_bitmap *dest_bmp, ubyte pixel_double) // variable setup -#if defined(POLY_ACC) - if ( PAEnabled ) - return; -#endif - sw = src_bmp->bm_w; sh = src_bmp->bm_h; srowsize = src_bmp->bm_rowsize; @@ -720,61 +631,6 @@ void gr_ibitblt(grs_bitmap *src_bmp, grs_bitmap *dest_bmp, ubyte pixel_double) } } -#if defined(POLY_ACC) - -unsigned long *pa_emit_blit(int gencode, unsigned long *buf, int w, int h, int sx, int sy, int dx, int dy) -{ - if(w == 0 || h == 0) - return buf; - - if(gencode) - { - buf[0] = (w << 16) | h; - buf[1] = (sx << 16) | sy; - buf[2] = (dx << 16) | dy; - } - return buf + 3; -} - -void gr_ibitblt_create_mask_pa( grs_bitmap * mask_bmp, int sx, int sy, int sw, int sh, int srowsize ) -{ - unsigned long *ret, *code = 0; - int pass, x, y, n; - ushort *s; - - Assert(mask_bmp->bm_type == BM_LINEAR15); - - srowsize /= PA_BPP; - - pa_flush(); - - // make two passes, first pass gets size of output block, second actually creates data. - for(pass = 0; pass != 2; ++pass) - { - for (y = sy; y < sy + sh; y++ ) - { - // first byte of interest in mask - s = (ushort *)(mask_bmp->bm_data + y * mask_bmp->bm_rowsize + sx * PA_BPP); - for ( x=0; x < sw; ) - { - for(; x != sw && (s[x] & 0x8000); ++x) // while opaque... - ; - for(n = 0; x != sw && !(s[x] & 0x8000); ++n, ++x) // while transparent... - ; - code = pa_emit_blit(pass, code, n, 1, x - n, y - sy, x + sx - n, y); - } - } - - if(pass == 0) { - ret = malloc((int)code + sizeof(unsigned long)); - ret[0] = (int)code / sizeof(unsigned long); // store num unsigned longs in list. - code = ret + 1; - } - } -// return (ubyte *)ret; -} -#endif - void gr_ibitblt_create_mask(grs_bitmap *mask_bmp, int sx, int sy, int sw, int sh, int srowsize) { int x, y; @@ -811,53 +667,11 @@ void gr_ibitblt_create_mask(grs_bitmap *mask_bmp, int sx, int sy, int sw, int sh } } -#if defined(POLY_ACC) - -void gr_ibitblt_find_hole_size_pa( grs_bitmap * mask_bmp, int *minx, int *miny, int *maxx, int *maxy ) -{ - int x, y, count=0; - short c; - - Assert( (!(mask_bmp->bm_flags&BM_FLAG_RLE)) ); - - Assert(mask_bmp->bm_type == BM_LINEAR15); - while(!pa_idle()); - - *minx = mask_bmp->bm_w-1; - *maxx = 0; - *miny = mask_bmp->bm_h-1; - *maxy = 0; - - for ( y=0; ybm_h; y++ ) - for ( x=0; xbm_w; x++ ) { - c = *(short *)(mask_bmp->bm_data + mask_bmp->bm_rowsize * y + x * PA_BPP); - if (c >= 0) { // hi true means opaque. - if ( x < *minx ) *minx = x; - if ( y < *miny ) *miny = y; - if ( x > *maxx ) *maxx = x; - if ( y > *maxy ) *maxy = y; - count++; - } - } - - if ( count == 0 ) { - Error( "Bitmap for ibitblt doesn't have transparency!\n" ); - } -} -#endif - void gr_ibitblt_find_hole_size(grs_bitmap *mask_bmp, int *minx, int *miny, int *maxx, int *maxy) { ubyte c; int x, y, count = 0; -#if defined(POLY_ACC) - if ( PAEnabled ) { - gr_ibitblt_find_hole_size_pa( mask_bmp, minx, miny, maxx, maxy ); - return; - } -#endif - Assert( (!(mask_bmp->bm_flags&BM_FLAG_RLE)) ); Assert( mask_bmp->bm_flags&BM_FLAG_TRANSPARENT ); diff --git a/2d/palette.c b/2d/palette.c index 73b81923..177cb1ac 100644 --- a/2d/palette.c +++ b/2d/palette.c @@ -1,4 +1,4 @@ -/* $Id: palette.c,v 1.12 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: palette.c,v 1.13 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -127,10 +127,6 @@ void gr_use_palette_table( char * filename ) } Num_computed_colors = 0; // Flush palette cache. -#if defined(POLY_ACC) - pa_update_clut(gr_palette, 0, 256, 0); -#endif - // swap colors 0 and 255 of the palette along with fade table entries #ifdef SWAP_0_255 diff --git a/2d/pcx.c b/2d/pcx.c index 32ac992a..57a58812 100644 --- a/2d/pcx.c +++ b/2d/pcx.c @@ -1,4 +1,4 @@ -/* $Id: pcx.c,v 1.11 2005-02-25 05:20:36 chris Exp $ */ +/* $Id: pcx.c,v 1.12 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -35,9 +35,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "palette.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif #include "physfsx.h" int pcx_encode_byte(ubyte byt, ubyte cnt, PHYSFS_file *fid); @@ -164,11 +161,6 @@ int pcx_read_bitmap( char * filename, grs_bitmap * bmp,int bitmap_type ,ubyte * CFILE * PCXfile; int i, row, col, count, xsize, ysize; ubyte data, *pixdata; -#if defined(POLY_ACC) - unsigned char local_pal[768]; - - pa_flush(); -#endif PCXfile = cfopen( filename , "rb" ); if ( !PCXfile ) @@ -190,20 +182,6 @@ int pcx_read_bitmap( char * filename, grs_bitmap * bmp,int bitmap_type ,ubyte * xsize = header.Xmax - header.Xmin + 1; ysize = header.Ymax - header.Ymin + 1; -#if defined(POLY_ACC) - // Read the extended palette at the end of PCX file - if(bitmap_type == BM_LINEAR15) // need palette for conversion from 8bit pcx to 15bit. - { - cfseek( PCXfile, -768, SEEK_END ); - cfread( local_pal, 3, 256, PCXfile ); - cfseek( PCXfile, PCXHEADER_SIZE, SEEK_SET ); - for (i=0; i<768; i++ ) - local_pal[i] >>= 2; - pa_save_clut(); - pa_update_clut(local_pal, 0, 256, 0); - } -#endif - if ( bitmap_type == BM_LINEAR ) { if ( bmp->bm_data == NULL ) { gr_init_bitmap_alloc (bmp, bitmap_type, 0, 0, xsize, ysize, xsize); @@ -245,39 +223,6 @@ int pcx_read_bitmap( char * filename, grs_bitmap * bmp,int bitmap_type ,ubyte * } } } -#if defined(POLY_ACC) - } else if( bmp->bm_type == BM_LINEAR15 ) { - ushort *pixdata2, pix15; - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (pa_set_write_mode(0)); - for (row=0; row< ysize ; row++) { - pixdata2 = (ushort *)&bmp->bm_data[bmp->bm_rowsize*row]; - for (col=0; col< xsize ; ) { - if (cfread( &data, 1, 1, PCXfile )!=1 ) { - cfclose( PCXfile ); - return PCX_ERROR_READING; - } - if ((data & 0xC0) == 0xC0) { - count = data & 0x3F; - if (cfread( &data, 1, 1, PCXfile )!=1 ) { - cfclose( PCXfile ); - return PCX_ERROR_READING; - } - pix15 = pa_clut[data]; - for(i = 0; i != count; ++i) pixdata2[i] = pix15; - pixdata2 += count; - col += count; - } else { - *pixdata2++ = pa_clut[data]; - col++; - } - } - } - pa_restore_clut(); - PA_DFX (pa_swap_buffer()); - PA_DFX (pa_set_frontbuffer_current()); - -#endif } else { for (row=0; row< ysize ; row++) { for (col=0; col< xsize ; ) { diff --git a/2d/rle.c b/2d/rle.c index ebc995b3..6aea629b 100644 --- a/2d/rle.c +++ b/2d/rle.c @@ -1,4 +1,4 @@ -/* $Id: rle.c,v 1.19 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: rle.c,v 1.20 2005-07-30 01:51:42 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -25,7 +25,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: rle.c,v 1.19 2004-08-28 23:17:45 schaffner Exp $"; +static char rcsid[] = "$Id: rle.c,v 1.20 2005-07-30 01:51:42 chris Exp $"; #endif #include @@ -602,20 +602,6 @@ void rle_expand_texture_sub( grs_bitmap * bmp, grs_bitmap * rle_temp_bitmap_1 ) #endif } -#if defined(POLY_ACC) -grs_bitmap *rle_get_id_sub(grs_bitmap *bmp) -{ - int i; - - for (i=0;i + + * 2d/2dsline.c, 2d/bitblt.c, 2d/bitmap.c, 2d/font.c, 2d/ibitblt.c, + 2d/palette.c, 2d/pcx.c, 2d/rle.c, + include/gr.h, + main/automap.c, main/config.c, main/credits.c, main/escort.c, + main/game.c, main/gamecntl.c, main/gamepal.c, main/gamerend.c, + main/gameseq.c, main/gauges.c, main/hud.c, main/inferno.c, + main/kconfig.c, main/kmatrix.c, main/menu.c, main/movie.c, + main/newmenu.c, main/object.c, main/playsave.c, main/polyobj.c, + main/render.c, main/state.c, main/texmerge.c, main/titles.c: + remove all the redundant Polygon Acceleration stuff + (include/pa_enabl.h) + 2005-07-29 Chris Taylor * 2d/font.c: show some missing wide 1's (bug #2269) diff --git a/include/gr.h b/include/gr.h index 5229d5eb..76bb9ab4 100644 --- a/include/gr.h +++ b/include/gr.h @@ -1,4 +1,4 @@ -/* $Id: gr.h,v 1.28 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: gr.h,v 1.29 2005-07-30 01:51:11 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -209,9 +209,6 @@ void gr_close(void); // including the raw pixel buffer. grs_canvas *gr_create_canvas(int w, int h); -#if defined(POLY_ACC) -grs_canvas *gr_create_canvas2(int w, int h, int type); -#endif /* def POLY_ACC */ // Creates a canvas that is part of another canvas. this can be used to make // a window on the screen. the canvas structure is malloc'd; the address of @@ -249,11 +246,6 @@ grs_bitmap *gr_create_bitmap(int w,int h); // Allocated a bitmap and makes its data be raw_data that is already somewhere. grs_bitmap *gr_create_bitmap_raw(int w, int h, unsigned char * raw_data ); -#if defined(POLY_ACC) -// Allocates a bitmap of a specific type. data is either NULL or raw data. -grs_bitmap *gr_create_bitmap2(int w, int h, int type, void *data ); -#endif /* def POLY_ACC */ - // Creates a bitmap which is part of another bitmap grs_bitmap *gr_create_sub_bitmap(grs_bitmap *bm,int x,int y,int w, int h); diff --git a/main/automap.c b/main/automap.c index 229614fc..138e626a 100644 --- a/main/automap.c +++ b/main/automap.c @@ -1,4 +1,4 @@ -/* $Id: automap.c,v 1.20 2005-01-08 03:37:38 btb Exp $ */ +/* $Id: automap.c,v 1.21 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -30,7 +30,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ogl_init.h" #endif -#include "pa_enabl.h" //$$POLY_ACC #include "error.h" #include "3d.h" #include "inferno.h" @@ -75,10 +74,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "automap.h" #include "cntrlcen.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef OGL #define AUTOMAP_DIRECT_RENDER #endif @@ -186,13 +181,8 @@ static dd_grs_canvas ddDrawingPages[2]; #endif -#if defined(MACINTOSH) && defined(POLY_ACC) - grs_canvas Pages[2]; // non static under rave so the backbuffer callback function can get at them - grs_canvas DrawingPages[2]; // non static under rave so the backbuffer callback function can get at them -#else static grs_canvas Pages[2]; static grs_canvas DrawingPages[2]; -#endif #endif /* AUTOMAP_DIRECT_RENDER */ #define Page Pages[0] @@ -226,20 +216,7 @@ int MarkerObject[NUM_MARKERS]; extern vms_vector Matrix_scale; //how the matrix is currently scaled -#if defined(MACINTOSH) && defined(POLY_ACC) -// icky hack. automap draw context is no longer valid when this is called. -// so we can not use the pa_draw_line function for rave -bool automap_draw_line(g3s_point *p0, g3s_point *p1) -{ - int savePAEnabledState = PAEnabled; - - PAEnabled = 0; - g3_draw_line(&FromPoint, &ToPoint); - PAEnabled = savePAEnabledState; -} -#else # define automap_draw_line g3_draw_line -#endif // ------------------------------------------------------------- @@ -446,118 +423,6 @@ void draw_player( object * obj ) } int AutomapHires; -#if defined(MACINTOSH) && defined(POLY_ACC) - - void pa_mac_draw_automap_extras(void) - { - int i; - int color; - object * objp; - g3s_point sphere_point; - - AutomapHires = 1; // always on the mac - - // Draw player... - #ifdef NETWORK - if (Game_mode & GM_TEAM) - color = get_team(Player_num); - else - #endif - color = Player_num; // Note link to above if! - - gr_setcolor(gr_getcolor(player_rgb[color].r,player_rgb[color].g,player_rgb[color].b)); - draw_player(&Objects[Players[Player_num].objnum]); - - DrawMarkers(); - - if (HighlightMarker>-1 && MarkerMessage[HighlightMarker][0]!=0) - { - char msg[10+MARKER_MESSAGE_LEN+1]; - - sprintf(msg,"Marker %d: %s",HighlightMarker+1,MarkerMessage[(Player_num*2)+HighlightMarker]); - - gr_setcolor (Red_48); - - modex_printf(5,20,msg,SMALL_FONT,Font_color_20); - } - - // Draw player(s)... - #ifdef NETWORK - if ( (Game_mode & (GM_TEAM | GM_MULTI_COOP)) || (Netgame.game_flags & NETGAME_FLAG_SHOW_MAP) ) - { - for (i=0; itype ) - { - case OBJ_HOSTAGE: - gr_setcolor(Hostage_color); - g3_rotate_point(&sphere_point,&objp->pos); - g3_draw_sphere(&sphere_point,objp->size); - break; - case OBJ_POWERUP: - if ( Automap_visited[objp->segnum] ) - { - if ( (objp->id==POW_KEY_RED) || (objp->id==POW_KEY_BLUE) || (objp->id==POW_KEY_GOLD) ) - { - switch (objp->id) - { - case POW_KEY_RED: gr_setcolor(gr_getcolor(63, 5, 5)); break; - case POW_KEY_BLUE: gr_setcolor(gr_getcolor(5, 5, 63)); break; - case POW_KEY_GOLD: gr_setcolor(gr_getcolor(63, 63, 10)); break; - default: - Error("Illegal key type: %i", objp->id); - } - g3_rotate_point(&sphere_point,&objp->pos); - g3_draw_sphere(&sphere_point,objp->size*4); - } - } - break; - } - } - - gr_bitmapm(AutomapHires?10:5, AutomapHires?10:5, &name_canv_left->cv_bitmap); - gr_bitmapm(grd_curcanv->cv_bitmap.bm_w-(AutomapHires?10:5)-name_canv_right->cv_bitmap.bm_w,AutomapHires?10:5,&name_canv_right->cv_bitmap); - } - - void pa_mac_draw_automap(void) - { - vms_vector viewer_position; - - g3_start_frame(); - render_start_frame(); - pa_set_context(kAutoMapDrawContextID, NULL); - pa_render_start(); - - vm_vec_scale_add(&viewer_position,&view_target,&ViewMatrix.fvec,-ViewDist ); - g3_set_view_matrix(&viewer_position,&ViewMatrix,Automap_zoom); - - draw_all_edges(); - - g3_end_frame(); - pa_render_end(); - } -#endif - void draw_automap() { int i; @@ -566,16 +431,6 @@ void draw_automap() vms_vector viewer_position; g3s_point sphere_point; - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - pa_mac_draw_automap(); - return; - } - #endif - #endif - #ifndef AUTOMAP_DIRECT_RENDER if (!AutomapHires) { WIN(mprintf((1, "Can't do lores automap in Windows!\n"))); @@ -591,10 +446,6 @@ void draw_automap() } #endif -#if defined(POLY_ACC) - pa_flush(); -#endif - WINDOS( dd_gr_clear_canvas(BM_XRGB(0,0,0)), gr_clear_canvas(BM_XRGB(0,0,0)) @@ -887,7 +738,6 @@ void do_automap( int key_code ) { #if !defined (WINDOWS) && !defined(MACINTOSH) if ((Current_display_mode!=0 && Current_display_mode!=2) || (Automap_always_hires && MenuHiresAvailable)) { -#if !defined(POLY_ACC) //edit 4/23/99 Matt Mueller - don't switch res unless we need to if (grd_curscreen->sc_mode != AUTOMAP_MODE) gr_set_mode( AUTOMAP_MODE ); @@ -896,8 +746,6 @@ void do_automap( int key_code ) { //end edit -MM automap_width=grd_curscreen->sc_canvas.cv_bitmap.bm_w; automap_height=grd_curscreen->sc_canvas.cv_bitmap.bm_h; -#endif - PA_DFX (pa_set_frontbuffer_current()); AutomapHires = 1; } else { @@ -957,19 +805,7 @@ WIN(AutomapRedraw:) { WIN(dd_gr_init_sub_canvas(&ddPage, &dd_VR_render_buffer[0], 0, 0, automap_width,automap_height)); - #if defined(MACINTOSH) && defined(POLY_ACC) - if (PAEnabled) - { - // we want all the automap border stuff to be drawn straight to the screen - gr_init_sub_canvas(&Page,&(grd_curscreen->sc_canvas),0, 0, automap_width, automap_height); - } - else - { - gr_init_sub_canvas(&Page,&VR_render_buffer[0],0, 0, automap_width, automap_height); - } - #else - gr_init_sub_canvas(&Page,&VR_render_buffer[0],0, 0, automap_width, automap_height); - #endif + gr_init_sub_canvas(&Page,&VR_render_buffer[0],0, 0, automap_width, automap_height); } else { @@ -993,33 +829,6 @@ WIN(AutomapRedraw:) ); #endif -#if defined(POLY_ACC) - - #ifndef MACINTOSH - pcx_error = pcx_read_bitmap(MAP_BACKGROUND_FILENAME,&(grd_curcanv->cv_bitmap),BM_LINEAR15,pal); - #else - if ( PAEnabled ) - { - pcx_error = pcx_read_bitmap(MAP_BACKGROUND_FILENAME,&(grd_curcanv->cv_bitmap),BM_LINEAR15,pal); - if ( pcx_error != PCX_ERROR_NONE ) - { - Error("File %s - PCX error: %s",MAP_BACKGROUND_FILENAME,pcx_errormsg(pcx_error)); - return; - } - } - else - { - pcx_error = pcx_read_bitmap(MAP_BACKGROUND_FILENAME,&(grd_curcanv->cv_bitmap),BM_LINEAR,pal); - if ( pcx_error != PCX_ERROR_NONE ) - { - Error("File %s - PCX error: %s",MAP_BACKGROUND_FILENAME,pcx_errormsg(pcx_error)); - return; - } - - gr_remap_bitmap_good( &(grd_curcanv->cv_bitmap), pal, -1, -1 ); - } - #endif -#else WIN(DDGRLOCK(dd_grd_curcanv)); pcx_error = pcx_read_fullscr(MAP_BACKGROUND_FILENAME, pal); @@ -1030,7 +839,6 @@ WIN(AutomapRedraw:) } gr_remap_bitmap_good( &(grd_curcanv->cv_bitmap), pal, -1, -1 ); -#endif gr_set_curfont(HUGE_FONT); gr_set_fontcolor(BM_XRGB(20, 20, 20), -1); @@ -1363,13 +1171,6 @@ WIN(if (redraw_screen) redraw_screen = 0); game_flush_inputs(); - #if defined(POLY_ACC) && defined(MACINTOSH) - if (PAEnabled) - { - pa_set_context(kGamePlayDrawContextID, NULL); - } - #endif - if (pause_game) { start_time(); diff --git a/main/config.c b/main/config.c index 86fcfff3..c197666e 100644 --- a/main/config.c +++ b/main/config.c @@ -1,4 +1,4 @@ -/* $Id: config.c,v 1.16 2005-02-25 05:20:36 chris Exp $ */ +/* $Id: config.c,v 1.17 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -53,13 +53,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "player.h" #include "mission.h" #include "mono.h" -#include "pa_enabl.h" #include "physfsx.h" #ifdef RCS -static char rcsid[] = "$Id: config.c,v 1.16 2005-02-25 05:20:36 chris Exp $"; +static char rcsid[] = "$Id: config.c,v 1.17 2005-07-30 01:50:17 chris Exp $"; #endif ubyte Config_digi_volume = 8; @@ -300,12 +299,6 @@ int ReadConfigFile() SoundChannels = sc; set_custom_detail_vars(); } - #ifdef PA_3DFX_VOODOO // Set to highest detail because you can't change em - Object_complexity=Object_detail=Wall_detail= - Wall_render_depth=Debris_amount=SoundChannels = NUM_DETAIL_LEVELS-1; - Detail_level=NUM_DETAIL_LEVELS-1; - set_custom_detail_vars(); - #endif } } else if (!strcmp(token, joystick_min_str)) { @@ -571,7 +564,6 @@ int WriteConfigFile() #include #include -#include "pa_enabl.h" // because some prefs rely on this fact #include "error.h" #include "pstypes.h" #include "game.h" @@ -584,12 +576,8 @@ int WriteConfigFile() #include "mission.h" #include "prefs.h" // prefs file for configuration stuff -- from DeSalvo -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef RCS -static char rcsid[] = "$Id: config.c,v 1.16 2005-02-25 05:20:36 chris Exp $"; +static char rcsid[] = "$Id: config.c,v 1.17 2005-07-30 01:50:17 chris Exp $"; #endif #define MAX_CTB_LEN 512 @@ -1023,12 +1011,6 @@ int ReadConfigFile() SoundChannels = prefs->sc; set_custom_detail_vars(); } - #ifdef PA_3DFX_VOODOO // Set to highest detail because you can't change em - Object_complexity=Object_detail=Wall_detail= - Wall_render_depth=Debris_amount=SoundChannels = NUM_DETAIL_LEVELS-1; - Detail_level=NUM_DETAIL_LEVELS-1; - set_custom_detail_vars(); - #endif strncpy( config_last_player, prefs->lastplayer, CALLSIGN_LEN ); p = strchr(config_last_player, '\n' ); diff --git a/main/credits.c b/main/credits.c index a62e2fec..b41d197c 100644 --- a/main/credits.c +++ b/main/credits.c @@ -1,4 +1,4 @@ -/* $Id: credits.c,v 1.12 2004-11-26 10:08:34 btb Exp $ */ +/* $Id: credits.c,v 1.13 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -23,7 +23,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: credits.c,v 1.12 2004-11-26 10:08:34 btb Exp $"; +static char rcsid[] = "$Id: credits.c,v 1.13 2005-07-30 01:50:17 chris Exp $"; #endif #ifdef WINDOWS @@ -36,7 +36,6 @@ static char rcsid[] = "$Id: credits.c,v 1.12 2004-11-26 10:08:34 btb Exp $"; #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "error.h" #include "pstypes.h" #include "gr.h" @@ -65,10 +64,6 @@ static char rcsid[] = "$Id: credits.c,v 1.12 2004-11-26 10:08:34 btb Exp $"; #include "songs.h" #include "menu.h" // for MenuHires -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #define ROW_SPACING (MenuHires?26:11) #define NUM_LINES_HIRES 21 #define NUM_LINES (MenuHires?NUM_LINES_HIRES:20) @@ -198,9 +193,6 @@ CreditsPaint: gr_use_palette_table( "credits.256" ); #ifdef OGL gr_palette_load(gr_palette); -#endif -#if defined(POLY_ACC) - pa_update_clut(gr_palette, 0, 256, 0); #endif header_font = gr_init_font( MenuHires?"font1-1h.fnt":"font1-1.fnt" ); title_font = gr_init_font( MenuHires?"font2-3h.fnt":"font2-3.fnt" ); @@ -235,7 +227,6 @@ WIN(DDGRUNLOCK(dd_grd_curcanv)); //MWA for size to determine if we can use that buffer. If the game size //MWA matches what we need, then lets save memory. -#ifndef PA_3DFX_VOODOO #ifndef WINDOWS if (MenuHires && VR_offscreen_buffer->cv_w == 640) { CreditsOffscreenBuf = VR_offscreen_buffer; @@ -249,9 +240,6 @@ WIN(DDGRUNLOCK(dd_grd_curcanv)); #else CreditsOffscreenBuf = gr_create_canvas(640,480); #endif -#else - CreditsOffscreenBuf = gr_create_canvas(640,480); -#endif if (!CreditsOffscreenBuf) Error("Not enough memory to allocate Credits Buffer."); @@ -300,8 +288,7 @@ get_line:; } while (extra_inc--); extra_inc = 0; -NO_DFX (for (i=0; icv_bitmap); WIN(DDGRSCREENLOCK); -#if defined(POLY_ACC) - if(new_box->width != 0) -#endif - gr_bm_bitblt( new_box->width + 1, new_box->height +4, - new_box->left, new_box->top, new_box->left, new_box->top, - tempbmp, &(grd_curscreen->sc_canvas.cv_bitmap) ); + gr_bm_bitblt( new_box->width + 1, new_box->height +4, + new_box->left, new_box->top, new_box->left, new_box->top, + tempbmp, &(grd_curscreen->sc_canvas.cv_bitmap) ); WIN(DDGRSCREENUNLOCK); } -#if defined(POLY_ACC) - pa_flush(); -#endif - -#if (!defined(POLY_ACC) || defined(MACINTOSH)) && !defined(OGL) - MAC( if(!PAEnabled) ) // POLY_ACC always on for the macintosh +#ifndef OGL for (j=0; jcv_bitmap.bm_rowsize); #else if ( Current_display_mode ) { -#if defined(POLY_ACC) - Game_cockpit_copy_code = gr_ibitblt_create_mask_pa( bm, minx, miny, maxx-minx+1, maxy-miny+1, VR_offscreen_buffer->cv_bitmap.bm_rowsize ); - pa_clear_buffer(1, 0); // clear offscreen to reduce white flash. -#else Game_cockpit_copy_code = gr_ibitblt_create_mask_svga( bm, minx, miny, maxx-minx+1, maxy-miny+1, VR_offscreen_buffer->cv_bitmap.bm_rowsize ); -#endif } else Game_cockpit_copy_code = gr_ibitblt_create_mask( bm, minx, miny, maxx-minx+1, maxy-miny+1, VR_offscreen_buffer->cv_bitmap.bm_rowsize ); #endif @@ -669,22 +654,6 @@ void game_init_render_sub_buffers( int x, int y, int w, int h ) gr_init_sub_canvas( &VR_render_sub_buffer[1], &VR_render_buffer[1], x, y, w, h ); } - #ifdef MACINTOSH - #ifdef POLY_ACC - if ( PAEnabled ) - { - TQARect newBounds; - - newBounds.left = x; - newBounds.right = x + w; - newBounds.top = y; - newBounds.bottom = y + h; - - pa_set_context(kGamePlayDrawContextID, &newBounds); // must resize/create new context - } - #endif - #endif - #ifdef WINDOWS VR_render_sub_buffer[0].cv_bitmap.bm_x = 0; VR_render_sub_buffer[0].cv_bitmap.bm_y = 0; @@ -801,21 +770,7 @@ void game_init_render_buffers(int screen_mode, int render_w, int render_h, int r VR_offscreen_buffer = gr_create_canvas( render_w, 200 ); } else { -#if defined(POLY_ACC) - #ifndef MACINTOSH - VR_offscreen_buffer = gr_create_canvas( render_w, render_h ); - d_free(VR_offscreen_buffer->cv_bitmap.bm_data); - gr_init_canvas(VR_offscreen_buffer, pa_get_buffer_address(1), BM_LINEAR15, render_w, render_h); - #else - if ( PAEnabled || gConfigInfo.mAcceleration ) { - Cockpit_mode=CM_FULL_SCREEN; // HACK HACK HACK HACK HACK!!!! - VR_offscreen_buffer = gr_create_canvas2(render_w, render_h, BM_LINEAR15); - } else - VR_offscreen_buffer = gr_create_canvas( render_w, render_h ); - #endif -#else VR_offscreen_buffer = gr_create_canvas( render_w, render_h ); -#endif } #ifdef OGL @@ -924,15 +879,7 @@ WIN(static int saved_window_h); MenuHires = MenuHiresAvailable; //do highres if we can -#if defined(POLY_ACC) - #ifndef MACINTOSH - menu_mode = MenuHires?SM(640,480):SM(320,200); - #else - menu_mode = PAEnabled?SM_640x480x15xPA:SM_640x480V; - #endif -#else menu_mode = MenuHires?SM(640,480):SM(320,200); -#endif if (VGA_current_mode != menu_mode) { if (gr_set_mode(menu_mode)) diff --git a/main/gamecntl.c b/main/gamecntl.c index cbf50cc7..3c40062a 100644 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -1,4 +1,4 @@ -/* $Id: gamecntl.c,v 1.25 2004-12-17 13:17:46 btb Exp $ */ +/* $Id: gamecntl.c,v 1.26 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -92,7 +92,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "tactile.h" #endif -#include "pa_enabl.h" #include "multi.h" #include "desc_id.h" #include "cntrlcen.h" @@ -105,10 +104,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "switch.h" #include "escort.h" -#ifdef POLY_ACC -# include "poly_acc.h" -#endif - //#define TEST_TIMER 1 //if this is set, do checking on timer #define SHOW_EXIT_PATH 1 @@ -802,18 +797,6 @@ void HandleDemoKey(int key) case KEY_F3: - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - HUD_init_message("Cockpit not available while using QuickDraw 3D."); - return; - } - #endif - #endif - - PA_DFX (HUD_init_message ("Cockpit not available in 3dfx version.")); - PA_DFX (break); if (!(Guided_missile[Player_num] && Guided_missile[Player_num]->type==OBJ_WEAPON && Guided_missile[Player_num]->id==GUIDEDMISS_ID && Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && Guided_in_big_window)) toggle_cockpit(); break; @@ -1154,7 +1137,6 @@ int HandleSystemKey(int key) do_options_menu(); if (!(Game_mode&GM_MULTI)) palette_restore(); if (scanline_save != Scanline_double) init_cockpit(); // reset the cockpit after changing... - PA_DFX (init_cockpit()); break; } @@ -1170,19 +1152,6 @@ int HandleSystemKey(int key) } #endif - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - HUD_init_message("Cockpit not available while using QuickDraw 3D."); - return; - } - #endif - #endif - - PA_DFX (HUD_init_message ("Cockpit not available in 3dfx version.")); - PA_DFX (break); - if (!(Guided_missile[Player_num] && Guided_missile[Player_num]->type==OBJ_WEAPON && Guided_missile[Player_num]->id==GUIDEDMISS_ID && Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && Guided_in_big_window)) { toggle_cockpit(); screen_changed=1; @@ -1318,16 +1287,6 @@ int HandleSystemKey(int key) break; #endif - #if defined(MACINTOSH) && defined(POLY_ACC) - case KEY_COMMAND+KEY_ALTED+KEY_1: - if (PAEnabled) - { // hackish, to enable RAVE filtering hotkey, - // not widely publicized - pa_toggle_filtering(); - } - break; - #endif - MAC(case KEY_COMMAND+KEY_S:) MAC(case KEY_COMMAND+KEY_ALTED+KEY_2:) diff --git a/main/gamepal.c b/main/gamepal.c index bd7a040e..add0ceb0 100644 --- a/main/gamepal.c +++ b/main/gamepal.c @@ -1,4 +1,4 @@ -/* $Id: gamepal.c,v 1.5 2003-10-10 09:36:35 btb Exp $ */ +/* $Id: gamepal.c,v 1.6 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -26,7 +26,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "fix.h" #include "vecmat.h" #include "gr.h" @@ -42,10 +41,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "piggy.h" #include "strutil.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - extern void g3_remap_interp_colors(); char Current_level_palette[FILENAME_LEN]; @@ -151,11 +146,7 @@ int load_palette(char *name,int used_for_level,int no_change_screen) if (Function_mode == FMODE_GAME && !no_change_screen) gr_remap_bitmap_good( &grd_curscreen->sc_canvas.cv_bitmap, old_pal, -1, -1 ); -#if defined(POLY_ACC) - if (bg.bmp && bg.bmp->bm_type == BM_LINEAR) -#else if (bg.bmp) -#endif gr_remap_bitmap_good( bg.bmp, old_pal, -1, -1 ); if (!gr_palette_faded_out && !no_change_screen) diff --git a/main/gamerend.c b/main/gamerend.c index 6595006a..c6d4d7ee 100644 --- a/main/gamerend.c +++ b/main/gamerend.c @@ -1,4 +1,4 @@ -/* $Id: gamerend.c,v 1.15 2005-01-24 21:11:58 schaffner Exp $ */ +/* $Id: gamerend.c,v 1.16 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -23,7 +23,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: gamerend.c,v 1.15 2005-01-24 21:11:58 schaffner Exp $"; +static char rcsid[] = "$Id: gamerend.c,v 1.16 2005-07-30 01:50:17 chris Exp $"; #endif #ifdef WINDOWS @@ -37,7 +37,6 @@ static char rcsid[] = "$Id: gamerend.c,v 1.15 2005-01-24 21:11:58 schaffner Exp #include "pstypes.h" #include "console.h" -#include "pa_enabl.h" //$$POLY_ACC #include "inferno.h" #include "error.h" #include "mono.h" @@ -67,10 +66,6 @@ static char rcsid[] = "$Id: gamerend.c,v 1.15 2005-01-24 21:11:58 schaffner Exp #include "mission.h" #include "gameseq.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef OGL #include "ogl_init.h" #endif @@ -577,9 +572,6 @@ void game_render_frame_stereo() #endif update_rendered_data(0, Viewer, 0, 0); render_frame(0, 0); -#if defined(POLY_ACC) && !defined(MACINTOSH) // dma stuff not support on mac via RAVE - pa_dma_poll(); -#endif wake_up_rendered_objects(Viewer, 0); Viewer = viewer_save; @@ -961,147 +953,6 @@ extern ubyte Game_cockpit_copy_code; void draw_guided_crosshair(void); -#ifdef MACINTOSH -// special code to render a frame w/hw acceleration - -// next routine is called as a callback from the current hardware engine being used. The -// routine is called once all of the accelerated drawing is done. We now overlay the -// backbuffer with hud stuff. - -void pa_mac_render_extras( void ) -{ - grs_canvas Screen_3d_window; - - gr_init_sub_canvas( &Screen_3d_window, &VR_screen_pages[0], - VR_render_sub_buffer[0].cv_bitmap.bm_x, - VR_render_sub_buffer[0].cv_bitmap.bm_y, - VR_render_sub_buffer[0].cv_bitmap.bm_w, - VR_render_sub_buffer[0].cv_bitmap.bm_h); - - gr_set_current_canvas( &Screen_3d_window ); // set to current screen - - if (Guided_missile[Player_num] && - Guided_missile[Player_num]->type==OBJ_WEAPON && - Guided_missile[Player_num]->id==GUIDEDMISS_ID && - Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && - Guided_in_big_window) - { - char *msg = "Guided Missile View"; - int w,h,aw; - - gr_set_curfont( GAME_FONT ); //GAME_FONT ); - gr_set_fontcolor(gr_getcolor(27,0,0), -1 ); - gr_get_string_size(msg, &w, &h, &aw ); - - gr_printf((grd_curcanv->cv_bitmap.bm_w-w)/2, 3, msg ); - - draw_guided_crosshair(); - - HUD_render_message_frame(); - } - else - { - game_draw_hud_stuff(); // draw hud stuff when not doing missle view in big window - } - - if (Game_paused) { //render pause message over off-screen 3d (to minimize flicker) - extern char *Pause_msg; - ubyte *save_data = VR_screen_pages[VR_current_page].cv_bitmap.bm_data; - - WIN(Int3()); // Not supported yet. - VR_screen_pages[VR_current_page].cv_bitmap.bm_data=VR_render_buffer[VR_current_page].cv_bitmap.bm_data; - show_boxed_message(Pause_msg); - VR_screen_pages[VR_current_page].cv_bitmap.bm_data=save_data; - } - - -} - -void pa_mac_game_render_frame( void ) -{ - Assert ( !Scanline_double ); - Assert ( PAEnabled ); - - gr_set_current_canvas(&VR_render_sub_buffer[0]); // set up the right canvas so rendering is done to correct size - - pa_render_start(); - - if (Guided_missile[Player_num] && - Guided_missile[Player_num]->type==OBJ_WEAPON && - Guided_missile[Player_num]->id==GUIDEDMISS_ID && - Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && - Guided_in_big_window) - { - char *msg = "Guided Missile View"; - object *viewer_save = Viewer; - int w,h,aw; - - if (Cockpit_mode==CM_FULL_COCKPIT) { - BigWindowSwitch=1; - force_cockpit_redraw=1; - Cockpit_mode=CM_STATUS_BAR; - pa_render_end(); - return; - } - - Viewer = Guided_missile[Player_num]; - update_rendered_data(0, Viewer, 0, 0); - render_frame(0, 0); - wake_up_rendered_objects(Viewer, 0); - Viewer = viewer_save; - } - else - { - if (BigWindowSwitch) - { - force_cockpit_redraw=1; - Cockpit_mode=CM_FULL_COCKPIT; - BigWindowSwitch=0; - pa_render_end(); - return; - } - - update_rendered_data(0, Viewer, Rear_view, 0); - render_frame(0, 0); - } - - if (Cockpit_mode == CM_FULL_SCREEN) - { - show_extra_views(); - } - - - pa_render_end(); - - // NOTE: Hud stuff is drawn using a RAVE call back which draws onto the back buffer - // after rendering finishes but before the page flip - - if (Cockpit_mode != CM_FULL_SCREEN) - { - show_extra_views(); //missile view, buddy bot, etc. - } - - // Draw Gauges straight to screen - if (Cockpit_mode==CM_FULL_COCKPIT || Cockpit_mode==CM_STATUS_BAR) - { - - if ( (Newdemo_state == ND_STATE_PLAYBACK) ) - { - Game_mode = Newdemo_game_mode; - } - - Current_display_mode = 1; - render_gauges(); - Current_display_mode = -1; - - if ( (Newdemo_state == ND_STATE_PLAYBACK) ) - { - Game_mode = GM_NORMAL; - } - } -} -#endif // MACINTOSH - //render a frame for the game // WINDOWS: @@ -1114,13 +965,6 @@ void game_render_frame_mono(void) grs_canvas Screen_3d_window ); int no_draw_hud=0; - - #if defined(MACINTOSH) - if ( PAEnabled ) { - pa_mac_game_render_frame(); - return; - } - #endif WINDOS ( @@ -1149,87 +993,6 @@ void game_render_frame_mono(void) ); } -#if defined(POLY_ACC) && !defined(MACINTOSH) // begin s3 relocation of cockpit drawing. - - pa_flush(); - - if (Guided_missile[Player_num] && Guided_missile[Player_num]->type==OBJ_WEAPON && Guided_missile[Player_num]->id==GUIDEDMISS_ID && Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && Guided_in_big_window) - no_draw_hud = 1; - - if (!no_draw_hud) { - WIN(DDGRLOCK(dd_grd_curcanv)); - game_draw_hud_stuff(); - WIN(DDGRUNLOCK(dd_grd_curcanv)); - } - - show_extra_views(); //missile view, buddy bot, etc. - pa_dma_poll(); - - if (Game_paused) { //render pause message over off-screen 3d (to minimize flicker) - extern char *Pause_msg; - ubyte *save_data = VR_screen_pages[VR_current_page].cv_bitmap.bm_data; - - WIN(Int3()); // Not supported yet. - VR_screen_pages[VR_current_page].cv_bitmap.bm_data=VR_render_buffer[VR_current_page].cv_bitmap.bm_data; - show_boxed_message(Pause_msg); - VR_screen_pages[VR_current_page].cv_bitmap.bm_data=save_data; - } - - if ( Game_double_buffer ) { //copy to visible screen - if ( !Game_cockpit_copy_code ) { - if ( VR_screen_flags&VRF_USE_PAGING ) { - VR_current_page = !VR_current_page; - gr_set_current_canvas( &VR_screen_pages[VR_current_page] ); - gr_bm_ubitblt( VR_render_sub_buffer[0].cv_w, VR_render_sub_buffer[0].cv_h, VR_render_sub_buffer[0].cv_bitmap.bm_x, VR_render_sub_buffer[0].cv_bitmap.bm_y, 0, 0, &VR_render_sub_buffer[0].cv_bitmap, &VR_screen_pages[VR_current_page].cv_bitmap ); - gr_wait_for_retrace = 0; - gr_show_canvas( &VR_screen_pages[VR_current_page] ); - gr_wait_for_retrace = 1; - } else { -#ifdef POLY_ACC //$$ - pa_about_to_flip(); -#endif - gr_bm_ubitblt( - VR_render_sub_buffer[0].cv_w, VR_render_sub_buffer[0].cv_h, - VR_render_sub_buffer[0].cv_bitmap.bm_x, VR_render_sub_buffer[0].cv_bitmap.bm_y, - VR_render_sub_buffer[0].cv_bitmap.bm_x, VR_render_sub_buffer[0].cv_bitmap.bm_y, - &VR_render_sub_buffer[0].cv_bitmap, &VR_screen_pages[0].cv_bitmap - ); - } - } else { -#ifdef POLY_ACC //$$ - pa_about_to_flip(); -#endif - gr_ibitblt( &VR_render_buffer[0].cv_bitmap, &VR_screen_pages[0].cv_bitmap, Game_cockpit_copy_code ); - } - } - - if (Cockpit_mode==CM_FULL_COCKPIT || Cockpit_mode==CM_STATUS_BAR) { - - if ( (Newdemo_state == ND_STATE_PLAYBACK) ) - Game_mode = Newdemo_game_mode; - - render_gauges(); - - if ( (Newdemo_state == ND_STATE_PLAYBACK) ) - Game_mode = GM_NORMAL; - } - - // restore current canvas. - if ( Game_double_buffer ) { - WINDOS( - dd_gr_set_current_canvas(&dd_VR_render_sub_buffer[0]), - gr_set_current_canvas(&VR_render_sub_buffer[0]) - ); - } - else { - WINDOS( - dd_gr_set_current_canvas(&Screen_3d_window), - gr_set_current_canvas(&Screen_3d_window) - ); - } - -#endif // end s3 relocation of cockpit drawing. - if (Guided_missile[Player_num] && Guided_missile[Player_num]->type==OBJ_WEAPON && Guided_missile[Player_num]->id==GUIDEDMISS_ID && Guided_missile[Player_num]->signature==Guided_missile_sig[Player_num] && Guided_in_big_window) { char *msg = "Guided Missile View"; object *viewer_save = Viewer; @@ -1287,9 +1050,6 @@ void game_render_frame_mono(void) WIN(DDGRLOCK(dd_grd_curcanv)); // Must lock DD canvas!!! update_rendered_data(0, Viewer, Rear_view, 0); render_frame(0, 0); -#if defined(POLY_ACC) && !defined(MACINTOSH) // dma stuff not supported on mac via RAVE - pa_dma_poll(); -#endif WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -1306,8 +1066,6 @@ void game_render_frame_mono(void) ); } -#if !defined(POLY_ACC) || defined(MACINTOSH) - if (!no_draw_hud) { WIN(DDGRLOCK(dd_grd_curcanv)); game_draw_hud_stuff(); @@ -1426,8 +1184,6 @@ void game_render_frame_mono(void) VR_current_page = !VR_current_page; dd_gr_flip(); } -#endif - #endif con_update(); @@ -1886,11 +1642,7 @@ void show_boxed_message(char *msg) // Save the background of the display bg.x=x; bg.y=y; bg.w=w; bg.h=h; -#if defined(POLY_ACC) - bg.bmp = gr_create_bitmap2( w+BOX_BORDER, h+BOX_BORDER, grd_curcanv->cv_bitmap.bm_type, NULL ); -#else bg.bmp = gr_create_bitmap( w+BOX_BORDER, h+BOX_BORDER ); -#endif WIN( DDGRLOCK(dd_grd_curcanv)); gr_bm_ubitblt(w+BOX_BORDER, h+BOX_BORDER, 0, 0, x-BOX_BORDER/2, y-BOX_BORDER/2, &(grd_curcanv->cv_bitmap), bg.bmp ); diff --git a/main/gameseq.c b/main/gameseq.c index 22c49220..631b2e29 100644 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -1,4 +1,4 @@ -/* $Id: gameseq.c,v 1.45 2005-01-10 17:47:27 schaffner Exp $ */ +/* $Id: gameseq.c,v 1.46 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -24,7 +24,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -char gameseq_rcsid[] = "$Id: gameseq.c,v 1.45 2005-01-10 17:47:27 schaffner Exp $"; +char gameseq_rcsid[] = "$Id: gameseq.c,v 1.46 2005-07-30 01:50:17 chris Exp $"; #endif #ifdef WINDOWS @@ -44,7 +44,6 @@ char gameseq_rcsid[] = "$Id: gameseq.c,v 1.45 2005-01-10 17:47:27 schaffner Exp #include "ogl_init.h" #endif -#include "pa_enabl.h" //$$POLY_ACC #include "inferno.h" #include "game.h" #include "player.h" @@ -119,9 +118,6 @@ char gameseq_rcsid[] = "$Id: gameseq.c,v 1.45 2005-01-10 17:47:27 schaffner Exp #include "credits.h" #include "gamemine.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif #if defined (TACTILE) #include "tactile.h" #endif @@ -840,7 +836,7 @@ void LoadLevel(int level_num,int page_in_textures) // WIN(LoadCursorWin(MOUSE_WAIT_CURSOR)); // WIN(ShowCursorW()); -#if 1 //defined(POLY_ACC) || defined(OGL) +#if 1 //def OGL gr_palette_load(gr_palette); show_boxed_message(TXT_LOADING); gr_update(); @@ -1095,8 +1091,6 @@ void DoEndLevelScoreGlitz(int network) mprintf((0,"doing menu\n")); - PA_DFX (pa_alpha_always()); - #ifdef NETWORK if ( network && (Game_mode & GM_NETWORK) ) newmenu_do2(NULL, title, c, m, (void (*))network_endlevel_poll2, 0, STARS_BACKGROUND); @@ -1167,20 +1161,11 @@ void do_secret_message(char *msg) load_stars(); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - old_fmode = Function_mode; Function_mode = FMODE_MENU; nm_messagebox(NULL, 1, TXT_OK, msg); Function_mode = old_fmode; -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - WIN(DEFINE_SCREEN(NULL)); } @@ -1650,20 +1635,11 @@ died_in_mine_message(void) load_stars(); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - old_fmode = Function_mode; Function_mode = FMODE_MENU; nm_messagebox(NULL, 1, TXT_OK, TXT_DIED_IN_MINE); Function_mode = old_fmode; -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - WIN(DEFINE_SCREEN(NULL)); } @@ -1685,21 +1661,12 @@ void returning_to_level_message(void) load_stars(); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - old_fmode = Function_mode; Function_mode = FMODE_MENU; sprintf(msg, "Returning to level %i", Entered_from_level); nm_messagebox(NULL, 1, TXT_OK, msg); Function_mode = old_fmode; -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - WIN(DEFINE_SCREEN(NULL)); } @@ -1724,21 +1691,12 @@ void advancing_to_level_message(void) load_stars(); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - old_fmode = Function_mode; Function_mode = FMODE_MENU; sprintf(msg, "Base level destroyed.\nAdvancing to level %i", Entered_from_level+1); nm_messagebox(NULL, 1, TXT_OK, msg); Function_mode = old_fmode; -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - WIN(DEFINE_SCREEN(NULL)); } diff --git a/main/gauges.c b/main/gauges.c index 007dd3e1..144f3439 100644 --- a/main/gauges.c +++ b/main/gauges.c @@ -1,4 +1,4 @@ -/* $Id: gauges.c,v 1.17 2005-07-28 01:40:41 chris Exp $ */ +/* $Id: gauges.c,v 1.18 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -33,7 +33,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "hudmsg.h" -#include "pa_enabl.h" //$$POLY_ACC #include "inferno.h" #include "game.h" #include "screens.h" @@ -69,10 +68,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ogl_init.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - void draw_ammo_info(int x,int y,int ammo_count,int primary); extern void draw_guided_crosshair(void); @@ -871,28 +866,17 @@ void copy_gauge_box(gauge_box *box,grs_bitmap *bm) //gr_setcolor(BM_XRGB(31,0,0)); for (cnt=0,y=box->top;cntspanlist[cnt].r-box->spanlist[cnt].l+1,1, box->left+box->spanlist[cnt].l,y,box->left+box->spanlist[cnt].l,y,bm,&grd_curcanv->cv_bitmap); //gr_scanline(box->left+box->spanlist[cnt].l,box->left+box->spanlist[cnt].r,y); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (pa_set_front_to_read()); - } } else { - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_back_to_read()); - gr_bm_ubitblt(box->right-box->left+1,box->bot-box->top+1, box->left,box->top,box->left,box->top, bm,&grd_curcanv->cv_bitmap); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (pa_set_front_to_read()); } } #endif @@ -1087,16 +1071,10 @@ WIN(DDGRLOCK(dd_grd_curcanv)); if ( (Game_mode & GM_MULTI) && !(Game_mode & GM_MULTI_COOP) ) { - PA_DFX(pa_set_frontbuffer_current()); - PA_DFX(gr_printf(SB_SCORE_LABEL_X,SB_SCORE_Y,"%s:", TXT_KILLS)); - PA_DFX(pa_set_backbuffer_current()); gr_printf(SB_SCORE_LABEL_X,SB_SCORE_Y,"%s:", TXT_KILLS); } else { - PA_DFX (pa_set_frontbuffer_current() ); - PA_DFX (gr_printf(SB_SCORE_LABEL_X,SB_SCORE_Y,"%s:", TXT_SCORE) ); - PA_DFX(pa_set_backbuffer_current()); gr_printf(SB_SCORE_LABEL_X,SB_SCORE_Y,"%s:", TXT_SCORE); } } @@ -1113,9 +1091,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); //erase old score gr_setcolor(BM_XRGB(0,0,0)); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],y,SB_SCORE_RIGHT,y+GAME_FONT->ft_h)); - PA_DFX(pa_set_backbuffer_current()); gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],y,SB_SCORE_RIGHT,y+GAME_FONT->ft_h); if ( (Game_mode & GM_MULTI) && !(Game_mode & GM_MULTI_COOP) ) @@ -1123,9 +1098,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); else gr_set_fontcolor(gr_getcolor(0,31,0),-1 ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(x,y,score_str)); - PA_DFX(pa_set_backbuffer_current()); gr_printf(x,y,score_str); last_x[(Current_display_mode?2:0)+VR_current_page] = x; @@ -1155,9 +1127,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); if (score_display[VR_current_page] != last_score_display[VR_current_page]) { gr_setcolor(BM_XRGB(0,0,0)); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],SB_SCORE_ADDED_Y,SB_SCORE_ADDED_RIGHT,SB_SCORE_ADDED_Y+GAME_FONT->ft_h)); - PA_DFX(pa_set_backbuffer_current()); gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],SB_SCORE_ADDED_Y,SB_SCORE_ADDED_RIGHT,SB_SCORE_ADDED_Y+GAME_FONT->ft_h); last_score_display[VR_current_page] = score_display[VR_current_page]; @@ -1179,9 +1148,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); gr_set_fontcolor(gr_getcolor(0, color, 0),-1 ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(x, SB_SCORE_ADDED_Y, score_str)); - PA_DFX(pa_set_backbuffer_current()); gr_printf(x, SB_SCORE_ADDED_Y, score_str); @@ -1190,9 +1156,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); } else { //erase old score gr_setcolor(BM_XRGB(0,0,0)); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],SB_SCORE_ADDED_Y,SB_SCORE_ADDED_RIGHT,SB_SCORE_ADDED_Y+GAME_FONT->ft_h)); - PA_DFX(pa_set_backbuffer_current()); gr_rect(last_x[(Current_display_mode?2:0)+VR_current_page],SB_SCORE_ADDED_Y,SB_SCORE_ADDED_RIGHT,SB_SCORE_ADDED_Y+GAME_FONT->ft_h); score_time = 0; @@ -1481,15 +1444,9 @@ WIN(DDGRLOCK(dd_grd_curcanv)); gr_setcolor(gr_find_closest_color(10,10,10)); gr_scanline(168,189,189); } else { - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_rect(338,453,378,470)); - PA_DFX(pa_set_backbuffer_current()); gr_rect(338,453,378,470); gr_setcolor(gr_find_closest_color(10,10,10)); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_scanline(336,378,453)); - PA_DFX(pa_set_backbuffer_current()); gr_scanline(336,378,453); } } @@ -1504,9 +1461,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); while ((t=strchr(txt,'1')) != NULL) *t = '\x84'; //convert to wide '1' - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_string(x,y,txt)); - PA_DFX(pa_set_backbuffer_current()); gr_string(x,y,txt); WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -1702,20 +1656,9 @@ void sb_show_lives() gr_set_curfont( GAME_FONT ); gr_set_fontcolor(gr_getcolor(0,20,0),-1 ); if (Game_mode & GM_MULTI) - { - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(SB_LIVES_LABEL_X,SB_LIVES_LABEL_Y,"%s:", TXT_DEATHS)); - PA_DFX (pa_set_backbuffer_current()); gr_printf(SB_LIVES_LABEL_X,SB_LIVES_LABEL_Y,"%s:", TXT_DEATHS); - - } else - { - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(SB_LIVES_LABEL_X,SB_LIVES_LABEL_Y,"%s:", TXT_LIVES)); - PA_DFX (pa_set_backbuffer_current()); gr_printf(SB_LIVES_LABEL_X,SB_LIVES_LABEL_Y,"%s:", TXT_LIVES); - } } WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -1748,22 +1691,13 @@ WIN(DDGRUNLOCK(dd_grd_curcanv)); gr_setcolor(BM_XRGB(0,0,0)); - PA_DFX (pa_set_frontbuffer_current()); - gr_rect(x, y, SB_SCORE_RIGHT, y+bm->bm_h); - PA_DFX (pa_set_backbuffer_current()); gr_rect(x, y, SB_SCORE_RIGHT, y+bm->bm_h); if (Players[Player_num].lives-1 > 0) { gr_set_curfont( GAME_FONT ); gr_set_fontcolor(gr_getcolor(0,20,0),-1 ); PAGE_IN_GAUGE( GAUGE_LIVES ); - #ifdef PA_3DFX_VOODOO - PA_DFX (pa_set_frontbuffer_current()); - gr_ubitmapm(x, y,bm); - gr_printf(x+bm->bm_w+GAME_FONT->ft_w, y, "x %d", Players[Player_num].lives-1); - #endif - PA_DFX (pa_set_backbuffer_current()); gr_ubitmapm(x, y,bm); gr_printf(x+bm->bm_w+GAME_FONT->ft_w, y, "x %d", Players[Player_num].lives-1); @@ -2139,9 +2073,6 @@ void draw_shield_bar(int shield) PAGE_IN_GAUGE( GAUGE_SHIELDS+9-bm_num ); WIN(DDGRLOCK(dd_grd_curcanv)); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_ubitmapm( SHIELD_GAUGE_X, SHIELD_GAUGE_Y, &GameBitmaps[ GET_GAUGE_INDEX(GAUGE_SHIELDS+9-bm_num) ] )); - PA_DFX (pa_set_backbuffer_current()); gr_ubitmapm( SHIELD_GAUGE_X, SHIELD_GAUGE_Y, &GameBitmaps[ GET_GAUGE_INDEX(GAUGE_SHIELDS+9-bm_num) ] ); WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -2219,29 +2150,6 @@ void draw_player_ship(int cloak_state,int old_cloak_state,int x, int y) refade = 1; } -#if defined(POLY_ACC) - #ifdef MACINTOSH - if ( PAEnabled ) { - #endif - Gr_scanline_darkening_level = cloak_fade_value; - gr_set_current_canvas( get_current_game_screen() ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_blit_lit(&grd_curcanv->cv_bitmap, x, y, bm, 0, 0, bm->bm_w, bm->bm_h)); - PA_DFX (pa_set_backbuffer_current()); - pa_blit_lit(&grd_curcanv->cv_bitmap, x, y, bm, 0, 0, bm->bm_w, bm->bm_h); - - Gr_scanline_darkening_level = GR_FADE_LEVELS; - return; -// } -// else -// Gr_scanline_darkening_level = GR_FADE_LEVELS; -// mprintf ((1,"HEY! HIT THIS!\n")); -// Int3(); - #ifdef MACINTOSH - } - #endif -#endif - WINDOS( dd_gr_set_current_canvas(&dd_VR_render_buffer[0]), gr_set_current_canvas(&VR_render_buffer[0]) @@ -2358,9 +2266,6 @@ void draw_weapon_info_sub(int info_index,gauge_box *box,int pic_x,int pic_y,char //clear the window gr_setcolor(BM_XRGB(0,0,0)); - // PA_DFX (pa_set_frontbuffer_current()); -// PA_DFX (gr_rect(box->left,box->top,box->right,box->bot)); - PA_DFX (pa_set_backbuffer_current()); gr_rect(box->left,box->top,box->right,box->bot); if (Piggy_hamfile_version >= 3 // !SHAREWARE @@ -2375,31 +2280,17 @@ void draw_weapon_info_sub(int info_index,gauge_box *box,int pic_x,int pic_y,char Assert(bm != NULL); -// PA_DFX (pa_set_frontbuffer_current()); -// PA_DFX (gr_ubitmapm(pic_x,pic_y,bm)); - PA_DFX (pa_set_backbuffer_current()); gr_ubitmapm(pic_x,pic_y,bm); gr_set_fontcolor(gr_getcolor(0,20,0),-1 ); if ((p=strchr(name,'\n'))!=NULL) { *p=0; - #ifdef PA_3DFX_VOODOO - // pa_set_frontbuffer_current(); -// gr_printf(text_x,text_y,name); -// gr_printf(text_x,text_y+grd_curcanv->cv_font->ft_h+1,p+1); - #endif - PA_DFX (pa_set_backbuffer_current()); gr_printf(text_x,text_y,name); gr_printf(text_x,text_y+grd_curcanv->cv_font->ft_h+1,p+1); *p='\n'; } else - { - // PA_DFX(pa_set_frontbuffer_current()); -// PA_DFX (gr_printf(text_x,text_y,name)); - PA_DFX(pa_set_backbuffer_current()); gr_printf(text_x,text_y,name); - } // For laser, show level and quadness if (info_index == LASER_ID || info_index == SUPER_LASER_ID) { @@ -2409,17 +2300,10 @@ void draw_weapon_info_sub(int info_index,gauge_box *box,int pic_x,int pic_y,char temp_str[5] = Players[Player_num].laser_level+1 + '0'; -// PA_DFX(pa_set_frontbuffer_current()); -// PA_DFX (gr_printf(text_x,text_y+Line_spacing, temp_str)); - PA_DFX(pa_set_backbuffer_current()); - NO_DFX (gr_printf(text_x,text_y+Line_spacing, temp_str)); - PA_DFX (gr_printf(text_x,text_y+12, temp_str)); + gr_printf(text_x,text_y+Line_spacing, temp_str); if (Players[Player_num].flags & PLAYER_FLAGS_QUAD_LASERS) { strcpy(temp_str, TXT_QUAD); -// PA_DFX(pa_set_frontbuffer_current()); -// PA_DFX (gr_printf(text_x,text_y+2*Line_spacing, temp_str)); - PA_DFX(pa_set_backbuffer_current()); gr_printf(text_x,text_y+2*Line_spacing, temp_str); } @@ -2482,19 +2366,12 @@ void draw_ammo_info(int x,int y,int ammo_count,int primary) WIN(DDGRLOCK(dd_grd_curcanv)); { - - PA_DFX (pa_set_frontbuffer_current()); - gr_setcolor(BM_XRGB(0,0,0)); gr_rect(x,y,x+w,y+grd_curcanv->cv_font->ft_h); gr_set_fontcolor(gr_getcolor(20,0,0),-1 ); sprintf(str,"%03d",ammo_count); convert_1s(str); gr_printf(x,y,str); - - PA_DFX (pa_set_backbuffer_current()); - gr_rect(x,y,x+w,y+grd_curcanv->cv_font->ft_h); - gr_printf(x,y,str); } WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -2519,8 +2396,6 @@ WINDOS( gr_set_current_canvas(&VR_render_buffer[0]) ); - PA_DFX (pa_set_backbuffer_current()); - WIN(DDGRLOCK(dd_grd_curcanv)); gr_set_curfont( GAME_FONT ); @@ -2583,9 +2458,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); int boxofs = (Cockpit_mode==CM_STATUS_BAR)?SB_PRIMARY_BOX:COCKPIT_PRIMARY_BOX; Gr_scanline_darkening_level = fade_value; -// PA_DFX (pa_set_frontbuffer_current()); -// PA_DFX (gr_rect(gauge_boxes[boxofs+weapon_type].left,gauge_boxes[boxofs+weapon_type].top,gauge_boxes[boxofs+weapon_type].right,gauge_boxes[boxofs+weapon_type].bot)); - PA_DFX (pa_set_backbuffer_current()); gr_rect(gauge_boxes[boxofs+weapon_type].left,gauge_boxes[boxofs+weapon_type].top,gauge_boxes[boxofs+weapon_type].right,gauge_boxes[boxofs+weapon_type].bot); Gr_scanline_darkening_level = GR_FADE_LEVELS; @@ -2626,18 +2498,11 @@ void draw_static(int win) gr_set_current_canvas(&VR_render_buffer[0]) ); WIN(DDGRLOCK(dd_grd_curcanv)); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (pa_bypass_mode (0)); - PA_DFX (pa_clip_window (gauge_boxes[boxofs+win].left,gauge_boxes[boxofs+win].top, - gauge_boxes[boxofs+win].right,gauge_boxes[boxofs+win].bot)); for (x=gauge_boxes[boxofs+win].left;xbm_w) for (y=gauge_boxes[boxofs+win].top;ybm_h) gr_bitmap(x,y,bmp); - PA_DFX (pa_bypass_mode(1)); - PA_DFX (pa_clip_window (0,0,640,480)); - WIN(DDGRUNLOCK(dd_grd_curcanv)); WINDOS( @@ -2645,8 +2510,6 @@ void draw_static(int win) gr_set_current_canvas(get_current_game_screen()) ); -// PA_DFX (return); - WINDOS( copy_gauge_box(&gauge_boxes[boxofs+win],&dd_VR_render_buffer[0]), copy_gauge_box(&gauge_boxes[boxofs+win],&VR_render_buffer[0].cv_bitmap) @@ -2743,18 +2606,12 @@ void sb_draw_energy_bar(energy) gr_rect(SB_ENERGY_GAUGE_X, SB_ENERGY_GAUGE_Y, SB_ENERGY_GAUGE_X + SB_ENERGY_GAUGE_W - 1, SB_ENERGY_GAUGE_Y + erase_height - 1); } - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_ubitmapm( SB_ENERGY_GAUGE_X, SB_ENERGY_GAUGE_Y, &Canv_SBEnergyGauge->cv_bitmap)); - PA_DFX (pa_set_backbuffer_current()); //gr_ubitmapm( SB_ENERGY_GAUGE_X, SB_ENERGY_GAUGE_Y, &Canv_SBEnergyGauge->cv_bitmap ); //draw numbers sprintf(energy_str, "%d", energy); gr_get_string_size(energy_str, &w, &h, &aw ); gr_set_fontcolor(gr_getcolor(25,18,6),-1 ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(SB_ENERGY_GAUGE_X + ((SB_ENERGY_GAUGE_W - w)/2), SB_ENERGY_GAUGE_Y + SB_ENERGY_GAUGE_H - GAME_FONT->ft_h - (GAME_FONT->ft_h / 4), "%d", energy)); - PA_DFX (pa_set_backbuffer_current()); gr_printf(SB_ENERGY_GAUGE_X + ((SB_ENERGY_GAUGE_W - w)/2), SB_ENERGY_GAUGE_Y + SB_ENERGY_GAUGE_H - GAME_FONT->ft_h - (GAME_FONT->ft_h / 4), "%d", energy); WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -2780,10 +2637,7 @@ void sb_draw_afterburner() gr_rect(SB_AFTERBURNER_GAUGE_X, SB_AFTERBURNER_GAUGE_Y, SB_AFTERBURNER_GAUGE_X + SB_AFTERBURNER_GAUGE_W - 1, SB_AFTERBURNER_GAUGE_Y + erase_height - 1); } - PA_DFX (pa_set_frontbuffer_current()); //gr_ubitmapm( SB_AFTERBURNER_GAUGE_X, SB_AFTERBURNER_GAUGE_Y, &Canv_SBAfterburnerGauge->cv_bitmap ); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (gr_ubitmapm( SB_AFTERBURNER_GAUGE_X, SB_AFTERBURNER_GAUGE_Y, &Canv_SBAfterburnerGauge->cv_bitmap )); //draw legend if (Players[Player_num].flags & PLAYER_FLAGS_AFTERBURNER) @@ -2792,9 +2646,6 @@ void sb_draw_afterburner() gr_set_fontcolor(gr_getcolor(12,12,12),-1 ); gr_get_string_size(ab_str, &w, &h, &aw ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf(SB_AFTERBURNER_GAUGE_X + ((SB_AFTERBURNER_GAUGE_W - w)/2),SB_AFTERBURNER_GAUGE_Y+SB_AFTERBURNER_GAUGE_H-GAME_FONT->ft_h - (GAME_FONT->ft_h / 4),"AB")); - PA_DFX (pa_set_backbuffer_current()); gr_printf(SB_AFTERBURNER_GAUGE_X + ((SB_AFTERBURNER_GAUGE_W - w)/2),SB_AFTERBURNER_GAUGE_Y+SB_AFTERBURNER_GAUGE_H-GAME_FONT->ft_h - (GAME_FONT->ft_h / 4),"AB"); WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -2811,19 +2662,12 @@ void sb_draw_shield_num(int shield) // PIGGY_PAGE_IN(cockpit_bitmap[Cockpit_mode + (Current_display_mode ? (Num_cockpits/2) : 0)]); WIN(DDGRLOCK(dd_grd_curcanv)); -// PA_DFX (pa_set_back_to_read()); -// gr_setcolor(gr_gpixel(&grd_curcanv->cv_bitmap, SB_SHIELD_NUM_X - 1, SB_SHIELD_NUM_Y - 1)); -// PA_DFX (pa_set_front_to_read()); - PA_DFX (pa_set_frontbuffer_current()); +// gr_setcolor(gr_gpixel(&grd_curcanv->cv_bitmap, SB_SHIELD_NUM_X - 1, SB_SHIELD_NUM_Y - 1)); // gr_rect(SB_SHIELD_NUM_X, SB_SHIELD_NUM_Y, SB_SHIELD_NUM_X + (Current_display_mode ? 27 : 13), SB_SHIELD_NUM_Y + GAME_FONT->ft_h); gr_printf((shield>99)?SB_SHIELD_NUM_X:((shield>9)?SB_SHIELD_NUM_X+2:SB_SHIELD_NUM_X+4),SB_SHIELD_NUM_Y,"%d",shield); - PA_DFX (pa_set_backbuffer_current()); -// PA_DFX(gr_rect(SB_SHIELD_NUM_X, SB_SHIELD_NUM_Y, SB_SHIELD_NUM_X + (Current_display_mode ? 27 : 13), SB_SHIELD_NUM_Y + GAME_FONT->ft_h)); - PA_DFX (gr_printf((shield>99)?SB_SHIELD_NUM_X:((shield>9)?SB_SHIELD_NUM_X+2:SB_SHIELD_NUM_X+4),SB_SHIELD_NUM_Y,"%d",shield)); - WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -2837,10 +2681,7 @@ WINDOS( ); WIN(DDGRLOCK(dd_grd_curcanv)); PAGE_IN_GAUGE( GAUGE_SHIELDS+9-bm_num ); - PA_DFX (pa_set_frontbuffer_current()); gr_ubitmapm( SB_SHIELD_GAUGE_X, SB_SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_SHIELDS+9-bm_num) ] ); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (gr_ubitmapm( SB_SHIELD_GAUGE_X, SB_SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_SHIELDS+9-bm_num) ] )); WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -2855,7 +2696,6 @@ WINDOS( gr_set_current_canvas(get_current_game_screen()) ); WIN(DDGRLOCK(dd_grd_curcanv)); - PA_DFX (pa_set_frontbuffer_current()); bm = &GameBitmaps[ GET_GAUGE_INDEX((flags&PLAYER_FLAGS_BLUE_KEY)?SB_GAUGE_BLUE_KEY:SB_GAUGE_BLUE_KEY_OFF) ]; PAGE_IN_GAUGE( (flags&PLAYER_FLAGS_BLUE_KEY)?SB_GAUGE_BLUE_KEY:SB_GAUGE_BLUE_KEY_OFF ); gr_ubitmapm( SB_GAUGE_KEYS_X, SB_GAUGE_BLUE_KEY_Y, bm ); @@ -2865,18 +2705,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); bm = &GameBitmaps[ GET_GAUGE_INDEX((flags&PLAYER_FLAGS_RED_KEY)?SB_GAUGE_RED_KEY:SB_GAUGE_RED_KEY_OFF) ]; PAGE_IN_GAUGE( (flags&PLAYER_FLAGS_RED_KEY)?SB_GAUGE_RED_KEY:SB_GAUGE_RED_KEY_OFF ); gr_ubitmapm( SB_GAUGE_KEYS_X, SB_GAUGE_RED_KEY_Y, bm ); - #ifdef PA_3DFX_VOODOO - PA_DFX (pa_set_backbuffer_current()); - bm = &GameBitmaps[ GET_GAUGE_INDEX((flags&PLAYER_FLAGS_BLUE_KEY)?SB_GAUGE_BLUE_KEY:SB_GAUGE_BLUE_KEY_OFF) ]; - PAGE_IN_GAUGE( (flags&PLAYER_FLAGS_BLUE_KEY)?SB_GAUGE_BLUE_KEY:SB_GAUGE_BLUE_KEY_OFF ); - gr_ubitmapm( SB_GAUGE_KEYS_X, SB_GAUGE_BLUE_KEY_Y, bm ); - bm = &GameBitmaps[ GET_GAUGE_INDEX((flags&PLAYER_FLAGS_GOLD_KEY)?SB_GAUGE_GOLD_KEY:SB_GAUGE_GOLD_KEY_OFF) ]; - PAGE_IN_GAUGE( (flags&PLAYER_FLAGS_GOLD_KEY)?SB_GAUGE_GOLD_KEY:SB_GAUGE_GOLD_KEY_OFF ); - gr_ubitmapm( SB_GAUGE_KEYS_X, SB_GAUGE_GOLD_KEY_Y, bm ); - bm = &GameBitmaps[ GET_GAUGE_INDEX((flags&PLAYER_FLAGS_RED_KEY)?SB_GAUGE_RED_KEY:SB_GAUGE_RED_KEY_OFF) ]; - PAGE_IN_GAUGE( (flags&PLAYER_FLAGS_RED_KEY)?SB_GAUGE_RED_KEY:SB_GAUGE_RED_KEY_OFF ); - gr_ubitmapm( SB_GAUGE_KEYS_X, SB_GAUGE_RED_KEY_Y, bm ); - #endif WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -2896,15 +2724,9 @@ WIN(DDGRLOCK(dd_grd_curcanv)); if (Cockpit_mode == CM_STATUS_BAR) { PAGE_IN_GAUGE( GAUGE_INVULNERABLE+invulnerable_frame ); - PA_DFX (pa_set_frontbuffer_current()); gr_ubitmapm( SB_SHIELD_GAUGE_X, SB_SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_INVULNERABLE+invulnerable_frame) ] ); - PA_DFX (pa_set_backbuffer_current()); - PA_DFX (gr_ubitmapm( SB_SHIELD_GAUGE_X, SB_SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_INVULNERABLE+invulnerable_frame) ] )); } else { PAGE_IN_GAUGE( GAUGE_INVULNERABLE+invulnerable_frame ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_ubitmapm( SHIELD_GAUGE_X, SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_INVULNERABLE+invulnerable_frame)] )); - PA_DFX (pa_set_backbuffer_current()); gr_ubitmapm( SHIELD_GAUGE_X, SHIELD_GAUGE_Y, &GameBitmaps[GET_GAUGE_INDEX(GAUGE_INVULNERABLE+invulnerable_frame)] ); } @@ -3427,8 +3249,6 @@ void render_gauges() int shields = f2ir(Players[Player_num].shields); int cloak = ((Players[Player_num].flags&PLAYER_FLAGS_CLOAKED) != 0); - PA_DFX (pa_set_backbuffer_current()); - Assert(Cockpit_mode==CM_FULL_COCKPIT || Cockpit_mode==CM_STATUS_BAR); // check to see if our display mode has changed since last render time -- @@ -3712,62 +3532,10 @@ WINDOS( gr_set_current_canvas(&window_canv) ); - #if defined(MACINTOSH) && defined(POLY_ACC) - if ( PAEnabled ) - { - switch (Cockpit_mode) - { - // copy these vars so stereo code can get at them - // SW_drawn[win]=1; SW_x[win] = window_x; SW_y[win] = window_y; SW_w[win] = w; SW_h[win] = h; - case CM_FULL_SCREEN: - ; // do not switch contexts - pa_set_3d_window_offsets(window_x, window_y); - break; - case CM_FULL_COCKPIT: - case CM_STATUS_BAR: - if (win == 0) - { - pa_set_context(kSubViewZeroDrawContextID, NULL); - } - else - { - pa_set_context(kSubViewOneDrawContextID, NULL); - } - break; - default: - Int3(); // invalid cockpit mode - }; - } - #endif - WIN(DDGRLOCK(dd_grd_curcanv)); - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - if (Cockpit_mode != CM_FULL_SCREEN) - { - pa_render_start(); - } - } - #endif - #endif - render_frame(0, win+1); - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - if (Cockpit_mode != CM_FULL_SCREEN) - { - pa_render_end(); - } - } - #endif - #endif - WIN(DDGRUNLOCK(dd_grd_curcanv)); // HACK! If guided missile, wake up robots as necessary. @@ -3914,38 +3682,17 @@ WINDOS( } } else { - PA_DFX (goto skip_this_junk); WINDOS( dd_gr_set_current_canvas(get_current_game_screen()), gr_set_current_canvas(get_current_game_screen()) ); - #ifndef MACINTOSH WINDOS( copy_gauge_box(box,&dd_VR_render_buffer[0]), copy_gauge_box(box,&VR_render_buffer[0].cv_bitmap) ); - #else - if (Scanline_double) - copy_gauge_box_double(box,&VR_render_buffer[0].cv_bitmap); // pixel double the external view - else - // Only do this if we are not running under RAVE, otherwise we erase all of the rendering RAVE has done. - if (!PAEnabled) - { - copy_gauge_box(box,&VR_render_buffer[0].cv_bitmap); - } - #endif } - PA_DFX(skip_this_junk:) - - #if defined(MACINTOSH) && defined(POLY_ACC) - if ( PAEnabled ) - { - pa_set_context(kGamePlayDrawContextID, NULL); - } - #endif - //force redraw when done old_weapon[win][VR_current_page] = old_ammo_count[win][VR_current_page] = -1; diff --git a/main/hud.c b/main/hud.c index 42b8a2f4..86f40fa7 100644 --- a/main/hud.c +++ b/main/hud.c @@ -1,4 +1,4 @@ -/* $Id: hud.c,v 1.9 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: hud.c,v 1.10 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -52,7 +52,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "text.h" #include "laser.h" #include "args.h" -#include "pa_enabl.h" int hud_first = 0; int hud_last = 0; @@ -99,9 +98,6 @@ void clear_background_messages(void) gr_set_current_canvas(get_current_game_screen()) ); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (copy_background_rect(0, Last_msg_ycrd, grd_curcanv->cv_bitmap.bm_w, Last_msg_ycrd+Last_msg_height-1)); - PA_DFX (pa_set_backbuffer_current()); copy_background_rect(0, Last_msg_ycrd, grd_curcanv->cv_bitmap.bm_w, Last_msg_ycrd+Last_msg_height-1); WINDOS( @@ -251,9 +247,6 @@ void HUD_render_message_frame() } else { WIN(DDGRLOCK(dd_grd_curcanv)); gr_set_fontcolor( HUD_color, -1); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (gr_printf((grd_curcanv->cv_bitmap.bm_w-w)/2, ycrd, message )); - PA_DFX (pa_set_backbuffer_current()); gr_printf((grd_curcanv->cv_bitmap.bm_w-w)/2, ycrd, message ); strcpy(Displayed_background_message[VR_current_page], message); WIN(DDGRUNLOCK(dd_grd_curcanv)); @@ -299,9 +292,6 @@ void HUD_render_message_frame() gr_get_string_size(&HUD_messages[n][0], &w, &h, &aw ); gr_set_fontcolor( HUD_color, -1); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX(gr_string((grd_curcanv->cv_bitmap.bm_w-w)/2,y, &HUD_messages[n][0] )); - PA_DFX (pa_set_backbuffer_current()); gr_string((grd_curcanv->cv_bitmap.bm_w-w)/2,y, &HUD_messages[n][0] ); y += h+1; } @@ -440,9 +430,9 @@ void player_dead_message(void) x = (grd_curcanv->cv_w - w ) / 2; y = (grd_curcanv->cv_h - h ) / 2; - NO_DFX (Gr_scanline_darkening_level = 2*7); - NO_DFX (gr_setcolor( BM_XRGB(0,0,0) )); - NO_DFX (gr_rect( x, y, x+w, y+h )); + Gr_scanline_darkening_level = 2*7; + gr_setcolor( BM_XRGB(0,0,0) ); + gr_rect( x, y, x+w, y+h ); Gr_scanline_darkening_level = GR_FADE_LEVELS; gr_string(0x8000, (grd_curcanv->cv_h - grd_curcanv->cv_font->ft_h)/2 + h/8, TXT_GAME_OVER ); diff --git a/main/inferno.c b/main/inferno.c index d9c47af1..16406cad 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -1,4 +1,4 @@ -/* $Id: inferno.c,v 1.101 2005-03-20 12:53:33 btb Exp $ */ +/* $Id: inferno.c,v 1.102 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -46,7 +46,6 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR #include "pstypes.h" #include "strutil.h" #include "console.h" -#include "pa_enabl.h" //$$POLY_ACC #include "gr.h" #include "fix.h" #include "vecmat.h" @@ -106,11 +105,6 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR #include "../texmap/scanline.h" //for select_tmap -MM -#if defined(POLY_ACC) -#include "poly_acc.h" -extern int Current_display_mode; //$$ there's got to be a better way than hacking this. -#endif - #ifdef EDITOR #include "editor/editor.h" #include "editor/kdefs.h" @@ -458,11 +452,7 @@ int start_net_immediately = 0; //char *start_with_mission_name; //end this section addition -#if defined(POLY_ACC) -#define MENU_HIRES_MODE SM_640x480x15xPA -#else #define MENU_HIRES_MODE SM(640,480) -#endif // DESCENT II by Parallax Software // Descent Main @@ -684,11 +674,6 @@ int main(int argc, char *argv[]) do_joystick_init(); -#if defined(POLY_ACC) - Current_display_mode = -1; - game_init_render_buffers(SM_640x480x15xPA, 640, 480, VR_NONE, VRF_COMPATIBLE_MENUS+VRF_ALLOW_COCKPIT ); -#else - if (!VR_offscreen_buffer) //if hasn't been initialied (by headset init) set_display_mode(0); //..then set default display mode #endif @@ -769,11 +754,9 @@ int main(int argc, char *argv[]) grd_fades_disabled=1; //determine whether we're using high-res menus & movies -#if !defined(POLY_ACC) if (FindArg("-nohires") || FindArg("-nohighres") || (gr_check_mode(MENU_HIRES_MODE) != 0) || disable_high_res) MovieHires = MenuHires = MenuHiresAvailable = 0; else -#endif //NOTE LINK TO ABOVE! MenuHires = MenuHiresAvailable = 1; @@ -799,11 +782,7 @@ int main(int argc, char *argv[]) #if 0 con_printf(CON_VERBOSE, "Going into graphics mode...\n"); -#if defined(POLY_ACC) - gr_set_mode(SM_640x480x15xPA); -#else gr_set_mode(MovieHires?SM(640,480):SM(320,200)); -#endif #endif if ( FindArg( "-notitles" ) ) @@ -855,11 +834,7 @@ int main(int argc, char *argv[]) { char filename[FILENAME_LEN]; -#if defined(POLY_ACC) - gr_set_mode(SM_640x480x15xPA); -#else gr_set_mode(MenuHires?SM(640,480):SM(320,200)); -#endif #ifdef OGL set_screen_mode(SCREEN_MENU); #endif @@ -918,8 +893,6 @@ int main(int argc, char *argv[]) } - PA_DFX (pa_splash()); - con_printf( CON_DEBUG, "\nShowing loading screen..." ); { //grs_bitmap title_bm; @@ -934,11 +907,7 @@ int main(int argc, char *argv[]) if (! cfexist(filename)) strcpy(filename, "descentb.pcx"); // MAC SHAREWARE -#if defined(POLY_ACC) - gr_set_mode(SM_640x480x15xPA); -#else gr_set_mode(MenuHires?SM(640,480):SM(320,200)); -#endif #ifdef OGL set_screen_mode(SCREEN_MENU); #endif diff --git a/main/kconfig.c b/main/kconfig.c index b02ab777..9d35b81a 100644 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -1,4 +1,4 @@ -/* $Id: kconfig.c,v 1.38 2005-04-05 07:35:09 btb Exp $ */ +/* $Id: kconfig.c,v 1.39 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -23,7 +23,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: kconfig.c,v 1.38 2005-04-05 07:35:09 btb Exp $"; +static char rcsid[] = "$Id: kconfig.c,v 1.39 2005-07-30 01:50:17 chris Exp $"; #endif #ifdef WINDOWS @@ -36,7 +36,6 @@ static char rcsid[] = "$Id: kconfig.c,v 1.38 2005-04-05 07:35:09 btb Exp $"; #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "error.h" #include "pstypes.h" #include "gr.h" @@ -71,10 +70,6 @@ static char rcsid[] = "$Id: kconfig.c,v 1.38 2005-04-05 07:35:09 btb Exp $"; #include "tactile.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #include "collide.h" #ifdef USE_LINUX_JOY @@ -1362,7 +1357,7 @@ void kc_drawitem( kc_item *item, int is_current ) { int x, w, h, aw; char btext[16]; -// PA_DFX (pa_set_frontbuffer_current()); + WIN(DDGRLOCK(dd_grd_curcanv)); if (is_current) @@ -1446,7 +1441,6 @@ WIN(DDGRUNLOCK(dd_grd_curcanv)); x = LHX(item->w1+item->x)+((LHX(item->w2)-w)/2); gr_string( x, LHY(item->y), btext ); -// PA_DFX (pa_set_backbuffer_current()); WIN(DDGRUNLOCK(dd_grd_curcanv)); } @@ -1460,7 +1454,6 @@ void kc_drawquestion( kc_item *item ) int c, x, w, h, aw; WIN(DDGRLOCK(dd_grd_curcanv)); - // PA_DFX (pa_set_frontbuffer_current()); gr_get_string_size("?", &w, &h, &aw ); @@ -1478,7 +1471,6 @@ WIN(DDGRLOCK(dd_grd_curcanv)); x = LHX(item->w1+item->x)+((LHX(item->w2)-w)/2); gr_string( x, LHY(item->y), "?" ); -// PA_DFX (pa_set_backbuffer_current()); WIN(DDGRUNLOCK(dd_grd_curcanv)); gr_update(); } @@ -1938,11 +1930,7 @@ void kconfig(int n, char * title) WIN(mouse_set_mode(0)); WIN(dd_gr_set_current_canvas(NULL)); -#if defined(POLY_ACC) - save_bm = gr_create_bitmap2( grd_curcanv->cv_bitmap.bm_w, grd_curcanv->cv_bitmap.bm_h, grd_curcanv->cv_bitmap.bm_type, NULL ); -#else save_bm = gr_create_bitmap( grd_curcanv->cv_bitmap.bm_w, grd_curcanv->cv_bitmap.bm_h ); -#endif Assert( save_bm != NULL ); WIN(DDGRLOCK(dd_grd_curcanv)); diff --git a/main/kmatrix.c b/main/kmatrix.c index 50d7f746..320a97c1 100644 --- a/main/kmatrix.c +++ b/main/kmatrix.c @@ -1,4 +1,4 @@ -/* $Id: kmatrix.c,v 1.7 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: kmatrix.c,v 1.8 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -32,7 +32,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "error.h" #include "pstypes.h" #include "gr.h" @@ -59,10 +58,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "pcx.h" #include "network.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #define CENTERING_OFFSET(x) ((300 - (70 + (x)*25 ))/2) #define CENTERSCREEN (MenuHires?320:160) @@ -453,24 +448,11 @@ WINDOS( gr_set_current_canvas(NULL) ); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - -PA_DFX (pa_set_frontbuffer_current()); - WINDOS( dd_gr_blt_notrans(tempcanvas, 0,0,0,0, dd_grd_curcanv, 0,0,0,0), gr_bitmap (0,0,&tempcanvas->cv_bitmap) ); -PA_DFX (pa_set_backbuffer_current()); - -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - gr_palette_load(gr_palette); WINDOS( dd_gr_free_canvas(tempcanvas), @@ -536,24 +518,11 @@ WINDOS( gr_set_current_canvas(NULL) ); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif - -PA_DFX (pa_set_frontbuffer_current()); - WINDOS( dd_gr_blt_notrans(tempcanvas, 0,0,0,0, dd_grd_curcanv, 0,0,0,0), gr_bitmap (0,0,&tempcanvas->cv_bitmap) ); -PA_DFX (pa_set_backbuffer_current()); - -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - gr_palette_load(gr_palette); WINDOS( dd_gr_free_canvas(tempcanvas), diff --git a/main/menu.c b/main/menu.c index dab64a2d..abe03c27 100644 --- a/main/menu.c +++ b/main/menu.c @@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.41 2005-03-20 12:53:33 btb Exp $ */ +/* $Id: menu.c,v 1.42 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -29,8 +29,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pa_enabl.h" //$$POLY_ACC - #include "menu.h" #include "inferno.h" #include "game.h" @@ -94,10 +92,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "editor/editor.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - //char *menu_difficulty_text[] = { "Trainee", "Rookie", "Fighter", "Hotshot", "Insane" }; //char *menu_detail_text[] = { "Lowest", "Low", "Medium", "High", "Highest", "", "Custom..." }; @@ -599,27 +593,6 @@ void set_detail_level_parameters(int detail_level) Wall_detail = detail_level; Debris_amount = detail_level; SoundChannels = detail_level; - -#if defined(POLY_ACC) - - #ifdef MACINTOSH - if (detail_level < 2) - { - pa_set_filtering(0); - } - else if (detail_level < 4) - { - pa_set_filtering(1); - } - else if (detail_level == 4) - { - pa_set_filtering(2); - } - #else - pa_filter_mode = detail_level; - #endif -#endif - } } @@ -673,10 +646,6 @@ void do_detail_level_menu_custom_menuset(int nitems, newmenu_item * items, int * Wall_render_depth = items[3].value; Debris_amount = items[4].value; SoundChannels = items[5].value; -#if defined(POLY_ACC) - pa_filter_mode = items[6].value; -#endif - } void set_custom_detail_vars(void) @@ -705,9 +674,6 @@ void do_detail_level_menu_custom(void) int count; int s=0; newmenu_item m[DL_MAX]; - #if defined(POLY_ACC) - int filtering_id; - #endif do { count = 0; @@ -747,21 +713,6 @@ void do_detail_level_menu_custom(void) m[count].min_value = 0; m[count++].max_value = NDL-1; - #if defined(POLY_ACC) - MAC( if(PAEnabled){ ) - filtering_id = count; - m[count].type = NM_TYPE_SLIDER; - m[count].text= "FILTERING"; - m[count].value = pa_filter_mode; - m[count].min_value = 0; - #ifdef MACINTOSH - m[count++].max_value = 2; - #else - m[count++].max_value = NDL-1; - #endif - MAC(}) - #endif - m[count].type = NM_TYPE_TEXT; m[count++].text= TXT_LO_HI; @@ -771,11 +722,6 @@ void do_detail_level_menu_custom(void) } while (s > -1); set_custom_detail_vars(); - - #if defined(MACINTOSH) && defined(POLY_ACC) - if ( PAEnabled ) - pa_set_filtering( m[filtering_id].value ); - #endif } #ifndef MACINTOSH @@ -1441,57 +1387,15 @@ void do_options_menu() #endif m[ 4].type = NM_TYPE_TEXT; m[ 4].text=""; -#if defined(POLY_ACC) - #ifdef MACINTOSH - - if ( !PAEnabled ) - { - m[5].type = NM_TYPE_SLIDER; - m[5].text = TXT_BRIGHTNESS; - m[5].value = gr_palette_get_gamma(); - m[5].min_value = 0; - m[5].max_value = 8; - } - else - { - m[ 5].type = NM_TYPE_TEXT; m[ 5].text=""; - } - - #else - m[ 5].type = NM_TYPE_TEXT; m[ 5].text=""; - #endif -#else m[5].type = NM_TYPE_SLIDER; m[5].text = TXT_BRIGHTNESS; m[5].value = gr_palette_get_gamma(); m[5].min_value = 0; m[5].max_value = 16; // CCA too dim, was 8; -#endif -#ifdef PA_3DFX_VOODOO - m[ 6].type = NM_TYPE_TEXT; m[ 6].text=""; -#else m[ 6].type = NM_TYPE_MENU; m[ 6].text=TXT_DETAIL_LEVELS; -#endif - -#if defined(POLY_ACC) - m[ 7].type = NM_TYPE_TEXT; m[ 7].text=""; -#else - #ifdef MACINTOSH - if ( gConfigInfo.mChangeResolution && !PAEnabled ) - { - m[ 7].type = NM_TYPE_MENU; m[ 7].text="Screen resolution..."; - } - else // for when we are on a mac and no resolution switching allowed - { - m[ 7].type = NM_TYPE_TEXT; m[ 7].text=""; - } - #else // for PC's - m[ 7].type = NM_TYPE_MENU; m[ 7].text="Screen resolution..."; - #endif // end of #ifdef macintosh - -#endif + m[ 7].type = NM_TYPE_MENU; m[ 7].text="Screen resolution..."; m[ 8].type = NM_TYPE_TEXT; m[ 8].text=""; m[ 9].type = NM_TYPE_MENU; m[ 9].text="Primary autoselect ordering..."; @@ -1724,16 +1628,7 @@ extern int Automap_always_hires; void do_toggles_menu() { -#ifndef MACINTOSH -#if defined(POLY_ACC) - #define N_TOGGLE_ITEMS 6 // get rid of automap hi-res. -#else - #define N_TOGGLE_ITEMS 7 -#endif -#else - #define N_TOGGLE_ITEMS 7 -#endif - newmenu_item m[N_TOGGLE_ITEMS]; + newmenu_item m[7]; int i = 0; do { @@ -1754,23 +1649,9 @@ void do_toggles_menu() ADD_CHECK(3, "Headlight on when picked up", Headlight_active_default ); ADD_CHECK(4, "Show guided missile in main display", Guided_in_big_window ); ADD_CHECK(5, "Escort robot hot keys",EscortHotKeys); - #ifdef MACINTOSH - if ( !PAEnabled ) { - ADD_CHECK(6, "Pixel Double", Scanline_double); - } - #else -#if !defined(POLY_ACC) - ADD_CHECK(6, "Always show HighRes Automap", min(MenuHiresAvailable,Automap_always_hires)); -#endif - #endif //when adding more options, change N_TOGGLE_ITEMS above - #ifdef MACINTOSH - if ( PAEnabled ) // when doing RAVE, no pixel doubling - i = newmenu_do1( NULL, "Toggles", N_TOGGLE_ITEMS-1, m, NULL, i ); - else - #endif // note link to if - i = newmenu_do1( NULL, "Toggles", N_TOGGLE_ITEMS, m, NULL, i ); + i = newmenu_do1( NULL, "Toggles", N_TOGGLE_ITEMS, m, NULL, i ); Auto_leveling_on = m[0].value; Reticle_on = m[1].value; @@ -1780,18 +1661,10 @@ void do_toggles_menu() EscortHotKeys = m[5].value; - #ifdef MACINTOSH - if ( !PAEnabled ) - Scanline_double = m[6].value; - #else -#if !defined(POLY_ACC) - if (MenuHiresAvailable) - Automap_always_hires = m[6].value; - else if (m[6].value) - nm_messagebox(TXT_SORRY,1,"OK","High Resolution modes are\nnot available on this video card"); -#endif - #endif - + if (MenuHiresAvailable) + Automap_always_hires = m[6].value; + else if (m[6].value) + nm_messagebox(TXT_SORRY,1,"OK","High Resolution modes are\nnot available on this video card"); } while( i>-1 ); } diff --git a/main/movie.c b/main/movie.c index 97910a54..88096649 100644 --- a/main/movie.c +++ b/main/movie.c @@ -1,4 +1,4 @@ -/* $Id: movie.c,v 1.38 2005-02-25 03:35:42 btb Exp $ */ +/* $Id: movie.c,v 1.39 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -23,7 +23,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: movie.c,v 1.38 2005-02-25 03:35:42 btb Exp $"; +static char rcsid[] = "$Id: movie.c,v 1.39 2005-07-30 01:50:17 chris Exp $"; #endif #include @@ -323,20 +323,16 @@ int RunMovie(char *filename, int hires_flag, int must_have,int dx,int dy) gr_palette_load(gr_palette); #endif -#if !defined(POLY_ACC) MVE_sfCallbacks(MovieShowFrame); MVE_palCallbacks(MovieSetPalette); -#endif if (MVE_rmPrepMovie((void *)filehndl, dx, dy, track)) { Int3(); return MOVIE_NOT_PLAYED; } -#if !defined(POLY_ACC) MVE_sfCallbacks(MovieShowFrame); MVE_palCallbacks(MovieSetPalette); -#endif frame_num = 0; diff --git a/main/newmenu.c b/main/newmenu.c index 12d42cf0..6ba6a5a3 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -1,4 +1,4 @@ -/* $Id: newmenu.c,v 1.30 2005-01-25 21:20:29 schaffner Exp $ */ +/* $Id: newmenu.c,v 1.31 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -38,7 +38,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include -#include "pa_enabl.h" //$$POLY_ACC #include "error.h" #include "pstypes.h" #include "gr.h" @@ -79,10 +78,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "tactile.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #define MAXDISPLAYABLEITEMS 15 #define LHX(x) ((x)*(MenuHires?2:1)) @@ -198,14 +193,7 @@ void nm_draw_background1(char * filename) } WIN(DDGRLOCK(dd_grd_curcanv)); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(gr_palette, 0, 256, 0); -#endif show_fullscr(bmp); -#if defined(POLY_ACC) - pa_restore_clut(); -#endif WIN(DDGRUNLOCK(dd_grd_curcanv)); gr_free_bitmap(bmp); @@ -772,9 +760,6 @@ int newmenu_do4( char * title, char * subtitle, int nitems, newmenu_item * item, EventRecord event; // looking for disk inserted events for CD mounts #endif - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_front_to_read()); - WIN(if (!_AppActive) return -1); // Don't draw message if minimized! newmenu_hide_cursor(); @@ -1016,11 +1001,7 @@ RePaintNewmenu4: DisableForces(); #endif -#if defined(POLY_ACC) - bg.saved = gr_create_bitmap2( w, h, grd_curcanv->cv_bitmap.bm_type, NULL ); -#else bg.saved = gr_create_bitmap( w, h ); -#endif Assert( bg.saved != NULL ); WIN (DDGRLOCK(dd_grd_curcanv)); @@ -1041,11 +1022,7 @@ RePaintNewmenu4: } else { bg.saved = NULL; -#if defined(POLY_ACC) - bg.background = gr_create_bitmap2( w, h, grd_curcanv->cv_bitmap.bm_type, NULL ); -#else bg.background = gr_create_bitmap( w, h ); -#endif Assert( bg.background != NULL ); WIN (DDGRLOCK(dd_grd_curcanv)); @@ -1442,8 +1419,6 @@ RePaintNewmenu4: case KEY_PRINT_SCREEN: MAC(newmenu_hide_cursor()); save_screen_shot(0); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_front_to_read()); for (i=0;icv_bitmap; else #endif -#if defined(POLY_ACC) - bg.background = gr_create_bitmap2( w_w, w_h, grd_curcanv->cv_bitmap.bm_type, NULL ); -#else bg.background = gr_create_bitmap( w_w, w_h ); -#endif Assert( bg.background != NULL ); @@ -2324,8 +2295,6 @@ RePaintNewmenuFile: case KEY_PRINT_SCREEN: MAC(newmenu_hide_cursor()); save_screen_shot(0); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_front_to_read()); MAC(newmenu_show_cursor()); MAC(key_flush()); @@ -2765,8 +2734,6 @@ WIN(int win_redraw=0); keyd_repeat = 1; - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_front_to_read()); WIN(mouse_set_mode(0)); //disable centering mode // set_screen_mode(SCREEN_MENU); @@ -2822,11 +2789,7 @@ RePaintNewmenuListbox: else #endif //bg.background = gr_create_bitmap( width, (height + title_height) ); -#if defined(POLY_ACC) - bg.background = gr_create_bitmap2(total_width, total_height, grd_curcanv->cv_bitmap.bm_type, NULL); -#else bg.background = gr_create_bitmap(total_width,total_height); -#endif Assert( bg.background != NULL ); WIN (DDGRLOCK(dd_grd_curcanv)); @@ -2928,8 +2891,6 @@ RePaintNewmenuListbox: case KEY_PRINT_SCREEN: MAC(newmenu_hide_cursor()); save_screen_shot(0); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX (pa_set_front_to_read()); MAC(newmenu_show_cursor()); MAC(key_flush()); diff --git a/main/object.c b/main/object.c index e4fafa3c..0802e538 100644 --- a/main/object.c +++ b/main/object.c @@ -1,4 +1,4 @@ -/* $Id: object.c,v 1.16 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: object.c,v 1.17 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -54,7 +54,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "fireball.h" #include "laser.h" #include "error.h" -#include "pa_enabl.h" #include "ai.h" #include "hostage.h" #include "morph.h" @@ -310,10 +309,6 @@ void draw_object_tmap_rod(object *obj,bitmap_index bitmapi,int lighted) _3dfx_rendering_poly_obj = 1; #endif - #ifdef PA_3DFX_VOODOO - light = f1_0; - #endif - g3_draw_rod_tmap(bitmap,&bot_p,obj->size,&top_p,obj->size,light); #ifdef _3DFX diff --git a/main/playsave.c b/main/playsave.c index 529958e1..df026484 100644 --- a/main/playsave.c +++ b/main/playsave.c @@ -1,4 +1,4 @@ -/* $Id: playsave.c,v 1.23 2005-02-25 05:20:36 chris Exp $ */ +/* $Id: playsave.c,v 1.24 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -40,7 +40,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" -#include "pa_enabl.h" #include "strutil.h" #include "game.h" #include "gameseq.h" @@ -75,9 +74,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef ENOENT #define ENOENT fnfErr #endif - #ifdef POLY_ACC - #include "poly_acc.h" - #endif #include "isp.h" #elif defined(_WIN32_WCE) # define errno -1 @@ -274,21 +270,6 @@ RetrySelection: Netlife_kills=0; Netlife_killed=0; #endif - #ifdef MACINTOSH - #ifdef POLY_ACC - if (PAEnabled) - { - Scanline_double = 0; // no pixel doubling for poly_acc - } - else - { - Scanline_double = 1; // should be default for new player - } - #else - Scanline_double = 1; // should be default for new player - #endif - #endif - return 1; } @@ -382,21 +363,10 @@ int read_player_file() Default_leveling_on = cfile_read_byte(file); Reticle_on = cfile_read_byte(file); Cockpit_mode = cfile_read_byte(file); - #ifdef POLY_ACC - #ifdef PA_3DFX_VOODOO - if (Cockpit_mode<2) - { - Cockpit_mode=2; - Game_window_w = 640; - Game_window_h = 480; - } - #endif - #endif - - Default_display_mode = cfile_read_byte(file); - Missile_view_enabled = cfile_read_byte(file); - Headlight_active_default = cfile_read_byte(file); - Guided_in_big_window = cfile_read_byte(file); + Default_display_mode = cfile_read_byte(file); + Missile_view_enabled = cfile_read_byte(file); + Headlight_active_default = cfile_read_byte(file); + Guided_in_big_window = cfile_read_byte(file); if (player_file_version >= 19) Automap_always_hires = cfile_read_byte(file); diff --git a/main/polyobj.c b/main/polyobj.c index 06f1d6f9..ca5107b8 100644 --- a/main/polyobj.c +++ b/main/polyobj.c @@ -1,4 +1,4 @@ -/* $Id: polyobj.c,v 1.20 2004-11-27 12:28:10 btb Exp $ */ +/* $Id: polyobj.c,v 1.21 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -24,7 +24,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: polyobj.c,v 1.20 2004-11-27 12:28:10 btb Exp $"; +static char rcsid[] = "$Id: polyobj.c,v 1.21 2005-07-30 01:50:17 chris Exp $"; #endif #include @@ -57,8 +57,6 @@ static char rcsid[] = "$Id: polyobj.c,v 1.20 2004-11-27 12:28:10 btb Exp $"; #include "piggy.h" #endif -#include "pa_enabl.h" - #ifdef _3DFX #include "3dfx_des.h" #endif @@ -606,7 +604,6 @@ void draw_polygon_model(vms_vector *pos,vms_matrix *orient,vms_angvec *anim_angl { polymodel *po; int i; - PA_DFX (int save_light); Assert(model_num < N_polygon_models); @@ -674,8 +671,6 @@ void draw_polygon_model(vms_vector *pos,vms_matrix *orient,vms_angvec *anim_angl #ifdef _3DFX _3dfx_rendering_poly_obj = 1; #endif - PA_DFX(save_light = Lighting_on); - PA_DFX(Lighting_on = 0); if (flags == 0) //draw entire object @@ -707,10 +702,6 @@ void draw_polygon_model(vms_vector *pos,vms_matrix *orient,vms_angvec *anim_angl #ifdef _3DFX _3dfx_rendering_poly_obj = 0; #endif - - PA_DFX (Lighting_on = save_light); - - } void free_polygon_models() @@ -878,10 +869,7 @@ void draw_model_picture(int mn,vms_angvec *orient_angles) vm_angles_2_matrix(&temp_orient, orient_angles); - PA_DFX(save_light = Lighting_on); - PA_DFX(Lighting_on = 0); draw_polygon_model(&temp_pos,&temp_orient,NULL,mn,0,f1_0,NULL,NULL); - PA_DFX (Lighting_on = save_light); g3_end_frame(); diff --git a/main/render.c b/main/render.c index 5669cbde..df8d1f73 100644 --- a/main/render.c +++ b/main/render.c @@ -1,4 +1,4 @@ -/* $Id: render.c,v 1.23 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: render.c,v 1.24 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -26,7 +26,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pa_enabl.h" //$$POLY_ACC #include "inferno.h" #include "segment.h" #include "error.h" @@ -66,10 +65,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "editor/editor.h" #endif -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - //used for checking if points have been rotated int Clear_window_color=-1; int Clear_window=2; // 1 = Clear whole background window, 2 = clear view portals into rest of world, 0 = no clear @@ -1694,10 +1689,6 @@ void render_frame(fix eye_offset, int window_num) { int start_seg_num; -#if defined(POLY_ACC) -//$$ not needed for Verite, probably optional for ViRGE. pa_flush(); -#endif - //Total_num_tmaps_drawn += Num_tmaps_drawn; //if ((FrameCount > 0) && (Total_num_tmaps_drawn)) // mprintf((0, "Frame: %4i, total = %6i, Avg = %7.3f, Avgpix=%7.3f\n", Num_tmaps_drawn, Total_num_tmaps_drawn, (float) Total_num_tmaps_drawn/FrameCount, (float) Total_pixels/Total_num_tmaps_drawn)); diff --git a/main/state.c b/main/state.c index 34ebe9be..7ccb13f0 100644 --- a/main/state.c +++ b/main/state.c @@ -1,4 +1,4 @@ -/* $Id: state.c,v 1.24 2005-03-15 21:16:32 btb Exp $ */ +/* $Id: state.c,v 1.25 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -52,7 +52,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "pstypes.h" -#include "pa_enabl.h" //$$POLY_ACC #include "mono.h" #include "inferno.h" #include "segment.h" @@ -100,10 +99,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "multibot.h" #include "state.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef OGL #include "gr.h" #endif @@ -603,9 +598,6 @@ int state_save_all_sub(char *filename, char *desc, int between_levels) int i,j; PHYSFS_file *fp; grs_canvas * cnv; - #ifdef POLY_ACC - grs_canvas cnv2,*save_cnv2; - #endif ubyte *pal; Assert(between_levels == 0); //between levels save ripped out @@ -657,39 +649,11 @@ int state_save_all_sub(char *filename, char *desc, int between_levels) cnv_save = grd_curcanv; #endif - #ifndef MACINTOSH - - #if defined(POLY_ACC) - - PA_DFX (pa_fool_to_backbuffer()); - - //for poly_acc, we render the frame to the normal render buffer - //so that this doesn't show, we create yet another canvas to save - //and restore what's on the render buffer - PA_DFX (pa_alpha_always()); - PA_DFX (pa_set_front_to_read()); - gr_init_sub_canvas( &cnv2, &VR_render_buffer[0], 0, 0, THUMBNAIL_W, THUMBNAIL_H ); - save_cnv2 = gr_create_canvas2(THUMBNAIL_W, THUMBNAIL_H, cnv2.cv_bitmap.bm_type); - gr_set_current_canvas( save_cnv2 ); - PA_DFX (pa_set_front_to_read()); - gr_bitmap(0,0,&cnv2.cv_bitmap); - gr_set_current_canvas( &cnv2 ); - #else - gr_set_current_canvas( cnv ); - #endif - - PA_DFX (pa_set_backbuffer_current()); - render_frame(0, 0); - PA_DFX (pa_alpha_always()); - -#if defined(POLY_ACC) - #ifndef MACINTOSH - screen_shot_pa(cnv,&cnv2); - #else - if ( PAEnabled ) - screen_shot_pa(cnv,&cnv2); - #endif -#elif defined(OGL) + gr_set_current_canvas( cnv ); + + render_frame(0, 0); + +#if defined(OGL) # if 1 buf = d_malloc(THUMBNAIL_W * THUMBNAIL_H * 3); glReadBuffer(GL_FRONT); @@ -711,35 +675,6 @@ int state_save_all_sub(char *filename, char *desc, int between_levels) PHYSFS_write(fp, cnv->cv_bitmap.bm_data, THUMBNAIL_W * THUMBNAIL_H, 1); - #if defined(POLY_ACC) - PA_DFX (pa_alpha_always()); - PA_DFX (pa_set_frontbuffer_current()); - PA_DFX(gr_bitmap(0,0,&save_cnv2->cv_bitmap)); - PA_DFX (pa_set_backbuffer_current()); - gr_bitmap(0,0,&save_cnv2->cv_bitmap); - gr_free_canvas(save_cnv2); - PA_DFX (pa_fool_to_offscreen()); - - #endif - - #else // macintosh stuff below - { - #if defined(POLY_ACC) - int savePAEnabled = PAEnabled; - PAEnabled = false; - #endif - - gr_set_current_canvas( cnv ); - render_frame(0, 0); - pal = gr_palette; - PHYSFS_write(fp, cnv->cv_bitmap.bm_data, THUMBNAIL_W * THUMBNAIL_H, 1); - - #if defined(POLY_ACC) - PAEnabled = savePAEnabled; - #endif - } - #endif // end of ifndef macintosh - WINDOS( dd_gr_set_current_canvas(cnv_save), @@ -1582,68 +1517,3 @@ mprintf((0, "Restoring multigame from [%s]\n", filename)); return (state_game_id); } - -#if defined(POLY_ACC) -//void screen_shot_pa(ubyte *dst,ushort *src) -//{ -// //ushort *src = pa_get_buffer_address(0), -// ushort *s; -// fix u, v, du, dv; -// int ui, w, h; -// -// pa_flush(); -// -// du = (640.0 / (float)THUMBNAIL_W) * 65536.0; -// dv = (480.0 / (float)THUMBNAIL_H) * 65536.0; -// -// for(v = h = 0; h != THUMBNAIL_H; ++h) -// { -// s = src + f2i(v) * 640; -// v += dv; -// for(u = w = 0; w != THUMBNAIL_W; ++w) -// { -// ui = f2i(u); -// *dst++ = gr_find_closest_color((s[ui] >> 9) & 0x3e, (s[ui] >> 4) & 0x3e, (s[ui] << 1) & 0x3e); -// u += du; -// } -// } -//} - -void screen_shot_pa(grs_canvas *dcanv,grs_canvas *scanv) -{ -#if !defined(MACINTOSH) - ubyte *dst; - ushort *src; - int x,y; - - Assert(scanv->cv_w == dcanv->cv_w && scanv->cv_h == dcanv->cv_h); - - pa_flush(); - - src = (ushort *) scanv->cv_bitmap.bm_data; - dst = dcanv->cv_bitmap.bm_data; - - #ifdef PA_3DFX_VOODOO - src=(ushort *)pa_set_back_to_read(); - #endif - - for (y=0; ycv_h; y++) { - for (x=0; xcv_w; x++) { - #ifdef PA_3DFX_VOODOO - *dst++ = gr_find_closest_color((*src >> 10) & 0x3e, (*src >> 5) & 0x3f, (*src << 1) & 0x3e); - #else - *dst++ = gr_find_closest_color((*src >> 9) & 0x3e, (*src >> 4) & 0x3e, (*src << 1) & 0x3e); - #endif - - src++; - } - src = (ushort *) (((ubyte *) src) + (scanv->cv_bitmap.bm_rowsize - (scanv->cv_bitmap.bm_w*PA_BPP))); - dst += dcanv->cv_bitmap.bm_rowsize - dcanv->cv_bitmap.bm_w; - } - #ifdef PA_3DFX_VOODOO - pa_set_front_to_read(); - #endif -#endif -} -#endif - diff --git a/main/texmerge.c b/main/texmerge.c index 11dd8b1f..0e7c0e19 100644 --- a/main/texmerge.c +++ b/main/texmerge.c @@ -1,4 +1,4 @@ -/* $Id: texmerge.c,v 1.4 2004-08-28 23:17:45 schaffner Exp $ */ +/* $Id: texmerge.c,v 1.5 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -24,7 +24,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include -#include "pa_enabl.h" //$$POLY_ACC #include "gr.h" #include "error.h" #include "game.h" @@ -33,10 +32,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "rle.h" #include "piggy.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - #ifdef OGL #include "ogl_init.h" #define MAX_NUM_CACHE_BITMAPS 200 @@ -67,36 +62,6 @@ void merge_textures_super_xparent(int type, grs_bitmap *bottom_bmp, grs_bitmap * void merge_textures_new(int type, grs_bitmap *bottom_bmp, grs_bitmap *top_bmp, ubyte *dest_data); -#if defined(POLY_ACC) // useful to all of D2 I think. -extern grs_bitmap * rle_get_id_sub( grs_bitmap * bmp ); - -//---------------------------------------------------------------------- -// Given pointer to a bitmap returns a unique value that describes the bitmap. -// Returns 0xFFFFFFFF if this bitmap isn't a texmerge'd bitmap. -uint texmerge_get_unique_id( grs_bitmap * bmp ) -{ - int i,n; - uint tmp; - grs_bitmap * tmpbmp; - // Check in texmerge cache - for (i=0; i -1) && (Cache[i].bitmap == bmp) ) { - tmp = (uint)Cache[i].orient<<30; - tmp |= ((uint)(Cache[i].top_bmp - GameBitmaps))<<16; - tmp |= (uint)(Cache[i].bottom_bmp - GameBitmaps); - return tmp; - } - } - // Check in rle cache - tmpbmp = rle_get_id_sub( bmp ); - if ( tmpbmp ) { - return (uint)(tmpbmp-GameBitmaps); - } - // Must be a normal bitmap - return (uint)(bmp-GameBitmaps); -} -#endif - //---------------------------------------------------------------------- int texmerge_init(int num_cached_textures) diff --git a/main/titles.c b/main/titles.c index 7c5f9eb8..199a7c45 100644 --- a/main/titles.c +++ b/main/titles.c @@ -1,4 +1,4 @@ -/* $Id: titles.c,v 1.36 2005-02-25 09:53:17 chris Exp $ */ +/* $Id: titles.c,v 1.37 2005-07-30 01:50:17 chris Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -34,7 +34,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#include "pa_enabl.h" //$$POLY_ACC #include "pstypes.h" #include "timer.h" #include "key.h" @@ -64,10 +63,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "menu.h" #include "mouse.h" -#if defined(POLY_ACC) -#include "poly_acc.h" -#endif - void DoBriefingColorStuff (); int get_new_message_num(char **message); @@ -125,12 +120,6 @@ int local_key_inkey(void) rval = key_inkey(); if (rval == KEY_PRINT_SCREEN) { - #ifdef POLY_ACC - if (RobotPlaying) { - gr_palette_read(gr_palette); - gr_copy_palette(gr_palette,gr_palette,0); //reset color lookup cache - } - #endif save_screen_shot(0); return 0; //say no key pressed } @@ -203,11 +192,6 @@ int show_title_screen( char * filename, int allow_keys, int from_hog_only ) memcpy(palette_save,gr_palette,sizeof(palette_save)); -#if defined(POLY_ACC) - pa_save_clut(); - pa_update_clut(New_pal, 0, 256, 0); -#endif - //vfx_set_palette_sub( New_pal ); #ifdef OGL gr_palette_load( New_pal ); @@ -225,10 +209,6 @@ int show_title_screen( char * filename, int allow_keys, int from_hog_only ) WIN(DDGRRESTORE); -#if defined(POLY_ACC) - pa_restore_clut(); -#endif - if (gr_palette_fade_in( New_pal, 32, allow_keys )) return 1; gr_copy_palette(gr_palette, New_pal, sizeof(gr_palette)); -- 2.39.2