aboutsummaryrefslogtreecommitdiff
path: root/tools/combiner/combiner.c
blob: cd724ce653d940c0273279797c9a096431bed803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdint.h>
#include <stdio.h>

uint8_t rd[131072];
uint8_t ld[131072];
uint8_t lo[131072*4];

int main()
{
	FILE * l = fopen( "l_lighthouse.dat", "rb" );
	FILE * r = fopen( "r_lighthouse.dat", "rb" );
	FILE * o = fopen( "dual_lighthouse.dat", "wb" );
	fread( rd, 131072, 1, r );
	fread( ld, 131072, 1, l );
	int i;
	for( i = 0; i < 131072; i++ )
	{
		int rr = rd[i];
		int lr = ld[i];
		int alpha = (rr>lr)?rr:lr;
		fprintf( o, "%c%c%c%c", rr, lr, 0, alpha );
	}
	fclose( o );

}