Here the small part of my code(I'm using allegro, but you don't have to know anything about it to solve the problem):
void drawTiles( ?? )/* <--- This is the function I want to use my Class in */{ for ( int lcA= 0; lcA < SCREEN_WIDTH/20; lcA++ ) { for ( int lcB = 0; lcB < SCREEN_HEIGHT/20; lcB++ ) { *myTiles[lcA][lcB].draw( &*tiles, &*buffer ); } }}int main(){ /* --- variables --- */ // Integers // Booleans // Strings // Classes cPlayer myPlayer; cTile myTiles[SCREEN_WIDTH/20][SCREEN_HEIGHT/20]; /* <<--- This is the class that I wish to pass through to the function */ if ( init() == 1 ){ return 1; } while ( !bQuit ) // main loop { // Get all the input checkKeyboardInput(); checkMouseInput(); // Draw everything to the buffer drawTiles( ?? ); // <<--- What to place here?? // Blit the buffer to the screen blit( buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); clear_bitmap( buffer ); } deinit(); return 0; }END_OF_MAIN();
Thank you!