comparison minijss/jloadjss.c @ 1196:aa6c3af36008

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Mar 2015 15:58:52 +0200
parents 848a88ce7a57
children 0ee6ba7b3e4a
comparison
equal deleted inserted replaced
1195:4d27c4ec8d4d 1196:aa6c3af36008
4 * (C) Copyright 2007-2015 Tecnic Software productions (TNSP) 4 * (C) Copyright 2007-2015 Tecnic Software productions (TNSP)
5 */ 5 */
6 #include "jssmod.h" 6 #include "jssmod.h"
7 7
8 8
9 // If all pattern modes are required, enable them here
9 #ifdef JM_SUP_PATMODE_ALL 10 #ifdef JM_SUP_PATMODE_ALL
10 # define JM_SUP_PATMODE_1 1 11 # define JM_SUP_PATMODE_1 1
11 # define JM_SUP_PATMODE_2 1 12 # define JM_SUP_PATMODE_2 1
12 # define JM_SUP_PATMODE_3 1 13 # define JM_SUP_PATMODE_3 1
13 # define JM_SUP_PATMODE_4 1 14 # define JM_SUP_PATMODE_4 1
14 # define JM_SUP_PATMODE_5 1 15 # define JM_SUP_PATMODE_5 1
15 #endif 16 #endif
16 17
17 18
18 #define JSGETBUF(XV, XT) if (!dmf_read_str(inFile, XV, sizeof(XT))) return DMERR_OUT_OF_DATA 19 // Short helper macros for reading data
19 #define JSGETBYTE(XV) if (!dmf_read_byte(inFile, XV)) return DMERR_OUT_OF_DATA 20 #define JSGETBUF(XV, XT) \
21 if (!dmf_read_str(inFile, XV, sizeof(XT))) \
22 return DMERR_OUT_OF_DATA
23
24 #define JSGETBYTE(XV) \
25 if (!dmf_read_byte(inFile, XV)) \
26 return DMERR_OUT_OF_DATA
20 27
21 28
22 #if defined(JM_SUP_PATMODE_1) || defined(JM_SUP_PATMODE_3) 29 #if defined(JM_SUP_PATMODE_1) || defined(JM_SUP_PATMODE_3)
23 static int jssGetConvertedNote(DMResource *inFile, JSSNote *note) 30 static int jssGetConvertedNote(DMResource *inFile, JSSNote *note)
24 { 31 {
96 { 103 {
97 tmp = packb; 104 tmp = packb;
98 105
99 if (tmp == 127) 106 if (tmp == 127)
100 note->note = jsetNoteOff; 107 note->note = jsetNoteOff;
101 else if (tmp == 0) 108 else
109 if (tmp == 0)
102 note->note = jsetNotSet; 110 note->note = jsetNotSet;
103 else 111 else
104 note->note = tmp - 1; 112 note->note = tmp - 1;
105 113
106 JSGETBYTE(&tmp); 114 JSGETBYTE(&tmp);