GriGri

Membres
  • Compteur de contenus

    6
  • Inscription

  • Dernière visite

GriGri's Achievements

Débutant

Débutant (1/7)

0

Réputation sur la communauté

  1. GriGri

    Png.h & Mad.h

    Mon environement pour la prog. psp : ( cygwin + pspsdk + Oslib ) + (C++ 2005 Express Edition Beta) Même avec cette environnement je peu utiliser ce que tu dit ? sinon lequel me conseil tu ?
  2. GriGri

    Png.h & Mad.h

    c'est ma librairie qui n'est pas complete ? ou il manque des fichier dans le src ?
  3. GriGri

    Png.h & Mad.h

    Salut all voila par curiosité j'ai télécharger les source de PSP-OSS & XT1-OS , mais lors du recompillage , il me dit qu'il me manque png.h & mad.h ( alors que je n'est rien modifier , que j'ai tout pris dans le dossier src ) et sa me le fait pour les 2 OSS c'est quoi ses fichiers ? ou es ce que je peux les trouver
  4. GriGri

    Bout De Code

    MOUHA HA HA et comment inséré un background.jpg dans ce bout de code ? ( c'est l'intérface de devhook , ses la dedans quand peut modifier la couleur d'écriture et tout .. ) /* user interface*/#include "common.h"/////////////////////////////////////////////////////////////////////////////// UI/////////////////////////////////////////////////////////////////////////////int get_key(void){ SceCtrlData pad; unsigned int button; //sceCtrlReadBufferPositive(&pad, 1); sceCtrlReadBufferPositive((SceCtrlData *)(&pad), 1); button = pad.Buttons & ALL_CTRL; return pad.Buttons;}int wait_key(void){ int key; while(1) { if(!( get_key() & SENSE_KEY)) break; sceKernelDelayThread(20000); } while(1) { if( (key=get_key()) & SENSE_KEY) break; sceKernelDelayThread(20000); } return key;}/////////////////////////////////////////////////////////////////////////////// select ITEM/////////////////////////////////////////////////////////////////////////////int selitem(int sx,int sy,const char **list,int def){ int max_sel; int sel; int i , key; int delta;// int max_len;// max_len = 0; for(max_sel=0;list[max_sel];max_sel++) {// if(strlen(list[max_sel]) > max_len)// max_len = strlen(list[max_sel]); } // centering sel = def; delta = 0; while(1) { for(i=0;i<max_sel;i++) { if(list[i][0] != 0x00) { // centering int x = sx ? sx : (60 - strlen(list[i]))/2; if(x<0) x=0; pspDebugScreenSetXY(x,sy+i); //pspDebugScreenSetXY(sx,sy+i); if(def<0) { pspDebugScreenSetTextColor(0); pspDebugScreenSetBackColor(0); } else { //definition des pointeurs vers nos images OSL_IMAGE *fond; //dessine ton image oslDrawImage(fond); pspDebugScreenSetTextColor(0xffffff); pspDebugScreenSetBackColor( (i==sel) ? 0x40ff40 : 0xc02020); fond = oslLoadImageFile("fond_zora.png", OSL_IN_RAM, OSL_PF_5551); } pspDebugScreenPrintf(list[i]); } } // finish? if(def<0) break; while( (get_key() & (PSP_CTRL_UP|PSP_CTRL_DOWN|PSP_CTRL_CIRCLE|PSP_CTRL_TRIANGLE))!=0) sceKernelDelayThread(20000); def = sel; delta = 0; while( (def==sel) && (delta==0) ) { key = get_key(); if(key & PSP_CTRL_UP) delta = -1; if(key & PSP_CTRL_DOWN) delta = +1; if(key & PSP_CTRL_CIRCLE) def = -1; if(key & PSP_CTRL_TRIANGLE) def = -2; sceKernelDelayThread(20000); } // change next select do { sel += delta; if(sel>=max_sel) sel = 0; else if(sel<0) sel = max_sel-1; }while(list[sel][0] == 0x00); } pspDebugScreenSetXY(sx,sy); pspDebugScreenSetTextColor(0xffffff); pspDebugScreenSetBackColor(0); if(def==-2) return -1; // cancel return sel;}SceIoDirent g_dir;char *add_file_list(const char *dir_path,char **file_list,char **full_list,char *buf,char *ext){ int fd; char *ptr = 0; // search end of list while(*file_list) { file_list++; full_list++; } fd = sceIoDopen(dir_path);//printf("dopen fd %08X\n",fd); if(fd >= 0) { while(sceIoDread(fd, &g_dir) > 0) { if((g_dir.d_stat.st_attr & FIO_SO_IFDIR) == 0)// if((g_dir.stat.mode & FIO_SO_IFDIR) == 0) { ptr = strchr(g_dir.d_name,'.');// ptr = strchr(g_dir.name,'.'); if(ptr) { ptr++; // cmp extend if( (ptr[0]|0x20)==(ext[0]|0x20)&& (ptr[1]|0x20)==(ext[1]|0x20)&& (ptr[2]|0x20)==(ext[2]|0x20) ) {// sprintf(buf,"%s/%s",dir_path,g_dir.name); sprintf(buf,"%s/%s",dir_path,g_dir.d_name); *full_list++ = buf; *file_list++ = buf + strlen(dir_path) + 1; buf += strlen(buf)+1; } } } } sceIoDclose(fd); } // EOF *file_list = 0; *full_list = 0; //Fin du dessin oslEndDrawing(); //Synchronise l'écran oslSyncFrame(); return buf;} si c'est posible
  5. GriGri

    Bout De Code

    Merci à toi , je galèrer a essayer d'afficher un fond EDIT ; comment on fait pour afficher l'icone de la batteri ( pour savoir le niveau de la batteri ) si ce n'est pas trop demander :fouf: merci
  6. GriGri

    Bout De Code

    Salut all Mon environement pour la prog. psp : ( cygwin + pspsdk + Oslib ) + (C++ 2005 Express Edition Beta) voila je voudrai avoir le bout de code ( je sais pas comment sa s'appelle en C++ ) pour afficher un fond ( une image.png ) dans mon homebrew , j'ai essayer plusieur technique mais sa marche pas voivi le code qui marche pas : //La librairie principale OSLib #include <oslib/oslib.h> //les callbacks PSP_MODULE_INFO("OSLib Sample", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU); //definition des pointeurs vers nos images OSL_IMAGE *fond, *chrono; int main() { //Initialisation de la librairie oslInit(0); //Initialisation du mode graphique oslInitGfx(OSL_PF_8888, 0); //Initialisation de la console texte oslInitConsole(); //affiche sur l'écran du texte oslPrintf("voici l'homebrews qui permet d'afficher l'image\n PUNCH X"); //attend l'appui sur une touche oslWaitKey(); //Initialisation de la console texte oslInitConsole(); //Initialisation du mode graphique oslInitGfx(OSL_PF_8888, 1); //chargement de nos images (oui, le "loading" :p) fond = oslLoadImageFile("fond_zora.png", OSL_IN_RAM, OSL_PF_5551); //attend l'appui sur une touche oslWaitKey(); //Fin du dessin oslEndDrawing(); //on quitte l'application oslEndGfx(); oslQuit(); return 0; } et aussi un bout de code pour quitter l'homebrew en appuyant sur triangle /\ je connais selui pour quitter on appuyant sur n'importe quelle touch : //attend l'appui sur une touche oslWaitKey(); //on quitte l'application oslEndGfx(); oslQuit(); return 0; MERCI A TOUS CEUX QUI M'AIDERONT