Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <oslib/oslib.h>
  2.  
  3. #include "buu.h"
  4.  
  5. PSP_MODULE_INFO("Project Buu", 0, 1, 1);
  6. PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
  7.  
  8. OSL_IMAGE *menuback, *sel;
  9.  
  10. int menu = 1;
  11. int menusel = 1;
  12. int first_sel_x = 200;
  13. int first_sel_y = 159;
  14. int selimagex;
  15. int selimagey;
  16. int num_of_sel = 1;
  17. int x_dis_bet_sel = 0;
  18. int y_dis_bet_sel = 1;
  19.  
  20.  
  21. void Buttons();
  22. void SpriteAnimate();
  23.  
  24. int main()
  25.  
  26. {
  27.     oslInit(0);
  28.  
  29.     oslInitGfx(OSL_PF_8888, 1);
  30.    
  31.     oslInitConsole();
  32.  
  33.     oslInitAudio();
  34.    
  35.     menuback = oslLoadImageFile("menuback.png", OSL_IN_RAM, OSL_PF_8888);
  36.     sel = oslLoadImageFile("sel1.png", OSL_IN_RAM, OSL_PF_8888);
  37.    
  38.     while (menu == 1)
  39.     {          
  40.         oslStartDrawing();
  41.  
  42.         oslReadKeys();
  43.        
  44.         if (menu == 1) oslDrawImage(menuback);
  45.         if (menu == 1) oslDrawImage(sel);
  46.        
  47.         if (menu == 1) sel->x = selimagex;
  48.         if (menu == 1) sel->y = selimagey;
  49.        
  50.         if (menu == 1) selimagex = first_sel_x+(x_dis_bet_sel*menusel);
  51.         if (menu == 1) selimagey = first_sel_y+(y_dis_bet_sel*menusel);
  52.        
  53.         if (menu == 1 && osl_keys->pressed.down) menusel++;
  54.         if (menu == 1 && osl_keys->pressed.up) menusel--;
  55.        
  56.         if (menu == 1 && menusel > num_of_sel) menusel = 1;
  57.         if (menu == 1 && menusel < 1) menusel = num_of_sel;
  58.        
  59.         if (menu == 1 && menusel == 1 && osl_keys->pressed.cross) menu = 2;
  60.        
  61.         oslEndDrawing();
  62.  
  63.         oslSyncFrame();    
  64.  
  65.         oslAudioVSync();
  66.        
  67.     }
  68.  
  69.     oslSetTransparentColor(RGB(255,0,255));
  70.  
  71.     oslDisableTransparentColor();
  72.  
  73.     while (!osl_quit)
  74.     {
  75.         oslStartDrawing();     
  76.        
  77.         map();
  78.        
  79.         goku();
  80.  
  81.         oslEndDrawing();
  82.  
  83.         oslSyncFrame();    
  84.     }
  85.    
  86.     oslEndGfx();
  87.     oslQuit();
  88.     return 0;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement