mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- 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:
parent
7308979c44
commit
2dff0e7309
3 changed files with 7 additions and 4 deletions
|
@ -106,7 +106,7 @@ struct maplinedef_t
|
||||||
uint16_t v1;
|
uint16_t v1;
|
||||||
uint16_t v2;
|
uint16_t v2;
|
||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
int16_t special;
|
uint16_t special;
|
||||||
int16_t tag;
|
int16_t tag;
|
||||||
uint16_t sidenum[2]; // sidenum[1] will be -1 if one sided
|
uint16_t sidenum[2]; // sidenum[1] will be -1 if one sided
|
||||||
|
|
||||||
|
|
|
@ -2173,6 +2173,9 @@ void P_LoadLineDefs (MapData * map)
|
||||||
// [RH] Translate old linedef special and flags to be
|
// [RH] Translate old linedef special and flags to be
|
||||||
// compatible with the new format.
|
// 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);
|
P_TranslateLineDef (ld, mld, -1);
|
||||||
// do not assign the tag for Extradata lines.
|
// do not assign the tag for Extradata lines.
|
||||||
if (ld->special != Static_Init || (ld->args[1] != Init_EDLine && ld->args[1] != Init_EDSector))
|
if (ld->special != Static_Init || (ld->args[1] != Init_EDLine && ld->args[1] != Init_EDSector))
|
||||||
|
|
|
@ -64,9 +64,9 @@ typedef enum
|
||||||
|
|
||||||
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid)
|
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid)
|
||||||
{
|
{
|
||||||
unsigned short special = (unsigned short) LittleShort(mld->special);
|
uint32_t special = mld->special;
|
||||||
short tag = LittleShort(mld->tag);
|
short tag = mld->tag;
|
||||||
uint32_t flags = LittleShort(mld->flags);
|
uint32_t flags =mld->flags;
|
||||||
INTBOOL passthrough = 0;
|
INTBOOL passthrough = 0;
|
||||||
|
|
||||||
uint32_t flags1 = flags;
|
uint32_t flags1 = flags;
|
||||||
|
|
Loading…
Reference in a new issue