Option
Explicit
Private
sName As String
Private
sDescription As String
'Map
width and height
Private
iMapWidth As Integer
Private
iMapHeight As Integer
'Set by
LoadMap function - Read only
Private
iNumRooms As Integer
'Turn
this into a trigger manager
'Use
API with callback?
'Private
WithEvents objTimer As Timer
Private
Tiles() As New clsTile
Public
Property Let MapHeight(ByVal iData As Integer)
iMapHeight = iData
End
Property
Public
Property Get MapHeight() As Integer
MapHeight = iMapHeight
End
Property
Public
Property Let MapWidth(ByVal iData As Integer)
iMapWidth = iData
End
Property
Public
Property Get MapWidth() As Integer
MapWidth = iMapWidth
End
Property
Public
Property Get MapName() As String
MapName = sName
End
Property
Public
Property Let MapName(ByVal sData As String)
sName = sData
End
Property
Public
Property Get Description() As String
Description = sDescription
End
Property
Public
Property Let Description(ByVal sData As String)
sDescription = sData
End
Property
Public
Function LoadMap(ByVal sFileName As String, pbStatus As Object) As Boolean
'To be filled in during a later tutorial
End
Function
Public
Function SaveMap(ByVal sFileName As String) As Boolean
'To be filled in during a later tutorial
End
Function
Public
Sub Init()
'To be filled in during a later tutorial
End Sub
Public
Function GetTileID(ByVal iX As Integer, ByVal iY As Integer) As Integer
GetTileID = Tiles(iX, iY).TileID
End
Function
Public
Function SetTileID(ByVal iX As Integer, ByVal iY As Integer, ByVal iID As
Integer)
Tiles(iX, iY).TileID = iID
End
Function
Public
Sub SetTileArraySize(ByVal iX As Integer, ByVal iY As Integer)
ReDim Tiles(iX, iY)
End Sub
Public
Sub SetTileContentsType(ByVal iX As Integer, ByVal iY As Integer, ByVal iType
As Integer)
Tiles(iX, iY).ContentsType = iType
End Sub
Public
Sub SetTileContents(ByVal iX As Integer, ByVal iY As Integer, ByVal iContents
As Integer)
Tiles(iX, iY).Contents = iContents
End Sub
Public
Function GetTileContentsType(ByVal iX As Integer, ByVal iY As Integer) As
Integer
GetTileContentsType = Tiles(iX,
iY).ContentsType
End
Function
Public
Function GetTileContents(ByVal iX As Integer, ByVal iY As Integer) As Integer
GetTileContents = Tiles(iX, iY).Contents
End
Function
Public
Function GetTileAction(ByVal iX As Integer, ByVal iY As Integer) As clsAction
Set GetTileAction = Tiles(iX, iY).Action
End
Function
Public
Sub SetTileAction(ByVal iX As Integer, ByVal iY As Integer, objData As
clsAction)
Set Tiles(iX, iY).Action = objData
End Sub
Public
Function GetTileGraphic(ByVal iX As Integer, ByVal iY As Integer) As
DirectDrawSurface7
Set GetTileGraphic = Tiles(iX, iY).Texture
End
Function
Public
Function GetTile(ByVal iX As Integer, ByVal iY As Integer) As clsTile
Set GetTile = Tiles(iX, iY)
End
Function