![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on [TUT] Beginner C Programming Tutorials within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; In Tutorial 5 you get an implicit use of RGB. To fix the issue simply add the following to the ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#32 |
![]() ![]() I'm Baaaack!
|
Thanks for pointing that out. I believe in the original tutorial I had a download link for the graphics.c that already included this definition. I'll add this in there now.
__________________
|
|
|
|
|
|
#35 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
|
search for MinPSPW it is much easier to use and there is a tutorial here:
Beginning Programming Tutorials for Windows
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference. My Website: is down for a while ... I'll bring a new one back soon. Currently working on: (0) PGE Gears Of War - On hold (Very large project). (0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix). |
|
|
|
|
|
#36 | |
![]() ![]() I'm Baaaack!
|
Quote:
__________________
|
|
|
|
|
|
|
#38 |
![]() ![]() I'm Baaaack!
|
Meh, it's only 2 and a half years old. It works for what I want to do, so I'm not really compelled to install MinPSPW. The PSP scene was better 2 years ago anyway, therefore using DevKitPSP is better.
__________________
|
|
|
|
|
|
#39 | |
|
Join Date: Oct 2009
Real First Name: V. Bogdan
Location: Romania
Just Played: PSP-Fanatik
Posts: 4
Trader Feedback: 0
|
Quote:
Code:
Administrator@power ~/projects/meniu $ make psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION= 150 -L. -L/usr/local/pspdev/psp/sdk/lib main.o graphics.o framebuffer.o -lpsp gu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkern el -o image.elf main.o: In function `main': main.cpp:(.text+0x84): undefined reference to `initGraphics()' main.cpp:(.text+0xdc): undefined reference to `fillScreenRect(unsigned int, int, int, int, int)' main.cpp:(.text+0x114): undefined reference to `printTextScreen(int, int, char c onst*, unsigned int)' main.cpp:(.text+0x15c): undefined reference to `printTextScreen(int, int, char c onst*, unsigned int)' main.cpp:(.text+0x1a8): undefined reference to `flipScreen()' main.cpp:(.text+0x1e8): undefined reference to `flipScreen()' collect2: ld returned 1 exit status make: *** [image.elf] Error 1 |
|
|
|
|
|
|
#40 | |
![]() ![]() I'm Baaaack!
|
Quote:
__________________
|
|
|
|
|
|
|
#41 | |
![]() The Cake Is A LIE
|
Quote:
Your main is main.cpp and graphics is only graphics.c Thats why
__________________
I hate those monkeys ZOMG!
-~Slasher~- ![]() |
|
|
|
|
|
|
#42 |
|
Join Date: Oct 2009
Real First Name: V. Bogdan
Location: Romania
Just Played: PSP-Fanatik
Posts: 4
Trader Feedback: 0
|
How to return to the main menu ?
Code:
if((pad.Buttons & PSP_CTRL_CROSS) && (select == 0)) {
MY CODE
}
printf("\n Apasati O pentru a reveni la meniu.");
if(pad.Buttons & PSP_CTRL_CROSS)
return main();
sceKernelSleepThread();
}
|
|
|
|
|
|
#43 | |
![]() ![]() Developer
|
Quote:
however, here is an idea of what you must do: Code:
#define MAINMENU 0
#define GAME 1
int main(int argc, char **argv){
int GameState = MAINMENU;
while(1){
if(GameState==MAINMENU){
//Menu code here
if(/*Start Game if statement here*/) GameState=GAME;
}else if(GameState==GAME){
//Game Code
if(/*return to menu if statement here*/) GameState=MAINMENU;
}
}
return 0;
}
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
|
#45 |
![]() ![]() Developer
|
that too, but i'm going on the fact that he's following the menu tutorial, which from reading it, it makes no connection is explaing how to enter into your game from the menu(and return to the menu), but simple how to make a menu that you can go up and down through
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#47 | |
![]() ![]() I'm Baaaack!
|
Quote:
void game() { if(buttons) menu(); } void menu() { while(!done) { //code } //breaks back to game() after loop in completed } You'll simply go right back to the game after menu is finished. If you need something more advanced than that, you'll have to use a bit of common sense and programming knowledge.
__________________
|
|
|
|
|
|
|
#48 |
![]() ![]() Developer
|
and yet, someone asked a question about how to do it...
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#49 |
![]() ![]() I'm Baaaack!
|
Right, because every question not only deserves to be answered, but to be answered in extreme detail.
__________________
|
|
|
|
![]() |
| Tags |
| beginner , programming , tut , tutorials |
| Thread Tools | |
|
|