Attribute VB_Name = "modSaveEsceba"
Option Explicit



Public Sub SetCordGamePic(Pcord As TPosicionRC, picUso As PictureBox)
Dim i As Integer
Dim MaxCol As Integer
Dim MaxRen As Integer
Dim r As Integer
Dim c As Integer
Dim NumeroFoto As Integer
Dim strFoto As String


    'mObjGame.objEscenaV.ArrEscena(i).ArrLineas()
    'MaxCol = 21 - 1
    'MaxRen = 16 - 1
    
    MaxCol = mObjEscenasVarias.objPantalla.NumPanCol
    MaxRen = mObjEscenasVarias.objPantalla.NumPanRen
    
    c = Pcord.c
    r = Pcord.r
    
    
    If picUso.Tag <> "" Then
            If c >= 0 And c <= MaxCol Then
                If r >= 0 And r <= MaxRen Then
                   
                    NumeroFoto = Format(picUso.Tag, "000")
                    strFoto = Format(picUso.Tag, "000")
                    'NumeroFoto = RegresaNumeroArr(picOpen2.ScaleWidth / 32, picOpen2.ScaleHeight / 32, picUso.Tag)
                    'cuadro/PisoFijo/Plantas/ParedFija/Adorno/Pasadizo/fondo"
                    
                    'marrEsquema(mescena, A, 15) = mescena
                    'marrEsquema(mescena, A, B) = NumeroFoto
                    
                    MGameChRun.ArrRenColLineaBi(r, c).c = c
                    MGameChRun.ArrRenColLineaBi(r, c).r = r
                    MGameChRun.ArrRenColLineaBi(r, c).NamePic = strFoto
                    
                    Debug.Print "r=" & r & "c=" & c
                End If
            End If
        End If
End Sub

Public Function MostrarEscenaGameChRunVert() As String
Dim strlinea As String
Dim r As Integer
Dim c As Integer
Dim MaxR As Integer
Dim MaxC As Integer
Dim strtmp As String
Dim strNamePic As String

    
    MaxR = mObjMapa.NumRenMapa - 1
    MaxC = mObjMapa.NumColMapa - 1
    
    strlinea = ""
    For r = 0 To MaxR
        For c = 0 To MaxC
            strNamePic = MGameChRun.ArrRenColLineaBi(r, c).NamePic
            strlinea = strlinea & strNamePic & ","
        Next
        strlinea = strlinea & ";" & r + 1 & vbNewLine
    Next
    
    MostrarEscenaGameChRunVert = strlinea
End Function


