Correction. It only works the first time you hit the hardware reset. I seem to have to reapply: SYS_SetResetCallback(WiiResetPressed); after calling reset(). I can pretend that makes sense.by Sinman - Coding
BAM! Changing WiiResetPressed() back to just: void WiiResetPressed() { HW_BUTTON = SYS_RETURNTOMENU; } and adding the following to my main loop: if (HW_BUTTON == SYS_RETURNTOMENU) { reset(); HW_BUTTON = 0; } solved it. Thanks for the quick response!by Sinman - Coding
My game has a reset() function that (re-)initializes all global variables, returns to the title and starts playing a looping ogg (stopping the previously playing loop if there was one). A normal button press on the Wiimote can call this function and everything works as expected. The title screen appears, all in-game variables are reset to their default values and the loop starts over from the begby Sinman - Coding
Wouldn't I still have to include it in the Makefile with the list of other LIBS? If so, what's six in one hand versus half dozen in the other?by Sinman - Coding
Quotehenke37Ew, having to compile libraries in your master makefile! Are you referring to my advice? I'm a total noob learning by example. What's the preferred way?by Sinman - Coding
You can check out my game Horror Vacui for a clearer example of what I'm trying to do if the following explanation doesn't make any sense. When a player places a card on the board it results in all (affected) adjacent cards flipping in a clockwise order ending with the flipping of the just placed card. The card in the top position starts its flip first and after a short delay is follby Sinman - Coding
I figured out what the problem was. My environment (Xcode) is treating all paths relative to the root of the project as if the root of the project was located at the root of the drive. I also figured out that if I just added all my assets (images and audio) to a data directory and pointed my Makefile at it, bin2o (after identifying all the extensions I'm using) would replace the need for botby Sinman - Coding
Can anyone recommend a good library for timing animation? I'm looking for something along the lines of JavaScript's setInterval() (repeating) and setTimeout() (one time) methods. Or is there a more correct way to do this in C? Edit: Would a better way be to create a new thread and then sleep that thread for an interval of time? Examples would be greatly appreciated.by Sinman - Coding
This is the blind leading the blind but here goes: download the GRRLib files and add them to your project's source directory. Open your Makefile and update the line that looks like: SOURCES := source to: SOURCES := source source/GRRLIB (This tells your Makefile to look inside the new GRRLib directory you just added.) Then in the same Makefile update the line that looks (someby Sinman - Coding
Not exactly. The day 5 tutorial explains the process quite clearly though.by Sinman - Coding
I finally figured out how to get Xcode's Build and Go feature to work with wiiload (and documented it here). Combined with this new syslog-enabled wiiload I'm down from 3 apps to 1 for building and testing homebrew. Can't thank you enough TekWarrior.by Sinman - Coding
Hmm, I tried changing the port number (to 515) but didn't think to make it greater than 1024. Changing it to 1514 worked! This is phenomenal.by Sinman - Coding
Crayon released a patch for GRRLIB that allowed you to take a screenshot and save it to the SD as a PNG image. Not exactly what you're looking for but I imagine you could piece something together from his source.by Sinman - Coding
iofthestorm is correct, JPGs don't contain alpha info. Check out GRRLib. It uses PNGs (your image editor should be able to save those just as easily as JPGs) and lets you control the alpha of the entire image (if the alpha channel in the PNG isn't enough for you).by Sinman - Coding
It should but I haven't been able to get it listening. All the information I've found suggests that it's been broken in Leopard. Besides, unless I'm misunderstanding what the syslog version of wiiload does, it would be far more useful to have my messages sent directly to the wiiload console window I keep open anyways than to another application.by Sinman - Coding
I was able to compile wiiload_syslog on OS X 10.5.5 with 1 warning: syslogd.c:81: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness Normal wiiload functionality works but then wiiload exits with the following message: unable to start syslog daemon Might the two be related? Any suggestions? I'm about a week into C so I'm at a loss aby Sinman - Coding
Would it be alright if I opened a new thread for my game and linked to it from the Wiki page in case anyone has questions or feedback? Or would that be considered spamming the forum? Edit: Never mind, I guess that's what the Discussion tab is for.by Sinman - Feedback & Support
Follow up question about the .s file. What are the paths relative to? The .s file? The makefile or maybe main.c? I've tried all three and the only way that works for me is absolute paths from the root of the drive. Is there something in the makefile I'm missing?by Sinman - Coding
Thanks, that worked a treat. Turns out the app wasn't crashing until I tried to return to the HBC. Because I wasn't calling MP3Player_Stop(); before exit(0); So the mp3 was stopping abruptly and not looping. Using your example, adding the following to the "while" loop keeps the music going: // stopped? start again if (!MP3Player_IsPlaying()) { MP3Player_PlayBufferby Sinman - Coding
Also, there's a lot of samples of playing external files from an SD card but I can't find any examples (using MP3Player, asndlib or otherwise) that illustrate playing embedded audio (I just figured out .s files and .INCBIN). So, if anyone wants to share...by Sinman - Coding
First let me say thanks to everyone sharing code and helping others on this wiki and board. I've been able to "learn" C and put together a relatively simple game in three days because of your generosity. I'm trying to play an mp3 on continuous loop as background music for my game. I'm using libfat to read the mp3 off of an SD card if available and playing it with MP3Player. Forby Sinman - Coding