No, not yet; however im working on a bitmap font rendering solutionIs there a function for printing text that plays nice with this lib? The lib seems nice so far!
Alright, I just finished a basic bitmap font renderer, have some cleanup todo; but its really simple (Like two or three functions)Is there a function for printing text that plays nice with this lib? The lib seems nice so far!
There is a bug with .3ds bluid when pressing on Home and Resume , all graphics disappear , only
void sf2d_set_clear_color(u32 color); still present.
I also have a problem with color graphics, RGBA displayed code is not the one you want .
For example: RGBA8 ( 0x94 , 0x94 , 0x94 , 0xFF ) to give me a light gray , but I has a very dark gray ...
I love the new function for the tilemap thank you , I'll really need a function to display text ...
Congratulations for your excellent work.
Alright, here is what my current code can produce:
Code: https://gist.github.com/filfat/05676067e0a8614a1a8f
You will have to use F2IBuilder to generate the bitmap (Example) and then use GIMP to convert it to a .c file (havent tested with the .h option , example )
If you use this code anywhere please give me credits for the code.
Oh and btw its licensed under "The Artistic License 2.0"; feel free to contact me if you want to join my 3DS-UI project
That's pretty neat. Shouldn't be too hard to implement kerning and font sizing.
The sad thing is I'm actually writing a bitmap font rendering system in openGL for a project that's completely unreleated to 3ds development right now.
You were actually able to get it to run as a .3ds? i've tried cia builds and they black screen.. I think its just CFW doesnt like GPU rendered stuff.
I'm pretty sure I did, lol.. hmmTry with the latest ctrulib update!
yea works on ninjhax fine.. just not on GW emu or my CIA CFW emu .. ctrulib has always been a pain like that though.Does it work as a .3dsx?
yea works on ninjhax fine.. just not on GW emu or my CIA CFW emu .. ctrulib has always been a pain like that though.
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <3ds.h>
#include <sf2d.h>
int main()
{
sf2d_init();
sf2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0x40));
while (aptMainLoop()) {
hidScanInput();
if (hidKeysDown() & KEY_START) break;
sf2d_start_frame(GFX_TOP, GFX_LEFT);
sf2d_draw_rectangle(0, 0, 200, 240, RGBA8(0x40, 0x40, 0x40, 0x40));
sf2d_end_frame();
sf2d_swapbuffers();
}
sf2d_fini();
return 0;
}
I return again to the color problem with a simple example...
Code:#include <stdio.h> #include <string.h> #include <math.h> #include <3ds.h> #include <sf2d.h> int main() { sf2d_init(); sf2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0x40)); while (aptMainLoop()) { hidScanInput(); if (hidKeysDown() & KEY_START) break; sf2d_start_frame(GFX_TOP, GFX_LEFT); sf2d_draw_rectangle(0, 0, 200, 240, RGBA8(0x40, 0x40, 0x40, 0x40)); sf2d_end_frame(); sf2d_swapbuffers(); } sf2d_fini(); return 0; }
in this example, I display a bottom and a rectangle with the same value RGBA yet the result is not the same.
This problem destroys the charm of my next puzzle game.
You call an alpha blending on an alpha blended surface, it's obviously different...
How can I do to get the color you want ? Same as my source file.
The color of my sprites are not displayed true to my source palette.
User a clear colort with alpha value set to 0xFF and then draw a rectangle with the same color.
I do not understand , to display an image , it does not affect the alpha value.