diff --git a/source/build/include/colmatch.h b/source/build/include/colmatch.h index 90c36e0ba..751ba1a68 100644 --- a/source/build/include/colmatch.h +++ b/source/build/include/colmatch.h @@ -13,7 +13,3 @@ static FORCE_INLINE int32_t paletteGetClosestColor(int32_t r, int32_t g, int32_t { return getclosestcol_lim(r, g, b, 255); } -static FORCE_INLINE int32_t getclosestcol_nocache(int32_t r, int32_t g, int32_t b) -{ - return getclosestcol_nocache_lim(r, g, b, 255); -} diff --git a/source/build/include/compat.h b/source/build/include/compat.h index d17ac36ad..e0da70d05 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -1169,8 +1169,6 @@ static inline void append_ext_UNSAFE(char *outbuf, const char *ext) ////////// Paths ////////// -char *Bgethomedir(void); - int32_t Bcorrectfilename(char *filename, int32_t removefn); ////////// String manipulation ////////// diff --git a/source/build/include/pragmas.h b/source/build/include/pragmas.h index 922917289..527cb03eb 100644 --- a/source/build/include/pragmas.h +++ b/source/build/include/pragmas.h @@ -189,9 +189,6 @@ void qinterpolatedown16short(intptr_t bufptr, int32_t num, int32_t val, int32_t #ifndef pragmas_have_clearbuf void clearbuf(void *d, int32_t c, int32_t a); #endif -#ifndef pragmas_have_copybuf -void copybuf(const void *s, void *d, int32_t c); -#endif #ifndef pragmas_have_swaps void swapbuf4(void *a, void *b, int32_t c); #endif @@ -199,9 +196,6 @@ void swapbuf4(void *a, void *b, int32_t c); #ifndef pragmas_have_clearbufbyte void clearbufbyte(void *D, int32_t c, int32_t a); #endif -#ifndef pragmas_have_copybufbyte -void copybufbyte(const void *S, void *D, int32_t c); -#endif #ifndef pragmas_have_copybufreverse void copybufreverse(const void *S, void *D, int32_t c); #endif diff --git a/source/build/src/compat.cpp b/source/build/src/compat.cpp index fdcffc559..7c411ef24 100644 --- a/source/build/src/compat.cpp +++ b/source/build/src/compat.cpp @@ -73,29 +73,6 @@ void set_memerr_handler(void(*handlerfunc)(int32_t, const char *, const char *)) g_MemErrHandler = handlerfunc; } -// -// Stuff which must be a function -// -char *Bgethomedir(void) -{ -#ifdef _WIN32 - - char appdata[MAX_PATH]; - - if (SUCCEEDED(SHGetSpecialFolderPathA(NULL, appdata, CSIDL_APPDATA, FALSE))) - { - return Xstrdup(appdata); - } - return NULL; -#elif defined EDUKE32_OSX - return osx_gethomedir(); -#else - char *e = getenv("HOME"); - if (!e) return NULL; - return Xstrdup(e); -#endif -} - int32_t Bcorrectfilename(char *filename, int32_t removefn) { diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index e6e33f752..9b1faaa1f 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -4468,7 +4468,7 @@ static void classicDrawBunches(int32_t bunch) smostwall[smostwallcnt] = z; smostwalltype[smostwallcnt] = 1; //1 for umost smostwallcnt++; - copybufbyte(&umost[x1],&smost[smostcnt],i*sizeof(smost[0])); + memcpy(&umost[x1],&smost[smostcnt],i*sizeof(smost[0])); smostcnt += i; } } @@ -4554,7 +4554,7 @@ static void classicDrawBunches(int32_t bunch) smostwall[smostwallcnt] = z; smostwalltype[smostwallcnt] = 2; //2 for dmost smostwallcnt++; - copybufbyte(&dmost[x1],&smost[smostcnt],i*sizeof(smost[0])); + memcpy(&dmost[x1],&smost[smostcnt],i*sizeof(smost[0])); smostcnt += i; } } @@ -5023,16 +5023,6 @@ static void classicDrawVoxel(int32_t dasprx, int32_t daspry, int32_t dasprz, int } } -#if 0 - for (x=0; x=0 && daumost[x]=0 && dadmost[x] &searchpaths) { FString path; - char *homepath = Bgethomedir(); + char *homepath = getenv("HOME"); path.Format("%s/.steam/steam", homepath); G_AddSteamPaths(searchpaths, buf); diff --git a/source/rr/src/net.cpp b/source/rr/src/net.cpp index 8fcde4321..edeb400a5 100644 --- a/source/rr/src/net.cpp +++ b/source/rr/src/net.cpp @@ -1801,7 +1801,7 @@ void Net_GetInput(void) if (g_player[myconnectindex].movefifoend&(g_movesPerPacket-1)) { - copybufbyte(&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex], + memcpy(&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex], &inputfifo[g_player[myconnectindex].movefifoend&(MOVEFIFOSIZ-1)][myconnectindex],sizeof(input_t)); g_player[myconnectindex].movefifoend++; return; @@ -2179,7 +2179,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) continue; } - copybufbyte(&osyn[i],&nsyn[i],sizeof(input_t)); + memcpy(&osyn[i],&nsyn[i],sizeof(input_t)); if (l&1) nsyn[i].fvel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (l&2) nsyn[i].svel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (l&4) @@ -2218,7 +2218,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) if (i != myconnectindex) for (j=g_movesPerPacket-1;j>=1;j--) { - copybufbyte(&nsyn[i],&inputfifo[g_player[i].movefifoend&(MOVEFIFOSIZ-1)][i],sizeof(input_t)); + memcpy(&nsyn[i],&inputfifo[g_player[i].movefifoend&(MOVEFIFOSIZ-1)][i],sizeof(input_t)); g_player[i].movefifoend++; } @@ -2232,7 +2232,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) osyn = (input_t *)&inputfifo[(g_player[other].movefifoend-1)&(MOVEFIFOSIZ-1)][0]; nsyn = (input_t *)&inputfifo[(g_player[other].movefifoend)&(MOVEFIFOSIZ-1)][0]; - copybufbyte(&osyn[other],&nsyn[other],sizeof(input_t)); + memcpy(&osyn[other],&nsyn[other],sizeof(input_t)); if (k&1) nsyn[other].fvel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (k&2) nsyn[other].svel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (k&4) @@ -2271,7 +2271,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) for (i=g_movesPerPacket-1;i>=1;i--) { - copybufbyte(&nsyn[other],&inputfifo[g_player[other].movefifoend&(MOVEFIFOSIZ-1)][other],sizeof(input_t)); + memcpy(&nsyn[other],&inputfifo[g_player[other].movefifoend&(MOVEFIFOSIZ-1)][other],sizeof(input_t)); g_player[other].movefifoend++; } @@ -2295,7 +2295,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) osyn = (input_t *)&inputfifo[(g_player[other].movefifoend-1)&(MOVEFIFOSIZ-1)][0]; nsyn = (input_t *)&inputfifo[(g_player[other].movefifoend)&(MOVEFIFOSIZ-1)][0]; - copybufbyte(&osyn[other],&nsyn[other],sizeof(input_t)); + memcpy(&osyn[other],&nsyn[other],sizeof(input_t)); k = packbuf[j] + (int)(packbuf[j+1]<<8); j += 2; @@ -2331,7 +2331,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng) for (i=g_movesPerPacket-1;i>=1;i--) { - copybufbyte(&nsyn[other],&inputfifo[g_player[other].movefifoend&(MOVEFIFOSIZ-1)][other],sizeof(input_t)); + memcpy(&nsyn[other],&inputfifo[g_player[other].movefifoend&(MOVEFIFOSIZ-1)][other],sizeof(input_t)); g_player[other].movefifoend++; } diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index bc79eda0b..f8d1be778 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -3174,7 +3174,7 @@ void movelava(char *dapic) offs2 = (LAVASIZ + 2) + 1 + ((intptr_t) lavabakpic); for (x = 0; x < LAVASIZ; x++) { - copybuf(offs, offs2, LAVASIZ >> 2); + memcpy(offs, offs2, LAVASIZ); offs += LAVASIZ; offs2 += LAVASIZ + 2; }