Added code to count used instrument data bytes
authorslack <slack@codemaniacs.com>
Fri, 12 Jun 2009 14:39:50 +0000 (16:39 +0200)
committerslack <slack@codemaniacs.com>
Fri, 12 Jun 2009 14:39:50 +0000 (16:39 +0200)
lolailo.c

index 806e13f9f638cea6139588141b84e0bd57cfa149..08de771ee06d16ff0a41a05a12a5f3979a5b9c8d 100644 (file)
--- a/lolailo.c
+++ b/lolailo.c
@@ -4,6 +4,7 @@
 //#include "mainwindow.h"
 #include "synth.h"
 #include "play.h"
+#include "sizedtypes.h"
 
 #include "thesong.h"
 
@@ -26,6 +27,18 @@ void _start()
     SDL_OpenAudio(&desired, NULL);
     SDL_PauseAudio(0);
 
+    int instrument_data_length=0;
+    int playlist_length=0;
+
+    for (uint8 *p = thesong.playlist; *p != 255; p++)
+        playlist_length++;
+
+    for (uint8 *p = thesong.instrument_data; *p != 255; p++)
+        instrument_data_length++;
+
+    printf("playlist:        %4d bytes\n", playlist_length+1);
+    printf("instrument_data: %4d bytes\n", instrument_data_length+1);
+
     //QApplication a(argc, argv);
     //MainWindow w(NULL);
     //w.show();