Timing is correct now! Forgot to update samples_per_tick when parsing the 0xf effect.
[pineappletracker.git] / hively / actions.c
blob454c43686f7ea3c4738f29963d80652d2480cf8e
1 #include "pineapple.h"
2 #include "gui.h"
3 #include "hvl_replay.h"
5 /* move cursor left one column */
6 void act_mvleft(void){
7 switch(currtab){
8 case 0:
9 if(songx) songx--;
10 break;
11 case 1:
12 if(trackx) trackx--;
13 break;
14 case 2:
15 if(instrx) instrx--;
16 break;
20 /* move cursor right one column */
21 void act_mvright(void){
22 switch(currtab){
23 case 0:
24 if(songx < 15) songx++;
25 break;
26 case 1:
27 if(trackx < 9) trackx++;
28 break;
29 case 2:
30 if(instrx < 2) instrx++;
31 break;
35 /* move cursor up 1 line */
36 void act_mvup(void){
37 switch(currtab){
38 case 0:
39 if(songy){
40 songy--;
41 }else{
42 songy = 0;
44 break;
45 case 1:
46 if(tracky){
47 tracky--;
48 }else{
49 tracky = 0;
51 break;
52 case 2:
53 if(instry){
54 instry--;
55 }else{
56 instry = 0;
58 break;
62 /* move cursor down 1 line */
63 void act_mvdown(void){
64 switch(currtab){
65 case 0:
66 if(songy < tune->ht_PositionNr - 1){
67 songy++;
68 }else{
69 songy = tune->ht_PositionNr - 1;
71 break;
72 case 1:
73 if(tracky < tune->ht_TrackNr - 1){
74 tracky++;
75 }else{
76 tracky = tune->ht_TrackNr - 1;
78 break;
79 case 2:
80 if(instry < tune->ht_Instruments[currinstr].ins_PList.pls_Length - 1){
81 instry++;
82 }else{
83 instry = tune->ht_Instruments[currinstr].ins_PList.pls_Length - 1;
85 break;