Re: Tile Engine Wrapper Help

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

Hello all,

I was using Greg's FFI library to try and wrap Tile Engine. So far the wrapper itself appears to run without error when running it through eui.exe However when I went to make a test example, I got the following error. I feel the error has something to do with dealing with an opaque struct.

ffi.e: 908 attempt to subscript an atom (reading from it) in assignment to 'fn' 

Tile engine.h file 
TLNAPI TLN_Engine TLN_Init (int hres, int vres, int numlayers, int numsprites, int numanimations); 

This is happening because the id returned from define_c_func() is -1, indicating the function name was not found. There's no check for this in c_func() so it fails the subscript to the first element of m_funcs which is 0.

I can add some error handling so it crashes better, but the question why did it not find the function? What binaries are you using?

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu