View previous topic :: View next topic |
Author |
Message |
Ephasme
Joined: 24 Aug 2010 Posts: 7
|
Posted: Wed Nov 10, 2010 14:13 Post subject: nwscript and pointer |
|
|
Hi, I asked to myself if it would be possible to simulate C-pointers in nwscript with some NWNX2 stuff on NWN1.
Thanks for your answers. |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Wed Nov 10, 2010 15:22 Post subject: |
|
|
Even if it were possible, I can't see much use for it. It would be convenient to be able to pass structs by reference I suppose, but since NWScript isn't object-oriented that's about it. If you really want something like this, it might be better to run something like nwnx_ice and do the code in C++ or some other language. |
|
Back to top |
|
|
Ephasme
Joined: 24 Aug 2010 Posts: 7
|
Posted: Wed Apr 20, 2011 5:04 Post subject: |
|
|
Can you give me some documentation for nwnx_ice ? |
|
Back to top |
|
|
Skywing
Joined: 03 Jan 2008 Posts: 321
|
Posted: Wed Apr 20, 2011 10:11 Post subject: |
|
|
With handwritten NWScript assembler, or by hacking up a variant of the open source NWScript compiler, you could accomplish this (and arrays) by abusing the global variable frame pointer and a lack of type safety on restoring the global variable frame pointer from the VM stack at runtime.
I wouldn't recommend it though. |
|
Back to top |
|
|
|