~ubuntu-branches/ubuntu/vivid/fceux/vivid

« back to all changes in this revision

Viewing changes to src/palette.cpp

  • Committer: Package Import Robot
  • Author(s): Joe Nahmias
  • Date: 2014-03-02 19:22:04 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140302192204-9f0aehi5stfnhn7d
Tags: 2.2.2+dfsg0-1
* Imported Upstream version 2.2.2
  + remove patches merged upstream; refresh remaining
  + remove windows compiled help files and non-free Visual C files
* Use C++11 standard static assertion functionality
* fix upstream installation of support files
* New patch 0004-ignore-missing-windows-help-CHM-file.patch
* update d/copyright for new, renamed, deleted files
* d/control: bump std-ver to 3.9.5, no changes needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
19
*/
20
20
 
21
 
#include <stdio.h>
22
 
#include <stdlib.h>
23
 
#include <math.h>
24
 
#include <string.h>
25
 
 
26
21
 
27
22
#include "types.h"
28
23
#include "file.h"
42
37
#define M_PI 3.14159265358979323846
43
38
#endif
44
39
 
 
40
#include <cstdio>
 
41
#include <cstdlib>
 
42
#include <cmath>
 
43
#include <cstring>
 
44
 
45
45
static int ntsccol=0;
46
46
static int ntsctint=46+10;
47
47
static int ntschue=72;
98
98
static uint8 lastd=0;
99
99
void SetNESDeemph(uint8 d, int force)
100
100
{
101
 
        static uint16 rtmul[7]={32768*1.239,32768*.794,32768*1.019,32768*.905,32768*1.023,32768*.741,32768*.75};
102
 
        static uint16 gtmul[7]={32768*.915,32768*1.086,32768*.98,32768*1.026,32768*.908,32768*.987,32768*.75};
103
 
        static uint16 btmul[7]={32768*.743,32768*.882,32768*.653,32768*1.277,32768*.979,32768*.101,32768*.75};
 
101
        static uint16 rtmul[]={
 
102
        static_cast<uint16>(32768*1.239),
 
103
        static_cast<uint16>(32768*.794),
 
104
        static_cast<uint16>(32768*1.019),
 
105
        static_cast<uint16>(32768*.905),
 
106
        static_cast<uint16>(32768*1.023),
 
107
        static_cast<uint16>(32768*.741),
 
108
        static_cast<uint16>(32768*.75)
 
109
    };
 
110
        static uint16 gtmul[]={
 
111
        static_cast<uint16>(32768*.915),
 
112
        static_cast<uint16>(32768*1.086),
 
113
        static_cast<uint16>(32768*.98),
 
114
        static_cast<uint16>(32768*1.026),
 
115
        static_cast<uint16>(32768*.908),
 
116
        static_cast<uint16>(32768*.987),
 
117
        static_cast<uint16>(32768*.75)
 
118
    };
 
119
        static uint16 btmul[]={
 
120
        static_cast<uint16>(32768*.743),
 
121
        static_cast<uint16>(32768*.882),
 
122
        static_cast<uint16>(32768*.653),
 
123
        static_cast<uint16>(32768*1.277),
 
124
        static_cast<uint16>(32768*.979),
 
125
        static_cast<uint16>(32768*.101),
 
126
        static_cast<uint16>(32768*.75)
 
127
    };
 
128
 
104
129
        uint32 r,g,b;
105
130
        int x;
106
131