Permalink
Browse files

Disable the menus for the Alien demo.

  • Loading branch information...
1 parent 7128a43 commit 489c080a1882d0d163b0ec89b1a7c190affab33e Steven Fuller committed Nov 4, 2001
Showing with 14 additions and 110 deletions.
  1. +1 −1 Makefile
  2. +3 −3 README
  3. +2 −2 src/avp/win95/progress_bar.cpp
  4. +8 −9 src/main.c
  5. +0 −95 src/opengl.c
View
2 Makefile
@@ -67,7 +67,7 @@ tester:
echo $(OBJ)
clean:
- -rm -rf depend $(OBJ)
+ -rm -rf depend $(OBJ) AvP
distclean: clean
-rm -rf `find . -name "*~"`
View
6 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.
View
4 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();
View
17 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;
View
95 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

0 comments on commit 489c080

Please sign in to comment.