-
Notifications
You must be signed in to change notification settings - Fork 4
/
diff
1909 lines (1771 loc) · 68.9 KB
/
diff
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -u -r quake2-3.21.orig/client/cl_view.c quake2-3.21/client/cl_view.c
--- quake2-3.21.orig/client/cl_view.c 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/cl_view.c 2002-07-18 12:35:30.000000000 +0900
@@ -135,10 +135,18 @@
Com_Error (ERR_DROP, "Bad light style %i", style);
ls = &r_lightstyles[style];
+#if 1
+ /* on dc, this func crash at FPU exception.why? */
+ ls->white = 3;
+ ls->rgb[0] = 1;
+ ls->rgb[1] = 1;
+ ls->rgb[2] = 1;
+#else
ls->white = r+g+b;
ls->rgb[0] = r;
ls->rgb[1] = g;
ls->rgb[2] = b;
+#endif
}
/*
diff -u -r quake2-3.21.orig/client/console.c quake2-3.21/client/console.c
--- quake2-3.21.orig/client/console.c 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/console.c 2002-07-18 22:13:35.000000000 +0900
@@ -26,8 +26,10 @@
cvar_t *con_notifytime;
-#define MAXCMDLINE 256
-extern char key_lines[32][MAXCMDLINE];
+/* change keys.c too */
+#define MAXCMDLINE 128 /* 256 */
+#define MAXCMDLINES 16 /* 32 */
+extern char key_lines[MAXCMDLINES][MAXCMDLINE];
extern int edit_line;
extern int key_linepos;
diff -u -r quake2-3.21.orig/client/keys.c quake2-3.21/client/keys.c
--- quake2-3.21.orig/client/keys.c 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/keys.c 2002-07-18 22:02:58.000000000 +0900
@@ -26,8 +26,10 @@
*/
-#define MAXCMDLINE 256
-char key_lines[32][MAXCMDLINE];
+/* change console.c too */
+#define MAXCMDLINE 128 /* 256 */
+#define MAXCMDLINES 16 /* 32 */
+char key_lines[MAXCMDLINES][MAXCMDLINE];
int key_linepos;
int shift_down=false;
int anykeydown;
@@ -37,11 +39,11 @@
int key_waiting;
char *keybindings[256];
-qboolean consolekeys[256]; // if true, can't be rebound while in console
-qboolean menubound[256]; // if true, can't be rebound while in menu
+static char /*qboolean*/ consolekeys[256]; // if true, can't be rebound while in console
+static char /*qboolean*/ menubound[256]; // if true, can't be rebound while in menu
int keyshift[256]; // key to map to if shift held down in console
int key_repeats[256]; // if > 1, it is autorepeating
-qboolean keydown[256];
+char /* qboolean*/ keydown[256];
typedef struct
{
@@ -285,7 +287,7 @@
Cbuf_AddText ("\n");
Com_Printf ("%s\n",key_lines[edit_line]);
- edit_line = (edit_line + 1) & 31;
+ edit_line = (edit_line + 1) & (MAXCMDLINES-1);
history_line = edit_line;
key_lines[edit_line][0] = ']';
key_linepos = 1;
@@ -313,7 +315,7 @@
{
do
{
- history_line = (history_line - 1) & 31;
+ history_line = (history_line - 1) & (MAXCMDLINES-1);
} while (history_line != edit_line
&& !key_lines[history_line][1]);
if (history_line == edit_line)
@@ -329,7 +331,7 @@
if (history_line == edit_line) return;
do
{
- history_line = (history_line + 1) & 31;
+ history_line = (history_line + 1) & (MAXCMDLINES-1);
}
while (history_line != edit_line
&& !key_lines[history_line][1]);
@@ -646,7 +648,7 @@
{
int i;
- for (i=0 ; i<32 ; i++)
+ for (i=0 ; i<MAXCMDLINES ; i++)
{
key_lines[i][0] = ']';
key_lines[i][1] = 0;
diff -u -r quake2-3.21.orig/client/menu.c quake2-3.21/client/menu.c
--- quake2-3.21.orig/client/menu.c 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/menu.c 2002-07-22 11:19:56.000000000 +0900
@@ -2026,7 +2026,7 @@
=============================================================================
*/
-#define MAX_SAVEGAMES 15
+#define MAX_SAVEGAMES 10
static menuframework_s s_savegame_menu;
@@ -2034,7 +2034,10 @@
static menuaction_s s_loadgame_actions[MAX_SAVEGAMES];
char m_savestrings[MAX_SAVEGAMES][32];
-qboolean m_savevalid[MAX_SAVEGAMES];
+/*qboolean*/ char m_savevalid[MAX_SAVEGAMES];
+
+#ifdef DC
+#endif
void Create_Savestrings (void)
{
@@ -2042,9 +2045,12 @@
FILE *f;
char name[MAX_OSPATH];
+ int dir = opendir(FS_Savedir()); /* DC hack for directory cache */
+
+ /* */
for (i=0 ; i<MAX_SAVEGAMES ; i++)
{
- Com_sprintf (name, sizeof(name), "%s/save/save%i/server.ssv", FS_Gamedir(), i);
+ Com_sprintf (name, sizeof(name), "%s/s%i/serv.ssv", FS_Savedir(), i);
f = fopen (name, "rb");
if (!f)
{
@@ -2053,11 +2059,14 @@
}
else
{
+ fseek(f,16,SEEK_SET);
FS_Read (m_savestrings[i], sizeof(m_savestrings[i]), f);
fclose (f);
m_savevalid[i] = true;
}
}
+
+ if (dir) closedir(dir);
}
void LoadGameCallback( void *self )
@@ -2065,7 +2074,7 @@
menuaction_s *a = ( menuaction_s * ) self;
if ( m_savevalid[ a->generic.localdata[0] ] )
- Cbuf_AddText (va("load save%i\n", a->generic.localdata[0] ) );
+ Cbuf_AddText (va("load s%i\n", a->generic.localdata[0] ) );
M_ForceMenuOff ();
}
@@ -2136,7 +2145,7 @@
{
menuaction_s *a = ( menuaction_s * ) self;
- Cbuf_AddText (va("save save%i\n", a->generic.localdata[0] ));
+ Cbuf_AddText (va("save s%i\n", a->generic.localdata[0] ));
M_ForceMenuOff ();
}
diff -u -r quake2-3.21.orig/client/qmenu.c quake2-3.21/client/qmenu.c
--- quake2-3.21.orig/client/qmenu.c 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/qmenu.c 2002-07-18 22:01:41.000000000 +0900
@@ -133,7 +133,7 @@
qboolean Field_Key( menufield_s *f, int key )
{
- extern int keydown[];
+ extern /*int*/char keydown[];
switch ( key )
{
diff -u -r quake2-3.21.orig/client/ref.h quake2-3.21/client/ref.h
--- quake2-3.21.orig/client/ref.h 2001-12-23 01:32:20.000000000 +0900
+++ quake2-3.21/client/ref.h 2002-06-26 09:44:30.000000000 +0900
@@ -24,7 +24,7 @@
#define MAX_DLIGHTS 32
#define MAX_ENTITIES 128
-#define MAX_PARTICLES 4096
+#define MAX_PARTICLES 1024 //4096
#define MAX_LIGHTSTYLES 256
#define POWERSUIT_SCALE 4.0F
diff -u -r quake2-3.21.orig/ctf/g_save.c quake2-3.21/ctf/g_save.c
--- quake2-3.21.orig/ctf/g_save.c 2001-12-23 01:32:22.000000000 +0900
+++ quake2-3.21/ctf/g_save.c 2002-07-22 13:05:06.000000000 +0900
@@ -234,6 +234,15 @@
//ZOID
}
+#ifdef USE_ZLIB
+#include <zlib.h>
+#define fopen(name,mode) (FILE*)gzopen(name,mode)
+#define fwrite(ptr,size1,size2,f) gzwrite((gzFile)f,ptr,(size1)*(size2))
+#define fread(ptr,size1,size2,f) gzread((gzFile)f,ptr,(size1)*(size2))
+#define fclose(f) gzclose((gzFile)f)
+#define FS_Read(ptr,size,f) gzread((gzFile)f,ptr,size)
+#endif
+
//=========================================================
void WriteField1 (FILE *f, field_t *field, byte *base)
@@ -444,9 +453,13 @@
if (!autosave)
SaveClientData ();
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
f = fopen (filename, "wb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
memset (str, 0, sizeof(str));
strcpy (str, __DATE__);
@@ -470,9 +483,13 @@
gi.FreeTags (TAG_GAME);
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
f = fopen (filename, "rb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
fread (str, sizeof(str), 1, f);
if (strcmp (str, __DATE__))
@@ -610,9 +627,13 @@
FILE *f;
void *base;
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
f = fopen (filename, "wb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
// write out edict size for checking
i = sizeof(edict_t);
@@ -665,9 +686,13 @@
void *base;
edict_t *ent;
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
f = fopen (filename, "rb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
// free any dynamic memory allocated by loading the level
// base state
diff -u -r quake2-3.21.orig/ctf/q_shared.c quake2-3.21/ctf/q_shared.c
--- quake2-3.21.orig/ctf/q_shared.c 2001-12-23 01:32:22.000000000 +0900
+++ quake2-3.21/ctf/q_shared.c 2002-07-18 14:48:41.000000000 +0900
@@ -757,7 +757,7 @@
cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
}
-double sqrt(double x);
+// double sqrt(double x);
vec_t VectorLength(vec3_t v)
{
Only in quake2-3.21: dc
diff -u -r quake2-3.21.orig/game/g_save.c quake2-3.21/game/g_save.c
--- quake2-3.21.orig/game/g_save.c 2001-12-23 01:32:24.000000000 +0900
+++ quake2-3.21/game/g_save.c 2002-07-22 12:04:24.000000000 +0900
@@ -222,6 +222,21 @@
globals.num_edicts = game.maxclients+1;
}
+#ifdef DC
+#include "../dc/vmuheader.h"
+#include <fcntl.h>
+#endif
+
+#ifdef USE_ZLIB
+#include <zlib.h>
+#define fopen(name,mode) (FILE*)gzopen(name,mode)
+#define fdopen(fd,mode) (FILE*)gzdopen(fd,mode)
+#define fwrite(ptr,size1,size2,f) gzwrite((gzFile)f,ptr,(size1)*(size2))
+#define fread(ptr,size1,size2,f) gzread((gzFile)f,ptr,(size1)*(size2))
+#define fclose(f) gzclose((gzFile)f)
+#define FS_Read(ptr,size,f) gzread((gzFile)f,ptr,size)
+#endif
+
//=========================================================
void WriteField1 (FILE *f, field_t *field, byte *base)
@@ -467,10 +482,27 @@
if (!autosave)
SaveClientData ();
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
+
+#ifdef DC
+ { int fd;
+ fd = _open (filename, O_WRONLY);
+ if (fd==-1)
+ gi.error ("Couldn't open %s", filename);
+
+ memset(vmuheader.desc_dc,' ',32);
+ _write(fd,&vmuheader,sizeof(vmuheader));
+ f = fdopen(fd,"wb");
+ }
+#else
f = fopen (filename, "wb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
+#endif
memset (str, 0, sizeof(str));
strcpy (str, __DATE__);
fwrite (str, sizeof(str), 1, f);
@@ -493,10 +525,26 @@
gi.FreeTags (TAG_GAME);
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
+
+#ifdef DC
+ { int fd;
+ fd = _open (filename, O_RDONLY);
+ if (fd==-1)
+ gi.error ("Couldn't open %s", filename);
+
+ _lseek(fd,sizeof(vmuheader),SEEK_SET);
+ f = fdopen(fd,"wb");
+ }
+#else
f = fopen (filename, "rb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
+#endif
fread (str, sizeof(str), 1, f);
if (strcmp (str, __DATE__))
{
@@ -633,10 +681,28 @@
FILE *f;
void *base;
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
+
+#ifdef DC
+ { int fd;
+ fd = _open (filename, O_WRONLY);
+ if (fd==-1)
+ gi.error ("Couldn't open %s", filename);
+
+
+ memset(vmuheader.desc_dc,' ',32);
+ _write(fd,&vmuheader,sizeof(vmuheader));
+ f = fdopen(fd,"wb");
+ }
+#else
f = fopen (filename, "wb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
+#endif // USE_MERGESAVE
// write out edict size for checking
i = sizeof(edict_t);
fwrite (&i, sizeof(i), 1, f);
@@ -688,10 +754,26 @@
void *base;
edict_t *ent;
+#ifdef USE_MERGESAVE
+ f = (FILE*)filename;
+#else
+
+#ifdef DC
+ { int fd;
+ fd = _open (filename, O_RDONLY);
+ if (fd==-1)
+ gi.error ("Couldn't open %s", filename);
+
+ _lseek(fd,sizeof(vmuheader),SEEK_SET);
+ f = fdopen(fd,"rb");
+ }
+#else
f = fopen (filename, "rb");
if (!f)
gi.error ("Couldn't open %s", filename);
+#endif
+#endif
// free any dynamic memory allocated by loading the level
// base state
gi.FreeTags (TAG_LEVEL);
@@ -726,7 +808,7 @@
// load all the entities
while (1)
{
- if (fread (&entnum, sizeof(entnum), 1, f) != 1)
+ if (fread (&entnum, 1, sizeof(entnum), f) != sizeof(entnum))
{
fclose (f);
gi.error ("ReadLevel: failed to read entnum");
diff -u -r quake2-3.21.orig/game/q_shared.c quake2-3.21/game/q_shared.c
--- quake2-3.21.orig/game/q_shared.c 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/game/q_shared.c 2002-07-18 12:04:19.000000000 +0900
@@ -757,7 +757,7 @@
cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
}
-double sqrt(double x);
+// double sqrt(double x);
vec_t VectorLength(vec3_t v)
{
diff -u -r quake2-3.21.orig/game/q_shared.h quake2-3.21/game/q_shared.h
--- quake2-3.21.orig/game/q_shared.h 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/game/q_shared.h 2002-07-18 17:23:56.000000000 +0900
@@ -75,8 +75,8 @@
//
// per-level limits
//
-#define MAX_CLIENTS 256 // absolute limit
-#define MAX_EDICTS 1024 // must change protocol to increase more
+#define MAX_CLIENTS 64 /*256*/ // absolute limit
+#define MAX_EDICTS 512 /*1024*/ // must change protocol to increase more
#define MAX_LIGHTSTYLES 256
#define MAX_MODELS 256 // these are sent over the net as bytes
#define MAX_SOUNDS 256 // so they cannot be blindly increased
diff -u -r quake2-3.21.orig/qcommon/cmd.c quake2-3.21/qcommon/cmd.c
--- quake2-3.21.orig/qcommon/cmd.c 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/qcommon/cmd.c 2002-07-18 22:08:51.000000000 +0900
@@ -66,9 +66,9 @@
*/
sizebuf_t cmd_text;
-byte cmd_text_buf[8192];
+byte cmd_text_buf[4096/*8192*/];
-byte defer_text_buf[8192];
+byte defer_text_buf[4096/*8192*/];
/*
============
diff -u -r quake2-3.21.orig/qcommon/cmodel.c quake2-3.21/qcommon/cmodel.c
--- quake2-3.21.orig/qcommon/cmodel.c 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/qcommon/cmodel.c 2002-07-22 01:46:33.000000000 +0900
@@ -106,7 +106,7 @@
int floodvalid;
-qboolean portalopen[MAX_MAP_AREAPORTALS];
+/*qboolean*/ char portalopen[MAX_MAP_AREAPORTALS];
cvar_t *map_noareas;
@@ -1710,6 +1710,13 @@
return bytes;
}
+#ifdef USE_ZLIB
+#include <zlib.h>
+
+#define fwrite(ptr,size1,size2,f) gzwrite((gzFile)f,ptr,(size1)*(size2))
+#define FS_Read(ptr,size,f) gzread((gzFile)f,ptr,size)
+
+#endif
/*
===================
@@ -1737,6 +1744,11 @@
FloodAreaConnections ();
}
+#ifdef USE_ZLIB
+#undef fwrite
+#undef FS_Read
+#endif
+
/*
=============
CM_HeadnodeVisible
diff -u -r quake2-3.21.orig/qcommon/common.c quake2-3.21/qcommon/common.c
--- quake2-3.21.orig/qcommon/common.c 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/qcommon/common.c 2002-07-18 19:12:48.000000000 +0900
@@ -1166,7 +1166,7 @@
void *Z_TagMalloc (int size, int tag)
{
zhead_t *z;
-
+// printf("Z_TagMalloc:%d %d\n",size,tag);
size = size + sizeof(zhead_t);
z = malloc(size);
if (!z)
diff -u -r quake2-3.21.orig/qcommon/files.c quake2-3.21/qcommon/files.c
--- quake2-3.21.orig/qcommon/files.c 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/qcommon/files.c 2002-07-03 09:59:23.000000000 +0900
@@ -417,7 +417,11 @@
buf = Z_Malloc(len);
*buffer = buf;
- FS_Read (buf, len, h);
+// FS_Read (buf, len, h);
+ { int fd = fileno(h);
+ _lseek(fd,ftell(h),SEEK_SET);
+ _read(fd,buf,len);
+ }
fclose (h);
diff -u -r quake2-3.21.orig/qcommon/qfiles.h quake2-3.21/qcommon/qfiles.h
--- quake2-3.21.orig/qcommon/qfiles.h 2001-12-23 01:32:26.000000000 +0900
+++ quake2-3.21/qcommon/qfiles.h 2002-07-18 17:40:15.000000000 +0900
@@ -225,27 +225,30 @@
// upper design bounds
// leaffaces, leafbrushes, planes, and verts are still bounded by
// 16 bit short limits
-#define MAX_MAP_MODELS 1024
-#define MAX_MAP_BRUSHES 8192
-#define MAX_MAP_ENTITIES 2048
-#define MAX_MAP_ENTSTRING 0x40000
-#define MAX_MAP_TEXINFO 8192
-
-#define MAX_MAP_AREAS 256
-#define MAX_MAP_AREAPORTALS 1024
-#define MAX_MAP_PLANES 65536
-#define MAX_MAP_NODES 65536
-#define MAX_MAP_BRUSHSIDES 65536
-#define MAX_MAP_LEAFS 65536
-#define MAX_MAP_VERTS 65536
-#define MAX_MAP_FACES 65536
-#define MAX_MAP_LEAFFACES 65536
-#define MAX_MAP_LEAFBRUSHES 65536
-#define MAX_MAP_PORTALS 65536
-#define MAX_MAP_EDGES 128000
-#define MAX_MAP_SURFEDGES 256000
-#define MAX_MAP_LIGHTING 0x200000
-#define MAX_MAP_VISIBILITY 0x100000
+/* dc has no mem!! */
+#define MAXDIV 4
+
+#define MAX_MAP_MODELS (1024/2)
+#define MAX_MAP_BRUSHES (8192/2)
+#define MAX_MAP_ENTITIES (2048/2)
+#define MAX_MAP_ENTSTRING (0x40000/MAXDIV)
+#define MAX_MAP_TEXINFO (8192/MAXDIV)
+
+#define MAX_MAP_AREAS (256/2)
+#define MAX_MAP_AREAPORTALS (1024/2)
+#define MAX_MAP_PLANES (65536/MAXDIV)
+#define MAX_MAP_NODES (65536/MAXDIV)
+#define MAX_MAP_BRUSHSIDES (65536/MAXDIV)
+#define MAX_MAP_LEAFS (65536/MAXDIV) /* no errcheck */
+#define MAX_MAP_VERTS (65536/MAXDIV)
+#define MAX_MAP_FACES (65536/MAXDIV)
+/* #define MAX_MAP_LEAFFACES (65536/MAXDIV) no errcheck */
+#define MAX_MAP_LEAFBRUSHES (65536/MAXDIV)
+/* #define MAX_MAP_PORTALS (65536/MAXDIV) nt errcheck */
+#define MAX_MAP_EDGES (128000/MAXDIV)
+#define MAX_MAP_SURFEDGES (256000/MAXDIV)
+/* #define MAX_MAP_LIGHTING (0x200000/MAXDIV) */
+#define MAX_MAP_VISIBILITY (0x100000/MAXDIV)
// key / value pair sizes
diff -u -r quake2-3.21.orig/ref_gl/gl_rmain.c quake2-3.21/ref_gl/gl_rmain.c
--- quake2-3.21.orig/ref_gl/gl_rmain.c 2001-12-23 01:32:28.000000000 +0900
+++ quake2-3.21/ref_gl/gl_rmain.c 2002-07-25 10:58:13.000000000 +0900
@@ -996,7 +996,7 @@
gl_modulate = ri.Cvar_Get ("gl_modulate", "1", CVAR_ARCHIVE );
gl_log = ri.Cvar_Get( "gl_log", "0", 0 );
gl_bitdepth = ri.Cvar_Get( "gl_bitdepth", "0", 0 );
- gl_mode = ri.Cvar_Get( "gl_mode", "3", CVAR_ARCHIVE );
+ gl_mode = ri.Cvar_Get( "gl_mode", "0", CVAR_ARCHIVE ); /* DC use 320x240 */
gl_lightmap = ri.Cvar_Get ("gl_lightmap", "0", 0);
gl_shadows = ri.Cvar_Get ("gl_shadows", "0", CVAR_ARCHIVE );
gl_dynamic = ri.Cvar_Get ("gl_dynamic", "1", 0);
diff -u -r quake2-3.21.orig/ref_gl/qgl.h quake2-3.21/ref_gl/qgl.h
--- quake2-3.21.orig/ref_gl/qgl.h 2001-12-23 03:45:58.000000000 +0900
+++ quake2-3.21/ref_gl/qgl.h 2002-06-26 08:39:05.000000000 +0900
@@ -21,20 +21,17 @@
** QGL.H
*/
+#ifndef __sh__
+
+#include "qgl_orig.h"
+
+#else
+
#ifndef __QGL_H__
#define __QGL_H__
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
#include <GL/gl.h>
-#ifdef __linux__
-//#include <GL/fxmesa.h>
-#include <GL/glx.h>
-#endif
-
qboolean QGL_Init( const char *dllname );
void QGL_Shutdown( void );
@@ -42,342 +39,342 @@
# define APIENTRY
#endif
-extern void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
-extern void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
-extern GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
-extern void ( APIENTRY * qglArrayElement )(GLint i);
-extern void ( APIENTRY * qglBegin )(GLenum mode);
-extern void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
-extern void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
-extern void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
-extern void ( APIENTRY * qglCallList )(GLuint list);
-extern void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
-extern void ( APIENTRY * qglClear )(GLbitfield mask);
-extern void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-extern void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-extern void ( APIENTRY * qglClearDepth )(GLclampd depth);
-extern void ( APIENTRY * qglClearIndex )(GLfloat c);
-extern void ( APIENTRY * qglClearStencil )(GLint s);
-extern void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
-extern void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
-extern void ( APIENTRY * qglColor3bv )(const GLbyte *v);
-extern void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
-extern void ( APIENTRY * qglColor3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
-extern void ( APIENTRY * qglColor3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
-extern void ( APIENTRY * qglColor3iv )(const GLint *v);
-extern void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
-extern void ( APIENTRY * qglColor3sv )(const GLshort *v);
-extern void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
-extern void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
-extern void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
-extern void ( APIENTRY * qglColor3uiv )(const GLuint *v);
-extern void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
-extern void ( APIENTRY * qglColor3usv )(const GLushort *v);
-extern void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-extern void ( APIENTRY * qglColor4bv )(const GLbyte *v);
-extern void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-extern void ( APIENTRY * qglColor4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-extern void ( APIENTRY * qglColor4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
-extern void ( APIENTRY * qglColor4iv )(const GLint *v);
-extern void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-extern void ( APIENTRY * qglColor4sv )(const GLshort *v);
-extern void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-extern void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
-extern void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-extern void ( APIENTRY * qglColor4uiv )(const GLuint *v);
-extern void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-extern void ( APIENTRY * qglColor4usv )(const GLushort *v);
-extern void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-extern void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
-extern void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-extern void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
-extern void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-extern void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-extern void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-extern void ( APIENTRY * qglCullFace )(GLenum mode);
-extern void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
-extern void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
-extern void ( APIENTRY * qglDepthFunc )(GLenum func);
-extern void ( APIENTRY * qglDepthMask )(GLboolean flag);
-extern void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
-extern void ( APIENTRY * qglDisable )(GLenum cap);
-extern void ( APIENTRY * qglDisableClientState )(GLenum array);
-extern void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
-extern void ( APIENTRY * qglDrawBuffer )(GLenum mode);
-extern void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-extern void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
-extern void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
-extern void ( APIENTRY * qglEnable )(GLenum cap);
-extern void ( APIENTRY * qglEnableClientState )(GLenum array);
-extern void ( APIENTRY * qglEnd )(void);
-extern void ( APIENTRY * qglEndList )(void);
-extern void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
-extern void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
-extern void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
-extern void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
-extern void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
-extern void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
-extern void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
-extern void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
-extern void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
-extern void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-extern void ( APIENTRY * qglEvalPoint1 )(GLint i);
-extern void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);
-extern void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
-extern void ( APIENTRY * qglFinish )(void);
-extern void ( APIENTRY * qglFlush )(void);
-extern void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglFrontFace )(GLenum mode);
-extern void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-extern GLuint ( APIENTRY * qglGenLists )(GLsizei range);
-extern void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
-extern void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
-extern void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
-extern void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
-extern GLenum ( APIENTRY * qglGetError )(void);
-extern void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
-extern void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
-extern void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
-extern void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
-extern void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
-extern void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
-extern void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
-extern void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
-extern const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
-extern void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
-extern void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
-extern void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
-extern void ( APIENTRY * qglIndexMask )(GLuint mask);
-extern void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglIndexd )(GLdouble c);
-extern void ( APIENTRY * qglIndexdv )(const GLdouble *c);
-extern void ( APIENTRY * qglIndexf )(GLfloat c);
-extern void ( APIENTRY * qglIndexfv )(const GLfloat *c);
-extern void ( APIENTRY * qglIndexi )(GLint c);
-extern void ( APIENTRY * qglIndexiv )(const GLint *c);
-extern void ( APIENTRY * qglIndexs )(GLshort c);
-extern void ( APIENTRY * qglIndexsv )(const GLshort *c);
-extern void ( APIENTRY * qglIndexub )(GLubyte c);
-extern void ( APIENTRY * qglIndexubv )(const GLubyte *c);
-extern void ( APIENTRY * qglInitNames )(void);
-extern void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
-extern GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
-extern GLboolean ( APIENTRY * qglIsList )(GLuint list);
-extern GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
-extern void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
-extern void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
-extern void ( APIENTRY * qglLineWidth )(GLfloat width);
-extern void ( APIENTRY * qglListBase )(GLuint base);
-extern void ( APIENTRY * qglLoadIdentity )(void);
-extern void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
-extern void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
-extern void ( APIENTRY * qglLoadName )(GLuint name);
-extern void ( APIENTRY * qglLogicOp )(GLenum opcode);
-extern void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-extern void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-extern void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
-extern void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
-extern void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
-extern void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
-extern void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-extern void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-extern void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
-extern void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglMatrixMode )(GLenum mode);
-extern void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
-extern void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
-extern void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
-extern void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
-extern void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
-extern void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
-extern void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
-extern void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
-extern void ( APIENTRY * qglNormal3iv )(const GLint *v);
-extern void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
-extern void ( APIENTRY * qglNormal3sv )(const GLshort *v);
-extern void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-extern void ( APIENTRY * qglPassThrough )(GLfloat token);
-extern void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
-extern void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
-extern void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
-extern void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
-extern void ( APIENTRY * qglPointSize )(GLfloat size);
-extern void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
-extern void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
-extern void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
-extern void ( APIENTRY * qglPopAttrib )(void);
-extern void ( APIENTRY * qglPopClientAttrib )(void);
-extern void ( APIENTRY * qglPopMatrix )(void);
-extern void ( APIENTRY * qglPopName )(void);
-extern void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
-extern void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
-extern void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
-extern void ( APIENTRY * qglPushMatrix )(void);
-extern void ( APIENTRY * qglPushName )(GLuint name);
-extern void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
-extern void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
-extern void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
-extern void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
-extern void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
-extern void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
-extern void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
-extern void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
-extern void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-extern void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-extern void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
-extern void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
-extern void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);
-extern void ( APIENTRY * qglReadBuffer )(GLenum mode);
-extern void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
-extern void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-extern void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
-extern void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-extern void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
-extern void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
-extern void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
-extern void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-extern void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
-extern GLint ( APIENTRY * qglRenderMode )(GLenum mode);
-extern void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
-extern void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
-extern void ( APIENTRY * qglShadeModel )(GLenum mode);
-extern void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
-extern void ( APIENTRY * qglStencilMask )(GLuint mask);
-extern void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
-extern void ( APIENTRY * qglTexCoord1d )(GLdouble s);
-extern void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord1f )(GLfloat s);
-extern void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord1i )(GLint s);
-extern void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord1s )(GLshort s);
-extern void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
-extern void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
-extern void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
-extern void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
-extern void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
-extern void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
-extern void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
-extern void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
-extern void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-extern void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-extern void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
-extern void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
-extern void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
-extern void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
-extern void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
-extern void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
-extern void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
-extern void ( APIENTRY * qglVertex2iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
-extern void ( APIENTRY * qglVertex2sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
-extern void ( APIENTRY * qglVertex3iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
-extern void ( APIENTRY * qglVertex3sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-extern void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-extern void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
-extern void ( APIENTRY * qglVertex4iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
-extern void ( APIENTRY * qglVertex4sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
+#define qglAccum glAccum
+#define qglAlphaFunc glAlphaFunc
+#define qglAreTexturesResident glAreTexturesResident
+#define qglArrayElement glArrayElement
+#define qglBegin glBegin
+#define qglBindTexture glBindTexture
+#define qglBitmap glBitmap
+#define qglBlendFunc glBlendFunc
+#define qglCallList glCallList
+#define qglCallLists glCallLists
+#define qglClear glClear
+#define qglClearAccum glClearAccum
+#define qglClearColor glClearColor
+#define qglClearDepth glClearDepth
+#define qglClearIndex glClearIndex
+#define qglClearStencil glClearStencil
+#define qglClipPlane glClipPlane
+#define qglColor3b glColor3b
+#define qglColor3bv glColor3bv
+#define qglColor3d glColor3d
+#define qglColor3dv glColor3dv
+#define qglColor3f glColor3f
+#define qglColor3fv glColor3fv