- Updated flibitEFX from latest flibit2D build.
- The underwater effect is now just a low-pass filter. Reverb == bleh.
This commit is contained in:
Binary file not shown.
@@ -42,8 +42,7 @@ import java.nio.FloatBuffer;
|
|||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
import java.nio.ShortBuffer;
|
import java.nio.ShortBuffer;
|
||||||
|
|
||||||
import com.flibitijibibo.flibitEFX.EFXEffectUnderwater;
|
import com.flibitijibibo.flibitEFX.EFXFilterLowPass;
|
||||||
import com.flibitijibibo.flibitEFX.EFXFilterUnderwater;
|
|
||||||
import org.lwjgl.LWJGLException;
|
import org.lwjgl.LWJGLException;
|
||||||
import org.lwjgl.openal.AL;
|
import org.lwjgl.openal.AL;
|
||||||
import org.lwjgl.openal.AL10;
|
import org.lwjgl.openal.AL10;
|
||||||
@@ -70,8 +69,7 @@ public final class LWJGLSoundImpl implements Sound {
|
|||||||
/** EFX Variables */
|
/** EFX Variables */
|
||||||
private int currentEffectIndex;
|
private int currentEffectIndex;
|
||||||
private int currentFilterIndex;
|
private int currentFilterIndex;
|
||||||
private EFXEffectUnderwater underwaterEffect;
|
private EFXFilterLowPass underwaterFilter;
|
||||||
private EFXFilterUnderwater underwaterFilter;
|
|
||||||
|
|
||||||
// singleton
|
// singleton
|
||||||
private LWJGLSoundImpl() {
|
private LWJGLSoundImpl() {
|
||||||
@@ -156,15 +154,13 @@ public final class LWJGLSoundImpl implements Sound {
|
|||||||
private void initOpenALExtensions()
|
private void initOpenALExtensions()
|
||||||
{
|
{
|
||||||
Com.Printf("... using EFX effects:\n");
|
Com.Printf("... using EFX effects:\n");
|
||||||
underwaterEffect = new EFXEffectUnderwater();
|
underwaterFilter = new EFXFilterLowPass();
|
||||||
underwaterFilter = new EFXFilterUnderwater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void exitOpenAL()
|
void exitOpenAL()
|
||||||
{
|
{
|
||||||
// Unload EFX Effects
|
// Unload EFX Effects
|
||||||
underwaterEffect.killEffect();
|
|
||||||
underwaterFilter.killFilter();
|
underwaterFilter.killFilter();
|
||||||
|
|
||||||
// Release the context and the device.
|
// Release the context and the device.
|
||||||
@@ -266,7 +262,6 @@ public final class LWJGLSoundImpl implements Sound {
|
|||||||
|
|
||||||
// Detect EFX Conditions
|
// Detect EFX Conditions
|
||||||
if ((GameBase.gi.pointcontents.pointcontents(origin)& Defines.MASK_WATER)!= 0) {
|
if ((GameBase.gi.pointcontents.pointcontents(origin)& Defines.MASK_WATER)!= 0) {
|
||||||
currentEffectIndex = underwaterEffect.getIndex();
|
|
||||||
currentFilterIndex = underwaterFilter.getIndex();
|
currentFilterIndex = underwaterFilter.getIndex();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user