Trecerea la un Granny updatat este un lucru pozitiv, in noile versiuni fiind reparate o multime de bug-uri.
Aveți nevoie de sursa binary (sursa client)
Tutorial :
NU UITAȚI SĂ FACEȚI UN BACK-UP ÎNAINTE!
1. Descarcati fisierul de mai jos si dezarhivati tot intr-un folder. In sursa binary la "include" vei transfera fisierul granny.h din arhiva. Iar din arhiva, din folderul lib, puneti toate fisierele in folderul lib din client.
2. Intrati in sursa si cautati folderul EterGrnLib. Deschideti Mesh.cpp.
Cauta :
int * boneIndices = GrannyGetMeshBindingToBoneIndices(pgrnMeshBinding);
Inlocuieste cu :
int * boneIndices = (int*)GrannyGetMeshBindingToBoneIndices(pgrnMeshBinding);
Cauta :
return GrannyGetMeshBindingToBoneIndices(m_pgrnMeshBindingTemp);
Inlocuieste cu :
return (int*)GrannyGetMeshBindingToBoneIndices(m_pgrnMeshBindingTemp);
Cauta :
m_pgrnMeshDeformer = GrannyNewMeshDeformer(pgrnInputType, pgrnOutputType, GrannyDeformPositionNormal);
Inlocuieste cu :
m_pgrnMeshDeformer = GrannyNewMeshDeformer(pgrnInputType, pgrnOutputType, GrannyDeformPositionNormal, GrannyAllowUncopiedTail);
----
Deschide ModelInstanceUpdate.cpp.
Cauta :
GrannyUpdateModelMatrix(m_pgrnModelInstance, fSecondsElapsed, (const float *) pMatrix, (float *) pMatrix);
Inlocuieste cu :
GrannyUpdateModelMatrix(m_pgrnModelInstance, fSecondsElapsed, (const float *) pMatrix, (float *) pMatrix, false);
---
Deschide Material.cpp.
Cauta :
granny_variant twoSideResult = GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided");
if (NULL != twoSideResult.Type)
GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided);
Inlocuieste cu :
granny_variant twoSideResult;
if (GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided", &twoSideResult)
&& NULL != twoSideResult.Type)
GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided, NULL);
----
Deschide ModelInstanceModel.cpp
Cauta :
return GrannyGetMeshBindingToBoneIndices(m_vct_pgrnMeshBinding[iMeshBinding]);
Inlocuieste cu :
return (int*)GrannyGetMeshBindingToBoneIndices(m_vct_pgrnMeshBinding[iMeshBinding]);
---
Deschide folderul UserInterface.
Deschide UserInterface.cpp.
Cauta :
static void GrannyError(granny_log_message_type Type,
granny_log_message_origin Origin,
char const *Error,
void *UserData)
{
TraceError("GRANNY: %s", Error);
}
Modifica/Inlocuieste cu :
static void GrannyError(granny_log_message_type Type,
granny_log_message_origin Origin,
char const* File,
granny_int32x Line,
char const *Error,
void *UserData)
{
TraceError("GRANNY: %s", Error);
}
Compilezi sursa si pui granny2.dll in folderul clientului. That's it!
Descarcare Granny 2.9.12: