Homebrew Change size of 32x32 Sprite?

Ray =D

Well-Known Member
OP
Member
Joined
May 17, 2011
Messages
288
Trophies
0
Website
www.youtube.com
XP
143
Country
Gambia, The
Hey!
I want to ask if its possible to scale sprites in DS Homebrews. I want to resize my 32x32 sprite to 16x16. And I'm using libnds.
I hope someone can help me :D
 

LeRodeur

Well-Known Member
Member
Joined
Dec 12, 2009
Messages
162
Trophies
0
Age
31
XP
200
Country
France
Hey!
I want to ask if its possible to scale sprites in DS Homebrews. I want to resize my 32x32 sprite to 16x16. And I'm using libnds.
I hope someone can help me :D
Maybe using a buffer and doing something like
For (i=0;i
 

Ray =D

Well-Known Member
OP
Member
Joined
May 17, 2011
Messages
288
Trophies
0
Website
www.youtube.com
XP
143
Country
Gambia, The
Hmm... I have no gbatek examples :D Only the libnds examples. But there is a demo which shows scaling. The problem is, it shows scaling with BG's. Is it possible with sprites, too? :P *Sounds like a noob xD*
 

CoolAs

Well-Known Member
Newcomer
Joined
Oct 21, 2011
Messages
75
Trophies
0
XP
109
Country
Can you tell me what you need this for?

Scaling sprites is something that you can not do with hardware and you can not easily do it with software...

But yeah, the way thatLeRodeur said would be the easiest. (but it does not blend the colours properly)
Although you could use the 3D engine, but if you do that then I can not help you as I have never used that part of the DS properly...
 

Schmendrick

Well-Known Member
Newcomer
Joined
Sep 12, 2009
Messages
55
Trophies
0
Website
www.dennisvanzwieten.com
XP
166
Country
Netherlands
If you wish to use the 3D engine, take a look at relminator's Easy GL2D lib (http://forum.gbadev.org/viewtopic.php?t=17417). It's easy enough to use, very tiny and allows you to do a ton of things with sprites. It also comes with examples.
 

huiminghao

Well-Known Member
Member
Joined
Mar 6, 2011
Messages
175
Trophies
0
Website
Visit site
XP
96
Country
Switzerland
This answer is yes, but the scale function is limited.
Take a look at http://nocash.emubase.de/gbatek.htm#lcdobjoamattributes

with the reg of OBJ Attribute 0 (R/W)
you should enable the Rotation/Scaling Flag
with the reg of OBJ Attribute 1 (R/W)
you should set a number 0~31 for bit 9-13, which determines the 'Scaling Parameters'

for the 'Scaling Parameters', here is the description:
Location of Rotation/Scaling Parameters in OAM
Four 16bit parameters (PA,PB,PC,PD) are required to define a complete group of Rotation/Scaling data. These are spread across OAM as such:

1st Group - PA=07000006, PB=0700000E, PC=07000016, PD=0700001E
2nd Group - PA=07000026, PB=0700002E, PC=07000036, PD=0700003E


You should check the BG scaling for the meanings of PA,PB,PC,PD.
e.g. if PA=0x100, PB=0, PC=0, PD=0x100, the picture shows what it is.
if PA=0x80, PB=0, PC=0, PD=0x80, the size of picture would be half of the original(32x32 -> 16x16)

So, there are only 32 scaling groups, that is what limited.
 

iDallin

Member
Newcomer
Joined
Jan 22, 2012
Messages
9
Trophies
0
XP
22
Country
United States
On paint copy the sprite , go to resize and pixels, it should say 32 by 32 change that to 16 by 16, I assume this is for the jazz jackrabbit game? Lol appreciate it
 

iSubaru

Kitsune
Member
Joined
Apr 14, 2009
Messages
391
Trophies
1
Location
Gensokyo
Website
clash-of-gods.netau.net
XP
373
Country
Poland
Bite me, Tileset for Jazz Jackrabbit fits into 32x32 and it can be left that way, the Jazz character is diffrent story, in some cases it fits in 32x32 but in some others You must use 64x64 or 64x32 or 32x64 OR cut/resize/scale/whatever-that-breaks-img-awesomeness
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @AncientBoi, https://www.youtube.com/watch?v=7jUWpmU-X8k