This commit is contained in:
Paul 2001-07-06 18:19:03 +00:00
parent d94fc7d455
commit 6ed055dfe3

View file

@ -521,18 +521,16 @@ void CMapScene::copyImageToScreen(int _file,int _x,int _y,int _w,int _h)
{ {
u8 *image; u8 *image;
u16 *src,*dst; u16 *src,*dst;
int x,y; int x;
image=CFileIO::loadFile((FileEquate)_file);ASSERT(image); image=CFileIO::loadFile((FileEquate)_file);ASSERT(image);
src=(u16*)image; src=(u16*)image;
dst=(u16*)m_screenImage+(_x+(_y*512)); dst=(u16*)m_screenImage+(_x+(_y*512));
for(y=0;y<_h;y++) for(y=0;y<_h;y++)
{ {
for(x=0;x<_w;x++) memcpy(dst,src,_w*2);
{ dst+=512;
*dst++=*src++; src+=_w;
}
dst+=512-_w;
} }
MemFree(image); MemFree(image);
} }