Mercurial > audlegacy-plugins
changeset 2381:75de016f8979
Warning cleanups.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 12 Feb 2008 02:22:10 -0600 |
parents | 59176b4ad908 |
children | 9f1dc50ed75d |
files | src/adplug/core/a2m.cxx src/adplug/core/adplug.cxx src/adplug/core/d00.cxx src/adplug/core/imf.cxx src/adplug/core/protrack.cxx |
diffstat | 5 files changed, 24 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/adplug/core/a2m.cxx Mon Feb 11 05:39:32 2008 +0100 +++ b/src/adplug/core/a2m.cxx Tue Feb 12 02:22:10 2008 -0600 @@ -70,7 +70,7 @@ char id[10]; int i, j, k, t; unsigned int l; - unsigned char *org, *orgptr, flags = 0, numpats, version; + unsigned char *org = NULL, *orgptr, flags = 0, numpats, version; unsigned long crc, alength; unsigned short len[9], *secdata, *secptr; const unsigned char convfx[16] = @@ -383,10 +383,12 @@ freq[dad[a]] = freq[a] + freq[b]; a = dad[a]; if (a != ROOT) + { if (leftc[dad[a]] == a) b = rghtc[dad[a]]; else b = leftc[dad[a]]; + } } while (a != ROOT); if (freq[ROOT] == MAXFREQ)
--- a/src/adplug/core/adplug.cxx Mon Feb 11 05:39:32 2008 +0100 +++ b/src/adplug/core/adplug.cxx Tue Feb 12 02:22:10 2008 -0600 @@ -151,6 +151,7 @@ AdPlug_LogWrite ("Trying direct hit: %s\n", (*i)->filetype.c_str ()); aud_vfs_rewind (fd); if ((p = (*i)->factory (opl))) + { if (p->load (fd, fp)) { AdPlug_LogWrite ("got it!\n"); @@ -159,6 +160,7 @@ } else delete p; + } } #if 0
--- a/src/adplug/core/d00.cxx Mon Feb 11 05:39:32 2008 +0100 +++ b/src/adplug/core/d00.cxx Tue Feb 12 02:22:10 2008 -0600 @@ -214,6 +214,7 @@ } if (channel[c].levpuls != 0xff) // Levelpuls + { if (channel[c].frameskip) channel[c].frameskip--; else @@ -232,6 +233,7 @@ channel[c].modvol &= 63; setvolume (c); } + } } // song handling
--- a/src/adplug/core/imf.cxx Mon Feb 11 05:39:32 2008 +0100 +++ b/src/adplug/core/imf.cxx Tue Feb 12 02:22:10 2008 -0600 @@ -119,6 +119,7 @@ // read footer, if any if (fsize && (fsize < flsize - 2 - mfsize)) + { if (f->readInt (1) == 0x1a) { // Adam Nielsen's footer format @@ -135,6 +136,7 @@ f->readString (footer, footerlen); footer[footerlen] = '\0'; // Make ASCIIZ string } + } rate = getrate (fd->uri, fp, f); fp.close (f);
--- a/src/adplug/core/protrack.cxx Mon Feb 11 05:39:32 2008 +0100 +++ b/src/adplug/core/protrack.cxx Tue Feb 12 02:22:10 2008 -0600 @@ -76,6 +76,7 @@ oplchan = set_opl_chip (chan); if (arplist && arpcmd && inst[channel[chan].inst].arpstart) // special arpeggio + { if (channel[chan].arpspdcnt) channel[chan].arpspdcnt--; else if (arpcmd[channel[chan].arppos] != 255) @@ -125,6 +126,7 @@ channel[chan].arppos++; channel[chan].arpspdcnt = inst[channel[chan].inst].arpspeed - 1; } + } info1 = channel[chan].info1; info2 = channel[chan].info2; @@ -759,10 +761,10 @@ unsigned char ivol1 = inst[channel[chan].inst].data[10] & 63; opl->write (0x40 + op_table[oplchan], - (((63 - channel[chan].vol2 & 63) + ivol2) >> 1) + + (((63 - (channel[chan].vol2 & 63)) + ivol2) >> 1) + (inst[channel[chan].inst].data[9] & 192)); opl->write (0x43 + op_table[oplchan], - (((63 - channel[chan].vol1 & 63) + ivol1) >> 1) + + (((63 - (channel[chan].vol1 & 63)) + ivol1) >> 1) + (inst[channel[chan].inst].data[10] & 192)); } @@ -775,7 +777,7 @@ if (channel[chan].key) opl->write (0xb0 + oplchan, ((channel[chan].freq & 768) >> 8) + - (channel[chan].oct << 2) | 32); + ((channel[chan].oct << 2) | 32)); else opl->write (0xb0 + oplchan, ((channel[chan].freq & 768) >> 8) + (channel[chan].oct << 2)); @@ -818,6 +820,7 @@ CmodPlayer::setnote (unsigned char chan, int note) { if (note > 96) + { if (note == 127) { // key off channel[chan].key = 0; @@ -826,6 +829,7 @@ } else note = 96; + } if (note < 13) channel[chan].freq = notetable[note - 1]; @@ -842,6 +846,7 @@ { channel[chan].freq -= amount; if (channel[chan].freq <= 342) + { if (channel[chan].oct) { channel[chan].oct--; @@ -849,6 +854,7 @@ } else channel[chan].freq = 342; + } } void @@ -856,6 +862,7 @@ { channel[chan].freq += amount; if (channel[chan].freq >= 686) + { if (channel[chan].oct < 7) { channel[chan].oct++; @@ -863,6 +870,7 @@ } else channel[chan].freq = 686; + } } void @@ -957,10 +965,12 @@ else channel[chan].vol1 = 63; if (inst[channel[chan].inst].data[0] & 1) + { if (channel[chan].vol2 + amount < 63) channel[chan].vol2 += amount; else channel[chan].vol2 = 63; + } } void @@ -971,8 +981,10 @@ else channel[chan].vol1 = 0; if (inst[channel[chan].inst].data[0] & 1) + { if (channel[chan].vol2 - amount > 0) channel[chan].vol2 -= amount; else channel[chan].vol2 = 0; + } }