I've read that you should not return from main() and instead you should use exit(). Why is that?by diego_pmc - Coding
I read somewhere that if you get a noisy green screen when exiting the application it means there are memory leaks.If that's true, it seems I don't have any, since (in normal conditions) my app exits as it should (in fact, I've been really careful about memory leaks). However, if I 'force it', that is if I try to close it as soon as it opens I get a green screen. I thoby diego_pmc - Coding
Here's some info about how to get the date: EDIT: @dan3008: What the RGBA white for?by diego_pmc - Coding
The underscore is a common convention used to easily identify class members. Athor conventions are to put an 'm' (as in "member") at the beginning of the name (e.g.: mCurrentScreenBeginTime). What I meant to ask is, do you have any difficulties understanding what the code does/how it does it? EDIT: Odd indentation like this... bool shouldChangeScreen = userController->isBby diego_pmc - Coding
Thanks, it works (finally!). BTW, since I posted the code in this thread: do you think that function I posted is easy enough to read an understand?by diego_pmc - Coding
I have some problems with measuring time. Here's my function: void IntroState::update(GameManager* game, UserController* userController) { // Function updates the current screen that has to be diaplyed by either // keeping track of time and changing the screen when enough time has // passed, or by listening to user input. clock_t currentTime = (clock_t)((double)(clock() / CLOCKSby diego_pmc - Coding
Thanks, that should solve it.by diego_pmc - Coding
Thank you very much for all the help!by diego_pmc - Coding
I would like to know what to do in order to be able to play multiple sounds at once. I'm using the library/wrapper found in "mp3player.h" and it seems that it can only play one sound at once (the same with some MOD libraries I've seen).by diego_pmc - Coding
Could someone help me out with this, please? I need to create some fade-to-black and fade-from-black transitions for images I display at the beginning of the game with logos and such. As an example, look at the beginning of TetWiis. I'm using GRRLIB.by diego_pmc - Coding
That solved it, thanks a million. (Silly mistake.)by diego_pmc - Coding
Hi, I'm having an odd linker error that I don't know how to solve. It is telling me that there is an undefined reference to the vtable for EndState() and ~EndState() constructor and destructor. I've looked around the web and it seems this kind of error is related to classes inheriting from pure virtual classes (EnState inherits from GameState, which is pure virtual). Here's mby diego_pmc - Coding
I tested it and everything works as it should. Thanks for the help!by diego_pmc - Coding
I have a question. I looked at the source code and I see that all GRRLIB_LoadTextureJPG() does is determine the size of the JPG and then call GRRLIB_LoadTextureJPGEx(). My question is, why doesn't this work with embedded files?by diego_pmc - Coding
I did not generate it. I'm using Visual C++ 2010; I added the JPEG as a resource, and when I compile the header gets created automatically and placed in the 'build' folder. The exact same thing happens if I compile directly though devkitPro. The contents of the header are: extern const u8 grrlib_logo_jpg_end[]; extern const u8 grrlib_logo_jpg[]; extern const u32 grrlib_logo_jpg_by diego_pmc - Coding
Hi, I would like to know if (and how) I can included an image file (JPEG in my case) as a resource and then use that and print it on the screen (with GRRLIB, in my case). In the app intro I want to show the symbols of the libraries being used. I added 'grrlib_logo.jpg' as a resource; I know that a header gets created, 'grrlib_logo_jpg.h', which has some extern u8 and u32 declaby diego_pmc - Coding
Crayon, could you please give me a downlaod link to the new version of libjpeg? :)by diego_pmc - Coding
I replaced realloc with maloc and fixed the typo but the problem is the same. Besides, I don't (yet) use the opertator= in any part of my code, so the problem couldn't have been caused by this. Also I commented the operator out and the problem was still there.by diego_pmc - Coding
I'm experiencing a very odd crash and I've absolutely no idea how to fix it, maybe someone here can help me. First of all, here's my source and my homebrew directory: - Source code (107 KB) - Homebrew directory (4.57 MB) Now the symptoms: The problems occurs ONLY if I draw an image on the screen, and only when the ProcessSection() function (game.cpp) is about to return to maiby diego_pmc - Coding
Phew, I solved it. Thanks for the help. I solved the problem by changing line 27 from jpgogc.h I mentioned above with this: #if defined(__cplusplus) extern "C" { #endif int JPEG_Decompress(JPEGIMG * jpgimg); #if defined(__cplusplus) } #endifby diego_pmc - Coding
Yes, I installed the library (installed it together with GRRLIB). About JPEG_Decompress(): my code is a modification of the tutorial al CodeMii. When I compile the tutorial I get no errors; seems the undefined function error appears only when I change the externsion from *.c to *.cpp. Also, JPEG_Decompress() does exist; the prototype is found on line 27 of jpgogc.h: JPEG_Decompress(JPEGIMG * jby diego_pmc - Coding
Yes, I did. Here's my project folder (it's just CodeMii's tut8 with some modifications): ?by diego_pmc - Coding
There's a part in my application in which I need to get the current coordinates of the console cursor. Is there any function or VT terminal code that can help me achieve this more easily?by diego_pmc - Coding
I am having some problems with my code. When it tries to link the objects and create the *.dol file it gives me an error that says: Quotemain.cpp:130: undefined reference to 'JPEG_Decompress(JPEGIMG*)' These are the libs in my Makefile. Could someone please tell me how I'm supposed to arrange them in order for this to work? -lasnd -lmad -lfat -lwiiuse -lbte -logc -lm -ljpegby diego_pmc - Coding
I solved it. In case anyone needs help with this, try reading this post of mine over at GBATemp: ?by diego_pmc - Coding
Thanks for the help, and sorry I didn't reply sooner. I partly got the game to play an MP3 music file when it opens, but there is a problem. When I start the game, the music plays okay for a little while, and then it starts making one of those weird sounds when the game is blocked on a single note and keeps repeating it over and over. This happens seemingly at random points in game; it couldby diego_pmc - Coding
Can anyone please tell me if there is any way I could play sound files other than MOD in my Wii Homebrew application? I have some MP3 files that I want to put in my application. Below I have included the code that allows me to play MOD files, but is there any way to play any other kind of files (especially MP3)? (Code snipped from CodeMii.) FILE *f = fopen("/loop.mod", "rb"); if (f =by diego_pmc - Coding