Commit 850a0675 authored by anotherguest's avatar anotherguest

Fixed so transparent colour was n't drawn in single colour draw.

parent 912e6a55
......@@ -81,7 +81,7 @@ enum ANIHeaders
*/
void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width, int height) {
int pixels = 0;
unsigned char* endpixdata = pixdata+width*height;
unsigned char* endpixdata = pixdata + (width*height);
unsigned char* fillstart = NULL;
while (size > 0) {
unsigned char header = f->loadChar();
......@@ -121,7 +121,6 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width,
else if(header&0x40) {
unsigned char fillColor = f->loadChar();
unsigned char fillWidth = ((header-0x40)+1);
memset(pixdata, fillColor, fillWidth);
fillstart = pixdata;
......@@ -140,14 +139,14 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width,
for(int col = 0;col < copyWidth;col++) {
color= f->loadChar();
if(color != 0xff){
fillstart = pixdata;
while(fillstart < endpixdata) {
*fillstart = color;
fillstart+=width;
}
}
pixdata++;
pixels++;
size--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment