From 6a1a0009108d9adc8aec0c7e78c1aaa53f01f0ec Mon Sep 17 00:00:00 2001 From: theoddone33 Date: Tue, 28 May 2002 17:03:29 +0000 Subject: [PATCH] fs2 gets to the main game loop now --- src/bmpman/bmpman.cpp | 10 +++++++++- src/graphics/grsoft.cpp | 13 +++++++++++++ src/sound/ds.cpp | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/bmpman/bmpman.cpp b/src/bmpman/bmpman.cpp index 847bd4a..5ae253b 100644 --- a/src/bmpman/bmpman.cpp +++ b/src/bmpman/bmpman.cpp @@ -7,6 +7,9 @@ * Code to load and manage all bitmaps for the game * * $Log$ + * Revision 1.4 2002/05/28 17:03:29 theoddone33 + * fs2 gets to the main game loop now + * * Revision 1.3 2002/05/28 08:52:03 relnev * implemented two assembly stubs. * @@ -2323,7 +2326,9 @@ void BM_SELECT_SCREEN_FORMAT() // setup pointers if(gr_screen.mode == GR_GLIDE){ +#ifndef PLAT_UNIX bm_set_components = bm_set_components_argb; +#endif } else if(gr_screen.mode == GR_DIRECT3D){ if(Bm_pixel_format == BM_PIXEL_FORMAT_D3D){ bm_set_components = bm_set_components_d3d; @@ -2346,6 +2351,7 @@ void BM_SELECT_SCREEN_FORMAT() void BM_SELECT_TEX_FORMAT() { +#ifndef PLAT_UNIX Gr_current_red = &Gr_t_red; Gr_current_green = &Gr_t_green; Gr_current_blue = &Gr_t_blue; @@ -2354,7 +2360,9 @@ void BM_SELECT_TEX_FORMAT() // setup pointers if(gr_screen.mode == GR_GLIDE){ bm_set_components = bm_set_components_argb; - } else if(gr_screen.mode == GR_DIRECT3D){ + } else +#endif + if(gr_screen.mode == GR_DIRECT3D){ if(Bm_pixel_format == BM_PIXEL_FORMAT_D3D){ bm_set_components = bm_set_components_d3d; } else { diff --git a/src/graphics/grsoft.cpp b/src/graphics/grsoft.cpp index 5360a8e..538e524 100644 --- a/src/graphics/grsoft.cpp +++ b/src/graphics/grsoft.cpp @@ -7,6 +7,9 @@ * Code for our software renderer using standard Win32 functions. (Dibsections, etc) * * $Log$ + * Revision 1.4 2002/05/28 17:03:29 theoddone33 + * fs2 gets to the main game loop now + * * Revision 1.3 2002/05/28 04:56:51 theoddone33 * runs a little bit now * @@ -470,6 +473,7 @@ void gr_buffer_create( int w, int h, int bpp ) DibInfo.Header.biHeight = h; DibInfo.Header.biPlanes = 1; DibInfo.Header.biClrUsed = 0; +#endif switch( bpp ) { case 8: @@ -488,6 +492,7 @@ void gr_buffer_create( int w, int h, int bpp ) Gr_blue.scale = 1; Gr_blue.mask = 0xff; +#ifndef PLAT_UNIX DibInfo.Header.biCompression = BI_RGB; DibInfo.Header.biBitCount = 8; for (i=0; i<256; i++ ) { @@ -497,6 +502,7 @@ void gr_buffer_create( int w, int h, int bpp ) DibInfo.Colors.aColors[i].rgbReserved = 0; } break; +#endif case 15: Gr_red.bits = 5; @@ -514,11 +520,13 @@ void gr_buffer_create( int w, int h, int bpp ) Gr_blue.scale = 8; Gr_blue.mask = 0x1F; +#ifndef PLAT_UNIX DibInfo.Header.biCompression = BI_BITFIELDS; DibInfo.Header.biBitCount = 16; DibInfo.Colors.hicolor_masks[0] = Gr_red.mask; DibInfo.Colors.hicolor_masks[1] = Gr_green.mask; DibInfo.Colors.hicolor_masks[2] = Gr_blue.mask; +#endif break; @@ -539,11 +547,13 @@ void gr_buffer_create( int w, int h, int bpp ) Gr_blue.scale = 8; Gr_blue.mask = 0x1F; +#ifndef PLAT_UNIX DibInfo.Header.biCompression = BI_BITFIELDS; DibInfo.Header.biBitCount = 16; DibInfo.Colors.hicolor_masks[0] = Gr_red.mask; DibInfo.Colors.hicolor_masks[1] = Gr_green.mask; DibInfo.Colors.hicolor_masks[2] = Gr_blue.mask; +#endif break; case 24: @@ -563,14 +573,17 @@ void gr_buffer_create( int w, int h, int bpp ) Gr_blue.scale = 1; Gr_blue.mask = 0xff; +#ifndef PLAT_UNIX DibInfo.Header.biCompression = BI_RGB; DibInfo.Header.biBitCount = unsigned short(bpp); +#endif break; default: Int3(); // Illegal bpp } +#ifndef PLAT_UNIX lpDibBits = NULL; hDibDC = CreateCompatibleDC(NULL); diff --git a/src/sound/ds.cpp b/src/sound/ds.cpp index e30b44d..0f190c4 100644 --- a/src/sound/ds.cpp +++ b/src/sound/ds.cpp @@ -7,6 +7,9 @@ * C file for interface to DirectSound * * $Log$ + * Revision 1.3 2002/05/28 17:03:29 theoddone33 + * fs2 gets to the main game loop now + * * Revision 1.2 2002/05/27 21:35:50 theoddone33 * Stub out dsound backend * @@ -564,6 +567,7 @@ int ds_parse_wave(char *filename, ubyte **dest, uint *dest_size, WAVEFORMATEX ** { #ifdef PLAT_UNIX STUB_FUNCTION; + return -1; #else CFILE *fp; PCMWAVEFORMAT PCM_header; -- 2.39.2