diff --git a/polymer/eduke32/build/include/a.h b/polymer/eduke32/build/include/a.h index 19015244c..4580894fb 100644 --- a/polymer/eduke32/build/include/a.h +++ b/polymer/eduke32/build/include/a.h @@ -41,7 +41,7 @@ extern int32_t __cdecl mmxoverlay(); extern int32_t __cdecl sethlinesizes(int32_t,int32_t,int32_t); extern int32_t __cdecl setpalookupaddress(char *); extern int32_t __cdecl setuphlineasm4(int32_t,int32_t); -extern int32_t __cdecl hlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t); +extern int32_t __cdecl hlineasm4(ssize_t,int32_t,int32_t,int32_t,int32_t,int32_t); extern int32_t __cdecl setuprhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t); extern int32_t __cdecl rhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t); extern int32_t __cdecl setuprmhlineasm4(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t); diff --git a/polymer/eduke32/build/src/2d.c b/polymer/eduke32/build/src/2d.c index 0c27e6ffe..bcd2ca75a 100644 --- a/polymer/eduke32/build/src/2d.c +++ b/polymer/eduke32/build/src/2d.c @@ -707,8 +707,8 @@ void draw2dgrid(int32_t posxe, int32_t posye, int32_t posze, int16_t cursectnum, yinc = 2048>>gride; } - xp2 = xp1 = ((posxe+(1024>>gride))&(((int64_t) (-1))<<(11-gride))); - yp2 = yp1 = ((posye+(1024>>gride))&(((int64_t) (-1))<<(11-gride))); + xp2 = xp1 = ((posxe + (1024 >> gride)) & -(((int64_t)(1)) << (11 - gride))); + yp2 = yp1 = ((posye + (1024 >> gride)) & -(((int64_t)(1)) << (11 - gride))); do { diff --git a/polymer/eduke32/build/src/kplib.c b/polymer/eduke32/build/src/kplib.c index d0ba460c4..5fec662c1 100644 --- a/polymer/eduke32/build/src/kplib.c +++ b/polymer/eduke32/build/src/kplib.c @@ -1843,12 +1843,17 @@ static int32_t ktgarend(const char *header, int32_t fleng, } else pixbyte = colbyte; - switch (pixbyte) //For PNGOUT + switch (pixbyte) // For PNGOUT { - case 1: kcoltype = 0; bitdepth = 8; palcol[0] = B_LITTLE32(0xff000000); - for (i=1; i<256; i++) palcol[i] = palcol[i-1]+B_LITTLE32(0x10101); break; - case 2: case 3: kcoltype = 2; break; - case 4: kcoltype = 6; break; + case 1: + kcoltype = 0; + bitdepth = 8; + palcol[0] = B_LITTLE32(0xff000000); + for (i = 1; i < 256; i++) palcol[i] = palcol[i - 1] + B_LITTLE32(0x10101); + break; + case 2: + case 3: kcoltype = 2; break; + case 4: kcoltype = 6; break; } if (!(header[17]&16)) { x0 = 0; x1 = xsiz; xi = 1; } @@ -1979,9 +1984,9 @@ static int32_t kbmprend(const char *buf, int32_t fleng, palcol[0] = 24-(palcol[0]+palcol[3]); palcol[1] = 16-(palcol[1]+palcol[4]); palcol[2] = 8-(palcol[2]+palcol[5]); - palcol[3] = ((-1<<(24-palcol[3]))&0x00ff0000); - palcol[4] = ((-1<<(16-palcol[4]))&0x0000ff00); - palcol[5] = ((-1<<(8-palcol[5]))&0x000000ff); + palcol[3] = (-(1<<(24-palcol[3]))&0x00ff0000); + palcol[4] = (-(1<<(16-palcol[4]))&0x0000ff00); + palcol[5] = (-(1<<(8-palcol[5]))&0x000000ff); } cptrinc = (((xsiz*cdim+31)>>3)&~3); cptr = &buf[rastoff]; diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index c48843144..eab832c26 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -5580,7 +5580,7 @@ static void MaybeTrainKillPlayer(const spritetype *pSprite, int setOPos) if ((playerSectnum == -1 && ud.noclip == 0) || (playerSectnum == pSprite->sectnum && pPlayer->cursectnum != pSprite->sectnum)) { - *(vec2_t *)pPlayer = *(vec2_t *)pSprite; + *(vec2_t *)pPlayer = *(vec2_t const *)pSprite; if (setOPos) *(vec2_t *)&pPlayer->opos = *(vec2_t *)pPlayer; diff --git a/polymer/eduke32/source/player.h b/polymer/eduke32/source/player.h index d55b498ec..3d0edf0df 100644 --- a/polymer/eduke32/source/player.h +++ b/polymer/eduke32/source/player.h @@ -377,7 +377,7 @@ static inline int P_GetP(const void *pSprite) // NOTE: In the no-netcode build, there's no point to pass player indices // at all since there is ever only one player. However, merely returning 0 // would mean making this build less strict than the normal one. - Bassert(pSprite->yvel == 0); + Bassert(((const uspritetype *)pSprite)->yvel == 0); return 0; #else int playerNum = ((const uspritetype *)pSprite)->yvel;