Commit 6ec133c9 authored by Richard Gobeille's avatar Richard Gobeille

engine: fix function signatures of ksqrtasm_old() and clip_nsqrtasm()

These functions were specified as accepting int32_t values, but wrap functions (or are wrapped by functions) that take uint32_t.
parent ae953a75
......@@ -205,20 +205,19 @@ extern uint16_t ATTRIBUTE((used)) sqrtable[4096], ATTRIBUTE((used)) shlookup[409
static inline int32_t ksqrtasm_old(int32_t n)
static inline int32_t ksqrtasm_old(uint32_t n)
uint32_t u = klabs(n);
uint32_t shift = 0;
while (u >= 2048)
while (n >= 2048)
u >>= 2;
n >>= 2;
uint32_t const s = sqrtable_old[u];
uint32_t const s = sqrtable_old[n];
return (s << shift) >> 10;
static inline int32_t clip_nsqrtasm(int32_t n)
static inline int32_t clip_nsqrtasm(uint32_t n)
if (enginecompatibilitymode == ENGINE_19950829)
return ksqrtasm_old(n);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment