Disable the menus for the Alien demo.
This commit is contained in:
parent
b66cdf804f
commit
442b6b52ea
5 changed files with 14 additions and 110 deletions
2
Makefile
2
Makefile
|
@ -67,7 +67,7 @@ tester:
|
||||||
echo $(OBJ)
|
echo $(OBJ)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -rf depend $(OBJ)
|
-rm -rf depend $(OBJ) AvP
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
-rm -rf `find . -name "*~"`
|
-rm -rf `find . -name "*~"`
|
||||||
|
|
6
README
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.
|
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
|
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
|
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.
|
the CFLAGS line (the one that's uncommented) in the Makefile. Rename all game
|
||||||
Be sure to install nasm (0.98) and the latest OpenAL (http://www.openal.org)
|
files lowercase. Be sure to install SDL 1.2 (http://www.libsdl.org), nasm
|
||||||
CVS.
|
0.98, and the latest OpenAL CVS (http://www.openal.org).
|
||||||
|
|
||||||
If you have the regular edition, add -DREGULAR_EDITION to CFLAGS.
|
If you have the regular edition, add -DREGULAR_EDITION to CFLAGS.
|
||||||
|
|
||||||
|
|
|
@ -174,9 +174,9 @@ void Start_Progress_Bar()
|
||||||
FlushD3DZBuffer();
|
FlushD3DZBuffer();
|
||||||
|
|
||||||
ThisFramesRenderingHasBegun();
|
ThisFramesRenderingHasBegun();
|
||||||
|
#if !ALIEN_DEMO /* TODO: disabled for alien demo */
|
||||||
RenderBriefingText(ScreenDescriptorBlock.SDB_Height/2, ONE_FIXED);
|
RenderBriefingText(ScreenDescriptorBlock.SDB_Height/2, ONE_FIXED);
|
||||||
|
#endif
|
||||||
ThisFramesRenderingHasFinished();
|
ThisFramesRenderingHasFinished();
|
||||||
|
|
||||||
FlipBuffers();
|
FlipBuffers();
|
||||||
|
|
17
src/main.c
17
src/main.c
|
@ -185,6 +185,7 @@ int SetOGLVideoMode(int Width, int Height)
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
glBlendFunc(GL_ONE, GL_ONE);
|
||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
glDepthFunc(GL_LEQUAL);
|
glDepthFunc(GL_LEQUAL);
|
||||||
|
@ -196,6 +197,8 @@ int SetOGLVideoMode(int Width, int Height)
|
||||||
glPolygonMode(GL_BACK, GL_FILL);
|
glPolygonMode(GL_BACK, GL_FILL);
|
||||||
glDisable(GL_CULL_FACE);
|
glDisable(GL_CULL_FACE);
|
||||||
|
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||||
|
|
||||||
ScreenDescriptorBlock.SDB_Width = Width;
|
ScreenDescriptorBlock.SDB_Width = Width;
|
||||||
|
@ -739,11 +742,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
AvP.CurrentEnv = AvP.StartingEnv = 0; /* are these even used? */
|
AvP.CurrentEnv = AvP.StartingEnv = 0; /* are these even used? */
|
||||||
|
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
// AvP.Network = I_Host; /* for exploring */
|
|
||||||
}
|
|
||||||
|
|
||||||
#if ALIEN_DEMO
|
#if ALIEN_DEMO
|
||||||
AvP.PlayerType = I_Alien;
|
AvP.PlayerType = I_Alien;
|
||||||
SetLevelToLoad(AVP_ENVIRONMENT_INVASION_A);
|
SetLevelToLoad(AVP_ENVIRONMENT_INVASION_A);
|
||||||
|
@ -774,11 +772,12 @@ int main(int argc, char *argv[])
|
||||||
// SetLevelToLoad(AVP_ENVIRONMENT_E3DEMOSP); /* demo level */
|
// SetLevelToLoad(AVP_ENVIRONMENT_E3DEMOSP); /* demo level */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !(ALIEN_DEMO|PREDATOR_DEMO|MARINE_DEMO)
|
||||||
|
while(AvP_MainMenus())
|
||||||
|
#else
|
||||||
|
SetBriefingTextToBlank();
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
while(AvP_MainMenus()) {
|
|
||||||
|
|
||||||
d3d_light_ctrl.ctrl = LCCM_NORMAL;
|
d3d_light_ctrl.ctrl = LCCM_NORMAL;
|
||||||
d3d_overlay_ctrl.ctrl = OCCM_NORMAL;
|
d3d_overlay_ctrl.ctrl = OCCM_NORMAL;
|
||||||
|
|
95
src/opengl.c
95
src/opengl.c
|
@ -4864,98 +4864,3 @@ void D3D_DrawCable(VECTORCH *centrePtr, MATRIXCH *orientationPtr)
|
||||||
|
|
||||||
glDepthMask(GL_TRUE);
|
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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue