mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 22:19:07 +00:00
sync with icculus repo
This commit is contained in:
parent
5623b11f83
commit
321a65a9fb
2 changed files with 15 additions and 22 deletions
|
@ -803,21 +803,20 @@ bool isTouchingLine(Vector lineStart, Vector lineEnd, Vector point, int radius,
|
||||||
GLuint generateEmptyTexture(int quality) // Create An Empty Texture
|
GLuint generateEmptyTexture(int quality) // Create An Empty Texture
|
||||||
{
|
{
|
||||||
GLuint txtnumber=0; // Texture ID
|
GLuint txtnumber=0; // Texture ID
|
||||||
unsigned int* data; // Stored Data
|
unsigned char *data; // Stored Data
|
||||||
|
|
||||||
// Create Storage Space For Texture Data (128x128x4)
|
// Create Storage Space For Texture Data (128x128x4)
|
||||||
int size = (quality * quality) * 4;
|
int size = (quality * quality) * 4;
|
||||||
data = (unsigned int*)new GLuint[size];
|
data = new unsigned char[size];
|
||||||
|
|
||||||
memset(data, 0, size * sizeof(GLuint)); // Clear Storage Memory
|
|
||||||
|
|
||||||
|
memset(data, 0, size); // Clear Storage Memory
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_OPENGL
|
#ifdef BBGE_BUILD_OPENGL
|
||||||
glGenTextures(1, &txtnumber); // Create 1 Texture
|
glGenTextures(1, &txtnumber); // Create 1 Texture
|
||||||
glBindTexture(GL_TEXTURE_2D, txtnumber); // Bind The Texture
|
glBindTexture(GL_TEXTURE_2D, txtnumber); // Bind The Texture
|
||||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, 4, quality, quality, 0,
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, quality, quality, 0,
|
||||||
GL_RGBA, GL_UNSIGNED_BYTE, data); // Build Texture Using Information In data
|
GL_RGBA, GL_UNSIGNED_BYTE, data); // Build Texture Using Information In data
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,7 @@ void OggDecoder::decode_loop(OggDecoder *this_)
|
||||||
while (!this_->stop_thread)
|
while (!this_->stop_thread)
|
||||||
{
|
{
|
||||||
#ifdef BBGE_BUILD_SDL
|
#ifdef BBGE_BUILD_SDL
|
||||||
SDL_Delay(1);
|
SDL_Delay(10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int processed = 0;
|
int processed = 0;
|
||||||
|
@ -376,6 +376,12 @@ void OggDecoder::decode_loop(OggDecoder *this_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (defined(BBGE_BUILD_SDL) && (SDL_BYTEORDER == SDL_BIG_ENDIAN))
|
||||||
|
#define BBGE_BIGENDIAN 1
|
||||||
|
#else
|
||||||
|
#define BBGE_BIGENDIAN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
void OggDecoder::queue(ALuint buffer)
|
void OggDecoder::queue(ALuint buffer)
|
||||||
{
|
{
|
||||||
if (!playing || eof)
|
if (!playing || eof)
|
||||||
|
@ -391,7 +397,8 @@ void OggDecoder::queue(ALuint buffer)
|
||||||
int bitstream_unused;
|
int bitstream_unused;
|
||||||
const int nread = ov_read(
|
const int nread = ov_read(
|
||||||
&vf, pcm_buffer + pcm_size, buffer_size - pcm_size,
|
&vf, pcm_buffer + pcm_size, buffer_size - pcm_size,
|
||||||
/*bigendianp*/ 0, /*word*/ 2, /*sgned*/ 1, &bitstream_unused
|
/*bigendianp*/ BBGE_BIGENDIAN, /*word*/ 2, /*sgned*/ 1,
|
||||||
|
&bitstream_unused
|
||||||
);
|
);
|
||||||
if (nread == 0 || nread == OV_EOF)
|
if (nread == 0 || nread == OV_EOF)
|
||||||
{
|
{
|
||||||
|
@ -513,8 +520,6 @@ namespace FMOD {
|
||||||
return ((OpenAL##cls *) this)->method args; \
|
return ((OpenAL##cls *) this)->method args; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static ALenum GVorbisFormat = AL_NONE;
|
|
||||||
|
|
||||||
// FMOD::Sound implementation ...
|
// FMOD::Sound implementation ...
|
||||||
|
|
||||||
class OpenALSound
|
class OpenALSound
|
||||||
|
@ -1217,17 +1222,6 @@ FMOD_RESULT OpenALSystem::init(int maxchannels, const FMOD_INITFLAGS flags, cons
|
||||||
|
|
||||||
SANITY_CHECK_OPENAL_CALL();
|
SANITY_CHECK_OPENAL_CALL();
|
||||||
|
|
||||||
GVorbisFormat = AL_NONE;
|
|
||||||
if (alIsExtensionPresent("AL_EXT_vorbis"))
|
|
||||||
GVorbisFormat = alGetEnumValue("AL_FORMAT_VORBIS_EXT");
|
|
||||||
|
|
||||||
#if 0 // Disabled output: every bug report thinks this is the culprit. --ryan.
|
|
||||||
if (GVorbisFormat == AL_NONE)
|
|
||||||
fprintf(stderr, "WARNING: no AL_EXT_vorbis support. We'll use more RAM.\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SANITY_CHECK_OPENAL_CALL();
|
|
||||||
|
|
||||||
master_channel_group = new OpenALChannelGroup("master");
|
master_channel_group = new OpenALChannelGroup("master");
|
||||||
|
|
||||||
num_channels = maxchannels;
|
num_channels = maxchannels;
|
||||||
|
|
Loading…
Reference in a new issue