From 292b8d14700fd9ebf4eed49311fdc11a72c7fd7d Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sun, 17 Jul 2022 19:52:41 -0500 Subject: [PATCH] Remove unmaintained SOCEdit Written in VB6. Superceded by better tools and also probably not even buildable anymore. --- tools/SOCEdit/Global.bas | 96 -- tools/SOCEdit/SOCEdit.vbp | 53 - tools/SOCEdit/Things.frm | 1895 -------------------------- tools/SOCEdit/Things.frx | Bin 1094 -> 0 bytes tools/SOCEdit/frmCharacterEdit.frm | 320 ----- tools/SOCEdit/frmCharacterEdit.frx | Bin 1215 -> 0 bytes tools/SOCEdit/frmCutsceneEdit.frm | 1365 ------------------- tools/SOCEdit/frmCutsceneEdit.frx | Bin 1098 -> 0 bytes tools/SOCEdit/frmEmblemEdit.frm | 384 ------ tools/SOCEdit/frmEmblemEdit.frx | Bin 1090 -> 0 bytes tools/SOCEdit/frmHUDEdit.frm | 315 ----- tools/SOCEdit/frmHUDEdit.frx | Bin 1090 -> 0 bytes tools/SOCEdit/frmHelp.frm | 213 --- tools/SOCEdit/frmHelp.frx | Bin 2795 -> 0 bytes tools/SOCEdit/frmHub.frm | 429 ------ tools/SOCEdit/frmHub.frx | Bin 50308 -> 0 bytes tools/SOCEdit/frmLevelHeader.frm | 839 ------------ tools/SOCEdit/frmLevelHeader.frx | Bin 1204 -> 0 bytes tools/SOCEdit/frmMaincfg.frm | 644 --------- tools/SOCEdit/frmMaincfg.frx | Bin 1090 -> 0 bytes tools/SOCEdit/frmSoundEdit.frm | 485 ------- tools/SOCEdit/frmSoundEdit.frx | Bin 1094 -> 0 bytes tools/SOCEdit/frmStateEdit.frm | 940 ------------- tools/SOCEdit/frmStateEdit.frx | Bin 1254 -> 0 bytes tools/SOCEdit/frmUnlockablesEdit.frm | 391 ------ tools/SOCEdit/frmUnlockablesEdit.frx | Bin 1399 -> 0 bytes tools/SOCEdit/icon1.ico | Bin 1078 -> 0 bytes 27 files changed, 8369 deletions(-) delete mode 100644 tools/SOCEdit/Global.bas delete mode 100644 tools/SOCEdit/SOCEdit.vbp delete mode 100644 tools/SOCEdit/Things.frm delete mode 100644 tools/SOCEdit/Things.frx delete mode 100644 tools/SOCEdit/frmCharacterEdit.frm delete mode 100644 tools/SOCEdit/frmCharacterEdit.frx delete mode 100644 tools/SOCEdit/frmCutsceneEdit.frm delete mode 100644 tools/SOCEdit/frmCutsceneEdit.frx delete mode 100644 tools/SOCEdit/frmEmblemEdit.frm delete mode 100644 tools/SOCEdit/frmEmblemEdit.frx delete mode 100644 tools/SOCEdit/frmHUDEdit.frm delete mode 100644 tools/SOCEdit/frmHUDEdit.frx delete mode 100644 tools/SOCEdit/frmHelp.frm delete mode 100644 tools/SOCEdit/frmHelp.frx delete mode 100644 tools/SOCEdit/frmHub.frm delete mode 100644 tools/SOCEdit/frmHub.frx delete mode 100644 tools/SOCEdit/frmLevelHeader.frm delete mode 100644 tools/SOCEdit/frmLevelHeader.frx delete mode 100644 tools/SOCEdit/frmMaincfg.frm delete mode 100644 tools/SOCEdit/frmMaincfg.frx delete mode 100644 tools/SOCEdit/frmSoundEdit.frm delete mode 100644 tools/SOCEdit/frmSoundEdit.frx delete mode 100644 tools/SOCEdit/frmStateEdit.frm delete mode 100644 tools/SOCEdit/frmStateEdit.frx delete mode 100644 tools/SOCEdit/frmUnlockablesEdit.frm delete mode 100644 tools/SOCEdit/frmUnlockablesEdit.frx delete mode 100644 tools/SOCEdit/icon1.ico diff --git a/tools/SOCEdit/Global.bas b/tools/SOCEdit/Global.bas deleted file mode 100644 index 77bf3df2b..000000000 --- a/tools/SOCEdit/Global.bas +++ /dev/null @@ -1,96 +0,0 @@ -Attribute VB_Name = "Module1" -Option Explicit -Public SOCFile As String -Public SOCTemp As String -Public SourcePath As String - -Public Function FirstToken(ByVal line As String) - Dim index As Integer - - index = InStr(line, " ") - 1 - - If index < 1 Then - index = Len(line) - End If - - FirstToken = TrimComplete(Left(line, index)) -End Function - -Public Function SecondToken(ByVal line As String) - Dim startclip As Integer - Dim endclip As Integer - - startclip = InStr(line, " ") - - startclip = startclip + 1 - - SecondToken = TrimComplete(Mid(line, startclip, Len(line))) -End Function - -Public Function SecondTokenEqual(ByVal line As String) - Dim startclip As Integer - Dim endclip As Integer - - startclip = InStr(line, "=") - - startclip = startclip + 2 - - line = Mid(line, startclip, Len(line)) - - SecondTokenEqual = TrimComplete(line) -End Function - -Public Function TrimComplete(ByVal sValue As String) As String - Dim sAns As String - Dim sWkg As String - Dim sChar As String - Dim lLen As Long - Dim lCtr As Long - - sAns = sValue - lLen = Len(sValue) - - If lLen > 0 Then - 'Ltrim - For lCtr = 1 To lLen - sChar = Mid(sAns, lCtr, 1) - If Asc(sChar) > 32 Then Exit For - Next - - sAns = Mid(sAns, lCtr) - lLen = Len(sAns) - - 'Rtrim - If lLen > 0 Then - For lCtr = lLen To 1 Step -1 - sChar = Mid(sAns, lCtr, 1) - If Asc(sChar) > 32 Then Exit For - Next - End If - sAns = Left$(sAns, lCtr) - End If - - TrimComplete = sAns -End Function - -Public Function RTrimComplete(ByVal sValue As String) As String - Dim sAns As String - Dim sWkg As String - Dim sChar As String - Dim lLen As Long - Dim lCtr As Long - - sAns = sValue - lLen = Len(sValue) - - 'Rtrim - If lLen > 0 Then - For lCtr = lLen To 1 Step -1 - sChar = Mid(sAns, lCtr, 1) - If Asc(sChar) > 32 Then Exit For - Next - End If - sAns = Left$(sAns, lCtr) - - RTrimComplete = sAns -End Function diff --git a/tools/SOCEdit/SOCEdit.vbp b/tools/SOCEdit/SOCEdit.vbp deleted file mode 100644 index 90af0095a..000000000 --- a/tools/SOCEdit/SOCEdit.vbp +++ /dev/null @@ -1,53 +0,0 @@ -Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\WINNT\system32\stdole2.tlb#OLE Automation -Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\..\WINNT\system32\scrrun.dll#Microsoft Scripting Runtime -Form=Things.frm -Module=Module1; Global.bas -Form=frmStateEdit.frm -Form=frmLevelHeader.frm -Form=frmHub.frm -Form=frmMaincfg.frm -Form=frmUnlockablesEdit.frm -Form=frmEmblemEdit.frm -Form=frmSoundEdit.frm -Form=frmCharacterEdit.frm -Form=frmCutsceneEdit.frm -Form=frmHelp.frm -Form=frmHUDEdit.frm -IconForm="frmThingEdit" -Startup="frmHub" -HelpFile="" -Title="SOC Editor" -ExeName32="SOCEdit.exe" -Path32="..\..\..\srb2demo2\SOCEdit" -Command32="" -Name="SOCEditor" -HelpContextID="0" -CompatibleMode="0" -MajorVer=0 -MinorVer=7 -RevisionVer=7 -AutoIncrementVer=0 -ServerSupportFiles=0 -VersionComments="http://www.srb2.org/" -VersionCompanyName="Sonic Team Junior" -VersionFileDescription="For SRB2 v1.09.4" -CompilationType=0 -OptimizationType=0 -FavorPentiumPro(tm)=0 -CodeViewDebugInfo=0 -NoAliasing=0 -BoundsCheck=0 -OverflowCheck=0 -FlPointCheck=0 -FDIVCheck=0 -UnroundedFP=0 -StartMode=0 -Unattended=0 -Retained=0 -ThreadPerObject=0 -MaxNumberOfThreads=1 -DebugStartupOption=0 - -[MS Transaction Server] -AutoRefresh=1 diff --git a/tools/SOCEdit/Things.frm b/tools/SOCEdit/Things.frm deleted file mode 100644 index f95b6afb7..000000000 --- a/tools/SOCEdit/Things.frm +++ /dev/null @@ -1,1895 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmThingEdit - Caption = "Thing Edit" - ClientHeight = 5745 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 11880 - Icon = "Things.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 5745 - ScaleWidth = 11880 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton cmdCopy - Caption = "&Copy Thing" - Height = 615 - Left = 6600 - TabIndex = 77 - Top = 4920 - Width = 975 - End - Begin VB.CommandButton cmdLoadDefault - Caption = "&Load Code Default" - Height = 615 - Left = 4440 - Style = 1 'Graphical - TabIndex = 76 - Top = 4920 - Width = 975 - End - Begin VB.CommandButton cmdDelete - Caption = "&Delete Thing from SOC" - Height = 615 - Left = 3240 - Style = 1 'Graphical - TabIndex = 74 - Top = 4920 - Width = 1095 - End - Begin VB.CommandButton cmdSave - Caption = "&Save" - Height = 615 - Left = 5520 - TabIndex = 73 - Top = 4920 - Width = 975 - End - Begin VB.Frame frmFlags - Caption = "Flags" - Height = 3735 - Left = 7680 - TabIndex = 45 - Top = 1920 - Width = 4095 - Begin VB.CheckBox chkFlags - Caption = "MF_FIRE" - Height = 255 - Index = 26 - Left = 2040 - TabIndex = 72 - Tag = "4194304" - ToolTipText = "Fire object. Doesn't harm if you have red shield." - Top = 2160 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOCLIPTHING" - Height = 255 - Index = 25 - Left = 2040 - TabIndex = 71 - Tag = "1073741824" - ToolTipText = "Don't be blocked by things (partial clipping)" - Top = 3120 - Width = 1815 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SCENERY" - Height = 255 - Index = 24 - Left = 2040 - TabIndex = 70 - Tag = "33554432" - ToolTipText = "Scenery (uses scenery thinker). Uses less CPU than a standard object, but generally can't move, etc." - Top = 2880 - Width = 1455 - End - Begin VB.CheckBox chkFlags - Caption = "MF_ENEMY" - Height = 255 - Index = 23 - Left = 2040 - TabIndex = 69 - Tag = "16777216" - ToolTipText = "This mobj is an enemy!" - Top = 2640 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_COUNTITEM" - Height = 255 - Index = 22 - Left = 2040 - TabIndex = 68 - Tag = "8388608" - ToolTipText = "On picking up, count this item object towards intermission item total." - Top = 2400 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOTHINK" - Height = 255 - Index = 21 - Left = 2040 - TabIndex = 67 - Tag = "2097152" - ToolTipText = "Don't run this thing's thinker." - Top = 1920 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_MONITOR" - Height = 255 - Index = 20 - Left = 2040 - TabIndex = 66 - Tag = "1048576" - ToolTipText = "Item box" - Top = 1680 - Width = 1575 - End - Begin VB.CheckBox chkFlags - Caption = "MF_HIRES" - Height = 255 - Index = 19 - Left = 2040 - TabIndex = 65 - Tag = "524288" - ToolTipText = "Object uses a high-resolution sprite" - Top = 1440 - Width = 1215 - End - Begin VB.CheckBox chkFlags - Caption = "MF_BOUNCE" - Height = 255 - Index = 18 - Left = 2040 - TabIndex = 64 - Tag = "262144" - ToolTipText = "Bounce off walls and things." - Top = 1200 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SPRING" - Height = 255 - Index = 17 - Left = 2040 - TabIndex = 63 - Tag = "131072" - ToolTipText = "Item is a spring." - Top = 960 - Width = 1575 - End - Begin VB.CheckBox chkFlags - Caption = "MF_MISSILE" - Height = 255 - Index = 16 - Left = 2040 - TabIndex = 62 - Tag = "65536" - ToolTipText = "Any kind of projectile currently flying through the air, waiting to hit something" - Top = 720 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_BOXICON" - Height = 255 - Index = 15 - Left = 2040 - TabIndex = 61 - Tag = "32768" - ToolTipText = "Monitor powerup icon. These rise a bit." - Top = 480 - Width = 1815 - End - Begin VB.CheckBox chkFlags - Caption = "MF_FLOAT" - Height = 255 - Index = 14 - Left = 2040 - TabIndex = 60 - Tag = "16384" - ToolTipText = "Allow moves to any height, no gravity. For active floaters." - Top = 240 - Width = 1215 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SPECIALFLAGS" - Height = 255 - Index = 13 - Left = 120 - TabIndex = 59 - Tag = "8192" - ToolTipText = "This object does not adhere to regular flag/z properties for object placing." - Top = 3360 - Width = 1815 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOCLIP" - Height = 255 - Index = 12 - Left = 120 - TabIndex = 58 - Tag = "4096" - ToolTipText = "Don't clip against objects, walls, etc." - Top = 3120 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SLIDEME" - Height = 255 - Index = 11 - Left = 120 - TabIndex = 57 - Tag = "2048" - ToolTipText = "Slide this object when it hits a wall." - Top = 2880 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_AMBIENT" - Height = 255 - Index = 10 - Left = 120 - TabIndex = 56 - Tag = "1024" - ToolTipText = "This object is an ambient sound." - Top = 2640 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOGRAVITY" - Height = 255 - Index = 9 - Left = 120 - TabIndex = 55 - Tag = "512" - ToolTipText = "Don't apply gravity" - Top = 2400 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SPAWNCEILING" - Height = 255 - Index = 8 - Left = 120 - TabIndex = 54 - Tag = "256" - ToolTipText = "On level spawning (initial position), hang from ceiling instead of stand on floor." - Top = 2160 - Width = 1935 - End - Begin VB.CheckBox chkFlags - Caption = "MF_BOSS" - Height = 255 - Index = 7 - Left = 120 - TabIndex = 53 - Tag = "128" - ToolTipText = "Object is a boss." - Top = 1920 - Width = 1575 - End - Begin VB.CheckBox chkFlags - Caption = "MF_PUSHABLE" - Height = 255 - Index = 6 - Left = 120 - TabIndex = 52 - Tag = "64" - ToolTipText = "You can push this object. It can activate switches and things by pushing it on top." - Top = 1680 - Width = 1575 - End - Begin VB.CheckBox chkFlags - Caption = "MF_AMBUSH" - Height = 255 - Index = 5 - Left = 120 - TabIndex = 51 - Tag = "32" - ToolTipText = "Special attributes" - Top = 1440 - Width = 1455 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOBLOCKMAP" - Height = 255 - Index = 4 - Left = 120 - TabIndex = 50 - Tag = "16" - ToolTipText = "Don't use the blocklinks (inert but displayable)" - Top = 1200 - Width = 1815 - End - Begin VB.CheckBox chkFlags - Caption = "MF_NOSECTOR" - Height = 255 - Index = 3 - Left = 120 - TabIndex = 49 - Tag = "8" - ToolTipText = "Don't use the sector links (invisible but touchable)." - Top = 960 - Width = 1575 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SHOOTABLE" - Height = 255 - Index = 2 - Left = 120 - TabIndex = 48 - Tag = "4" - ToolTipText = "Can be hit." - Top = 720 - Width = 1695 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SOLID" - Height = 255 - Index = 1 - Left = 120 - TabIndex = 47 - Tag = "2" - ToolTipText = "Blocks." - Top = 480 - Width = 1335 - End - Begin VB.CheckBox chkFlags - Caption = "MF_SPECIAL" - Height = 255 - Index = 0 - Left = 120 - TabIndex = 46 - Tag = "1" - ToolTipText = "Call P_TouchSpecialThing when touched." - Top = 240 - Width = 1455 - End - End - Begin VB.ComboBox cmbRaisestate - Height = 315 - Left = 4320 - TabIndex = 43 - Text = "cmbRaisestate" - Top = 4440 - Width = 3300 - End - Begin VB.ComboBox cmbActivesound - Height = 315 - Left = 4320 - TabIndex = 41 - Text = "cmbActivesound" - Top = 4080 - Width = 3300 - End - Begin VB.TextBox txtDamage - Height = 285 - Left = 10680 - TabIndex = 39 - Text = "0" - Top = 1200 - Width = 1095 - End - Begin VB.TextBox txtMass - Height = 285 - Left = 10680 - TabIndex = 37 - Text = "0" - Top = 840 - Width = 1095 - End - Begin VB.TextBox txtHeight - Height = 285 - Left = 10680 - TabIndex = 35 - Text = "0" - Top = 480 - Width = 1095 - End - Begin VB.TextBox txtRadius - Height = 285 - Left = 10680 - TabIndex = 33 - Text = "0" - Top = 120 - Width = 1095 - End - Begin VB.TextBox txtSpeed - Height = 285 - Left = 8760 - TabIndex = 31 - Text = "0" - Top = 1560 - Width = 1095 - End - Begin VB.ComboBox cmbDeathsound - Height = 315 - Left = 4320 - TabIndex = 29 - Text = "cmbDeathsound" - Top = 3720 - Width = 3300 - End - Begin VB.ComboBox cmbXdeathstate - Height = 315 - Left = 4320 - TabIndex = 27 - Text = "cmbXdeathstate" - Top = 3360 - Width = 3300 - End - Begin VB.ComboBox cmbDeathstate - Height = 315 - Left = 4320 - TabIndex = 25 - Text = "cmbDeathstate" - Top = 3000 - Width = 3300 - End - Begin VB.ComboBox cmbMissilestate - Height = 315 - Left = 4320 - TabIndex = 23 - Text = "cmbMissilestate" - Top = 2640 - Width = 3300 - End - Begin VB.ComboBox cmbMeleestate - Height = 315 - Left = 4320 - TabIndex = 21 - Text = "cmbMeleestate" - Top = 2280 - Width = 3300 - End - Begin VB.ComboBox cmbPainsound - Height = 315 - Left = 4320 - TabIndex = 19 - Text = "cmbPainsound" - Top = 1920 - Width = 3300 - End - Begin VB.TextBox txtPainchance - Height = 285 - Left = 8760 - TabIndex = 17 - Text = "0" - Top = 1200 - Width = 1095 - End - Begin VB.ComboBox cmbPainstate - Height = 315 - Left = 4320 - TabIndex = 15 - Text = "cmbPainstate" - Top = 1560 - Width = 3300 - End - Begin VB.ComboBox cmbAttacksound - Height = 315 - Left = 4320 - TabIndex = 13 - Text = "cmbAttacksound" - Top = 1200 - Width = 3300 - End - Begin VB.TextBox txtReactiontime - Height = 285 - Left = 8760 - TabIndex = 11 - Text = "0" - Top = 840 - Width = 1095 - End - Begin VB.ComboBox cmbSeesound - Height = 315 - Left = 4320 - TabIndex = 9 - Text = "cmbSeesound" - Top = 840 - Width = 3300 - End - Begin VB.ComboBox cmbSeestate - Height = 315 - Left = 4320 - TabIndex = 7 - Text = "cmbSeestate" - Top = 480 - Width = 3300 - End - Begin VB.TextBox txtSpawnhealth - Height = 285 - Left = 8760 - TabIndex = 6 - Text = "0" - Top = 480 - Width = 1095 - End - Begin VB.ComboBox cmbSpawnstate - Height = 315 - Left = 4320 - TabIndex = 3 - Text = "cmbSpawnstate" - Top = 120 - Width = 3300 - End - Begin VB.TextBox txtDoomednum - Height = 285 - Left = 8760 - TabIndex = 1 - Text = "0" - Top = 120 - Width = 1095 - End - Begin VB.ListBox lstThings - Height = 5520 - ItemData = "Things.frx":0442 - Left = 120 - List = "Things.frx":0444 - TabIndex = 0 - Top = 120 - Width = 3015 - End - Begin VB.Label lblStatusInfo - Alignment = 2 'Center - Caption = "Idle" - BeginProperty Font - Name = "MS Sans Serif" - Size = 8.25 - Charset = 0 - Weight = 700 - Underline = 0 'False - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 375 - Left = 9960 - TabIndex = 75 - Top = 1560 - Width = 1815 - End - Begin VB.Label lblRaisestate - Alignment = 1 'Right Justify - Caption = "Raisestate:" - Height = 255 - Left = 3360 - TabIndex = 44 - Top = 4440 - Width = 855 - End - Begin VB.Label lblActivesound - Alignment = 1 'Right Justify - Caption = "Activesound:" - Height = 255 - Left = 3240 - TabIndex = 42 - Top = 4080 - Width = 975 - End - Begin VB.Label lblDamage - Alignment = 1 'Right Justify - Caption = "Damage:" - Height = 255 - Left = 9840 - TabIndex = 40 - Top = 1200 - Width = 735 - End - Begin VB.Label lblMass - Alignment = 1 'Right Justify - Caption = "Mass:" - Height = 255 - Left = 9960 - TabIndex = 38 - Top = 840 - Width = 615 - End - Begin VB.Label lblHeight - Alignment = 1 'Right Justify - Caption = "Height:" - Height = 255 - Left = 9960 - TabIndex = 36 - Top = 480 - Width = 615 - End - Begin VB.Label lblRadius - Alignment = 1 'Right Justify - Caption = "Radius:" - Height = 255 - Left = 9960 - TabIndex = 34 - Top = 120 - Width = 615 - End - Begin VB.Label lblSpeed - Alignment = 1 'Right Justify - Caption = "Speed:" - Height = 255 - Left = 7680 - TabIndex = 32 - Top = 1560 - Width = 975 - End - Begin VB.Label lblDeathsound - Alignment = 1 'Right Justify - Caption = "Deathsound:" - Height = 255 - Left = 3240 - TabIndex = 30 - Top = 3720 - Width = 975 - End - Begin VB.Label lblXdeathstate - Alignment = 1 'Right Justify - Caption = "Xdeathstate:" - Height = 255 - Left = 3240 - TabIndex = 28 - Top = 3360 - Width = 975 - End - Begin VB.Label lblDeathstate - Alignment = 1 'Right Justify - Caption = "Deathstate:" - Height = 255 - Left = 3240 - TabIndex = 26 - Top = 3000 - Width = 975 - End - Begin VB.Label lblMissilestate - Alignment = 1 'Right Justify - Caption = "Missilestate:" - Height = 255 - Left = 3240 - TabIndex = 24 - Top = 2640 - Width = 975 - End - Begin VB.Label lblMeleestate - Alignment = 1 'Right Justify - Caption = "Meleestate:" - Height = 255 - Left = 3240 - TabIndex = 22 - Top = 2280 - Width = 975 - End - Begin VB.Label lblPainsound - Alignment = 1 'Right Justify - Caption = "Painsound:" - Height = 255 - Left = 3240 - TabIndex = 20 - Top = 1920 - Width = 975 - End - Begin VB.Label lblPainchance - Alignment = 1 'Right Justify - Caption = "Painchance:" - Height = 255 - Left = 7680 - TabIndex = 18 - Top = 1200 - Width = 975 - End - Begin VB.Label lblPainstate - Alignment = 1 'Right Justify - Caption = "Painstate:" - Height = 255 - Left = 3240 - TabIndex = 16 - Top = 1560 - Width = 975 - End - Begin VB.Label lblAttacksound - Alignment = 1 'Right Justify - Caption = "Attacksound:" - Height = 255 - Left = 3240 - TabIndex = 14 - Top = 1200 - Width = 975 - End - Begin VB.Label lblReactiontime - Alignment = 1 'Right Justify - Caption = "Reactiontime:" - Height = 255 - Left = 7680 - TabIndex = 12 - Top = 840 - Width = 975 - End - Begin VB.Label lblSeesound - Alignment = 1 'Right Justify - Caption = "Seesound:" - Height = 255 - Left = 3240 - TabIndex = 10 - Top = 840 - Width = 975 - End - Begin VB.Label lblSeestate - Alignment = 1 'Right Justify - Caption = "Seestate:" - Height = 255 - Left = 3240 - TabIndex = 8 - Top = 480 - Width = 975 - End - Begin VB.Label lblSpawnhealth - Alignment = 1 'Right Justify - Caption = "Spawnhealth:" - Height = 255 - Left = 7680 - TabIndex = 5 - Top = 480 - Width = 975 - End - Begin VB.Label lblSpawnstate - Alignment = 1 'Right Justify - Caption = "Spawnstate:" - Height = 255 - Left = 3240 - TabIndex = 4 - Top = 120 - Width = 975 - End - Begin VB.Label lblDoomednum - Alignment = 1 'Right Justify - Caption = "Thing Map #:" - Height = 255 - Left = 7680 - TabIndex = 2 - Top = 120 - Width = 975 - End -End -Attribute VB_Name = "frmThingEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdCopy_Click() - Dim Response As String - - Response$ = InputBox("Copy state to #:", "Copy State") - - If Response = "" Then Exit Sub - - Response = TrimComplete(Response) - - Call WriteThing(False, Val(Response)) - - MsgBox "Thing copied to #" & Val(Response) -End Sub - -Private Sub cmdDelete_Click() - Call WriteThing(True, lstThings.ListIndex) -End Sub - -Private Sub cmdLoadDefault_Click() - Call ClearForm - If InStr(lstThings.List(lstThings.ListIndex), "MT_FREESLOT") = 0 Then - LoadObjectInfo (lstThings.ListIndex) - Else - MsgBox "Free slots do not have a code default." - End If -End Sub - -Private Sub cmdSave_Click() - Call WriteThing(False, lstThings.ListIndex) -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub ClearForm() - Dim i As Integer - cmbSpawnstate.Text = "" - cmbSeestate.Text = "" - cmbSeesound.Text = "" - cmbAttacksound.Text = "" - cmbPainstate.Text = "" - cmbPainsound.Text = "" - cmbMeleestate.Text = "" - cmbMissilestate.Text = "" - cmbDeathstate.Text = "" - cmbXdeathstate.Text = "" - cmbDeathsound.Text = "" - cmbActivesound.Text = "" - cmbRaisestate.Text = "" - txtDoomednum.Text = "" - txtSpawnhealth.Text = "" - txtReactiontime.Text = "" - txtPainchance.Text = "" - txtSpeed.Text = "" - txtRadius.Text = "" - txtHeight.Text = "" - txtMass.Text = "" - txtDamage.Text = "" - - For i = 0 To 26 - chkFlags(i).Value = 0 - Next -End Sub - -Private Sub Reload() - lblStatusInfo.Caption = "Loading Sounds Info..." - DoEvents - LoadSounds - lblStatusInfo.Caption = "Loading Things Info..." - DoEvents - LoadThings - lblStatusInfo.Caption = "Loading States Info..." - DoEvents - LoadStates - lblStatusInfo.Caption = "Idle" - lstThings.ListIndex = 0 -End Sub - -Private Sub LoadSounds() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - Dim i As Integer, numfreeslots As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False) - - Do While InStr(ts.ReadLine, "List of sounds (don't modify this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbSeesound.Clear - cmbAttacksound.Clear - cmbPainsound.Clear - cmbDeathsound.Clear - cmbActivesound.Clear - - Do While InStr(line, "sfx_freeslot0") = 0 - startclip = InStr(line, "sfx_") - If InStr(line, "sfx_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - cmbSeesound.AddItem addstring - cmbAttacksound.AddItem addstring - cmbPainsound.AddItem addstring - cmbDeathsound.AddItem addstring - cmbActivesound.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing - - 'Populate the free slots! - numfreeslots = 800 - - For i = 1 To numfreeslots - If i < 10 Then - addstring = number & " - " & "sfx_fre00" & i & " (free slot)" - ElseIf i < 100 Then - addstring = number & " - " & "sfx_fre0" & i & " (free slot)" - Else - addstring = number & " - " & "sfx_fre" & i & " (free slot)" - End If - cmbSeesound.AddItem addstring - cmbAttacksound.AddItem addstring - cmbPainsound.AddItem addstring - cmbDeathsound.AddItem addstring - cmbActivesound.AddItem addstring - number = number + 1 - Next -End Sub -Private Sub LoadStates() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - Dim i As Integer - Dim numfreeslots As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Object states (don't modify this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbSpawnstate.Clear - cmbSeestate.Clear - cmbPainstate.Clear - cmbMeleestate.Clear - cmbMissilestate.Clear - cmbDeathstate.Clear - cmbXdeathstate.Clear - cmbRaisestate.Clear - - Do While InStr(line, "S_FIRSTFREESLOT") = 0 - startclip = InStr(line, "S_") - If InStr(line, "S_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - cmbSpawnstate.AddItem addstring - cmbSeestate.AddItem addstring - cmbPainstate.AddItem addstring - cmbMeleestate.AddItem addstring - cmbMissilestate.AddItem addstring - cmbDeathstate.AddItem addstring - cmbXdeathstate.AddItem addstring - cmbRaisestate.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - - 'Populate the free slots! - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - line = ts.ReadLine - Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SLOTS ") + 6 - numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) * 6 - - For i = 1 To numfreeslots - addstring = number & " - " & "S_FREESLOT" & i - cmbSpawnstate.AddItem addstring - cmbSeestate.AddItem addstring - cmbPainstate.AddItem addstring - cmbMeleestate.AddItem addstring - cmbMissilestate.AddItem addstring - cmbDeathstate.AddItem addstring - cmbXdeathstate.AddItem addstring - cmbRaisestate.AddItem addstring - number = number + 1 - Next - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadThings() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim numfreeslots As Integer, i As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Little flag for SOC editor (don't change this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - lstThings.Clear - - Do While InStr(line, "MT_FIRSTFREESLOT") = 0 - startclip = InStr(line, "MT_") - If InStr(line, "MT_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - lstThings.AddItem number & " - " & line - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - - 'Populate the free slots! - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - line = ts.ReadLine - Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SLOTS ") + 6 - numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) - - For i = 1 To numfreeslots - lstThings.AddItem number & " - " & "MT_FREESLOT" & i - number = number + 1 - Next - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadObjectInfo(ThingNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.c", ForReading, False) - - Do While InStr(ts.ReadLine, "mobjinfo[NUMMOBJTYPES] =") = 0 - Loop - - number = 0 - - Do While number <> ThingNum - Do While InStr(ts.ReadLine, "}") = 0 - Loop - number = number + 1 - Loop - - Do While InStr(line, "doomednum") = 0 - line = ts.ReadLine - Loop - - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtDoomednum.Text = line - - line = ts.ReadLine - Do While InStr(line, "spawnstate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbSpawnstate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbSpawnstate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbSpawnstate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "spawnhealth") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtSpawnhealth.Text = line - - line = ts.ReadLine - Do While InStr(line, "seestate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbSeestate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbSeestate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbSeestate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "seesound") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbSeesound, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbSeesound.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbSeesound.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "reactiontime") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtReactiontime.Text = line - - line = ts.ReadLine - Do While InStr(line, "attacksound") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbAttacksound, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbAttacksound.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbAttacksound.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "painstate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbPainstate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbPainstate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbPainstate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "painchance") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtPainchance.Text = line - - line = ts.ReadLine - Do While InStr(line, "painsound") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbPainsound, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbPainsound.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbPainsound.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "meleestate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbMeleestate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbMeleestate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbMeleestate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "missilestate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbMissilestate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbMissilestate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbMissilestate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "deathstate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbDeathstate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbDeathstate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbDeathstate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "xdeathstate") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbXdeathstate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbXdeathstate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbXdeathstate.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "deathsound") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbDeathsound, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbDeathsound.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbDeathsound.Text = number & " - " & line - End If - - - line = ts.ReadLine - Do While InStr(line, "speed") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtSpeed.Text = line - - line = ts.ReadLine - Do While InStr(line, "radius") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtRadius.Text = line - - line = ts.ReadLine - Do While InStr(line, "height") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtHeight.Text = line - - line = ts.ReadLine 'Display order offset (add support, please!) - - line = ts.ReadLine - Do While InStr(line, "mass") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtMass.Text = line - - line = ts.ReadLine - Do While InStr(line, "damage") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - 'Check for *FRACUNIT values - endclip = InStr(line, "*FRACUNIT") - If endclip <> 0 Then - line = Left(line, endclip - 1) - line = Val(line) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - line = FindThingNum(line) & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - line = FindPowerNum(line) & " - " & line - End If - txtDamage.Text = line - - line = ts.ReadLine - Do While InStr(line, "activesound") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbActivesound, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbActivesound.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbActivesound.Text = number & " - " & line - End If - - line = ts.ReadLine - Do While InStr(line, "flags") = 0 - Loop - endclip = InStr(line, ",") - line = Left(line, endclip - 1) - line = TrimComplete(line) - ProcessFlags (line) - - line = ts.ReadLine - Do While InStr(line, "raisestate") = 0 - Loop - endclip = InStr(line, "//") - line = Left(line, endclip - 1) - line = TrimComplete(line) - Call FindComboIndex(cmbRaisestate, line) - 'Check for crazy-odd MT_ usage - endclip = InStr(line, "MT_") - If endclip <> 0 Then - number = FindThingNum(line) - cmbRaisestate.Text = number & " - " & line - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(line, "pw_") - If endclip <> 0 Then - number = FindPowerNum(line) - cmbRaisestate.Text = number & " - " & line - End If - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ProcessFlags(flags As String) - Dim FlagList(32) As String - Dim endpoint As Integer - Dim ListCount As Integer - Dim FlagString As String - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim j As Integer, i As Integer - Dim number As Long - Dim startclip As Integer, endclip As Integer - - For j = 0 To 26 - chkFlags(j).Value = 0 - Next j - - FlagString = flags - - flags = flags & "||" - - ListCount = 0 - - Do While Len(flags) > 3 - endpoint = InStr(flags, "|") - FlagString = Left(flags, endpoint - 1) - flags = Right(flags, Len(flags) - endpoint) - FlagList(ListCount) = FlagString - ListCount = ListCount + 1 - Loop - - ChDir SourcePath - - For i = 0 To ListCount - 1 - Set ts = myFSO.OpenTextFile("p_mobj.h", ForReading, False) - - line = ts.ReadLine - - Do While Not ts.AtEndOfStream - line = ts.ReadLine - If InStr(line, FlagList(i)) Then - If InStr(line, "//") = 0 Or (InStr(line, "//") > InStr(line, FlagList(i))) Then - Exit Do - End If - End If - Loop - - If InStr(line, FlagList(i)) Then - startclip = InStr(line, "0x") - endclip = InStr(line, ",") - line = Mid(line, startclip + 2, endclip - 1) - line = "&H" & line - TrimComplete (line) - line = Left(line, Len(line) - 1) - number = CLng(line) - - For j = 0 To 26 - If chkFlags(j).Tag = number Then - chkFlags(j).Value = 1 - End If - Next j - End If - ts.Close - Next i - - Set myFSO = Nothing -End Sub - -Private Sub FindComboIndex(ByRef Box As ComboBox, line As String) - Dim i As Integer - - For i = 0 To Box.ListCount - If InStr(Box.List(i), line) Then - Box.ListIndex = i - Exit For - End If - Next -End Sub - -Private Sub lstThings_Click() - lblStatusInfo.Caption = "Loading thing info..." - DoEvents - Call ClearForm - If InStr(lstThings.List(lstThings.ListIndex), "MT_FREESLOT") = 0 Then - LoadObjectInfo (lstThings.ListIndex) - End If - LoadSOCObjectInfo (lstThings.ListIndex) - lblStatusInfo.Caption = "Idle" -End Sub - -Private Sub LoadSOCObjectInfo(ThingNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim j As Integer - Dim temp As Long - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "THING" And Val(word2) = ThingNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "MAPTHINGNUM" Then - txtDoomednum.Text = Val(word2) - ElseIf word = "SPAWNSTATE" Then - cmbSpawnstate.ListIndex = Val(word2) - ElseIf word = "SPAWNHEALTH" Then - txtSpawnhealth.Text = Val(word2) - ElseIf word = "SEESTATE" Then - cmbSeestate.ListIndex = Val(word2) - ElseIf word = "SEESOUND" Then - cmbSeesound.ListIndex = Val(word2) - ElseIf word = "REACTIONTIME" Then - txtReactiontime.Text = Val(word2) - ElseIf word = "ATTACKSOUND" Then - cmbAttacksound.ListIndex = Val(word2) - ElseIf word = "PAINSTATE" Then - cmbPainstate.ListIndex = Val(word2) - ElseIf word = "PAINCHANCE" Then - txtPainchance.Text = Val(word2) - ElseIf word = "PAINSOUND" Then - cmbPainsound.ListIndex = Val(word2) - ElseIf word = "MELEESTATE" Then - cmbMeleestate.ListIndex = Val(word2) - ElseIf word = "MISSILESTATE" Then - cmbMissilestate.ListIndex = Val(word2) - ElseIf word = "DEATHSTATE" Then - cmbDeathstate.ListIndex = Val(word2) - ElseIf word = "DEATHSOUND" Then - cmbDeathsound.ListIndex = Val(word2) - ElseIf word = "XDEATHSTATE" Then - cmbXdeathstate.ListIndex = Val(word2) - ElseIf word = "SPEED" Then - txtSpeed.Text = Val(word2) - ElseIf word = "RADIUS" Then - txtRadius.Text = Val(word2) - ElseIf word = "HEIGHT" Then - txtHeight.Text = Val(word2) - ElseIf word = "MASS" Then - txtMass.Text = Val(word2) - ElseIf word = "DAMAGE" Then - txtDamage.Text = Val(word2) - ElseIf word = "ACTIVESOUND" Then - cmbActivesound.ListIndex = Val(word2) - ElseIf word = "FLAGS" Then - For j = 0 To 26 - temp = Val(word2) - If temp And chkFlags(j).Tag Then - chkFlags(j).Value = 1 - Else - chkFlags(j).Value = 0 - End If - Next j - ElseIf word = "RAISESTATE" Then - cmbRaisestate.ListIndex = Val(word2) - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Function FindThingNum(ThingName As String) As Integer - Dim i As Integer - Dim temp As String - Dim startpoint As Integer - Dim endpoint As Integer - - For i = 0 To lstThings.ListCount - 1 - temp = lstThings.List(i) - startpoint = InStr(temp, "-") + 2 - endpoint = Len(temp) - startpoint + 1 - temp = Mid(temp, startpoint, endpoint) - If temp = ThingName Then - FindThingNum = Val(lstThings.List(i)) - Exit For - End If - Next -End Function - -Private Function FindPowerNum(PowerName As String) As Integer - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("d_player.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Player powers. (don't edit this comment)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - Do While InStr(line, "NUMPOWERS") = 0 - startclip = InStr(line, PowerName) - If startclip <> 0 Then - FindPowerNum = number - Exit Do - End If - number = number + 1 - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Function - -Private Sub WriteThing(Remove As Boolean, num As Integer) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim thingfound As Boolean - Dim i As Integer - - thingfound = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current thing exists in the SOC, delete it. - If word = "THING" And Val(word2) = num Then - thingfound = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - tsTarget.WriteLine "Thing " & num - txtDoomednum.Text = TrimComplete(txtDoomednum.Text) - cmbSpawnstate.Text = TrimComplete(cmbSpawnstate.Text) - txtSpawnhealth.Text = TrimComplete(txtSpawnhealth.Text) - cmbSeestate.Text = TrimComplete(cmbSeestate.Text) - cmbSeesound.Text = TrimComplete(cmbSeesound.Text) - txtReactiontime.Text = TrimComplete(txtReactiontime.Text) - cmbAttacksound.Text = TrimComplete(cmbAttacksound.Text) - cmbPainstate.Text = TrimComplete(cmbPainstate.Text) - txtPainchance.Text = TrimComplete(txtPainchance.Text) - cmbPainsound.Text = TrimComplete(cmbPainsound.Text) - cmbMeleestate.Text = TrimComplete(cmbMeleestate.Text) - cmbMissilestate.Text = TrimComplete(cmbMissilestate.Text) - cmbDeathstate.Text = TrimComplete(cmbDeathstate.Text) - cmbDeathsound.Text = TrimComplete(cmbDeathsound.Text) - cmbXdeathstate.Text = TrimComplete(cmbXdeathstate.Text) - txtSpeed.Text = TrimComplete(txtSpeed.Text) - txtRadius.Text = TrimComplete(txtRadius.Text) - txtHeight.Text = TrimComplete(txtHeight.Text) - txtMass.Text = TrimComplete(txtMass.Text) - txtDamage.Text = TrimComplete(txtDamage.Text) - cmbActivesound.Text = TrimComplete(cmbActivesound.Text) - cmbRaisestate.Text = TrimComplete(cmbRaisestate.Text) - flags = 0 - ' Only 31 bits can be used, because VB is stupid. - For i = 0 To 26 - If chkFlags(i).Value = 1 Then flags = flags + Val(chkFlags(i).Tag) - Next - If txtDoomednum.Text <> "" Then tsTarget.WriteLine "MAPTHINGNUM = " & Val(txtDoomednum.Text) - If cmbSpawnstate.Text <> "" Then tsTarget.WriteLine "SPAWNSTATE = " & Val(cmbSpawnstate.Text) - If txtSpawnhealth.Text <> "" Then tsTarget.WriteLine "SPAWNHEALTH = " & Val(txtSpawnhealth.Text) - If cmbSeestate.Text <> "" Then tsTarget.WriteLine "SEESTATE = " & Val(cmbSeestate.Text) - If cmbSeesound.Text <> "" Then tsTarget.WriteLine "SEESOUND = " & Val(cmbSeesound.Text) - If txtReactiontime.Text <> "" Then tsTarget.WriteLine "REACTIONTIME = " & Val(txtReactiontime.Text) - If cmbAttacksound.Text <> "" Then tsTarget.WriteLine "ATTACKSOUND = " & Val(cmbAttacksound.Text) - If cmbPainstate.Text <> "" Then tsTarget.WriteLine "PAINSTATE = " & Val(cmbPainstate.Text) - If txtPainchance.Text <> "" Then tsTarget.WriteLine "PAINCHANCE = " & Val(txtPainchance.Text) - If cmbPainsound.Text <> "" Then tsTarget.WriteLine "PAINSOUND = " & Val(cmbPainsound.Text) - If cmbMeleestate.Text <> "" Then tsTarget.WriteLine "MELEESTATE = " & Val(cmbMeleestate.Text) - If cmbMissilestate.Text <> "" Then tsTarget.WriteLine "MISSILESTATE = " & Val(cmbMissilestate.Text) - If cmbDeathstate.Text <> "" Then tsTarget.WriteLine "DEATHSTATE = " & Val(cmbDeathstate.Text) - If cmbDeathsound.Text <> "" Then tsTarget.WriteLine "DEATHSOUND = " & Val(cmbDeathsound.Text) - If cmbXdeathstate.Text <> "" Then tsTarget.WriteLine "XDEATHSTATE = " & Val(cmbXdeathstate.Text) - If txtSpeed.Text <> "" Then tsTarget.WriteLine "SPEED = " & Val(txtSpeed.Text) - If txtRadius.Text <> "" Then tsTarget.WriteLine "RADIUS = " & Val(txtRadius.Text) - If txtHeight.Text <> "" Then tsTarget.WriteLine "HEIGHT = " & Val(txtHeight.Text) - If txtMass.Text <> "" Then tsTarget.WriteLine "MASS = " & Val(txtMass.Text) - If txtDamage.Text <> "" Then tsTarget.WriteLine "DAMAGE = " & Val(txtDamage.Text) - If cmbActivesound.Text <> "" Then tsTarget.WriteLine "ACTIVESOUND = " & Val(cmbActivesound.Text) - If cmbRaisestate.Text <> "" Then tsTarget.WriteLine "RAISESTATE = " & Val(cmbRaisestate.Text) - tsTarget.WriteLine "FLAGS = " & flags - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If thingfound = True Then - MsgBox "Thing removed from SOC." - Else - MsgBox "Thing not found in SOC." - End If - Else - MsgBox "Thing Saved." - End If -End Sub diff --git a/tools/SOCEdit/Things.frx b/tools/SOCEdit/Things.frx deleted file mode 100644 index 980538679b05296de823a191f94f0564401fd92d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1094 zcmb7@F>V_%5Jf*NBa1YVwlZ8bguo>ysh?txuZQfIDs5wrO4i z6*PoZbDb3pJ26%}!93CsvY^`WP1>}|>9DztMak1cXxm#`(d4~p*ajNqy`3iUC?{@w zk>z&KapGBSftY{e`dG>l*oZIJCqF&Mdu1C_%Q9`eP_z0w&U+O3IkerVp)Afj=GI^;PI13#+b=1~t1f0E7pc}Wk)}X-++Pbw1Kfzmn>#=L@&JNC8U8D=Z#Q>cKg{gzHsA$VpHILP?E1XJKRi4=PKKV2h9~a- z_PMKVL+P}Q{b%>Tf|?Cv=9mqAWj%%^EMe0%El9`u#W1sWx0l24n6_f2k#EOV*`7&5 gC9V0s*L>%u?60IH&hkb2gXUL8h5Zfg!85S&7jZm2vH$=8 diff --git a/tools/SOCEdit/frmCharacterEdit.frm b/tools/SOCEdit/frmCharacterEdit.frm deleted file mode 100644 index 415fcbb0f..000000000 --- a/tools/SOCEdit/frmCharacterEdit.frm +++ /dev/null @@ -1,320 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmCharacterEdit - Caption = "Character Edit" - ClientHeight = 3345 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 4680 - Icon = "frmCharacterEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 3345 - ScaleWidth = 4680 - Begin VB.CommandButton cmdExample - Caption = "Show Me An &Example" - Height = 495 - Left = 1320 - Style = 1 'Graphical - TabIndex = 14 - Top = 2400 - Width = 975 - End - Begin VB.CheckBox chkEnabled - Caption = "Enable this player selection." - Height = 495 - Left = 1080 - TabIndex = 13 - Top = 1560 - Width = 1455 - End - Begin VB.CommandButton cmdDelete - Caption = "&Delete from SOC" - Height = 495 - Left = 120 - Style = 1 'Graphical - TabIndex = 12 - Top = 2760 - Width = 855 - End - Begin VB.CommandButton cmdSave - Caption = "&Save" - Height = 495 - Left = 120 - TabIndex = 11 - Top = 2160 - Width = 855 - End - Begin VB.TextBox txtSkinname - Height = 285 - Left = 3240 - TabIndex = 9 - Top = 1200 - Width = 1335 - End - Begin VB.TextBox txtPicname - Height = 285 - Left = 3240 - MaxLength = 8 - TabIndex = 7 - Top = 840 - Width = 1095 - End - Begin VB.TextBox txtMenuposition - Height = 285 - Left = 3240 - MaxLength = 3 - TabIndex = 5 - Top = 480 - Width = 495 - End - Begin VB.TextBox txtPlayername - Height = 285 - Left = 3240 - MaxLength = 64 - TabIndex = 3 - Top = 120 - Width = 1335 - End - Begin VB.TextBox txtPlayertext - Height = 1455 - Left = 2640 - MultiLine = -1 'True - TabIndex = 1 - Top = 1800 - Width = 1935 - End - Begin VB.ListBox lstPlayers - Height = 1815 - ItemData = "frmCharacterEdit.frx":0442 - Left = 120 - List = "frmCharacterEdit.frx":0461 - TabIndex = 0 - Top = 240 - Width = 855 - End - Begin VB.Label lblSkinname - Caption = "Name of player (skin) to use:" - Height = 255 - Left = 1080 - TabIndex = 10 - Top = 1200 - Width = 2055 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture to display:" - Height = 255 - Left = 1560 - TabIndex = 8 - Top = 840 - Width = 1575 - End - Begin VB.Label lblMenuposition - Alignment = 1 'Right Justify - Caption = "Vertical menu position:" - Height = 255 - Left = 1320 - TabIndex = 6 - Top = 480 - Width = 1815 - End - Begin VB.Label lblPlayername - Alignment = 1 'Right Justify - Caption = "Displayed name of player:" - Height = 255 - Left = 1320 - TabIndex = 4 - Top = 120 - Width = 1815 - End - Begin VB.Label lblPlayertext - Caption = "Short Description:" - Height = 255 - Left = 2640 - TabIndex = 2 - Top = 1560 - Width = 1455 - End -End -Attribute VB_Name = "frmCharacterEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdDelete_Click() - Call WriteCharacter(True) -End Sub - -Private Sub cmdExample_Click() - txtPlayername.Text = "SONIC" - txtMenuposition.Text = "20" - txtPicname.Text = "SONCCHAR" - txtSkinname.Text = "SONIC" - chkEnabled.Value = 1 - txtPlayertext.Text = " Fastest" & vbCrLf & " Speed Thok" & vbCrLf & " Not a good pick" & vbCrLf & "for starters, but when" & vbCrLf & "controlled properly," & vbCrLf & "Sonic is the most" & vbCrLf & "powerful of the three." -End Sub - -Private Sub cmdSave_Click() - Call WriteCharacter(False) -End Sub - -Private Sub ClearForm() - txtPlayername.Text = "" - txtMenuposition.Text = "" - txtPicname.Text = "" - txtSkinname.Text = "" - chkEnabled.Value = 0 - txtPlayertext.Text = "" -End Sub - -Private Sub ReadSOCPlayer(num As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "CHARACTER" And Val(word2) = num Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "PLAYERTEXT" Then - Dim startclip As Integer, endclip As Integer - startclip = InStr(line, "=") - - startclip = startclip + 2 - - line = Mid(line, startclip, Len(line)) - - txtPlayertext.Text = line & vbCrLf - - Do While InStr(line, "#") = 0 And Not ts.AtEndOfStream - line = ts.ReadLine & vbCrLf - txtPlayertext.Text = txtPlayertext.Text & line - Loop - - txtPlayertext.Text = RTrimComplete(txtPlayertext.Text) - If Right(txtPlayertext.Text, 1) = "#" Then - txtPlayertext.Text = Left(txtPlayertext.Text, Len(txtPlayertext.Text) - 1) - End If - ElseIf word = "PLAYERNAME" Then - txtPlayername.Text = word2 - ElseIf word = "MENUPOSITION" Then - txtMenuposition.Text = Val(word2) - ElseIf word = "PICNAME" Then - txtPicname.Text = word2 - ElseIf word = "STATUS" Then - If Val(word2) = 32 Then - chkEnabled.Value = 1 - Else - chkEnabled.Value = 0 - End If - ElseIf word = "SKINNAME" Then - txtSkinname.Text = word2 - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub lstPlayers_Click() - Call ClearForm - Call ReadSOCPlayer(lstPlayers.ListIndex) -End Sub - -Private Sub WriteCharacter(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim charfound As Boolean - - charfound = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current character exists in the SOC, delete it. - If word = "CHARACTER" And Val(word2) = lstPlayers.ListIndex Then - charfound = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "CHARACTER " & lstPlayers.ListIndex - txtPlayername.Text = TrimComplete(txtPlayername.Text) - txtMenuposition.Text = TrimComplete(txtMenuposition.Text) - txtPicname.Text = TrimComplete(txtPicname.Text) - txtSkinname.Text = TrimComplete(txtSkinname.Text) - If txtPlayername.Text <> "" Then tsTarget.WriteLine "PLAYERNAME = " & txtPlayername.Text - If txtMenuposition.Text <> "" Then tsTarget.WriteLine "MENUPOSITION = " & Val(txtMenuposition.Text) - If txtPicname.Text <> "" Then tsTarget.WriteLine "PICNAME = " & txtPicname.Text - If txtSkinname.Text <> "" Then tsTarget.WriteLine "SKINNAME = " & txtSkinname.Text - If chkEnabled.Value = 1 Then - tsTarget.WriteLine "STATUS = 32" - Else - tsTarget.WriteLine "STATUS = 0" - End If - If txtPlayertext.Text <> "" Then tsTarget.WriteLine "PLAYERTEXT = " & txtPlayertext.Text & "#" - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If charfound = True Then - MsgBox "Player choice removed from SOC." - Else - MsgBox "Player choice not found in SOC." - End If - Else - MsgBox "Character Saved." - End If -End Sub - diff --git a/tools/SOCEdit/frmCharacterEdit.frx b/tools/SOCEdit/frmCharacterEdit.frx deleted file mode 100644 index 5e767f4abcf8678dcf707d1b13737541a8a4a58d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1215 zcmb7@v2xQu5QhJY8H5{bRhd*##iR@b0u|01z$;Kdl_JA1<8fs%6tqdHDz74*fJeX` zbf~jEqxkstBp+um1t49Jse0U z#0qc$oWeAfX!nm&;#OI9h9|D-y2e_R`kNv~td76Oche-gMA5LSy9aU8| zoyI^0^?o_M>J?LVVl20Ud7$3+f^5sz-KJTe_UoHalzzJRRdr)4n!GU$+dzZ7v9IZP zkP|n4-OKGmM;-6w76|#@T*Fk3z(#nvrt`b!Xs2u=YMG{uCu&yzgYzCqehy7}15LT9 z)8+r-d`7Yy?(THbJJS*Da4VzVu<2?*QJK8Z1RVRCooZ@ZY5<(QlcyUux>Bpwwc5Cq z^B=+YhN%lav{pMQ@6T?_(b+fP4eC+8BKB@}TQ}{*&Tb9vfc5zp6kyxuHU9ol(&J?4 z>0o%`{%@bV+%}Yss?dLS{!6G?PiBr;(^uAGSi%yvJEm*Wp?)FEtnKObVR%SevAWTp zj;*pemfB2O@qe%Q&rR7}NDG|Bo%99Gryd#hGx!RAf}sY~=k#CqP!G6XU%r{WeP5hL Y?{V~=MDHwmPowuNdgsx59=#X80L21WnE(I) diff --git a/tools/SOCEdit/frmCutsceneEdit.frm b/tools/SOCEdit/frmCutsceneEdit.frm deleted file mode 100644 index 7fb18feed..000000000 --- a/tools/SOCEdit/frmCutsceneEdit.frm +++ /dev/null @@ -1,1365 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmCutsceneEdit - Caption = "Cutscene Edit" - ClientHeight = 6495 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 10410 - Icon = "frmCutsceneEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 6495 - ScaleWidth = 10410 - StartUpPosition = 3 'Windows Default - Begin VB.TextBox txtNumScenes - Height = 285 - Left = 3480 - MaxLength = 3 - TabIndex = 97 - Top = 240 - Width = 615 - End - Begin VB.ListBox lstScene - Height = 450 - ItemData = "frmCutsceneEdit.frx":0442 - Left = 3360 - List = "frmCutsceneEdit.frx":0444 - TabIndex = 94 - Top = 600 - Width = 735 - End - Begin VB.ComboBox cmbMusicslot - Height = 315 - Left = 8760 - TabIndex = 93 - Top = 1680 - Width = 1575 - End - Begin VB.Frame frmPic1 - Caption = "Picture 8:" - Height = 1335 - Index = 7 - Left = 7440 - TabIndex = 80 - Top = 5040 - Width = 2895 - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 7 - Left = 600 - MaxLength = 3 - TabIndex = 85 - Top = 960 - Width = 495 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 7 - Left = 600 - MaxLength = 3 - TabIndex = 84 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 7 - Left = 2040 - MaxLength = 5 - TabIndex = 83 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 7 - Left = 1320 - TabIndex = 82 - Top = 240 - Width = 1455 - End - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 7 - Left = 1320 - TabIndex = 81 - Top = 960 - Width = 1455 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 7 - Left = 240 - TabIndex = 89 - Top = 960 - Width = 255 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 7 - Left = 240 - TabIndex = 88 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 7 - Left = 1200 - TabIndex = 87 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 7 - Left = 120 - TabIndex = 86 - Top = 240 - Width = 1095 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 7:" - Height = 1335 - Index = 6 - Left = 4440 - TabIndex = 70 - Top = 5040 - Width = 2895 - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 6 - Left = 600 - MaxLength = 3 - TabIndex = 75 - Top = 960 - Width = 495 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 6 - Left = 600 - MaxLength = 3 - TabIndex = 74 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 6 - Left = 2040 - MaxLength = 5 - TabIndex = 73 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 6 - Left = 1320 - TabIndex = 72 - Top = 240 - Width = 1455 - End - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 6 - Left = 1320 - TabIndex = 71 - Top = 960 - Width = 1455 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 6 - Left = 240 - TabIndex = 79 - Top = 960 - Width = 255 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 6 - Left = 240 - TabIndex = 78 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 6 - Left = 1200 - TabIndex = 77 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 6 - Left = 120 - TabIndex = 76 - Top = 240 - Width = 1095 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 6:" - Height = 1335 - Index = 5 - Left = 7440 - TabIndex = 60 - Top = 3600 - Width = 2895 - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 5 - Left = 600 - MaxLength = 3 - TabIndex = 65 - Top = 960 - Width = 495 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 5 - Left = 600 - MaxLength = 3 - TabIndex = 64 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 5 - Left = 2040 - MaxLength = 5 - TabIndex = 63 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 5 - Left = 1320 - TabIndex = 62 - Top = 240 - Width = 1455 - End - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 5 - Left = 1320 - TabIndex = 61 - Top = 960 - Width = 1455 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 5 - Left = 240 - TabIndex = 69 - Top = 960 - Width = 255 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 5 - Left = 240 - TabIndex = 68 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 5 - Left = 1200 - TabIndex = 67 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 5 - Left = 120 - TabIndex = 66 - Top = 240 - Width = 1095 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 5:" - Height = 1335 - Index = 4 - Left = 4440 - TabIndex = 50 - Top = 3600 - Width = 2895 - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 4 - Left = 600 - MaxLength = 3 - TabIndex = 55 - Top = 960 - Width = 495 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 4 - Left = 600 - MaxLength = 3 - TabIndex = 54 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 4 - Left = 2040 - MaxLength = 5 - TabIndex = 53 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 4 - Left = 1320 - TabIndex = 52 - Top = 240 - Width = 1455 - End - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 4 - Left = 1320 - TabIndex = 51 - Top = 960 - Width = 1455 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 4 - Left = 240 - TabIndex = 59 - Top = 960 - Width = 255 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 4 - Left = 240 - TabIndex = 58 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 4 - Left = 1200 - TabIndex = 57 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 4 - Left = 120 - TabIndex = 56 - Top = 240 - Width = 1095 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 4:" - Height = 1335 - Index = 3 - Left = 1440 - TabIndex = 40 - Top = 3600 - Width = 2895 - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 3 - Left = 1320 - TabIndex = 45 - Top = 960 - Width = 1455 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 3 - Left = 1320 - TabIndex = 44 - Top = 240 - Width = 1455 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 3 - Left = 2040 - MaxLength = 5 - TabIndex = 43 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 3 - Left = 600 - MaxLength = 3 - TabIndex = 42 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 3 - Left = 600 - MaxLength = 3 - TabIndex = 41 - Top = 960 - Width = 495 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 3 - Left = 120 - TabIndex = 49 - Top = 240 - Width = 1095 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 3 - Left = 1200 - TabIndex = 48 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 3 - Left = 240 - TabIndex = 47 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 3 - Left = 240 - TabIndex = 46 - Top = 960 - Width = 255 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 3:" - Height = 1335 - Index = 2 - Left = 7440 - TabIndex = 30 - Top = 2160 - Width = 2895 - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 2 - Left = 1320 - TabIndex = 35 - Top = 960 - Width = 1455 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 2 - Left = 1320 - TabIndex = 34 - Top = 240 - Width = 1455 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 2 - Left = 2040 - MaxLength = 5 - TabIndex = 33 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 2 - Left = 600 - MaxLength = 3 - TabIndex = 32 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 2 - Left = 600 - MaxLength = 3 - TabIndex = 31 - Top = 960 - Width = 495 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 2 - Left = 120 - TabIndex = 39 - Top = 240 - Width = 1095 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 2 - Left = 1200 - TabIndex = 38 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 2 - Left = 240 - TabIndex = 37 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 2 - Left = 240 - TabIndex = 36 - Top = 960 - Width = 255 - End - End - Begin VB.Frame frmPic1 - Caption = "Picture 2:" - Height = 1335 - Index = 1 - Left = 4440 - TabIndex = 20 - Top = 2160 - Width = 2895 - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 1 - Left = 1320 - TabIndex = 25 - Top = 960 - Width = 1455 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 1 - Left = 1320 - TabIndex = 24 - Top = 240 - Width = 1455 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 1 - Left = 2040 - MaxLength = 5 - TabIndex = 23 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 1 - Left = 600 - MaxLength = 3 - TabIndex = 22 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 1 - Left = 600 - MaxLength = 3 - TabIndex = 21 - Top = 960 - Width = 495 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 1 - Left = 120 - TabIndex = 29 - Top = 240 - Width = 1095 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 1 - Left = 1200 - TabIndex = 28 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 1 - Left = 240 - TabIndex = 27 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 1 - Left = 240 - TabIndex = 26 - Top = 960 - Width = 255 - End - End - Begin VB.TextBox txtTextypos - Height = 285 - Left = 3120 - MaxLength = 3 - TabIndex = 19 - Top = 5880 - Width = 615 - End - Begin VB.TextBox txtTextxpos - Height = 285 - Left = 3120 - MaxLength = 3 - TabIndex = 18 - Top = 5520 - Width = 615 - End - Begin VB.Frame frmPic1 - Caption = "Picture 1:" - Height = 1335 - Index = 0 - Left = 1440 - TabIndex = 6 - Top = 2160 - Width = 2895 - Begin VB.TextBox txtPicycoord - Height = 285 - Index = 0 - Left = 600 - MaxLength = 3 - TabIndex = 14 - Top = 960 - Width = 495 - End - Begin VB.TextBox txtPicXcoord - Height = 285 - Index = 0 - Left = 600 - MaxLength = 3 - TabIndex = 12 - Top = 600 - Width = 495 - End - Begin VB.TextBox txtPicduration - Height = 285 - Index = 0 - Left = 2040 - MaxLength = 5 - TabIndex = 11 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtPicname - Height = 285 - Index = 0 - Left = 1320 - TabIndex = 8 - Top = 240 - Width = 1455 - End - Begin VB.CheckBox chkPichires - Caption = "High-Resolution" - Height = 255 - Index = 0 - Left = 1320 - TabIndex = 7 - Top = 960 - Width = 1455 - End - Begin VB.Label lblPicycoord - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Index = 0 - Left = 240 - TabIndex = 15 - Top = 960 - Width = 255 - End - Begin VB.Label lblPicxcoord - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Index = 0 - Left = 240 - TabIndex = 13 - Top = 600 - Width = 255 - End - Begin VB.Label lblPicduration - Alignment = 1 'Right Justify - Caption = "Duration:" - Height = 255 - Index = 0 - Left = 1200 - TabIndex = 10 - Top = 600 - Width = 735 - End - Begin VB.Label lblPicname - Alignment = 1 'Right Justify - Caption = "Picture Name:" - Height = 255 - Index = 0 - Left = 120 - TabIndex = 9 - Top = 240 - Width = 1095 - End - End - Begin VB.TextBox txtNumberofpics - Height = 285 - Left = 3840 - MaxLength = 1 - TabIndex = 5 - Top = 1800 - Width = 375 - End - Begin VB.TextBox txtScenetext - Height = 1815 - Left = 4440 - MultiLine = -1 'True - TabIndex = 3 - Top = 240 - Width = 3135 - End - Begin VB.CommandButton cmdSave - Caption = "&Save Scene" - Height = 495 - Left = 3360 - Style = 1 'Graphical - TabIndex = 1 - Top = 1200 - Width = 855 - End - Begin VB.ListBox lstCutscenes - Height = 6300 - ItemData = "frmCutsceneEdit.frx":0446 - Left = 120 - List = "frmCutsceneEdit.frx":0448 - TabIndex = 0 - Top = 120 - Width = 1215 - End - Begin VB.Label Label3 - Caption = "Note: The cutscene editor is not fully functional. Only use it to get an idea of the proper syntax to use." - BeginProperty Font - Name = "MS Sans Serif" - Size = 9.75 - Charset = 0 - Weight = 700 - Underline = 0 'False - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 1335 - Left = 7680 - TabIndex = 98 - Top = 240 - Width = 2655 - End - Begin VB.Label Label2 - Caption = "For Scene Text:" - BeginProperty Font - Name = "MS Sans Serif" - Size = 8.25 - Charset = 0 - Weight = 400 - Underline = -1 'True - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 255 - Left = 1560 - TabIndex = 96 - Top = 5160 - Width = 1695 - End - Begin VB.Label Label1 - Caption = "Enter all time durations in game tics (35 = 1 second)" - BeginProperty Font - Name = "MS Sans Serif" - Size = 8.25 - Charset = 0 - Weight = 700 - Underline = 0 'False - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 855 - Left = 1560 - TabIndex = 95 - Top = 960 - Width = 1335 - End - Begin VB.Label lblMusicslot - Alignment = 1 'Right Justify - Caption = "Music to play:" - Height = 255 - Left = 7680 - TabIndex = 92 - Top = 1680 - Width = 975 - End - Begin VB.Label lblCurrentScene - Alignment = 1 'Right Justify - Caption = "Current Scene:" - Height = 255 - Left = 1920 - TabIndex = 91 - Top = 720 - Width = 1215 - End - Begin VB.Label lblNumScenes - Alignment = 1 'Right Justify - Caption = "Number of Scenes in this Cutscene:" - Height = 375 - Left = 1440 - TabIndex = 90 - Top = 120 - Width = 1935 - End - Begin VB.Label lblTextypos - Alignment = 1 'Right Justify - Caption = "Text Y Position:" - Height = 255 - Left = 1800 - TabIndex = 17 - Top = 5880 - Width = 1215 - End - Begin VB.Label lblTextxpos - Alignment = 1 'Right Justify - Caption = "Text X Position:" - Height = 255 - Left = 1800 - TabIndex = 16 - Top = 5520 - Width = 1215 - End - Begin VB.Label lblNumberofpics - Alignment = 1 'Right Justify - Caption = "Number of Pictures (max 8):" - Height = 255 - Left = 1560 - TabIndex = 4 - Top = 1800 - Width = 2175 - End - Begin VB.Label lblScenetext - Caption = "Scene Text:" - Height = 255 - Left = 4440 - TabIndex = 2 - Top = 0 - Width = 1215 - End -End -Attribute VB_Name = "frmCutsceneEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdSave_Click() - Call WriteScene(False) -End Sub - -Private Sub lstScene_Click() - Call ClearForm - Call LoadSOCCutscene(Val(lstCutscenes.List(lstCutscenes.ListIndex)), Val(lstScene.List(lstScene.ListIndex))) -End Sub - -Private Sub LoadMusic() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Music list (don't edit this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbMusicslot.Clear - - Do While InStr(line, "NUMMUSIC") = 0 - startclip = InStr(line, "mus_") - If InStr(line, "mus_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - cmbMusicslot.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub cmdReload_Click() - Call Reload -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub Reload() - ClearForm - Call ReadCutsceneSOCNumbers - Call LoadMusic - If lstCutscenes.ListCount > 0 Then - lstCutscenes.ListIndex = 0 - End If -End Sub - -Private Sub LoadSOCCutscene(CutNum As Integer, SceneNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim ind As Integer - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - ' WOW! This looks fun, don't it?! - If UCase(word) = "CUTSCENE" And Val(word2) = CutNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - If word = "NUMSCENES" Then - txtNumScenes.Text = Val(word2) - ElseIf UCase(word) = "SCENE" And Val(word2) = SceneNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "SCENETEXT" Then - Dim startclip As Integer, endclip As Integer - startclip = InStr(line, "=") - - startclip = startclip + 2 - - line = Mid(line, startclip, Len(line)) - - txtScenetext.Text = line & vbCrLf - - Do While InStr(line, "#") = 0 And Not ts.AtEndOfStream - line = ts.ReadLine & vbCrLf - txtScenetext.Text = txtScenetext.Text & line - Loop - - txtScenetext.Text = RTrimComplete(txtScenetext.Text) - If Right(txtScenetext.Text, 1) = "#" Then - txtScenetext.Text = Left(txtScenetext.Text, Len(txtScenetext.Text) - 1) - End If - ElseIf word = "PIC1NAME" Or word = "PIC2NAME" Or word = "PIC3NAME" Or word = "PIC4NAME" Or word = "PIC5NAME" Or word = "PIC6NAME" Or word = "PIC7NAME" Or word = "PIC8NAME" Then - ind = Val(Mid(word, 4, 1)) - 1 - txtPicname(ind).Text = word2 - ElseIf word = "PIC1HIRES" Or word = "PIC2HIRES" Or word = "PIC3HIRES" Or word = "PIC4HIRES" Or word = "PIC5HIRES" Or word = "PIC6HIRES" Or word = "PIC7HIRES" Or word = "PIC8HIRES" Then - ind = Val(Mid(word, 4, 1)) - 1 - chkPichires(ind).Value = Val(word2) - ElseIf word = "PIC1DURATION" Or word = "PIC2DURATION" Or word = "PIC3DURATION" Or word = "PIC4DURATION" Or word = "PIC5DURATION" Or word = "PIC6DURATION" Or word = "PIC7DURATION" Or word = "PIC8DURATION" Then - ind = Val(Mid(word, 4, 1)) - 1 - txtPicduration(ind).Text = Val(word2) - ElseIf word = "PIC1XCOORD" Or word = "PIC2XCOORD" Or word = "PIC3XCOORD" Or word = "PIC4XCOORD" Or word = "PIC5XCOORD" Or word = "PIC6XCOORD" Or word = "PIC7XCOORD" Or word = "PIC8XCOORD" Then - ind = Val(Mid(word, 4, 1)) - 1 - txtPicXcoord(ind).Text = Val(word2) - ElseIf word = "PIC1YCOORD" Or word = "PIC2YCOORD" Or word = "PIC3YCOORD" Or word = "PIC4YCOORD" Or word = "PIC5YCOORD" Or word = "PIC6YCOORD" Or word = "PIC7YCOORD" Or word = "PIC8YCOORD" Then - ind = Val(Mid(word, 4, 1)) - 1 - txtPicycoord(ind).Text = Val(word2) - ElseIf word = "TEXTXPOS" Then - txtTextxpos.Text = Val(word2) - ElseIf word = "TEXTYPOS" Then - txtTextypos.Text = Val(word2) - ElseIf word = "MUSICSLOT" Then - cmbMusicslot.ListIndex = Val(word2) - ElseIf word = "NUMBEROFPICS" Then - txtNumberofpics.Text = Val(word2) - ElseIf word = "SCENE" Then 'End of scene data - line = "" - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ReadCutsceneSOCNumbers() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - - lstCutscenes.Clear - -CutsceneLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo CutsceneLoad - - If Left(line, 1) = vbCrLf Then GoTo CutsceneLoad - - If Len(line) < 1 Then GoTo CutsceneLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "CUTSCENE" Then - lstCutscenes.AddItem (Val(word2)) - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ClearForm() - Dim i As Integer - - For i = 0 To 7 - chkPichires(i).Value = 0 - txtPicXcoord(i).Text = "" - txtPicycoord(i).Text = "" - txtPicname(i).Text = "" - txtPicduration(i).Text = "" - Next - - txtScenetext.Text = "" - txtNumberofpics.Text = "" - txtTextxpos.Text = "" - txtTextypos.Text = "" - cmbMusicslot.Text = "" -End Sub - -Private Sub lstCutscenes_Click() - Dim i As Integer - - LoadNumScenes (Val(lstCutscenes.List(lstCutscenes.ListIndex))) - - lstScene.Clear - For i = 1 To Val(txtNumScenes.Text) - lstScene.AddItem i - Next - - If Val(txtNumScenes) > 0 Then - lstScene.ListIndex = lstScene.ListCount - 1 - lstScene.ListIndex = 0 - End If -End Sub - -Private Sub LoadNumScenes(CutNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim ind As Integer - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - ' WOW! This looks fun, don't it?! - If UCase(word) = "CUTSCENE" And Val(word2) = CutNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - If word = "NUMSCENES" Then - txtNumScenes.Text = Val(word2) - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub WriteScene(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim i As Integer - Dim CutsceneNum As Integer - Dim InCutScene As Boolean - Dim scenefound As Boolean - Dim nevercheckagain As Boolean - - ' This whole sub is a mess, but it works, - ' so I'd better not touch it... - scenefound = False - nevercheckagain = False - - InCutScene = False - CutsceneNum = Val(lstCutscenes.List(lstCutscenes.ListIndex)) - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - If nevercheckagain = False And word = "CUTSCENE" And Val(word2) = CutsceneNum Then - InCutScene = True - tsTarget.WriteLine "CUTSCENE " & Val(lstCutscenes.List(lstCutscenes.ListIndex)) - tsTarget.WriteLine "NUMSCENES " & Val(txtNumScenes.Text) - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - If word = "NUMSCENES" Then - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - End If - End If - - 'If the current scene exists in the SOC, delete it. - If nevercheckagain = False And InCutScene = True And word = "SCENE" And Val(word2) = Val(lstScene.List(lstScene.ListIndex)) Then - scenefound = True - line = tsSource.ReadLine - Do While (Left(UCase(line), 6) <> "SCENE " And Len(TrimComplete(line)) > 0) And Not (tsSource.AtEndOfStream) - line = tsSource.ReadLine - Loop - If Remove = False Then - tsTarget.WriteLine "SCENE " & Val(lstScene.List(lstScene.ListIndex)) - txtNumberofpics.Text = TrimComplete(txtNumberofpics.Text) - txtTextxpos.Text = TrimComplete(txtTextxpos.Text) - txtTextypos.Text = TrimComplete(txtTextypos.Text) - cmbMusicslot.Text = TrimComplete(cmbMusicslot.Text) - - For i = 0 To 7 - txtPicname(i).Text = TrimComplete(txtPicname(i).Text) - txtPicXcoord(i).Text = TrimComplete(txtPicXcoord(i).Text) - txtPicycoord(i).Text = TrimComplete(txtPicycoord(i).Text) - txtPicduration(i).Text = TrimComplete(txtPicduration(i).Text) - Next - - If txtNumberofpics.Text <> "" Then tsTarget.WriteLine "NUMBEROFPICS = " & Val(txtNumberofpics.Text) - If txtTextxpos.Text <> "" Then tsTarget.WriteLine "TEXTXPOS = " & Val(txtTextxpos.Text) - If txtTextypos.Text <> "" Then tsTarget.WriteLine "TEXTYPOS = " & Val(txtTextypos.Text) - If cmbMusicslot.Text <> "" Then tsTarget.WriteLine "MUSICSLOT = " & Val(cmbMusicslot.Text) - - For i = 0 To 7 - If txtPicname(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "NAME = " & txtPicname(i).Text - - If chkPichires(i).Value = 1 Then tsTarget.WriteLine "PIC" & (i + 1) & "HIRES = 1" - - If txtPicXcoord(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "XCOORD = " & Val(txtPicXcoord(i).Text) - If txtPicycoord(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "YCOORD = " & Val(txtPicycoord(i).Text) - If txtPicduration(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "DURATION = " & Val(txtPicduration(i).Text) - Next - If txtScenetext.Text <> "" Then tsTarget.WriteLine "SCENETEXT = " & txtScenetext.Text & "#" - End If - InCutScene = False - nevercheckagain = True - End If - tsTarget.WriteLine line - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False And scenefound = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "CUTSCENE " & Val(lstCutscenes.List(lstCutscenes.ListIndex)) - tsTarget.WriteLine "NUMSCENES " & Val(txtNumScenes.Text) - tsTarget.WriteLine "SCENE " & Val(lstScene.List(lstScene.ListIndex)) - txtNumberofpics.Text = TrimComplete(txtNumberofpics.Text) - txtScenetext.Text = TrimComplete(txtScenetext.Text) - txtTextxpos.Text = TrimComplete(txtTextxpos.Text) - txtTextypos.Text = TrimComplete(txtTextypos.Text) - cmbMusicslot.Text = TrimComplete(cmbMusicslot.Text) - - For i = 0 To 7 - txtPicname(i).Text = TrimComplete(txtPicname(i).Text) - txtPicXcoord(i).Text = TrimComplete(txtPicXcoord(i).Text) - txtPicycoord(i).Text = TrimComplete(txtPicycoord(i).Text) - txtPicduration(i).Text = TrimComplete(txtPicduration(i).Text) - Next - - If txtNumberofpics.Text <> "" Then tsTarget.WriteLine "NUMBEROFPICS = " & Val(txtNumberofpics.Text) - If txtScenetext.Text <> "" Then tsTarget.WriteLine "SCENETEXT = " & txtScenetext.Text & "#" - If txtTextxpos.Text <> "" Then tsTarget.WriteLine "TEXTXPOS = " & Val(txtTextxpos.Text) - If txtTextypos.Text <> "" Then tsTarget.WriteLine "TEXTYPOS = " & Val(txtTextypos.Text) - If cmbMusicslot.Text <> "" Then tsTarget.WriteLine "MUSICSLOT = " & Val(cmbMusicslot.Text) - - For i = 0 To 7 - If txtPicname(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "NAME = " & txtPicname(i).Text - - If chkPichires(i).Value = 1 Then tsTarget.WriteLine "PIC" & (i + 1) & "HIRES = 1" - - If txtPicXcoord(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "XCOORD = " & Val(txtPicXcoord(i).Text) - If txtPicycoord(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "YCOORD = " & Val(txtPicycoord(i).Text) - If txtPicduration(i).Text <> "" Then tsTarget.WriteLine "PIC" & (i + 1) & "DURATION = " & Val(txtPicduration(i).Text) - Next - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If scenefound = True Then - MsgBox "Scene removed from SOC." - Else - MsgBox "Scene not found in SOC." - End If - Else - MsgBox "Scene Saved." - End If -End Sub diff --git a/tools/SOCEdit/frmCutsceneEdit.frx b/tools/SOCEdit/frmCutsceneEdit.frx deleted file mode 100644 index 6f844e6431ce040d0f52f774e59f1b79b7f8e03d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1098 zcmb7@v2NQi5QcxoMTIW0H3gaCsmNZSW1TnXTXgD>p@5Ld3^H_eMooDY|8C8rb3=QDHl`$T$=oy`)zbkgZWx+FFS zSHLMwlSg}ec!|HfPlhM1x~{`oBE-K!Fc0vvkUfqMSJ!0%TAvjGXnoc^2i$qvwoUUK zsGuQin(M4+*omPQ(_wcXi;|~@(6;xsqRD&HunjcIdpk|yQBK_W zD$DJl)5Npf0x|!>^{$j7un}LbPkwq%56U*BmSx&_p=R}0ocAd5OK8b^Xvs}oF8>eb z7{zk9hto+POh<6Qt&CyMrrQZcW%61Ja1lCo>Zq;P1UP%AKsWAntwDnuw0BzV#hSGT(`_Jxw12r4SEHOL!%6be-Si+`jT9Jw|wWO?60IX&iYAuM01x>VZVbP;13wbUuY9OvH$=8 diff --git a/tools/SOCEdit/frmEmblemEdit.frm b/tools/SOCEdit/frmEmblemEdit.frm deleted file mode 100644 index f94255b9c..000000000 --- a/tools/SOCEdit/frmEmblemEdit.frm +++ /dev/null @@ -1,384 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmEmblemEdit - Caption = "Emblem Edit" - ClientHeight = 2865 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 5160 - Icon = "frmEmblemEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 2865 - ScaleWidth = 5160 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton cmdDelete - Caption = "&Delete Last Emblem" - Height = 735 - Left = 1560 - Style = 1 'Graphical - TabIndex = 17 - Top = 600 - Width = 855 - End - Begin VB.CommandButton cmdAdd - Caption = "&Add" - Height = 375 - Left = 1560 - TabIndex = 16 - Top = 120 - Width = 855 - End - Begin VB.CommandButton cmdSave - Caption = "&Save Emblem" - Height = 495 - Left = 4200 - Style = 1 'Graphical - TabIndex = 13 - Top = 2280 - Width = 855 - End - Begin VB.CommandButton cmdReload - Caption = "&Reload" - Height = 495 - Left = 3120 - TabIndex = 12 - Top = 2280 - Width = 975 - End - Begin VB.TextBox txtPlayernum - Height = 285 - Left = 4320 - MaxLength = 3 - TabIndex = 9 - Top = 1800 - Width = 735 - End - Begin VB.TextBox txtMapnum - Height = 285 - Left = 4320 - MaxLength = 4 - TabIndex = 7 - Top = 1320 - Width = 735 - End - Begin VB.TextBox txtZ - Height = 285 - Left = 4320 - MaxLength = 5 - TabIndex = 3 - Top = 960 - Width = 735 - End - Begin VB.TextBox txtY - Height = 285 - Left = 4320 - MaxLength = 5 - TabIndex = 2 - Top = 600 - Width = 735 - End - Begin VB.TextBox txtX - Height = 285 - Left = 4320 - MaxLength = 5 - TabIndex = 1 - Top = 240 - Width = 735 - End - Begin VB.ListBox lstEmblems - Height = 2400 - Left = 120 - TabIndex = 0 - Top = 120 - Width = 1335 - End - Begin VB.Label Label1 - Caption = "Emblem #s must be linear, sorry!" - Height = 495 - Left = 1560 - TabIndex = 18 - Top = 2400 - Width = 1455 - End - Begin VB.Label lblNumEmblems - Caption = "# of Emblems:" - Height = 255 - Left = 120 - TabIndex = 15 - Top = 2520 - Width = 1335 - End - Begin VB.Label lblNote2 - Caption = "Don't forget to set Game Data file and # of Emblems in Global Game Settings!" - Height = 855 - Left = 1560 - TabIndex = 14 - Top = 1440 - Width = 1575 - End - Begin VB.Label lblNote - Appearance = 0 'Flat - BorderStyle = 1 'Fixed Single - Caption = "Note: Enter map coordinates, not game coordinates. (I.e., 128, not 8388608)" - ForeColor = &H80000008& - Height = 1095 - Left = 2640 - TabIndex = 11 - Top = 120 - Width = 1335 - End - Begin VB.Label lblPlayernum - Caption = "Player # (255 for all players):" - Height = 495 - Left = 3240 - TabIndex = 10 - Top = 1680 - Width = 1095 - End - Begin VB.Label lblMapnum - Alignment = 1 'Right Justify - Caption = "Map #:" - Height = 255 - Left = 3600 - TabIndex = 8 - Top = 1320 - Width = 615 - End - Begin VB.Label lblZ - Alignment = 1 'Right Justify - Caption = "Z:" - Height = 255 - Left = 3960 - TabIndex = 6 - Top = 960 - Width = 255 - End - Begin VB.Label lblY - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Left = 3960 - TabIndex = 5 - Top = 600 - Width = 255 - End - Begin VB.Label lblX - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Left = 3960 - TabIndex = 4 - Top = 240 - Width = 255 - End -End -Attribute VB_Name = "frmEmblemEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdAdd_Click() - lstEmblems.AddItem "Emblem " & lstEmblems.ListCount + 1 - lstEmblems.ListIndex = lstEmblems.ListCount - 1 - lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount - txtX.Text = 0 - txtY.Text = 0 - txtZ.Text = 0 - txtPlayernum.Text = 255 - txtMapnum.Text = 1 -End Sub - -Private Sub cmdDelete_Click() - Call WriteEmblem(True) - lstEmblems.RemoveItem lstEmblems.ListCount - 1 - lstEmblems.ListIndex = lstEmblems.ListCount - 1 - lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount -End Sub - -Private Sub cmdReload_Click() - Call Reload -End Sub - -Private Sub Reload() - lstEmblems.Clear - txtX.Text = "" - txtY.Text = "" - txtZ.Text = "" - txtMapnum.Text = "" - txtPlayernum.Text = "" - lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount - Call ReadSOCEmblems -End Sub - -Private Sub cmdSave_Click() - If lstEmblems.ListCount <= 0 Then - MsgBox "You have no emblems to save!" - Else - Call WriteEmblem(False) - End If -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub ReadSOCEmblems() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - - lstEmblems.Clear - -EmblemLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo EmblemLoad - - If Left(line, 1) = vbCrLf Then GoTo EmblemLoad - - If Len(line) < 1 Then GoTo EmblemLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "EMBLEM" Then - lstEmblems.AddItem ("Emblem " & Val(word2)) - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ReadSOCEmblemNum(num As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -EmblemLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo EmblemLoad - - If Left(line, 1) = vbCrLf Then GoTo EmblemLoad - - If Len(line) < 1 Then GoTo EmblemLoad - - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - If word = "EMBLEM" Then - If Val(word2) = num Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "X" Then - txtX.Text = Val(word2) - ElseIf word = "Y" Then - txtY.Text = Val(word2) - ElseIf word = "Z" Then - txtZ.Text = Val(word2) - ElseIf word = "PLAYERNUM" Then - txtPlayernum.Text = Val(word2) - ElseIf word = "MAPNUM" Then - txtMapnum.Text = Val(word2) - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC with Emblem " & num & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub lstEmblems_Click() - Dim i As Integer - - i = InStr(lstEmblems.List(lstEmblems.ListIndex), " ") + 1 - - i = Mid(lstEmblems.List(lstEmblems.ListIndex), i, Len(lstEmblems.List(lstEmblems.ListIndex)) - i + 1) - i = Val(i) - Call ReadSOCEmblemNum(i) -End Sub - -Private Sub WriteEmblem(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim i As Integer - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - i = InStr(lstEmblems.List(lstEmblems.ListIndex), " ") + 1 - - i = Mid(lstEmblems.List(lstEmblems.ListIndex), i, Len(lstEmblems.List(lstEmblems.ListIndex)) - i + 1) - i = Val(i) - - 'If the current emblem exists in the SOC, delete it. - If word = "EMBLEM" And Val(word2) = i Then - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine UCase(lstEmblems.List(lstEmblems.ListIndex)) - txtX.Text = TrimComplete(txtX.Text) - txtY.Text = TrimComplete(txtY.Text) - txtZ.Text = TrimComplete(txtZ.Text) - txtMapnum.Text = TrimComplete(txtMapnum.Text) - txtPlayernum.Text = TrimComplete(txtPlayernum.Text) - If txtX.Text <> "" Then tsTarget.WriteLine "X = " & Val(txtX.Text) - If txtY.Text <> "" Then tsTarget.WriteLine "Y = " & Val(txtY.Text) - If txtZ.Text <> "" Then tsTarget.WriteLine "Z = " & Val(txtZ.Text) - If txtMapnum.Text <> "" Then tsTarget.WriteLine "MAPNUM = " & Val(txtMapnum.Text) - If txtPlayernum.Text <> "" Then tsTarget.WriteLine "PLAYERNUM = " & Val(txtPlayernum.Text) - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - MsgBox "Emblem deleted." - Else - MsgBox "Emblem Saved." - End If -End Sub diff --git a/tools/SOCEdit/frmEmblemEdit.frx b/tools/SOCEdit/frmEmblemEdit.frx deleted file mode 100644 index 2ae3673307b7e47781b379ec9ae8ac569ee3fda5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1090 zcmb7@F>V_%5Jf*NBa1YVwlZ8bguo>ysh?txuZQfIDs5wrO4i z6*PoZbDb3pJ26%}!93CsvY^`WP1>}|>9DztMak1cXxm#`(d4~p*ajNqy`3iUC?{@w zk>z&KapGBSftY{e`dG>l*oZIJCqF&Mdu1C_%Q9`eP_z0w&U+O3IkerVp)Afj=GI^;PI13#+b=1~t1f0E7pc}Wk)}X-++Pbw1Kfzmn>#=L@&JNC8U8D=Z#Q>cKg{gzHsA$VpHILP?E1XJKRi4=PKKV2h9~a- z_PMKVL+P}Q{b%>Tf|?Cv=9mqAWj%%^EMe0%El9`u#W1sWx0l24n6_f2k#EOV*`7&5 fC9V0s*L>%u?60IH&hkb2gXUL8h5Zfg!87;^dSyMb diff --git a/tools/SOCEdit/frmHUDEdit.frm b/tools/SOCEdit/frmHUDEdit.frm deleted file mode 100644 index 2b267b79b..000000000 --- a/tools/SOCEdit/frmHUDEdit.frm +++ /dev/null @@ -1,315 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmHUDEdit - Caption = "HUD Edit" - ClientHeight = 2505 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 5160 - Icon = "frmHUDEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 2505 - ScaleWidth = 5160 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton cmdCodeDefault - Caption = "&Load Code Default" - Height = 375 - Left = 3480 - TabIndex = 9 - Top = 1080 - Width = 1575 - End - Begin VB.CommandButton cmdDelete - Caption = "&Delete from SOC" - Height = 375 - Left = 3480 - TabIndex = 7 - Top = 2040 - Width = 1575 - End - Begin VB.CommandButton cmdSave - Caption = "&Save Changes" - Height = 375 - Left = 3480 - TabIndex = 6 - Top = 1560 - Width = 1575 - End - Begin VB.TextBox txtY - Height = 285 - Left = 4080 - MaxLength = 3 - TabIndex = 3 - Top = 720 - Width = 615 - End - Begin VB.TextBox txtX - Height = 285 - Left = 4080 - MaxLength = 3 - TabIndex = 2 - Top = 360 - Width = 615 - End - Begin VB.ListBox lstHUD - Height = 2010 - Left = 120 - TabIndex = 0 - Top = 360 - Width = 3255 - End - Begin VB.Label lblNote - Caption = "HUD items are placed on a 320x200 grid." - Height = 255 - Left = 1680 - TabIndex = 8 - Top = 120 - Width = 3015 - End - Begin VB.Label lblY - Alignment = 1 'Right Justify - Caption = "Y:" - Height = 255 - Left = 3600 - TabIndex = 5 - Top = 720 - Width = 375 - End - Begin VB.Label lblX - Alignment = 1 'Right Justify - Caption = "X:" - Height = 255 - Left = 3720 - TabIndex = 4 - Top = 360 - Width = 255 - End - Begin VB.Label lblHUDItems - Caption = "HUD Items:" - Height = 255 - Left = 120 - TabIndex = 1 - Top = 120 - Width = 975 - End -End -Attribute VB_Name = "frmHUDEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdCodeDefault_Click() - LoadHUDInfo (lstHUD.ListIndex) -End Sub - -Private Sub cmdDelete_Click() - Call WriteHUDItem(True) -End Sub - -Private Sub cmdSave_Click() - Call WriteHUDItem(False) -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub Reload() - txtX.Text = "" - txtY.Text = "" - Call LoadCode - lstHUD.ListIndex = 0 -End Sub - -Private Sub LoadCode() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("st_stuff.h", ForReading, False) - - Do While ts.ReadLine <> "/** HUD location information (don't move this comment)" - Loop - - ts.ReadLine ' */ - ts.ReadLine ' typedef struct - ts.ReadLine ' { - ts.ReadLine ' int x, y; - ts.ReadLine ' } hudinfo_t; - ts.ReadLine ' - ts.ReadLine ' typedef enum - ts.ReadLine ' { - - line = ts.ReadLine - number = 0 - - lstHUD.Clear - - Do While InStr(line, "NUMHUDITEMS") = 0 - startclip = InStr(line, "HUD_") - If InStr(line, "HUD_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - lstHUD.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub lstHUD_Click() - LoadHUDInfo (lstHUD.ListIndex) - Call ReadSOC(lstHUD.ListIndex) -End Sub - -Private Sub LoadHUDInfo(HUDNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("st_stuff.c", ForReading, False) - - Do While InStr(ts.ReadLine, "hudinfo[NUMHUDITEMS] =") = 0 - Loop - - ts.SkipLine ' { - line = ts.ReadLine ' First HUD item - - number = 0 - - Do While number <> HUDNum - line = ts.ReadLine - number = number + 1 - Loop - - startclip = InStr(line, "{") + 1 - endclip = InStr(line, ",") - - txtX.Text = TrimComplete(Mid(line, startclip, endclip - startclip)) - - startclip = endclip + 2 - endclip = InStr(startclip, line, "}") - 1 - - txtY.Text = TrimComplete(Mid(line, startclip, endclip - startclip)) - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ReadSOC(HUDNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "HUDITEM" And Val(word2) = HUDNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "X" Then - txtX.Text = Val(word2) - ElseIf word = "Y" Then - txtY.Text = Val(word2) - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub WriteHUDItem(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim hudremoved As Boolean - - hudremoved = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current item exists in the SOC, delete it. - If word = "HUDITEM" And Val(word2) = lstHUD.ListIndex Then - hudremoved = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not tsSource.AtEndOfStream - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "HUDITEM " & lstHUD.ListIndex - txtX.Text = TrimComplete(txtX.Text) - txtY.Text = TrimComplete(txtY.Text) - If txtX.Text <> "" Then tsTarget.WriteLine "X = " & Val(txtX.Text) - If txtY.Text <> "" Then tsTarget.WriteLine "Y = " & Val(txtY.Text) - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If hudremoved = True Then - MsgBox "HUD Item deleted from SOC." - Else - MsgBox "Couldn't find HUD Item in SOC." - End If - Else - MsgBox "HUD Item Saved." - End If -End Sub diff --git a/tools/SOCEdit/frmHUDEdit.frx b/tools/SOCEdit/frmHUDEdit.frx deleted file mode 100644 index 2ae3673307b7e47781b379ec9ae8ac569ee3fda5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1090 zcmb7@F>V_%5Jf*NBa1YVwlZ8bguo>ysh?txuZQfIDs5wrO4i z6*PoZbDb3pJ26%}!93CsvY^`WP1>}|>9DztMak1cXxm#`(d4~p*ajNqy`3iUC?{@w zk>z&KapGBSftY{e`dG>l*oZIJCqF&Mdu1C_%Q9`eP_z0w&U+O3IkerVp)Afj=GI^;PI13#+b=1~t1f0E7pc}Wk)}X-++Pbw1Kfzmn>#=L@&JNC8U8D=Z#Q>cKg{gzHsA$VpHILP?E1XJKRi4=PKKV2h9~a- z_PMKVL+P}Q{b%>Tf|?Cv=9mqAWj%%^EMe0%El9`u#W1sWx0l24n6_f2k#EOV*`7&5 fC9V0s*L>%u?60IH&hkb2gXUL8h5Zfg!87;^dSyMb diff --git a/tools/SOCEdit/frmHelp.frm b/tools/SOCEdit/frmHelp.frm deleted file mode 100644 index acf991057..000000000 --- a/tools/SOCEdit/frmHelp.frm +++ /dev/null @@ -1,213 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmHelp - BorderStyle = 3 'Fixed Dialog - Caption = "Getting Started" - ClientHeight = 7395 - ClientLeft = 45 - ClientTop = 330 - ClientWidth = 6360 - Icon = "frmHelp.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 7395 - ScaleWidth = 6360 - ShowInTaskbar = 0 'False - StartUpPosition = 1 'CenterOwner - Begin VB.CommandButton cmdOK - Caption = "&OK, I know what I'm doing now." - Height = 495 - Left = 1920 - Style = 1 'Graphical - TabIndex = 8 - Top = 6840 - Width = 2535 - End - Begin VB.Line Line9 - X1 = 120 - X2 = 6120 - Y1 = 4800 - Y2 = 4800 - End - Begin VB.Line Line7 - X1 = 120 - X2 = 6120 - Y1 = 5400 - Y2 = 5400 - End - Begin VB.Label Label12 - Caption = $"frmHelp.frx":0442 - Height = 615 - Left = 120 - TabIndex = 12 - Top = 4800 - Width = 6015 - End - Begin VB.Line Line6 - X1 = 120 - X2 = 6120 - Y1 = 4200 - Y2 = 4200 - End - Begin VB.Label Label11 - Caption = $"frmHelp.frx":04F8 - Height = 615 - Left = 120 - TabIndex = 11 - Top = 4200 - Width = 6015 - End - Begin VB.Line Line8 - X1 = 120 - X2 = 6120 - Y1 = 6360 - Y2 = 6360 - End - Begin VB.Line Line5 - X1 = 120 - X2 = 6120 - Y1 = 3720 - Y2 = 3720 - End - Begin VB.Line Line4 - X1 = 120 - X2 = 6120 - Y1 = 2880 - Y2 = 2880 - End - Begin VB.Line Line3 - X1 = 120 - X2 = 6120 - Y1 = 2400 - Y2 = 2400 - End - Begin VB.Line Line2 - X1 = 120 - X2 = 6120 - Y1 = 1800 - Y2 = 1800 - End - Begin VB.Line Line1 - X1 = 120 - X2 = 6120 - Y1 = 1200 - Y2 = 1200 - End - Begin VB.Label Label10 - Caption = $"frmHelp.frx":05EC - Height = 495 - Left = 120 - TabIndex = 10 - Top = 3720 - Width = 6135 - End - Begin VB.Label Label9 - Caption = $"frmHelp.frx":068F - Height = 615 - Left = 120 - TabIndex = 9 - Top = 1200 - Width = 6135 - End - Begin VB.Label Label8 - Caption = $"frmHelp.frx":0772 - Height = 495 - Left = 120 - TabIndex = 7 - Top = 6360 - Width = 6135 - End - Begin VB.Label Label7 - Caption = "However, if you have these settings in the SOC you are using, don't worry - the editor will not erase them from your file." - Height = 495 - Left = 120 - TabIndex = 6 - Top = 5880 - Width = 6135 - End - Begin VB.Label Label6 - Caption = $"frmHelp.frx":0816 - Height = 495 - Left = 120 - TabIndex = 5 - Top = 5400 - Width = 6135 - End - Begin VB.Label Label5 - Caption = $"frmHelp.frx":08A9 - BeginProperty Font - Name = "MS Sans Serif" - Size = 8.25 - Charset = 0 - Weight = 700 - Underline = 0 'False - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 855 - Left = 120 - TabIndex = 4 - Top = 2880 - Width = 6135 - End - Begin VB.Label Label4 - Caption = $"frmHelp.frx":09B1 - Height = 495 - Left = 120 - TabIndex = 3 - Top = 2400 - Width = 6135 - End - Begin VB.Label Label3 - Caption = $"frmHelp.frx":0A5A - Height = 495 - Left = 120 - TabIndex = 2 - Top = 1920 - Width = 6135 - End - Begin VB.Label Label2 - Caption = "Finally! A way to easily edit SOC files! I know you're anxious to get started, but here are some things you should know first:" - BeginProperty Font - Name = "MS Sans Serif" - Size = 9.75 - Charset = 0 - Weight = 400 - Underline = 0 'False - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 495 - Left = 120 - TabIndex = 1 - Top = 600 - Width = 6135 - End - Begin VB.Label Label1 - Caption = "How To Use This Program" - BeginProperty Font - Name = "MS Sans Serif" - Size = 13.5 - Charset = 0 - Weight = 700 - Underline = -1 'True - Italic = 0 'False - Strikethrough = 0 'False - EndProperty - Height = 495 - Left = 120 - TabIndex = 0 - Top = 120 - Width = 3855 - End -End -Attribute VB_Name = "frmHelp" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdOK_Click() - frmHelp.Hide -End Sub diff --git a/tools/SOCEdit/frmHelp.frx b/tools/SOCEdit/frmHelp.frx deleted file mode 100644 index 25004fe298fb4d56690dd551c70f3c8947b60cd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2795 zcmb7F&2Ah;5bjMPEH2nSMLDHpMUY6Fu>=waBuF46C{hxmI7o0py)(VLot^0(P4{@R zr!3;Y36UIq3Kw30Cs>|h& z5Iu2D5Uug6`1_m??_*tCi~QA|5bvEA;woeWx(Vuua7@gg`}Suh1pdWr78m^DRm|se zth~{Nf6=!52EreU_~-3UZ+(4v1MK?6B>~v=i_M9kcWHNbw`ooUD`4C9Ra15v4Q|5o zYN7Bnux;BZtStD$cKy25 zIeKA}8=q0FS5*^L9ARA6!%=eFOaP1C3uR)CSH4uRo zIG^MF?avGt#||(Z7X0G%|Khy2&KC-CX*b}H>;DQYuPt_-VmSn^7-Lu=76NN5(=%*` z`~@*iEvnav!G~>5R(!hZu$AM>LL99Kae)3lK%cYb{!JnF@Ur(>h(Dn7V@E4ke**mp z`UmtobicDTrP3JdDXoHX)n`D)aH6qg{&Ff5M5lF!rtV+}?&lIr4;Pfib&n6oxxwVr;V4JQ=Pfj!_ zGI9cN0tq#6AsG?1$y|~mBr~+hxKGZ1?|eNRvW&|KhZIdz>62eitAIjf@L&o=k6fP+ zH-j(c^f9+cW|iZzJEa1e2WSXX7yye%K!P0*kY{}=b0yJ8C=CI>6Jwj$YG_LaL`KDw z)b&E@oMe_&$^oLD#@?5oY;NKUnK)-Wc3ont(J%1v5u-1*T<{~*$<<|Pfn=7m7hC9@ zukOJafDd3t03|93Ksl#Jrr=iNDgvhLThL1AzMLWuJ*2y_;|h!1cwMN?D_5?>LZloN zcDXZ?B%x2QUBFm6869Qte`6c{xk|+sWC>F)bwetx*u#`!Ux-*s+69xe~ zOcbC4W2ZnX0QT2UkRAsRbbJ_TSxouE&+i8~^X$oNNJ{i3ppXX$#*^pf;jx$NbixUc z067nbHysOTt|%Q#GXkD?im)A6+|jmnQNPi^Co*<#Yx`01TPV%agoJ}#_wYrbD?>6v zpG4Orb*bXc`ZBcdM(1Wij{=@y#aQ~rWER-9d|Rq2;KA_F3cZg`(-zZjpx|Y25j6$` z;IG5Xg6Yunk_IxJ)MfJX0z->w9Ku-oM8K;Ds@dS7vh-CL>I%T`z9Kv`iqcQx7!Dr< hPHUwM<{6I 0 Then - MsgBox "The thing says not to include the .SOC at the end, stupid.", vbOKOnly, "You goofed!" - Exit Sub - End If - - If Len(socname) > 0 Then - socname = socname & ".soc" - - Dim myFSOSOC As New Scripting.FileSystemObject - Dim tsSOC As TextStream - - Set tsSOC = myFSOSOC.OpenTextFile(File1.Path & "\" & socname, ForWriting, True) - tsSOC.Close - Set myFSOSOC = Nothing - - MsgBox "Blank SOC named " & socname & " created in " & File1.Path, vbOKOnly, "Success!" - End If -End Sub - -Private Sub cmdEditCutscenes_Click() - frmCutsceneEdit.Show vbModal, Me -End Sub - -Private Sub cmdEmblemEdit_Click() - frmEmblemEdit.Show vbModal, Me -End Sub - -Private Sub cmdHelp_Click() - frmHelp.Show vbModal, Me -End Sub - -Private Sub cmdHUDEdit_Click() - frmHUDEdit.Show vbModal, Me -End Sub - -Private Sub cmdLevelHeader_Click() - frmLevelHeader.Show vbModal, Me -End Sub - -Private Sub cmdMaincfg_Click() - frmMaincfg.Show vbModal, Me -End Sub - -Private Sub cmdSoundEdit_Click() - frmSoundEdit.Show vbModal, Me -End Sub - -Private Sub cmdStateEdit_Click() - frmStateEdit.Show vbModal, Me -End Sub - -Private Sub cmdThingEdit_Click() - frmThingEdit.Show vbModal, Me -End Sub - -Private Sub cmdUnlockables_Click() - frmUnlockablesEdit.Show vbModal, Me -End Sub - -Private Sub Dir1_Change() - SourcePath = Dir1.Path -End Sub - -Private Sub Dir2_Change() - File1.Path = Dir2.Path -End Sub - -Private Sub Drive1_Change() - Dir1.Path = Drive1.Drive -End Sub - -Private Sub Drive2_Change() - Dir2.Path = Drive2.Drive -End Sub - -Private Sub File1_DblClick() - SOCTemp = File1.Path & "\" & "socedit.tmp" - SOCFile = File1.Path & "\" & File1.List(File1.ListIndex) - MsgBox "You are now using the file: " & vbCrLf & SOCFile - cmdLevelHeader.Enabled = True - cmdThingEdit.Enabled = True - cmdStateEdit.Enabled = True - cmdHUDEdit.Enabled = True - cmdMaincfg.Enabled = True - cmdEmblemEdit.Enabled = True - cmdSoundEdit.Enabled = True - cmdCharacterEdit.Enabled = True - cmdEditCutscenes.Enabled = True - cmdAuthor.Enabled = True - cmdUnlockables.Enabled = True - lblAuthor.Caption = "Modification By: " & GetAuthor -End Sub - -Private Sub Form_Load() - SourcePath = App.Path - Dir1.Path = SourcePath -End Sub - -Private Function GetAuthor() As String - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "MODBY" Then - GetAuthor = word2 - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Function - -Private Sub WriteAuthor(Remove As Boolean, ModderName As String) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the entry exists in the SOC, delete it. - If word <> "MODBY" Then - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "ModBy " & ModderName - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - MsgBox "Name removed." - Else - MsgBox "Name Saved." - End If -End Sub - diff --git a/tools/SOCEdit/frmHub.frx b/tools/SOCEdit/frmHub.frx deleted file mode 100644 index 176491ab691e992176c9abbf087904eabfdfce0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50308 zcmeI54Rlr2mB()q!V7`Ce2_;71`-G#;qe(hBVdA}L4x6<7(hS)(P4zC!dMDz?E-cA zF$%4A#Hmu3qB9)}wUwz@wbNx5aBpA09S&DjC1|Fy$$xSbt4Jq z|CLc#Xg(lXSYjj)EiBop2^ppL-FM&Ct(p)b8jBs@x+y`im72JYw-9WPM`N)BL8vAE ziBuX&JdS;GcN~;N_E_w``|fs2bjgpoG*m-0PJYbojl|>Rq`UFE669`2^Cg}jcN5~z zTjNe2lNKW1rT!y!(XDXM9{a zFW^(br$x@23Hx6=ka3I!@_*artxkf1IfMH^!6g{P_gAa%GIa zBs&g&g-v(yIF4UDnOrU0OC%GIKX$>AE5RMNl+Vi@=hKkmoM3#PV4S;@$7Vau5dud( zbDUp5b93So;_q#IUg7gUd}^B$8icv(e~zj#CqjPCIbmz-evESy%b-$>eYsUe3t>q?a@2tYRT{-9$G!M-Ngt)?2Sj@l;`}XZiziVh4zz>DS8sNLN zghI;>A3mIZ`Q5PubPKAOmhalN%W?Kt$h1V8g-7Xh@aWN_(P$K#s>QxC`Fm)?hE3@d z-c9o&{7p?w(s%-nQ{)GZ3lz|$*~hxNx>c)Iove9USr85{??e@sW>ZgDc7*@ohaZ;e zkk6*3wT|Mewmd;gM$~QRrxCm_MUBqF0iQZD+}UQkgA9u#aCfB zghHX3nwpMD1*oFCK%VTdpt`y`$q;y=Q>K`XHS)CNTDNZ9i!Z)tR?QG#E&zv`n%YQY zF6xNoF!mvnCeWFb!C^4Rnu57==FEX{mSSmaT;n+3cAQ7!x5&S{&^xQv0-(BW+qPgB z0YuD_`uh4{O7khmPn|mT@y8#(uHC5JaW8ZchUo1ux?NS6)pf@(a!!|V zucb2N-+AX9OHBoIIlhP(v1ZMh7hZVb$tRyoMoHBS3QDE{AkTGH`TF9f{uANw>NbY} z@{jh0U&)X()8iKG<%sm;$&*veLUu+Ov$I*w7d{*gPmWt4&xm8;v(Mbk9Pb5&NG7_% z`^cMu&JTqq#fyD35{aZfUoZ`wRg15<@;Nz$c%4a`50m)VQt=ECMSU zUsz$R!qaBV``}yv4gtf8!IkO%sv7UED-;^nH~_1Pv|$r z@!y+F`A{YU?YZZkL#O!~r2*xC@g9Z4^^UVH5}EDAUpkA;nL0{w{P8M`S+(j)%?03G z7IY6h@BqYC;#nANY+S)2bkLwdyLa#Q>VE)1Ij0T_`X9#vHoPVLzyJO3fAgE){OM1B zdjI|R8Bol&ShLEY)XV?kQDS-K=H@>1&_l>SQ-HUF$baf88XGbhs<416X3w6@gxfAt z=Z!bsICA8Ow_&89Fe%gb5f$l03BEK|B4m^%7bO$b5-iG2jI#WkHEWhsica>He9JAj zq-gn*H+X@}_@XXv6=qMh%LIgyfD^w43>Y9!krsJGv*i)rJT*(!bOMm+BY-7k%$PA0 zgZ&&FlFf=F@jd}xEQ_Ghx z_oh=XUG`pL516nBjY4f@G)p#1gG?U*xcNwng21eZEL=*d*}Eu!-oQ&njeq>(AGL}P zKl~8y4T-qXQrY%G?aMk^ORxevckcAHNX?#VmkE$g2_`K1R32Fw&FYj=%aNz^=g&7E znNQ7%DA_FBEV(PfC~aKC_$uFh_gyI;;}doC+H0@9_10U@Jo5~jR&Bb4VPXIcOF0Vh zogK`cn&6O5V@z1|>6R^9cw}WXkx@z$VNpKjBf?UYRS}ftNHI(9qA+U#w6_d-Bp;oO z^3l4G?KX!%o60|#cCuhpd@TH7gdBv200mCltc==P0$K^}4=41xH38R2a-?;=gg~h}lOfZVfj223Q zt$a&4^oR*p)3sPq#J)09OiFW(P*}PmfT?eqnv4kS`LePyQQAz?nC{8yg*bR?68w|R z4knCu-g&20g~DRtkA5&S0;8ExaV7wnJOW8gCq=_z1!+Z^E&-+tv*a!c%MOSZ4px=f z87uO$6mxuK8dfq1kdAJL1y;HlO;P^EG6V`FkRd<`3X6q5>aJb*qft#@DOsa}FjZ@c z1eh9RXqX-8iZG_5sl8br&C1PuVo2{F56)gbXSUSHSn!=ad5Yv)k5E}KMP#0V!_$E6 z6$?fa1PV`vKg!(7Xd+`4(x&`V1$oUZu%76tk$kE~!q*NM) zl9`1XwMm4{VuQm7YDq~6ZCkNo#iB)v8X6kN&gzLM)(Z+8e3F#_KG=uo4Wt)5aXVb! zKTBa$guU5evCO;#aK2I9-2)S2=dzkfLJ#kf8UGMyXDtjRui{@3zXUWv3ob~ zDmy!yEaz5@+*g(j3&3-2;LbQp131f+O>4&$^cAl0O^wvT$Qm(X1e-Ww$9n6fsoHnK zXcd!2@mCttAk;(xET`@V(HRPDPN zkczyB>53Hsi{6Y{VL=l6)=F0i*L3=#m0I{WE?pg+T1UU2L1W;VM7mJ;h#ygk3V_{w zboJF&r{V-&S$nPs^FxEOlWA{33E^kpa$#tSSsucXl12GrWZ zg$pfX74-|H=m&2bKmf$d%S$5_k?xD3B6pJ!lH z%6tJmfx4M9y!DboMJjU1pg3dGqYE}WW0$*&WmQwrbyYbDV+K?krcMGqE_4@c;?fa8;`BZVvlB|V zcKhwO!+Lau)QC4#*}*P=x!gEo(e^ehdc}8~bN|+vaJe(8(J8NW22FAA;ws<@#@{Lm zS#_pgdlCnYp>$Gu|54!iv#NqWG@ZAgtiP-4VBClXSL1P)jCYw;P|+_GV#0-zn<-#o z`CzL?w%`!}*Z~*NLiqYDf^HFwZhO(W;%B~hWbB2hcL8QOLuR=ER?cqf%;GK@J|sIsY|dxLMNVwFV(s`5saUqm>`qyYJ(R4GCDB>i z5*$bGal5Vp+>y;51oVA^V7<{fd3!Y#xXZ(mhR6jEEfay=@EG!Uc2<}de^3s!jW*oiUzGB zg|R8k1DRCu_hpK2qSz8*lUFS^XQ)VJwacl=vuF|*T}B!aQP@O#;*3h_nNh3=w1Ge1 ztUMSRvrtcrQ1a^4t66wra^Rei5g`bOt0&Z_pDR%d_V|FmXfIm;2tR@i{x{c6cBg*D zf8{|`macZ+U3Jl4PpU$#sYS#vgt>H3FX~mjQFGoLw_ZljIa6JYH(;DA&)hOA$t*9r zE=4=Rmm|p%MTJtn+7i?oZ$Rbv8aP!qrye%pjfty`?a~FnY#V>UXWEyWmaRb8@J7;Q z^b7~jSPo!#;0U7Rs;a7RL4T+EN@vOUTOn0!B~U#2rig3O{Oa7H;6Jf!FykvhOs?Y5 zx-?*RhCAZzF{LG07{PO^wyKjTlE8ibjqZ4y_GMSsjb4(_bpt1=vFF-dVt|QKLgs;V z#+H;6S~8}1(Aaj9<1LqJp=ZyL1Vx z=U=NI|NTX?oxD;Pllk`oPJV8INFbk(d^2y>wyR8%!zwN-E1|zP#3*qOt zNBJ-`TIJd59T{_rZ)vgT(Jd>+R95F?%XBvX{?N#a zn99-f3|m;wKtuI0(ewTtV!%jrJ$uMAy34Au>!OSHx}2JGo6DwITNCz!7!R^~8Zb7& zDH%{q9B_&SDV#cak=t(k=~P~+I1|wPDCgRG*KsHMpQyjur?q*dmxeR{rNxtW@Jr|O zV{3pf_htE+c%-p;n3tb#I=?u-$dy9{aO`s2*SOsd9Xf=a&zVCmmcVo8&UHsn{mxcO z&2lCL5D7ZYEdy%GdY4nO$SpfpZ1U)ghW5!n{hDyOEQL_H(-*A!_OD}2-#eTaDT4*B z{V^1&oJy09=d*%m8@t#lYVbD!Pe9gtEmtlAfYlxT4c9tekv7!e)R$!Xsv= zDeHmj&KHi~{6cKpx_gMW;!GY61Kg^CmIMYG@ApCnuv(Fh- z?F+a!aq|4NCr!bu0VBh1e&*=yyNxvaC$QC{8H-MElG{%{24Fnm;W>knQB#?_A= z%_%BlDnLcU8WvD<`exo);^NQRYVOtBy-@q6T=&3>;eo@Lm?F`*Q>bJ-!jGaW89t%A z>zvM&e;E-drJ*AeELixh7yFe(QO=m7vvM;)R7&A!{$b;5 z03Y4O$U@^W`@&f;UT6Gp=oI-Elvt<^sj5ar?0PA-aQExI!x5HO zfX^+bcUI?TVQ2b6?VDIRsg9B<7Q6JDKRwF$nl#lulqgl>`9uJq6sL+<4zgIQyRZQ^ zwHgm%;9(~Sr^G&I<$Ibq)rt561%ldtU>QKcf~H4~=9fhm?IFaETj*_OtuPtxi*5TS_B-axwU!13bo^^5|sLh&&4>la3i_@ZqkVgfOVl%2n> z@t=?1`1H|{Q|e%@Rae(V=^X=#O9m8k8Jxlm0-Lz7#^Dq@Bd(=~gUD2U?Ho|;#h)%$ zR#sxtupp&LzFeT$Q>WLgyzyZmz2=GI!!O-FASWc7iKrm4AuY7M(T(4I7T#U_Xl&iS zqbxCkk4bbLBibxkI3=pj9#EF*V}nW7O~!!g0REW$^ZR9PEXu-f#wH7kQ0yP8owSO{ zw{FE|^v2hkWApAkJg}yTGqkJ-Cgo(v5@7ptvCaP)yXL9b>Yv1x{W!MdvBZ7Z<8I>U z^BO08T7ZY;Z)5w8Dv43)AxKNI?bP^c(chia0W(IGd{VGFlq z_6ni=Sv!cM^~?w46t@t~FB?@j7QQvmWr5t=inD;15fSMVf=7@se~Gh#cfNp>3*pbr za9E?^tcYHD&%{mp^d7nVR=|f5unF^(G4;jJJe|%R?CsKCt;b@&W3WJZfohuD&m9z? ztrzREs>^rH+WC4i&72@Kb;I_CTQt++7nu09! zImm-52rvF&Z2eDTs3Rr?9H)QxZznmTN%`h4-6@z!8G6PDV}a^0tGXjlUDRe|Qa5w) z?cmBJV(~TvSdnD$%kBxcrnD83>a7GmwY1lFus zqi9<@Db<*y&iS+MA1Y76+(!R|QkQ zp`VNYKa}>uM^2@4oXxx-o*xTIVG62=y)d?8P)cYgyq(|p z(P5L49RwBv+_>*pCdf*GC}&-S40<}7W(O5LB-Vmj@Mls`8VzWrrt+Z#E=Gi8RGJh6 zY!~9FL6UKAV%Vqy$IOl=fv3#5cm^s5mksRYu(!J^KNCAskY^S4;Go32jqG`q4U6K& zH&F$A03TglgKr1k;kIQ}MVYt(@g1R3L_w|n_EW5syI@x#b(}!G-$~Z@&a0`C(i)_?$6p zSkEfpy9V~c|FCCJ_77T4Sm}y@lP3cQS27AjwgDe!GAmhM)5U##EPj=bbN3Dy5$u0S ziuH}ho30@+TKCjPVy1nT=H-uh7tIWhH*=Vaq;wr)L4 zsFc0|vh#}>c>aeCarwyj@&$o`pgkqb=$KwtAL{E0IRd~)!4U`AI9HK;-fUvhXN1yV z-_kmk=*8bF;V6Ha#AHDgrt%>%eVY^YLf7PczAu>RB*FqYwB`#A2-5|$5VEaOEkly6 z3Wg!7hA1tB5m1U>ltka50(9H<5m!c@Wxk zp!VkFHB!Vl04wGcdcjQh0&d zSAi%20cZq&G(XubeMJfcdbL?~00I4yR}?z{wKoe24FwWV9ghTRajdCTulS?(5q@t8 zD67uG-&?q($nR+g7r<8Vm-!cdncRWiiY6$lMgNG9Bkj^=qV$LgMYDZ*@8m2%3c>+m-PSmBj`Ob3>dkw*%V z?^9@G?WSZM4q$bJbNk$P(X?OB8s0G$ut%x-B)A!{33dZMwvbXX7D#8g?W_OMKWWN8 zGB1$wjSR~WkZ)}RD#%Q?y5q}1{Sg2yq{9Iu6Cvb1Xx>=lrRnx^0oSzJGr?^DVesde zgsH3;gCIkqukFfsNfZCzCZ+NeHHEf8;0bVbBJx^0ATSre0^XQDvTQcL86g~MNbF8(d&>q_Vu6A8LDWW)$@J(OU3l1B+i9u;v0r2Oc42 z5Y!83V?Z*F_-1CGHmMr1H%ARzWA9)@zZ|&0T6oIXD1(CcxJkc%!r-%3|Esu~0X75y zgkx8TJyQS*huvOYS09?2W3hlo3=sAu84k<~+ypqUZjq_(BEXyuLp9|W6H1m>Rh;(4 zui5?69!7vU>dd}8$Ns?|Fu|Y055fZd8DYgR#Q^18S6=jd%}{#`WZ-aSpK*jVInVup%q9&zPSLa4i(Paf; zIf#N_gFk8{D?22IPhi2AemU|Mc8aho8H0rtTxo93byLSYc*%MEDBS4c0yMwwLZ;Xe zU?*3yi>H(WdP+dl%mR{TRLL|T&CsYfkYYPKK!*NjD;(J6PztXgfjymDt|(IbOKbpFH`uvK1^I3P)rsOP(pi^f13ES)nb<5 z9S*1|6qKUv4WtQjvh1k+!YpS?%Mm#6C(PmqlsK0N<~js;^MzN6cngVvAr|IylLp;8 zbwrzbNqz;FRmPy+3C6kOD{w>K+gcMn!j|-sLKap2phwioVn)H=+I-=uNg(*MWhv== zdz+Mg3Q8D|5qK4T2@J?`-_GOMgZwBBhdFuSYu=+VUUdv*Cyp4gQa*IW{2_gF^heHp zB_Htr`m3=9NWxhmn`>I5*2L51{rBO)r1t@_DsG21?Wyb`s$cZdGw> z@Jpf72f4pj3@>C44*b*Hd1(`W6F@J#WCw7QM)W_^1Qw~O$Am`s)nT-)jBL?*)egw> z{*mCxatU||qw0Bwmv7kd^+VP zgD`;@2;5IkEJc`~URICk4qwE9kPQ4+&L54O1NCp$FPT21ROFmfD7~{XpIBN?I{Q9Y zLG3+xm<&CEF#vyNYI%z8Qq0l+=yr)h0CS;X2!JzW)WxO51W1%ZI{eKF3zKhPZV2<9 zm%LEp-}5_juBd|ZhT`6U`G?i>9$PX81%lfrV5&voK#X{UFgL>lhmr|0jDQ7qTricn zn4fQD(b2BHC?F^YP?C4$fJH7T%0f(!^au-}R06_UAc;btDHLuU9D=@Gt+j~p##76* zKJE|51n3O~p8(1~lAVRX_wAJlFZ6#NG-)KvRx&OH`R^D&9%iw{h6~#3Uck%883|ev zaFp6=xkeS709Byy5+I{yk!S$^7QGy0F-uDmf1p4KbM_vSQk}zIB&`(m4_pY~7jCq7 zR$L(32IT*+VJUVFwFKBUC_prSdxhTwQ}IV>Bc*`M1p!eLF*A$6+a~@dfmsycH1Ve~ zTyOy;fd0qBiEW7o-U2+8D6=PKB>(df`<0?<_-3AED~$~`He9@7FSV!n4akBCx*`sF zvnp`XDO?GJ%t|3@!b{joZxTo$`rRq`D+1^N96o4cjzjEgIQPBPa}i@Ue^Ddc{MQK} ztoN&P#z;C_Gw-i$P|O8(rc}(!yx!Ru+iV1A6`dYna#S?D0jjg`v}hm*fLHZDG;%S@ z%&W6bB$}|WX@Vh&We9qBX3*Q#j=TxAh7ol<2~49b0pK8fWK8+K?q}B3DPapzjRF+q zr-Q$g&?$}VKp_~1Oo;4;)1!0pav2o(iuvy?8tn1Mm;Q8KYY110o05V}a!B 0 Then - lstMaps.ListIndex = 0 - End If -End Sub - -Private Sub cmdRename_Click() - Dim Response As String - Dim NewNum As Integer - Dim i As Integer - - Response$ = InputBox("Rename level to (NUMBER ONLY):") - - If Response = "" Then - Exit Sub - End If - - NewNum = Val(TrimComplete(Response)) - - i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1 - - i = Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1) - i = Val(i) - Call WriteLevel(True, i) - lstMaps.List(lstMaps.ListIndex) = "Level " & NewNum - Call cmdSave_Click -End Sub - -Private Sub cmdSave_Click() - Dim i As Integer - - i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1 - - i = Val(Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1)) - Call WriteLevel(False, i) -End Sub - -Private Sub Form_Load() - Call LoadMusic - Call LoadSOCMaps - If lstMaps.ListCount > 0 Then lstMaps.ListIndex = 0 -End Sub - -Private Sub LoadSOCMaps() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - - lstMaps.Clear - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "LEVEL" Then - lstMaps.AddItem ("Level " & Val(word2)) - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadMusic() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Music list (don't edit this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbMusicslot.Clear - - Do While InStr(line, "NUMMUSIC") = 0 - startclip = InStr(line, "mus_") - If InStr(line, "mus_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - cmbMusicslot.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ClearForm() - Dim j As Integer - - txtLevelName.Text = "" - txtInterscreen.Text = "" - txtAct.Text = "" - txtNextlevel.Text = "" - cmbMusicslot.Text = "" - txtForcecharacter.Text = "" - cmbWeather.Text = "" - txtSkynum.Text = "" - txtScriptname.Text = "" - chkScriptislump.Value = 0 - txtPrecutscenenum.Text = "" - txtCutscenenum.Text = "" - txtRunSOC.Text = "" - chkNozone.Value = 0 - chkHidden.Value = 0 - txtCountdown.Text = "" - chkNossmusic.Value = 0 - chkNoReload.Value = 0 - chkTimeAttack.Value = 0 - chkLevelSelect = 0 - - For j = 0 To 11 - chkTypeoflevel(j).Value = 0 - Next j -End Sub - -Private Sub lstMaps_Click() - Dim startclip As Integer - Call ClearForm - startclip = InStr(lstMaps.List(lstMaps.ListIndex), " ") - Call LoadSOCMapInfo(Val(Mid(lstMaps.List(lstMaps.ListIndex), startclip + 1, Len(lstMaps.List(lstMaps.ListIndex))))) -End Sub - -Private Sub LoadSOCMapInfo(num As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - If word = "LEVEL" Then - If Val(word2) = num Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "LEVELNAME" Then - txtLevelName.Text = word2 - ElseIf word = "INTERSCREEN" Then - txtInterscreen.Text = word2 - ElseIf word = "ACT" Then - txtAct.Text = Val(word2) - ElseIf word = "NOZONE" Then - chkNozone.Value = Val(word2) - ElseIf word = "TYPEOFLEVEL" Then - ProcessMapFlags (Val(word2)) - ElseIf word = "NEXTLEVEL" Then - txtNextlevel.Text = Val(word2) - ElseIf word = "MUSICSLOT" Then - cmbMusicslot.ListIndex = Val(word2) - ElseIf word = "FORCECHARACTER" Then - txtForcecharacter.Text = Val(word2) - ElseIf word = "WEATHER" Then - cmbWeather.ListIndex = Val(word2) - ElseIf word = "SKYNUM" Then - txtSkynum.Text = Val(word2) - ElseIf word = "SCRIPTNAME" Then - txtScriptname.Text = word2 - ElseIf word = "SCRIPTISLUMP" Then - chkScriptislump.Value = Val(word2) - ElseIf word = "PRECUTSCENENUM" Then - txtPrecutscenenum.Text = Val(word2) - ElseIf word = "CUTSCENENUM" Then - txtCutscenenum.Text = Val(word2) - ElseIf word = "COUNTDOWN" Then - txtCountdown.Text = Val(word2) - ElseIf word = "HIDDEN" Then - chkHidden.Value = Val(word2) - ElseIf word = "NOSSMUSIC" Then - chkNossmusic.Value = Val(word2) - ElseIf word = "NORELOAD" Then - chkNoReload.Value = Val(word2) - ElseIf word = "TIMEATTACK" Then - chkTimeAttack.Value = Val(word2) - ElseIf word = "LEVELSELECT" Then - chkLevelSelect.Value = Val(word2) - ElseIf word = "RUNSOC" Then - txtRunSOC.Text = word2 - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ProcessMapFlags(flags As Long) - Dim j As Integer - - For j = 0 To 11 - If flags And chkTypeoflevel(j).Tag Then - chkTypeoflevel(j).Value = 1 - Else - chkTypeoflevel(j).Value = 0 - End If - Next j -End Sub - -Private Sub WriteLevel(Remove As Boolean, Mapnum As Integer) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim i As Integer - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1 - - i = Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1) - i = Val(i) - 'If the current level exists in the SOC, delete it. - If word = "LEVEL" And Val(word2) = i Then - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine UCase(lstMaps.List(lstMaps.ListIndex)) - txtLevelName.Text = TrimComplete(txtLevelName.Text) - txtInterscreen.Text = TrimComplete(txtInterscreen.Text) - txtAct.Text = TrimComplete(txtAct.Text) - txtNextlevel.Text = TrimComplete(txtNextlevel.Text) - cmbMusicslot.Text = TrimComplete(cmbMusicslot.Text) - txtForcecharacter.Text = TrimComplete(txtForcecharacter.Text) - cmbWeather.Text = TrimComplete(cmbWeather.Text) - txtSkynum.Text = TrimComplete(txtSkynum.Text) - txtScriptname.Text = TrimComplete(txtScriptname.Text) - txtPrecutscenenum.Text = TrimComplete(txtPrecutscenenum.Text) - txtCutscenenum.Text = TrimComplete(txtCutscenenum.Text) - txtCountdown.Text = TrimComplete(txtCountdown.Text) - txtRunSOC.Text = TrimComplete(txtRunSOC.Text) - - If txtLevelName.Text <> "" Then tsTarget.WriteLine "LEVELNAME = " & txtLevelName.Text - If txtInterscreen.Text <> "" Then tsTarget.WriteLine "INTERSCREEN = " & txtInterscreen.Text - If txtAct.Text <> "" Then tsTarget.WriteLine "ACT = " & Val(txtAct.Text) - If txtNextlevel.Text <> "" Then tsTarget.WriteLine "NEXTLEVEL = " & Val(txtNextlevel.Text) - If cmbMusicslot.Text <> "" Then tsTarget.WriteLine "MUSICSLOT = " & cmbMusicslot.ListIndex - If txtForcecharacter.Text <> "" Then tsTarget.WriteLine "FORCECHARACTER = " & Val(txtForcecharacter.Text) - If cmbWeather.Text <> "" Then tsTarget.WriteLine "WEATHER = " & cmbWeather.ListIndex - If txtSkynum.Text <> "" Then tsTarget.WriteLine "SKYNUM = " & Val(txtSkynum.Text) - If txtScriptname.Text <> "" Then tsTarget.WriteLine "SCRIPTNAME = " & txtScriptname.Text - If txtPrecutscenenum.Text <> "" Then tsTarget.WriteLine "PRECUTSCENENUM = " & Val(txtPrecutscenenum.Text) - If txtCutscenenum.Text <> "" Then tsTarget.WriteLine "CUTSCENENUM = " & Val(txtCutscenenum.Text) - If txtCountdown.Text <> "" Then tsTarget.WriteLine "COUNTDOWN = " & Val(txtCountdown.Text) - If chkScriptislump.Value = 1 Then tsTarget.WriteLine "SCRIPTISLUMP = 1" - If chkNozone.Value = 1 Then tsTarget.WriteLine "NOZONE = 1" - If chkHidden.Value = 1 Then tsTarget.WriteLine "HIDDEN = 1" - If chkNossmusic.Value = 1 Then tsTarget.WriteLine "NOSSMUSIC = 1" - If chkNoReload.Value = 1 Then tsTarget.WriteLine "NORELOAD = 1" - If chkTimeAttack.Value = 1 Then tsTarget.WriteLine "TIMEATTACK = 1" - If chkLevelSelect.Value = 1 Then tsTarget.WriteLine "LEVELSELECT = 1" - If txtRunSOC.Text <> "" Then tsTarget.WriteLine "RUNSOC = " & txtRunSOC.Text - - flags = 0 - For i = 0 To 11 - If chkTypeoflevel(i).Value = 1 Then - flags = flags + Val(chkTypeoflevel(i).Tag) - End If - Next - - If flags > 0 Then tsTarget.WriteLine "TYPEOFLEVEL = " & flags - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - MsgBox "Level Deleted." - Else - MsgBox "Level Saved." - End If -End Sub - diff --git a/tools/SOCEdit/frmLevelHeader.frx b/tools/SOCEdit/frmLevelHeader.frx deleted file mode 100644 index fe81f4413fa61a067d219c069b5879dcd6861328..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1204 zcmb7Dv2GJV5PcgXpCcjctD;oC3Yh{C2vFjD03rzZfhd^R5}YH;=#C1?wH)s# z;9d>rFqRMpgo2$0P3`8P0Y1>$8NTVFC<$ML7R?yxdd$fFUNK$r$C1NxYGIV-CQeMleG-f!UHu|zs30-L4HCS z@{%;G)rzeud%3{JVlpin}RzPtgS|kQ1VTN-MGXl zDpab%Qq7h5Li{Q@b;^SlsJgm-cBz~DKM5m%hdyNN!`Wp~R$aNf1#wMCpSOsFSoL{9 zfAi4nac0=l*6>aDfBRg;vLUdW+y0aLpOK0+%uHw&>?`RpT805ycTML^+xposXRU6} zhskYPisgpC9a&}B2C4{{^Zz~P|6G*i0WhUAy#~Hh^VK7w{YLyCeiL=nSf9OHPaSPE zu$MecUJcXUHXhS^J06ZcHSk2-beJ`;Pw&mqAiayH^j?p8$4AHgUK`KIUJg$B<8+Xo UJbKsvoWAdkl1@5IMpQre10r!&#Q*>R diff --git a/tools/SOCEdit/frmMaincfg.frm b/tools/SOCEdit/frmMaincfg.frm deleted file mode 100644 index 3efca74a8..000000000 --- a/tools/SOCEdit/frmMaincfg.frm +++ /dev/null @@ -1,644 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmMaincfg - Caption = "Global Game Settings" - ClientHeight = 5295 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 9360 - Icon = "frmMaincfg.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 5295 - ScaleWidth = 9360 - StartUpPosition = 3 'Windows Default - Begin VB.Frame frmReset - Caption = "Reset Data (Be sure this is at the TOP of your SOC)" - Height = 975 - Left = 4800 - TabIndex = 43 - Top = 4200 - Width = 4455 - Begin VB.CheckBox chkReset - Caption = "Thing Properties" - Height = 255 - Index = 2 - Left = 1680 - TabIndex = 46 - Tag = "4" - Top = 240 - Width = 1575 - End - Begin VB.CheckBox chkReset - Caption = "States" - Height = 255 - Index = 1 - Left = 240 - TabIndex = 45 - Tag = "2" - Top = 600 - Width = 1335 - End - Begin VB.CheckBox chkReset - Caption = "Sprite Names" - Height = 255 - Index = 0 - Left = 240 - TabIndex = 44 - Tag = "1" - Top = 240 - Width = 1575 - End - End - Begin VB.CheckBox chkDisableSpeedAdjust - Caption = "Disable speed adjustment of player animations depending on how fast they are moving." - Height = 375 - Left = 1080 - TabIndex = 42 - Top = 4200 - Width = 3615 - End - Begin VB.TextBox txtTitleScrollSpeed - Height = 285 - Left = 4080 - TabIndex = 41 - Top = 1920 - Width = 495 - End - Begin VB.CheckBox chkLoopTitle - Caption = "Loop the title screen music?" - Height = 195 - Left = 1080 - TabIndex = 39 - Top = 3840 - Width = 2415 - End - Begin VB.TextBox txtCreditsCutscene - Height = 285 - Left = 4080 - TabIndex = 37 - Top = 1560 - Width = 495 - End - Begin VB.CommandButton cmdSave - Caption = "&Save" - Height = 495 - Left = 120 - TabIndex = 36 - Top = 3120 - Width = 735 - End - Begin VB.CommandButton cmdReload - Caption = "&Reload" - Height = 495 - Left = 120 - TabIndex = 35 - Top = 2520 - Width = 735 - End - Begin VB.TextBox txtNumemblems - Height = 285 - Left = 4080 - MaxLength = 2 - TabIndex = 33 - Top = 3360 - Width = 495 - End - Begin VB.TextBox txtGamedata - Height = 285 - Left = 3240 - MaxLength = 64 - TabIndex = 31 - Top = 2880 - Width = 1335 - End - Begin VB.TextBox txtExeccfg - Height = 285 - Left = 3240 - TabIndex = 9 - Top = 2400 - Width = 1335 - End - Begin VB.Frame frmTimers - Caption = "Timers (35 = 1 second)" - Height = 3975 - Left = 4800 - TabIndex = 8 - Top = 120 - Width = 4455 - Begin VB.TextBox txtGameovertics - Height = 285 - Left = 3000 - TabIndex = 29 - Top = 3480 - Width = 1335 - End - Begin VB.TextBox txtHelpertics - Height = 285 - Left = 3000 - TabIndex = 27 - Top = 3120 - Width = 1335 - End - Begin VB.TextBox txtParalooptics - Height = 285 - Left = 3000 - TabIndex = 25 - Top = 2760 - Width = 1335 - End - Begin VB.TextBox txtExtralifetics - Height = 285 - Left = 3000 - TabIndex = 23 - Top = 2400 - Width = 1335 - End - Begin VB.TextBox txtSpacetimetics - Height = 285 - Left = 3000 - TabIndex = 21 - Top = 2040 - Width = 1335 - End - Begin VB.TextBox txtUnderwatertics - Height = 285 - Left = 3000 - TabIndex = 19 - Top = 1680 - Width = 1335 - End - Begin VB.TextBox txtTailsflytics - Height = 285 - Left = 3000 - TabIndex = 17 - Top = 1320 - Width = 1335 - End - Begin VB.TextBox txtFlashingtics - Height = 285 - Left = 3000 - TabIndex = 15 - Top = 960 - Width = 1335 - End - Begin VB.TextBox txtSneakertics - Height = 285 - Left = 3000 - TabIndex = 13 - Top = 600 - Width = 1335 - End - Begin VB.TextBox txtInvulntics - Height = 285 - Left = 3000 - TabIndex = 11 - Top = 240 - Width = 1335 - End - Begin VB.Label lblGameovertics - Alignment = 1 'Right Justify - Caption = "Game Over Screen Time:" - Height = 255 - Left = 960 - TabIndex = 30 - Top = 3480 - Width = 1935 - End - Begin VB.Label lblHelpertics - Alignment = 1 'Right Justify - Caption = "NiGHTS Nightopian Helper Time:" - Height = 255 - Left = 240 - TabIndex = 28 - Top = 3120 - Width = 2655 - End - Begin VB.Label lblParalooptics - Alignment = 1 'Right Justify - Caption = "NiGHTS Paraloop Powerup Time:" - Height = 255 - Left = 360 - TabIndex = 26 - Top = 2760 - Width = 2535 - End - Begin VB.Label lblExtralifetics - Alignment = 1 'Right Justify - Caption = "Extra Life Music Duration:" - Height = 255 - Left = 960 - TabIndex = 24 - Top = 2400 - Width = 1935 - End - Begin VB.Label lblSpacetimetics - Alignment = 1 'Right Justify - Caption = "Space Breath Timeout:" - Height = 255 - Left = 1200 - TabIndex = 22 - Top = 2040 - Width = 1695 - End - Begin VB.Label lblUnderwatertics - Alignment = 1 'Right Justify - Caption = "Underwater Breath Timeout:" - Height = 255 - Left = 840 - TabIndex = 20 - Top = 1680 - Width = 2055 - End - Begin VB.Label lblTailsflytics - Alignment = 1 'Right Justify - Caption = "Tails Flying Time:" - Height = 255 - Left = 1440 - TabIndex = 18 - Top = 1320 - Width = 1455 - End - Begin VB.Label lblFlashingtics - Alignment = 1 'Right Justify - Caption = "Flashing Time After Being Hit:" - Height = 255 - Left = 360 - TabIndex = 16 - Top = 960 - Width = 2535 - End - Begin VB.Label lblSneakertics - Alignment = 1 'Right Justify - Caption = "Super Sneakers Time:" - Height = 255 - Left = 240 - TabIndex = 14 - Top = 600 - Width = 2655 - End - Begin VB.Label lblInvulntics - Alignment = 1 'Right Justify - Caption = "Invincibility Time:" - Height = 255 - Left = 360 - TabIndex = 12 - Top = 240 - Width = 2535 - End - End - Begin VB.TextBox txtIntrotoplay - Height = 285 - Left = 4080 - TabIndex = 6 - Top = 1200 - Width = 495 - End - Begin VB.TextBox txtRacestage_start - Height = 285 - Left = 4080 - MaxLength = 4 - TabIndex = 4 - Top = 840 - Width = 495 - End - Begin VB.TextBox txtSpstage_start - Height = 285 - Left = 4080 - MaxLength = 4 - TabIndex = 2 - Top = 480 - Width = 495 - End - Begin VB.TextBox txtSstage_start - Height = 285 - Left = 4080 - MaxLength = 4 - TabIndex = 0 - Top = 120 - Width = 495 - End - Begin VB.Label lblTitleScrollSpeed - Alignment = 1 'Right Justify - Caption = "Scroll speed of title background:" - Height = 255 - Left = 1560 - TabIndex = 40 - Top = 1920 - Width = 2415 - End - Begin VB.Label lblCreditsCutscene - Alignment = 1 'Right Justify - Caption = "Cutscene # to replace credits with:" - Height = 255 - Left = 1080 - TabIndex = 38 - Top = 1560 - Width = 2895 - End - Begin VB.Label lblNumemblems - Alignment = 1 'Right Justify - Caption = "# of LEVEL Emblems (Gamedata field must also be filled out):" - Height = 375 - Left = 1440 - TabIndex = 34 - Top = 3240 - Width = 2535 - End - Begin VB.Label lblGamedata - Alignment = 1 'Right Justify - Caption = "Gamedata file (to save mod emblems and time data):" - Height = 375 - Left = 960 - TabIndex = 32 - Top = 2760 - Width = 2175 - End - Begin VB.Label lblExeccfg - Alignment = 1 'Right Justify - Caption = "CFG file to instantly execute upon loading this SOC:" - Height = 495 - Left = 960 - TabIndex = 10 - Top = 2280 - Width = 2175 - End - Begin VB.Label lblIntrotoplay - Alignment = 1 'Right Justify - Caption = "Cutscene # to use for introduction:" - Height = 255 - Left = 1440 - TabIndex = 7 - Top = 1200 - Width = 2535 - End - Begin VB.Label lblRacestage_start - Alignment = 1 'Right Justify - Caption = "Racing mode starts/loops back to this map #:" - Height = 255 - Left = 720 - TabIndex = 5 - Top = 840 - Width = 3255 - End - Begin VB.Label lblSpstage_start - Alignment = 1 'Right Justify - Caption = "Single Player Game Starts on this map #:" - Height = 255 - Left = 1080 - TabIndex = 3 - Top = 480 - Width = 2895 - End - Begin VB.Label lblSstage_start - Alignment = 1 'Right Justify - Caption = "First Special Stage Map #:" - Height = 255 - Left = 2040 - TabIndex = 1 - Top = 120 - Width = 1935 - End -End -Attribute VB_Name = "frmMaincfg" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Private Sub cmdReload_Click() - Call Reload -End Sub - -Private Sub cmdSave_Click() - Call WriteSettings -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub ClearForm() - Dim i As Integer - - txtSstage_start.Text = "" - txtSpstage_start.Text = "" - txtRacestage_start.Text = "" - txtIntrotoplay.Text = "" - txtExeccfg.Text = "" - txtGamedata.Text = "" - txtNumemblems.Text = "" - txtInvulntics.Text = "" - txtSneakertics.Text = "" - txtFlashingtics.Text = "" - txtTailsflytics.Text = "" - txtUnderwatertics.Text = "" - txtSpacetimetics.Text = "" - txtExtralifetics.Text = "" - txtParalooptics.Text = "" - txtHelpertics.Text = "" - txtGameovertics.Text = "" - txtCreditsCutscene.Text = "" - txtTitleScrollSpeed.Text = "" - chkLoopTitle.Value = 0 - chkDisableSpeedAdjust.Value = 0 - - For i = 0 To 2 - chkReset(i).Value = 0 - Next i -End Sub - -Private Sub Reload() - Call ClearForm - Call ReadSOCMaincfg -End Sub - -Private Sub ReadSOCMaincfg() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "MAINCFG" Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "SSTAGE_START" Then - txtSstage_start.Text = Val(word2) - ElseIf word = "SPSTAGE_START" Then - txtSpstage_start.Text = Val(word2) - ElseIf word = "RACESTAGE_START" Then - txtRacestage_start.Text = Val(word2) - ElseIf word = "INVULNTICS" Then - txtInvulntics.Text = Val(word2) - ElseIf word = "SNEAKERTICS" Then - txtSneakertics.Text = Val(word2) - ElseIf word = "FLASHINGTICS" Then - txtFlashingtics.Text = Val(word2) - ElseIf word = "TAILSFLYTICS" Then - txtTailsflytics.Text = Val(word2) - ElseIf word = "UNDERWATERTICS" Then - txtUnderwatertics.Text = Val(word2) - ElseIf word = "SPACETIMETICS" Then - txtSpacetimetics.Text = Val(word2) - ElseIf word = "EXTRALIFETICS" Then - txtExtralifetics.Text = Val(word2) - ElseIf word = "PARALOOPTICS" Then - txtParalooptics.Text = Val(word2) - ElseIf word = "HELPERTICS" Then - txtHelpertics.Text = Val(word2) - ElseIf word = "GAMEOVERTICS" Then - txtGameovertics.Text = Val(word2) - ElseIf word = "INTROTOPLAY" Then - txtIntrotoplay.Text = Val(word2) - ElseIf word = "CREDITSCUTSCENE" Then - txtCreditsCutscene.Text = Val(word2) - ElseIf word = "TITLESCROLLSPEED" Then - txtTitleScrollSpeed.Text = Val(word2) - ElseIf word = "LOOPTITLE" Then - chkLoopTitle.Value = Val(word2) - ElseIf word = "DISABLESPEEDADJUST" Then - chkDisableSpeedAdjust.Value = Val(word2) - ElseIf word = "GAMEDATA" Then - txtGamedata.Text = word2 - ElseIf word = "NUMEMBLEMS" Then - txtNumemblems.Text = Val(word2) - ElseIf word = "RESETDATA" Then - Dim resetflags As Integer - Dim z As Integer - - resetflags = Val(word2) - - For z = 0 To 2 - If resetflags And chkReset(z).Tag Then - chkReset(z).Value = 1 - Else - chkReset(z).Value = 0 - End If - Next z - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub WriteSettings() - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim i As Integer - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the category exists in the SOC, delete it. - If word = "MAINCFG" Then - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "MAINCFG CATEGORY" - txtSstage_start.Text = TrimComplete(txtSstage_start.Text) - txtSpstage_start.Text = TrimComplete(txtSpstage_start.Text) - txtRacestage_start.Text = TrimComplete(txtRacestage_start.Text) - txtIntrotoplay.Text = TrimComplete(txtIntrotoplay.Text) - txtCreditsCutscene.Text = TrimComplete(txtCreditsCutscene.Text) - txtExeccfg.Text = TrimComplete(txtExeccfg.Text) - txtGamedata.Text = TrimComplete(txtGamedata.Text) - txtNumemblems.Text = TrimComplete(txtNumemblems.Text) - txtInvulntics.Text = TrimComplete(txtInvulntics.Text) - txtSneakertics.Text = TrimComplete(txtSneakertics.Text) - txtFlashingtics.Text = TrimComplete(txtFlashingtics.Text) - txtTailsflytics.Text = TrimComplete(txtTailsflytics.Text) - txtUnderwatertics.Text = TrimComplete(txtUnderwatertics.Text) - txtSpacetimetics.Text = TrimComplete(txtSpacetimetics.Text) - txtExtralifetics.Text = TrimComplete(txtExtralifetics.Text) - txtParalooptics.Text = TrimComplete(txtParalooptics.Text) - txtHelpertics.Text = TrimComplete(txtHelpertics.Text) - txtGameovertics.Text = TrimComplete(txtGameovertics.Text) - txtTitleScrollSpeed.Text = TrimComplete(txtTitleScrollSpeed.Text) - - If txtSstage_start.Text <> "" Then tsTarget.WriteLine "SSTAGE_START = " & Val(txtSstage_start.Text) - If txtSpstage_start.Text <> "" Then tsTarget.WriteLine "SPSTAGE_START = " & Val(txtSpstage_start.Text) - If txtRacestage_start.Text <> "" Then tsTarget.WriteLine "RACESTAGE_START = " & Val(txtRacestage_start.Text) - If txtIntrotoplay.Text <> "" Then tsTarget.WriteLine "INTROTOPLAY = " & Val(txtIntrotoplay.Text) - If txtCreditsCutscene.Text <> "" Then tsTarget.WriteLine "CREDITSCUTSCENE = " & Val(txtCreditsCutscene.Text) - If txtExeccfg.Text <> "" Then tsTarget.WriteLine "EXECCFG = " & txtExeccfg.Text - If txtGamedata.Text <> "" Then tsTarget.WriteLine "GAMEDATA = " & txtGamedata.Text - If txtNumemblems.Text <> "" Then - tsTarget.WriteLine "NUMEMBLEMS = " & Val(txtNumemblems.Text) - EditedNumemblems = True - End If - If txtInvulntics.Text <> "" Then tsTarget.WriteLine "INVULNTICS = " & Val(txtInvulntics.Text) - If txtSneakertics.Text <> "" Then tsTarget.WriteLine "SNEAKERTICS = " & Val(txtSneakertics.Text) - If txtFlashingtics.Text <> "" Then tsTarget.WriteLine "FLASHINGTICS = " & Val(txtFlashingtics.Text) - If txtTailsflytics.Text <> "" Then tsTarget.WriteLine "TAILSFLYTICS = " & Val(txtTailsflytics.Text) - If txtUnderwatertics.Text <> "" Then tsTarget.WriteLine "UNDERWATERTICS = " & Val(txtUnderwatertics.Text) - If txtSpacetimetics.Text <> "" Then tsTarget.WriteLine "SPACETIMETICS = " & Val(txtSpacetimetics.Text) - If txtExtralifetics.Text <> "" Then tsTarget.WriteLine "EXTRALIFETICS = " & Val(txtExtralifetics.Text) - If txtParalooptics.Text <> "" Then tsTarget.WriteLine "PARALOOPTICS = " & Val(txtParalooptics.Text) - If txtHelpertics.Text <> "" Then tsTarget.WriteLine "HELPERTICS = " & Val(txtHelpertics.Text) - If txtGameovertics.Text <> "" Then tsTarget.WriteLine "GAMEOVERTICS = " & Val(txtGameovertics.Text) - If txtTitleScrollSpeed.Text <> "" Then tsTarget.WriteLine "TITLESCROLLSPEED = " & Val(txtTitleScrollSpeed.Text) - If chkLoopTitle.Value = 1 Then tsTarget.WriteLine "LOOPTITLE = " & chkLoopTitle.Value - If chkDisableSpeedAdjust.Value = 1 Then tsTarget.WriteLine "DISABLESPEEDADJUST = " & chkDisableSpeedAdjust.Value - - flags = 0 - For i = 0 To 2 - If chkReset(i).Value = 1 Then - flags = flags + Val(chkReset(i).Tag) - End If - Next - - If flags > 0 Then tsTarget.WriteLine "RESETDATA = " & flags - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - MsgBox "Settings Saved." -End Sub - diff --git a/tools/SOCEdit/frmMaincfg.frx b/tools/SOCEdit/frmMaincfg.frx deleted file mode 100644 index 2ae3673307b7e47781b379ec9ae8ac569ee3fda5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1090 zcmb7@F>V_%5Jf*NBa1YVwlZ8bguo>ysh?txuZQfIDs5wrO4i z6*PoZbDb3pJ26%}!93CsvY^`WP1>}|>9DztMak1cXxm#`(d4~p*ajNqy`3iUC?{@w zk>z&KapGBSftY{e`dG>l*oZIJCqF&Mdu1C_%Q9`eP_z0w&U+O3IkerVp)Afj=GI^;PI13#+b=1~t1f0E7pc}Wk)}X-++Pbw1Kfzmn>#=L@&JNC8U8D=Z#Q>cKg{gzHsA$VpHILP?E1XJKRi4=PKKV2h9~a- z_PMKVL+P}Q{b%>Tf|?Cv=9mqAWj%%^EMe0%El9`u#W1sWx0l24n6_f2k#EOV*`7&5 fC9V0s*L>%u?60IH&hkb2gXUL8h5Zfg!87;^dSyMb diff --git a/tools/SOCEdit/frmSoundEdit.frm b/tools/SOCEdit/frmSoundEdit.frm deleted file mode 100644 index c91d84ed8..000000000 --- a/tools/SOCEdit/frmSoundEdit.frm +++ /dev/null @@ -1,485 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmSoundEdit - Caption = "Sound Edit" - ClientHeight = 4995 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 6180 - Icon = "frmSoundEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 4995 - ScaleWidth = 6180 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton cmdDelete - Caption = "&Delete sound from SOC" - Height = 495 - Left = 5040 - Style = 1 'Graphical - TabIndex = 13 - Top = 4320 - Width = 1095 - End - Begin VB.CommandButton cmdSave - Caption = "&Save" - Height = 495 - Left = 3840 - TabIndex = 6 - Top = 4320 - Width = 1095 - End - Begin VB.CommandButton cmdReload - Caption = "&Load Code Default" - Height = 495 - Left = 2640 - Style = 1 'Graphical - TabIndex = 5 - Top = 4320 - Width = 1095 - End - Begin VB.Frame frmSpecial - Caption = "Special Properties" - Height = 3375 - Left = 2640 - TabIndex = 4 - Top = 840 - Width = 3495 - Begin VB.CheckBox chkTotallySingle - Caption = "Make sure only one sound of this is playing at a time on any sound channel." - Height = 615 - Left = 120 - TabIndex = 12 - Tag = "1" - Top = 2640 - Width = 3255 - End - Begin VB.CheckBox chkEightEx - Caption = "Sound can be heard across 8x the distance" - Height = 375 - Left = 120 - TabIndex = 10 - Tag = "16" - Top = 2160 - Width = 2295 - End - Begin VB.CheckBox chkOutside - Caption = "Volume dependent on how close you are to outside" - Height = 375 - Left = 120 - TabIndex = 9 - Tag = "4" - Top = 360 - Width = 2295 - End - Begin VB.CheckBox chkFourEx - Caption = "Sound can be heard across 4x the distance" - Height = 375 - Left = 120 - TabIndex = 8 - Tag = "8" - Top = 1560 - Width = 2055 - End - Begin VB.CheckBox chkMultiple - Caption = "More than one of this sound can be played per object at a time (i.e., thunder)" - Height = 615 - Left = 120 - TabIndex = 7 - Tag = "2" - Top = 840 - Width = 2535 - End - Begin VB.Label Label1 - Caption = "Combine for 32x" - Height = 495 - Left = 2760 - TabIndex = 11 - Top = 1800 - Width = 615 - End - Begin VB.Line Line4 - X1 = 2400 - X2 = 2640 - Y1 = 2400 - Y2 = 2400 - End - Begin VB.Line Line2 - X1 = 2400 - X2 = 2640 - Y1 = 1800 - Y2 = 1800 - End - Begin VB.Line Line1 - X1 = 2640 - X2 = 2640 - Y1 = 2400 - Y2 = 1800 - End - End - Begin VB.ComboBox cmbPriority - Height = 315 - ItemData = "frmSoundEdit.frx":0442 - Left = 3360 - List = "frmSoundEdit.frx":0444 - TabIndex = 2 - Top = 120 - Width = 855 - End - Begin VB.CheckBox chkSingularity - Caption = "Only one can be played at a time per object." - Height = 255 - Left = 2640 - TabIndex = 1 - Top = 480 - Width = 3495 - End - Begin VB.ListBox lstSounds - Height = 4740 - Left = 120 - TabIndex = 0 - Top = 120 - Width = 2415 - End - Begin VB.Line Line3 - X1 = 0 - X2 = 720 - Y1 = 0 - Y2 = 0 - End - Begin VB.Label lblPriority - Alignment = 1 'Right Justify - Caption = "Priority:" - Height = 255 - Left = 2640 - TabIndex = 3 - Top = 120 - Width = 615 - End -End -Attribute VB_Name = "frmSoundEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdDelete_Click() - Call WriteSound(True) -End Sub - -Private Sub cmdReload_Click() - Call ClearForm - If InStr(lstSounds.List(lstSounds.ListIndex), "(free slot)") = 0 Then - Call LoadSoundInfo(lstSounds.ListIndex) - Else - MsgBox "Free slots do not have a code default." - End If -End Sub - -Private Sub cmdSave_Click() - Call WriteSound(False) -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub ClearForm() - cmbPriority.Text = "" - chkSingularity.Value = 0 - chkOutside.Value = 0 - chkMultiple.Value = 0 - chkFourEx.Value = 0 - chkEightEx.Value = 0 - chkTotallySingle.Value = 0 -End Sub - -Private Sub Reload() - Call ClearForm - Call LoadCode - lstSounds.ListIndex = 0 -End Sub - -Private Sub LoadCode() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - Dim i As Integer, numfreeslots As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False) - - Do While InStr(ts.ReadLine, "List of sounds (don't modify this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - lstSounds.Clear - - Do While InStr(line, "sfx_freeslot0") = 0 - startclip = InStr(line, "sfx_") - If InStr(line, "sfx_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - lstSounds.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing - -'Populate the free slots! - numfreeslots = 800 - - For i = 1 To numfreeslots - If i < 10 Then - addstring = number & " - " & "sfx_fre00" & i & " (free slot)" - ElseIf i < 100 Then - addstring = number & " - " & "sfx_fre0" & i & " (free slot)" - Else - addstring = number & " - " & "sfx_fre" & i & " (free slot)" - End If - lstSounds.AddItem addstring - number = number + 1 - Next - - For i = 0 To 127 - cmbPriority.AddItem i - Next -End Sub - -Private Sub lstSounds_Click() - Call ClearForm - If InStr(lstSounds.List(lstSounds.ListIndex), "(free slot)") = 0 Then - Call LoadSoundInfo(lstSounds.ListIndex) - End If - Call LoadSOCSoundInfo(lstSounds.ListIndex) -End Sub - -Private Sub LoadSOCSoundInfo(SoundNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "SOUND" And Val(word2) = SoundNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "SINGULAR" Then - If Val(word2) = 1 Then - chkSingularity.Value = 1 - Else - chkSingularity.Value = 0 - End If - ElseIf word = "PRIORITY" Then - cmbPriority.Text = Val(word2) - ElseIf word = "FLAGS" Then - ProcessSoundFlags (Val(word2)) - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadSoundInfo(StateNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim token As String - Dim frame As Long - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("sounds.c", ForReading, False) - - Do While InStr(ts.ReadLine, "S_sfx[0] needs to be a dummy for odd reasons.") = 0 - Loop - - number = 0 - - Do While number <> StateNum - Do While InStr(ts.ReadLine, """") = 0 - Loop - number = number + 1 - Loop - - Do While InStr(line, """") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, """") + 1 - line = Mid(line, startclip, Len(line) - startclip) - endclip = InStr(line, """") - 1 - token = TrimComplete(Left(line, endclip)) - - 'txtName.Text = line - - startclip = InStr(line, ",") + 1 - line = Mid(line, startclip, Len(line) - startclip) - endclip = InStr(line, ",") - 1 - token = TrimComplete(Left(line, endclip)) - - If token = "true" Then - chkSingularity.Value = 1 - Else - chkSingularity.Value = 0 - End If - - startclip = InStr(line, ",") + 1 - line = Mid(line, startclip, Len(line) - startclip) - endclip = InStr(line, ",") - 1 - token = TrimComplete(Left(line, endclip)) - cmbPriority.Text = token - - startclip = InStr(line, ",") + 1 - line = Mid(line, startclip, Len(line) - startclip) - endclip = InStr(line, ",") - 1 - token = TrimComplete(Left(line, endclip)) - - ProcessSoundFlags (Val(token)) - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub ProcessSoundFlags(flags As Long) - - chkTotallySingle.Value = 0 - chkMultiple.Value = 0 - chkOutside.Value = 0 - chkFourEx.Value = 0 - chkEightEx.Value = 0 - - If flags = -1 Then - Exit Sub - End If - - If flags And 1 Then - chkTotallySingle.Value = 1 - End If - - If flags And 2 Then - chkMultiple.Value = 1 - End If - - If flags And 4 Then - chkOutside.Value = 1 - End If - - If flags And 8 Then - chkFourEx.Value = 1 - End If - - If flags And 16 Then - chkEightEx.Value = 1 - End If - -End Sub - -Private Sub WriteSound(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim soundfound As Boolean - - soundfound = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current sound exists in the SOC, delete it. - If word = "SOUND" And Val(word2) = lstSounds.ListIndex Then - soundfound = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "SOUND " & lstSounds.ListIndex - cmbPriority.Text = TrimComplete(cmbPriority.Text) - If cmbPriority.Text <> "" Then tsTarget.WriteLine "PRIORITY = " & Val(cmbPriority.Text) - If chkSingularity.Value = 1 Then tsTarget.WriteLine "SINGULAR = 1" - - flags = 0 - - If chkOutside.Value = 1 Then flags = flags + Val(chkOutside.Tag) - If chkMultiple.Value = 1 Then flags = flags + Val(chkMultiple.Tag) - If chkFourEx.Value = 1 Then flags = flags + Val(chkFourEx.Tag) - If chkEightEx.Value = 1 Then flags = flags + Val(chkEightEx.Tag) - If chkTotallySingle.Value = 1 Then flags = flags + Val(chkTotallySingle.Tag) - - If flags > 0 Then tsTarget.WriteLine "FLAGS = " & flags - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If soundfound = True Then - MsgBox "Sound removed from SOC." - Else - MsgBox "Sound not found in SOC." - End If - Else - MsgBox "Sound Saved." - End If -End Sub - diff --git a/tools/SOCEdit/frmSoundEdit.frx b/tools/SOCEdit/frmSoundEdit.frx deleted file mode 100644 index 980538679b05296de823a191f94f0564401fd92d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1094 zcmb7@F>V_%5Jf*NBa1YVwlZ8bguo>ysh?txuZQfIDs5wrO4i z6*PoZbDb3pJ26%}!93CsvY^`WP1>}|>9DztMak1cXxm#`(d4~p*ajNqy`3iUC?{@w zk>z&KapGBSftY{e`dG>l*oZIJCqF&Mdu1C_%Q9`eP_z0w&U+O3IkerVp)Afj=GI^;PI13#+b=1~t1f0E7pc}Wk)}X-++Pbw1Kfzmn>#=L@&JNC8U8D=Z#Q>cKg{gzHsA$VpHILP?E1XJKRi4=PKKV2h9~a- z_PMKVL+P}Q{b%>Tf|?Cv=9mqAWj%%^EMe0%El9`u#W1sWx0l24n6_f2k#EOV*`7&5 gC9V0s*L>%u?60IH&hkb2gXUL8h5Zfg!85S&7jZm2vH$=8 diff --git a/tools/SOCEdit/frmStateEdit.frm b/tools/SOCEdit/frmStateEdit.frm deleted file mode 100644 index 4eca5a1bc..000000000 --- a/tools/SOCEdit/frmStateEdit.frm +++ /dev/null @@ -1,940 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmStateEdit - Caption = "State Edit" - ClientHeight = 6750 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 8970 - Icon = "frmStateEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 6750 - ScaleWidth = 8970 - StartUpPosition = 3 'Windows Default - Begin VB.TextBox lblVar2Desc - Height = 495 - Left = 4440 - Locked = -1 'True - MultiLine = -1 'True - ScrollBars = 2 'Vertical - TabIndex = 25 - Top = 3000 - Width = 4455 - End - Begin VB.TextBox lblVar1Desc - Height = 495 - Left = 4440 - Locked = -1 'True - MultiLine = -1 'True - ScrollBars = 2 'Vertical - TabIndex = 24 - Top = 2400 - Width = 4455 - End - Begin VB.TextBox lblActionDesc - Height = 735 - Left = 4440 - Locked = -1 'True - MultiLine = -1 'True - ScrollBars = 2 'Vertical - TabIndex = 23 - Top = 1560 - Width = 4455 - End - Begin VB.ListBox lstThings - Height = 450 - ItemData = "frmStateEdit.frx":0442 - Left = 7440 - List = "frmStateEdit.frx":0444 - TabIndex = 22 - Top = 6120 - Visible = 0 'False - Width = 975 - End - Begin VB.TextBox txtFuncVar2 - Height = 285 - Left = 7200 - TabIndex = 19 - Top = 3600 - Width = 1215 - End - Begin VB.TextBox txtFuncVar1 - Height = 285 - Left = 5520 - TabIndex = 18 - Top = 3600 - Width = 1095 - End - Begin VB.CommandButton cmdCopy - Caption = "&Copy state to..." - Height = 495 - Left = 6120 - Style = 1 'Graphical - TabIndex = 17 - Top = 6120 - Width = 1095 - End - Begin VB.CommandButton cmdDelete - Caption = "&Delete State from SOC" - Height = 495 - Left = 6120 - Style = 1 'Graphical - TabIndex = 16 - Top = 5520 - Width = 1095 - End - Begin VB.CommandButton cmdReload - Caption = "&Load Code Default" - Height = 495 - Left = 4920 - Style = 1 'Graphical - TabIndex = 15 - Top = 5520 - Width = 1095 - End - Begin VB.CommandButton cmdSave - Caption = "&Save" - Height = 495 - Left = 7320 - TabIndex = 14 - Top = 5520 - Width = 1095 - End - Begin VB.ComboBox cmbTranslucency - Height = 315 - ItemData = "frmStateEdit.frx":0446 - Left = 6720 - List = "frmStateEdit.frx":045C - TabIndex = 12 - Top = 5040 - Width = 1695 - End - Begin VB.CheckBox chkFullbright - Caption = "Make sprite full-brightness (unaffected by lighting)" - Height = 495 - Left = 6240 - TabIndex = 11 - Top = 4440 - Width = 2175 - End - Begin VB.ComboBox cmbNextstate - Height = 315 - Left = 6120 - TabIndex = 9 - Top = 3960 - Width = 2295 - End - Begin VB.ComboBox cmbAction - Height = 315 - Left = 6000 - TabIndex = 7 - Top = 1200 - Width = 2295 - End - Begin VB.TextBox txtTics - Height = 285 - Left = 7800 - TabIndex = 5 - Top = 720 - Width = 495 - End - Begin VB.TextBox txtFrame - Height = 285 - Left = 5880 - MaxLength = 2 - TabIndex = 3 - Top = 720 - Width = 495 - End - Begin VB.ComboBox cmbSprite - Height = 315 - Left = 5880 - TabIndex = 1 - Top = 120 - Width = 2415 - End - Begin VB.ListBox lstStates - Height = 6495 - Left = 120 - TabIndex = 0 - Top = 120 - Width = 4215 - End - Begin VB.Label lblFuncVar2 - Alignment = 1 'Right Justify - Caption = "Var2:" - Height = 255 - Left = 6600 - TabIndex = 21 - Top = 3600 - Width = 495 - End - Begin VB.Label lblFuncVar1 - Alignment = 1 'Right Justify - Caption = "Var1:" - Height = 255 - Left = 4920 - TabIndex = 20 - Top = 3600 - Width = 495 - End - Begin VB.Label lblTranslucency - Alignment = 1 'Right Justify - Caption = "Translucency:" - Height = 255 - Left = 5520 - TabIndex = 13 - Top = 5040 - Width = 1095 - End - Begin VB.Label lblNextstate - Alignment = 1 'Right Justify - Caption = "Next State:" - Height = 255 - Left = 5160 - TabIndex = 10 - Top = 3960 - Width = 855 - End - Begin VB.Label lblAction - Alignment = 1 'Right Justify - Caption = "Function to Call:" - Height = 375 - Left = 5040 - TabIndex = 8 - Top = 1080 - Width = 855 - End - Begin VB.Label lblTics - Alignment = 1 'Right Justify - Caption = "Tics (-1 for infinite duration):" - Height = 495 - Left = 6480 - TabIndex = 6 - Top = 600 - Width = 1215 - End - Begin VB.Label lblFrame - Alignment = 1 'Right Justify - Caption = "Frame:" - Height = 255 - Left = 5160 - TabIndex = 4 - Top = 720 - Width = 615 - End - Begin VB.Label lblSprite - Alignment = 1 'Right Justify - Caption = "Sprite:" - Height = 255 - Left = 5160 - TabIndex = 2 - Top = 120 - Width = 615 - End -End -Attribute VB_Name = "frmStateEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmbAction_Click() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim index As Integer - Dim ActionName As String - - ActionName = cmbAction.List(cmbAction.ListIndex) - - If cmbAction.ListIndex = 0 Then - lblActionDesc.Text = "" - lblVar1Desc.Text = "" - lblVar2Desc.Text = "" - Exit Sub - End If - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("p_enemy.c", ForReading, False) - - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Mid(line, 4, 9) = "Function:" And InStr(line, ActionName) > 0 Then - ts.ReadLine ' // - line = ts.ReadLine ' // Description: - index = InStr(line, ":") - lblActionDesc.Text = Mid(line, index + 2, Len(line) - (index + 1)) - - ts.ReadLine ' // - line = ts.ReadLine ' // var1 = - If InStr(line, "var1:") Then - lblVar1Desc.Text = Mid(line, 4, Len(line) - 3) - line = ts.ReadLine - Do While Left(line, 7) <> "// var2" - lblVar1Desc.Text = lblVar1Desc.Text & vbCrLf & TrimComplete(Mid(line, 4, Len(line) - 3)) - line = ts.ReadLine - Loop - Else - lblVar1Desc.Text = Mid(line, 4, Len(line) - 3) - End If - - If Left(line, 7) <> "// var2" Then - line = ts.ReadLine ' // var2 = - End If - - If InStr(line, "var2:") Then - lblVar2Desc.Text = Mid(line, 4, Len(line) - 3) - line = ts.ReadLine - Do While Len(line) > 4 - lblVar2Desc.Text = lblVar2Desc.Text & vbCrLf & TrimComplete(Mid(line, 4, Len(line) - 3)) - line = ts.ReadLine - Loop - Else - lblVar2Desc.Text = Mid(line, 4, Len(line) - 3) - End If - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub cmdCopy_Click() - Dim Response As String - - Response$ = InputBox("Copy state to #:", "Copy State") - - If Response = "" Then Exit Sub - - Response = TrimComplete(Response) - - Call WriteState(False, Val(Response)) - - MsgBox "State copied to #" & Val(Response) -End Sub - -Private Sub cmdDelete_Click() - Call WriteState(True, lstStates.ListIndex) -End Sub - -Private Sub cmdReload_Click() - Call ClearForm - - If InStr(lstStates.List(lstStates.ListIndex), "S_FREESLOT") = 0 Then - LoadStateInfo (lstStates.ListIndex) - Else - MsgBox "Free slots do not have a code default." - End If -End Sub - -Private Sub cmdSave_Click() - If TrimComplete(txtFrame.Text) = "" And (chkFullbright.Value = 1 Or cmbTranslucency.ListIndex > 0) Then - MsgBox "ERROR: Frame field required for fullbright/translucency." - Exit Sub - End If - Call WriteState(False, lstStates.ListIndex) -End Sub - -Private Sub Form_Load() - Call Reload - lstStates.ListIndex = 0 -End Sub - -Private Sub ClearForm() - cmbNextstate.Text = "" - cmbSprite.Text = "" - txtFrame.Text = "" - cmbAction.Text = "" - txtFuncVar1.Text = "" - txtFuncVar2.Text = "" - lblActionDesc.Text = "" - lblVar1Desc.Text = "" - lblVar2Desc.Text = "" - chkFullbright.Value = False - cmbTranslucency.ListIndex = 0 -End Sub - -Private Sub Reload() - LoadStates - LoadSprites - LoadActions -End Sub - -Private Sub LoadStates() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - Dim numfreeslots As Integer, i As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Object states (don't modify this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - lstStates.Clear - - Do While InStr(line, "S_FIRSTFREESLOT") = 0 - startclip = InStr(line, "S_") - If InStr(line, "S_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - lstStates.AddItem addstring - cmbNextstate.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - - 'Populate the free slots! - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - line = ts.ReadLine - Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SLOTS ") + 6 - numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) * 6 - - For i = 1 To numfreeslots - addstring = number & " - " & "S_FREESLOT" & i - lstStates.AddItem addstring - cmbNextstate.AddItem addstring - number = number + 1 - Next - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadSprites() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - Dim numfreeslots As Integer, i As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Hey, moron! If you change this table, don't forget about") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbSprite.Clear - - Do While InStr(line, "SPR_FIRSTFREESLOT") = 0 - startclip = InStr(line, "SPR_") - If InStr(line, "SPR_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - addstring = number & " - " & line - cmbSprite.AddItem addstring - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - - 'Populate the free slots! - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - line = ts.ReadLine - Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SLOTS ") + 6 - numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) - - For i = 1 To numfreeslots - If i < 10 Then - addstring = number & " - " & "SPR_F00" & i & " (Free slot)" - ElseIf i < 100 Then - addstring = number & " - " & "SPR_F0" & i & " (Free slot)" - Else - addstring = number & " - " & "SPR_F" & i & " (Free slot)" - End If - - cmbSprite.AddItem addstring - number = number + 1 - Next - - ts.Close - - Set myFSO = Nothing -End Sub - -Private Sub LoadActions() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim addstring As String - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("dehacked.c", ForReading, False) - - Do While InStr(ts.ReadLine, "actionpointer_t actionpointers[]") = 0 - Loop - - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - cmbAction.Clear - - cmbAction.AddItem "None" - - Do While InStr(line, "NULL") = 0 - startclip = InStr(line, "A_") - If InStr(line, "A_") <> 0 Then - endclip = InStr(line, "}") - line = Mid(line, startclip, endclip - startclip) - cmbAction.AddItem line - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub lstStates_Click() - Call ClearForm - - If InStr(lstStates.List(lstStates.ListIndex), "S_FREESLOT") = 0 Then - LoadStateInfo (lstStates.ListIndex) - End If - - LoadSOCStateInfo (lstStates.ListIndex) -End Sub - -Private Sub LoadSOCStateInfo(StateNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim frameNum As Long - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "FRAME" And Val(word2) = StateNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "SPRITENUMBER" Then - cmbSprite.ListIndex = Val(word2) - ElseIf word = "SPRITESUBNUMBER" Then - frameNum = Val(word2) - - If frameNum >= 327680 Then ' 5 << 16 - cmbTranslucency.ListIndex = 5 - frameNum = frameNum And Not 327680 - ElseIf frameNum >= 262144 Then ' 4 << 16 - cmbTranslucency.ListIndex = 4 - frameNum = frameNum And Not 262144 - ElseIf frameNum >= 196608 Then ' 3 << 16 - cmbTranslucency.ListIndex = 3 - frameNum = frameNum And Not 196608 - ElseIf frameNum >= 131072 Then ' 2 << 16 - cmbTranslucency.ListIndex = 2 - frameNum = frameNum And Not 131072 - ElseIf frameNum >= 65536 Then ' 1 << 16 - cmbTranslucency.ListIndex = 1 - frameNum = frameNum And Not 65536 - End If - - If frameNum >= 32768 Then - chkFullbright.Value = 1 - frameNum = frameNum And Not 32768 - Else - chkFullbright.Value = 0 - End If - - txtFrame.Text = frameNum - ElseIf word = "DURATION" Then - txtTics.Text = Val(word2) - ElseIf word = "NEXT" Then - cmbNextstate.ListIndex = Val(word2) - ElseIf word = "ACTION" Then - Call FindComboIndex(cmbAction, UCase(SecondToken(line))) - ElseIf word = "VAR1" Then - txtFuncVar1.Text = Val(word2) - ElseIf word = "VAR2" Then - txtFuncVar2.Text = Val(word2) - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub LoadStateInfo(StateNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim token As String - Dim frame As Long - Dim templine As String - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.c", ForReading, False) - - Do While InStr(ts.ReadLine, "Keep this comment directly above S_NULL") = 0 - Loop - - number = 0 - - Do While number <> StateNum - Do While InStr(ts.ReadLine, "SPR_") = 0 - Loop - number = number + 1 - Loop - - Do While InStr(line, "SPR_") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SPR_") - line = Mid(line, startclip, Len(line) - startclip) - endclip = InStr(line, ",") - 1 - token = Left(line, endclip) - Call FindComboIndex(cmbSprite, token) - - startclip = InStr(line, ",") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, ",") - 1 - frame = Val(Left(line, endclip)) - - If frame >= 32768 Then - chkFullbright.Value = 1 - frame = frame - 32768 - Else - chkFullbright.Value = 0 - End If - - txtFrame.Text = frame - - cmbTranslucency.ListIndex = 0 - - startclip = InStr(line, ",") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, ",") - 1 - txtTics.Text = Val(Left(line, endclip)) - - startclip = InStr(line, "{") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, "}") - 1 - cmbAction.Text = TrimComplete(Left(line, endclip)) - If cmbAction.Text = "NULL" Then cmbAction.Text = "None" - - startclip = InStr(line, ",") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, ",") - 1 - templine = Left(line, endclip) - - templine = TrimComplete(templine) - 'Check for *FRACUNIT values - endclip = InStr(templine, "*FRACUNIT") - If endclip <> 0 Then - templine = Left(templine, endclip - 1) - templine = Val(templine) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(templine, "MT_") - If endclip <> 0 Then - templine = FindThingNum(templine) & " - " & templine - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(templine, "pw_") - If endclip <> 0 Then - templine = FindPowerNum(templine) & " - " & templine - End If - txtFuncVar1.Text = templine - - startclip = InStr(line, ",") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, ",") - 1 - templine = Left(line, endclip) - - templine = TrimComplete(templine) - 'Check for *FRACUNIT values - endclip = InStr(templine, "*FRACUNIT") - If endclip <> 0 Then - templine = Left(templine, endclip - 1) - templine = Val(templine) * 65536 - End If - 'Check for crazy-odd MT_ usage - endclip = InStr(templine, "MT_") - If endclip <> 0 Then - templine = FindThingNum(templine) & " - " & templine - End If - 'Check for crazy-odd pw_ usage - endclip = InStr(templine, "pw_") - If endclip <> 0 Then - templine = FindPowerNum(templine) & " - " & templine - End If - txtFuncVar2.Text = templine - - startclip = InStr(line, ",") + 1 - line = TrimComplete(Mid(line, startclip, Len(line) - startclip)) - endclip = InStr(line, "}") - 1 - Call FindComboIndex(cmbNextstate, TrimComplete(Left(line, endclip))) - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub FindComboIndex(ByRef Box As ComboBox, line As String) - Dim i As Integer - - For i = 0 To Box.ListCount - If InStr(UCase(Box.List(i)), UCase(line)) Then - Box.ListIndex = i - Exit For - End If - Next -End Sub - -Private Sub WriteState(Remove As Boolean, num As Integer) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim flags As Long - Dim statefound As Boolean - - statefound = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current sound exists in the SOC, delete it. - If word = "FRAME" And Val(word2) = num Then - statefound = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream) - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "FRAME " & num - cmbSprite.Text = TrimComplete(cmbSprite.Text) - txtFrame.Text = TrimComplete(txtFrame.Text) - txtTics.Text = TrimComplete(txtTics.Text) - cmbAction.Text = TrimComplete(cmbAction.Text) - txtFuncVar1.Text = TrimComplete(txtFuncVar1.Text) - txtFuncVar2.Text = TrimComplete(txtFuncVar2.Text) - cmbNextstate.Text = TrimComplete(cmbNextstate.Text) - cmbTranslucency.Text = TrimComplete(cmbTranslucency.Text) - - If cmbSprite.Text <> "" Then tsTarget.WriteLine "SPRITENUMBER = " & cmbSprite.ListIndex - - flags = Val(txtFrame.Text) - If chkFullbright.Value = 1 Then flags = flags + 32768 - - ' Grrr VB doesn't have bitshifts!! - If cmbTranslucency.Text <> "" Then - flags = flags + cmbTranslucency.ListIndex * 65536 - End If - - If txtFrame.Text <> "" Then tsTarget.WriteLine "SPRITESUBNUMBER = " & flags - If txtTics.Text <> "" Then tsTarget.WriteLine "DURATION = " & Val(txtTics.Text) - If cmbNextstate.Text <> "" Then tsTarget.WriteLine "NEXT = " & cmbNextstate.ListIndex - If cmbAction.Text <> "" Then tsTarget.WriteLine "ACTION " & cmbAction.Text - If txtFuncVar1.Text <> "" Then tsTarget.WriteLine "VAR1 = " & Val(txtFuncVar1.Text) - If txtFuncVar2.Text <> "" Then tsTarget.WriteLine "VAR2 = " & Val(txtFuncVar2.Text) - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If statefound = True Then - MsgBox "State removed from SOC." - Else - MsgBox "State not found in SOC." - End If - Else - MsgBox "State Saved." - End If -End Sub - -Private Sub LoadThings() - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer, endclip As Integer - Dim numfreeslots As Integer, i As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Little flag for SOC editor (don't change this comment!)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - lstThings.Clear - - Do While InStr(line, "MT_FIRSTFREESLOT") = 0 - startclip = InStr(line, "MT_") - If InStr(line, "MT_") <> 0 Then - endclip = InStr(line, ",") - line = Mid(line, startclip, endclip - startclip) - lstThings.AddItem number & " - " & line - number = number + 1 - End If - line = ts.ReadLine - Loop - - ts.Close - - 'Populate the free slots! - Set ts = myFSO.OpenTextFile("info.h", ForReading, False) - - line = ts.ReadLine - Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0 - line = ts.ReadLine - Loop - - startclip = InStr(line, "SLOTS ") + 6 - numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) - - For i = 1 To numfreeslots - lstThings.AddItem number & " - " & "MT_FREESLOT" & i - number = number + 1 - Next - - ts.Close - Set myFSO = Nothing -End Sub - -Private Function FindThingNum(ThingName As String) As Integer - Dim i As Integer - Dim temp As String - Dim startpoint As Integer - Dim endpoint As Integer - - lstThings.Clear - LoadThings - - For i = 0 To lstThings.ListCount - 1 - temp = lstThings.List(i) - startpoint = InStr(temp, "-") + 2 - endpoint = Len(temp) - startpoint + 1 - temp = Mid(temp, startpoint, endpoint) - If temp = ThingName Then - FindThingNum = Val(lstThings.List(i)) - Exit For - End If - Next -End Function - -Private Function FindPowerNum(PowerName As String) As Integer - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim number As Integer - Dim startclip As Integer - - ChDir SourcePath - Set ts = myFSO.OpenTextFile("d_player.h", ForReading, False) - - Do While InStr(ts.ReadLine, "Player powers. (don't edit this comment)") = 0 - Loop - - ts.SkipLine ' typedef enum - ts.SkipLine ' { - - line = ts.ReadLine - number = 0 - - Do While InStr(line, "NUMPOWERS") = 0 - startclip = InStr(line, PowerName) - If startclip <> 0 Then - FindPowerNum = number - Exit Do - End If - number = number + 1 - line = ts.ReadLine - Loop - - ts.Close - Set myFSO = Nothing -End Function diff --git a/tools/SOCEdit/frmStateEdit.frx b/tools/SOCEdit/frmStateEdit.frx deleted file mode 100644 index 8069c37e05db5bf778fe4a3f43101626fdb0d320..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1254 zcmb7D!EVz)5Pfb?++0Xn6?%#hhhE#GPyH41 z1^onagB!jjk=!hA)=qFrE^Pcf^Jd=edS@qZ9s%7E@RAmAumh!P;^Nm1@RYVz%Xq^9 z9+!XyV~RK-9N1|Hsog$8fDghjGknuU9LKbhF!q5l;t~8wNM75AQ?C~jr1iZ*fV93h zUI(20D2m48b-*PxW;X8UiZOTMn5_g8OO43|?usw6P2D_g7B{vi`E+BV=tfo)c_JEa zLu%!ToF?N|&baXFTrLN#W;~Zmz~=vQREly6WY~{OGCzA)H_BFJEsJU41vOWH!1*18 z{Dic~6Vf6Vb#eKBIFC_Sj_&4krZ=Wju)(E_X30(GB^H&Fr)U!gCgx5tYa60OIPy(~ z-MB;_DN-lJ(wRHvEAcbo)F}@dBW;J}%iFMe{DUw8GK+) zh*h7*^tX?YJFfjR%*bNp982d&?$ zjvgqopgBC(qv4?sf35k_QjMYh6sR-Z)q`O+vwLwC^hVE=9-Rk_>Hg{Gi{S7NKyGDA diff --git a/tools/SOCEdit/frmUnlockablesEdit.frm b/tools/SOCEdit/frmUnlockablesEdit.frm deleted file mode 100644 index f43209a78..000000000 --- a/tools/SOCEdit/frmUnlockablesEdit.frm +++ /dev/null @@ -1,391 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmUnlockablesEdit - Caption = "Unlockables Edit" - ClientHeight = 3675 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 8130 - Icon = "frmUnlockablesEdit.frx":0000 - LinkTopic = "Form1" - MaxButton = 0 'False - ScaleHeight = 3675 - ScaleWidth = 8130 - StartUpPosition = 3 'Windows Default - Begin VB.CheckBox chkGrade - Caption = "Must have beaten Ultimate" - Height = 255 - Index = 4 - Left = 5400 - TabIndex = 20 - Tag = "1024" - Top = 2160 - Width = 2655 - End - Begin VB.CheckBox chkGrade - Caption = "Must have beaten Very Hard" - Height = 255 - Index = 3 - Left = 5400 - TabIndex = 19 - Tag = "128" - Top = 1800 - Width = 2655 - End - Begin VB.CheckBox chkGrade - Caption = "Must have all emblems" - Height = 255 - Index = 2 - Left = 5400 - TabIndex = 18 - Tag = "16" - Top = 1440 - Width = 2055 - End - Begin VB.CheckBox chkGrade - Caption = "Must have gotten all 7 emeralds" - Height = 255 - Index = 1 - Left = 5400 - TabIndex = 17 - Tag = "8" - Top = 1080 - Width = 2655 - End - Begin VB.CheckBox chkGrade - Caption = "Game must be completed" - Height = 255 - Index = 0 - Left = 5400 - TabIndex = 16 - Tag = "1" - Top = 720 - Width = 2175 - End - Begin VB.TextBox txtVar - Height = 285 - Left = 4320 - TabIndex = 14 - Top = 2640 - Width = 615 - End - Begin VB.ComboBox cmbType - Height = 315 - ItemData = "frmUnlockablesEdit.frx":0442 - Left = 3360 - List = "frmUnlockablesEdit.frx":044C - TabIndex = 12 - Top = 2160 - Width = 1575 - End - Begin VB.TextBox txtNeededTime - Height = 285 - Left = 4080 - TabIndex = 10 - Top = 1680 - Width = 855 - End - Begin VB.TextBox txtNeededEmblems - Height = 285 - Left = 4440 - TabIndex = 9 - Top = 1200 - Width = 495 - End - Begin VB.TextBox txtObjective - Height = 285 - Left = 3240 - TabIndex = 7 - Top = 720 - Width = 1695 - End - Begin VB.TextBox txtName - Height = 285 - Left = 3240 - TabIndex = 5 - Top = 240 - Width = 1695 - End - Begin VB.CommandButton cmdDelete - Caption = "&Delete from SOC" - Height = 375 - Left = 3480 - TabIndex = 3 - Top = 3120 - Width = 1575 - End - Begin VB.CommandButton cmdSave - Caption = "&Save Changes" - Height = 375 - Left = 1800 - TabIndex = 2 - Top = 3120 - Width = 1575 - End - Begin VB.ListBox lstUnlockables - Height = 2985 - ItemData = "frmUnlockablesEdit.frx":046A - Left = 120 - List = "frmUnlockablesEdit.frx":049B - TabIndex = 0 - Top = 480 - Width = 1215 - End - Begin VB.Label lblNote - Caption = "Note: All requirements are combinable." - Height = 495 - Left = 6000 - TabIndex = 22 - Top = 2760 - Width = 1695 - End - Begin VB.Label lblOtherReqs - Caption = "Other Requirements:" - Height = 255 - Left = 5400 - TabIndex = 21 - Top = 360 - Width = 1935 - End - Begin VB.Label lblVar - Alignment = 1 'Right Justify - Caption = "Map # to warp to:" - Height = 255 - Left = 2880 - TabIndex = 15 - Top = 2640 - Width = 1335 - End - Begin VB.Label lblType - Alignment = 1 'Right Justify - Caption = "Type of Unlockable:" - Height = 255 - Left = 1800 - TabIndex = 13 - Top = 2160 - Width = 1455 - End - Begin VB.Label lblNeededTime - Alignment = 1 'Right Justify - Caption = "Needed time on Time Attack rank (in seconds):" - Height = 375 - Left = 1440 - TabIndex = 11 - Top = 1560 - Width = 2535 - End - Begin VB.Label lblNeededEmblems - Alignment = 1 'Right Justify - Caption = "# of Emblems Needed:" - Height = 255 - Left = 2640 - TabIndex = 8 - Top = 1200 - Width = 1695 - End - Begin VB.Label lblObjective - Alignment = 1 'Right Justify - Caption = "Objective:" - Height = 255 - Left = 2400 - TabIndex = 6 - Top = 720 - Width = 735 - End - Begin VB.Label lblName - Alignment = 1 'Right Justify - Caption = "Name:" - Height = 255 - Left = 2640 - TabIndex = 4 - Top = 240 - Width = 495 - End - Begin VB.Label lblHUDItems - Caption = "Unlockables:" - Height = 255 - Left = 120 - TabIndex = 1 - Top = 240 - Width = 975 - End -End -Attribute VB_Name = "frmUnlockablesEdit" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub cmdDelete_Click() - Call WriteUnlockableItem(True) -End Sub - -Private Sub cmdSave_Click() - Call WriteUnlockableItem(False) -End Sub - -Private Sub Form_Load() - Call Reload -End Sub - -Private Sub Reload() - txtName.Text = "" - txtObjective.Text = "" - txtNeededEmblems.Text = "" - txtNeededTime.Text = "" - cmbType.Text = "" - txtVar.Text = "" - - Dim i As Integer - - For i = 0 To chkGrade.Count - 1 - chkGrade(i).Value = 0 - Next i - - lstUnlockables.ListIndex = 0 -End Sub - -Private Sub lstUnlockables_Click() - Call ReadSOC(lstUnlockables.ListIndex + 1) -End Sub - -Private Sub ReadSOC(UnlockableNum As Integer) - Dim myFSO As New Scripting.FileSystemObject - Dim ts As TextStream - Dim line As String - Dim word As String - Dim word2 As String - - Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False) - -SOCLoad: - Do While Not ts.AtEndOfStream - line = ts.ReadLine - - If Left(line, 1) = "#" Then GoTo SOCLoad - - If Left(line, 1) = vbCrLf Then GoTo SOCLoad - - If Len(line) < 1 Then GoTo SOCLoad - - word = FirstToken(line) - word2 = SecondToken(line) - - If UCase(word) = "UNLOCKABLE" And Val(word2) = UnlockableNum Then - Do While Len(line) > 0 And Not ts.AtEndOfStream - line = ts.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondTokenEqual(line)) - - If word = "NAME" Then - txtName.Text = word2 - ElseIf word = "OBJECTIVE" Then - txtObjective.Text = word2 - ElseIf word = "NEEDEDEMBLEMS" Then - txtNeededEmblems.Text = Val(word2) - ElseIf word = "NEEDEDTIME" Then - txtNeededTime.Text = Val(word2) - ElseIf word = "TYPE" Then - cmbType.ListIndex = Val(word2) - ElseIf word = "VAR" Then - txtVar.Text = Val(word2) - ElseIf word = "NEEDEDGRADE" Then - Dim i As Integer - - For i = 0 To chkGrade.Count - 1 - If Val(word2) And chkGrade(i).Tag Then - chkGrade(i).Tag = True - End If - Next i - ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then - MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line - End If - Loop - Exit Do - End If - Loop - - ts.Close - Set myFSO = Nothing -End Sub - -Private Sub WriteUnlockableItem(Remove As Boolean) - Dim myFSOSource As New Scripting.FileSystemObject - Dim tsSource As TextStream - Dim myFSOTarget As New Scripting.FileSystemObject - Dim tsTarget As TextStream - Dim line As String - Dim word As String - Dim word2 As String - Dim unlockableremoved As Boolean - - unlockableremoved = False - - Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False) - Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True) - - Do While Not tsSource.AtEndOfStream - line = tsSource.ReadLine - word = UCase(FirstToken(line)) - word2 = UCase(SecondToken(line)) - - 'If the current item exists in the SOC, delete it. - If word = "UNLOCKABLE" And Val(word2) = lstUnlockables.ListIndex + 1 Then - unlockableremoved = True - Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not tsSource.AtEndOfStream - Loop - Else - tsTarget.WriteLine line - End If - Loop - - tsSource.Close - Set myFSOSource = Nothing - - If Remove = False Then - If line <> "" Then tsTarget.WriteLine "" - - tsTarget.WriteLine "UNLOCKABLE " & lstUnlockables.ListIndex + 1 - txtName.Text = TrimComplete(txtName.Text) - txtObjective.Text = TrimComplete(txtObjective.Text) - txtNeededEmblems.Text = TrimComplete(txtNeededEmblems.Text) - txtNeededTime.Text = TrimComplete(txtNeededTime.Text) - txtVar.Text = TrimComplete(txtVar.Text) - - If txtName.Text <> "" Then tsTarget.WriteLine "NAME = " & txtName.Text - If txtObjective.Text <> "" Then tsTarget.WriteLine "OBJECTIVE = " & txtObjective.Text - If txtNeededEmblems.Text <> "" Then tsTarget.WriteLine "NEEDEDEMBLEMS = " & txtNeededEmblems.Text - If txtNeededTime.Text <> "" Then tsTarget.WriteLine "NEEDEDTIME = " & txtNeededTime.Text - If cmbType.ListIndex <> -1 Then tsTarget.WriteLine "TYPE = " & cmbType.ListIndex - If txtVar.Text <> "" Then tsTarget.WriteLine "VAR = " & txtVar.Text - - Dim writegrade As Long - Dim i As Integer - writegrade = 0 - - For i = 0 To chkGrade.Count - 1 - If chkGrade(i).Value = 1 Then - writegrade = writegrade + chkGrade(i).Tag - End If - Next i - - If writegrade > 0 Then tsTarget.WriteLine "NEEDEDGRADE = " & writegrade - End If - - tsTarget.Close - Set myFSOTarget = Nothing - - FileCopy SOCTemp, SOCFile - - Kill SOCTemp - - If Remove = True Then - If unlockableremoved = True Then - MsgBox "Unlockable deleted from SOC." - Else - MsgBox "Couldn't find Unlockable in SOC." - End If - Else - MsgBox "Unlockable Saved." - End If -End Sub diff --git a/tools/SOCEdit/frmUnlockablesEdit.frx b/tools/SOCEdit/frmUnlockablesEdit.frx deleted file mode 100644 index d9d464d4e6a38acb9cb4cbd09818f5705e8c1a26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1399 zcmb7@F>ezw6vzKg5GN|i<)*4rZ$cg0rY*3Let=302z4&ib>RdNsyKDZAqLiVys2O1 z_yl|evccBdl1SH>|FfOchDZqKo}Yj3{cYbpJ1-vq`2}!D4=8kyrac+rR|j}X-|Jc4 zR=|@ku+3OXJEAF=X(*{(-AaHD%F;Ua9HOpkdP!*WKx-M%_>+)ytD8y^KS4}3yZ|xT zD3$@WSyfe0ECUfy>q#+mih?__O%{TYL9Lx2TJX$n8o9KdU7Mn~=~`FSwX7)eMl{@p zXylE2jb$TeT=>e#C3kg*`P_|AYA+UVcRM zxgq*2YJd5^n4jS-$6+{~>0mkq0ZSS6oSRO&EGj3DF`#Yfnmg63ZHX>T$vbJ@#yN&) z(W(}6HC6gE?PtTOV}59jc2GXNyeZ@U51JN(v+@;V=a)Bi(+=e9X0$t+-18nSr7iAx z&GG71@{TjZJ8c|$4*&O_t3);gHY;=g!8c}?C|N} zF@ML|rz}rjXL)vZvF7OH^y4sI>a6;oeT;Q3_vU^6;q2Y%+dNBm1KJCyAJBe42LT-h a^emv~0lioccHaqcH^jXV`yuX!c<>wC+KfN| diff --git a/tools/SOCEdit/icon1.ico b/tools/SOCEdit/icon1.ico deleted file mode 100644 index 1ea9d1005fd0b48b539586fa21e1c4afca63daf1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmb7@J#yPH5QQHsPdIKOvGS<0Dv$acK)!)*;o2R?m5@o1)-GA;D$EITgs6)6ev*>NDqs*`|!6|N=_G=%_g$;dLi9nCzHhIPWn8O=J;md4me%XOCIg{<_Qw< zJ{fw3>beeVfe`-+!A5|exvV?iTwRv|XnkEcp!Icgbhv5TwoP+%RL~GM&0|(H>_pof z1j|T6$b#y?cWKiqhr{kACM8b~p>1DmMU(fYVH;?a_ja4aqa45S=Pb92juX#vbHw-` zuB%dxz*;<9pT?;lpQLR}F3Yg-Le1)ban4c1m(Y^;(2|?FT>c-uBjD^zfok0AQG*6IXz#WzdF+cHkXYoln3F9O}Gde7<>VoCq}?4L!sEt#en~hSIc+^=I$D zftn3OmY5xNWi^JyEn(9$Jrj=ki*9BeUN5`hF>J|7Ex(SfvcHjrO4{;$Z~4wm+22WP T2J3g}2bymg74|#$3Esd5wi7&7