- fixed: P_TranslateLinedef should not do any byte swapping but require passing of properly ordered values.

This gets called from several places, and the only one passing in potentially byte swapped values is P_LoadLineDefs.
All other uses of this function were essentially broken on PowerPC.
This commit is contained in:
Christoph Oelckers 2017-05-04 23:52:16 +02:00
parent 7308979c44
commit 2dff0e7309
3 changed files with 7 additions and 4 deletions

View file

@ -106,7 +106,7 @@ struct maplinedef_t
uint16_t v1;
uint16_t v2;
uint16_t flags;
int16_t special;
uint16_t special;
int16_t tag;
uint16_t sidenum[2]; // sidenum[1] will be -1 if one sided

View file

@ -2173,6 +2173,9 @@ void P_LoadLineDefs (MapData * map)
// [RH] Translate old linedef special and flags to be
// compatible with the new format.
mld->special = LittleShort(mld->special);
mld->tag = LittleShort(mld->tag);
mld->flags = LittleShort(mld->flags);
P_TranslateLineDef (ld, mld, -1);
// do not assign the tag for Extradata lines.
if (ld->special != Static_Init || (ld->args[1] != Init_EDLine && ld->args[1] != Init_EDSector))

View file

@ -64,9 +64,9 @@ typedef enum
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid)
{
unsigned short special = (unsigned short) LittleShort(mld->special);
short tag = LittleShort(mld->tag);
uint32_t flags = LittleShort(mld->flags);
uint32_t special = mld->special;
short tag = mld->tag;
uint32_t flags =mld->flags;
INTBOOL passthrough = 0;
uint32_t flags1 = flags;