aboutsummaryrefslogtreecommitdiff
path: root/tools/combiner/combiner.c
diff options
context:
space:
mode:
authorultramn <dchapm2@umbc.edu>2016-12-17 21:35:15 -0800
committerultramn <dchapm2@umbc.edu>2016-12-17 21:35:15 -0800
commit6c6849f4a66599c44e85c3445cb11fde35a6b44d (patch)
treeaf906b50a56c580ecad00f27210f8f8c70aeb17b /tools/combiner/combiner.c
parentd1bb7ae144d499d9db554c51926e52aebb332228 (diff)
parent1bc9a30ef7235c89b7eaa2fdf013314a91099a3f (diff)
downloadlibsurvive-6c6849f4a66599c44e85c3445cb11fde35a6b44d.tar.gz
libsurvive-6c6849f4a66599c44e85c3445cb11fde35a6b44d.tar.bz2
Merge branch 'master' of https://github.com/cnlohr/libsurvive
Diffstat (limited to 'tools/combiner/combiner.c')
-rw-r--r--tools/combiner/combiner.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/combiner/combiner.c b/tools/combiner/combiner.c
new file mode 100644
index 0000000..cd724ce
--- /dev/null
+++ b/tools/combiner/combiner.c
@@ -0,0 +1,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 );
+
+}
+