C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I decided after many errors to just remove all code relating to my enemy variables and functions, but I still ...
-
03-19-2008, 02:59 PM #8251
I decided after many errors to just remove all code relating to my enemy variables and functions, but I still get errors, with most be like the originals from a couple pages ago :Argh: .
My main.cpp:
I read in google that those to things in red are supposed to fix the errors that I was getting, but I still get the same problems.
Plus, I realize that some mistakes that I am making are elementary, but there are others that I just don't get from what I, and others know.
Everytime I try making something and then compile it, I seem to get the same, exact roadblocks
[QUOTE=Archaemic]
[size=1]My manwich![/size][/QUOTE]
[QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]
-
03-19-2008, 03:07 PM #8252QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You can't assign values to a variable except during instantiation outside function scope.
ToCode:float totalhealth, health; int mx, my, yyy; bool paused; OSL_SOUND *music, *music2; OSL_IMAGE *player, *menu; void oslStopSound(OSL_SOUND *music2); health = 250; totalhealth = 250; ~health; ~totalhealth;
Code:float totalhealth = 200.f, health = 250.f; int mx, my, yyy; bool paused; OSL_SOUND *music, *music2; OSL_IMAGE *player, *menu; void oslStopSound(OSL_SOUND *music2);
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-19-2008, 03:11 PM #8253
Zitat von yaustar
Oh, I had forgotten that... I will try compiling once again.... ***crosses fingers***
-= Double Post =-
Ah, yaustar. If I could, I would donate points, you did what I could obviously not ;)
I don't have my PSP atm, but as soon as I do, I will make sure my newly compiled eboot works correctly
-= Double Post =-
Ok, I finally got the application to compile(amongst many errors) but it worked :)
But now, I get the problem, where everytime it is loaded from the memory stick, it freezes, and then the PSP shuts off. I can't figure out why that happens.... would there be any particular reason?Geändert von spike021 (03-19-2008 um 08:01 PM Uhr) Grund: Automerged Doublepost
[QUOTE=Archaemic]
[size=1]My manwich![/size][/QUOTE]
[QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]
-
03-19-2008, 11:33 PM #8254
- Registriert seit
- Jul 2005
- Ort
- Canada, Ontario
- Beiträge
- 8
- Points
- 4.605
- Level
- 43
- Downloads
- 0
- Uploads
- 0
Anybody? :Cry:
Zitat von Dre361224
-
03-20-2008, 12:46 AM #8255QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
There is a function in the PSPSDK about changing colours ;)
WHA!?
-
03-20-2008, 01:49 AM #8256QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Have you actually looked at what your code does?
Zitat von spike021
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-20-2008, 11:09 AM #8257
Zitat von yaustar
Yeah, but I just don't get what the probem could be... :Argh:
And I have sent PMs to a couple developers(won't say who), and the help that I have been getting has been a little mum. Although yaustar... you've been a good help, I applaud you ;)
I have tried making an account at the ps2dev forums, but for some reason, any of the emails that I try to use don't work(supposedly they are banned) I have never registered there in my life
I may come back here for help, but I really need to think about it first.[QUOTE=Archaemic]
[size=1]My manwich![/size][/QUOTE]
[QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]
-
03-20-2008, 11:38 AM #8258QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Given the code you have shown already:
How many times does that code actually runs when the games starts? (Clue: Lower then 2)Code:int main(int argc, char* argv[]) { oslDrawImage (menu); oslPlaySound(music2,0); if (PSP_CTRL_START == true) { oslClearScreen (RGB(0,0,0)); oslStopSound(music2); } oslInit(0); oslInitGfx(OSL_PF_8888, 1); oslInitConsole(); oslInitAudio(); music = oslLoadSoundFile("awakeni ng.bgm", OSL_FMT_STREAM);// Sound for game music2 = oslLoadSoundFile("dawn.bg m", OSL_FMT_STREAM);// Sound for menu oslAssert(music); //Debug: verify it could be loaded oslAssert(music2); //Debug: verify it could be loaded oslPlaySound(music, 0); player = oslLoadImageFile("Pics/player.png", OSL_IN_RAM, OSL_PF_8888); menu = oslLoadImageFile("Pics/menu.png" , OSL_IN_RAM, OSL_PF_8888); player->x = 135; player->y = 240; oslDrawImage(player); // draw player oslDeinitAudio(); oslQuit(); return 0; }[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-20-2008, 02:12 PM #8259
Yep. Now I know what I have done wrong.... I feel like an idiot :o
Yaustar if I could donate........ ;)
-= Double Post =-
I'm still having problems... I guess it wasn't that(I added a while function for the return and everything). There must be something I am still missing.Geändert von spike021 (03-20-2008 um 08:13 PM Uhr) Grund: Automerged Doublepost
[QUOTE=Archaemic]
[size=1]My manwich![/size][/QUOTE]
[QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]
-
03-21-2008, 05:25 AM #8260QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Yep but we can't see it because you haven't posted any updated code.
Zitat von spike021
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-21-2008, 06:21 AM #8261
Zitat von yaustar
Dam, the forums are creating spaces inbetween letters, just so you know.Code:int main(int argc, char* argv[]) { oslInit(0); oslInitGfx(OSL_PF_8888, 1); oslInitConsole(); oslInitAudio(); SetupCallbacks(); music = oslLoadSoundFile("awakening.bgm", OSL_FMT_STREAM);// Sound for game music2 = oslLoadSoundFile("dawn.bgm", OSL_FMT_STREAM);// Sound for menu player = oslLoadImageFile("Pics/player.png", OSL_IN_RAM, OSL_PF_8888); menu = oslLoadImageFile("Pics/menu.png" , OSL_IN_RAM, OSL_PF_8888); while(!osl_quit){ Keys(); oslPlaySound(music2,0); oslDrawImage (menu); oslReadKeys(); if (osl_keys->held.start) { oslClearScreen (RGB(0,0,0)); oslStopSound(music2); } oslPlaySound(music, 0); player->x = 135; player->y = 240; oslDrawImage(player); // draw player oslDeinitAudio(); oslQuit(); return 0; } }Geändert von spike021 (03-21-2008 um 03:53 PM Uhr)
[QUOTE=Archaemic]
[size=1]My manwich![/size][/QUOTE]
[QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]
-
03-21-2008, 06:37 AM #8262It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Use the code tag...
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
03-21-2008, 08:28 AM #8263QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
No offense but you really should stop doing this and at least learn the basic logic flow statements. This code STILL only runs once.Code:int main(int argc, char* argv[]) { oslInit(0); oslInitGfx(OSL_PF_8888, 1); oslInitConsole(); oslInitAudio(); SetupCallbacks(); music = oslLoadSoundFile("awakeni ng.bgm", OSL_FMT_STREAM);// Sound for game music2 = oslLoadSoundFile("dawn.bg m", OSL_FMT_STREAM);// Sound for menu player = oslLoadImageFile("Pics/player.png", OSL_IN_RAM, OSL_PF_8888); menu = oslLoadImageFile("Pics/menu.png" , OSL_IN_RAM, OSL_PF_8888); while (!osl_quit) { Keys(); oslPlaySound(music2,0); oslDrawImage (menu); oslReadKeys(); if (osl_keys->held.start) { oslClearScreen (RGB(0,0,0)); oslStopSound(music2); } oslPlaySound(music, 0); player->x = 135; player->y = 240; oslDrawImage(player); // draw player oslDeinitAudio(); oslQuit(); return 0; } }
Read: http://parabellumgames.wordpress.com...c-programming/[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-21-2008, 04:23 PM #8264I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I've never used OSL, but looking at that straight away makes me think its wrong, with that while(!osl_quit) and the oslQuit(); function in the while loop, surely it makes it act like linear code? You should have some if statement before the oslQuit, to make sure it only runs when you want it to, thus actually keeping the while loop.
A quick question to do with loops, if I do something like this:
Would that effectively break the first loop thus removing you from both loops, or would it keep you running in loop2 until you broke from that, then break you from loop1 once you've "escaped" loop2?Code:int loop1 = 1; loop2 = 1; while(loop1) { //random code while(loop2) { //more random code if(something == something else) loop1 = 0; } }
-Aura
-
03-21-2008, 05:46 PM #8265words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
You should try experimenting yourself...
Zitat von Auraomega
But if you need to know without experimenting, if 'something' IS true to 'something else' it will still run the nested loop, only should that nested loop break would it compare loop1 to true/1 again and not execute the outer loop.
P.S. what's loop2's data type ;)
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-22-2008, 04:32 AM #8266I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Thanks for that, and it was just a quick question before I hit the hay, I couldn't be bothered to search for the answer or type some test code, makefile, and output,
hell, I couldn't even make sure my code was correctint loop1 = 1; loop2 = 1;
-Aura
-
03-22-2008, 05:05 AM #8267words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Dev-C++ has made testing things a 5 second job... just throwing that out there ^^

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-22-2008, 06:45 AM #8268QJ Gamer Green
- Registriert seit
- Aug 2007
- Beiträge
- 66
- Points
- 5.106
- Level
- 45
- Downloads
- 0
- Uploads
- 0
How so?
Zitat von SG57
-
03-22-2008, 06:49 AM #8269I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
You type out normal command line code (no GUI) and hit F9, it compiles, thats only Win32 mind, no PSP stuff.
I used to use Dev-C++, but it got annoying, its big, laggy, buggy and formats stuff horribly (I'm not talking the colouring, but the tabs, spaces etc), I instead use Notepad++ and MinGW32 command line stuff when I compile for the PC, its similar to the PSP too because you have to use makefiles, which I have also found preferable to showing an IDE what to link to.
-Aura
-
03-22-2008, 06:56 AM #8270QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You don't have to. I still use an IDE to cross compile. (In my case Code::Blocks).
Zitat von Auraomega
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-22-2008, 08:50 AM #8271QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- Homebrewland, CA
- Beiträge
- 191
- Points
- 4.295
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Hey, I noticed that graphics.c doesn't function properly when using intrafont. For example, when I try to display an image when printing with intrafont the image becomes distorted. Can anyone tell me how to get them both functioning?
-
03-22-2008, 09:48 AM #8272I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I have no such problems, have you made sure that you have cached the fonts correctly? Try the biggest caching (I forget which one) and see if that helps. If that doesn't work maybe you could post some code, as it may be the order you are doing things.
-Aura
-
03-22-2008, 10:51 AM #8273Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
You need to reset a couple of the GU states that intraFont changes after using it.

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
03-22-2008, 12:22 PM #8274I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Zitat von Insert_Witty_Name
Ah, and that...
I edited my intraFontPrint function to contain everything needed so I wouldn't have to continuously add the code when I used intraFont:
Might be helpful to you.Code:float intraFontPrint(intraFont *font, float x, float y, const char *text) { guStart(); /*~~~~~~~~~~~~~~~~Added Function~~~~~~~~~~~~~~~~~~~~*/ if (!text || strlen(text) == 0 || !font) return x; int i = 0, length = 0; if (font->options & INTRAFONT_STRING_SJIS) { while (text[i]) { length++; i += ( text[i] <= 0x7FU || (text[i] >= 0xA0U && text[i] <= 0xDFU) || text[i] >= 0xFDU) ? 1 : 2; //single or double byte } } else { length = strlen(text); } unsigned short* ucs2_text = (unsigned short*)malloc((length+1)*sizeof(unsigned short)); if (!ucs2_text) return x; unsigned char* utext = (unsigned char*)text; for (i = 0; i < length; i++) { if (font->options & INTRAFONT_STRING_SJIS) { ucs2_text[i] = intraFontSJIS2UCS2((unsigned char**)&utext); } else { ucs2_text[i] = utext[i]; } } ucs2_text[i] = 0; x = intraFontPrintUCS2(font, x, y, ucs2_text); free(ucs2_text); sceGuTexMode(GU_PSM_8888, 0, 0, 0); /*~~~~~~~~~~~~~~~~Added Function~~~~~~~~~~~~~~~~~~~~*/ sceGuFinish(); /*~~~~~~~~~~~~~~~~Added Function~~~~~~~~~~~~~~~~~~~~*/ sceGuSync(0,0); /*~~~~~~~~~~~~~~~~Added Function~~~~~~~~~~~~~~~~~~~~*/ return x; }
-Aura
-
03-22-2008, 04:17 PM #8275words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Everything can be turned off or on in Dev-c++, my line/tab space is 2 and I ignore smart tabs. Works great.
Zitat von Auraomega
By the way, the code you posted wasn't PSP specific so why does it matter if it was compiled for PC?
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-23-2008, 04:39 AM #8276I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Hmm, well either way it was the makefile thing that was bugging me the most (I tried compiling the NeHe tutorials for OpenGL and it wouldn't link some libraries correctly).
The person after ask why Dev-C++ was faster, I was simply stating it wouldn't be suitable for testing for the PSP (which yaustar corrected me on), I just wanted to clear up any possible confusion seeing as this is a PSP thread. Either way its obsolete now as yaustar added, you can use an IDE to compile PSP stuff on the fly.
-Aura
-
03-23-2008, 07:48 AM #8277QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 64
- Points
- 3.415
- Level
- 36
- My Mood
-
- Downloads
- 0
- Uploads
- 0
netdialog problem
Hello everyone,
I have a problem with tne netdialog.c: I can't compile it...
Here the netdialog.c:
And here the makefile:Code:/* * PSP Software Development Kit - http://www.pspdev.org * ----------------------------------------------------------------------- * Licensed under the BSD license, see LICENSE in PSPSDK root for details. * * main.c - Net dialog sample for connecting to an access point * * For OE firmwares, this sample must be run under the 3.xx kernel. * * Copyright (c) 2007 David Perry (Insert_Witty_Name) * */ #include <pspkernel.h> #include <pspdisplay.h> #include <string.h> #include <math.h> #include <psputility.h> #include <pspgu.h> #include <pspgum.h> #include <pspsdk.h> #include <pspnet.h> #include <pspnet_inet.h> #include <pspnet_apctl.h> /* #if _PSP_FW_VERSION >= 200 PSP_MODULE_INFO("Net Dialog Sample", 0, 1, 1); #else PSP_MODULE_INFO("Net Dialog Sample", 0x1000, 1, 1); PSP_MAIN_THREAD_ATTR(0); #endif */ static int running = 1; /* Exit callback */ int exit_callback(int arg1, int arg2, void *common) { quit(); return 0; } /* Callback thread */ int CallbackThread(SceSize args, void *argp) { int cbid; cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL); sceKernelRegisterExitCallback(cbid); sceKernelSleepThreadCB(); return 0; } /* Sets up the callback thread and returns its thread id */ int SetupCallbacks(void) { int thid = 0; thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, PSP_THREAD_ATTR_USER, 0); if (thid >= 0) sceKernelStartThread(thid, 0, 0); return thid; } /* Graphics stuff, based on cube sample */ static unsigned int __attribute__((aligned(16))) list[262144]; /* struct Vertex { unsigned int color; float x,y,z; }; struct Vertex __attribute__((aligned(16))) vertices[12*3] = { {0xff7f0000,-1,-1, 1}, // 0 {0xff7f0000,-1, 1, 1}, // 4 {0xff7f0000, 1, 1, 1}, // 5 {0xff7f0000,-1,-1, 1}, // 0 {0xff7f0000, 1, 1, 1}, // 5 {0xff7f0000, 1,-1, 1}, // 1 {0xff7f0000,-1,-1,-1}, // 3 {0xff7f0000, 1,-1,-1}, // 2 {0xff7f0000, 1, 1,-1}, // 6 {0xff7f0000,-1,-1,-1}, // 3 {0xff7f0000, 1, 1,-1}, // 6 {0xff7f0000,-1, 1,-1}, // 7 {0xff007f00, 1,-1,-1}, // 0 {0xff007f00, 1,-1, 1}, // 3 {0xff007f00, 1, 1, 1}, // 7 {0xff007f00, 1,-1,-1}, // 0 {0xff007f00, 1, 1, 1}, // 7 {0xff007f00, 1, 1,-1}, // 4 {0xff007f00,-1,-1,-1}, // 0 {0xff007f00,-1, 1,-1}, // 3 {0xff007f00,-1, 1, 1}, // 7 {0xff007f00,-1,-1,-1}, // 0 {0xff007f00,-1, 1, 1}, // 7 {0xff007f00,-1,-1, 1}, // 4 {0xff00007f,-1, 1,-1}, // 0 {0xff00007f, 1, 1,-1}, // 1 {0xff00007f, 1, 1, 1}, // 2 {0xff00007f,-1, 1,-1}, // 0 {0xff00007f, 1, 1, 1}, // 2 {0xff00007f,-1, 1, 1}, // 3 {0xff00007f,-1,-1,-1}, // 4 {0xff00007f,-1,-1, 1}, // 7 {0xff00007f, 1,-1, 1}, // 6 {0xff00007f,-1,-1,-1}, // 4 {0xff00007f, 1,-1, 1}, // 6 {0xff00007f, 1,-1,-1}, // 5 }; */ #define BUF_WIDTH (512) #define SCR_WIDTH (480) #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) #define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) static void setupGu() { sceGuInit(); sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); sceGuScissor(0,0,SCR_WIDTH,SCR_HEIGHT); sceGuEnable(GU_SCISSOR_TEST); sceGuDepthFunc(GU_GEQUAL); sceGuEnable(GU_DEPTH_TEST); sceGuFrontFace(GU_CW); sceGuShadeModel(GU_SMOOTH); sceGuEnable(GU_CULL_FACE); sceGuEnable(GU_CLIP_PLANES); sceGuFinish(); sceGuSync(0,0); sceDisplayWaitVblankStart(); sceGuDisplay(GU_TRUE); } static void drawStuff(void) { static int val = 0; sceGuStart(GU_DIRECT, list); sceGuClearColor(0xff554433); sceGuClearDepth(0); sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT); sceGumMatrixMode(GU_PROJECTION); sceGumLoadIdentity(); sceGumPerspective(75.0f,16.0f/9.0f,0.5f,1000.0f); sceGumMatrixMode(GU_VIEW); sceGumLoadIdentity(); sceGumMatrixMode(GU_MODEL); sceGumLoadIdentity(); ScePspFVector3 pos = { 0, 0, -5.0f }; ScePspFVector3 rot = { val * 0.79f * (M_PI/180.0f), val * 0.98f * (M_PI/180.0f), val * 1.32f * (M_PI/180.0f) }; sceGumTranslate(&pos); sceGumRotateXYZ(&rot); //sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 12*3, 0, vertices); sceGuFinish(); sceGuSync(0,0); val++; } int netDialog() { int done = 0; pspUtilityNetconfData data; memset(&data, 0, sizeof(data)); data.base.size = sizeof(data); data.base.language = PSP_SYSTEMPARAM_LANGUAGE_ENGLISH; data.base.buttonSwap = PSP_UTILITY_ACCEPT_CROSS; data.base.graphicsThread = 17; data.base.accessThread = 19; data.base.fontThread = 18; data.base.soundThread = 16; data.action = PSP_NETCONF_ACTION_CONNECTAP; struct pspUtilityNetconfAdhoc adhocparam; memset(&adhocparam, 0, sizeof(adhocparam)); data.adhocparam = &adhocparam; sceUtilityNetconfInitStart(&data); while(running) { drawStuff(); switch(sceUtilityNetconfGetStatus()) { case PSP_UTILITY_DIALOG_NONE: break; case PSP_UTILITY_DIALOG_VISIBLE: sceUtilityNetconfUpdate(1); break; case PSP_UTILITY_DIALOG_QUIT: sceUtilityNetconfShutdownStart(); break; case PSP_UTILITY_DIALOG_FINISHED: done = 1; break; default: break; } sceDisplayWaitVblankStart(); sceGuSwapBuffers(); if(done) break; } return 1; } void netInit(void) { sceNetInit(128*1024, 42, 4*1024, 42, 4*1024); sceNetInetInit(); sceNetApctlInit(0x8000, 48); } void netTerm(void) { sceNetApctlTerm(); sceNetInetTerm(); sceNetTerm(); } int user_thread(SceSize args, void *argp) { netInit(); SetupCallbacks(); setupGu(); netDialog(); netTerm(); return 0; } int main(int argc, char *argv[]) { #if _PSP_FW_VERSION >= 200 sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON); sceUtilityLoadNetModule(PSP_NET_MODULE_INET); netInit(); SetupCallbacks(); setupGu(); netDialog(); netTerm(); #else pspSdkLoadInetModules(); SceUID thid = sceKernelCreateThread("user_thread", user_thread, 0x18, 0x10000, PSP_THREAD_ATTR_USER, NULL); sceKernelStartThread(thid, 0, NULL); sceKernelWaitThreadEnd(thid, 0); #endif sceKernelExitGame(); return 0; }
Here a screenshot of the problem:Code:TARGET = net OBJS = netdialog.o PSP_FW_VERSION = 371 INCDIR = CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) PSPSDK=$(shell psp-config --pspsdk-path) PSPBIN = $(PSPSDK)/../bin LIBDIR = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = net LIBDIR = LDFLAGS = STDLIBS= -lc -lSDL_image -lSDL_gfx -lSDL_ttf -lpng -ljpeg -lSDL -lcurl -lfreetype LIBS=$(STDLIBS)-lpspwlan -lpsputility -lpspgum -lpspgu -lm -lpspnet -lpspkernel -lpspnet_inet -lpspnet_apctl include $(PSPSDK)/lib/build.mak

Thank you ^^
-
03-23-2008, 07:55 AM #8278Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
I answered this in another forum where you just posted the exact same question...
I'll answer it again though in case it turns up in a search for someone.
You're pre-compiled toolchain pre-dates the changes I made that are required for the sample to compile.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
03-24-2008, 12:59 PM #8279
Weights = Thickness?
-
03-24-2008, 05:40 PM #8280QJ Gamer Blue
- Registriert seit
- Jul 2006
- Beiträge
- 132
- Points
- 4.296
- Level
- 41
- Downloads
- 0
- Uploads
- 0

How can i make it so that the cliffs have collision detection too? I know how to do it for the sides of the map but i was wondering how it can be done for various parts of the maps? I just want to know, now its in my head and i keep thinking about it lol. By the way i am using oslib and have just started to learn to code for the psp =\. would someone be kind enough to answer my question?


LinkBack URL
About LinkBacks
Mit Zitat antworten




Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum