diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d9a196844..961846a0e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -668,7 +668,7 @@ static void G_ShowCacheLocks(void) break; Bsprintf(tempbuf, "snd #%d inst %d: voice %d, ow %d", i, j, - g_sounds[i].SoundOwner[j].voice, g_sounds[i].SoundOwner[j].i); + g_sounds[i].SoundOwner[j].voice, g_sounds[i].SoundOwner[j].ow); printext256(240,k,31,-1,tempbuf,0); k += 9; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 4bf2dc23e..f5c727fb4 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -1095,7 +1095,7 @@ skip_check: continue; } VM_CONDITIONAL(S_CheckSoundPlaying(vm.g_i,*insptr)); - // VM_DoConditional(SoundOwner[*insptr][0].i == vm.g_i); + // VM_DoConditional(SoundOwner[*insptr][0].ow == vm.g_i); continue; case CON_STOPSOUND: @@ -4869,7 +4869,7 @@ nullquote: for (; k=0; j--) - if (g_sounds[j].SoundOwner[0].i == vm.g_i) + if (g_sounds[j].SoundOwner[0].ow == vm.g_i) break; VM_DoConditional(j < 0); diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index 47ea871ce..d80d268fc 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -76,7 +76,7 @@ void S_SoundStartup(void) { g_sounds[i].num = 0; g_sounds[i].SoundOwner[j].voice = 0; - g_sounds[i].SoundOwner[j].i = -1; + g_sounds[i].SoundOwner[j].ow = -1; } g_soundlocks[i] = 199; @@ -326,7 +326,7 @@ void S_Cleanup(void) num = (num - j) / MAXSOUNDINSTANCES; - i = g_sounds[num].SoundOwner[j].i; + i = g_sounds[num].SoundOwner[j].ow; if (g_sounds[num].num > MAXSOUNDINSTANCES) OSD_Printf(OSD_ERROR "S_Cleanup(): num exceeds MAXSOUNDINSTANCES! g_sounds[%d].num %d wtf?\n", num, g_sounds[num].num); @@ -338,7 +338,7 @@ void S_Cleanup(void) if (i != -1 && sprite[i].picnum == MUSICANDSFX && sector[sprite[i].sectnum].lotag < 3 && sprite[i].lotag < 999) actor[i].t_data[0] = 0; - g_sounds[num].SoundOwner[j].i = -1; + g_sounds[num].SoundOwner[j].ow = -1; g_sounds[num].SoundOwner[j].voice = 0; } g_soundlocks[num]--; @@ -409,7 +409,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) return -1; } - g_sounds[num].SoundOwner[j].i = i; + g_sounds[num].SoundOwner[j].ow = i; return voice; } @@ -535,7 +535,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) } g_sounds[num].num++; - g_sounds[num].SoundOwner[j].i = i; + g_sounds[num].SoundOwner[j].ow = i; g_sounds[num].SoundOwner[j].voice = voice; return voice; } @@ -613,7 +613,7 @@ int32_t S_PlaySound(int32_t num) } g_sounds[num].num++; - g_sounds[num].SoundOwner[j].i = -1; + g_sounds[num].SoundOwner[j].ow = -1; g_sounds[num].SoundOwner[j].voice = voice; return voice; } @@ -637,14 +637,14 @@ void S_StopEnvSound(int32_t num, int32_t i) { initprintf(OSD_ERROR "S_StopEnvSound(): too many iterations! The following IDs are still active for sound %d:\n", num); for (j=MAXSOUNDINSTANCES-1; j>=0; j--) - if (g_sounds[num].SoundOwner[j].i == i) - initprintf(OSD_ERROR "slot %d, voice %d, sprite %d\n", j, g_sounds[num].SoundOwner[j].voice, g_sounds[num].SoundOwner[j].i); + if (g_sounds[num].SoundOwner[j].ow == i) + initprintf(OSD_ERROR "slot %d, voice %d, sprite %d\n", j, g_sounds[num].SoundOwner[j].voice, g_sounds[num].SoundOwner[j].ow); return; } for (j=MAXSOUNDINSTANCES-1; j>=0; j--) { - if ((i == -1 && g_sounds[num].SoundOwner[j].voice > FX_Ok) || (i != -1 && g_sounds[num].SoundOwner[j].i == i)) + if ((i == -1 && g_sounds[num].SoundOwner[j].voice > FX_Ok) || (i != -1 && g_sounds[num].SoundOwner[j].ow == i)) { if (i >= 0 && g_sounds[num].SoundOwner[j].voice <= FX_Ok) initprintf(OSD_ERROR "S_StopEnvSound(): bad voice %d for sound ID %d index %d!\n", g_sounds[num].SoundOwner[j].voice, num, j); @@ -677,7 +677,7 @@ void S_ChangeSoundPitch(int32_t num, int32_t i, int32_t pitchoffset) { int32_t voice = g_sounds[num].SoundOwner[j].voice; - if ((i == -1 && voice > FX_Ok) || (i != -1 && g_sounds[num].SoundOwner[j].i == i)) + if ((i == -1 && voice > FX_Ok) || (i != -1 && g_sounds[num].SoundOwner[j].ow == i)) { if (i >= 0 && voice <= FX_Ok) initprintf(OSD_ERROR "S_ChangeSoundPitch(): bad voice %d for sound ID %d index %d!\n", voice, num, j); @@ -719,7 +719,7 @@ void S_Update(void) { for (k=MAXSOUNDINSTANCES-1; k>=0; k--) { - i = g_sounds[j].SoundOwner[k].i; + i = g_sounds[j].SoundOwner[k].ow; if ((unsigned)i >= MAXSPRITES || g_sounds[j].num == 0 || g_sounds[j].SoundOwner[k].voice <= FX_Ok) continue; @@ -728,7 +728,7 @@ void S_Update(void) { /* OSD_Printf("S_Update(): stale voice %d from sound %d position %d sprite %d\n", - g_sounds[j].SoundOwner[k].voice, j, k, g_sounds[j].SoundOwner[k].i); + g_sounds[j].SoundOwner[k].voice, j, k, g_sounds[j].SoundOwner[k].ow); */ continue; } @@ -808,7 +808,7 @@ int32_t A_CheckSoundPlaying(int32_t i, int32_t num) int32_t j=MAXSOUNDINSTANCES-1; for (; j>=0; j--) - if (g_sounds[num].SoundOwner[j].i == i) + if (g_sounds[num].SoundOwner[j].ow == i) return 1; } diff --git a/polymer/eduke32/source/sounds.h b/polymer/eduke32/source/sounds.h index e71bf13b4..9fa094e87 100644 --- a/polymer/eduke32/source/sounds.h +++ b/polymer/eduke32/source/sounds.h @@ -51,7 +51,7 @@ int32_t EnumAudioDevs(struct audioenumdrv **wave, struct audioenumdev **midi, st typedef struct { int16_t voice; - int16_t i; + int16_t ow; } SOUNDOWNER; diff --git a/polymer/eduke32/source/sounds_mapster32.c b/polymer/eduke32/source/sounds_mapster32.c index 79aba3457..2513f1da7 100644 --- a/polymer/eduke32/source/sounds_mapster32.c +++ b/polymer/eduke32/source/sounds_mapster32.c @@ -232,7 +232,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) if (g_sounds[num].num > 0 && PN != MUSICANDSFX) { - if (g_sounds[num].SoundOwner[0].i == i) S_StopSound(num); + if (g_sounds[num].SoundOwner[0].ow == i) S_StopSound(num); else if (g_sounds[num].num > 1) S_StopSound(num); // else if (A_CheckEnemySprite(&sprite[i]) && sprite[i].extra <= 0) S_StopSound(num); } @@ -270,7 +270,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) if (voice >= FX_Ok) { - g_sounds[num].SoundOwner[g_sounds[num].num].i = i; + g_sounds[num].SoundOwner[g_sounds[num].num].ow = i; g_sounds[num].SoundOwner[g_sounds[num].num].voice = voice; g_sounds[num].num++; } @@ -329,7 +329,7 @@ void S_PlaySound(int32_t num) if (voice >= FX_Ok) { - g_sounds[num].SoundOwner[g_sounds[num].num].i = -1; + g_sounds[num].SoundOwner[g_sounds[num].num].ow = -1; g_sounds[num].SoundOwner[g_sounds[num].num].voice = voice; g_sounds[num].num++; return; @@ -368,7 +368,7 @@ void S_StopEnvSound(int32_t num,int32_t i) { k = g_sounds[num].num; for (j=0; j