Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2016-07-19 17:17:28

Cristi-Chan
New member
Registered: 2016-07-19
Post 1/3

Danny-E33's larger backsprite routine?

I began to hack a Pokémon Red ROM, and I wanted to have that routine. Where I can find it to install it?

Offline

#2 2016-07-20 02:22:07

Danny-E 33
Administrator
Registered: 2012-06-09
Post 964/1,190

Re: Danny-E33's larger backsprite routine?

Unfortunately, there is a not a single routine you can add that will allow for 48x48 back sprites, instead of the original 32x32.
There are a few routines that need slight modifications.

Specifically, there are three routines that all need to be modified
LoadMonBackPic at 0f:7103, for player's Pokemon back sprite in battle
LoadPlayerBackPic at 0f:6c92 for the player's back sprite in battle
and HoFLoadPlayerPics at 1c:433e for the player's back sprite in the Hall of Fame

You can read a lot of discussion on this problem here.

Are you hex editing your hack or are you using the disassembly?

Offline

#3 2016-07-21 21:53:35

Cristi-Chan
New member
Registered: 2016-07-19
Post 2/3

Re: Danny-E33's larger backsprite routine?

I'm using the disassembly.

Last edited by Cristi-Chan (2016-07-21 21:54:53)

Offline

#4 2016-07-22 04:49:19

Danny-E 33
Administrator
Registered: 2012-06-09
Post 965/1,190

Re: Danny-E33's larger backsprite routine?

I know the thread I linked you to is hard to read, because so much of it refers to addresses.

To make it simple, you have to make a very small function, called LoadBackSpriteUnzoomed, and in the three functions I mentioned above, replace the calls to ScaleSpriteByTwo and InterlaceMergeSpriteBuffers with a call to this new function.

In LoadBackSpriteUnzoomed, the routine ends by jumping into the middle of another function - the function used for loading front sprites, LoadMonFrontSprite.
You can do this by creating a new label in the middle of LoadMonFrontSprite, called LoadUncompressedBackSprite, and jump to that label at the end of LoadBackSpriteUnzoomed.

Here is what I mean. (of course, in LoadBackSpriteUnzoomed, use $66 (or whatever dimensions your back pics are) instead of $44 like I did in this example)

Offline

#5 2016-07-23 17:23:00

Cristi-Chan
New member
Registered: 2016-07-19
Post 3/3

Re: Danny-E33's larger backsprite routine?

I understad now. Thank you so much ^^

Offline

#6 2020-07-27 11:14:58

gordogozon
Member
Registered: 2020-05-25
Post 10/10

Re: Danny-E33's larger backsprite routine?

Hi! How are you!

I'm trying to implement this routine but I encountered some problems.

I tried to port all the steps:

I replaced the backpics with the 48 x 48 sprites from spaceworld,
Modified the basestats to replace the padding byte,
Modified UncompressMonSprite,
Moved some of the pics to new banks,
Changed the routines of LoadMonBackPic, LoadPlayerBackPic and HoFLoadPlayerPics ),
Added the LoadBackSpriteUnzoomed at the end of battle/core,

And finally created the label LoadUncompressedBackSprite: Here I got an error when compiling (main.asm(206) -> engine/battle/core.asm(7026): Unknown symbol "LoadUncompressedBackSprite"). I solved this ading another colon (LoadUncompressedBackSprite::) but I'm not sure if this solves the issue correctly.


For some reason when I compile the rom the game not recognizes the spaceworld sprites and shows the old 32x32 backsprites all jumbled. I'm confused. Why do this happen?

If i change the value of LoadBackSpriteUnzoomed from 66 to 44 the old sprites look normal but without the zooming.

If it helps I can post the code, I doublechecked it many times and think it's 1:1 with Danny's example.

Thank you! and take care!

EDIT:
I fixed it!

I had to delete all the related .pic and .2bpp files and compile again. After some more bank shuffling it worked!

Last edited by gordogozon (2020-07-28 08:30:26)

Offline

Board footer

Powered by FluxBB