I'm compiling the source using VS2012. I've read and implemented the suggestions in the "compiling" pages of the wiki. Doing this eliminated all but 14 errors. A bit of code correction eliminated ten syntax errors involving assignments (i.e.
Code: Select all
Something = {};
I'm left with four "error C2070: 'unknown': illegal sizeof operand" messages in the dmusic.cpp compilation (at lines 977, 979, 1053 & 1058). The offending lines of code are below:
Code: Select all
/* Region size depends on the number of wave loops. The size of the
* declared structure already accounts for one loop. */
if (rgn->wave_sample.cbSize != 0) {
i_size += sizeof(DMUS_REGION) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * rgn->wave_loops.size();
} else {
i_size += sizeof(DMUS_REGION) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * dls_file.waves[dls_file.pool_cues[rgn->wave.ulTableIndex].ulOffset].wave_loops.size();
Code: Select all
/* The wave sample data will be taken from the region, if defined, otherwise from the wave itself. */
if (rgn.wave_sample.cbSize != 0) {
inst_region->WSMP = rgn.wave_sample;
if (rgn.wave_loops.size() > 0) MemCpyT(inst_region->WLOOP, &rgn.wave_loops.front(), rgn.wave_loops.size());
instrument = (char *)(inst_region + 1) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * rgn.wave_loops.size();
} else {
inst_region->WSMP = rgn.wave_sample;
if (dls_file.waves[wave_id].wave_loops.size() > 0) MemCpyT(inst_region->WLOOP, &dls_file.waves[wave_id].wave_loops.front(), dls_file.waves[wave_id].wave_loops.size());
instrument = (char *)(inst_region + 1) - sizeof(DMUS_REGION::WLOOP) + sizeof(WLOOP) * dls_file.waves[wave_id].wave_loops.size();
}
Code: Select all
sizeof(DMUS_REGION::WLOOP)
Anyone have any thoughts on this?
Thanks,
JR