* Mod parser parses patterns, just got to figure out what the period values mean...
[pineappletracker.git] / gui.h
blob33d15767c13915c2e5d3b7dc941167907db4b884
1 /* vi:set ts=4 sts=4 sw=4 noexpandtab: */
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <string.h>
5 #include <math.h>
6 #include <curses.h>
7 #include <unistd.h>
8 #include <ctype.h>
9 #ifndef WINDOWS
10 #include <err.h>
11 #endif
13 #define SETLO(v,x) v = ((v) & 0xf0) | (x)
14 #define SETHI(v,x) v = ((v) & 0x0f) | ((x) << 4)
15 #define CTRL(c) ((c) & 037)
16 #define KEY_ESCAPE 27
17 #define KEY_TAB 9 // this also happens to be ^i...
18 #define ENTER 13
20 #ifndef WINDOWS
21 #define BACKSPACE 0x07
22 #endif
24 int currmode;
25 char currcmd;
26 int instrx, instry, instroffs;
27 int octave;
28 int songx, songy, songoffs;
29 int trackx, tracky, trackoffs;
30 int currtrack, currinstr;
31 int currtab;
32 int saved;
33 int disptick;
34 int step;
36 char cmdstr[500];
37 char filename[1024];
38 char *validcmds;
39 char *keymap[2];
41 void initsonglines(void);
42 void inittracks(void);
43 void initinstrs(void);
45 void drawgui(void);
46 int freqkey(int c);
47 int hexinc(int x);
48 int hexdec(int x);
49 void insertc (int c);
50 char nextchar(void);
51 void setdisplay(char *str);