Announcement

Collapse
No announcement yet.

GENERAL: lets get are Bearings

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

  • GENERAL: lets get are Bearings

    i just logged into apolyton five minuets ago we now have the source code and a new forum

    we have to thank locutos no doubt for 1/2 if not all of the forum work and a hole lot of people for the code so i decided to set the tread of so we could thank people

    chock choke not the activision layers choke choke
    "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

  • #2
    Hehe... of course, we have to thank Activision. They decided to release the code, even though they get no profit for it, for a game that they officially ceased to support.

    And, the big thanks go to everyone who was in contact with Activision, and to all of ex-Activisioners for posting on the forums!
    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


    • #3
      Big Mc your typing cracks me up Aside from the people thanked in the CTP2 news item it was mentioned that Big Mc should get some thanks for pestering Activision
      Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
      CtP2 AE Wiki & Modding Reference
      One way to compile the CtP2 Source Code.

      Comment


      • #4
        yes but I still want what I started out for my beta walker
        "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


        • #5
          Originally posted by Maquiladora
          Big Mc your typing cracks me up Aside from the people thanked in the CTP2 news item it was mentioned that Big Mc should get some thanks for pestering Activision
          Absolutely, I think that his original thread, may actually have give the bal that little bit of a nudge..


          Edit: that makes absolutely zero sense "given the ball" ... in order to get it rolling... umm huh, oh never mind
          Last edited by centrifuge; October 28, 2003, 18:04.

          Comment


          • #6
            Many thanks to The Big Mc who in a way initiated all this and to all the modders without whom there would not be any CtP and CtP2 communities on Apolyton, these games are living because you are modding and improving them.

            I think we can also thank the creators and administrators of the Apolyton CS who are supporting turn based games since many years with the seriousness and dedication we all know. I am sure that the fact the call to release the Source Code came from Apolyton has heavily weighted the balance in our favor.

            "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

            Comment


            • #7
              here here
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • #8
                Originally posted by Tamerlin
                ... to all the modders without whom there would not be any CtP and CtP2 communities on Apolyton, these games are living because you are modding and improving them.


                Although it always has been We can now, without the slightest bit of hesitation, state that CtP2 is the most easilly moddable civ game in existance

                So keep up the good work guys...

                Comment


                • #9
                  any body seen this yet

                  BOOL ChatWindow::CheckForEasterEggs(MBCHAR *s)
                  {
                  if (!strcmp(s, "pacman")) {
                  return TRUE;
                  "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


                  • #10
                    Shucks. Now we'll never know what would have happened if that line hadn't been there and we'd typed "pacman" into the chat window.

                    Comment


                    • #11
                      void PacCommand::Execute(sint32 argc, char **argv)
                      {
                      PLAYER_INDEX player = g_selected_item->GetVisiblePlayer();

                      MapPoint pos;
                      g_tiledMap->GetMouseTilePos(pos);

                      Unit newu = g_player[player]->CreateUnit(g_theUnitDB->NumRecords() - 1,
                      pos, Unit(0),
                      FALSE, CAUSE_NEW_ARMY_INITIAL);
                      newu.AccessData()->SetPacMan();
                      }

                      the pac command
                      "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


                      • #12
                        Wanna know how to read/write "shoruded" files? Take a look in the ctp2files/CTP/fingerprint folder and open shroud.c.......

                        /*--------------------------------------------------------------------------
                        Shroud module.

                        These functions are used to read from and write to "shrouded" files. A
                        shrouded file is an encoded version of some other file. A shrouded file and
                        its corresponding unencoded file are related in the following way: Each byte
                        in the unencoded file is transformed in value depending on its location in the
                        file. Hence, a shrouded file is identical in size to its corresponding
                        non-shrouded file.

                        A shrouded file is unreadable to any non-superhuman. One can use a shrouded
                        file in place of a file in which information must be hidden (and unalterable
                        in a controlled sort of manner) from an average user. For example, a
                        shrouded localized strings file will be unreadable and so the strings will
                        not be vulnerable to alteration. As another example, a shrouded image file
                        will be unreadable to any standard image viewing/manipulation program.

                        Since shrouding a file alters each byte rather than rearranging bytes, one
                        can use the functions in this file to read/write shrouded files and decode
                        them one byte at a time. For example, if you only want to read in the
                        BITMAPINFOHEADER from a shrouded BMP file, you need only to use shroud_seek()
                        to seek past the BITMAPFILEHEADER and shroud_read() to read and decode the
                        next sizeof(BITMAPINFOHEADER) bytes of the shrouded BMP file. Similarly,
                        shroud_write() will encode bytes as they are written to a shrouded file.

                        Futhurmore, these functions correspond to commonly used stdio.h functions.
                        So, when dealing with a shrouded file, one can make intuitive substitutions
                        in their code:

                        FILE *file ---> shroud_t *sfile
                        fopen( filename, "rb" ) ---> shroud_readopen( filename )
                        fopen( filename, "wb" ) ---> shroud_writeopen( filename )
                        fopen( filename, "ab" ) ---> shroud_appendopen( filename )
                        fopen( filename, "r+b" ) ---> shroud_updateopen( filename )
                        fread( buffer, 1, length, file ) ---> shroud_read( sfile, buffer, length )
                        fwrite( buffer, 1, length, file ) ---> shroud_write( sfile, buffer, length )
                        fseek( file, offset, origin ) ---> shroud_seek( sfile, offset, origin )
                        fclose( file ) ---> shroud_close( sfile )

                        So we can deal with shrouded files in nearly exactly the same way in which
                        we deal with any other file. The encoding and decoding is handled internally.

                        See the .h file for function declarations and descriptions of data types.
                        --------------------------------------------------------------------------*/
                        Looks like Ogre missed a few.

                        Comment


                        • #13
                          Wanna play CTP2 while running an audio CD through WinAmp?

                          No problems.......


                          BOOL c3files_HasLegalCD()
                          {
                          BOOL success = FALSE;

                          if (g_soundManager) {
                          g_soundManager->CleanupRedbook();
                          }

                          while (!success) {

                          success = c3files_FindCDByName(k_CTP_CD_VOLUME_NAME, TRUE);

                          Comment


                          • #14
                            More interesting stuff........ unencoding the data files.....

                            /*--------------------------------------------------------------------------
                            Encode 'length' elements of 'bytes' using 'operand' as the encoding key.
                            When used with shrouded files, 'operand' represents the offset of the the
                            first character of 'bytes' in the file. However, it is not mandatory that
                            'operand' be used this way outside of shrouded files...

                            In general, one can deduce the proper usage of encode() by accepting as an
                            axiom that the following two snippets produce equivalent results:

                            // this line of code...

                            shroud_encode( ptr , len1 + len2 , opr );

                            // is equivalent to these two lines...

                            shroud_encode( ptr , len1 , opr );
                            shroud_encode( ptr + len1 , len2 , opr + len1 );

                            --------------------------------------------------------------------------*/
                            void shroud_encode( unsigned char *bytes, size_t length, size_t operand )
                            {
                            unsigned char uc_operand = (unsigned char)(41*operand);
                            unsigned char uc_offset = (unsigned char)(operand/70 + 53);
                            unsigned char uc_count = (unsigned char)(operand%70);

                            while ( length-- )
                            {
                            /* If 'byte' is odd in value, adjust its value but still keep it odd
                            so that the operation is invertible.*/
                            if ( *bytes & 0x01 ) *bytes += 108;

                            /* Bitwise-exclusive-or 'byte' with 41 times 'operand.' 'operand' is
                            scaled so that identical adjacent bytes will be shrouded better. */
                            *bytes ^= uc_operand;

                            /* Every 70 characters will get a different value added to it. This way,
                            repeating strings in a given file will be endcoded differently depending on
                            their location in the file. Add 53 so that the leading characters of a file
                            will be altered. */
                            *bytes += uc_offset;

                            /* Get ready for next pass. */
                            bytes++;
                            uc_operand += 41;
                            if ( ++uc_count == 70 )
                            {
                            uc_count = 0;
                            uc_offset++;
                            }
                            }
                            }


                            /*--------------------------------------------------------------------------
                            Decode 'length' elements of 'bytes' using 'operand' as the decoding key.
                            When used with shrouded files, 'operand' represents the offset of the the
                            first character of 'bytes' in the file. However, it is not mandatory that
                            'operand' be used this way outside of shrouded files...

                            In general, one can deduce the proper usage of decode() by accepting as an
                            axiom that the following two snippets produce equivalent results:

                            // this line of code...

                            shroud_decode( ptr , len1 + len2 , opr );

                            // is equivalent to these two lines...

                            shroud_decode( ptr , len1 , opr );
                            shroud_decode( ptr + len1 , len2 , opr + len1 );

                            --------------------------------------------------------------------------*/
                            void shroud_decode( unsigned char *bytes, size_t length, size_t operand )
                            {
                            unsigned char uc_operand = (unsigned char)(41*operand);
                            unsigned char uc_offset = (unsigned char)(operand/70 + 53);
                            unsigned char uc_count = (unsigned char)(operand%70);

                            while ( length-- )
                            {
                            /* These operations undo what the operations in encode() did.
                            See shroud_encode() for comments. */
                            *bytes -= uc_offset;
                            *bytes ^= uc_operand;
                            if ( *bytes & 0x01 ) *bytes -= 108;

                            /* Get ready for next pass. */
                            bytes++;
                            uc_operand += 41;
                            if ( ++uc_count == 70 )
                            {
                            uc_count = 0;
                            uc_offset++;
                            }
                            }
                            }

                            Comment


                            • #15
                              I found why AI stacks won't move around it's own 12-stacks. We'll need to put in a new Astar entry type so it doesn't return as ASTAR_BLOCKED, and then change Astar.cpp so it processes it to look for a different direction.

                              Code:
                              BOOL UnitAstar::CheckUnits(const MapPoint &prev, const MapPoint &pos,                           
                                  Cell* the_prev_cell, Cell* the_pos_cell, 
                                  float &cost, BOOL &is_zoc, BOOL &can_be_zoc, ASTAR_ENTRY_TYPE &entry, 
                              	BOOL &can_enter)
                              {     
                              ..
                              ..
                              ..
                              				if (m_check_dest && (k_MAX_ARMY_SIZE - dest_army->Num()) < m_nUnits) {   
                              					cost = k_ASTAR_BIG; 
                              					can_enter = FALSE;
                              					entry = ASTAR_BLOCKED; 
                                                  return TRUE; 
                              				}
                              ..
                              ..
                              ..

                              Comment

                              Working...
                              X