Share Pastebin
Guest
Public paste!

moteur.c

By: a guest | Mar 21st, 2010 | Syntax: C | Size: 0.96 KB | Hits: 81 | Expires: Never
Copy text to clipboard
  1. #include "moteur.h"
  2.  
  3. void CheckLoad(ge_Image *image, char *nom)
  4. {
  5. if(image)
  6. {
  7. printf(nom);
  8. printf("was been loaded");
  9. }else
  10. {
  11. printf(nom);
  12. printf("was unabled to load");
  13. }
  14. }
  15.  
  16.  
  17. int ChangePos(int position_y_depart, int position_y_new)
  18. {
  19.     int retour = position_y_depart;
  20.     if(position_y_depart == 0)
  21.     {
  22.         retour = position_y_new;
  23.     }
  24.     return retour;
  25. }
  26.  
  27. void MoveViseur()
  28. {
  29.         if (pad.Buttons & PSP_CTRL_RIGHT)
  30.         {
  31.         xv += vitesse;
  32.         }
  33.         else if (pad.Buttons & PSP_CTRL_LEFT)
  34.         {
  35.         xv -= vitesse;
  36.         }
  37.         else if (pad.Buttons & PSP_CTRL_UP)
  38.         {
  39.         xv -= vitesse;
  40.         }
  41.         else if (pad.Buttons & PSP_CTRL_DOWN)
  42.         {
  43.         xv += vitesse;
  44.         }
  45. }
  46.  
  47. void IncrementScore()
  48. {
  49.         if ((pad.Buttons & PSP_CTRL_CROSS) && (bbleu_y == yv) && (xv = 60))
  50.         {
  51.         score++;
  52.         }
  53.                
  54.         if ((pad.Buttons & PSP_CTRL_CROSS) && (bjaune_y == yv) && (xv = 60))
  55.         {
  56.         score++;
  57.         }
  58.                
  59.         if ((pad.Buttons & PSP_CTRL_CROSS) && (bvert_y == yv) && (xv = 60))
  60.         {
  61.         score++;
  62.         }
  63. }