Hi again [totally].
This time i wont ask for help , just for a suggestion.
I've got this code (please read the comment lines)
//------------------- FUNCTION LOAD() -------------\\
//Insert 100 image objects into Enemy array.//max data = 100for (int en=0;en<101;en++){ //load the image & remove the background color Enemy[en] = load_image("Data\\enemyA.png"); //if enemy array surface !=null if (Enemy[en]){ //set the EnemyX array position to Screen_width // +en * its width. //max data =100 EnemyX[en] =SCREEN_WIDTH +en *Enemy[en]->w;}}
//------------------- -------------- -------------\-
//------------------- MOVE ENEMY() -------------\\
//---This is just a test...i'll add more movement rutines later.. //move only the 1/10 wave of enemies for (int e=0;e<11;e++) { // increase x pos forward by [1] EnemyX[e] -=1; //update surface.. UPDATE_POSITION( EnemyX[e], EnemyY[e], Enemy[e], screen ); }
//------------------- -------------- -------------\My question is : Should i release(using Free_surface()) the
surface array ? or no?
Im asking because i dont want to cause memory leaks on slow machines.
And another thing...
Im going to write a simple collision detection function , and i would like to
know what do i have to do in order to hide the enemy's object.
I think i have to remove the BLIT_SURFACE() while applying surface's position.
Am i right?
---------------------------
Thats it [dead].
Sorry for asking alot , but its the first time im writing a game (well , im on the 6-7th day) , so please understand me [wink].
ThankS.
PS: Here's a screenshot:
{direct link:http://img81.imageshack.us/img81/9251/ahunter22hp.jpg}