1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

small improvements

This commit is contained in:
mateuszb 2008-01-20 17:10:01 +00:00
parent 8fea2b87b8
commit 7cb9c879ca
4 changed files with 6 additions and 6 deletions

View File

@ -728,7 +728,7 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y)
for (int i=0;i<TopMargin;i++) for (int i=0;i<TopMargin;i++)
{ {
for (int j=0;j<FullWidth+add;j++) for (int j=0;j<FullWidth+add;j++)
FTemp+=fbuffer[j]; FTemp+='\0';
} }
} }
RLEntries = new int[SpriteHeight]; RLEntries = new int[SpriteHeight];
@ -742,7 +742,7 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y)
if (LeftMargin>0) if (LeftMargin>0)
{ {
for (int j=0;j<LeftMargin;j++) for (int j=0;j<LeftMargin;j++)
FTemp+=fbuffer[j]; FTemp+='\0';
} }
TotalRowLength=0; TotalRowLength=0;
do do
@ -774,12 +774,12 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y)
if (RightMargin>0) if (RightMargin>0)
{ {
for (int j=0;j<RightMargin;j++) for (int j=0;j<RightMargin;j++)
FTemp+=fbuffer[j]; FTemp+='\0';
} }
if (add>0) if (add>0)
{ {
for (int j=0;j<add+RowAdd;j++) for (int j=0;j<add+RowAdd;j++)
FTemp+=fbuffer[j]; FTemp+='\0';
} }
} }
delete RLEntries; delete RLEntries;
@ -789,7 +789,7 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y)
for (int i=0;i<BottomMargin;i++) for (int i=0;i<BottomMargin;i++)
{ {
for (int j=0;j<FullWidth+add;j++) for (int j=0;j<FullWidth+add;j++)
FTemp+=fbuffer[j]; FTemp+='\0';
} }
} }
} }

Binary file not shown.

Binary file not shown.

View File

@ -78,7 +78,7 @@ void CPCXConv::convert()
format=PCX8B; format=PCX8B;
else else
return; return;
add=(int)(4*(((float)1)-(((float)bh.x/(float)4)-((int)((float)bh.x/(float)4))))); add = 4 - bh.x%4;
if (add==4) if (add==4)
add=0; add=0;
bh._h3=bh.x*bh.y; bh._h3=bh.x*bh.y;