Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug fix: prevent invalid memory access + save file corruption when a low priority strategic state is added to a full buffer.

    ai\diplomacy\Diplomat.cpp

    [Edit: link removed. Included in the 2004.03.28 source.]
    Last edited by Fromafar; April 7, 2004, 16:07.

    Comment


    • 2004.03.27
      ..\ctp2_data\gs\utility\gameinit.cpp
      ..\ctp2_data\ctp\civapp.cpp

      Additions and fixes by Martin Gühmann:

      gameinit.cpp:

      - Added player selection, and with player selection color selection.
      - Fixed scenarios that allow players other than player 1 to be played.

      civapp.cpp:

      - Fixed a repetitive memory leak in the Great Libary caused by scenario loading.
      - Removed some redundant code, because it is already done somewhere else.

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

      Comment


      • ..\ctp2_data\gs\utility\gameinit.cpp

        I discovered some problems with the player selection code. Player selection now also work on the world map and if you select a player that does not have a starting location on a map you get an Assertion in the debug version and the selected player is set to the last player, of course the UI has to be updated so that you cannot do this.

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

        Comment


        • Design improvement: straight line computation corrected for worlds that do not have east-west wrapping.

          robot\pathing\unitastar.cpp

          [Edit: link removed. Included in the 2004.03.28 source.]
          Last edited by Fromafar; April 7, 2004, 16:08.

          Comment


          • 2004.03.28
            ..\ctp2_code\ui\interface\scenarioeditor.cpp
            ..\ctp2_code\\ui\aui_ctp2\keypress.cpp

            Bug fixes by Martin Gühmann:

            senarioeditor.cpp:

            - When the scenario editor is for the first time launched in a game session player 1 is not selected anymore.

            keypress.cpp:

            - Disabled restart key in network, hot seat and email games.

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

            Comment


            • 2004.02.24
              ..\ctp2_code\gs\gameobj\ArmyData.cpp
              ..\ctp2_code\ai\strategy\scheduler\Scheduler.cpp

              Bug fixes by Fromafar:

              ArmyData.cpp: Do not center on invisible pirates.
              Scheduler.cpp: Do not consider goals that have become invalid (e.g. threatened cities that have been destroyed).


              2004.02.26
              ..\ctp2_code\gfx\spritesys\UnitActor.cpp
              ..\ctp2_code\gs\fileio\GameFile.cpp
              ..\ctp2_code\gs\gameobj\CityData.cpp
              ..\ctp2_code\gs\gameobj\CityData.h
              ..\ctp2_code\gs\gameobj\Civilisation.h
              ..\ctp2_code\gs\gameobj\CivilisationData.cpp
              ..\ctp2_code\gs\gameobj\CivilisationData.h

              Activision 1.1 patch reimplementation by Fromafar:
              - Enable reading of files generated by the Activision 1.1 patch. (file type 66)
              - Prevented CtD when settling in the Alexander scenario.


              2004.02.26
              ..\ctp2_code\gfx\spritesys\UnitSpriteGroup.cpp
              ..\ctp2_code\gs\gameobj\ImprovementEvent.cpp
              ..\ctp2_code\gs\gameobj\TerrImproveData.cpp
              ..\ctp2_code\gs\world\MapPoint.cpp
              ..\ctp2_code\robot\pathing\astar.cpp

              Bug fixes by Fromafar:

              UnitSpriteGroup.cpp: Do not access files after the open or create has failed.
              ImprovementEvent.cpp: Corrected possible CtD when deleting own data in the middle of execution.
              TerrImproveData.cpp: Do not kill the terraforming object twice.
              MapPoint.cpp: Corrected comment - no code change.
              astar.cpp: Corrected Null pointer dereferencing CtD.


              2004.02.27
              ..\ctp2_code\ui\interface\DipWizard.cpp
              ..\ctp2_code\gs\gameobj\CityData.cpp
              ..\ctp2_code\gs\gameobj\ArmyData.cpp

              Bug fixes by Peter Triggs:

              - Can't rush buy capitalization/infrastructure: CityData::BuyFront

              - Diplomatic proposals/responses sent from UI get the highest priority possible
              so that the AI won't override them: DipWizard::SendCallback

              - Added auto-center for bombardment: ArmyData::Bombard

              Also changed Ahenobarb/Fromafar's InterceptTrade fix to make sure that you only hear the SpecialEffect
              sound when the pirating is visable.


              ..\ctp2_code\gs\gameobj\bldque.cpp

              Loading of build queues with capatalisation or infrastructure is now possible. (Modification as posted by Peter Triggs)


              2004.02.29
              ..\ctp2_code\ui\interface\scenarioeditor.cpp
              ..\ctp2_code\ui\interface\scenarioeditor.h
              ..\ctp2_code\ui\aui_common\aui_memmap.cpp
              ..\ctp2_code\gfx\spritesys\Anim.cpp
              ..\ctp2_data\english\gamedata\ldl_str.txt
              ..\ctp2_data\italian\gamedata\ldl_str.txt
              ..\ctp2_data\italian\gamedata\add_str.txt

              Bug fixes by Martin Gühmann:
              scenarioeditor.cpp: Fixed Auto-Turn-Off-Pollution-Bug. When you opened the scenario editor pollution was turned off automaticly.
              scenarioeditor.h: Added to both scnearioeditor files ACTIVISION_ORIGINAL guards for older new code to match this with our current system.
              aui_memmap.cpp, Anim.cpp, scenarioeditor.cpp fixed some memory leaks however the game still records memory leaks but what was fixed was clearly a problem.
              Text files: Corrected a string in the English version, by Drulius. And Italian translation added provided by sandro.


              2004.03.07
              ..\ctp2_code\ui\interface\spnewgamewindow.cpp

              Bug fix by Martin Gühmann: Prevents a crash when you load the single player new single player game screen and the game tries to load an invalid string, concerning world shape, map size and level of difficuilty.


              2004.03.13
              ..\ctp2_code\gs\gameobj\Player.cpp
              ..\ctp2_code\gs\gameobj\PlayerEvent.cpp
              ..\ctp2_code\ui\interface\scenarioeditor.cpp
              ..\ctp2_code\gfx\spritesys\UnitSpriteGroup.cpp
              ..\ctp2_code\gfx\spritesys\UnitActor.cpp

              Bug fixes by Fromafar:

              Player.cpp
              PlayerEvent.cpp

              Moved the autosave file generation to just before the StartMovePhase event, to prevent losing the advance that just was completed. See description.

              ui\interface\scenarioeditor.cpp

              Fixed some more memory leaks.

              gfx\spritesys\UnitSpriteGroup.cpp
              gfx\spritesys\UnitActor.cpp

              Corrected crashes due to uninitialised member variables.


              2004.03.13
              ..\ctp2_code\gs\gameobj\Player.cpp
              ..\ctp2_code\gs\gameobj\Player.h
              ..\ctp2_code\ui\interface\GreatLibary.cpp
              ..\ctp2_data\XXXXXX\gamedata\ldl_str.txt

              Where XXXXXX is english, french, german, italian or japanese; an spanish version of that file is still missing.

              Additions by Martin Gühmann:

              Setting research goal to something already researched clears the goal. In comparision to the patch 1.1 implementation the player is notified that no goal was set.

              Now also advances leading to tile improvements can be set, if there are more then one TerrainEffect fields then the cheapest enabling advance that is not known to the player is selected, if all enabling advances are known then the goal is cleared, too.

              Note for the translation: The no goal set string is only available in German and English so far, in all language versions except the German version the English string is used until it is translated.


              2004.03.16
              ..\ctp2_data\ctp2_code\gfx\tilesys\TileDraw.cpp

              Bug fix by Fromafar: Prevent CtD when a tile improvement is created next to a goody hut under the fog of war.


              2004.03.18
              ..\ctp2_data\robot\aibackdoor\priorityqueue.h
              ..\ctp2_data\robot\pathing\Astar.cpp
              ..\ctp2_data\robot\pathing\Astar.h
              ..\ctp2_data\robot\pathing\Astarpnt.h
              ..\ctp2_data\robot\pathing\UnitAstar.cpp

              Made the pathfinding algorithm more like A* by Fromafar: Added updating of a visited node when a better path towards it is found later.

              Notes:

              1. This sometimes improves the path (see example), but also makes the pathfinding slower. We will have to test what the impact is when there are lots of units around.

              2. The efficiency of the current implementation may be improved. When the node was on the closed list, some propagation should be applied. For now, I have chosen an easier implementation, by simply reinserting the node in the open list.



              2004.03.20
              ..\ctp2_code\ui\interface\spnewgamemapshapescreen. cpp
              ..\ctp2_code\ui\interface\spnewgamewindow.h
              ..\ctp2_data\XXXXXX\gamedate\ldl_str.txt
              ..\ctp2_data\XXXXXX\uidata\layouts\spnewgamepopups .ldl
              ..\ctp2_data\XXXXXX\uidata\layouts\spnewgame.ldl
              ..\ctp2_data\XXXXXX\uidata\layouts\ns_strings.ldl

              Where XXXXXX stands for english, french, german, italian and japanese, also for spanish but in that case no ldl_str.txt is included as no one posted a Spanish version of that file, also the translation status of German and English files is complete.

              Change by Martin Gühmann: Replaced all Neptune refferences by Uranus refferences.


              2004.03.20
              ..\ctp2_data\ai\diplomacy\AgreementMatrix.cpp

              Bug fix by Fromafar: Enabled saving and loading of agreement data for more than 28 civilisations. Tested that loading and saving still works as expected with previous games, not tested with more than 28 civilisations.


              2004.03.24
              ..\ctp2_data\ai\diplomacy\Diplomat.cpp

              Bug fix by Fromafar: Prevent invalid memory access + save file corruption when a low priority strategic state is added to a full buffer.


              2004.03.27
              ..\ctp2_data\gs\utility\gameinit.cpp
              ..\ctp2_data\ctp\civapp.cpp

              Additions and fixes by Martin Gühmann:

              gameinit.cpp:

              - Added player selection, and with player selection color selection.
              - Fixed scenarios that allow players other than player 1 to be played.

              civapp.cpp:

              - Fixed a repetitive memory leak in the Great Libary caused by scenario loading.
              - Removed some redundant code, because it is already done somewhere else.


              2004.03.27
              ..\ctp2_data\robot\pathing\unitastar.cpp

              Design improvement by Fromafar: Straight line computation corrected for worlds that do not have east-west wrapping.


              2004.03.28
              ..\ctp2_code\ui\interface\scenarioeditor.cpp
              ..\ctp2_code\ui\aui_ctp2\keypress.cpp

              Bug fixes by Martin Gühmann:

              senarioeditor.cpp:

              - When the scenario editor is for the first time launched in a game session player 1 is not selected anymore.

              keypress.cpp:

              - Disabled restart key in network, hot seat and email games.


              2004.03.28
              ..\ctp2_data\default\gamedata\colors00.txt

              Updated to remove nearly identical colors and some other modifications.


              2004.03.28
              ..\ctp2_data\XXXXXX\gamedata\ldl_str.txt

              Where XXXXXX is English, French, German, Italian and Japanese, unfortunatly the Spanish translation is still missing.


              [Edit: Link removed to get the latest source file pack see the first post of this thread.]

              -Martin
              Last edited by Martin Gühmann; June 5, 2004, 17:08.
              Civ2 military advisor: "No complaints, Sir!"

              Comment


              • Bug fix for the problem that terraformed tiles can not be improved any more.

                gs\gameobj\TerrImproveData.cpp

                Reactivated the Kill of completed terraforming objects. Some temporary test code slipped through in the 2004.02.26 update for the invalid memory access. The actual repair was in ImprovementEvent.cpp.

                [Edit: link removed. Included in the 2004.04.18 source.]
                Last edited by Fromafar; May 8, 2004, 15:28.

                Comment


                • 2004.04.01
                  ..\ctp2_code\ctp\civapp.cpp
                  ..\ctp2_code\ui\aui_ctp2\SelItem.cpp

                  Bug fix by Martin Gühmann: Removed some needless code in civapp.cpp and make sure in SelItem.cpp that games started with a different player than player 1 can be continued after reload.

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

                  Comment


                  • Martin: It's not a big deal, but could you possibly set your compression software not to include all the empty directories in the .zip file - I prefer to unzip it in a temp directory and examine the changed files before I replace the originals with them, and having all the empty directories lying around makes it much more difficult to find them.

                    Comment


                    • Here's a revision of my NationalManagementDialog that I posted way back in the second post of this thread - it contains the same code but now has the ACTIVISION_ORIGINAL guards.

                      [Edit: attachment removed - there's a newer version a few posts down]
                      Last edited by J Bytheway; April 3, 2004, 15:48.

                      Comment


                      • Here's a copy of appstr.txt with a typo fixed (in the message asking you to insert your CD - it used to say "Call To Power CD 2 CD", now it says "Call To Power 2 CD").
                        Attached Files

                        Comment


                        • Originally posted by J Bytheway
                          Martin: It's not a big deal, but could you possibly set your compression software not to include all the empty directories in the .zip file - I prefer to unzip it in a temp directory and examine the changed files before I replace the originals with them, and having all the empty directories lying around makes it much more difficult to find them.
                          Actual I just zip the whole directory with WinRar and delete all the files I don't need with WinZip afterwards.

                          That forces me to delete the directories afterwards with WinRar. Actual I use WinZip to unzip it, as it just displays the files it is no problem for me, but I see what I can do.

                          For the appstr.txt we shouldn't include this file with the playtest version, as it would go into the ..\ctp2_program\ctp\ directory, and I wouldn't like to see that my German version of that file is being replaced by an English version.

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

                          Comment


                          • Originally posted by Martin Gühmann
                            Actual I just zip the whole directory with WinRar and delete all the files I don't need with WinZip afterwards.

                            That forces me to delete the directories afterwards with WinRar. Actual I use WinZip to unzip it, as it just displays the files it is no problem for me, but I see what I can do.
                            Well, don't worry about it if it's a big deal. Winzip will ignore empty directories, so you could unzip it and then rezip it with winzip, which would probably be the quickest way.

                            For the appstr.txt we shouldn't include this file with the playtest version, as it would go into the ..\ctp2_program\ctp\ directory, and I wouldn't like to see that my German version of that file is being replaced by an English version.
                            Whoops - I just uploaded a playtest including it, I assumed it was English in all versions. We should find a way to internationalize it to avoid this problem.
                            Last edited by J Bytheway; April 3, 2004, 12:32.

                            Comment


                            • I can provide the French folder with all the text files needed to play the playtest game in French.
                              "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                              Comment


                              • I would like to attempt to standardise the DiffDB.txt and map.txt files so that they use the same dbgen-based database system as all the others. Unfortunately, this would require altering the project file quite a lot. I remember the problems with this being discussed before - has anyone had any new insights?..

                                Comment

                                Working...
                                X