Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EE 2.7] Adding a "Primitive" Minimap


Braiton
 Share

Recommended Posts

  • 4 months later...
  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

@xppxdd:

> well… its looks really bad in game its not so clear and its big....

You can change the size, read the tutorial.

It's not supposed to be clear, if it was it would give too much of an advantage. I don't think he is still here, so if you have any problems, you will have to fix them yourself.
Link to comment
Share on other sites

  • 3 weeks later...
hello everyone i tryd to put it into a EE and a E-Stable source compiling works without problems but than i typ in /minimap nothing happens i remade it 2 times but it still not works.
does anyone have it for E-Stable working?

Edit: Never mind fixed it.
Link to comment
Share on other sites

  • 5 months later...
Where i must paste this??

```
'Modified to work with EE by Braiton
Sub BltMiniMap()
Dim I As Long
Dim x As Integer
Dim y As Integer
Dim MMx As Long
Dim MMy As Integer

    ' Tiles Layer
    ' Select MM Tile to Use for Tiles Layer
    rec.Top = 8
    rec.Bottom = 16
    rec.Left = 0
    rec.right = 8

    For y = 0 To MAX_MAPY
        For x = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(x, y).Type = TILE_TYPE_BLOCKED Then
                MMx = 400 + (x * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next x
    Next y

    ' Player Layer
    ' Select MM Tile to Use for Players Layer
    rec.Top = 16
    rec.Bottom = 24
    rec.Left = 0
    rec.right = 8

    For I = 1 To MAX_PLAYERS
        If Player(I).Map = Player(MyIndex).Map Then
            x = Player(I).x
            y = Player(I).y
            MMx = 400 + (x * 8)
            MMy = 32 + (y * 8)
            If Not I = MyIndex Then
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        End If
    Next I

    ' MyPlayer Layer
    rec.Top = 32
    rec.Bottom = 40
    rec.Left = 0
    rec.right = 8
    x = Player(MyIndex).x
    y = Player(MyIndex).y
    MMx = 400 + (x * 8)
    MMy = 32 + (y * 8)
    Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

    ' NPC Layer
    ' Select the MM Tile to use for the NPC Layer
    rec.Top = 24
    rec.Bottom = 32
    rec.Left = 0
    rec.right = 8

    For I = 1 To MAX_MAP_NPCS
        If MapNpc(I).num > 0 Then
            x = MapNpc(I).x
            y = MapNpc(I).y
            MMx = 400 + (x * 8)
            MMy = 32 + (y * 8)
            Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Next I

    'Shops (Thanks to NexSteve)
    rec.Top = 40
    rec.Bottom = 48
    rec.Left = 0
    rec.right = 8
    For y = 0 To MAX_MAPY
        For x = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(x, y).Type = TILE_TYPE_SHOP Then
                MMx = 400 + (x * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next x
    Next y

    'Walkable tiles (Thanks to Me)

    rec.Top = 48
    rec.Bottom = 56
    rec.Left = 0
    rec.right = 8

    For y = 0 To MAX_MAPY
        For x = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(x, y).Type = TILE_TYPE_WALKABLE Then
                MMx = 400 + (x * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next x
    Next y

    'Warps (Thanks to Me)

    rec.Top = 56
    rec.Bottom = 64
    rec.Left = 0
    rec.right = 8

    For y = 0 To MAX_MAPY
        For x = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(x, y).Type = TILE_TYPE_WARP Then
                MMx = 400 + (x * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next x
    Next y

'Dropped item (Thanks to Aranshada)

    rec.Top = 64
    rec.Bottom = 72
    rec.Left = 0
    rec.right = 8

    For I = 1 To MAX_MAP_ITEMS
        If MapItem(I).num > 0 Then
            x = MapItem(I).x
            y = MapItem(I).y
            MMx = 400 + (x * 8)
            MMy = 32 + (y * 8)
            Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Next I

    ' PKers(Thanks to me)
    rec.Top = 104
    rec.Bottom = 112
    rec.Left = 0
    rec.right = 8

    For I = 1 To MAX_PLAYERS
        If Player(I).Map = Player(MyIndex).Map Then
            If Player(I).PK = YES Then
                x = Player(I).x
                y = Player(I).y
                MMx = 400 + (x * 8)
                MMy = 32 + (y * 8)
                If Not I = MyIndex Then
                    Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
                End If
            End If
        End If
    Next I

'Signs (Thanks to Braiton)

    rec.Top = 112
    rec.Bottom = 120
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_SIGN Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

            'Key Doors (Thanks to Braiton)

    rec.Top = 120
    rec.Bottom = 128
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_KEY Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                'Doors (Thanks to Braiton)

    rec.Top = 128
    rec.Bottom = 136
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_DOOR Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                    'Scripted Tile (Thanks to Braiton)

    rec.Top = 136
    rec.Bottom = 144
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_SCRIPTED Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                        'Bank (Thanks to Braiton)

    rec.Top = 144
    rec.Bottom = 152
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_BANK Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                            'Heal (Thanks to Braiton)

    rec.Top = 152
    rec.Bottom = 160
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_HEAL Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                                'Notice (Thanks to Braiton)

    rec.Top = 160
    rec.Bottom = 168
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_NOTICE Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                                    'Arena (Thanks to Braiton)

    rec.Top = 168
    rec.Bottom = 176
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_ARENA Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                                        'Player House (Thanks to Braiton)

    rec.Top = 176
    rec.Bottom = 184
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_HOUSE Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

                                            'Grapple (Thanks to Braiton)

    rec.Top = 184
    rec.Bottom = 192
    rec.Left = 0
    rec.Right = 8

    For y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            If Map(Player(MyIndex).Map).Tile(X, y).Type = TILE_TYPE_HOOKSHOT Then
                MMx = 400 + (X * 8)
                MMy = 32 + (y * 8)
                Call DD_BackBuffer.BltFast(MMx, MMy, DD_MiniMap, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        Next X
    Next y

End Sub
```
Link to comment
Share on other sites

i must create something in frmMirage? but.. if i write /minimap…. nothing.. 0...i did it what tutorial say but idk where is problem
Link to comment
Share on other sites

have you followed the tutorial exactly… not just C&P everything but actually read through the tutorial....

if you did you'd know you dont have to create anything in frmmirage.

Also, did you download the Template.bmp, rename it to Minimap.bmp and bang it into your GFX folder?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...