Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions lua/autorun/cpu_load.lua

This file was deleted.

21 changes: 21 additions & 0 deletions lua/autorun/wire_load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if SERVER then
AddCSLuaFile("wire/fpgagates.lua")
AddCSLuaFile("wire/cpugates.lua")
AddCSLuaFile("wire/wiremonitors.lua")
AddCSLuaFile("wire/cpulib.lua")
AddCSLuaFile("wire/gpulib.lua")
AddCSLuaFile("wire/timedpairs.lua")
AddCSLuaFile("wire/default_data_generator.lua")
Expand Down Expand Up @@ -69,6 +70,23 @@ if SERVER then
AddCSLuaFile("wire/client/node_editor/nodeeditor.lua")
AddCSLuaFile("wire/client/node_editor/wire_fpga_editor.lua")

-- hl-zasm
AddCSLuaFile("wire/client/hlzasm/hc_compiler.lua")
AddCSLuaFile("wire/client/hlzasm/hc_opcodes.lua")
AddCSLuaFile("wire/client/hlzasm/hc_expression.lua")
AddCSLuaFile("wire/client/hlzasm/hc_preprocess.lua")
AddCSLuaFile("wire/client/hlzasm/hc_syntax.lua")
AddCSLuaFile("wire/client/hlzasm/hc_codetree.lua")
AddCSLuaFile("wire/client/hlzasm/hc_optimize.lua")
AddCSLuaFile("wire/client/hlzasm/hc_output.lua")
AddCSLuaFile("wire/client/hlzasm/hc_tokenizer.lua")

-- zvm
AddCSLuaFile("wire/zvm/zvm_core.lua")
AddCSLuaFile("wire/zvm/zvm_features.lua")
AddCSLuaFile("wire/zvm/zvm_opcodes.lua")
AddCSLuaFile("wire/zvm/zvm_data.lua")

for _, filename in ipairs(file.Find("wire/client/text_editor/modes/*.lua","LUA")) do
AddCSLuaFile("wire/client/text_editor/modes/" .. filename)
end
Expand All @@ -83,6 +101,7 @@ include("wire/wiregates.lua")
include("wire/fpgagates.lua")
include("wire/cpugates.lua")
include("wire/wiremonitors.lua")
include("wire/cpulib.lua")
include("wire/gpulib.lua")
include("wire/timedpairs.lua")
include("wire/default_data_generator.lua")
Expand All @@ -95,6 +114,7 @@ if SERVER then
include("wire/server/debuggerlib.lua")
include("wire/server/sents_registry.lua")
include("wire/server/wire_map_interface.lua")
include("wire/zvm/zvm_tests.lua")

if CreateConVar("wire_force_workshop", "1", FCVAR_ARCHIVE, "Should Wire force all clients to download the Workshop edition of Wire, for models? (requires restart to disable)"):GetBool() then
if select(2, WireLib.GetVersion()):find("Workshop", 1, true) then
Expand Down Expand Up @@ -130,6 +150,7 @@ if CLIENT then
include("wire/client/customspawnmenu.lua")
include("wire/client/node_editor/nodeeditor.lua")
include("wire/client/node_editor/wire_fpga_editor.lua")
include("wire/client/hlzasm/hc_compiler.lua")
end

if SERVER then print("Wiremod " .. select(2, WireLib.GetVersion()) .. " loaded") end
54 changes: 0 additions & 54 deletions lua/wire/cpu_default_data_decompressor.lua

This file was deleted.

5 changes: 4 additions & 1 deletion lua/wire/default_data_generator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ function WireLib.GenerateDefaultData()
-- When adding new folders that need to be generated, add them to this list
RecursivelyGenerateFolder("data_static/expression2/")
RecursivelyGenerateFolder("data_static/fpgachip/")
RecursivelyGenerateFolder("data_static/cpuchip/")
RecursivelyGenerateFolder("data_static/gpuchip/")
RecursivelyGenerateFolder("data_static/spuchip/")
RecursivelyGenerateFolder("data_static/soundlists/")
end

-- Regenerate data files on every structure update
local DataVersion = 2
local DataVersion = 3

if cookie.GetNumber("wire_data_version", 0) < DataVersion then
cookie.Set("wire_data_version", tostring(DataVersion))
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/cpu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{ name = "reload", text = "Attach debugger" },
{ name = "reload_shift", text = "Shift+Reload: Clear" },
}

WireToolSetup.setToolMenuIcon("icon16/server.png")
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 7 )
Expand Down Expand Up @@ -140,7 +142,7 @@


----------------------------------------------------------------------------
local currentDirectory

Check warning on line 145 in lua/wire/stools/cpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: currentDirectory
local FileBrowser = vgui.Create("wire_expression2_browser" , panel)
panel:AddPanel(FileBrowser)
FileBrowser:Setup("cpuchip")
Expand Down Expand Up @@ -178,7 +180,7 @@


----------------------------------------------------------------------------
local modelPanel = WireDermaExts.ModelSelect(panel, "wire_cpu_model", list.Get("Wire_gate_Models"), 2)

Check warning on line 183 in lua/wire/stools/cpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: modelPanel
panel:AddControl("Label", {Text = ""})


Expand Down Expand Up @@ -387,12 +389,12 @@
outc(string.format(" RAM %5d KB",collectgarbage("count") or 0),1,Color(255,255,255,255))

surface.SetDrawColor(240, 120, 0, 255)
surface.DrawRect(16*(5),32*2+14,256,4)

Check warning on line 392 in lua/wire/stools/cpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unnecessary parentheses"

Unnecessary parentheses
outc("TASK",2,Color(240, 120,0,255))
outc(" STATUS",3,Color(255,255,255,255))

surface.SetDrawColor(240, 120, 0, 255)
surface.DrawRect(16*(4),32*6+14,256,4)

Check warning on line 397 in lua/wire/stools/cpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unnecessary parentheses"

Unnecessary parentheses
outc("NET",6,Color(240, 120,0,255))
if CPULib.Uploading then
outc(string.format("UP %.3f KB",CPULib.RemainingUploadData/1024),7,Color(255,255,255,255))
Expand Down Expand Up @@ -483,9 +485,9 @@
outform(1,1,7,5,"HL-ZASM")
outc(string.format(" Stage %d/7",HCOMP.Stage+1),3,Color(0,0,0,255))
outc(" "..stageNameShort[HCOMP.Stage+1],4,Color(0,0,0,255))
else
--
end

Check warning on line 490 in lua/wire/stools/cpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Empty block"

Empty else statement
end
end

Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/fpga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if CLIENT then
{ name = "right", text = "Open editor" },
{ name = "reload", text = "Reset" }
}

WireToolSetup.setToolMenuIcon("icon16/application_view_icons.png")
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax(40)
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/gpu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{ name = "right", text = "open editor and/or attach debugger to the ZGPU" },
{ name = "reload", text = "Wipe ROM/RAM and reset memory model" },
}

WireToolSetup.setToolMenuIcon("icon16/monitor.png")
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 7 )
Expand Down Expand Up @@ -39,7 +41,7 @@
function TOOL:Reload(trace)
if trace.Entity:IsPlayer() then return false end

local player = self:GetOwner()

Check warning on line 44 in lua/wire/stools/gpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: player
if (trace.Entity:IsValid()) and
(trace.Entity:GetClass() == "gmod_wire_gpu") then
trace.Entity:SetMemoryModel(self:GetClientInfo("memorymodel"))
Expand Down Expand Up @@ -119,7 +121,7 @@


----------------------------------------------------------------------------
local currentDirectory

Check warning on line 124 in lua/wire/stools/gpu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: currentDirectory
local FileBrowser = vgui.Create("wire_expression2_browser" , panel)
panel:AddPanel(FileBrowser)
FileBrowser:Setup("GPUChip")
Expand Down
2 changes: 2 additions & 0 deletions lua/wire/stools/spu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
{ name = "left", text = "Create/reflash " .. TOOL.Name },
{ name = "right", text = "Open editor" },
}

WireToolSetup.setToolMenuIcon("icon16/ipod_sound.png")
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 7 )
Expand Down Expand Up @@ -38,7 +40,7 @@
function TOOL:Reload(trace)
if trace.Entity:IsPlayer() then return false end

local player = self:GetOwner()

Check warning on line 43 in lua/wire/stools/spu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: player
if (trace.Entity:IsValid()) and
(trace.Entity:GetClass() == "gmod_wire_spu") then
trace.Entity:SetMemoryModel(self:GetClientInfo("memorymodel"))
Expand Down Expand Up @@ -124,7 +126,7 @@


----------------------------------------------------------------------------
local currentDirectory

Check warning on line 129 in lua/wire/stools/spu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: currentDirectory
local FileBrowser = vgui.Create("wire_expression2_browser" , panel)
panel:AddPanel(FileBrowser)
FileBrowser:Setup("spuchip")
Expand Down
Loading