Nun baut der Mist

This commit is contained in:
Yamagi Burmeister 2009-03-05 11:03:08 +00:00
parent 6e446955f8
commit b379ca57c7
16 changed files with 4176 additions and 30 deletions

View file

@ -75,6 +75,7 @@ CFLAGS_DEDICATED_SERVER += -DDEDICATED_ONLY -Werror
# OpenGL refresher # OpenGL refresher
CFLAGS_OPENGL = $(CFLAGS_BASE) CFLAGS_OPENGL = $(CFLAGS_BASE)
CFLAGS_OPENGL += -I/usr/include -I/usr/local/include -I/usr/X11R6/include 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) SDLLDFLAGS=$(shell sdl-config --libs)
# OpenGL # OpenGL
OPENGLLDFLAGS = -lGL OPENGLLDFLAGS = -L/usr/lib -L/usr/local/lib -lGL -shared
# ---------- # ----------
@ -131,7 +132,8 @@ dedicated_server:
ref_gl : ref_gl :
@-mkdir -p build \ @-mkdir -p build \
build/ref_gl \ build/ref_gl \
build/ref_gl_posix build/ref_gl_posix \
release
$(MAKE) release/ref_gl.so $(MAKE) release/ref_gl.so
clean: clean:
@ -262,8 +264,9 @@ OPENGL_OBJS = \
# OpenGL refresher POSIX platform object # OpenGL refresher POSIX platform object
OPENGL_POSIX_OBJS = \ 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/posix.o \
build/ref_gl_posix/qgl.o \
build/ref_gl_posix/refresh.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 # 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 $< $(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 $< $(CC) $(CFLAGS_OPENGL) -o $@ -c $<
build/ref_gl_posix/refresh.o: src/platform/posix/sdl/refresh.c build/ref_gl_posix/refresh.o: src/platforms/posix/sdl/refresh.c
$(CC) $(CFLAGS_OPENGL) -o $@ -c $< $(CC) $(CFLAGS_OPENGL) $(SDLCFLAGS) -o $@ -c $<
# ---------- # ----------

View 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

View file

@ -42,12 +42,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef Joystick #ifdef Joystick
#include <fcntl.h> #include <fcntl.h>
#endif #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 "../../posix.h"
#include "../linux/glw_linux.h" #include "glwindow.h"
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>

View 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 };

File diff suppressed because it is too large Load diff

View file

@ -26,14 +26,14 @@
#endif #endif
#ifdef OPENGL #ifdef OPENGL
#include "../ref_gl/gl_local.h" #include "../../../refresh/opengl/header/local.h"
#include "../linux/glw_linux.h" #include "../refresh/opengl/glwindow.h"
#else #else
#include "../ref_soft/r_local.h" #include "../ref_soft/r_local.h"
#endif #endif
#include "../client/keys.h" #include "../../../client/input/keys.h"
#include "rw_linux.h" #include "../posix.h"
#ifdef Joystick #ifdef Joystick
#include "joystick.h" #include "joystick.h"
@ -474,7 +474,7 @@ int GLimp_Init( void *hInstance, void *wndProc )
static void SetSDLIcon() static void SetSDLIcon()
{ {
#include "q2icon.xbm" #include "../refresh/opengl/q2icon.xbm"
SDL_Surface *icon; SDL_Surface *icon;
SDL_Color color; SDL_Color color;
Uint8 *ptr; Uint8 *ptr;

View file

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// draw.c // draw.c
#include "gl_local.h" #include "header/local.h"
image_t *draw_chars; image_t *draw_chars;

View file

@ -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]; image_t gltextures[MAX_GLTEXTURES];
int numgltextures; int numgltextures;

View file

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// r_light.c // r_light.c
#include "gl_local.h" #include "header/local.h"
int r_dlightframecount; int r_dlightframecount;

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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 #define NUMVERTEXNORMALS 162
float r_avertexnormals[NUMVERTEXNORMALS][3] = { float r_avertexnormals[NUMVERTEXNORMALS][3] = {
#include "anorms.h" #include "constants/anorms.h"
}; };
typedef float vec4_t[4]; typedef float vec4_t[4];
@ -48,7 +48,7 @@ float shadelight[3];
// precalculated dot products for quantized angles // precalculated dot products for quantized angles
#define SHADEDOT_QUANT 16 #define SHADEDOT_QUANT 16
float r_avertexnormal_dots[SHADEDOT_QUANT][256] = float r_avertexnormal_dots[SHADEDOT_QUANT][256] =
#include "anormtab.h" #include "constants/anormtab.h"
; ;
float *shadedots = r_avertexnormal_dots[0]; float *shadedots = r_avertexnormal_dots[0];

View file

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// models.c -- model loading and caching // models.c -- model loading and caching
#include "gl_local.h" #include "header/local.h"
model_t *loadmodel; model_t *loadmodel;
int modfilelen; int modfilelen;

View file

@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// r_main.c // r_main.c
#include "gl_local.h" #include "header/local.h"
void R_Clear (void); void R_Clear (void);

View file

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// r_misc.c // r_misc.c
#include "gl_local.h" #include "header/local.h"
/* /*
================== ==================

View file

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// GL_RSURF.C: surface-related refresh code // GL_RSURF.C: surface-related refresh code
#include <assert.h> #include <assert.h>
#include "gl_local.h" #include "header/local.h"
static vec3_t modelorg; // relative to viewpoint static vec3_t modelorg; // relative to viewpoint

View file

@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// gl_warp.c -- sky and water polygons // gl_warp.c -- sky and water polygons
#include "gl_local.h" #include "header/local.h"
extern model_t *loadmodel; extern model_t *loadmodel;
@ -197,7 +197,7 @@ void GL_SubdivideSurface (msurface_t *fa)
// speed up sin calculations - Ed // speed up sin calculations - Ed
float r_turbsin[] = float r_turbsin[] =
{ {
#include "warpsin.h" #include "constants/warpsin.h"
}; };
#define TURBSCALE (256.0 / (2 * M_PI)) #define TURBSCALE (256.0 / (2 * M_PI))

View file

@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
char *strlwr (char *s); char *strlwr (char *s);
#endif #endif
#include "../client/ref.h" #include "../../../client/header/ref.h"
#include "qgl.h" #include "qgl.h"
@ -125,7 +125,7 @@ typedef enum
rserr_unknown rserr_unknown
} rserr_t; } rserr_t;
#include "gl_model.h" #include "model.h"
void GL_BeginRendering (int *x, int *y, int *width, int *height); void GL_BeginRendering (int *x, int *y, int *width, int *height);
void GL_EndRendering (void); void GL_EndRendering (void);