lbreakout has a configure script. Ideally all you would need to do is run that and type make, but the configure script doesn't know about Wii dev stuff. Since this port is not very complicated, I just use the standard Makefile template from devkitpro and add in the SDL flags, as well as the flags the game needs. Since this game uses file I/O, you'll need to initialize FAT in main.by Michael - Coding
airpong uses SDL + OpenGL. That makes it more difficult. There are easier things to port out there. For instance, the SDL games at lgames (lpairs, lbreakout, lmarbles) are all easily portable to the Wii. If you're dead set on porting airpong, I believe there's an SDL version compatible with OpenGL (gl2gx), included with the source for Freespace2Wii. The make error is because mby Michael - Coding
You need to normalize the vector you pass GX_InitSpecularDirv(). You setup a 'lit' light structure, but then you also use a 'litt' (double tee's) structure elsewhere. Michaelby Michael - Coding
I would continue on and master C first. If you jump back and forth between the two as a beginner, you risk confusing yourself. Unless you're in some hurry, I'd take my time to get really good in one language. And if you're interested in writing small games, I think C is a fine choice. However, if you're short on cash and already have a good C book, I'd get a good C+by Michael - Offtopic
Your dr.x is negative, shouldn't that be 0? Michaelby Michael - Coding
http://www.gnu.org/software/make/manual/ At a shell prompt (at least on Linux): info make man make If you use the Emacs editor, you can get the info and man pages while you edit with: C-h i (then select the make entry ), M-x man (then type make) Michaelby Michael - Coding
void GX_SetLineWidth(u8 width, u8 fmt); I'm not exactly sure how to interpret the fmt parameter, but it's one of the following from gx.h: #define GX_TO_ZERO 0 #define GX_TO_SIXTEENTH 1 #define GX_TO_EIGHTH 2 #define GX_TO_FOURTH 3 #define GX_TO_HALF 4 #define GX_TO_ONE 5 By default, GX_Init() sets the width like this: GX_SetLineWidth(6,GX_TO_ZERO); Michaelby Michael - Coding
Good points. Another problem that can cause the "error: 'vector2f' does not name a type" message is if you also have a function or variable in the same scope called vector2f. You might also try re-arranging the order of your #includes to see if it's an include order issue. Michaelby Michael - Coding
From what you've posted it sounds like it should work. If you have the time/energy, post a simple example which reproduces the error and maybe something will stand out. Michaelby Michael - Coding
It sounds like you want to include one header file inside of another, so you would do something like this: #include <header_with_vector2f.h> typedef struct CLocation { ... vector2f vert; ... Michaelby Michael - Coding
The crash in the light example is happening because gl2gx is trying to call the user defined idle function, which in the example is never defined. The workaround is to define an idle function. In the light example I added this line before the call to glutMainLoop(): glutIdleFunc(Display); gl2gx could check for a NULL idle function to prevent this from happening. I didn't try thisby Michael - Coding
I tried the lights example and it crashed. I tried the example in material.zip and it runs fine. The code dump for the crash showed only lwp_* functions on the stack. Maybe the other examples crash with more useful traces. I only tried the lights and material examples. Michaelby Michael - Coding
Hi Armin & Ekeeke, I had trouble getting the GX_BeginDispList() and GX_EndDispList() functions to work. The Wii hangs at the first GX_DrawDone() call I issue, after creating the list using these two functions. When I dump the display list memory to a file, after calling these two functions, the memory is always at its default values. I do call DCInvalidateRange() on the memory before I asby Michael - Coding
Hi balta, You need to add -L<path_to_libfat_dir> to the LIBS variable in your Makefile. So if your libfat.a is in /tools/fat/lib, your LIBS line would have something like this in it: -L/tools/fat/lib -lfatby Michael - Coding
After WPAD_Init(), add these two lines: WPAD_SetDataFormat(0, WPAD_FMT_BTNS_ACC_IR); WPAD_SetVRes(0, 640, 480); Those setup and configure the device to send IR data.by Michael - Coding
My /usr/include/memory.h on linux, simply includes string.h and features.h. Those are both in devkit, so you could try including those two.by Michael - Coding
There's an SDL port from the author of WiiApple which includes keyboard support here. I think he's using the same keyboard lib (or was using), but he's made some improvements.by Michael - Coding
Hi Dave, You're welcome. Glad to hear you got things working. I'm running Ubuntu 8.1 and CentOS 5.x, both run devkitpro without any issues so far. I hope you'll be rolling out some cool homebrew games/apps in the future :-) Good luck.by Michael - Coding
Quotewatso4183Should i remove the above rom the ~/.bashrc and replace with your setdev instructions? No, that looks correct except for the last line. The libogc dir I have is in the same dir as the devkitPPC dir, like you show in your first post, and I don't have any binaries in my libogc that I need to set my path to. Quotealso attempted Make -I $DEVKITPRO/libogc -f makefile_file_loby Michael - Coding
How are you compiling your app? If it's with the Makefile template, then it sounds like you didn't define the DEVKITPRO environmental variable. Here's my csh setup script for wii dev: setenv DEVKITPRO /tools/devkitpro_r16 setenv DEVKITPPC $DEVKITPRO/devkitPPC setenv WIILOAD tcp:192.168.1.105 set path=($DEVKITPPC/bin $path) If you're using a different Makefile, or just rby Michael - Coding
I haven't seen that error before. I tried compiling and linking a source file with that symbol and I had no trouble resolving it. Here's my little test program: #include <sys/iosupport.h> int main() { const devoptab_t *ptr; ptr = GetDeviceOpTab ("test"); return 0; } I used the example Makefile from the libogc examples. Here are the libraries that were inclby Michael - Coding
Here's how they're defined in my older libfat include: #if defined(__wii__) typedef enum {PI_DEFAULT, PI_SDGECKO_A, PI_SDGECKO_B, PI_INTERNAL_SD, PI_CUSTOM } PARTITION_INTERFACE; #else So PI_DEFAULT=0, PI_SDGECKO_A=1, etc. If I were you, I'd either compile with the older libogc/libfat where these are defined, or port the libfat calls in the code you're compiling to tby Michael - Coding
Google "CreateProcess: No such file or directory" and look at some of the results. It looks like the problem is related to your search path.by Michael - Coding
I don't have a solution, but I do have a debugging suggestion. Since fopen() can fail for multiple reasons, I'd check what's in 'errno' to find what the exact error is. I'd add something like this when you check fp for NULL: #include <errno.h> ... if (fp == NULL) { fprintf(stderr, "ERROR: %s\n", strerror(errno)); }by Michael - Coding
Thanks lordzid for the de-allocation code and explanation of it.by Michael - Coding
Good luck SpaceJump. QuotelordzidI prefer mine, naturally. So do I, but SpaceJump was asking for an explanation of why his code wasn't working, not for the best implementation, or at least that's how I took his question. Very nice implementation BTW, I like your use of linked lists here instead of arrays. I also like the way you don't try and cast every malloc() you use andby Michael - Coding
QuoteSpaceJumpWhat am I doing wrong? I think your main issue is not providing any storage space for each new line you read in. It looks like you want to store each line in this array: char *charArray[8]; The above allocates space to hold 8 pointers to a char. Your program will need to provide the memory for the data you plan to store at each of these addresses. The string functions themseby Michael - Coding
I would rename main.c to main.cpp, in addition to checking for any missing header files.by Michael - Coding
Would you mind telling us how you resolved the original problem?by Michael - Coding
QuoteWhen I run it via the HBC I get the following error - "sdl not configured with thread support". I've identified the SDL_INIT_TIMER and SDL_GetTicks() as the culprits. Have you tried not initializing the timer subsystem (e.g. do not pass SDL_INIT_TIMER)? This worked for the handful of SDL ports I've tried. I didn't see any timing issues when I did this.by Michael - Coding