Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,188
  • Replies Replies 6,048
  • Likes Likes 54
not cancer

Wasn't expecting a reply from you of all people.
However yeah it isn't necessarily cancer, but if you're a newcomer it probably isn't really the best way to start. Probably once you get the hang of sf2d or just using gfx framebuffers themselves, you'd be able to make the switch.
 
How would I use a gif in homebrew?
you probably mean an animated one, don't you?

The easist way is to simply unpack the image into single frames and then use them in your program. An alternative would be to use a library(like this one: https://github.com/hidefromkgb/gif_load), if you want to load the gifs from the internet or from file and you can't prepare them. But in the end you have to unpack the gif into single frames(whether you're doing it on the fly or in advance) and then proceed as if you're drawing an animated sprite.
 
I need help, this isn't necessarily 3ds related, more of c++ in general, but since the software is for the 3ds I figure I might as well go here anyway.
In the file MaVeRo-3D.cpp (the main file) [see repo: https://github.com/Magicrafter13/MaVeRo-3D] I can't figure out what's wrong, but after a few hours I was able to deduce it had something to do with the sprite_init arrays.
The problem is at line 286. If I comment it out, the program runs fine, but with it, the 3ds will crash. I have figured out it is the R3 G3 B3 and A3 arrays that are causing it in some way. Because I can still use the test_tile_sprite object fine with the other arrays, but not the 3rd set. I have no idea what's wrong and even with extensive googling I have not been able to even figure out the problem!
 
I'm having some kind of issue, printing some lines, it seems like a while loop type symptom.. but it's not...
https://github.com/Magicrafter13/MaVeRo-3D
in the main file (MaVeRo-3D.cpp) at line 477 I have a for loop which is supposed to draw some tiles, it gets to the end (prints drawing: 69, which is the end of the for loop obviously) but then it freezes. If I had some cout's in the drawing function it just prints text forever, I don't know why it's getting stuck, since it should draw the 69th one, and then set I to 70, thus ending the for loop. But I think it may have something to do with my use of vectors, since I am new to them, and probably messed something up.

--------------------- MERGED ---------------------------

If I change the number from 70 to 69 in the for loop, it freezes at 68. So I assume, that it always freezes at the last one, which just confuses me even more.

--------------------- MERGED ---------------------------

EDIT: I changed it to 1, and it doesn't lock up, but it doesn't draw the first tile either... but I suppose I can figure that out later. The main problem right now, is what's wrong with this for loop...

edit 2: if it's 3 or higher then it freezes. But 2 and 1 work (and probably 0, but that would be pointless).
 
Last edited by Magicrafter13,
Quick question; I'm trying to compile Jansson (found here in the PortLibs: https://github.com/devkitPro/3ds_portlibs/). I followed the instructions, updated my Makefile, and double-checked that everything was installed to $DEVKITPRO/portlibs/armv6k, but whenever I try to compile my program, I end up with this:

Code:
In file included from /home/fluffy/Documents/Projects/3DS-VN-Engine/source/main.cpp:7:0:
/home/fluffy/Documents/Projects/test/source/test.hpp:6:21: fatal error: jansson.h: No such file or directory
compilation terminated.

Are there any paths I need to set before it compiles, or is there something wrong with my installation? Any help would be appreciated.

EDIT: Nevermind, it was in issue with the Makefile. Just set LIBDIRS to

Code:
LIBDIRS = $(PORTLIBS) $(CTRULIB)

I believe I asked this question before. Heh.
 
Last edited by ,
i'd like to use stereoscopic 3d with sdl by adding a z axis to the sdl structures
but i'd like to know how to manage the 3d to allow the 3ds to make the specified pixels 3d depending on the axis
 
i'd like to use stereoscopic 3d with sdl by adding a z axis to the sdl structures
but i'd like to know how to manage the 3d to allow the 3ds to make the specified pixels 3d depending on the axis
The 3d effect requires creating a left and right image with objects at different offsets and sizes based on distance. This can be done with the 3d hardware by rendering a 3d scene twice using two different viewpoints. Or it can be accomplished by updating the framebuffer directly with different layers or objects adjusted for each viewpoint.
 
The 3d effect requires creating a left and right image with objects at different offsets and sizes based on distance. This can be done with the 3d hardware by rendering a 3d scene twice using two different viewpoints. Or it can be accomplished by updating the framebuffer directly with different layers or objects adjusted for each viewpoint.
since i'm using sdl for 3ds, i guess i'll have to modify directly the sdl source, it uses libcitro3d
does libcitro3d has options to manage the stereoscopic 3d ?
 
since i'm using sdl for 3ds, i guess i'll have to modify directly the sdl source, it uses libcitro3d
does libcitro3d has options to manage the stereoscopic 3d ?
Yes, though I suspect you will need to adjust the viewpoint (position, projection, etc. ) for each frame manually.
 
i'd like to use stereoscopic 3d with sdl by adding a z axis to the sdl structures
but i'd like to know how to manage the 3d to allow the 3ds to make the specified pixels 3d depending on the axis
You could do it but It would be better to handle the x offset for the 2 screens with custom code, so the only change to the SDL lib would be to have two main surfaces to draw on. Or like I did for top screen and bottom screen, you could have a big surface with half rendered on the left screen, and the other half on the bottom screen.

since i'm using sdl for 3ds, i guess i'll have to modify directly the sdl source, it uses libcitro3d
does libcitro3d has options to manage the stereoscopic 3d ?

SDL uses citro3d only for a fast draw from the buffer to the phisical screen. And SDL is a 2d lib so you can't modify it to draw 3d objects, but only to have different deep effects for 2d objects.

If you want 3d drawing you should use open GL. There is an unfinished open GL wrapper for citro3d, but never tested it.
 
You could do it but It would be better to handle the x offset for the 2 screens with custom code, so the only change to the SDL lib would be to have two main surfaces to draw on. Or like I did for top screen and bottom screen, you could have a big surface with half rendered on the left screen, and the other half on the bottom screen.



SDL uses citro3d only for a fast draw from the buffer to the phisical screen. And SDL is a 2d lib so you can't modify it to draw 3d objects, but only to have different deep effects for 2d objects.

If you want 3d drawing you should use open GL. There is an unfinished open GL wrapper for citro3d, but never tested it.
actually i'm already working like this, the rendering works with one main surface of 411x480 the top screen uses a surface of 411x240 blitted on the top and the bottom screen a surface of 320x240 blitted on the bottom and centered on the x axis

actually i don't want 3d rendering, just a deep effect

for the 3d effect i was expecting to have to render two images for the top screen and ajust the x values the z would be a managed value per game object the manager would use this value to set the correct x value on each screen

actually i just don't know how i should render the two surfaces to the stereoscopic screen (not blitting them on each other but rendering one on the left side and the other on the right side for the 3d)
 
It seems whenever I press start with my home-brew I'm developing, it returns to the home menu rather than the home-brew menu. How would I fix this?
 
It seems whenever I press start with my home-brew I'm developing, it returns to the home menu rather than the home-brew menu. How would I fix this?

Probably your code misses to close some processes (e.g. romfs) befor exiting and the system crashes. This is The only reason I'm aware of a 3dsx returning to 3ds menu (with a rebout) instead to HBL menu.

Show an example of homebrew of yours to have more hints.
 

Site & Scene News

Popular threads in this forum