~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/imbuf/intern/hamx.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 * ***** END GPL/BL DUAL LICENSE BLOCK *****
30
30
 * hamx.c
31
31
 *
32
 
 * $Id: hamx.c,v 1.6 2003/04/27 09:59:36 ton Exp $
 
32
 * $Id: hamx.c,v 1.10 2005/03/19 21:08:10 zuster Exp $
33
33
 */
34
34
 
35
35
#include "BLI_blenlib.h"
36
36
 
37
 
#ifdef HAVE_CONFIG_H
38
 
#include <config.h>
39
 
#endif
40
 
 
41
37
#ifdef WIN32
42
 
#include "BLI_winstuff.h"
43
38
#include <io.h>
44
39
#endif
45
40
 
211
206
 * 
212
207
 */
213
208
 
214
 
void imb_convhamx(struct ImBuf *ibuf, unsigned char coltab[][4], short *deltab)
 
209
void imb_convhamx(struct ImBuf *ibuf, unsigned char *coltab, short *deltab)
215
210
{
216
211
        short r,g,b,lr,lg,lb,dr,dg,db,col,fout,type,step;
217
212
        int i;
229
224
                rect += 4*step;
230
225
                i = ((ibuf->x * ibuf->y) + 2 - step - 1) / 2;
231
226
 
232
 
                lb = coltab[0][1];
233
 
                lg = coltab[0][2];
234
 
                lr = coltab[0][3];
 
227
                lb = coltab[1];
 
228
                lg = coltab[2];
 
229
                lr = coltab[3];
235
230
                type = col = 0;
236
231
 
237
232
                for ( ;i>0;i--){
277
272
                                default:
278
273
                                        /*printf("%04x %5d %5d  ", (b<<8) + (g<<4) + r, col, fout);*/
279
274
                                        
280
 
                                        lb = coltab[col][1];
281
 
                                        lg = coltab[col][2];
282
 
                                        lr = coltab[col][3];
 
275
                                        lb = coltab[col*4 + 1];
 
276
                                        lg = coltab[col*4 + 2];
 
277
                                        lr = coltab[col*4 + 3];
283
278
                                        /*printf("%01x%01x%01x %01x%01x%01x\n", b, g, r, lb, lg, lr);*/
284
279
                                        col += 48;
285
280
                                }
336
331
struct ImBuf *imb_loadanim(int *iffmem, int flags)
337
332
{
338
333
        int chunk, totlen, len, *mem, cmaplen = 0;
339
 
        unsigned int *cmap;
 
334
        unsigned int *cmap = NULL;
340
335
        uchar *body = 0;
341
336
        struct Adat adat;
342
337
        struct ImBuf *ibuf=0;
544
539
                steps = 2;
545
540
                break;
546
541
        }
547
 
        if (steps == 0) return 0;
 
542
        if (steps == 0) return 0;
548
543
 
549
544
        size = ((ibuf->x + 1)* (ibuf->y + 1)) / steps + 1024;
550
545
        if ((_buf1  = malloc(size)) == 0) return(0);