logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
nwscript and pointer

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Ephasme



Joined: 24 Aug 2010
Posts: 7

PostPosted: Wed Nov 10, 2010 14:13    Post subject: nwscript and pointer Reply with quote

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
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Wed Nov 10, 2010 15:22    Post subject: Reply with quote

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
View user's profile Send private message
Ephasme



Joined: 24 Aug 2010
Posts: 7

PostPosted: Wed Apr 20, 2011 5:04    Post subject: Reply with quote

Can you give me some documentation for nwnx_ice ?
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Wed Apr 20, 2011 10:11    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group