mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Correct some very suspicious looking code.
While accessing short foo[2][4]; as foo[0][0..7] should work in theory, who knows what gcc does with it when optimizing. I don't know if this will fix johnnyonflame's bsp loading problem, but no point in having rhinodemonic code hanging around.
This commit is contained in:
parent
65024af8c4
commit
fe9fb41f93
1 changed files with 9 additions and 3 deletions
|
@ -206,8 +206,10 @@ swap_to_bsp29 (bsp29_t *bsp29, const bsp_t *bsp2)
|
|||
// texinfos
|
||||
for (i=0 ; i<bsp29->numtexinfo ; i++) {
|
||||
texinfo_t *texinfo = &bsp29->texinfo[i];
|
||||
for (j=0 ; j<8 ; j++)
|
||||
for (j=0 ; j < 4 ; j++) {
|
||||
texinfo->vecs[0][j] = LittleFloat (texinfo->vecs[0][j]);
|
||||
texinfo->vecs[1][j] = LittleFloat (texinfo->vecs[1][j]);
|
||||
}
|
||||
texinfo->miptex = LittleLong (texinfo->miptex);
|
||||
texinfo->flags = LittleLong (texinfo->flags);
|
||||
}
|
||||
|
@ -355,8 +357,10 @@ swap_from_bsp29 (bsp_t *bsp2, const bsp29_t *bsp29,
|
|||
// texinfos
|
||||
for (i=0 ; i<bsp2->numtexinfo ; i++) {
|
||||
texinfo_t *texinfo = &bsp2->texinfo[i];
|
||||
for (j=0 ; j<8 ; j++)
|
||||
for (j=0 ; j < 4 ; j++) {
|
||||
texinfo->vecs[0][j] = LittleFloat (texinfo->vecs[0][j]);
|
||||
texinfo->vecs[1][j] = LittleFloat (texinfo->vecs[1][j]);
|
||||
}
|
||||
texinfo->miptex = LittleLong (texinfo->miptex);
|
||||
texinfo->flags = LittleLong (texinfo->flags);
|
||||
}
|
||||
|
@ -503,8 +507,10 @@ swap_bsp (bsp_t *bsp, int todisk, void (*cb) (const bsp_t *, void *),
|
|||
// texinfos
|
||||
for (i=0 ; i<bsp->numtexinfo ; i++) {
|
||||
texinfo_t *texinfo = &bsp->texinfo[i];
|
||||
for (j=0 ; j<8 ; j++)
|
||||
for (j=0 ; j < 4 ; j++) {
|
||||
texinfo->vecs[0][j] = LittleFloat (texinfo->vecs[0][j]);
|
||||
texinfo->vecs[1][j] = LittleFloat (texinfo->vecs[1][j]);
|
||||
}
|
||||
texinfo->miptex = LittleLong (texinfo->miptex);
|
||||
texinfo->flags = LittleLong (texinfo->flags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue