From 442b6b52ea287efbd8e12b8b73327558fee58f34 Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Sun, 4 Nov 2001 17:32:36 +0000 Subject: [PATCH] Disable the menus for the Alien demo. --- Makefile | 2 +- README | 6 +-- src/avp/win95/progress_bar.cpp | 4 +- src/main.c | 17 +++--- src/opengl.c | 95 ---------------------------------- 5 files changed, 14 insertions(+), 110 deletions(-) diff --git a/Makefile b/Makefile index 409f9d5..0a853d3 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ tester: echo $(OBJ) clean: - -rm -rf depend $(OBJ) + -rm -rf depend $(OBJ) AvP distclean: clean -rm -rf `find . -name "*~"` diff --git a/README b/README index 5f90570..2e880f3 100644 --- a/README +++ b/README @@ -40,9 +40,9 @@ If you are really itching to try this out, either install the Gold Ed. in windows/vmware (read below to find out why), or download the AvP Alien demo. If you are wanting to run the Alien demo (the installer is an .exe but you can just use unzip to extract the files from the .exe), add -DALIEN_DEMO to -CFLAGS (the one that's uncommented). Rename all game files lowercase. -Be sure to install nasm (0.98) and the latest OpenAL (http://www.openal.org) -CVS. +the CFLAGS line (the one that's uncommented) in the Makefile. Rename all game +files lowercase. Be sure to install SDL 1.2 (http://www.libsdl.org), nasm +0.98, and the latest OpenAL CVS (http://www.openal.org). If you have the regular edition, add -DREGULAR_EDITION to CFLAGS. diff --git a/src/avp/win95/progress_bar.cpp b/src/avp/win95/progress_bar.cpp index b775d14..7fa447c 100644 --- a/src/avp/win95/progress_bar.cpp +++ b/src/avp/win95/progress_bar.cpp @@ -174,9 +174,9 @@ void Start_Progress_Bar() FlushD3DZBuffer(); ThisFramesRenderingHasBegun(); - +#if !ALIEN_DEMO /* TODO: disabled for alien demo */ RenderBriefingText(ScreenDescriptorBlock.SDB_Height/2, ONE_FIXED); - +#endif ThisFramesRenderingHasFinished(); FlipBuffers(); diff --git a/src/main.c b/src/main.c index 30d6ce2..890e8f9 100644 --- a/src/main.c +++ b/src/main.c @@ -185,6 +185,7 @@ int SetOGLVideoMode(int Width, int Height) glLoadIdentity(); glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); @@ -196,6 +197,8 @@ int SetOGLVideoMode(int Width, int Height) glPolygonMode(GL_BACK, GL_FILL); glDisable(GL_CULL_FACE); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); ScreenDescriptorBlock.SDB_Width = Width; @@ -739,11 +742,6 @@ int main(int argc, char *argv[]) AvP.CurrentEnv = AvP.StartingEnv = 0; /* are these even used? */ -#if 0 -{ -// AvP.Network = I_Host; /* for exploring */ -} - #if ALIEN_DEMO AvP.PlayerType = I_Alien; SetLevelToLoad(AVP_ENVIRONMENT_INVASION_A); @@ -774,11 +772,12 @@ int main(int argc, char *argv[]) // SetLevelToLoad(AVP_ENVIRONMENT_E3DEMOSP); /* demo level */ #endif +#if !(ALIEN_DEMO|PREDATOR_DEMO|MARINE_DEMO) +while(AvP_MainMenus()) +#else + SetBriefingTextToBlank(); #endif - - - -while(AvP_MainMenus()) { +{ d3d_light_ctrl.ctrl = LCCM_NORMAL; d3d_overlay_ctrl.ctrl = OCCM_NORMAL; diff --git a/src/opengl.c b/src/opengl.c index 1448184..f7a1cf7 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -4864,98 +4864,3 @@ void D3D_DrawCable(VECTORCH *centrePtr, MATRIXCH *orientationPtr) glDepthMask(GL_TRUE); } - -#if 0 -/* ** menu-type stuff that should be moved later ** */ -#include "avp_menugfx.hpp" - -int Hardware_RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format) -{ - switch(format) - { - default: -// GLOBALASSERT("UNKNOWN TEXT FORMAT"==0); - case AVPMENUFORMAT_LEFTJUSTIFIED: - { - // supplied x is correct - break; - } - case AVPMENUFORMAT_RIGHTJUSTIFIED: - { - int length = 0; - char *ptr = textPtr; - - while(*ptr) - { - length+=AAFontWidths[*ptr++]; - } - - x -= length; - break; - } - case AVPMENUFORMAT_CENTREJUSTIFIED: - { - int length = 0; - char *ptr = textPtr; - - while(*ptr) - { - length+=AAFontWidths[*ptr++]; - } - - x -= length/2; - break; - } - } - -// LOCALASSERT(x>0); - - { - unsigned int colour = alpha>>8; - if (colour>255) colour = 255; - colour = (colour<<24)+0xffffff; - D3D_RenderHUDString(textPtr,x,y,colour); - } - return x; -} - -void RenderBriefingText(int centreY, int brightness) -{ - int lengthOfLongestLine=-1; - int x,y,i; - - for(i=0; i<5; i++) - { - int length = 0; - { - char *ptr = BriefingTextString[i]; - - while(*ptr) - { - length+=AAFontWidths[*ptr++]; - } - } - - if (lengthOfLongestLine < length) - { - lengthOfLongestLine = length; - } - } - - x = (ScreenDescriptorBlock.SDB_Width-lengthOfLongestLine)/2; - y = centreY - 3*HUD_FONT_HEIGHT; - for(i=0; i<5; i++) - { -// if (AvPMenus.MenusState != MENUSSTATE_MAINMENUS) - { - Hardware_RenderSmallMenuText(BriefingTextString[i], x, y, brightness, AVPMENUFORMAT_LEFTJUSTIFIED/*,MENU_CENTREY-60-100,MENU_CENTREY-60+180*/); -// } -// else -// { -// RenderSmallMenuText(BriefingTextString[i], x, y, brightness, AVPMENUFORMAT_LEFTJUSTIFIED); -// } - if (i) y+=HUD_FONT_HEIGHT; - else y+=HUD_FONT_HEIGHT*2; - } -} -#endif