Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <oslib/oslib.h>
- #include "buu.h"
- PSP_MODULE_INFO("Project Buu", 0, 1, 1);
- PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
- OSL_IMAGE *menuback, *sel;
- int menu = 1;
- int menusel = 1;
- int first_sel_x = 200;
- int first_sel_y = 159;
- int selimagex;
- int selimagey;
- int num_of_sel = 1;
- int x_dis_bet_sel = 0;
- int y_dis_bet_sel = 1;
- void Buttons();
- void SpriteAnimate();
- int main()
- {
- oslInit(0);
- oslInitGfx(OSL_PF_8888, 1);
- oslInitConsole();
- oslInitAudio();
- menuback = oslLoadImageFile("menuback.png", OSL_IN_RAM, OSL_PF_8888);
- sel = oslLoadImageFile("sel1.png", OSL_IN_RAM, OSL_PF_8888);
- while (menu == 1)
- {
- oslStartDrawing();
- oslReadKeys();
- if (menu == 1) oslDrawImage(menuback);
- if (menu == 1) oslDrawImage(sel);
- if (menu == 1) sel->x = selimagex;
- if (menu == 1) sel->y = selimagey;
- if (menu == 1) selimagex = first_sel_x+(x_dis_bet_sel*menusel);
- if (menu == 1) selimagey = first_sel_y+(y_dis_bet_sel*menusel);
- if (menu == 1 && osl_keys->pressed.down) menusel++;
- if (menu == 1 && osl_keys->pressed.up) menusel--;
- if (menu == 1 && menusel > num_of_sel) menusel = 1;
- if (menu == 1 && menusel < 1) menusel = num_of_sel;
- if (menu == 1 && menusel == 1 && osl_keys->pressed.cross) menu = 2;
- oslEndDrawing();
- oslSyncFrame();
- oslAudioVSync();
- }
- oslSetTransparentColor(RGB(255,0,255));
- oslDisableTransparentColor();
- while (!osl_quit)
- {
- oslStartDrawing();
- map();
- goku();
- oslEndDrawing();
- oslSyncFrame();
- }
- oslEndGfx();
- oslQuit();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement