View previous topic :: View next topic |
Author |
Message |
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon May 30, 2005 21:13 Post subject: Trouble with the Resource Plugin |
|
|
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 |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon May 30, 2005 22:44 Post subject: |
|
|
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 |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon May 30, 2005 23:15 Post subject: |
|
|
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 |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon Jun 06, 2005 23:04 Post subject: |
|
|
bump..... has anyone been able to get the resource source to compile? |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Sun Jun 12, 2005 6:35 Post subject: |
|
|
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 |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Jun 12, 2005 13:35 Post subject: |
|
|
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 |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Sun Jun 12, 2005 23:02 Post subject: |
|
|
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 |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Jun 14, 2005 12:17 Post subject: |
|
|
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 |
|
|
|