Author Topic: Byocbtris Plugin  (Read 2673 times)

Offline NickFargo

  • Single posting newcomer
  • *
  • Posts: 2
Byocbtris Plugin
« on: April 28, 2015, 11:41:51 pm »
Hi,
I am new here, and I downloaded Code::Blocks 13.12 couple days ago. Following two functions are from file Byocbtris.cpp. It seems that each function name and implementation are not consistent. I think two bolded lines should be swapped or function names should be swapped. What do you think?

void byoCBTris::RotateChunkLeft(const ChunkConfig& chunk,ChunkConfig& newChunk)
{
    for ( int y=0; y<4; y++ )
        for ( int x=0; x<4; x++ )
            newChunk[x+4*y] = chunk[(3-x)*4+y];
    AlignChunk(newChunk);
}

void byoCBTris::RotateChunkRight(const ChunkConfig& chunk,ChunkConfig& newChunk)
{
    for ( int y=0; y<4; y++ )
        for ( int x=0; x<4; x++ )
            newChunk[x+4*y] = chunk[x*4+3-y];
    AlignChunk(newChunk);
}

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9615
Re: Byocbtris Plugin
« Reply #1 on: April 29, 2015, 12:36:08 pm »
Does it work correctly if you play the game?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline NickFargo

  • Single posting newcomer
  • *
  • Posts: 2
Re: Byocbtris Plugin
« Reply #2 on: April 29, 2015, 05:11:58 pm »
I successfully installed C:B IED today. Yes it works correctly when I play the game. Now I know why function AlignChunk() is there. It helps completing the rotate. Thanks for your reply! :-)