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

« back to all changes in this revision

Viewing changes to source/blender/imbuf/intern/cmap.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:
1
1
/**
2
2
 * cmap.c
3
3
 *
4
 
 * $Id: cmap.c,v 1.5 2003/04/27 09:59:36 ton Exp $
 
4
 * $Id: cmap.c,v 1.7 2005/03/11 20:16:13 sirdude Exp $
5
5
 *
6
6
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
7
7
 *
42
42
 
43
43
#include "IMB_cmap.h"
44
44
 
45
 
#ifdef HAVE_CONFIG_H
46
 
#include <config.h>
47
 
#endif
48
 
 
49
45
static short *lastcube = 0;
50
46
static uchar *lastcoltab = 0;
51
47
static short lastmaxcol;
68
64
}
69
65
 
70
66
 
71
 
int IMB_alpha_to_col0(int new)
 
67
int IMB_alpha_to_col0(int value)
72
68
{
73
69
        int old;
74
70
        
75
71
        old = alpha_col0;
76
 
        alpha_col0 = new;
 
72
        alpha_col0 = value;
77
73
        return (old);
78
74
}
79
75
 
88
84
        if (ibuf->cbits == 0) return;
89
85
        if (ibuf->cbits >= 8) return;
90
86
 
91
 
        /*
92
 
                bij cbits = 5:
93
 
                and1 = 11100000;
94
 
                bij cbits = 6:
95
 
                and1 = 11000000;
96
 
    */
 
87
/*
 
88
        bij cbits = 5:
 
89
        and1 = 11100000;
 
90
        bij cbits = 6:
 
91
        and1 = 11000000;
 
92
*/
97
93
 
98
94
        bits = ibuf->cbits;
99
95
        and1 = ((1 << (8-bits)) - 1) & 0xff;
352
348
                        if (colp[3]){
353
349
                                if ((b + sizep - 1) > max) colp[3] = 0;
354
350
                                else done |= colp[3] = addplanetocube(cube + (sizep -1) * addcb, _plane, r, g, sizep, addcr,
355
 
                                    addcg, max, j);
 
351
                                        addcg, max, j);
356
352
                        }
357
353
                        if (colp[4]){
358
354
                                if ((g + sizep - 1) > max) colp[4] = 0;
359
355
                                else done |= colp[4] = addplanetocube(cube + (sizep -1) * addcg, _plane, r, b, sizep, addcr,
360
 
                                    addcb, max, j);
 
356
                                        addcb, max, j);
361
357
                        }
362
358
                        if (colp[5]){
363
359
                                if ((r + sizep - 1) > max) colp[5] = 0;
364
360
                                else done |= colp[5] = addplanetocube(cube + (sizep -1) * addcr, _plane, b, g, sizep, addcb,
365
 
                                    addcg, max, j);
 
361
                                        addcg, max, j);
366
362
                        }
367
363
 
368
364
                        colp += 6;