Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

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

  • #61
    Bug fix: more memory leaks repaired.

    This file contains an update on the GameFile.cpp file from an earlier post. To prevent unzip order problems, I have removed the old link, and have included all files in the following.

    [Edit: link removed, included in 2003-12-23 source]
    Last edited by Fromafar; January 30, 2004, 18:33.

    Comment


    • #62
      All past changes

      +

      - Added MAX_MATCH_LIST_CYCLES flag in the const.txt in the Magnificent Samurai scenario [by Fromafar].
      - Great library starts with the current research project of the player [by Fromafar].
      - Corrected a number of SLIC functions that used calls with inappropriate arguments [by Fromafar].
      - Clear the great library data between players for hotseat games [by Fromafar].
      - Added option to show info for tile improvements that are too expensive and made it modifiable in-game [by Fromafar].
      - Added text strings in the English and German version of ldl_str.txt [by Fromafar].

      ctp2sc1.2_2003.12.21.zip

      Comment


      • #63
        All past changes

        +

        - Added MAX_MATCH_LIST_CYCLES flag in the const.txt in the Magnificent Samurai scenario [by Fromafar].
        - Great library starts with the current research project of the player [by Fromafar].
        - Corrected a number of SLIC functions that used calls with inappropriate arguments [by Fromafar].
        - Clear the great library data between players for hotseat games [by Fromafar].
        - Added option to show info for tile improvements that are too expensive and made it modifiable in-game [by Fromafar].
        - Added text strings in the English and German version of ldl_str.txt [by Fromafar].

        +

        - Fixed some memory leaks related to the load/save file window [by Fromafar].
        - Fixed some memory leaks related to the City window, and cleaned up some list handling [by Fromafar].

        ctp2sc1.2_2003.12.21_Leaks.zip

        Comment


        • #64
          All past changes

          +

          - Added MAX_MATCH_LIST_CYCLES flag in the const.txt in the Magnificent Samurai scenario [by Fromafar].
          - Great library starts with the current research project of the player [by Fromafar].
          - Corrected a number of SLIC functions that used calls with inappropriate arguments [by Fromafar].
          - Clear the great library data between players for hotseat games [by Fromafar].
          - Added option to show info for tile improvements that are too expensive and made it modifiable in-game [by Fromafar].
          - Added text strings in the English and German version of ldl_str.txt [by Fromafar].

          +

          - cpuinf32.dll is no longer used to examine the CPU, to prevent crashes on some machines [by Fromafar].

          ctp2sc1.2_2003.12.21_NoCpu.zip

          Comment


          • #65
            All past changes

            +

            - Added MAX_MATCH_LIST_CYCLES flag in the const.txt in the Magnificent Samurai scenario [by Fromafar].
            - Great library starts with the current research project of the player [by Fromafar].
            - Corrected a number of SLIC functions that used calls with inappropriate arguments [by Fromafar].
            - Clear the great library data between players for hotseat games [by Fromafar].
            - Added option to show info for tile improvements that are too expensive and made it modifiable in-game [by Fromafar].
            - Added text strings in the English and German version of ldl_str.txt [by Fromafar].

            +

            - Fixed some memory leaks related to the load/save file window [by Fromafar].
            - Fixed some memory leaks related to the City window, and cleaned up some list handling [by Fromafar].

            +

            - cpuinf32.dll is no longer used to examine the CPU, to prevent crashes on some machines [by Fromafar].

            ctp2sc1.2_2003.12.21_All.zip

            Comment


            • #66
              Very, very impressive work by Fromafar .
              Solver, WePlayCiv Co-Administrator
              Contact: solver-at-weplayciv-dot-com
              I can kill you whenever I please... but not today. - The Cigarette Smoking Man

              Comment


              • #67
                I extracted all files included in the zipped files that Fromafar posted during the past week in the respected folders over the previous update (2003-12-14) Kaan had posted, overwriting some files. I created new folders when they did not exist in the previous update (2003-12-14). Let me know if the files already included in the last update (2003-12-14) that where altered again contained the previous changes or not. Someone should examine the archives I posted for verification.

                BTW, I splitted the changes in so many files because there is an ongoing discussion on both memory leak changes and cpuinf32.dll issue whether they should be included or not. By the next update it will be clear.

                Comment


                • #68
                  Finally I managed to compile everything into the first post. Well this is not quite correct unfortunatly I hit the limit of characters I can put into one post so I used my second post in that thread to give all the information.

                  As base I used Keygen's all in one pack and I added all the text files you can find in the patch and some other additions here is the last part of the stuff I indended to put into the first post:

                  ..\ctp2_code\ui\interface\dipwirzard.cpp
                  ..\ctp2_code\ui\interface\dipwirzard.h
                  ..\ctp2_data\XXXXXX\uidata\layouts\dipwizard.ldl

                  Bug fix by Martin Gühmann: Added missing diplomacy photos to the diplomanager.


                  ..\ctp2_code\ui\interface\spnewgameplayersscreen.c pp
                  ..\ctp2_code\ui\interface\spnewgameplayersscreen.h
                  ..\ctp2_data\XXXXXX\uidata\layouts\spnewgamepopups .ldl

                  Where XXXXXX stands for english, french, german, italian or spanish.

                  Interface Improvement by Martin Gühmann: Redesigned the sp new game player screen, so that a new game can be now started with more then 8 players. 31 players is the maximum number of players that can be now used, don't expect that your computer runs smoth with so many players. There is now also the possibilty to set the maximum number of players that can occur in a game for instance through revolts, maximum is also here 31 players. Another option is there to select the player index that determines in the end the player's color, unfortunatly this doesn't work, yet but this can be fixed when something else is fixed from the 1.1/1.11 patch list.

                  Note that if you play with MaxPlayer higher than NumPlayers and you use a version of Diplomod like in ApolytonPack then the game crashes if a new player is added and the total number of players is higher then you originally started with.


                  ..\ctp2_data\XXXXXX\uidata\layouts\spnewgame.ldl

                  Where XXXXXX stands for english, french, german, italian or spanish.

                  Added disclaimers in text to the initial screen by Klaus Kaan.
                  Improved by Martin Gühmann to make it possible to localize all the strings on that screen.

                  This file replaces the image drawn by Locutus and therefore this image is not anymore part of the *.zip file. Well it is big enough.

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

                  Where XXXXXX stands for english or german.

                  Added new strings for disclaimers, version and the new sp new game players, to allow easy localization of all the stuff.

                  Note that for other language versions we still need tranlators to create a French, Italian and a Spanish version of that file.


                  ..\Scenarios\MagnificentSamurai\scen0000\default\g amedata\scenario.slc

                  Fix by Martin Gühmann: When you return to Shichinen via the Star Road a fort should be created in Shichinen. Unfortunatly they give to the event the wrong argument the fort has the index 8 not 7. Using the TerrainImprovementDB functions avoids the need to fix this again if the indices are shifted again.



                  I packed a *.zip file with the altered files in the fashion of the mods. So if you just unzip it it into your default CTP2 folder and you installed the ctp2_code in the default CTP2 folder it overwrites the original source files. So if you altered some of these files already I recommend to back up them before and add your alteration to these files. Or alternativly you could unzip them to somewhere else, and alter the files from this *.zip. I recommend it anyway so you can use this file structure to add your own files and provide such *.zip's, too.

                  Edit: The the following pages what the file here contains else.

                  [Edit: See first post for the lastest version of that file pack.]


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

                  Comment


                  • #69
                    Is there any japanese?
                    i fixed some codes to treat japanese edition ctp2_data correctly.
                    i think these codes work well.

                    you should find originals and replace them.
                    add japanese.h to the project.
                    if you meet sudden death, try re-build please.

                    i thank all of this project and apolyton

                    > Martin

                    now i am trying to make japanese version greatlibary.cpp from lastest english version (2003-12-23All.zip).

                    and i think the location of japanese.h is not fatal.
                    it will work in any place if you join it to the project.

                    the path information is as follows.

                    \ctp2source\ctp2_code\gs\utility\japanese.h
                    \ctp2source\ctp2_code\ui\aui_common\aui_bitmapfont .h
                    \ctp2source\ctp2_code\ui\aui_common\aui_bitmapfont .cpp
                    \ctp2source\ctp2_code\ui\interface\greatlibrary.cp p
                    \ctp2source\ctp2_code\gs\utility\stringutils.cpp
                    \ctp2source\ctp2_code\gs\fileio\Token.cpp

                    i forgot an important notification.
                    these codes are only for japanese.
                    most of changes are harmless for other language version, but causes over head.
                    so i 'm not sure that those should be included to the altered souse package....



                    now i finished the work and replace the zip file.
                    i tested this codes only with the original codes, but the altered codes.
                    hence i understood that i need modfied data files written in japanese to do it.
                    i have not much time and hope help of some other japanese...

                    by the way,
                    i lost the new 'advance', if i load auto-save-file which was created just after getting it. have you already fixed this bug?

                    :::attachment is deleted. see my new post.:::
                    Last edited by 4thmoon; January 3, 2004, 04:59.

                    Comment


                    • #70
                      4thmoon I have two problems with the files you provided one thing is that I have no idea where I should add the japanese.h into the file structure and second you used an older version of greatlibary.cpp so I would need some time to add all your changes myself to the latest version of that file and my time is limited, so if the changes should be incorporated fast then I am afraid you have to do it on your own. It would also help if you add the to the path information, so that I don't have to search the destination of the files myself. Well and there should then also some japanese text files that have to be modified. To match the files with the current progress.

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

                      Comment


                      • #71
                        Translation

                        Sorry for the delay but as we say... better late than never. (though a :guilty: smiley would be more appropriate)...

                        If I have understood it clearly, and that remains to be demonstrated, the translation needed until now is related to the process needed in order to add music options and about new informations in the Ranking Screen...


                        French translation


                        5) Il s'agit maintenant d'ajouter des chaînes (strings) à des fichiers texte.

                        Dans le répertoire "C:...\ctp2_code\ctp", ouvrez le fichier "userkeymap.txt" et ajoutez la ligne "^mMusic" à la fin de la liste.

                        Dans le répertoire du JEU "C:...\Call To Power 2\ctp2_data\french\gamedata", et non dans le répertoire du code source, ouvrez le fichier "Add_str.txt" et ajoutez la ligne "Str_ldl_MusicHotKey "Ctl+m"" après la ligne "str_ldl_SoundHotKey "Ctrl+v"".

                        Ouvrez maintenant le fichier "ldl_str.txt" et dans la section intitulée "# Options Menu Strings", ajoutez la ligne "str_ldl_music "Musique"".

                        Dans ce même fichier, recherchez les lignes "str_ldl_SOUND "SON"" et "str_ldl_SOUND_OPTIONS "SON"" et ajoutez après celles-ci les lignes "str_ldl_MUSIC "Musique"" et "str_ldl_MUSIC_OPTIONS "Musique"".
                        Note : ne mettez pas le texte entre guillemets en majuscule, il s'agit du texte qui va apparaître à l'écran.

                        Dans le répertoire "C:...\Call To Power 2\ctp2_data\default\uidata", ouvrez le fichier "keymap.txt" et ajoutez la ligne "^m MUSIC_OPTIONS" à la fin de celui-ci.

                        **** Il est important de noter que le jeu ne fonctionnera pas (il y aura un crash) si les noms des chaînes (strings) figurant dans les fichiers texte ne correspondent pas à la liste des noms de chaîne (strings) dans les fonctions. Cela signifie qu'une chaîne (string) nommée "ldl_str_MUSIC" dans les fichiers .txt provoquera un crash si le nom de la chaîne (string) est "ldl_str_Music" dans la fonction.


                        To add the "Wonder" and "Pollution" rankings:


                        Vous devez modifier les fichiers "add_str.txt" et "ldl_str.txt".
                        Ouvrez le fichier "ldl_str.txt" qui se trouve dans le répertoire "C:...\Call To Power 2\ctp2_data\french\gamedata", trouvez les lignes suivantes :

                        # Ranking Tab
                        str_ldl_RANKING_MILITARY "Militaire"
                        str_ldl_RANKING_ECONOMIC "Economique"
                        str_ldl_RANKING_SCIENTIFIC "Scientifique"
                        str_ldl_RANKING_OVERALL "Général"
                        str_ldl_INFO_RANKING_TAB "Classement"
                        str_ldl_RANKING_RANK "Rang :"
                        str_ldl_LINE_BUTTON "Courbe"
                        str_ldl_ZEROSUM_BUTTON "Total"

                        et ajoutez les lignes :

                        str_ldl_RANKING_POLLUTION "Pollution"
                        str_ldl_WONDER "Merveilles"


                        End of Translation

                        Note : as I am not a coder or a computer science graduate I hope I have not made any mistake on technical words like "function"...
                        Last edited by Tamerlin; December 23, 2003, 18:45.
                        "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                        Comment


                        • #72
                          Re: Translation

                          Originally posted by Tamerlin
                          Sorry for the delay but as we say... better late than never. (though a :guilty: smiley would be more appropriate)...
                          Well sounds familiar.

                          Originally posted by Tamerlin
                          If I have understood it clearly, and that remains to be demonstrated, the translation needed until now is related to the process needed in order to add music options and about new informations in the Ranking Screen...
                          Well you did not understand it quite correctly. Actual to provide the people with a pacth we need text files in their language, of course no one need to translate the whole text files just the part that was added. So the instructions I gave were for you but not for translation but for doing the translation. So execute the instructions and you have the text files I wanted some weeks ago. For example I don't have a French ldl_str.txt so I couldn't even add strings in English to it.

                          Originally posted by Tamerlin
                          Note : as I am not a coder or a computer science graduate I hope I have not made any mistake on technical words like "function"...
                          Fortunatly I can't verify it as I don't speak any French.

                          I am going to set up a thread for translation purposes anyway.

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

                          Comment


                          • #73
                            martin it is clear to me that it does something

                            but as I am reading drunk it is almost but to what that is the question

                            T?HE Big MC NEEDS A New beeeer
                            "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                            The BIG MC making ctp2 a much unsafer place.
                            Visit the big mc’s website

                            Comment


                            • #74
                              Originally posted by The Big Mc
                              martin it is clear to me that it does something
                              Well, what does something? Anyway here is some new stuff:

                              ..\ctp2_data\default\gamedata\Colors00.txt
                              ..\ctp2_code\gfx\gfx_utils\colorset.h

                              Color set expansion by Martin Gühmann: Up to 33 players are now supported with their own color.

                              I hope you enjoy my new color palette.

                              ..\ctp2_code\gs\database\profileDB.h

                              Modified assert by Martin Gühmann to avoid an assersation falure when you set num players higher the 17.


                              ..\ctp2_code\ui\interface\spnewgameplayersscreen.c pp
                              ..\ctp2_code\ui\interface\spnewgameplayersscreen.h
                              ..\ctp2_code\ui\interface\dipwizard.cpp
                              ..\ctp2_code\ui\interface\dipwizard.h

                              Here I fixed something in the comments of the files to match the information more adequadly.

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

                              Comment


                              • #75
                                very wrong but here it goes


                                5) It is a matter now to add chains (strings) to files text.

                                In the catalog "C:...\ctp2_code\ctp", open the file "userkeymap.txt" and add the line "^mMusic" at the end of the list.

                                In the catalog of the GAME "C:...\Call To Power 2\ctp2_data\french\gamedata", and no in the catalog of the code source, open the file "Add_str.txt" and add the line "Str_ldl_MusicHotKey "Ctl+m"" after the line "str_ldl_SoundHotKey "Ctrl+v"".

                                Open now the file "ldl_str.txt" and in the entitled section "# Options Menu Strings", add the line "str_ldl_music "Musique"".

                                In this same file, look for the lines "str_ldl_SOUND "HIS"" and "str_ldl_SOUND_OPTIONS "HIS"" and add after these the lines "str_ldl_MUSIC "Music"" and "str_ldl_MUSIC_OPTIONS "Musique"". Note: do not put the text in quotes in capital letter, it is a matter of the text that will appear to the screen.

                                In the catalog "C:...\Call To Power 2\ctp2_data\default\uidata", open the file "keymap.txt" and add the line "^m MUSIC_OPTIONS" at the end of this one.

                                **** It is important to note that the game will not work (there will be a crash) if the names of the chains (strings) figuring in the files text do not correspond to the list of the chain names (strings) in the functions. That means that a chain (string) named "ldl_str_MUSIC" in the files. txt will provoke a crash if the name of the chain (string) is "ldl_str_Music" in the function.

                                To add the "Wonder" and "Pollution" rankings:

                                You must modify the files "add_str.txt" and "ldl_str.txt". Open the file "ldl_str.txt" that is located in the catalog "C:...\Call To Power 2\ctp2_data\french\gamedata", find the following lines:

                                # Ranking Tab str_ldl_RANKING_MILITARY "military Officer" str_ldl_RANKING_ECONOMIC "Economique"
                                str_ldl_RANKING_SCIENTIFIC "Scientific" str_ldl_RANKING_OVERALL "General" str_ldl_INFO_RANKING_TAB
                                "Classification" str_ldl_RANKING_RANK "Row:" str_ldl_LINE_BUTTON "Bends" str_ldl_ZEROSUM_BUTTON "Total"

                                and add the lines:

                                str_ldl_RANKING_POLLUTION "Pollution" str_ldl_WONDER "Wonders"
                                "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                                The BIG MC making ctp2 a much unsafer place.
                                Visit the big mc’s website

                                Comment

                                Working...
                                X