Extended functionality of xptr (?)
Posted: Tue Sep 11, 2012 8:20 pm
I'm trying to call the libmodplug library from ZGE, and the following improvements could maybe help me to avoid writing a dll wrapper in C++:
- xptr for File component (used for embedded file)
- xptr used as type of global variables
I'm not really sure with these changes, but my idea is to translate the following C++ API code:
to the corresponding ZGE's external function looking like this:
and then call from expression:
ModFile is a File component. Should it work in this or similar way? Any ideas?
- xptr for File component (used for embedded file)
- xptr used as type of global variables
I'm not really sure with these changes, but my idea is to translate the following C++ API code:
Code: Select all
struct _ModPlugFile;
typedef struct _ModPlugFile ModPlugFile;
ModPlugFile* ModPlug_Load(const void* data, int size);
Code: Select all
xptr ModPlug_Load(xptr data, int size) {}
Code: Select all
ModPlug_Load(ModFile, ModFile.Size);