doom: fix alignment issues for arm
This commit is contained in:
parent
3a322e9f32
commit
460f482ad0
5 changed files with 11 additions and 15 deletions
|
@ -211,7 +211,6 @@ typedef struct
|
|||
short options;
|
||||
} mapthing_t;
|
||||
|
||||
|
||||
#pragma pack off
|
||||
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ wipe_doMelt
|
|||
|
||||
width/=2;
|
||||
|
||||
while (ticks--)
|
||||
while (ticks-- >= 0)
|
||||
{
|
||||
for (i=0;i<width;i++)
|
||||
{
|
||||
|
|
|
@ -396,7 +396,7 @@ P_NightmareRespawn (mobj_t* mobj)
|
|||
|
||||
// inherit attributes from deceased one
|
||||
mo = P_SpawnMobj (x,y,z, mobj->type);
|
||||
mo->spawnpoint = mobj->spawnpoint;
|
||||
memcpy (&mo->spawnpoint, mthing, sizeof(*mthing));
|
||||
mo->angle = ANG45 * (mthing->angle/45);
|
||||
|
||||
if (mthing->options & MTF_AMBUSH)
|
||||
|
@ -552,7 +552,7 @@ void P_RemoveMobj (mobj_t* mobj)
|
|||
&& (mobj->type != MT_INV)
|
||||
&& (mobj->type != MT_INS))
|
||||
{
|
||||
itemrespawnque[iquehead] = mobj->spawnpoint;
|
||||
memcpy (&itemrespawnque[iquehead], &mobj->spawnpoint, sizeof(mobj->spawnpoint));
|
||||
itemrespawntime[iquehead] = leveltime;
|
||||
iquehead = (iquehead+1)&(ITEMQUESIZE-1);
|
||||
|
||||
|
@ -625,7 +625,7 @@ void P_RespawnSpecials (void)
|
|||
z = ONFLOORZ;
|
||||
|
||||
mo = P_SpawnMobj (x,y,z, i);
|
||||
mo->spawnpoint = *mthing;
|
||||
memcpy (&mo->spawnpoint, mthing, sizeof(*mthing));
|
||||
mo->angle = ANG45 * (mthing->angle/45);
|
||||
|
||||
// pull it from the que
|
||||
|
@ -728,10 +728,10 @@ void P_SpawnMapThing (mapthing_t* mthing)
|
|||
}
|
||||
|
||||
// check for players specially
|
||||
if (mthing->type <= 4)
|
||||
if (mthing->type <= MAXPLAYERS)
|
||||
{
|
||||
// save spots for respawning in network games
|
||||
playerstarts[mthing->type-1] = *mthing;
|
||||
memcpy (&playerstarts[mthing->type-1], mthing, sizeof(*mthing));
|
||||
if (!deathmatch)
|
||||
P_SpawnPlayer (mthing);
|
||||
|
||||
|
@ -784,7 +784,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
|
|||
z = ONFLOORZ;
|
||||
|
||||
mobj = P_SpawnMobj (x,y,z, i);
|
||||
mobj->spawnpoint = *mthing;
|
||||
memcpy (&mobj->spawnpoint, mthing, sizeof(*mthing));
|
||||
|
||||
if (mobj->tics > 0)
|
||||
mobj->tics = 1 + (P_Random () % mobj->tics);
|
||||
|
|
|
@ -91,6 +91,7 @@ typedef struct
|
|||
mappatch_t patches[1];
|
||||
} maptexture_t;
|
||||
|
||||
#pragma pack off
|
||||
|
||||
/* A single patch from a texture definition,
|
||||
** basically a rectangular area within
|
||||
|
@ -126,10 +127,6 @@ typedef struct
|
|||
texpatch_t patches[1];
|
||||
} texture_t;
|
||||
|
||||
|
||||
#pragma pack off
|
||||
|
||||
|
||||
int firstflat;
|
||||
int lastflat;
|
||||
int numflats;
|
||||
|
|
|
@ -173,12 +173,12 @@ void R_InitSpriteDefs (char** namelist)
|
|||
/* char** check; */
|
||||
int i;
|
||||
int l;
|
||||
int intname;
|
||||
int frame;
|
||||
int rotation;
|
||||
int start;
|
||||
int end;
|
||||
int patched;
|
||||
char* name;
|
||||
|
||||
/* BUG
|
||||
This would work if the namelist was NULL terminated which it is not.
|
||||
|
@ -213,13 +213,13 @@ numsprites = NUMSPRITES;
|
|||
memset (sprtemp,-1, sizeof(sprtemp));
|
||||
|
||||
maxframe = -1;
|
||||
intname = *(int *)namelist[i];
|
||||
name = namelist[i];
|
||||
|
||||
// scan the lumps,
|
||||
// filling in the frames for whatever is found
|
||||
for (l=start+1 ; l<end ; l++)
|
||||
{
|
||||
if (*(int *)lumpinfo[l].name == intname)
|
||||
if (memcmp(lumpinfo[l].name, name, 4) == 0)
|
||||
{
|
||||
frame = lumpinfo[l].name[4] - 'A';
|
||||
rotation = lumpinfo[l].name[5] - '0';
|
||||
|
|
Loading…
Reference in a new issue