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 Sep 4, 2019
1 parent 1b8072a commit 4050ace
Show file tree
Hide file tree
Showing 30 changed files with 5,795 additions and 1,521 deletions.
57 changes: 49 additions & 8 deletions EUD Editor 3/Class/BulidData/BulidMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,15 @@ Partial Public Class BuildData
'CT(Tbl옵션에 따라)

'eds파일을 만들고 해당 파일 실행
WriteedsFile(isEdd)
Try
WriteedsFile(isEdd)
Catch ex As Exception
Tool.ErrorMsgBox(Tool.GetText("Error SCA Freeze"))
pgData.IsCompilng = False
pgData.isEddCompile = False
Tool.RefreshMainWindow()
Return
End Try
Dim isSucces As Boolean = Starteds(isEdd)


Expand All @@ -232,6 +240,7 @@ Partial Public Class BuildData
End If
End Sub

Private OutputString As String



Expand All @@ -241,17 +250,41 @@ Partial Public Class BuildData
Dim StandardOutput As String = ""
Dim StandardError As String = ""

OutputString = ""

Dim RestartCount As Integer
While True
eudplibprocess = ProcessStart(isEdd)
'Dim StandardOutputStream As StreamReader = eudplibprocess.StandardOutput



If Not isEdd Then
While Not eudplibprocess.HasExited
eudplibprocess.StandardInput.Write(vbCrLf)
StandardOutput = StandardOutput & eudplibprocess.StandardOutput.ReadToEnd
StandardError = StandardError & eudplibprocess.StandardError.ReadToEnd
Threading.Thread.Sleep(100)

'eudplibprocess.StandardInput.Write(vbCrLf)

'StandardOutput = StandardOutput & StandardOutputStream.ReadToEnd
'MsgBox(StandardOutput)
'MsgBox(OutputString)
Threading.Thread.Sleep(200)

'Threading.Thread.Sleep(1000)

StandardOutput = OutputString
If StandardOutput.IndexOf("계속하려면 아무 키나 누르십시오") >= 0 Then
MsgBox("일시정지 해재")
eudplibprocess.StandardInput.Write(vbCrLf)
End If
If eudplibShutDown Then
MsgBox(Tool.GetText("Error CompileStop"), MsgBoxStyle.Critical)
Return False
End If
End While
StandardOutput = OutputString

StandardError = eudplibprocess.StandardError.ReadToEnd

If InStr(StandardError, "zipimport.ZipImportError: can't decompress data; zlib not available") <> 0 Then
'MsgBox("빌드 실패. 재시도 합니다 재시도 횟수: " & RestartCount & vbCrLf & StandardOutput & StandardError)
StandardError = ""
Expand All @@ -267,7 +300,6 @@ Partial Public Class BuildData
MsgBox(Tool.GetText("Error CompileStop"), MsgBoxStyle.Critical)
Else
GetMainWindow.LogTextBoxView(StandardOutput & vbCrLf & StandardError, True)

End If

Return False
Expand All @@ -291,7 +323,6 @@ Partial Public Class BuildData




Private Function ProcessStart(isEdd As Boolean) As Process
Dim process As New Process
Dim startInfo As New ProcessStartInfo
Expand All @@ -316,13 +347,23 @@ Partial Public Class BuildData
End If


process.StartInfo = startInfo



process.StartInfo = startInfo
process.Start()
AddHandler process.OutputDataReceived, AddressOf OutputReader
If Not isEdd Then
process.BeginOutputReadLine()
End If

'process.WaitForExit()
Return process
End Function
Public Sub OutputReader(sender As Object, e As DataReceivedEventArgs)
'MsgBox(e.Data)
OutputString = OutputString & e.Data & vbCrLf
End Sub


End Class
7 changes: 6 additions & 1 deletion EUD Editor 3/Class/BulidData/WriteSCAData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ Partial Public Class BuildData


process.StartInfo = startInfo
process.Start()
Try
process.Start()
Catch ex As Exception
MsgBox(Tool.GetText("Error SCA") & vbCrLf & "SCArchiveConnecter.exe파일을 찾을 수 없습니다.", MsgBoxStyle.Critical)
Return False
End Try
Dim OutputString As String = ""
While (Not process.HasExited)
OutputString = process.StandardOutput.ReadLine
Expand Down
19 changes: 16 additions & 3 deletions EUD Editor 3/Class/BulidData/WriteedsFile.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,22 @@ Partial Public Class BuildData
Dim sb As New StringBuilder

For i = 0 To pBlocks.Count - 1
sb.AppendLine(pBlocks(i).GetEdsString())
Dim texts As String = pBlocks(i).GetEdsString()

If pjData.TEData.SCArchive.IsUsed Then
Dim startoffreeze As Integer = texts.IndexOf("[freeze]")
If startoffreeze >= 0 Then
If texts.IndexOf("[freeze]" & vbCrLf & "prompt: 1") = -1 Then
If MsgBox(Tool.GetText("Error SCA Freeze"), MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then
Throw New Exception()
End If
texts = texts.Insert(startoffreeze + 8, vbCrLf & "prompt: 1")
End If
'prompt: 1
End If
End If

sb.AppendLine(texts)
Next

Return sb.ToString
Expand Down Expand Up @@ -74,7 +89,6 @@ Partial Public Class BuildData

Public Function GetEdsString() As String
Dim sb As New StringBuilder

Select Case BType
Case EdsBlockType.Main
sb.AppendLine("[main]")
Expand All @@ -93,7 +107,6 @@ Partial Public Class BuildData
If My.Computer.FileSystem.FileExists(TriggerEditorPath & "\" & pjData.TEData.GetMainFilePath) Then
sb.AppendLine("[" & Tool.GetRelativePath(EdsFilePath, TriggerEditorPath & "\" & pjData.TEData.GetMainFilePath) & "]")
End If

Case EdsBlockType.DataDumper
sb.AppendLine("[dataDumper]")
If pjData.UseCustomtbl Then
Expand Down
2 changes: 1 addition & 1 deletion EUD Editor 3/Class/Data/ProgramData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Imports MaterialDesignThemes.Wpf
Public Class ProgramData
'<주 버전>.<부 버전>.<빌드 번호>.<수정>
Public ReadOnly Property Version As System.Version = Reflection.Assembly.GetExecutingAssembly().GetName().Version '"0.0.1"
Public ReadOnly Property RecommendeuddraftVersion As New System.Version(0, 8, 6, 9)
Public ReadOnly Property RecommendeuddraftVersion As New System.Version(0, 8, 7, 3)



Expand Down
6 changes: 6 additions & 0 deletions EUD Editor 3/Class/Data/ProjectData/ProjectData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ Public Class ProjectData
Else
ReturnStr = scData.BtnStr(index - SCUnitCount)
End If
Case SCDatFiles.DatFiles.Location
If pjData.IsMapLoading Then
ReturnStr = pjData.MapData.LocationName(index)
Else
ReturnStr = "Location " & index
End If
End Select
Dim ToolTipText As String = ""
If SCDatFiles.CheckValidDat(Datfile) Then
Expand Down
5 changes: 4 additions & 1 deletion EUD Editor 3/Class/Data/SCDatFiles.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ Public Class SCDatFiles
ButtonData = 20
ButtonSet = 21


Stechdata = 22


Location = 23

None = 255
End Enum
Public Enum EParamInfo
Expand Down
36 changes: 7 additions & 29 deletions EUD Editor 3/Class/Data/StarCraftData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -754,30 +754,6 @@ Public Class StarCraftData
End Select




'MsgBox("시작")
'MGRP.GRPMoudleInit()
'MsgBox("GRP로드끝")

'piscriptData.LoadIscriptToBuff(Tool.CascData.ReadFile("scripts/iscript.bin"))

'Tool.CascData.OpenCascStorage()
'For i = 0 To SCImageCount - 1
' Dim grpindex As Integer = DefaultDat.Data(SCDatFiles.DatFiles.images, "GRP File", i)
' Dim DrawFunc As Integer = DefaultDat.Data(SCDatFiles.DatFiles.images, "Draw Function", i)
' Dim Remapping As Integer = DefaultDat.Data(SCDatFiles.DatFiles.images, "Remapping", i)
' Dim filename As String = "unit\" & GRPFiles(grpindex)
' SDGRP(i) = New GRP(Tool.CascData.ReadFileCascStorage(filename), DrawFunc, Remapping)
'Next
'Tool.CascData.CloseCascStorage()

'SDICON = New GRP("cmdbtns/cmdicons.grp", 0, 0, PalettType.Icons)


'SDWireFrame = New GRP("wirefram/wirefram.grp", 0, 0, PalettType.Icons)
'SDGrpFrame = New GRP("wirefram/grpwire.grp", 0, 0, PalettType.Icons)
'SDTramFrame = New GRP("wirefram/tranwire.grp", 0, 0, PalettType.Icons)
Catch ex As Exception
pgData.Setting(ProgramData.TSetting.Graphic) = 0
Tool.ErrorMsgBox(Tool.GetText("Error LoadMPQData Fail"), ex.ToString)
Expand All @@ -798,7 +774,9 @@ Public Class StarCraftData

Dim pos As UInteger = 0
Dim bytes As Byte() = Tool.CascData.ReadFileCascStorage("SD/mainSD.anim")

If bytes.Count = 0 Then
Throw New Exception("CascOpenError")
End If

BReader.ReadUint32(pos, bytes) 'unsigned Int magic; // "ANIM"
BReader.ReadUint16(pos, bytes) 'unsigned Short version; // Version? 0x0101, 0x0202, 0x0204
Expand Down Expand Up @@ -915,13 +893,13 @@ Public Class StarCraftData




Loadddsgrp("SD/unit/cmdbtns/cmdicons.dds.grp", SDICON, True)
Loadddsgrp("SD/unit/cmdicons/cmdicons.dds.grp", SDICON, True)
Loadddsgrp("SD/unit/wirefram/wirefram.dds.grp", SDWireFrame, False)
Loadddsgrp("SD/unit/wirefram/grpwire.dds.grp", SDGrpFrame, False)
Loadddsgrp("SD/unit/wirefram/tranwire.dds.grp", SDTranFrame, False)



isSDGLoad = True
End Sub

Expand Down Expand Up @@ -1033,7 +1011,7 @@ Public Class StarCraftData
End If
Next

Loadddsgrp("HD2/unit/cmdbtns/cmdicons.dds.grp", HDICON, True)
Loadddsgrp("HD2/unit/cmdicons/cmdicons.dds.grp", HDICON, True)
Loadddsgrp("HD2/unit/wirefram/wirefram.dds.grp", HDWireFrame, False)
Loadddsgrp("HD2/unit/wirefram/grpwire.dds.grp", HDGrpFrame, False)
Loadddsgrp("HD2/unit/wirefram/tranwire.dds.grp", HDTranFrame, False)
Expand Down Expand Up @@ -1145,7 +1123,7 @@ Public Class StarCraftData
End If
Next

Loadddsgrp("HD2/Carbot/unit/cmdbtns/cmdicons.dds.grp", CTICON, True)
Loadddsgrp("HD2/Carbot/unit/cmdicons/cmdicons.dds.grp", CTICON, True)
Loadddsgrp("HD2/Carbot/unit/wirefram/wirefram.dds.grp", CTWireFrame, False)
Loadddsgrp("HD2/Carbot/unit/wirefram/grpwire.dds.grp", CTGrpFrame, False)
Loadddsgrp("HD2/Carbot/unit/wirefram/tranwire.dds.grp", CTTranFrame, False)
Expand Down
12 changes: 12 additions & 0 deletions EUD Editor 3/Class/TriggerEditor/GUIScriptEditor/ScriptManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
Imports System.IO

Public Class ScriptManager
Public Function GetValue(key As String) As TriggerScript
Dim ts As List(Of TriggerScript) = dicTriggerScript("Value")
For i = 0 To ts.Count - 1
If ts(i).FolderRull.IndexOf(key) >= 0 Then
Return ts(i)
End If
Next

'기본 숫자
Return GetTriggerScript("RawCode")
End Function



Private TriggerScript As List(Of TriggerScript)
Expand Down
16 changes: 13 additions & 3 deletions EUD Editor 3/Class/TriggerEditor/GUIScriptEditor/TriggerScript.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@
Public Class ScriptBlock
Public ReadOnly Property TriggerScript As TriggerScript

Public Sub New(keyname As String)
TriggerScript = tescm.GetTriggerScript(keyname)
Public Sub New(keyname As String, Optional IsValue As Boolean = False)
If IsValue Then
TriggerScript = tescm.GetValue(keyname)
Else
TriggerScript = tescm.GetTriggerScript(keyname)
End If




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"))


Argument.Add(New ScriptBlock(TriggerScript.ValuesDef(i), True))
Next
End If
End Sub
Expand Down Expand Up @@ -60,6 +69,7 @@ Public Class ScriptBlock


Public Property Value As String
Public Property ValueType As SCDatFiles.DatFiles



Expand Down
Loading

0 comments on commit 4050ace

Please sign in to comment.