Line
Link Here
|
0 |
-- openarena-engine-source-0.8.8/Makefile |
0 |
++ openarena-engine-source-0.8.8/Makefile |
Lines 1406-1446
Link Here
|
1406 |
$(B)/client/l_script.o \ |
1406 |
$(B)/client/l_script.o \ |
1407 |
$(B)/client/l_struct.o \ |
1407 |
$(B)/client/l_struct.o \ |
1408 |
\ |
1408 |
\ |
1409 |
$(B)/client/jcapimin.o \ |
|
|
1410 |
$(B)/client/jcapistd.o \ |
1411 |
$(B)/client/jccoefct.o \ |
1412 |
$(B)/client/jccolor.o \ |
1413 |
$(B)/client/jcdctmgr.o \ |
1414 |
$(B)/client/jchuff.o \ |
1415 |
$(B)/client/jcinit.o \ |
1416 |
$(B)/client/jcmainct.o \ |
1417 |
$(B)/client/jcmarker.o \ |
1418 |
$(B)/client/jcmaster.o \ |
1419 |
$(B)/client/jcomapi.o \ |
1420 |
$(B)/client/jcparam.o \ |
1421 |
$(B)/client/jcphuff.o \ |
1422 |
$(B)/client/jcprepct.o \ |
1423 |
$(B)/client/jcsample.o \ |
1424 |
$(B)/client/jdapimin.o \ |
1425 |
$(B)/client/jdapistd.o \ |
1426 |
$(B)/client/jdatasrc.o \ |
1409 |
$(B)/client/jdatasrc.o \ |
1427 |
$(B)/client/jdcoefct.o \ |
|
|
1428 |
$(B)/client/jdcolor.o \ |
1429 |
$(B)/client/jddctmgr.o \ |
1430 |
$(B)/client/jdhuff.o \ |
1431 |
$(B)/client/jdinput.o \ |
1432 |
$(B)/client/jdmainct.o \ |
1433 |
$(B)/client/jdmarker.o \ |
1434 |
$(B)/client/jdmaster.o \ |
1435 |
$(B)/client/jdpostct.o \ |
1436 |
$(B)/client/jdsample.o \ |
1437 |
$(B)/client/jdtrans.o \ |
1438 |
$(B)/client/jerror.o \ |
1439 |
$(B)/client/jfdctflt.o \ |
1440 |
$(B)/client/jidctflt.o \ |
1441 |
$(B)/client/jmemmgr.o \ |
1442 |
$(B)/client/jmemnobs.o \ |
1443 |
$(B)/client/jutils.o \ |
1444 |
\ |
1410 |
\ |
1445 |
$(B)/client/tr_animation.o \ |
1411 |
$(B)/client/tr_animation.o \ |
1446 |
$(B)/client/tr_backend.o \ |
1412 |
$(B)/client/tr_backend.o \ |
1447 |
-- openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c |
1413 |
++ openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c |
Lines 15-23
Link Here
|
15 |
*/ |
15 |
*/ |
16 |
|
16 |
|
17 |
/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ |
17 |
/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ |
18 |
#include "jinclude.h" |
18 |
#include <stdio.h> |
19 |
#include "jpeglib.h" |
19 |
#include <string.h> |
20 |
#include "jerror.h" |
20 |
#include <jpeglib.h> |
|
|
21 |
#include <jerror.h> |
22 |
#undef METHODDEF |
23 |
#define METHODDEF static |
24 |
#undef GLOBAL |
25 |
#define GLOBAL |
26 |
#define SIZEOF(object) ((size_t) sizeof(object)) |
21 |
|
27 |
|
22 |
#ifndef MIN |
28 |
#ifndef MIN |
23 |
#define MIN(a, b) ((a)<(b)?(a):(b)) |
29 |
#define MIN(a, b) ((a)<(b)?(a):(b)) |
Lines 44-50
Link Here
|
44 |
* before any data is actually read. |
50 |
* before any data is actually read. |
45 |
*/ |
51 |
*/ |
46 |
|
52 |
|
47 |
METHODDEF(void) |
53 |
METHODDEF void |
48 |
init_source (j_decompress_ptr cinfo) |
54 |
init_source (j_decompress_ptr cinfo) |
49 |
{ |
55 |
{ |
50 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
56 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
Lines 90-96
Link Here
|
90 |
* the front of the buffer rather than discarding it. |
96 |
* the front of the buffer rather than discarding it. |
91 |
*/ |
97 |
*/ |
92 |
|
98 |
|
93 |
METHODDEF(boolean) |
99 |
METHODDEF boolean |
94 |
fill_input_buffer (j_decompress_ptr cinfo) |
100 |
fill_input_buffer (j_decompress_ptr cinfo) |
95 |
{ |
101 |
{ |
96 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
102 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
Lines 129-135
Link Here
|
129 |
* buffer is the application writer's problem. |
135 |
* buffer is the application writer's problem. |
130 |
*/ |
136 |
*/ |
131 |
|
137 |
|
132 |
METHODDEF(void) |
138 |
METHODDEF void |
133 |
skip_input_data (j_decompress_ptr cinfo, long num_bytes) |
139 |
skip_input_data (j_decompress_ptr cinfo, long num_bytes) |
134 |
{ |
140 |
{ |
135 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
141 |
my_src_ptr src = (my_src_ptr) cinfo->src; |
Lines 170-176
Link Here
|
170 |
* for error exit. |
176 |
* for error exit. |
171 |
*/ |
177 |
*/ |
172 |
|
178 |
|
173 |
METHODDEF(void) |
179 |
METHODDEF void |
174 |
term_source (j_decompress_ptr cinfo) |
180 |
term_source (j_decompress_ptr cinfo) |
175 |
{ |
181 |
{ |
176 |
/* no work necessary here */ |
182 |
/* no work necessary here */ |
Lines 183-190
Link Here
|
183 |
* for closing it after finishing decompression. |
189 |
* for closing it after finishing decompression. |
184 |
*/ |
190 |
*/ |
185 |
|
191 |
|
186 |
GLOBAL(void) |
192 |
GLOBAL void |
187 |
jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, size_t size) |
193 |
jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, unsigned long size) |
188 |
{ |
194 |
{ |
189 |
my_src_ptr src; |
195 |
my_src_ptr src; |
190 |
|
196 |
|
191 |
-- openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c |
197 |
++ openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c |
Lines 31-37
Link Here
|
31 |
*/ |
31 |
*/ |
32 |
|
32 |
|
33 |
#define JPEG_INTERNALS |
33 |
#define JPEG_INTERNALS |
34 |
#include "../jpeg-6b/jpeglib.h" |
34 |
#include <jpeglib.h> |
35 |
|
35 |
|
36 |
void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) { |
36 |
void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) { |
37 |
/* This struct contains the JPEG decompression parameters and pointers to |
37 |
/* This struct contains the JPEG decompression parameters and pointers to |
Lines 131-137
Link Here
|
131 |
} |
131 |
} |
132 |
|
132 |
|
133 |
memcount = pixelcount * 4; |
133 |
memcount = pixelcount * 4; |
134 |
row_stride = cinfo.output_width * cinfo.output_components; |
134 |
if (3 == cinfo.output_components) |
|
|
135 |
row_stride = cinfo.output_width * 4; |
136 |
else |
137 |
row_stride = cinfo.output_width * cinfo.output_components; |
135 |
|
138 |
|
136 |
out = ri.Malloc(memcount); |
139 |
out = ri.Malloc(memcount); |
137 |
|
140 |
|
Lines 144-157
Link Here
|
144 |
/* Here we use the library's state variable cinfo.output_scanline as the |
147 |
/* Here we use the library's state variable cinfo.output_scanline as the |
145 |
* loop counter, so that we don't have to keep track ourselves. |
148 |
* loop counter, so that we don't have to keep track ourselves. |
146 |
*/ |
149 |
*/ |
|
|
150 |
buf = out; |
147 |
while (cinfo.output_scanline < cinfo.output_height) { |
151 |
while (cinfo.output_scanline < cinfo.output_height) { |
148 |
/* jpeg_read_scanlines expects an array of pointers to scanlines. |
152 |
/* jpeg_read_scanlines expects an array of pointers to scanlines. |
149 |
* Here the array is only one element long, but you could ask for |
153 |
* Here the array is only one element long, but you could ask for |
150 |
* more than one scanline at a time if that's more convenient. |
154 |
* more than one scanline at a time if that's more convenient. |
151 |
*/ |
155 |
*/ |
152 |
buf = ((out+(row_stride*cinfo.output_scanline))); |
|
|
153 |
buffer = &buf; |
156 |
buffer = &buf; |
154 |
(void) jpeg_read_scanlines(&cinfo, buffer, 1); |
157 |
(void) jpeg_read_scanlines(&cinfo, buffer, 1); |
|
|
158 |
if (3 == cinfo.output_components) { |
159 |
/* turn RGB into RGBA */ |
160 |
int ioffset = cinfo.output_width * 3 - 1; |
161 |
int ooffset = cinfo.output_width * 4 - 1; |
162 |
do { |
163 |
buf[ooffset--] = 255; |
164 |
buf[ooffset--] = buf[ioffset--]; |
165 |
buf[ooffset--] = buf[ioffset--]; |
166 |
buf[ooffset--] = buf[ioffset--]; |
167 |
} while (ioffset > 0); |
168 |
} |
169 |
buf += row_stride; |
155 |
} |
170 |
} |
156 |
|
171 |
|
157 |
buf = out; |
172 |
buf = out; |
Lines 176-182
Link Here
|
176 |
buf[--dindex] = greyshade; |
191 |
buf[--dindex] = greyshade; |
177 |
} while(sindex); |
192 |
} while(sindex); |
178 |
} |
193 |
} |
179 |
else |
194 |
else if (4 == cinfo.output_components) |
180 |
{ |
195 |
{ |
181 |
// clear all the alphas to 255 |
196 |
// clear all the alphas to 255 |
182 |
int i; |
197 |
int i; |