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 ...@@ -81,7 +81,7 @@ enum ANIHeaders
*/ */
void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width, int height) { void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width, int height) {
int pixels = 0; int pixels = 0;
unsigned char* endpixdata = pixdata+width*height; unsigned char* endpixdata = pixdata + (width*height);
unsigned char* fillstart = NULL; unsigned char* fillstart = NULL;
while (size > 0) { while (size > 0) {
unsigned char header = f->loadChar(); unsigned char header = f->loadChar();
...@@ -120,8 +120,7 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width, ...@@ -120,8 +120,7 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width,
} }
else if(header&0x40) { else if(header&0x40) {
unsigned char fillColor = f->loadChar(); unsigned char fillColor = f->loadChar();
unsigned char fillWidth = ((header-0x40)+1); unsigned char fillWidth = ((header-0x40)+1);
memset(pixdata, fillColor, fillWidth);
fillstart = pixdata; fillstart = pixdata;
...@@ -140,14 +139,14 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width, ...@@ -140,14 +139,14 @@ void Scene::LoadCompacted(int& size, File* f, unsigned char* pixdata, int width,
for(int col = 0;col < copyWidth;col++) { for(int col = 0;col < copyWidth;col++) {
color= f->loadChar(); color= f->loadChar();
if(color != 0xff){
fillstart = pixdata; fillstart = pixdata;
while(fillstart < endpixdata) { while(fillstart < endpixdata) {
*fillstart = color; *fillstart = color;
fillstart+=width; fillstart+=width;
}
} }
pixdata++; pixdata++;
pixels++; pixels++;
size--; 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