Mirage Source http://www.miragesource.net/forums/ |
|
RM** Sprites Converter http://www.miragesource.net/forums/viewtopic.php?f=143&t=6160 |
Page 1 of 1 |
Author: | GIAKEN [ Sat Aug 22, 2009 8:33 am ] | ||
Post subject: | RM** Sprites Converter | ||
This will convert RMXP, RMVX, whatever sprites to the single row set up. (RM** has 4 row set up, this converts to single row for use with MS type engines) This is a modification of my modification of Tony's Image Splitter. (my original modification was splitting a huge sprite sheet into separate files)
|
Author: | KruSuPhy [ Fri Aug 28, 2009 7:49 pm ] |
Post subject: | Re: RM** Sprites Converter |
Do one that splits individual squares(for something like an item sheet) Or do something that lets the user specify what and where it needs to be cut >.> |
Author: | Matt [ Fri Aug 28, 2009 7:54 pm ] |
Post subject: | Re: RM** Sprites Converter |
KruSuPhy wrote: Do one that splits individual squares(for something like an item sheet) Or do something that lets the user specify what and where it needs to be cut >.> I'm sure he meant to say please, instead of sounding so demanding. |
Author: | KruSuPhy [ Fri Aug 28, 2009 10:07 pm ] |
Post subject: | Re: RM** Sprites Converter |
I didn't mean to sound demanding, It was more of a suggestion =P I'm not trying to ask him to do that, It was more of a, "hey, if you do that I'll give you major props and use it like a boss. But if you don't, Meh." thing. |
Author: | Matt [ Mon Sep 28, 2009 7:35 pm ] |
Post subject: | Re: RM** Sprites Converter |
It only converts 3 directions for RMVX and it puts the up view last instead of first. Lol. Other than that, it works. |
Author: | GIAKEN [ Mon Sep 28, 2009 8:06 pm ] |
Post subject: | Re: RM** Sprites Converter |
Replace Sub SplitImage with this: Code: Sub SplitImage()
Dim i As Long Dim Placehere(0 To 3) As Byte frmMain.picConversion.Width = (frmMain.picImage.ScaleWidth * 4) * Screen.TwipsPerPixelX frmMain.picConversion.Height = Val(frmMain.txtSizeY) * Screen.TwipsPerPixelY Placehere(0) = 1 Placehere(1) = 2 Placehere(2) = 3 Placehere(3) = 0 For i = 0 To 3 '((frmMain.picImage.ScaleHeight) / Val(frmMain.txtSizeY)) - 1 BitBlt frmMain.picConversion.hDC, (frmMain.txtFrames * frmMain.txtSizeX) * Placehere(i), 0, frmMain.picImage.ScaleWidth, Val(frmMain.txtSizeY), frmMain.picImage.hDC, 0, i * Val(frmMain.txtSizeY), vbSrcCopy Next TotalSpritesSaved = TotalSpritesSaved + 1 SavePicture frmMain.picConversion.Image, App.Path & "\Splitted Images\sprite" & TotalSpritesSaved & Extension AddToLog "sprite" & TotalSpritesSaved & Extension & " saved. Conversion finished!" End Sub |
Author: | GIAKEN [ Mon Sep 28, 2009 8:35 pm ] |
Post subject: | Re: RM** Sprites Converter |
A fix Code: Sub SplitImage()
Dim i As Long Dim Placehere(0 To 3) As Byte frmMain.picConversion.Width = (frmMain.picImage.ScaleWidth * 4) * Screen.TwipsPerPixelX frmMain.picConversion.Height = Val(frmMain.txtSizeY) * Screen.TwipsPerPixelY Placehere(0) = 1 Placehere(1) = 2 Placehere(2) = 3 Placehere(3) = 0 For i = 0 To 3 '((frmMain.picImage.ScaleHeight) / Val(frmMain.txtSizeY)) - 1 BitBlt frmMain.picConversion.hDC, (frmMain.txtFrames * frmMain.txtSizeX) * Placehere(i), 0, frmMain.picImage.ScaleWidth, Val(frmMain.txtSizeY), frmMain.picImage.hDC, 0, i * Val(frmMain.txtSizeY), vbSrcCopy Next TotalSpritesSaved = TotalSpritesSaved + 1 SavePicture frmMain.picConversion.Image, App.Path & "\Splitted Images\sprite" & TotalSpritesSaved & Extension AddToLog "sprite" & TotalSpritesSaved & Extension & " saved. Conversion finished!" End Sub |
Author: | GIAKEN [ Tue Sep 29, 2009 9:22 pm ] |
Post subject: | Re: RM** Sprites Converter |
Here is a mega update This supports converting RM2K sprite sheets into MS format sprites. Here's an example RM2K sprite sheet: Attachment: chara01_a.png [ 27.79 KiB | Viewed 5412 times ] And here is the code (replace Sub SplitImage with this): Code: Sub SplitImage() Dim i As Long Dim x As Long Dim y As Long frmMain.picConversion.Width = ((Val(frmMain.txtFrames) * Val(frmMain.txtSizeX)) * 4) * Screen.TwipsPerPixelX frmMain.picConversion.Height = Val(frmMain.txtSizeY) * Screen.TwipsPerPixelY For x = 0 To 3 For y = 0 To 1 For i = 0 To 3 BitBlt frmMain.picConversion.hDC, _ ((frmMain.txtFrames * frmMain.txtSizeX) * i), _ 0, _ frmMain.picImage.ScaleWidth, _ Val(frmMain.txtSizeY), _ frmMain.picImage.hDC, _ x * (frmMain.picConversion.ScaleWidth / 4), _ i * Val(frmMain.txtSizeY) + (y * (frmMain.txtSizeY * 4)), _ vbSrcCopy Next TotalSpritesSaved = TotalSpritesSaved + 1 SavePicture frmMain.picConversion.Image, App.Path & "\Splitted Images\sprite" & TotalSpritesSaved & Extension AddToLog "sprite" & TotalSpritesSaved & Extension & " saved." frmMain.picConversion.Cls Next Next End Sub Also don't forget to put size X as 48 and size Y as 64. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |