From: Laszlo T. <ave...@us...> - 2005-06-12 10:23:51
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3466/plugins/Core Modified Files: Animation.cpp GameScript.cpp Map.cpp Log Message: Fixed 2 animation bits: animation with palette, animation without lightmap Index: GameScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameScript.cpp,v retrieving revision 1.285 retrieving revision 1.286 diff -C2 -d -r1.285 -r1.286 *** GameScript.cpp 11 Jun 2005 20:18:00 -0000 1.285 --- GameScript.cpp 12 Jun 2005 10:23:36 -0000 1.286 *************** *** 7440,7443 **** --- 7440,7444 ---- return; } + anim->SetPalette( parameters->string0Parameter ); } Index: Map.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Map.cpp,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** Map.cpp 11 Jun 2005 20:18:01 -0000 1.169 --- Map.cpp 12 Jun 2005 10:23:37 -0000 1.170 *************** *** 550,554 **** if (!IsVisible( a->Pos, !(a->Flags & A_ANI_NOT_IN_FOG)) ) continue; ! Color tint = {0,0,0,0}; if (!(a->Flags&A_ANI_NO_SHADOW)) { tint = LightMap->GetPixel( a->Pos.x / 16, a->Pos.y / 12); --- 550,555 ---- if (!IsVisible( a->Pos, !(a->Flags & A_ANI_NOT_IN_FOG)) ) continue; ! //maybe we should divide only by 128, so brightening is possible too? In that case use 128,128,128 here ! Color tint = {255,255,255,0}; if (!(a->Flags&A_ANI_NO_SHADOW)) { tint = LightMap->GetPixel( a->Pos.x / 16, a->Pos.y / 12); *************** *** 693,697 **** if (!IsVisible( a->Pos, !(a->Flags & A_ANI_NOT_IN_FOG)) ) continue; ! Color tint = {0,0,0,0}; if (!(a->Flags&A_ANI_NO_SHADOW)) { tint = LightMap->GetPixel( a->Pos.x / 16, a->Pos.y / 12); --- 694,698 ---- if (!IsVisible( a->Pos, !(a->Flags & A_ANI_NOT_IN_FOG)) ) continue; ! Color tint = {255,255,255,0}; if (!(a->Flags&A_ANI_NO_SHADOW)) { tint = LightMap->GetPixel( a->Pos.x / 16, a->Pos.y / 12); *************** *** 1838,1841 **** --- 1839,1843 ---- void AreaAnimation::SetPalette(ieResRef Pal) { + Flags |= A_ANI_PALETTE; strnuprcpy(Palette, Pal, 8); ImageMgr *bmp = (ImageMgr *) core->GetInterface( IE_BMP_CLASS_ID); Index: Animation.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Animation.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Animation.cpp 11 Jun 2005 20:18:00 -0000 1.32 --- Animation.cpp 12 Jun 2005 10:23:36 -0000 1.33 *************** *** 170,175 **** Palette=video->GetPalette( frames[0] ); } ! if (Pal) ! memcpy( Palette, Pal, sizeof(Palette) ); } else { //no idea if this part will ever be used --- 170,177 ---- Palette=video->GetPalette( frames[0] ); } ! if (Pal) { ! //cannot use sizeof(Palette), it is just a pointer! ! memcpy( Palette, Pal, 256 * sizeof(Color) ); ! } } else { //no idea if this part will ever be used |