Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* From Mario Artist Paint Studio */
- void osCapConvertToI8(byte *capture,byte *dest)
- {
- int calc;
- byte *pbVar1;
- int y;
- byte *pbVar2;
- int x;
- byte intensity;
- capture = capture + 0x4468;
- y = 0xd0;
- do {
- x = 0xc0;
- pbVar1 = dest;
- pbVar2 = capture;
- do {
- calc = (uint)*pbVar2 + ((int)(uint)*pbVar2 >> 2) +
- (uint)pbVar2[1] + ((int)(uint)pbVar2[1] >> 2) +
- (uint)pbVar2[2] + ((int)(uint)pbVar2[2] >> 2) +
- (uint)pbVar2[3] + ((int)(uint)pbVar2[3] >> 2) + -0x82;
- if (calc < 0) {
- calc = 0;
- }
- intensity = (byte)((uint)calc >> 2);
- if (0xff < (uint)calc >> 2) {
- intensity = 0xff;
- }
- x = x + -1;
- *pbVar1 = intensity;
- pbVar2 = pbVar2 + 4;
- pbVar1 = pbVar1 + 1;
- } while (0 < x);
- y = y + -1;
- capture = capture + 0x400;
- dest = dest + 0xc0;
- } while (0 < y);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement