Azurian
The Azurian
what general improvementss will xerces_c do over xmlparser?
what general improvementss will xerces_c do over xmlparser?
One big improvement for you as a Xml Modder once it is fully implemented(This will be the second step) we don't need all those schema files we just have one xsd schema for everything.
Does this mean we wont be able to test new schema files? There are a few elements that the dll supports that are not in the core schema files. At least I think there are still a few. The last one added by me was the bDisplayOnly tag. I was able to add it to my schema files and test before updating the core one.
We also will be able to remove all the emty or default Tags from all Xml Files that will speed up the loading.
I make one schema c2c.xsd that contains everthing that is in the dll so if a new tag is added in the dll it just must just be added to that schema and you can use it where you want(Core, Modules..).
The dll then uses that schema to validate all the xml files while reading them.
You can use an modern XmlEditor with Xsd Schema Validation to have your files checked while editing them....
All Tags will be optional so if you have for example a building that just uses 10 Tags you just have to put those in the xml.
We also will be able to remove all the emty or default Tags from all Xml Files that will speed up the loading.
I just need a few more days to finish this.
Does this mean we can have files from GameInfos in Module Folders too?
Interesting, your answer fully answered my question but in a way that I did not expect.
Which is fine for C2C but makes sharing stuff with other mods a bit more difficult![]()
Off the top of my head I can't say. But I could figure it out. Most of the displays you get in the output window have direct wording in the code rather than a reference to text. So what you can do is search the whole project for a solid section of the text output you show on any given output message to lead you to an example of a message output code line.Quick question, How would I go about making some log message show up in the VS Output window when debugging?
Ah well, my attempt to have limits on growth due to infrastructure using the DoGrowth python callback (USE_CAN_DO_GROWTH_CALLBACK) doesn't work because the dll does growth no matter if you pass true or false back to it from the Python.![]()
btw this means that Platyping's version of the Avoid Growth options would not work also. Which suggest there may be a problem in the dll.
hmm... It's been mentioned before that Avoid Growth doesn't seem to work. That said, I'd really have to dig to figure out what could be happening there as this wouldn't be an area I'm at all familiar with.
Ah well, my attempt to have limits on growth due to infrastructure using the DoGrowth python callback (USE_CAN_DO_GROWTH_CALLBACK) doesn't work because the dll does growth no matter if you pass true or false back to it from the Python.![]()
btw this means that Platyping's version of the Avoid Growth options would not work also. Which suggest there may be a problem in the dll.
Did you activate the USE_CAN_DO_GROWTH_CALLBACK in PythonCallbackDefines.xml?
The code in the dll looks fine to me but i did not test it, then you return true from doGrowth it sould not grow.
Yes I did. But I return false = don't grow! After all it is "can do growth" so true would normally mean yes and false no. I love C programmers!![]()
/************************************************************************************************/
/* Afforess Start 12/21/09 */
/* */
/* */
/************************************************************************************************/
if(GC.getUSE_CAN_DO_GROWTH_CALLBACK())
{
PYTHON_ACCESS_LOCK_SCOPE
CyCity* pyCity = new CyCity(this);
CyArgsList argsList;
argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity)); // pass in city class
long lResult=0;
PYTHON_CALL_FUNCTION4(__FUNCTION__, PYGameModule, "doGrowth", argsList.makeFunctionArgs(), &lResult);
delete pyCity; // python fxn must not hold on to this pointer
[B] if ([COLOR="Red"]lResult == 1[/COLOR])
{
return;
}[/B]
}
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
The newest Boost library should still work with the 2003 compiler (I think they only removed support for 7.0 and not 7.1 by now).I did some testing in that area myself but in the end it was to much work for one person with my level of experience.
For my personal games i compiled the dll with the Intel Compiler but that is not a option because not everyone has it.
We could update to boost 1.44 with the current compiler it is compatible up to that version.
That alone is a big step.
The newest Boost library should still work with the 2003 compiler (I think they only removed support for 7.0 and not 7.1 by now).
The main problem about going for a new Boost is bypassing the old Boost Python DLL. In my tests (with the new compiler) I was able to statically link the newer Boost Python and then expose the Cy stuff directly into the Python24.dll with one minor code change (I had to get the scope which I guess the exe does when you share the Boost Python DLL). Of course I don't know if it actually works properly as I never got far enough in the loading process that I could verify the state of Python.
I have recently experimented a bit with trying to get the C2C DLL to compile/run with a newer compiler / boost library.
As a newer MSVC compiler means linking against a newer runtime I statically linked both the runtime and the boost library.
Of course that means that exe and dll get different heaps and the new and delete for any object has to happen on the same side.
For a lot of the interface that is fine as only POD, pointers and references are passed.
The main issue are the STL classes that are passed by reference and changed on the other side (which often causes allocation/deallocation) or worse returned by value (which means they are allocated on one side and then deallocated on the other).
There are two possible solutions to that.
One is to have a slim DLL (compiled with the current compiler) in between the exe and the C2C DLL that forwards most calls and packs/unpacks STL classes and similar so the interface to the C2C DLL avoids the problematic stuff.
The other would be to have a helper DLL (compiled with the current compiler) for making some specific calls into the exe and creating / accessing STL classes that will be shared with the exe.
While the second variant would be simpler to set up (as there would be no need to forward all those calls from/to the exe that are fine) it won't work if there is any call from the exe into the DLL that passes an STL class by value or expects one by value in return (unless there is some way to convince the compiler to forward that call to the helper DLL without doing any construction or destruction).
For any of those variants there is a chance that it won't work at all because of some binary incompatibility in how the exe accesses DLL objects like CvPlot.
On the other hand if it works we would gain the power of a newer compiler (like C++11 and better optimizations) and a newer Boost library.
So what do you think? Worth trying?