Showing posts with label mod_text. Show all posts
Showing posts with label mod_text. Show all posts

Wednesday, March 3, 2010

A few videos of Bennugd-wii in action

Below are a couple of videos I've created with my phone (sorry for the blurriness).
The first one runs this code & shows the cursor moving after applying a graph I loaded from a PNG image. The video has no audio, but there's some music in the background, too.
If you look closely you might be able to see that the colors in the mouse cursor are wrong, that's a result of some endianess issues I must solve.



The second video shows some text being written in the Bennu standard font (although others should work, too) and in red colour. When you press the right mouse button (button B in your wiimote) the text moves to a random position.
This one also plays some music. You can find the code here.



I have removed the console initialization code because it caused artifacts, as SDL is the one that initializes all the graphics stuff now.

So, when I solve the signal&endianess bugs and integrate just one more module (mod_grproc) most of the 2D games created with Bennu should start to be playable!

Thursday, February 25, 2010

libtext & mod_text in

I've integrated libtext and mod_text. This means that you can now use write, write_var and similar functions.
The test code sets the text color to red, and moves it when you press the right mouse button. Then deletes it. Seems to be working pretty well.

Things are starting to come up nicely so if you want to give it a try, I've uploaded new binaries to the google code page for you to give'em a try.

Monday, February 22, 2010

libblit, libvideo, libgrbase, librender & video initializarion

It's been a long time! But well, I bring good news :)

Today I finally integrated libblit, libvideo, libgrbase and librender into the runtime. The test code works fine in my linux box and graphics are initialized to the default resolution (windowed+320x240) so it seems to be doing well.
The code needs to be tested in a real Wii, but I'll wait until I integrate mod_video (and probably finish integrating mod_mouse&mod_text) so that I can check that my code is running properly.

It took me longer than needed to complete the integration of these modules today as I hit a problem with the GCC preprocessor. The problem is that Bennu defines the byte offsets in the DCB files incrementally. So if you want to read property C from the DCB file, that property will be located in position: B+32bits.
B's position will itself depend in A's position. So to calculate the position of C, the GCC preprocessor had to do:
C=B+32=(A+32)+32=A+64

This method works well if you don't have too many properties and is very easy to maintain, but it has its limits, and while integrating more and more properties -coming from more and more modules- I hit that limit. Now I'm defining the fixed location of the properties by hand (A=0; B=32; C=64....), which is pretty painful to maintain.
It compiles, though.

Just in case you want to have a look, you can see how the offsets file is looking right now here.