Aller au contenu

Photo

A couple of coding questions


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Nikatjef

Nikatjef
  • Members
  • 81 messages
Greetings,

   I have a couple of strange questions, and with my luck they has been asked and answered multiple times.

   I am working on creating a new party member for the single player module and I keep running into defines and declarations that I have to track down through multiple files.  It is especially annoying when I find the same declaration or definition in multiple files.  Anway, what I am wondering is if there is a way to do a global text search that will find a string in all of the header and code files?

   Another question I have is does the engine support multiple levels of inheritance / inclusion?  For example can I have a header file that gets included by a child header, which then gets included in a code file without having to include both of them in the code file?  I ask this because I see quite a few spots in the code where the code file will include a header file, which includes another header file, but the code file also includes the header file that is included by the first header file.

   Another question, and I suspect I know the answer to this, but is there any plans to clean up redundant code paths?  My suspicion is that the answer is no due to the cost of the process, but if the answer is no, what can we do to help Bioware reduce that cost?  For example, from what I can tell there are at least two different mechanisms for hiring a follower, when one can do handle the job, simply wrap it for extra functionality.

#2
Phaenan

Phaenan
  • Members
  • 315 messages

Anway, what I am wondering is if there is a way to do a global text search that will find a string in all of the header and code files?


Within the toolset itself ? Aside from opening all the files beforehand, I don't think anything else goes.
But you can always export once and for all all the headers and whatever scripts you want, then copy the exported sources wherever you want. Then you're free to use whatever app/tool you want to do all kind of searches on these sources. It's a bit cumbersome, but it's a one time task. Pretty much what I did myself. :blush:


Another question I have is does the engine support multiple levels of inheritance / inclusion?  For example can I have a header file that gets included by a child header, which then gets included in a code file without having to include both of them in the code file?


Yep. But it seems pretty tolerant about multiple inclusions of the same header (as in your example) as long as it ain't a cyclic inclusion. (A including B, and B including A in turn)

Modifié par Phaenan, 13 février 2010 - 12:10 .