Problem reading files

support for the powerpc toolchain
Post Reply
protomank
Posts: 8
Joined: Wed Apr 14, 2010 6:29 pm

Problem reading files

Post by protomank » Wed Oct 02, 2013 4:56 pm

I'm trying to port my game to Wii and found a strange problem. Im am testing on Dolphin 3.5, as I do not own a Ninendo Wii.

First, I have to say that, to build it I had to comment out the "typedef unsigned long uintptr_t;" line in devkitpro/libogc/include/SDL/SDL_config_minimal.h.
SDL load images fine, I can show the game intro without a problem.

Then, if I did not have initFatDefault() it did not load the first file, game_data. Adding it, it now reads, well sort of (more on this ahead).

Adding initFatDefault, the code passes the game_data reading and then crashes on second file reading, of stages_data.

Now, if all files were not loaded, I would be "OK, something wrong with the SD card image or libFatInit", right? But the first one did read.. kind of. Looking at the struct loaded from file, it is empty. So it could fopen the file, but fread failed...

I am kind of lost now, don't know what I can modify in the code to try something different. Is there anyone who can give me a hand, even if just some "try this and that"?

The code is at http://sourceforge.net/p/rockbot-game/c ... D/tree/v1/

Relevant parts:
http://sourceforge.net/p/rockbot-game/c ... 1/main.cpp
http://sourceforge.net/p/rockbot-game/c ... ile_io.cpp

Any help is welcome :-P

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests