PDA

View Full Version : Divoid's Linux SDK patch and Trimbo's universal SDK


[ONE]Mushroom
01-18-2004, 10:43 PM
First, can I say that I found Divoid's patch (http://www.lucasfiles.com/?s=&action=file&id=367), used in Trimbo's universal SDK (http://www.lucasfiles.com/?s=&action=file&id=373), very helpful for getting JMMod (http://www.pikey.me.uk/forums) to compile with gcc.

However...

The patch removes the declaration of the function
float powf ( float x, int y );
from q_shared.h just after line 1239.

This function is not called in the game project, but is called twice in cg_view.c (for changing camera damp).

When I took this patched code back to windows and recompiled using MSVC 6, it assumed that powf returned int when compiling. When I ran JMMod and the perspective changed (e.g. when becoming JM, when falling to death) Bad Things happened.

The problem is easily fixed by adding

float powf ( float x, int y);
to the top of cg_view.c

I hope someone finds this useful.

(Oh, and I initially forgot to include a new game file I'd created in the makefile OFILES list, producing a broken .so and really annoying a server admin :) - so don't do that, OK?)