some change for the xul-like menus
This commit is contained in:
parent
c627066936
commit
0cde8f5b85
4 changed files with 68 additions and 6 deletions
|
@ -560,7 +560,7 @@ void GL_Init (void)
|
||||||
Con_Printf ("%i texture units\n",supportedTmu);
|
Con_Printf ("%i texture units\n",supportedTmu);
|
||||||
|
|
||||||
//PENTA: enable mlook by default, people kept mailing me about how to do mlook
|
//PENTA: enable mlook by default, people kept mailing me about how to do mlook
|
||||||
Cbuf_AddText ("+mlook");
|
Cbuf_AddText ("+mlook\n");
|
||||||
|
|
||||||
glClearColor (0.5,0.5,0.5,0.5);
|
glClearColor (0.5,0.5,0.5,0.5);
|
||||||
glCullFace (GL_FRONT);
|
glCullFace (GL_FRONT);
|
||||||
|
|
44
gl_draw.c
44
gl_draw.c
|
@ -703,6 +703,50 @@ void Draw_TransPic (int x, int y, qpic_t *pic)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
Draw_PicFilled
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
void Draw_PicFilled (int x, int y, int xs, int ys, qpic_t *pic)
|
||||||
|
{
|
||||||
|
glpic_t *gl;
|
||||||
|
|
||||||
|
if (scrap_dirty)
|
||||||
|
Scrap_Upload ();
|
||||||
|
gl = (glpic_t *)pic->data;
|
||||||
|
glColor4f (1,1,1,1);
|
||||||
|
GL_Bind (gl->texnum);
|
||||||
|
glBegin (GL_QUADS);
|
||||||
|
glTexCoord2f (gl->sl, gl->tl);
|
||||||
|
glVertex2f (x, y);
|
||||||
|
glTexCoord2f (gl->sh, gl->tl);
|
||||||
|
glVertex2f (xs, y);
|
||||||
|
glTexCoord2f (gl->sh, gl->th);
|
||||||
|
glVertex2f (xs, ys);
|
||||||
|
glTexCoord2f (gl->sl, gl->th);
|
||||||
|
glVertex2f (x, ys);
|
||||||
|
glEnd ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
Draw_TransPicFilled
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
void Draw_TransPicFilled (int x, int y, int xs, int ys, qpic_t *pic)
|
||||||
|
{
|
||||||
|
if (x < 0 || (unsigned)(xs) > vid.width || y < 0 ||
|
||||||
|
(unsigned)(ys) > vid.height)
|
||||||
|
{
|
||||||
|
Sys_Error ("Draw_TransPic: bad coordinates (%d ,%d )\n", x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw_PicFilled (x, y, xs, ys, pic);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
Draw_TransPicTranslate
|
Draw_TransPicTranslate
|
||||||
|
|
3
host.c
3
host.c
|
@ -880,7 +880,6 @@ void Host_Init (quakeparms_t *parms)
|
||||||
W_LoadWadFile ("gfx.wad");
|
W_LoadWadFile ("gfx.wad");
|
||||||
Key_Init ();
|
Key_Init ();
|
||||||
Con_Init ();
|
Con_Init ();
|
||||||
M_Init ();
|
|
||||||
PR_Init ();
|
PR_Init ();
|
||||||
Mod_Init ();
|
Mod_Init ();
|
||||||
NET_Init ();
|
NET_Init ();
|
||||||
|
@ -906,6 +905,8 @@ void Host_Init (quakeparms_t *parms)
|
||||||
#endif
|
#endif
|
||||||
VID_Init (host_basepal);
|
VID_Init (host_basepal);
|
||||||
|
|
||||||
|
M_Init ();
|
||||||
|
|
||||||
Draw_Init ();
|
Draw_Init ();
|
||||||
SCR_Init ();
|
SCR_Init ();
|
||||||
R_Init ();
|
R_Init ();
|
||||||
|
|
|
@ -28,6 +28,9 @@ CC = /usr/bin/gcc
|
||||||
|
|
||||||
X11_LIBS = -L/usr/X11R6/lib -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm
|
X11_LIBS = -L/usr/X11R6/lib -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm
|
||||||
|
|
||||||
|
XML_CFLAGS = -I/usr/include/libxml2
|
||||||
|
XML_LIBS = -lxml2
|
||||||
|
|
||||||
# to enable OpenGL code in source
|
# to enable OpenGL code in source
|
||||||
OPENGL_CFLAGS = -D__glx__ -DGLQUAKE
|
OPENGL_CFLAGS = -D__glx__ -DGLQUAKE
|
||||||
OPENGL_LIBS = -lGL -lGLU
|
OPENGL_LIBS = -lGL -lGLU
|
||||||
|
@ -37,11 +40,11 @@ PNG_LIBS = -lpng -lz
|
||||||
#OPENAL_LIBS = -lopenal
|
#OPENAL_LIBS = -lopenal
|
||||||
#OPENAL_CFLAGS = -DOPENAL -I/usr/local/include/AL
|
#OPENAL_CFLAGS = -DOPENAL -I/usr/local/include/AL
|
||||||
|
|
||||||
BASE_CFLAGS = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR)
|
BASE_CFLAGS = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR) $(XML_CFLAGS)
|
||||||
RELEASE_CFLAGS = $(BASE_CFLAGS) -mpentiumpro -O6 -ffast-math -funroll-loops \
|
RELEASE_CFLAGS = $(BASE_CFLAGS) -mpentiumpro -O6 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations
|
-fomit-frame-pointer -fexpensive-optimizations
|
||||||
DEBUG_CFLAGS = $(BASE_CFLAGS) -g
|
DEBUG_CFLAGS = $(BASE_CFLAGS) -g
|
||||||
LDFLAGS = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS)
|
LDFLAGS = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS) $(XML_LIBS)
|
||||||
|
|
||||||
DO_GL_CC = $(CC) $(CFLAGS) -o $@ -c $<
|
DO_GL_CC = $(CC) $(CFLAGS) -o $@ -c $<
|
||||||
DO_GL_AS = $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
|
DO_GL_AS = $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
|
||||||
|
@ -95,12 +98,14 @@ GLQUAKE_OBJS= \
|
||||||
$(BUILDDIR)/glquake/gl_bumpparhelia.o \
|
$(BUILDDIR)/glquake/gl_bumpparhelia.o \
|
||||||
$(BUILDDIR)/glquake/gl_bumpradeon.o \
|
$(BUILDDIR)/glquake/gl_bumpradeon.o \
|
||||||
$(BUILDDIR)/glquake/gl_common.o \
|
$(BUILDDIR)/glquake/gl_common.o \
|
||||||
|
$(BUILDDIR)/glquake/gl_curves.o \
|
||||||
$(BUILDDIR)/glquake/gl_draw.o \
|
$(BUILDDIR)/glquake/gl_draw.o \
|
||||||
$(BUILDDIR)/glquake/gl_decals.o \
|
$(BUILDDIR)/glquake/gl_decals.o \
|
||||||
$(BUILDDIR)/glquake/gl_glare.o \
|
$(BUILDDIR)/glquake/gl_glare.o \
|
||||||
$(BUILDDIR)/glquake/gl_md3.o \
|
$(BUILDDIR)/glquake/gl_md3.o \
|
||||||
$(BUILDDIR)/glquake/gl_mesh.o \
|
$(BUILDDIR)/glquake/gl_mesh.o \
|
||||||
$(BUILDDIR)/glquake/gl_model.o \
|
$(BUILDDIR)/glquake/gl_model.o \
|
||||||
|
$(BUILDDIR)/glquake/gl_q3bsp.o \
|
||||||
$(BUILDDIR)/glquake/gl_refrag.o \
|
$(BUILDDIR)/glquake/gl_refrag.o \
|
||||||
$(BUILDDIR)/glquake/gl_rlight.o \
|
$(BUILDDIR)/glquake/gl_rlight.o \
|
||||||
$(BUILDDIR)/glquake/gl_rmain.o \
|
$(BUILDDIR)/glquake/gl_rmain.o \
|
||||||
|
@ -132,6 +137,7 @@ GLQUAKE_OBJS= \
|
||||||
$(BUILDDIR)/glquake/sv_main.o \
|
$(BUILDDIR)/glquake/sv_main.o \
|
||||||
$(BUILDDIR)/glquake/sv_phys.o \
|
$(BUILDDIR)/glquake/sv_phys.o \
|
||||||
$(BUILDDIR)/glquake/sv_move.o \
|
$(BUILDDIR)/glquake/sv_move.o \
|
||||||
|
$(BUILDDIR)/glquake/sv_q3support.o \
|
||||||
$(BUILDDIR)/glquake/sv_user.o \
|
$(BUILDDIR)/glquake/sv_user.o \
|
||||||
$(BUILDDIR)/glquake/zone.o \
|
$(BUILDDIR)/glquake/zone.o \
|
||||||
$(BUILDDIR)/glquake/view.o \
|
$(BUILDDIR)/glquake/view.o \
|
||||||
|
@ -145,7 +151,6 @@ GLQUAKE_OBJS= \
|
||||||
$(BUILDDIR)/glquake/snd_linux.o \
|
$(BUILDDIR)/glquake/snd_linux.o \
|
||||||
$(BUILDDIR)/glquake/gl_vidlinuxglx.o \
|
$(BUILDDIR)/glquake/gl_vidlinuxglx.o \
|
||||||
$(BUILDDIR)/glquake/math.o \
|
$(BUILDDIR)/glquake/math.o \
|
||||||
$(BUILDDIR)/glquake/worlda.o \
|
|
||||||
$(BUILDDIR)/glquake/snd_mixa.o \
|
$(BUILDDIR)/glquake/snd_mixa.o \
|
||||||
$(BUILDDIR)/glquake/sys_dosa.o \
|
$(BUILDDIR)/glquake/sys_dosa.o \
|
||||||
\
|
\
|
||||||
|
@ -180,6 +185,9 @@ $(BUILDDIR)/glquake/cmd.o : $(MOUNT_DIR)/cmd.c
|
||||||
$(BUILDDIR)/glquake/common.o : $(MOUNT_DIR)/common.c
|
$(BUILDDIR)/glquake/common.o : $(MOUNT_DIR)/common.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
$(BUILDDIR)/glquake/conproc.o : $(MOUNT_DIR)/conproc.c
|
||||||
|
$(DO_GL_CC)
|
||||||
|
|
||||||
$(BUILDDIR)/glquake/console.o : $(MOUNT_DIR)/console.c
|
$(BUILDDIR)/glquake/console.o : $(MOUNT_DIR)/console.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
@ -219,6 +227,9 @@ $(BUILDDIR)/glquake/gl_bumpradeon.o : $(MOUNT_DIR)/gl_bumpradeon.c
|
||||||
$(BUILDDIR)/glquake/gl_common.o : $(MOUNT_DIR)/gl_common.c
|
$(BUILDDIR)/glquake/gl_common.o : $(MOUNT_DIR)/gl_common.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
$(BUILDDIR)/glquake/gl_curves.o : $(MOUNT_DIR)/gl_curves.c
|
||||||
|
$(DO_GL_CC)
|
||||||
|
|
||||||
$(BUILDDIR)/glquake/gl_decals.o : $(MOUNT_DIR)/gl_decals.c
|
$(BUILDDIR)/glquake/gl_decals.o : $(MOUNT_DIR)/gl_decals.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
@ -234,6 +245,9 @@ $(BUILDDIR)/glquake/gl_md3.o : $(MOUNT_DIR)/gl_md3.c
|
||||||
$(BUILDDIR)/glquake/gl_model.o : $(MOUNT_DIR)/gl_model.c
|
$(BUILDDIR)/glquake/gl_model.o : $(MOUNT_DIR)/gl_model.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
$(BUILDDIR)/glquake/gl_q3bsp.o : $(MOUNT_DIR)/gl_q3bsp.c
|
||||||
|
$(DO_GL_CC)
|
||||||
|
|
||||||
$(BUILDDIR)/glquake/gl_refrag.o : $(MOUNT_DIR)/gl_refrag.c
|
$(BUILDDIR)/glquake/gl_refrag.o : $(MOUNT_DIR)/gl_refrag.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
@ -327,6 +341,9 @@ $(BUILDDIR)/glquake/sv_phys.o : $(MOUNT_DIR)/sv_phys.c
|
||||||
$(BUILDDIR)/glquake/sv_move.o : $(MOUNT_DIR)/sv_move.c
|
$(BUILDDIR)/glquake/sv_move.o : $(MOUNT_DIR)/sv_move.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
$(BUILDDIR)/glquake/sv_q3support.o : $(MOUNT_DIR)/sv_q3support.c
|
||||||
|
$(DO_GL_CC)
|
||||||
|
|
||||||
$(BUILDDIR)/glquake/sv_user.o : $(MOUNT_DIR)/sv_user.c
|
$(BUILDDIR)/glquake/sv_user.o : $(MOUNT_DIR)/sv_user.c
|
||||||
$(DO_GL_CC)
|
$(DO_GL_CC)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue