Thursday, 08 January 2009
 
  Home arrow Forum  
Main Menu
Home
News
Forum
Documentation
Download
Links
Administrator
Login Form
Welcome, Guest. Please login or register.
January 08, 2009, 07:16:07 AM
Username: Password:
Login with username, password and session length

Forgot your password?
Images and Sounds
DSLua Community
Welcome, Guest. Please login or register.
January 08, 2009, 07:16:07 AM
1724 Posts in 316 Topics by 10247 Members
Latest Member: Samnmoora
DSLua Community  |  DSLua - Best scripting language for Nintendo DS  |  Need Help?  |  Images and Sounds « previous next »
Pages: [1]
Author Topic: Images and Sounds  (Read 1218 times)
Öhr GmbH
Waxing Crescent
**
Posts: 64


« on: April 30, 2006, 07:01:04 PM »

Hi!
my next post after a while is a question Shocked

how do i convert bitmaps and sounds with the gfx2gba.exe and the .bats?
im sooo stupid, but i really dont know how i do this Embarrassed
please give me a detailed step by step guide Roll Eyes
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #1 on: April 30, 2006, 10:02:02 PM »

Sorry for the lack of documentations, here are some quick instructions.  I usually tweak the .bat files so DOS can find my gfx2gba.exe

For sprites, make sure all the animation frames are in a vertical stripe.  Make sure the width of the bmp is the width of your sprite, and the height is a multiple of your sprite's height.  Check out explosion.bmp in the scripts directory for an example.  Then I just run the following on a DOS command line.  You should end up with 3 files (the original .bmp file, a .pal for palette and a .raw cotanining the sprite graphics data).
Code:
gfx2gba -p explosion.bmp.pal -t8 explosion.bmp

For tiled maps, you just create a bitmap of your map/background.  Check out map_examplescrn.bmp in the scripts directory for an example.  Then I just run the following on a DOS command line.  You should end up with 4 files (the original .bmp file, a .pal for palette, a .raw cotanining the tile graphics data, and a .map file containing the "map" of your background).  You might want to check mappy for creating maps (then export as bmp).
Code:
gfx2gba -m -p map_examplescrn.bmp.pal -t8 map_examplescrn.bmp

I didn't include any tools to do the sound convertions.  I've been pointing people to the PALib - Sound tutorial for some tools/instructions.

Have fun!
Waruwaru
Logged
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #2 on: May 01, 2006, 06:06:49 AM »

thx first, but where do i have to put the .bmp to convert them if i use the bat?

EDIT: GOTCHA! did it Grin
« Last Edit: May 01, 2006, 06:25:09 AM by Öhr GmbH » Logged
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #3 on: May 01, 2006, 09:22:49 AM »

My image is messed up Cry why?
i converted a 8-bit, saved with paint, 256x192 pixel image, but its totally messed up with dslua. why?
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #4 on: May 01, 2006, 11:12:43 AM »

My image is messed up Cry why?
i converted a 8-bit, saved with paint, 256x192 pixel image, but its totally messed up with dslua. why?

Without seeing your code/bmp/raw/pal file, it's hard to know.  I am assuming you are making a tiled backgrounds?  Can you see me what you mean when you say it's messed up?

Thanks,
Waruwaru
Logged
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #5 on: May 01, 2006, 12:58:30 PM »

Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #6 on: May 01, 2006, 02:04:22 PM »

Please zip up your code and resources and attach it.  Looks like vram memory corrupt to me.

Thanks,
Waruwaru
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #7 on: May 01, 2006, 05:29:55 PM »

Ah, just got your files, change your LoadMap line (#9?) to
Code:
BGBottomMap:LoadMap( "Images/intro.map", ( 256 / 8 ), ( 192 / 8 ) )

The width/height are not in pixel units, they represent how many tiles are horizontally/vertically.

Btw, be sure to free and delete your sounds/backgrounds when you are done (at the end of your script) to clean up properly.

Thanks!
Waruwaru
Logged
daltonlaffs
Waxing Gibbous
****
Posts: 340


Freaking Insane


WWW
« Reply #8 on: May 01, 2006, 06:02:42 PM »

Whoa... Ohr Gmbh actually asked for help!  Shocked
Logged

Code:
-- Bored? Read code line below.
-- Bored? Read code line above.



^^ That works, I SWEAR! ^^
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #9 on: May 02, 2006, 12:44:21 AM »

i asked waruwaru a lot of things
no one is perfekt Grin


EDIT: thanks waruwaru. now it works, but i still have too fast playback on nds Undecided
its at 2x speed, but i dont know why Cry

EDIT2: yay did it! i dont know what was wrong, but now it works Cheesy
« Last Edit: May 02, 2006, 09:06:49 AM by Öhr GmbH » Logged
Pages: [1]
« previous next »
    Jump to:  



    (C) 2009 DSLua

    DSLua - Best scripting language for Nintendo DS home-brew!