I have Tryed Programing in Visual Basic and get that quite easy ( not that its hard lol) and make simple -games like pong, connect 4 and so on i just wanna step up to do some better programing
Printable View
I have Tryed Programing in Visual Basic and get that quite easy ( not that its hard lol) and make simple -games like pong, connect 4 and so on i just wanna step up to do some better programing
Unless you have a specific reason to learn C++, I would recommend C# over C++. Then you can easily make games using the XNA framework for the PC and Xbox360.
What's the best method to NULL out a char array in c?
I do sprint(var,""); but it gives me a warning...
Crude, but works.Code:char blah[] = "What the Hack?!"
blah[0] = '\0';
blah[0] = NULL;?
iirc, NULL doesn't necessarily represent the NULL character.
when you say NULL , it will return 0 , when you say \0 , it will return null
So if there is a string likeZitat:
Zitat von yaustar
str[10] = {'T', 'e', 'd', '\0'};
and we say
str [0] = '\0';
will the rest of the string be emptied or we just get
'\0', 'e', 'd', '\0' and all functions stop reading after the first '\0' ?
The first byte gets set to 0, all string functions stop after the first null byte.Zitat:
Zitat von radioactive_X
I just tried this
And it prints "e", how would you go emptying the whole string do we need a loop or is there a function. It is somewhat irritating to have leftover values like that.Code:char str[1000] = "Hello";
str[0] = '\0';
putchar(str[1]);
'\0' == 0
NULL == (void*)0 in most C implementations, hence == 0, but it's better to not assume it in general
memset( str, 0, 1000 );
Thank you! :tup:
The MIPS standard implementation requires r0 (register zero, or $zr in mnemonic notation) to be hardwired to zero :) So I think NULL is the register 0 value in the case of the PSP :P An absolute zero xD
i know how to blit an image to the screen, but
how would i blit an image to another one?
If your using graphics.c/h use
blitAlphaImageToImage
or
blitImageToImage
or just blit the one one the back first
on this thread i've heard many times about "bad ports of graphics.c". Well if there are multiple ports out there i'd like to know which one is considered the best
You will need zlib and libpng installed to use it,Zitat:
Zitat von brethren
I use the graphics.c obtained from lesson 4 on psp-programming,
I have never had any problems with it,
I also use the graphics.c/graphics.h from lesson 4 on psp-programming and I have never had any problems either.
It is very limited with what you can do with it but what it can do seems to work well,
Keep an eye on Easy Accelerated Image Rendering Library; that's pretty much as easy to use as graphics.c and it's (apparently) much faster. It as image rotation and scaling too. Raphael says its got some issues right now that need to be sorted out before it's a viable use though.
Yeah some of the functions should prove to be useful for people who can't do it themselfs,
If you want to use something good, try OSLib. It's by far the best 2D library around.
Is it faster than graphics.c with all PSP-programming mods? [if u know what I am sayin']Zitat:
Zitat von Raphael
head over to psp-hacks and try PSdonkey's tuts
Yes. Plus it has much more functionality.Zitat:
Zitat von Mr305
I need to know how I'm to find libraries on my own. I only learn about them by seeing them on tutorials. I've looked up psp c library reference, but I can't find anything.
I was gonna ask if there was anything better than graphics.c, but I saw that was covered. But I want a way where I can find these on my own.
All you'll ever need
http://svn.ps2dev.org/listing.php?re...%2F&rev=0&sc=0
Thank you much.
hello again people i'm yet again on the topic of an x loader as i really want this to work and have been trying, unsuccessfully, to get it to work so thusly i bring it here again
Spoiler for code:
this is the code i use on the computer it works perfectly fine however on the psp it just randomly breaks at different points and i'm unsure as to why
-= Double Post =-
also heres proof that it randomly breaks at different points after three runs my trace file looks like this:
Spoiler for trace file:
the first 2 break at noname and the second 1 only reads a few letters before it breaks and i'm at a complete loss i've seen other 1's go further and some only write 1 letter and idk why