Mirage Engine
Map Editor - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Map Editor (/showthread.php?tid=2166)



Map Editor - lalablah - 22-09-2008

well I know how to make the map editor bigger, but when i click a tile that was added by making the editor bigger. it sets the tile that it would be if the map editor wasnt expanded

what other codes do i have to add?


Re: Map Editor - Nean - 22-09-2008

I don't understand what you're asking. Please reiterate.


Re: Map Editor - Rian - 22-09-2008

There are a lot of 7's in your code that need to be changed to whatever the new width of your mapeditor is.


Next time, try to take a little more time to explain your problem thoroughly, and I'll take a little more time to explain the solution thoroughly.


Re: Map Editor - lalablah - 22-09-2008

ok sorry


Re: Map Editor - Rian - 22-09-2008

Eh, don't mind me. Been kinda pissy lately.

Anyhow,

If you take a look at Subs BltTile, BltFringe, BltMap (depending on which version of mirage you're using) read through those subs, and you should spot those 7s I was talking about. They deal with the width of the tilesets


Re: Map Editor - lalablah - 22-09-2008

Oh ok then, Thanks my whole game tileset kinda depended on this/that.


Re: Map Editor - Rian - 22-09-2008

Alright. Let us know if you can't get it figured out.


Re: Map Editor - lalablah - 22-09-2008

I changed all the 7's to 36's in blt tile and blt fringe now it wont let me click any tiles. I'll take another look but I think I messed it up further


Re: Map Editor - Rian - 22-09-2008

Your tile set is 36 tiles wide?


Re: Map Editor - lalablah - 22-09-2008

opps its 16


Re: Map Editor - Rian - 22-09-2008

Which version of Mirage are you using?


Re: Map Editor - lalablah - 22-09-2008

mse2


Re: Map Editor - Rian - 22-09-2008

Ah, okay. I'm not very familiar with MSE2, but for the problem you describe I don't think the solution should differ much from 3.0.3. If you're subs look like this, I'm fairly certain it should work. Maybe someone with more experience with MSE2 can verify?

Code:
Public Sub BltAnimations()
Dim rec As DXVBLib.RECT
Dim X As Byte, Y As Byte
    
    For X = 0 To MAX_MAPX
        For Y = 0 To MAX_MAPY
            With Map.Tile(X, Y)
                ' Is there an animation tile to plot?
                If .Anim > 0 Then
                    rec.Top = Int(.Anim / 16) * PIC_Y
                    rec.Bottom = rec.Top + PIC_Y
                    rec.Left = Int(.Anim Mod 16) * PIC_X
                    rec.Right = rec.Left + PIC_X
                    Call DD_MiddleBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
                End If
            End With
        Next Y
    Next X
End Sub

Code:
Public Sub BltMap()
Dim rec As DXVBLib.RECT
Dim X As Byte, Y As Byte
    
    With rec
        .Top = 0
        .Bottom = (MAX_MAPY + 1) * PIC_Y
        .Left = 0
        .Right = (MAX_MAPX + 1) * PIC_X
    End With
        
    ' clear buffers
    DD_LowerBuffer.BltColorFill rec, RGB(0, 0, 0)
    DD_UpperBuffer.BltColorFill rec, RGB(0, 0, 0)

    For X = 0 To MAX_MAPX
        For Y = 0 To MAX_MAPY
            With Map.Tile(X, Y)
                rec.Top = Int(.Ground / 16) * PIC_Y
                rec.Bottom = rec.Top + PIC_Y
                rec.Left = Int(.Ground Mod 16) * PIC_X
                rec.Right = rec.Left + PIC_X
                Call DD_LowerBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

                If .Mask > 0 And TempTile(X, Y).DoorOpen = NO Then
                    rec.Top = Int(.Mask / 16) * PIC_Y
                    rec.Bottom = rec.Top + PIC_Y
                    rec.Left = Int(.Mask Mod 16) * PIC_X
                    rec.Right = rec.Left + PIC_X
                    Call DD_LowerBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
                End If
                If .Fringe > 0 Then
                    rec.Top = Int(.Fringe / 16) * PIC_Y
                    rec.Bottom = rec.Top + PIC_Y
                    rec.Left = Int(.Fringe Mod 16) * PIC_X
                    rec.Right = rec.Left + PIC_X
                    Call DD_UpperBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
                End If
            End With
        Next Y
    Next X



Re: Map Editor - lalablah - 22-09-2008

why don't I just download ms3? if its released. ots not like I've added anything important


Re: Map Editor - Rian - 22-09-2008

MS4 would be the best to use. It's programmed very well. Only thing is, it's still kind of in development.


Re: Map Editor - lalablah - 22-09-2008

Yea, I see.