C2C SVN Changelog

10938
  • Added back all the DllExport's from BtS CvGameCoreDLL.
  • Fixed an error due to not doing religion/corporation sorting right after they are loaded.
 
10941 (branch only)
  • Finished refactoring the AI main building scoring function.
  • Finished first version of optimized production popup. Still slow but less slow.
10942 (branch only)
  • Merge from trunk
10943 (branch only)
  • Update Install.bat to copy correct config files.
10944 merged unstable > trunk
Production popup optimized, a few unused tags + related code removed, refactoring some code for readability.
  • Production popup now only shows a recommended selection of buildings instead of ALL buildings, same for units.
  • Removed TechSpecialistModifiers (unused) and FreeTradeRegionBuilding tag, also unused for 6+ years. These can be added back in a more efficient manner if they are ever wanted in the future.
 
Last edited:
10946 reintroduced changes from 10944
  • Fixed save bug
  • Fixed a couple issues with workers and settlers in the production popup, should be best available units of that type now

Changes from 10944 that are back:
Production popup optimized, a few unused tags + related code removed, refactoring some code for readability.
  • Production popup now only shows a recommended selection of buildings instead of ALL buildings, same for units.
  • Removed TechSpecialistModifiers (unused) and FreeTradeRegionBuilding tag, also unused for 6+ years. These can be added back in a more efficient manner if they are ever wanted in the future.
 
10948
  • Fixed a uninitiated array in CvArea which was introduced in revision 9354 and might have caused some memory corruptions or issues with spawn system while not using the debug dll.
  • Fixed uninitiated fields in GraphicsPagingInfo which where causing some issues with the Graphics Paging option.
  • Removed the CvAllocator and changed back all memory allocations and de-allocations to be made through the memory functions provided by the bts.exe.

Removed the CvAllocator and changed back all memory allocations and de-allocations to be made through the memory functions provided by the bts.exe.
This made the two other issues visible because the bts.exe has some kind of memory allocation checking mechanism included and the CvAllocator didn't care at all about such issues.
It might also make other issues like the two I fixed visible by crashing or stuff no longer working in those cases the coding problems which lead to these issues must finally be fixed.
 
10949
  • Quick fix to uninitialzed m_iMinAnarchyTurns value in CvPlayer
So I'm going to make a slight leap and suggest this is the first and probably not last victim of changing the memory allocator. Previously it zeroed all newly allocated memory, now it does not. The m_iMinAnarchyTurns member of CvPlayer is never initialized during construction, so just has garbage value in that happens to be the one we are seeing.
View attachment 532136
 
10950
  • Merged the GameFont Display mod with C2C. (LINK)
    • A brand new debug screen accessed with Ctrl+F3.
  • Changed up the hotkey for other debug screens a little.
    • All the regular debug screens are now accessed with Ctrl+(F1-F7)
    • The ones in Ctrl+(F4-F7) used to be Shift+(F1-F4)
    • Ctrl+F1/F2 are the same screens as was before, the forgetful and timekeeper screens.
  • Deleted two unused python files.
 
10954
  • Adding the remaining Era icons.
Era ICons.png
 
10955
  • Fixed uninitialized memory in CvInfoCity. New games would crash before this fix, hopefully it fixes a few other random crashes.
  • Debug allocator will set memory to identifiable values (0xDADADADA). We can use it to identify IF uninitialized memory is the issue when we see garbage values, as opposed to wrong values being read or memory overwrite.
 
10956
  • Added FinalRelease build config using global optimization. This provides a *significant* performance improvement (end turn is about 50% what it was), however it does take 15 minutes or so to build.
  • New DLL using FinalRelease. If there are problems please try the previous CL, however it has been tested and seems good.
 
10957
  • Optimized and streamlined the py code for the modder screens: Timekeeper, Forgetful and GameFont.
  • Gamefont now display more stuff, like bonuses. ^^
  • Switched the hotkeys for Timekeeper and Gamefont
    • Ctrl+F1 = Forgetful - Ctrl+F2 = GameFont - Ctrl+F3 = Timekeeper
  • Forgetful can now be navigated with the mouse thumb buttons, numpad +/- too.... or was it left/right arrows...
    • I don't remember what the keyboard keys for the back and forward functions are.
10958
Added a new folder to python area. (experimenting with moving files without loosing file history)
10959
Moved some py files around. (Didn't work, history lost. Oh well, not that there's been any interesting history for those three py files.)
 
Last edited:
10962
For SVN history -​

  1. Copied CvInfos.cpp@10860 as CvInfoCity.cpp and CvInfoUnitCombat.cpp with contents updated; removed classes CvBuildingInfo and CvUnitInfo from these two files;
  2. Copied CvBuildingInfo.cpp@10860 and CvUnitInfo.cpp@10860 as CvInfoBuilding.cpp and CvInfoUnit.cpp with contents updated; they contain a single class in each file.
10963
  • Recording merge information
  • Add FinalRelease folder to svn ignore list
Sadly it doesn't help to put in merge info there. All history between 10860 and 10962 are gone.

10964
  • Trying to fix merge info from last commit.
10965
  • Another attempt to fix merge info
EDIT: I give up. Will return to the original 4-file arrangement (CvBuildingInfo, CvInfos cpp/h, CvUnitInfo)
 
Last edited:
10966
  • Return CvInfos, CvBuildingInfo, and CvUnitInfo files; Merged revisions:
    • CvInfos.cpp (Everything except classes CvBuildingInfo and CvUnitInfo)
      • 10921 (CvInfos.cpp, CvInfoTerrain.cpp)
      • 10931 (CvInfo{City, Game, Player, Terrain, Unit}.cpp)
      • 10936 (CvInfo{Infos, Game, Player, Terrain, Unit}.cpp),
      • 10937 (CvInfoPlayer.cpp)
      • 10946 (CvInfoCity.cpp)
      • 10955 (CvInfoCity.cpp)
      • 10960 (CvInfoCity.cpp, CvInfoPlayer.cpp);
    • CvInfos.h (Everything)
      • 10921 (CvInfoTerrain.h)
      • 10931 (CvInfoPlayer.h, CvInfoTerrain.h)
      • 10936 (CvInfo{Infos, Game, Player, Terrain, Unit}.h)
      • 10946 (CvInfos.h, CvInfoCity.h)
      • 10960 (CvInfos.h)
    • CvBuildingInfo.cpp (as CvInfoCity.cpp in following)
    • CvUnitInfo.cpp (as CvInfoUnit.cpp in following)
Code should behave the same from 10960 through this revision, and I did compile a new dll for this one.
 
Last edited:
10967
  • Fix Win 7 problems for Install scripts
  • Added InstallModCopy.bat to install the mod from workspace via copying files instead of linking.
  • Added InstallModNoCopy.bat to only generate the link from the Mods directory back to the SVN directory, but not copy any files.
  • Renamed Install.bat to InstallModLink.bat, but redirected existing Install.bat to run it.
  • Added micro tool GetDirectory for showing a directory browser in a batch file in a manner that works on different versions of Windows.
 
10968
  • Fixed a potential infinite loop in the via appian building effect code, could happen when cities were placed in a strict grid pattern.
    • Optimized the hell out of the code as well, not sure I can get it faster in python without cutting down on what the wonder actually do when it's built.
    • Tested it on a relatively small map packed full with 116 cities in a thigh grid pattern, the end turn took about 10 seconds but there's no AI's on the map, so most of those 10 seconds were the via appian code.
10969
  • Added some textures by drd_avel.
    • Buttons for a couple of buildings and some trait specific promotions.
    • A new Happy hunting event picture.
10970
  • Some misc py code refactoring.
  • A couple more messages now have font that scale by resolution.
  • Added in a clone of CvDebugTools.py called CvDebugUtils.py.
    • Adding in CvDebugTools.py made the exe crash right before map scripts starts working on generating a map.
      • A strange quirk in the exe.
    • I'm considering adding in more debug tools in python, best to base it on what we already have from vanilla, all other py code reference the clone instead of the original.
    • Only CvDebugInterface.py in vanilla assets reference CvDebugTools.py, that one too crash the exe at the same point if included in C2C.
    • CvDebugInterface.py only reference one function in CvDebugTools.py which does nothing and returns a null value back, so this vanilla setup won't be able to come and bite us later.
 
Back
Top Bottom