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
 

Kiiro_Yakumo

Kitsune
Member
Joined
Apr 14, 2009
Messages
399
Trophies
1
Location
Gensokyo
Website
clash-of-gods.netau.net
XP
391
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
  • K3Nv2 @ K3Nv2:
    I'd rather spend like $15 more for double
    +1
  • K3Nv2 @ K3Nv2:
    Lol hogwarts legacy has a Arachnophobia setting to turn on
  • BigOnYa @ BigOnYa:
    I'd rather spend like $150 more for a surround receiver.
  • K3Nv2 @ K3Nv2:
    I bought the game at launch never fucked with it until recently
  • BigOnYa @ BigOnYa:
    Its fun, I like it, even tho I'm not a big harry potter fan. Like a wizard rpg. Flying around on a broomstick is cool.
  • K3Nv2 @ K3Nv2:
    Flying sucks ass on it
  • BigOnYa @ BigOnYa:
    Nuh just takes a min to get used to. I think you can upgrade or buy new broomstick also that are better.
    +1
  • K3Nv2 @ K3Nv2:
    I weirdly like inverted controls on all flying type games
  • BigOnYa @ BigOnYa:
    Prob can change it, inverted flying controls.
  • K3Nv2 @ K3Nv2:
    Only thing that annoys me is trying to find wtf to do in it
    +1
  • BigOnYa @ BigOnYa:
    Alright off to the store, later gators.
    +1
  • K3Nv2 @ K3Nv2:
    Some places amaze me were not in network with your insurance would you still like an appointment
    +1
  • AncientBoi @ AncientBoi:
    uhhh, I think I'll just stick with my PSP 3001
  • AncientBoi @ AncientBoi:
    lol, Now I gotta go to the store for more Coffee Mate n other stuff.
  • Xdqwerty @ Xdqwerty:
    i downloaded final fantasy vii into my tv stick
  • Xdqwerty @ Xdqwerty:
    i mean, the game was already there but its the japanese version
  • Xdqwerty @ Xdqwerty:
    and i only downloaded disc 1 so far bc of storage stuff
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, yeah the patty on McDs burger is 1/10th of a pound now and I think that's the pre cooked weight lol
  • Psionic Roshambo @ Psionic Roshambo:
    I use the app for the 20% off coupon and it's still over priced
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, why is mcdonalds overpriced if their food is bad?
  • Xdqwerty @ Xdqwerty:
    i mean why is mcdonalds food overpriced
  • Psionic Roshambo @ Psionic Roshambo:
    Inflation and greed
    Psionic Roshambo @ Psionic Roshambo: Inflation and greed