Skip to content

Commit

Permalink
0.7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Buizz committed Aug 28, 2019
1 parent fe5930b commit 1b8072a
Show file tree
Hide file tree
Showing 36 changed files with 1,823 additions and 167 deletions.
16 changes: 11 additions & 5 deletions EUD Editor 3/Class/BulidData/WriteDatFile.vb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ Partial Public Class BuildData

'와이어프레임, 버튼셋, 요구사항, 상태플래그
WriteWireFrame(sb)
WriteStatusInfor(sb)
Try
WriteStatusInfor(sb)
Catch ex As Exception
Tool.ErrorMsgBox(Tool.GetText("Error WriteStatusInfor"), ex.ToString)
End Try
WriteButtonSet(sb)
sb.AppendLine(" inputData = open('" & Tool.GetRelativePath(EdsFilePath, requireFilePath).Replace("\", "/") & "', 'rb').read()")
sb.AppendLine(" inputData_db = Db(inputData)")
Expand Down Expand Up @@ -189,7 +193,7 @@ Partial Public Class BuildData


If checkflag Then
Dim memStream As MemoryStream
Dim memStream As FileStream
Dim binaryReader As BinaryReader
Dim binaryWriter As BinaryWriter

Expand All @@ -199,7 +203,9 @@ Partial Public Class BuildData

'#########################################################################################

memStream = New MemoryStream(Tool.LoadDataFromMPQ("unit\wirefram\wirefram.grp"))


memStream = New FileStream(Tool.DataPath("wirefram.grp"), FileMode.Open)
binaryReader = New BinaryReader(memStream)
binaryWriter = New BinaryWriter(memStream)

Expand Down Expand Up @@ -238,7 +244,7 @@ Partial Public Class BuildData

'#########################################################################################

memStream = New MemoryStream(Tool.LoadDataFromMPQ("unit\wirefram\grpwire.grp"))
memStream = New FileStream(Tool.DataPath("grpwire.grp"), FileMode.Open)
binaryReader = New BinaryReader(memStream)
binaryWriter = New BinaryWriter(memStream)

Expand Down Expand Up @@ -278,7 +284,7 @@ Partial Public Class BuildData

'#########################################################################################

memStream = New MemoryStream(Tool.LoadDataFromMPQ("unit\wirefram\tranwire.grp"))
memStream = New FileStream(Tool.DataPath("tranwire.grp"), FileMode.Open)
binaryReader = New BinaryReader(memStream)
binaryWriter = New BinaryWriter(memStream)

Expand Down
13 changes: 11 additions & 2 deletions EUD Editor 3/Class/BulidData/WriteSCAData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,28 @@ Partial Public Class BuildData
sb.AppendLine("import " & NameSapces(i) & " as n" & i & ";")
Next
sb.AppendLine("")
sb.AppendLine("const ws = Db(" & EntryPoint.Count * 4 + 8 * (CommandLength + SpaceLength) & ");//workspace")
sb.AppendLine("const ws = 0x58F44A;") 'Db(" & EntryPoint.Count * 4 + 8 * (CommandLength + SpaceLength) & ");//workspace")
sb.AppendLine("const EntryPointLength = " & EntryPoint.Count & ";//EntryPointLength")
sb.AppendLine("const SpaceLength = " & pjData.TEData.SCArchive.DataSpace & ";//DataBufferSize")
sb.AppendLine("const ObjectCount = " & pjData.TEData.SCArchive.CodeDatas.Count & ";//ObjectCount")

sb.AppendLine("")
sb.AppendLine("function Init(){")
sb.AppendLine(" MPQAddFile('SCARCHIVEMAPCODE', py_open('scakeyfile', 'rb').read());")
'sb.AppendLine(" MPQAddFile('SCARCHIVEMAPCODE', py_open('scakeyfile', 'rb').read());")
'sb.AppendLine("f_eprintln(""시발 오류"", dwread_epd(EPD(ws)), "" "", dwread_epd(EPD(ws) + 1));")
sb.AppendLine(" //EntryPoint")
For i = 0 To EntryPoint.Count - 1
'sb.AppendLine(" dwwrite_epd(EPD(ws) + " & i & ", " & 98761234 & ");")
sb.AppendLine(" dwwrite_epd(EPD(ws) + " & i & ", " & EntryPoint(i) & ");")
Next

sb.AppendLine(" ")
sb.AppendLine("}")
sb.AppendLine("")
sb.AppendLine("")
sb.AppendLine("function Exec(){")
sb.AppendLine(" Init();")

'sb.AppendLine(" const s = StringBuffer();")
'sb.AppendLine(" s.print(""asf"", dwread_epd(EPD(ws) + EntryPointLength));")
sb.AppendLine("}")
Expand Down Expand Up @@ -519,6 +524,10 @@ Partial Public Class BuildData

StormLib.SFileAddFile(hmpq, TempFilePath & "\scadatafile", "SCARCHIVEDATA", StormLib.MPQ_FILE_COMPRESS)

StormLib.SFileAddFile(hmpq, EudPlibFilePath & "\scakeyfile", "SCARCHIVEMAPCODE", StormLib.MPQ_FILE_COMPRESS)



StormLib.SFileCloseFile(hfile)
StormLib.SFileCloseArchive(hmpq)

Expand Down
3 changes: 3 additions & 0 deletions EUD Editor 3/Class/Data/CButtonData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ Public Class CButtonData
End Function


Public Function GetPosindex() As Integer
Return pos
End Function
Public Function GetPos() As Point
Dim returnPoint As New Point(((pos - 1) Mod 3) * 32, ((pos - 1) \ 3) * 32)

Expand Down
2 changes: 2 additions & 0 deletions EUD Editor 3/Class/Data/ProjectData/Load.vb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Partial Public Class ProjectData
' pjData.CloseFile()
'End If
Else
stm.Close()

_pjdata = New ProjectData
_pjdata.NewFIle()
_pjdata.InitData()
Expand Down
2 changes: 1 addition & 1 deletion EUD Editor 3/Class/DataManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Public Class DataManager
TrueFlag = pjData.Dat.GetDatFile(Datfile).CheckDirty(ObjectID) And (pjData.ExtraDat.RequireData(SCDatFiles.DatFiles.techdata).RequireObjectUsed(ObjectID) = CRequireData.RequireUse.DefaultUse) And (pjData.ExtraDat.RequireData(SCDatFiles.DatFiles.Stechdata).RequireObjectUsed(ObjectID) = CRequireData.RequireUse.DefaultUse)
Case SCDatFiles.DatFiles.orders
TrueFlag = pjData.Dat.GetDatFile(Datfile).CheckDirty(ObjectID) And (pjData.ExtraDat.RequireData(SCDatFiles.DatFiles.orders).RequireObjectUsed(ObjectID) = CRequireData.RequireUse.DefaultUse)
Case SCDatFiles.DatFiles.ButtonData
Case SCDatFiles.DatFiles.ButtonData, SCDatFiles.DatFiles.stattxt
TrueFlag = pjData.ExtraDat.CheckDirty(Datfile, ObjectID)
Case Else
TrueFlag = pjData.Dat.GetDatFile(Datfile).CheckDirty(ObjectID)
Expand Down
51 changes: 49 additions & 2 deletions EUD Editor 3/Class/TriggerEditor/GUIScriptEditor/TriggerScript.vb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,33 @@ Public Class ScriptBlock
ArgumentName = New List(Of String)
Argument = New List(Of ScriptBlock)
Child = New List(Of ScriptBlock)

If TriggerScript.IsHaveValues Then
For i = 0 To TriggerScript.ValuesDef.Count - 1
Argument.Add(New ScriptBlock("Then"))
Next
End If
End Sub

Public Sub New(copySb As ScriptBlock)
TriggerScript = tescm.GetTriggerScript(copySb.TriggerScript.SName)

ArgumentName = New List(Of String)
Argument = New List(Of ScriptBlock)
Child = New List(Of ScriptBlock)

If TriggerScript.IsHaveValues Then
For i = 0 To TriggerScript.ValuesDef.Count - 1
'MsgBox(copySb.Argument(i).TriggerScript.SName)

Argument.Add(New ScriptBlock(copySb.Argument(i)))
Next
End If

Value = copySb.Value
End Sub


'벨류도 이거로 만듬

'인자안에 이게 들어있음.
Expand All @@ -34,6 +59,10 @@ Public Class ScriptBlock
Public ReadOnly Property Argument As List(Of ScriptBlock)


Public Property Value As String




Public ReadOnly Property Child As List(Of ScriptBlock)

Expand Down Expand Up @@ -78,12 +107,16 @@ End Class

<Serializable>
Public Class TriggerScript
Public Shared Function GetColor(key As String)
Public Shared Function GetColor(key As String, Optional A As Byte = 255)
Dim header As String = Tool.GetText(key)

Dim colors() As String = header.Split("|").Last.Split(",")

Return Color.FromRgb(colors(0), colors(1), colors(2))
If A = 255 Then
Return Color.FromRgb(colors(0), colors(1), colors(2))
Else
Return Color.FromArgb(A, colors(0), colors(1), colors(2))
End If
End Function

'스크립트 하나하나를 정의
Expand All @@ -94,6 +127,11 @@ Public Class TriggerScript
Special = 3
'룰로 정해진 곳에만 들어올 수 있음


OutSide = 4
Free = 5
Value = 6

Null = 99
End Enum

Expand All @@ -120,6 +158,15 @@ Public Class TriggerScript

Public CodeText As String

Public ReadOnly Property IsHaveValues As Boolean
Get
If ValuesDef.Count = 1 And ValuesDef(0).Trim = "" Then
Return False
Else
Return True
End If
End Get
End Property
Public ValuesDef As List(Of String) '인자들
Public Texts As List(Of String) '소개글

Expand Down
Loading

0 comments on commit 1b8072a

Please sign in to comment.