Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2016-09-19 20:18:54

Nic7C5
Member
From: Germany
Registered: 2012-10-13
Post 49/54

Pokered sprite dimensions

The dimensions of a sprite are refered to in the basestats of each Pokémon, i.e. 5 by 5 tiles for abra.  When replacing the png-file with a 7 by 7 tile picture and making no alterations in the basestats.asm-file, pokered.gbc is put together without any errors  and the larger sprite can be loaded correctly. Do I really need the info (in the basestat-file)  in the first place or are the dimensions of each *.PNG to be included evaluated at some point of the reassembly routine?

Offline

#2 2016-09-21 14:16:57

Danny-E 33
Administrator
Registered: 2012-06-09
Post 982/1,205

Re: Pokered sprite dimensions

The dimensions of the pic are included as the first byte (55, 66, 77) of the compressed pic in the game's compression format. Although, this byte is rarely (or never?) used by the game.
Like you said, the dimensions are grabbed from the base stats rather than grabbed from the first byte of the pic.

To make this easier, we edited the base stats files to dump the first byte of the pic file.
In the example of Abra, data/baseStats/abra.asm includes this line:
INCBIN "pic/bmon/abra.pic",0,1 ; 55, sprite dimensions

This way, if you replace the Abra pic and give it new dimensions, the base stats file will be correctly updated.

Offline

#3 2022-01-09 03:01:43

ChickenMan1231
Member
From: Canada
Registered: 2019-12-05
Post 16/20

Re: Pokered sprite dimensions

Maybe it's cause I'm doin somethin wrong, but I don't see any information about sprite dimensions in the base stats files

Can someone please help me to resize sprites

Offline

#4 2022-01-10 05:17:20

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,202/1,205

Re: Pokered sprite dimensions

Assuming that you are using modern pokered, the dimensions are not specified explicitly in the base stats file.
Instead the dimensions are extracted from the pokemon's pic file directly:

INCBIN "gfx/pokemon/front/abra.pic", 0, 1 ; sprite dimensions

(the `0, 1` means extract just the first byte from the file - not the whole file.)
So, if you replace replace a pic with a pic of different dimensions, the base stats will be updated automatically.

Offline

#5 2022-01-10 17:07:00

ChickenMan1231
Member
From: Canada
Registered: 2019-12-05
Post 17/20

Re: Pokered sprite dimensions

I'm still kinda unsure of how to do this tbh. I don't know how to change pic files

Sorry, I know I've probably bothered you alot already with these questions, and i know they probably have simple solutions, I'm just new to doing this stuff so I still get very lost and confused easily

Offline

#6 2022-01-10 18:43:25

nightbringer
Member
Registered: 2021-08-18
Post 18/21

Re: Pokered sprite dimensions

ChickenMan, maybe your question is about how to use an image editor, like Photoshop, gimp, paint.net, MS paint etc to open a sprite file and change its dimensions?

Offline

#7 2022-01-10 22:12:47

ChickenMan1231
Member
From: Canada
Registered: 2019-12-05
Post 18/20

Re: Pokered sprite dimensions

Oh, wait. It's just resizin it in MS paint???

Lmao i thought it would be alot more complicated and would require downloading something,
Since i already tried MS paint to change the sprite dimensions but it gave an error.

Guess I'm still doin somethin wrong. Sorry.

Offline

#8 2022-01-10 22:18:35

nightbringer
Member
Registered: 2021-08-18
Post 19/21

Re: Pokered sprite dimensions

What was the error you got?

Offline

#9 2022-01-11 02:46:18

ChickenMan1231
Member
From: Canada
Registered: 2019-12-05
Post 19/20

Re: Pokered sprite dimensions

error: layout.link(82): Sections would extend past the end of ROMX ($8031 > $7fff)
make: *** [Makefile:108: pokered.gbc] Error 1

Offline

#10 2022-01-11 05:16:10

nightbringer
Member
Registered: 2021-08-18
Post 20/21

Re: Pokered sprite dimensions

So it looks like the problem is not the image's dimensions per se. It is that an image with increased dimensions carries more data. And the ROM does not have enough space to include all the data of the image you're trying to feed it.

Last edited by nightbringer (2022-01-11 05:17:17)

Offline

Board footer

Powered by FluxBB