static PyObject* image_draw(PyImage *self, PyObject *args, PyObject *kwargs) { if (!PyArg_ParseTuple(args, ":draw")) return NULL; oslDrawImage(self->pImg); Py_INCREF(Py_None); return Py_None; }
void Sprite::draw( RenderTarget& target) { Vector2f viewPos = target.getView().getCenter() - Vector2f(240, 136); if(!image) return; #ifdef __WIN32__ sf::Sprite spr(*image->handle); spr.setRotation(m_rotation); spr.setPosition(m_position.x, m_position.y); spr.setScale(m_scale.x, m_scale.y); spr.setOrigin(m_origin.x, m_origin.y); sf::IntRect r(subrect.left, subrect.top, subrect.width, subrect.height); spr.setTextureRect(r); spr.move(-viewPos.x, -viewPos.y); static_cast<RenderWindow*>(&target)->handle->draw(spr); spr.move(viewPos.x, viewPos.y); #else OSL_IMAGE* img = image->handle; if(!img) return; //img->angle = this->m_rotation; img->x = this->m_position.x; img->y = this->m_position.y; //img->centerX = this->m_origin.x; //img->centerY = this->m_origin.y; //img->stretchX = (int)( ((float)img->sizeX) * m_scale.x); //img->stretchY = (int)( ((float)img->sizeY) * m_scale.y); img->x -= viewPos.x; img->y -= viewPos.y; oslDrawImage(img); img->x += viewPos.x; img->y += viewPos.y; #endif }
void langDisplay() { oslDrawImage(langSelection); oslIntraFontSetStyle(Roboto, 0.7f, WHITE, 0, INTRAFONT_ALIGN_LEFT); oslDrawStringf(20, 85, "CyanogenPSP"); oslIntraFontSetStyle(Roboto, 0.65f, WHITE, 0, INTRAFONT_ALIGN_LEFT); oslDrawStringf(20, 110, "%s", lang_welcome[language][0]); oslIntraFontSetStyle(Roboto, 0.5f, WHITE, 0, INTRAFONT_ALIGN_LEFT); digitaltime(420,4,0,hrTime); battery(370,2,1); oslDrawFillRect(60, 179, 420, 180, LITEGRAY); oslDrawFillRect(60, 217, 420, 218, LITEGRAY); for(i = curScroll; i < MAX_LANG_DISPLAY + curScroll; i++) { if ((folderIcons[i].active == 0) && (current >= i-1)) { current = i-1; break; } if (current <= curScroll-1) { current = curScroll-1; break; } if (folderIcons[i].active == 1) { oslIntraFontSetStyle(Roboto, 0.55f, BLACK, 0, INTRAFONT_ALIGN_CENTER); oslDrawStringf(LANG_DISPLAY_X, (i - curScroll)*36 + LANG_DISPLAY_Y, "%.56s", folderIcons[i].name); } } }
int messenger() { messengerbg = oslLoadImageFilePNG("system/app/messenger/messengerbg.png", OSL_IN_RAM, OSL_PF_8888); if (!messengerbg) debugDisplay(); oslSetFont(Roboto); while (!osl_quit) { LowMemExit(); oslStartDrawing(); oslClearScreen(RGB(0,0,0)); oslIntraFontSetStyle(Roboto, fontSize, BLACK, 0, INTRAFONT_ALIGN_LEFT); controls(); oslDrawImageXY(messengerbg, 0, 0); navbarButtons(2); battery(330,2,0); digitaltime(381,4,0,hrTime); androidQuickSettings(); volumeController(); oslDrawImage(cursor); if (osl_keys->pressed.square) { powermenu(); } if (osl_keys->pressed.L) { oslPlaySound(Lock, 1); lockscreen(); } if (osl_keys->pressed.circle) { oslDeleteImage(messengerbg); appdrawer(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 157 && cursor->y <= 213) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); appdrawer(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 76 && cursor->y <= 155) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); home(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 19 && cursor->y <= 75) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); multitask(); } captureScreenshot(); if (cursor->x >= 385 && cursor->x <= 428 && cursor->y >= 210 && cursor->y <= 258 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); newMessage(); } /* if (cursor->x >= 378 && cursor->x <= 434 && cursor->y >= 20 && cursor->y <= 52 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); doClient(); } */ oslEndDrawing(); oslEndFrame(); oslSyncFrame(); } return 0; }
void newMessage() { new_message = oslLoadImageFilePNG("system/app/messenger/new_message.png", OSL_IN_RAM, OSL_PF_8888); if (!new_message) debugDisplay(); while (!osl_quit) { LowMemExit(); oslStartDrawing(); oslClearScreen(RGB(0,0,0)); controls(); oslDrawImageXY(new_message, 0, 0); navbarButtons(2); battery(330,2,0); digitaltime(381,4,0,hrTime); androidQuickSettings(); volumeController(); oslDrawImage(cursor); if (osl_keys->pressed.L) { oslPlaySound(Lock, 1); lockscreen(); } if (osl_keys->pressed.circle) { oslDeleteImage(new_message); messenger(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 157 && cursor->y <= 213) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); messenger(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 76 && cursor->y <= 155) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); oslDeleteImage(messengerbg); home(); } if ((cursor->x >= 444 && cursor->x <= 480) && (cursor->y >= 19 && cursor->y <= 75) && (osl_keys->pressed.cross)) { oslPlaySound(KeypressStandard, 1); multitask(); } captureScreenshot(); if (cursor->x >= 7 && cursor->x <= 435 && cursor->y >= 55 && cursor->y <= 86 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); doServer(); } oslIntraFontSetStyle(Roboto, fontSize, BLACK, 0, INTRAFONT_ALIGN_LEFT); oslDrawString(14, 245, tempMessage); if (cursor->x >= 10 && cursor->x <= 362 && cursor->y >= 228 && cursor->y <= 270 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); openOSK("Enter Message", "", 128, -1); } if ((cursor->x >= 10 && cursor->x <= 405 && cursor->y >= 88 && cursor->y <= 118 && osl_keys->pressed.cross) && oslIsWlanPowerOn()) doClient(); else if ((cursor->x >= 410 && cursor->x <= 442 && cursor->y >= 92 && cursor->y <= 118 && osl_keys->pressed.cross) && oslIsWlanPowerOn()) doServer(); oslEndDrawing(); oslEndFrame(); oslSyncFrame(); } }
//First Boot Message void firstBootInitiation() { firstBoot = setFileDefaultsInt("system/settings/boot.bin", 1, firstBoot); iconPackLoad(); //Loads our images into memory loadIcons(); background = oslLoadImageFile(backgroundPath, OSL_IN_RAM, OSL_PF_8888); cursor = oslLoadImageFilePNG(cursorPath, OSL_IN_VRAM, OSL_PF_8888); navbar = oslLoadImageFile(navbarPath, OSL_IN_RAM, OSL_PF_8888); navbar2 = oslLoadImageFile(navbar2Path, OSL_IN_RAM, OSL_PF_8888); //notif = oslLoadImageFile("system/home/menu/notif.png", OSL_IN_RAM, OSL_PF_8888); welcome = oslLoadImageFilePNG("system/home/icons/welcome.png", OSL_IN_RAM, OSL_PF_8888); transbackground = oslLoadImageFilePNG("system/home/icons/transbackground.png", OSL_IN_RAM, OSL_PF_8888); control = oslLoadImageFilePNG("system/home/menu/brightnesscontrol.png", OSL_IN_VRAM, OSL_PF_8888); ic_launcher_apollo = oslLoadImageFilePNG(apolloPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_browser = oslLoadImageFile(browserPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_calculator = oslLoadImageFilePNG(calcPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_filemanager = oslLoadImageFilePNG(fmPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_gallery = oslLoadImageFilePNG(galleryPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_game = oslLoadImageFilePNG(gamePath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_messenger = oslLoadImageFilePNG(messagesPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_settings = oslLoadImageFilePNG(settingsPath, OSL_IN_RAM, OSL_PF_8888); ic_launcher_umd = oslLoadImageFilePNG(umdPath, OSL_IN_RAM, OSL_PF_8888); usbdebug = oslLoadImageFilePNG("system/home/icons/usbdebug.png", OSL_IN_RAM, OSL_PF_8888); music = oslLoadImageFilePNG("system/home/icons/music.png", OSL_IN_RAM, OSL_PF_8888); //Debugger - Displays an error message if the following resources are missing. if (!background || !cursor || !ic_allapps || !ic_allapps_pressed || !navbar || !ic_launcher_apollo || !ic_launcher_settings || !ic_launcher_messenger || !ic_launcher_browser || !batt100 || !batt80 || !batt60 || !batt40 || !batt20 || !batt10 || !batt0 || !battcharge || !navbar2 || !usbdebug || !music) debugDisplay(); //Sets the cursor's original position on the screen cursor->x = 240; cursor->y = 136; if (firstBoot!= 0) { while (!osl_quit) { oslStartDrawing(); controls(); oslDrawImage(background); oslDrawImageXY(ic_launcher_apollo, 105, 190); oslDrawImageXY(ic_launcher_browser, 276, 190); oslDrawImageXY(ic_launcher_settings, 331, 190); oslDrawImageXY(ic_launcher_messenger, 160, 190); oslSetTransparentColor(RGB(0,0,0)); appDrawerIcon(); oslDisableTransparentColor(); oslIntraFontSetStyle(Roboto, 0.5f, WHITE, 0, INTRAFONT_ALIGN_LEFT); digitaltime(420,4,0,hrTime); volumeController(); battery(370,2,1); navbarButtons(0); oslDrawImageXY(transbackground, 0, 0); oslDrawImageXY(welcome, 0, 0); oslIntraFontSetStyle(Roboto, 0.8f,BLACK,0,INTRAFONT_ALIGN_LEFT); oslDrawStringf(20,30, "%s", lang_welcome[language][0]); oslIntraFontSetStyle(Roboto, 0.6f,DARKGRAY,0,INTRAFONT_ALIGN_LEFT); oslDrawStringf(20,60, "%s", lang_welcome[language][1]); oslDrawStringf(20,80, "%s", lang_welcome[language][2]); oslIntraFontSetStyle(Roboto, 0.6f,WHITE,0,INTRAFONT_ALIGN_LEFT); oslDrawStringf(385,110, "%s", lang_welcome[language][3]); oslDrawImage(cursor); if (cursor->x >= 388 && cursor->x <= 464 && cursor->y >= 98 && cursor->y <= 132 && osl_keys->pressed.cross) { FILE * firstBootTxt = fopen("system/settings/boot.bin", "w"); fprintf(firstBootTxt, "0"); fclose(firstBootTxt); oslPlaySound(KeypressStandard, 1); oslDeleteImage(welcome); oslDeleteImage(transbackground); unloadIcons(); home(); } captureScreenshot(); oslEndDrawing(); oslEndFrame(); oslSyncFrame(); } } if (firstBoot == 0) { oslDeleteImage(welcome); oslDeleteImage(transbackground); unloadIcons(); lockscreen(); home(); } }
void Buffer::draw() { oslDrawImage(img); }
void powermenu() { power = oslLoadImageFilePNG("system/home/menu/powerMenu.png", OSL_IN_RAM, OSL_PF_8888); powerSelection = oslLoadImageFilePNG("system/home/menu/powerSelection.png", OSL_IN_RAM, OSL_PF_8888); recoverySelection = oslLoadImageFilePNG("system/home/menu/recoverySelection.png", OSL_IN_RAM, OSL_PF_8888); if (!power || !powerSelection || !recoverySelection) debugDisplay(); while (!osl_quit) { LowMemExit(); oslStartDrawing(); controls(); oslClearScreen(RGB(0,0,0)); oslDrawImage(background); oslDrawImageXY(ic_launcher_apollo, 105, 190); oslDrawImageXY(ic_launcher_browser, 276, 190); oslDrawImageXY(ic_launcher_settings, 331, 190); oslDrawImageXY(ic_launcher_messenger, 160, 190); navbarButtons(0); oslDrawImageXY(power, 100, 61); battery(370,2,1); digitaltime(420,4,0,hrTime); oslIntraFontSetStyle(Roboto, 0.75f, BLACK, 0, 0); oslDrawStringf(165, 100, "Power off"); oslDrawStringf(165, 165, "Recovery"); if (cursor->x >= 116 && cursor->x <= 364 && cursor->y >= 55 && cursor->y <= 125) { oslDrawImageXY(powerSelection, 100, 60); oslDrawStringf(165, 100, "Power off"); oslDrawStringf(165, 165, "Recovery"); if (osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); sceKernelExitGame(); } /*else if (osl_pad.held.cross) { scePowerRequestColdReset(0); scePowerRequestColdReset(50000); }*/ } if (cursor->x >= 116 && cursor->x <= 364 && cursor->y >= 126 && cursor->y <= 200) { oslDrawImageXY(recoverySelection, 100, 60); oslDrawStringf(165, 100, "Power off"); oslDrawStringf(165, 165, "Recovery"); if (osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); oslSyncFrame(); sceKernelDelayThread(3*1000000); oslDeleteImage(power); oslDeleteImage(powerSelection); oslDeleteImage(recoverySelection); mainRecoveryMenu(); } } oslDrawImage(cursor); if (osl_keys->pressed.circle) { oslDeleteImage(power); oslDeleteImage(powerSelection); oslDeleteImage(recoverySelection); return; } captureScreenshot(); oslEndDrawing(); oslEndFrame(); oslSyncFrame(); } }
int oslShowSplashScreen2() { OSL_IMAGE *logo, *temp; int skip = 0; float y, vy; int frameNb, phase; float vyList[TABW]; float speeds[TABH][TABW]; int i, j, fade; float positions[TABH][TABW]; temp = oslLoadImageFile("logo/neoflash.png", OSL_IN_RAM, OSL_PF_5650); if (!temp) return 0; logo = oslCreateSwizzledImage(temp, OSL_IN_VRAM); oslDeleteImage(temp); if (!logo) return 0; y = -logo->sizeY; vy = 1.0f; frameNb = 0; phase = 1; fade = 0; for (i=0;i<LARG/TILE;i++) vyList[i] = (rand() % 7500) / 10000.f + 0.25f; for (j=0;j<HAUT/TILE;j++) for (i=0;i<LARG/TILE;i++) { speeds[j][i] = vyList[i] - (HAUT/TILE - j) * ((rand() % 1000) / 10000.0f + 0.04f); positions[j][i] = j * TILE; } while(!osl_quit && fade < 31 && frameNb < 220) { oslReadKeys(); if (phase < 9) { y += vy; if (y + logo->sizeY >= HAUT) { if (vy > 0) vy -= 0.8f; else vy -= 0.4f; if (phase % 2 == 1) phase++; } else if (phase == 1) vy += 0.4f; else { if (vy > 0) vy += 0.4f; else vy += 0.8f; if (phase % 2 == 0) phase++; } } else { y = 0; frameNb++; } if (frameNb > 120) { for (j=0;j<HAUT/TILE;j++) for (i=0;i<LARG/TILE;i++) { speeds[j][i] += 0.15f; if (speeds[j][i] > 0.0f) positions[j][i] += speeds[j][i]; } } if (fade > 0) fade++; if ((osl_keys->pressed.value & (OSL_KEYMASK_START|OSL_KEYMASK_CIRCLE|OSL_KEYMASK_CROSS)) && fade == 0) fade = 1; if (!skip) { oslStartDrawing(); oslClearScreen(0); if (frameNb <= 120) { logo->y = y; if (y < 0) { logo->stretchY = logo->sizeY; logo->stretchX = logo->sizeX; logo->x = 0; } else { logo->stretchY = logo->sizeY - y; logo->stretchX = logo->sizeX + y; logo->x = - y / 2; } oslDrawImage(logo); } else LogoDrawTiles(logo, positions); if (fade > 0) { oslSetAlpha(OSL_FX_RGBA, 0); oslDrawFillRect(0, 0, LARG, HAUT, RGBA(0, 0, 0, fade<<3)); /* oslSetAlpha(OSL_FX_SUB, 0xff); oslDrawFillRect(0, 0, LARG, HAUT, RGB(fade<<3, fade<<3, fade<<3)); oslSetAlpha(OSL_FX_DEFAULT, 0);*/ } oslEndDrawing(); } skip = oslSyncFrameEx(1,4,0); } oslDeleteImage(logo); return 1; }
/* Affiche le logo OSLib Ne cherchez pas à comprendre cette fonction si vous débutez :p */ int oslShowSplashScreen1() { OSL_IMAGE *texte, *etoile; OSL_IMAGE *fond; int skip=0; int x, y; int angle, nFrame, val; float dist; int pousNb; float pousX[100], pousY[100]; int i, imgAngle; float tblVitPous[8] = {0.2, 0.3, 0.15, 0.2, 0.35, 0.2, 0.15, 0.3}; int fade = 0; //Add these files to the list oslAddVirtualFileList((OSL_VIRTUALFILENAME*)__osl_logo_ram_files, oslNumberof(__osl_logo_ram_files)); texte = oslLoadImageFile("ram:/logo/texte.png", OSL_IN_VRAM | OSL_UNSWIZZLED, OSL_PF_8888); if (!texte) return 0; logoDecalePixels(texte); oslStartDrawing(); oslSetDithering(1); oslSetDrawBuffer(texte); oslDrawGradientRect(0,0, WIDTH,HEIGHT, RGB(0,0,0), RGB(0,0,128), RGB(0,0,128), RGB(0,0,0)); oslSetDrawBuffer(OSL_DEFAULT_BUFFER); oslEndDrawing(); oslMoveImageTo(texte, OSL_IN_RAM); oslSwizzleImage(texte); fond = logoCreeImageFond(); if (!fond) { oslDeleteImage(texte); return 0; } oslSetTransparentColor(RGB(255,0,254)); etoile = oslLoadImageFile("ram:/logo/etoile.png", OSL_IN_RAM, OSL_PF_5551); if (!etoile) { oslDeleteImage(texte); oslDeleteImage(fond); return 0; } oslDisableTransparentColor(); texte->centerX = texte->sizeX / 2; texte->centerY = texte->sizeY / 2; angle = 270; dist = 160.0f; nFrame = 0; pousNb=0; imgAngle = 78; while (!osl_quit) { if (!skip) { oslStartDrawing(); logoCreePaletteRotative(fond, 2000-nFrame*8); oslDrawImage(fond); x = WIDTH/2; y = HEIGHT/2; if (dist > 0) { x += oslCos(angle, dist); y -= oslSin(angle, dist); texte->stretchX = texte->sizeX * (1+dist*0.03f); texte->stretchY = texte->sizeY * (1+dist*0.03f); texte->angle = imgAngle; } else { texte->stretchX = texte->sizeX; texte->stretchY = texte->sizeY; texte->angle = 0; } oslSetBilinearFilter(1); //Effet spécial pour le texturage des nuages if (nFrame >= 50) { val = (nFrame - 50) * 6; if (val > 255) val = 255; oslSetAlpha(OSL_FX_ALPHA|OSL_FX_COLOR, RGBA(val,val,val,0xff)); } else oslSetAlpha(OSL_FX_ALPHA|OSL_FX_COLOR, RGBA(0,0,0,0xff)); oslDrawImageXY(texte, x, y); oslSetImageTileSize(etoile, 0,0, 16,16); oslCorrectImageHalfBorder(etoile); oslImageSetRotCenter(etoile); etoile->angle = 360 - ((nFrame * 3) % 360); etoile->stretchX = 16; etoile->stretchY = 16; oslSetAlpha(OSL_FX_ALPHA|OSL_FX_COLOR, RGBA(0xff,0,0,0xff)); oslDrawImageXY(etoile, 480-9, 272-9); //Dessine l'étoile if (nFrame >= 140 && nFrame < 240) { val = nFrame - 140; angle = (val * 5) % 360; i = nFrame - (240 - 256/12); if (val*16 < 255) oslSetAlpha(OSL_FX_ALPHA, val*16); else if (i > 0) oslSetAlpha(OSL_FX_ALPHA, 255-i*12); else oslSetAlpha(OSL_FX_RGBA, 0); etoile->angle = (val * 8) % 360; etoile->x = WIDTH/2 + oslCosi(angle, 120); etoile->y = HEIGHT/2 - oslSini(angle, 50); etoile->stretchX = 16 * 2; etoile->stretchY = 16 * 2; oslDrawImage(etoile); oslResetImageHalfBorder(etoile); } //Restaure l'environnement oslSetBilinearFilter(0); //Dessine les poussières oslSetAlpha(OSL_FX_ADD, 0xff); oslSetImageTileSize(etoile, 0,16, 8,8); oslImageSetRotCenter(etoile); for (i=0;i<pousNb;i++) oslDrawImageSimpleXY(etoile, pousX[i], pousY[i]); oslSetAlpha(OSL_FX_RGBA, 0); // oslSysBenchmarkDisplay(); //Fade if (nFrame < 32) oslDrawFillRect(0,0, WIDTH,HEIGHT, RGBA(0,0,0,255-(nFrame<<3))); if (fade > 0) { if (fade >= 31) fade = 31; oslDrawFillRect(0,0, WIDTH,HEIGHT, RGBA(0,0,0,(fade<<3))); } oslEndDrawing(); } nFrame++; //L'étoile tourne sur le logo if (nFrame >= 140 && nFrame < 240) { val = nFrame - 140; angle = (val * 5) % 360; if (angle >= 200 && angle <= 340) { pousX[pousNb] = WIDTH/2 + oslCos(angle, 120); pousY[pousNb] = HEIGHT/2 - oslSin(angle, 50); pousNb++; } } if (fade > 0) fade++; if (nFrame > 290 && fade == 0) fade = 1; for (i=0;i<pousNb;i++) { pousY[i] += tblVitPous[i%8]; } dist -= 2.0f; angle -= 4; imgAngle -= 1; if (angle < 0) angle += 360; skip = oslSyncFrameEx(1,4,0); //Lecture des touches oslReadKeys(); if ((osl_keys->pressed.value & (OSL_KEYMASK_START|OSL_KEYMASK_CIRCLE|OSL_KEYMASK_CROSS)) && fade == 0) fade = 1; if (fade >= 32) break; } oslSetAlpha(OSL_FX_RGBA, 0); oslDeleteImage(texte); oslDeleteImage(fond); oslDeleteImage(etoile); oslRemoveVirtualFileList((OSL_VIRTUALFILENAME*)__osl_logo_ram_files, oslNumberof(__osl_logo_ram_files)); return 1; }
int appdrawer() { int browser_x = 30; int browser_text_x = 52; int calc_x = 105; int calc_text_x = 127; int clock_x = 180; int clock_text_x = 202; int fm_x = 255; int fm_text_x = 277; int gallery_x = 330; int gallery_text_x = 352; int game_icon = 405; int game_text_icon = 427; int messenger_x = 30; int messenger_text_x = 52; int music_x = 105; int music_text_x = 127; int settings_x = 180; int settings_test_x = 202; int umd_x = 255; int umd_text_x = 277; //loads appdrawer icons appdrawer_loadImages(); if (!ic_launcher_clock || !backdrop) debugDisplay(); oslSetFont(Roboto); while (!osl_quit) { LowMemExit(); oslStartDrawing(); controls(); oslDrawImage(background); if (eDesktopActivator == 1) { navbarButtons(1); battery(370,2,3); if ((cursor->y <= 16) || (cursor->y >= 226)) { digitaltime(420,4,0,hrTime); } else if (cursor->y >= 16 && cursor->y <= 226) { digitaltime(420,-10,0,hrTime); } } else if (eDesktopActivator == 0) { navbarButtons(0); battery(370,2,1); digitaltime(420,4,0,hrTime); } if (DARK == 0) oslIntraFontSetStyle(Roboto, fontSize, BLACK, 0, INTRAFONT_ALIGN_CENTER); else oslIntraFontSetStyle(Roboto, fontSize, WHITE, 0, INTRAFONT_ALIGN_CENTER); oslDrawImageXY(backdrop, 1, 15); oslDrawImageXY(ic_launcher_browser, browser_x, 40); oslDrawStringf(browser_text_x, 90, "%s", lang_appDrawer[language][0]); oslDrawImageXY(ic_launcher_calculator, calc_x, 40); oslDrawStringf(calc_text_x, 90, "%s", lang_appDrawer[language][1]); oslDrawImageXY(ic_launcher_clock, clock_x, 40); oslDrawStringf(clock_text_x, 90, "%s", lang_appDrawer[language][2]); oslDrawImageXY(ic_launcher_filemanager, fm_x, 40); oslDrawStringf(fm_text_x, 90,"%s", lang_appDrawer[language][3]); oslDrawImageXY(ic_launcher_gallery, gallery_x, 40); oslDrawStringf(gallery_text_x, 90, "%s", lang_appDrawer[language][4]); oslDrawImageXY(ic_launcher_game, game_icon, 40); oslDrawStringf(game_text_icon, 90, "%s", lang_appDrawer[language][5]); oslDrawImageXY(ic_launcher_messenger, messenger_x, 130); oslDrawStringf(messenger_text_x, 185, "%s", lang_appDrawer[language][6]); oslDrawImageXY(ic_launcher_apollo, music_x, 130); oslDrawStringf(music_text_x, 185, "%s", lang_appDrawer[language][7]); oslDrawImageXY(ic_launcher_settings, settings_x, 130); oslDrawStringf(settings_test_x, 185, "%s", lang_appDrawer[language][8]); oslDrawImageXY(ic_launcher_umd, umd_x, 132); oslDrawStringf(umd_text_x, 185, "%s", lang_appDrawer[language][9]); androidQuickSettings(); volumeController(); appHighlight(1); oslDrawImage(cursor); if (osl_keys->pressed.square) { powermenu(); } if (osl_keys->pressed.L) { oslPlaySound(Lock, 1); lockscreen(); } if (osl_keys->pressed.circle) { appdrawer_deleteImages(); home(); } if (cursor->x >= 15 && cursor->x <= 75 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); internet(); } if (experimentalF == 1) { // WIP calculator if (cursor->x >= 100 && cursor->x <= 140 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); calculator(); } } if (cursor->x >= 160 && cursor->x <= 225 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); pspclock(); } if (cursor->x >= 245 && cursor->x <= 295 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); filemanage(); } if (cursor->x >= 320 && cursor->x <= 370 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); galleryApp(); } if (cursor->x >= 390 && cursor->x <= 450 && cursor->y >= 25 && cursor->y <= 85 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); gameApp(); } if (experimentalF == 1) { //WIP ad-hoc messenger application if (cursor->x >= 15 && cursor->x <= 75 && cursor->y >= 115 && cursor->y <= 180 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); messenger(); } } if (cursor->x >= 100 && cursor->x <= 140 && cursor->y >= 115 && cursor->y <= 180 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); mp3player(); } if (cursor->x >= 160 && cursor->x <= 225 && cursor->y >= 115 && cursor->y <= 180 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); settingsMenu(); } if (cursor->x >= 245 && cursor->x <= 295 && cursor->y >= 115 && cursor->y <= 180 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); launchUMD("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN"); } if (cursor->x >= 137 && cursor->x <= 200 && cursor->y >= 237 && cursor->y <= 271 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); home(); } if (cursor->x >= 200 && cursor->x <= 276 && cursor->y >= 237 && cursor->y <= 271 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); appdrawer_deleteImages(); home(); } if (cursor->x >= 276 && cursor->x <= 340 && cursor->y >= 237 && cursor->y <= 271 && osl_keys->pressed.cross) { oslPlaySound(KeypressStandard, 1); multitask(); } captureScreenshot(); oslEndDrawing(); oslEndFrame(); oslSyncFrame(); } return 0; }