View previous topic :: View next topic |
Author |
Message |
Hialmar
Joined: 15 Jun 2005 Posts: 32
|
|
Back to top |
|
|
Hialmar
Joined: 15 Jun 2005 Posts: 32
|
|
Back to top |
|
|
elven
Joined: 28 Jul 2006 Posts: 259 Location: Germany
|
Posted: Wed Jun 01, 2011 11:21 Post subject: |
|
|
Very cool.
I'll be interested to see what you come up with for it. :) |
|
Back to top |
|
|
elven
Joined: 28 Jul 2006 Posts: 259 Location: Germany
|
Posted: Thu Jun 02, 2011 16:08 Post subject: |
|
|
For whats it worth, I have merged the jvm git repository into svn/branches/core-2.8.
Edit: Meant my own nwnx2 plugin, of course. Sorry. |
|
Back to top |
|
|
raetin
Joined: 11 Nov 2011 Posts: 2
|
Posted: Sat Nov 12, 2011 5:35 Post subject: |
|
|
Hey there! I've picked up this project for use in a server (Gray Isles) -- we are going the JRuby route as well. I've made a few minor tweaks -- supporting some of the variable script calls and fixing a call that changed from nwn1 to nwn2.
https://github.com/grayisles/nwnx_jvm
Once things calm down a bit I will write up a compile guide and get things a bit better setup, so apologies for the bit of a mess it is at the moment.
If anyone would like to contribute, please drop me a line and I'll tidy it up.
Also, thanks to both of you for your on this. It is very much appreciated. |
|
Back to top |
|
|
elven
Joined: 28 Jul 2006 Posts: 259 Location: Germany
|
Posted: Sat Nov 12, 2011 12:29 Post subject: |
|
|
Hey,
cool stuff. Just a minor text moan: in your README.txt you say that the nwn1 plugin is hosted at git.swordcoast.net - that's not the case anymore. It's in svn for the core-2.8 branch nowadays and being built automagically by CI (There's doxygen & javadoc of the API as well).
Regards |
|
Back to top |
|
|
Hialmar
Joined: 15 Jun 2005 Posts: 32
|
Posted: Sat Nov 12, 2011 16:07 Post subject: |
|
|
Glad someone is using this
If you have some time you might want to add some code to free strings allocated by NWN2.
Here is what Skywing told me to do for this:
Skywing wrote: | Yes. This is based off of the code I use in the CE.
void * NWN2_Heap_Deallocate;
HMODULE hmod = GetModuleHandle( L"NWN2_MemoryMgr_amdxp" ); // server always uses _amdxp version
NWN2_Heap_Deallocate = GetProcAddress(
hmod,
"?Deallocate@NWN2_Heap@@SAXPAX@Z"
);
#define CLIEXT_DECLSPEC_NAKED __declspec(naked)
CLIEXT_DECLSPEC_NAKED
VOID
__cdecl
FreeNwn2(
__in PVOID P
)
/*++
Routine Description:
This routine releases memory to an NWN2 heap. This memory must have come
from an NWN2 heap allocator.
Arguments:
P - Supplies the address of an NWN2 heap allocation.
Return Value:
None.
Environment:
User mode.
--*/
{
UNREFERENCED_PARAMETER( P );
#ifdef _M_IX86
__asm
{
jmp dword ptr [NWN2_Heap_Deallocate]
}
#else
if (P != NULL)
HeapFree( GetProcessHeap( ), 0, P );
#endif
}
(You can ignore the non-x86 build stuff for this safely.)
Remember that it is the contents of the string, i.e. Str.m_sString, not the CExoString object itself, that must be freed this way if it's not NULL. |
_________________ Hialmar, A Land Far Away Infrastructure Administrator |
|
Back to top |
|
|
raetin
Joined: 11 Nov 2011 Posts: 2
|
Posted: Mon Nov 14, 2011 17:59 Post subject: |
|
|
Thanks for the info! I've updated the repo location and placed the fix provided in my list of TODOs. |
|
Back to top |
|
|
|