#include <pspkernel.h>
#include <pspdebug.h>
#include <libge/libge.h>
#include "Headers/menu.h"
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("DEMO", PSP_MODULE_USER, 0, 1);
PSP_HEAP_SIZE_KB(8192);
ge_Font *intraFont;
ge_Image *cross;
ge_Keys *pad, *oldpad;
int main(){
int alpha = 255;
int transpVar = 0;
geInit();
pspDebugScreenInit();
intraFont = geLoadIntraFont("flash0:/font/ltn0.pgf");
cross = geLoadImage("IMG/cross.png");
pad = geCreateKeys();
oldpad = geCreateKeys();
while(1){
geClearScreen();
geReadKeys(pad);
geIntraFontPrintScreen(100, 55, intraFont, "Ceci est une version démo.", RGB(255,255,255));
geIntraFontPrintScreen(50, 90, intraFont, "Elle ne représente en rien le rendu final", RGB(255,255,255));
geIntraFontPrintScreen(115, 140, intraFont, "This is a demo version.", RGB(255,255,255));
geIntraFontPrintScreen(30, 175, intraFont, "It does not represent the final rendering.", RGB(255,255,255));
geDrawImage(438,230,cross);
geFillRectScreen(0, 0, 480, 272, RGBA(0, 0, 0, alpha));
pspDebugScreenSetXY(0,0);
printf("%d\n",transpVar);
printf("%d",alpha);
if(alpha <= 255 && alpha != 0 && transpVar == 0){
sceKernelDelayThread(150);
alpha -= ((alpha != 0) ? 1 : 0);
}
if(alpha < 3 && transpVar == 0){
alpha = 0;
}
if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS]){
transpVar = 1;
}
if(transpVar == 1){
sceKernelDelayThread(50);
alpha += ((alpha != 255) ? 1 : 0);
}
if(alpha == 255 && transpVar == 1){
break;
}
geReadKeys(oldpad);
geSwapBuffers();
}
menu();
return 0;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <pspdebug.h>
#include <pspkernel.h>
#include <libge/libge.h>
#include "Headers/menu.h"
#include "Headers/jeu.h"
ge_Image *menuBK;
ge_Font *intraFont2;
ge_Keys *pad, *oldpad;
void menu(){
int selecteur = 1;
int selecteurmax = 4;
int selecteurmin = 1;
int jeuVar = 0;
int chargerVar = 0;
int optionsVar = 0;
int alpha = 255;
menuBK = geLoadImage("IMG/menu.png");
intraFont2 = geLoadIntraFont("flash0:/font/ltn9.pgf");
pad = geCreateKeys();
oldpad = geCreateKeys();
while(1){
geClearScreen();
sceKernelDelayThread(2000);
geReadKeys(pad);
geDrawImage(0,0,menuBK);
if(alpha <= 255 && alpha != 0){
sceKernelDelayThread(50);
alpha -= ((alpha != 0) ? 1 : 0);
}
geFillRectScreen(0, 0, 480, 272, RGBA(0, 0, 0, alpha));
if(alpha < 3){
geIntraFontPrintScreen(200, 140, intraFont2, "Nouvelle Partie", RGB(255,255,255));
geIntraFontPrintScreen(200, 175, intraFont2, "Charger Partie", RGB(255,255,255));
geIntraFontPrintScreen(200, 210, intraFont2, "Options", RGB(255,255,255));
geIntraFontPrintScreen(200, 245, intraFont2, "Quitter", RGB(255,255,255));
if(pad->pressed[GEK_DOWN] && !oldpad->pressed[GEK_DOWN]){
selecteur++;
}
if(pad->pressed[GEK_UP] && !oldpad->pressed[GEK_UP]){
selecteur--;
}
if(selecteur > selecteurmax){
selecteur = 1;
}
if(selecteur < selecteurmin){
selecteur = 4;
}
if(selecteur == 1){
geIntraFontPrintScreen(200, 140, intraFont2, "Nouvelle Partie", RGB(255,0,0));
}
if(selecteur == 2){
geIntraFontPrintScreen(200, 175, intraFont2, "Charger Partie", RGB(255,0,0));
}
if(selecteur == 3){
geIntraFontPrintScreen(200, 210, intraFont2, "Options", RGB(255,0,0));
}
if(selecteur == 4){
geIntraFontPrintScreen(200, 245, intraFont2, "Quitter", RGB(255,0,0));
}
if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 1){
geFreeImage(menuBK);
geClearScreen();
jeuVar = 1;
break;
}
if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 4){
geFreeImage(menuBK);
sceKernelExitGame();
}
}
geReadKeys(oldpad);
geSwapBuffers();
}
if(jeuVar == 1){
jeu();
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <pspdebug.h>
#include <pspkernel.h>
#include <libge/libge.h>
#include "Headers/jeu.h"
ge_Image *map;
ge_Image *heros_haut_run, *heros_haut_droite_run, *heros_haut_gauche_run, *heros_bas_run, *heros_bas_droite_run, *heros_bas_gauche_run, *heros_droite_run, *heros_droite_droite_run, *heros_droite_gauche_run, *heros_gauche_run, *heros_gauche_droite_run, *heros_gauche_gauche_run, *heros_haut, *heros_bas, *heros_droite, *heros_gauche, *heros_haut_droite, *heros_haut_gauche, *heros_bas_droite, *heros_bas_gauche, *heros_droite_droite, *heros_droite_gauche, *heros_gauche_droite, *heros_gauche_gauche;
ge_Timer *sprite;
void jeu(){
map = geLoadImage("MAP/MAP1.png");
heros_haut = geLoadImage("PJ/heros_haut.png");
heros_haut_droite = geLoadImage("PJ/heros_haut_droit.png");
heros_haut_gauche = geLoadImage("PJ/heros_haut_gauche.png");
heros_haut_run = geLoadImage("PJ/heros_haut(run).png");
heros_haut_droite_run = geLoadImage("PJ/heros_haut_droit(run).png");
heros_haut_gauche_run = geLoadImage("PJ/heros_haut_gauche(run).png");
heros_bas = geLoadImage("PJ/heros_bas.png");
heros_bas_droite = geLoadImage("PJ/heros_bas_droit.png");
heros_bas_gauche = geLoadImage("PJ/heros_bas_gauche.png");
heros_bas_run = geLoadImage("PJ/heros_bas(run).png");
heros_bas_droite_run = geLoadImage("PJ/heros_bas_droit(run).png");
heros_bas_gauche_run = geLoadImage("PJ/heros_bas_gauche(run).png");
heros_droite = geLoadImage("PJ/heros_droit.png");
heros_droite_droite = geLoadImage("PJ/heros_droit_droit.png");
heros_droite_gauche = geLoadImage("PJ/heros_droit_gauche.png");
heros_droite_run = geLoadImage("PJ/heros_droit(run).png");
heros_droite_droite_run = geLoadImage("PJ/heros_droit_droit(run).png");
heros_droite_gauche_run = geLoadImage("PJ/heros_droit_gauche(run).png");
while(1){
geClearScreen();
}
}