mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Nun baut der Mist
This commit is contained in:
parent
6e446955f8
commit
b379ca57c7
16 changed files with 4176 additions and 30 deletions
20
Makefile
20
Makefile
|
@ -75,6 +75,7 @@ CFLAGS_DEDICATED_SERVER += -DDEDICATED_ONLY -Werror
|
|||
# OpenGL refresher
|
||||
CFLAGS_OPENGL = $(CFLAGS_BASE)
|
||||
CFLAGS_OPENGL += -I/usr/include -I/usr/local/include -I/usr/X11R6/include
|
||||
CFLAGS_OPENGL += -DOPENGL -fPIC
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -94,7 +95,7 @@ endif
|
|||
SDLLDFLAGS=$(shell sdl-config --libs)
|
||||
|
||||
# OpenGL
|
||||
OPENGLLDFLAGS = -lGL
|
||||
OPENGLLDFLAGS = -L/usr/lib -L/usr/local/lib -lGL -shared
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -131,7 +132,8 @@ dedicated_server:
|
|||
ref_gl :
|
||||
@-mkdir -p build \
|
||||
build/ref_gl \
|
||||
build/ref_gl_posix
|
||||
build/ref_gl_posix \
|
||||
release
|
||||
$(MAKE) release/ref_gl.so
|
||||
|
||||
clean:
|
||||
|
@ -262,8 +264,9 @@ OPENGL_OBJS = \
|
|||
|
||||
# OpenGL refresher POSIX platform object
|
||||
OPENGL_POSIX_OBJS = \
|
||||
build/ref_gl_posix/glx.o \
|
||||
build/ref_gl_posix/glob.o \
|
||||
build/ref_gl_posix/posix.o \
|
||||
build/ref_gl_posix/qgl.o \
|
||||
build/ref_gl_posix/refresh.o
|
||||
|
||||
# ----------
|
||||
|
@ -524,14 +527,17 @@ build/ref_gl/gl_warp.o: src/refresh/opengl/gl_warp.c
|
|||
# ----------
|
||||
|
||||
# OpenGL refresher POSIX build
|
||||
build/ref_gl_posix/glx.o: src/platform/posix/refresh/opengl/glx.c
|
||||
build/ref_gl_posix/glob.o: src/platforms/posix/glob/glob.c
|
||||
$(CC) $(CFLAGS_OPENGL) -o $@ -c $<
|
||||
|
||||
build/ref_gl_posix/posix.o: src/platform/posix/posix.c
|
||||
build/ref_gl_posix/posix.o: src/platforms/posix/posix.c
|
||||
$(CC) $(CFLAGS_OPENGL) -o $@ -c $<
|
||||
|
||||
build/ref_gl_posix/qgl.o: src/platforms/posix/refresh/opengl/qgl.c
|
||||
$(CC) $(CFLAGS_OPENGL) -o $@ -c $<
|
||||
|
||||
build/ref_gl_posix/refresh.o: src/platform/posix/sdl/refresh.c
|
||||
$(CC) $(CFLAGS_OPENGL) -o $@ -c $<
|
||||
build/ref_gl_posix/refresh.o: src/platforms/posix/sdl/refresh.c
|
||||
$(CC) $(CFLAGS_OPENGL) $(SDLCFLAGS) -o $@ -c $<
|
||||
|
||||
# ----------
|
||||
|
||||
|
|
39
src/platforms/posix/refresh/opengl/glwindow.h
Normal file
39
src/platforms/posix/refresh/opengl/glwindow.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
Copyright (C) 1997-2001 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#ifndef __linux__
|
||||
#ifndef __FreeBSD__
|
||||
#error You shouldnt be including this file on non-unix platforms
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __GLW_LINUX_H__
|
||||
#define __GLW_LINUX_H__
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *OpenGLLib; // instance of OpenGL library
|
||||
|
||||
FILE *log_fp;
|
||||
} glwstate_t;
|
||||
|
||||
extern glwstate_t glw_state;
|
||||
|
||||
#endif
|
|
@ -42,12 +42,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#ifdef Joystick
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include "../ref_gl/gl_local.h"
|
||||
#include "../../../../refresh/opengl/header/local.h"
|
||||
|
||||
#include "../client/keys.h"
|
||||
#include "../../../../client/input/keys.h"
|
||||
|
||||
#include "../linux/rw_linux.h"
|
||||
#include "../linux/glw_linux.h"
|
||||
#include "../../posix.h"
|
||||
#include "glwindow.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
|
14
src/platforms/posix/refresh/opengl/q2icon.xbm
Normal file
14
src/platforms/posix/refresh/opengl/q2icon.xbm
Normal file
|
@ -0,0 +1,14 @@
|
|||
#define q2icon_width 32
|
||||
#define q2icon_height 32
|
||||
static unsigned char q2icon_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x03, 0xc0, 0x00,
|
||||
0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x06,
|
||||
0x60, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x0c,
|
||||
0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x0c,
|
||||
0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x0c, 0x70, 0x00, 0x00, 0x0e,
|
||||
0x70, 0xf0, 0x0f, 0x0e, 0xe0, 0xe0, 0x07, 0x07, 0xe0, 0x61, 0x86, 0x07,
|
||||
0xc0, 0x63, 0xc6, 0x03, 0x80, 0x7f, 0xfe, 0x01, 0x00, 0xff, 0xff, 0x00,
|
||||
0x00, 0xfe, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0xe0, 0x07, 0x00,
|
||||
0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00,
|
||||
0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00,
|
||||
0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00 };
|
4087
src/platforms/posix/refresh/opengl/qgl.c
Normal file
4087
src/platforms/posix/refresh/opengl/qgl.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -26,14 +26,14 @@
|
|||
#endif
|
||||
|
||||
#ifdef OPENGL
|
||||
#include "../ref_gl/gl_local.h"
|
||||
#include "../linux/glw_linux.h"
|
||||
#include "../../../refresh/opengl/header/local.h"
|
||||
#include "../refresh/opengl/glwindow.h"
|
||||
#else
|
||||
#include "../ref_soft/r_local.h"
|
||||
#endif
|
||||
|
||||
#include "../client/keys.h"
|
||||
#include "rw_linux.h"
|
||||
#include "../../../client/input/keys.h"
|
||||
#include "../posix.h"
|
||||
|
||||
#ifdef Joystick
|
||||
#include "joystick.h"
|
||||
|
@ -474,7 +474,7 @@ int GLimp_Init( void *hInstance, void *wndProc )
|
|||
|
||||
static void SetSDLIcon()
|
||||
{
|
||||
#include "q2icon.xbm"
|
||||
#include "../refresh/opengl/q2icon.xbm"
|
||||
SDL_Surface *icon;
|
||||
SDL_Color color;
|
||||
Uint8 *ptr;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
// draw.c
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
image_t *draw_chars;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
image_t gltextures[MAX_GLTEXTURES];
|
||||
int numgltextures;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_light.c
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
int r_dlightframecount;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
/*
|
||||
=============================================================
|
||||
|
@ -34,7 +34,7 @@
|
|||
#define NUMVERTEXNORMALS 162
|
||||
|
||||
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
|
||||
#include "anorms.h"
|
||||
#include "constants/anorms.h"
|
||||
};
|
||||
|
||||
typedef float vec4_t[4];
|
||||
|
@ -48,7 +48,7 @@ float shadelight[3];
|
|||
// precalculated dot products for quantized angles
|
||||
#define SHADEDOT_QUANT 16
|
||||
float r_avertexnormal_dots[SHADEDOT_QUANT][256] =
|
||||
#include "anormtab.h"
|
||||
#include "constants/anormtab.h"
|
||||
;
|
||||
|
||||
float *shadedots = r_avertexnormal_dots[0];
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// models.c -- model loading and caching
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
model_t *loadmodel;
|
||||
int modfilelen;
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
// r_main.c
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
void R_Clear (void);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_misc.c
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
/*
|
||||
==================
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// GL_RSURF.C: surface-related refresh code
|
||||
#include <assert.h>
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
static vec3_t modelorg; // relative to viewpoint
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// gl_warp.c -- sky and water polygons
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "header/local.h"
|
||||
|
||||
extern model_t *loadmodel;
|
||||
|
||||
|
@ -197,7 +197,7 @@ void GL_SubdivideSurface (msurface_t *fa)
|
|||
// speed up sin calculations - Ed
|
||||
float r_turbsin[] =
|
||||
{
|
||||
#include "warpsin.h"
|
||||
#include "constants/warpsin.h"
|
||||
};
|
||||
#define TURBSCALE (256.0 / (2 * M_PI))
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
char *strlwr (char *s);
|
||||
#endif
|
||||
|
||||
#include "../client/ref.h"
|
||||
#include "../../../client/header/ref.h"
|
||||
|
||||
#include "qgl.h"
|
||||
|
||||
|
@ -125,7 +125,7 @@ typedef enum
|
|||
rserr_unknown
|
||||
} rserr_t;
|
||||
|
||||
#include "gl_model.h"
|
||||
#include "model.h"
|
||||
|
||||
void GL_BeginRendering (int *x, int *y, int *width, int *height);
|
||||
void GL_EndRendering (void);
|
||||
|
|
Loading…
Reference in a new issue