From d9c704383292125d6c55d14d954540511a12ab49 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sun, 20 Apr 2025 15:49:40 +0900 Subject: [PATCH] fixing jar so it compiles on vs2010 --- engine/external/jar/jar_xm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/external/jar/jar_xm.h b/engine/external/jar/jar_xm.h index 22ffaad..3bbfc48 100644 --- a/engine/external/jar/jar_xm.h +++ b/engine/external/jar/jar_xm.h @@ -1441,6 +1441,7 @@ static float jar_xm_frequency(jar_xm_context_t* ctx, float period, float note_of gf_int8_t octave; float note; gf_uint16_t p1, p2; + gf_uint8_t i; switch(ctx->module.frequency_type) { @@ -1466,7 +1467,7 @@ static float jar_xm_frequency(jar_xm_context_t* ctx, float period, float note_of } /* Find the smallest note closest to the current period */ - for(gf_uint8_t i = 0; i < 12; ++i) { + for(i = 0; i < 12; ++i) { p1 = amiga_frequencies[i], p2 = amiga_frequencies[i + 1]; if(octave > 0) { @@ -1536,7 +1537,8 @@ static void jar_xm_handle_note_and_instrument(jar_xm_context_t* ctx, jar_xm_chan } else { if(instr->sample_of_notes[s->note - 1] < instr->num_samples) { #if JAR_XM_RAMPING - for(unsigned int z = 0; z < jar_xm_SAMPLE_RAMPING_POINTS; ++z) { + unsigned int z; + for(z = 0; z < jar_xm_SAMPLE_RAMPING_POINTS; ++z) { ch->end_of_previous_sample[z] = jar_xm_next_of_sample(ch); } ch->frame_count = 0;