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 
 
Trouble with the Resource Plugin

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon May 30, 2005 21:13    Post subject: Trouble with the Resource Plugin Reply with quote

I always have trouble it seems with precompiled headers.

Has anyone else been able to get the Resource Plugin source to compile?

There is a part in the code of Resman.h that checks to see if __AFXWIN_H__ is defined (which happens through the PCH of stadfx). This errors although I have tried every variation of precompiling available..... generate, automatic, none, etc. The Resman.pch file exists and I have manually compiled stadfx as well but either the error above occurs or there is a "Resman.pch is not a valid pch file." Any suggestions?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Mon May 30, 2005 22:44    Post subject: Reply with quote

Hmm, maybe its because I am using VS6 while you are using something newer ? Maybe just delete the pch file to let VS generate it again ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon May 30, 2005 23:15    Post subject: Reply with quote

I tried that. Even singly compiled the PCH from the resource list tree. Everything about the PCH seems invalid and I am stumped. I noticed there was not a solution file (or a dsw) in the source folder. Maybe if I have VS7 convert the VS6 file I might get around the problem.
Back to top
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon Jun 06, 2005 23:04    Post subject: Reply with quote

bump..... has anyone been able to get the resource source to compile?
Back to top
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Sun Jun 12, 2005 6:35    Post subject: Reply with quote

Could you put (or send me) your development environment file (.sln from Ver 6?) Papillon? I am trying to navigate the maze of why the pch file is not getting the information it needs (the bio boards said something about missing afxwin.h but I tried putting that in and I still get unresolved externals.)
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Jun 12, 2005 13:35    Post subject: Reply with quote

VS6 does not use "solution files" (sln), so I can not. I am thinking about switching to VS2003 in the near future, so I might be able to help you then.

Basically, you should be able to create the project from scratch by adding all files (*.c* and *.h) and add the reference to the madCHook library. Then add references to NWNXBase.* from the nwnxdll directory and it should compile.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Sun Jun 12, 2005 23:02    Post subject: Reply with quote

I finally put in all the correct references and it compiles. Thanks.

Another question........

When the resource plugin encounters an existing resource is there a pointer to that data?

I thought the cRes structure would contain all the data of a loaded resource but the structure is empty if the resource exists in the mod.

What I am trying to do is to be able to GFF edit a resource being pulled from the mod (or more importantly the bifs.) I have been able to successfully edit a GFF file being loaded from the hard drive because that data pointer is easily recognizable. Now what I need is to figure out what pointer (if any) references an existing resource when

if (cRes->pResName)

is true.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Jun 14, 2005 12:17    Post subject: Reply with quote

AFAIK, if (cRes->pResName) then the pointers in cRes point to decoded objects, i.e. objects that are no longer in GFF form. It's been a while so I am not absolutely sure about that.

Anyway, if the engine finds a resource where (cRes->pResName) =! NULL you will most likely have to do something similar to the NWNX Functions plugin. I doubt GFF editing would work at this stage, especially since that would only work on the first request (and modification) of the resource, while later requests would probably receive the same (modified) object.

Does that make any sense ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development 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