comparison src/xs_sidplay.h @ 460:9e683fb666ba

Updates
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 24 Jan 2007 22:10:00 +0000
parents f277dad3180f
children 6963982fcbb6
comparison
equal deleted inserted replaced
459:023fed5602f3 460:9e683fb666ba
1 /* Here comes the really ugly code... Get all SID-tune information 1 /* Here comes the really ugly code... Get all SID-tune information
2 * for all sub-tunes, including name, length, etc. 2 * for all sub-tunes, including name, length, etc.
3 */ 3 */
4 t_xs_tuneinfo *TFUNCTION(gchar * pcFilename) 4 t_xs_tuneinfo *TFUNCTION(gchar *pcFilename)
5 { 5 {
6 t_xs_tuneinfo *pResult; 6 t_xs_tuneinfo *pResult;
7 TTUNEINFO tuneInfo; 7 TTUNEINFO tuneInfo;
8 TTUNE *testTune; 8 TTUNE *testTune;
9 9
35 35
36 return pResult; 36 return pResult;
37 } 37 }
38 38
39 39
40 t_xs_tuneinfo *TFUNCTION2(t_xs_status * myStatus) 40 gboolean TFUNCTION2(t_xs_status *myStatus)
41 { 41 {
42 t_xs_tuneinfo *pResult;
43 TTUNEINFO tuneInfo; 42 TTUNEINFO tuneInfo;
44 TTUNE *testTune; 43 #ifdef _XS_SIDPLAY1_H
44 t_xs_sidplay1 *myEngine;
45 #endif
46 #ifdef _XS_SIDPLAY2_H
47 t_xs_sidplay2 *myEngine;
48 #endif
49
50 if (!myStatus || !myStatus->tuneInfo)
51 return FALSE;
45 52
46 /* Get general tune information */ 53 /* Get general tune information */
47 #ifdef _XS_SIDPLAY1_H 54 #ifdef _XS_SIDPLAY1_H
48 testTune->getInfo(tuneInfo); 55 testTune->getInfo(tuneInfo);
49 #endif 56 #endif
50 #ifdef _XS_SIDPLAY2_H 57 #ifdef _XS_SIDPLAY2_H
51 tuneInfo = testTune->getInfo(); 58 tuneInfo = testTune->getInfo();
52 #endif 59 #endif
53 60
61 if (!tuneInfo)
62 return FALSE;
63
64
54 /* Allocate tuneinfo structure */ 65 /* Allocate tuneinfo structure */
55 pResult = xs_tuneinfo_new(pcFilename, 66 pResult = xs_tuneinfo_new(->pcFilename,
56 tuneInfo.songs, tuneInfo.startSong, 67 tuneInfo.songs, tuneInfo.startSong,
57 tuneInfo.infoString[0], tuneInfo.infoString[1], tuneInfo.infoString[2], 68 tuneInfo.infoString[0], tuneInfo.infoString[1], tuneInfo.infoString[2],
58 tuneInfo.loadAddr, tuneInfo.initAddr, tuneInfo.playAddr, 69 tuneInfo.loadAddr, tuneInfo.initAddr, tuneInfo.playAddr,
59 tuneInfo.dataFileLen, tuneInfo.formatString, 70 tuneInfo.dataFileLen, tuneInfo.formatString,
60 tuneInfo.sidModel, tuneInfo.songSpeed, tuneInfo.clockSpeed); 71 tuneInfo.sidModel, tuneInfo.songSpeed, tuneInfo.clockSpeed);
61 72
62 delete testTune; 73 return TRUE;
63
64 return pResult;
65 } 74 }
66
67
68 75
69 /* Undefine these */ 76 /* Undefine these */
70 #undef TFUNCTION 77 #undef TFUNCTION
78 #undef TFUNCTION2
71 #undef TTUNEINFO 79 #undef TTUNEINFO
72 #undef TTUNE 80 #undef TTUNE