Pages: 1
ray |
Posted on 01-27-12, 04:35 pm
|
Roy Koopa
Karma: 4011 Posts: 1268/2722 Since: 06-26-11 |
I'm asking all talented ASM hackers here Is it possible to set the position of the FG-Effects always on Layer 3? The sprites are ALWAYS in front of it Is that possible?
See a lots of creative DS Hacking here_________________________ If you want to support me, you might check out my Patreon Page : ) |
Dirbaio |
Posted on 01-27-12, 04:44 pm
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10000 Posts: 1460/4457 Since: 06-08-11 |
I don't think so. FG effects are on Layer 0 (the 3D layer)
|
ray |
Posted on 01-27-12, 04:45 pm
|
Roy Koopa
Karma: 4011 Posts: 1269/2722 Since: 06-26-11 |
So there's no way to hide the sprites behind them?
See a lots of creative DS Hacking here_________________________ If you want to support me, you might check out my Patreon Page : ) |
Arisotura |
Posted on 01-27-12, 05:45 pm
|
☭ coffee and cream
Karma: 10415 Posts: 182/2768 Since: 06-26-11 |
ray |
Posted on 01-27-12, 05:50 pm
|
Roy Koopa
Karma: 4011 Posts: 1270/2722 Since: 06-26-11 |
Impossible for me
See a lots of creative DS Hacking here_________________________ If you want to support me, you might check out my Patreon Page : ) |
Arisotura |
Posted on 01-27-12, 05:56 pm
|
☭ coffee and cream
Karma: 10415 Posts: 184/2768 Since: 06-26-11 |
Or you could perhaps achieve something by making sprites use sprite blending and configuring the 2D blending registers so that sprites only blend with 3D graphics. However this method, if it works at all, may look like shit. Also 2D blending is limited, the same blending factor applies to all sprites that are set to blend.
_________________________ Kuribo64 - zrghij |
ray |
Posted on 01-27-12, 06:13 pm
|
Roy Koopa
Karma: 4011 Posts: 1271/2722 Since: 06-26-11 |
Uhm... what?? xD
See a lots of creative DS Hacking hereDo you think there's a possibility to let the FG-Effect scroll with mario? For example: You have the FG effect "Rain" and in the middle is a cross. And this cross should stay ALL time in mario... _________________________ If you want to support me, you might check out my Patreon Page : ) |
coolas1 |
Posted on 01-27-12, 10:09 pm
|
Porcupo
Did you win the game? Karma: 211 Posts: 213/322 Since: 06-28-11 |
Nope, I doubt that this is possible...
Although by removing one of your BG's you could replace it with a custom FG effect (that is behind all the sprites). Then just ASM hack that bg to move fast by itself... |
ray |
Posted on 02-18-12, 07:14 am
|
Roy Koopa
Karma: 4011 Posts: 1326/2722 Since: 06-26-11 |
No I want to have the Effect on TOP of all like its normal
See a lots of creative DS Hacking here_________________________ If you want to support me, you might check out my Patreon Page : ) |
coolas1 |
Posted on 02-19-12, 10:02 am
|
Porcupo
Did you win the game? Karma: 211 Posts: 230/322 Since: 06-28-11 |
You can set the layer that the bg appears on though...
Meaning that background bg can appear in front of the fg effects. |
ray |
Posted on 02-21-12, 05:22 pm
|
Roy Koopa
Karma: 4011 Posts: 1328/2722 Since: 06-26-11 |
LOL
See a lots of creative DS Hacking hereAnd you know how to make such an ASM hack? _________________________ If you want to support me, you might check out my Patreon Page : ) |
Dirbaio |
Posted on 02-21-12, 08:03 pm
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10000 Posts: 1499/4457 Since: 06-08-11 |
I've never checked how to do that, but I guess it's possible to make a really hacky code that runs every frame, and changes the priority of one of the BG layers to make it appear in front of everything.
To do that, just read the BG register, change the priority and write it back. Here's how'd that be done (I've not tested, maybe it's wrong) REG_BG0CNT = (REG_BG1CNT & ~3) | newpriority; (see here for details!) Ideally we should find a hook to run that when NSMB sets up the BG registers, but running that every frame will probably do the trick =D The tile hack has a hook address that runs every frame only when playing a level. (it's a hook in Mario's code) Just some info if you want to get started, now that you know some DS homebrew =D |
coolas1 |
Posted on 02-24-12, 03:52 am
|
Porcupo
Did you win the game? Karma: 211 Posts: 231/322 Since: 06-28-11 |
Ahem, Dirbaio, you have actually done this in nsmbeDS.
Main.cpp Ln91: bgSetPriority(2,1); Just hook code like that in the MaroMove(); function and have the background a snowfield like effect... Then make the background scroll very fast. |
Dirbaio |
Posted on 02-25-12, 06:46 pm (rev. 1)
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10000 Posts: 1506/4457 Since: 06-08-11 |
I suggested doing it with registers for a reason:
Some parts of libnds do really complicated things that will interfere with NSMB's code. For example, libnds does sprites one way (oamSet) while NSMB does it another way. If you use oamSet from an ASM hack, things'd probably go BOOM. You shouldn't use stuff like texture/palette allocation, sprites, FAT, wifi from libnds, and there's probably more. BUT In this case it looks you can use bgSetPriority safely. From looking at libnds's source code: static inline /*! \brief Sets the background priority \param id background id returned from bgInit or bgInitSub \param priority background priority (0-3), higher level priority will result in background rendering on top of lower level */ void bgSetPriority(int id, unsigned int priority) { sassert(priority < 4, "Priority must be less than 4"); *bgControl[id] &= ~ 3; *bgControl[id] |= priority; } So it's writing directly to the BG registers, using bgControl which contains an array of all the 8 BG control registers. I don't know about the assert, it might cause problems... |
Pages: 1