Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualDarkHorseKnight

Posted 29 September 2012 - 10:10 AM

Hello I'm trying to set my zooming Cairo surface to a different z order then the SDL surface so that the Cairo surface is infront of the SDL surface but its not working.

My guess was just to switch the order of both the Cairo surface and SDL surface but no luck ;/

 if(ZOrderSwitch == false)
  {
   cout << " Z Order Set to False" << endl;
  
   ChocoFrontStorageRect = ChocoFrontRect;
   cairo_paint(Fences);
   cairo_surface_flush(FenceSurf);
   SDL_BlitSurface(CGTextSurf,NULL,Screen,&CrazyRect);
   SDL_BlitSurface(ChocoFrontSurf[ChocoFrontFrameTimer],NULL,Screen,&ChocoFrontStorageRect);
   cairo_surface_mark_dirty(FenceSurf);
  
  }
  else
  {
 
   cout << "Z Order Set to True" << endl;
 
   ChocoFrontStorageRect = ChocoFrontRect;
   cairo_surface_flush(FenceSurf);
   SDL_BlitSurface(CGTextSurf,NULL,Screen,&CrazyRect);
   SDL_BlitSurface(ChocoFrontSurf[ChocoFrontFrameTimer],NULL,Screen,&ChocoFrontStorageRect);
   cairo_surface_mark_dirty(FenceSurf);
  
 
   cairo_paint(Fences);
  }


  if(FenceRect.x <= 40)
  {
   ZOrderSwitch = true;
  }

#1DarkHorseKnight

Posted 29 September 2012 - 10:09 AM

Hello I'm trying to set my zooming Cairo surface to a different z order then the SDL surface so that the Cairo surface is infront of the SDL surface but its not working.

My guess was just to switch the order of both the Cairo surface and SDL surface but no luck ;/

  if(ZOrderSwitch == false)
  {
   cout << " Z Order Set to False" << endl;
  
  

   ChocoFrontStorageRect = ChocoFrontRect;
   cairo_paint(Fences);
   cairo_surface_flush(FenceSurf);
   SDL_BlitSurface(CGTextSurf,NULL,Screen,&CrazyRect);
   SDL_BlitSurface(ChocoFrontSurf[ChocoFrontFrameTimer],NULL,Screen,&ChocoFrontStorageRect);
   cairo_surface_mark_dirty(FenceSurf);
  
  }
  else
  {

   cout << "Z Order Set to True" << endl;

   ChocoFrontStorageRect = ChocoFrontRect;
   cairo_surface_flush(FenceSurf);
   SDL_BlitSurface(CGTextSurf,NULL,Screen,&CrazyRect);
   SDL_BlitSurface(ChocoFrontSurf[ChocoFrontFrameTimer],NULL,Screen,&ChocoFrontStorageRect);
   cairo_surface_mark_dirty(FenceSurf);
  

   cairo_paint(Fences);
  }


  if(FenceRect.x <= 40)
  {
   ZOrderSwitch = true;
  }


PARTNERS