Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 7:15 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: RM** Sprites Converter
PostPosted: Sat Aug 22, 2009 8:33 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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)


Attachments:
ImgSplitterv2_Source.rar [30.46 KiB]
Downloaded 377 times

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image
Top
 Profile  
 
PostPosted: Fri Aug 28, 2009 7:49 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
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 >.>


Top
 Profile  
 
PostPosted: Fri Aug 28, 2009 7:54 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
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. ;)


Top
 Profile  
 
PostPosted: Fri Aug 28, 2009 10:07 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
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. :P


Top
 Profile  
 
PostPosted: Mon Sep 28, 2009 7:35 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
It only converts 3 directions for RMVX and it puts the up view last instead of first. Lol.

Other than that, it works.


Top
 Profile  
 
PostPosted: Mon Sep 28, 2009 8:06 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Last edited by GIAKEN on Mon Sep 28, 2009 8:35 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Sep 28, 2009 8:35 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
A fix :P

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

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Sep 29, 2009 9:22 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Here is a mega update :P This supports converting RM2K sprite sheets into MS format sprites. Here's an example RM2K sprite sheet:

Attachment:
chara01_a.png
chara01_a.png [ 27.79 KiB | Viewed 5324 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.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Thu Nov 18, 2021 3:18 am 
Offline
Knowledgeable

Joined: Tue Apr 13, 2021 7:14 am
Posts: 257
Jordans 4
Jordan Retro 4
Jordan Shoes
Travis Scott Jordan 1
Yeezy Shoes
Yeezy Supply
Air Jordans
Jordan 11s
Jordan 11
Jordans Shoes
Moncler Outlet
Off-White
Yeezy 450
Yeezy 500
Yeezy
Yeezy 700
Yeezy Supply
Off White Shoes
NFL Jerseys
Retro Jordans
Moncler Jackets
Nike Air Jordan
Jordan Shoes
Jordans Shoes
Yeezy 350 V2
Adidas Yeezy
Yeezy
Yeezy 700
Yeezy
Nike Outlet
Yeezy Shoes
Yeezy Foam Runner
Nike Outlet
Nike Outlet
AJ1
UNC Jordan 1
Jordan 13
Jordan AJ 1
Yeezy Supply
Yeezy Zebra
Jordan 5
Jordan 1 Low
Air Jordans
Pandora Charms
Adidas UK
Nike Store
Adidas Yeezy Official Website
Yeezy 350
Jordan 1
Nike Outlet
YEEZY SUPPLY
Nike Shoes
Nike Outlet
Pandora Outlet
Jordan Shoes
Air Jordan 4
Pandora Jewelry
Pandora Bracelets
Adidas Yeezy
Yeezy
Pandora Charms
Nike Outlet
Adidas Yeezy
Air Max 720
Air Jordan 1
Nike Jordans
Jordan 1s
Pandora UK
Nike Jordan 1
Jordan 1
Yeezy Slides
Nike Air VaporMax
Nike Vapormax Flyknit
Air Jordan 1 Mid
Adidas yeezy
Yeezy 350
Nike Shoes
Nike Outlet
Yeezy
NFL Shop Official Online Store
Nike UK
Yeezy
Yeezy 350

_________________
https://www.pandoras-jewelry.com/ Pandora Jewelry
https://www.pandoraoutlet.org/ Pandora Outlet
https://www.jordanshoess.com/ Jordan Shoes
https://www.air-jordan4.com/ Air Jordan 4
https://www.charms-pandora.com/ Pandora Charms


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group