What I have is 2 classes for my Tetris game, a block class and a board class.
The block class has an array SDL_Rect blockBoxes[4]; which holds the collisions boxes of each block in a shape.
I'm wanting to pass this to one of the board class's functions, for example:
Board::set_board(SDL_Rect array[]) { }; // the functions
Board game_field(); // the object
game_field.set_board(blockBoxes);
.
.
.
etc.
How can I accomplish this and access the members of the array within the function?
Any advice, suggestions, or links to articles are much appreciated.
This is my first SDL game, and 2nd game total. I usually just give up on this topic and just make things I need global but I want to finally learn and understand this while Im still practicing. Thank you again!
Edited by ChainedHollow, 18 September 2012 - 08:43 PM.






