Announcement

Collapse
No announcement yet.

PROJECT: Revision Reports

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Revision 582
    Modernised generated database handling code, marking the confusing parameterless Get functions with bool return type as obsolete.

    Modified: ctp2_code\gs\dbgen\Datum.cpp
    Modified: ctp2_code\gs\dbgen\Datum.h
    Modified: ctp2_code\gs\dbgen\MemberClass.cpp
    Modified: ctp2_code\gs\dbgen\MemberClass.h
    Modified: ctp2_code\gs\dbgen\RecordDescription.cpp
    Modified: ctp2_code\gs\dbgen\RecordDescription.h
    Modified: ctp2_code\gs\dbgen\ctpdb.cpp
    Modified: ctp2_code\gs\events\GameEventHook.cpp
    Modified: ctp2_code\gs\events\GameEventHook.h
    Modified: ctp2_code\gs\events\GameEventManager.cpp
    Modified: ctp2_code\gs\events\GameEventManager.h
    Modified: ctp2_code\gs\newdb\CTPDatabase.cpp
    Modified: ctp2_code\gs\newdb\CTPDatabase.h
    Modified: ctp2_code\gs\newdb\CTPRecord.h

    In the current code, there are 2 versions of the generated Get<Property> functions - both returning a bool that merely indicates the presence of a property. You have to use the version with the parameter to access the value of the property.

    Unfortunately, there are a lot of occurences where the bool (presence) return of the parameterless version of the Get function is used as if it were the actual value of the property. Because a bool can be converted to most other types (as 0 or 1), you do not get a warning for this.

    To be able to detect these occurrences, I have renamed the parameterless version to Has<Property>. Using the old function name is still possible (for now), but will generate a warning when compiling with MSVS 2005.

    Comment


    • Fromafar,

      i got a lot of these errors
      Code:
      ..\gs\newdb\CTPRecord.h(50) : error C2258: illegal pure syntax, must be '= 0'
      ..\gs\newdb\CTPRecord.h(50) : error C2252: 'INDEX_INVALID' : pure specifier can only be specified for functions
      I'm changed it to zero

      but got
      Code:
      ..\gs\newdb\CTPRecord.h(50) : error C2252: 'INDEX_INVALID' : pure specifier can only be specified for functions
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • Revision 583

        gs/gameobj/ArmyData.cpp
        - outcommented attempt at allowing tileimps the upgrade ability

        gs/gameobj/bldque.cpp & h
        gs/gameobj/CityEvent.cpp
        -implemented a check for PopCostToBuild that finally works

        gs/gameobj/citydata.cpp & h
        - outcomment of AddCityGood

        gs/gameobj/GoodyHuts.cpp
        - outcomment of change to Goody_unit

        gs/gameobj/Player.cpp
        - attempt at adding a good to a city by colony

        gs/newdb/CTPRecord.h
        - added Fromafar's fix to allow for MSVC++ 6.0 fixing above

        gs/newdb/terrimprove.cdb
        - new flags
        Formerly known as "E" on Apolyton

        See me at Civfanatics.com

        Comment


        • Revision 584

          Some minor fixes

          Fixed the Barbarian non-attack bug:
          modified gs/gameobj/ArmyData.cpp

          Fixed a possible crash by redesigning the rankingtab constructor:
          modified ui/interface/rankingtab.cpp
          modified ui/interface/rankingtab.h


          Originally posted by Fromafar
          Revision 582
          In the current code, there are 2 versions of the generated Get<Property> functions - both returning a bool that merely indicates the presence of a property. You have to use the version with the parameter to access the value of the property.

          Unfortunately, there are a lot of occurences where the bool (presence) return of the parameterless version of the Get function is used as if it were the actual value of the property. Because a bool can be converted to most other types (as 0 or 1), you do not get a warning for this.

          To be able to detect these occurrences, I have renamed the parameterless version to Has<Property>. Using the old function name is still possible (for now), but will generate a warning when compiling with MSVS 2005.
          So far I replaced all these get-functions, but unfortunately I also did some other changes and the game doesn't behave as it used to behave. And I don't know what is caused by my changes and what was in before, so I have to withhold this for some time. However I already found some incorrect uses of the old get-functions.

          However for consitency all those parameterless functions returning a bool should be has-functions.

          -Martin
          Civ2 military advisor: "No complaints, Sir!"

          Comment


          • Revision 585

            Cleaned up (Get-calls, unused stuff, casts), and restored a misplaced happiness calculation when testing slider settings.

            Modified: ctp2_code\ai\CityManagement\governor.cpp
            Modified: ctp2_code\ai\CityManagement\governor.h

            It is probably best to make the changes in small steps and do a lot of testing. Unfortunately, some of the changes (e.g. the handling of the pollution coefficient) are in late-game features, so this takes more time to set up proper tests.

            Comment


            • Revision 586

              gs/gameobj/ArmyData.cpp
              - added barbariancities
              - changed barbariancamps to crete a tileimp
              - added barbariansspawnbarbarians

              gs/gameobj/CityData.cpp & h
              - added AddGoodToCity
              - added ExcludedByBuilding and ExcludedByWonder checks to Wonders

              gs/gameobj/Player.cpp
              - changed CanExportTileValue
              - implement CanExportGood
              - Add installations generate barbarians

              gs/newdb/
              - add new flags

              gamedata/Units.txt
              - added upgrading

              updated readme
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • Revision 587

                gameobj/ArmyData.cpp
                - made barbs immune to hostile terrain
                - added a unit that spawns barbs but so far didn't Work

                gameobj/buildingutil.cpp & h
                - implemnted TreasuryInterest

                gameobj/CityData.cpp
                - implemented treasury interest
                - improved ShowOnMap

                gameobj/CityEvent.cpp
                - added new capture city pop up with script.scl options

                gameobj/terrainutil.cpp
                - got closer on needsirrigation need a little work

                gs/slic/SlicEngine.cpp
                gs/slic/slicfunc.cpp
                gs/slic/SlicFunc.h
                - added KillCity slic function
                - added Liberate slic function
                - added AddPW function (didn't test)
                - added Pillage function (didn't work)
                - added Plunder function (didn't work)

                gamedata/script.slc
                - added new pop-ups

                gamedata/Units.txt
                - fixed machinegunner crash

                english/gamedata/ldl_str.txt
                - added new capture text but NEED TRANSLATIONS!

                updated readme
                Formerly known as "E" on Apolyton

                See me at Civfanatics.com

                Comment


                • Originally posted by E
                  english/gamedata/ldl_str.txt
                  - added new capture text but NEED TRANSLATIONS!
                  And why don't you add these strings to the other files at least in English? For that reasion we have the files in.

                  -Martin
                  Civ2 military advisor: "No complaints, Sir!"

                  Comment


                  • Revision 588

                    Fixed odd AI farmer allocation and cleaned files:

                    Fixed handling of bit pairs with value, made the their value returning Get-functions a little bit more intuitive:
                    modified ctp2_code/robot/pathing/CityAstar.cpp
                    modified ctp2_code/gs/dbgen/Datum.cpp
                    modified ctp2_code/gs/dbgen/RecordDescription.cpp

                    Replaced Get-function by Has-functions:
                    modified ctp2_code/ai/diplomacy/regardevent.cpp
                    modified ctp2_code/ai/diplomacy/sstateevent.cpp
                    modified ctp2_code/ai/strategy/goals/ctpgoal.cpp
                    modified ctp2_code/ui/interface/DiplomacyDetails.cpp
                    modified ctp2_code/ui/interface/intelligencewindow.cpp
                    modified ctp2_code/ui/interface/tileimptracker.cpp
                    modified ctp2_code/ui/interface/UnitControlPanel.cpp
                    modified ctp2_code/robot/pathing/unitastar.cpp

                    Fixed GetPollutionProductionModifier, GetPollutionSizeModifier even if they are unused:
                    modified ctp2_code/gs/gameobj/Advances.cpp
                    modified ctp2_code/gs/gameobj/Advances.h
                    modified ctp2_code/gs/gameobj/Player.cpp
                    modified ctp2_code/gs/gameobj/player.h

                    Cleaned files and fixed farmer allocation:
                    modified ctp2_code/gs/gameobj/CityData.cpp

                    Cleaned files:
                    modified ctp2_code/gs/gameobj/ArmyData.cpp
                    modified ctp2_code/gs/gameobj/bldque.cpp
                    modified ctp2_code/gs/gameobj/BldQue.h
                    modified ctp2_code/gs/gameobj/citydata.h
                    modified ctp2_code/gs/gameobj/CityEvent.cpp
                    modified ctp2_code/gs/gameobj/GoodyHuts.cpp
                    modified ctp2_code/gs/gameobj/terrainutil.cpp
                    modified ctp2_code/gs/newdb/Difficulty.cdb
                    modified ctp2_code/gs/newdb/terrimprove.cdb
                    modified ctp2_code/gs/utility/TurnCnt.cpp

                    Removed RobotAstar.h
                    modified ctp2_code/robot/pathing/robotastar2.cpp

                    Corrected some strings and added all of E's strings at least in English:
                    modified ctp2_data/english/gamedata/ldl_str.txt
                    modified ctp2_data/french/gamedata/ldl_str.txt
                    modified ctp2_data/german/gamedata/ldl_str.txt
                    modified ctp2_data/italian/gamedata/ldl_str.txt
                    modified ctp2_data/japanese/gamedata/ldl_str.txt
                    modified ctp2_data/spanish/gamedata/ldl_str.txt
                    Civ2 military advisor: "No complaints, Sir!"

                    Comment


                    • Revision 589

                      english/gamedata/info_str.txt
                      french/gamedata/Info_str.txt
                      german/gamedata/info_str.txt
                      italian/gamedata/info_str.txt
                      spanish/gamedata/info_str.txt

                      added capture city string but its only english
                      Formerly known as "E" on Apolyton

                      See me at Civfanatics.com

                      Comment


                      • Revision 590

                        Replaced Get by Has-functions, cleaned up files, and made GovernmentModified more work for units. However for GovernmentModified there is still more work to do.

                        Implemented GovernmentModified for units and merged my version of governor with Fromafar's:
                        modified ctp2_code/ai/CityManagement/governor.cpp
                        modified ctp2_code/ai/CityManagement/governor.h

                        Removed dependency on old Diff.h and implemented GovernmentModified:
                        modified ctp2_code/ai/ctpai.cpp

                        Removed IC3RobotAstar.h, DiffDB.h, DiffDB.cpp, RobotAstar.h and RobotAstar.cpp from the project, because these are now unsused:
                        modified ctp2_code/ctp/civctp.dsp

                        Use of c++ type bool instead of BOOL typedef wereever possible:
                        modified ctp2_code/gs/gameobj/Army.cpp
                        modified ctp2_code/gs/gameobj/Army.h

                        Removed now unused BarbWar message:
                        modified ctp2_code/gs/gameobj/ArmyData.cpp

                        Replaced Get-functions by Has-functions
                        modified ctp2_code/gs/gameobj/FeatTracker.cpp
                        modified ctp2_code/gs/gameobj/gaiacontroller.cpp
                        modified ctp2_code/gs/gameobj/unitutil.cpp
                        modified ctp2_code/gs/world/Cell.cpp
                        modified ctp2_code/gs/world/UnseenCell.cpp
                        modified ctp2_code/gs/world/WrlImprove.cpp

                        Removed IC3RobotAstar.h from the include file list:
                        modified ctp2_code/gs/world/wldgen.cpp

                        Removed some unnecessary stuff:
                        modified ctp2_data/default/gamedata/script.slc
                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • Revision 591

                          Added some forgotten stuff in last revision:

                          Really removed IC3RobotAstar.h:
                          modified ctp2_code/ctp/civctp.dsp

                          Really removed DiffDB.h
                          modified ctp2_code/gs/gameobj/UnitData.cpp
                          modified ctp2_code/gs/slic/SlicSymbol.cpp
                          modified ctp2_code/robot/pathing/robotastar2.cpp
                          modified ctp2_code/ui/interface/scenarioeditor.cpp
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment


                          • Revision 592

                            Replaced Get by Has-database-access-functions and did some cleanings:
                            modified ctp2_code/gs/gameobj/CityEvent.cpp
                            modified ctp2_code/gs/gameobj/Readiness.cpp
                            modified ctp2_code/gs/gameobj/terrainutil.cpp
                            modified ctp2_code/gs/newdb/unit.cdb

                            Added some forgotten stuff to make these files compile again:
                            modified ctp2_code/ui/interface/scenarioeditor.cpp
                            modified ctp2_code/ui/interface/scenarioeditor.h

                            Added strings for new difficulty database:
                            modified ctp2_data/english/gamedata/gl_str.txt
                            modified ctp2_data/french/gamedata/gl_str.txt
                            modified ctp2_data/german/gamedata/gl_str.txt
                            modified ctp2_data/italian/gamedata/gl_str.txt
                            modified ctp2_data/spanish/gamedata/gl_str.txt
                            Civ2 military advisor: "No complaints, Sir!"

                            Comment


                            • Revision 593

                              Merged some stuff into the respository.

                              Use of c++ type bool instead of BOOL typedef wereever possible:
                              modified ctp2_code/gs/gameobj/Vision.cpp
                              modified ctp2_code/gs/gameobj/Vision.h
                              modified ctp2_code/gs/gameobj/wonderutil.cpp
                              modified ctp2_code/gs/gameobj/wonderutil.h

                              Consecutive replacements due to changes to the Vision class:
                              modified ctp2_code/gfx/spritesys/director.cpp
                              modified ctp2_code/gfx/spritesys/UnitActor.cpp
                              modified ctp2_code/gs/gameobj/ArmyData.cpp
                              modified ctp2_code/gs/gameobj/armyevent.cpp
                              modified ctp2_code/gs/gameobj/CityData.cpp
                              modified ctp2_code/gs/gameobj/Player.cpp
                              modified ctp2_code/gs/gameobj/player.h
                              modified ctp2_code/gs/gameobj/terrainutil.cpp
                              modified ctp2_code/gs/gameobj/Unit.cpp
                              modified ctp2_code/gs/gameobj/Unit.h
                              modified ctp2_code/gs/gameobj/UnitData.cpp
                              modified ctp2_code/gs/gameobj/UnitData.h
                              modified ctp2_code/net/general/net_action.cpp
                              modified ctp2_code/net/general/net_city.cpp
                              modified ctp2_code/net/general/net_info.cpp
                              modified ctp2_code/net/general/net_unit.cpp
                              modified ctp2_code/net/general/network.cpp

                              Replaced Get database access functions by Has database functions:
                              modified ctp2_code/gs/slic/slicfunc.cpp

                              Cleaned file:
                              modified ctp2_code/gs/gameobj/bldque.cpp

                              Made the 2006-02-15 entry more readable and removed irrelevant stuff from it. However more entries need to be updated:
                              modified doc/user/playtest/Apolyton_README.txt
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment


                              • Revision 594

                                Merged some more stuff into the official code base.

                                Use of c++ type bool instead of BOOL typedef whereever possible:
                                modified ctp2_code/gs/gameobj/GameObj.cpp
                                modified ctp2_code/gs/gameobj/GameObj.h
                                modified ctp2_code/gs/gameobj/ObjPool.cpp
                                modified ctp2_code/gs/gameobj/ObjPool.h

                                Made government modified work in this file:
                                modified ctp2_code/gs/gameobj/UnitPool.cpp

                                Cleaned files a little bit:
                                modified ctp2_code/gs/gameobj/UnitPool.h
                                modified ctp2_code/gs/world/Cell.cpp
                                modified ctp2_code/gs/world/Cell.h
                                modified ctp2_code/net/general/net_info.cpp
                                Civ2 military advisor: "No complaints, Sir!"

                                Comment

                                Working...
                                X