diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 6799afdc7..6878097d2 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -58,6 +58,8 @@ UTILLIBS=-lpthread ENGINEOBJS= ifeq (0,$(NOASM)) ENGINEOBJS+= $(OBJ)/a.$o +else + ENGINEOBJS+= $(OBJ)/a-c.$o endif ifneq ($(PLATFORM),WINDOWS) @@ -66,7 +68,6 @@ endif ENGINEOBJS+= \ - $(OBJ)/a-c.$o \ $(OBJ)/baselayer.$o \ $(OBJ)/cache1d.$o \ $(OBJ)/compat.$o \ @@ -109,8 +110,8 @@ endif ifeq ($(PLATFORM),DARWIN) ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o \ $(OBJ)//osxbits.$o - ASFLAGS += -f Mach-O - OURCFLAGS += -fno-pic + ASFLAGS += -DUNDERSCORES -f macho + OURCFLAGS += -DUNDERSCORES -fno-pic TARGETOPTS += -DNOASM endif ifeq ($(PLATFORM),BSD) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index d6f10a8b6..7e8365968 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -4665,9 +4665,9 @@ end_point_dragging: pos.z = getflorzofslope(sectorofwall(wal0-wall), pos.x, pos.y); message("Outer wall coordinates must coincide for both components"); - OSD_Printf("wal0:%d (%d,%d)--(%d,%d)\n",wal0-wall, wal0->x,wal0->y, + OSD_Printf("wal0:%d (%d,%d)--(%d,%d)\n",(int)(wal0-wall), wal0->x,wal0->y, wall[wal0->point2].x,wall[wal0->point2].y); - OSD_Printf("wal1:%d (%d,%d)--(%d,%d)\n",wal1-wall, wal1->x,wal1->y, + OSD_Printf("wal1:%d (%d,%d)--(%d,%d)\n",(int)(wal1-wall), wal1->x,wal1->y, wall[wal1->point2].x,wall[wal1->point2].y); goto end_join_sectors; diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index 31de055be..edb230df8 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -1381,7 +1381,7 @@ static md3model_t *md3load(int32_t fil) #if B_BIG_ENDIAN != 0 { - int32_t *l; + int32_t j, *l; for (i = m->head.numframes-1; i>=0; i--) { @@ -1406,7 +1406,7 @@ static md3model_t *md3load(int32_t fil) #if B_BIG_ENDIAN != 0 { - int32_t *l; + int32_t j, *l; s->id = B_LITTLE32(s->id); l = (int32_t *)&s->flags; for (j=1+1+1+1+1+1+1+1+1+1-1; j>=0; j--) l[j] = B_LITTLE32(l[j]); @@ -1438,7 +1438,7 @@ static md3model_t *md3load(int32_t fil) #if B_BIG_ENDIAN != 0 { - int32_t *l; + int32_t j, *l; for (i=s->numtris-1; i>=0; i--) { diff --git a/polymer/eduke32/source/jaudiolib/src/fx_man.c b/polymer/eduke32/source/jaudiolib/src/fx_man.c index f57b0e8f7..66909bbec 100644 --- a/polymer/eduke32/source/jaudiolib/src/fx_man.c +++ b/polymer/eduke32/source/jaudiolib/src/fx_man.c @@ -37,18 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "fx_man.h" #ifdef __POWERPC__ -static inline uint16_t SWAP16(uint16_t s) -{ - return (s >> 8) | (s << 8); -} - -static inline uint32_t SWAP32(uint32_t s) -{ - return (s >> 24) | (s << 24) | ((s&0xff00) << 8) | ((s & 0xff0000) >> 8); -} - -#define LITTLE16 SWAP16 -#define LITTLE32 SWAP32 +#define LITTLE16(s) (((uint16_t)(s) >> 8) | ((uint16_t)(s) << 8)) +#define LITTLE32(s) ((uint32_t)(s) >> 24) | ((uint32_t)(s) << 24) | (((uint32_t)(s)&0xff00) << 8) | (((uint32_t)(s) & 0xff0000) >> 8) #else #define LITTLE16 #define LITTLE32 @@ -977,7 +967,6 @@ int32_t FX_SetPrintf(void (*function)(const char *, ...)) return FX_Ok; } - /*--------------------------------------------------------------------- Function: FX_PlayLoopedAuto diff --git a/polymer/eduke32/source/jmact/animlib.c b/polymer/eduke32/source/jmact/animlib.c index 1602e0c04..5bd35d136 100644 --- a/polymer/eduke32/source/jmact/animlib.c +++ b/polymer/eduke32/source/jmact/animlib.c @@ -169,7 +169,8 @@ static void decodeframe(uint8_t * srcP, uint8_t * dstP) } /* long op */ - count = B_LITTLE16(*((uint16_t *)((srcP += sizeof(int16_t)) - sizeof(int16_t)))); + count = B_LITTLE16(*(uint16_t *)srcP); + srcP += sizeof(int16_t); if (!count) /* stop sign */ return;