Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <libge/libge.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- PSP_MODULE_INFO("Projet Papa", 0, 0, 0);
- PSP_HEAP_SIZE_KB(512);
- //Variables\\
- int selecteur = 1, maxselecteur = 12;
- // Déclarations des resources en global
- ge_Font *police;
- ge_Image* Back_Ingame;
- ge_Image* Back_Marcher;
- ge_Image* Back_Ville;
- ge_Image* Cadre_Selection;
- //Fonctions\\
- void Aleatoire_Plus(int *Modif);
- void Aleatoire_Moins(int *Modif);
- void Menu();
- int main(int argc, char *argv[])
- {
- geInit();
- // Chargement des resources globales
- police = geLoadFont("Arial.ttf");
- Back_Ingame = geLoadImage("package.pkg/Ingame.png"); // lors du jeux
- Back_Marcher = geLoadImage("package.pkg/Marcher.png"); // lors des achats
- Back_Ville = geLoadImage("package.pkg/Ville.png"); // lors des deplacements
- Cadre_Selection = geLoadImage("package.pkg/Cadre.png"); // pour selectionner action
- ge_Keys *pad = geCreateKeys(), *oldpad = geCreateKeys();
- geFontSize(police, 16);
- while (1)
- {
- geClearScreen(); // Pour effacer l'ecran
- geReadKeys(pad); // Pour activer le pad
- Intro(); // fonction deja prete dans mon pc
- geFontPrintScreen(50, 50, police, "Le jeux commence ici! :) Crazy!");
- Menu(); // Jouer
- geReadKeys(oldpad);
- geSwapBuffers();
- sceKernelExitGame();
- return 0;
- }
- void Menu()
- {
- geClearScreen(); // Pour effacer l'ecran
- geReadKeys(pad); // Pour activer le pad
- // Menu de Debut \\
- if(pad->pressed[GEK_DOWN] && !oldpad->pressed[GEK_DOWN])
- {
- selecteur++;
- }
- if(pad->pressed[GEK_UP] && !oldpad->pressed[GEK_UP])
- {
- selecteur--;
- }
- if (selecteur > maxselecteur)
- {
- selecteur = 1;
- }
- else if (selecteur < 1)
- {
- selecteur = maxselecteur;
- }
- if (selecteur == 1) {
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 2){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 3){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 4){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 5){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 6){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 7){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 8){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 9){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 10){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 11){
- geDrawImage(x,y,Cadre_Selection);
- }
- if (selecteur == 12){
- geDrawImage(x,y,Cadre_Selection);
- }
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 1)]
- }//Fa
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 2){
- }//So
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 3)]
- }//Jo
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 4){
- }//Fr
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 5)]
- }//Bi
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 6){
- }//Mar
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 7)]
- }//
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 8){
- }
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 9)]
- }
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 10){
- }
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 11)]
- }
- if(pad->pressed[GEK_CROSS] && !oldpad->pressed[GEK_CROSS] && selecteur == 12){
- }
- geReadKeys(oldpad);
- geSwapBuffers();
- }
- void Aleatoire_Plus(int *Modif) // Pour rajouter de l'affect etc...
- {
- Int Aleatoire = 0;
- srand(time(NULL));
- Aleatoire = rand()%50;
- if(Aleatoire == 33) *Modif --;
- }
- void Aleatoire_Moins(int *Modif) //Pour enlever de l'affect etc...
- {
- Int Aleatoire = 0;
- srand(time(NULL));
- Aleatoire = rand()%30;
- if(Aleatoire == 17) *Modif ++;
- }
- //MAKEFILE\\
- /*
- TARGET = LibGE
- OBJS = main.o
- CFLAGS = -O2 -G0 -Wall -DPSPFW3xx
- CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
- ASFLAGS = $(CFLAGS)
- LIBS = -lge -lfreetype -lpspmp3 -lm
- EXTRA_TARGETS = EBOOT.PBP
- PSP_EBOOT_TITLE = Menu Titotuto
- PSPSDK=$(shell psp-config --pspsdk-path)
- include $(PSPSDK)/lib/build.mak
- /*
Add Comment
Please, Sign In to add comment