Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualUnderGrowthFiler

Posted 02 February 2012 - 12:54 PM

Oh yea sorry let me redo that


///////////////////////////////////////////////
//Main Libary
///////////////////////////////////////////////
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
//////////////////////////////////////////////
//Main Entry
int main(int argc, char *argv[])
{
				 //Done setup
				 bool done = false;
		
				 //Surface For Screen
				 SDL_Surface *Screen = NULL;
		
				 //Screen Setup
				 Screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
		
				 SDL_Event event;
				int enemyfunction(void *unused)
		   {
				  //////////////////////////////////////////////////
				  //Orange Ghost Knight Logic
				 /////////////////////////////////////////////////
				 SDL_Rect OrangeGhostKnightRect;
				 SDL_Rect StorageRect10;
				StorageRect10.x = 400;
				StorageRect10.y = 320;
				 ///////////////////////////////////////////////
						if(StorageRect10.x == 400)
												{
						 StorageRect10.x += 40;
						 OrangeGhostKnightRect = StorageRect10;
						 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
					   }
						 if(StorageRect10.x == 2000)
					   {
					  StorageRect10.x -=40;
					  OrangeGhostKnightRect = StorageRect10;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
					   }
		   }
				 //While Done = false
				 while(!done)
				 {
		
		 //While SDL is continous
	 SDL_PollEvent(&event)
								{
		switch(event.type)
		{
		  SDL_Thread *EnemyThread;
		EnemyThread = SDL_CreateThread(Enemyfunction,NULL);
		   case SDL_QUIT:
			return 0;
				break;
								 }
   }
}

#5UnderGrowthFiler

Posted 02 February 2012 - 12:51 PM

Oh yea sorry let me redo that


///////////////////////////////////////////////
//Main Libary
///////////////////////////////////////////////
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
//////////////////////////////////////////////
//Main Entry
int main(int argc, char *argv[])
{
				 //Done setup
				 bool done = false;
		
				 //Surface For Screen
				 SDL_Surface *Screen = NULL;
		
				 //Screen Setup
				 Screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
		
				 SDL_Event event;
				int enemyfunction(void *unused)
		   {
				  //////////////////////////////////////////////////
				  //Orange Ghost Knight Logic
				 /////////////////////////////////////////////////
				 SDL_Rect OrangeGhostKnightRect;
				 SDL_Rect StorageRect10;
				StorageRect10.x = 400;
				StorageRect10.y = 320;
				 ///////////////////////////////////////////////
						if(StorageRect10.x == 400)
												{
						 StorageRect10.x += 40;
						 OrangeGhostKnightRect = StorageRect10;
						 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
					   }
						 if(StorageRect10.x == 2000)
					   {
					  StorageRect10.x -=40;
					  OrangeGhostKnightRect = StorageRect10;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
					   }
		   }
				 //While Done = false
				 while(!done)
				 {
		
		 //While SDL is continous
	 SDL_PollEvent(&event)
								{
		switch(event.type)
		{
		  SDL_Thread *EnemyThread;
		EnemyThread = SDL_CreateThread(Enemyfunction,NULL);
		   case SDL_QUIT:
			return 0;
				break;
								 }
   }
}

#4UnderGrowthFiler

Posted 02 February 2012 - 12:50 PM

Oh yea sorry let me redo that


///////////////////////////////////////////////
//Main Libary
///////////////////////////////////////////////
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
//////////////////////////////////////////////
//Main Entry
int main(int argc, char *argv[])
{
				 //Done setup
				 bool done = false;
		
				 //Surface For Screen
				 SDL_Surface *Screen = NULL;
		
				 //Screen Setup
				 Screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
		
				 SDL_Event event;
				int enemyfunction(void *unused)
		   {
				  //////////////////////////////////////////////////
                  //Orange Ghost Knight Logic
				 /////////////////////////////////////////////////
				 SDL_Rect OrangeGhostKnightRect;
				 SDL_Rect StorageRect10;
				StorageRect10.x = 400;
				StorageRect10.y = 320;
				 ///////////////////////////////////////////////
						if(StorageRect10.x == 400)
												{
						 StorageRect10.x += 40;
						 OrangeGhostKnightRect = StorageRect10;
						 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
                       }
                         if(StorageRect10.x == 2000)
                       {
                      StorageRect10.x -=40;
                      OrangeGhostKnightRect = StorageRect10;
                      SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
                       }
		   }
				 //While Done = false
				 while(!done)
				 {
		
         //While SDL is continous
     SDL_PollEvent(&event)
								{
		switch(event.type)
		{
          SDL_Thread *EnemyThread;
        EnemyThread = SDL_CreateThread(Enemyfunction,NULL);
           case SDL_QUIT:
            return 0;
                break;
								 }
   }
}

#3UnderGrowthFiler

Posted 02 February 2012 - 12:48 PM

Oh yea sorry let me redo that


///////////////////////////////////////////////
//Main Libary
///////////////////////////////////////////////
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
//////////////////////////////////////////////
//Main Entry
int main(int argc, char *argv[])
{
				 //Done setup
				 bool done = false;
		 
				 //Surface For Screen
				 SDL_Surface *Screen = NULL;
		 
				 //Screen Setup
				 Screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
		 
				 SDL_Event event;
			    int enemyfunction(void *unused)
		   {
				  //////////////////////////////////////////////////
										 //Orange Ghost Knight Logic
				 /////////////////////////////////////////////////
				 SDL_Rect OrangeGhostKnightRect;
				 SDL_Rect StorageRect10;
			    StorageRect10.x = 400;
			    StorageRect10.y = 320;
				 ///////////////////////////////////////////////
					    if(StorageRect10.x == 400)
											    {
						 StorageRect10.x += 40;
						 OrangeGhostKnightRect = StorageRect10;
						 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
											    }
										 if(StorageRect10.x == 2000)
											    {
												   StorageRect10.x -=40;
												   OrangeGhostKnightRect = StorageRect10;
												   SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
											    }
		   }
				 //While Done = false
				 while(!done)
				 {
		 
								   //While SDL is continous
								   SDL_PollEvent(&event)
							    {
	    switch(event.type)
	    {
								 SDL_Thread *EnemyThread;
							    EnemyThread = SDL_CreateThread(Enemyfunction,NULL);
								   case SDL_QUIT:
												 return 0;
											    break;
								 }
   }
}

#2UnderGrowthFiler

Posted 02 February 2012 - 12:48 PM

Oh yea sorry let me redo that

#1UnderGrowthFiler

Posted 02 February 2012 - 12:47 PM

Oh yea sorry I should really post the actual code was copying the code post before


/////////////////////////////
//Main Libary
/////////////////////////////
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_mixer.h>
/////////////////////////////
//Other Files
#include "CollisionFunction.h"
/////////////////////////////
#define SCREEN_HEIGHT 640
#define SCREEN_WIDTH 480
/////////////////////////////
SDL_Rect OrangeGhostKnightRect;
		    //Main Rectangles
		    SDL_Rect LevelOneRect;
		    SDL_Rect GroundOneRect;
		    SDL_Rect GroundTwoRect;
		    SDL_Rect GroundThreeRect;
		    SDL_Rect GroundFourRect;
		    //Mario Rect
		    SDL_Rect MarioRect;
		    //Water Rects
		    SDL_Rect WaterRect;
		    SDL_Rect WaterRect2;
		    SDL_Rect WaterRect3;
		    SDL_Rect WaterGroundRect;

		    //Storage Rectangles
		    SDL_Rect StorageRect1;
		    SDL_Rect StorageRect2;
		    SDL_Rect StorageRect3;
		    SDL_Rect StorageRect4;
		    SDL_Rect StorageRect5;
		    SDL_Rect StorageRect6;
		    SDL_Rect StorageRect7;
		    SDL_Rect StorageRect8;
		    SDL_Rect StorageRect9;
		    SDL_Rect StorageRect10;
		    //BubbleGumRect Storage
		    SDL_Rect StorageRect11;
		    SDL_Rect StorageRect12;

		    //BoundingBox
		    SDL_Rect BoundingBox1;
		    SDL_Rect BoundingBox2;
		    //Timer Rect
		    SDL_Rect TimerTextRect;
		    //Weather Rect
		    SDL_Rect BubbleGumCloudRect;
/////////////////////////////////////////////////////////////////

int OrangeGhostKnightFunction(void *unused)
{


bool OGKToggle = false;
		 //////////////////////////////////////////////////
					 //Orange Ghost Knight Logic
		 /////////////////////////////////////////////////
		 ///////////////////////////////////////////////
for(int d = 0; d < 10; d++)
{
	    if(StorageRect10.x == 400)
					    {
							   StorageRect10.x += 40;
							  OrangeGhostKnightRect = StorageRect10;
							  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

					    }

					 if(StorageRect10.x == 2000)
					    {
						   StorageRect10.x -=40;
						   OrangeGhostKnightRect = StorageRect10;
						   SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

					    }
}
}
////////////////////////////////////////////////////////////////////////////////////////////////

int LevelOneFunction(void *unused)
{
		    ////////////////////////////////////////////////////////////////////////////////
		    //Color Selections
		    Uint32 RedColor =SDL_MapRGB(Screen->format,255,0,0);
		    Uint32 OrangeColor =SDL_MapRGB(Screen->format,255,100,0);
		    Uint32 BlackColor =SDL_MapRGB(Screen->format,0,0,0);
		    Uint32 GreyColor = SDL_MapRGB(Screen->format,192,192,192);
		    Uint32 MintGreenColor = SDL_MapRGB(Screen->format,39,216,176);
		    Uint32 LightOliveGreenColor = SDL_MapRGB(Screen->format,135,179,77);
		    //SDL COLOR Colors
			 SDL_Color WhiteColor = {255,255,255};
		    ////////////////////////////////////////////////////////////////////////////////

		    ////////////////////////
		    //Storage Rect Positions
		    ///////////////////////
		    StorageRect1.x = 0;
		    StorageRect1.y = 0;
		    StorageRect2.x = 0;
		    StorageRect2.y = 380;
		    StorageRect3.x = 0;
		    StorageRect3.y = 310;
		    StorageRect4.x = 0;
		    StorageRect4.y = 360;
		    StorageRect5.x = 0;
		    StorageRect5.y = 400;
		    StorageRect6.x = 320;
		    StorageRect6.y = 400;
		    StorageRect7.x = 580;
		    StorageRect7.y = 400;
		 StorageRect10.x = 400;
	    StorageRect10.y = 320;
		    StorageRect11.y = -200;
		    StorageRect12.x = 5;
		    ///////////////////////////////
		    //BoundingBox 1 Values
		    BoundingBox1.x =160;
		    BoundingBox1.y =360;
		    BoundingBox1.w = 60;
		    BoundingBox1.h = 108;
		    //BoundingBox 2 Values
		    BoundingBox2.x =300;
		    BoundingBox2.y =300;
		    BoundingBox2.w = 60;
		    BoundingBox2.h = 120;

		    //Mario Rect Values
		    MarioRect.x = 0;
		    MarioRect.y = 0;
		    //LevelOneBG Values
		    LevelOneRect.x = 0;
		    LevelOneRect.y = 0;
		    //PurpleAmal Rock 1 Values
		    GroundOneRect.x = 0;
		    GroundOneRect.y = 0;
		    //Timer Values

			 LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk1Surf,NULL,Screen,&MarioRect);
		    SDL_Flip(Screen);


   //Bool Variable
    bool done = false;
    //Event Creation
    SDL_Event event;
	  while(!done)
		    {

	  //////////////////////////////////////////////////////////////////////////////////////

	  //While continous events are running in event
	  while(SDL_PollEvent(&event))
	  {

		 StorageRect11.x += 1;
		 SDL_FillRect(Screen,&BoundingBox2,MintGreenColor);

	  ////////////////////////////////////////////////////

		    //allow to be able to switch events
		    switch(event.type)
		    {
					  SDL_Flip(Screen);
		 /////////////////////////////////////////////////////////////////////////////////////////
		    ////////////////////////////////
			    //if user presses on close
			    case SDL_QUIT:
				    //Close Application
				    return 0;

					    //break case
					    break;
		    ////////////////////////////////////

		    //While Any Key is Down
				    //Movements of actual visual objects
				    StorageRect1.x -=6;
				    StorageRect2.x -=2;
				    StorageRect3.x +=10;
				    StorageRect3.y += 5;
				    StorageRect4.x -=1;
				    StorageRect5.x -= 4;
				    StorageRect6.x -=2;
				    StorageRect7.x -=2;
				    BoundingBox2.x -=2;
				    //Movements of BoundingBoxes

				    if(StorageRect3.x > SCREEN_WIDTH)
				    {
					    StorageRect3.x -=20;
					    StorageRect2.x -=3;
					    StorageRect6.x -=3;
					    StorageRect1.x -=10;
				    }

				    /////////////////////////////////////////////////
				    ////////////////////////////
				    //Collision Boxes
				    ////////////////////////////
				    if(Check_Collision(MarioRect,GroundOneRect))
				    {
					    StorageRect3.y -= 5;
				    }

				    if(Check_Collision(MarioRect,BoundingBox1))
				    {
					    StorageRect3.y += 6;
				    }
							  LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk1Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    TimerTextRect = StorageRect12;
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);

				    /////////////////////////////////////////

		    LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk2Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);


				    /////////////////////////////////////////


		    LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk3Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);
				   break;

				 //Up is Pressed
				   case SDLK_LEFT:

			   ///////////////////////////////////////////////
				 //Left Side Animation
			    ///////////////////////////////////////////////

				    LevelOneRect = StorageRect1;
				    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
				    WaterGroundRect = StorageRect5;
				    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
				    GroundOneRect = StorageRect2;
				    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
				    GroundTwoRect = StorageRect6;
				    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
				    GroundThreeRect = StorageRect7;
				    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
				    MarioRect = StorageRect3;
				    SDL_BlitSurface(SuperMarioLeftWalk1Surf,NULL,Screen,&MarioRect);


				    /////////////////////////////////////////
			    LevelOneRect = StorageRect1;
			    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
			    WaterGroundRect = StorageRect5;
			    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
			    GroundOneRect = StorageRect2;
			    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
			    GroundTwoRect = StorageRect6;
			    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
			    GroundThreeRect = StorageRect7;
			    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
			    MarioRect = StorageRect3;
			    SDL_BlitSurface(SuperMarioLeftWalk2Surf,NULL,Screen,&MarioRect);

				    /////////////////////////////////////////

				    LevelOneRect = StorageRect1;
				    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
				    WaterGroundRect = StorageRect5;
				    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
				    GroundOneRect = StorageRect2;
				    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
				    GroundTwoRect = StorageRect6;
				    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
				    GroundThreeRect = StorageRect7;
				    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);

				    MarioRect = StorageRect3;
				    SDL_BlitSurface(SuperMarioLeftWalk3Surf,NULL,Screen,&MarioRect);

										  //Enemy Box
			 SDL_Rect OrangeGhostKnightRect;
					  //Enemy Values
					    OrangeGhostKnightRect.x = 300;
					    OrangeGhostKnightRect.y = 400;
		    //////////////////////////////////

					   OrangeGhostKnightRect.x = 310;
							 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

			 OrangeGhostKnightRect.x = 320;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);
			 OrangeGhostKnightRect.x = 330;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

		    /////////////////////////////////////////

				    //Movements
				    StorageRect1.x +=6;
				    StorageRect2.x +=6;
				    StorageRect3.x -=20;
				    StorageRect4.x +=1;
				    StorageRect6.x +=2;
				    StorageRect7.x +=2;

		 /////////////////////////////
		    //SDL_KEYLEFT
			    break;
			   ////////////////////////
			   //KEYSYSTEM EVENTS ^^
				    }

		    //SDL KEYDOWN
				    break;

		    }


////////////////////////////////////
///////////////////////////////////
//DONT KNOW
							    }
									  /////////////////////////////////////////////////////////////////
		    //IF YOU WANT STUFF TO RUN ON ITS OWN PUT IT HERE
		    ////////////////////////////////////////////////////////////////
				  SDL_Thread *OrangeGhostKnightLogicAndDraw;
		    OrangeGhostKnightLogicAndDraw =SDL_CreateThread(OrangeGhostKnightFunction,NULL);
		    ////////////////////////////////////////////////////////////////
//DONT KNOW

									    }

//DONT KNOW
//COULD BE THE RIGHT POINT
}		    case SDL_KEYDOWN:
		    //Allow Keyboard Events
		    switch(event.key.keysym.sym)
		    {
			    //Up is Pressed
				   case SDLK_RIGHT:
	   //  SDL_FillRect(Screen,&GroundOneRect,OrangeColor);
    // SDL_FillRect(Screen,&BoundingBox1,MintGreenColor);
	 //   SDL_UpdateRect(Screen,NULL,NULL,NULL,NULL);
				    //Movements of actual visual objects
				    StorageRect1.x -=6;
				    StorageRect2.x -=2;
				    StorageRect3.x +=10;
				    StorageRect3.y += 5;
				    StorageRect4.x -=1;
				    StorageRect5.x -= 4;
				    StorageRect6.x -=2;
				    StorageRect7.x -=2;
				    BoundingBox2.x -=2;
				    //Movements of BoundingBoxes

				    if(StorageRect3.x > SCREEN_WIDTH)
				    {
					    StorageRect3.x -=20;
					    StorageRect2.x -=3;
					    StorageRect6.x -=3;
					    StorageRect1.x -=10;
				    }

				    /////////////////////////////////////////////////
				    ////////////////////////////
				    //Collision Boxes
				    ////////////////////////////
				    if(Check_Collision(MarioRect,GroundOneRect))
				    {
					    StorageRect3.y -= 5;
				    }

				    if(Check_Collision(MarioRect,BoundingBox1))
				    {
					    StorageRect3.y += 6;
				    }
							  LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk1Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    TimerTextRect = StorageRect12;
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);

				    /////////////////////////////////////////

		    LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk2Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);

				    /////////////////////////////////////////

		    LevelOneRect = StorageRect1;
		    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
		    WaterGroundRect = StorageRect5;
		    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
		    GroundOneRect = StorageRect2;
		    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
		    GroundTwoRect = StorageRect6;
		    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
		    GroundThreeRect = StorageRect7;
		    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
		    MarioRect = StorageRect3;
		    SDL_BlitSurface(SuperMarioWalk3Surf,NULL,Screen,&MarioRect);
		    BubbleGumCloudRect = StorageRect11;
		    SDL_BlitSurface(BubbleGumCloudSurf,NULL,Screen,&BubbleGumCloudRect);
		    SDL_BlitSurface(Text,NULL,Screen,&TimerTextRect);
				   break;

				 //Up is Pressed
				   case SDLK_LEFT:

			   ///////////////////////////////////////////////
				 //Left Side Animation
			    ///////////////////////////////////////////////

				    LevelOneRect = StorageRect1;
				    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
				    WaterGroundRect = StorageRect5;
				    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
				    GroundOneRect = StorageRect2;
				    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
				    GroundTwoRect = StorageRect6;
				    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
				    GroundThreeRect = StorageRect7;
				    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
				    MarioRect = StorageRect3;
				    SDL_BlitSurface(SuperMarioLeftWalk1Surf,NULL,Screen,&MarioRect);

				    /////////////////////////////////////////
			    LevelOneRect = StorageRect1;
			    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
			    WaterGroundRect = StorageRect5;
			    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
			    GroundOneRect = StorageRect2;
			    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
			    GroundTwoRect = StorageRect6;
			    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
			    GroundThreeRect = StorageRect7;
			    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);
			    MarioRect = StorageRect3;
			    SDL_BlitSurface(SuperMarioLeftWalk2Surf,NULL,Screen,&MarioRect);

				    /////////////////////////////////////////

				    LevelOneRect = StorageRect1;
				    SDL_BlitSurface(LevelOneBG,NULL,Screen,&LevelOneRect);
				    WaterGroundRect = StorageRect5;
				    SDL_BlitSurface(WaterGroundSurf,NULL,Screen,&WaterGroundRect);
				    GroundOneRect = StorageRect2;
				    SDL_BlitSurface(GroundOneBG,NULL,Screen,&GroundOneRect);
				    GroundTwoRect = StorageRect6;
				    SDL_BlitSurface(GroundTwoBG,NULL,Screen,&GroundTwoRect);
				    GroundThreeRect = StorageRect7;
				    SDL_BlitSurface(GroundThreeBG,NULL,Screen,&GroundThreeRect);

				    MarioRect = StorageRect3;
				    SDL_BlitSurface(SuperMarioLeftWalk3Surf,NULL,Screen,&MarioRect);

										  //Enemy Box
			 SDL_Rect OrangeGhostKnightRect;
					  //Enemy Values
					    OrangeGhostKnightRect.x = 300;
					    OrangeGhostKnightRect.y = 400;
		    //////////////////////////////////

					   OrangeGhostKnightRect.x = 310;
							 SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

			 OrangeGhostKnightRect.x = 320;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

			 OrangeGhostKnightRect.x = 330;
					  SDL_BlitSurface(OrangeGhostKnightSurf,NULL,Screen,&OrangeGhostKnightRect);

		    /////////////////////////////////////////

				    //Movements
				    StorageRect1.x +=6;
				    StorageRect2.x +=6;
				    StorageRect3.x -=20;
				    StorageRect4.x +=1;
				    StorageRect6.x +=2;
				    StorageRect7.x +=2;

		 /////////////////////////////
		    //SDL_KEYLEFT
			    break;
			   ////////////////////////
			   //KEYSYSTEM EVENTS ^^
				    }

		    //SDL KEYDOWN
				    break;

		    }


////////////////////////////////////
///////////////////////////////////
//DONT KNOW
							    }
									  /////////////////////////////////////////////////////////////////
		    //IF YOU WANT STUFF TO RUN ON ITS OWN PUT IT HERE
		    ////////////////////////////////////////////////////////////////
				  SDL_Thread *OrangeGhostKnightLogicAndDraw;
		    OrangeGhostKnightLogicAndDraw =SDL_CreateThread(OrangeGhostKnightFunction,NULL);
		    ////////////////////////////////////////////////////////////////
//DONT KNOW
									    }
//DONT KNOW
//COULD BE THE RIGHT POINT
}
////////////////////////////////////////////////////////////////////////////

PARTNERS