summaryrefslogtreecommitdiff
path: root/apps/codecs/dumb/src/it/xmeffect.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/dumb/src/it/xmeffect.c')
-rw-r--r--apps/codecs/dumb/src/it/xmeffect.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/codecs/dumb/src/it/xmeffect.c b/apps/codecs/dumb/src/it/xmeffect.c
index 51995f3bb8..81b86c95b6 100644
--- a/apps/codecs/dumb/src/it/xmeffect.c
+++ b/apps/codecs/dumb/src/it/xmeffect.c
@@ -78,12 +78,16 @@ static const char xm_has_memory[] = {
78/* Effects marked with 'special' are handled specifically in itrender.c */ 78/* Effects marked with 'special' are handled specifically in itrender.c */
79void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry) 79void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
80{ 80{
81#ifdef SIMULATOR
81const int log = 0; 82const int log = 0;
83#endif
82 84
83 if ((!effect && !value) || (effect >= XM_N_EFFECTS)) 85 if ((!effect && !value) || (effect >= XM_N_EFFECTS))
84 return; 86 return;
85 87
88#ifdef SIMULATOR
86if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value); 89if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
90#endif
87 91
88 /* Linearisation of the effect number... */ 92 /* Linearisation of the effect number... */
89 if (effect == XM_E) { 93 if (effect == XM_E) {
@@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
94 value = LOW(value); 98 value = LOW(value);
95 } 99 }
96 100
101#ifdef SIMULATOR
97if (log) printf(" - %2d %02X", effect, value); 102if (log) printf(" - %2d %02X", effect, value);
103#endif
98 104
99#if 0 // This should be handled in itrender.c! 105#if 0 // This should be handled in itrender.c!
100 /* update effect memory */ 106 /* update effect memory */
@@ -227,16 +233,20 @@ if (log) printf(" - %2d %02X", effect, value);
227 entry->mask &= ~IT_ENTRY_EFFECT; 233 entry->mask &= ~IT_ENTRY_EFFECT;
228 } 234 }
229 235
236#ifdef SIMULATOR
230if (log) printf(" - %2d %02X", effect, value); 237if (log) printf(" - %2d %02X", effect, value);
231 238#endif
239
232 /* Inverse linearisation... */ 240 /* Inverse linearisation... */
233 if (effect >= SBASE && effect < SBASE+16) { 241 if (effect >= SBASE && effect < SBASE+16) {
234 value = EFFECT_VALUE(effect-SBASE, value); 242 value = EFFECT_VALUE(effect-SBASE, value);
235 effect = IT_S; 243 effect = IT_S;
236 } 244 }
237 245
246#ifdef SIMULATOR
238if (log) printf(" - %c%02X\n", 'A'+effect-1, value); 247if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
239 248#endif
249
240 entry->effect = effect; 250 entry->effect = effect;
241 entry->effectvalue = value; 251 entry->effectvalue = value;
242} 252}