Every function that uses songlen now uses tune.songlen, except initsonglines, not...
[pineappletracker.git] / main.c
blobbce4b68e975c98f13c9b5932e9499b37397f562e
1 /* vi:set ts=8 sts=8 sw=8 noexpandtab: */
2 #include <stdio.h>
4 #include <SDL/SDL.h>
6 #ifndef WINDOWS
7 #include <err.h>
8 #endif
10 #ifdef JACK
11 #include <jack/jack.h>
12 #endif
14 #include "pineapple.h"
15 #include "lft.h"
18 //struct pineapple_tune *tune;
22 // TODO: make hvl.c
23 //\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/\\
24 \\\ < struct pineapple_tune *hvl_loadtune(struct *) > .|
25 /// Gives you a struct pineapple_tune from a struct *hvl_tune. .\
26 \\/\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\//
27 //struct pineapple_tune *hvl_loadtune(struct *hvl_tune) {
28 //}
31 int main(int argc, char **argv){
32 char * f;
33 f = "";
35 if(sdl_init() == 0){
36 //----------------------------------\\
37 // parse those args :^)
38 //----------------------------------//
39 if(argc > 1){
40 f = argv[1];
42 //what happens if we load with no filename?
44 if(lft_loadfile(f,&tune) == 0){
45 fprintf(stderr, "loaded %s\n", f);
46 //}else if(hvl_loadfile(filename, FREQ, 4) != NULL){
47 // ????
48 }else{
49 fprintf(stderr, "couldn't load %s\n", f);
52 //----------------------------------\\
53 // begin image&sound
54 //----------------------------------//
55 initchip();
56 initgui();
58 SDL_PauseAudio(0);
60 //----------------------------------\\
61 // actually start the program
62 //----------------------------------//
63 eventloop();
65 SDL_Quit();
68 return 0;