Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RM** Sprites Converter
#1
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)
Reply
#2
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 >.>
Reply
#3
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. Wink
Reply
#4
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. Tongue
Reply
#5
It only converts 3 directions for RMVX and it puts the up view last instead of first. Lol.

Other than that, it works.
Reply
#6
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
Reply
#7
A fix Tongue

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
Reply
#8
Here is a mega update Tongue This supports converting RM2K sprite sheets into MS format sprites. Here's an example RM2K sprite sheet:

[ATTACHMENT NOT FOUND]

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)