annotate src/xs_sidplay.h @ 412:7f694e5a1493

Updated GNU GPL (new FSF address) and some cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 14 Aug 2006 00:49:02 +0000
parents f997b79a7251
children f277dad3180f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
402
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
1 /* Here comes the really ugly code... Get all SID-tune information
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
2 * for all sub-tunes, including name, length, etc.
76
741291e14080 Added missing header
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 */
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
4 t_xs_tuneinfo *TFUNCTION(gchar * pcFilename)
76
741291e14080 Added missing header
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 {
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
6 t_xs_tuneinfo *pResult;
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
7 TTUNEINFO tuneInfo;
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
8 TTUNE *testTune;
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
9 gboolean haveInfo = TRUE;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
10
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
11 /* Check if the tune exists and is readable */
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
12 if ((testTune = new TTUNE(pcFilename)) == NULL)
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
13 return NULL;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
14
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
15 if (!testTune->getStatus()) {
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
16 delete testTune;
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
17 return NULL;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
18 }
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
19
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
20 /* Get general tune information */
95
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
21 #ifdef _XS_SIDPLAY1_H
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
22 haveInfo = testTune->getInfo(tuneInfo);
95
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
23 #endif
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
24 #ifdef _XS_SIDPLAY2_H
412
7f694e5a1493 Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 402
diff changeset
25 tuneInfo = testTune->getInfo();
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
26 haveInfo = TRUE;
95
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
27 #endif
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
28
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
29 /* Allocate tuneinfo structure */
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
30 pResult = xs_tuneinfo_new(pcFilename,
402
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
31 tuneInfo.songs, tuneInfo.startSong,
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
32 tuneInfo.infoString[0], tuneInfo.infoString[1], tuneInfo.infoString[2],
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
33 tuneInfo.loadAddr, tuneInfo.initAddr, tuneInfo.playAddr,
f997b79a7251 More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents: 373
diff changeset
34 tuneInfo.dataFileLen, tuneInfo.formatString);
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
35
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
36 delete testTune;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
37
359
b1a858b8cb1a Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
38 return pResult;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
39 }
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
40
95
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
41 /* Undefine these */
202
fe684a2ccdc7 Reworking code.
Matti Hamalainen <ccr@tnsp.org>
parents: 130
diff changeset
42 #undef TFUNCTION
95
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
43 #undef TTUNEINFO
4e929bb71057 Fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
44 #undef TTUNE