1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
--- NPRQuake-SDL/Makefile
+++ NPRQuake-SDL/Makefile
@@ -1,4 +1,4 @@
-RELEASE_CFLAGS=-Dstricmp=strcasecmp -mcpu=i586 -march=i586 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
+RELEASE_CFLAGS=-Dstricmp=strcasecmp $(OPTFLAGS) -DGENTOO_LIBDIR='\"$(GENTOO_LIBDIR)\"' -DGENTOO_DATADIR='\"$(GENTOO_DATADIR)\"'
DEBUG_CFLAGS=-Dstricmp=strcasecmp -g
--- NPRQuake-SDL/NPRQuakeSrc/Makefile
+++ NPRQuake-SDL/NPRQuakeSrc/Makefile
@@ -29,7 +29,7 @@
CC=gcc
-RELEASE_CFLAGS=$(BASE_CFLAGS) -mcpu=i586 -march=i586 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
+RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPTFLAGS) -DGENTOO_LIBDIR='\"$(GENTOO_LIBDIR)\"' -DGENTOO_DATADIR='\"$(GENTOO_DATADIR)\"'
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
LDFLAGS=-lm
CFLAGS=$(RELEASE_CFLAGS)
@@ -176,7 +176,7 @@
$(DO_GL_CC)
$(BUILDDIR)/glquake/common.o : common.c
- $(DO_GL_DEBUG_CC)
+ $(DO_GL_CC)
$(BUILDDIR)/glquake/console.o : console.c
$(DO_GL_CC)
--- NPRQuake-SDL/NPRQuakeSrc/common.c
+++ NPRQuake-SDL/NPRQuakeSrc/common.c
@@ -1775,11 +1775,16 @@
// start up with GAMENAME by default (id1)
//
COM_AddGameDirectory (va("%s/"GAMENAME, basedir) );
+ COM_AddGameDirectory (GENTOO_DATADIR"/"GAMENAME);
- if (COM_CheckParm ("-rogue"))
+ if (COM_CheckParm ("-rogue")) {
COM_AddGameDirectory (va("%s/rogue", basedir) );
- if (COM_CheckParm ("-hipnotic"))
+ COM_AddGameDirectory (GENTOO_DATADIR"/rogue");
+ }
+ if (COM_CheckParm ("-hipnotic")) {
COM_AddGameDirectory (va("%s/hipnotic", basedir) );
+ COM_AddGameDirectory (GENTOO_DATADIR"/hipnotic");
+ }
//
// -game <gamedir>
@@ -1790,6 +1795,7 @@
{
com_modified = true;
COM_AddGameDirectory (va("%s/%s", basedir, com_argv[i+1]));
+ COM_AddGameDirectory (va(GENTOO_DATADIR"/%s", com_argv[i+1]));
}
//
--- NPRQuake-SDL/NPRQuakeSrc/gl_rmisc.c
+++ NPRQuake-SDL/NPRQuakeSrc/gl_rmisc.c
@@ -563,13 +563,15 @@
// this should be as big as the number of functions we pull out.
void * tf[25];
+ char * libz0r[1024];
memset( tf, 0, sizeof( void * ) * 25 );
#ifdef _WIN32 //JG
hnewlib = LoadLibrary( lib );
#else
- hnewlib = dlopen( lib, RTLD_LAZY | RTLD_GLOBAL );
+ sprintf(libz0r, GENTOO_LIBDIR "/%s", lib);
+ hnewlib = dlopen( libz0r, RTLD_LAZY | RTLD_GLOBAL );
#endif
if( hnewlib == NULL ) {
--- NPRQuake-SDL/NPRQuakeSrc/sys_linux.c
+++ NPRQuake-SDL/NPRQuakeSrc/sys_linux.c
@@ -86,7 +86,7 @@
void Sys_Printf (char *fmt, ...)
{
va_list argptr;
- char text[2048];
+ char text[4096];
unsigned char *p;
va_start (argptr,fmt);
|