diff --git a/polymer/eduke32/build/include/pragmas.h b/polymer/eduke32/build/include/pragmas.h index c61be75ba..c2032b710 100644 --- a/polymer/eduke32/build/include/pragmas.h +++ b/polymer/eduke32/build/include/pragmas.h @@ -136,6 +136,8 @@ FORCE_INLINE void swapptr(void *a, void *b) *(intptr_t*) b = t; } +FORCE_INLINE int32_t sqr(int32_t a) { return a * a; } + #if defined(__GNUC__) && defined(GEKKO) // GCC Inline Assembler version (PowerPC) diff --git a/polymer/eduke32/source/testgame/src/bstub.c b/polymer/eduke32/source/testgame/src/bstub.c index bfd31dc7f..cb967f1c3 100644 --- a/polymer/eduke32/source/testgame/src/bstub.c +++ b/polymer/eduke32/source/testgame/src/bstub.c @@ -371,7 +371,7 @@ void ExtCheckKeys(void) i = frameval[framecnt&(AVERAGEFRAMES-1)]; j = frameval[framecnt&(AVERAGEFRAMES-1)] = getticks(); framecnt++; - if (i != j) averagefps = ((mul3(averagefps)+((AVERAGEFRAMES*1000)/(j-i)))>>2); + if (i != j) averagefps = (averagefps*3 + (AVERAGEFRAMES*1000)/(j-i))>>2; Bsprintf((char *)tempbuf,"%d",averagefps); printext256(0L,0L,31,-1,(char *)tempbuf,1);