Problems on a console port (Wii+CW) & general suggestion
Posted: Tue Jul 07, 2009 4:45 pm
Hi all !
I've made a minimum port of the engine for Wii using CodeWarrior and I wanted to share some of the problems I could have encountered...
The port was minimum because I didn't have to care about the inputs handled by my main application, so all I had to do was to compile the Irrlicht library with a Wii device and a Wii video driver (and textures).
Here's my developpement notes on Irrlicht...
CW:
Basically the transition to CodeWarrior was easy, every time a "#if defined _MSC_VER" was declared I just added the metrowerks equivalent...
Wii:
- irrAllocator.h : I realized that the line "#include <memory.h>" is useless.
- dmfsupport.h : the whole code should be encapsulated by Irrlicht namespaces
- irrMap.h : throw is used several times in this file, I suggest the replacement by a "os::Printer::log(msg, ELL_ERROR);"
- Samples : I suggest the samples shouldn't use the "using namespace irr" as some paltforms also redefine basic types as u32, s32 etc. and it's a real pain in the ass to change that in each main.cpp of the samples.
- General : when linking statically an application with Irrlicht, on the runtime many allocations occured in Irr before entering the "main()" function, wouldn't it be really interesting to get rid of these. For example on Wii, the memory management is kind of complicated and that could cause some problems...
I hope this will interest someone, and if you have any remarks about my suggestions I'll be glad to read it !
Warning : the CodeWarrior version for Wii might differ for the PC/MAC one, I'm not sure about this...
Warning : As you can understand, I won't be able to provide Wii related sources as I work under NDA...
I've made a minimum port of the engine for Wii using CodeWarrior and I wanted to share some of the problems I could have encountered...
The port was minimum because I didn't have to care about the inputs handled by my main application, so all I had to do was to compile the Irrlicht library with a Wii device and a Wii video driver (and textures).
Here's my developpement notes on Irrlicht...
CW:
Basically the transition to CodeWarrior was easy, every time a "#if defined _MSC_VER" was declared I just added the metrowerks equivalent...
Wii:
- irrAllocator.h : I realized that the line "#include <memory.h>" is useless.
- dmfsupport.h : the whole code should be encapsulated by Irrlicht namespaces
- irrMap.h : throw is used several times in this file, I suggest the replacement by a "os::Printer::log(msg, ELL_ERROR);"
- Samples : I suggest the samples shouldn't use the "using namespace irr" as some paltforms also redefine basic types as u32, s32 etc. and it's a real pain in the ass to change that in each main.cpp of the samples.
- General : when linking statically an application with Irrlicht, on the runtime many allocations occured in Irr before entering the "main()" function, wouldn't it be really interesting to get rid of these. For example on Wii, the memory management is kind of complicated and that could cause some problems...
I hope this will interest someone, and if you have any remarks about my suggestions I'll be glad to read it !
Warning : the CodeWarrior version for Wii might differ for the PC/MAC one, I'm not sure about this...
Warning : As you can understand, I won't be able to provide Wii related sources as I work under NDA...