Hi! I need to blit an RGBA surface using a scaling parameter. In order to do that, I'm using the following method of the ClassEDisplay class:
Unfortunately, the output isn't showing a scaled image (in fact, it doesn't show any image at all, unless I use 65536 for the scale parameter). Does the aforementioned method deal with scaling parameters different than 65536 or should I keep on checking my code?
My other question is related to the sound wrapper: I'm trying to load a music file using the following method:
In order to do that, I'm using the following piece of code:
Unfortunately, the sound file doesn't seem to load properly since I cannot listen to it when I try to play it. Notice that it plays correctly if I replace the code above with the following one:
Is it possible that there might be a bug in the implementation of the first LoadMusic method?
Thanks in advance for your answers,
--Nacho
- Code:
void Blt(long center_x, long center_y, E2DSurfaceRGBA *source, RECT *rc, unsigned short rotation, unsigned long scale, unsigned char flipflags = EFLIP_NONE)
Unfortunately, the output isn't showing a scaled image (in fact, it doesn't show any image at all, unless I use 65536 for the scale parameter). Does the aforementioned method deal with scaling parameters different than 65536 or should I keep on checking my code?
My other question is related to the sound wrapper: I'm trying to load a music file using the following method:
- Code:
ERESULT LoadMusic(unsigned long index, void *data, unsigned long datasize)
In order to do that, I'm using the following piece of code:
- Code:
int iLength;
int ifreadRetVal;
FILE *lpFile;
char *lpAuxBuffer;
lpFile = fopen(lpMusicFilepath,"rb");
if(!lpFile)
{
return SOUNDMANAGER_FAILED;
} // End if.
fseek(lpFile,0,SEEK_END);
iLength = ftell(lpFile);
rewind(lpFile);
lpAuxBuffer = (char*)malloc(iLength);
ifreadRetVal = fread(lpAuxBuffer,sizeof(char),iLength,lpFile);
lResult = m_lpSoundSystem->LoadMusic(iIndex,(void*)lpAuxBuffer,iLength);
free(lpAuxBuffer);
fclose(lpFile);
Unfortunately, the sound file doesn't seem to load properly since I cannot listen to it when I try to play it. Notice that it plays correctly if I replace the code above with the following one:
- Code:
lResult = m_lpSoundSystem->LoadMusic(iIndex,lpMusicFilepath);
Is it possible that there might be a bug in the implementation of the first LoadMusic method?
Thanks in advance for your answers,
--Nacho