mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 02:20:25 +01:00
Remove "64-bit issue" STUBBED() in Model.cpp, as it only looks fishy
.. but is really fine (most probably). I added comments instead; see them for explanation why it's fine ;-)
This commit is contained in:
parent
d228b6a7a7
commit
430e0c8a95
|
@ -481,7 +481,7 @@ ModelTextureVertex::ModelTextureVertex(void)
|
||||||
//------------------------------------------ WRITE
|
//------------------------------------------ WRITE
|
||||||
void ModelPolygonVertex::Write_t( CTStream *pFile) // throw char *
|
void ModelPolygonVertex::Write_t( CTStream *pFile) // throw char *
|
||||||
{
|
{
|
||||||
STUBBED("64-bit issue"); // DG: probably ok, because PtrToIndices() should have been called before this
|
// DG: this looks like a 64-bit issue, but most probably isn't as PtrToIndices() should have been called before this
|
||||||
(*pFile) << (INDEX) (size_t) mpv_ptvTransformedVertex;
|
(*pFile) << (INDEX) (size_t) mpv_ptvTransformedVertex;
|
||||||
(*pFile) << (INDEX) (size_t) mpv_ptvTextureVertex;
|
(*pFile) << (INDEX) (size_t) mpv_ptvTextureVertex;
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,8 @@ void ModelPolygonVertex::Read_t( CTStream *pFile) // throw char *
|
||||||
{
|
{
|
||||||
INDEX itmp;
|
INDEX itmp;
|
||||||
|
|
||||||
STUBBED("64-bit issue"); // DG: probably ok, because IndicesToPtrs() should be called afterwards
|
// DG: this looks like a 64-bit issue, but most probably isn't as IndicesToPtrs() should be
|
||||||
|
// called afterwards to restore actually valid pointers.
|
||||||
(*pFile) >> itmp;
|
(*pFile) >> itmp;
|
||||||
mpv_ptvTransformedVertex = (struct TransformedVertexData *) (size_t) itmp;
|
mpv_ptvTransformedVertex = (struct TransformedVertexData *) (size_t) itmp;
|
||||||
(*pFile) >> itmp;
|
(*pFile) >> itmp;
|
||||||
|
@ -1068,10 +1069,11 @@ void CModelData::IndicesToPtrs()
|
||||||
FOREACHINSTATICARRAY(it1.Current().mp_PolygonVertices, ModelPolygonVertex, it2)
|
FOREACHINSTATICARRAY(it1.Current().mp_PolygonVertices, ModelPolygonVertex, it2)
|
||||||
{
|
{
|
||||||
struct ModelPolygonVertex * pMPV = &it2.Current();
|
struct ModelPolygonVertex * pMPV = &it2.Current();
|
||||||
STUBBED("64-bit issue"); // DG: probably ok, the pointers really contain indices from PtrToIndices()
|
// DG: this looks like a 64-bit issue but is most probably ok, as the pointers
|
||||||
|
// should contain indices from PtrToIndices()
|
||||||
j = (INDEX) (size_t) it2.Current().mpv_ptvTransformedVertex;
|
j = (INDEX) (size_t) it2.Current().mpv_ptvTransformedVertex;
|
||||||
it2.Current().mpv_ptvTransformedVertex = &md_TransformedVertices[ j];
|
it2.Current().mpv_ptvTransformedVertex = &md_TransformedVertices[ j];
|
||||||
STUBBED("64-bit issue"); // DG: probably ok, the pointers really contain indices from PtrToIndices()
|
// DG: same here
|
||||||
j = (INDEX) (size_t) it2.Current().mpv_ptvTextureVertex;
|
j = (INDEX) (size_t) it2.Current().mpv_ptvTextureVertex;
|
||||||
it2.Current().mpv_ptvTextureVertex = &md_MipInfos[ i].mmpi_TextureVertices[ j];
|
it2.Current().mpv_ptvTextureVertex = &md_MipInfos[ i].mmpi_TextureVertices[ j];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user