You are not logged in.
I'm having serious problems with the following code:
#define BLACK 0x000000FF void __Graficos_PintarCasilla(u16 x, u16 y, u8 width, u8 type, u32 value){ if(value>0){ GRRLIB_Line(x, y+3, x, y+29, BLACK); GRRLIB_Rectangle(x+1, y+1, 2, 30, BLACK, true); GRRLIB_Rectangle(x+3, y, width-6, 32, BLACK, true); GRRLIB_Rectangle(x+width-3, y+1, 2, 30, BLACK, true); GRRLIB_Line(x+width-1, y+3, x+width-1, y+29, BLACK); ... //write value inside the black box } }
Basically, I want to draw rounded-borders rectangles in a specified x and y, with an specified width and with a number written on it. I only want that.
This is drawn correctly on Dolphin. But when I run this code on my Wii, the box looks more or less like this:
I tried changing the Wii's settings to normal 4:3 instead of 16:9 but I get the same results (as far as I know the framebuffer is always the same even if I use 16:9 so I don't think this is a problem, but I wanted to try it).
My DOL is already 3.7megabytes. I have a lot of PNG files, almost all of them are very small (less than 10kb). Only 35 of them are big (30~90kb). The small ones are always on memory, but the biggest ones I try to free them when I'm not using them in that moment in order to get the maximum free memory. Maybe I don't have enough memory and the program is becoming 'crazy'?
Offline
1st try to make a tiny project, make ONLY this box, a remove all other stuff around to see if it is specificaly this code.
then we will investigate further after this.
Offline
http://pastie.org/1106357
I tried it, and the same. So it's not a bug on my program.
I pasted the code there, you can check it out.
The font is the same used on GRRLib examples.
Last edited by marc_max (2010-08-21 20:12:32)
Offline
I just notice there is a difference between a rectangle and a filled rectangle.
Here is my test code:
GRRLIB_Line(300, 200, 300, 200+25, 0x000000FF); GRRLIB_Line(301, 200, 301, 200+25, 0xFF0000FF); GRRLIB_Line(302, 200, 302, 200+25, 0x000000FF); GRRLIB_Line(303, 200, 303, 200+25, 0xFF0000FF); GRRLIB_Rectangle(300, 225, 3, 25, 0x00FF00FF, false); GRRLIB_Rectangle(300, 250, 3, 25, 0xFF00FFFF, true);
The result (zoomed):
Until we decide what to do with that, just add an offset, sorry
Off topic: You should use GRRLIB_FreeTexture instead of this:
free(GFX_Font->data); free(GFX_Font);
Offline
Yes I know, that was just a test
Thank you, I hope you find the problem.
Offline